changeset 1:36f917aa4b60 draft

Uploaded corrected script
author devteam
date Mon, 16 Mar 2015 15:43:38 -0400
parents 648c27c78eed
children 0761bbc0a4e7
files cummerbund_to_tabular.py cummerbund_to_tabular.xml
diffstat 2 files changed, 3 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/cummerbund_to_tabular.py	Tue Dec 23 16:01:24 2014 -0500
+++ b/cummerbund_to_tabular.py	Mon Mar 16 15:43:38 2015 -0400
@@ -2,19 +2,16 @@
 import argparse
 import sys
 import string
+import sqlite3
 
-from galaxy.model.orm import *
 import logging
-from galaxy import eggs
-eggs.require('SQLAlchemy')
-import sqlalchemy
 
 
 class CummerbundParser(object):
 
     def __init__(self, opts):
         self.cummerbund_db = opts.filename
-        self.__connect_database()
+        self.session = sqlite3.connect( os.path.abspath( self.cummerbund_db ) )
 
     def generate_file( self, table ):
         if hasattr( self, table ):
@@ -23,14 +20,6 @@
         else:
             print 'Table %s is not supported or does not exist.' % table
 
-    def __connect_database( self ):
-        database_connection = 'sqlite:///%s' % os.path.abspath( self.cummerbund_db )
-        # Initialize the database connection.
-        engine = create_engine( database_connection )
-        meta = MetaData( bind=engine )
-        sa_sesssion = Session = scoped_session( sessionmaker( bind=engine, autoflush=False, autocommit=True ) )
-        self.session = sa_sesssion
-
     def __write_line(self, line):
         columns = []
         for col in line:
--- a/cummerbund_to_tabular.xml	Tue Dec 23 16:01:24 2014 -0500
+++ b/cummerbund_to_tabular.xml	Mon Mar 16 15:43:38 2015 -0400
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<tool id="cummerbund_to_cuffdiff" name="Extract CuffDiff" version="1.0.0">
+<tool id="cummerbund_to_cuffdiff" name="Extract CuffDiff" version="1.0.1">
     <description>tabular files from a cummeRbund database</description>
     <command interpreter="python"><![CDATA[
         cummerbund_to_tabular.py --file ${input_database}