MISO icon indicating copy to clipboard operation
MISO copied to clipboard

sam_utils.py problem

Open obenno opened this issue 6 years ago • 0 comments

Hi,

Thanks for the amazing tool. I found a little problem in misopy/sam_utils.py. https://github.com/yarden/MISO/blob/1ca049faa6f122751db25e8be49f04a695260557/misopy/sam_utils.py#L254

If the input bam includes secondary alignment (which is default for many mapping tools), the len(read) will has a value larger than 2, yet they were not unpaired, might be properly paired. In the subsequent code they will be discarded, despite whether their first alignment is good.

https://github.com/yarden/MISO/blob/1ca049faa6f122751db25e8be49f04a695260557/misopy/sam_utils.py#L281 It seems that should be %(len(to_delete)-num_unpaired)

Could you please make the function compatible to bam with secondary alignment or state that secondary alignment should be removed in MISO documentation? Thanks.

Regards, obenno

obenno avatar Dec 16 '18 13:12 obenno