X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=mussa.git;a=blobdiff_plain;f=py%2Fmussa.cpp;h=cd46d4941ff1e9de5f168e82ac595e7b7d48c268;hp=5f42599fb78111ea323fda0813c1dc3f43598c0f;hb=de84c0a72c8d284e3d124d38699ac065ffe37e3c;hpb=38969cafcdba2b1922452e3255c91dedd178c71c diff --git a/py/mussa.cpp b/py/mussa.cpp index 5f42599..cd46d49 100644 --- a/py/mussa.cpp +++ b/py/mussa.cpp @@ -7,7 +7,9 @@ namespace py = boost::python; void export_mussa() { - void (Mussa::*load_mupa_string)(std::string) = &Mussa::load_mupa_file; + void (Mussa::*save_string)(const std::string &) = &Mussa::save; + void (Mussa::*load_mupa_string)(const std::string &) = &Mussa::load_mupa_file; + void (Mussa::*load_string)(const std::string &) = &Mussa::load; void (Mussa::*append_sequence_ref)(const Sequence&) = &Mussa::append_sequence; void (Mussa::*append_sequence_ptr)(const boost::shared_ptr) = &Mussa::append_sequence; @@ -26,8 +28,8 @@ void export_mussa() ; py::class_("_Mussa", py::no_init) - .def("save", &Mussa::save) - .def("load", &Mussa::load, "Load previous run analysis") + .def("save", save_string, "Save analysis in the specified directory") + .def("load", load_string, "Load previous run analysis") .def("load_mupa", load_mupa_string, "Load mussa parameter file") .def("clear", &Mussa::clear, "Clear the current analysis") .add_property("name", &Mussa::get_name, &Mussa::set_name, "Set the name of the analysis") @@ -37,7 +39,8 @@ void export_mussa() "the number of base pairs in the sliding window") .add_property("threshold", &Mussa::get_threshold, &Mussa::set_threshold, "how many base pairs must match between two windows") - .def("softThreshold", &Mussa::set_soft_threshold) + .add_property("softThreshold", &Mussa::get_soft_threshold, + &Mussa::set_soft_threshold) .add_property("analysisMode", &Mussa::get_analysis_mode, &Mussa::set_analysis_mode) .add_property("analysisModeName", &Mussa::get_analysis_mode_name) @@ -46,7 +49,10 @@ void export_mussa() .def("sequences", &Mussa::sequences, py::return_internal_reference<>(), "return list of sequences") .def("add_sequence", append_sequence_ref, "attach a sequence to the analysis") ; - py::def("Mussa", &Mussa::init, "Construct a new Mussa object"); + py::def("Mussa", &Mussa::init, + "Construct a new Mussa object.\n" + "You can use this to load a previous analysis or to construct\n" + "a new analysis.\n"); py::register_ptr_to_python< boost::shared_ptr >(); py::enum_("analysis_modes")