annotate cfsan_snp_pipeline_snp_matrix.xml @ 0:6b0a13deae92 draft

Uploaded
author greg
date Fri, 13 Oct 2023 20:26:32 +0000
parents
children f3485a9e51a3
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[
6b0a13deae92 Uploaded
greg
parents:
diff changeset
8 python '$__tool_directory__/snp_wind.py' ./
6b0a13deae92 Uploaded
greg
parents:
diff changeset
9 #if str($input_type_cond.input_type) == 'single':
6b0a13deae92 Uploaded
greg
parents:
diff changeset
10 -n '$input_fasta.element_identifier'
6b0a13deae92 Uploaded
greg
parents:
diff changeset
11 -f '$input_fasta'
6b0a13deae92 Uploaded
greg
parents:
diff changeset
12 #else:
6b0a13deae92 Uploaded
greg
parents:
diff changeset
13 #for $fa in sorted($input_fasta_collection, key=lambda f: f.element_identifier)
6b0a13deae92 Uploaded
greg
parents:
diff changeset
14 -n '$fa.element_identifier'
6b0a13deae92 Uploaded
greg
parents:
diff changeset
15 -f '$fa'
6b0a13deae92 Uploaded
greg
parents:
diff changeset
16 #end for
6b0a13deae92 Uploaded
greg
parents:
diff changeset
17 #end if
6b0a13deae92 Uploaded
greg
parents:
diff changeset
18 -p 'consensus.fasta' > ./file &&
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' &&
6b0a13deae92 Uploaded
greg
parents:
diff changeset
21 cfsan_snp_pipeline snp_reference
6b0a13deae92 Uploaded
greg
parents:
diff changeset
22 -l '$input_merged_snp_sites'
6b0a13deae92 Uploaded
greg
parents:
diff changeset
23 -o '$output_snp_reference_fasta'
6b0a13deae92 Uploaded
greg
parents:
diff changeset
24 #if str($reference_cond.reference_source) == 'cached'
6b0a13deae92 Uploaded
greg
parents:
diff changeset
25 '$reference_cond.reference.fields.path'
6b0a13deae92 Uploaded
greg
parents:
diff changeset
26 #else:
6b0a13deae92 Uploaded
greg
parents:
diff changeset
27 '$reference_cond.reference'
6b0a13deae92 Uploaded
greg
parents:
diff changeset
28 #end if
6b0a13deae92 Uploaded
greg
parents:
diff changeset
29 ]]></command>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
30 <inputs>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
31 <expand macro="input_type_cond"/>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
32 <expand macro="reference_cond"/>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
33 <param name="input_merged_snp_sites" type="data" format="tabular" label="Merged SNP sites tabular file"/>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
34 </inputs>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
35 <outputs>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
36 <data name="output_snp_matrix_fasta" format="fasta" label="SNP matrix (fasta)"/>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
37 <data name="output_snp_pairwise_matrix_tsv" format="tsv" label="SNP pairwise matrix (tsv)"/>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
38 <data name="output_snp_distance_matrix_tsv" format="tsv" label="SNP distance matrix (tsv)"/>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
39 <data name="output_snp_reference_fasta" format="fasta" label="SNP Reference (fasta)"/>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
40 </outputs>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
41 <tests>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
42 <test>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
43 <param name="input_type" value="collection"/>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
44 <param name="input_fasta_collection">
6b0a13deae92 Uploaded
greg
parents:
diff changeset
45 <collection type="list">
6b0a13deae92 Uploaded
greg
parents:
diff changeset
46 <element name="sample1" value="input1.fasta"/>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
47 <element name="sample2" value="input2.fasta"/>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
48 <element name="sample3" value="input3.fasta"/>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
49 <element name="sample4" value="input4.fasta"/>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
50 </collection>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
51 </param>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
52 <param name="reference_source" value="history"/>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
53 <param name="reference" value="lambda_virus.fasta"/>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
54 <param name="input_merged_snp_sites" value="input_merged_snp_sites.tabular"/>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
55 <output name="output_snp_matrix_fasta" value="output_snp_matrix.fasta"/>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
56 <output name="output_snp_pairwise_matrix_tsv" value="output_snp_pairwise_matrix.tsv"/>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
57 <output name="output_snp_distance_matrix_tsv" value="output_snp_distance_matrix.tsv"/>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
58 <output name="output_snp_reference_fasta" value="output_snp_reference.fasta"/>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
59 </test>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
60 </tests>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
61 <help><![CDATA[
6b0a13deae92 Uploaded
greg
parents:
diff changeset
62 **What it does**
6b0a13deae92 Uploaded
greg
parents:
diff changeset
63
6b0a13deae92 Uploaded
greg
parents:
diff changeset
64 Create the SNP matrix containing the consensus base for each of the samples at
6b0a13deae92 Uploaded
greg
parents:
diff changeset
65 the positions where high-confidence SNPs were found in any of the samples. The
6b0a13deae92 Uploaded
greg
parents:
diff changeset
66 matrix contains one row per sample and one column per SNP position. Non-SNP
6b0a13deae92 Uploaded
greg
parents:
diff changeset
67 positions are not included in the matrix. The matrix is formatted as a fasta
6b0a13deae92 Uploaded
greg
parents:
diff changeset
68 file, with each sequence (all of identical length) corresponding to the SNPs
6b0a13deae92 Uploaded
greg
parents:
diff changeset
69 in the correspondingly named sequence.
6b0a13deae92 Uploaded
greg
parents:
diff changeset
70
6b0a13deae92 Uploaded
greg
parents:
diff changeset
71 **More information**
6b0a13deae92 Uploaded
greg
parents:
diff changeset
72
6b0a13deae92 Uploaded
greg
parents:
diff changeset
73 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
74 ]]></help>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
75 <expand macro="citations"/>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
76 </tool>
6b0a13deae92 Uploaded
greg
parents:
diff changeset
77