Calculate some statistics for a DNA alignment with Perl
...){ next if /Seq/; printf("%-9s %.4f \n",$_ , $an->{$_}); } print "\n\n"; } my $result3 = $stats->calc_average_KaKs($alnobj, 1000); for...2643 days ago
2630 days ago
Check overlapping range with Perl
...use strict; use warnings; my @ranges = 0; push @ranges, $ranges[-1] + 1 + int ra...or 1..10000; my @tests = map int rand $ranges[-1], 0..1000000; m...$ge); } sub match { my ($ranges, $tests) = @_; if (@...lse { my $pivot = int((@$ranges + 1)/ 2); my ($l...2621 days ago
Extracting FASTA sequences based on position with perl script !!
#!/usr/bin/env perl #Uses: perl sub-seq.pl input.txt range use strict; use warnings; my $end = pop; my $start = pop; local $/ = '>'; while () { chomp;...2615 days ago
Transpose the file coordinates and plot dendrogram in R
#Save this as tr.awk { for (i=1; i2611 days ago
Extract ids from file with perl
#!/usr/bin/perl use strict; use warnings; my $fh=read_fh("fin.txt"); my %idHash; my $lastKey; while () { chomp $_; my @cells = split /\t/, $_; $idHas...2602 days ago
picard tools command to get some insert statistics
...d picard/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_WIDTH=5001330 days ago
Extract fasta sequence from a multifasta file with coordinates
#!/usr/bin/perl use Bio::DB::Fasta; #USAGE perl extractFASTAwithSIZE.pl finalSample_filtered.fa 0 1000 > aaaaaa.fa my $fastaFile = shift; my $querySizeST = shift; my $qu...2526 days ago
Download the genome from NCBI using bash script/command
...ome # Look for genome assembly summary and extract the URL # USER need to pro...fna.gz|' > genomic_file_protozoa # -for vertebrate_mammalian curl 'ftp://ftp....+)|\1\2/\2_genomic.fna.gz|' > genomic_file_vertebrate_mammalian # -for vertebr...2525 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 }2518 days ago