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

Error: C stack usage 7970628 is too close to the limit #30

Closed
aranham opened this issue Apr 22, 2022 · 11 comments
Closed

Error: C stack usage 7970628 is too close to the limit #30

aranham opened this issue Apr 22, 2022 · 11 comments

Comments

@aranham
Copy link

aranham commented Apr 22, 2022

Hi Teng,

I'm re-running on a subset of cells for which I had run Numbat successfully previously. However, it exits with error: "C stack usage 7970628 is too close to the limit"
I'm attaching the log file. I have the ulimit as unlimited.

I would appreciate your help. Thanks.
log (4).txt

@teng-gao
Copy link
Collaborator

Hi,

Could you let me know if tree_list_1.rds was produced in the output folder?

Thanks,
Teng

@teng-gao
Copy link
Collaborator

teng-gao commented Apr 23, 2022

This is actually an ape::ladderize bug @evanbiederstedt

> tree_list = readRDS(glue('{out_dir}/tree_list_1.rds'))
> tree = tree_list[[length(tree_list)]]
> tree %>% ape::ladderize() 
Error: C stack usage  7973764 is too close to the limit

I raised an issue on the ape github repo .. (emmanuelparadis/ape#54)

@aranham
Copy link
Author

aranham commented Apr 23, 2022

Thanks Evan and Teng for your reply.
I'm closing this issue because the error generated had to do with me using the old allele dataframe that was created from running the pileup and phasing script on all cells instead of using a new one created only for the subset of cells. It seems to run fine with the new allele dataframe. Sorry for the confusion.

Best,
Michelle

@whtns
Copy link
Contributor

whtns commented Nov 2, 2022

Hi! It looks like treeio developers put in a fix for this in treeio::as.phylo, however plotting deep trees takes a very long time. would it be possible to exclude the phylogeny from a plot_phylo_heatmap plot but still show inferred clones?

@evanbiederstedt
Copy link
Contributor

would it be possible to exclude the phylogeny from a plot_phylo_heatmap plot but still show inferred clones?

It sounds like you're recommending functionality to turn off this feature.

I think that's possible----we welcome pull requests. Please make a PR against the develop branch and ask for a review.

@teng-gao
Copy link
Collaborator

teng-gao commented Jan 2, 2023

Update: there is now a fix in the devel branch, although you also need to install the newest version of scistreer (v1.1.0):

devtools::install_github('https://github.com/kharchenkolab/scistreer')
devtools::install_github('https://github.com/kharchenkolab/numbat/tree/devel')

@stela2502
Copy link

@teng-gao - would it be possible to write which kind of fix was included? Cause I still get the same error. And honestly - it is annoying!

@stela2502
Copy link

I stupid question - is that still needed to fix the error? I get the same error and had to read #79 in order to understand/get an impression of the cause of the error.

I split up my data into batches of 1000 cells in order to make your program work. But then I get the LLR errors and in addition sometimes the C stack error. So I assumed the - too view cells with mutations - problem would be my issue.

But increasing this now to 5000 cells leads to even more C stack errors. So I do not think the too view cells is the basis of my problem. Please tell me if I am missing some important part here.

@stela2502
Copy link

Even with the fix being used I have the same C stack issue here:

numbat version: 1.4.1
scistreer version: 1.2.0
hahmmr version: 1.0.0
Running under parameters:
t = 1e-05
alpha = 1e-04
gamma = 20
min_cells = 100
init_k = 3
max_cost = 3767.1
n_cut = 0
max_iter = 2
max_nni = 100
min_depth = 0
use_loh = auto
segs_loh = None
call_clonal_loh = FALSE
segs_consensus_fix = None
multi_allelic = TRUE
min_LLR = 5
min_overlap = 0.45
max_entropy = 0.5
skip_nj = FALSE
diploid_chroms = None
ncores = 10
ncores_nni = 10
common_diploid = TRUE
tau = 0.3
check_convergence = FALSE
plot = TRUE
genome = hg38
Input metrics:
12557 cells

Mem used: 1.91Gb

Warning message in asMethod(object):
“sparse->dense coercion: allocating vector of size 1.6 GiB”
Approximating initial clusters using smoothed expression ..

Mem used: 1.91Gb

number of genes left: 11778

Warning message in asMethod(object):
“sparse->dense coercion: allocating vector of size 1.1 GiB”
running hclust...

An error ocured - ignoring that! Error: C stack usage  7971300 is too close to the limit

@stela2502
Copy link

I understand that the error might not be yours to fix - but is there any way one could just not do this part of the analysis? We are interested to differentiate between cancer and normal cells. If I am not mistaken I have no real interest in a phylogenetic tree of the cancer modifications. You help and insight would be very much appreciated!

@stela2502
Copy link

By the way - for me the tree_list_1.rds file does not get created. Do you need me to open a new issue for this?

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

5 participants