corrMatrix module

corrMatrix.calculateCorrMatrix(inputCCMap[, ...]) Calculate correlation matrix of a contact map.
corrMatrix.calculateCorrMatrixForGCMaps(...) Calculate Correlation matrix for all maps present in input gcmap file It calculates correlation between all rows and columns of contact map.
calculateCorrMatrix(inputCCMap, logspace=False, outFile=None, workDir=None)

Calculate correlation matrix of a contact map. It calculates correlation between all rows and columns of contact map.

Parameters:
  • ccMap (gcMapExplorer.lib.ccmap.CCMAP or ccmap file) – A CCMAP object containing observed contact frequency or a ccmap file.
  • logspace (bool) – If its value is True, at first map is converted as logarithm of map and subsequently correlation will be calculated.
  • outFile (str) – Name of output ccmap file, to save directly the correlation matrix as a ccmap file. In case of this option, None will return.
  • workDir (str) – Path to the directory where temporary intermediate files are generated. If None, files are generated in the temporary directory according to the main configuration.
Returns:

ccMapObj – Normalized Contact map. When outFile is provided, None is returned. In case of any other error, None is returned.

Return type:

gcMapExplorer.lib.ccmap.CCMAP or None

calculateCorrMatrixForGCMaps(gcMapInputFile, gcMapOutFile, logspace=False, replaceMatrix=False, compression='lzf', workDir=None)

Calculate Correlation matrix for all maps present in input gcmap file It calculates correlation between all rows and columns of contact map.

Parameters:
  • gcMapInputFile (str) – Input gcmap file.
  • gcMapOutFile (str) – Output gcmap file.
  • logspace (bool) – If its value is True, at first map is converted as logarithm of map and subsequently correlation will be calculated.
  • replaceMatrix (bool) – If its value is True, the map will be replaced in output file. Otherwise, if a map is present, calculation will be skipped.
  • compression (str) – Compression method in output gcmap file. Presently allowed : lzf for LZF compression and gzip for GZIP compression.
  • workDir (str) – Path to the directory where temporary intermediate files are generated. If None, files are generated in the temporary directory according to the main configuration.
Returns:

Return type:

None