Mercurial > repos > recetox > matchms_split
diff formatter.py @ 5:97be845e45c2 draft
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
author | recetox |
---|---|
date | Thu, 12 Oct 2023 13:27:42 +0000 |
parents | 0cf68b536cd1 |
children |
line wrap: on
line diff
--- a/formatter.py Tue Jun 27 14:25:30 2023 +0000 +++ b/formatter.py Thu Oct 12 13:27:42 2023 +0000 @@ -13,10 +13,12 @@ DataFrame: Scores DataFrame: Matches """ - dataframe = DataFrame(columns=['query', 'reference', *scores.scores.score_names]) + data = [] for i, (row, col) in enumerate(zip(scores.scores.row, scores.scores.col)): - dataframe.loc[i] = [scores.queries[col].metadata['compound_name'], scores.references[row].metadata['compound_name'], *scores.scores.data[i]] + data.append([scores.queries[col].metadata['compound_name'], scores.references[row].metadata['compound_name'], *scores.scores.data[i]]) + + dataframe = DataFrame(data, columns=['query', 'reference', *scores.scores.score_names]) return dataframe