0
|
1 <tool id="cfsan_snp_pipeline_snp_matrix" name="CFSAN SNP Pipeline: create SNP matrix" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
|
|
2 <description>and associated matrices</description>
|
|
3 <macros>
|
|
4 <import>macros.xml</import>
|
|
5 </macros>
|
|
6 <expand macro="requirements"/>
|
|
7 <command detect_errors="exit_code"><![CDATA[
|
1
|
8 #if str($reference_cond.reference_source) == 'cached'
|
|
9 set reference = '$reference_cond.reference.fields.path'
|
0
|
10 #else:
|
1
|
11 set reference = '$reference_cond.reference'
|
0
|
12 #end if
|
1
|
13
|
|
14 python '$__tool_directory__/snp_wind.py' ./ -p 'consensus.fasta'
|
|
15 #for $fa in sorted($input_fasta_collection, key=lambda f: f.element_identifier):
|
|
16 -n '$fa.element_identifier' -f '$fa'
|
|
17 #end for
|
|
18 > ./file &&
|
0
|
19 cfsan_snp_pipeline snp_matrix -o '$output_snp_matrix_fasta' ./file &&
|
|
20 cfsan_snp_pipeline distance -p '$output_snp_pairwise_matrix_tsv' -m '$output_snp_distance_matrix_tsv' '$output_snp_matrix_fasta' &&
|
1
|
21 cfsan_snp_pipeline snp_reference -l '$input_merged_snp_sites' -o '$output_snp_reference_fasta' '$reference'
|
0
|
22 ]]></command>
|
|
23 <inputs>
|
1
|
24 <param name="input_fasta_collection" type="data_collection" format="fasta" collection_type="list" label="Collection of fasta files"/>
|
0
|
25 <expand macro="reference_cond"/>
|
|
26 <param name="input_merged_snp_sites" type="data" format="tabular" label="Merged SNP sites tabular file"/>
|
|
27 </inputs>
|
|
28 <outputs>
|
|
29 <data name="output_snp_matrix_fasta" format="fasta" label="SNP matrix (fasta)"/>
|
|
30 <data name="output_snp_pairwise_matrix_tsv" format="tsv" label="SNP pairwise matrix (tsv)"/>
|
|
31 <data name="output_snp_distance_matrix_tsv" format="tsv" label="SNP distance matrix (tsv)"/>
|
|
32 <data name="output_snp_reference_fasta" format="fasta" label="SNP Reference (fasta)"/>
|
|
33 </outputs>
|
|
34 <tests>
|
|
35 <test>
|
|
36 <param name="input_fasta_collection">
|
|
37 <collection type="list">
|
|
38 <element name="sample1" value="input1.fasta"/>
|
|
39 <element name="sample2" value="input2.fasta"/>
|
|
40 <element name="sample3" value="input3.fasta"/>
|
|
41 <element name="sample4" value="input4.fasta"/>
|
|
42 </collection>
|
|
43 </param>
|
|
44 <param name="reference_source" value="history"/>
|
|
45 <param name="reference" value="lambda_virus.fasta"/>
|
|
46 <param name="input_merged_snp_sites" value="input_merged_snp_sites.tabular"/>
|
|
47 <output name="output_snp_matrix_fasta" value="output_snp_matrix.fasta"/>
|
|
48 <output name="output_snp_pairwise_matrix_tsv" value="output_snp_pairwise_matrix.tsv"/>
|
|
49 <output name="output_snp_distance_matrix_tsv" value="output_snp_distance_matrix.tsv"/>
|
|
50 <output name="output_snp_reference_fasta" value="output_snp_reference.fasta"/>
|
|
51 </test>
|
|
52 </tests>
|
|
53 <help><![CDATA[
|
|
54 **What it does**
|
|
55
|
|
56 Create the SNP matrix containing the consensus base for each of the samples at
|
|
57 the positions where high-confidence SNPs were found in any of the samples. The
|
|
58 matrix contains one row per sample and one column per SNP position. Non-SNP
|
|
59 positions are not included in the matrix. The matrix is formatted as a fasta
|
|
60 file, with each sequence (all of identical length) corresponding to the SNPs
|
|
61 in the correspondingly named sequence.
|
|
62
|
|
63 **More information**
|
|
64
|
|
65 CFSAN SNP Pipeline `create SNP matrix documentation <https://snp-pipeline.readthedocs.io/en/latest/cmd_ref.html#snp-matrix>`_
|
|
66 ]]></help>
|
|
67 <expand macro="citations"/>
|
|
68 </tool>
|
|
69
|