Skip to content

Sample metadata and files

Sample metadata and files

Gencove supports assigning metadata to a sample in JavaScript Object Notation (JSON) format.

Information commonly stored as sample metadata:

  • phenotypes (characteristics) of the individual represented by the sample
  • batch identifiers
  • alternative or auxiliary sample identifiers

Each sample has many different files assigned to it that can be retrieved using the CLI.

The following CLI commands can be used to set and get metadata:

Assigning sample metadata

Metadata can be assigned to a sample using the gencove samples set-metadata command. Specifying sample id and the --json flag together with a JSON string is mandatory.

$ gencove samples set-metadata my-sample-id --json '{"example-key": "example-value"}'
$ gencove samples set-metadata my-sample-id --json '1234567'

Retrieving sample metadata

Sample metadata can be retrieved by using the gencove samples get-metadata command. Optionally, --output-filename my-filename can be used to specify the filename where the metadata will be output. If not specified, metadata will be printed to stdout.

$ gencove samples get-metadata my-sample-id

Downloading single sample file

Download and save file

A single sample file can be downloaded using the gencove samples download-file command.

$ gencove samples download-file sample-id-1 impute-vcf destination.vcf

Include checksum file

A single file can be downloaded along with its checksum file using the gencove samples download-file command.

$ gencove samples download-file sample-id-1 impute-vcf destination.vcf --checksum

Download and stream file to stdout

A single sample file can be downloaded and streamed to stdout using the gencove samples download-file command.

$ gencove samples download-file sample-id-1 impute-vcf -