aboutsummaryrefslogtreecommitdiff
path: root/wqflask/maintenance
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/maintenance')
-rw-r--r--wqflask/maintenance/convert_geno_to_bimbam.py6
-rw-r--r--wqflask/maintenance/gen_select_dataset.py8
-rw-r--r--wqflask/maintenance/generate_kinship_from_bimbam.py4
-rw-r--r--wqflask/maintenance/geno_to_json.py4
-rw-r--r--wqflask/maintenance/quantile_normalize.py16
-rw-r--r--wqflask/maintenance/set_resource_defaults.py30
6 files changed, 34 insertions, 34 deletions
diff --git a/wqflask/maintenance/convert_geno_to_bimbam.py b/wqflask/maintenance/convert_geno_to_bimbam.py
index c5af1ca6..078be529 100644
--- a/wqflask/maintenance/convert_geno_to_bimbam.py
+++ b/wqflask/maintenance/convert_geno_to_bimbam.py
@@ -56,7 +56,7 @@ class ConvertGenoFile:
'@pat': "0",
'@het': "0.5",
'@unk': "NA"
- }
+ }
self.configurations = {}
self.input_fh = open(self.input_file)
@@ -171,7 +171,7 @@ class ConvertGenoFile:
snp_output_file = os.path.join(
new_directory, group_name + "_snps.txt")
output_files = [geno_output_file,
- pheno_output_file, snp_output_file]
+ pheno_output_file, snp_output_file]
print("%s -> %s" % (
os.path.join(old_directory, input_file), geno_output_file))
convertob = ConvertGenoFile(input_file, output_files)
@@ -184,7 +184,7 @@ class ConvertGenoFile:
print(" Exception:", why)
print(traceback.print_exc())
print(" Found in row %s at tabular column %s" % (convertob.latest_row_pos,
- convertob.latest_col_pos))
+ convertob.latest_col_pos))
print(" Column is:", convertob.latest_col_value)
print(" Row is:", convertob.latest_row_value)
break
diff --git a/wqflask/maintenance/gen_select_dataset.py b/wqflask/maintenance/gen_select_dataset.py
index 484336a6..db65a11f 100644
--- a/wqflask/maintenance/gen_select_dataset.py
+++ b/wqflask/maintenance/gen_select_dataset.py
@@ -62,10 +62,10 @@ def parse_db_uri():
parsed_uri = urllib.parse.urlparse(SQL_URI)
db_conn_info = dict(
- db=parsed_uri.path[1:],
- host=parsed_uri.hostname,
- user=parsed_uri.username,
- passwd=parsed_uri.password)
+ db=parsed_uri.path[1:],
+ host=parsed_uri.hostname,
+ user=parsed_uri.username,
+ passwd=parsed_uri.password)
print(db_conn_info)
return db_conn_info
diff --git a/wqflask/maintenance/generate_kinship_from_bimbam.py b/wqflask/maintenance/generate_kinship_from_bimbam.py
index cd39fceb..9f01d094 100644
--- a/wqflask/maintenance/generate_kinship_from_bimbam.py
+++ b/wqflask/maintenance/generate_kinship_from_bimbam.py
@@ -23,7 +23,7 @@ class GenerateKinshipMatrices:
def generate_kinship(self):
gemma_command = "/gnu/store/xhzgjr0jvakxv6h3blj8z496xjig69b0-profile/bin/gemma -g " + self.geno_file + \
" -p " + self.pheno_file + \
- " -gk 1 -outdir /home/zas1024/genotype_files/genotype/bimbam/ -o " + self.group_name
+ " -gk 1 -outdir /home/zas1024/genotype_files/genotype/bimbam/ -o " + self.group_name
print("command:", gemma_command)
os.system(gemma_command)
@@ -52,7 +52,7 @@ class GenerateKinshipMatrices:
print(" Exception:", why)
print(traceback.print_exc())
print(" Found in row %s at tabular column %s" % (convertob.latest_row_pos,
- convertob.latest_col_pos))
+ convertob.latest_col_pos))
print(" Column is:", convertob.latest_col_value)
print(" Row is:", convertob.latest_row_value)
break
diff --git a/wqflask/maintenance/geno_to_json.py b/wqflask/maintenance/geno_to_json.py
index c74489a8..32e0e34b 100644
--- a/wqflask/maintenance/geno_to_json.py
+++ b/wqflask/maintenance/geno_to_json.py
@@ -63,7 +63,7 @@ class ConvertGenoFile:
'@pat': "0",
'@het': "0.5",
'@unk': "NA"
- }
+ }
self.configurations = {}
#self.skipped_cols = 3
@@ -172,7 +172,7 @@ class ConvertGenoFile:
print(" Exception:", why)
print(traceback.print_exc())
print(" Found in row %s at tabular column %s" % (convertob.latest_row_pos,
- convertob.latest_col_pos))
+ convertob.latest_col_pos))
print(" Column is:", convertob.latest_col_value)
print(" Row is:", convertob.latest_row_value)
break
diff --git a/wqflask/maintenance/quantile_normalize.py b/wqflask/maintenance/quantile_normalize.py
index ac7689f5..88bb2cb5 100644
--- a/wqflask/maintenance/quantile_normalize.py
+++ b/wqflask/maintenance/quantile_normalize.py
@@ -21,10 +21,10 @@ def parse_db_uri():
parsed_uri = urllib.parse.urlparse(SQL_URI)
db_conn_info = dict(
- db=parsed_uri.path[1:],
- host=parsed_uri.hostname,
- user=parsed_uri.username,
- passwd=parsed_uri.password)
+ db=parsed_uri.path[1:],
+ host=parsed_uri.hostname,
+ user=parsed_uri.username,
+ passwd=parsed_uri.password)
print(db_conn_info)
return db_conn_info
@@ -70,10 +70,10 @@ def set_data(dataset_name):
trait_name = line1.split('\t')[0]
for i, sample in enumerate(sample_names):
this_sample = {
- "name": sample,
- "value": line1.split('\t')[i + 1],
- "qnorm": line2.split('\t')[i + 1]
- }
+ "name": sample,
+ "value": line1.split('\t')[i + 1],
+ "qnorm": line2.split('\t')[i + 1]
+ }
sample_list.append(this_sample)
query = """SELECT Species.SpeciesName, InbredSet.InbredSetName, ProbeSetFreeze.FullName
FROM Species, InbredSet, ProbeSetFreeze, ProbeFreeze, ProbeSetXRef, ProbeSet
diff --git a/wqflask/maintenance/set_resource_defaults.py b/wqflask/maintenance/set_resource_defaults.py
index c6c4f44c..0f472494 100644
--- a/wqflask/maintenance/set_resource_defaults.py
+++ b/wqflask/maintenance/set_resource_defaults.py
@@ -44,10 +44,10 @@ def parse_db_uri():
parsed_uri = urllib.parse.urlparse(SQL_URI)
db_conn_info = dict(
- db=parsed_uri.path[1:],
- host=parsed_uri.hostname,
- user=parsed_uri.username,
- passwd=parsed_uri.password)
+ db=parsed_uri.path[1:],
+ host=parsed_uri.hostname,
+ user=parsed_uri.username,
+ passwd=parsed_uri.password)
print(db_conn_info)
return db_conn_info
@@ -69,12 +69,12 @@ def insert_probeset_resources(default_owner_id):
resource_ob['type'] = "dataset-probeset"
if resource[2] < 1 and resource[3] > 0:
resource_ob['default_mask'] = {"data": "view",
- "metadata": "view",
- "admin": "not-admin"}
+ "metadata": "view",
+ "admin": "not-admin"}
else:
resource_ob['default_mask'] = {"data": "no-access",
- "metadata": "no-access",
- "admin": "not-admin"}
+ "metadata": "no-access",
+ "admin": "not-admin"}
resource_ob['group_masks'] = {}
add_resource(resource_ob, update=False)
@@ -101,11 +101,11 @@ def insert_publish_resources(default_owner_id):
resource_ob['name'] = str(resource[0])
resource_ob['owner_id'] = default_owner_id
resource_ob['data'] = {"dataset": str(resource[1]),
- "trait": str(resource[0])}
+ "trait": str(resource[0])}
resource_ob['type'] = "dataset-publish"
resource_ob['default_mask'] = {"data": "view",
- "metadata": "view",
- "admin": "not-admin"}
+ "metadata": "view",
+ "admin": "not-admin"}
resource_ob['group_masks'] = {}
@@ -133,12 +133,12 @@ def insert_geno_resources(default_owner_id):
resource_ob['type'] = "dataset-geno"
if resource[2] < 1:
resource_ob['default_mask'] = {"data": "view",
- "metadata": "view",
- "admin": "not-admin"}
+ "metadata": "view",
+ "admin": "not-admin"}
else:
resource_ob['default_mask'] = {"data": "no-access",
- "metadata": "no-access",
- "admin": "not-admin"}
+ "metadata": "no-access",
+ "admin": "not-admin"}
resource_ob['group_masks'] = {}
add_resource(resource_ob, update=False)