umb-oconnorgroup / ibdtools

A cpp library/tool set for working with large identity-by-descent files
MIT License
0 stars 0 forks source link

implement subsetting ibd matrix by a sample list #10

Closed bguo068 closed 2 years ago

bguo068 commented 2 years ago

https://github.com/umb-oconnorgroup/ibdtools/blob/9cbabb7fb8fac309f4a565c80a2a87c1bde85e6c/src/ibdtools.cpp#L676

The subsetting of the IBD matrix by a sample list is currently only working with the histogram but not the matrix itself. Should be added to reflect what it is claimed to do.

IbdMatrix:subset_matrix(vector<uint32_t> & sample_ids){
   // sort the sample_ids vector
   // construct a new matrix
   // copy the selected values
   // return the matrix (and the sorted sample_ids as in/out argument)
}