annotate 2_call_sites.xml @ 18:97abaa8b8384

planemo upload commit 7f6183b769772449fbcee903686b8d5ec5b7439f-dirty
author jpayne
date Wed, 31 Jan 2018 12:33:00 -0500
parents 25b858c2f21d
children 87f53c4a13df
rev   line source
jpayne@0 1 <tool id="call_sites" name="2. Call Sites" version="1.0.1" profile="16.10">
jpayne@0 2 <description>of high-confidence SNPs, or lookup cached sitecall</description>
jpayne@0 3 <requirements>
jpayne@0 4 <requirement type="package" version="2.3.4">bowtie2</requirement>
jpayne@0 5 <requirement type="package" version="1.6">samtools</requirement>
jpayne@5 6 <requirement type="package" version="1.0.6">bzip2</requirement>
jpayne@0 7 <requirement type="package">picard</requirement>
jpayne@0 8 <requirement type="package">varscan</requirement>
jpayne@0 9 <requirement type="package" version="1.5.11">boto3</requirement>
jpayne@10 10 <requirement type="package" version="3.4">python3</requirement>
jpayne@0 11 </requirements>
jpayne@0 12 <command detect_errors="exit_code"><![CDATA[
jpayne@9 13 python $__tool_directory__/snp-cache.py snp_sitecalls
jpayne@0 14 "\$(md5sum $input $sample | cut -c -32 | md5sum | cut -c -32)"
jpayne@0 15 -c "
jpayne@0 16 cp $input ./reference.fasta &&
jpayne@0 17 samtools faidx ./reference.fasta &&
jpayne@0 18 samtools view -bS -F 4 $sample |
jpayne@0 19 samtools sort -o ./sorted.bam - &&
jpayne@0 20 picard MarkDuplicates INPUT=./sorted.bam
jpayne@0 21 OUTPUT=/dev/stdout
jpayne@0 22 METRICS_FILE=./metrics |
jpayne@0 23 samtools mpileup -f ./reference.fasta - -o ./pileup
jpayne@0 24 &&
jpayne@0 25 varscan mpileup2snp ./pileup
jpayne@0 26 --min_var-freq 0.90
jpayne@0 27 --output-vcf 1
jpayne@0 28 > ./calls
jpayne@0 29 && tar -zcf /dev/stdout ./metrics ./pileup ./calls
jpayne@0 30 "
jpayne@0 31 -o ./archive.tar.gz
jpayne@0 32 -l $cache_log
jpayne@0 33 && cat $cache_log
jpayne@0 34 && tar -zxvf ./archive.tar.gz
jpayne@0 35 && cp ./metrics $metrics
jpayne@0 36 && cp ./pileup $pileup
jpayne@0 37 && cp ./calls $calls
jpayne@0 38 ]]></command>
jpayne@0 39 <inputs>
jpayne@0 40 <param name="input" label="FASTA Reference from your history" type="data" format="fasta" />
jpayne@0 41 <!-- <conditional name="reads">
jpayne@0 42 <param name="reads_select" type="select" label="Paired-end collection, or two datasets from your history">
jpayne@0 43 <option value="collection">Paired collection from your history</option>
jpayne@0 44 <option value="history">Two FASTQ datasets from your history</option>
jpayne@0 45 </param>
jpayne@0 46 <when value="collection">
jpayne@0 47 <param name="coll" type="data_collection" format="fastq,fastqsanger" collection_type="paired">
jpayne@0 48 </when>
jpayne@0 49 <when value="history">
jpayne@0 50 <param type="data" name="forward" format="fastq,fastqsanger" />
jpayne@0 51 <param type="data" name="reverse" format="fastq,fastqsanger" />
jpayne@0 52 </when>
jpayne@0 53 </conditional> -->
jpayne@0 54 <param name="sample" label="Read alignment to reference" type="data" format="sam" />
jpayne@0 55 </inputs>
jpayne@0 56 <outputs>
jpayne@0 57 <data name="calls" label="${sample.name.split(' ')[0]} unfiltered SNPs" format="vcf" />
jpayne@0 58 <data name="pileup" label="${sample.name.split(' ')[0]} pileup" format="pileup" hidden="true" />
jpayne@0 59 <data name="metrics" label="Metrics from Picard" format="txt" hidden="true" />
jpayne@0 60 <data label="S3 Cache log" name="cache_log" format="txt" hidden="true" />
jpayne@0 61 </outputs>
jpayne@0 62 <tests>
jpayne@0 63 <test>
jpayne@0 64 <param name="input" value="reference/lambda_virus.fasta" />
jpayne@0 65 <param name="sample" value="samples/sample2/reads.sam" />
jpayne@0 66 <output name="calls" value="samples/sample2/var.flt.vcf" />
jpayne@0 67 <output name="pileup" value="samples/sample2/reads.all.pileup" />
jpayne@0 68 </test>
jpayne@0 69 </tests>
jpayne@0 70 <help><![CDATA[
jpayne@0 71 <a href="http://snp-pipeline.readthedocs.io/en/latest/index.html">http://snp-pipeline.readthedocs.io/en/latest/index.html</a>
jpayne@0 72 ]]></help>
jpayne@0 73 <citations>
jpayne@0 74 <citation type="doi">10.7717/peerj-cs.20</citation>
jpayne@0 75 </citations>
jpayne@0 76 </tool>