xihaoli / STAARpipeline-Tutorial

The tutorial for performing single-/multi-trait association analysis of whole-genome/whole-exome sequencing (WGS/WES) studies using FAVORannotator, STAARpipeline and STAARpipelineSummary
GNU General Public License v3.0
21 stars 17 forks source link

LD_pruning error #33

Closed WANGyujian123 closed 4 months ago

WANGyujian123 commented 9 months ago

Hello Xihao, I tried to run both Summary_Known_Loci_Pruning.r and Summary_Known_Loci_Individual_Analysis.r,but I came across an issue. LD pruning halted on some chromosomes. Below is the output log, along with the error message. Do you know what caused the following error message, and how it will affect my final result, and how I can fix this problem


         used (Mb) gc trigger (Mb) max used (Mb)
Ncells 283149 15.2     664202 35.5   450931 24.1
Vcells 486990  3.8    8388608 64.0  1815700 13.9
[1] 1
# of selected samples: 378,834
# of selected variants: 3
# of selected samples: 378,834
# of selected variants: 3
# of selected samples: 380,943
# of selected variants: 2,093,696
# of selected samples: 378,834
# of selected variants: 0
Error in apply(Geno_adjusted, 2, mean) : 
  dim(X) must have a positive length
Calls: LD_pruning -> Individual_Analysis_cond -> apply
Execution halted
Error in apply(Geno_adjusted, 2, mean) : 
  dim(X) must have a positive length
Calls: LD_pruning -> Individual_Analysis_cond -> apply
Execution halted
Error in apply(Geno_adjusted, 2, mean) : 
  dim(X) must have a positive length
Calls: LD_pruning -> Individual_Analysis_cond -> apply
Execution halted
Error in apply(Geno_adjusted, 2, mean) : 
  dim(X) must have a positive length
Calls: LD_pruning -> Individual_Analysis_cond -> apply
Execution halted
Error in apply(Geno_adjusted, 2, mean) : 
  dim(X) must have a positive length
Calls: LD_pruning -> Individual_Analysis_cond -> apply
Execution halted
zilinli1988 commented 9 months ago

Could you please check the input of the known variant list? How many known variants are in chromosome 1?

WANGyujian123 commented 9 months ago

Could you please check the input of the known variant list? How many known variants are in chromosome 1?

Hi zilin, Thanks for your reply!

  1. I first obtained the rs of the significant genome-wide association variants from GWAS catalog, and approximately 100 variants were genome-wide significant.
  2. I then used STAARpipelineSummary_Known_Loci_Info.r to extract the information of CHR, POS, REF and ALT from #rs, but most of the variation information was not extracted, only eight of the variation information was extracted. Here is the information of the known variant list that extracted by STAARpipelineSummary_Known_Loci_Info.r:
    CHR       POS REF ALT
    1   1 155235843   T   C
    2   3 161359842   A   G
    3   4    958159   T   C
    4   7  23260430   A   C
    5  12  40542837   C   T
    6  16  28933075   C   G
    7  16  30966478   G   A
    8  19   2341049   C   T

    I checked my individual analysis results generated by STAARpipelineSummary_Individual_Analysis.r, it seems that whenever the sum of variants within a chromosome >1 will arise this error:

Individual analysis results:

"","CHR","POS","REF","ALT","ALT_AF","MAF","N","pvalue",
"","1","24419427","G","A",.......
"","7","","","".......
"","16","","","".......
"","19","",""........

so, chr7,chr16,chr19 have the same error as chr1, here is an example of chr7:

         used (Mb) gc trigger (Mb) max used (Mb)
Ncells 283149 15.2     664202 35.5   450931 24.1
Vcells 486990  3.8    8388608 64.0  1815700 13.9
[1] 7
# of selected samples: 378,834
# of selected variants: 2
# of selected samples: 378,834
# of selected variants: 2
# of selected samples: 380,943
# of selected variants: 992,436
# of selected samples: 378,834
# of selected variants: 0

Then what could be the possible reason for the error? Looking forward to your reply!

Regards, Yujian

xihaoli commented 7 months ago

Hi Yujian,

Thank you for following up. Have you resolved this issue already? If not, please send an email, and we can discuss it offline.

Best, Xihao

xihaoli commented 4 months ago

Hi Yujian,

Have you resolved this issue already? I will close this case for now, but feel free to reopen it if you have any questions related to this, or we can discuss it offline.

Best, Xihao