pairtools icon indicating copy to clipboard operation
pairtools copied to clipboard

pairtools split - float mapQ value

Open nservant opened this issue 1 year ago • 2 comments

Hi, I'm using pairtools split to transform a pairsam into a pairs.gz file, and then apply pairtools select on the output with

pairtools select "(mapq1>10 and mapq2>10)" -o selected.pairs.gz test_split.pairs.gz

The select crashed for a format issue ;

ValueError: invalid literal for int() with base 10: '60.0'

Of note, I tried with several other regular expressions like ;

  • (int(mapq1)>10 and int(mapq2)>10)
  • (int(float(mapq1))>10 and int(float(mapq2))>10) But I still have the issue

I think the float encoding of the mapQ values is already there before the select ... I'll try to find where exactly. Would you have any idea to fix this issue ? Thanks

nservant avatar Jul 13 '23 14:07 nservant

I believe your contact pairs have non-typical encoding of mapq. What mapper/version did you use? We usually use bwa mem output, and its mapq is integer. That's the first time I encounter non-integer mapq, but it is worthy changing the pairtools defaults then. Can you provide more details and, probably a sample of your pairs file?

agalitsyna avatar Oct 09 '23 19:10 agalitsyna

sorry for the massive delay, this is likely to be already solved or stale. @nservant , did you find any solution to this issue that we could share with others?

golobor avatar Mar 17 '24 14:03 golobor