Skip to content
Snippets Groups Projects
Commit 8f69707d authored by Paul Costea's avatar Paul Costea
Browse files

div computation bux fix

parent cb4880e3
No related branches found
No related tags found
No related merge requests found
......@@ -377,6 +377,7 @@ def computeAllDiv(args):
# Correcting the coverage by the genome length observed in each pairwise comparison
correction_cov = [[min(cov_perc.loc[species, i], cov_perc.loc[species, j]) * genome_length / 100 for i in data.columns] for j in data.columns]
dist = [[genetic_distance(data.iloc[:, [i]], data.iloc[:, [j]]) / correction_cov[i][j] for i in range(j + 1)] for j in range(len(data.columns))]
dist = pd.DataFrame(dist, index=data.columns, columns=data.columns)
dist.to_csv(args.projdir + '/distances/' + '%s.diversity' % species, sep='\t')
if __name__ == "__main__":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment