Tags: aprilweilab/grgl
Tags
Better missing data support and VCF/tabix support (#86) * Bump GRGL version to 2.3 * Proper missing data support The previous missing data support was pretty weak, it just generated additional Mutation nodes that had alleles that indicated they were missing data. This made it pretty tricky to do useful calculations. Also, those Mutations took up a bunch of space that wasn't necessary. Instead, we have the new concept of a "Missingness node". So there are four kinds of nodes: 1. Sample nodes, numbered 0-(N-1), where N is the numer of haploid samples. 2. Mutation nodes, which can be any node (including Sample nodes) and just mean there is a Mutation attached to the node. 3. Empty nodes, "nothing special" or attached to the node. 4. Missingness nodes, which can be any node similar to a Mutation node, but they have no meta-data associated with them. They are however associated with a single Mutation node. So a multi- allelic site might have 3 Mutations (4 alleles total, including the REF) and all 3 of those Mutations will have distinct MutationIds, and each will be associated to a single missingness node that represents the missingness for that site. `matmul()` has a new "miss=..." option that takes a vector of the same length as the number of input matrix columns. These values are used for downward traversals when there is missing data -- the values are added to the node values for the missingness nodes. The input is by mutation (alternate allele) not site, so if you have a multi-allelic site with K alt alleles then the single missingness node for that site will get K values added to it. Bug fixes/minor improvements: * For really small datasets, there was a division by zero when a single tree exactly covered all mutations in a region. * Also speed up tree merging by merging _into_ the first tree that was built, instead of merging all the trees into an empty GRG. * MutableGRG supports loadUpEdges=false. For the same reasons as immutable GRGs, a mutable GRG may not need up edges and not loading them can save considerable RAM. For example, merging graphs does not need any up edges. * Upgrade picovcf to v2.4 * VCF inputs use tabix. With the upgraded picovcf we can do VCF inputs faster (though still 3-10 times slower than IGD on really large datasets). * If you pass in a non-indexed VCF, it will now fail and warn you; you can override this with `--force` which will just warn you and continue. * There were some empty graph edges cases in fast_build. * Don't try to count the number of variants in a VCF file, it only leads to sadness. * Disable BGEN is all default releases. Unphased BGEN was never supported, phased BGEN is a bit clunky to obtain. It also doesn't compile on MacOS. At some point we can re-evaluate if BGEN should get full support (including all platforms and unphased data). It likely makes more sense to add support to igdtools to convert BGEN to IGD.
PreviousNext