Skip to content

Commit

Permalink
fixes compilation issues more testing needs to be done #18
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffhsu3 committed Jan 20, 2015
1 parent 62d9d4a commit adc182d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 519 deletions.
12 changes: 2 additions & 10 deletions genda/pysam_callbacks/allele_counter.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ from cpython cimport bool
#from multiprocessing import Process
#import cython
cimport pysam.csamtools as csam
from pysam.csamtools cimport AlignedRead, bam1_t, bam_pileup1_t
from pysam.calignmentfile cimport AlignedSegment
from libc.stdlib cimport malloc, free
from cpython cimport PyObject
#cimport csamtools
Expand All @@ -15,13 +15,6 @@ ctypedef np.float64_t dtype_t

cdef inline int int_max(int i , int j): return i if i >= j else j

'''
cpdef object construct_known_var(csam.Samfile samfile, PileupProxy col):
""" Counts the various alleles at a given position.
"""
cdef int i # loop index
'''

cdef class AlleleCounter:
""" Counts the various alleles at a given position.
Expand Down Expand Up @@ -52,12 +45,11 @@ cdef class AlleleCounter:
self.region = region
self.position = int(position)
self.phredThreshold = phredThreshold
print('hi_c')
#self.counts = np.zeros(4, dtype=np.uint16)



def __call__(self, AlignedRead alignment, int position = 0,
def __call__(self, AlignedSegment alignment, int position = 0,
int phredThreshold = 0,
bool isIndel = False):
cdef int index
Expand Down
4 changes: 2 additions & 2 deletions genda/stats/aei_count_samples.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ctypedef np.float64_t dtype_t
ctypedef np.uint16_t DTYPE_t
from genda.pysam_callbacks.allele_counter cimport AlleleCounter
from cpython cimport bool
from pysam.csamtools cimport Samfile, IteratorRowRegion, AlignedRead
from pysam.calignmentfile cimport AlignmentFile, IteratorRowRegion, AlignedSegment
import cython
from cython.parallel import prange
from . import *
Expand All @@ -22,7 +22,7 @@ cpdef aei_count_samples(np.ndarray[dtype_t, ndim=2] geno,
"""
cdef int n_samples
cdef int counter
cdef Samfile bamfile
cdef AlignmentFile bamfile
cdef int n_markers
cdef int j
cdef int i
Expand Down
308 changes: 0 additions & 308 deletions scripts/AEI/AEI.py

This file was deleted.

1 change: 0 additions & 1 deletion scripts/AEI/AEI_2.py → scripts/AEI/aei_count.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ def main():
subset_geno.apply(counts_fixed)
reget_fixed = functools.partial(reget_sample_names, mapping = file_to_sample)
counts_matrix.rename(columns=file_to_sample, inplace=True)
print(counts_matrix)

counts_matrix.to_pickle(options.filename)

Expand Down

0 comments on commit adc182d

Please sign in to comment.