Add back REF/ALT to csv output in addition to resolved GT fields#83
Add back REF/ALT to csv output in addition to resolved GT fields#83nalinigans merged 1 commit intodevelopfrom
Conversation
| // Process REF, ALT and GT first. | ||
| process_str_field("REF", calls, dims, sizes); | ||
| process_str_field("ALT", calls, dims, sizes); | ||
| process_str_field("GT", calls, dims, sizes); |
There was a problem hiding this comment.
Naive question: can you tell me why we process REF, ALT, GT first instead of in the loop?
There was a problem hiding this comment.
They could be in any order based on how GenomicsDB processes them. We could let the loop handle it, but sometimes, the order is ALT,REF,..,GT. I just thought it nicer to have REF before ALT, guess it does not matter for GT as much.. But, I can process them in the loop if that is OK too. Let me know.
There was a problem hiding this comment.
Yeah, can't decide. My initial concern was that this bit of code gets invoked for each variant so trying to minimize any extraneous code. But that's probably micro-optimization...thoughts?
There was a problem hiding this comment.
This bit of code is not invoked per variant call, it happens only once per query - see. The calls themselves are already populated as m_string_fields in the dictionary backed by std::map<std::string, std::vector<PyObject *>> m_string_fields as part of the code here. That said, I could probably order them at initialization.
There was a problem hiding this comment.
Ah - thanks for that clarification, I misread this as being part of process somehow. I think this is good to merge the way it is if you want.
No description provided.