apriha / snps

tools for reading, writing, merging, and remapping SNPs
BSD 3-Clause "New" or "Revised" License
100 stars 19 forks source link

Use set for rsids #110

Closed afaulconbridge closed 4 years ago

afaulconbridge commented 4 years ago

When filtering a VCF file to only specific RSIDs, it is useful to ensure the RSIDs are in a set object as the performance boost from O(1) vs O(n) can make a big difference to performance, especially when using larger number of RSIDs. By using a frozenset it also ensures that this collection can't be accidentally modified elsewhere.