count_summaries: Get read counts from featureCounts summary files

Description Usage Arguments Details Value Author(s) Examples

View source: R/count_summaries.R

Description

Given a list of featureCounts summary files, return a dataframe of read counts broken down by type (assigned, unassigned due to multimapping, etc)

Usage

1
count_summaries(inFiles, verbose = TRUE)

Arguments

inFiles

Character - List of featureCounts output files

verbose

Logical - whether to report progress

Details

Gets read counts per sample from the "summary.txt" files output by featureCounts. This means you're getting counts for the features included in the annotation file given to featureCounts. This is how to get specifically intronic read counts, by giving featureCounts a gtf with only introns and then giving this function the resulting summary files. TIME:

Value

Data frame - Columns correspond to input files and rows to read types

Author(s)

Emma Myers

Examples

1
2
3
4
5
6
summaryFiles = list.files("NucSeq/counts/exonic_counts", pattern="summary")
fCounts = count_summaries(paste("NucSeq/counts/exonic_counts/", summaryFiles, sep=""))
assignedCounts = as.vector(fCounts[1,], mode="numeric")
pdf("NucSeq_assigned_reads_exonic.pdf")
barplot(assignedCounts/10^6, las=2, main="Nuc-seq exonic assigned reads", cex.names = 0.5, names.arg=gsub("_fcounts.txt.summary", "", summaryFiles), ylab="Millions")
dev.off()

e-myers/rnaseq documentation built on May 20, 2019, 9:14 p.m.