Add optional Desc field to set the description in the header.#33
Add optional Desc field to set the description in the header.#33roryk wants to merge 1 commit intobrentp:masterfrom
Conversation
|
The tests don't work for me-- I think there are some hard-coded paths in there, so I couldn't run them. I checked with and without the description though on my test file and it works ok. |
|
I'm a little hesitant about this because I want to keep the .conf stuff as light as possible so that it's not intimidating to write (or to read the docs about it). Do you really need to customize the Description? |
|
Hi @brentp, Thanks for the response. I think maybe I'll end up editing it, to try to avoid fielding endless questions about what something like: means. But I totally hear you about feature creep making stuff turn into a complicated mess. I can replace it after, it doesn't have to be something done in vcfanno for sure. |
|
oh, I see. Let me think on it. |
|
what about changing the description to something more generic like: ? |
|
Hi Brent, 'calculated from overlapping values in columns 4' doesn't really describe how we got there though, since there is some other logic that went in it. For this example we did some checking if it was a SNP and if it was a valid edit event, etc. Maybe that is information handled better outside of the VCF file though, looking at the other INFO field descriptions they aren't too descriptive. Thanks! |
|
+1 to being able to override the description in the config; I want to be able to add context about what that column actually contains. I will reheader after the fact, but it would be nice to be able to set descriptions directly through vcfanno. |
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| if (s.Op == "first" || s.Op == "self") && htype == ntype { | ||
| if (s.Desc != "") { | ||
| desc = s.Desc | ||
| } else if (s.Op == "first" || s.Op == "self") && htype == ntype { |
There was a problem hiding this comment.
Bug: Description Interference with DP2 Type/Number Metadata
When s.Desc is set (not empty), the if-else chain will skip the DP2 field handling at lines 386-389, which not only sets the description but also critically sets number = "2" and ntype = "Integer". This means that if a user provides a custom description for a DP2 field, the VCF header will have incorrect type and number metadata. The logic for setting number and ntype should be separated from description generation so that custom descriptions don't bypass field-specific type/number settings.
HI Brent,
This adds a
Descfield to the annotation configuration so you can override what the description of the field is in the header. Go is new to me so let me know if I screwed anything up.Note
Adds optional
Descto annotation config and sources, using it to override INFO header descriptions.api.Source: addDescfield and use it inUpdateHeaderto override auto-generated descriptions.shared.Annotation: addDescfield and propagate it inFlattentoSource.Written by Cursor Bugbot for commit a843cf3. This will update automatically on new commits. Configure here.