resetMarFilter: Reset the filter made by 'setMarFilter()'

resetMarFilterR Documentation

Reset the filter made by setMarFilter()

Description

Remove "invalid" labels put on markers and make all markers valid.

Usage

resetMarFilter(object, ...)

## S4 method for signature 'GbsrGenotypeData'
resetMarFilter(object)

Arguments

object

A GbsrGenotypeData object.

...

Unused.

Value

A GbsrGenotypeData object after removing all filters on markers.

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)

# Check the number of markers.
nmar(gds)

# Summarize the information needed for filtering.
gds <- countGenotype(gds)
gds <- countRead(gds)

# filter out some markers meeting the criteria.
gds <- setMarFilter(gds,
                      id = getMarID(gds)[1:100],
                      missing = 0.2,
                      dp = c(5, Inf))

# Check the number of the retained markers.
nmar(gds)

# Reset all filters applied above.
gds <- resetMarFilter(gds)

# Check the number of the markers again.
nmar(gds)

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

tomoyukif/GBScleanR documentation built on Oct. 31, 2024, 2:43 a.m.