Question: VariantAnnotation: scanVcfHeader() throws error about missing keepNA
0
gravatar for dan.gatti
3.6 years ago by
dan.gatti0
dan.gatti0 wrote:

Not sure what happened. This works in R 3.1.1 with VariantAnnotation_1.12.9. I'm getting an error that says that "keepNA" is missing when reading the header for this VCF file.

> library(VariantAnnotation)
> snpfile = "ftp://ftp-mouse.sanger.ac.uk/REL-1505-SNPs_Indels/mgp.v5.merged.snps_all.dbSNP142.vcf.gz"
> hdr = scanVcfHeader(file = snpfile)
Error in FUN(X[[i]], ...) :
  could not find symbol "keepNA" in environment of the generic function
>

> sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets
[8] methods   base     

other attached packages:
 [1] VariantAnnotation_1.14.6 Rsamtools_1.20.4         Biostrings_2.36.1       
 [4] XVector_0.8.0            GenomicRanges_1.20.5     GenomeInfoDb_1.4.1      
 [7] IRanges_2.2.5            S4Vectors_0.6.1          BiocGenerics_0.14.0     
[10] BiocInstaller_1.18.3    

loaded via a namespace (and not attached):
 [1] AnnotationDbi_1.30.1    zlibbioc_1.14.0         GenomicAlignments_1.4.1
 [4] BiocParallel_1.2.7      BSgenome_1.36.2         tools_3.2.0            
 [7] Biobase_2.28.0          DBI_0.3.1               lambda.r_1.1.7         
[10] futile.logger_1.4.1     rtracklayer_1.28.6      futile.options_1.0.0   
[13] bitops_1.0-6            RCurl_1.95-4.7          biomaRt_2.24.0         
[16] RSQLite_1.0.0           GenomicFeatures_1.20.1  XML_3.98-1.3           
>

 

ADD COMMENTlink modified 3.6 years ago • written 3.6 years ago by dan.gatti0

The output of traceback() after the error occurs might be helpful.

ADD REPLYlink written 3.6 years ago by Martin Morgan ♦♦ 22k
Answer: VariantAnnotation: scanVcfHeader() throws error about missing keepNA
0
gravatar for Valerie Obenchain
3.6 years ago by
United States
Valerie Obenchain6.7k wrote:

I can't reproduce this error in windows or unix.

> snpfile
[1] "ftp://ftp-mouse.sanger.ac.uk/REL-1505-SNPs_Indels/mgp.v5.merged.snps_all.dbSNP142.vcf
.gz"
> hdr = scanVcfHeader(snpfile)
> hdr
class: VCFHeader
samples(36): 129P2_OlaHsd 129S1_SvImJ ... WSB_EiJ ZALENDE_EiJ
meta(2): META contig
fixed(3): FILTER ALT QUAL
info(4): INDEL DP DP4 CSQ
geno(14): GT GQ ... PV4 FI

> sessionInfo()
R version 3.2.1 (2015-06-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows Server 2008 R2 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets
[8] methods   base

other attached packages:
[1] VariantAnnotation_1.14.6 Rsamtools_1.20.4         Biostrings_2.36.1
[4] XVector_0.8.0            GenomicRanges_1.20.5     GenomeInfoDb_1.4.1
[7] IRanges_2.2.5            S4Vectors_0.6.1          BiocGenerics_0.14.0

loaded via a namespace (and not attached):
 [1] AnnotationDbi_1.30.1    zlibbioc_1.14.0         GenomicAlignments_1.4.1
 [4] BiocParallel_1.2.7      BSgenome_1.36.2         tools_3.2.1
 [7] Biobase_2.28.0          DBI_0.3.1               lambda.r_1.1.7
[10] futile.logger_1.4.1     rtracklayer_1.28.6      futile.options_1.0.0
[13] bitops_1.0-6            RCurl_1.95-4.7          biomaRt_2.24.0
[16] RSQLite_1.0.0           GenomicFeatures_1.20.1  XML_3.98-1.3
>

The only versions difference I see is R 3.2.0 vs 3.2.1. 'keepNA' is an Rboolean in Rinternals.h - looking at the svn logs it's tough to pinpoint anything obvious related to this. I'm assuming this is a reproducible error for you in a fresh R session?

Valerie

 

 

 

ADD COMMENTlink written 3.6 years ago by Valerie Obenchain6.7k
Answer: VariantAnnotation: scanVcfHeader() throws error about missing keepNA
0
gravatar for dan.gatti
3.6 years ago by
dan.gatti0
dan.gatti0 wrote:

Yes, it's definitely reproducible.  However, I uninstalled R and Rtools and installed R 3.2.1 and Rtools 3.2.  Then I updated all of my Bioconductor packages and now the bug is gone.  Sorry for the false alarm. I didn't think that the minor R 3.2.1 release would make a difference.

ADD COMMENTlink written 3.6 years ago by dan.gatti0

Good. I'm glad that worked.

ADD REPLYlink written 3.6 years ago by Valerie Obenchain6.7k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 210 users visited in the last hour