getSNPID {FunctSNP} | R Documentation |
Extract SNP ID for each gene ID or SNP chromosomal base pair location entered. If gene ID is entered, SNP IDs for all SNPs residing on gene will be extracted.
getSNPID(ids=c(), id.type = c("gene","loc"), speciesCode=c(), loc.keep = TRUE, geneid.keep = TRUE)
ids |
A vector containing either gene IDs or SNP base pair locations. If no ids are entered ALL SNP IDs are returned. |
id.type |
Either "gene" or "loc" [Default = "gene"] |
speciesCode |
A 3 letter species code [Default = the species code set by setSpecies ()] |
loc.keep |
return SNP ID and location [Default = TRUE (if false returns only SNP ID with gene ID)] |
geneid.keep |
return SNP ID and gene ID [Default = TRUE (if false returns only SNP ID with SNP location)] |
A dataframe with the following components:
SNP_ID |
NCBI dbSNP rs# cluster ID |
Gene_ID |
NCBI gene ID (only if geneid.keep = TRUE) |
Location |
SNP chromosomal base pair location (only if loc.keep = TRUE) |
S. J. Goodswen <Stephen.Goodswen@csiro.au>
## Not run: locs <- c(265772,33635700) gene_ids <- c(530393) # Returns SNP ID with gene ID and SNP location for SNP locations - uses species set by setSpecies () snpids <- getSNPID (locs,id.type="loc") # Returns SNP ID with gene ID for SNP locations - uses species set by setSpecies () snpids <- getSNPID (locs,id.type="loc",loc.keep=FALSE) # Returns SNP ID with gene ID and SNP location if SNP is on the gene ID entered - uses species set by setSpecies () snpids <- getSNPID (gene_ids) # Returns SNP ID with gene ID if SNP is on the gene ID entered(Bos taurus species) snpids <- getSNPID (gene_ids,speciesCode="bta",geneid.keep=FALSE) # Returns ALL SNP IDs - uses species set by setSpecies () snpids <- getSNPID () ## End(Not run)