"""
A class for record reads
"""
import pysam

class Read(object):

    def __init__(self, read = pysam.AlignedRead()):
        self.name = read.qname # Read name
        self.seqs = read.query # The read's sequence
        self.qual = read.qual  # The read's quality from bam alignment
        self.seq_hash = None   # Hash the read's sequence
    
    def __len__(self):
        return len(self.seqs)


@@ -21,17 +21,40 @@
 rd reads
+ extracted from bamfile
 %0A
-
 %22%22%22%0Aimpo
@@ -167,16 +167,19 @@
 d.qname 
+   
 # Read n
@@ -213,16 +213,19 @@
 d.query 
+   
 # The re
@@ -269,16 +269,19 @@
 d.qual  
+   
 # The re
@@ -312,16 +312,95 @@
 ignment%0A
+        self.mapqual  = read.mapq # Mapping quality to reference genome by BWA%0A
         
@@ -422,16 +422,19 @@
  None   
+   
 # Hash t

add a value to record the mapped quality