Skip to content

Commit

Permalink
concat pd before writing to a file
Browse files Browse the repository at this point in the history
  • Loading branch information
anilthanki committed Dec 13, 2023
1 parent ba18fbd commit f72770c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@

if args.output is not None:
# write adata.obsm[mlm_key] and adata.obsm[mlm_pvals_key] to the output network files
adata.obsm["mlm_estimate", "mlm_pvals"].to_csv(args.output + "_mlm.tsv", sep="\t")
combined_df = pd.concat([adata.obsm["mlm_estimate"], adata.obsm["mlm_pvals"]], axis=1)

# Save the combined dataframe to a file
combined_df.to_csv(args.output + "_mlm.tsv", sep="\t")

# if args.activities_path is specified, generate the activities AnnData and save the AnnData object to the specified path
if args.activities_path is not None:
Expand Down

0 comments on commit f72770c

Please sign in to comment.