Python script to download covid genome !
...mplete": nm = x['accession'] print("downloading", nm) dna = Entrez.efetch(db='nucleotide',id=nm, rettype = 'fasta', retmode= 'text').read().split("\n")[1:] allseq...1099 days ago
R script to visualize fastANI core-genome comparison
...arguments query_fasta=commandArgs(TRUE)[1] subject_fasta=commandArgs(TRUE)[2] fastANI_visual_file=commandArgs(TRUE)[3] library(genoPlotR) #Read fastANI output comparison...1064 days ago
2879 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 each line ask if it matches the regex print it if it matches while($line = ){ chomp...2880 days ago
Needleman-Wunsch Algorithm in Perl
...eme (instead of using fixed MATCH and MISMATCH scores we will use values read from BLOSUM50) my $MATCH...= $gapcost; # for any gap my %BLOSUM50 = (); my @aalist = (); # read substitution matrix open in,...2868 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,"2838 days ago
2834 days ago
Perl subroutine to read and write files
# Input output (InOut) the file # usage: # @array = InOut('read',$file) # $string = InOut('read',$file) # InOut('write',$file,...ing); sub InOut { my($bit,$file,$data) = @_; if($bit eq 'read'){ open InOut,"< $file"...2828 days ago
2656 days ago
Transpose the file coordinates and plot dendrogram in R
#Save this as tr.awk { for (i=1; i2580 days ago