/** * Get KO number of metabolism clusters by an array of organism ID. * @param type $idArr * @return type */ function getMetaKOByIdArr($idArr) { $clusterArr = array(); $cegBaseArr = getCegBaseByIdArr($idArr); foreach ($cegBaseArr as $row) { if (deterCegBaseCate($row) == 1) { array_push($clusterArr, $row['access_num']); } } return getKOByCegArr($clusterArr); }
/** * Get a set of record with cluster, description and category. * @param type $idArr * @return type */ function getMgsCegDescCateWithHalfNum($idArr, $num) { $result = array(); $tmp = getCegBaseByIdArrWithHalfNum($idArr, $num); foreach ($tmp as $row) { $ceg_desc_cate['access_num'] = $row['access_num']; $ceg_desc_cate['description'] = $row['description']; $ceg_desc_cate['category'] = deterCegBaseCate($row); array_push($result, $ceg_desc_cate); } return $result; }
/** * Get a set of record with cluster, description and category. * @param type $idArr * @return type */ function getCegDescCate($idArr) { $result = array(); $tmp = getCegBaseByIdArr($idArr); foreach ($tmp as $row) { $cegDescCate['cluster'] = $row['access_num']; $cegDescCate['description'] = $row['description']; $cegDescCate['category'] = deterCegBaseCate($row); array_push($result, $cegDescCate); } return $result; }
/** * Get information of a minimal gene set by array of reference species ID. * @param type $idArr * @return array */ function getMgsInfo($idArr) { $result = array(); $tmp = getCegBaseByIdArr($idArr); foreach ($tmp as $row) { $cegInfo['access_num'] = $row['access_num']; $cegInfo['koid'] = $row['koid']; $cegInfo['cogid'] = $row['cogid']; $cegInfo['ec'] = $row['ec']; $cegInfo['description'] = $row['description']; $cegInfo['category'] = cate2Name(deterCegBaseCate($row)); array_push($result, $cegInfo); } return $result; }