2159 days ago
Python script to download covid genome !
#!/usr/bin/env python3 # these are the publicly available "complete" sequences #...dna = Entrez.efetch(db='nucleotide',id=nm, rettype = 'fasta', retmode= 'text').read().split("\n")[1:] allseq...1151 days ago
R script to visualize fastANI core-genome comparison
####### # Purpose: Visualize fastANI core-genome comparison # Usage: Rscript...gs(TRUE)[2] fastANI_visual_file=commandArgs(TRUE)[3] library(genoPlotR) #Read fastANI output comparison...1116 days ago
2931 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 $line;...2932 days ago
Retrieve NCBI GenBank records with a range of accession numbers
#!/usr/bin/perl #FILE: ncbi_search.pl #AUTH: Paul Stothard (paul.stothard@gmail.com) use warnings; use strict; use Getopt::Long; use LWP::Simple; use URI::...etries => 5, help => undef ); Getopt::Long...2931 days ago
Needleman-Wunsch Algorithm in Perl
#!/usr/bin/perl # USAGE: perl nw.pl HEAGAWGHEE PAWHE...g fixed MATCH and MISMATCH scores we will use values read from BLOSUM50) my $MATCH...r any gap my %BLOSUM50 = (); my @aalist = (); # read substitution matrix open in,...2920 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,"2890 days ago
2887 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,\$string) # InOut('writ...sub InOut { my($bit,$file,$data) = @_; if($bit eq 'read'){ open InOut,"< $file"...2881 days ago