build_metadata: Create blank metadata

Description Usage Arguments Value

Description

Create a new empty SRA metadata data frame with columns named and typed accordingly.

Usage

1
2
build_metadata(sample_attrs, submission = NULL, col_pairs = NULL,
  constants = NULL)

Arguments

sample_attrs

data frame of existing sample metadata to draw from. Any names given in the col_pairs argument will be used to explicitly map column names from the existing data frame to the new data frame. Remaining columns with matching names will also be used. Other columns not in col_pairs or the template's fields are ignored.

submission

the accession assigned by the submission portal for the submission, like "SUB####". Will be attached to the output data frame as an attribute.

col_pairs

named vector of column names in the existing data frame with names set to column names in the new data frame. Vector names that don't match known column names signify custom columns to add.

constants

vector of field names to match to constant values for all samples.

Value

data frame with SRA metadata columns


ressy/srahelper documentation built on May 29, 2019, 11:03 p.m.