MaciekAber / pysam

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

Documentation of csamtools.pyx::IteratorRow #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I can guess what these fields are doing:
    cdef pair64_t * off                # when is off.u used
    cdef bam1_t * b                    # raw bam data?
    cdef uint64_t curr_off             # current offset?
    cdef int n_seeks                   # number of seeks?
    cdef int i                         # index of current offset
    cdef int n_off                     # number of offsets?
    cdef bamFile fp                    # bam file handle?
    cdef int tid                       # index of bam record?
    cdef int beg                       # start of bam record?
    cdef int end                       # end of bam record?

It would be nice to have them documented in the cinit... :-)

Original issue reported on code.google.com by bunbu...@gmail.com on 21 Sep 2009 at 4:02

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
From samtools documentation:
    cdef int tid                       # chromosome ID
    cdef beg                           # start coordinate, 0-based
    cdef end                           # end coordinate, 0-based
    cdef bam1_t * b                    # pointer to an alignment 
                                       # struct filled by increment of iterator

From bam_index.c:
    cdef uint64_t curr_off             # position in binary/compressed bam file
    cdef pair64_t * off                # pairs of begin (u) / end (v) positions for 
                                       #  thunk containing iterated alignment
    cdef int n_seeks                   # number of discontinguous groups of chunks
                                       #   i.e. seek operations.
                                       # not used: can be removed

From bam_aux.c:bam_parse_region:
    cdef int beg                       # start of desired region to
                                       #       retrieve alignments from
    cdef int end                       # end of desired region to
                                       #       retrieve alignments from

Original comment by bunbu...@gmail.com on 21 Sep 2009 at 5:02

GoogleCodeExporter commented 8 years ago
Added iterator interface to samtools. Python code is now a thin wrapper over 
the C code.

Original comment by bunbu...@gmail.com on 30 Sep 2009 at 4:39