snps icon indicating copy to clipboard operation
snps copied to clipboard

Class based source readers?

Open afaulconbridge opened this issue 4 years ago • 1 comments

Currently, there is a single general Reader class with various methods for different sources.

I wonder if a series of specific classes for different filetypes be better e.g. Reader23andMe, ReaderAncestry, etc. Still keeping the single Reader class overall, but delegating a lot of the details to the specific classes for implementation.

By grouping everything for a particular format together it makes it easier to read, and to add extra sources. Also it would allow subclasses (e.g. for Global Screening Array based sources) to abstract functionality more easily.

afaulconbridge avatar Dec 09 '20 15:12 afaulconbridge

Thanks @afaulconbridge, this is a great idea. Since several read functions use the same parser, I wonder if the top level Reader class should implement the parser functions?

apriha avatar Dec 14 '20 03:12 apriha