RTIGER: Load, Fit, and plot

View source: R/mainfun.R

RTIGERR Documentation

Load, Fit, and plot

Description

Load, Fit, and plot

Usage

RTIGER(expDesign, rigidity=NULL, outputdir=NULL, nstates = 3,
seqlengths = NULL, eps=0.01, max.iter=50, autotune = FALSE,
max_rigidity = 2^9, average_coverage = NULL,
crossovers_per_megabase = NULL, trace = FALSE,
tiles = 4e5, all = TRUE, random = FALSE, specific = FALSE,
nsamples = 20, post.processing = TRUE, save.results = TRUE, verbose = TRUE)

Arguments

expDesign

a data Frame that contains minimum a column with the files direction (name of the column files) and another with a shorter name to be used inside the function.

rigidity

an integer number specifying the rigidity parameter to be used.

outputdir

a character string that specifies the directory in which to save the results form the function.

nstates

the number of states to be fitted in the model. A standard setting would use 3 states (Homozygous1, Heterozygous, and Homozygous2).

seqlengths

a named vector with the chromosome lenghts of the organism that the user is working with.

eps

the threshold of the difference between the parameters value between the previous and actuay iteration to stope de EM algorithm.

max.iter

maximum number of iterations of the EM algorithm before to stop in case that eps has not been achieved.

autotune

Logical value if the R-value should be tuned by our algorithm. This will take longer as it needs a first training with the rigidity value provided by the user and then the optimization step is carried. Finally, a training using the optimum R will be performed and results for the optimum R will be returned.

max_rigidity

If autotune true, R values will be explored up the value given in this parameter. Default = 2^9

average_coverage

If autotune true, for conservative results set it to the lowest average coverage of a sample in your experiment, or evne to the lowest average coverage in a (sufficiently large) region in one of your samples. The lower the value, the more conservative (higher) our estimates of the false positive segments rates. If it is not provided it will be computed as the average of all data points.

crossovers_per_megabase

If autotune true, for conservative results set it to the highest ratio of a sample in your experiment. The higher the value, the more conservative (higher) our estimates of the false positive segments rates. If it is not provided it will be computed as the average of all samples.

trace

logical value. Whether or not to keep track of the parameters for the HMM along the iterations. Deafault FALSE

tiles

length of the tiles by which the genome will be segmented in order to compute the ratio of COs in the complete dataset.

all

logical value. Whether to use the complete data set to fit the rHMM. default TRUE.

random

Logical value. Choose randomly a subset of the complete dataset to fit the rHMM. Default FALSE

specific

Logical value to specify which samples to take.

nsamples

if random TRUE, how many samples should be taken randomly.

post.processing

Logical value. Whether to run an extra step that fine maps the segment borthers. Default TRUE

save.results

Logical value, whether to generate and save the plots and igv files.

verbose

Logical, whether to print info to console.

Value

Matrix m x n. M number of samples and N chromosomes.

RTIGER object

Examples

## Not run: 
data("ATseqlengths")
sourceJulia()
path = system.file("extdata",  package = "RTIGER")
files = list.files(path, full.names = TRUE)
nam = sapply(list.files(path ), function(x) unlist(strsplit(x, split = "[.]"))[1])
expDesign = data.frame(files = files, name = nam)
names(ATseqlengths) = paste0("Chr", 1:5)
myres = RTIGER(expDesign = expDesign,
               outputdir = "/home/campos/Documents/outputjulia/",
               seqlengths = ATseqlengths,
               rigidity = 4,
               max.iter = 2,
               trace = FALSE,
               save.results = TRUE)

## End(Not run)


RTIGER documentation built on March 31, 2023, 5:41 p.m.