Skip to content

Commit

Permalink
write rnk file
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhuoqing Fang authored and Zhuoqing Fang committed Dec 4, 2024
1 parent a8cc60d commit a2eb05d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions gseapy/gsea.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,10 @@ def run(self):
self._heatmat(df=dat.iloc[gsum.indices[0]], classes=self.groups)
# write output and plotting
self.to_df(gsum.summaries, gmt, self.ranking)
if self._outdir is not None:
self.ranking.to_csv(
os.path.join(self.outdir, "gsea_data.rnk"), sep="\t", header=False
)
self._logger.info("Congratulations. GSEApy ran successfully.................\n")

return
Expand Down Expand Up @@ -582,8 +586,8 @@ def run(self):
indices=gsum.indices if isinstance(dat2, pd.DataFrame) else None,
)
if self._outdir is not None:
self._logger.info(
"Start to generate gseapy reports, and produce figures..."
self.ranking.to_csv(
os.path.join(self.outdir, "prerank_data.rnk"), sep="\t", header=False
)

self._logger.info("Congratulations. GSEApy runs successfully................\n")
Expand Down

0 comments on commit a2eb05d

Please sign in to comment.