ABasicModule (v1)

**Insert description here**

Summary

**Insert summary**

References

**Insert references**

 

Functionality yet to be implemented:

**Insert future functionality**

 

Technical notes:

**The follwing notes are from HierarchicalClustering v7**

  • This module has been tested to run in the Docker container genepattern/docker-python36:release-0.2 which has build code bj4fefqe2da2fnopdywxz3x
  • To create a conda environment (called GP_hierarchical_clustering_env) with the required dependencies download the requirements.txt file from the github repository named genepattern/docker-python36 (here is the url of the file: https://raw.githubusercontent.com/genepattern/docker-python36/master/requirements.txt) and run this three commands in the same folder where requirements.txt is located:

conda create --name GP_hierarchical_clustering_env pip
source activate GP_hierarchical_clustering_env
pip install -r requirements.txt

  • When calling this module from the command line, takes a few seconds (2-4) of wall time to run to completion in a conda enviroment using default parameters and this input: https://datasets.genepattern.org/data/test_data/BRCA_minimal_60x19.gct
  • When calling this module from the command line, takes a few seconds (3-5) of wall time to run to completion in a conda enviroment using default parameters and this input: https://datasets.genepattern.org/data/test_data/BRCA_large_20783x40.gct
  • When calling this module from the command line, takes a few minutes (8-10) of wall time to run to completion in a conda enviroment using default parameters except for col_distance_metric = information_coefficient and this input: https://datasets.genepattern.org/data/test_data/BRCA_large_20783x40.gct
  • When attempting row clustering it takes significantly longer especially if using the information coefficient.

Parameters

**These are from Hierarchical Clustering 7**

Name Description
input filename * input data file name - .gct, .res, .pcl
column distance measure *

Distance measure for column (sample) clustering.  Options include:

  • No column clustering
  • Pearson correlation (default): Pearson's correlation coefficient between two variables is defined as the covariance of the two variables divided by the product of their standard deviations. It is a measure for how well a straight line can be fitted to a scatter plot of x and y. If all the points in the scatter plot lie on a straight line, the Pearson correlation coefficient is either +1 or -1, depending on whether the slope of line is positive or negative. If it is equal to zero, there is no correlation between x and y.
  • The information coefficient is a measure of the informaton-theoretic similarity between two variables. The information coefficient (IC) is +1 or -1 if two variables contain essentially the same information (e.g., one variable is a scaled version of the other or they are a mirror of each other). The IC is 0 only when two variables are statistically independent. Unlike the Pearson correlation, this metric is sensitive to nonlinear relationships between variables. Note that this metric is very  computationally intensive, hece it wil take is significantly longer to run than any other metric in this list. For more information refer to: https://doi.org/10.1038/nbt.3527
  • Uncentered correlation: The same as the Pearson correlation, except that the sample means are set to zero in the expression for uncentered correlation. The uncentered correlation coefficient lies between –1 and +1; hence the distance lies between 0 and 2.
  • Uncentered correlation, absolute value: The same as the absolute Pearson correlation, except that the sample means are set to zero in the expression for uncentered correlation. The uncentered correlation coefficient lies between 0 and +1; hence the distance lies between 0 and 1.
  • Pearson correlation, absolute value:  The absolute value of the Pearson correlation coefficient is used; hence the corresponding distance lies between 0 and 1, just like the correlation coefficient.
  • Spearman’s rank correlation: Nonparametric version of the Pearson correlation that measures the strength of association between two ranked variables. To calculate the Spearman rank correlation, each data value is replaced by their rank if the data in each vector is ordered by their value. Then the Pearson correlation between the two rank vectors instead of the data vectors is calculated. It is useful because it is more robust against outliers than the Pearson correlation.
  • Kendall’s tau: The Kendall tau distance is a metric that counts the number of pairwise disagreements between two lists. The larger the distance, the more dissimilar the two lists are.
  • Euclidean distance: Corresponds to the length of the shortest path between two points. Takes into account the difference between two samples directly, based on the magnitude of changes in the sample levels. This distance type is usually used for data sets that are normalized or without any special distribution problem.
  • City-block distance: Also known as the Manhattan or taxi cab distance; the city-block distance is the sum of distances along each dimension between two points.
row distance measure *

Distance measure for row (gene) clustering.  Options include:

  • No row clustering (default)
  • Pearson correlation
  • Information coefficient
  • Uncentered correlation
  • Uncentered correlation, absolute value
  • Pearson correlation, absolute value
  • Spearman’s rank correlation
  • Kendall’s tau
  • Euclidean distance
  • City-block distance
NOTE: Filtering beforehand is recommended since row clustering is computationally intensive.
clustering method *

Hierarchical clustering method to use.  Options include:

  • Pairwise complete-linkage: The distance between two clusters is computed as the maximum distance between a pair of objects, one in one cluster and one in another.
  • Pairwise average-linkage (default): The distance between two clusters is computed as the average distance between the elements in the two clusters.
row center  Specifies whether to center each row (gene) in the data.  Centering each row subtracts the row-wise mean or median from the values in each row of data, so that the mean or median value of each row is 0. Default: no
row normalize  Specifies whether to normalize each row (gene) in the data. Normalizing each row multiplies all values in each row of data by a scale factor S so that the sum of the squares of the values in each row is 1.0 (a separate S is computed for each row).  Default: no
column center  Specifies whether to center each column (sample) in the data. Centering each column subtracts the column-wise mean or median from the values in each column of data, so that the mean or median value of each column is 0. Default: no
column normalize  Specifies whether to normalize each column (sample) in the data. Normalizing each column multiplies all values in each column of data by a scale factor S so that the sum of the squares of the values in each column is 1.0 (a separate S is computed for each column). Default: no
output base name *

Base name for the output files

output distance matrix Whether or not output the pair-wise distance matrix. If true, the distance between each column will be computed, which can be very computationally intensive. If unsure, leave as False. Default: False.

* - required

Output Files

**These are from Hierarchical Clustering 7**

  1. CDT file
    Contains the original data, but reordered to reflect the clustering.
  2. ATR file (if clustering by columns/samples) or GTR file (if clustering by rows/genes)
    These files describe the order in which nodes were joined during the clustering.
  3. distance_matrix.txt
    This is a tab-separated file which contains all the distances used to compute the clustering.

License

**These are from Hierarchical Clustering 7**

HierarchicalClustering is distributed under a modified BSD license available at https://raw.githubusercontent.com/genepattern/HierarchicalClustering/develop/LICENSE

Platform Dependencies

Task Type:

CPU Type:
any

Operating System:
any

Language:
Python 3.6

Version Comments

Version Release Date Description
1 2018-05-01 Creating "ABasicModule" to have a reference