Skip to content

Commit

Permalink
Merge pull request #705 from CCMS-UCSD/network-id-fix-fbmn
Browse files Browse the repository at this point in the history
[FBMN] Top K sorting to make sure top hit gets in the graphml Network
  • Loading branch information
mwang87 authored Mar 19, 2021
2 parents 2dac050 + d09904f commit 8a0c7fa
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion feature-based-molecular-networking/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ include ../Makefile.deploytemplate

WORKFLOW_NAME=feature-based-molecular-networking
TOOL_FOLDER_NAME=feature-based-molecular-networking
WORKFLOW_VERSION=release_28
WORKFLOW_VERSION=release_28.1
WORKFLOW_DESCRIPTION='Feature-Based Molecular Networking (FBMN) is a computational method that bridges popular mass spectrometry data processing tools for LC-MS/MS and molecular networking analysis on GNPS. The supported tools are: MZmine, OpenMS, MS-DIAL, MetaboScape, XCMS, Progenesis QI, and the mzTab-M format. FBMN facilitates the detection of isomers that are separated by chromatographic or ion mobility separation, and provides accurate ion abundances for statistical analysis. Note that FBMN requires processing the mass spectrometry data with a feature detection and alignment tool. For rapid/qualitative analysis, we recommend using classical molecular networking that accepts unprocessed mass spectrometry files. See the FBMN documentation at https://ccms-ucsd.github.io/GNPSDocumentation/featurebasedmolecularnetworking and refer to the "Method and Citation for Manuscripts" on the results page for citations.'
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@
</parsers>
</data>

<parameter name="URLBASE" value='https://view.qiime2.org/?src=https%3A%2F%2Fapp.cors.bridged.cc%2Fhttps%3A%2F%2Fgnps.ucsd.edu%2FProteoSAFe%2FDownloadResultFile%3Ftask%3D[task]%26file%3Dqiime2_output%252Fqiime2_emperor.qzv%26block%3Dmain'/>
<parameter name="URLBASE" value='https://view.qiime2.org/?src=https%3A%2F%2Fcors.bridged.cc%2Fhttps%3A%2F%2Fgnps.ucsd.edu%2FProteoSAFe%2FDownloadResultFile%3Ftask%3D[task]%26file%3Dqiime2_output%252Fqiime2_emperor.qzv%26block%3Dmain'/>
</block>

<view id="view_qiime2_emperor_biplot" label="View qiime2 Emperor Bi-Plots" group="Advanced Views - qiime2 Views">
Expand All @@ -626,7 +626,7 @@
</parsers>
</data>

<parameter name="URLBASE" value='https://view.qiime2.org/?src=https%3A%2F%2Fapp.cors.bridged.cc%2Fhttps%3A%2F%2Fgnps.ucsd.edu%2FProteoSAFe%2FDownloadResultFile%3Ftask%3D[task]%26file%3Dqiime2_output%252Fqiime2_biplot_emperor.qzv%26block%3Dmain'/>
<parameter name="URLBASE" value='https://view.qiime2.org/?src=https%3A%2F%2Fcors.bridged.cc%2Fhttps%3A%2F%2Fgnps.ucsd.edu%2FProteoSAFe%2FDownloadResultFile%3Ftask%3D[task]%26file%3Dqiime2_output%252Fqiime2_biplot_emperor.qzv%26block%3Dmain'/>
</block>

<view id="download_emperor_data" label="Download qiime2 Emperor qzv" group="Advanced Views - qiime2 Views">
Expand Down
2 changes: 1 addition & 1 deletion metabolomics-snets-v2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ include ../Makefile.deploytemplate

WORKFLOW_NAME=metabolomics-snets-v2
TOOL_FOLDER_NAME=metabolomicsnetsv2
WORKFLOW_VERSION=release_28
WORKFLOW_VERSION=release_28.1
WORKFLOW_DESCRIPTION="Molecular networks are visual displays of the chemical space present in tandem mass spectrometry (MS/MS) experiments. This visualization approach can detect sets of spectra from related molecules (molecular networks), even when the spectra themselves are not matched to any known compounds. Classical molecular networking is well suited for discovery and can be analyzed directly from raw mass spectrometry files. Feature-based Molecular Networking (FBMN) is better when quantification analysis is necessary, but requires preprocessing with feature finding tools."

2 changes: 1 addition & 1 deletion metabolomics-snets-v2/metabolomics-snets-v2/result.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1636,7 +1636,7 @@
</parsers>
</data>

<parameter name="URLBASE" value='https://view.qiime2.org/?src=https%3A%2F%2Fapp.cors.bridged.cc%2Fhttps%3A%2F%2Fgnps.ucsd.edu%2FProteoSAFe%2FDownloadResultFile%3Ftask%3D[task]%26file%3Dqiime2_output%252Fqiime2_emperor.qzv%26block%3Dmain'/>
<parameter name="URLBASE" value='https://view.qiime2.org/?src=https%3A%2F%2Fcors.bridged.cc%2Fhttps%3A%2F%2Fgnps.ucsd.edu%2FProteoSAFe%2FDownloadResultFile%3Ftask%3D[task]%26file%3Dqiime2_output%252Fqiime2_emperor.qzv%26block%3Dmain'/>
</block>

<view id="download_emperor_data" label="Download qiime2 Emperor qzv" group="Advanced Views - qiime2 Views">
Expand Down
9 changes: 9 additions & 0 deletions shared_code/molecular_network_filtering_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import networkx as nx
import constants_network as CONST

import pandas as pd

def loading_network(filename, hasHeaders=False, edgetype="Cosine"):
node1_list = []
node2_list = []
Expand Down Expand Up @@ -239,6 +241,13 @@ def add_clusterinfo_summary_to_graph(G, cluster_info_summary_filename):

def add_library_search_results_to_graph(G, library_search_filename, annotation_prefix=""):
row_count, table_data = ming_fileio_library.parse_table_with_headers(library_search_filename)

# sort in reverse match score order
try:
table_data = sorted(table_data, key=lambda x: float(x["MQScore"]), reverse=False)
except:
pass


for i in range(row_count):
cluster_index = table_data["#Scan#"][i]
Expand Down

0 comments on commit 8a0c7fa

Please sign in to comment.