Commit c56e7f0b authored by Hanna  JULIENNE's avatar Hanna JULIENNE
Browse files

test to fix gencov

parent 48243ca3
...@@ -865,11 +865,18 @@ def get_worktable_gencov(project_hdf_path: str): ...@@ -865,11 +865,18 @@ def get_worktable_gencov(project_hdf_path: str):
for i in range(gencov.shape[0]): for i in range(gencov.shape[0]):
for j in range(i, gencov.shape[0]): for j in range(i, gencov.shape[0]):
lines.append({ if np.isnan(gencov.loc[sorted_trait.index[i], sorted_trait.index[j]]):
"phenotypeID_A": sorted_trait.iloc[i], lines.append({
"phenotypeID_B": sorted_trait.iloc[j], "phenotypeID_A": sorted_trait.iloc[i],
"gencov":gencov.loc[sorted_trait.index[i], sorted_trait.index[j]] "phenotypeID_B": sorted_trait.iloc[j],
}) "gencov":"null"
})
else:
lines.append({
"phenotypeID_A": sorted_trait.iloc[i],
"phenotypeID_B": sorted_trait.iloc[j],
"gencov":gencov.loc[sorted_trait.index[i], sorted_trait.index[j]]
})
print(lines) print(lines)
return lines return lines
...@@ -1062,4 +1069,4 @@ def create_genome_full_csv_lock_file(project_hdf_path): ...@@ -1062,4 +1069,4 @@ def create_genome_full_csv_lock_file(project_hdf_path):
the_lock = "The lock is set on : workTable.csv is not yet available" the_lock = "The lock is set on : workTable.csv is not yet available"
file_lock = open(the_lock_path, "w") file_lock = open(the_lock_path, "w")
file_lock.write(the_lock) file_lock.write(the_lock)
file_lock.close() file_lock.close()
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment