Biostrings: revComp error: Not compatible with STRSXP
0
0
Entering edit mode
@camille4nier-18765
Last seen 5.3 years ago

Dear Bioconductor, 

I'm experiencing somewhat of a trouble with Biostrings. It works in one session and not in the other. So here I am, with, I hope, a reproducible example.

This is my first posting, I hope it follows more or less the Posting Guide. 

Thank you for your help !

So, in the first case, Biostrings works like a charm:

> require("Biostrings")
> packageVersion("Biostrings")
[1] ‘2.50.1’
> example<-DNAString("AGAGTTTGAT")
> reverse(example)
  10-letter "DNAString" instance
seq: TAGTTTGAGA
> complement(example)
  10-letter "DNAString" instance
seq: TCTCAAACTA
> reverseComplement(example)
  10-letter "DNAString" instance
seq: ATCAAACTCT

R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252    LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C                            LC_TIME=English_United Kingdom.1252    

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

other attached packages:
[1] Biostrings_2.50.1   XVector_0.22.0      IRanges_2.16.0      S4Vectors_0.20.1    BiocGenerics_0.28.0

loaded via a namespace (and not attached):
[1] zlibbioc_1.28.0 compiler_3.5.1  tools_3.5.1    

 

 

In the second case, less so: 

> example<-DNAString("AGAGTTTGAT")
> reverse(example)
  10-letter "DNAString" instance
seq: TAGTTTGAGA
> complement(example)
1 DNA sequence in binary format stored in a vector.
Sequence length: 10 
Base composition:
  a   c   g   t 
NaN NaN NaN NaN 
(Total: 10 bases)
> reverseComplement(example)
Error in revComp(nuc.sequences, reverse) : 
  Not compatible with STRSXP: [type=S4].

> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252    LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C                            LC_TIME=English_United Kingdom.1252    

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

other attached packages:
 [1] microseq_1.2.2              dplyr_0.7.8                 microbiome_1.4.2            phangorn_2.4.0             
 [5] ape_5.2                     phyloseq_1.26.0             ShortRead_1.40.0            GenomicAlignments_1.18.0   
 [9] SummarizedExperiment_1.12.0 DelayedArray_0.8.0          matrixStats_0.54.0          Biobase_2.42.0             
[13] Rsamtools_1.34.0            GenomicRanges_1.34.0        GenomeInfoDb_1.18.1         BiocParallel_1.16.2        
[17] dada2_1.10.0                Rcpp_1.0.0                  gridExtra_2.3               ggplot2_3.1.0              
[21] knitr_1.20                  Biostrings_2.50.1           XVector_0.22.0              IRanges_2.16.0             
[25] S4Vectors_0.20.1            BiocGenerics_0.28.0        

loaded via a namespace (and not attached):
 [1] tidyr_0.8.2            bit64_0.9-7            jsonlite_1.6           splines_3.5.1          foreach_1.4.4         
 [6] RcppParallel_4.4.1     assertthat_0.2.0       BiocManager_1.30.4     latticeExtra_0.6-28    blob_1.1.1            
[11] GenomeInfoDbData_1.2.0 pillar_1.3.0           lattice_0.20-35        quadprog_1.5-5         glue_1.3.0            
[16] RColorBrewer_1.1-2     colorspace_1.3-2       Matrix_1.2-14          plyr_1.8.4             pkgconfig_2.0.2       
[21] zlibbioc_1.28.0        purrr_0.2.5            scales_1.0.0           tibble_1.4.2           mgcv_1.8-24           
[26] withr_2.1.2            lazyeval_0.2.1         survival_2.42-3        magrittr_1.5           crayon_1.3.4          
[31] nlme_3.1-137           MASS_7.3-50            hwriter_1.3.2          vegan_2.5-3            tools_3.5.1           
[36] data.table_1.11.8      stringr_1.3.1          Rhdf5lib_1.4.2         munsell_0.5.0          cluster_2.0.7-1       
[41] bindrcpp_0.2.2         ade4_1.7-13            compiler_3.5.1         rlang_0.3.0.1          rhdf5_2.26.0          
[46] grid_3.5.1             RCurl_1.95-4.11        iterators_1.0.10       biomformat_1.10.0      igraph_1.2.2          
[51] bitops_1.0-6           gtable_0.2.0           codetools_0.2-15       multtest_2.38.0        DBI_1.0.0             
[56] reshape2_1.4.3         R6_2.3.0               bit_1.1-14             fastmatch_1.1-0        bindr_0.1.1           
[61] permute_0.9-4          stringi_1.2.4          tidyselect_0.2.5 
biostrings Error Not compatible with STRSXP • 1.4k views
ADD COMMENT
0
Entering edit mode

You have a lot more packages loaded in the second session, and I would guess that one of these has functions called complement and reverseComplement and these are over-riding the versions present in Biostrings.

You could take a look at the conflicted package (https://conflicted.r-lib.org/) which tries to help you identify when two packages will conflict like this, and suggests some ways to work around it.

ADD REPLY
0
Entering edit mode

Thank you very much for your quick answer. A wonderful tool that is ! It works again. 

ADD REPLY

Login before adding your answer.

Traffic: 614 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6