Browse code

last round of updates to template man pages to reference select()

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/AnnotationForge@110078 bc3139a8-67e5-0310-9ffc-ced21a209358

Valerie Obenchain authored on 29/10/2015 20:46:44
Showing1 changed files
... ...
@@ -20,33 +20,47 @@
20 20
   Mappings were based on data provided by: @PATHSOURCE@
21 21
 
22 22
 }
23
+
23 24
 \references{
24 25
   \url{http://www.genome.ad.jp/kegg/}
25 26
 }
27
+
28
+\seealso{
29
+  \itemize{
30
+    \item \code{\link[AnnotationDbi]{AnnotationDb-class}} for use of
31
+          the \code{select()} interface.
32
+  }
33
+}
34
+
26 35
 \examples{
27
-    x <- @ANNOBJPREFIX@PATH
28
-    # Get the entrez gene identifiers that are mapped to a KEGG pathway ID
29
-    mapped_genes <- mappedkeys(x)
30
-    # Convert to a list
31
-    xx <- as.list(x[mapped_genes])
32
-    if(length(xx) > 0) {
33
-      # Get the PATH for the first five genes
34
-      xx[1:5]
35
-      # Get the first one
36
-      xx[[1]]
37
-    }
38
-
39
-    # For the reverse map:
40
-    # Convert the object to a list
41
-    xx <- as.list(@ANNOBJPREFIX@PATH2EG)
42
-    # Remove pathway identifiers that do not map to any entrez gene id
43
-    xx <- xx[!is.na(xx)]
44
-    if(length(xx) > 0){
45
-        # The entrez gene identifiers for the first two elements of XX
46
-        xx[1:2]
47
-        # Get the first one
48
-        xx[[1]]
49
-    }
36
+## select() interface:
37
+## Objects in this package can be accessed using the select() interface
38
+## from the AnnotationDbi package. See ?select for details.
39
+
40
+## Bimap interface:
41
+x <- @ANNOBJPREFIX@PATH
42
+# Get the entrez gene identifiers that are mapped to a KEGG pathway ID
43
+mapped_genes <- mappedkeys(x)
44
+# Convert to a list
45
+xx <- as.list(x[mapped_genes])
46
+if(length(xx) > 0) {
47
+  # Get the PATH for the first five genes
48
+  xx[1:5]
49
+  # Get the first one
50
+  xx[[1]]
51
+}
52
+
53
+# For the reverse map:
54
+# Convert the object to a list
55
+xx <- as.list(@ANNOBJPREFIX@PATH2EG)
56
+# Remove pathway identifiers that do not map to any entrez gene id
57
+xx <- xx[!is.na(xx)]
58
+if(length(xx) > 0){
59
+    # The entrez gene identifiers for the first two elements of XX
60
+    xx[1:2]
61
+    # Get the first one
62
+    xx[[1]]
63
+}
50 64
 }
51 65
 \keyword{datasets}
52 66
 
Browse code

Adds general templates for org and chip packages based on NCBI.

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/AnnotationForge@67136 bc3139a8-67e5-0310-9ffc-ced21a209358

Marc Carlson authored on 28/06/2012 23:46:36
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,52 @@
1
+\name{@ANNOBJPREFIX@PATH}
2
+\alias{@ANNOBJPREFIX@PATH}
3
+\alias{@ANNOBJPREFIX@PATH2EG}
4
+\title{Mappings between Entrez Gene identifiers and KEGG pathway identifiers}
5
+\description{
6
+  KEGG (Kyoto Encyclopedia of Genes and Genomes) maintains pathway data
7
+  for various organisms. @ANNOBJPREFIX@PATH maps entrez gene identifiers to the
8
+  identifiers used by KEGG for pathways
9
+}
10
+\details{
11
+  Each KEGG pathway has a name and identifier. Pathway name for a given pathway
12
+  identifier can be obtained using the KEGG data package that can either be
13
+  built using AnnBuilder or downloaded from Bioconductor
14
+  \url{http://www.bioconductor.org}.
15
+
16
+  Graphic presentations of pathways are searchable at
17
+  url http://www.genome.ad.jp/kegg/pathway.html by using pathway identifiers as
18
+  keys.   
19
+
20
+  Mappings were based on data provided by: @PATHSOURCE@
21
+
22
+}
23
+\references{
24
+  \url{http://www.genome.ad.jp/kegg/}
25
+}
26
+\examples{
27
+    x <- @ANNOBJPREFIX@PATH
28
+    # Get the entrez gene identifiers that are mapped to a KEGG pathway ID
29
+    mapped_genes <- mappedkeys(x)
30
+    # Convert to a list
31
+    xx <- as.list(x[mapped_genes])
32
+    if(length(xx) > 0) {
33
+      # Get the PATH for the first five genes
34
+      xx[1:5]
35
+      # Get the first one
36
+      xx[[1]]
37
+    }
38
+
39
+    # For the reverse map:
40
+    # Convert the object to a list
41
+    xx <- as.list(@ANNOBJPREFIX@PATH2EG)
42
+    # Remove pathway identifiers that do not map to any entrez gene id
43
+    xx <- xx[!is.na(xx)]
44
+    if(length(xx) > 0){
45
+        # The entrez gene identifiers for the first two elements of XX
46
+        xx[1:2]
47
+        # Get the first one
48
+        xx[[1]]
49
+    }
50
+}
51
+\keyword{datasets}
52
+