The e-Research workflow

What we do

Moving from data to data

DSpace record

Structure data for re-use

Data as a (structured) document

Document structure influenced by data structure in programming languages

Relational data

Accessing relational data using SQL

Accessing relational data as (Python) objects

from sqlalchemy import and_
from seabass_model import *

session = get_session('postgres:///seabass_db')
species = session.query(Species).filter(
                          Species.common_name == 'seabass').one()
query = (session.query(, 
                        filter(Protein.species == species).limit(10))

Presenting results

Web interfaces for databases

A Flask web application

@app.route('/search', methods=['GET', 'POST'])
def search(session):
        if request.method == 'POST':
            search_term = request.form['search_term']
            genes = session.query(Gene).filter(
                and_("%" + search_term + "%"), Gene.species_id == 16)).all()
            proteins = dict()
            transcripts = None
            for gene in genes:
                transcripts = session.query(Transcript).filter(Transcript.gene_id ==
                for transcript in transcripts:
                    protein = session.query(Protein).filter(Protein.transcript_id ==
                    proteins[] = protein
    except NoResultFound:
        return abort(404)
        return render_template('search_results.html', genes=genes, transcripts=transcripts, proteins=proteins)      
The e-Research workflow

Bringing it all back together

Slides done with reveal.js, source on Github