Skip to content

Issue in SAIGE when trying to do conditional analysis using BGEN file as input in All of Us #190

@jtb324

Description

@jtb324

ISSUE

When trying to use SAIGE to perform conditional analysis in All of Us (AOU), we keep encountering the following error:

Error Message:

Error in merge.data.table(conditionDat, markerInfo, by.x = "SNP", by.y = "ID",  : 
  The following columns listed in `by.y` are missing from y: [ID]
Calls: SPAGMMATtest ... merge.data.table -> stopf -> raise_condition -> signal
In addition: Warning message:
In merge.data.table(conditionDat, markerInfo, by.x = "SNP", by.y = "ID",  :
  Input data.table 'y' has no columns.
Execution halted

From what I can tell this errors seems to be because markerInfo is set to NULL on line 263 of the Geno.R script and it is never changed if you are only providing the bgen file. Since the value is NULL, then there is no "ID" column to merge on. The only example I can find in the documentation is for doing conditional analysis with a vcf input. We have also run this code without the condition argument a few months ago in AOU and it worked indicating that something might be going on in the conditional logic branch.

Is this command made only to work with VCF files or is there something we are missing? I've pasted the command we ran as well to add more context:

Attempted Command:

# value of conditional argument
condition_vars = chr3:188394766:C:A,chr3:188402113:G:A

# command string
SPAGMMATtest(
    bgenFile = Sys.getenv("bgen_file"),
    bgenFileIndex = Sys.getenv("bgen_file_index"),
    AlleleOrder = "ref-first",
    is_imputed_data = FALSE,  
    chrom = Sys.getenv("chrom"), 
    GMMATmodelFile = Sys.getenv("step1_rdata"), 
    varianceRatioFile = Sys.getenv("step1_varRatio"),
    #minMAF = 0.001,
    #minMAC = 5,
    condition = Sys.getenv("condition_vars"),
    SAIGEOutputFile = Sys.getenv("output_file"),
    is_output_moreDetails=TRUE,
    LOCO = FALSE
)

Additional Information

All of Us version: v8 release
SAIGE version (docker image): 1.4.4.1 & 1.4.4.0 & 1.5.0
R version: 4.2.3
VM CPU count: 4
VM RAM size: 15 Gb

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions