jpayne@0
|
1 <tool id="snp_matrix" name="7. Create a SNP matrix" version="1.0.1" profile="16.10">
|
jpayne@0
|
2 <description>and associated distance metrics</description>
|
jpayne@0
|
3 <requirements>
|
jpayne@14
|
4 <requirement type="package" version="1.6">bcftools</requirement>
|
jpayne@12
|
5 <requirement type="package" version="1.0.6">bzip2</requirement>
|
jpayne@0
|
6 <requirement type="package" version="1.0.1">snp-pipeline</requirement>
|
jpayne@36
|
7 <requirement type="package" version="0.2.5">tabix</requirement>
|
jpayne@47
|
8 <requirement type="package" version="3.7.3">python</requirement>
|
jpayne@0
|
9 </requirements>
|
jpayne@0
|
10 <command detect_errors="exit_code"><![CDATA[
|
jpayne@40
|
11 export LD_LIBRARY_PATH="\$CONDA_DEFAULT_ENV/lib" &&
|
jpayne@9
|
12 python $__tool_directory__/snp-wind.py ./ -p "consensus.fasta"
|
jpayne@0
|
13 #for $fa in sorted($cons, key=lambda f: f.element_identifier)
|
jpayne@0
|
14 -n $fa.element_identifier -f $fa
|
jpayne@0
|
15 #end for
|
jpayne@0
|
16 > ./file &&
|
jpayne@0
|
17 cat ./file &&
|
jpayne@0
|
18 cfsan_snp_pipeline snp_matrix -o $snpma ./file &&
|
jpayne@0
|
19 cfsan_snp_pipeline distance -p $pairws -m $distma $snpma &&
|
jpayne@0
|
20 cfsan_snp_pipeline snp_reference -l $snplist -o $referenceSNP $reference
|
jpayne@0
|
21 ]]></command>
|
jpayne@0
|
22 <inputs>
|
jpayne@0
|
23 <param type="data_collection" label="List of FASTA's" name="cons" format="fasta" collection_type="list" />
|
jpayne@0
|
24 <conditional name="reference">
|
jpayne@0
|
25 <param name="ref" type="select" label="Use a curated GalaxyTrakr reference, or a reference from your history" help="Choose whether to use one of our references or your own from your history">
|
jpayne@0
|
26 <option value="curated">Use a GalaxyTrakr reference</option>
|
jpayne@0
|
27 <option value="history">Use a reference from your history</option>
|
jpayne@0
|
28 </param>
|
jpayne@0
|
29 <when value="curated">
|
jpayne@0
|
30 <param name="reference" type="select" label="Select reference fasta">
|
jpayne@0
|
31 <options from_data_table="all_fasta">
|
jpayne@0
|
32 <filter type="sort_by" column="2"/>
|
jpayne@0
|
33 <validator type="no_options" message="No assemblies are available for the selected input dataset"/>
|
jpayne@0
|
34 </options>
|
jpayne@0
|
35 </param>
|
jpayne@0
|
36 </when>
|
jpayne@0
|
37 <when value="history">
|
jpayne@0
|
38 <param name="reference" type="data" format="fasta" label="Select reference fasta" />
|
jpayne@0
|
39 </when>
|
jpayne@0
|
40 </conditional>
|
jpayne@0
|
41 <param type="data" format="txt" name="snplist" label="SNP list from your history" />
|
jpayne@0
|
42 </inputs>
|
jpayne@0
|
43 <outputs>
|
jpayne@0
|
44 <data name="snpma" label="SNP matrix, fasta" format="fasta" />
|
jpayne@0
|
45 <data name="pairws" label="SNP pairwise matrix" format="tsv" />
|
jpayne@0
|
46 <data name="distma" label="SNP distance matrix" format="tsv" />
|
jpayne@38
|
47 <data name="referenceSNP" label="SNP Reference (FASTA)" format="fasta" />
|
jpayne@38
|
48 <data name="metrics" label="SNP matrix metrics" hidden="true" format="tsv" />
|
jpayne@0
|
49 </outputs>
|
jpayne@0
|
50 <tests>
|
jpayne@0
|
51 <test>
|
jpayne@0
|
52 <param name="cons">
|
jpayne@0
|
53 <collection type="list">
|
jpayne@0
|
54 <element name="sample1" value="samples/sample1/consensus.fasta" />
|
jpayne@0
|
55 <element name="sample2" value="samples/sample2/consensus.fasta" />
|
jpayne@0
|
56 <element name="sample3" value="samples/sample3/consensus.fasta" />
|
jpayne@0
|
57 <element name="sample4" value="samples/sample4/consensus.fasta" />
|
jpayne@0
|
58 </collection>
|
jpayne@0
|
59 </param>
|
jpayne@0
|
60 <param name="ref" value="history" />
|
jpayne@0
|
61 <param name="reference" value="reference/lambda_virus.fasta" />
|
jpayne@0
|
62 <param name="snplist" value="snplist.txt" />
|
jpayne@0
|
63 <output name="snpma" value="snpma.fasta" />
|
jpayne@0
|
64 <output name="pairws" value="snp_distance_pairwise.tsv" />
|
jpayne@0
|
65 <output name="distma" value="snp_distance_matrix.tsv" />
|
jpayne@0
|
66 <output name="referenceSNP" value="referenceSNP.fasta" />
|
jpayne@0
|
67 </test>
|
jpayne@0
|
68 </tests>
|
jpayne@0
|
69 <help><![CDATA[
|
jpayne@0
|
70 <a href="http://snp-pipeline.readthedocs.io/en/latest/index.html">http://snp-pipeline.readthedocs.io/en/latest/index.html</a>
|
jpayne@0
|
71 ]]></help>
|
jpayne@0
|
72 <citations>
|
jpayne@0
|
73 <citation type="doi">10.7717/peerj-cs.20</citation>
|
jpayne@0
|
74 </citations>
|
jpayne@0
|
75 </tool> |