Giter Site home page Giter Site logo

Comments (6)

PauBadiaM avatar PauBadiaM commented on June 8, 2024 1

Hi @adamgayoso,

Thanks for checking out the package! This seems like a problem coming from omnipath, that instead of returning gene names it returns protein ids from Uniprot. @deeenes could you take a look?

In the meantime you could use the original csv and transform it into a long-format data-frame with df.melt() so that it can be used by decoupler.

from decoupler-py.

deeenes avatar deeenes commented on June 8, 2024 1

Those are the same cytokines but by UniProt IDs. We do this because using UniProt IDs in general is less ambiguous and thus results less data loss than using gene symbols. The footprint genes are also shown primarily by UniProts, only Decoupler removes that column as it uses gene symbols.

In the CytoSig annotations we could actually leave the gene symbols in place, or have them along with the UniProt IDs. I will also check whether we are indeed missing 7 cytokines.

from decoupler-py.

deeenes avatar deeenes commented on June 8, 2024 1

Yes @dbdimitrov, You're asking in the best moment :)

2 weeks ago I had a look into this issue, and this week I rebuilt and updated the OmniPath instance in the web service. You see above the two commits where I changed the processing of CytoSig. There were a handful of genes where the ID translation was problematic. For five cytokines with non-standard gene names, I had to adjust the translation manually. Now all cytokines are translated without ambiguity, except two, IFN1 and NO. The former is supposed to be a family of proteins, while the latter is just nitrogen-monoxide. I also included the original gene symbols in OmniPath data (cytokine_genesymbol and target_genesymbol columns), but these have the few non-standard names, e.g. Activin A. Translated cytokine gene symbols I didn't include, but it's possible to add them by translating from UniProts in the cytokine column. Let me know if I should make these available too:

library(OmnipathR)
library(dplyr)

cytosig <- 
	import_omnipath_annotations(resources = 'CytoSig', wide = TRUE) %>%
    translate_ids(cytokine = uniprot, translated_cytokine_genesymbol = genesymbol)
import omnipath
from pypath.utils import mapping

cytosig = omnipath.requests.Annotations.get(resources = 'CytoSig', wide = True)
up_gs = mapping.translation_df('uniprot', 'genesymbol')
# look at the ugly pandas syntax...
cytosig = cytosig.merge(
    up_gs,
    left_on = ['cytokine'],
    right_on = ['uniprot'],
    suffixes = ('', '_y'),
).rename(
    {'genesymbol_y': 'translated_cytokine_genesymbol'},
    axis = 1,
).drop(
    'uniprot_y',
    axis = 1,
)

With these adjustments I think we need no change in Decoupler. Among the targets there are some ambiguity, but this is what we can not avoid with gene symbols; 0.5% of the records are affected.

Note: either with OmnipathR or Python omnipath package, please don't forget to wipe the cache.

from decoupler-py.

dbdimitrov avatar dbdimitrov commented on June 8, 2024

Hey @deeenes, any update on this? :)

from decoupler-py.

dbdimitrov avatar dbdimitrov commented on June 8, 2024

Hey @deeenes,

This looks great. I will have a more detailed look these days & will come back to you in case I notice anything.

For my use case, missing IFN1& NO is not a big deal. Though I wonder if their addition (e.g. having NO map to an hmdb ID & a tupple with all uniprot IDs for IFN1) would be useful for others @PauBadiaM @adamgayoso?

I can provide you with the list of gene symbols that I had as part of the IFN1 family.

Thanks a lot!
Daniel

from decoupler-py.

deeenes avatar deeenes commented on June 8, 2024

I think CytoSig is fine already also in the web service, so I'm closing this one

from decoupler-py.

Related Issues (20)

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.