Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Alexander Lenail
    @zfrenchee
    in the first place
    What do you think?
    Jan Rudolph
    @jdrudolph
    you are correct. the ontology is hierarchical, therefore terms need to be propagated up the DAG. If you download the annotations for GO, you get only the most specific annotations for each gene, making the propagation necessary.
    Non-hierarchical annotations, such as KEGG, do not include a propagation step.
    You could put all the information into a pd.DataFrame, which will make it quite big, but I don't see the use case for having it in a pd.DataFrame.
    Propagation is straight forward in the graph. Generating a pd.DataFrame from the results shouldn't be difficult.
    Alexander Lenail
    @zfrenchee
    In the readme: why rst instead of md?
    Also, I would be interested in adding a datafile in the git repo (gene2go with gene symbols), but that would be the first datafile in the repo, and if you think that would be messy we can skip it
    Alexander Lenail
    @zfrenchee
    Would you be willing to launch 1.7.0 to pypi btw?
    Jan Rudolph
    @jdrudolph
    readme: .rst is the format supported by pypi.org. I don't known if this still is the only supported format.
    I would rather not add data files, such as gene2go, to the repo. I believe users should be encouraged to download the latest versions from entrez/uniprot/go/kegg etc. Why would you want to add it to the repo?
    I just pushed 1.7.0 to pypi. Thanks again for the contribution!
    Alexander Lenail
    @zfrenchee
    I performed a mapping of entrez to gene symbols -- which I feel could be useful to others, but you're right, having the latest version is more important
    and keeping data out of the repo is cleaner
    thanks for pushing 1.7!
    Jan Rudolph
    @jdrudolph
    you could just add the script to do the mapping to the repository
    Alexander Lenail
    @zfrenchee
    that's a good point, but it's a jupyter notebook right now. Even so...
    Jan Rudolph
    @jdrudolph
    haha, I always have a hard time trying not to end up with spaghetti code when I use the notebook... ;-)
    Alexander Lenail
    @zfrenchee
    ;)
    Alexander Lenail
    @zfrenchee
    Hi @jdrudolph ! I'm getting more curious about GO, and I was hoping you might help me with a couple questions
    First, I want to get all the leaf terms
    But I'm having a hard time with networkx
    second, I'd love to draw a picture of the entire ontology
    so I can just look at it for a long time
    I know such a photo would be very wide and maybe ~1GB in size
    but I'd love to make it anyways. Let me know if you have ideas!
    Jan Rudolph
    @jdrudolph
    leafs should be easy to get. First construct the GO ontology graph with goenrich. Then calculate node out-degrees with https://networkx.github.io/documentation/networkx-1.10/reference/generated/networkx.DiGraph.out_degree.html.
    All nodes with out-degree 0 are leafs.
    wouldn't know how to plot the entire ontology in any meaningful way though... you could export the networkx graph to .dot https://networkx.github.io/documentation/networkx-1.10/reference/generated/networkx.drawing.nx_agraph.write_dot.html
    then use graphviz to generate the layout/picture
    let me know if you manage to get some nice visualization
    Alexander Lenail
    @zfrenchee
    it was in_degree because the ontology is "backwards"
    Alexander Lenail
    @zfrenchee
    Hello Jan! I'm trying to write the GO obo graph generated by networkx to graphml
    and I'm running into a problem having to do with the way the graph is rooted
    Alexander Lenail
    @zfrenchee
    how would i go about getting just one of the subgraphs?
    did you add the O.graph attribute? It doesn't look like nx.DiGraphs come with an nx.DiGraph.graph ?
    Alexander Lenail
    @zfrenchee
    and what direction do the edges point after you do O.reverse() towards the root or towards the leaves? I think towards the root, right?
    actually looks like towards the edges?
    Alexander Lenail
    @zfrenchee
    Okay, I think I got the first part
    Check out GO:
    Screen Shot 2017-11-10 at 11.57.57 PM.png
    Kind of funny looking!
    I wonder which is which
    Jan Rudolph
    @jdrudolph
    Alexander Lenail
    @zfrenchee
    That function doesn't work for DiGraphs (directed graphs)
    =(
    but no worries I solved it
    Alexander Lenail
    @zfrenchee
    @jdrudolph ! I've been working on GO Enrichment again lately
    would you be willing to share your email / shoot me an email at lenail@mit.edu to discuss a project I want to propose to you?
    Jan Rudolph
    @jdrudolph
    👍