Skip to content

Merge intermine-bio package into intermine-ws-python package #12

Open

Description

@julie-sullivan

We have an intermine-bio package. Why?

https://github.com/intermine/intermine-ws-bio-python

I don't see a utility in keeping these separate. Just making another dependency. (@justinccdev may disagree?).

Let's merge the functionality into the main intermine package and delete this repo.

What does the bio package do? Here are the docs:

# Get all sequences for proteins on "h", "r", "eve", "bib" and "zen":

    from intermine.webservice import Service
    from interminebio import SequenceQuery

    s = Service("www.flymine.org/query")
    q = SequenceQuery(s, "Gene")

    syms = ["h", "r", "eve", "bib", "zen"] 

    print q.select_sequence("proteins").where(s.model.Gene.symbol == syms).fasta()

# Process the locations of these genes one at a time:

    for line in q.select_sequence("Gene").where(s.model.Gene.symbol == syms).bed():
        process(line)

Here are the end points it uses:

query/fasta
query/gff
query/ned
  • region search (already available in main client?)
    LIST_PATH = "/regions/list"
    BED_PATH = "/regions/bed"
    FASTA_PATH = "/regions/fasta"
    GFF3_PATH = "/regions/gff3"

TODO

  1. copy over init and iterators files
  2. rename them something bio specific (I think we want a bio directory?)
  3. write tutorial
  4. test!

Activity

  1. changed the title [-]Merge in intermine-bio into intermine[/-] [+]Merge intermine-bio [/+] on Jun 7, 2018
  2. changed the title [-]Merge intermine-bio [/-] [+]Merge intermine-bio package into intermine-ws-python package[/+] on Oct 23, 2019
  3. yochannah commented on Oct 23, 2019

    @yochannah
    Member

    I've added the hacktoberfest label to this issue. Note it's probably better to get started by trying some of the other hacktoberfest issues on this repo before you try this one.

  4. mbasil09 commented on Dec 22, 2019

    @mbasil09
    Contributor

    @yochannah
    I would like to try this.

  5. yochannah commented on Dec 23, 2019

    @yochannah
    Member

    @mbasil09 Amazing - please go ahead! 😻

  6. mbasil09 commented on Dec 27, 2019

    @mbasil09
    Contributor

    @yochannah
    I think somewhere along the line the code in interminebio has been changed so much that it doesn't comply with the one in the main intermine repository. I tried changing it to python3, stil no luck.
    I believe that the links that it tries to open have been updated, which raise errors.

    I'll still try to pinpoint those errors and try to fix them.

  7. yochannah commented on Dec 27, 2019

    @yochannah
    Member

    that sounds possible, and also like a really good reason to get it merged back into the main package. Thank you so much for tackling this! 😍

  8. mbasil09 commented on Dec 31, 2019

    @mbasil09
    Contributor

    @yochannah
    Any idea where the fasta or bed or gf3 files are stored.
    The URLs used in interminebio are expired and give error404.

  9. yochannah commented on Dec 31, 2019

    @yochannah
    Member

    @mbasil09 I can probably find them - where in interminebio are the broken links?

  10. mbasil09 commented on Dec 31, 2019

    @mbasil09
    Contributor

    @yochannah
    It tries to open this link (which doesn't exist):
    http://www.flymine.org/query/service/check/query.fasta

    it's in this file in the interminebio repository:
    interminebio/iterators.py (Line 92)

  11. mbasil09 commented on Dec 31, 2019

    @mbasil09
    Contributor

    It happens on running this code (taken from the docs of interminebio):

    from intermine.webservice import Service
    from interminebio import SequenceQuery
    s = Service("www.flymine.org/query")
    q = SequenceQuery(s, "Gene")
    syms = ["h", "r", "eve", "bib", "zen"]
    q=q.select_sequence("proteins").where(s.model.Gene.symbol == syms)
    print(q.fasta())

  12. yochannah commented on Dec 31, 2019

    @yochannah
    Member

    right, I see!

    Try taking a look at iodocs (click on flymine) - I suspect it's looking for the gff and fasta endpoints

    http://iodocs.apps.intermine.org/

  13. yochannah commented on Dec 31, 2019

    @yochannah
    Member

    @mbasil09 I also have a confession to make - I'm not sure how to install intermine bio to test it myself! It doesn't have install docs I can see (sigh) and best guess was to clone it then run python setup.py - do you mind me asking what you did to get it working?

  14. mbasil09 commented on Dec 31, 2019

    @mbasil09
    Contributor

    I couldn't get it to install either, the only workaround I found till now was to use it from the cloned directory. We are able to import all the methods from the interminebio directory.
    Also, all of it is written in python2, so you might want to convert it to python3.

  15. yochannah commented on Dec 31, 2019

    @yochannah
    Member

    I think that's a good idea - today's literally the day that python 2 retires 🤣

    https://pythonclock.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions