expose more of the sequence class to python
[mussa.git] / py / sequence.cpp
index 3167d56b1ec9edfe6a9eb6e05e856c8e606af6c5..72284f9019e53dadf89c251c977fae63a9be7454 100644 (file)
@@ -1,4 +1,7 @@
 #include <boost/python.hpp>
+#include <boost/python/return_internal_reference.hpp>
+#include <boost/python/return_by_value.hpp>
+#include <boost/python/return_value_policy.hpp>
 using namespace boost::python;
 
 #include <string>
@@ -11,6 +14,8 @@ void export_sequence()
     .def("__str__", &Sequence::get_seq, return_value_policy<return_by_value>())
     .def("size", &Sequence::size)
     .def("__len__", &Sequence::size)
-    //.add_property("header", &Sequence::get_header)
+    .add_property("header", &Sequence::get_header, &Sequence::set_header)
+    //.add_property("seq", &Sequence::get_seq, &Sequence::set_seq)
+    .def("rcseq", &Sequence::rev_comp, return_value_policy<return_by_value>())
   ;
 }