annotate cfsan_snp_pipeline_snp_matrix.xml @ 2:610251aac6ef draft

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