# HG changeset patch # User gandres # Date 1460454181 14400 # Node ID 2b6bb9d5e4e9ca99a55f1b228b844ff4cc398231 # Parent ca045c1d5fa5e6b73ce103c13d63bb90f5ee8ea4 planemo upload diff -r ca045c1d5fa5 -r 2b6bb9d5e4e9 VCFToolsSlidingWindow/vcfToolsSlidingWindow.sh --- 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 diff -r ca045c1d5fa5 -r 2b6bb9d5e4e9 VCFToolsStats/vcfToolsStats.sh --- 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 diff -r ca045c1d5fa5 -r 2b6bb9d5e4e9 VCFToolsStats/vcfToolsStats.xml --- 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 @@ - + @@ -17,7 +17,7 @@ - vcfToolsStats.sh $filein $fileout_annot $fileout_het $fileout_imiss $fileout_sum $filelog + vcfToolsStats.sh $filein $fileout_het $fileout_imiss $fileout_sum $filelog @@ -28,7 +28,6 @@ - @@ -40,7 +39,6 @@ - @@ -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 --------- diff -r ca045c1d5fa5 -r 2b6bb9d5e4e9 test-data/stats-result.annotation --- 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