Bioconductor / VariantAnnotation

Annotation of Genetic Variants
https://bioconductor.org/packages/VariantAnnotation
27 stars 20 forks source link

data with AD field for demonstration of allele depth counting function ad_mats #64

Closed vjcitn closed 10 months ago

vjcitn commented 2 years ago

somewhat sizable data... sorry

hpages commented 2 years ago

Hi @vjcitn ,

I believe the function would be more useful if it stays out of the business of reading the VCF file. More precisely, if you make it operate directly on a VCF object, then it can be used in more contexts. Like inside a function that only has access to the VCF object (but not to the file), or when the VCF object was obtained in other ways (e.g. from a serialized object or from binding 2 VCF objects together etc...).

Note that we usually use camelCase for user-facing functions.

Also do you think you can use <- instead of = for assignment? Sorry to be picky but that's what is used across the entire VariantAnnotation package (and across all core packages AFAIK, with maybe some rare exceptions in graph).

H.

vjcitn commented 2 years ago

Great advice, glad I didn't just push it in. I will work on these mods.