Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Blaise LI
bioinfo_utils
Commits
36cf4b8c
Commit
36cf4b8c
authored
May 09, 2019
by
Blaise Li
Browse files
Options to control vertical axis range.
parent
dc73016d
Changes
1
Hide whitespace changes
Inline
Side-by-side
create_metagene_profile.py
View file @
36cf4b8c
...
...
@@ -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
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment