Learn R Programming

qtl (version 1.39-5)

addmarker: Add a marker to a cross

Description

Add a marker to a cross object.

Usage

addmarker(cross, genotypes, markername, chr, pos)

Arguments

cross
An object of class cross. See read.cross for details.
genotypes
Vector of numeric genotypes.
markername
Marker name as character string.
chr
Chromosome ID as character string.
pos
Position of marker, as numeric value.

Value

The input cross object with the single marker added.

Details

Use this function with caution. It would be best to incorporate new data into a single file to be imported with read.cross.

But if you have genotypes on one or two additional markers that you want to add, you might load them with read.csv and incorporate them with this function.

See Also

pull.markers, drop.markers

Examples

Run this code
data(fake.f2)

# genotypes for new marker
gi <- pull.geno(fill.geno(fake.f2))[,"D5M197"]

# add marker to cross
fake.f2 <- addmarker(fake.f2, gi, "D5M197imp", "5", 11)

Run the code above in your browser using DataLab