t= 100:00 h CANCELLED AT DUE TO TIME LIMIT ***

90 views
Skip to first unread message

AnnaAP

unread,
Feb 28, 2024, 9:20:52 AMFeb 28
to Genomic SEM Users
Dear all, 

I have faced difficulties running the step 4 "Combine the summary statistics and LDSC output and run the common factor GWAS". I have already read the previous comments and following the suggestions, I increased the number of tasks and extended the time limit. Despite making these adjustments, the task did not finish within 100 hours, as limited by the time, even when running for  chromosome 22. Could you please provide guidance on how to proceed? 

#!/bin/bash
#SBATCH --job-name=GenomicSEM
#SBATCH --nodes=1
#SBATCH --mem=110GB
#SBATCH --cpus-per-task=22
#SBATCH --output=log4_genomicSEM_ch22.txt
#SBATCH --error=log4_genomicSEM_ch22.err
#SBATCH -t 100:00:00

load("2traits_LDSC.Rdata")
load("2traits_sumstats.Rdata")
nrow(BP_sumstats)
BP_sumstats<-subset(BP_sumstats,BP_sumstats$CHR==22)
BP_factor <- commonfactorGWAS(covstruc = LDSCoutput,
           SNPs = BP_sumstats,
           toler = 1e-30)          
save(BP_factor,file="2traits_DWLS_22chr.Rdata")
q()

I appreciate your guidance, 


Kind regards,

Anna 

agro...@gmail.com

unread,
Mar 4, 2024, 8:13:42 AMMar 4
to Genomic SEM Users
Hi Anna, 

While the multivariate GWAS often takes longer than anticipated, 100 hours for just chromosome 22 does seem like somehting must be going wrong. A few things to consider: 
1. It could be that your cluster is just "hanging" when trying to run in parallel. You might consider specifying cores=10 as an argument (since it looks like you request 22 cpus initially) and see if it works. I know others have run into issues where certain clusters require that you specify that the whole job only uses 22 cpus, as opposed to it trying to run 22 cpus within each parallel task. 

2. Part of the problem might be that it seems like you are running a two-indicator factor, but that will not be identified unless you include equality constraints on the factor loadings. That would look something like this: 
"F1=~a*X1+a*X2
F1~SNP" 
You would want to run that within the userGWAS function so you can specify the model itself. 

Anna Argoty

unread,
Mar 29, 2024, 12:40:50 PMMar 29
to agro...@gmail.com, Genomic SEM Users

Dear all,

 

Thank you for your response.

 

I have not been able to run these analyses yet. According to your response, I should use GWAS multivariate analysis instead of Common factor GWAS?. Here, I have a question.

 

I would like to briefly explain my aim in these analyses. I want to predict hypertension using information from systolic blood pressure and diastolic blood pressure (SBP, DBP). We do not have GWAS summary statistics for hypertension. However, we do have information from GWAS on SBP and DBP. Our aim is to utilize the summary statistics of SBP and DBP to predict a latent factor. We believe that by combining SBP and DBP, we could approximate hypertension. Therefore, we are employing a common factor GWAS approach.

 

If I understand correctly, in a multivariate GWAS, the SNP predicts both factors. However, this is not my aim. I have, for example, two SNPs (one for SBP, one for DBP), and I aim to predict one common factor. For this purpose, I am using the following command:

load("2traits_LDSC.Rdata")

load("2traits_sumstats.Rdata")

nrow(BP_sumstats)

BP_sumstats<-subset(BP_sumstats,BP_sumstats$CHR==22)

BP_factor <- commonfactorGWAS(covstruc = LDSCoutput, 

                              SNPs = BP_sumstats,

                              toler = 1e-30)           

save(BP_factor,file="2traits_DWLS_22chr.Rdata")

q()


However, I have tried it on different HPC systems, and it has not worked due to time limitations.


I would appreciate your insights on this


Kind regards, 

Anna 


--
You received this message because you are subscribed to the Google Groups "Genomic SEM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to genomic-sem-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/genomic-sem-users/5d53b83e-ffc3-4ace-9dab-92fcad869d22n%40googlegroups.com.


--
Cordialmente; 


Anna Deaicy Argoty Pantoja
(52) 5520739600

agro...@gmail.com

unread,
Apr 1, 2024, 3:32:54 PMApr 1
to Genomic SEM Users
Hi Anna, 

The model I suggested in the prior post is what you are trying to achieve: a single SNP that is present for both your traits (SBP and DBP) that is predicting a common factor. The issue is that a two-indicator factor is not identified unless you add equality constraints on the loadings (this is why I label the factor loadings with the a* prefix as a*X1+a*X2, which tells the model that the loadings should be equal). The problem is you can't impose an equality constraint in commonfactorGWAS, whereas userGWAS will allow you to do this. 

Best, 
  Andrew

Anna Deaicy Argoty Pantoja

unread,
Apr 15, 2024, 6:55:51 AMApr 15
to Genomic SEM Users
Dear Andrew, 

Thank you for your support. We have succesfully run the analyses using the code below including the number of cores:

model <- "F1=~a*SBP + a*DBP
F1~SNP"
CFactors <- userGWAS(covstruc = LDSCoutput, SNPs = BP_sumstats, model = model, sub = c("F1~SNP"),cores = 10,smooth_check=TRUE,fix_measurement=TRUE,Q_SNP=TRUE)
BP_factor<-CFactors[[1]]
save(BP_factor,file="2traits_DWLS.Rdata")

Thanks a lot!

Kind regards, 
Anna 

agro...@gmail.com

unread,
Apr 18, 2024, 10:41:34 PMApr 18
to Genomic SEM Users
Hi Anna, 

Thanks for responding with the solution! Just to say for others who make look at this thread with a similar issue that the default behavior for the GWAS functions is to use one less than the total number of cores available (e.g., if you are running on a cluster on a node with 48 cores it will use 47 cores). That said, sometimes this can max out the memory limits and will cause the process to "hang" and either stop running altogether or revert to running serially. I suspect that because setting the cores to 10 got you results that something along those lines was happening here. Glad you got it to run!

Best, 
  Andrew
Reply all
Reply to author
Forward
0 new messages