Count the frequency of base G in a given DNA sequence
...NAlength){ my $base = substr($DNA,$currentPos,1); if($base eq "G"){ $countG++; } $currentPos++; } #end of while loop #print out the number of Gs print "There are $coun...2931 days ago
Perl script to count the number of Adenine, Thymine, Guanine and Cytosine in your DNA Sequence
#!/usr/local/bin/perl -w # While executing this script it asks for the file name of the DNA sequence. If the sequence file is not available in the same directory of...2930 days ago
Retrieve NCBI GenBank records with a range of accession numbers
#!/usr/bin/perl #FILE: ncbi_search.pl #AUTH: Paul Stothard (paul.stothard@gmail.com) use warnings; use strict; use Getopt::Long; use LWP::Simple; use URI::Es...2930 days ago
Blast result parser with Perl and Bioperl
...results are reported: # accesion number, length, description, E value...ery_name\tquery_length\taccession_number\tlength\tdescription\tE value...# get the accession numbers of the hits print OUT "\...# flow control for the number of hits needed last if ($...2928 days ago
Find the number of each 2 consecutive characters AA, AC,AG,AT,CC,CA... with Perl
#!/usr/bin/perl -w use strict; my $subject = "AACGTACTGACGTACTGGTTGGTACGA"; my %results = (); while ($subject =~ m/[ACTG][ATGC]/g) { # matched text = $&...2923 days ago
Generating a random string with Perl
...s=('a'..'z','A'..'Z','0'..'9','_'); my $random_string; foreach (1..$length_of_randomstring) { # rand @chars will generate a random # number between 0 and scalar @chars...2921 days ago
Perl script to generate a random psuedo DNA sequence !
#!/usr/bin/perl print "Enter a number of nucleotides: \n"; chomp ($N = ); @b=qw/A T G C/;print ">Genome\n";while($l2897 days ago
Perl script introduces control structures, arrays and hashes.
...her_way_of_getting_size_of_array\n\n"; # Control Loop: for for (my $i=0; $i 'ATCGATGCT', 'RNA' => 'AUGC', 'Number of seqs' => 2...2876 days ago
2718 days ago
2707 days ago