Python script to download covid genome !
#!/usr/bin/env python3 # these are the publicly available "complete" sequences...seqs = yaml.load(requests.get("https://www.ncbi.nlm.nih.gov/core/assets/genbank/files/ncov-sequences.yaml").text)...1118 days ago
Install BLAST in Ubuntu/Linux and Window !
#On ubuntu sudo apt-get install ncbi-blast+ #Ubuntu Conda installation conda...#Run this installer using the defaults, it should put BLAST under C:\Program Files\NCBI\blast-2.7.1+...1129 days ago
2898 days ago
Find and replace ambiguous characters in fasta file with Perl and Bioperl
#!/usr/bin/perl -w my $usage="\nUsage: $0 [-h] [-m char] [fastaFileName1...-m '?' will place ? to the ambigous characters.\n" . "If multiple files are given, sequences in all files are marged. If no \n"....2897 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] pas...Selecting previously unselected package dos2unix. (Reading database ... 177704 files and directories currently ins...1159 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('write',$file,\@a...2848 days ago
Install ATOM editor on Elemantory OS / Ubuntu
#Download ATOM deb file from https://atom.io/ https://atom.io/download/deb (bas...ting previously unselected package gconf2-common. (Reading database ... 194272 files and directories currently ins...1158 days ago
Extract fasta sequence from a multifasta file with coordinates
#!/usr/bin/perl use Bio::DB::Fasta; #US...Create database from a directory of Fasta files my $db = Bio::DB::Fasta->new('/path/to/fasta/files/'); my @ids = $db->ge...h = Bio::DB::Fasta->newFh('/path/to/fasta/files/'); while (my $seq = ) {...2515 days ago
Download the genome from NCBI using bash script/command
#!/bin/bash # Download the genome from NCBI using command # Create a Di....fna.gz|' > genomic_file_viral #Read the url from file and download FILES=$(pwd)/* for f in $FILES do echo "Processing $f fi...2514 days ago
Unzip all the genome file and remove all fasta header except first one
#!/bin/bash gzip -d *.gz FILES=$(pwd)/* for f in $FILES do echo "Processing $f file..." if [[ $f =~ \.fna$ ]]; then awk ' /^>/ && FNR > 1 {next} {print $0} ' $f | sed '/^>/{s/ /_/...2513 days ago