File: BuildRead.pyx

package info (click to toggle)
python-pysam 0.23.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 18,468 kB
  • sloc: ansic: 158,936; python: 8,604; sh: 338; makefile: 264; 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