opain / Predicting-TWAS-features

Tool for predicting TWAS features (e.g. gene expression) in a target sample
GNU General Public License v3.0
15 stars 2 forks source link

Error in { : task 624 failed - "no loop for break/next, jumping to top level" Calls: %dopar% -> <Anonymous> Execution halted #5

Closed jmmax closed 2 hours ago

jmmax commented 6 months ago

Getting this error when trying to run the script : Error in { : task 624 failed - "no loop for break/next, jumping to top level" Calls: %dopar% -> Execution halted.

In the featuresprediction.log file I get up to here when the error appears: Analysis started at 2024-05-24 10:40:58.150869 Harmonsising reference and target data...Done! Number of SNPs in FUSION LD Reference = 1190321. Number of SNPs in target PLINK files = 1190321. Number of SNPs in both = 1190317. Percentage of SNPs in FUSION LD Reference that are in the target PLINK files = 100%. The .pos file contains 1122 features. Converting weights files into PLINK SCORE files...Done! Predicting features in reference sample... 16 feature/s cannot not be predicted (/scratch/users/k2366432/acne_gwas/results/TWAS_GSEA/GTExv8.ALL.Skin_Sun_Exposed_Lower_leg_expression_ref/Prediction_failed.txt) Done! Predicting features in chromosome 1...

Many thanks!

jmmax commented 6 months ago

Ah was the use of "next" in this foreach loop that was causing the error: TARG_expr <- foreach(i = 1:length(pos_chr_panel$FILE), .combine = cbind) %dopar% {

I replaced with return(NULL) and works fine now

opain commented 2 hours ago

Sorry for not replying. I missed this notification!

Thank you for finding the error and the solution!