intermine / InterMineR

R package for InterMine
GNU Lesser General Public License v2.1
18 stars 16 forks source link

Add list manipulation features #56

Open yochannah opened 5 years ago

yochannah commented 5 years ago

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

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 commented 5 years ago

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 commented 5 years ago

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 yo@intermine.org. Don't forget we're usually only available during uk office hours and will not be able to respond at other times :)

yochannah commented 4 years ago

@celions is currently working on this task 🚀