1 of 23

ga4gh.org

2 of 23

Sequence collections

how to uniquely identify and compare genomes

Andy Yates, Nathan Sheffield, Timothee Cezard

ga4gh.org

3 of 23

What’s a sequence collection ?

It’s a collection of sequences!

Like a reference genome

… Or a transcriptome

… Or a proteome

Sequence

Refget

hay6rlosvc4jdonnwy26fdk0

klavctwpjsccxoobfilld5oa67

SeqCol

ga4gh.org

4 of 23

Use cases in brief

  • Cache and retrieve repetitive header information concerning sequences as required
  • Variation annotation and submission for archiving
  • A computable identifier for reference genomes for reproducibility
    • Refgenie reference genome asset identity
  • Assert compatibility between reference genomes
    • BED file comparison
    • Genome browser visualizations

ga4gh.org

5 of 23

Introduction to Sequence Collections

Project goal:

  • to standardize unique identifiers for collections of sequences
  • can be used to identify genomes, transcriptomes, or proteomes -- anything that can be represented as a collection of sequences

The project specifies:

  • an algorithm for computing sequence identifiers from collections
  • a lookup API to retrieve a collection given an identifier
  • a comparison API to assess compatibility of two collections

ga4gh.org

6 of 23

How do we represent a sequence collection ?

JSON object where each sequence collection attribute is a property of the JSON

Sequences as refget digests

Names used for these sequences

Length of the sequences

ga4gh.org

7 of 23

How do we represent a sequence collection ?

JSON object where each sequence collection attribute is a property of the JSON

ga4gh.org

8 of 23

How do we represent a sequence collection ?

JSON object where each sequence collection attribute is a property of the JSON

ga4gh.org

9 of 23

Computing sequence identifiers

General algorithm

Normalisation: convert JSON into unique string representation

Using RFC8785: JSON Canonicalization Scheme (JCS)

Hashing: SHA512 truncated to the first 24 bits and converted to base64

seqcol

Normalisation

Hashing

digest

ga4gh.org

10 of 23

Computing sequence identifiers

General algorithm

2

1

3

4

ga4gh.org

11 of 23

Computing sequence identifiers

Inherent/non-inherent attributes

  • Inherent attributes are included in the calculation of the identifier
  • Non-inherent attributes enables:
    • Storing additional metadata

    • Storing comparison helpers

sorted-name-length

ga4gh.org

12 of 23

Computing sequence identifiers

Inherent/non-inherent attributes

  • Inherent attributes are included in the calculation of the identifier
  • Non-inherent attributes enables:
    • Storing additional metadata

    • Storing comparison helpers

sorted-name-length

sorted-names-lengths attribute

ga4gh.org

13 of 23

API specification

ga4gh.org

14 of 23

API specification (Lookup)

ga4gh.org

15 of 23

API specification (Comparison)

ga4gh.org

16 of 23

API demonstration

ga4gh.org

17 of 23

Sequence Collections status and future

ADR specificies:

  • an algorithm for computing sequence identifiers from collections
  • a lookup API to retrieve a collection given an identifier
  • a comparison API to assess compatibility of two collections

Future work:

  • Finalise service-info
  • Write up specification
  • Implementations
  • Integration in tooling

ga4gh.org

18 of 23

Use case: Variation detection and annotation

Sequencing data

Variant call

Calculate

Sequence collection

Genome

chr1

chr2

VCF

##Seqcollection=<ID=oshqvxks73nsa>

Variant annotation

SeqCol

Server

Annotated VCF

##Seqcollection=<ID=oshqvxks73nsa>

Check compatibility of oshqvxks73nsa with supported annotation

Annotation

1

2

ga4gh.org

19 of 23

Use case: Variation Submission for Archiving

SeqCol

Server

Annotated VCF

##Seqcollection=<ID=oshqvxks73nsa>

Check compatibility of oshqvxks73nsa with supported genome

Genome

Annotated VCF

##Seqcollection=<ID=oshqvxks73nsa>

Validator

ga4gh.org

20 of 23

Use case: Tracking Refgenie asset reference identity

ga4gh.org

21 of 23

Use case: Coordinate system and visualisation

ga4gh.org

22 of 23

Use case: Caching header information for gains!

Retrieve/cache locally

(see CRAM)

Formatted header

ga4gh.org

23 of 23

Conclusion: get involved

Read and comment on the draft specification here:

View a demo implementation here: https://seqcolapi.databio.org

Software: https://github.com/refgenie/seqcol

Join our calls at:

  • Every other Wednesday at 2pm GMT / 10am ET
  • Reach out to reggan.thomas@ga4gh.org to get involved & invites

ga4gh.org