Download genome using NCBI esearch command line !
#Download using command line "NC_005956.1" / "CP003784.1" esearch -db nucleotide -query "NC_005956.1" | efetch -format fasta > seq1.fa esearch -db nucleotide -query "CP003784...1102 days ago
R script to visualize fastANI core-genome comparison
...ome comparison # Usage: Rscript # Output: .pdf # Uses genoPlotR package: http://genoplotr.r-forge.r-project.org #Parse command line arguments query_fasta=commandArgs(TRUE)[1] subject_fast...1102 days ago
2917 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;...2918 days ago
Extract a random sequence from a file
#!/usr/local/bin/perl -w use strict; use warnings; use autodie; use Lis...outputfile; my $size = 21; my $count = 10; while (my $line = ) { next unless $line =~ /^([ATGCN]+)/; my $g...2916 days ago
2915 days ago
Needleman-Wunsch Algorithm in Perl
...bal alignment algo (GOTHO 1982 mod) # usage statement die "usage: $0 \n" unless @ARGV == 4; # get sequences, matrix and gapcost from command line my ($seq1, $seq2, $smfile, $...2906 days ago
Count GC Content in nucleotide sequence with Perl
#!/usr/bin/perl -w ### Usage: get_gc_content.pl...chomp; if (/^>/) { #finish up previous line. if (length($seq) > 0) { &process_it; } #start new line. $id = $_; $id =~ s/^>(.+...2906 days ago
Perl script to extract fasta sequence by matching name/ids !!
#!/usr/bin/perl use strict; use warnings; use Text::Tr...@ARGV; my $out = shift @ARGV; my %select; open LINE, "$list" or die; while () {...= keys %select; print "Total Ids $size\n"; close LINE; $/ = "\n>"; open OUT, ">...2876 days ago
Converting from Windows-style to UNIX-style line endings with dos2unix
Lenovo-ideapad-320-15ISK:~/Downloads/abc/bin$ sudo apt install dos2unix [sudo] password for bioqueen: Reading package lists... Done Building dependency tree...1177 days ago