read.labels: Read labels file

Description Usage Arguments Value Examples

View source: R/io_utils.r

Description

This file reads in the tsv file with labels and converts it into a label object.

First row is expected to be #BINARY:1=[label for cases]; -1=[label for controls]. Second row should contain the sample identifiers as tab-separated list (consistent with feature and metadata).

Third row is expected to contain the actual class labels (tab-separated): 1 for each case and -1 for each control.

Note: Labels can take other numeric values (but not characters or strings); importantly, the label for cases has to be greater than the one for controls

Usage

1
read.labels(fn.in.label)

Arguments

fn.in.label

name of the tsv file containing labels

Value

label object containing several entries:

Examples

1
2
3
4
5
    # run with example data
fn.label <- system.file('extdata', 'label_crc_zeller_msb_mocat_specI.tsv',
    package = 'SIAMCAT')

labels <- read.labels(fn.label)

KonradZych/SIAMCAT documentation built on May 17, 2019, 6:20 p.m.