setPloidy: Set ploidy

setPloidyR Documentation

Set ploidy

Description

Set the ploidy of a given population in the input GbsrGenotypeData object.

Usage

setPloidy(object, ploidy = 2, ...)

## S4 method for signature 'GbsrGenotypeData'
setPloidy(object, ploidy = 2)

Arguments

object

A GbsrGenotypeData object.

ploidy

A integer value to specify the ploidy of the given population.

...

Unused.

Details

The genotype estimation by estGeno() would be performed with the assumption of the ploidy specified through this function or the ploidy argument of loadGDS(). When an odd number was specified as ploidy, the ploidy of intermediate generations would be treated as ploidy + 1 to properly list up possible descendent haplotype patterns in the process by estGeno().

Value

A GbsrGenotypeData object with filters on markers.

See Also

getPloidy()

Examples

# Load data in the GDS file and instantiate a [GbsrGenotypeData] object.
gds_fn <- system.file("extdata", "sample.gds", package = "GBScleanR")
gds <- loadGDS(gds_fn)

gds <- setPloidy(gds, ploidy = 4)

# Close the connection to the GDS file.
closeGDS(gds)


tomoyukif/GBScleanR documentation built on June 1, 2025, 10:13 p.m.