comparison COBRAxy/marea.py @ 278:5e8f1ab4242f draft

Uploaded
author francesco_lapi
date Mon, 12 May 2025 16:02:38 +0000
parents 1bf66a30ab23
children 7f37f9626071
comparison
equal deleted inserted replaced
277:1bf66a30ab23 278:5e8f1ab4242f
684 writeToCsv([ [reactId] + values for reactId, values in enrichedScores.items() ], fieldNames, outPath) 684 writeToCsv([ [reactId] + values for reactId, values in enrichedScores.items() ], fieldNames, outPath)
685 685
686 def temp_thingsInCommon(tmp :Dict[str, List[Union[float, FoldChange]]], core_map :ET.ElementTree, max_z_score :float, dataset1Name :str, dataset2Name = "rest", ras_enrichment = True) -> None: 686 def temp_thingsInCommon(tmp :Dict[str, List[Union[float, FoldChange]]], core_map :ET.ElementTree, max_z_score :float, dataset1Name :str, dataset2Name = "rest", ras_enrichment = True) -> None:
687 # this function compiles the things always in common between comparison modes after enrichment. 687 # this function compiles the things always in common between comparison modes after enrichment.
688 # TODO: organize, name better. 688 # TODO: organize, name better.
689 writeTabularResult(tmp, ras_enrichment, buildOutputPath(dataset1Name, dataset2Name, details = "Tabular Result", ext = utils.FileFormat.TSV)) 689 suffix = "RAS" if ras_enrichment else "RPS"
690 details = f"Tabular Result ({suffix})"
691
692 writeTabularResult(tmp, ras_enrichment, buildOutputPath(dataset1Name, dataset2Name, details = details, ext = utils.FileFormat.TSV))
690 693
691 if ras_enrichment: 694 if ras_enrichment:
692 fix_map(tmp, core_map, ARGS.pValue, ARGS.fChange, max_z_score) 695 fix_map(tmp, core_map, ARGS.pValue, ARGS.fChange, max_z_score)
693 return 696 return
694 697