Commit 36cf4b8c authored by Blaise Li's avatar Blaise Li
Browse files

Options to control vertical axis range.

parent dc73016d
......@@ -5,6 +5,9 @@ This script reads bigwig files, and creates a metagene profile.
The profiles can be restricted based on a list of gene identifiers.
"""
# TODO: Set vertical scale ?
# TODO: Set font size or graph width to avoid very large titles (also for the pipeline) ?
# TODO: What about using deeptools?
# deeptools.countReadsPerBin.CountReadsPerBin, using:
# - bedFile, with the gene spans
......@@ -217,6 +220,7 @@ PARAMETER_INFO = "\n".join(DEFAULT_PARAMETERS.keys())
def is_prof_param(key):
"""Determine if *key* corresponds to a valid parameter for a *Profile*."""
return key in {
"plot_title", "y_axis_label", "y_min", "y_max", "averagetype",
"reference_point_label", "start_label", "end_label",
......@@ -315,6 +319,14 @@ def main():
"-t", "--plot_title",
default="Metagene profile",
help="Title to use for the metagene plot.")
parser.add_argument(
"--yMin",
default=None,
help="Minimum value for the Y-axis")
parser.add_argument(
"--yMax",
default=None,
help="Maximum value for the Y-axis")
parser.add_argument(
"-e", "--extra_parameters",
help="Path to a yaml file containing parameters for the "
......@@ -330,6 +342,10 @@ def main():
extra_parameters["group_labels"] = [args.plot_title]
if args.library_labels:
extra_parameters["sample_labels"] = args.library_labels
if args.yMin is not None:
extra_parameters["y_min"] = [float(args.yMin)]
if args.yMax is not None:
extra_parameters["y_max"] = [float(args.yMax)]
if args.profile_plot:
check_options_msg = "Use only one among options -c and -g."
if args.gene_list:
......
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