sampleinfo: Access or Modify Sample Metadata in a VCF

Description Usage Arguments Details Value Author(s) See Also Examples

Description

The sampleinfo function retrieves a DataFrame containing sample metadata from a VCF object, stored in meta(header(object))$SAMPLE, or the ##SAMPLE lines of the VCF file. The corresponding assignment function can be used to add this same metadata to a VCF object.

Usage

1
2
3
sampleinfo(object)

sampleinfo(object) <- value

Arguments

object

A VCF object.

value

A data.frame, DataFrame, or other object that can be coerced to a DataFrame. Row names should correspond to samples(header(object)), the names of the samples. Columns contain metadata about each sample.

Details

Species and Ploidy are expected to be present in the column names of value; a warning will be given if they are not. The ploidy column should be formatted “2x” for a diploid, “4x” for an autotetraploid, “2x+2x” for an allotetraploid, etc. Ploidy should be with respect to the reference genome if used, or with respect to the monoploid genome if data were generated without a reference sequence.

Other columns to optionally add are CollectionLocation, MaterialProvider, PopulationDesign, BioSample, and DOI. These metadata fields are described in the “Variant Call Format specification for the ploidyverse” document in the “doc” folder of this package installation. For any of these, as well as Species and Ploidy, descriptions are automatically added to meta(header(object))$META (corresponding to ##META lines in the file).

Custom columns can be included, in which case a warning will be printed instructing the user to add column descriptions. If your package uses custom column names and you want to avoid the warning, let Lindsay Clark know, and add a commit or pull request to add your columns to the list in the method definition.

If value is a data.frame, it should typically be constructed with the argument stringsAsFactors = FALSE.

Value

sampleinfo returns a DataFrame containing sample metadata.

Author(s)

Lindsay V. Clark

See Also

markValidity

Examples

1
# To be added

ploidyverse/ploidyverseClasses documentation built on May 25, 2019, 2:21 p.m.