X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=mussa.git;a=blobdiff_plain;f=py%2Fsequence.cpp;h=4d650c84890f77c79184d74522823c80207c21b5;hp=fbee90d08f34cba11ccd6c1062989cd262bcd481;hb=67888dae3b16b9d69aa846e393f11e7ff3633f16;hpb=5c3dc8c42679629c19ece07c0e63a53b1c69663f diff --git a/py/sequence.cpp b/py/sequence.cpp index fbee90d..4d650c8 100644 --- a/py/sequence.cpp +++ b/py/sequence.cpp @@ -17,13 +17,20 @@ namespace fs = boost::filesystem; void export_sequence() { void (Sequence::*load_fasta_piii)(const fs::path, int, int, int) = &Sequence::load_fasta; + void (Sequence::*add_annotation_ssii)( + std::string, + std::string, + Sequence::size_type, + Sequence::size_type + ) = &Sequence::add_annotation; class_("Sequence") .def(init()) .def("__len__", &Sequence::size, "return the length of the sequence") .def("__repr__", &Sequence::get_sequence, "display as string") .def("__str__", &Sequence::get_sequence, "cast to string") - .def("add_annotation", &Sequence::add_annotation, "append an annotation") + .def("add_annotation", add_annotation_ssii, + "create an annotation from name, type, start, stop") //.def("annotations", &Sequence::annotations, "return list of annotations") .def("add_motif", &Sequence::add_motif, "add a motif sequenence") .def("clear", &Sequence::clear, "clear the sequence and its annotations")