Learn R Programming

ARTP (version 2.0.5)

snp.list: List to describe the genotype data

Description

The list to describe the genotype data for runPermutations

Arguments

Format

The format is a list:

file

File to use. No default.

file.type

2 or 3 (see details).

delimiter

The delimiter used in file.

in.miss

Vector of values to denote the missing values in file. The default is " " (2 blank spaces).

heter.codes

Vector of codes used for the heterozygous genotype. If NULL, then it is assumed that the heterozygous genotype is of the form "AB", "Aa", "CT", ... etc, ie a 2-character string with different characters (case sensitive). The default is NULL.

id.var

(Only for file.type = 3) The subject id variable. The default is 1.

Details

In this list, file must be specified. If the SNPs are coded in the standard (0,1,2) coding, then set heter.codes to 1 (the heterozygous genotype).

Type 2 has data in the form:

subject1 subject2 subject3
snp1 0 2 1

The first row must contain the subject ids. Starting from row 2, the first delimited field must contain the SNP id. The remaining delimited fields contain the genotypes. Rows are SNPs, columns are the subjects.

Type 3 has data of the form:

id snp1 snp2
subject1 0 1
subject2 2 1

Examples

Run this code
# NOT RUN {
# Suppose the genotype data is a tab-delimited, type 2 file: c:/temp/data/geno1.txt.
#  Also assume the data has the trend coding 0, 1, 2 with NA as missing values.
# The below list is for processing the file.
snp.list <- list(file="C:/temp/data/geno1.txt", delimiter="\t", file.type=2, 
                 heter.codes=1, in.miss=NA)
# }

Run the code above in your browser using DataLab