coalispr.resources.constant_in.make_constant

Attributes

Functions

make_constant([exp, otherpath])

Create a configuration file constant.py from text files.

main(args)

Module Contents

coalispr.resources.constant_in.make_constant.logger
coalispr.resources.constant_in.make_constant.make_constant(exp='h99t', otherpath=None)

Create a configuration file constant.py from text files.

Output is the configuration file constant.py after combining three text files with settings. Two of these files (SHARED, EXPTXT) a user can change (after which this command has to be run in order to activate the changes).

The EXPTXT describes settings specific for a session or an experiment (like name EXP, file paths, sample names in particular groups..) and needs to be adapted to each new data set. The SHARED gives values for used terms, colours etc. that define the look and feel of the figures with bedgraph traces or count comparisons.

Notes

The newly made constant.py might be needed straight away: it is only working after restarting the program (call another command or the same command again), which also reset imported modules that rely on the constant.py module.

This script is tied to setting the experiment/session EXP. The new settings direct any subsequent coalispr command. As Python load this info in memory, one could display bedgraphs for EXP1 by coalispr showgraphs from one terminal. Then, for comparison, in another terminal a second session could be defined via coalispr setexp -e EXP2 and associated bedgraphs checked via coalispr showgraphs. In the first terminal any new coalispr command (which restarts the program) will follow the novel settings. So, to bypass settings for EXP2, in this terminal one need to run coalispr setexp -e EXP1 again before displaying another set of bedgraphs with settings for the original EXP (EXP1).

It is possible that after editing the SHARED or EXPTXT files, coalispr setexp -e EXPnew stalls. In that case, run this function directly: python3 -m coalispr.resources.constant_in.make_constant. This will prepare a working configuration (constant.py) unlinked to EXPnew. Then, try coalispr setexp -e EXPnew again or check the newly edited configuration files SHARED or EXPTXT for typos or other problems highlighted by the errors described in the stack trace on the terminal (that also will have been written to the log files).

Parameters:
  • exp (str) – Short name to identify an initialized experiment or session with.

  • otherpath (str) – Path to folders with prepared configuration input files.

coalispr.resources.constant_in.make_constant.main(args)