Mercurial > repos > tomnl > mspurity_spectralmatching
comparison spectralMatching.xml @ 12:e131f2fb0f97 draft
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit bbbcc75d51c020446fd00d76f908a6250266cfea
| author | tomnl |
|---|---|
| date | Fri, 13 Sep 2019 11:48:31 -0400 |
| parents | 103d2613b3a7 |
| children | 8dd98b0f83af |
comparison
equal
deleted
inserted
replaced
| 11:103d2613b3a7 | 12:e131f2fb0f97 |
|---|---|
| 16 </stdio> | 16 </stdio> |
| 17 <command interpreter="Rscript"><![CDATA[ | 17 <command interpreter="Rscript"><![CDATA[ |
| 18 spectralMatching.R | 18 spectralMatching.R |
| 19 --outDir=. | 19 --outDir=. |
| 20 --cores=\${GALAXY_SLOTS:-4} | 20 --cores=\${GALAXY_SLOTS:-4} |
| 21 | 21 |
| 22 | 22 #if $Query.q_dbPth_con.q_dbPth_select == 'msPurityData' |
| 23 #if $Query.q_dbPth_con.q_dbPth_select == 'userdb' | 23 --q_defaultDb |
| 24 #else if $Query.q_dbPth_con.q_dbPth_select == 'sqlite' | |
| 24 --q_dbPth=$Query.q_dbPth_con.q_dbPth | 25 --q_dbPth=$Query.q_dbPth_con.q_dbPth |
| 25 #else | 26 #end if |
| 26 --q_defaultDb | 27 |
| 27 #end if | 28 #if $Library.l_dbPth_con.l_dbPth_select == 'msPurityData' |
| 28 | 29 --l_defaultDb |
| 29 #if $Library.l_dbPth_con.l_dbPth_select == 'userdb' | 30 #else if $Library.l_dbPth_con.l_dbPth_select == 'userdb_sqlite' |
| 30 --l_dbPth=$Library.l_dbPth_con.l_dbPth | 31 --l_dbPth=$Library.l_dbPth_con.l_dbPth |
| 31 #else | 32 #end if |
| 32 --l_defaultDb | 33 |
| 33 #end if | 34 --l_dbType=$Library.l_dbPth_con.l_dbPth_select |
| 34 | 35 --q_dbType=$Query.q_dbPth_con.q_dbPth_select |
| 36 | |
| 37 | |
| 35 --q_ppmPrec=$Query.q_filters.q_ppmPrec | 38 --q_ppmPrec=$Query.q_filters.q_ppmPrec |
| 36 --l_ppmPrec=$Library.l_filters.l_ppmPrec | 39 --l_ppmPrec=$Library.l_filters.l_ppmPrec |
| 37 | 40 |
| 38 --q_ppmProd=$Query.q_filters.q_ppmProd | 41 --q_ppmProd=$Query.q_filters.q_ppmProd |
| 39 --l_ppmProd=$Library.l_filters.l_ppmProd | 42 --l_ppmProd=$Library.l_filters.l_ppmProd |
| 40 | 43 |
| 41 | 44 |
| 42 #if $Query.q_filters.q_raThres_cond.q_raThres_bool | 45 #if $Query.q_filters.q_raThres_cond.q_raThres_bool |
| 43 --q_raThres=$Query.q_filters.q_raThres_cond.q_raThres | 46 --q_raThres=$Query.q_filters.q_raThres_cond.q_raThres |
| 44 #end if | 47 #end if |
| 45 | 48 |
| 46 #if $Library.l_filters.l_raThres_cond.l_raThres_bool | 49 #if $Library.l_filters.l_raThres_cond.l_raThres_bool |
| 47 --l_raThres=$Library.l_filters.l_raThres_cond.l_raThres | 50 --l_raThres=$Library.l_filters.l_raThres_cond.l_raThres |
| 48 #end if | 51 #end if |
| 49 | 52 |
| 50 #if $Query.q_filters.q_polarity_cond.q_polarity_bool | 53 #if $Query.q_filters.q_polarity_cond.q_polarity_bool |
| 51 --q_polarity=$Query.q_filters.q_polarity_cond.q_polarity | 54 --q_polarity=$Query.q_filters.q_polarity_cond.q_polarity |
| 52 #end if | 55 #end if |
| 53 | 56 |
| 54 #if $Library.l_filters.l_polarity_cond.l_polarity_bool | 57 #if $Library.l_filters.l_polarity_cond.l_polarity_bool |
| 55 --l_polarity=$Library.l_filters.l_polarity_cond.l_polarity | 58 --l_polarity=$Library.l_filters.l_polarity_cond.l_polarity |
| 56 #end if | 59 #end if |
| 57 | 60 |
| 58 #if $Query.q_filters.q_purity_cond.q_purity_bool | 61 #if $Query.q_filters.q_purity_cond.q_purity_bool |
| 59 --q_purity=$Query.q_filters.q_purity_cond.q_purity | 62 --q_purity=$Query.q_filters.q_purity_cond.q_purity |
| 60 #end if | 63 #end if |
| 61 | 64 |
| 62 #if $Library.l_filters.l_purity_cond.l_purity_bool | 65 #if $Library.l_filters.l_purity_cond.l_purity_bool |
| 63 --l_purity=$Library.l_filters.l_purity_cond.l_purity | 66 --l_purity=$Library.l_filters.l_purity_cond.l_purity |
| 64 #end if | 67 #end if |
| 65 | 68 |
| 66 #if $Query.q_filters.q_xcmsGroups_cond.q_xcmsGroups_bool | 69 #if $Query.q_filters.q_xcmsGroups_cond.q_xcmsGroups_bool |
| 67 --q_xcmsGroups=$Query.q_filters.q_xcmsGroups_cond.q_xcmsGroups | 70 --q_xcmsGroups=$Query.q_filters.q_xcmsGroups_cond.q_xcmsGroups |
| 68 #end if | 71 #end if |
| 69 | 72 |
| 70 #if $Library.l_filters.l_xcmsGroups_cond.l_xcmsGroups_bool | 73 #if $Library.l_filters.l_xcmsGroups_cond.l_xcmsGroups_bool |
| 71 --l_xcmsGroups=$Library.l_filters.l_xcmsGroups_cond.l_xcmsGroups | 74 --l_xcmsGroups=$Library.l_filters.l_xcmsGroups_cond.l_xcmsGroups |
| 72 #end if | 75 #end if |
| 73 | 76 |
| 74 #if $Query.q_filters.q_pids_cond.q_pids_bool | 77 #if $Query.q_filters.q_pids_cond.q_pids_bool |
| 75 --q_pids=$Query.q_filters.q_pids_cond.q_pids | 78 --q_pids=$Query.q_filters.q_pids_cond.q_pids |
| 76 #end if | 79 #end if |
| 77 | 80 |
| 78 #if $Library.l_filters.l_pids_cond.l_pids_bool | 81 #if $Library.l_filters.l_pids_cond.l_pids_bool |
| 79 --l_pids=$Library.l_filters.l_pids_cond.l_pids | 82 --l_pids=$Library.l_filters.l_pids_cond.l_pids |
| 80 #end if | 83 #end if |
| 81 | 84 |
| 82 #if $Query.q_filters.q_rtrange_cond.q_rtrange_bool | 85 #if $Query.q_filters.q_rtrange_cond.q_rtrange_bool |
| 83 --q_rtrangeMin=$Query.q_filters.q_rtrange_cond.q_rtrangeMin | 86 --q_rtrangeMin=$Query.q_filters.q_rtrange_cond.q_rtrangeMin |
| 84 --q_rtrangeMax=$Query.q_filters.q_rtrange_cond.q_rtrangeMax | 87 --q_rtrangeMax=$Query.q_filters.q_rtrange_cond.q_rtrangeMax |
| 85 #end if | 88 #end if |
| 86 | 89 |
| 87 #if $Library.l_filters.l_rtrange_cond.l_rtrange_bool | 90 #if $Library.l_filters.l_rtrange_cond.l_rtrange_bool |
| 88 --l_rtrangeMin=$Library.l_filters.l_rtrange_cond.l_rtrangeMin | 91 --l_rtrangeMin=$Library.l_filters.l_rtrange_cond.l_rtrangeMin |
| 89 --l_rtrangeMax=$Library.l_filters.l_rtrange_cond.l_rtrangeMax | 92 --l_rtrangeMax=$Library.l_filters.l_rtrange_cond.l_rtrangeMax |
| 90 #end if | 93 #end if |
| 91 | 94 |
| 92 #if $Query.q_filters.q_accessions_cond.q_accessions_bool | 95 #if $Query.q_filters.q_accessions_cond.q_accessions_bool |
| 93 --q_accessions=$Query.q_filters.q_accessions_cond.q_accessions | 96 --q_accessions=$Query.q_filters.q_accessions_cond.q_accessions |
| 94 #end if | 97 #end if |
| 95 | 98 |
| 96 #if $Library.l_filters.l_accessions_cond.l_accessions_bool | 99 #if $Library.l_filters.l_accessions_cond.l_accessions_bool |
| 97 --l_accessions=$Library.l_filters.l_accessions_cond.l_accessions | 100 --l_accessions=$Library.l_filters.l_accessions_cond.l_accessions |
| 98 #end if | 101 #end if |
| 99 | 102 |
| 100 | 103 |
| 101 #if $Query.q_filters.q_sources_cond.q_sources_bool | 104 #if $Query.q_filters.q_sources_cond.q_sources_bool |
| 102 --q_sources=$Query.q_filters.q_sources_cond.q_sources | 105 --q_sources=$Query.q_filters.q_sources_cond.q_sources |
| 103 --q_sourcesUser=$Query.q_filters.q_sources_cond.q_sourcesUser | 106 --q_sourcesUser=$Query.q_filters.q_sources_cond.q_sourcesUser |
| 104 #end if | 107 #end if |
| 105 | 108 |
| 106 #if $Library.l_filters.l_sources_cond.l_sources_bool | 109 #if $Library.l_filters.l_sources_cond.l_sources_bool |
| 107 --l_sources=$Library.l_filters.l_sources_cond.l_sources | 110 --l_sources=$Library.l_filters.l_sources_cond.l_sources |
| 108 --l_sourcesUser=$Library.l_filters.l_sources_cond.l_sourcesUser | 111 --l_sourcesUser=$Library.l_filters.l_sources_cond.l_sourcesUser |
| 109 #end if | 112 #end if |
| 110 | 113 |
| 111 #if $Query.q_filters.q_instrumentTypes_cond.q_instrumentTypes_bool | 114 #if $Query.q_filters.q_instrumentTypes_cond.q_instrumentTypes_bool |
| 112 --q_instrumentTypes=$Query.q_filters.q_instrumentTypes_cond.q_instrumentTypes | 115 --q_instrumentTypes=$Query.q_filters.q_instrumentTypes_cond.q_instrumentTypes |
| 113 --q_instrumentTypesUser=$Query.q_filters.q_instrumentTypes_cond.q_instrumentTypesUser | 116 --q_instrumentTypesUser=$Query.q_filters.q_instrumentTypes_cond.q_instrumentTypesUser |
| 114 #end if | 117 #end if |
| 115 | 118 |
| 116 #if $Library.l_filters.l_instrumentTypes_cond.l_instrumentTypes_bool | 119 #if $Library.l_filters.l_instrumentTypes_cond.l_instrumentTypes_bool |
| 117 --l_instrumentTypes=$Library.l_filters.l_instrumentTypes_cond.l_instrumentTypes | 120 --l_instrumentTypes=$Library.l_filters.l_instrumentTypes_cond.l_instrumentTypes |
| 118 --l_instrumentTypesUser=$Library.l_filters.l_instrumentTypes_cond.l_instrumentTypesUser | 121 --l_instrumentTypesUser=$Library.l_filters.l_instrumentTypes_cond.l_instrumentTypesUser |
| 119 #end if | 122 #end if |
| 120 | 123 |
| 121 #if $Query.q_filters.q_instruments_cond.q_instruments_bool | 124 #if $Query.q_filters.q_instruments_cond.q_instruments_bool |
| 122 --q_instruments=$Query.q_filters.q_instruments_cond.q_instruments | 125 --q_instruments=$Query.q_filters.q_instruments_cond.q_instruments |
| 123 #end if | 126 #end if |
| 124 | 127 |
| 125 #if $Library.l_filters.l_instruments_cond.l_instruments_bool | 128 #if $Library.l_filters.l_instruments_cond.l_instruments_bool |
| 126 --l_instruments=$Library.l_filters.l_instruments_cond.l_instruments | 129 --l_instruments=$Library.l_filters.l_instruments_cond.l_instruments |
| 127 #end if | 130 #end if |
| 128 | 131 |
| 129 #if $Query.q_filters.q_spectraTypes_cond.q_spectraTypes_bool | 132 #if $Query.q_filters.q_spectraTypes_cond.q_spectraTypes_bool |
| 130 --q_spectraTypes=$Query.q_filters.q_spectraTypes_cond.q_spectraTypes | 133 --q_spectraTypes=$Query.q_filters.q_spectraTypes_cond.q_spectraTypes |
| 131 #end if | 134 #end if |
| 132 | 135 |
| 133 #if $Library.l_filters.l_spectraTypes_cond.l_spectraTypes_bool | 136 #if $Library.l_filters.l_spectraTypes_cond.l_spectraTypes_bool |
| 134 --l_spectraTypes=$Library.l_filters.l_spectraTypes_cond.l_spectraTypes | 137 --l_spectraTypes=$Library.l_filters.l_spectraTypes_cond.l_spectraTypes |
| 135 #end if | 138 #end if |
| 136 | 139 |
| 137 #if $Query.q_filters.q_spectraFilter | 140 #if $Query.q_filters.q_spectraFilter |
| 138 --q_spectraFilter | 141 --q_spectraFilter |
| 139 #end if | 142 #end if |
| 140 | 143 |
| 141 #if $Library.l_filters.l_spectraFilter | 144 #if $Library.l_filters.l_spectraFilter |
| 142 --l_spectraFilter | 145 --l_spectraFilter |
| 143 #end if | 146 #end if |
| 144 | 147 |
| 145 #if $General.rttol_cond.rttol_bool | 148 #if $General.rttol_cond.rttol_bool |
| 146 --rttol=$General.rttol_cond.rttol | 149 --rttol=$General.rttol_cond.rttol |
| 147 #end if | 150 #end if |
| 148 | 151 |
| 149 --raW=$General.raW | 152 --raW=$General.raW |
| 150 --mzW=$General.mzW | 153 --mzW=$General.mzW |
| 151 | 154 |
| 152 #if $General.updateDb_cond.updateDb | 155 #if $General.updateDb_cond.updateDb |
| 153 --updateDb | 156 --updateDb |
| 154 #if $General.updateDb_cond.copyDb | 157 #if $General.updateDb_cond.copyDb |
| 155 --copyDb | 158 --copyDb |
| 156 #end if | 159 #end if |
| 157 #end if | 160 #end if |
| 158 | 161 |
| 159 #if $General.usePrecursors | 162 #if $General.usePrecursors |
| 160 --usePrecursors | 163 --usePrecursors |
| 161 #end if | 164 #end if |
| 162 | 165 |
| 163 | 166 |
| 164 | 167 |
| 165 ]]></command> | 168 ]]></command> |
| 166 <inputs> | 169 <inputs> |
| 167 | 170 |
| 168 | 171 |
| 169 | 172 |
| 170 <section name="Query" title="Query spectra input and filters" expanded="True"> | 173 <section name="Query" title="Query spectra input and filters" expanded="True"> |
| 171 <expand macro="sm_input" ql='Query' ql_shrt = "q" user="True" mspuritydatalib="False" msp="False" | 174 <expand macro="sm_input" ql='Query' ql_shrt = "q" user="True" mspuritydatalib="False" msp="False" |
| 172 help="Query SQLite database - in the standard XCMS msPurity workflow - the output | 175 help="Query SQLite database - in the standard XCMS msPurity workflow - the output |
| 173 of msPurity.createDatabase should be used here. However any SQLite database | 176 of msPurity.createDatabase should be used here. However any SQLite database |
| 174 following the schema of xxx can be used as input"/> | 177 following the schema of xxx can be used as input"/> |
| 175 <expand macro="filters" ql="Query" ql_shrt="q"/> | 178 <expand macro="filters" ql="Query" ql_shrt="q"/> |
| 176 </section> | 179 </section> |
| 177 | 180 |
| 178 <section name="Library" title="Library spectra input and filters" expanded="True"> | 181 <section name="Library" title="Library spectra input and filters" expanded="True"> |
| 179 <expand macro="sm_input" ql='Library' ql_shrt = "l" user="False" mspuritydatalib="True" msp="False" | 182 <expand macro="sm_input" ql='Library' ql_shrt = "l" user="False" mspuritydatalib="True" msp="False" |
| 180 help="Library SQLite database - in the standard XCMS msPurity workflow - a default | 183 help="Library SQLite database - in the standard XCMS msPurity workflow - a default |
| 181 database of MassBank, HMDB, LipidBlast and GNPS is used. However any SQLite | 184 database of MassBank, HMDB, LipidBlast and GNPS is used. However any SQLite |
| 182 database following the schema of xxx can be used as input"/> | 185 database following the schema of xxx can be used as input"/> |
| 183 <expand macro="filters" ql="Library" ql_shrt="l"/> | 186 <expand macro="filters" ql="Library" ql_shrt="l"/> |
| 184 </section> | 187 </section> |
| 185 | 188 |
| 186 <section name="General" title="General arguments" expanded="False"> | 189 <section name="General" title="General arguments" expanded="False"> |
| 187 <conditional name="rttol_cond"> | 190 <conditional name="rttol_cond"> |
| 188 <param name="rttol_bool" type="boolean" label="Filter on retention time match?" | 191 <param name="rttol_bool" type="boolean" label="Filter on retention time match?" |
| 189 help="" /> | 192 help="" /> |
| 190 <when value="true"> | 193 <when value="true"> |
| 191 <param name="rttol" type="float" value="30" min="0" | 194 <param name="rttol" type="float" value="30" min="0" |
| 192 label="Retention time tolerance (seconds)" | 195 label="Retention time tolerance (seconds)" |
| 193 help="Retention time tolerance in seconds to match precursors"/> | 196 help="Retention time tolerance in seconds to match precursors"/> |
| 194 </when> | 197 </when> |
| 195 <when value="false"> | 198 <when value="false"> |
| 196 </when> | 199 </when> |
| 197 </conditional> | 200 </conditional> |
| 198 | 201 |
| 199 | 202 |
| 200 <param name="usePrecursors" type="boolean" checked="true" label="Filter on matching precursors?" | 203 <param name="usePrecursors" type="boolean" checked="true" label="Filter on matching precursors?" |
| 201 help="If True, spectra will be filtered by similarity of precursors based on | 204 help="If True, spectra will be filtered by similarity of precursors based on |
| 202 the library and query ppm defined tolerance" /> | 205 the library and query ppm defined tolerance" /> |
| 203 | 206 |
| 204 <param name="raW" label="Weighting for relative abundance" | 207 <param name="raW" label="Weighting for relative abundance" |
| 205 type="float" value="0.5" | 208 type="float" value="0.5" |
| 206 help="Relative abundance weight for spectra (default to 0.5 as determined by | 209 help="Relative abundance weight for spectra (default to 0.5 as determined by |
| 207 massbank for ESI data)"/> | 210 massbank for ESI data)"/> |
| 208 | 211 |
| 209 <param name="mzW" label="Weighting for mz" | 212 <param name="mzW" label="Weighting for mz" |
| 210 type="float" value="2" | 213 type="float" value="2" |
| 211 help="mz weight for spectra (default to 2 as determined by massbank for ESI data)"/> | 214 help="mz weight for spectra (default to 2 as determined by massbank for ESI data)"/> |
| 212 | 215 |
| 213 <conditional name="updateDb_cond"> | 216 <conditional name="updateDb_cond"> |
| 214 <param name="updateDb" type="boolean" checked="true" | 217 <param name="updateDb" type="boolean" checked="true" |
| 215 label="Update database with results?" help="" /> | 218 label="Update database with results?" help="" /> |
| 216 <when value="true"> | 219 <when value="true"> |
| 217 <param name="copyDb" type="boolean" checked="true" | 220 <param name="copyDb" type="boolean" checked="true" |
| 218 label="Make a copy of the database?" | 221 label="Make a copy of the database?" |
| 219 help="A copy will be made of the input SQLite target database and the | 222 help="A copy will be made of the input SQLite target database and the |
| 220 results will be added to this copy. When False, the input SQLite | 223 results will be added to this copy. When False, the input SQLite |
| 221 database will be updated with the matching results. Use False if | 224 database will be updated with the matching results. Use False if |
| 222 you want to reduce storage space being used."/> | 225 you want to reduce storage space being used."/> |
| 223 </when> | 226 </when> |
| 224 <when value="false"> | 227 <when value="false"> |
| 225 </when> | 228 </when> |
| 226 </conditional> | 229 </conditional> |
| 227 | 230 |
| 228 | 231 |
| 229 | 232 |
| 230 </section> | 233 </section> |
| 231 | 234 |
| 232 | 235 |
| 233 | 236 |
| 234 | 237 |
| 235 </inputs> | 238 </inputs> |
| 236 | 239 |
| 237 <outputs> | 240 <outputs> |
| 272 ----------- | 275 ----------- |
| 273 General | 276 General |
| 274 ----------- | 277 ----------- |
| 275 | 278 |
| 276 | 279 |
| 277 Perform spectral matching to spectral libraries for an LC-MS/MS dataset. | 280 Perform spectral matching to spectral libraries for an LC-MS/MS dataset. |
| 278 | 281 |
| 279 The spectral matching is performed from a **Query** SQLite spectral-database against a **Library** SQLite spectral-database. | 282 The spectral matching is performed from a **Query** SQLite spectral-database against a **Library** SQLite spectral-database. |
| 280 | 283 |
| 281 The SQLite schema of the spectral database here: spectral_database_schema_ | 284 The SQLite schema of the spectral database here: spectral_database_schema_ |
| 282 | 285 |
| 283 | 286 |
| 284 The query spectral-database in most cases should contain be the "unknown" spectra database generated the msPurity | 287 The query spectral-database in most cases should contain be the "unknown" spectra database generated the msPurity |
| 285 function createDatabase as part of a msPurity-XCMS data processing workflow. | 288 function createDatabase as part of a msPurity-XCMS data processing workflow. |
| 286 | 289 |
| 287 The library spectral-database in most cases should contain the "known" spectra from either public or user generated resources. | 290 The library spectral-database in most cases should contain the "known" spectra from either public or user generated resources. |
| 288 The library SQLite database by default contains data from MoNA including Massbank, HMDB, LipidBlast and GNPS. | 291 The library SQLite database by default contains data from MoNA including Massbank, HMDB, LipidBlast and GNPS. |
| 289 A larger_database_ can be download and used from the msp2db github repository. | 292 A larger_database_ can be download and used from the msp2db github repository. |
| 290 | 293 |
| 291 To create a user generated library SQLite database the following tool can be used to generate a SQLite database | 294 To create a user generated library SQLite database the following tool can be used to generate a SQLite database |
| 292 from a collection of MSP files: msp2db_. | 295 from a collection of MSP files: msp2db_. |
| 293 | 296 |
| 294 It should be noted though, that as long as the schema of the spectral-database is as described here, then any database can be used | 297 It should be noted though, that as long as the schema of the spectral-database is as described here, then any database can be used |
| 295 for either the library or query - even allowing for the same database to be used. | 298 for either the library or query - even allowing for the same database to be used. |
| 296 | 299 |
| 297 The spectral matching functionality has four main components, spectral filtering, spectral alignment, spectral matching, | 300 The spectral matching functionality has four main components, spectral filtering, spectral alignment, spectral matching, |
| 298 and summarising the results. | 301 and summarising the results. |
| 299 | 302 |
| 300 Spectral filtering is simply filtering both the library and query spectra to be search against (e.g. choosing | 303 Spectral filtering is simply filtering both the library and query spectra to be search against (e.g. choosing |
| 301 the library source, instrument, retention time, precursor PPM tolerance etc). | 304 the library source, instrument, retention time, precursor PPM tolerance etc). |
| 302 | 305 |
| 303 The spectral alignment stage involves aligning the query peaks to the library peaks. The approach used is similar | 306 The spectral alignment stage involves aligning the query peaks to the library peaks. The approach used is similar |
| 304 to modified pMatch algorithm described in Zhou et al 2015. | 307 to modified pMatch algorithm described in Zhou et al 2015. |
| 305 | 308 |
| 306 The spectral matching of the aligned spectra is performed against a combined intensity and m/z weighted vector - created for both | 309 The spectral matching of the aligned spectra is performed against a combined intensity and m/z weighted vector - created for both |
| 307 the query and library spectra (wq and wl). See below: | 310 the query and library spectra (wq and wl). See below: |
| 308 | 311 |
| 309 .. math:: | 312 .. math:: |
| 310 | 313 |
| 311 w=intensity^x \cdot mz^y | 314 w=intensity^x \cdot mz^y |
| 312 | 315 |
| 313 | 316 |
| 314 Where x and y represent weight factors and can be adjusted with the parameters raW and mzW. | 317 Where x and y represent weight factors and can be adjusted with the parameters raW and mzW. |
| 315 Defaults to x=0.5 and y=2 as per MassBank for ESI based mass spectrometry data. | 318 Defaults to x=0.5 and y=2 as per MassBank for ESI based mass spectrometry data. |
| 316 | 319 |
| 317 The aligned weighted vectors are then matched using dot product cosine, reverse dot product cosine and the composite dot product. | 320 The aligned weighted vectors are then matched using dot product cosine, reverse dot product cosine and the composite dot product. |
| 318 See below for dot product cosine equation. | 321 See below for dot product cosine equation. |
| 319 | 322 |
| 341 | 344 |
| 342 **Database** | 345 **Database** |
| 343 | 346 |
| 344 The updated query database (this will have been updated with the annotation results if updateDb argument used) | 347 The updated query database (this will have been updated with the annotation results if updateDb argument used) |
| 345 | 348 |
| 346 **matchedResults** | 349 |
| 347 | 350 **xcmsMatchedResults** |
| 348 All matched results from the query spectra to the library spectra. Contains the following columns | 351 |
| 349 | 352 If the qeury spectra had XCMS based chromotographic peaks tables (e.g c_peak_groups, c_peaks) in the sqlite database - it will |
| 353 be possible to summarise the matches for each XCMS grouped feature. The dataframe contains the following columns | |
| 354 | |
| 355 * lpid - id in database of library spectra | |
| 356 * qpid - id in database of query spectra | |
| 350 * dpc - dot product cosine of the match | 357 * dpc - dot product cosine of the match |
| 351 * rdpc - reverse dot product cosine of the match | 358 * rdpc - reverse dot product cosine of the match |
| 352 * cdpc - composite dot product cosine of the match | 359 * cdpc - composite dot product cosine of the match |
| 353 * mcount - number of matching peaks | 360 * mcount - number of matching peaks |
| 354 * allcount - total number of peaks across both query and library spectra | 361 * allcount - total number of peaks across both query and library spectra |
| 355 * mpercent - percentage of matching peaks across both query and library spectra | 362 * mpercent - percentage of matching peaks across both query and library spectra |
| 356 * accession - accession of library match | 363 * library_rt - retention time of library spectra |
| 357 * name - name of library match | 364 * query_rt - retention time of query spectra |
| 358 * inchikey - inchikey of library match | 365 * rtdiff - difference between library and query retention time |
| 359 * lpid - pid in database of library match | 366 * library_precursor_mz - library precursor mz |
| 360 * qpid - pid in database of query match | 367 * query_precursor_mz - query precursor mz |
| 361 * mid - id of the match | 368 * library_precursor_ion_purity - library precursor ion purity |
| 362 | 369 * query_precursor_ion_purity - query precursor ion purity |
| 363 **xcmsMatchedResults** | 370 * library_accession - library accession value (unique string or number given to eith MoNA or Massbank data entires) |
| 364 | 371 * library_precursor_type - library precursor type (i.e. adduct) |
| 365 If the qeury spectra had XCMS based chromotographic peaks tables (e.g c_peak_groups, c_peaks) in the sqlite database - it will | 372 * library_entry_name - Name given to the library spectra |
| 366 be possible to summarise the matches for each XCMS grouped feature. The dataframe contains the following columns | 373 * inchikey - inchikey of the matched library spectra |
| 367 | 374 * library_source_name - source of the spectra (e.g. massbank, gnps) |
| 368 * pid - pid in database of query match | 375 * library_compound_name - name of compound spectra was obtained from |
| 369 * grpid - grpid of the XCMS grouped feature for query match | 376 |
| 370 * mz - derived from XCMS grouped feature | 377 **matchedResults** |
| 371 * mzmin - derived from XCMS grouped feature | 378 |
| 372 * mzmax - derived from XCMS grouped feature | 379 All matched results from the query spectra to the library spectra. Contains the same as above |
| 373 * rt - derived from XCMS grouped feature | 380 without the XCMS details. This table is useful to observe spectral matching results |
| 374 * rtmin - derived from XCMS grouped feature | 381 for all MS/MS spectra irrespective of if they are linked to XCMS MS1 features. |
| 375 * rtmax - derived from XCMS grouped feature | |
| 376 * npeaks - derived from XCMS grouped feature | |
| 377 * grp_name - derived from XCMS grouped feature | |
| 378 * dpc - dot product cosine of the match | |
| 379 * rdpc - reverse dot product cosine of the match | |
| 380 * cdpc - composite dot product cosine of the match | |
| 381 * mcount - number of matching peaks | |
| 382 * allcount - total number of peaks across both query and library spectra | |
| 383 * mpercent - percentage of matching peaks across both query and library spectra | |
| 384 * accession - accession of library match | |
| 385 * name - name of library match | |
| 386 * inchikey - inchikey of library match | |
| 387 * lpid - pid in database of library match | |
| 388 * mid - id of the match | |
| 389 | 382 |
| 390 | 383 |
| 391 .. _spectral_database_schema: https://bioconductor.org/packages/release/bioc/vignettes/msPurity/inst/doc/msPurity-spectral-datatabase-schema.html | 384 .. _spectral_database_schema: https://bioconductor.org/packages/release/bioc/vignettes/msPurity/inst/doc/msPurity-spectral-datatabase-schema.html |
| 392 .. _larger_database: https://github.com/computational-metabolomics/msp2db/releases | 385 .. _larger_database: https://github.com/computational-metabolomics/msp2db/releases |
| 393 .. _msp2db: https://github.com/computational-metabolomics/msp2db/releases | 386 .. _msp2db: https://github.com/computational-metabolomics/msp2db/releases |
