Perform QTL mapping using the qtl:scanone(...) function to obtain LOD scores for all traits, peak positions, and markers.

Usage,
qtl_scone(x_data, cpus = 1, ...)

Arguments

x_data

Cross-data frame containing genetic map data and traits.

cpus

Number of CPUs to be used in the computation.

...

Arguments passed on to qtl::scanone.

Value

Data frame containing the LOD scores.

See also

Other QTL mapping functions: qtl_perm_test(), read.cross()

Examples

# \donttest{ 
# Toy dataset
excluded_columns <- c(1, 2)
population <- 5
seed <- 123
set.seed(seed)
out_prefix <- file.path(tempdir(), "metapipe")
plots_dir <- file.path(tempdir(), "plots")
example_data <- data.frame(ID = 1:population,
                           P1 = c("one", "two", "three", "four", "five"),
                           T1 = rnorm(population),
                           T2 = rnorm(population))

output <- MetaPipe::assess_normality(example_data, 
                                     excluded_columns, 
                                     show_stats = FALSE,
                                     out_prefix = out_prefix,
                                     plots_dir = plots_dir)

# Create and store random genetic map (for testing only)
genetic_map <- MetaPipe:::random_map(population = population, 
                                     seed = seed)
# Load cross file with genetic map and raw data for normal traits
x <- MetaPipe::read.cross(genetic_map, output$norm)
#>  --Read the following data:
#> 	 5  individuals
#> 	 100  markers
#> 	 3  phenotypes
#>  --Cross type: f2 

x <- qtl::calc.genoprob(x, step = 1, error.prob = 0.001)
x_scone <- MetaPipe::qtl_scone(x, 1, model = "normal", method = "hk")

# F1 Seedling Ionomics dataset
data(ionomics) # Includes some missing data
data(father_riparia) # Genetic map
out_prefix <- file.path(tempdir(), "ionomics")
plots_dir <- file.path(tempdir(), "plots")
ionomics_rev <- MetaPipe::replace_missing(ionomics, 
                                          excluded_columns = c(1, 2),
                                          replace_na =  TRUE,
                                          out_prefix = out_prefix)
ionomics_normalised <- 
  MetaPipe::assess_normality(ionomics_rev,
                             excluded_columns = c(1, 2),
                             out_prefix = out_prefix,
                             plots_dir = plots_dir,
                             transf_vals = c(2, exp(1)),
                             show_stats = FALSE)
                             
# Load cross file with genetic map and raw data for normal traits
x <- MetaPipe::read.cross(father_riparia, 
                          ionomics_normalised$norm,
                          genotypes = c("nn", "np", "--"))
#>  --Read the following data:
#> 	 166  individuals
#> 	 1115  markers
#> 	 7  phenotypes
#> Warning: Some markers at the same position on chr 1,4,5,7,8,9,10,12,14,15,16,17; use jittermap().
#>  --Cross type: f2 
                          
set.seed(seed)
x <- qtl::jittermap(x)
x <- qtl::calc.genoprob(x, step = 1, error.prob = 0.001)

x_scone <- MetaPipe::qtl_scone(x, 1, model = "normal", method = "hk")
# }