OptimalGeneSets: CombineGeneSets

View source: R/OptimalGeneSets.R

OptimalGeneSetsR Documentation

CombineGeneSets

Description

Calculate distances between the different experiments.

Usage

OptimalGeneSets(object, method, max_cluster, cluster_method, main)

Arguments

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

Value

a plot

Examples


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"),
                           P.cutoff = 1.3,
                           Mol.cutoff = 5,
                           Source = "IPA",
                           type = "Canonical_Pathways",
                           structure = "SYMBOL",
                           seperator = ",")
IPA.object2 <- CombineGeneSets(Object = IPA.object1)
OptimalGeneSets(object = IPA.object2, method = "elbow", max_cluster= 24,
               cluster_method = "kmeans", main= "Kmeans for 24 clusters")


TranslationalBioinformaticsUnit/GeneSetCluster documentation built on Feb. 2, 2023, 4:06 a.m.