-
Notifications
You must be signed in to change notification settings - Fork 4
OptimalGeneSets
EwoudEwing edited this page Aug 26, 2019
·
1 revision
OptimalGeneSets(object = IPA.object2, method = "elbow", max_cluster= 24, cluster_method = "kmeans", main= "Kmeans for 24 clusters")
Object A PathwayObject.
method Which method to determing optimal number of clusters. gap, elbow or silhouette.
max_cluster Max number of clusters to test.
cluster_method kmeans or hcut. Which clustering method is used.
main A string to be used as title in the plot.
require(GeneSetCluster)
IPA.files <- c(system.file("extdata", "MM10.IPA.KO.uGvsMac.Canonical_pathways.xls", package = "GeneSetCluster"),
system.file("extdata", "MM10.IPA.WT.uGvsMac.Canonical_pathways.xls", package = "GeneSetCluster"),
system.file("extdata", "MM10.IPA.KO.uGvsMac.Functional_annotations.xls", package = "GeneSetCluster"),
system.file("extdata", "MM10.IPA.WT.uGvsMac.Functional_annotations.xls", package = "GeneSetCluster"))
canonical.files <- IPA.files[grep("Canonical", IPA.files)]
IPA.object1 <- LoadGeneSets(file_location = canonical.files, #where are the files
groupnames= c("KO", "WT"),#Names of the groups
P.cutoff = 1.3, #minumum cutoff if smaller than 1 it assumes normal pvalue, if larger than 1 it assumes a log10 palue
Mol.cutoff = 5,# amount of molecules interested in
Source = "IPA",#How was the data generated
type = "Canonical_Pathways",#What is the experiment e.g. canonical pathways, functional anotation
structure = "SYMBOL",#structure of the molecules e.g. genenames, ensembl_ID etc
seperator = ",")#How are the genes seperated
IPA.object2 <- CombineGeneSets(Object = IPA.object1)
IPA.object3 <- ClusterGeneSets(Object = IPA.object2,
clusters = 7,
method = "kmeans")
OptimalGeneSets(object = IPA.object2, method = "elbow", max_cluster= 24, cluster_method = "kmeans", main= "Kmeans for 24 clusters")
OptimalGeneSets(object = IPA.object2, method = "silhouette", max_cluster= 24, cluster_method = "kmeans", main= "Kmeans for 24 clusters")
OptimalGeneSets(object = IPA.object2, method = "gap", max_cluster= 24, cluster_method = "kmeans", main= "Kmeans for 24 clusters")
OptimalGeneSets(object = IPA.object2, method = "elbow", max_cluster= 24, cluster_method = "kmeans", main= "Kmeans for 24 clusters")
Example Script: Example
Step 1A: Loading the data
Step 1B: Creating an Object
Step 2: Combine and Cluster
Step 2B: User supplied distance function
Step 2C: Highlighting-Genes
Step 3: Exporting Data
Step 4: Functional Investigation
Video: Step-by-step user guide