impo.prob: Import genotype probabilities into an existing cross object

Description Usage Arguments Details Value Author(s) See Also Examples

Description

The function imports genotype probabilities into an existing qtl object.

Usage

1
impo.prob(cross.data, path = NULL, stepsize = 1, Grid = FALSE) 

Arguments

cross.data

A cross object typically read in via read.cross in package qtl.

path

The directory path where the genotype probabilities input files are located.

stepsize

An integer giving the distance that the two consecutive test loci are spaced in centi-morgan.

Grid

If the genotype probabilities are saved from a GridQTL coefficient file it can be imported directly if TRUE.

Details

The data in the object of class cross is used to create a new object of the same class, while importing the genotype probabilities from a set of files. It is necessary to import create the original object prior to using the impo.prob function (see read.cross for more information).

The genotype probabilities are imported from a file for each chromosome separately. In this format first column indicates the individual id. The next three columns are the genotype probabilities of being homozygous, heterozygous and homozygous for the other alleles respectively (i.e. AA, AB and BB). A separate row for each centi-morgan interval per individual is provided. The rows are arranged to have the probabilities per individual together (i.e. from position 1 to end of chromosome for individual 1 followed by position 1 to end of chromosome for individual 2 etc.). It is important to note that the filenames should be for each chromosome as follows (where A indicates the chromosome number): 'p_output_chrom_A.txt'. This is also the file output created by calc.prob.

A set of example files with the required format described above are provided in the package installation folder. 'p_output_chrom_1.txt' and 'p_output_chrom_2.txt' contains the genotype probabilities for the two chromosomes to be imported. 'example_data.csv' is an F2 intercross file that can be read by read.cross function in package qtl.

Alternatively, the genotype probabilities can be imported directly from the coefficient file generated by GridQTL. This file will contain the genotype probabilities for all the chromosomes specified when the job is submitted to the GridQTL server (see installation folder for an example file). It is important to note that the filename for this file should be 'Gout.coe', and should be located in the working directory.

Note that Perl is required for some of the functions in the package qtl.outbred and can be downloaded from: http://www.perl.org/

Value

The new cross object cross.data is returned, with the genotype probabilities imported.

Author(s)

Ronnie Nelson and Xia Shen

See Also

calc.prob, qtl.outbred-package, read.cross

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
# ----- impo.prob example
file <- paste(R.home(), '/library/qtl.outbred/example_data.csv', sep = '')
data <- read.cross('csv', file = file, genotypes = c('AA', 'AB', 'BB'))
outbred.data <- impo.prob(cross.data = data, stepsize = 5, path = 
                          paste(R.home(), '/library/qtl.outbred/', sep = ''))

# ----- impo.prob example for GridQTL output
file <- paste(R.home(), '/library/qtl.outbred/example_data.csv', sep = '')
data <- read.cross('csv', file = file, genotypes = c('AA', 'AB', 'BB'))
setwd(paste(R.home(), '/library/qtl.outbred/', sep = ''))
outbred.data <- impo.prob(cross.data = data, stepsize = 5, path = 
                          paste(R.home(), '/library/qtl.outbred/', sep = ''), 
                          Grid = TRUE)

# ----- QTL scan using Haley-Knott regression and plotting
hk.model <- scanone(outbred.data, method = 'hk', pheno.col = 2) 
plot(hk.model)

## End(Not run)

qtl.outbred documentation built on May 2, 2019, 5:56 p.m.