Skip to content
Snippets Groups Projects
Commit 8d61fa1c authored by Blaise Li's avatar Blaise Li
Browse files

Option to save bed file.

parent 03c60f76
Branches master
No related tags found
No related merge requests found
......@@ -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")
parser.add_argument(
"-k", "--keep_bed",
help="Path to a file where bed coordinates of the genes "
"listed whith option -g are to be saved.")
parser.add_argument(
"-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}")
os.unlink(bed_filename)
return 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment