#!env python import click from logtools import set_logging, get_logger from bricolage.stats import ( StatsFitness, StatsVisitor, StatsMutualInformation, StatsRelevantControl, StatsLag, StatsRobustness, StatsGenerations, StatsBindings, StatsEnvironmental) from experiment import ExperimentError from bricolage.graph_maker import GraphType log = get_logger() class NS(object): """Just a namespace""" experiment = None def run_from_commandline(exp): """Assign the global experiment, and then run the commands using click""" NS.experiment = exp bricolage() @click.group(chain=True) def bricolage(): pass verbose_ = click.option('--verbose', is_flag=True, default=False, help="Show debug output.")
# This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # PartitionFinder also includes the PhyML program, the RAxML program, and the # PyParsing library, all of which are protected by their own licenses and # conditions, using PartitionFinder implies that you agree with those licences # and conditions as well. import logtools import pandas as pd import os import collections log = logtools.get_logger() from util import PartitionFinderError _available_lists = ["ALL", # all models, excluding those with base frequencies estimated by ML and protein GTR models "ALLX", # all models, including those with base frequencies estimated by ML and protein GTR models "BEAST", # all models available in BEAST 2 "MRBAYES", # all models available in MrBayes 3.3 "GAMMA", # only models with gamma distributed rates only (i.e. +G, not +I+G, not free-rates models like LG4X) "GAMMAI", # only modles with +I+G ] def load_models(the_config): HERE = os.path.abspath(os.path.dirname(__file__)) the_config.all_models = pd.read_csv(os.path.join(HERE, 'models.csv'))
# Foundation, either version 3 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # PartitionFinder also includes the PhyML program, the RAxML program, and the # PyParsing library, all of which are protected by their own licenses and # conditions, using PartitionFinder implies that you agree with those licences # and conditions as well. import logtools log = logtools.get_logger() import subset_ops import submodels from util import PartitionFinderError, get_aic, get_aicc, get_bic class SchemeError(PartitionFinderError): pass class SchemeResult(object): def __init__(self, sch, nseq, branchlengths, model_selection): self.scheme_name = sch.name self.scheme = sch