Commit 2b9d1b04 authored by Loraine Gueguen 's avatar Loraine Gueguen
Browse files

fix OGS feature count when no genes but mRNA

parent 2b24c442
......@@ -160,8 +160,7 @@ 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));
print_r($counts)
if (count($counts) == 0) {
if (!$counts->rowCount()) {
$counts = chado_query($csql, array(':term' => $mRNA_term));
}
foreach ($counts as $count) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment