Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
julie-sullivan opened this issue Jun 7, 2018 · 13 comments
Open
Assignees
Labels
enhancement hacktoberfest contributors incredibly welcome!

Comments

@julie-sullivan
Copy link
Member

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!
@julie-sullivan julie-sullivan changed the title Merge in intermine-bio into intermine Merge intermine-bio Jun 7, 2018
@yochannah yochannah added the hacktoberfest contributors incredibly welcome! label Oct 23, 2019
@yochannah yochannah changed the title Merge intermine-bio Merge intermine-bio package into intermine-ws-python package Oct 23, 2019
@yochannah
Copy link
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.

@mbasil09
Copy link
Contributor

@yochannah
I would like to try this.

@yochannah
Copy link
Member

@mbasil09 Amazing - please go ahead! 😻

@mbasil09
Copy link
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.

@yochannah
Copy link
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! 😍

@mbasil09
Copy link
Contributor

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

@yochannah
Copy link
Member

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

@mbasil09
Copy link
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)

@mbasil09
Copy link
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())

@yochannah
Copy link
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/

@yochannah
Copy link
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?

@mbasil09
Copy link
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.

@yochannah
Copy link
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
Labels
enhancement hacktoberfest contributors incredibly welcome!
Projects
None yet
Development

No branches or pull requests

4 participants