loosolab / UROPA

Universal RObust Peak Annotator
https://uropa-manual.readthedocs.io/
MIT License
15 stars 6 forks source link

UnicodeDecodeError when running UROPA #10

Closed laasov closed 2 years ago

laasov commented 2 years ago

Hey, running uropa 4.0.2 produced an error I'm not able to debug by myself.

2021-12-09 16:23:04 (41147) [INFO]  Command-line call: /opt/miniconda3/envs/uropa/bin/uropa --bed ../../bams/24.bam --gtf ../../ins/Mus_musculus.GRCm38.102.chr.gtf --show_attributes gene_id gene_name --feature_anchor start --distance 20000 10000 --feature gene
2021-12-09 16:23:04 (41147) [INFO]  Reading configuration from commandline/input config
2021-12-09 16:23:04 (41147) [INFO]  Preparing .gtf-file for fast access
Traceback (most recent call last):
  File "/opt/miniconda3/envs/uropa/bin/uropa", line 33, in <module>
2021-12-09 16:23:47 (41147) [INFO]  Started annotation
    sys.exit(load_entry_point('uropa==4.0.2', 'console_scripts', 'uropa')())
  File "/opt/miniconda3/envs/uropa/lib/python3.7/site-packages/uropa/uropa.py", line 385, in main
    check_bed_format(cfg_dict["bed"], logger)
  File "/opt/miniconda3/envs/uropa/lib/python3.7/site-packages/uropa/utils.py", line 377, in check_bed_format
    for i, line in enumerate(f):
  File "/opt/miniconda3/envs/uropa/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 0x8b in position 1: invalid start byte
2021-12-09 16:23:47 (41151) [ERROR] Logger lost connection to queue - probably due to an error raised from a child process.

Not sure where this could come from, and googling wan't helpful. Any opinions? Can provide more information, if needed.

Thanks!

msbentsen commented 2 years ago

Hi! Your input --bed is a .bam file, and this is not a valid input to UROPA. The input file has to be a .bed-file containing chromosome, start and end coordinates. Do you want to annotate the reads themselves?

laasov commented 2 years ago

You're absolutely right. No way I'm that scatterbrained... Created the .bed-file literally just minutes before this. Thank you so much, and sorry for wasting your time.

Closing this!