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.
LocusInfo(object, ...)
# S3 method for RADdata
LocusInfo(object, locus, genome = NULL,
annotation = NULL, verbose = TRUE, ...)
A list containing:
The name of the locus.
The chromosome name, if present.
The position in base pairs on the chromosome, if present.
Allele names for the locus.
Allele sequences for the locus, in the same order.
Allele frequencies, if present, in the same order.
Transcripts overlapping the locus, if an annotation was provided but it wasn't possible to predict amino acid changes.
The output of predictCoding
, if it was run.
A RADdata
object.
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.
An optional FaFile
or
BSgenome
object containing the reference genome sequence.
An optional TxDb
object containing the genome annotation.
If TRUE
, results will be printed to the console.
Additional arguments (none implemented).
Lindsay V. Clark
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.
makeTxDbFromGFF
, GetLoci
data(exampleRAD)
exampleRAD <- AddAlleleFreqHWE(exampleRAD)
loc2info <- LocusInfo(exampleRAD, "loc2")
Run the code above in your browser using DataLab