# HG changeset patch # User devteam # Date 1426535018 14400 # Node ID 36f917aa4b606ae28b3e47af068c2d302c0038da # Parent 648c27c78eed7ac998aef8bc26de4cb0526c4160 Uploaded corrected script diff -r 648c27c78eed -r 36f917aa4b60 cummerbund_to_tabular.py --- 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: diff -r 648c27c78eed -r 36f917aa4b60 cummerbund_to_tabular.xml --- 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 @@ - + tabular files from a cummeRbund database