Commit 8d61fa1c authored by Blaise Li's avatar Blaise Li
Browse files

Option to save bed file.

parent 03c60f76
......@@ -72,6 +72,7 @@ import sys
import warnings
from copy import deepcopy
from pathlib import Path
from shutil import copyfile
from tempfile import NamedTemporaryFile
from collections import defaultdict
# from itertools import chain
......@@ -310,6 +311,10 @@ def main():
help="Path to a file containing one gene identifier per line.\n"
"The metagene profile will only take into account those genes.\n"
"This should not be used at the same time as option -c")
"-k", "--keep_bed",
help="Path to a file where bed coordinates of the genes "
"listed whith option -g are to be saved.")
"-c", "--bed_coordinates",
help="Path to a file containing the coordinates of the features "
......@@ -380,6 +385,9 @@ def main():
args.bigwig_files, bed_filename,
plot_filename=args.profile_plot, **extra_parameters)
if args.gene_list:
if args.keep_bed:
copyfile(bed_filename, args.keep_bed)
print(f"bed coordinates saved in: {args.keep_bed}")
return 0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment