Learn R Programming

polyRAD (version 1.6)

LocusInfo: Get Information about a Single Locus

Description

This function returns, and optionally prints, information about a single locus with a RADdata object, including alignment position, allele sequences, and genes overlapping the site.

Usage

LocusInfo(object, ...)
# S3 method for RADdata
LocusInfo(object, locus, genome = NULL,
          annotation = NULL, verbose = TRUE, ...)

Value

A list containing:

Locus

The name of the locus.

Chromosome

The chromosome name, if present.

Position

The position in base pairs on the chromosome, if present.

Alleles

Allele names for the locus.

Haplotypes

Allele sequences for the locus, in the same order.

Frequencies

Allele frequencies, if present, in the same order.

Transcripts

Transcripts overlapping the locus, if an annotation was provided but it wasn't possible to predict amino acid changes.

PredictCoding

The output of predictCoding, if it was run.

Arguments

object

A RADdata object.

locus

A character string indicating the name of the locus to display. Alternatively, a character string indicating the name of an allele, for which the corresponding locus will be identified.

genome

An optional FaFile or BSgenome object containing the reference genome sequence.

annotation

An optional TxDb object containing the genome annotation.

verbose

If TRUE, results will be printed to the console.

...

Additional arguments (none implemented).

Author

Lindsay V. Clark

Details

The locus name, allele names, and allele sequences are always returned (although allele names are not printed with verbose). If the chromosome and position are known, those are also returned and printed. If annotation is provided, the function will return and print genes that overlap the locus. If annotation and genome are provided, the function will attempt to identify any amino acid changes caused by the alleles, using predictCoding internally. Identification of amino acid changes will work if the RADdata object was created with VCF2RADdata using the refgenome argument to fill in non-variable sites, and/or if the alleles are only one nucleotide long.

See Also

makeTxDbFromGFF, GetLoci

Examples

Run this code
data(exampleRAD)
exampleRAD <- AddAlleleFreqHWE(exampleRAD)
loc2info <- LocusInfo(exampleRAD, "loc2")

Run the code above in your browser using DataLab