Extract ids from file with perl
...while () { chomp $_; my @cells = split /\t/, $_; $idHash{$cells[0]}=$.; push @allIds, $cells[0]; } #Delete the last id for secutiry -- might does not finish all steps delete $hash{$allIds[-1]}...2605 days ago
picard tools command to get some insert statistics
...card/2.0.1 java -Xmx16g -XX:PermSize=8g -jar $PICARD_HOME/picard.jar CollectInsertSizeMetrics MINIMUM_PCT=0 HISTOGRAM_FILE=.pdf INPUT= OUTPUT=.sorted.collectInseSize HISTOGRAM_WI...1333 days ago
Extract fasta sequence from a multifasta file with coordinates
...se Bio::DB::Fasta; #USAGE perl extractFASTAwithSIZE.pl finalSample_filtered.fa 0 1000 > aaaaaa.fa m...">$id\n", "$sequence\n"; } __END__ use Bio::DB::Fasta; # Create database from a directory of...2529 days ago
Download the genome from NCBI using bash script/command
...Commentline if you are not interested in that genome set # -...nomic_file_fungi # -for bacteria curl 'ftp://ftp.ncbi.nlm....ic_file_protozoa # -for vertebrate_mammalian curl 'ftp://f...ilename=$(basename "$f") extension="${filename##*.}" fil...2528 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 }2521 days ago
Download the gff files from NCBI using bash script/command
...Commentline if you are not interested in that genome set # -...nomic_file_fungi # -for bacteria curl 'ftp://ftp.ncbi.nlm....ic_file_protozoa # -for vertebrate_mammalian curl 'ftp://f...ilename=$(basename "$f") extension="${filename##*.}" fil...2519 days ago
2491 days ago
2509 days ago
2466 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);2465 days ago