Code Monkey home page Code Monkey logo

corna's People

Contributors

ankur-agrawal-elucidata avatar nikita1093 avatar phanimahesh avatar raaisakuk avatar saba-wasim avatar sininagp avatar tyagi-harshit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

ankur09011

corna's Issues

Auto-detect indistinguishable isotopes are being detected but not corrected for correctly

Try running this file
auto_detect_indistinguish_dual_label copy.txt

For Glutathione the expected output is:
40% unlabeled and 60% 13C-3 15N-1 which I get if I give the indistinguishable isotopes manually i.e. {'C': ['H','O'], 'N':['S']}

But not with auto-detect. The reason being this function:

def make_correction_matrix(trac_atom, formuladict, na_dict, indist_elems):
"""create matrix M such that Mx=y where y is the observed isotopic distribution
and x is the expected distribution of input labels

atom_bag: dict of element:number of atoms in molecule (e.g. {'C':2,'O':1,'H':6})
label_elem: element with input labeling
indist_elems: elements with identical mass shift
na_dict: dict of element:expected isotopic distribution
:TODO This function relates to issue NCT-247. Need to change the function
in more appropriate way.
"""
M = make_expected_na_matrix(formuladict.get(trac_atom, 0), na_dict[trac_atom])
for e in indist_elems:
    if e in formuladict:
        e1 = ISOTOPE_NA_MASS[KEY_ELE][e]
        M = add_indistinguishable_element(M, formuladict[e1], na_dict[e])
return pinv(M)

So, the if statement would reject indistinguishable isotopes like 'O17','O18' and 'S33' because these won't be in the formula. And I tested it is giving the same result as what you would get if manual input was 'C':['H'] because 'H' remains the same in both cases.

Make validation consistent across the package

Currently, one workflow is using olmonk and other some inbuilt validation. If olmonk is to be used across everything, it should be made optional such that if the user doesn't have olmonk, it doesn't stop the workflow only stops the validation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.