Python script to download covid genome !
...("downloading", nm) dna = Entrez.efetch(db='nucleotide',id=nm, rettype = 'fasta', retmode= 'text').read().split("\n")[1:] allseq[nm] = ''.join(dna) import json with ope...1140 days ago
Perl script to count the number of Adenine, Thymine, Guanine and Cytosine in your DNA Sequence
...e) ) { print "Sorry the file does not exist!!! \n"; print "Cannot open file \"$dna_filename\"\n"; die; } @DNA = ; close DNAFILE; $DNA = join( '', @DNA); print " \n The o...2919 days ago
Perl subroutine to read and write files
...'read'){ open InOut,"< $file" or die "Cannot open $file for input: $!\n"; my @file = ; close InOut; return wantarray ? @file : join '', @file; } if($bit eq...2869 days ago
Check overlapping range with Perl
...sub match { my ($ranges, $tests) = @_; if (@$ranges == 1) { if (@$tests) { print "tests in range $ranges->[0]:\n", join(", ", @$tests), "\n";...2631 days ago
Genetic Algorithms demonstration with word DNA in Perl
...gth } map { uc } @dictionary; # build the letter frequencies hash (remember, all letters are uppercase) $freqs{$_}++ foreach split '', join '', @dictionary; } # th...2375 days ago
Plot the clock using Lastz -gerenal outfile
...@sChr = split '\_', $val; my $score=$pHash{$val}/$sChr[1]; push @allKeys, $sChr[0]; push @allFreq, $score; } my $allKeys=join ',', @allKeys; my $allFreq=join ',', @allFreq; my $hLen=scal...2302 days ago
Perl script to remove fasta sequences in multifasta file with certain length threshold
...mp; next unless /\w/; s/>$//gs; my @chunk = split /\n/; my $header = shift @chunk; my $seqlen = length join "", @chunk; print ">...2255 days ago
Perl script to find palindromic regions in DNA sequences
use strict; use warnings; my $pp = qr/(?: (\w) (?1) \g{-1} | \w? )/ix; my $filename = $ARGV[0]; open(my $fh, '2158 days ago
Perl script to check fastq reads qualities !
...name, $seq, $qual) = readfq(\*STDIN, \@aux)) { ++$n; $slen += length($seq); $qlen += length($qual) if ($qual); print join("\t", $n, $slen, $qlen), "\n"; } #print join("\t", $n, $slen, $qlen), "\n"...2158 days ago
Perl script to merge LastZ overlaps
#!/usr/bin/perl use strict; use warnings; use 5.010; # Filter out the exact/direct overlaps from tab seperated alignment file. (lastz format=general- ready) # Do not inclide header in lastz outfile # USAGE: perl filterOverlaps.pl infile > outfile open my $fh, '2129 days ago