to_Magellan {OncoSimulR} | R Documentation

## Create output for MAGELLAN.

### Description

Create a fitness landscape in a format that is understood by MAGELLAN http://wwwabi.snv.jussieu.fr/public/Magellan/.

### Usage

    to_Magellan(x, file,
                max_num_genotypes = 2000)

### Arguments

`x` | One of the following: A matrix (or data frame) with g + 1 columns. Each of the first g columns contains a 1 or a 0 indicating that the gene of that column is mutated or not. Column g+ 1 contains the fitness values. This is, for instance, the output you will get from `rfitness`. A two column data frame. The second column is fitness, and the first column are genotypes, given as a character vector. For instance, a row "A, B" would mean the genotype with both A and B mutated. The output from a call to `evalAllGenotypes`. Make sure you use `order = FALSE` in that call. The output from a call to `evalAllGenotypesMut`. Make sure you use `order = FALSE`. The output from a call to `allFitnessEffects` (with no order effects in the specification). The first two are the same as the format for the `genotFitness` component in `allFitnessEffects`.
`file` | The name of the output file. If NULL, a name will be created using `tempfile`.
`max_num_genotypes` | Maximum allowed number of genotypes. For some types of input, we make a call to `evalAllGenotypes`, and use this as the maximum.

### Value

A file is written to disk. You can then plot and/or show summary statistics using MAGELLAN.

### Note

If you try to pass a fitness specification with order effects you will receive an error, since that cannot be plotted with MAGELLAN.

### Author(s)

Ramon Diaz-Uriarte

### References

MAGELLAN web site: http://wwwabi.snv.jussieu.fr/public/Magellan/

Brouillet, S. et al. (2015). MAGELLAN: a tool to explore small fitness landscapes. bioRxiv, 31583. http://doi.org/10.1101/031583

### See Also

`allFitnessEffects`, `evalAllGenotypes`, `allFitnessEffects`, `rfitness`

### Examples

    ## Generate random fitness for four-genes genotype
    ## and export landscape.

    r1 <- rfitness(4)
    to_Magellan(r1, NULL)

    ## Specify fitness using a DAG and export it
    cs <-  data.frame(parent = c(rep("Root", 3), "a", "d", "c"),
                          child = c("a", "b", "d", "e", "c", "f"),
                          s = 0.1,
                          sh = -0.9,
                          typeDep = "MN")

    to_Magellan(allFitnessEffects(cs), NULL)

[Package OncoSimulR version 2.14.0 Index]