1201 days ago
Python script to download covid genome !
....efetch(db='nucleotide',id=nm, rettype = 'fasta', retmode= 'text').read().split("\n")[1:] allseq[nm] = ''.join(dna) import json with open("data/allseq.json", "w") as f: j...1121 days ago
Read lines from input file – print lines that match a regular expression
...$line = ){ chomp $line; if ($line =~ /^ATG?C*[ATCG]+?A{3,10}$/) { print "$line\n"; } } exit(); __DATA__ ATGCCCAA ATGCCCAAAA ATGC...2901 days ago
Parse a genbank file using regular expressions
...ans = 0; } else { print "Problems: end of translation product not found.\n"; } } else { # Skip this data } }2901 days ago
A multilayer perceptron (MLP) neural network in Perl
...ut bias create an #extra input in the training data #and set to 1 #########...H = 0.7; my $LR_HO = 0.07; ################ Data dependent settings #########...the weights initWeights(); # load in the data initData(); # train th...2900 days ago
Perl program to implement sliding window !
#!/usr/bin/perl -w my $filename = 'data.txt'; open(my TR, '2899 days ago
2899 days ago
Perl script to extract lines with matching ids !!
#!/usr/bin/perl use strict; use warnings; my %patterns; #USAGE: perl extactByIds.pl Idsfile1 file2 > Result # Open file and get patterns to search for open(my $fh2,"2860 days ago
Perl subroutine to read and write files
...!"; #InOut('write','file.txt',\$string); sub InOut { my($bit,$file,$data) = @_; if($bit eq 'read'){...ile" or die "Cannot open $file for output: $!\n"; print InOut ref $data eq 'ARRAY' ? @$data : ref $da...2850 days ago
Calculate some statistics for a DNA alignment with Perl
...new(-format => 'emboss', -file => 't/data/insulin.water'); my $aln =...gnIO->new(-format => 'fasta', -file => 't/data/nei_gojobori_test.aln'); m...2634 days ago