brittneybrinsfield / pysam

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

Read.rname returns integer not reference sequence name #64

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. imported a samfile with pysam.Samfile() I made mine with BWA for SE reads.
2. extracted on read from it
3. typed 'print read'

What is the expected output? What do you see instead?

I expected to see something like:

chrZ_8179|conservation|probes:1 16  NODE_699_length_514_cov_13.840466   141 37  ....
.

where the third item is the name of the sequence to which the read aligned. 
Instead I got:

chrZ_8179|conservation|probes:1 16     140

where the sequence has been replaced by an integer. I'm assuming that this is a 
link to the location within the header, but there is NO documentation on this 
point. And, I would expect typing read.rname would produce the human readable 
sequence identifier and not an integer.

What version of the product are you using? On what operating system?

0.4.1 on linux

Please provide any additional information below.

Original issue reported on code.google.com by NGCrawf...@gmail.com on 3 Jun 2011 at 12:57

GoogleCodeExporter commented 9 years ago
rname is deprecated, please use tid to get the numerical identifier and
use Samfile.getrname to convert to the human readable form.

Bw,
Andreas

Original comment by andreas....@gmail.com on 4 Jun 2011 at 8:45