seismicrna.draw package
Submodules
- class seismicrna.draw.draw.ColorBlock(color_type: str, color_value: str, color_to: str = None, color_filter: str = None, location: tuple[int] = None)
Bases:
object
- to_dict()
- class seismicrna.draw.draw.JinjaData(path_: Path, seq: str, value: str, name: str, color_dict: dict, details_value: int, color_blocks: list[ColorBlock], draw_svg: bool, draw_png: bool)
Bases:
object
- to_dict()
- class seismicrna.draw.draw.RNArtistRun(report_file: Path, tmp_dir: Path, struct_num: Iterable[int], color: bool, verify_times: bool, draw_svg: bool, draw_png: bool, update: bool, num_cpus: int)
Bases:
object
- property best_struct
- property color_dict
- property edited_numbers
- get_ct_file(top: Path)
Get the path to the connectivity table (CT) file.
- Parameters:
top (
pathlib.Path
) – Top-level directory.- Returns:
Path of the file.
- Return type:
- get_db_file(top: Path)
Get the path to the dot-bracket (DB) file.
- Parameters:
top (
pathlib.Path
) – Top-level directory.- Returns:
Path of the file.
- Return type:
- get_png_file(top: Path, struct: int)
Get the path to the PNG file.
- Parameters:
top (
pathlib.Path
) – Top-level directory.- Returns:
Path of the file.
- Return type:
- get_script_file(top: Path, struct: int)
Get the path to the RNArtist script (.kts) file.
- Parameters:
top (
pathlib.Path
) – Top-level directory.- Returns:
Path of the file.
- Return type:
- get_svg_file(top: Path, struct: int)
Get the path to the SVG file.
- Parameters:
top (
pathlib.Path
) – Top-level directory.- Returns:
Path of the file.
- Return type:
- get_varna_color_file(top: Path)
Get the path to the VARNA color file.
- Parameters:
top (
pathlib.Path
) – Top-level directory.- Returns:
Path of the file.
- Return type:
- process_struct(struct_name: str, struct: str, svg_path: Path, png_path: Path, script_file: Path, keep_tmp: bool, force: bool)
- property table
- property table_class
- property table_classes
- property table_file
- property table_loader
- seismicrna.draw.draw.build_jinja_data(struct: str, color_dict: dict, name: str, out_dir: Path, draw_svg: bool, draw_png: bool, highlight_pos: Iterable[int] = None)
- seismicrna.draw.draw.draw(report_path: Path, *, struct_num: Iterable[int], color: bool, draw_svg: bool, draw_png: bool, update: bool, tmp_dir: Path, keep_tmp: bool, verify_times: bool, num_cpus: int, force: bool = False)
Draw RNA structure(s) from a FoldReport.
- seismicrna.draw.draw.parse_color_file(file_path)
- seismicrna.draw.main.run(input_path: Iterable[str | Path], *, struct_num: Iterable[int] = (), color: bool = True, draw_svg: bool = True, draw_png: bool = False, update_rnartistcore: bool = False, force: bool = False, num_cpus: int = 4, verify_times: bool = True, keep_tmp: bool = False, tmp_pfx='./tmp') list[Path]
Draw RNA structures with reactivities using RNArtistCore.
- Parameters:
struct_num (
Iterable
) – Draw the specified structure (zero-indexed) or -1 for all structures. By default, draw the structure with the best AUROC. [keyword-only, default: ()]color (
bool
) – Color bases by their reactivity [keyword-only, default: True]draw_svg (
bool
) – Output each drawing in a Scalable Vector Graphics file [keyword-only, default: True]draw_png (
bool
) – Output each drawing in a Portable Network Graphics file [keyword-only, default: False]update_rnartistcore (
bool
) – Check for and install updates to RNArtistCore. [keyword-only, default: False]force (
bool
) – Force all tasks to run, overwriting any existing output files [keyword-only, default: False]num_cpus (
int
) – Use up to this many CPUs simultaneously [keyword-only, default: 4]verify_times (
bool
) – Verify that report files from later steps have later timestamps [keyword-only, default: True]keep_tmp (
bool
) – Keep temporary files after finishing [keyword-only, default: False]tmp_pfx – Write all temporary files to a directory with this prefix [keyword-only, default: ‘./tmp’]