msc.subset: Specific Minicircle Sequence Classes

View source: R/msc.subset.R

msc.subsetR Documentation

Specific Minicircle Sequence Classes

Description

The msc.subset function allows you to identify specific Minicircle Sequence Classes (MSCs) for a subset of samples based on the output of the msc.matrix function. It helps in extracting and analyzing MSCs that are present in a particular subset of samples.

Usage

msc.subset(clustmatrix, subset)

Arguments

clustmatrix

a cluster matrix obtained from the msc.matrix function. The cluster matrix represents the presence or absence of MSCs in each sample.

subset

a numerical vector indicating the subset of samples for which you want to identify specific MSCs. The values in the subset vector correspond to the indices of the samples to be included.

Value

clustnumbers

a vector containing the names of the specific MSCs present in the subset of samples. These are the MSCs that are found in the indicated subset.

freq

frequency values indicating the occurrence of the specific MSCs in the subset of samples. These values represent the number of times each MSC appears in the subset.

matrix

a subset of the cluster matrix containing only the specific MSCs found in the subset of samples. For samples not included in the subset, the values in the matrix should have the value 0, indicating the absence of the MSC.

sum

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

Examples

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 9, 2023, 7:46 p.m.