Implemented necessary code for reading SAM files and some preliminary filters