aboutsummaryrefslogtreecommitdiff
path: root/gn3/computations
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2021-09-22 07:53:53 +0300
committerFrederick Muriuki Muriithi2021-09-22 07:57:21 +0300
commitcd7f301688fd9780df1f842f8bd2b7602775ba1f (patch)
treecdbcf8077c532c1b5ba7bc0c934932c1a6eb58ab /gn3/computations
parent5892ffc7488b0c9cbb4ea08fd5c5f8648e0baea8 (diff)
downloadgenenetwork3-cd7f301688fd9780df1f842f8bd2b7602775ba1f.tar.gz
Fix pylint errors
* Add missing function and module docstrings * Remove unused imports * Fix import order * Rework some code sections to fix issues * Disable some pylint errors.
Diffstat (limited to 'gn3/computations')
-rw-r--r--gn3/computations/qtlreaper.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/gn3/computations/qtlreaper.py b/gn3/computations/qtlreaper.py
index 377db9b..5d17fed 100644
--- a/gn3/computations/qtlreaper.py
+++ b/gn3/computations/qtlreaper.py
@@ -87,11 +87,17 @@ def run_reaper(
return (output_filename, permu_output_filename)
def chromosome_sorter_key_fn(val):
+ """
+ Useful for sorting the chromosomes
+ """
if isinstance(val, int):
return val
return ord(val)
def organise_reaper_main_results(parsed_results):
+ """
+ Provide the results of running reaper in a format that is easier to use.
+ """
def __organise_by_chromosome(chr_name, items):
chr_items = [item for item in items if item["Chr"] == chr_name]
return {
@@ -129,12 +135,14 @@ def parse_reaper_main_results(results_file):
lines = infile.readlines()
def __parse_column_float_value(value):
+ # pylint: disable=W0702
try:
return float(value)
except:
return value
def __parse_column_int_value(value):
+ # pylint: disable=W0702
try:
return int(value)
except: