Skip to content

Fix sorting by chromosome and position, make it default for cnvs

Tom requested to merge 1946-sort-variants-by-genomic-position into dev

Description

Adds the capability to sort on chromosome and position in the alleleSideBarList, and use this as the default sorting if cnv's are selected.

There is a mix of sort keys for snv and cnv that don't match. The goal is a minimal change to try to make a satisfactory solution without a major refactoring. If the user change the ordering in cnv mode using chromosome, sv_len, sv_type, these keys are ignored when switching back to snv, thus that order is preserved.

If the user order by some key that exists in both snv and cnv mode, the sorting will happen when the mode is changed.

Since the user is in full control of this and has the ability to turn sorting off, it shouldn't cause a problem.

An alternative would be to switch off the sorting key, whenever the user switches mode, but not sure how complicated that is to implement.

Note: Classified CNVs are sorted in the order added.

Related issues

Closes #1946 (closed)

Notes to review (code/docs/QA)

Tests

General

  • Tests have been added that prove my fix is effective or that my feature works
  • Related tests have been modified/removed

There has not been done any changes to tests, need input how and if we need tests for this feature. I can't see we have any tests for this.

Hypothesis testing:

  • Soak testing has been done
  • Distribution between positive / negative cases has been checked

Database

  • Includes changes to database schema
  • Includes necessary database migrations

Configuration

  • Includes changes to configuration
  • Includes configuration migration instructions in documentation
Edited by Morten C. Eike

Merge request reports