Hi Nick,
Am Mittwoch, 6. September 2017, 03:38:54 schrieb Nick Mapsy:
> Hi, I'm just getting started with SeqAn (and C++), so I'm sure I'm missing
> something simple here.
>
> I've got a multiple sequence alignment working and producing an
> Align<String<Dna5> > object. Now all I need is to return the aligned
> sequences (with gaps) as C strings (char *) from the function.
Are you sure you want to be passing around these char** ? This is C++ after
all and we have references :D
> It seems like a simple thing, but after hours reading through the
> documentation of all the types and functions (and yes, Language Entity
> Types), I can't find the path from Align to char *.
>
> I found toCString(), but it takes a String, and I don't know how to get
> (gapped) Strings out of an Align.
>
> Thank you for any help, and hopefully I'm able to make use of this great
> library!
You can create a CharString from the alignment row and then call toCString()
on the CharString. But, like I said, I would really recommend working with
Strings and StringSets instead of pointers and [].
> P.S. Here's what I've written so far:
> (I'm using SeqAn 1.4.1 on Ubuntu 16.04.)
Please update to SeqAn2 as SeqAn1 has been deprecated for a while now. The
ubuntu package is called libseqan2-dev. It is available since Ubuntu 17.04,
but can also be installed manually:
http://seqan.readthedocs.io/en/master/Infrastructure/Use/ Install.html#library-package
Best regards,
Hannes
--
Hannes Hauswedell
Scientific staff & PhD candidate
Freie Universität Berlin / Max Planck Institute for Molecular Genetics
address Institut für Informatik
Takustraße 9
Room 019
14195 Berlin
telephone +49 (0)30 838-75241
fax +49 (0)30 838-75218
e-mail hannes.hauswedell@[molgen.mpg.de |fu-berlin.de]
_______________________________________________
seqan-dev mailing list
seqan-dev@lists.fu-berlin.de
https://lists.fu-berlin.de/listinfo/seqan-dev