- property pos:
- '''nucleotide position of SNP.'''
- def __get__(self): return self._pos
-
- property genotype:
- '''the genotype called.'''
- def __get__(self):
- if self._r.gt == 0:
- s = PyString_FromStringAndSize( self._r.s[0], self._r.indel1 + 1)
- return "%s/%s" % (s,s)
- elif self._r.gt == 1:
- s = PyString_FromStringAndSize( self._r.s[1], self._r.indel2 + 1)
- return "%s/%s" % (s,s)
- else:
- return "%s/%s" % (self.first_allele, self.second_allele )
-
- property consensus_quality:
- '''the genotype quality (Phred-scaled).'''
- def __get__(self): return self._r.q_cns
-
- property snp_quality:
- '''the snp quality (Phred scaled) - probability of consensus being identical to reference sequence.'''
- def __get__(self): return self._r.q_ref
-
- property mapping_quality:
- '''the root mean square (rms) of the mapping quality of all reads involved in the call.'''
- def __get__(self): return self._rms_mapping_quality
-
- property coverage:
- '''coverage or read depth - the number of reads involved in the call.'''
- def __get__(self): return self._coverage
-
- property first_allele:
- '''sequence of first allele.'''
- def __get__(self): return PyString_FromStringAndSize( self._r.s[0], self._r.indel1 + 1)
-
- property second_allele:
- '''sequence of second allele.'''
- def __get__(self): return PyString_FromStringAndSize( self._r.s[1], self._r.indel2 + 1)
-
- property reads_first:
- '''reads supporting first allele.'''
- def __get__(self): return self._r.cnt1
-
- property reads_second:
- '''reads supporting first allele.'''
- def __get__(self): return self._r.cnt2
-
- property reads_diff:
- '''reads supporting first allele.'''
- def __get__(self): return self._r.cnt_anti
-
- def __str__(self):
-
- return "\t".join( map(str, (
- self.tid,
- self.pos,
- self.genotype,
- self.consensus_quality,
- self.snp_quality,
- self.mapping_quality,
- self.coverage,
- self.first_allele,
- self.second_allele,
- self.reads_first,
- self.reads_second,
- self.reads_diff ) ) )
-
- def __dealloc__(self ):
- bam_maqindel_ret_destroy(self._r)
-
-cdef class IndelCallerBase:
- '''Base class for SNP callers.
-
- *min_baseQ*
- minimum base quality (possibly capped by BAQ)
- *capQ_threshold*
- coefficient for adjusting mapQ of poor mappings
- *theta*
- theta in maq consensus calling model
- *n_haplotypes*
- number of haplotypes in the sample
- *het_rate*
- prior of a difference between two haplotypes
- '''
-
- cdef bam_maqindel_opt_t * options
- cdef IteratorColumn iter
- cdef int cap_mapQ
- cdef int max_depth
-
- def __cinit__(self,
- IteratorColumn iterator_column,
- **kwargs ):
+# property pos:
+# '''nucleotide position of SNP.'''
+# def __get__(self): return self._pos
+
+# property genotype:
+# '''the genotype called.'''
+# def __get__(self):
+# if self._r.gt == 0:
+# s = PyString_FromStringAndSize( self._r.s[0], self._r.indel1 + 1)
+# return "%s/%s" % (s,s)
+# elif self._r.gt == 1:
+# s = PyString_FromStringAndSize( self._r.s[1], self._r.indel2 + 1)
+# return "%s/%s" % (s,s)
+# else:
+# return "%s/%s" % (self.first_allele, self.second_allele )
+
+# property consensus_quality:
+# '''the genotype quality (Phred-scaled).'''
+# def __get__(self): return self._r.q_cns
+
+# property snp_quality:
+# '''the snp quality (Phred scaled) - probability of consensus being identical to reference sequence.'''
+# def __get__(self): return self._r.q_ref
+
+# property mapping_quality:
+# '''the root mean square (rms) of the mapping quality of all reads involved in the call.'''
+# def __get__(self): return self._rms_mapping_quality
+
+# property coverage:
+# '''coverage or read depth - the number of reads involved in the call.'''
+# def __get__(self): return self._coverage
+
+# property first_allele:
+# '''sequence of first allele.'''
+# def __get__(self): return PyString_FromStringAndSize( self._r.s[0], self._r.indel1 + 1)
+
+# property second_allele:
+# '''sequence of second allele.'''
+# def __get__(self): return PyString_FromStringAndSize( self._r.s[1], self._r.indel2 + 1)
+
+# property reads_first:
+# '''reads supporting first allele.'''
+# def __get__(self): return self._r.cnt1
+
+# property reads_second:
+# '''reads supporting first allele.'''
+# def __get__(self): return self._r.cnt2
+
+# property reads_diff:
+# '''reads supporting first allele.'''
+# def __get__(self): return self._r.cnt_anti
+
+# def __str__(self):
+
+# return "\t".join( map(str, (
+# self.tid,
+# self.pos,
+# self.genotype,
+# self.consensus_quality,
+# self.snp_quality,
+# self.mapping_quality,
+# self.coverage,
+# self.first_allele,
+# self.second_allele,
+# self.reads_first,
+# self.reads_second,
+# self.reads_diff ) ) )
+
+# def __dealloc__(self ):
+# bam_maqindel_ret_destroy(self._r)
+
+# cdef class IndelCallerBase:
+# '''Base class for SNP callers.
+
+# *min_baseQ*
+# minimum base quality (possibly capped by BAQ)
+# *capQ_threshold*
+# coefficient for adjusting mapQ of poor mappings
+# *theta*
+# theta in maq consensus calling model
+# *n_haplotypes*
+# number of haplotypes in the sample
+# *het_rate*
+# prior of a difference between two haplotypes
+# '''
+
+# cdef bam_maqindel_opt_t * options
+# cdef IteratorColumn iter
+# cdef int cap_mapQ
+# cdef int max_depth
+
+# def __cinit__(self,
+# IteratorColumn iterator_column,
+# **kwargs ):
+
+
+# self.iter = iterator_column
+
+# assert iterator_column.hasReference(), "IndelCallerBase requires an pileup iterator with reference sequence"
+
+# self.options = bam_maqindel_opt_init()
+
+# # set the default parameterization according to
+# # samtools
+
+# self.options.r_indel = kwargs.get( "r_indel", 0.00015 )
+# self.options.q_indel = kwargs.get( "q_indel", 40 )
+# self.cap_mapQ = kwargs.get( "cap_mapQ", 60 )
+# self.max_depth = kwargs.get( "max_depth", 1024 )
+
+# def __dealloc__(self):
+# free( self.options )