diff miRPlant.pl @ 44:0c4e11018934 draft

Uploaded
author big-tiandm
date Thu, 30 Oct 2014 21:29:19 -0400
parents 554fbaf5f451
children ca05d68aca13
line wrap: on
line diff
--- a/miRPlant.pl	Tue Oct 28 01:35:32 2014 -0400
+++ b/miRPlant.pl	Thu Oct 30 21:29:19 2014 -0400
@@ -13,7 +13,7 @@
 use threads::shared;
 use File::Path;
 use File::Basename;
-#use RNA;
+use RNA;
 use Term::ANSIColor;
 
 my %opts;
@@ -235,19 +235,19 @@
 	system("bowtie-build -f excised_precursor.fa excised_precursor");
 #	print "\nbowtie-build -f excised_precursor.fa excised_precursor\n";
 	
-	system("bowtie -v $mis -f -p $t -m $hit -a --best --strata excised_precursor $file > precursor_mapped.bwt");
+	system("bowtie -v $mis -f -p $t -m $hit -a --best --strata excised_precursor $file > precursor_mapped.bwt 2> run.log");
 #	print "\nbowtie -v $mis -f -p $t -m $hit -a --best --strata excised_precursor $file > precursor_mapped.bwt\n";
 	
 	system("perl $scipt_path/convert_bowtie_to_blast.pl  precursor_mapped.bwt $file excised_precursor.fa > precursor_mapped.bst");
 #	print "\nconvert_bowtie_to_blast.pl  precursor_mapped.bwt $file excised_precursor.fa > precursor_mapped.bst\n";
 
-	system("sort +3 -25  precursor_mapped.bst  > signatures.bst");
+	system("sort -k 4  precursor_mapped.bst  > signatures.bst");
 #	print "\nsort +3 -25  precursor_mapped.bst  > ../signatures.bst\n";
 
 	chdir $dir;
 	system("perl $scipt_path/miRDeep_plant.pl $predict/signatures.bst $predict/excised_precursor_struc.txt novel_tmp_dir -y > microRNA_prediction.mrd");
 #	print "\nmiRDeep_plant.pl $dir/signatures.bst $predict/excised_precursor_struc.txt tmp_dir -y > microRNA_prediction.txt\n";
-	system("rm novel_tmp_dir -rf");
+	#system("rm novel_tmp_dir -rf");
 	my $tag=join "," ,@mark;
 	system("perl $scipt_path/miRNA_Express_and_sequence.pl -i microRNA_prediction.mrd -list novel_microRNA_express.txt -fa novel_microRNA_mature.fa -pre novel_microRNA_precursor.fa -tag $tag");
 }
@@ -279,6 +279,7 @@
 sub filterbylength{
 	my $tmpmark=join ",", @mark;
 	system("perl $scipt_path/filterReadsByLength.pl -i $collapsed -o $data -min $min_nt -max $max_nt -mark $tmpmark");
+	system("perl $scipt_path/Length_Distibution.pl -i $preprocess/reads_length_distribution.txt  -o $preprocess/length.html");
 #	print "\nfilterReadsByLength.pl -i $collapsed -o $data -min $min_nt -max $max_nt -mark $tmpmark\n";
 
 }