Hi, Andrew,

Thanks for staying with FastBit.  Hope you are making good progress.

Regarding your question, here is a suggestion.

First off, you can use the metaTags field in the header of the 
-part.txt file to tell FastBit things that are associated with each 
data partition.  In your case, you might have something like

metaTags = organism="Bob", chromosome="XYZ", feature_category="exp1"

in each of your data partitions.

In your queries, you can simply add 'organism="Bob" and 
feature_category="exp1"' to the other conditions you are using.

If you are using the ibis::query class for your work, then you will 
need to iterate through all the data partitions in your own code.  In 
this case, you can use the function ibis::util::gatherParts to build a 
list of data partitions as std::vector<ibis::part*>.  This function 
takes a directory name and recursively descend into the subdirectories 
(unfortunately only on *nix type of machine that supports opendir and 
friends).

If you use ibis::table class for queries, the construction function 
ibis::table::create can take the root directory name and calls 
ibis::util::gatherParts to collect the metadata about all the data 
partitions.

Please let me know if you need more specific information.

John


On 3/2/2011 5:30 AM, Andrew Olson wrote:
> Hi,
> I have organized some partitions to hold genomic features in my file system 
> as follows:
>
> organism/chromosome/feature_category
>
> Each feature_category partition has 3 columns (lets call them position, x, 
> and y)
> I set it up this way because each query always had a fixed organism, 
> chromosome, and feature_category.  Now I want to ask more global queries 
> like: select x, count(*) where y>= 10 AND organism="Bob" AND 
> feature_category="exp1".  Is it possible to use my existing layout to create 
> a virtual table involving the partitions "Bob/*/exp1" ?  An option is to move 
> feature_category above chromosome, but there may be other queries involving 
> multiple feature_categories but only one chromosome.  Can you send some 
> example code that shows how to load multiple partitions into a virtual table?
>
> Thanks,
> Andrew
> _______________________________________________
> FastBit-users mailing list
> [email protected]
> https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users
_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

Reply via email to