Find the chromosome position for SNP ids, gene name or band
Allows retrieval of the the chromosome position associated with a SNP-id, HGNC gene label, karyotype band, or vector of such ids. For SNPs the ids can be either chip ids, or rs-ids, but must be contained in the current annotation. Default behaviour is to assume 'id' are SNP ids, but if none are found in the SNP annotation, the id's will be passed to functions Pos.gene() and Pos.band() to see whether a result is found. This latter step will only happen if no SNP ids are retreived in the first instance, and if snps.only=TRUE, then genes and bands will not be searched and NA's returned. If you are repeatedly searching for positions for genes/bands, using the dedicated Pos.gene() and Pos.band() functions would be slightly faster than relying on the fallback behaviour of the Pos() function. Note that the position for genes and bands are not a single point, so the result will be a range with start and end, see 'values' below. See documentation for these functions for more information.
character, a vector of rs-ids or chip-ids representing SNPs in the current ChipInfo annotation,or gene ids, or karyotype bands. Can also be a SnpMatrix object.
character, only relevant when gene or band ids are entered, in this case 'dir' is the location to download gene and cytoband information; if left as NULL, depending on the value of getOption("save.annot.in.current"), the annotation will either be saved in the working directory to speed-up subsequent lookups, or deleted after use.
logical, if TRUE, only search SNP ids, ignore the possibility of genes/cytobands.
When ids are SNP ids, returns a numeric vector of positions for each id, with NA values where no result was found. When ids are genes or karyotype bands, will return a data.frame with columns 'chr' [chromosome], 'start' [starting position of feature], 'end' [end position of feature], and the band without the chromosome prefix, if ids are bands. Note that this function cannot retrieve multiple ranges for a single gene (e.g, OR2A1 in build 38), which means you'd need to use Pos.gene(). The coordinates used will be of version getOption(ucsc="hg18"), or ucsc(chip.support()), which should be equivalent.
Nicholas Cooper firstname.lastname@example.org
1 2 3 4 5 6
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.