area_estimate_ploidy: Estimate ploidy using area method

View source: R/ploidy_est.R

area_estimate_ploidyR Documentation

Estimate ploidy using area method

Description

This function estimates ploidy using the area method. It evaluates the number of copies by chromosome, sample, or chromosome arm. Note that this function does not have optimal performance, and visual inspection of the plots is required to confirm the estimated ploidy.

Usage

area_estimate_ploidy(
  qploidy_standardization = NULL,
  samples = "all",
  level = "chromosome",
  ploidies = NULL,
  area = 0.75,
  centromeres = NULL
)

Arguments

qploidy_standardization

Object of class qploidy_standardization.

samples

If "all", all samples contained in the qploidy_standardization object will be evaluated. If a vector with sample names is provided, only those will be evaluated.

level

Character identifying the level of the analysis. Must be one of "chromosome", "sample", or "chromosome-arm". If 'chromosome-arm', the analysis will be performed by chromosome arm (only if 'centromeres' argument is defined).

ploidies

Vector of ploidy levels to test. This parameter must be defined.

area

Area around the expected peak to be considered. Default is 0.75.

centromeres

Vector with centromere genomic positions in bp. The vector should be named with the chromosome IDs. This information will only be used if 'chromosome-arm' level is defined.

Value

A list of class 'qploidy_area_ploidy_estimation' containing:

  • ploidy: Estimated ploidy by area method.

  • prop_inside_area: Proportion of dots inside selected area.

  • diff_first_second: Difference between first and second place in area method.

  • sd_inside_area: Standard deviation inside area.

  • highest_correlation_modes: Highest correlation.

  • modes_inside_area: Modes inside areas.

  • tested: Tested ploidies.

  • ploidy.sep: Separated ploidy results.

  • chr: Unique chromosomes in the dataset.

  • n.inbred: Number of highly inbred samples.


Qploidy documentation built on June 8, 2025, 10 a.m.