File: BuildRead.pyx

package info (click to toggle)
python-pysam 0.15.2%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 17,604 kB
  • sloc: ansic: 125,787; python: 7,782; sh: 284; makefile: 222; perl: 41
file content (24 lines) | stat: -rw-r--r-- 613 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from __future__ import absolute_import

from pysam.libchtslib         cimport bam1_t, bam_endpos
from pysam.libcsamfile        cimport aux_type2size
from pysam.libcalignedsegment cimport AlignedSegment

import pysam


cpdef build_read():
    cdef AlignedSegment read = pysam.AlignedSegment()
    read.query_name = "hello"
    read.query_sequence = "ACGT"
    read.reference_start = 10
    read.cigarstring = "4M"

    # Test calling htslib function
    cdef bam1_t *calign = read._delegate
    print(bam_endpos(calign))

    # Test calling pysam htslib_util function
    print(aux_type2size(12))

    return read