Download the genome from NCBI using bash script/command
...efseq/fungi/assembly_summary.txt' | awk '{FS="\t"} !/^#/ {pri...nk/bacteria/assembly_summary.txt' | awk '{FS="\t"} !/^#/ {pri...eq/protozoa/assembly_summary.txt' | awk '{FS="\t"} !/^#/ {pri...filename=$(basename "$f") extension="${filename##*.}" f...2547 days ago
Unzip all the genome file and remove all fasta header except first one
...sh 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 '/^>/...2546 days ago
Read a tab delimited file and search with perl
use strict; use warnings; use Data::Dumper; use Text::CSV; use IO::Handle; my $file = "/home/urbe/Tools/Alienomics_v0.1/Alienomics/output/intermediate_files/rRNA/refGene.megablast"; open my $fh, "[0]\n"; warn Dumper $row; # To see the structure }2540 days ago
Download the gff files from NCBI using bash script/command
...efseq/fungi/assembly_summary.txt' | awk '{FS="\t"} !/^#/ {pri...nk/bacteria/assembly_summary.txt' | awk '{FS="\t"} !/^#/ {pri...eq/protozoa/assembly_summary.txt' | awk '{FS="\t"} !/^#/ {pri...filename=$(basename "$f") extension="${filename##*.}" f...2538 days ago
Extract fasta sequence from a multifasta file with fasta header Ids
#!/usr/bin/perl use strict; use warnings; #Usage: perl my $list = shift @ARGV; my $fasta = shift @ARGV; my $out = shift @ARGV; my %select; open LI...2533 days ago
2509 days ago
Compress and decompress the sequence with perl
use strict; use warnings; my @char; while () { @char = split //; } comp(\@char); #--------------------- my $com= "r0a3m4a4j0"; my @com = split //, $com; dcomp (\@com); #dcomp sub here sub dcomp { my ($com_ref)=@_; my @com=@$com_ref; my $car; for (my $aa=0; $aa2530 days ago
2484 days ago
Extract the fastq sequence with range in Perl
use Bio::DB::Fasta; open(POSITIONS,"positions.txt"); while(){ chomp; my ($seqName,$begin,$end) = split(/\s/); my $db = Bio::DB::Fasta->new('allGenomeContacted.fa'); my $seq = $db->seq("$seqName", $begin => $end); print "$seq\n"; } close(POSITIONS);2483 days ago
Collision free write with Perl
...usesage sub collision_free_write { my($outFile, $msg) = @_; open my $ofh, ">>", $outFile or die "$0 [$$]: open: $!"; flock $ofh, LOCK_EX or die "$0 [$$]: flock:...2476 days ago