[pygr-notify] [pygr commit] r76 - wiki
codesite-noreply at google.com
codesite-noreply at google.com
Sun Jul 13 19:54:50 PDT 2008
Author: ramccreary
Date: Sun Jul 13 19:54:25 2008
New Revision: 76
Modified:
wiki/DataStorageUsingpygr.wiki
Log:
Edited wiki page through web user interface.
Modified: wiki/DataStorageUsingpygr.wiki
==============================================================================
--- wiki/DataStorageUsingpygr.wiki (original)
+++ wiki/DataStorageUsingpygr.wiki Sun Jul 13 19:54:25 2008
@@ -2,7 +2,7 @@
= Introduction =
-This article is an in-depth explanation of a script in which a genome
and the accompanying annotations are stored in multiple ways, including
a MySQL database and pygr.Data. Storing the data this way enables it to
be easily manipulated using pygr and prevents potential errors by
allowing ease of access to the necessary genomic information.
+This article is an in-depth explanation of a script in which a genome
and the accompanying annotations are manipulated in multiple
ways,including in a MySQL table, and then stored in pygr.Data, a
resource database. Storing the data this way enables it to be easily
manipulated using pygr and prevents potential errors by allowing ease
of access to the necessary genomic information.
= Step-By-Step Example =
@@ -161,12 +161,6 @@
conn.commit()
-
-
- if n > 1000:
-
- break
-
conn.commit()
@@ -217,7 +211,7 @@
annot_map.build()
}}}
-Docstrings are then created for the genome, the annotations, and the
annotation map so they may be stored in pygr.Data. pygr.Data requires
docstrings to be assigned to every resources stored within, to allow a
more transparent storage of data and to allow easier access.
+Docstrings are then created for the genome, the annotations, and the
annotation map so they may be stored in pygr.Data. pygr.Data requires
docstrings to be assigned to every resources stored within, to allow a
more descriptive storage of resources and to allow easier access.
Finally, the genome, the annotation, and the annotation map is stored
in pygr.Data. Since the annotation map is a schema, its can be stored
in pygr.Data as a schema. In order to store schema in pygr.Data, the
relationship between the schema must be defined (Many-To-Many or
One-To-Many). The annotation map is saved in pygr.Dara first, then
again with the schema assignment. When saving the map as schema, the
relationship between the schema and the resources it references must
also be made clear, and the resources must be available in pygr.Data as
well (you must save the genome and annotations along with the
annotation map).
@@ -235,4 +229,13 @@
pygr.Data.ManyToManyRelation(genome,annots,bindAttrs=('annots',))
pygr.Data.save()
-}}}
\ No newline at end of file
+}}}
+
+Accessing data is very simple:
+
+{{{
+import pygr.Data
+pygr.Data.Bio.Seq.Genome.ecoli = genome
+}}}
+
+And now the E. coli genome previously stored can be accessed and utilized!
\ No newline at end of file
More information about the pygr-notify
mailing list