LocusInfo {polyRAD} | R Documentation |
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 class 'RADdata'
LocusInfo(object, locus, genome = NULL,
annotation = NULL, verbose = TRUE, ...)
Arguments
object |
A |
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 |
annotation |
An optional |
verbose |
If |
... |
Additional arguments (none implemented). |
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.
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 |
Author(s)
Lindsay V. Clark
See Also
Examples
data(exampleRAD)
exampleRAD <- AddAlleleFreqHWE(exampleRAD)
loc2info <- LocusInfo(exampleRAD, "loc2")