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