Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • venkat.malladi/tfsee
  • gcrb/tfsee
Show changes
Showing
with 2246 additions and 0 deletions
analysis/GRO_seq_TFSEE/final_full_cluster_heatmap_gro_rna.png

123 KiB

analysis/GRO_seq_TFSEE/final_full_cluster_heatmap_rna-seq.png

125 KiB

This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
from sklearn.cluster import KMeans
from sklearn.metrics import silhouette_samples, silhouette_score
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import numpy as np
range_n_clusters = [2, 3, 4, 5, 6,7,8,9,10]
X = cell_tf_values_std
for n_clusters in range_n_clusters:
# Create a subplot with 1 row and 2 columns
fig, (ax1, ax2) = plt.subplots(1, 2)
fig.set_size_inches(18, 7)
# The 1st subplot is the silhouette plot
# The silhouette coefficient can range from -1, 1 but in this example all
# lie within [-0.1, 1]
ax1.set_xlim([-0.1, 1])
# The (n_clusters+1)*10 is for inserting blank space between silhouette
# plots of individual clusters, to demarcate them clearly.
ax1.set_ylim([0, len(X) + (n_clusters + 1) * 10])
# Initialize the clusterer with n_clusters value and a random generator
# seed of 10 for reproducibility.
clusterer = KMeans(n_clusters=n_clusters, random_state=10)
cluster_labels = clusterer.fit_predict(X)
# The silhouette_score gives the average value for all the samples.
# This gives a perspective into the density and separation of the formed
# clusters
silhouette_avg = silhouette_score(X, cluster_labels)
print("For n_clusters =", n_clusters,
"The average silhouette_score is :", silhouette_avg)
experiment,file
ES_D0,/Volumes/project/GCRB/Lee_Lab/s163035/Matrix_analysis_PMIT_25842977/ChIP-seq/ES_D0/Input/merge-bams.sh-1.0.0/merged.filtered.no_dups.bam
ES_D2,/Volumes/project/GCRB/Lee_Lab/s163035/Matrix_analysis_PMIT_25842977/ChIP-seq/ES_D2/Input/merge-bams.sh-1.0.0/merged.filtered.no_dups.bam
ES_D5,/Volumes/project/GCRB/Lee_Lab/s163035/Matrix_analysis_PMIT_25842977/ChIP-seq/ES_D5/Input/merge-bams.sh-1.0.0/merged.filtered.no_dups.bam
ES_D7,/Volumes/project/GCRB/Lee_Lab/s163035/Matrix_analysis_PMIT_25842977/ChIP-seq/ES_D7/Input/merge-bams.sh-1.0.0/merged.filtered.no_dups.bam
ES_D10,/Volumes/project/GCRB/Lee_Lab/s163035/Matrix_analysis_PMIT_25842977/ChIP-seq/ES_D10/Input/merge-bams.sh-1.0.0/merged.filtered.no_dups.bam
analysis/GRO_seq_TFSEE/k_means_clustering.png

42.6 KiB

analysis/GRO_seq_TFSEE/k_means_clustering_pca.png

24.9 KiB

This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
File moved
This diff is collapsed.