Export .ccmap as text fileΒΆ

Presently only COO list format is implemented in gcMapExplorer.ccmap.export_ccmap function. In COO format, lists of (row, column, value) as three tab seprated columns are written in output file.

See also

Module gcMapExplorer.ccmap.export_ccmap()

In [1]:
from gcMapExplorer.lib import ccmap as cmp
In [2]:
# Input files and path
files=  ['chr5_100kb_normKR.ccmap', 'chr15_100kb_normKR.ccmap',
         'chr20_100kb_normKR.ccmap', 'chr21_100kb_normKR.ccmap']

#Output files and path
outputPath = 'export/'
outputs=['chr5_100kb.txt',    'chr15_100kb.txt',  'chr20_100kb.txt',  'chr21_100kb.txt']

for i, o in zip(files, outputs):
    ccmap = cmp.load_ccmap(inputPath+i)
    cmp.export_ccmap(ccmap, outputPath+o, doNotWriteMinimum=True)