scale_to_wt_fitness: Function generating the fitness of the mutants' genotypes in...

Description Usage Arguments Value

View source: R/model_magellan.R

Description

Calls the fl_generate binary from MAGELLAN using system(command), and return a fitness landscape generated by MAGELLAN reordered as genotype_table.

Usage

1
scale_to_wt_fitness(nb_mut, genotype_table, fitness_wt, fl)

Arguments

nb_mut

A natural number. Number of mutations (or loci in MAGELLAN) used to form the different genotypes from genotype_table.

genotype_table

A matrix of 0 and 1. The rows correspond to different genotypes and the columns to the mutations that are considered for these genotypes. A genotype (at a certain row) has a given mutation when there is a 1 in the corresponding column. A row with only zeros correspond to the wild type.

fitness_wt

A real number. Fitness of the wild type used as reference.

fl

A matrix of logical and a last colum of reals. A fitness landscape with the first columns corresponding to a genotype_table and the last column to the fitness of the genotype of each row.

Value

A vector of fitnesses with the fisrt element equal to fitness_wt and the other scaled to correspond to mutants with a wild type with fitness fitness_wt.


YoannAnciaux/inferenceFitnessLandscape documentation built on Oct. 31, 2019, 1:19 a.m.