featureCounts: Count reads with featureCounts

View source: R/05_03_quantification_featureCounts.R

featureCountsR Documentation

Count reads with featureCounts

Description

Count reads with featureCounts

Usage

featureCounts(
  sample_info = NULL,
  mappingdir = "results/04_read_mapping",
  gff_path = NULL,
  fcountsdir = "results/05_quantification/featureCounts",
  threads = 2
)

Arguments

sample_info

Data frame of sample metadata created with the functions create_sample_info and infer_strandedness.

mappingdir

Directory where .bam files are stored.

gff_path

Path to GFF/GTF file with annotations.

fcountsdir

Directory where the matrix of gene-level read counts will be stored.

threads

Number of threads for featureCounts. Default: 2.

Value

A gene expression matrix with genes in row names and samples in column names. Two .tsv files with the gene expression matrix and count stats are saved to fcountsdir.

Examples

data(sample_info)
mappingdir <- system.file("extdata", package="bears")
gff_path <- system.file("extdata", "Homo_sapiens.GRCh37.75_subset.gtf",
                        package="bears")
fcountsdir <- file.path(tempdir(), "fcountsdir")
if(subread_is_installed()) {
    counts <- featureCounts(sample_info, mappingdir, gff_path, fcountsdir)
}

almeidasilvaf/gead documentation built on April 26, 2023, 3:47 p.m.