Skip to content
Snippets Groups Projects

Fix issue 121 122

Merged Hanna JULIENNE requested to merge fix_issue_121_122 into master
8 files
+ 22
129559
Compare changes
  • Side-by-side
  • Inline
Files
8
+ 0
129548

Changes are too large to be shown.

View file @ 439d21d9
+ 0
0

workTable.hdf5

Download
+ 5
2
@@ -262,6 +262,7 @@ def create_quadrant_plot(work_file_path: str,
def create_qq_plot(work_file_path: str, qq_plot_path: str):
df = read_hdf(work_file_path, "SumStatTab")
df[['JASS_PVAL', 'UNIVARIATE_MIN_PVAL']] = replaceZeroes(
df[['JASS_PVAL', 'UNIVARIATE_MIN_PVAL']])
@@ -270,8 +271,10 @@ def create_qq_plot(work_file_path: str, qq_plot_path: str):
x = -np.log10(np.arange(1, pvalue.shape[0] + 1) / (pvalue.shape[0] + 2))
y = pvalue.sort_values()
plt.scatter(x[::-1], y, s=5)
pval_median = np.nanmedian(y)
lambda_value = pval_median / np.median(x)
pval_median = df.JASS_PVAL.median()
print("median pval")
print(pval_median)
lambda_value = pval_median / 0.5
x_1 = np.linspace(0, 6)
y_1 = lambda_value * x_1
x_2 = np.linspace(0, 6)
+ 13
6
@@ -865,11 +865,18 @@ def get_worktable_gencov(project_hdf_path: str):
for i in range(gencov.shape[0]):
for j in range(i, gencov.shape[0]):
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]]
})
if np.isnan(gencov.loc[sorted_trait.index[i], sorted_trait.index[j]]):
lines.append({
"phenotypeID_A": sorted_trait.iloc[i],
"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)
return lines
@@ -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"
file_lock = open(the_lock_path, "w")
file_lock.write(the_lock)
file_lock.close()
\ No newline at end of file
file_lock.close()
Loading