readHTSeqFile: Read a single htseq-counts result file.

Description Usage Arguments Value Examples

View source: R/readHTSeqFile.R

Description

The htseq package is used extensively to count reads relative to regions (see http://www-huber.embl.de/HTSeq/doc/counting.html). The output of htseq-count is a simple two-column table that includes features in column 1 and counts in column 2. This function simply reads in the data from one such file and assigns column names.

Usage

1
readHTSeqFile(fname, samplename = "sample", ...)

Arguments

fname

character(1), the path of the htseq-count file.

samplename

character(1), the name of the sample. This will become the name of the second column on the resulting data.frame, making for easier merging if necessary.

...

passed to read_tsv)

Value

a two-column data frame

Examples

1
2
3
4
fname = system.file(package='GenomicDataCommons',
                    'extdata/example.htseq.counts.gz')
dat = readHTSeqFile(fname)
head(dat)

GenomicDataCommons documentation built on Nov. 8, 2020, 11:08 p.m.