mapper to read a sam file and output just the read lengths for reads that match certain flags