readHTSeqFile {GenomicDataCommons} | R Documentation

## Read a single htseq-counts result file.

### 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

    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

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

[Package GenomicDataCommons version 1.8.0 Index]