2912 days ago
Count the frequency of base G in a given DNA sequence
#!/usr/bin/perl use strict; use warnings; my $DNA = "GATTACACAT"; #initialize $countG and $currentPos my $countG = 0; my $currentPos = 0; #calculate the lengt...2912 days ago
2912 days ago
Read lines from input file – print lines that match a regular expression
#!/usr/bin/perl use strict; use warnings; my $line; #read the line-by-line for each line ask if it matches the regex print it if it matches while($line = ){...2912 days ago
Check if your coputer ready to use BioPerl
#!/usr/bin/perl use strict; use warnings; #bioperl example code use strict; use warnings; #make the bioperl module (class) accessible to your program use Bio::Seq; print"ok - ready to use Bio::Seq";2912 days ago
Parse a genbank file using regular expressions
#! /usr/local/bin/perl -w $genbank = "genbank_file.txt"; open (GENBANK, $genbank) || die "cannot open $gb_report for reading: $!"; # Flag for multiline translation; 1 means translation "in progress" $trans...2912 days ago
BioPerl to convert between sequence formats from Fasta to Genbank
#!/usr/local/bin/perl -w # Sequence formats to choose: Fasta, EMBL. GenBank, Swissprot, PIR and GCG use Bio::SeqIO; $inFile = "BRCA2.fa"; $in = Bio::SeqIO->newFh...2911 days ago
2911 days ago
Perl script to Mutate a DNA Sequence
#!/usr/local/bin/perl -w # This script randomly mutates the DNA sequence and gen...SEQUENCE:= "; $dnafilename = ; chomp $dnafilename; unless ( open(DNAFILE, $dnafilename) ) { print "Cannot open file \"$dnafilename\"\n\n";...2911 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...$dna_filename = ; chomp $dna_filename; unless ( open(DNAFILE, $dna_filename) )...y the file does not exist!!! \n"; print "Cannot open file \"$dna_filename\"\n";...2911 days ago