[InterMine Dev] one last list operator

Joel Richardson Joel.Richardson at jax.org
Wed Aug 21 17:58:31 BST 2013

Hi devs,

I'd like to request one more (last??) list operator: type narrowing. Use case: I have a saved list of SequenceFeatures, and I'd like to plug them into a template, but the template expects Genes. It would be nice if the template would allow me to plug in my  list of SequenceFeatures anyway, and take just the genes (implicit narrowing). Generically, a template that expects type T shows/accepts lists of type T, any subtype of T, and any supertype of T. Plugging in a supertype list automatically and implicitly filters the list to just the T (and subtype) objects.

Just for kicks, I hand-rolled a query in xml with a root class == Gene. I added the constraint that the genes were in a list, and I plugged in the name of a SequenceFeature list. It ran just fine and gave the expected results: non-genes were weeded out, and the results were properly typed as genes. In other words, implicit narrowing already works! The supertype lists just have to be included in the drop down.

Alternatively (or in addition?), one could provide an explicit narrowing operator. The user specifies a list (of type T), a subtype S, and a name; the result is a new list (of type S) containing the S objects of the original list.


Joel E. Richardson, Ph.D.
Sr. Research Scientist
Mouse Genome Informatics
The Jackson Laboratory
600 Main Street
Bar Harbor, Maine 04609
joel.richardson at jax.org

The information in this email, including attachments, may be confidential and is intended solely for the addressee(s). If you believe you received this email by mistake, please notify the sender by return email as soon as possible.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.intermine.org/pipermail/dev/attachments/20130821/aa6a1ffd/attachment.html>

More information about the dev mailing list