This function reads in a data file in the r/qtl format It converts letter genotypes to numbers if required. It parses the data into a data object. if filename is left empty, the script will ask the use to choose a file. phenotypes can be specified with a vector of column numbers or character strings. For each phenotype specified with a name, the script will find its location.
read_population(
filename = NULL,
pheno_col = NULL,
geno_col = NULL,
id_col = NULL,
delim = ",",
na_strings = "-",
check_chr_order = TRUE,
verbose = TRUE
)
This function returns a cape object in a former cape format.
It must be updated using cape2mpp
The name of the file to read in
Column numbers of desired traits. The default behavior is to read in all traits.
Column numbers of desired markers. The default behavior is to read in all markers.
The column number of an ID column. This is helpful to specify if the individual IDs are strings. Strings are only allowed in the ID column. All other trait data must be numeric.
column delimiter for the file, default is ","
a character string indicating how NA values are specified, default is "-"
boolean, default is TRUE
A logical value indicating whether to print progress and cross information to the screen. Defaults to TRUE.
Broman et al. (2003) R/qtl: QTL mapping in experimental crosses. Bioinformatics 19:889-890 doi:10.1093/bioinformatics/btg112
if (FALSE) {
cape_obj <- read_population("cross.csv")
combined_obj <- cape2mpp(cape_obj)
data_obj <- combined_obj$data_obj
geno_obj <- combined_obj$geno_obj
}
Run the code above in your browser using DataLab