Skip to content

Commit

Permalink
add timing to write_run_level_bed_file
Browse files Browse the repository at this point in the history
  • Loading branch information
jethror1 committed Nov 21, 2024
1 parent 285db20 commit a2ddba2
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ def write_run_level_bed_file(copy_ratio_df, prefix) -> None:
name of run to prefix output file name with
"""
outfile = f"{prefix}_copy_ratios.gcnv.bed"
print(f"Writing run level bed to {outfile}")
start = timer()

with open(outfile, encoding="utf-8", mode="w") as fh:
# this line is needed at the beginning to tell igv.js that it is
Expand All @@ -249,6 +251,8 @@ def write_run_level_bed_file(copy_ratio_df, prefix) -> None:
copy_ratio_df.to_csv(outfile, sep="\t", header=True, index=False, mode="a")
compress_and_index_bed_file(outfile)

print(f"Completed writing run bed in {round(timer() - start, 2)}s")


def write_sample_bed_file(
copy_ratio_df, sample_name, keep_all_samples
Expand Down

0 comments on commit a2ddba2

Please sign in to comment.