write_pcl: Reading, writing and annotation files

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Reading (read_pcl), writing (write_pcl) files and annotating matrices (mat2pcl)

Usage

1
2
3
4
    mat2pcl(mat, tag)
    write_pcl(df, dataname, fileaddress = "")
    read_pcl(filename, na.type = "", Nrows = -1, 
    Comment.char = "", ...)

Arguments

df

PCL object to be saved

dataname

Name of the file

fileaddress

Where to save the file

filename

File name to be loaded on R

na.type

feels the parameter na.strings of read.table

Nrows

Number of rows to be ignored (nrows of read.table)

Comment.char

comment.char of read.table

...

other read.table arguments

mat

matrix to be changed in annotated

tag

annotation

Details

The file (called filename) MUST contain 3 columns before the actual values, which are called CLID, NAME and GWEIGHT, described bellow. The first row must be the header of the columns (starting with CLID,NAME and GWEIGHT) and the second row must be EWEIGHT. Representing how much weight each column has: if some columns are n replicates they can have each a weight of 1/n.

Value

Data frame composed of

CLID

Column called CLID which is the ID of the features, which will then be the rownames of the dataframe

NAME

A possibly longer name, more meaningfull than CLID, text format

GWEIGHT

A weight for each gene or feature. If some genes are less important than others or only a pathway should be selected than the file (called filename) should have this information

Matrix

The matrix with numbers of the different observations

Author(s)

Rachel Jeitziner

See Also

control_adjustment

Examples

1
2
3
4
5
6
7
8
9
    library(airway)
    data(airway)
    airway <- airway[rowSums(assay(airway))>80,]
    assay(airway) <- log(assay(airway)+1,2)
    ALPHA <- 1
    to_be_saved <- TTMap::make_matrices(airway,
    seq_len(4), seq_len(4) + 4,
    rownames(airway), rownames(airway))
    TTMap::write_pcl(to_be_saved, "tempfile()", getwd())

jeitziner/TTMap documentation built on May 23, 2019, 4:24 p.m.