コード例 #1
0
 def loadLine(self, handler, disjointigs, reads, contigs):
     # type: (TokenReader, DisjointigCollection, ReadCollection, ContigCollection) -> None
     self.id = handler.readToken()
     self.seq = handler.readToken()
     self.rc.id = basic.Reverse(self.id)
     n = handler.readInt()
     for i in range(n):
         handler.readToken()
         handler.readToken()
         handler.readToken()
         seg = Segment.load(handler, self)
         handler.readToken()
         self.initial.add(AlignmentPiece.Identical(seg.asContig().asSegment(), seg))
         # self.add(AlignmentPiece.load(handler, collection_from, collection_to))
     self.correct_segments.load(handler, self)
     self.completely_resolved.load(handler, self)
     self.disjointig_alignments.load(handler, disjointigs, self)
     self.read_alignments.load(handler, reads, self)
     for al in self.read_alignments:
         read = al.seg_from.contig #type: AlignedRead
         read.addAlignment(al)
     self.max_extension = False
コード例 #2
0
 def load(self, handler, contig):
     # type: (TokenReader, NamedSequence) -> None
     n = handler.readInt()
     for i in range(n):
         self.add(Segment.load(handler, contig))