snp2solar: Export snp genotypes, genotype covariates and amp to SOLAR

Description Usage Arguments Details Note Examples

Description

A list of functions allows to pass SNPs data from R to SOLAR.

Usage

1
2
3
4
5
snpdata2solar(mat, dir)

snpcovdata2solar(mat, dir, nGTypes = FALSE, out)

snpmap2solar(map, dir)

Arguments

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 nGTypes to be added to snp.genocov file. The default value is FALSE.

out

(optional) A list, that contains the names for snp.genocov and snp.geno-list files. This argument is internally used in solarAssoc function.

map

A data frame with annotation (map) information for SNPs.

Details

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>

Note

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.

Examples

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
# ...

solarius documentation built on May 2, 2019, 2:43 a.m.