question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sqlalchemy.exc.InterfaceError: (sqlite3.InterfaceError) Error binding parameter 51

See original GitHub issue

I am currently using gemini 0.18.3 because I didn’t want to break my installation. My command is:

gemini_python /mnt/isilon/cbmi/variome/bin/vcf2db/vcf2db.py --legacy-compression vcfs/sample.snpeff.anno.vcf.gz sample.pedfile gemini/test.db

Here are the config files that I used in vcfanno: vcfanno.conf

[[annotation]]
file = "ExAC.r0.3.sites.vep.tidy.vcf.gz"
fields = ["AC_Adj", "AN_Adj"]
names = ["exac_ac_all", "exac_an_all"]
ops = ["self", "self"]

[[annotation]]
file = "/home/rathik/grin_test/GRCh38/annotations/dbsnp137.coding.variants.sift.prediction.bed.gz"
columns = [14,15,18,19]
names = ["Provean_score","Provean_prediction","SIFT_score","SIFT_prediction"]
ops     = ["self", "self", "self", "self"]

[[annotation]]
file = "ESP6500SI.all.snps_indels.tidy.v2.vcf.gz"
fields = ["FG","AAC", "PH"]
names = ["functionGVS", "aminoAcidChange", "polyPhen"]
ops = ["self", "self", "self"]

[[annotation]]
file = "/home/rathik/grin_test/GRCh38/annotations/literaturegenes_GRCh38.bed.gz"
columns = [4]
names = ["literature_genes"]
ops = ["self"]

[[annotation]]
file = "/home/rathik/grin_test/GRCh38/annotations/recurrentgenes_GRCh38.bed.gz"
columns = [4]
names = ["recurrent_genes"]
ops = ["self"]

[[annotation]]
file = "/home/rathik/grin_test/GRCh38/annotations/rvis_GRCh38.bed.gz"
columns = [4,5]
names = ["rvis_genes","rvis_score"]
ops = ["self","self"]

[[postannotation]]
fields = ["exac_ac_all", "exac_an_all"]
name = "exac_af_all"
op = "lua:divfunc(exac_ac_all[1],exac_an_all)"
type = "Float"

vcfanno.lua

function divfunc(a, b)
        if(a == 0) then 
                return 0.0
        else 
        return string.format("%.9f", a / b)
    end
end

Even though I am getting the following error, a database is created:

setting exac_af_all to Type String because it has Number=.
/mnt/isilon/cbmi/variome/bin/gemini/data/anaconda/lib/python2.7/site-packages/sqlalchemy/sql/sqltypes.py:185: SAWarning: Unicode type received non-unicode bind param value 'NLES10'. (this warning may be suppressed after 10 occurrences)
  (util.ellipses_string(value),))
/mnt/isilon/cbmi/variome/bin/gemini/data/anaconda/lib/python2.7/site-packages/sqlalchemy/sql/sqltypes.py:185: SAWarning: Unicode type received non-unicode bind param value '733459'. (this warning may be suppressed after 10 occurrences)
  (util.ellipses_string(value),))
/mnt/isilon/cbmi/variome/bin/gemini/data/anaconda/lib/python2.7/site-packages/sqlalchemy/sql/sqltypes.py:185: SAWarning: Unicode type received non-unicode bind param value '733482'. (this warning may be suppressed after 10 occurrences)
  (util.ellipses_string(value),))
/mnt/isilon/cbmi/variome/bin/gemini/data/anaconda/lib/python2.7/site-packages/sqlalchemy/sql/sqltypes.py:185: SAWarning: Unicode type received non-unicode bind param value '733434'. (this warning may be suppressed after 10 occurrences)
  (util.ellipses_string(value),))
/mnt/isilon/cbmi/variome/bin/gemini/data/anaconda/lib/python2.7/site-packages/sqlalchemy/sql/sqltypes.py:185: SAWarning: Unicode type received non-unicode bind param value '1'. (this warning may be suppressed after 10 occurrences)
  (util.ellipses_string(value),))
