pySCENIC icon indicating copy to clipboard operation
pySCENIC copied to clipboard

OSError: Unable to open file (message not aligned)

Open Li-mengjie opened this issue 2 years ago • 1 comments

Hello, when I was running the GRN process in SCENIC, I got the following error: "OSError: Unable to open file (message not aligned)". There are many similar errors in the network, but there is no indication of "message not aligned".I successfully ran another file with the same program before.

pyscenic grn
--num_workers 20
--output adj.sample.tsv
--method grnboost2
sample.loom
hs_hgnc_tfs.txt OMP: Info #276: omp_set_nested routine deprecated, please use omp_set_max_active_levels instead.

2022-06-03 08:54:50,219 - pyscenic.cli.pyscenic - INFO - Loading expression matrix. Traceback (most recent call last): File "/home/lmj/.conda/envs/pyscenic/bin/pyscenic", line 8, in sys.exit(main()) File "/home/lmj/.conda/envs/pyscenic/lib/python3.7/site-packages/pyscenic/cli/pyscenic.py", line 675, in main args.func(args) File "/home/lmj/.conda/envs/pyscenic/lib/python3.7/site-packages/pyscenic/cli/pyscenic.py", line 61, in find_adjacencies_command args.gene_attribute, File "/home/lmj/.conda/envs/pyscenic/lib/python3.7/site-packages/pyscenic/cli/utils.py", line 129, in load_exp_matrix return load_exp_matrix_as_loom(fname, return_sparse, attribute_name_cell_id, attribute_name_gene) File "/home/lmj/.conda/envs/pyscenic/lib/python3.7/site-packages/pyscenic/cli/utils.py", line 79, in load_exp_matrix_as_loom with lp.connect(fname, mode='r', validate=False) as ds: File "/home/lmj/.conda/envs/pyscenic/lib/python3.7/site-packages/loompy/loompy.py", line 1515, in connect return LoomConnection(filename, mode, validate=validate) File "/home/lmj/.conda/envs/pyscenic/lib/python3.7/site-packages/loompy/loompy.py", line 88, in init self._file = h5py.File(filename, mode) File "/home/lmj/.conda/envs/pyscenic/lib/python3.7/site-packages/h5py/_hl/files.py", line 533, in init fid = make_fid(name, mode, userblock_size, fapl, fcpl, swmr=swmr) File "/home/lmj/.conda/envs/pyscenic/lib/python3.7/site-packages/h5py/_hl/files.py", line 226, in make_fid fid = h5f.open(name, flags, fapl=fapl) File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py/h5f.pyx", line 106, in h5py.h5f.open OSError: Unable to open file (message not aligned)

This directory contains the following files, and verify that they are available before: hg38__refseq-r80__10kb_up_and_down_tss.mc9nr.feather; motifs-v9-nr.hgnc-m0.001-o0.0.tbl ; sample.loom ; hs_hgnc_tfs.txt

  1. Error encountered:
...

Expected behavior A clear and concise description of what you expected to happen.

Please complete the following information:

  • pySCENIC version:pyscenic==0.11.2
  • Installation method: [Pip]
  • Run environment: [ Nextflow]
  • OS: [ Ubuntu]
  • Package versions: [obtain using pip freeze, conda list, or skip this if using Docker/Singularity]:
...

Li-mengjie avatar Jun 03 '22 01:06 Li-mengjie

Mayb try to set --num_workers 20 to a lower value.

It could be that you are running out of filedescriptors.

You can see the current limits with:

# Open files soft limit.
❯ ulimit -aS | grep 'open files'
open files                      (-n) 1024

# Open files hard limit.
❯ ulimit -aH | grep 'open files'
open files                      (-n) 1048576

Try to increase the hard limit if it only allows a few thousand file descriptors.

ghuls avatar Jul 25 '22 08:07 ghuls