# HG changeset patch # User yhoogstrate # Date 1446735619 18000 # Node ID 10e2ea79ec55c4307bbb0a6c073733058742de4a planemo upload for repository https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools commit 0bc9864516071632199ddf9a4ff403893060c99f diff -r 000000000000 -r 10e2ea79ec55 README.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.rst Thu Nov 05 10:00:19 2015 -0500 @@ -0,0 +1,102 @@ +VarScan2 mpileup2snp wrapper for Galaxy +======================================= + +http://sourceforge.net/projects/varscan/ + +This wrapper is optimized for direct access to BAM files such that the +big mpileup files are not saved. + +Development +----------- + +Repository-Maintainer: Youri Hoogstrate + +Repository-Development: https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools + + +License +------- + +**VarScan2**: + +Non-Profit Open Software License 3.0 (Non-Profit OSL 3.0): http://sourceforge.net/directory/os:linux/license:nposl3/freshness:recently-updated/ http://opensource.org/licenses/NPOSL-3.0 + +**samtools**: + +MIT/Expat License: https://raw.githubusercontent.com/samtools/samtools/develop/LICENSE + + The MIT/Expat License + + Copyright (C) 2008-2014 Genome Research Ltd. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + [The use of a range of years within a copyright notice in this distribution + should be interpreted as being equivalent to a list of years including the + first and last year specified and all consecutive years between them. + + For example, a copyright notice that reads "Copyright (C) 2005, 2007-2009, + 2011-2012" should be interpreted as being identical to a notice that reads + "Copyright (C) 2005, 2007, 2008, 2009, 2011, 2012" and a copyright notice + that reads "Copyright (C) 2005-2012" should be interpreted as being identical + to a notice that reads "Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, + 2011, 2012".] + +**samtools-parallel-mpileup**: + +MIT License: https://raw.githubusercontent.com/mydatascience/parallel-mpileup/master/samtools-0.1.19/COPYING + +The MIT License + + Copyright (c) 2008-2009 Genome Research Ltd. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +**This wrapper**: + + Copyright (C) 2013-2014 Youri Hoogstrate + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . diff -r 000000000000 -r 10e2ea79ec55 example.fa.1.bed --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/example.fa.1.bed Thu Nov 05 10:00:19 2015 -0500 @@ -0,0 +1,1 @@ +chr1 0 330 diff -r 000000000000 -r 10e2ea79ec55 example.fa.2.bed --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/example.fa.2.bed Thu Nov 05 10:00:19 2015 -0500 @@ -0,0 +1,1 @@ +chr1 330 600 diff -r 000000000000 -r 10e2ea79ec55 test-data/example.bam Binary file test-data/example.bam has changed diff -r 000000000000 -r 10e2ea79ec55 test-data/example.fa --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/example.fa Thu Nov 05 10:00:19 2015 -0500 @@ -0,0 +1,11 @@ +>chr1 +aaataggtcccaaacgttacgcactctatgcctgacaaagttgcgaccacttcctctgcc +ttgtgtgacacgccggagatagggcatcagcaagtacgttaagtacactgaacgaactgg +aggtttctacatcgtgcgtgatggctctaggagaagtgggtgtatctgcacagcataagt +tataagacggaagtaaagcgtcttcaccgttcagcaccccacgctcatagtcaatgctgg +ttcagcatagtcaagcgccggtggcctccaaaaagacgcactgagtagcttagctacttt +gctccgcttgcggaagcactaagaggagattgaatttccaaatcccccccgatacctgtg +cggtcgctacgtaagtgcgaagttctgttagatacgctccccttagtatatgggcgttaa +tcggaccgtcggtactcactgcattccaggtctcatatagttcgccctagaagcctggga +tgaacgttgaactatagctgatgtaaaccccgcgtgccaattccaggcgtcatgggggca +acccctcgcagcctccctcttgctgttggtgcctagtatttcatgatttcgagccgacat diff -r 000000000000 -r 10e2ea79ec55 test-data/example.fa.1.bed --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/example.fa.1.bed Thu Nov 05 10:00:19 2015 -0500 @@ -0,0 +1,1 @@ +chr1 0 330 diff -r 000000000000 -r 10e2ea79ec55 test-data/example.fa.2.bed --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/example.fa.2.bed Thu Nov 05 10:00:19 2015 -0500 @@ -0,0 +1,1 @@ +chr1 330 600 diff -r 000000000000 -r 10e2ea79ec55 test-data/example.fa.fai --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/example.fa.fai Thu Nov 05 10:00:19 2015 -0500 @@ -0,0 +1,1 @@ +chr1 600 6 60 61 diff -r 000000000000 -r 10e2ea79ec55 test-data/example.mpileup --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/example.mpileup Thu Nov 05 10:00:19 2015 -0500 @@ -0,0 +1,70 @@ +chr1 1 a 8 ^],^].^],^].^],^],^].^], ~~~~~~~~ +chr1 2 a 8 ,.,.,,., ~~~~~~~~ +chr1 3 a 8 ,.,.,,., ~~~~~~~~ +chr1 4 t 8 ,.,.,,., ~~~~~~~~ +chr1 5 a 8 ,.,.,,., ~~~~~~~~ +chr1 6 g 8 ,.,.,,., ~~~~~~~~ +chr1 7 g 8 ,.,.,,., ~~~~~~~~ +chr1 8 t 8 ,.,.,,., ~~~~~~~~ +chr1 9 c 8 ,.,.,,., ~~~~~~~~ +chr1 10 c 8 ,.,.,,., ~~~~~~~~ +chr1 11 c 8 ,.,.,,., ~~~~~~~~ +chr1 12 a 8 ,.,.,,., ~~~~~~~~ +chr1 13 a 8 ,.,.,,., ~~~~~~~~ +chr1 14 a 8 ,.,.,,., ~~~~~~~~ +chr1 15 c 8 ,.,.,,., ~~~~~~~~ +chr1 16 g 8 ,.,.,,., ~~~~~~~~ +chr1 17 t 8 ,-1t.-1T,-1t.-1T,-1t,-1t.-1T,-1t ~~~~~~~~ +chr1 18 t 8 ******** ~~~~~~~~ +chr1 19 a 8 ,.,.,,., ~~~~~~~~ +chr1 20 c 8 ,.,.,,., ~~~~~~~~ +chr1 21 g 8 ,.,.,,., ~~~~~~~~ +chr1 22 c 8 ,.,.,,., ~~~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+chr1 83 g 8 ,,,,,,,, ~[[[[[[[ +chr1 84 g 8 aaaaaaaa ~[[[[[[[ +chr1 85 c 8 ,,,,,,,, ~[[[[[[[ +chr1 86 a 8 ,,,,,,,, ~[[[[[[[ +chr1 87 t 8 ,,,,,,,, ~iiiiiii +chr1 88 c 8 ,,,,,,,, ~iiiiiii +chr1 89 a 8 ,,,,,,,, ~lllllll +chr1 90 g 8 ,,,,,,,, ~~~~~~~~ +chr1 91 c 8 ,,,,,,,, ~~~~~~~~ +chr1 92 a 8 ,,,,,,,, ~aaaaaaa +chr1 93 a 8 ,,,,,,,, ~_______ +chr1 94 g 8 ,,,,,,,, ~UUUUUUU +chr1 95 t 8 ,$,$,$,$,$,$,$,$ ~EEEEEEE diff -r 000000000000 -r 10e2ea79ec55 test-data/example.mpileup.parallel --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/example.mpileup.parallel Thu Nov 05 10:00:19 2015 -0500 @@ -0,0 +1,70 @@ +achr1 77 a 1 ,+1a ~ +chr1 1 a 8 ^],^].^],^].^],^],^].^], ~~~~~~~~ +chr1 2 a 8 ,.,.,,., ~~~~~~~~ +chr1 3 a 8 ,.,.,,., ~~~~~~~~ +chr1 4 t 8 ,.,.,,., ~~~~~~~~ +chr1 5 a 8 ,.,.,,., ~~~~~~~~ +chr1 6 g 8 ,.,.,,., ~~~~~~~~ +chr1 7 g 8 ,.,.,,., ~~~~~~~~ +chr1 8 t 8 ,.,.,,., ~~~~~~~~ +chr1 9 c 8 ,.,.,,., ~~~~~~~~ +chr1 10 c 8 ,.,.,,., ~~~~~~~~ +chr1 11 c 8 ,.,.,,., ~~~~~~~~ +chr1 12 a 8 ,.,.,,., ~~~~~~~~ +chr1 13 a 8 ,.,.,,., ~~~~~~~~ +chr1 14 a 8 ,.,.,,., ~~~~~~~~ +chr1 15 c 8 ,.,.,,., ~~~~~~~~ +chr1 16 g 8 ,.,.,,., ~~~~~~~~ +chr1 17 t 8 ,-1t.-1T,-1t.-1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 g 8 ,,,,,,,, ~RRRRRRR +chr1 79 a 8 ,,,,,,,, ~RRRRRRR +chr1 80 t 8 ,,,,,,,, ~[[[[[[[ +chr1 81 a 8 ,,,,,,,, ~[[[[[[[ +chr1 82 g 8 ,,,,,,,, ~[[[[[[[ +chr1 83 g 8 ,,,,,,,, ~[[[[[[[ +chr1 84 g 8 aaaaaaaa ~[[[[[[[ +chr1 85 c 8 ,,,,,,,, ~[[[[[[[ +chr1 86 a 8 ,,,,,,,, ~[[[[[[[ +chr1 87 t 8 ,,,,,,,, ~iiiiiii +chr1 88 c 8 ,,,,,,,, ~iiiiiii +chr1 89 a 8 ,,,,,,,, ~lllllll +chr1 90 g 8 ,,,,,,,, ~~~~~~~~ +chr1 91 c 8 ,,,,,,,, ~~~~~~~~ +chr1 92 a 8 ,,,,,,,, ~aaaaaaa +chr1 93 a 8 ,,,,,,,, ~_______ +chr1 94 g 8 ,,,,,,,, ~UUUUUUU +chr1 95 t 8 ,$,$,$,$,$,$,$,$ ~EEEEEEE diff -r 000000000000 -r 10e2ea79ec55 test-data/example.vcf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/example.vcf Thu Nov 05 10:00:19 2015 -0500 @@ -0,0 +1,25 @@ +##fileformat=VCFv4.1 +##source=VarScan2 +##INFO== 15"> +##INFO= +##INFO= +##INFO= +##INFO= +##FILTER= +##FILTER= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT== 15"> +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT Sample1 +chr1 17 . TT T . PASS ADP=8;WT=0;HET=0;HOM=1;NC=0 GT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR 1/1:41:8:8:0:8:100%:7.77E-5:0:93:0:0:3:5 diff -r 000000000000 -r 10e2ea79ec55 tool-data/all_fasta.loc.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool-data/all_fasta.loc.sample Thu Nov 05 10:00:19 2015 -0500 @@ -0,0 +1,18 @@ +#This file lists the locations and dbkeys of all the fasta files +#under the "genome" directory (a directory that contains a directory +#for each build). The script extract_fasta.py will generate the file +#all_fasta.loc. This file has the format (white space characters are +#TAB characters): +# +# +# +#So, all_fasta.loc could look something like this: +# +#apiMel3 apiMel3 Honeybee (Apis mellifera): apiMel3 /path/to/genome/apiMel3/apiMel3.fa +#hg19canon hg19 Human (Homo sapiens): hg19 Canonical /path/to/genome/hg19/hg19canon.fa +#hg19full hg19 Human (Homo sapiens): hg19 Full /path/to/genome/hg19/hg19full.fa +# +#Your all_fasta.loc file should contain an entry for each individual +#fasta file. So there will be multiple fasta files for each build, +#such as with hg19 above. +# diff -r 000000000000 -r 10e2ea79ec55 tool_data_table_conf.xml.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_data_table_conf.xml.sample Thu Nov 05 10:00:19 2015 -0500 @@ -0,0 +1,8 @@ + + + + + value, dbkey, name, path + +
+
\ No newline at end of file diff -r 000000000000 -r 10e2ea79ec55 tool_dependencies.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Thu Nov 05 10:00:19 2015 -0500 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r 000000000000 -r 10e2ea79ec55 varscan_mpileup2indel.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/varscan_mpileup2indel.xml Thu Nov 05 10:00:19 2015 -0500 @@ -0,0 +1,131 @@ + + + VarScan2 INDEL detection; directly from a *.mpileup file. + + + varscan + + + java -jar $JAVA_JAR_PATH/VarScan.v2.3.6.jar 2>&1 | head -n 1 + + + cat $mpileup_input | java + -Xmx64G + -jar \$JAVA_JAR_PATH/VarScan.v2.3.6.jar + mpileup2indel + + #if $extended_parameters.parameters == "extended" + --min-coverage $extended_parameters.varscan_min_coverage + --min-reads2 $extended_parameters.varscan_min_reads2 + --min-avg-qual $extended_parameters.varscan_min_avg_qual + --min-var-freq $extended_parameters.varscan_min_var_freq + --min-freq-for-hom $extended_parameters.varscan_min_freq_for_hom + --p-value $extended_parameters.varscan_p_value + $extended_parameters.varscan_strand_filter + $extended_parameters.varscan_variants + #end if + + #if $varscan_output == "vcf" or $varscan_output.value == "vcf" + --output-vcf 1 + #end if + + 2> stderr.txt + > $snv_output ; + cat stderr.txt + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +**VarScan 2.3.6** + +VarScan is a platform-independent mutation caller for targeted, exome, and whole-genome resequencing data generated on Illumina, SOLiD, Life/PGM, Roche/454, and similar instruments. The newest version, VarScan 2, is written in Java, so it runs on most operating systems. +http://dx.doi.org/10.1101/gr.129684.111 +http://www.ncbi.nlm.nih.gov/pubmed/19542151 + +*VarScan* requires mpileup formatted input files, which are generally derived from BAM files. Since mpileup files can become humongous, the interim step of storing it is bypassed. Thus, in this wrapper one or multiple BAM/SAM files go in, get processed into a mpileup file and get directly linked to VarScan. +The samtools package is not able to parallelize the mpileup generation which make it a very slow process. +Other people were aware of this and have written a version that can do parallelization: +https://github.com/mydatascience/parallel-mpileup + +Consequently, when a BAM files gets processed by this wrapper, it's processed by *parallel-mpileup* before its send to VarScan. + +.. _VarScan: http://varscan.sourceforge.net/ + +**Input formats** + +VarScan2 accepts sequencing alignments in the same, either SAM or BAM format (http://samtools.sourceforge.net/). The alignment files have to be linked to a reference genome by galaxy. This is indicated under every history item with e.g.: *"database: hg19"* for a link to hg19, or *"database: ?"* if the link is missing. + +**Installation** + +Make sure your reference genomes are properly annotated in "tool-data/all_fasta.loc", and linked to the names of the reference used for alignment. + +**License** + +* VarScan2.3.6: Non-Profit Open Software License 3.0 (Non-Profit OSL 3.0) +* parallel-mpileup: MIT License (https://github.com/mydatascience/parallel-mpileup/blob/master/samtools-0.1.19/COPYING) + +Contact +------- + +The tool wrapper has been written by Youri Hoogstrate from the Erasmus +Medical Center (Rotterdam, Netherlands) on behalf of the Translational +Research IT (TraIT) project: + +http://www.ctmm.nl/en/programmas/infrastructuren/traitprojecttranslationeleresearch + +More tools by the Translational Research IT (TraIT) project can be found +in the following toolsheds: + +http://toolshed.g2.bx.psu.edu/ + +http://testtoolshed.g2.bx.psu.edu/ + + + 10.1101/gr.129684.111 + + \ No newline at end of file diff -r 000000000000 -r 10e2ea79ec55 varscan_mpileup2indel_from_bam.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/varscan_mpileup2indel_from_bam.xml Thu Nov 05 10:00:19 2015 -0500 @@ -0,0 +1,334 @@ + + + VarScan2 INDEL detection; directly reading *.bam file(s) & using parallel mpileup generation, to avoid unnecessairy I/O overhead and increase performance. + + + samtools_parallel_mpileup_0_1_19a + samtools + varscan + + + java -jar $JAVA_JAR_PATH/VarScan.v2.3.6.jar 2>&1 | head -n 1 + + + #if $reference_genome_source.source_select == "attribute" and len({ alignment.metadata.dbkey:True for alignment in $alignments }.keys()) != 1 + echo "Invalid number of dbkeys are found: ${ len({ alignment.metadata.dbkey:True for alignment in $alignments }.keys()) }, while only one should be used. Make sure that the alignments are done on the same reference genome and that 'tool-data/all_fasta.loc' is configured properly!" >&2 + #else + #import os.path + #for $alignment in $alignments + + #if not os.path.isfile(str($alignment)+".bai") + echo "- Indexing alignment file: $alignment.name " ; + samtools index $alignment 2>&1 ; + #else + echo "- Skiping indexing: $alignment.name " ; + #end if + #end for + + #if $mpileup_parallelization.mpileup_parallelization_select == "true" + samtools-parallel-mpileup mpileup + -t $mpileup_parallelization.samtools_threads + #else + samtools mpileup + #end if + -f + #if $reference_genome_source.source_select == "indexed_filtered" + "$reference_genome_source.reference_genome" + #else if $reference_genome_source.source_select == "indexed_all" + "$reference_genome_source.reference_genome" + #else if $reference_genome_source.source_select == "history" + "$reference_genome_source.reference_genome" + #else + + "${ filter( lambda x: str( x[0] ) == str( { alignment.metadata.dbkey:True for alignment in $alignments }.keys()[0] ), $__app__.tool_data_tables[ 'all_fasta' ].get_fields() )[0][-1] }" + #end if + + #if $extended_parameters_regions.samtools_regions == "region" + -r $extended_parameters_regions.samtools_r + #elif $extended_parameters_regions.samtools_regions == "regions_file_pos" or $extended_parameters_regions.samtools_regions == "regions_file_bed" + -l $extended_parameters_regions.samtools_l + #end if + + #if $extended_parameters.parameters == "extended" + $extended_parameters.samtools_6 + $extended_parameters.samtools_A + $extended_parameters.samtools_B + -C $extended_parameters.samtools_C + -d $extended_parameters.samtools_d + $extended_parameters.samtools_E + -M $extended_parameters.samtools_M + $extended_parameters.samtools_R + -q $extended_parameters.samtools_q + -Q $extended_parameters.samtools_Q + + -e $extended_parameters.samtools_e + -F $extended_parameters.samtools_F + -h $extended_parameters.samtools_h + $extended_parameters.samtools_I + -L $extended_parameters.samtools_L + -m $extended_parameters.samtools_m + -o $extended_parameters.samtools_o + $extended_parameters.samtools_p + -P $extended_parameters.samtools_P + #end if + + #for $alignment in $alignments + ${alignment} + #end for + 2>stderr_1.txt + + #if $mpileup_parallelization.mpileup_parallelization_select == "true" + #if $mpileup_parallelization.sort_mpileup + | sort -k1,1V -k2,2g + #end if + #end if + + | java + -Xmx64G + -jar \$JAVA_JAR_PATH/VarScan.v2.3.6.jar + mpileup2indel + + #if $extended_parameters.parameters == "extended" + --min-coverage $extended_parameters.varscan_min_coverage + --min-reads2 $extended_parameters.varscan_min_reads2 + --min-avg-qual $extended_parameters.varscan_min_avg_qual + --min-var-freq $extended_parameters.varscan_min_var_freq + --min-freq-for-hom $extended_parameters.varscan_min_freq_for_hom + --p-value $extended_parameters.varscan_p_value + $extended_parameters.varscan_strand_filter + $extended_parameters.varscan_variants + #end if + + #if $varscan_output == "vcf" or $varscan_output.value == "vcf" + --output-vcf 1 + #end if + + 2>stderr_2.txt + > $snv_output ; + + + echo "---------------[ mpileup generation ]---------------" ; + cat stderr_1.txt ; + echo "" ; + echo "---------------[ VarScan INDEL detect ]-------------" ; + cat stderr_2.txt ; + echo "" ; + echo "----------------------------------------------------" ; + #end if + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +**VarScan 2.3.6** + +VarScan is a platform-independent mutation caller for targeted, exome, and whole-genome resequencing data generated on Illumina, SOLiD, Life/PGM, Roche/454, and similar instruments. The newest version, VarScan 2, is written in Java, so it runs on most operating systems. +http://dx.doi.org/10.1101/gr.129684.111 +http://www.ncbi.nlm.nih.gov/pubmed/19542151 + +*VarScan* requires mpileup formatted input files, which are generally derived from BAM files. Since mpileup files can become humongous, the interim step of storing it is bypassed. Thus, in this wrapper one or multiple BAM/SAM files go in, get processed into a mpileup file and get directly linked to VarScan. +The samtools package is not able to parallelize the mpileup generation which make it a very slow process. +Other people were aware of this and have written a version that can do parallelization: +https://github.com/mydatascience/parallel-mpileup + +Consequently, when a BAM files gets processed by this wrapper, it's processed by *parallel-mpileup* before its send to VarScan. + +.. _VarScan: http://varscan.sourceforge.net/ + +**Input formats** + +VarScan2 accepts sequencing alignments in the same, either SAM or BAM format (http://samtools.sourceforge.net/). The alignment files have to be linked to a reference genome by galaxy. This is indicated under every history item with e.g.: *"database: hg19"* for a link to hg19, or *"database: ?"* if the link is missing. + +**Installation** + +Make sure your reference genomes are properly annotated in "tool-data/all_fasta.loc", and linked to the names of the reference used for alignment. + +**License** + +* VarScan2.3.6: Non-Profit Open Software License 3.0 (Non-Profit OSL 3.0) +* parallel-mpileup: MIT License (https://github.com/mydatascience/parallel-mpileup/blob/master/samtools-0.1.19/COPYING) + + +Contact +------- + +The tool wrapper has been written by Youri Hoogstrate from the Erasmus +Medical Center (Rotterdam, Netherlands) on behalf of the Translational +Research IT (TraIT) project: + +http://www.ctmm.nl/en/programmas/infrastructuren/traitprojecttranslationeleresearch + +More tools by the Translational Research IT (TraIT) project can be found +in the following toolsheds: + +http://toolshed.g2.bx.psu.edu/ + +http://testtoolshed.g2.bx.psu.edu/ + + + 10.1101/gr.129684.111 + + \ No newline at end of file