Opened 2 years ago

#920 new discussion

resize VCF::Data

Reported by: Peter Owned by: Peter
Priority: major Milestone: yat 0.x+
Component: omic Version:
Keywords: Cc:


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 (0)

Note: See TracTickets for help on using tickets.