Description Usage Arguments Value Note Author(s) References See Also Examples
View source: R/from_genotype_utils.R
Export a fitness landscape in a format that is understood by MAGELLAN http://wwwabi.snv.jussieu.fr/public/Magellan/ and obtain fitness landscape statistics from MAGELLAN.
1 2 3 4 5 6 7 8  | to_Magellan(x, file,
            max_num_genotypes = 2000)
Magellan_stats(x, max_num_genotypes = 2000,
               verbose = FALSE,
               use_log = FALSE,
               short = TRUE,
               replace_missing = FALSE)
 | 
x | 
 One of the following: 
 The first two are the same as the format for the   | 
file | 
 The name of the output file. If NULL, a name will be
created using   | 
max_num_genotypes | 
 Maximum allowed number of genotypes. For some
types of input, we make a call to   | 
verbose | 
 If TRUE provide additional information about names of intermediate files.  | 
use_log | 
 Use log fitness when computing statistics. Note that
the   | 
short | 
 Give short output when computing statistics.  | 
replace_missing | 
 From MAGELLAN's   | 
to_Magellan: A file is written to disk. You can then plot and/or show summary
statistics using MAGELLAN.
Magellan_stats: MAGELLAN's statistics for fitness
landscapes. If you use short = TRUE a vector of statistics is
returned. If short = FALSE, MAGELLAN returns a file with
detailed statistics that cannot be turned into a simple vector of
statistics. The returned object uses readLines and, as a
message, you are also shown the path of the file, in case you want to
process it yourself.
If you try to pass a fitness specification with order effects you will receive an error, since that cannot be plotted with MAGELLAN.
Ramon Diaz-Uriarte
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
allFitnessEffects,
evalAllGenotypes,
allFitnessEffects,
rfitness
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29  | ## 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)
## Default, short output
Magellan_stats(allFitnessEffects(cs))
## Long output; since it is a > 200 lines file,
## place in an object. Name of output file is given as message
statslong <- Magellan_stats(allFitnessEffects(cs), short = FALSE)
## Default, short output of two NK fitness landscapes
rnk1 <- rfitness(6, K = 1, model = "NK")
Magellan_stats(rnk1)
rnk2 <- rfitness(6, K = 4, model = "NK")
Magellan_stats(rnk2)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.