1264 days ago
Python script to download covid genome !
#!/usr/bin/env python3 # these are the publicly available "complete" sequences # http...d().split("\n")[1:] allseq[nm] = ''.join(dna) import json with open("data/allseq.json", "w") as f: j...1183 days ago
Read lines from input file – print lines that match a regular expression
#!/usr/bin/perl use strict; use warnings; my $line; #read the line-by-line for ea...?A{3,10}$/) { print "$line\n"; } } exit(); __DATA__ ATGCCCAA ATGCCCAAAA ATGC...2964 days ago
Parse a genbank file using regular expressions
#! /usr/local/bin/perl -w $genbank = "genbank_file.txt"; open (GENBANK, $genbank) |...nslation product not found.\n"; } } else { # Skip this data } }2964 days ago
A multilayer perceptron (MLP) neural network in Perl
#!/usr/local/bin/perl -w #####################...eate an #extra input in the training data #and set to 1 #########...my $LR_HO = 0.07; ################ Data dependent settings #########...s initWeights(); # load in the data initData(); # train th...2963 days ago
Perl program to implement sliding window !
#!/usr/bin/perl -w my $filename = 'data.txt'; open(my TR, '2961 days ago
2961 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,"2922 days ago
Perl subroutine to read and write files
# Input output (InOut) the file # usage: # @array = InOut('...ile.txt',\$string); sub InOut { my($bit,$file,$data) = @_; if($bit eq 'read'){...en $file for output: $!\n"; print InOut ref $data eq 'ARRAY' ? @$data : ref $da...2913 days ago
Calculate some statistics for a DNA alignment with Perl
use Bio::AlignIO; use Bio::Align::DNAStatistics; my $s...', -file => 't/data/insulin.water'); my $aln =...fasta', -file => 't/data/nei_gojobori_test.aln'); m...2696 days ago