Open blankdots opened 4 years ago
based on @teemukataja offline conversation:
Solved in beacon network UI with: https://github.com/CSCfi/beacon-network-ui/pull/32/commits/2ffc7000fefb8d38a3c70e9240453de0d28f4784
Three solutions come to mind:
{
"datasetAlleleResponses": [
{
...,
"info": {
"fileType": "vcf"
}
}
]
}
{
"datasetAlleleResponses": [
{
...,
"info": {
"coordinateBase": 1
}
}
]
}
{
"datasetAlleleResponses": [
{
...,
"info": {
"fileType": "vcf",
"coordinateBase": 1
}
}
]
}
We could get the fileType
from the input datafiles *.vcf
in beacon_init
, so they are inserted into the database with the metadata.
What if a dataset contains multiple file types? Then we could use arrays instead "fileType": ["bam", "vcf"]
, and "coordinateBase": [0, 1]
or "coordinateBase": "mixed"
, but I don't know if it's typical for a dataset to contain mixed filetypes and mixed coordinate base systems... Will need to investigate.
Proposed solution
Have a
info
in the response that specifies if the data in the beacon is 0-based or 1-based. While the recommendation for the API is to be 0-based https://github.com/ga4gh-beacon/specification/issues/251 , that might not always be the case. Hence we will add some information to the API that a beacon deployment can specify what kind of data it has.This is GA4GH related.
DoD (Definition of Done)
info
object contains a key that specifies if0-base
or1-base
.Testing
Unit test and peer review.