Note: if this notebook is taking too long to run, consider using the module HierarchicalClustering v7.3.4 available on gp-beta-ami.genepattern.org

A note on some of the parameters we are using:


In [12]:
import genepattern
# import cuzcatlan as cusca
# import pandas as pd    
from cuzcatlan import HierarchicalClustering

genepattern.GPUIBuilder(HierarchicalClustering, name="Advanded Hierarchical Clustering.", 
                        description="This function performs hierarchical clustering to group samples (columns) and/or genes (rows) with similar expression profiles.",
                        parameters={
                                "pwd": { "hide": True, "default": '.' },
                                "show": { "hide": True, "default": True },
                                "col_distance_metric":{
                                                      "default": "pearson",
                                                      "choices":{'Information Coefficient':"information_coefficient",
                                                                 'City Block (Manhattan or L1-norm)':'manhattan',
                                                                 'Euclidean (L2-norm)':"euclidean",
                                                                 'Pearson Correlation':"pearson",
                                                                 'Uncentered Pearson Correlation':'uncentered_pearson',
                                                                 'Uncentered Pearson Correlation, absolute value':'absolute_uncentered_pearson',
                                                                 'Spearman Correlation':'spearman',
                                                                 "Kendall's Tau": 'kendall',
                                                                 'Cosine distance':'cosine',
                                                                }
                                                     },
                            "row_distance_metric":{
                                                      "default": "pearson",
                                                      "choices":{'Information Coefficient':"information_coefficient",
                                                                 'City Block (Manhattan or L1-norm)':'manhattan',
                                                                 'Euclidean (L2-norm)':"euclidean",
                                                                 'Pearson Correlation':"pearson",
                                                                 'Uncentered Pearson Correlation':'uncentered_pearson',
                                                                 'Uncentered Pearson Correlation, absolute value':'absolute_uncentered_pearson',
                                                                 'Spearman Correlation':'spearman',
                                                                 "Kendall's Tau": 'kendall',
                                                                 'Cosine distance':'cosine',
                                                                }
                                                     },
                            "clustering_method":{
                                                  "default": "average",
                                                  "choices":{'Pairwise average-linkage':"average",
                                                             'Pairwise complete-linkage':'complete',
                                                             'Pairwise ward-linkage':'ward',
                                                            }
                                                     },
                            "row_centering":{
                                              "default": "Mean",
                                              "choices":{'Subtract the mean from each row':"Mean",
                                                         'Subtract the median from each row':'Median',
                                                         'No':None,
                                                        }
                                                 },
                            "col_centering":{
                                              "default": "Mean",
                                              "choices":{'Subtract the mean from each column':"Mean",
                                                         'Subtract the median from each column':'Median',
                                                         'No':None,
                                                        }
                                                 },
                            "custom_plot":{
                                              "default": "Both",
                                              "choices":{'Plot dendrogram only for samples':"Samples",
                                                         'Plot dendrogram only for genes':'Genes',
                                                         'Plot dendrogram for both samples and genes':'Both',
                                                        }
                                                 },
                            
                        })



In [ ]: