generateReplicateMat {RNAither} | R Documentation

## Generate a matrix of replicates

### Description

Generates a matrix out of a dataset, each row corresponding to an siRNA/gene ID, each column to a channel value or its index in the dataset.

### Usage

    generateReplicateMat(data, minNbReps, IndexOrInt, col4val, col4anno)

### Arguments

`data` | an R data frame generated with `generateDatasetFile`
`minNbReps` | set to 2 if you want to exclude replicates occurring only once in the dataset, otherwise 1.
`IndexOrInt` | a character string - either `"Index"` or `"Intensities"` - specifying which values are to be contained in the output matrix.
`col4val` | a character string specifying the name of the dataset column to be used for the values of the output matrix (if `IndexOrIntensities` is set to `"Intensities"`), for example `"SigIntensity"` or `"NbCells"`
`col4anno` | a character string specifying the name of the dataset column to be used for the output matrix' rows, for example `"GeneName"` or `"Internal_GeneID"`.

### Details

The function will omit values or indexes of lines/wells whose value in the column specified by `colname4val` is set to NA, (which is the case if the spot type is set to -1). If you do not want to omit those, use `generateRepMatNoFilter`.

### Value

A matrix with each row corresponding to an siRNA/gene ID (as reflected in rownames), each column to a channel value or its index in the dataset. Missing values (in case of different number of replicates occuring for different siRNAs/genes) are set to NA.

### See Also

`generateRepMatNoFilter`

### Examples

    data(exampleDataset, package="RNAither")

    replicatematrix <- generateReplicateMat(dataset, 2, "Index", "SigIntensity",  "GeneName")

[Package RNAither version 2.28.0 Index]