Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T92Qf-0002a5-RO for pgsql-general@postgresql.org; Tue, 04 Sep 2012 23:21:09 +0000 Received: from wsip-72-214-29-243.sd.sd.cox.net ([72.214.29.243] helo=joeconway.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T92Qb-0003uy-LQ for pgsql-general@postgresql.org; Tue, 04 Sep 2012 23:21:09 +0000 Received: from www.joeconway.com (account jconway [192.168.4.40] verified) by joeconway.com (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 12269436; Tue, 04 Sep 2012 16:21:03 -0700 Message-ID: <50468CDF.5050100@joeconway.com> Date: Tue, 04 Sep 2012 16:21:03 -0700 From: Joe Conway User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.12) Gecko/20071019 Fedora/1.5.0.12-3.fc6 pango-text Thunderbird/1.5.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Aram Fingal CC: Postgres-General General Subject: Re: crosstab References: <1346773199616-5722632.post@n5.nabble.com> <1346784707.8977.6.camel@asus-1001PX.home> <73FF0C6A-965B-4456-BA90-2B8FD1CBC118@multifactorial.com> <504655DD.4030701@joeconway.com> <09AE4623-B1E5-4F8D-AC55-EF5906A6411C@multifactorial.com> <7455D95E-B02C-4D24-A651-F9D84914A89E@multifactorial.com> <16BCF757-06E1-47C2-8E59-ACD7FEBE6A3B@themactionfaction.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.9 (/) X-Archive-Number: 201209/111 X-Sequence-Number: 190127 On 09/04/2012 02:59 PM, Aram Fingal wrote: > On Sep 4, 2012, at 4:36 PM, A.M. wrote: > >> Or you could return the heatmap/plot as BYTEA data or use arrays as >> necessary. > > I was actually thinking exactly the same thing. Part of the reason I > use PostgreSQL for all my bioinformatics work is that there is a need to > correctly associate analysis results with the data and experimental > methods they come from. I have tables for experimental runs, > technicians, procedures, samples, drugs, etc. and I use foreign key > constraints to connect them all. The idea is to have all the > information readily accessible to reproduce complex results in modern > scientific fashion. If I store the plots in the DB, I can connect them > to all these basic information tables. You can return your results (or some intermediate) object in serialized form as bytea from a PL/R function and store it in a table along with the basic experimental info. Then later if you pass the serialized object back into another PL/R function as a bytea argument, it gets reconstituted as the original R object. Joe -- Joe Conway credativ LLC: http://www.credativ.us Linux, PostgreSQL, and general Open Source Training, Service, Consulting, & 24x7 Support