changeset 2:ac2ebc60ef5d draft

Uploaded corrected dynamic options
author devteam
date Mon, 16 Mar 2015 15:43:02 -0400
parents f3012521ea79
children 3a0ade59306a
files cummeRbund.xml cummeRbund_options.py
diffstat 2 files changed, 6 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/cummeRbund.xml	Fri Mar 13 15:30:17 2015 -0400
+++ b/cummeRbund.xml	Mon Mar 16 15:43:02 2015 -0400
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<tool id="cummeRbund" name="Plot CuffDiff" version="1.0.0">
+<tool id="cummeRbund" name="Plot CuffDiff" version="1.0.1">
     <description>data with cummeRbund</description>
     <requirements>
         <requirement type="set_environment">CUMMERBUND_SCRIPT_PATH</requirement>
--- a/cummeRbund_options.py	Fri Mar 13 15:30:17 2015 -0400
+++ b/cummeRbund_options.py	Mon Mar 16 15:43:02 2015 -0400
@@ -1,23 +1,11 @@
-from galaxy import eggs
-eggs.require( 'SQLAlchemy' )
-eggs.require( 'pysqlite>=2' )
-from sqlalchemy import *
-from sqlalchemy.sql import and_
-from sqlalchemy.orm import sessionmaker
-from sqlalchemy.orm import scoped_session
+import sqlite3
 
 def get_genes( database_path ):
-    dburi = 'sqlite:///%s' % database_path
-    engine = create_engine( dburi )
-    meta = MetaData( bind=engine )
-    db_session = Session = scoped_session( sessionmaker( bind=engine, autoflush=False, autocommit=True ) )
-    gene_ids = db_session.execute( 'select gene_short_name, gene_id from genes order by gene_short_name' )
+    conn = sqlite3.connect( database_path )
+    gene_ids = conn.execute( 'SELECT gene_short_name, gene_id FROM genes ORDER BY gene_short_name' )
     return [ ( gene_id[ 0 ], gene_id[ 1 ], False ) for gene_id in gene_ids ]
 
 def get_samples( database_path ):
-    dburi = 'sqlite:///%s' % database_path
-    engine = create_engine( dburi )
-    meta = MetaData( bind=engine )
-    db_session = Session = scoped_session( sessionmaker( bind=engine, autoflush=False, autocommit=True ) )
-    samples = db_session.execute( 'select sample_name from samples order by sample_name' )
+    conn = sqlite3.connect( database_path )
+    samples = conn.execute( 'SELECT sample_name FROM samples ORDER BY sample_name' )
     return [ ( sample[ 0 ], sample[ 0 ], False ) for sample in samples ]