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

Add list manipulation features #56

Open
yochannah opened this issue Jun 13, 2019 · 3 comments
Open

Add list manipulation features #56

yochannah opened this issue Jun 13, 2019 · 3 comments

Comments

@yochannah
Copy link
Member

Unless I've missed it, there doesn't appear to be any inbuilt way to handles lists, e.g.

  • fetch a list by name
  • save a list
  • Perform list ops like difference, subtract, intersect, etc.
  • delete lists
  • get a list of lists

Referring to http://intermine.org/intermine-ws-python/intermine.lists.html#module-intermine.lists.listmanager might help to selec useful methods and gain parity for our packages

@yochannah
Copy link
Member Author

Fetching list contents can be worked around with a query like this:

# Fetch a public Gene list from HumanMine
# Create a new query
Pax6List = newQuery(
  #here we're choosing which columns of data we'd like to see
  view = c("Gene.primaryIdentifier",
           "Gene.symbol"))

# constrain genes to be in our (pre-existing) list
listConstraint = setConstraints(
  paths = c("Gene"),
  operators = c("IN"),
  values = list("PL_Pax6_Targets")
)

# add constraint to the query
Pax6List$where <- listConstraint

# Now we have the query set up the way we want, let's actually *run* the query! 
pax <-  runQuery(im = im, qry = Pax6List)

#preview the data
head(pax)

@yochannah
Copy link
Member Author

I've added the Hacktoberfest label to this issue - in order to implement methods that manipulate lists you'll probably want to look at the python package mentioned above, as well as these python tutorials: https://github.com/intermine/intermine-ws-python-docs/ (especially tutorial 8)

Other resources that are likely to be useful:

if you want to pick up this task

  1. Take a look at the InterMine contributing guidelines
  2. Comment on this issue stating that you intend to work on the task
  3. When you're ready, add your work to the repo and create a pull request.

What to do if you need help

Mention @yochannah, tweet @yoyehudi, pop by to say hi on chat or if needed email [email protected]. Don't forget we're usually only available during uk office hours and will not be able to respond at other times :)

@yochannah
Copy link
Member Author

@celions is currently working on this task 🚀

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

No branches or pull requests

1 participant