Hi Ayton: I think a mart with partititioned tables in the following structure will serve your needs:
Marker [id, rsid, allele_A, alleleB] CEU_AlleleFrequency [fk_marker_id, CEU_freq] JPT_AlleleFrequency [fk_marker_id, JPT_freq] YRI_AlleleFrequency [fk_marker_id, YRI_freq] In this mart, Marker is the main table where *_AlleleFrequency are the dimension tables. This structure allows the addition of new populations as dimension tables. Keep in mind that when multiple *_freq attributes are selected, multiple tables are joined. Hence, scalability may become an issue if the number of populations is large. To arrive at this mart, you may wish to use MartBuilder. First, specify Marker as the main table. MartBuilder will merge Population and AlleleFrequency into one dimension table [id, fk_population_id, fk_marker_id, freq, population_name]. The next step is to partition this dimension table by either fk_population_id or population_name. Hope this helps. Christina ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Ayton Meintjes Sent: Wednesday, August 26, 2009 11:37 AM To: [email protected] Subject: [mart-dev] Dynamic attribute set I have the following three tables in a custom database: Population [id, name] Marker [id, rsid, allele_A, allele_B] AlleleFrequency [id, fk_population_id, fk_marker_id, freq] How would I go about creating a mart that the user can query for markers and get results in the form: rsid | CEU_freq | JPT_freq | YRI_freq rs12 | 0.05 | 0.55 | 0.75 rs34 | 0.95 | 0.65 | 0.05 In other words, the number of attributes available depends on how many unique populations there are? The automate push action and partitioning seem to suggest this sort of structure might be possible. Thanks in advance
