Last data update: 2014.03.03

R: Find the Entrez Gene ID corresponding to the largest...
findLargestR Documentation

Find the Entrez Gene ID corresponding to the largest statistic

Description

Most microarrays have multiple probes per gene (Entrez). This function finds all replicates, and then selects the one with the largest value of the test statistic.

Usage

findLargest(gN, testStat, data = "hgu133plus2")

Arguments

gN

A vector of probe identifiers for the chip.

testStat

A vector of test statistics, of the same length as gN with the per probe test statistics.

data

The character string identifying the chip.

Details

All the probe identifiers, gN, are mapped to Entrez Gene IDs and the duplicates determined. For any set of probes that map to the same Gene ID, the one with the largest test statistic is found. The return vector is the named vector of selected probe identifiers. The names are the Entrez Gene IDs.

This could be extended in different ways, such as allowing the user to use a different selection criterion. Also, matching on different identifiers seems like another alternative.

Value

A named vector of probe IDs. The names are Entrez Gene IDs.

Author(s)

R. Gentleman

See Also

sapply

Examples

  library("hgu95av2.db")
  set.seed(124)
  gN <- sample(ls(hgu95av2ENTREZID), 200)
  stats <- rnorm(200)
  findLargest(gN, stats, "hgu95av2")

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(genefilter)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/genefilter/findLargest.Rd_%03d_medium.png", width=480, height=480)
> ### Name: findLargest
> ### Title: Find the Entrez Gene ID corresponding to the largest statistic
> ### Aliases: findLargest
> ### Keywords: manip
> 
> ### ** Examples
> 
>   library("hgu95av2.db")
Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: IRanges
Loading required package: S4Vectors

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: org.Hs.eg.db


>   set.seed(124)
>   gN <- sample(ls(hgu95av2ENTREZID), 200)
>   stats <- rnorm(200)
>   findLargest(gN, stats, "hgu95av2")
   100506866        10155        10195        10198        10215        10298 
  "40796_at"   "33425_at"   "38161_at"   "40707_at"   "40624_at"   "33814_at" 
       10299        10379       103910        10499        10966         1104 
  "32802_at"   "38517_at"   "41187_at"   "34313_at"     "555_at"   "37927_at" 
       11061         1152          117         1175         1191         1284 
  "41069_at" "40862_i_at"   "35568_at"   "39347_at"   "36780_at"   "36659_at" 
        1385       140890         1447         1455         1588       169841 
  "37535_at"   "36033_at"   "34122_at"   "41725_at"    "1618_at"   "33566_at" 
        1756         1770         1802         1823         1843         1902 
  "40488_at"   "36443_at"   "41380_at"   "34619_at"    "1005_at"   "40387_at" 
        1948         2081         2145         2171         2200       221395 
  "34335_at"   "31380_at"   "32259_at"   "39799_at"   "32535_at"   "34235_at" 
       22929        23086        23189        23191        23262        23268 
  "39387_at"   "35579_at"   "37225_at"   "37306_at"   "35167_at"   "34712_at" 
       23378        23435        23607          239         2395         2549 
  "36087_at"   "32241_at"   "34699_at"   "35124_at"   "38330_at"   "33997_at" 
       25758         2581        25900        26018        26031        26058 
  "39644_at"   "33936_at"   "36030_at"   "34800_at"   "33755_at"   "38103_at" 
        2621        27350         2810       283212          293           30 
   "1597_at" "37940_f_at" "33322_i_at" "40287_s_at"   "40435_at"   "40415_at" 
         301          303         3071        30817         3201          321 
  "37403_at"   "31684_at"   "37845_at"   "31965_at"     "204_at"   "39590_at" 
        3362         3418       347733         3487         3537         3556 
  "32907_at"   "32332_at"   "39332_at"   "39781_at"   "31347_at"   "38546_at" 
        3651         3659         3667          368         3693         3726 
    "400_at"   "669_s_at"   "851_s_at"     "964_at"   "39754_at"   "32786_at" 
        3842         3892         4056         4224         4292       440352 
  "40463_at"   "32329_at"   "39968_at"   "35489_at"  "1944_f_at"   "40952_at" 
        4490         4676         4720         4781         4784         4837 
  "609_f_at"   "32575_at"   "32738_at"   "40642_at" "41537_r_at"   "37032_at" 
        4916         4987         4990         5096        51020         5104 
  "32345_at"   "34558_at"   "32364_at"   "36561_at" "34360_s_at" "37008_r_at" 
        5126         5129         5133         5140        51606         5170 
  "41020_at"   "35242_at"   "33085_at"   "35872_at" "33742_f_at"   "32029_at" 
       51704         5207         5271         5287         5331         5387 
  "40240_at"   "33980_at"   "36312_at"   "41715_at"   "364_s_at"  "1875_f_at" 
        5432        54587        54629          553         5577         5579 
   "1594_at"   "35219_at" "37802_r_at"     "648_at"   "37221_at"   "37301_at" 
        5641         5682        56910        56987         5869         5896 
    "317_at"   "38371_at"   "41295_at"   "31867_at"   "37362_at"    "1077_at" 
        5917         5969         6167         6171         6193         6196 
    "549_at"   "33498_at"   "33656_at"   "32466_at"   "32437_at"   "33325_at" 
        6368       643733         6568         6580         6697         6710 
"36444_s_at"   "31383_at"   "37097_at"   "35113_at"   "32108_at" "36037_g_at" 
        6716          672         6727         6774         6904         6927 
    "565_at"     "604_at"   "41194_at"     "289_at"   "39399_at"   "34639_at" 
        7013         7163         7165         7175         7203         7305 
   "1361_at"   "33840_at"   "40076_at"     "421_at"   "40774_at"   "38363_at" 
         731         7314         7324          774        79572         8061 
  "41023_at"    "1323_at"   "37358_at" "33960_s_at"   "34857_at"   "32271_at" 
        8189         8336         8406        84162         8419        84986 
"32402_s_at"   "33023_at"   "31855_at"   "36814_at" "33096_r_at"   "37577_at" 
        8500         8542         8673         8787         8933         8941 
  "41781_at"   "35099_at"   "32715_at"   "35112_at"   "33856_at"   "36361_at" 
        8945         9073         9249         9260         9294         9358 
  "39305_at" "33611_g_at"   "40782_at"   "39530_at"   "34086_at"   "40681_at" 
       94026         9495         9537         9550         9688         9708 
"31747_g_at"   "32421_at"   "36136_at"   "38814_at"   "40271_at"   "35609_at" 
        9868          993         9975 
  "32853_at"   "35407_at"   "35706_at" 
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>