Skip to content

Multiinfo#87

Open
chrisamiller wants to merge 6 commits into
griffithlab:masterfrom
chrisamiller:multiinfo
Open

Multiinfo#87
chrisamiller wants to merge 6 commits into
griffithlab:masterfrom
chrisamiller:multiinfo

Conversation

@chrisamiller

Copy link
Copy Markdown
Collaborator

overhauls vcf-info-annotator:

  • Multi-column annotation (--column-mappings / -m)
    old: accepted a single info_field argument with separate -f/-d flags for format and description.
    new: -m/--column-mappings flag that accepts a comma-separated list of source_col:info_field:type:description mapping
    allows multiple TSV columns to be written to multiple INFO fields. Source and version metadata can optionally be appended as 5th and 6th colon-separated fields

  • TSV format now requires a header row.

  • does some sanity checking on fields in coerce_value

    • empty string pass through as "."
    • NA/NaN/Inf values handled appropriately
    • entries that can't be coerced will cause a crash ("red" can't be coerced to integer)

Points for discussion:

  • change in how overwrite works:

    • previously, retained the original INFO header line, now replaces with the definition in arguments
    • adds a --clear-existing flag that works with --overwrite. If just --overwrite is specified, existing annotations from positions not in the new tsv file are retained. If --overwrite and --clear-existing are specified, existing annotations that don't match with positions in the new file are removed
  • Reverse compatibility is broken - if we keep these changes, we'll have to update some pipelines downstream. We could shoehorn in a way to maintain the old behavior, but this felt cleaner. We should talk, though!

@chrisamiller

Copy link
Copy Markdown
Collaborator Author

This would close #46 (though in a slightly more complex way)

Also, the tests are going to continue to fail until PR #86 is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant