Mercurial > repos > recetox > ipapy2_ms2_annotation
comparison ipapy2_MS2_annotation.xml @ 0:6a23970e8093 draft default tip
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ipapy2 commit 64b61ff2823b4f54868c0ab7a4c0dc49eaf2979a
author | recetox |
---|---|
date | Fri, 16 May 2025 08:01:15 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:6a23970e8093 |
---|---|
1 <tool id="ipapy2_MS2_annotation" name="ipaPy2 MS2 annotation" version="@TOOL_VERSION@+galaxy0" profile="@PROFILE@"> | |
2 <description>annotate features from MS2 using a supplied MS2 database</description> | |
3 <macros> | |
4 <import>macros.xml</import> | |
5 </macros> | |
6 | |
7 <expand macro="requirements"/> | |
8 | |
9 <command detect_errors="exit_code"><![CDATA[ | |
10 #set $computed_ppmthr = float($ppm) * 2 | |
11 python3 '${__tool_directory__}/ipapy2_MS2_annotation.py' | |
12 --input_dataset_mapped_isotope_patterns '${mapped_isotope_patterns}' '${mapped_isotope_patterns.ext}' | |
13 --input_dataset_MS2 '${MS2_fragmentation_data}' '${MS2_fragmentation_data.ext}' | |
14 --input_dataset_adducts '${all_adducts}' '${all_adducts.ext}' | |
15 --input_dataset_MS2_DB '${MS2_DB}' '${MS2_DB.ext}' | |
16 --ppm ${ppm} | |
17 --ratiosd ${ratiosd} | |
18 #if $ppmunk | |
19 --ppmunk ${ppmunk} | |
20 #else | |
21 --ppmunk ${ppm} | |
22 #end if | |
23 --ratiounk ${ratiounk} | |
24 #if $ppmthr | |
25 --ppmthr ${ppmthr} | |
26 #else | |
27 --ppmthr ${computed_ppmthr} | |
28 #end if | |
29 --pRTNone ${pRTNone} | |
30 --pRTout ${pRTout} | |
31 --mzdCS ${mzdCS} | |
32 --ppmCS ${ppmCS} | |
33 --CSunk ${CSunk} | |
34 --evfilt ${evfilt} | |
35 --output_dataset '${MS2_annotations}' '${MS2_annotations.ext}' | |
36 --ncores \${GALAXY_SLOTS:-1} | |
37 ]]></command> | |
38 | |
39 <inputs> | |
40 <param label="Mapped isotope patterns" name="mapped_isotope_patterns" type="data" format="csv,tsv,tabular,parquet" help="A dataset containing the MS1 data. Ideally obtained from map_isotope_patterns" /> | |
41 <param label="MS2 fragmentation data" name="MS2_fragmentation_data" type="data" format="csv,tsv,tabular,parquet" help="A dataset containing the MS2 data. (If a csv file fails kindly use a tsv file.)" /> | |
42 <param label="all possible adducts table" name="all_adducts" type="data" format="csv,tsv,tabular,parquet" help="A dataset containing the information on all the possible adducts given the database." /> | |
43 <param label="MS2 Database" name="MS2_DB" type="data" format="csv,tsv,tabular,parquet" help="A dataset containing the database containing the MS2 information." /> | |
44 <expand macro="ppm"/> | |
45 <section name="unknown" title="unknown settings"> | |
46 <expand macro="ms_unknown"/> | |
47 <param name="CSunk" type="float" value="0.7"> | |
48 <label>cosine similarity for unknown</label> | |
49 <help>cosine similarity score associated with the 'unknown' annotation. Default 0.7.</help> | |
50 </param> | |
51 </section> | |
52 | |
53 <section name="optional_settings" title="optional settings"> | |
54 <expand macro="ms_options"/> | |
55 <param name="mzdCS" type="integer" value="0" label="MS2 mz threshold"> | |
56 <help>maximum mz difference allowed when computing cosine similarity scores. | |
57 If one wants to use this parameter instead of ppmCS, this must be set to 0. Default 0.</help> | |
58 </param> | |
59 <param name="ppmCS" type="integer" value="10" label="maximum ppm for cosine similarity scores"> | |
60 <help>maximum ppm allowed when computing cosine similarity scores. | |
61 If one wants to use this parameter instead of mzdCS, this must be set to 0. Default 10.</help> | |
62 </param> | |
63 <param name="evfilt" type="select" label="same collision energy"> | |
64 <help>If true, only spectrum acquired with the same collision energy are considered. Default value False.</help> | |
65 <option value="False">False</option> | |
66 <option value="True">True</option> | |
67 </param> | |
68 </section> | |
69 </inputs> | |
70 | |
71 <outputs> | |
72 <data label="${tool.name} on ${on_string}" name="MS2_annotations" format_source="mapped_isotope_patterns"/> | |
73 </outputs> | |
74 | |
75 <tests> | |
76 <test> | |
77 <param name="mapped_isotope_patterns" value="mapped_isotope_patterns.csv"/> | |
78 <param name="MS2_fragmentation_data" value="MS2_fragmentation_data.tsv"/> | |
79 <param name="all_adducts" value="all_adducts.csv"/> | |
80 <param name="MS2_DB" value="MS2_DB.csv"/> | |
81 <param name="ppm" value="3"/> | |
82 <output name="MS2_annotations"> | |
83 <assert_contents> | |
84 <has_n_columns n="13" sep=","/> | |
85 <has_n_lines n="158" delta="5" /> | |
86 </assert_contents> | |
87 </output> | |
88 </test> | |
89 </tests> | |
90 | |
91 <help><![CDATA[ | |
92 | |
93 .. _ipapy2_ms2_annotation: | |
94 | |
95 ========================== | |
96 ipaPy2 MS2 Annotation Tool | |
97 ========================== | |
98 | |
99 **Tool Description** | |
100 | |
101 This tool performs annotation of features in your dataset using MS2 fragmentation data and a supplied MS2 database. It integrates MS1 and MS2 information to provide high-confidence annotations, leveraging prior and posterior probabilities based on mass, retention time (RT), known chemical knowledge, and isotope patterns. | |
102 | |
103 How it works | |
104 ------------ | |
105 | |
106 - **Prior probabilities** are calculated using only the mass information. | |
107 - **Posterior probabilities** incorporate mass, RT, prior knowledge, and isotope patterns for more accurate annotation. | |
108 - The tool matches features in your data to entries in the MS2 database, considering user-defined tolerances for mass (ppm), retention time, and cosine similarity thresholds for spectral matching. | |
109 | |
110 Inputs | |
111 ------ | |
112 | |
113 1. **Mapped isotope patterns** | |
114 Dataset containing MS1 data, ideally obtained from the ``map_isotope_patterns`` tool. | |
115 | |
116 2. **MS2 fragmentation data** | |
117 Dataset with MS2 spectra. If a CSV file fails, try using a TSV file. | |
118 | |
119 3. **All possible adducts table** | |
120 Table listing all possible adducts for the database. | |
121 | |
122 4. **MS2 Database** | |
123 Reference database containing MS2 information for annotation. | |
124 | |
125 5. **Parameters** | |
126 - **ppm**: Mass tolerance in parts per million for matching. | |
127 - **Cosine similarity thresholds**: | |
128 - ``mzdCS``: Maximum m/z difference for cosine similarity (set to 0 to use ``ppmCS``). | |
129 - ``ppmCS``: Maximum ppm for cosine similarity (set to 0 to use ``mzdCS``). | |
130 - **evfilt**: If set to True, only spectra acquired with the same collision energy are considered. | |
131 - **Unknown settings**: Parameters for handling unknowns, such as cosine similarity threshold for unknown annotations. | |
132 | |
133 Outputs | |
134 ------- | |
135 | |
136 - **MS2_annotations** | |
137 Annotated dataset with additional columns describing the best-matching database entries, probabilities, and spectral similarity scores. | |
138 | |
139 Example | |
140 ------- | |
141 | |
142 Suppose you have mapped isotope patterns, MS2 fragmentation data, a list of all adducts, and an MS2 database. You can use this tool to annotate your features as follows: | |
143 | |
144 .. code-block:: | |
145 | |
146 mapped_isotope_patterns.csv | |
147 MS2_fragmentation_data.tsv | |
148 all_adducts.csv | |
149 MS2_DB.csv | |
150 | |
151 Set the desired tolerances (e.g., ``ppm = 3``) and run the tool. The output will be a table with annotations for each feature. | |
152 | |
153 Notes | |
154 ----- | |
155 | |
156 - For best results, ensure your input files are correctly formatted and contain the required columns. | |
157 - If you encounter issues with CSV files, try converting them to TSV format. | |
158 - The tool is designed to be flexible and can handle various input formats (CSV, TSV, Parquet, Tabular). | |
159 | |
160 References | |
161 ---------- | |
162 | |
163 - For more details on the annotation algorithm and scoring, refer to the ipaPy2 documentation or associated publications. | |
164 | |
165 ]]></help> | |
166 | |
167 <expand macro="citations"/> | |
168 </tool> |