cancer-genomics / gemini_wflow

10 stars 0 forks source link

Can't read gnomad database. #1

Open IamksGEEK opened 1 year ago

IamksGEEK commented 1 year ago

Dear developer,

I found gnomad database is not read successfully in sbs_counter.R, more specifically, gnomad <<- c(gnomad, readRDS(gnomadVariants[new_chrom[i]])) is not working. But If I created a local variable inside the j-loop, everything works fine: testa <- GRanges() ... testa <- c(testa,readRDS(gnomadVariants[new_chrom[i]])) ... It's smart to rewrite global variable variable to avoid additional time consuming, but it seems like it will conflict with foreach parallel ? Or if there any problems if I read in all gnomad data in foreach process before the j-loop, and find the overlap between gnomad data and variant in current j-loop. Also, I tried to merge sbs_count.R and i05-count-sbs.R, and using "<-" instead of " <<-", everything works fine now. can you give me some suggestions, thank you

kongShuang

yeyup commented 1 year ago

Thank you @IamksGEEK very much for posting about this issue, as I also experienced it. The solution you provided is very effective and works well for me too.

Therefore, if feasible, could you @danielbruhm please update the code as soon as possible? This will help prevent similar problems for other users in the future.

IamksGEEK commented 1 year ago

Hi, yeyup You are welcome! I am glad I could help. kongshuang