Perl script to count the number of Adenine, Thymine, Guanine and Cytosine in your DNA Sequence
#!/usr/local/bin/perl -w # While executing this sc...nce. If the sequence file is not available in the same directory of th..._of_T = 0; $errors = 0; foreach $base (@DNA) { if ( $...++$count_of_G; } elsif ( $base eq 't' ) { ++$cou...2964 days ago
Retrieve NCBI GenBank records with a range of accession numbers
...format => undef, verbose => undef, url...\$param{maxRecords}, 'verbose|v' => \$param{verbos...} message( $param{verbose}, "ESearch re...art=$retstart&retmax=$retmax&db=$param{database}&query_key=$q...2964 days ago
A multilayer perceptron (MLP) neural network in Perl
#!/usr/local/bin/perl -w ##############################...neural network in Perl Original source code by Phil Brierley #Translated into perl - ccolbourn Oct 2004 ###############...====================================== sub main { # initiate the w...2964 days ago
Extract a random sequence from a file
#!/usr/local/bin/perl -w use strict; use warnings; use autodie; use List::Util qw/ s...0 .. $len_genome-$size); next unless @start_points >= $count; print substr($genome, $_, 21), "\n" for...2963 days ago
2959 days ago
Blast result parser with Perl and Bioperl
#!/usr/local/bin/perl # # Dr. Xiaodong Bai # It may be freely distributed under GNU General Public...are reported: # accesion number, length, description, E val...# get the accession numbers of the hits print OUT...# flow control for the number of hits needed last if...2963 days ago
Find and replace ambiguous characters in fasta file with Perl and Bioperl
#!/usr/bin/perl -w my $usage="\nUsag..."If -m is specified, the ambiguous characters are repleced.... -m '?' will place ? to the ambigous characters.\n" . "I...ile = shift) { my $seqio_obj = Bio::SeqIO->new(-file => $...q($s); } } exit; sub AmbiguousChar { my $stri...2963 days ago
Perl program to implement sliding window !
#!/usr/bin/perl -w my $filename = 'data.txt'; open(my TR, '2963 days ago
2963 days ago
Perl to print indivisual nucleotide from a sequence!
#!/usr/bin/perl use strict; use warnings; my $string = "ATGCTTGCGT?AAATG??CT?GCGTA"; my @chars = split("", $string); print "First character: $chars[0]\n";2962 days ago