changeset 8:2b6bb9d5e4e9 draft

planemo upload
author gandres
date Tue, 12 Apr 2016 05:43:01 -0400
parents ca045c1d5fa5
children ce984119f669
files VCFToolsSlidingWindow/vcfToolsSlidingWindow.sh VCFToolsStats/vcfToolsStats.sh VCFToolsStats/vcfToolsStats.xml test-data/stats-result.annotation
diffstat 4 files changed, 16 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/VCFToolsSlidingWindow/vcfToolsSlidingWindow.sh	Thu Mar 31 10:41:59 2016 -0400
+++ b/VCFToolsSlidingWindow/vcfToolsSlidingWindow.sh	Tue Apr 12 05:43:01 2016 -0400
@@ -23,7 +23,16 @@
 
 cp $filein ${filein}.vcf 
 if [ "$group" != "none" ] 
-then perl $tool_path/VCFToolsSlidingWindow.pl --input ${filein}.vcf --out $fileout_label --window $window --group $group
+then 
+	if [ $(sort -k2,2 -t ';' -u $group | cut -f2 -d ';' |wc -l) -ge 3 ]
+        then
+                echo 'ERROR: it only works with 2 groups. There is too many groups in your file.' >&2
+                exit 1
+        else
+                perl $tool_path/VCFToolsSlidingWindow.pl --input ${filein}.vcf --out $fileout_label --window $window --group $group
+        fi
+
+
 else perl $tool_path/VCFToolsSlidingWindow.pl --input ${filein}.vcf --out $fileout_label --window $window
 fi
         
--- a/VCFToolsStats/vcfToolsStats.sh	Thu Mar 31 10:41:59 2016 -0400
+++ b/VCFToolsStats/vcfToolsStats.sh	Tue Apr 12 05:43:01 2016 -0400
@@ -4,17 +4,15 @@
 
 filein=$1
 fileout_label=$(date "+%Y%m%d%H%M%S")
-fileout_annot=$2
-fileout_het=$3
-fileout_imiss=$4
-fileout_sum=$5
-filelog=$6
+fileout_het=$2
+fileout_imiss=$3
+fileout_sum=$4
+filelog=$5
 
 
 
 perl $tool_path/VCFToolsStats.pl --input $filein --out $fileout_label
 
-cp  $fileout_label.annotation $fileout_annot ; rm $fileout_label.annotation
 cp  $fileout_label.het $fileout_het ; rm $fileout_label.het
 cp  $fileout_label.imiss $fileout_imiss ; rm $fileout_label.imiss
 cp  $fileout_label.TsTv.summary $fileout_sum ; rm $fileout_label.TsTv.summary
--- a/VCFToolsStats/vcfToolsStats.xml	Thu Mar 31 10:41:59 2016 -0400
+++ b/VCFToolsStats/vcfToolsStats.xml	Tue Apr 12 05:43:01 2016 -0400
@@ -1,4 +1,4 @@
-<tool id="sniplay_vcftoolsstats" name="VCFtools Stats" version="1.1.0">
+<tool id="sniplay_vcftoolsstats" name="VCFtools Stats" version="1.2.0">
     
     <!-- [REQUIRED] Tool description displayed after the tool name -->
     <description> </description>
@@ -17,7 +17,7 @@
     
     <!-- [REQUIRED] The command to execute -->
     <command interpreter="perl">
-	vcfToolsStats.sh $filein $fileout_annot $fileout_het $fileout_imiss $fileout_sum $filelog
+	vcfToolsStats.sh $filein $fileout_het $fileout_imiss $fileout_sum $filelog
     </command>
      
     <!-- [REQUIRED] Input files and tool parameters -->
@@ -28,7 +28,6 @@
     
     <!-- [REQUIRED] Output files -->
     <outputs>
-	<data name="fileout_annot" format="txt" label="${fileout_label}.annotation" />
 	<data name="fileout_het" format="txt" label="${fileout_label}.het" />
 	<data name="fileout_imiss" format="txt" label="${fileout_label}.imiss" />
 	<data name="fileout_sum" format="txt" label="${fileout_label}.TsTv.summary" />
@@ -40,7 +39,6 @@
         <!-- [HELP] Test files have to be in the ~/test-data directory -->
         <test>
          <param name="filein" value="sample.vcf" />
-         <output name="fileout_annot" file="stats-result.annotation" />
          <output name="fileout_het" file="stats-result.het" />
          <output name="fileout_imiss" file="stats-result.imiss" />
          <output name="fileout_sum" file="stats-result.TsTv.summary" />
@@ -120,9 +118,6 @@
 Output files
 ------------
 
-.annotation file
-	Statistics on annotation/location along genome
-
 .het file 
 	Statistics on heterozygosity of the individuals
 
@@ -163,22 +158,6 @@
 
 Output files
 ============
-
-.annotation file
-----------------
-
-::
-
-	Genic	4489
-	Intergenic	466
-	========
-	Intron	960
-	Exon	3248
-	UTR	281
-	========
-	Non-syn	226
-	Synonym	3022
-        
 .het file
 ---------
 
--- a/test-data/stats-result.annotation	Thu Mar 31 10:41:59 2016 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-Genic	4489
-Intergenic	466
-========
-Intron	960
-Exon	3248
-UTR	281
-========
-Non-syn	226
-Synonym	3022