fls-bioinformatics-core/pegs

PEGS fails reading in data files if '.DS_Store' file is also present in the data directory

Closed this issue · 0 comments

PEGS can fail if a .DS_Store file is present in one of the input data directories, with an error of the form:

====Starting analysis====

Counting genes in refGene_hg38_120719_intervals.bed

Counted 28265 genes

-- Processing peaks for peakset1.bed

Traceback (most recent call last):

  File "XXXX/venv.pegs/bin/pegs", line 8, in <module>
    sys.exit(pegs())
   File "XXXX/venv.pegs/lib/python3.7/site-packages/pegs/cli.py", line 243, in pegs
    dump_raw_data=args.dump_raw_data)
  File "XXXX/venv.pegs/lib/python3.7/site-packages/pegs/pegs.py", line 389, in pegs_main
    bedtools_exe=bedtools_exe)
  File "XXXX/venv.pegs/lib/python3.7/site-packages/pegs/pegs.py", line 235, in calculate_enrichments
    bedtools_exe=bedtools_exe)
  File "XXXX/venv.pegs/lib/python3.7/site-packages/pegs/pegs.py", line 183, in calculate_enrichment
    dtype=np.str))
  File "XXXX/venv.pegs/lib/python3.7/site-packages/numpy/lib/npyio.py", line 1092, in loadtxt
    first_line = next(fh)
  File "/opt/anaconda3/lib/python3.7/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa9 in position 569: invalid start byte

Workaround appears to be to remove the .DS_Store file and rerun PEGS.