MaciekAber / pysam

Automatically exported from code.google.com/p/pysam
0 stars 0 forks source link

AlignedRead.opt() for 'A'-tags returns ASCII decimal code, note value itself #28

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. open a bam-file (sorted+indexed) aligned with for example BWA
2. for aln in samfile.fetch('chr10'):
3.       print aln.opt("XT")

What is the expected output? What do you see instead?
I see '82' (=>R) or 85 (=>U). I should see 'R' or 'U'

What version of the product are you using? On what operating system?
python 2.6.4, pysam 0.1.2, mac os x 10.6.2

Please provide any additional information below.

Original issue reported on code.google.com by daniel.k...@gmail.com on 18 Apr 2010 at 1:53

GoogleCodeExporter commented 8 years ago
What is the option type code when viewing the file as sam (e.g. with samtools 
view)?

I will fix this fix this in my local branch, which has a number of other 
improvements.  
I'll send these on to the pysam authors.

Original comment by bioinformed@gmail.com on 30 Apr 2010 at 11:18

GoogleCodeExporter commented 8 years ago
Thanks.

The problem was that cython converts <char> to integer, not a one byte string.

Fixed in version pysam 0.2 and added a unit test

Original comment by andreas....@gmail.com on 4 May 2010 at 4:21

GoogleCodeExporter commented 8 years ago

Original comment by andreas....@gmail.com on 4 May 2010 at 4:22

GoogleCodeExporter commented 8 years ago

Original comment by andreas....@gmail.com on 4 May 2010 at 9:25