Description Usage Arguments Details Note Examples
A list of functions allows to pass SNPs data from R to SOLAR.
1 2 3 4 5 | snpdata2solar(mat, dir)
snpcovdata2solar(mat, dir, nGTypes = FALSE, out)
snpmap2solar(map, dir)
|
mat |
A matrix of genotypes or genotypes as covariates to be exported. |
dir |
A character with path where SOLAR files to be created. |
nGTypes |
Logical, whether a column |
out |
(optional) A list, that contains the names for snp.genocov and snp.geno-list files.
This argument is internally used in |
map |
A data frame with annotation (map) information for SNPs. |
snpdata2solar
function (1) exports the data set of genotypes stored
in mat
itto SOLAR files, (2) runs solar command 'snp load solar.gen'
to check the data is loaded ok; (3) if two output files were not created,
throws an error.
snpcovdata2solar
function emulates the 'snp load' SOLAR command.
Two output files are produced: 'snp.genocov' and 'snp.geno-list'.
The steps are the following: (1) add prefix 'snp_' to SNP names;
(2) (optional) compute stats on # genotyped individuals (columns 'nGTypes');
(3) write data and metadata into files.
snpmap2solar
function (1) separates data by chromosome;
(2) write the table into SOLAR map file;
(3) check if the map file is OK by running SOLAR command load map -basepair <filename>
In association analysis (soalrAssoc
function)
the step of loading SNP maps is skipped.
It seems that SOLAR does not use this information when doing association.
1 2 3 4 5 6 7 8 9 | # Example of `snp.genocov` file:
# id,nGTypes,snp_s1,snp_s2,...
# 1,50,0,0,...
# 2,50,0,0,...
# Example of `snp.geno-list` file:
# snp_s1
# snp_s2
# ...
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.