Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions job/magma/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def run_scenario(self, scenario, time_limit=None):

class MsDataEngine(object):

""" Engine to read MS/MS data """
""" Engine to read LC-MS/MS data """

def __init__(self, db_session, ionisation_mode, abs_peak_cutoff, mz_precision, mz_precision_abs,
precursor_mz_precision, max_ms_level, call_back_url=None):
Expand Down Expand Up @@ -825,7 +825,7 @@ def mass_from_formula(self, form):

class AnnotateEngine(object):

""" Engine to perform MAGMa annotation of the MS/MS data based candidate molecules present
""" Engine to perform MAGMa annotation of the LC-MS/MS data based candidate molecules present
or retrieved from a chemical database """

def __init__(self, db_session, skip_fragmentation, max_broken_bonds, max_water_losses,
Expand Down Expand Up @@ -1301,7 +1301,7 @@ def query_on_mim(self, low, high, charge):

def check_inchi(self, mim, inchikey14):
""" Function to look up uploaded structures in PubChem based on inchikey. Returns refscore and reference.
Only available if PubChem database is installed locally"""
Only available if PubChem database is installed locally"""
if config.getboolean('magma job', 'structure_database.online'):
return False
self.c.execute('SELECT cid,name,refscore FROM molecules WHERE charge IN (-1,0,1) AND mim between ? and ? and inchikey = ?',
Expand Down Expand Up @@ -1335,7 +1335,7 @@ def __init__(self, dbfilename='', max_64atoms=False, online=True):
self.conn = sqlite3.connect(dbfilename)
self.conn.text_factory = str
self.c = self.conn.cursor()

def query_online(self, low, high, charge):
r = requests.post(self.service, data=json.dumps([low, high, charge, True]))
try:
Expand Down Expand Up @@ -1421,7 +1421,7 @@ def export_molecules(self, output_format='sdf', filename=None, columns=None, sor
if column[:1] != '_' and column != 'mol' and column != 'metadata' and column != 'fragments' and column != 'smiles':
file.write(' ' + column + '=' + str(molecule.__getattribute__(column)).replace(" ","_"))
file.write('\n')

file.close()

def export_assigned_molecules(self, filename=None):
Expand Down
6 changes: 3 additions & 3 deletions job/magma/script/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(self):
sc = subparsers.add_parser("read_ms_data", help=self.read_ms_data.__doc__, description=self.read_ms_data.__doc__)
sc.add_argument('-z', '--description', help="Description of the job (default: %(default)s)", default="",type=str)
# read_ms_data arguments
sc.add_argument('ms_data', type=str, help="file with MS/MS data")
sc.add_argument('ms_data', type=str, help="file with LC-MS/MS data")
sc.add_argument('-f', '--ms_data_format', help="MS data input format (default: %(default)s)", default="mzxml", choices=["mzxml", "mass_tree","form_tree_pos","form_tree_neg","mgf"])
sc.add_argument('-i', '--ionisation_mode', help="Ionisation mode (default: %(default)s)", default="1", choices=["-1", "1"])
sc.add_argument('-m', '--max_ms_level', help="Maximum MS level to be processsed (default: %(default)s)", default=10,type=int)
Expand Down Expand Up @@ -93,7 +93,7 @@ def __init__(self):
sc = subparsers.add_parser("light", help=self.annotate.__doc__, description=self.light.__doc__)
sc.add_argument('-z', '--description', help="Description of the job (default: %(default)s)", default="",type=str)
# annotate arguments
sc.add_argument('ms_data', type=str, help="file with MS/MS data")
sc.add_argument('ms_data', type=str, help="file with LC-MS/MS data")
sc.add_argument('-f', '--ms_data_format', help="MS data input format (default: %(default)s)", default="mass_tree", choices=["mass_tree","form_tree_pos","form_tree_neg","mgf"])
sc.add_argument('-i', '--ionisation_mode', help="Ionisation mode (default: %(default)s)", default="1", choices=["-1", "1"])
sc.add_argument('-e', '--output_format', help="Output format for ranked compound list (default: %(default)s)", default="smiles", choices=["smiles","sdf"])
Expand Down Expand Up @@ -130,7 +130,7 @@ def get_magma_session(self, db, description="",log='warn'):
def init_db(self,args):
"""Initialize database"""
return self.get_magma_session(args.db,"")

def light(self, args):
"""
This option runs all MAGMa components in one go to generate a ranked list of compounds (smiles of SDF) for a single spectrum/spectral tree.
Expand Down
2 changes: 1 addition & 1 deletion web/magmaweb/static/app/view/scan/UploadFieldSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Ext.define('Esc.magmaweb.view.scan.UploadFieldSet', {
}, {
name: 'ms_data_file',
xtype: 'filefield',
emptyText: 'Upload MS/MS data file',
emptyText: 'Upload LC-MS/MS data file',
anchor: '75%'
}, {
xtype: 'displayfield',
Expand Down
4 changes: 2 additions & 2 deletions web/magmaweb/templates/help.mak
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<h1>MAGMa Help page</h1>
<h2 id="home">Home page</h2>
The home page enables to run a new MAGMa job. This requires three types of input:
<h3 id="msdata">MS Data</h3>
MS Data can be imported, either as file or via the text field, as:
<h3 id="msdata">LC-MS/MS Data</h3>
LC-MS/MS Data can be imported, either as file or via the text field, as:
<ul>
<li>mzXML: a public dataformat that can be generated with
<ul>
Expand Down
2 changes: 1 addition & 1 deletion web/magmaweb/templates/home.mak
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Ext.onReady(function() {
margin: 5
},
items:[{
title: 'MS Data',
title: 'LC-MS/MS Data',
xtype : 'uploadmsdatafieldset',
flex: 1,
minHeight: 490,
Expand Down