Skip to content
Snippets Groups Projects
Commit cbac9266 authored by Loraine Gueguen's avatar Loraine Gueguen
Browse files

fix OGS feature count when no genes but mRNA

parent 263fbbbd
No related branches found
No related tags found
1 merge request!1Merge upstream
......@@ -159,7 +159,10 @@ function abims_get_analyses_from_chado() {
// Fix feature_counts for structural annots
$csql = "SELECT a.analysis_id, count(af.feature_id) as feature_count FROM {analysis} a LEFT JOIN {analysisfeature} af ON a.analysis_id = af.analysis_id LEFT JOIN {feature} f ON af.feature_id = f.feature_id WHERE f.type_id=:term GROUP BY a.analysis_id ORDER BY a.name";
$counts = chado_query($csql, array(':term' => $gene_term));
$counts = chado_query($csql, array(':term' => $gene_term));
if (count($counts) == 0) {
$counts = chado_query($csql, array(':term' => $mRNA_term));
}
foreach ($counts as $count) {
if (in_array($count->analysis_id, $structural_ids)) {
$analysis_list[$count->analysis_id]->feature_count = $count->feature_count;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment