NLeSC / MAGMa

eMetabolomics project: Mass Annotation based on in silico Generated Metabolites
http://www.emetabolomics.org
Apache License 2.0
14 stars 6 forks source link

Modify Reactions column in molecules grid #208

Closed ridderl closed 10 years ago

ridderl commented 10 years ago

Example:

Clicking will filter metabolites on molecules which are products of rule1.

sverhoeven commented 10 years ago

I need some clarifications on the numbers and what clicking should do. The example is the column content shown for a molecule row. Let's say the molecule has metid 3 and Rule1 is 'esterase'.

ridderl commented 10 years ago
sverhoeven commented 10 years ago

In issue208 branch there is now functionality for filtering molecules on reactions.

In the column header filter you can filter on:

sverhoeven commented 10 years ago

The Reaction column is now rendered from json.

To use the metabolites.reactionsequence column in results.db must be refilled. This can be done with web/magmaweb/models.py:fill_molecules_reactionsequence() with:

    from magmaweb.job import JobFactory
    factory = JobFactory('data/jobs')
    session = factory._makeJobSession('58f05077-aad8-4fc9-a497-310495ab8b62')
    from magmaweb.models import fill_molecules_reactionsequence
    fill_molecules_reactionsequence(session)
sverhoeven commented 10 years ago

To update job result databases use:

cd web
pip install alembic
for x in `ls data/jobs` ; do echo $x;alembic -x jobid=$x upgrade head; done
sverhoeven commented 10 years ago

The reaction filter can give zero results because of other filters like nhits>1 and scanid.

The Failed to load fragments from server error is back. When a scan has been selected and then selecting a reaction (which has molecules with a scan) will give the error.

sverhoeven commented 10 years ago

Errors occurs only when reaction has 1 molecule as target. Before click a scan and molecule are selected, after click same scan is still selected, but another molecule is selected which did not form fragments on selected scan.

Solution: Scan markers are filled check if previously selected scan is absent then unselect scan