msc.subset: Specific MSC

Description Usage Arguments Value Examples

View source: R/msc.subset.R

Description

The msc.subset allows you to find specific MSC for a certain subset of samples.

Usage

1
msc.subset(clustmatrix, subset)

Arguments

clustmatrix

a cluster matrix

subset

a numerical vector indicating which subset of samples to include.

Value

clustnumbers

a vector containing the specific MSC names.

freq

frequency values of those specific MSC in the subset of samples.

matrix

a subset of the cluster matrix containing only those specific MSC. All samples, not in the subset, should have a value of 0 meaning the MSC is absent.

sum

the total number of MSC found in the indicated subset of samples.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(matrices)
data(exData)

### selecting a group of samples e.g. all L. peruviana species
Lpe <- which(exData$species == "L. peruviana")

### run function
specific <- msc.subset(matrices[["id97"]], subset = Lpe)

### visualize results (check if it is indeed specific)
heatmap(specific$matrix) # or:
msc.heatmap(specific$matrix, samples = exData$samples, groups = exData$species)

### find specific MSC with highest frequency
which.max(specific$freq)

rKOMICS documentation built on July 21, 2021, 5:07 p.m.