Adding the ability to extract additional bam-readcount fields into the #85
Conversation
99e3d92 to
9dd2660
Compare
|
removed dockerfile - we'll make that a separate PR with github actions and such |
| help='Append avg base quality of variant-supporting reads (FORMAT tag: VABQ).' | ||
| ) | ||
| extra.add_argument( | ||
| '-E', '--avg-se-mapping-quality', action='store_true', default=False, |
There was a problem hiding this comment.
I'm not sure I'm a fan of the mix of upper and lower case single letter arguments but I suppose because of the number of arguments we are adding here, there isn't really a good way around it.
There was a problem hiding this comment.
That's totally fair - I generally dislike uppercase arguments too. Will add an update to address this
susannasiebert
left a comment
There was a problem hiding this comment.
A couple of small questions and requests but otherwise this looks good.
| elif f.tag not in seen_extra_tags: | ||
| new_header.add_format_line(OrderedDict([ | ||
| ('ID', f.tag), ('Number', f.number), ('Type', f.vcf_type), ('Description', f.desc), | ||
| ])) | ||
| seen_extra_tags.add(f.tag) |
There was a problem hiding this comment.
I'm not quite understanding why you need this logic with seen_extra_tags here.
| seen_extra_tags.add(f.tag) | ||
| return vcfpy.Writer.from_path(output_file, new_header) | ||
|
|
||
| def write_depth(entry, sample_name, field, value): |
There was a problem hiding this comment.
I think we should consider renaming this method to better match what is being done here. e.g. add_format_value or something similar.
2) adds a more comprehensive test for these new arguments 3) removes the seen_extra_tags line, which was left over from a previous version. It already handles the case where -a and individual fields (e.g. -q) are provided
|
Changes:
|
I worked this up a while back, upon request of some folks doing heavy-duty variant filtering, and am just getting around to cleaning it up and pushing it. It adds code to extract one or more of the detailed bam-readcount fields about variants and their supporting reads and adds that info to the VCF.