html_builder
- class gwas_tools.html.html_builder.HtmlBuilder(title='', **kwargs)
Class to build HTML page components.
- Parameters:
title (str) – page title
kwargs (dict{str}) – general page attributes
- add_paragraph(text, **kwargs)
Add <p>.
- Parameters:
text (str) – <p> text
kwargs (dict{str}) – <p> attributes
- add_link(text, **kwargs)
Add <a>.
- Parameters:
text (str) – <a> text
kwargs (dict{str}) – <a> attributes
- get_formatted_link(text, **kwargs)
Return <a> with formatted text.
- Parameters:
text (str) – <a> text
kwargs (dict{str}) – <a> attributes
- Returns:
<a kwargs>text</a>
- Return type:
str
- get_formatted_code(text)
Return text in <code> tag.
- Parameters:
text (str) – <code> text
- Returns:
<code>text</code>
- Return type:
str
- open_div(**kwargs)
Add <div>.
- Parameters:
kwargs (dict{str}) – <div> attributes
- close_div()
Add </div>.
- add_section(title)
Add <p> with bold text magnified to 180%.
- Parameters:
title (str) – <p> text
- add_subsection(title)
Add <p> with bold text magnified to 150%.
- Parameters:
title (str) – <p> text
- add_subsubsection(title)
Add <p> with bold text magnified to 120%.
- Parameters:
title (str) – <p> text
- add_bullet_list(items)
Add bullet list.
- Parameters:
items (dict) – list items
- parameters_table(parameters, start, end)
Add parameters analysis table.
- Parameters:
parameters (list[tuple]) – analysis parameters
start (int) – start GPS
end (int) – end GPS
- add_command_line(code)
Add box with command line.
- Parameters:
code (str) – command line
- add_command_line_block(code, description, block_id)
Add box with command line with a paragraph above.
- Parameters:
code (str) – command line
description (str) – description of the command line
block_id (str) – div block id
- open_card(title, color, target_id)
Open a card element.
- Parameters:
title (str) – title shown on the card
color (str) – card color
target_id (str) – id to link body to header
- close_card()
Close a card element.
- add_plot(plot_name, plot_id)
Add plot.
- Parameters:
plot_name (str) – path to plot
plot_id (str) – plot identifier
Add footer with package and page creator information.
- save_page(path, add_footer=False)
Save page.
- Parameters:
path (str) – save path
add_footer (bool, optional) – add footer (default : False)