10000 variant_impacts:44264 effects time: 7.6   chunk time:13.6 734.00 variants/second
20000 variant_impacts:43003 effects time: 7.2   chunk time:12.5 764.97 variants/second
30000 variant_impacts:42482 effects time: 7.4   chunk time:11.4 798.41 variants/second
40000 variant_impacts:45072 effects time: 7.3   chunk time:12.4 801.17 variants/second
50000 variant_impacts:54559 effects time: 8.7   chunk time:14.3 777.96 variants/second
60000 variant_impacts:48911 effects time: 7.9   chunk time:13.3 773.14 variants/second
70000 variant_impacts:40810 effects time: 7.2   chunk time:12.2 779.20 variants/second
80000 variant_impacts:39796 effects time: 7.0   chunk time:12.2 783.81 variants/second
90000 variant_impacts:48542 effects time: 8.1   chunk time:13.5 778.56 variants/second
100000 variant_impacts:41732    effects time: 7.2   chunk time:12.6 780.30 variants/second
Traceback (most recent call last):
  File "/mnt/isilon/cbmi/variome/bin/vcf2db/vcf2db.py", line 720, in <module>
    blobber=blobber)
  File "/mnt/isilon/cbmi/variome/bin/vcf2db/vcf2db.py", line 175, in __init__
    self.load()
  File "/mnt/isilon/cbmi/variome/bin/vcf2db/vcf2db.py", line 240, in load
    self._load(self.vcf, create=False, start=i+1)
  File "/mnt/isilon/cbmi/variome/bin/vcf2db/vcf2db.py", line 224, in _load
    self.insert(variants, expanded, keys, i)
  File "/mnt/isilon/cbmi/variome/bin/vcf2db/vcf2db.py", line 279, in insert
    vilengths, variant_impacts)
  File "/mnt/isilon/cbmi/variome/bin/vcf2db/vcf2db.py", line 307, in _insert
    self.__insert(v_objs, self.metadata.tables['variants'].insert())
  File "/mnt/isilon/cbmi/variome/bin/vcf2db/vcf2db.py", line 331, in __insert
    trans.execute(stmt, o)
  File "/mnt/isilon/cbmi/variome/bin/gemini/data/anaconda/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/mnt/isilon/cbmi/variome/bin/gemini/data/anaconda/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/mnt/isilon/cbmi/variome/bin/gemini/data/anaconda/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/mnt/isilon/cbmi/variome/bin/gemini/data/anaconda/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/mnt/isilon/cbmi/variome/bin/gemini/data/anaconda/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/mnt/isilon/cbmi/variome/bin/gemini/data/anaconda/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/mnt/isilon/cbmi/variome/bin/gemini/data/anaconda/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/mnt/isilon/cbmi/variome/bin/gemini/data/anaconda/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.InterfaceError: (sqlite3.InterfaceError) Error binding parameter 51 - probably unsupported type. 
[SQL: u'INSERT INTO variants (variant_id, chrom, start, "end", vcf_id, ref, alt, qual, filter, type, sub_type, call_rate, num_hom_ref, num_het, num_hom_alt, aaf, gene, transcript, is_exonic, is_coding, is_lof, is_splicing, exon, codon_change, aa_change, aa_length, biotype, impact, impact_so, impact_severity, polyphen_pred, polyphen_score, sift_pred, sift_score, an, baseqranksum, clippingranksum, dp, fs, lof, mq, mqranksum, nmd, provean_prediction, provean_score, qd, readposranksum, sift_prediction, sor, aminoacidchange, exac_af_all, exac_an_all, functiongvs, literature_genes, polyphen, recurrent_genes, rvis_genes, rvis_score, gts, gt_types, gt_phases, gt_depths, gt_ref_depths, gt_alt_depths, gt_quals) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'] [parameters: (154484, 'chr11', 1016967, 1016968, None, 'T', 'G,C', 7694.89990234375, None, 'snp', 'unknown', 1.0, 0, 3, 0, 0.5, 'MUC6', 'ENST00000421673', 1, 1, 0, 0, '31', 'Aca/Cca', 'T1945P', 2439, 'protein_coding', 'missense_variant', 'missense_variant', 'MED', None, None, None, None, 6, 7.900000095367432, -0.39399999380111694, 2251, 49.323001861572266, 'None', 64.66000366210938, -2.3959999084472656, 'None', None, None, 3.430000066757202, 2.5, None, 4.144999980926514, 'None', inf, (110356, 110356), 'None', 'MUC6', 'None', None, 'MUC6', '1.26', <read-only buffer for 0x2aaac57ac7b0, size -1, offset 0 at 0x2aaac7c65eb0>, <read-only buffer for 0x2aaac57ac850, size -1, offset 0 at 0x2aaac7c653b0>, <read-only buffer for 0x2aaac57ac8f0, size -1, offset 0 at 0x2aaac7c65130>, <read-only buffer for 0x2aaac4daddf8, size -1, offset 0 at 0x2aaac7c558f0>, <read-only buffer for 0x2aaac4dadea0, size -1, offset 0 at 0x2aaac7c55930>, <read-only buffer for 0x2aaac4dadf48, size -1, offset 0 at 0x2aaac7c55970>, <read-only buffer for 0x2aaac57ac990, size -1, offset 0 at 0x2aaac7c559b0>)]

Why do the values at the end look weird?

Thanks!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
brentpcommented, Aug 11, 2016

and I’ll see how to improve the situation for cases like the one you report.

0reactions
brentpcommented, Aug 11, 2016

ok. please keep us posted. we are using the new loader as well, but you are bound to find issue we haven’t seen.

Read more comments on GitHub >

github_iconTop Results From Across the Web

sqlite3.InterfaceError: Error binding parameter 1 - probably ...
The column will have type fruit in Sqlite, but it will be associated with a supported storage class: text , in this case....
Read more >
(sqlite3.InterfaceError) Error binding parameter 6 - probably ...
First check I added a very descriptive title to this issue. I used the GitHub search to find a similar issue and didn't...
Read more >
sqlite3.InterfaceError: Error binding parameter 0 - Python Forum
This error is a DBAPI Error and originates from the database driver (DBAPI), not SQLAlchemy itself. The InterfaceError is sometimes raised by ...
Read more >
Error when trying to commit post to sqlalchemy database : r/flask
I have a problem. Whenever I try to post something to the database i get the following error: sqlalchemy.exc.InterfaceError: (sqlite3.
Read more >
sqlalchemy.exc.interfaceerror (sqlite3.interfaceerror) error binding ...
sqlalchemy.exc.interfaceerror (sqlite3.interfaceerror) error binding parameter 0技术、学习、经验文章掘金开发者社区搜索结果。掘金是一个帮助开发者成长的社区 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found