mergeExternalData: Merge external data

View source: R/mergeExternalData.R

mergeExternalDataR Documentation

Merge external data

Description

To boost its own sequencing data, one can download existing and precounted data. This function merges the existing FraserDataSet with external count data.

Usage

mergeExternalData(fds, countFiles, sampleIDs, annotation = NULL)

Arguments

fds

A FraserDataSet

countFiles

A character vector of file names pointing to the external count data. The vector has to be names or the files have to start with k_j, k_theta, n_psi3, n_psi5, n_theta.

sampleIDs

The samples to be merged from the external data.

annotation

A sample annotation of the external data (optional).

Details

For more details on existing datasets have a look at: <https://github.com/gagneurlab/drop#datasets>

Since FRASER can not hand NA values, the merge will return only the intersecting regions and will drop any non overlapping features. This has to be kept in mind when analysing rare disease samples.

Value

Merged FraserDataSet object.

Examples

anno <- fread(system.file("extdata", "externalCounts", 
        "annotation.tsv.gz", package="FRASER"))
ctsFiles <- list.files(full.names = TRUE, pattern="counts",
        system.file("extdata", "externalCounts", package="FRASER"))

fds <- createTestFraserDataSet()
fds_merged <- mergeExternalData(fds, ctsFiles, anno[,sampleID], anno)

K(fds, "psi5")
K(fds_merged, "psi5")


c-mertes/FRASER documentation built on June 14, 2024, 7:49 p.m.