annotation: Create trait.annotation object

Description Usage Arguments Details Value Author(s) Examples

Description

Creates a trait.annotation object that associates a_gene_id with Symbol.

Usage

1
read.annotation(filename, update.names = NULL, drop.extra = TRUE, ...)

Arguments

filename

File name where gene annotations are found.

update.names

Named character vector to translate names in file to trait.annotation column names if not NULL. See details.

drop.extra

Drop extra names in file if TRUE.

...

~~Describe ... here~~

Details

The file is read and any name changes are performed. The names of update.names must correspond (partial match) to columns in the returned object. The values of update.names are the (partial) match to column names in the file identified by filename.

The Chromosome_Position column, if missing, is created by averaging theStart Coordinate and End Coordinate columns and rescaling from base pairs to Mb.

Value

A data frame with entries:

a_substance_id

Substance ID number.

accession_code

Accession code.

a_gene_id

Gene ID number.

Symbol

Gene symbol.

Alternate_Symbols

Alternate gene symbols.

Name

Gene name.

Alternate_Names

Alternate gene names, comma separated.

Description

Gene description.

Chromosome

Chromosome name.

Strand

Strand direction (+1 or 1).

Chromosome_Position

Chromosome position in Mb.

Author(s)

Brian S. Yandell (byandell@wisc.edu)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
## Do this once when creating your cross library.
my.file.name <- "~/Rlib/eqtl/data/Rosetta/F2.Annotation.mm8.20080208.csv"
my.data.lib <- "~/Rlib/eqtl/B6BTBR07"

trait.annotation <- read.annotation(my.file.name,
  update.names = c(Symbol = "gene1", Alternate_Symbols = "gene",
    Name = "Gene_Name", Alternate_Names = "AlternateNames",
    Description = "ProteomeShortDescription",
    Chromosome = "CHROMOSOME", Start_Coordinate = "STARTCOORD",
    End_Coordinate = "ENDCOORD", Strand = "STRAND"))

save("trait.annotation",
  file = file.path(my.data.lib, "data", "trait.annotation.RData"),
  compress = TRUE)

## End(Not run)

byandell/qtlview documentation built on May 13, 2019, 9:53 a.m.