diff --git a/docs/content/tracks/auto/bed_options_text.txt b/docs/content/tracks/auto/bed_options_text.txt index ec76ff4d..40b48a4f 100644 --- a/docs/content/tracks/auto/bed_options_text.txt +++ b/docs/content/tracks/auto/bed_options_text.txt @@ -5,8 +5,9 @@ title = height = 2 # if you want to plot the track upside-down: # orientation = inverted -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale +# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. +# For the 'share-y' option the y axis values is shared between this plot and the overlay plot. +# Otherwise, each plot use its own scale #overlay_previous = yes # If the bed file contains the exon @@ -14,8 +15,8 @@ height = 2 # a region **with direction** is plotted. # If the bed file contains a column for color (column 9), then this color can be used by # setting: -# color = bed_rgb -#if color is a valid colormap name (like RbBlGn), then the score is mapped +#color = bed_rgb +# if color is a valid colormap name (like RbBlGn), then the score (column 5) is mapped # to the colormap. # In this case, the the min_value and max_value for the score can be provided, otherwise # the maximum score and minimum score found are used. @@ -24,8 +25,6 @@ height = 2 #max_value=100 # If the color is simply a color name, then this color is used and the score is not considered. color = darkblue -# height of track in cm -height = 5 # whether printing the labels labels = false # optional: @@ -37,21 +36,24 @@ fontsize = 10 # optional: line_width #line_width = 0.5 # the display parameter defines how the bed file is plotted. -# The options are ['collapsed', 'interleaved', 'triangles'] These options asume that the regions do not overlap. +# Default is 'stacked' where regions are plotted on different lines so +# we can see all regions and all labels. +# The other options are ['collapsed', 'interleaved', 'triangles'] +# These options assume that the regions do not overlap. # `collapsed`: The bed regions are plotted one after the other in one line. # `interleaved`: The bed regions are plotted in two lines, first up, then down, then up etc. -# if display is not given, then each region is plotted using the gene style # optional, default is black. To remove the border, simply set 'border_color' to none # Not used in tssarrow style #border_color = black -# style to plot the genes when they have exon information +# style to plot the genes when the display is not triangles #style = UCSC #style = flybase #style = tssarrow # maximum number of gene rows to be plotted. This # field is useful to limit large number of close genes # to be printed over many rows. When several images want -# to be combined this must be set to get equal size, otherwise, on each image the height of each gene changes +# to be combined this must be set to get equal size +# otherwise, on each image the height of each gene changes #gene_rows = 10 # by default the ymax is the number of # rows occupied by the genes in the region plotted. However, @@ -81,9 +83,6 @@ fontsize = 10 # If you want that the tip of the arrow correspond to # the extremity of the interval use: # arrowhead_included = true -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale -#overlay_previous = yes # optional. If not given is guessed from the file ending. file_type = bed \ No newline at end of file diff --git a/docs/content/tracks/auto/bedgraph_matrix_options_text.txt b/docs/content/tracks/auto/bedgraph_matrix_options_text.txt index 3e438106..d8d2f32f 100644 --- a/docs/content/tracks/auto/bedgraph_matrix_options_text.txt +++ b/docs/content/tracks/auto/bedgraph_matrix_options_text.txt @@ -5,8 +5,9 @@ title = height = 2 # if you want to plot the track upside-down: # orientation = inverted -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale +# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. +# For the 'share-y' option the y axis values is shared between this plot and the overlay plot. +# Otherwise, each plot use its own scale #overlay_previous = yes # a bedgraph matrix file is like a bedgraph, except that per bin there @@ -23,7 +24,8 @@ type = lines # If the type is not lines, you can choose to keep the matrix as not rasterized # (only used if you use pdf or svg output format) by using: # rasterize = false -# The different options for color maps can be found here: https://matplotlib.org/users/colormaps.html +# The different options for color maps can be found here: +# https://matplotlib.org/users/colormaps.html # the default color map is viridis # If you want your own colormap you can put the values of the color you want # For example, colormap = ['blue', 'yellow', 'red'] diff --git a/docs/content/tracks/auto/bedgraph_options_text.txt b/docs/content/tracks/auto/bedgraph_options_text.txt index 42f8473d..43ce3f2b 100644 --- a/docs/content/tracks/auto/bedgraph_options_text.txt +++ b/docs/content/tracks/auto/bedgraph_options_text.txt @@ -5,16 +5,19 @@ title = height = 2 # if you want to plot the track upside-down: # orientation = inverted -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale +# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. +# For the 'share-y' option the y axis values is shared between this plot and the overlay plot. +# Otherwise, each plot use its own scale #overlay_previous = yes color = green +# To use a different color for negative values +#negative_color = red # To use transparency, you can use alpha # default is 1 # alpha = 0.5 # the default for min_value and max_value is 'auto' which means that the scale will go -# from the minimum value found in the region plotted to the maximum value found. +# roughly from the minimum value found in the region plotted to the maximum value found. min_value = 0 #max_value = auto # to convert missing data (NaNs) into zeros. Otherwise, missing data is not plotted. diff --git a/docs/content/tracks/auto/bigwig_options_text.txt b/docs/content/tracks/auto/bigwig_options_text.txt index 2770e719..5ac2de28 100644 --- a/docs/content/tracks/auto/bigwig_options_text.txt +++ b/docs/content/tracks/auto/bigwig_options_text.txt @@ -5,19 +5,23 @@ title = height = 2 # if you want to plot the track upside-down: # orientation = inverted -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale +# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. +# For the 'share-y' option the y axis values is shared between this plot and the overlay plot. +# Otherwise, each plot use its own scale #overlay_previous = yes color = #666666 +# To use a different color for negative values +#negative_color = red # To use transparency, you can use alpha # default is 1 # alpha = 0.5 # the default for min_value and max_value is 'auto' which means that the scale will go -# from the minimum value found in the region plotted to the maximum value found. +# roughly from the minimum value found in the region plotted to the maximum value found. min_value = 0 #max_value = auto -# The number of bins takes the region to be plotted and divides it into the number of bins specified +# The number of bins takes the region to be plotted and divides it +# into the number of bins specified # Then, at each bin the bigwig mean value is computed and plotted. # A lower number of bins produces a coarser tracks number_of_bins = 700 diff --git a/docs/content/tracks/auto/domains_options_text.txt b/docs/content/tracks/auto/domains_options_text.txt index ec76ff4d..c0331cb2 100644 --- a/docs/content/tracks/auto/domains_options_text.txt +++ b/docs/content/tracks/auto/domains_options_text.txt @@ -5,17 +5,15 @@ title = height = 2 # if you want to plot the track upside-down: # orientation = inverted -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale +# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. +# For the 'share-y' option the y axis values is shared between this plot and the overlay plot. +# Otherwise, each plot use its own scale #overlay_previous = yes -# If the bed file contains the exon -# structure (bed 12) then this is plotted. Otherwise -# a region **with direction** is plotted. # If the bed file contains a column for color (column 9), then this color can be used by # setting: -# color = bed_rgb -#if color is a valid colormap name (like RbBlGn), then the score is mapped +#color = bed_rgb +# if color is a valid colormap name (like RbBlGn), then the score (column 5) is mapped # to the colormap. # In this case, the the min_value and max_value for the score can be provided, otherwise # the maximum score and minimum score found are used. @@ -24,66 +22,10 @@ height = 2 #max_value=100 # If the color is simply a color name, then this color is used and the score is not considered. color = darkblue -# height of track in cm -height = 5 -# whether printing the labels -labels = false -# optional: -# by default the labels are not printed if you have more than 60 features. -# to change it, just increase the value: -#max_labels = 60 -# optional: font size can be given to override the default size -fontsize = 10 # optional: line_width #line_width = 0.5 -# the display parameter defines how the bed file is plotted. -# The options are ['collapsed', 'interleaved', 'triangles'] These options asume that the regions do not overlap. -# `collapsed`: The bed regions are plotted one after the other in one line. -# `interleaved`: The bed regions are plotted in two lines, first up, then down, then up etc. -# if display is not given, then each region is plotted using the gene style # optional, default is black. To remove the border, simply set 'border_color' to none -# Not used in tssarrow style #border_color = black -# style to plot the genes when they have exon information -#style = UCSC -#style = flybase -#style = tssarrow -# maximum number of gene rows to be plotted. This -# field is useful to limit large number of close genes -# to be printed over many rows. When several images want -# to be combined this must be set to get equal size, otherwise, on each image the height of each gene changes -#gene_rows = 10 -# by default the ymax is the number of -# rows occupied by the genes in the region plotted. However, -# by setting this option, the global maximum is used instead. -# This is useful to combine images that are all consistent and -# have the same number of rows. -#global_max_row = true -# If you want to plot all labels inside the plotting region: -#all_labels_inside = true -# If you want to display the name of the gene which goes over the plotted -# region in the right margin put: -#labels_in_margin = true -# if you use UCSC style, you can set the relative distance between 2 arrows on introns -# default is 2 -#arrow_interval = 2 -# if you use tssarrow style, you can choose the length of the arrow in bp -# (default is 4% of the plotted region) -#arrow_length = 5000 -# if you use flybase or tssarrow style, you can choose the color of non-coding intervals: -#color_utr = grey -# as well as the proportion between their height and the one of coding -# (by default they are the same height): -#height_utr = 1 -# By default, for oriented intervals in flybase style, -# or bed files with less than 12 columns, the arrowhead is added -# outside of the interval. -# If you want that the tip of the arrow correspond to -# the extremity of the interval use: -# arrowhead_included = true -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale -#overlay_previous = yes -# optional. If not given is guessed from the file ending. -file_type = bed +# optional. If not given it is guessed from the file ending. +file_type = domains \ No newline at end of file diff --git a/docs/content/tracks/auto/epilogos_options_text.txt b/docs/content/tracks/auto/epilogos_options_text.txt index df04bea8..dde74a2d 100644 --- a/docs/content/tracks/auto/epilogos_options_text.txt +++ b/docs/content/tracks/auto/epilogos_options_text.txt @@ -5,8 +5,9 @@ title = height = 2 # if you want to plot the track upside-down: # orientation = inverted -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale +# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. +# For the 'share-y' option the y axis values is shared between this plot and the overlay plot. +# Otherwise, each plot use its own scale #overlay_previous = yes # The categories file should contain the color information for each category id diff --git a/docs/content/tracks/auto/gtf_options_text.txt b/docs/content/tracks/auto/gtf_options_text.txt index b2ff970a..b5dfed1b 100644 --- a/docs/content/tracks/auto/gtf_options_text.txt +++ b/docs/content/tracks/auto/gtf_options_text.txt @@ -5,8 +5,9 @@ title = height = 2 # if you want to plot the track upside-down: # orientation = inverted -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale +# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. +# For the 'share-y' option the y axis values is shared between this plot and the overlay plot. +# Otherwise, each plot use its own scale #overlay_previous = yes # By default the transcript_name is used. @@ -30,21 +31,24 @@ fontsize = 10 # optional: line_width #line_width = 0.5 # the display parameter defines how the gtf file is plotted. -# The options are ['collapsed', 'interleaved', 'triangles'] These options asume that the regions do not overlap. +# Default is 'stacked' where regions are plotted on different lines so +# we can see all regions and all labels. +# The other options are ['collapsed', 'interleaved', 'triangles'] +# These options assume that the regions do not overlap. # `collapsed`: The gtf regions are plotted one after the other in one line. # `interleaved`: The gtf regions are plotted in two lines, first up, then down, then up etc. -# if display is not given, then each region is plotted using the gene style # optional, default is black. To remove the border, simply set 'border_color' to none # Not used in tssarrow style #border_color = black -# style to plot the genes when they have exon information +# style to plot the genes when the display is not triangles #style = UCSC #style = flybase #style = tssarrow # maximum number of gene rows to be plotted. This # field is useful to limit large number of close genes # to be printed over many rows. When several images want -# to be combined this must be set to get equal size, otherwise, on each image the height of each gene changes +# to be combined this must be set to get equal size +# otherwise, on each image the height of each gene changes #gene_rows = 10 # by default the ymax is the number of # rows occupied by the genes in the region plotted. However, @@ -74,9 +78,6 @@ fontsize = 10 # If you want that the tip of the arrow correspond to # the extremity of the interval use: # arrowhead_included = true -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale -#overlay_previous = yes # optional. If not given is guessed from the file ending. file_type = gtf \ No newline at end of file diff --git a/docs/content/tracks/auto/hic_matrix_options_text.txt b/docs/content/tracks/auto/hic_matrix_options_text.txt index 74aafaf4..45ab861e 100644 --- a/docs/content/tracks/auto/hic_matrix_options_text.txt +++ b/docs/content/tracks/auto/hic_matrix_options_text.txt @@ -1,6 +1,6 @@ -title = -# The different options for color maps can be found here: https://matplotlib.org/users/colormaps.html +# The different options for color maps can be found here: +# https://matplotlib.org/users/colormaps.html # the default color map is RdYlBu_r (_r) stands for reverse # If you want your own colormap you can put the values of the color you want # For example, colormap = ['blue', 'yellow', 'red'] @@ -10,7 +10,8 @@ title = # If it is more than 125% of the plotted region, it will # be adjsted to this maximum value. depth = 100000 -# height of track (in cm) can be given. Otherwise, the height is computed such that the proportions of the +# height of track (in cm) can be given. +# Otherwise, the height is computed such that the proportions of the # hic matrix are kept (e.g. the image does not appear shrink or extended) # height = 10 # min_value and max_value refer to the contacts in the matrix. @@ -23,8 +24,6 @@ transform = log1p # the default is to extend neighboring bins to # obtain an aesthetically pleasant output show_masked_bins = false -# if you want to plot the track upside-down: -# orientation = inverted # optional if the values in the matrix need to be scaled the # following parameter can be used. This is useful to plot multiple hic-matrices on the same scale # scale_factor = 1 diff --git a/docs/content/tracks/auto/hlines_options_text.txt b/docs/content/tracks/auto/hlines_options_text.txt index cdfb5169..53ea30ec 100644 --- a/docs/content/tracks/auto/hlines_options_text.txt +++ b/docs/content/tracks/auto/hlines_options_text.txt @@ -5,8 +5,9 @@ title = height = 2 # if you want to plot the track upside-down: # orientation = inverted -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale +# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. +# For the 'share-y' option the y axis values is shared between this plot and the overlay plot. +# Otherwise, each plot use its own scale #overlay_previous = yes # color of the lines @@ -14,6 +15,10 @@ color = black # To use transparency, you can use alpha # default is 1 # alpha = 0.5 +# the default for min_value and max_value is 'auto' which means that the scale will go +# roughly from the minimum value found in the region plotted to the maximum value found. +min_value = 0 +#max_value = auto # line width: # line_width = 0.5 # options for line_style are 'solid', 'dashed', 'dotted', and 'dashdot' diff --git a/docs/content/tracks/auto/links_options_text.txt b/docs/content/tracks/auto/links_options_text.txt index ea215862..1ad6c32e 100644 --- a/docs/content/tracks/auto/links_options_text.txt +++ b/docs/content/tracks/auto/links_options_text.txt @@ -5,8 +5,9 @@ title = height = 2 # if you want to plot the track upside-down: # orientation = inverted -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale +# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. +# For the 'share-y' option the y axis values is shared between this plot and the overlay plot. +# Otherwise, each plot use its own scale #overlay_previous = yes # the file format for links is (tab separated) @@ -18,8 +19,8 @@ height = 2 # depending on the value of links_type either 'arcs' or 'triangles' or 'loops' can be plotted. # If arcs, a line will be drawn from the center of the first region (chr1: 150), # to the center of the other region (chr1: 275). -# if triangles, the vertix of the triangle will be drawn at the center between the two points (also the center of -# each position is used) +# if triangles, the vertix of the triangle will be drawn at the center between the two points +# (also the extremity of each position is used) # if loops, a rectangle highlighting the intersection between the 2 regions will be shown # the triangles, and loops options are convenient to overlay over a # Hi-C matrix to highlight the matrix pixel of the highlighted link diff --git a/docs/content/tracks/auto/narrow_peak_options_text.txt b/docs/content/tracks/auto/narrow_peak_options_text.txt index eef3022e..8e98007e 100644 --- a/docs/content/tracks/auto/narrow_peak_options_text.txt +++ b/docs/content/tracks/auto/narrow_peak_options_text.txt @@ -5,8 +5,9 @@ title = height = 2 # if you want to plot the track upside-down: # orientation = inverted -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale +# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. +# For the 'share-y' option the y axis values is shared between this plot and the overlay plot. +# Otherwise, each plot use its own scale #overlay_previous = yes color = #FF000080 diff --git a/docs/content/tracks/auto/scalebar_options_text.txt b/docs/content/tracks/auto/scalebar_options_text.txt index e6e2dddf..20cec025 100644 --- a/docs/content/tracks/auto/scalebar_options_text.txt +++ b/docs/content/tracks/auto/scalebar_options_text.txt @@ -5,8 +5,9 @@ title = height = 2 # if you want to plot the track upside-down: # orientation = inverted -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale +# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. +# For the 'share-y' option the y axis values is shared between this plot and the overlay plot. +# Otherwise, each plot use its own scale #overlay_previous = yes # color of the scalebar diff --git a/docs/content/tracks/auto/spacer_options_text.txt b/docs/content/tracks/auto/spacer_options_text.txt index e1201b84..5628419a 100644 --- a/docs/content/tracks/auto/spacer_options_text.txt +++ b/docs/content/tracks/auto/spacer_options_text.txt @@ -5,6 +5,7 @@ title = height = 2 # if you want to plot the track upside-down: # orientation = inverted -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale +# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. +# For the 'share-y' option the y axis values is shared between this plot and the overlay plot. +# Otherwise, each plot use its own scale #overlay_previous = yes diff --git a/docs/content/tracks/auto/x_axis_options_text.txt b/docs/content/tracks/auto/x_axis_options_text.txt index e1201b84..5628419a 100644 --- a/docs/content/tracks/auto/x_axis_options_text.txt +++ b/docs/content/tracks/auto/x_axis_options_text.txt @@ -5,6 +5,7 @@ title = height = 2 # if you want to plot the track upside-down: # orientation = inverted -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale +# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. +# For the 'share-y' option the y axis values is shared between this plot and the overlay plot. +# Otherwise, each plot use its own scale #overlay_previous = yes diff --git a/pygenometracks/tests/test_data/master_tracks.ini b/pygenometracks/tests/test_data/master_tracks.ini index e5154b0b..63ea1702 100644 --- a/pygenometracks/tests/test_data/master_tracks.ini +++ b/pygenometracks/tests/test_data/master_tracks.ini @@ -13,8 +13,8 @@ height = 0.5 [Li_et_al_2015] file = pygenometracks/tests/test_data/Li_et_al_2015.h5 -title = Li_et_al_2015 -# The different options for color maps can be found here: https://matplotlib.org/users/colormaps.html +# The different options for color maps can be found here: +# https://matplotlib.org/users/colormaps.html # the default color map is RdYlBu_r (_r) stands for reverse # If you want your own colormap you can put the values of the color you want # For example, colormap = ['blue', 'yellow', 'red'] @@ -24,7 +24,8 @@ title = Li_et_al_2015 # If it is more than 125% of the plotted region, it will # be adjsted to this maximum value. depth = 100000 -# height of track (in cm) can be given. Otherwise, the height is computed such that the proportions of the +# height of track (in cm) can be given. +# Otherwise, the height is computed such that the proportions of the # hic matrix are kept (e.g. the image does not appear shrink or extended) # height = 10 # min_value and max_value refer to the contacts in the matrix. @@ -37,8 +38,6 @@ transform = log1p # the default is to extend neighboring bins to # obtain an aesthetically pleasant output show_masked_bins = false -# if you want to plot the track upside-down: -# orientation = inverted # optional if the values in the matrix need to be scaled the # following parameter can be used. This is useful to plot multiple hic-matrices on the same scale # scale_factor = 1 @@ -56,19 +55,23 @@ title = bigwig_chrx_2e6_5e6 height = 2 # if you want to plot the track upside-down: # orientation = inverted -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale +# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. +# For the 'share-y' option the y axis values is shared between this plot and the overlay plot. +# Otherwise, each plot use its own scale #overlay_previous = yes color = #666666 +# To use a different color for negative values +#negative_color = red # To use transparency, you can use alpha # default is 1 # alpha = 0.5 # the default for min_value and max_value is 'auto' which means that the scale will go -# from the minimum value found in the region plotted to the maximum value found. +# roughly from the minimum value found in the region plotted to the maximum value found. min_value = 0 #max_value = auto -# The number of bins takes the region to be plotted and divides it into the number of bins specified +# The number of bins takes the region to be plotted and divides it +# into the number of bins specified # Then, at each bin the bigwig mean value is computed and plotted. # A lower number of bins produces a coarser tracks number_of_bins = 700 @@ -122,8 +125,9 @@ title = tad_classification height = 2 # if you want to plot the track upside-down: # orientation = inverted -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale +# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. +# For the 'share-y' option the y axis values is shared between this plot and the overlay plot. +# Otherwise, each plot use its own scale #overlay_previous = yes # If the bed file contains the exon @@ -131,8 +135,8 @@ height = 2 # a region **with direction** is plotted. # If the bed file contains a column for color (column 9), then this color can be used by # setting: -# color = bed_rgb -#if color is a valid colormap name (like RbBlGn), then the score is mapped +#color = bed_rgb +# if color is a valid colormap name (like RbBlGn), then the score (column 5) is mapped # to the colormap. # In this case, the the min_value and max_value for the score can be provided, otherwise # the maximum score and minimum score found are used. @@ -141,8 +145,6 @@ height = 2 #max_value=100 # If the color is simply a color name, then this color is used and the score is not considered. color = darkblue -# height of track in cm -height = 5 # whether printing the labels labels = false # optional: @@ -154,21 +156,24 @@ fontsize = 10 # optional: line_width #line_width = 0.5 # the display parameter defines how the bed file is plotted. -# The options are ['collapsed', 'interleaved', 'triangles'] These options asume that the regions do not overlap. +# Default is 'stacked' where regions are plotted on different lines so +# we can see all regions and all labels. +# The other options are ['collapsed', 'interleaved', 'triangles'] +# These options assume that the regions do not overlap. # `collapsed`: The bed regions are plotted one after the other in one line. # `interleaved`: The bed regions are plotted in two lines, first up, then down, then up etc. -# if display is not given, then each region is plotted using the gene style # optional, default is black. To remove the border, simply set 'border_color' to none # Not used in tssarrow style #border_color = black -# style to plot the genes when they have exon information +# style to plot the genes when the display is not triangles #style = UCSC #style = flybase #style = tssarrow # maximum number of gene rows to be plotted. This # field is useful to limit large number of close genes # to be printed over many rows. When several images want -# to be combined this must be set to get equal size, otherwise, on each image the height of each gene changes +# to be combined this must be set to get equal size +# otherwise, on each image the height of each gene changes #gene_rows = 10 # by default the ymax is the number of # rows occupied by the genes in the region plotted. However, @@ -198,9 +203,6 @@ fontsize = 10 # If you want that the tip of the arrow correspond to # the extremity of the interval use: # arrowhead_included = true -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale -#overlay_previous = yes # optional. If not given is guessed from the file ending. file_type = bed @@ -213,8 +215,9 @@ title = epilog.qcat height = 2 # if you want to plot the track upside-down: # orientation = inverted -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale +# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. +# For the 'share-y' option the y axis values is shared between this plot and the overlay plot. +# Otherwise, each plot use its own scale #overlay_previous = yes # The categories file should contain the color information for each category id diff --git a/pygenometracks/tracks/BedGraphMatrixTrack.py b/pygenometracks/tracks/BedGraphMatrixTrack.py index fdcbeb0b..5594fe30 100644 --- a/pygenometracks/tracks/BedGraphMatrixTrack.py +++ b/pygenometracks/tracks/BedGraphMatrixTrack.py @@ -25,7 +25,8 @@ class BedGraphMatrixTrack(BedGraphTrack): # If the type is not lines, you can choose to keep the matrix as not rasterized # (only used if you use pdf or svg output format) by using: # rasterize = false -# The different options for color maps can be found here: https://matplotlib.org/users/colormaps.html +# The different options for color maps can be found here: +# https://matplotlib.org/users/colormaps.html # the default color map is viridis # If you want your own colormap you can put the values of the color you want # For example, colormap = ['blue', 'yellow', 'red'] diff --git a/pygenometracks/tracks/BedGraphTrack.py b/pygenometracks/tracks/BedGraphTrack.py index 3870c915..84f312ca 100644 --- a/pygenometracks/tracks/BedGraphTrack.py +++ b/pygenometracks/tracks/BedGraphTrack.py @@ -17,11 +17,13 @@ class BedGraphTrack(GenomeTrack): TRACK_TYPE = 'bedgraph' OPTIONS_TXT = GenomeTrack.OPTIONS_TXT + """ color = green +# To use a different color for negative values +#negative_color = red # To use transparency, you can use alpha # default is 1 # alpha = 0.5 # the default for min_value and max_value is 'auto' which means that the scale will go -# from the minimum value found in the region plotted to the maximum value found. +# roughly from the minimum value found in the region plotted to the maximum value found. min_value = 0 #max_value = auto # to convert missing data (NaNs) into zeros. Otherwise, missing data is not plotted. diff --git a/pygenometracks/tracks/BedTrack.py b/pygenometracks/tracks/BedTrack.py index b17efbcd..f90f94ef 100644 --- a/pygenometracks/tracks/BedTrack.py +++ b/pygenometracks/tracks/BedTrack.py @@ -31,8 +31,8 @@ class BedTrack(GenomeTrack): # a region **with direction** is plotted. # If the bed file contains a column for color (column 9), then this color can be used by # setting: -# color = bed_rgb -#if color is a valid colormap name (like RbBlGn), then the score is mapped +#color = bed_rgb +# if color is a valid colormap name (like RbBlGn), then the score (column 5) is mapped # to the colormap. # In this case, the the min_value and max_value for the score can be provided, otherwise # the maximum score and minimum score found are used. @@ -41,8 +41,6 @@ class BedTrack(GenomeTrack): #max_value=100 # If the color is simply a color name, then this color is used and the score is not considered. color = darkblue -# height of track in cm -height = 5 # whether printing the labels labels = false # optional: @@ -54,21 +52,24 @@ class BedTrack(GenomeTrack): # optional: line_width #line_width = 0.5 # the display parameter defines how the bed file is plotted. -# The options are ['collapsed', 'interleaved', 'triangles'] These options asume that the regions do not overlap. +# Default is 'stacked' where regions are plotted on different lines so +# we can see all regions and all labels. +# The other options are ['collapsed', 'interleaved', 'triangles'] +# These options assume that the regions do not overlap. # `collapsed`: The bed regions are plotted one after the other in one line. # `interleaved`: The bed regions are plotted in two lines, first up, then down, then up etc. -# if display is not given, then each region is plotted using the gene style # optional, default is black. To remove the border, simply set 'border_color' to none # Not used in tssarrow style #border_color = black -# style to plot the genes when they have exon information +# style to plot the genes when the display is not triangles #style = UCSC #style = flybase #style = tssarrow # maximum number of gene rows to be plotted. This # field is useful to limit large number of close genes # to be printed over many rows. When several images want -# to be combined this must be set to get equal size, otherwise, on each image the height of each gene changes +# to be combined this must be set to get equal size +# otherwise, on each image the height of each gene changes #gene_rows = 10 # by default the ymax is the number of # rows occupied by the genes in the region plotted. However, @@ -98,9 +99,6 @@ class BedTrack(GenomeTrack): # If you want that the tip of the arrow correspond to # the extremity of the interval use: # arrowhead_included = true -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale -#overlay_previous = yes # optional. If not given is guessed from the file ending. file_type = {} """.format(TRACK_TYPE) diff --git a/pygenometracks/tracks/BigWigTrack.py b/pygenometracks/tracks/BigWigTrack.py index 7f0db244..530a038e 100644 --- a/pygenometracks/tracks/BigWigTrack.py +++ b/pygenometracks/tracks/BigWigTrack.py @@ -11,14 +11,17 @@ class BigWigTrack(GenomeTrack): TRACK_TYPE = 'bigwig' OPTIONS_TXT = GenomeTrack.OPTIONS_TXT + """ color = #666666 +# To use a different color for negative values +#negative_color = red # To use transparency, you can use alpha # default is 1 # alpha = 0.5 # the default for min_value and max_value is 'auto' which means that the scale will go -# from the minimum value found in the region plotted to the maximum value found. +# roughly from the minimum value found in the region plotted to the maximum value found. min_value = 0 #max_value = auto -# The number of bins takes the region to be plotted and divides it into the number of bins specified +# The number of bins takes the region to be plotted and divides it +# into the number of bins specified # Then, at each bin the bigwig mean value is computed and plotted. # A lower number of bins produces a coarser tracks number_of_bins = 700 diff --git a/pygenometracks/tracks/GenomeTrack.py b/pygenometracks/tracks/GenomeTrack.py index f9512218..aa197de8 100644 --- a/pygenometracks/tracks/GenomeTrack.py +++ b/pygenometracks/tracks/GenomeTrack.py @@ -25,8 +25,9 @@ class GenomeTrack(object): height = 2 # if you want to plot the track upside-down: # orientation = inverted -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale +# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. +# For the 'share-y' option the y axis values is shared between this plot and the overlay plot. +# Otherwise, each plot use its own scale #overlay_previous = yes """ DEFAULTS_PROPERTIES = {} diff --git a/pygenometracks/tracks/GtfTrack.py b/pygenometracks/tracks/GtfTrack.py index e87d994c..c91b3cbf 100644 --- a/pygenometracks/tracks/GtfTrack.py +++ b/pygenometracks/tracks/GtfTrack.py @@ -35,21 +35,24 @@ class GtfTrack(BedTrack): # optional: line_width #line_width = 0.5 # the display parameter defines how the gtf file is plotted. -# The options are ['collapsed', 'interleaved', 'triangles'] These options asume that the regions do not overlap. +# Default is 'stacked' where regions are plotted on different lines so +# we can see all regions and all labels. +# The other options are ['collapsed', 'interleaved', 'triangles'] +# These options assume that the regions do not overlap. # `collapsed`: The gtf regions are plotted one after the other in one line. # `interleaved`: The gtf regions are plotted in two lines, first up, then down, then up etc. -# if display is not given, then each region is plotted using the gene style # optional, default is black. To remove the border, simply set 'border_color' to none # Not used in tssarrow style #border_color = black -# style to plot the genes when they have exon information +# style to plot the genes when the display is not triangles #style = UCSC #style = flybase #style = tssarrow # maximum number of gene rows to be plotted. This # field is useful to limit large number of close genes # to be printed over many rows. When several images want -# to be combined this must be set to get equal size, otherwise, on each image the height of each gene changes +# to be combined this must be set to get equal size +# otherwise, on each image the height of each gene changes #gene_rows = 10 # by default the ymax is the number of # rows occupied by the genes in the region plotted. However, @@ -79,9 +82,6 @@ class GtfTrack(BedTrack): # If you want that the tip of the arrow correspond to # the extremity of the interval use: # arrowhead_included = true -# if you want to plot the track on top of the previous track. Options are 'yes' or 'share-y'. For the 'share-y' -# option the y axis values is shared between this plot and the overlay plot. Otherwise, each plot use its own scale -#overlay_previous = yes # optional. If not given is guessed from the file ending. file_type = {} """.format(TRACK_TYPE) diff --git a/pygenometracks/tracks/HLinesTrack.py b/pygenometracks/tracks/HLinesTrack.py index e8c8f78e..0f46fcd9 100644 --- a/pygenometracks/tracks/HLinesTrack.py +++ b/pygenometracks/tracks/HLinesTrack.py @@ -14,6 +14,10 @@ class HLinesTrack(GenomeTrack): # To use transparency, you can use alpha # default is 1 # alpha = 0.5 +# the default for min_value and max_value is 'auto' which means that the scale will go +# roughly from the minimum value found in the region plotted to the maximum value found. +min_value = 0 +#max_value = auto # line width: # line_width = 0.5 # options for line_style are 'solid', 'dashed', 'dotted', and 'dashdot' diff --git a/pygenometracks/tracks/HiCMatrixTrack.py b/pygenometracks/tracks/HiCMatrixTrack.py index 12812627..5c323976 100644 --- a/pygenometracks/tracks/HiCMatrixTrack.py +++ b/pygenometracks/tracks/HiCMatrixTrack.py @@ -19,8 +19,8 @@ class HiCMatrixTrack(GenomeTrack): SUPPORTED_ENDINGS = ['.h5', '.cool', '.mcool'] TRACK_TYPE = 'hic_matrix' OPTIONS_TXT = """ -title = -# The different options for color maps can be found here: https://matplotlib.org/users/colormaps.html +# The different options for color maps can be found here: +# https://matplotlib.org/users/colormaps.html # the default color map is RdYlBu_r (_r) stands for reverse # If you want your own colormap you can put the values of the color you want # For example, colormap = ['blue', 'yellow', 'red'] @@ -30,7 +30,8 @@ class HiCMatrixTrack(GenomeTrack): # If it is more than 125% of the plotted region, it will # be adjsted to this maximum value. depth = 100000 -# height of track (in cm) can be given. Otherwise, the height is computed such that the proportions of the +# height of track (in cm) can be given. +# Otherwise, the height is computed such that the proportions of the # hic matrix are kept (e.g. the image does not appear shrink or extended) # height = 10 # min_value and max_value refer to the contacts in the matrix. @@ -43,8 +44,6 @@ class HiCMatrixTrack(GenomeTrack): # the default is to extend neighboring bins to # obtain an aesthetically pleasant output show_masked_bins = false -# if you want to plot the track upside-down: -# orientation = inverted # optional if the values in the matrix need to be scaled the # following parameter can be used. This is useful to plot multiple hic-matrices on the same scale # scale_factor = 1 diff --git a/pygenometracks/tracks/LinksTrack.py b/pygenometracks/tracks/LinksTrack.py index 44a3aa11..c5dd4962 100644 --- a/pygenometracks/tracks/LinksTrack.py +++ b/pygenometracks/tracks/LinksTrack.py @@ -22,8 +22,8 @@ class LinksTrack(GenomeTrack): # depending on the value of links_type either 'arcs' or 'triangles' or 'loops' can be plotted. # If arcs, a line will be drawn from the center of the first region (chr1: 150), # to the center of the other region (chr1: 275). -# if triangles, the vertix of the triangle will be drawn at the center between the two points (also the center of -# each position is used) +# if triangles, the vertix of the triangle will be drawn at the center between the two points +# (also the extremity of each position is used) # if loops, a rectangle highlighting the intersection between the 2 regions will be shown # the triangles, and loops options are convenient to overlay over a # Hi-C matrix to highlight the matrix pixel of the highlighted link diff --git a/pygenometracks/tracks/TADsTrack.py b/pygenometracks/tracks/TADsTrack.py index 6d66299f..1550fcb6 100644 --- a/pygenometracks/tracks/TADsTrack.py +++ b/pygenometracks/tracks/TADsTrack.py @@ -1,4 +1,5 @@ from . BedTrack import BedTrack +from . GenomeTrack import GenomeTrack import numpy as np DEFAULT_BED_COLOR = '#1f78b4' @@ -7,6 +8,26 @@ class TADsTrack(BedTrack): SUPPORTED_ENDINGS = ['.domain', '.domains', '.tad', '.tads'] TRACK_TYPE = 'domains' + OPTIONS_TXT = GenomeTrack.OPTIONS_TXT + """ +# If the bed file contains a column for color (column 9), then this color can be used by +# setting: +#color = bed_rgb +# if color is a valid colormap name (like RbBlGn), then the score (column 5) is mapped +# to the colormap. +# In this case, the the min_value and max_value for the score can be provided, otherwise +# the maximum score and minimum score found are used. +#color = RdYlBu +#min_value=0 +#max_value=100 +# If the color is simply a color name, then this color is used and the score is not considered. +color = darkblue +# optional: line_width +#line_width = 0.5 +# optional, default is black. To remove the border, simply set 'border_color' to none +#border_color = black +# optional. If not given it is guessed from the file ending. +file_type = {} + """.format(TRACK_TYPE) DEFAULTS_PROPERTIES = {'fontsize': 12, 'orientation': None,