nmar: Return the number of SNPs.

nmarR Documentation

Return the number of SNPs.

Description

This function returns the number of SNPs recorded in the GDS file connected to the given GbsrGenotypeData object.

Usage

nmar(object, valid = TRUE, chr = NULL, ...)

## S4 method for signature 'GbsrGenotypeData'
nmar(object, valid, chr)

Arguments

object

A GbsrGenotypeData object.

valid

A logical value. See details.

chr

A index to spefcify chromosome to get information.

...

Unused.

Details

If valid = TRUE, the number of markers which are labeled TRUE in the "valid" column of the "marker" slot will be returned. If you need the number of over all markers, set valid = FALSE. validMar() tells you which markers are valid.

Value

An integer value to indicate the number of SNP markers.

See Also

validMar()

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)

nmar(gds)

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


tomoyukif/GBScleanR documentation built on April 27, 2024, 9:06 a.m.