DB class

A wrapper for connections to the PostgreSQL database

class galaxy.db.DB[source]

A simple wrapper class for connecting to the PostgreSQL database.

Takes no arguments. Relies on having connection information in ~/dbconn.yaml.

read_params()[source]

Needs the yaml parameter file to be in the user’s home directory

get_cursor()[source]

A simple getter method

run_query(query)[source]

Runs a SQL query (typically SELECT)

Returns results in Python list format (not numpy, which would need a dtype list)

get_xyz(gal, snap)[source]