createcisTopicObjectFromBAM: Initialize and setup the cisTopic object starting from bam...

View source: R/InitializecisTopic.R

createcisTopicObjectFromBAMR Documentation

Initialize and setup the cisTopic object starting from bam files and defined regions

Description

Initializes the cisTopic object from the raw bam files and defined regions

Usage

createcisTopicObjectFromBAM(
  bamfiles,
  regions,
  project.name = "cisTopicProject",
  min.cells = 1,
  min.regions = 1,
  is.acc = 1,
  keepCountsMatrix = TRUE,
  paired = FALSE,
  ...
)

Arguments

bamfiles

List with the paths to the bam files.

regions

Path to the bed file with the defined regions.

project.name

Project name (string).

min.cells

Minimal number of cells in which the region has to be accessible. By default, all regions accessible in at least one cell are kept.

min.regions

Minimal number of regions that have to be accessible within a cell to be kept. By default, all cells with at least one region accessible are kept.

is.acc

Number of counts necessary to consider a region as accessible.

keepCountsMatrix

Whether to keep the counts matrix or not inside the object. For large matrices, we recommend to set this to FALSE.

paired

Whether data should be treated as paired end or not. If it is FALSE, we count a read if its 5' end falls within the region, if false, fragments will be counted instead of individual reads.

...

See featureCounts function from Rsubread.

Value

Returns a cisTopic object with the counts data stored in object@count.matrix. object@binary.count.matrix, object@cell.names, object@cell.data (including counting statistics), object@regions.ranges, object@regions.data are also initialized.

Examples

bamfiles <- c('example_1.bam', 'example_2.bam', 'example_3.bam')
regions <- 'example.bed'
cisTopicObject <- createcisTopicObjectFromBAM(bamfiles, regions)
cisTopicObject

aertslab/cisTopic documentation built on April 6, 2024, 9:31 p.m.