Description Usage Arguments Value Examples
View source: R/build_cross2_dataset.R
Generates cross2 dataset from basic geno and phenotypes name. Geno file should combine genenotype values and mapping (see to_csvs_geno) and phenotypes table should be a matrix-type object (users in rows, phenotypes in columns). This function is the entry point to QtlWrapper object.
1 2 3 4 5 6 7 8 9 10 11 | build_cross2_dataset(
geno_filename,
pheno_filename,
covar_column_names,
pheno_column_names,
genotypes = c("A", "H", "B"),
alleles = c("A", "B"),
na.strings = c("-1", "discrepancy", "NA"),
comment.char = "#",
...
)
|
geno_filename |
Path to csvs geno file |
pheno_filename |
Path to csv pheno file |
covar_column_names |
List of "phenotype" columns related to adjusting covariates. |
pheno_column_names |
List of "phenotype" columns realted to main variables to study. |
genotypes |
List of allowed genotype values of genotypes file |
alleles |
List of homozygote alleles included, should be a subset of genotypes variable |
na.strings |
List of strings associated to NA values |
comment.char |
List or string of allowed comment chars |
... |
Additional arguments passed to read.cross function |
This function returns an R/QTL Object of class "cross2". For details, see the R/QTL2 developer guide.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Not run:
geno_data_matrix_filename = '/path/to/geno_file'
geno_map_filename = '/path/to/geno_mapping_file'
phenotype_filenam = '/path/to/phenotypes_file'
genotypes_csvs = to_csvs_geno(geno_map_filename, geno_data_matrix_filename)
write_csvs_geno(genotypes_csvs, '/path_to_geno_csvs')
chosen_genotypes = c('A', 'H', 'B')
chosen_alleles = c('A','B')
chosen_covars = c('pheno_var1', 'pheno_var2', 'pheno_var3')
chosen_phenotypes = c('signature1', 'signature2', 'signature3')
cross2 = systematicQTL::build_cross2_dataset(
geno_filename = geno_filename,
pheno_filename = pheno_filename,
covar_column_names = chosen_covars,
pheno_column_names = chosen_phenotypes,
alleles = chosen_alleles
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.