Mercurial > repos > greg > cfsan_snp_pipeline_snp_matrix
comparison cfsan_snp_pipeline_snp_matrix.xml @ 1:f3485a9e51a3 draft
Uploaded
| author | greg |
|---|---|
| date | Wed, 22 Nov 2023 20:04:57 +0000 |
| parents | 6b0a13deae92 |
| children | f959d99d1758 |
comparison
equal
deleted
inserted
replaced
| 0:6b0a13deae92 | 1:f3485a9e51a3 |
|---|---|
| 3 <macros> | 3 <macros> |
| 4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
| 5 </macros> | 5 </macros> |
| 6 <expand macro="requirements"/> | 6 <expand macro="requirements"/> |
| 7 <command detect_errors="exit_code"><![CDATA[ | 7 <command detect_errors="exit_code"><![CDATA[ |
| 8 python '$__tool_directory__/snp_wind.py' ./ | 8 #if str($reference_cond.reference_source) == 'cached' |
| 9 #if str($input_type_cond.input_type) == 'single': | 9 set reference = '$reference_cond.reference.fields.path' |
| 10 -n '$input_fasta.element_identifier' | |
| 11 -f '$input_fasta' | |
| 12 #else: | 10 #else: |
| 13 #for $fa in sorted($input_fasta_collection, key=lambda f: f.element_identifier) | 11 set reference = '$reference_cond.reference' |
| 14 -n '$fa.element_identifier' | |
| 15 -f '$fa' | |
| 16 #end for | |
| 17 #end if | 12 #end if |
| 18 -p 'consensus.fasta' > ./file && | 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 && | |
| 19 cfsan_snp_pipeline snp_matrix -o '$output_snp_matrix_fasta' ./file && | 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' && | 20 cfsan_snp_pipeline distance -p '$output_snp_pairwise_matrix_tsv' -m '$output_snp_distance_matrix_tsv' '$output_snp_matrix_fasta' && |
| 21 cfsan_snp_pipeline snp_reference | 21 cfsan_snp_pipeline snp_reference -l '$input_merged_snp_sites' -o '$output_snp_reference_fasta' '$reference' |
| 22 -l '$input_merged_snp_sites' | |
| 23 -o '$output_snp_reference_fasta' | |
| 24 #if str($reference_cond.reference_source) == 'cached' | |
| 25 '$reference_cond.reference.fields.path' | |
| 26 #else: | |
| 27 '$reference_cond.reference' | |
| 28 #end if | |
| 29 ]]></command> | 22 ]]></command> |
| 30 <inputs> | 23 <inputs> |
| 31 <expand macro="input_type_cond"/> | 24 <param name="input_fasta_collection" type="data_collection" format="fasta" collection_type="list" label="Collection of fasta files"/> |
| 32 <expand macro="reference_cond"/> | 25 <expand macro="reference_cond"/> |
| 33 <param name="input_merged_snp_sites" type="data" format="tabular" label="Merged SNP sites tabular file"/> | 26 <param name="input_merged_snp_sites" type="data" format="tabular" label="Merged SNP sites tabular file"/> |
| 34 </inputs> | 27 </inputs> |
| 35 <outputs> | 28 <outputs> |
| 36 <data name="output_snp_matrix_fasta" format="fasta" label="SNP matrix (fasta)"/> | 29 <data name="output_snp_matrix_fasta" format="fasta" label="SNP matrix (fasta)"/> |
| 38 <data name="output_snp_distance_matrix_tsv" format="tsv" label="SNP distance matrix (tsv)"/> | 31 <data name="output_snp_distance_matrix_tsv" format="tsv" label="SNP distance matrix (tsv)"/> |
| 39 <data name="output_snp_reference_fasta" format="fasta" label="SNP Reference (fasta)"/> | 32 <data name="output_snp_reference_fasta" format="fasta" label="SNP Reference (fasta)"/> |
| 40 </outputs> | 33 </outputs> |
| 41 <tests> | 34 <tests> |
| 42 <test> | 35 <test> |
| 43 <param name="input_type" value="collection"/> | |
| 44 <param name="input_fasta_collection"> | 36 <param name="input_fasta_collection"> |
| 45 <collection type="list"> | 37 <collection type="list"> |
| 46 <element name="sample1" value="input1.fasta"/> | 38 <element name="sample1" value="input1.fasta"/> |
| 47 <element name="sample2" value="input2.fasta"/> | 39 <element name="sample2" value="input2.fasta"/> |
| 48 <element name="sample3" value="input3.fasta"/> | 40 <element name="sample3" value="input3.fasta"/> |
