get_raw_score: Get CBEA scores for a given matrix and a vector of column...

View source: R/cbea_internals.R

get_raw_scoreR Documentation

Get CBEA scores for a given matrix and a vector of column indices

Description

Get CBEA scores for a given matrix and a vector of column indices

Usage

get_raw_score(X, idx)

Arguments

X

(Matrix). OTU table of matrix format where taxa are columns and samples are rows

idx

(Integer vector). Vector of integers indicating the column ids of taxa in a set

Value

A matrix of size n by 1 where n is the total number of samples

Examples

data(hmp_gingival)
seq <- hmp_gingival$data
seq_matrix <- SummarizedExperiment::assays(seq)[[1]]
seq_matrix <- t(seq_matrix) + 1
rand_set <- sample(seq_len(ncol(seq_matrix)), size = 10)
scores <- get_raw_score(X = seq_matrix, idx = rand_set)

qpmnguyen/CBEA documentation built on April 4, 2022, 7:25 p.m.