Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add variants annotations view #351

Open
antonylebechec opened this issue Jan 2, 2025 · 1 comment
Open

Add variants annotations view #351

antonylebechec opened this issue Jan 2, 2025 · 1 comment
Assignees
Labels
improve Improve code

Comments

@antonylebechec
Copy link
Collaborator

Variants annotations view to explore data and to avoid export fields for operations/calculation/annotations...

@antonylebechec antonylebechec added the improve Improve code label Jan 2, 2025
@antonylebechec antonylebechec self-assigned this Jan 2, 2025
antonylebechec added a commit that referenced this issue Jan 2, 2025
antonylebechec added a commit that referenced this issue Jan 2, 2025
@antonylebechec
Copy link
Collaborator Author

antonylebechec commented Jan 6, 2025

Creating annotations view implies to define header INFO/tags properties correctly.
As an example, a INFO/Tags such as:

##INFO=<ID=DP_average,Number=1,Type=Float,Description="DP average [Release=0.9.3;Date=20210721;AnnotationType=calculation]">
##INFO=<ID=DP_list,Number=.,Type=Float,Description="DP listed from quality [Release=0.9.3;Date=20210721;AnnotationType=calculation]">

The DP_average is a float type (Type=Float), and a uniq value (Number=1), as DP_list is a float type (Type=Float), and a list of values (Number=.). It means that SQL columns will be defined as a FLOATand a FLOAT[], respectively.
It supposes that queries (e.g. for prioritization, annotations) need to consider these formats.

Values allowed are:

  • for DP_average: 120, 125.20, -12.5, but not 150,42 which is a list, and can not be casted as a FLOAT!
  • for DP_list: 120, 125.20, -12.5, and 150,42, 125.20,-12.5. However, this column can not be used as a uniq FLOAT value (DP_list>150 failed), but as a list (e.g. list_min(DP_list)>150, DP_list[1]>150)

As an example, for a prioritization query:

SELECT *
FROM variants_view
WHERE DP_average > 150
  AND list_min(DP_list) > 100

Otherwise, query can cast value:
For a NFO/Tag as:

##INFO=<ID=ANN_List,Number=1,Type=String,Description="DP listed from quality [Release=0.9.3;Date=20210721;AnnotationType=calculation]">

And a query:

SELECT *
FROM variants_view
WHERE string_split(ANN_list, ',')[1] = 'Annotation1'

This is not easily possible to cast a list of float (or integer) with this solution.

antonylebechec added a commit that referenced this issue Jan 6, 2025
…ons_view

Change default param detect_type_list as True #351
antonylebechec added a commit that referenced this issue Jan 13, 2025
antonylebechec added a commit that referenced this issue Jan 13, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
improve Improve code
Projects
None yet
Development

No branches or pull requests

1 participant