loosolab / UROPA

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

Broken pipe error #6

Closed sanchari24 closed 2 years ago

sanchari24 commented 3 years ago

Hello, I installed Uropa using pip. I installed all the dependencies. It runs several lines and then throws an error. I tried uninstalling and reinstalling using conda env. The same problem exists. How can I fix this ? Thanks

uropa -i tomato_confing.json -p clf_M82_k27me3_0h -s -t 10 -l clf_M82_0h_K27me3.log -d

2020-12-08 18:32:00 (24074) [INFO]      Reading configuration from commandline/input config
2020-12-08 18:32:00 (24074) [DEBUG]     Config from command-line arguments: {'queries': [{'feature': [], 'feature_anchor': [], 'distance': [1000, 10000], 'strand': 'ignore', 'relative_location': [], 'internals': False, 'filter_attribute': '', 'attribute_values': []}], 'show_attributes': ['all'], 'priority': False, 'gtf': None, 'bed': None, 'prefix': 'clf_M82_k27me3_0h', 'outdir': '.', 'threads': 10, 'output_by_query': False}
2020-12-08 18:32:00 (24074) [DEBUG]     Config from json: {'queries': [{'feature': 'gene', 'feature.anchor': ['start', 'end'], 'distance': ['2000', '1000'], 'strand': 'same', 'direction': '', 'internals': '', 'filter.attribute': '', 'attribute.value': '', 'show.attributes': ''}], 'priority': 'False', 'gtf': 'ITAG4.0_gene_models.gtf', 'bed': 'diff_peak_clf_M82_K27me3_result_1.bed'}
2020-12-08 18:32:00 (24074) [DEBUG]     Output_prefix set to: ./clf_M82_k27me3_0h
 2020-12-08 18:32:00 (24074) [DEBUG]     Formatted config: {'queries': [{'feature': {'gene'}, 'distance': [2000, 1000], 'strand': 'same', 'feature_anchor': {'end', 'start'}, 'name': 'query_1'}], 'show_attributes': ['all', ''], 'priority': False, 'gtf': 'ITAG4.0_gene_models.gtf', 'bed': 'diff_peak_clf_M82_K27me3_result_1.bed', 'prefix': 'clf_M82_k27me3_0h', 'outdir': '.', 'threads': 10, 'output_by_query': False}
2020-12-08 18:32:00 (24074) [INFO]      Preparing .gtf-file for fast access
2020-12-08 18:32:00 (24074) [DEBUG]     Finding all possible features in gtf
2020-12-08 18:32:00 (24074) [DEBUG]     Features in gtf: {'gene': 34075, 'mRNA': 34075, 'exon': 161508, 'CDS': 153474, 'five_prime_UTR': 21452, 'three_prime_UTR': 22835}
2020-12-08 18:32:00 (24074) [DEBUG]     Finding all possible attributes in gtf

=====================Runs several lines========================================

Process Process-2:
Traceback (most recent call last):
  File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/ips2/users/ssircar/cluster/.local/lib/python3.7/site-packages/uropa/utils.py", line 88, in main_logger_process
    record = self.q.get()
   File "<string>", line 2, in get
  File "/usr/lib/python3.7/multiprocessing/managers.py", line 795, in _callmethod
    conn.send((self._id, methodname, args, kwds))
  File "/usr/lib/python3.7/multiprocessing/connection.py", line 206, in send
    self._send_bytes(_ForkingPickler.dumps(obj))
  File "/usr/lib/python3.7/multiprocessing/connection.py", line 404, in _send_bytes
    self._send(header + buf)
  File "/usr/lib/python3.7/multiprocessing/connection.py", line 368, in _send
    n = write(self._handle, buf)
BrokenPipeError: [Errno 32] Broken pipe
msbentsen commented 3 years ago

Hi, thank you for your issue.

Just that I understand you correctly - the "=== runs several lines ===" means that UROPA starts reading the lines of the input .bed-file? But then after running for a bit, it fails with the "broken pipe error"? It definitely has something to do with the multiprocessing (as also evident in the error), but I will have to have a closer look.