gusevlab / fusion_twas

methods for functional summary-based imputation
http://gusevlab.org/projects/fusion/
GNU General Public License v3.0
75 stars 45 forks source link

Error in layout(lay.gwas): layout matrix must contain at least one reference to each of the values {1 ... 2} Execution halted #49

Closed rodrigoduarte88 closed 2 years ago

rodrigoduarte88 commented 2 years ago

Hi all, has any of you ever come across the following error? I am obtaining it when running the conditional analysis using custom-made TWAS weights. Considering there were many steps to generate my own weights, I imagine there can be a bug somewhere in an earlier step of my code causing this. However, what I don't understand is why it would be specific to a single chromosome (all other chromosomes work). Have you ever come across it?

Rscript ${fusion_software_dir}/FUSION.post_process.R \
        --input ${significant_file} \
        --sumstats ${sumstats} \
        --ref_ld_chr ${ref_ld} \
        --out ${significant_file}.PostProc.${CHR} \
        --chr ${CHR} \
        --save_loci \
        --plot \
        --locus_win 100000
6 strictly non-overlapping loci
consolidated to 6 non-overlapping loci with 100000 bp buffer
locus 1 best GWAS Chisq 33.1
locus 1 best GWAS Chisq conditioned     8.3
locus 1 best conditioned Chisq  21.1
locus 2 best GWAS Chisq 25.4
locus 2 best GWAS Chisq conditioned     8.42
locus 2 best conditioned Chisq  9.34
locus 3 best GWAS Chisq 33.9
locus 3 best GWAS Chisq conditioned     2.57
locus 3 best conditioned Chisq  50.5
Error in layout(lay.gwas) :
  layout matrix must contain at least one reference
to each of the values {1 ... 2}
Execution halted

[update] I was able to run the conditional analysis without generating the plot (by removing --plot --locus_win 100000).

rodrigoduarte88 commented 2 years ago

Hi there, I was able to circumvent this issue while generating the missing plot by increasing --locus_win 100000 to --locus_win 1000000. The conditional analysis statistics were exactly the same between the two runs with my data.