Package bamm :: Module bamFile :: Class BM_fileInfo
[hide private]
[frames] | no frames]

Class BM_fileInfo

source code

object --+
         |
        BM_fileInfo

High level management of BamFiles, contigs and associated mapping statistics

Instance Methods [hide private]
 
__init__(self, coverages, contigLengths, numBams, numContigs, contigNames, bamFiles, links)
Default constructor.
source code
 
consume(self, BFIb)
Merge another BFI's internals with this one
source code
 
printBamTypes(self, fileHandle=None)
Write bam type information to the given filehandle or stdout
source code
 
printCoverages(self, fileHandle=None)
Write coverage profile information to the given filehandle or stdout
source code
 
printLinks(self, bamFileNames, fileHandle=None)
Write contig linking information to the given filehandle or stdout
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, coverages, contigLengths, numBams, numContigs, contigNames, bamFiles, links)
(Constructor)

source code 

Default constructor.

Inputs:
 coverages - (C x B) array of floats; C = num contigs and B = num bams
 contigLengths -(C) array of ints storing contig lengths
 numBams - The number of BAMs the instance is managing ( == B )
 numContigs - The number of unique contigs across all BAMs ( == C )
 contigNames - (C) array of strings storing long contig names
 bamFiles - (B) array of BM_BamFile instances
 links - { uid, BM_linkPair }, all links joining the contigs, uid made
         by BM_BM_linkPair.makeKey()

Outputs:
 None

Overrides: object.__init__

consume(self, BFIb)

source code 
Merge another BFI's internals with this one

You should destory the merged BFI after merging to avoid
duplication of results

Inputs:
 BFIb, BM_fileInfo, that will be merged

Outputs:
 None

printBamTypes(self, fileHandle=None)

source code 
Write bam type information to the given filehandle or stdout

used for printing output to types file

Inputs:
 fileHandle - open FILE, == None implies writing to stdout

Outputs:
 None

printCoverages(self, fileHandle=None)

source code 
Write coverage profile information to the given filehandle or stdout

used for printing output to types file

Inputs:
 fileHandle - open FILE, == None implies writing to stdout

Outputs:
 None

printLinks(self, bamFileNames, fileHandle=None)

source code 
Write contig linking information to the given filehandle or stdout

used for printing output to types file

Inputs:
 bamFileNames - { bamId : string }, storage for long bam file names
 fileHandle - open FILE, == None implies writing to stdout

Outputs:
 None

__str__(self)
(Informal representation operator)

source code 

Override basic string function

calls printBamTypes, printCoverages and printLinks

Overrides: object.__str__