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

<p> 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</p><p>Supplementary material 2</p><p>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</p><p><? #======Controlled sequential hierarchical clustering ======#======Alexandr Muterko (2015) ======# first row must contain names of columns # first column must contain names of objects (varieties) #======HTML interface ======if(!$_POST['DataCSV']){//for example $_POST['DataCSV']="Variety;Country;Gene_A;Gene_B;Gene_C;Gene_D\nVar1 ;Ukraine;A1;B2;C1;D1\nVar2;Ukraine;A1;B1;C1;D1\nVar3;Ukraine;A2;B2;C 1;D1\nVar4;China;A2;B1;C2;D2\nVar5;China;A1;B2;C1;D1\nVar6;Russia;A1 ;B2;C2;D1\nVar7;Russia;A1;B1;C1;D1\nVar8;USA;A2;B2;C2;D1\nVar9;USA;A 1;B1;C2;D1\nVar10;Czech Republic;A1;B2;C2;D1\nVar11;Czech Republic;A1;B2;C1;D1"; $_POST['Order']="13240"; echo '<b>Example</b><br>'; } echo'<form method="post" name="FilterForm"> Order <textarea name="Order" rows="2" style="height:1em;width:6em;resize:none">'. $_POST['Order'].'</textarea><br> <textarea name="DataCSV" cols="50" rows="9" wrap=off style="resize:none;">'.$_POST['DataCSV'].'</textarea><br> <input type="submit" value="Run_CSV" name="ClusterCSV"/></form>'; #======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<count($tempArr);$i++)$Order.=$i; }//if order is not set; the default order: 0,1,2,...,n, where n is a number of attributes-1 else $Order=$_POST['Order']; clustering(); } function clustering(){ global $UnicComb,$tempArr,$varietyN,$Order; $lenOrd=strlen($Order); $traitsArr=array_keys($tempArr); for($i=0;$i<$lenOrd;$i++)$OrdTrSt.=$traitsArr[$Order[$i]].'=> '; $TableClust='<b>Combinations:</b><br><div id="Div1" align="center" style="overflow:auto;width:100%"><table align="left" border=0 style="white-space:nowrap;font-size:14px;font-family:'."'Courier New'".';">'; $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.='<tr><td>'.++$ind.'</td><td bgcolor="yellow">'.join($comb,'|').'</td><td>'. $nameS.'</td><td>'.round($freqComb*100,2).'%</td></tr>'; } $Tree=rtrim($Tree,',');$Tree.=')'; $TableClust.='</table></div>'; 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.'<br><b>Order traits: '.rtrim($OrdTrSt,'=> ').'</b><br> <table style="width:100%"><tr><td><b>Combination tree</b><br><div style="overflow:auto;width:80%;height:80px;">'. $Tree.'</div></td><td><b>Hierarchy clustering</b><br><div style="overflow:auto;width:80%;height:80px;">'. $ClustTree.'</div></td></tr><tr><td id="comb_tree"></td><td id="hier_tree"></td></tr></table>'; } 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 } ?></p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    4 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us