Python script to download covid genome !
#!/usr/bin/env python3 # these are the publicly availa...= x['accession'] print("downloading", nm) dna = Entrez.efetch(db='nucleotid...t').read().split("\n")[1:] allseq[nm] = ''.join(dna) import json with open("d...1098 days ago
2879 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 = 0; #calculate the length of $DNA my $DNAlength = length($DNA)...yes' increment $countG while($currentPos < $DNAlength){ my $base = substr($...2879 days ago
2879 days ago
Perl script to Mutate a DNA Sequence
#!/usr/local/bin/perl -w # This script randomly mutates the DNA sequence and generates 10 succ...asks for the file name of the DNA sequence. # If the DNA seque...int "ENTER THE FILENAME OF THE DNA SEQUENCE:= "; $dnafilename =...= mutate($DNA); print "Mutate DNA\n\n"; print "HERE ARE THE...2878 days ago
Perl script to count the number of Adenine, Thymine, Guanine and Cytosine in your DNA Sequence
#!/usr/local/bin/perl -w # While...asks for the file name of the DNA sequence. If the sequence fil...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) { if ( $base eq...2878 days ago
2872 days ago
Implementation of biological random mutation with Perl
#!/usr/bin/perl -w use strict; use wa...quence for a better recognition my $DNA="AAAAAAAAAAAAAAAAAAAAAAAAAAAA...srand (time | $$). $mutant=mutate ($DNA); print "Mutate \ n". $DNA...DNA \ n"; print "Here is the mutant DNA: \ n \ n"; print "$mutant...2863 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($l2845 days ago
Perl script introduces control structures, arrays and hashes.
#!/usr/bin/env perl use strict; use warnings; my @first_array = ('DNA', 'ATGCGTGC', 5, 'RNA', 'AUGC...f seqs' => 2 ); print $sequence{'DNA'}, "\n"; # Control Loop: for...2824 days ago