This program examines a BAM or SAM stream for reads that contain multiple Cs in non-CpG context. It markes these reads with a tag (XX:Z:UC) and sets the vendor failed bit to prevent these reads from being used in downstream methylation calling. It also prints summary information to stderr.
Thanks for the handy tool. Just wanted to flag something, which I noticed today. Haven't fully verified this, but I think there's a bug in the soft-clipping step. For instance, let's say you have a read which is soft-clipped at the beginning. Then when you grab coords = read.get_reference_positions(full_length = True), you get leading Nones. The coords = softclip(coords) removes the Nones from the coords but not from the read.query_sequence. This means that coords.index(coord) no longer refers to the right base in the read sequence.
Let me know if I'm making a dumb mistake, which I probably am. Once I verify I will open a PR, which will probably just involve editing the softclip function to subset the read.query_sequence with the same bounds.