Common errors

When using Coalispr sometimes problems arise after editing input files or upgrading programs like Pandas or Matplotlib. Here are some ‘last lines’ of an error stack that are displayed in the terminal and, if the program started up, registered in the log-file run-log.txt (/LOGS/EXP/LOGFILNAM) in the work folder.

With any command

  • The program does not start

  • ImportError: cannot import name 'SOMENAME' from 'coalispr.resources.constant'

The program or configuration file (one of its components like 2_shared.txt or 3_EXP.txt) has been changed and the new version blocks the program due to a variable that is wrong (typo?), missing or novel. The only feedback that can be used for pointers to solve the problem will be the error stack in the terminal. Sometimes errors arise because characters that need to be paired (opened and closed) like ", ', {}, or (), remain ‘single’ in lines preceding the line that is mentioned to contain the mistake.

Generate a working configuration file directly by: python3 -m coalispr.resources.constant_in.make_constant. This will generate a configuration shipped with Coalispr.

Correct any mistakes in configuration to use for your own experiment EXP, then run coalipsr setexp -e EXP -p2.


setexp

  • File not found: [Errno 2] No such file or directory: '<path to>/Coalispr/config/constant_in/2_shared.txt'

    This happens when coalispr init has not been run. Restoring this includes resetting the configuration required for Coalispr to start up:

    • python -m coalispr.resources.constant_in.make_constant.

    Rerun the failed commands after this.


storedata

  • Sorry, program failed. Column 'CONDITION' is  not found in the experiment file (EXPFILE)

    Sometimes an expected column in EXPFILE is not relevant for an experimental dataset; for example CONDITION becomes redundant when the different conditions induced and uninduced are covered by CATEGORY in the definition of controls. Inclusion of an empty condition column with its header will make it work.

  • Your computer becomes no longer responsive. Maybe too much RAM is used and the program causes this bottleneck: this is easily resolved by closing the console from which Coalispr is running. Try to turn multiprocessing (mp) off so that the data files are loaded one after the other, i.e. sequentially:

    • coalispr storedata -d {1,2,3} -t{0,1} -mp 0

    If this does not help, maybe not enough RAM is available to process the large files you have (even when closing other programs that use up RAM).

  • File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status
    OSError: [Errno 28] Error writing bytes to file. Detail: [errno 28] No space left on device

    Temporary directory on your file system (e.g. /tmp) is full. Maybe previous runs did not finish properly and temporarily stored files were not cleared out as intended.

    Remove from /tmp any directory with a name starting with tmp followed by 8 random characters ('^tmp[a-z0-9_]{8}/') that only contains parquet files ('*_intervalindexes.parquet')



showgraphs

  • pandas.errors.ParserError: Error tokenizing data. C error: Expected 9 fields in line 20, saw 10

  • ValueError: Integer column has NA values in column 3

  • ValueError: invalid literal for int() with base 10: '313713-313804'

    These different last-line messages occur when a GTF annotation file cannot be parsed properly after editing. Each of these lines points to a different mistake, but all affect the structure of the file by not using a tab where that is expected to separate the columns/fields.

    Check whether a tab is missing or a space is used instead. In the last example, a dash (-) was copied over with genome coordinates but not changed to a tab.

    First lines of the stack (to see these scroll up in the terminal or check the log-file) are like:

    Traceback (most recent call last):
      File "/<path to>/coalispr/coalispr/bedgraph_analyze/genom.py", line 667, in _retrieve_gtf
        return UNSP_PLUS, UNSP_MINUS
    NameError: name 'UNSP_PLUS' is not defined
    

    The _retrieve_gtf function provides the annotations from a GTF reference file that form the value for a constant, in this case, UNSP_PLUS.

  • No annotations selected for '<chrnam>'; check GTF.

    The program runs but with this message shown in the terminal.

    Selection of annotation lines beginning with the name of the DNA source (chrnam) did not work. Any space around chrnam in the GTF file would interfere; make sure that chrnam is directly followed by a tab.


showgraphs, showcount, region

  • ImportError: Cannot load backend 'QtAgg' which requires the 'qt' interactive framework, as 'tk' is currently running

    Commands producing figures as output are called from the GUI via coalispr-gui while the BACKEND is not set to ‘TkAgg’. This error will not occur when running the CLI, coalispr.

showcount

  • ICE default IO error handler doing an exit(), .. errno = 32

The set BACKEND cannot cope with displaying the data (see ‘Backends’ in the How-to guides).

  • Warning: Attempting to freeze the notification queue for object GtkImage[0x5e7f690]

  • Property notification does not work during instance finalization.

  • lambda event: self.remove_toolitem(event.tool.name))

In these cases change BACKEND to, say, ‘TkAgg’ or ‘GTK3Agg’.


region

  • IndexError: GridSpec slice would result in no space allocated for subplot

There is not enough drawing space to include all sample-rows in the figure. Try reducing the number of samples in the analysis. This error popped up for a diagram with length-distributions for over 100 samples; the count diagram for this dataset gave no issue.


groupcompare

  • When in EXPFILE a value is followed/replaced by a space, this can interfere with running of the program, giving unexpected results. For example, the empty output for 1: was caused by a space by itself in the column GROUP during testing:

bash$ coalispr groupcompare -g 1

For 'Group' pick subgroup(s) to compare:

  List sample numbers, separated by a comma (','). Choose from:
  1:          2: a1   3: meth         4: re1          5: re2          6: re3  7: re4          8: re5          9: r1   10: r6          11: STANDARD

    ('stop' to cancel.)
  • Any occurrence would be a bug in the program because such white spaces would be removed when loading the EXPFILE into a Pandas.DataFrame.

Raise an issue

If the problem cannot be solved, please raise an issue at the Coalispr repository at Codeberg.org. Including the relevant section of the logfile in <path-to>/workfolder/Coalispr/logs/<EXP>/ in the description will help resolving the issue.