Created
April 24, 2019 16:41
-
-
Save brentp/ea00e51b9811f2d01d5535945331fbf7 to your computer and use it in GitHub Desktop.
how to access pysam internals from external cython project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pysam.libcalignmentfile cimport AlignmentFile | |
cdef AlignmentFile samfile = AlignmentFile("../normal.bam", "rb") | |
print samfile.reference_filename | |
print samfile.b == NULL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from distutils.core import setup | |
from distutils.extension import Extension | |
import Cython | |
from Cython.Build import cythonize | |
setup( | |
cmdclass={'build_ext': Cython.Build.build_ext}, | |
ext_modules = [Extension("ex", | |
["ex.pyx"], | |
language='c', | |
libraries=["z", "hts"], | |
include_dirs=["/home/brentp/src/pysam/pysam", | |
"/usr/include"], | |
)] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment