Illumina / Nirvana

The nimble & robust variant annotator
https://illumina.github.io/NirvanaDocumentation/
GNU General Public License v3.0
172 stars 44 forks source link

Multiple entries for the same variant in custom databases #100

Open algarsi3 opened 1 year ago

algarsi3 commented 1 year ago

I need to create a custom database where a variant can have zero, one, or many annotations. For instance, I need an output like this:

{
...
"variants": [
        {
          "vid": "17-7125299-C-T",
          "chromosome": "chr17",
          "begin": 7125299,
          "end": 7125299,
          "refAllele": "C",
          "altAllele": "T",
          "my_db": [
            {
              "significance": "resistance",
              "disease": "colorectal cancer",
              "direction": "supports",
            },
            {
              "significance": "sensitivity response",
              "disease": "ovary adenocarcinoma",
              "direction": "supports",
            },
          ]
...
}

I tried creating a tsv file with duplicated entries, which threw an error. I can generate a custom database that leads to the following annotation:

{
...
"variants": [
        {
          "vid": "17-7125299-C-T",
          "chromosome": "chr17",
          "begin": 7125299,
          "end": 7125299,
          "refAllele": "C",
          "altAllele": "T",
          "my_db": {
            "significance": "resistance|sensitivity response",
            "disease": "colorectal cancer|ovary adenocarcinoma",
            "direction": "supports|supports"
          },
...
}

However, this is not what I would like to achieve. Could you help me achieve the desired output? This output is similar to the "transcripts" annotations, but I cannot see how to generate such custom databases in the documentation.

Thank you.

algarsi3 commented 1 year ago

Hello, would you be able to help me with this?