coalispr.resources.constant_in.make_constant¶
Attributes¶
Functions¶
|
Create a configuration file |
|
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.pyfrom text files.Output is the configuration file
constant.pyafter 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.pymight 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 theconstant.pymodule.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 showgraphsfrom one terminal. Then, for comparison, in another terminal a second session could be defined viacoalispr setexp -e EXP2and associated bedgraphs checked viacoalispr 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 runcoalispr setexp -e EXP1again 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 EXPnewstalls. 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, trycoalispr setexp -e EXPnewagain 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)¶