X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=erange.git;a=blobdiff_plain;f=ReadDataset.py;fp=ReadDataset.py;h=dffa76de9436f4379f42ba2175bec17fc1a8fa59;hp=9a795c8cde5c5ba6d257da963ebf4c32f7d6e42d;hb=4ad5495359e4322da39868020a7398676261679e;hpb=cfc5602b26323ad2365295145e3f6c622d912eb4 diff --git a/ReadDataset.py b/ReadDataset.py index 9a795c8..dffa76d 100644 --- a/ReadDataset.py +++ b/ReadDataset.py @@ -6,11 +6,10 @@ import re import sys import pysam from array import array -from commoncode import getReverseComplement +from commoncode import getReverseComplement, isSpliceEntry currentRDSVersion = "3.0" - class ReadDatasetError(Exception): pass @@ -68,7 +67,7 @@ class MaxCoordFinder(ReadCounter): -class BamReadDataset(): +class ReadDataset(): """ Class for storing reads from experiments. Assumes that custom scripts will translate incoming data into a format that can be inserted into the class using the insert* methods. Default class subtype ('DNA') includes @@ -454,7 +453,7 @@ class BamReadDataset(): newrow["chrom"] = chrom if withPairID: - newrow["pairID"] = pairID + newrow["pairID"] = pairReadSuffix[1:] try: resultsDict[dictKey].append(newrow) @@ -973,16 +972,6 @@ def getReadSense(reverse): return sense -def isSpliceEntry(cigarTupleList): - isSplice = False - for operation,length in cigarTupleList: - if operation == 3: - isSplice = True - break - - return isSplice - - def getSpliceRightStart(start, cigarTupleList): offset = 0