read_population {cape} | R Documentation |
Reads in data in the R/qtl csv format
Description
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.
Usage
read_population(
filename = NULL,
pheno_col = NULL,
geno_col = NULL,
id_col = NULL,
delim = ",",
na_strings = "-",
check_chr_order = TRUE,
verbose = TRUE
)
Arguments
filename |
The name of the file to read in |
pheno_col |
Column numbers of desired traits. The default behavior is to read in all traits. |
geno_col |
Column numbers of desired markers. The default behavior is to read in all markers. |
id_col |
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. |
delim |
column delimiter for the file, default is "," |
na_strings |
a character string indicating how NA values are specified, default is "-" |
check_chr_order |
boolean, default is TRUE |
verbose |
A logical value indicating whether to print progress and cross information to the screen. Defaults to TRUE. |
Value
This function returns a cape object in a former cape format.
It must be updated using cape2mpp
References
Broman et al. (2003) R/qtl: QTL mapping in experimental crosses. Bioinformatics 19:889-890 doi:10.1093/bioinformatics/btg112
Examples
## Not run:
cape_obj <- read_population("cross.csv")
combined_obj <- cape2mpp(cape_obj)
data_obj <- combined_obj$data_obj
geno_obj <- combined_obj$geno_obj
## End(Not run)