write_pcl {TTMap} | R Documentation

## Reading, writing and annotation files

### Description

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

### Usage

        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

        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())

[Package TTMap version 1.10.0 Index]