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

VCF files #21

Open
karpat90 opened this issue Mar 28, 2023 · 3 comments
Open

VCF files #21

karpat90 opened this issue Mar 28, 2023 · 3 comments

Comments

@karpat90
Copy link

Hello!

Many than for great package!
I wanted to ask how can extract vcf with info score from hla prediction output?

cl <- makeCluster(20)
set.seed(1000)
parseCommandArgs(evaluate=TRUE)
model.obj <- get(load(file1))
model <- hlaModelFromObj(model.obj)
summary(model)
p1=plot(model)
yourgeno <- hlaBED2Geno(bed.fn=bed.file, fam.fn=fam.file, bim.fn=bim.file)
summary(yourgeno)
pred.guess <- hlaPredict(model, yourgeno, match.type="Position")

summary(pred.guess)

hlaAlleleToVCF(hlaAlleleSubset(pred.guess, 1:4),DS=TRUE, verbose=TRUE, outfn=vcf.out)

save(pred.guess, p1, file=file2)

After I execute this script I get a vcf fle with dosages but no infor score.

Many thanks!

@zhengxwen
Copy link
Owner

HIBAG does not have allele-level confidence scores, instead it provides sample-level confidence scores.
pred.guess$value$prob is sample-level score, see pred.guess$value.

@karpat90
Copy link
Author

If I understood correctly, then it's better to remove alleles with pred.guess$value$prob < 0.5 ?

Thank you!

@zhengxwen
Copy link
Owner

pred.guess$value$prob is sample-level (used to remove low-confidence sample prediction).
If you want to remove alleles, consider using the minor allele frequency threshold (e.g., 3 or 5), just like what you do with PLINK if you use PLINK (singleton and doubleton are not considered in single variant tests).

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

2 participants