Comments (3)
Thank you so much for our email discussion troubleshooting my NAs.
We realised this was due to missing genotypes in the "truth" vcf file. Removing missing genotypes in the "truth" dataset beforehand produced a sensible r2 value. This was the script used:
library(vcfppR)
truth <- vcftable("x.vcf.gz", setid = T, info = F)
test <- vcftable("y.vcf.gz", setid = T, format = "DS", info = F)
N <- 22 ### number of samples is 22
truth$gt <- truth$gt[,1:N]
truth$samples <- test$samples[1:N]
remove sites with genotypes being NA in truth
w <- which(!is.na(rowSums(truth$gt)))
truth$gt <- truth$gt[w,]
truth[2:9] <- lapply(truth[2:9], function(a) a[w])
saveRDS(truth, file = "truth.rds")
names <- truth$samples[1:22]
samples <- paste0(names, collapse = ",")
res <- vcfcomp(test = "y.vcf.gz" ,
truth = "truth.rds",
stats = "r2",
names = names,
samples = samples,
bins = c(0,1))
str(res)
res
from vcfppr.
Hi Kiran,
I think the input region is not valid, which should be in the form of chr:start-end, or just chr.
I'll add validators for the input in next release. Thanks for the feedback.
from vcfppr.
Also make sure the af.tsv is valid, which should have a header line and five columns. If the af is calculated from the truth file, you can just make vcfcomp doing the job by ignoring the af option ie af=NULL
from vcfppr.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vcfppr.