findGSEP {findGSEP}R Documentation

Estimate genome size of polyploid species using k-mer frequencies.

Description

findGSEP is a function for multiple polyploidy genome size estimation by fitting k-mer frequencies iteratively with a normal distribution model.

To use findGSEP, one needs to prepare a histo file, which contains two tab-separated columns. The first column gives frequencies at which k-mers occur in reads, while the second column gives counts of such distinct k-mers. Parameters k and related histo file are required for any estimation.

Dependencies (R library) required: pracma, fGarch, etc. - see DESCRIPTION for details.

Usage

findGSEP(
  path,
  samples,
  sizek,
  exp_hom,
  ploidy,
  range_left,
  range_right,
  xlimit,
  ylimit,
  output_dir = "outfile"
)

Arguments

path

is the histo file location (mandatory).

samples

is the histo file name (mandatory)

sizek

is the size of k used to generate the histo file (mandatory). K is involved in calculating heterzygosity if the genome is heterozygous.

exp_hom

a rough average k-mer coverage for finding the homozygous regions. In general, one can get peaks in the k-mer frequencies file, but has to determine which one is for the homozygous regions, and which one is for the heterozygous regions. It is optional, however, it must be provided if one wants to estimate size for a heterozygous genome. VALUE for exp_hom must satisfy fp < VALUE < 2*fp, where fp is the freq for homozygous peak. If not provided, 0 by default assumes the genome is homozygous.

ploidy

is the number of ploidy. (mandatory).

range_left

is the left range for estimation, default is exp_hom*0.2, normally do not need to change this. (optional).

range_right

is the right range for estimation, default is exp_hom*0.2, normally do not need to change this. (optional).

xlimit

is the x-axis range, if not given, then it will automatically calculate a proper range, normally do not need to change this. (optional).

ylimit

is the y-axis range, if not given, then it will automatically calculate a proper range, normally do not need to change this. (optional).

output_dir

is the path to write output files (optional). If not specify, will use tempdir() as output directory.

Value

No return value, called for side effects. The function generates PDF, PNG, and CSV files in the specified output directory.

Examples

## Not run: 
test_histo <- system.file("extdata","example.histo",package = "findGSEP")
path <- dirname(test_histo)
samples <- basename(test_histo)
sizek <- 21
exp_hom <- 200
ploidy <- 3
range_left <- exp_hom*0.2
range_right <- exp_hom*0.2
xlimit <- -1
ylimit <- -1
output_dir <- tempdir()

findGSEP(path, samples, sizek, exp_hom, ploidy, range_left, range_right, xlimit, ylimit, output_dir)

## End(Not run)

[Package findGSEP version 1.2.0 Index]