Package bamm :: Module bamLink :: Class BM_linkPair
[hide private]
[frames] | no frames]

Class BM_linkPair

source code

object --+
         |
        BM_linkPair

Container class for storing all links joining two contigs

Instance Methods [hide private]
 
__init__(self, cid1, cid2)
Default constructor.
source code
 
addLink(self, r1, r2, p1, p2, bamFile)
Add a link between the two contigs
source code
 
makeKey(self)
Return a unique key for this link pair
source code
 
printMore(self, contigNames, contigLengths, bamFileNames)
Advanced string function
source code
 
__str__(self)
override basic string function
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, cid1, cid2)
(Constructor)

source code 
Default constructor.

Initializes a BM_LinkPair instance with the provided set of properties.

Inputs:
 cid1 - unique identifier for contig 1
 cid2 - unique identifier for contig 2

Outputs:
 None

Overrides: object.__init__

addLink(self, r1, r2, p1, p2, bamFile)

source code 
Add a link between the two contigs

Inputs:
 r1 - int, == 1 if the read maps to contig 1 in reverse orientation
 r2 - int, == 1 if the read maps to contig 2 in reverse orientation
 pos1 - int, leftmost position of read on contig 1
 pos2 - int, leftmost position of read on contig 2
 bamFile - BM_bamFile instance that describes this link

Outputs:
 None

printMore(self, contigNames, contigLengths, bamFileNames)

source code 
Advanced string function

used for creating output to links file
calls link.printmore()

Inputs:
 contigNames - { cid : string }, storage for long contig names
 contigLengths - { cid : int }, storage for contig lengths
 bamFileNames - { bamId : string }, storage for long bam file names

Outputs:
 Multi-line string descrtibing all the links between the two contigs

__str__(self)
(Informal representation operator)

source code 

override basic string function

Overrides: object.__str__