make.permutation {metaseqR} | R Documentation

## Create counts matrix permutations

### Description

This function creates a permuted read counts matrix based on the `contrast` argument (to define new virtual contrasts of the same number) and on the `sample.list` to derive the number of samples for each virtual condition.It is a helper for the `meta.perm` function.

### Usage

        make.permutation(counts, sample.list, contrast,
            repl = FALSE)

### Arguments

`counts` | the gene read counts matrix.
`sample.list` | the list containing condition names and the samples under each condition.
`contrast` | the contrasts vector. See the main `metaseqr` help page.
`repl` | the same as the replace argument in `sample` function.

### Value

A list with three members: the matrix of permuted per sample read counts, the virtual sample list and the virtual contrast to be used with the `stat.*` functions.

### Author(s)

Panagiotis Moulos

### Examples

    data("mm9.gene.data",package="metaseqR")
    per <- make.permutation(mm9.gene.counts,sample.list.mm9,
        "e14.5_vs_adult_8_weeks")

[Package metaseqR version 1.26.0 Index]