#!/usr/bin/perl -w ############################################## ### Huang He ### ### treatment_for_blastn ### ############################################## use Getopt::Long; my %opt; GetOptions(\%opt,"f=s","o=s","r=s","e=s","i=s","a=s","b=s","c=s","bb=s","help"); unless ((defined $opt{f} and defined $opt{o} and defined $opt{r}) or defined $opt{e} or defined $opt{i} or defined $opt{b} or defined $opt{a} or defined $opt{c} or defined $opt{bb} or defined $opt{help} ){ &help (); } &help()if(defined $opt{help}); if(defined $opt{c}){ if(defined $opt{e} and defined $opt{i}){ if($opt{c}=~/and/){ `perl /home/huanghe/research/bin/pipeline/treatment_for_rRNA/skimmer.pl -r $opt{r} -e $opt{e} -i $opt{i} -f $opt{f} -o $opt{o} -c and`; } if($opt{c}=~/or/){ `perl /home/huanghe/research/bin/pipeline/treatment_for_rRNA/skimmer.pl -r $opt{r} -e $opt{e} -i $opt{i} -f $opt{f} -o $opt{o} -c or`; } } else{ &help (); } } elsif(defined $opt{e}){ `perl /home/huanghe/research/bin/pipeline/treatment_for_rRNA/skimmer.pl -r $opt{r} -e $opt{e} -f $opt{f} -o $opt{o}`; } elsif(defined $opt{i}){ `perl /home/huanghe/research/bin/pipeline/treatment_for_rRNA/skimmer.pl -r $opt{r} -i $opt{i} -f $opt{f} -o $opt{o}`; } elsif(defined $opt{a}){ `perl /home/huanghe/research/bin/pipeline/treatment_for_rRNA/skimmer.pl -r $opt{r} -a $opt{a} -f $opt{f} -o $opt{o}`; } elsif(defined $opt{b}){ `perl /home/huanghe/research/bin/pipeline/treatment_for_rRNA/skimmer.pl -r $opt{r} -b $opt{b} -f $opt{f} -o $opt{o}`; } if(defined $opt{bb}){ `perl /home/huanghe/research/bin/pipeline/treatment_for_rRNA/blast_best.pl $opt{o} best_$opt{o}`; } sub help{ warn <<"_EOT_"; ******* This is a help document.******** Usage: perl treatment_for_orignal_of_fasta.pl This script "skims" BLAST output files in either "long" or "short" format, by extracting only the hits that are below the provided e-value cut-off and/or above the provided percent identity (short format only). The long format version of the blast output is created using the default blastall and the short format version of the can be created by using blastall with the -m 9 parameter Usage: skimmer.pl [-r l, -r s] [-e N, -i M, -b X -a A] [-c AND, -c OR] -f -o -r l = long format -r s = short format -e N, where N is the e-value cut off in the form ne-m where n is an integer from 0 to 9 and m is an integer from 0 to 999 -i M, where M is the percent identity cut off (0.00-100.00) -b X, where X is the bit score (0.00-100.00) -a A, where A is the alignment length cut off (1-99999) -c and = e-value <= N AND percent identity >= M (-c is optional, -cAND is the default if both -e and -i are provided) -c or = e-value <= N OR percent identity >= M Note: the (optional) -a value is always "ANDed" with -e and/or -i value(s) -bb y, the tophit will be taken -f = the input file (must be given) -o = the output file (must be given) -r (must be given) **************************************** _EOT_ exit(1); }