[Bioc-devel] Creating Biostrings DNAStringSet from Rcpp/C++
Michael Lawrence
lawrence.michael at gene.com
Tue Jan 5 14:31:03 CET 2016
You're going to want to use the Biostrings C API. You can see
TwoBitFile_read() in src/twoBit.c in rtracklayer for an example. It's
not trivial.
Michael
On Tue, Jan 5, 2016 at 5:21 AM, Sean Davis <seandavi at gmail.com> wrote:
> Forgive the really naive questions, but my C/C++ and Biostrings skills are
> pretty rough. I have been playing with Rcpp to interface to an external
> library for reading sequence formats. I am reading DNA sequences
> one-at-a-time and would like to package a set of those up as a DNAStringSet.
> I have at least two options:
>
> 1) Return a character vector back to R and then create a DNAStringSet in R.
> This works now and works fine.
> 2) Create the DNAStringSet in the cpp code.
>
> Are there advantages to using choice #2? If so, where would I start to get
> the necessary Rcpp/Biostrings glue in place? I know how to make new S4
> objects in Rcpp, so it is really a question of knowing what class hierarchy
> I need to instantiate and, roughly, how. Any pointers or code examples?
>
> Thanks,
> Sean
>
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
More information about the Bioc-devel
mailing list