view cummeRbund_options.py @ 4:ba8fde59843d draft

planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/cummerbund commit 00a7926c285bc4a339bd7deebf40b28f39c7d947-dirty
author devteam
date Tue, 21 Jul 2015 14:18:39 -0400
parents ac2ebc60ef5d
children c3b54a4b7741
line wrap: on
line source

import sqlite3

def get_genes( database_path ):
    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 ):
    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 ]