Learn R Programming

systemPipeR (version 1.6.2)

readComp: Import sample comparisons from targets file

Description

Parses sample comparisons specified in line(s) of targets file or in targetsheader slot of SYSargs object. All possible comparisons can be specified with 'CMPset: ALL'.

Usage

readComp(file, format = "vector", delim = "-")

Arguments

file
Path to targets file. Alternatively, a SYSargs object can be assigned.
format
Object type to return: vector or matrix.
delim
Delimiter to use when sample comparisons are returned as vector.

Value

  • list where each component is named according to the name(s) used in the line(s) of the targets file. The list will contain as many sample comparisons sets (list components) as there are sample comparisons lines in the corresponding targets file.

Examples

Run this code
## Return comparisons from targets file
targetspath <- system.file("extdata", "targets.txt", package="systemPipeR")
read.delim(targetspath, comment.char = "#")
readComp(file=targetspath, format="vector", delim="-")

## Return comparisons from SYSargs object
param <- system.file("extdata", "tophat.param", package="systemPipeR")
targets <- system.file("extdata", "targets.txt", package="systemPipeR")
args <- systemArgs(sysma=param, mytargets=targets)
readComp(args, format = "vector", delim = "-")

Run the code above in your browser using DataLab