Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck at correlation step and Broken Process #104

Open
yrsong001 opened this issue Jul 10, 2024 · 1 comment
Open

Stuck at correlation step and Broken Process #104

yrsong001 opened this issue Jul 10, 2024 · 1 comment

Comments

@yrsong001
Copy link

Hi Cytospace team!

I have encountered some problems where the code stuck at this correlation = (v2.T.dot(v1) - sums / n) / stds / n, staying there for over 24 hours. Another issue is the concurrent.futures.process.BrokenProcessPool. Could you share some thoughts on how to solve this? Thank you!

Here is the log for the correlation problem:

2024-07-05 12:21:19 Load ST data
2024-07-05 12:25:04 Load scRNA data
Warning: Invalid name supplied, making object name syntactically valid. New object name is Cell.IDsCellType; see ?make.names for more details on syntax validity
2024-07-05 12:27:16 Integration
Performing PCA on the provided reference using 246 features as input.
Projecting PCA
Finding neighborhoods
Finding anchors
Found 12616 anchors
Filtering anchors
Retained 7054 anchors
Finding integration vectors
Finding integration vector weights
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**********************************************|
Predicting cell labels
/nas/longleaf/home/yrsong/.conda/envs/cytospace_v1.1.0/lib/python3.9/site-packages/cytospace/common/common.py:144: RuntimeWarning: divide by zero encountered in divide
data *= 106 / np.sum(data, axis=0, dtype=float)
/nas/longleaf/home/yrsong/.conda/envs/cytospace_v1.1.0/lib/python3.9/site-packages/cytospace/common/common.py:144: RuntimeWarning: invalid value encountered in multiply
data *= 10
6 / np.sum(data, axis=0, dtype=float)
Read and validate data ...
Estimating cell type fractions
Time to read and validate data: 2062.03 seconds
Down/up sample of scRNA-seq data according to estimated cell type fractions
Time to down/up sample scRNA-seq data: 0.91 seconds
Number of required processors: 14
/nas/longleaf/home/yrsong/.conda/envs/cytospace_v1.1.0/lib/python3.9/site-packages/cytospace/common/common.py:197: RuntimeWarning: invalid value encountered in divide
correlation = (v2.T.dot(v1) - sums / n) / stds / n

Here is the log for the Broken Process:

2024-07-10 01:32:14 Load ST data
2024-07-10 01:36:21 Load scRNA data
Warning: Invalid name supplied, making object name syntactically valid. New object name is Cell.IDsCellType; see ?make.names for more details on syntax validity
2024-07-10 01:38:02 Integration
Performing PCA on the provided reference using 239 features as input.
Projecting PCA
Finding neighborhoods
Finding anchors
Found 15616 anchors
Filtering anchors
Retained 8053 anchors
Finding integration vectors
Finding integration vector weights
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Predicting cell labels
Read and validate data ...
Estimating cell type fractions
Time to read and validate data: 8329.21 seconds
Down/up sample of scRNA-seq data according to estimated cell type fractions
Time to down/up sample scRNA-seq data: 1.75 seconds
Number of required processors: 10
Traceback (most recent call last):
File "/nas/longleaf/home/yrsong/.conda/envs/cytospace_v1.1.0/bin/cytospace", line 8, in
sys.exit(run_cytospace())
File "/nas/longleaf/home/yrsong/.conda/envs/cytospace_v1.1.0/lib/python3.9/site-packages/cytospace/cytospace.py", line 713, in run_cytospace
main_cytospace(**arguments)
File "/nas/longleaf/home/yrsong/.conda/envs/cytospace_v1.1.0/lib/python3.9/site-packages/cytospace/cytospace.py", line 636, in main_cytospace
apply_linear_assignment(scRNA_data_sampled, st_data, coordinates_data, cell_number_to_node_assignment,
File "/nas/longleaf/home/yrsong/.conda/envs/cytospace_v1.1.0/lib/python3.9/site-packages/cytospace/cytospace.py", line 455, in apply_linear_assignment
mapped_st_index, process_idx = f.result()
File "/nas/longleaf/home/yrsong/.conda/envs/cytospace_v1.1.0/lib/python3.9/concurrent/futures/_base.py", line 439, in result
return self.__get_result()
File "/nas/longleaf/home/yrsong/.conda/envs/cytospace_v1.1.0/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
raise self._exception
concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.

@lxsdy
Copy link

lxsdy commented Sep 6, 2024

Hi, I am using Cytospace for the first time and I am getting the same error as @yrsong001. I am using the tool on StereoSeq data with following command:

srun cytospace -sp reference_counts.txt -ctp cell_types_label.txt -stp stereo_counts.txt -cp spatial_coord.txt -mcn 2 -g square -sss -nop 42 -noss 10000.

Thank you for any ideas how to resolve the problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants