def ComputeNumOfReads(self): if type(self.GetFastaFile()) == str: FastaSeq = fasta_read(self.GetFastaFile()) self.SetFastaSequence(FastaSeq) self.SetNumOfReads(FastaSeq[0].GetSeq()) else: tempFastaSeq = list() for i in range(len(self.GetFastaFile())): FastaSeq = fasta_read(self.GetFastaFile()[i]) tempFastaSeq.append(FastaSeq) self.SetFastaSequence(temp)
def SetNumOfReads(self, Num = None): if Num == None: FastaSeq = fasta_read(self.GetFastaFile()) SeqObj = FastaSeq[0].GetSequence() SeqObjLen = len(SeqObj) self.NumOfReads = SeqObjLen*self.GetExpectedCoverage()/self.GetKMER_Length() else: self.NumOfReads = Num