AllenInstitute / AllenInstitute/cell_type_mapper

RuntimeError: One of the processes exited with code -7

Open
#35 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
55
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Hi! I am using this wonderful tool to annotate cell types in my file. However, while creating the precomputed stats file, an error occurred (as listed below). I have no idea what is happening, could you help me with this error?

this is my code:


precompute_config = {
    'output_path': str(precompute_dir / 'precomputed_stats.h5'),
    'hierarchy': ['CCN20230722_CLAS',
                  'CCN20230722_SUBC',
                  'CCN20230722_SUPT',
                  'CCN20230722_CLUS'],
    'h5ad_path_list': h5ad_path_list,
    'cell_metadata_path': str(training_set_path),
    'cluster_annotation_path': str(cluster_annotation_path),
    'cluster_membership_path': str(cluster_membership_path),
    'n_processors': 4,
    'split_by_dataset': True, #v2和v3会分开各自生成一个
    'do_pruning': True,
    'tmp_dir': str(scratch_dir),
    'clobber': True
}

precomputation_runner = PrecomputationABCRunner(
    args=[],
    input_data=precompute_config
)

precomputation_runner.run()

this is error:

CREATED TAXONOMY
writing /cwStorage/nodecw_group/zy_data/Project_Spatial/Multiome/Other_data/Allen_BC/abc_atlas_mapping/scratch/precompute/precomputed_stats.WMB-10Xv2.h5 from dataset WMB-10Xv2

RuntimeError Traceback (most recent call last)
File :23

File /public/home/yzhang/zy_data/Project_AD_st/Multiome/tools/cell_type_mapper-main/src/cell_type_mapper/cli/precompute_stats_abc.py:102, in PrecomputationABCRunner.run(self)
99 else:
100 cell_set = None
--> 102 was_written = precompute_summary_stats_from_h5ad_list_and_tree(
103 data_path_list=self.args['h5ad_path_list'],
104 taxonomy_tree=taxonomy_tree,
105 rows_at_a_time=10000,
106 normalization=self.args['normalization'],
107 output_path=output_path,
108 cell_set=cell_set,
109 n_processors=self.args['n_processors'],
110 tmp_dir=self.args['tmp_dir'],
111 layer=self.args['layer'],
112 gene_id_col=self.args['gene_id_col'])
114 if was_written:
115 files_to_merge.append(output_path)

File /public/home/yzhang/zy_data/Project_AD_st/Multiome/tools/cell_type_mapper-main/src/cell_type_mapper/diff_exp/precompute_from_anndata.py:343, in precompute_summary_stats_from_h5ad_list_and_tree(data_path_list, taxonomy_tree, output_path, rows_at_a_time, normalization, cell_set, tmp_dir, n_processors, copy_data_over, layer, gene_id_col)
340 if cell_set is None or cell_str in cell_set:
341 cell_name_to_cluster_name[cell_str] = cluster
--> 343 was_written = precompute_summary_stats_from_h5ad_and_lookup(
344 data_path_list=data_path_list,
345 cell_name_to_cluster_name=cell_name_to_cluster_name,
346 cluster_to_output_row=cluster_to_output_row,
347 output_path=output_path,
348 rows_at_a_time=rows_at_a_time,
349 normalization=normalization,
350 tmp_dir=tmp_dir,
351 n_processors=n_processors,
352 copy_data_over=copy_data_over,
353 layer=layer,
354 gene_id_col=gene_id_col)
356 if was_written:
357 with h5py.File(output_path, 'a') as out_file:

File /public/home/yzhang/zy_data/Project_AD_st/Multiome/tools/cell_type_mapper-main/src/cell_type_mapper/diff_exp/precompute_from_anndata.py:448, in precompute_summary_stats_from_h5ad_and_lookup(data_path_list, cell_name_to_cluster_name, cluster_to_output_row, output_path, rows_at_a_time, normalization, tmp_dir, n_processors, copy_data_over, layer, gene_id_col)
443 buffer_dir = tempfile.mkdtemp(
444 dir=tmp_dir,
445 prefix='precomputation_data_buffer_')
447 try:
--> 448 flag = _precompute_summary_stats_from_h5ad_and_lookup(
449 data_path_list=data_path_list,
450 cell_name_to_cluster_name=cell_name_to_cluster_name,
451 cluster_to_output_row=cluster_to_output_row,
452 output_path=output_path,
453 rows_at_a_time=rows_at_a_time,
454 normalization=normalization,
455 tmp_dir=tmp_dir,
456 n_processors=n_processors,
457 buffer_dir=buffer_dir,
458 layer=layer,
459 gene_id_col=gene_id_col)
460 finally:
461 _clean_up(tmp_dir)

File /public/home/yzhang/zy_data/Project_AD_st/Multiome/tools/cell_type_mapper-main/src/cell_type_mapper/diff_exp/precompute_from_anndata.py:647, in _precompute_summary_stats_from_h5ad_and_lookup(data_path_list, cell_name_to_cluster_name, cluster_to_output_row, output_path, rows_at_a_time, normalization, tmp_dir, n_processors, buffer_dir, layer, gene_id_col)
644 process_list.append(p)
646 while len(process_list) >= n_processors:
--> 647 process_list = winnow_process_list(process_list)
649 while len(process_list) > 0:
650 process_list = winnow_process_list(process_list)

File /public/home/yzhang/zy_data/Project_AD_st/Multiome/tools/cell_type_mapper-main/src/cell_type_mapper/utils/multiprocessing_utils.py:31, in winnow_process_list(process_list)
29 to_pop.append(ii)
30 if process_list[ii].exitcode != 0:
---> 31 raise RuntimeError(
32 "One of the processes exited with code "
33 f"{process_list[ii].exitcode}")
34 for ii in to_pop:
35 process_list.pop(ii)

RuntimeError: One of the processes exited with code -7

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/cell_type_mapper/cli/precompute_stats_abc.py and follow the call into src/cell_type_mapper/diff_exp/precompute_from_anndata.py. Reproduce the precomputation with the provided configuration, then inspect src/cell_type_mapper/utils/multiprocessing_utils.py and the worker path around _precompute_summary_stats_from_h5ad_and_lookup. Done means identifying why a worker exits with code -7 and reporting or fixing the underlying failure with a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.