From 8053869aa61fb430b89a32b0f8024fc133cea28f Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Thu, 5 Mar 2015 16:12:14 +0300 Subject: Helpers to split out functionality --- wqflask/wqflask/my_pylmm/pyLMM/convertlmm.py | 36 ++++++++++++++++++++++++++++ wqflask/wqflask/my_pylmm/pyLMM/runlmm.py | 20 ++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 wqflask/wqflask/my_pylmm/pyLMM/convertlmm.py create mode 100644 wqflask/wqflask/my_pylmm/pyLMM/runlmm.py (limited to 'wqflask') diff --git a/wqflask/wqflask/my_pylmm/pyLMM/convertlmm.py b/wqflask/wqflask/my_pylmm/pyLMM/convertlmm.py new file mode 100644 index 00000000..4147d90b --- /dev/null +++ b/wqflask/wqflask/my_pylmm/pyLMM/convertlmm.py @@ -0,0 +1,36 @@ +# This is a converter for common LMM formats, so as to keep complexity +# outside the main routines. + +# Copyright (C) 2015 Pjotr Prins (pjotr.prins@thebird.nl) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software 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 Affero General Public License for more details. + +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +from optparse import OptionParser + +usage = """ +Convert files for runlmm.py processing +""" + +parser = OptionParser(usage=usage) +# parser.add_option("-f", "--file", dest="input file", +# help="In", metavar="FILE") +parser.add_option("--kinship", + help="Parse a kinship file. This is an nxn plain text file and can be computed with the pylmmKinship program.") +parser.add_option("-q", "--quiet", + action="store_false", dest="verbose", default=True, + help="don't print status messages to stdout") + +(options, args) = parser.parse_args() + + diff --git a/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py b/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py new file mode 100644 index 00000000..df86f718 --- /dev/null +++ b/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py @@ -0,0 +1,20 @@ +# This is the LMM runner that calls the possible methods using command line +# switches. It acts as a multiplexer where all the invocation complexity +# is kept outside the main LMM routines. +# +# Copyright (C) 2015 Pjotr Prins (pjotr.prins@thebird.nl) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software 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 Affero General Public License for more details. + +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + + -- cgit v1.2.3