Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in SPAGMMATtest ... merge bmerge Incompatible join types: x.ID (integer) and i.SNP (character) #137

Open
alix-lacoste opened this issue Mar 12, 2024 · 1 comment

Comments

@alix-lacoste
Copy link

alix-lacoste commented Mar 12, 2024

Hello, I'm getting a cryptic error that I believe is related to reading the groupFile. The groupFile is properly formatted, so I don't know who could be causing the typing error.
Here are the most recent logs producing the error:
Thank you in advance for the help

chromosome  21  model results are removed to save memory
chromosome  22  model results are removed to save memory
P-values of genetic variants with MAC <=  4  will be calculated via effecient resampling.
variance Ratio null is  0.8724423 
dosageFile type is  plink 
allele order in the plink file is  ref-first .
Reading bim file....
Reading fam file....
Setting position of samples in PLINK files....
Start  TRUE 
End  FALSE 
SKAT-O test will be performed. P-values for BURDEN and SKAT tests will also be output
is_single_in_groupTest = TRUE. Single-variant assoc tests results will be output
Start extracting marker-level information from 'groupFile' of groupFile.txt ....
indexChunk is  0 
indexChunk  0 
nRegions  3736 
Error in bmerge(i, x, leftcols, rightcols, roll, rollends, nomatch, mult,  : 
  Incompatible join types: x.ID (integer) and i.SNP (character)
Calls: SPAGMMATtest ... merge -> merge.data.table -> [ -> [.data.table -> bmerge
Execution halted

Note that I formatted the groupFile according to the doc and the example files, which is chr:pos:ref:alt, NOT according to the helper function, which shows chr:pos_ref/alt

My command is the following:

step2_SPAtests.R \
      --bedFile=plink_step_2.bed \
      --bimFile=plink_step_2.bim \
      --famFile=plink_step_2.fam \
      --AlleleOrder=ref-first \
      --minMAF=0 \
      --minMAC=0.5 \
      --GMMATmodelFile=step_1_output.rda \
      --varianceRatioFile=step_1_output.varianceRatio.txt \
      --groupFile=groupFile.txt \
      --annotation_in_groupTest="ptv;ptv,missense-path" \
      --maxMAF_in_groupTest=0.1 \
      --r.corr=0 \
      --chrom=1 \
      --OutputFile=step_2_out
@alix-lacoste
Copy link
Author

I believe I found the issue (based on browsing through previous issues, such as @evatosco's response here). It looks like the variant IDs in the plink files need to be strings; mine were integers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant