aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xexamples/dump-species-metadata.scm42
1 files changed, 42 insertions, 0 deletions
diff --git a/examples/dump-species-metadata.scm b/examples/dump-species-metadata.scm
index 3e429f0..a7e242a 100755
--- a/examples/dump-species-metadata.scm
+++ b/examples/dump-species-metadata.scm
@@ -55,6 +55,48 @@
(set gnt:family (field Species Family))
(set gnt:organism (ontology 'taxon: (field Species TaxonomyId)))))
+#!
+
+The ProbeData table contains StrainID.
+
+MariaDB [db_webqtl]> select * from ProbeData limit 2;
++--------+----------+---------+
+| Id | StrainId | value |
++--------+----------+---------+
+| 503636 | 42 | 11.6906 |
+| 503636 | 43 | 11.4205 |
++--------+----------+---------+
+
+Likewise
+
+MariaDB [db_webqtl]> select * from ProbeSetData wher limit 2;
++----+----------+-------+
+| Id | StrainId | value |
++----+----------+-------+
+| 1 | 1 | 5.742 |
+| 1 | 2 | 5.006 |
++----+----------+-------+
+
+To get at the strain use
+
+MariaDB [db_webqtl]> select * from Strain where Id=1 limit 15;
++----+--------+--------+-----------+--------+-------+
+| Id | Name | Name2 | SpeciesId | Symbol | Alias |
++----+--------+--------+-----------+--------+-------+
+| 1 | B6D2F1 | B6D2F1 | 1 | NULL | NULL |
++----+--------+--------+-----------+--------+-------+
+
+A typical query may look like
+
+SELECT Strain.Name, Strain.Id FROM Strain, Species
+WHERE Strain.Name IN f{create_in_clause(self.samplelist)}
+AND Strain.SpeciesId=Species.Id
+AND Species.name = %s, (self.group.species,)
+
+At this point it is not very clear how Name, Name2, Symbol and Alias are used.
+
+!#
+
(define-dump dump-strain
(tables (Strain
(left-join Species "ON Strain.SpeciesId = Species.SpeciesId")))