Allelic Variation at the VERNALIZATION-A1, VRN-B1, VRN-B3 and PHOTOPERIOD-A1 Genes In

Total Page:16

File Type:pdf, Size:1020Kb

Allelic Variation at the VERNALIZATION-A1, VRN-B1, VRN-B3 and PHOTOPERIOD-A1 Genes In

Allelic variation at the VERNALIZATION-A1, VRN-B1, VRN-B3 and PHOTOPERIOD-A1 genes in cultivars of Triticum durum Desf. Alexandr Muterko, Ruslan Kalendar, Elena Salina

Supplementary material 2

Algorithm of the controlled hierarchical clustering In present time there are numerous algorithms for sorting data sets based on hierarchical clustering. The main task of these methods is calculation of the measure similarity between objects and the further grouping of similar objects in clusters. However, in case when need to perform a sorting of objects where it is important not so much definition of similarity between objects, for their classification, but their grouping, based on specified hierarchy of compared attributes, these methods make no sense, because does not allow a priori determine the rules of clustering, i.e. are "uncontrolled". The algorithm of controlled hierarchical clustering of data set with categorical variables (attributes), based on agglomerative method of sequential clustering was developed. According to this algorithm in the first time the hierarchical structure of attributes is formed in required order (with specified distribution on tiers) based on their combinations in given data set, with the following clustering of this data set based on inferred hierarchy. Thus, the key moment of present method is possibility of a priori determination of order of attributes on which the sequential clustering of data set is carried out. This allows us to manipulate by the clustering, forming hierarchy of attributes depending on required representation of the final graph (dendrogram). Such, for a data set containing combination from n attributes the n! variants of hierarchy structure and same number of cluster representation can be formed. Thus, in contrast to most of the existing, "uncontrolled" methods of cluster analysis, where final dendrogram is one of the n! variants, which mostly is dependent on selected clustering algorithm, the method of controlled hierarchical clustering allows to increase informativeness of cluster analysis to maximum level through using of all potential variants (n!) of hierarchical structure and final dendrogram. PHP implementation

Example
'; } echo'

Order

'; #======if($_POST['ClusterCSV']){ $DataCSV=explode("\n",str_replace(array("\r"," "),'', $_POST['DataCSV'])); $varN=count($DataCSV); $colName=explode(';',$DataCSV[0]);//first row - names of columns foreach($colName as $val)$tempArr[$val]=0; for($i=1;$i<$varN;$i++){ $featArr=explode(';',$DataCSV[$i]); $combF=join(array_splice($featArr,1),';'); $UnicComb[$combF][]=$featArr[0];//first column - name of object (variety) } $varietyN=$varN-1; $tempArr=array_splice($tempArr,1);//because the first column includes objects name if(!$_POST['Order']){ for($i=0;$i '; $TableClust='Combinations:
'; $Tree='('; foreach($UnicComb as $combSt=>$name){ $comb=explode(';',$combSt); for($g=0;$g<$lenOrd;$g++){ for($temp='',$g2=0;$g2<=$g;$g2++)$temp.=$comb[$Order[$g2]].'*'; $CombGrup[$g][]=$temp; } for($z=0;$z<$lenOrd;$z++)if(!$varIn[$z] or !in_array($comb[$z].'*', $varIn[$z]))$varIn[$z][]=$comb[$z].'*'; $freqComb=count($name)/$varietyN; $nameS=join($name,','); $Tree.="($nameS)".join($comb).","; $TableClust.=''; } $Tree=rtrim($Tree,',');$Tree.=')'; $TableClust.='
'.++$ind.''.join($comb,'|').''. $nameS.''.round($freqComb*100,2).'%
'; for($v1=0;$v1<$lenOrd-1;$v1++){ foreach($CombGrup[$v1] as $var1){ foreach($varIn[$Order[$v1+1]] as $uKEY2){ if(in_array($var1.$uKEY2,$CombGrup[$v1+1]))$Clust[$v1][$var1] []=$uKEY2; } $Clust[$v1][$var1]=array_unique($Clust[$v1][$var1]); }} $lastClust=$lenOrd-2; foreach($Clust[$lastClust] as $pK=>$pL){ foreach($pL as $pV){ $namesVar=orderToName($pK.$pV,$Order); $tempV.='('.join($UnicComb[$namesVar],' ').')'.$pV.'|'.findComb($pK. $pV).','; } $tempV=rtrim($tempV,','); $Clust[$lastClust][$pK]=$tempV; $tempV=''; } for($pN=$lenOrd-3;$pN>=0;$pN--){ foreach($Clust[$pN] as $pK=>$pL){ foreach($pL as $pV)$tempV.='('.$Clust[$pN+1][$pK.$pV].')'. $pV.'|'.findComb($pK.$pV).','; $tempV=rtrim($tempV,','); if($pN==0)$ClustTree.='('.$tempV.')'.$pK.'|'.findComb($pK.'**').','; $Clust[$pN][$pK]=$tempV; $tempV=''; }} $ClustTree=rtrim($ClustTree,','); $ClustTree='('.$ClustTree.')'; $ClustTree=str_replace('*','',$ClustTree); echo $TableClust.'
Order traits: '.rtrim($OrdTrSt,'=> ').'
Combination tree
'. $Tree.'
Hierarchy clustering
'. $ClustTree.'
'; } function orderToName($nam,$ord){ $nam=explode('*',rtrim($nam,'*')); $len=count($nam); for($i=0;$i<$len;$i++){ $retLen[$ord[$i]]=$nam[$i].';'; ksort($retLen); } return rtrim(join($retLen),';'); } function findComb($combN){ global $UnicComb, $Order; $combN=explode('*',rtrim($combN,'*')); $len=count($combN); $combL=$combN[$len-1]; foreach($UnicComb as $key=>$val){ $keyExp=explode(';',$key); if($keyExp[$Order[$len-1]]==$combL)$targA+=count($UnicComb[$key]); for($i=0;$i<$len;$i++)if($keyExp[$Order[$i]]!=$combN[$i])continue 2; $numVar+=count($UnicComb[$key]);//number of objects carrying combination of attributes, which was formed from node values of previous orders of given trend } return $numVar.'|'.round(($numVar/$targA)*100,1).'%';//percent of objects with this combination relative to all objects containing a given value of attribute } ?>

Recommended publications