Hi BASE coders,
I can't seem to be able to count the number of distinct reporters on a
particular array through the API, although it seems efficient enough with raw
MySQL:
select count(distinct r.external_id) as count from Reporters r left join
Features f on (r.id = f.reporter_id) left join ArrayDesignBlocks adb on
(f.arraydesignblock_id=adb.id) left join ArrayDesigns ad on
(adb.arraydesign_id = ad.id) where (ad.name = "Array name here");
+-------+
| count |
+-------+
| 19805 |
+-------+
1 row in set (0.36 sec)
I tried this, but there's no "group by" possible on a DataQuery
(I'm getting and UnsupportedOperationException)
DataQuery<FeatureData> featQuery = baseArray.getFeatures();
featQuery.include(Include.SHARED);
featQuery.join(Hql.innerJoin("reporter", Item.REPORTER.getAlias()));
featQuery.group(Hql.property(Item.REPORTER.getAlias(), "externalId"));
count = featQuery.count(dc);
I also tried going from the other direction (from Reporter.getQuery()), but
you can't join to 'features' it seems.
Am I missing something?
(Obviously we have to treat Affy differently, but that's easy enough as
getNumFeatures() is suitable.)
many thanks,
Bob.
--
Bob MacCallum | VectorBase Developer | Kafatos/Christophides Groups |
Division of Cell and Molecular Biology | Imperial College London |
Phone +442075941945 | Email [EMAIL PROTECTED]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
basedb-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/basedb-devel