2156 days ago
Python script to download covid genome !
#!/usr/bin/env python3 # these are the publicly available "complete" sequences # h...= x['accession'] print("downloading", nm) dna = Entrez.efetch(db='nucleotid...t').read().split("\n")[1:] allseq[nm] = ''.join(dna)...1148 days ago
2928 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 $curr...my $currentPos = 0; #calculate the length of $DNA my $DNAlength = length($DNA)...if 'yes' increment $countG while($currentPos < $DNAlen...2928 days ago
2928 days ago
Perl script to Mutate a DNA Sequence
...nt "ENTER THE FILENAME OF THE DNA SEQUENCE:= "; $dnafilename =...mutate($DNA); print "Mutate DNA\n\n"; print "HERE ARE THE...domposition { my($string) = @_; return int rand length $string; } sub randomelement {...2927 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...h the path. In windows: c:\dnafile.txt, In Linux: /home/us...AME OF THE DNA SEQUENCE:= "; $dna_filename = ; chomp $dna_file...rors = 0; foreach $base (@DNA) {...2927 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...2927 days ago
Find and replace ambiguous characters in fasta file with Perl and Bioperl
#!/usr/bin/perl -w my $usage="\nUsage: $0 [-h] [-m char] [fastaFileName1 ....seqOut->write_seq($s); } } exit; sub AmbiguousChar { my $string = shift; $string =~ s/[ATGC-]//g; $stri...2926 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";2925 days ago