[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
Description
Currently the chart type (i.e. violin vs. histogram) is controlled by whether the unit is qualitative or quantitative. For example, the data for stem pigmentation measured with a scale 1-3 (qualitative) will show as a histogram and the same trait measured with a greenseeker (quantitative) will show as a violin.
However, there are other cases where you may prefer one chart type over another. For example, if there is only a single site-year (histogram) or the data is clearly bimodal (Violin). Thus we need a way to decouple the chart type from the unit.
Dependencies
NONE
Testing?
[x] I tested on a generic Tripal Site
[x] I tested on a KnowPulse Clone
[ ] This PR includes automated testing
Switch to the branch on your development site.
Run updates: Admin toolbar > House > Run Updates
Check the database: SELECT * FROM analyzedphenotypes_collections;. The table should exist and be populated with one record for every unique trait/method/unit/project combination.
Run `the following query. The chart_type should be multibar for qualitative traits and violin for quantitative.
SELECT coll.*, prop.value as data_type
FROM analyzedphenotypes_collections coll
LEFT JOIN chado.cvtermprop prop ON prop.cvterm_id=coll.unit_id;
Go to the trait distribution chart for a given data collection using the following URL template: [yoursite]/phenotypes/trait-distribution/[project_id]/[trait_id]/[method_id]/[unit_id]. Check the chart type matches that specified in the table.
Change the chart_type in the table and check the chart type changes as well.
UPDATE analyzedphenotypes_collections
SET chart_type='violin'
WHERE collection_id=5;
Metadata
Documentation:
Description
Currently the chart type (i.e. violin vs. histogram) is controlled by whether the unit is qualitative or quantitative. For example, the data for stem pigmentation measured with a scale 1-3 (qualitative) will show as a histogram and the same trait measured with a greenseeker (quantitative) will show as a violin.
However, there are other cases where you may prefer one chart type over another. For example, if there is only a single site-year (histogram) or the data is clearly bimodal (Violin). Thus we need a way to decouple the chart type from the unit.
Dependencies
NONE
Testing?
SELECT * FROM analyzedphenotypes_collections;
. The table should exist and be populated with one record for every unique trait/method/unit/project combination.[yoursite]/phenotypes/trait-distribution/[project_id]/[trait_id]/[method_id]/[unit_id]
. Check the chart type matches that specified in the table.