comparison mitokmer.xml @ 0:adc887a1a6de draft

planemo upload commit 927c4ee71df7d19ceb10446a04618af22c99d839
author galaxytrakr
date Fri, 11 Sep 2026 21:58:43 +0000
parents
children e6b5e7a0d7e7
comparison
equal deleted inserted replaced
-1:000000000000 0:adc887a1a6de
1 <tool id="mitokmer" name="mitoKmer" version="2.0+galaxy0.1" python_template_version="3.5" profile="21.05">
2 <description>Identify metagenomic mitochondrial reads by k-mer database matching</description>
3 <requirements>
4 <container type="docker">quay.io/galaxytrakr/mitokmer2:latest</container>
5 </requirements>
6
7 <command detect_errors="exit_code"><![CDATA[
8 ## ── kmerread expects files at specific relative paths ─────────────────
9 ## ./mitoch/mitoch_probes.txt.gz - probe database
10 ## ./jobs1/jobs1.txt - jobs file listing sample reads
11 ## It is invoked with no arguments: ./kmerread
12 mkdir -p ./mitoch ./jobs1 ./reads &&
13
14 ## ── Link probe database to the path kmerread expects ─────────────────
15 ln -sf '${probe_db.fields.path}' ./mitoch/mitoch_probes.txt.gz &&
16
17 ## ── Stage input reads ─────────────────────────────────────────────────
18 #for read in $reads
19 ln -sf '${read}' ./reads/${read.element_identifier.replace(' ', '_')} &&
20 #end for
21
22 ## ── Write the jobs file in the format kmerread expects ───────────────
23 ## Line 1: <sample_name> <number_of_files>
24 ## Lines 2+: absolute path to each read file, one per line
25 #set sample_name = $reads[0].element_identifier.replace(' ', '_').split('_')[:-1] | join('_')
26 echo "${sample_name} ${reads|length}" > ./jobs1/jobs1.txt &&
27 #for read in $reads
28 echo "\$PWD/reads/${read.element_identifier.replace(' ', '_')}" >> ./jobs1/jobs1.txt &&
29 #end for
30
31 ## ── Run kmerread (reads jobs1/jobs1.txt and mitoch/mitoch_probes.txt.gz
32 ## by convention; no CLI arguments) ──────────────────────────────────
33 kmerread &&
34
35 ## ── Summarise results into CSV ────────────────────────────────────────
36 python3 /opt/mitokmer2/kmer_read_m7.py
37 -i ./jobs1
38 -o '${results_csv}'
39 ]]></command>
40
41 <inputs>
42 <!-- Probe database selected from Galaxy data table -->
43 <param name="probe_db"
44 type="select"
45 label="Mitochondrial k-mer probe database"
46 help="Select a pre-installed mitochondrial k-mer probe database.
47 Databases are managed by your Galaxy administrator via the
48 mitokmer_probe_db data table.">
49 <options from_data_table="mitokmer_probe_db">
50 <filter type="sort_by" column="1" />
51 <validator type="no_options"
52 message="No mitochondrial k-mer probe databases are
53 currently installed. Please contact your
54 Galaxy administrator." />
55 </options>
56 </param>
57
58 <!-- One or more FASTQ/FASTA files for a single sample -->
59 <param name="reads"
60 type="data_collection"
61 collection_type="list"
62 format="fastq,fastq.gz,fasta,fasta.gz"
63 label="Input reads (FASTQ or FASTA, gzipped or plain)"
64 help="Provide one or more read files for a single sample as a Galaxy
65 list collection. Paired-end files (R1 + R2) should both be
66 included in the same collection. Light quality trimming of
67 read ends is performed internally; pre-trimming is optional." />
68 </inputs>
69
70 <outputs>
71 <data name="results_csv"
72 format="csv"
73 label="mitoKmer results for ${on_string}" />
74 </outputs>
75
76 <tests>
77 <test>
78 <param name="probe_db" value="mitoch_probes_sample" />
79 <param name="reads">
80 <collection type="list">
81 <element name="Plodia_R1" value="test/Plodia_R1.fastq.gz" />
82 <element name="Plodia_R2" value="test/Plodia_R2.fastq.gz" />
83 </collection>
84 </param>
85 <output name="results_csv">
86 <assert_contents>
87 <has_text text="Plodia" />
88 </assert_contents>
89 </output>
90 </test>
91 </tests>
92
93 <help><![CDATA[
94 **mitoKmer** — Metagenomic Mitochondrial Read Identification by K-mer Database
95 ===============================================================================
96
97 Overview
98 --------
99 mitoKmer identifies the taxonomic origin of short-read shotgun sequencing data
100 by matching reads against a database of species-specific mitochondrial k-mer
101 probes. It reports the relative abundance of taxa at multiple taxonomic ranks
102 (e.g. order, species) along with the number of matching reads and supporting
103 unique k-mers.
104
105 Inputs
106 ------
107 **Mitochondrial k-mer probe database**
108 Select a pre-installed probe database from the dropdown. Databases are
109 managed by your Galaxy administrator and registered in the
110 ``mitokmer_probe_db`` data table.
111
112 **Input reads**
113 One or more FASTQ or FASTA files (gzipped or plain) for a single sample,
114 supplied as a Galaxy list collection. Both paired-end files (R1 and R2)
115 should be included in the same collection.
116
117 * Pre-trimming is optional — the tool performs simple window-based quality
118 trimming of read ends internally.
119
120 Output
121 ------
122 **Results CSV**
123 A comma-separated file summarising the relative abundance of each taxon
124 detected in the sample. Columns include taxon name, taxonomic rank, number
125 of reads assigned, relative abundance (%), and the number of unique k-mers
126 supporting the assignment.
127
128 Example output for the "Plodia" test sample::
129
130 Rank Taxon Reads Rel_Abund(%) Unique_kmers
131 Order Lepidoptera 10 0.1 329
132 Species Plodia interpunctella 462 99.9 466
133
134 Citation
135 --------
136 Please cite the mitoKmer GitHub repository if you use this tool in published work.
137 ]]></help>
138
139 <citations>
140 <citation type="bibtex">
141 @misc{githubmitokmer2,
142 author = {Mammel, Mark},
143 title = {mitoKmer2},
144 year = {2024},
145 publisher = {GitHub},
146 journal = {GitHub repository},
147 url = {https://github.com/mmammel8/mitokmer2},
148 }
149 </citation>
150 </citations>
151 </tool>