getParents: Get parental sample information

getParentsR Documentation

Get parental sample information

Description

This function returns sample IDs, member IDs and indexes of parental samples set via setParents(). Sample IDs are IDs given by user or obtained from the original VCF file. Member IDs are serial numbers assigned by setParents().

Usage

getParents(object, bool = FALSE, verbose = TRUE, ...)

## S4 method for signature 'GbsrGenotypeData'
getParents(object, bool, verbose = TRUE)

Arguments

object

A GbsrGenotypeData object.

bool

If TRUE, the function returns a logical vector indicating which samples have been set as parents.

verbose

If FALSE, the function does not print a warning message even when parents were not specified in the given GbsrGenotypeData object. The setting verbose = FALSE is used in the other functions to call getParents() without evoking unnecessary warnings to users.

...

Unused.

Value

A data frame of parents information indicating sampleIDs, memberIDs and indexes of parental lines assigned via setParents().

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)

# Find the IDs of parental samples.
parents <- grep("Founder", getSamID(gds), value = TRUE)

# Set the parents.
gds <- setParents(gds, parents = parents)

# Get the information of parents.
getParents(gds)

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



tomoyukif/GBScleanR documentation built on March 12, 2024, 6:27 a.m.