Commit 13efc97f authored by Pauline Pommeret's avatar Pauline Pommeret

Changes in variable names

parent f6af6231
......@@ -23,28 +23,16 @@ class PGCursor(object):
main_seq_query = """INSERT INTO
sequences
(an, name, description, sequence, label, alphabet, alpha, sliding, centering, trx_scale_path)
(accession, name, description, sequence, label, alphabet, alpha, sliding, centering, trx_scale_path)
VALUES
(%(an)s, %(name)s, %(description)s, %(sequence)s, %(label)s, %(alphabet)s, %(alpha)s, %(sliding)s, %(centering)s, %(trx_scale_path)s)
(%(accession)s, %(name)s, %(description)s, %(sequence)s, %(label)s, %(alphabet)s, %(alpha)s, %(sliding)s, %(centering)s, %(trx_scale_path)s)
RETURNING
id;"""
dic_to_sql = {
'an': seq.an,
'name': seq.name,
'description': seq.description,
'sequence': seq.sequence,
'label': seq.label,
'alphabet': seq.alphabet,
'alpha': seq.alpha,
'sliding': seq.sliding,
'centering': seq.centering,
'trx_scale_path': seq.trx_scale_path,
}
self._cur.execute(main_seq_query, seq)
seq_id = self._cur.fetchone()[0]
for helicoidal_parameter in seq.md:
for (frame_num, values) in seq.md[helicoidal_parameter].iteritems():
for helicoidal_parameter in seq.mdd:
for (frame_num, values) in seq.mdd[helicoidal_parameter].iteritems():
md_query = """INSERT INTO
md_%s
(seq_id, frame_num, complete_peak_freq, complete_peak, complete_size, center_peak_freq, center_peak, center_size, sliding_peak_freq, sliding_peak, sliding_size)
......
CREATE TABLE "sequences" (
id SERIAL,
"an" CHARACTER VARYING(20),
"accession" CHARACTER VARYING(20),
"name" CHARACTER VARYING(300) NOT NULL,
"description" TEXT NOT NULL,
"sequence" TEXT NOT NULL,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment