uorf4u.methods
This module provides some methods (e.g. colors tranformation, data copying) used by the tool.
adjust_paths_for_linux()
Change paths in the internal config files for linux.
Returns:
-
None
–None
Source code in uorf4u/methods.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
copy_package_data()
Copy the uorf4u package data folder to your current dir.
Returns:
-
None
–None
Source code in uorf4u/methods.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
|
get_color(name, parameters)
Get color code by a name.
Parameters:
-
name
(
str
) –name of a color.
-
parameters
(
dict
) –Parameters' object dict.
Returns:
-
tuple(
tuple
) –RGB color.
Source code in uorf4u/methods.py
97 98 99 100 101 102 103 104 105 106 107 108 109 |
|
hex_to_rgb(value)
Convert HEX color to RGB format.
Parameters:
-
value
(
str
) –color in HEX format.
Returns:
-
list(
list
) –RGB color.
Source code in uorf4u/methods.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
|
parse_fasta_file(path, parameters)
Parse fasta file with sequences.
Arguments path: path to a fasta file.
Returns:
-
list(
list
) –list of processed Bio.SeqRecord.SeqRecord objects.
Source code in uorf4u/methods.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
|
set_blastp_path(blastp_path)
Set a path to blastp.
Returns:
-
None
–None
Source code in uorf4u/methods.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
string_height_to_font_size(height, font_type, parameters)
Transform string height to the font size.
Parameters:
-
height
(
float
) –available height of the string.
-
font_type
(
str
) –font type (see config file; at this moment only regular is available).
-
parameters
(
dict
) –Parameters' object dict.
Returns:
-
float(
float
) –font size defined by height.
Source code in uorf4u/methods.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|