[BioC] Unit tests with DNAString objects

Jonathon Hill [guest] guest at bioconductor.org
Wed Jan 29 21:14:55 CET 2014


I am trying to create some unit tests for an S4 class I have created that includes a DNAString class object in one of its slots. However, all.equals and identical (as well as their corresponding RUnit functions) fail; all.equals returns an error and identical always returns "FALSE." Based on the all.equals error message, it appears that it is because DNAString class objects include an external pointer that cannot be handled by all.equals and can sometimes differ between objects, even if they contain identical sequence, causing identical to return "FALSE." Do you have any suggestions on a work around?

Thanks,

Jonathon Hill

 -- output of sessionInfo(): 

R version 3.0.2 (2013-09-25)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
[1] sangerseqR_0.99    RUnit_0.4.26       Biostrings_2.30.1  XVector_0.2.0      IRanges_1.20.6     BiocGenerics_0.8.0
[7] roxygen2_3.0.0    

loaded via a namespace (and not attached):
[1] brew_1.0-6      codetools_0.2-8 digest_0.6.4    stats4_3.0.2    stringr_0.6.2   tools_3.0.2    
> 

--
Sent via the guest posting facility at bioconductor.org.



More information about the Bioconductor mailing list