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

Estimating IBD using MLE #73

Open
BELKHIR opened this issue Sep 3, 2021 · 3 comments
Open

Estimating IBD using MLE #73

BELKHIR opened this issue Sep 3, 2021 · 3 comments
Labels

Comments

@BELKHIR
Copy link

BELKHIR commented Sep 3, 2021

Hi,

I'm trying to run snpgdsIBDMLE function from the SNPRelate package on a seqArray obtained from your example :
file <- seqOpen(seqExampleFileName("KG_Phase1"))
mlibd = snpgdsIBDMLE(file,num.thread=8)

This return :
Identity-By-Descent analysis (MLE) on genotypes:
Calculating allele counts/frequencies ...
[==================================================] 100%, completed, 0s (process 1)
Excluding 122 SNVs (monomorphic: TRUE, MAF: NaN, missing rate: NaN)
Working space: 1,092 samples, 19,651 SNVs
using 8 (CPU) cores
Error in snpgdsIBDMLE(file, num.thread = 8) : Invalid position in CIndex.

However if I convert the seqArray file object to SNP GDS file this function works fine.

I'm missing some thing ?

Regards,

@zhengxwen zhengxwen added the bug label Sep 10, 2021
@zhengxwen
Copy link
Owner

If you specify a list of SNP IDs in snpgdsIBDMLE(), it works.

@BELKHIR
Copy link
Author

BELKHIR commented Sep 10, 2021

Thank's !
It can be a temporary solution.

Best regards

@BELKHIR
Copy link
Author

BELKHIR commented Sep 13, 2021

Hi,

There is still a problem if the function is called for a subset of snp:

file <- seqOpen(seqExampleFileName("KG_Phase1"))
variant.id <- seqGetData(file, "variant.id")
mlibd = snpgdsIBDMLE(file, snp.id = sample(variant.id, 100), num.thread=8)

Identity-By-Descent analysis (MLE) on genotypes:
Calculating allele counts/frequencies ...
[==================================================] 100%, completed, 0s (process 1)
Working space: 1,092 samples, 100 SNVs
using 8 (CPU) cores
Error in snpgdsIBDMLE(file, snp.id = sample(variant.id, 100), num.thread = 8) :
Invalid position in CIndex.

Best regards,

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

No branches or pull requests

2 participants