The internal data structure for R/qtl2 is different from that of R/qtl, and the input data file format has also changed. Details on the new internal data structure are in the R/qtl2 developer guide. Details on the new data file format are described in a separate vignette.

For simple crosses (such as a backcross or intercross), one can continue to use the old R/qtl formats, load them with qtl::read.cross(), and then convert the data to the new format with qtl2::convert2cross2().

The following are sample input data files in the new R/qtl2 format. Also see https://github.com/rqtl/qtl2data.


RIL by selfing

Data from Moore et al. (2013) Genetics 195:1077-1086 (the second replicate of RILs).

You can load these data into R as follows:

library(qtl2)
grav2 <- read_cross2("https://kbroman.org/qtl2/assets/sampledata/grav2/grav2.yaml")

You can also peruse the data at GitHub.

The data are also available as a zip file, grav2.zip, and read_cross2() can read this file directly:

library(qtl2)
grav2 <- read_cross2("https://kbroman.org/qtl2/assets/sampledata/grav2/grav2.zip")

The zip file is also distributed with R/qtl2; the local copy of the file can be read as follows:

library(qtl2)
grav2 <- read_cross2(system.file("extdata", "grav2.zip", package="qtl2"))

F2 intercross

Data from Grant et al. (2006) Hepatology 44:174-185

You can load these data into R as follows:

library(qtl2)
iron <- read_cross2("https://kbroman.org/qtl2/assets/sampledata/iron/iron.yaml")

You can also peruse the data at GitHub.

The data are also available as a zip file, iron.zip, and read_cross2() can read this file directly:

library(qtl2)
iron <- read_cross2("https://kbroman.org/qtl2/assets/sampledata/iron/iron.zip")

The zip file is also distributed with R/qtl2; the local copy of the file can be read as follows:

library(qtl2)
iron <- read_cross2(system.file("extdata", "iron.zip", package="qtl2"))