comparison mitokmer.xml @ 2:dd206296acbf draft

planemo upload commit 83cba09882dc583100b39b69b41cf791e4efb55a
author galaxytrakr
date Mon, 14 Sep 2026 19:47:05 +0000
parents e6b5e7a0d7e7
children ecf96ad08611
comparison
equal deleted inserted replaced
1:e6b5e7a0d7e7 2:dd206296acbf
3 <requirements> 3 <requirements>
4 <container type="docker">quay.io/galaxytrakr/mitokmer:927c4ee</container> 4 <container type="docker">quay.io/galaxytrakr/mitokmer:927c4ee</container>
5 </requirements> 5 </requirements>
6 6
7 <command detect_errors="exit_code"><![CDATA[ 7 <command detect_errors="exit_code"><![CDATA[
8 ## ── kmerread expects files at specific relative paths ───────────────── 8 ## ── All paths are hardcoded in kmer_read_m7.py: ──────────────────────
9 ## ./mitoch/mitoch_probes.txt.gz - probe database 9 ## database: ./mitochondria7/<multiple .txt files>
10 ## ./jobs1/jobs1.txt - jobs file listing sample reads 10 ## jobs file: ./jobs7m/jobs7m.txt
11 ## It is invoked with no arguments: ./kmerread 11 ## output: ./jobs7m/jobs7m.csv
12 mkdir -p ./mitoch ./jobs1 ./reads && 12 ## binary: ./kmerread7 (called as subprocess by the Python script)
13 mkdir -p ./mitochondria7 ./jobs7m &&
13 14
14 ## ── Link probe database to the path kmerread expects ───────────────── 15 ## ── Link database files from the data table directory ─────────────────
15 ln -sf '${probe_db.fields.path}' ./mitoch/mitoch_probes.txt.gz && 16 ## The data table path points to a directory containing all the
17 ## mitochondria7 .txt files; symlink each one into ./mitochondria7/
18 ln -sf '${probe_db.fields.path}'/* ./mitochondria7/ &&
16 19
17 ## ── Stage input reads ───────────────────────────────────────────────── 20 ## ── Symlink kmerread7 into the working directory ──────────────────────
21 ## kmer_read_m7.py calls ./kmerread7 (relative path), so it must exist
22 ## in the Galaxy job working directory
23 ln -sf /usr/local/bin/kmerread7 ./kmerread7 &&
24
25 ## ── Write the jobs file ───────────────────────────────────────────────
26 ## Format: sample_name num_files
27 ## /abs/path/to/read1
28 ## /abs/path/to/read2 ...
29 #set sample_name = $reads[0].element_identifier.replace(' ', '_').split('_')[:-1] | join('_')
30 printf '${sample_name}\t${reads|length}\n' > ./jobs7m/jobs7m.txt &&
18 #for read in $reads 31 #for read in $reads
19 ln -sf '${read}' ./reads/${read.element_identifier.replace(' ', '_')} && 32 printf '${read.file_name}\n' >> ./jobs7m/jobs7m.txt &&
20 #end for 33 #end for
21 34
22 ## ── Write the jobs file in the format kmerread expects ─────────────── 35 ## ── Run the Python orchestrator (no arguments) ────────────────────────
23 ## Line 1: <sample_name> <number_of_files> 36 ## kmer_read_m7.py reads jobs7m/jobs7m.txt, calls ./kmerread7,
24 ## Lines 2+: absolute path to each read file, one per line 37 ## and writes results to jobs7m/jobs7m.csv
25 #set sample_name = $reads[0].element_identifier.replace(' ', '_').split('_')[:-1] | join('_') 38 python3 /opt/mitokmer2/kmer_read_m7.py &&
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 39
31 ## ── Run kmerread (reads jobs1/jobs1.txt and mitoch/mitoch_probes.txt.gz 40 ## ── Copy output CSV to Galaxy output path ─────────────────────────────
32 ## by convention; no CLI arguments) ────────────────────────────────── 41 cp ./jobs7m/jobs7m.csv '${results_csv}'
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> 42 ]]></command>
40 43
41 <inputs> 44 <inputs>
42 <!-- Probe database selected from Galaxy data table --> 45 <!-- Probe database directory selected from Galaxy data table -->
43 <param name="probe_db" 46 <param name="probe_db"
44 type="select" 47 type="select"
45 label="Mitochondrial k-mer probe database" 48 label="Mitochondrial k-mer probe database"
46 help="Select a pre-installed mitochondrial k-mer probe database. 49 help="Select a pre-installed mitochondrial k-mer probe database.
47 Databases are managed by your Galaxy administrator via the 50 Databases are managed by your Galaxy administrator via the
105 Inputs 108 Inputs
106 ------ 109 ------
107 **Mitochondrial k-mer probe database** 110 **Mitochondrial k-mer probe database**
108 Select a pre-installed probe database from the dropdown. Databases are 111 Select a pre-installed probe database from the dropdown. Databases are
109 managed by your Galaxy administrator and registered in the 112 managed by your Galaxy administrator and registered in the
110 ``mitokmer_probe_db`` data table. 113 ``mitokmer_probe_db`` data table. The database consists of a directory
114 of supporting ``.txt`` files.
111 115
112 **Input reads** 116 **Input reads**
113 One or more FASTQ or FASTA files (gzipped or plain) for a single sample, 117 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) 118 supplied as a Galaxy list collection. Both paired-end files (R1 and R2)
115 should be included in the same collection. 119 should be included in the same collection.
118 trimming of read ends internally. 122 trimming of read ends internally.
119 123
120 Output 124 Output
121 ------ 125 ------
122 **Results CSV** 126 **Results CSV**
123 A comma-separated file summarising the relative abundance of each taxon 127 A comma-separated file with columns: taxid, reads, abundance, uniq.
124 detected in the sample. Columns include taxon name, taxonomic rank, number 128 Only taxa with non-zero relative abundance are reported.
125 of reads assigned, relative abundance (%), and the number of unique k-mers
126 supporting the assignment.
127 129
128 Example output for the "Plodia" test sample:: 130 Example output for the "Plodia" test sample::
129 131
130 Rank Taxon Reads Rel_Abund(%) Unique_kmers 132 Rank Taxon Reads Rel_Abund(%) Unique_kmers
131 Order Lepidoptera 10 0.1 329 133 Order Lepidoptera 10 0.1 329