Node Edge Saturation Functions
NodeEdgeSaturationProbe
The class supplies methods used to emulate the creation process of an LZGraph without actually running the full creation procedure, rather just accumulate a counter for the number of nodes and edges based on the provided number of sequences.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_function |
str
|
the selected node extraction method to use 'naive' - emulate Naive LZGraph extraction / 'ndp'- emulate Nucleotide Double Positional LZGraph / 'aap' - Amino Acid Positional LZGraph. |
'naive'
|
Attributes:
log_memory (dict): a dictionary containing the results of a single test run
Source code in src\LZGraphs\Utilities\NodeEdgeSaturationProbe.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | |
aap_node_extractor(seq)
staticmethod
This function implements the node extraction procedure used by the Amino Acid Positional LZGraph. Args: seq (str): An sequence of nucleotides or amino acids Returns: list: a list of nodes extract from the given sequence
Source code in src\LZGraphs\Utilities\NodeEdgeSaturationProbe.py
naive_node_extractor(seq)
staticmethod
This function implements the node extraction procedure used by the Naive LZGraph. Args: seq (str): An sequence of nucleotides or amino acids Returns: list: a list of nodes extract from the given sequence
Source code in src\LZGraphs\Utilities\NodeEdgeSaturationProbe.py
ndp_node_extractor(seq)
staticmethod
This function implements the node extraction procedure used by the Nucleotide Double Positional LZGraph. Args: seq (str): An sequence of nucleotides or amino acids Returns: list: a list of nodes extract from the given sequence
Source code in src\LZGraphs\Utilities\NodeEdgeSaturationProbe.py
resampling_test(sequence_list, n_tests, log_every=1000, sample_size=0)
Given a list of sequences this function will gradually aggregate the nodes that make up the respective LZGraph and log the node and edge counts every K sequences. The above procedure will be carried out N times each time starting from X randomly sampled sequences from the given sequence list.
Args:
sequence_list (str): A list of nucleotide or amino acid sequences
log_every (int): after how many sequences to log the number of nodes and edges
n_tests (int): the number of realizations to perform
sample_size (int): the number of sequences that will be randomly sampled from sequence_list
at each realization
Returns:
list: a list of logs for each realization given by the parameter n_tests
Source code in src\LZGraphs\Utilities\NodeEdgeSaturationProbe.py
test_sequences(sequence_list, log_every=1000, iteration_number=None)
Given a list of sequences this function will gradually aggregate the nodes that make up the respective LZGraph and log the node and edge counts every K sequences.
The result will be saved in the log_memory attribute of the class.
Args:
sequence_list (str): A list of nucleotide or amino acid sequences
log_every (int): after how many sequences to log the number of nodes and edges
Returns:
None: