Mercurial > repos > bimib > cobraxy
comparison COBRAxy/flux_to_map.py @ 199:df664d1a86d4 draft
Uploaded
author | francesco_lapi |
---|---|
date | Thu, 21 Nov 2024 11:18:06 +0000 |
parents | 1dda40a60037 |
children | 4e368ecd4fb6 |
comparison
equal
deleted
inserted
replaced
198:1dda40a60037 | 199:df664d1a86d4 |
---|---|
663 if sizeMismatch > 0: row.extend([FIELD_NOT_AVAILABLE] * sizeMismatch) | 663 if sizeMismatch > 0: row.extend([FIELD_NOT_AVAILABLE] * sizeMismatch) |
664 writer.writerow({ field : data for field, data in zip(fieldNames, row) }) | 664 writer.writerow({ field : data for field, data in zip(fieldNames, row) }) |
665 | 665 |
666 OldEnrichedScores = Dict[str, List[Union[float, FoldChange]]] #TODO: try to use Tuple whenever possible | 666 OldEnrichedScores = Dict[str, List[Union[float, FoldChange]]] #TODO: try to use Tuple whenever possible |
667 def writeTabularResult(enrichedScores : OldEnrichedScores, outPath :utils.FilePath) -> None: | 667 def writeTabularResult(enrichedScores : OldEnrichedScores, outPath :utils.FilePath) -> None: |
668 fieldNames = ["ids", "P_Value", "fold change"] | 668 fieldNames = ["ids", "P_Value", "fold change", "z-score"] |
669 fieldNames.extend(["average_1", "average_2"]) | 669 fieldNames.extend(["average_1", "average_2"]) |
670 | 670 |
671 writeToCsv([ [reactId] + values for reactId, values in enrichedScores.items() ], fieldNames, outPath) | 671 writeToCsv([ [reactId] + values for reactId, values in enrichedScores.items() ], fieldNames, outPath) |
672 | 672 |
673 def temp_thingsInCommon(tmp :Dict[str, List[Union[float, FoldChange]]], core_map :ET.ElementTree, max_z_score :float, dataset1Name :str, dataset2Name = "rest") -> None: | 673 def temp_thingsInCommon(tmp :Dict[str, List[Union[float, FoldChange]]], core_map :ET.ElementTree, max_z_score :float, dataset1Name :str, dataset2Name = "rest") -> None: |