For the complete documentation index, see llms.txt. This page is also available as Markdown.

samples attributes set

Replace a sample's custom attributes

Synopsis

omics workbench samples attributes set SAMPLE_ID (JSON | @FILE | -)
  [--namespace=STRING]

Description

Replace one sample's custom attributes. The attributes can be given as a JSON literal, read from a file with @, or read from standard input with -.

The document shape

This command takes the attributes on their own, because the sample is already named by SAMPLE_ID:

{"kit_lot": "A7-2291", "passed_qc": true}

That is not the same shape as the bulk upload document, which is keyed by sample ID. Passing a *.attributes.json file here is rejected with a pointer to the bulk command, because that document would otherwise be stored nested under a single sample.

To set attributes on many samples at once, use samples metadata upload with a file named *.attributes.json.

Examples

Set attributes from a JSON literal:

omics workbench samples attributes set HG002 '{"kit_lot": "A7-2291", "passed_qc": true}'

Set attributes from a file, using the @ prefix:

Set attributes from standard input:

Add an attribute to a sample that already has some, by reading the current set first:

Positional Arguments

SAMPLE_ID

The ID of the sample. Sample IDs can be retrieved from the samples list command.

JSON | @FILE | -

The attributes to store, as a JSON object. The @ prefix is required to read from a file; a bare path is rejected. Use - to read the document from standard input.

Flags

--namespace=STRING

An optional flag to define the namespace to connect to. By default, the namespace is extracted from the user's credentials.

Last updated

Was this helpful?