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