Skip to content

Commit

Permalink
change file_type x-axis to x_axis (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
lldelisle authored May 8, 2020
1 parent 40f5f12 commit c58e934
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion docs/content/all_default_properties_rst.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
========================= ========================= ========================= ========================= ========================= ========================= ========================= ========================= ========================= ========================= ========================= ========================= ========================= =========================
parameter :doc:`tracks/x-axis` :doc:`tracks/epilogos` :doc:`tracks/links` :doc:`tracks/domains` :doc:`tracks/bed` :doc:`tracks/gtf` :doc:`tracks/narrow_peak` :doc:`tracks/bigwig` :doc:`tracks/bedgraph` :doc:`tracks/bedgraph_mat :doc:`tracks/hlines` :doc:`tracks/hic_matrix` :doc:`tracks/scalebar`
parameter :doc:`tracks/x_axis` :doc:`tracks/epilogos` :doc:`tracks/links` :doc:`tracks/domains` :doc:`tracks/bed` :doc:`tracks/gtf` :doc:`tracks/narrow_peak` :doc:`tracks/bigwig` :doc:`tracks/bedgraph` :doc:`tracks/bedgraph_mat :doc:`tracks/hlines` :doc:`tracks/hic_matrix` :doc:`tracks/scalebar`
========================= ========================= ========================= ========================= ========================= ========================= ========================= ========================= ========================= ========================= ========================= ========================= ========================= =========================
overlay_previous no no no no no no no no no no no no no
where bottom left
Expand Down
4 changes: 2 additions & 2 deletions docs/content/all_possible_properties.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
- **overlay_previous**:

- for *x-axis, epilogos, links, domains, bed, gtf, narrow_peak, bigwig, bedgraph, bedgraph_matrix, hlines, hic_matrix, scalebar, spacer*: no, yes, share-y
- for *x_axis, epilogos, links, domains, bed, gtf, narrow_peak, bigwig, bedgraph, bedgraph_matrix, hlines, hic_matrix, scalebar, spacer*: no, yes, share-y

- **where**:

- for *x-axis*: top, bottom
- for *x_axis*: top, bottom

- for *scalebar*: left, right, top, bottom

Expand Down
2 changes: 1 addition & 1 deletion docs/content/all_tracks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ All available tracks

:doc:`tracks/spacer`

:doc:`tracks/x-axis`
:doc:`tracks/x_axis`
20 changes: 0 additions & 20 deletions docs/content/tracks/x-axis.rst

This file was deleted.

20 changes: 20 additions & 0 deletions docs/content/tracks/x_axis.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
x_axis
==========

Description
-----------

A track to include a x axis. To use it you can either put ``file_type = x_axis`` or call your section ``[x-axis]``

Parameters
----------

.. include:: auto/x_axis_deduced_from_code.txt

Output of ``make_tracks_file``:
-------------------------------

.. literalinclude:: auto/x_axis_options_text.txt
:language: INI


4 changes: 2 additions & 2 deletions pygenometracks/getAllDefaultsAndPossible.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

def main():
all_tracks = PlotTracks.get_available_tracks()
my_prefered_order_tracks_names = ['x-axis', 'epilogos', 'links',
my_prefered_order_tracks_names = ['x_axis', 'epilogos', 'links',
'domains', 'bed', 'gtf', 'narrow_peak',
'bigwig', 'bedgraph', 'bedgraph_matrix',
'hlines', 'hic_matrix', 'scalebar']
Expand Down Expand Up @@ -161,7 +161,7 @@ def main():
fo.write("- **height**: If you do not set it, the height will "
"be adjusted so that each bin is a square, else you "
"can choose any float above 0.\n\n")
elif track_type == "x-axis":
elif track_type == "x_axis":
fo.write("- **height**: If you do not set it, the height will "
"be ``fontsize / 8``, else you "
"can choose any float above 0.\n\n")
Expand Down
6 changes: 3 additions & 3 deletions pygenometracks/tracksClass.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def get_tracks_height(self, start_region=None, end_region=None):
continue
elif 'height' in track_dict:
height = track_dict['height']
elif track_dict['file_type'] == 'x-axis':
elif track_dict['file_type'] == 'x_axis':
height = track_dict['fontsize'] / 8
elif 'depth' in track_dict and \
track_dict['file_type'] == 'hic_matrix':
Expand Down Expand Up @@ -374,7 +374,7 @@ def parse_tracks(self, tracks_file):
track_options['file_type'] = 'spacer'
track_options['track_class'] = SpacerTrack
elif section_name.endswith('[x-axis]'):
track_options['file_type'] = 'x-axis'
track_options['file_type'] = 'x_axis'
track_options['track_class'] = XAxisTrack
# For the others we need to have a 'file_type'
# Either the file_type is part of the keywords
Expand Down Expand Up @@ -642,7 +642,7 @@ def plot_y_axis(self, ax, plot_ax):

class XAxisTrack(GenomeTrack):
SUPPORTED_ENDINGS = []
TRACK_TYPE = 'x-axis'
TRACK_TYPE = 'x_axis'
NECESSARY_PROPERTIES = []
DEFAULTS_PROPERTIES = {'where': 'bottom',
'fontsize': 15}
Expand Down

0 comments on commit c58e934

Please sign in to comment.