Counts reads overlapping genomic features. Uses
GenomicAlignments::summarizeOverlaps() if available, otherwise shells out
to featureCounts from the Subread package.
Usage
bb_count_reads(
bam_paths,
annotation,
method = c("auto", "internal", "featureCounts"),
threads = 4L,
feature_type = "exon",
attr_type = "gene_id",
paired = FALSE
)Arguments
- bam_paths
Character vector. Paths to BAM files.
- annotation
Character. Path to GTF/GFF annotation file.
- method
Character.
"auto"tries GenomicAlignments first, then featureCounts;"internal"forces GenomicAlignments;"featureCounts"forces the external tool.- threads
Integer. Number of threads for featureCounts. Default
4.- feature_type
Character. Feature type to count (GTF column 3). Default
"exon".- attr_type
Character. Attribute to group by. Default
"gene_id".- paired
Logical. Paired-end data. Default
FALSE.