Mercurial > repos > galaxytrakr > plasmidtrakr
annotate plasmidtrakr.xml @ 15:58006290e654 draft
planemo upload commit 07e8ec488fa1fb8323b5e90bfc9842aa7337b950
| author | galaxytrakr |
|---|---|
| date | Thu, 30 Apr 2026 19:20:50 +0000 |
| parents | 9a84b8511fc2 |
| children | 706b2bbc64ed |
| rev | line source |
|---|---|
|
15
58006290e654
planemo upload commit 07e8ec488fa1fb8323b5e90bfc9842aa7337b950
galaxytrakr
parents:
14
diff
changeset
|
1 <tool id="plasmidtrakr" name="PlasmidTrakr" version="0.2.1"> |
|
14
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
2 <description>Screens assemblies against a Mash database and predicts isolate source using a trained machine learning model</description> |
|
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
3 |
|
0
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
4 <requirements> |
|
14
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
5 <requirement type="package" version="2.3">mash</requirement> |
|
13
6eaad34862cb
planemo upload commit 74ae4c98abbbea693de70e76434089d1d58ff87a
galaxytrakr
parents:
12
diff
changeset
|
6 <requirement type="package" version="2.3.3">pandas</requirement> |
|
6eaad34862cb
planemo upload commit 74ae4c98abbbea693de70e76434089d1d58ff87a
galaxytrakr
parents:
12
diff
changeset
|
7 <requirement type="package" version="1.6.1">scikit-learn</requirement> |
|
0
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
8 </requirements> |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
9 |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
10 <command detect_errors="exit_code"><![CDATA[ |
|
15
58006290e654
planemo upload commit 07e8ec488fa1fb8323b5e90bfc9842aa7337b950
galaxytrakr
parents:
14
diff
changeset
|
11 ## 1. Create a sanitized variable for the input name (removes spaces/special chars for the shell) |
|
58006290e654
planemo upload commit 07e8ec488fa1fb8323b5e90bfc9842aa7337b950
galaxytrakr
parents:
14
diff
changeset
|
12 #set $input_name = $assembly_input.element_identifier.replace(" ", "_") |
|
58006290e654
planemo upload commit 07e8ec488fa1fb8323b5e90bfc9842aa7337b950
galaxytrakr
parents:
14
diff
changeset
|
13 |
|
58006290e654
planemo upload commit 07e8ec488fa1fb8323b5e90bfc9842aa7337b950
galaxytrakr
parents:
14
diff
changeset
|
14 ## 2. Symlink the Mash database |
|
14
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
15 ln -s '$mash_database.fields.path' queries.msh && |
|
15
58006290e654
planemo upload commit 07e8ec488fa1fb8323b5e90bfc9842aa7337b950
galaxytrakr
parents:
14
diff
changeset
|
16 |
|
58006290e654
planemo upload commit 07e8ec488fa1fb8323b5e90bfc9842aa7337b950
galaxytrakr
parents:
14
diff
changeset
|
17 ## 3. Run Mash Screen |
|
58006290e654
planemo upload commit 07e8ec488fa1fb8323b5e90bfc9842aa7337b950
galaxytrakr
parents:
14
diff
changeset
|
18 ## We redirect the output to a file named after the original input |
|
14
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
19 mash screen |
|
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
20 -w |
|
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
21 -i $threshold |
|
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
22 queries.msh |
|
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
23 '$assembly_input' |
|
15
58006290e654
planemo upload commit 07e8ec488fa1fb8323b5e90bfc9842aa7337b950
galaxytrakr
parents:
14
diff
changeset
|
24 > '${input_name}.tabular' |
|
14
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
25 && |
|
15
58006290e654
planemo upload commit 07e8ec488fa1fb8323b5e90bfc9842aa7337b950
galaxytrakr
parents:
14
diff
changeset
|
26 |
|
58006290e654
planemo upload commit 07e8ec488fa1fb8323b5e90bfc9842aa7337b950
galaxytrakr
parents:
14
diff
changeset
|
27 ## 4. Run PlasmidTrakr prediction |
|
58006290e654
planemo upload commit 07e8ec488fa1fb8323b5e90bfc9842aa7337b950
galaxytrakr
parents:
14
diff
changeset
|
28 ## We pass the newly named file to the python script |
|
9
c78b7a3494f9
planemo upload commit 117de6ae3eb1896dcb0044059b268136fc1b97ab
galaxytrakr
parents:
8
diff
changeset
|
29 python $__tool_directory__/predict_source.py |
|
15
58006290e654
planemo upload commit 07e8ec488fa1fb8323b5e90bfc9842aa7337b950
galaxytrakr
parents:
14
diff
changeset
|
30 -i '${input_name}.tabular' |
|
14
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
31 -b '$model_selection.fields.path' |
|
10
cbc924a737db
planemo upload commit 17291695ca68c131f51a65367eb52e9b4c405532
galaxytrakr
parents:
9
diff
changeset
|
32 -t $threshold |
|
14
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
33 -o '$prediction_output' |
|
0
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
34 ]]></command> |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
35 |
|
15
58006290e654
planemo upload commit 07e8ec488fa1fb8323b5e90bfc9842aa7337b950
galaxytrakr
parents:
14
diff
changeset
|
36 |
|
0
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
37 <inputs> |
|
14
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
38 <param name="assembly_input" type="data" format="fasta,fasta.gz,fastq,fastq.gz" label="Genome Assembly / Reads" help="The FASTA/FASTQ file containing the isolate sequence."/> |
|
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
39 |
|
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
40 <param name="mash_database" type="select" label="Select Mash Database" help="Choose the pre-computed Mash sketch database to screen against."> |
|
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
41 <options from_data_table="mash_sketches"> |
|
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
42 <validator type="no_options" message="No Mash databases are configured. Please contact your Galaxy administrator." /> |
|
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
43 </options> |
|
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
44 </param> |
|
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
45 |
|
0
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
46 <param name="model_selection" type="select" label="Select Prediction Model" help="Choose which trained model to use for prediction."> |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
47 <options from_data_table="plasmidtrakr_models"> |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
48 <validator type="no_options" message="No prediction models are configured. Please contact your Galaxy administrator." /> |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
49 </options> |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
50 </param> |
|
14
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
51 |
|
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
52 <param name="threshold" type="float" value="0.95" min="0.0" max="1.0" label="Mash Identity Threshold" help="Filter plasmid hits below this identity. Must match the threshold used for model training."/> |
|
0
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
53 </inputs> |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
54 |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
55 <outputs> |
|
8
17b409c9320d
planemo upload commit 8fe81cc450c2773ca4183b693341de07ff0337e9
galaxytrakr
parents:
7
diff
changeset
|
56 <data name="prediction_output" format="tabular" label="Prediction for ${on_string}" /> |
|
0
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
57 </outputs> |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
58 |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
59 <help><![CDATA[ |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
60 **What it does** |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
61 |
|
14
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
62 This tool performs a complete workflow in a single step: it screens a genome assembly or read set against a built-in plasmid database using **mash screen**, and then feeds those plasmid hits into a pre-trained **machine learning model** to predict the original source of the isolate. |
|
0
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
63 |
|
14
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
64 **Workflow** |
|
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
65 1. Provide your **genome assembly (FASTA)** or raw reads. |
|
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
66 2. Select your **Mash database** from the server's configured list. |
|
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
67 3. Select the desired prediction model. |
|
9a84b8511fc2
planemo upload commit 6681312523efb1b57807ea244c63f9cbb02c574e
galaxytrakr
parents:
13
diff
changeset
|
68 4. Execute to screen and predict in one step. |
|
0
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
69 |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
70 **Output** |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
71 A tabular file containing the isolate ID, the predicted source, and a confidence score. |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
72 ]]></help> |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
73 |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
74 <citations> |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
75 <citation type="bibtex"> |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
76 @misc{strain_2026_plasmidtrakr, |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
77 author = {Strain, Errol}, |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
78 title = {PlasmidTrakr: A tool for predicting isolate source from plasmid profiles}, |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
79 year = {2026}, |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
80 publisher = {GitHub}, |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
81 journal = {GitHub repository}, |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
82 howpublished = {\url{https://github.com/estrain/plasmidtrakr}} |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
83 } |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
84 </citation> |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
85 </citations> |
|
f25631df0e9f
planemo upload commit 25e4c800a5358b8615dac18ea5e908e31c534020
galaxytrakr
parents:
diff
changeset
|
86 </tool> |
