Opened 4 years ago
Closed 12 months ago
#920 closed request (fixed)
resize VCF::Data
Reported by: | Peter | Owned by: | Peter |
---|---|---|---|
Priority: | major | Milestone: | yat 0.20 |
Component: | omic | Version: | |
Keywords: | Cc: |
Description
With current API there is no easy way to change number of samples in a VCF::Data instance. It's kind of expected to
1) Construct a VCF with given number of samples. VCF(void) creates a zero-sample VCF.
2) Construct a VCF with a subset of samples in another VCF, either by a subset copy construction or by removing unwanted samples. One use case is to create a single-sample VCF from a multi-sample and in that case removing is probably unnecessarily slow.
Currently the easiest way is to output the VCF to stringstream, split the string into a vector, pick elements as wanted, glue them together to s string that is passed to VCF constructor.
Note that increasing number of samples when FMT is not empty is problematic as it's not trivial to fill the data field with appropriate data for the different formats.
Change History (4)
comment:1 Changed 12 months ago by
Milestone: | yat 0.x+ → yat 0.20 |
---|---|
Status: | new → accepted |
Type: | discussion → request |
In 4144: