[Biopython-dev] [Biopython - Feature #3398] (New) Oracle BioSQL

redmine at redmine.open-bio.org redmine at redmine.open-bio.org
Thu Nov 29 04:09:49 EST 2012


Issue #3398 has been reported by Hyungyong Kim.

----------------------------------------
Feature #3398: Oracle BioSQL
https://redmine.open-bio.org/issues/3398

Author: Hyungyong Kim
Status: New
Priority: Normal
Assignee: 
Category: 
Target version: 
URL: 


I just tested Oracle BioSQL for Biopython using cx_Oracle. It includes some Biopython modification due to my genbank file test. I attached this patch and describe how it was generated.

<pre>
[yong27 at dev biopython]$ git ls-remote --heads origin
902947a7df49d8529faeb7e1bfb55b2d06252272        refs/heads/master
[yong27 at dev biopython]$ git diff origin/master master > oracle_biosql.diff
[yong27 at dev biopython]$
</pre>

This is a example how to use Oracle BioSQL. Oracle, Oracle BioSQL schema, cx_Oracle has to be installed.

<pre>
from context lib import contextmanager
from BioSQL import BioSeqDatabase

@contextmanager
def biosqlconn(dbname):
    server = BioSeqDatabase.open_database(driver='cx_Oracle, user='USER', passwd='PASS')
    conn = server[dbname]
    try:
        yield conn
    except:
        conn.adaptor.rollback()
        raise
    else:
        conn.adaptor.commit()
    finally:
        conn.adaptor.close()

with biosqlconn('mydb') as biosqldb:
    record = biosqldb.lookup(accession='1234')

</pre>


----------------------------------------
You have received this notification because this email was added to the New Issue Alert plugin


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here and login: http://redmine.open-bio.org



More information about the Biopython-dev mailing list