Entering edit mode
I would like to convert possibly-uncertain genotypes from a VCF to a snpMatrix object. My VCF file was produced by GATK 3.4-46 and complies with VCF specification 4.1. Here is what I am doing:
vcf <- readVcf(file=tabix.file, genome="test", param=vcf.params) snp.mat <- genotypeToSnpMatrix(vcf, uncertain=TRUE) In .local(x, ...) : uncertain=TRUE requires GP or GL; returning NULL
Could it be possible to add support for PL (phred-scaled genotype likelihood) ?
Here is my sessionInfo()
:
R version 3.2.2 (2015-08-14) Platform: x86_64-pc-linux-gnu (64-bit) Running under: CentOS release 6.6 (Final) attached base packages: [1] stats4 parallel stats graphics grDevices utils datasets [8] methods base other attached packages: [1] snpStats_1.20.0 Matrix_1.2-2 [3] survival_2.38-3 VariantAnnotation_1.16.0 [5] Rsamtools_1.22.0 Biostrings_2.38.0 [7] XVector_0.10.0 SummarizedExperiment_1.0.0 [9] Biobase_2.30.0 GenomicRanges_1.22.0 [11] GenomeInfoDb_1.6.0 IRanges_2.4.0 [13] S4Vectors_0.8.0 BiocGenerics_0.16.0
Adding PL to genotypeToSnpMatrix has been lurking on the bottom of my to-do list for probably a couple of years now. Time to move it to the top. I will try to get it done in the next week or two.
That would be great! I'll make sure to check this page regularly then.