Python script to download covid genome !
...nk/files/ncov-sequences.yaml").text) seqs = seqs['genbank-sequences'] print("got %d sequences" % len(seqs...in x and x['gene-region'] == "complete": nm = x['accession'] print("downloading", nm) dna =...1150 days ago
BioPerl to convert between sequence formats from Fasta to Genbank
...= Bio::SeqIO->newFh('-file' => "$inFile" , '-format' => 'Fasta'); $out = Bio::SeqIO->newFh('-format' => 'Genbank'); print $out $_ while ;...2930 days ago
2930 days ago
2931 days ago
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 $countG G bases\n"...2931 days ago
2931 days ago
Read lines from input file – print lines that match a regular expression
...ne; #read the line-by-line for each line ask if it matches the regex print it if it matches while($li...ne; if ($line =~ /^ATG?C*[ATCG]+?A{3,10}$/) { print "$line\n"; } } e...2931 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";2931 days ago
Parse a genbank file using regular expressions
...) { if (/(LOCUS\s*)(\w*)(.*)/) { print "Locus: $2\n"; } elsif (/(VERSION.*GI:)(\d*)/) { print "GI: $2\n"; } elsif...$cds_start = $2; $cds_end = $4; print "CDS: $cds_start - $cds_end\n...2931 days ago
Perl script to Mutate a DNA Sequence
...xt # In Linux : /home/user/sequence/rnafile.txt use File::Path; print "ENTER THE FILENAME OF THE DN...; chomp $dnafilename; unless ( open(DNAFILE, $dnafilename) ) { print "Cannot open file \"$dnafilen...2930 days ago