Description Usage Arguments Details Value Author(s) See Also Examples
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.
1 2 3 | sampleinfo(object)
sampleinfo(object) <- value
|
object |
A |
value |
A |
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
.
sampleinfo
returns a DataFrame
containing sample metadata.
Lindsay V. Clark
1 | # To be added
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.