View source: R/visualise_methylation.R
| convert_modification_to_number_vector | R Documentation |
visualise_methylation() helper)Takes modification locations (indices along the read signifying bases at which
modification probability was assessed) and modification probabilities (the probability
of modification at each assessed location, as an integer from 0 to 255), as comma-separated
strings (e.g. "1,5,25") produced from numerical vectors via vector_to_string().
Outputs a numerical vector of the modification probability for each base along the read.
i.e. -2 for indices outside sequences, -1 for bases where modification was not assessed,
and probability from 0-255 for bases where modification was assessed.
convert_modification_to_number_vector(
modification_locations_str,
modification_probabilities_str,
max_length,
sequence_length
)
modification_locations_str |
|
modification_probabilities_str |
|
max_length |
|
sequence_length |
|
numeric vector. A vector of length max_length indicating the probability of methylation at each index along the read - 0 where methylation was not assessed, and probability from 0-255 where methylation was assessed.
convert_modification_to_number_vector(
modification_locations_str = "3,6,9,12",
modification_probabilities = "100,200,50,150",
max_length = 15,
sequence_length = 13
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.