wun-yu-lin
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
22 Nov. 2023 # [MS search](https://ms-search.us) - tutorial # 1. Introduction MS search provides an online spectral database, enabling searches within the database using LC-MS/MS data. The website is optimized for search efficiency, allowing spectrum matching at a speed of seconds within a database of millions of entries. In addition, we offer a batch search feature for spectra. To utilize this function, you need to provide an MS1 peak list (.csv) and an MS2 spectrum file (.mgf). The data preprocessing steps can be found in Section 3: data preparation. We also provide demo data for your testing purposes. Upon completion of the task, the website will provide a URL for you to download the matching results. We wish you a successful experiment! # 2. Demo Data ## 2.1 LC-ToF-MS ### 2.1.1 HRMS (LC-ToF-MS) in positive mode with DDA mode MS1 peak list: [peakList_LCMS_POS](https://drive.google.com/file/d/1CGjf2h4Z91oPRn4nJzwtAw2YuSzXfOZG/view?usp=sharing) MS2 spectrum file: [ms2Spectrum_LCMS_POS](https://drive.google.com/file/d/17CHI6EMnifdYnIvCTO27ZqYrYn5bk0iI/view?usp=sharing) ### 2.1.2 HRMS (LC-ToF-MS) in negative mode with DDA mode MS1 peak list: [peakList_LCMS_NEG](https://drive.google.com/file/d/1x3MX94WTjaJmqopevuhJreHRuiIPl6-u/view?usp=sharing) MS2 spectrum file: [ms2Spectrum_LCMS_NEG](https://drive.google.com/file/d/1KOOKzkggA-UwHvYtEVd07dHZipFSmVYr/view?usp=drive_link) # 3. Data preparation ## 3.1 Prepare MS1 peak table & MS2 spectrum file ### 3.1.1 Data acquisition 1. The data was acquired by LC-HRMS Sciex TripleToF 6600 in data-dependent mode。 ### 3.1.2 XCMS v3.12.0 (XCMS3) + MSconvert 1. The conversion to mzXML format was performed using MSconvert 3.0.20226, and the processed data was subsequently handed over to the R package XCMS (v3.12.0) for data preprocessing. 2. The LC-MS data preprocessing by XCMS actual code is as follows: ```r #call library library(xcms) library(RColorBrewer) library(pander) library(magrittr) library(pheatmap) library(SummarizedExperiment) #controll core as 1 core within runtime if (.Platform$OS.type == "unix") { register(bpstart(MulticoreParam(1))) } else { register(bpstart(SnowParam(1))) } #If you want to organize your data into sample groups based on folders like "dda/GroupName1" and "dda/GroupName2" #Read LC-MS/M file with mzXML formate MSdata <- paste0("dda/",list.files(path = "fullscan/",pattern = ".mzXML$", recursive = TRUE)) pd <- data.frame(sample_name = sub(basename(MSdata), pattern = ".mzXML", replacement = "", fixed = TRUE), sample_group = c(rep("gp1", 3), ##("group", repNum.) rep("gp2", 3) class=c(rep("gp1", 3), rep("gp2", 3) stringsAsFactors = FALSE) rawData <- readMSData(MSdata, centroided. = TRUE, mode = "onDisk", pdata = new("NAnnotatedDataFrame", pd)) #FilterEmptySpectra rawData <- filterEmptySpectra(rawData) rawData <- filterRt(rawData, c(0,2400)) #Register single core if (.Platform$OS.type == "unix") { register(bpstart(MulticoreParam(1))) } else { register(bpstart(SnowParam(1))) } #Peak picking cwp <- CentWaveParam(snthresh = 5, noise = 100, peakwidth = c(5, 30), ppm = 20) processedData_raw <- findChromPeaks(rawData, param = cwp) ##MergeNeighboringPeaks mpp <- MergeNeighboringPeaksParam(expandRt = 3, expandMz = 0, ppm=20) xdata_pp <- refineChromPeaks(processedData_raw,param=mpp) processedData <- xdata_pp #Retention time alignment - peakGroups processedData$sample_type <- "study" processedData$sample_type[c(1,2,3)] <- "QC" processedData$sample_type #PeakGroups-grouping variable pdp_subs <- PeakDensityParam(sampleGroups = processedData$sample_type, minFraction = 0.9) processedData <- groupChromPeaks(processedData, param = pdp_subs) #Set up QC for RT alignment and configure PeakGroups-subset-alignment options to perform the alignment. pgp_subs <- PeakGroupsParam(minFraction = 0.9, subset = which(processedData$sample_type == "QC"), subsetAdjust = "average", span = 0.2) processedData <- adjustRtime(processedData, param = pgp_subs) #Peak grouping pdp <- PeakDensityParam(sampleGroups = processedData$sample_group, minFraction = 1, binSize = 0.02) processedData <- groupChromPeaks(processedData, param = pdp) #Gap filling (fill missing peaks) medWidth <- median(chromPeaks(processedData)[, "rtmax"] - chromPeaks(processedData)[, "rtmin"]) processed_Data <- fillChromPeaks(processedData, param = FillChromPeaksParam(fixedRt = medWidth)) #Export MS2 data to mgf (ms2 spectrum file) source("https://raw.githubusercontent.com/jorainer/xcms-gnps-tools/master/customFunctions.R") filteredMs2Spectra <- featureSpectra(processed_Data, return.type = c("MSpectra","list")) filteredMs2Spectra <- clean(filteredMs2Spectra, all = TRUE) filteredMs2Spectra <- formatSpectraForGNPS(filteredMs2Spectra) writeMgfData(filteredMs2Spectra, "ms2spectra_all.mgf") #Get MS1 data & generate MS1 data table featuresDef <- featureDefinitions(processed_Data) featuresIntensities <- featureValues(processed_Data, value = "into") dataTable <- merge(featuresDef, featuresIntensities, by=0, all=TRUE) dataTable <- dataTable[, !(names(dataTable) %in% c("peakidx"))] head(dataTable) write.table(dataTable, "xcms_all.txt", sep = "\t", quote = FALSE, row.names = FALSE) ``` 1. Prepare MS1 peak list Please follow this formate as bellow: - **Column 1: Metabolites feature ID, header mast be “M_feature”.** - **Column 2: precursor ion *m/z***, header mast be “mz”. - **Column 3:** retention time (sec), header mast be “rt”. ![Prepare MS1 peak list](https://purple-cold-033.notion.site/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F3bbb6125-1f4c-4a9e-8239-419e9cd63397%2Fdf3ffc35-4985-4242-b0a7-980d8e473b9d%2FUntitled.png?table=block&id=45b9d7a7-5737-4090-b62b-37a792e6b679&spaceId=3bbb6125-1f4c-4a9e-8239-419e9cd63397&width=870&userId=&cache=v2) # 4. MS/MS search ## 4.1 Fuzzy search You can simply enter keywords in the input box for searching. Currently, it supports compound names, molecular formulas, InChI keys, and precursor *m/z*. Press Enter or click on the search icon to initiate the search. ![Screenshot 2023-11-23 at 12.01.34 AM.png](https://purple-cold-033.notion.site/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F3bbb6125-1f4c-4a9e-8239-419e9cd63397%2Fcc7f24f8-9f65-48bc-a5ea-f7fb86e5af03%2FScreenshot_2023-11-23_at_12.01.34_AM.png?table=block&id=962f85f4-131a-44ed-aeb7-05b4d2af457c&spaceId=3bbb6125-1f4c-4a9e-8239-419e9cd63397&width=1340&userId=&cache=v2) ## 4.2 MS/MS spectrum search This website provides a spectrum matching function that requires entering precursor m/z and MS2 spectrum for searching. The website also offers default parameters for reference. 1. **Compound Name:** Please enter text; the search supports searching for compounds starting from the beginning. For example, you can search for "tetracycline" using keywords like "tetra" or "tet”. 2. **Formula**: Please enter text and numbers; the search supports searching for formulas starting from the beginning. For example, you can search for "C22H24N2O8" using keywords like "C22H24N2" or "C22H24”. 3. **Exact mass**: Please enter a numeric value for monoisotopic mass (Da). The exact mass, maximum, and minimum values will be calculated based on the MS tolerance. 4. **Precursor *m/z***: Please enter a numeric value for the precursor ion (*m/z*). The maximum and minimum values will be calculated based on the MS tolerance. 5. **MS tolerance**: Please enter a numeric value, with the unit options of ppm or Da. 6. **Charge:** Please choose from All / positive / negative. 7. **MS2 spectrum:** LC-MS/MS spectrum, formate need provide m/z:abundance(%). 8. **MS/MS tolerance:** MS2 spectrum similarity search between experiment and library. 9. **MS/MS similarity tolerance**: Please enter a numeric value between 0 and 1, where 1 represents a full match. The default value is set to 0.5. 10. **Similarity score weight (Forward & Reverse)** : Please enter values between 0 and 1. The sum of the two values must be 1. The default parameters for both values are set to 0.5. 11. **Similarity algorithm**: Selection of spectrum similarity algorithm, currently offering Dot product (DP) and Intensity deviation. ![4.2 MS/MS spectrum search](https://purple-cold-033.notion.site/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F3bbb6125-1f4c-4a9e-8239-419e9cd63397%2Fcc7f24f8-9f65-48bc-a5ea-f7fb86e5af03%2FScreenshot_2023-11-23_at_12.01.34_AM.png?table=block&id=962f85f4-131a-44ed-aeb7-05b4d2af457c&spaceId=3bbb6125-1f4c-4a9e-8239-419e9cd63397&width=1340&userId=&cache=v2) ## 4.3 Multiple MS/MS search ### 4.3.1 Data preparation Currently, this website supports the mgf files exported from XCMS, providing functionality for online matching and batch matching against the database using MS1 peak list file + MS2 spectrum. Upon completion of the task, the website will provide a URL for you to download the matching results. Please refer to Section 3 Data Preparation or demo data as the data source. 1. Upload files. 2. Input parameters and submit. 3. Go to the Task View page to check the task status. ### 4.3.2 File upload 1. **MS1 peak list** : required, file format must be CSV. Refer to Section 3 for the internal data format specifications. 2. **MS2 spectrum file**: required, file format must be MGF. Refer to Section 3 for the internal data format specifications. 3. **MS2 spectrum data source:** file preprocessing method and data format. 4. **Contact mail**: Notification mail will be sent after the task is completed. ### 4.3.3 Parameter list: 1. **MS1 & MS2 pair parameter**: Please enter a numeric value. This is the parameter for matching MS1 peaks with MS2 spectra, with a maximum value provided up to 100 ppm or sec. The m/z tolerance unit is ppm, and the RT tolerance unit is seconds (sec). 2. **MS/MS search parameter**: Please enter a numeric value for MS1 peak & MS2 spectrum similarity search between experiment and library. 3. **Similarity score weight (Forward & Reverse)** : Please enter values between 0 and 1. The sum of the two values must be 1. The default parameters for both values are set to 0.5. 4. **Similarity algorithm**: Selection of spectrum similarity algorithm, currently offering Dot product (DP) and Intensity deviation. 5. **MS/MS similarity tolerance:** Please enter a numeric value between 0 and 1, where 1 represents a full match. The default value is set to 0.5.

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully