11# cython: language_level=3
22# cython: profile=True
3- # Time-stamp: <2025-02-15 08:49:30 Tao Liu>
3+ # Time-stamp: <2025-04-11 13:24:36 Tao Liu>
44
55"""Module for filter duplicate tags from paired-end data
66
@@ -779,7 +779,7 @@ class PETrackII:
779779
780780 def __init__ (self , anno : str = "" , buffer_size : cython .long = 100000 ):
781781 # dictionary with chrname as key, nparray with
782- # [('l','i4'),('r','i4'),('c','u1 ')] as value
782+ # [('l','i4'),('r','i4'),('c','u2 ')] as value
783783 self .locations = {}
784784 # dictionary with chrname as key, size of the above nparray as value
785785 # size is to remember the size of the fragments added to this chromosome
@@ -805,7 +805,7 @@ def add_loc(self,
805805 start : cython .int ,
806806 end : cython .int ,
807807 barcode : bytes ,
808- count : cython .uchar ):
808+ count : cython .ushort ):
809809 """Add a location to the list according to the sequence name.
810810
811811 chromosome: mostly the chromosome name
@@ -828,7 +828,7 @@ def add_loc(self,
828828 # note: ['l'] is the leftmost end, ['r'] is the rightmost end of fragment.
829829 # ['c'] is the count number of this fragment
830830 self .locations [chromosome ] = np .zeros (shape = self .buffer_size ,
831- dtype = [('l' , 'i4' ), ('r' , 'i4' ), ('c' , 'u1 ' )])
831+ dtype = [('l' , 'i4' ), ('r' , 'i4' ), ('c' , 'u2 ' )])
832832 self .barcodes [chromosome ] = np .zeros (shape = self .buffer_size ,
833833 dtype = 'i4' )
834834 self .locations [chromosome ][0 ] = (start , end , count )
0 commit comments