View source: R/get_marker_correlation_coefficients.R
get_marker_correlation_coefficients | R Documentation |
r
)
from genetic data.Similar to PLINK, the correlation coefficients are measured for markers on the same chromosome
get_marker_correlation_coefficients(
data,
ld_window_r2 = 0.2,
plink_options = create_plink_options(),
temp_folder = plinkr::get_plinkr_tempfilename(),
verbose = FALSE
)
data |
the data source, which can be:
|
ld_window_r2 |
the minimal squared correlation coefficient (also
known as |
plink_options |
options to run PLINK, as created by create_plink_options |
temp_folder |
temporary folder to store results in |
verbose |
the verbosity of a function. Set to TRUE for more output. Use check_verbose to detect if this argument is valid. |
the marker correlation coefficients,
which will be in range [ld_window_r2, 1.0]
and [-1.0, -ld_window_r2]
Richèl J.C. Bilderbeek
use get_marker_correlation_coefficients_table to see the marker correlation coefficients between markers in a table
if (is_plink_installed()) {
# Create example PLINK text data
assoc_qt_data <- create_demo_assoc_qt_data()
# PLINK checks for LD on markers on the same chromosome
assoc_qt_data$data$map_table$CHR <- 1
# PLINK uses a default value of ld_window_r2 = 0.2,
# which, in this examples, does not give a result
get_marker_correlation_coefficients(
assoc_qt_data$data
)
# Show all values
get_marker_correlation_coefficients(
assoc_qt_data$data,
ld_window_r2 = 0.0
)
# PLINK binary data
assoc_qt_data$data <- convert_plink_text_data_to_plink_bin_data(
assoc_qt_data$data
)
get_marker_correlation_coefficients(
assoc_qt_data$data,
ld_window_r2 = 0.0
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.