Skip to content

CramSource get_info should return single dict instead of list with only one dict in it. #23

Description

@grosscol

Issue or current state

The get_info method of the legacy sequences hander returned a list with a single dictionary in it. The CramSource class mirrors this behavior to keep the API the same.

Resolved when

Change made in CramSource and subclasses:

  • return dictionary instead of list
  • return empty dict when no matching variant is found in variant_map.

Corresponding issue made in Bravue project.

Note about Bravue

The relevant code in the UI is in src/components/Reads.vue. An issue will have to be filed there and the changes to the API reflected in the data processing on the UI side.

     .get(`${this.api}/variant/api/snv/cram/summary/${this.variant.variant_id}`)
      .then( response => {
        var result = response.data;
        if (result.data.length > 0) {
          var counts = result.data[0];
          this.counts.n_homs = counts.n_homozygous;
          this.counts.n_hets = counts.n_heterozygous;
        }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageLanding area for issues discovered during development.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions