Perl script to Mutate a DNA Sequence
...chomp $dnafilename; unless ( open(DNAFILE, $dnafilename) ) { print "Cannot open file \"$dnafilename\"\n\n"; goto h; } my $DNA = ; close DNAFILE; my $i; my $mutan...2924 days ago
Perl script to count the number of Adenine, Thymine, Guanine and Cytosine in your DNA Sequence
...(DNAFILE, $dna_filename) ) { print "Sorry the file does not exist!!! \n"; print "Cannot open file \"$dna_filename\"\n"; die; } @DNA = ; close DNAFILE; $DNA = join( '', @D...2924 days ago
Retrieve NCBI GenBank records with a range of accession numbers
...( defined( $param{maxRecords} ) && ( $param{maxRecords} == 1 ) ) ) { sleep(3); } } close($OUTFILE) or die("Error: Cannot close $param{outputFile} file: $!")...2924 days ago
Blast result parser with Perl and Bioperl
...} $count++; # flow control for the number of hits needed last if ($count == $numHits); } } } close OUT; print " DONE!!!\n";...2923 days ago
Perl program to implement sliding window !
#!/usr/bin/perl -w my $filename = 'data.txt'; open(my TR, '2923 days ago
2922 days ago
Needleman-Wunsch Algorithm in Perl
#!/usr/bin/perl # USAGE: perl nw.pl HEAGAWGHEE PAWHEAE BLOSUM50.txt -8 # See: "Biological sequence anaysis" Durbin et al. ed. CUP 1998, Pg. 19 # Needleman...2914 days ago
Count GC Content in nucleotide sequence with Perl
...$id =~ s/^>(.+?)\s.+$/$1/g; print OUT "$id\t"; } else { $seq = $seq . $_; } } #finish up last line. &process_it; close(IN); close(OUT); sub usage { $0 g...2914 days ago
Perl script to extract fasta sequence by matching name/ids !!
...$ids[0]} = 1; } my $size = keys %select; print "Total Ids $size\n"; close LINE; $/ = "\n>"; open OU...0751 circular cases print OUT ">$_" if (defined $select{$id}); } close FILE; close OUT;2883 days ago
Perl subroutine to read and write files
...ile" or die "Cannot open $file for input: $!\n"; my @file = ; close InOut; return wantarray...ef $data eq 'ARRAY' ? @$data : ref $data eq "SCALAR"? $$data : ''; close InOut; } }2874 days ago