createPACdataset: Create a PACdataset from counts data

createPACdatasetR Documentation

Create a PACdataset from counts data

Description

createPACdataset create a PACdataset from counts and anno matrix/data.frame. This function is particularly suitable for reading PACdatasets from single-cell data with sparse counts table and a separate meta data.

Usage

createPACdataset(counts, anno, colData, supp, forceSparse = F, verbose = TRUE)

Arguments

counts

PAC expression or ratio data, can be data.frame/matrix/dgCMatrix. If the matrix is in character mode, then will be converted into numeric mode.

anno

detailed annotation information for PAs, with the same row number as the counts slot.

colData

sample defination. Each row is one experiment, and the column is the sample group.

supp

a list storing additional data, like stopCodon.

forceSparse

whether to force the counts matrix as sparse matrix. By default the function determines whether the matrix is sparse (if it contains more than 50 percentage of 0s and ncol is greater than 10). But set forceSparse=TRUE can skip the sparse check.

verbose

TRUE to print message.

Value

A PACdataset object

See Also

readPACds to read PACdataset from file or data.frame.

Other PACdataset functions: PACdataset-class, PACds, annotateByPAS(), annotatePAC(), get3UTRAPAds(), get3UTRAPApd(), length(), makeExamplePACds(), mergePACds(), normalizePACds(), plotPACdsStat(), rbind(), readPACds(), removePACdsIP(), scPACds, subscript_operator, summary(), writePACds()

Examples

data(PACds)
p1=createPACdataset(counts=PACds@counts, anno=PACds@anno)
anno=PACds@anno; rownames(anno)=NULL
p2=createPACdataset(counts=PACds@counts, anno=anno)
p3=createPACdataset(counts=PACds@counts, anno=anno, forceSparse=TRUE)

BMILAB/movAPA documentation built on Jan. 3, 2024, 11:09 p.m.