Clinical-Genomics / fusion-report

Tool for parsing outputs from fusion detection tools. Part of a nf-core/rnafusion pipeline. Checkout a live demo at https://matq007.github.io/fusion-report/example/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sqlite3.ProgrammingError

jingwangiub opened this issue · comments

Hello, I was using rnafusion NF pipeline to analyze some RNA datasets. The command I used for fusion-report step was fusion_report run ${name} $htmlDir/${name}/tools/ ${params.databases} --fusioncatcher ${name}-fusioncatcher-fusion-genes.txt --starfusion ${name}.starfusion_predictions.tsv --pizzly ${name}_pizzly_fusions.txt --squid ${name}_squid_fusions_annotated.txt --arriba ${name}_arriba.tsv

Then I got the following error. My fusion-report version is 2.0. Do you know if it's caused by some special characters or something else? Thank you!

Traceback (most recent call last):
  File "/opt/conda/envs/nf-core-rnafusion-1.1.0/bin/fusion_report", line 12, in <module>
    app.run()
  File "/opt/conda/envs/nf-core-rnafusion-1.1.0/lib/python3.7/site-packages/fusion_report/app.py", line 58, in run
    self.generate_report(params)
  File "/opt/conda/envs/nf-core-rnafusion-1.1.0/lib/python3.7/site-packages/fusion_report/app.py", line 100, in generate_report
    params={'fusion': fusion.name, 'db_path': params.db_path}
  File "/opt/conda/envs/nf-core-rnafusion-1.1.0/lib/python3.7/site-packages/fusion_report/common/base_page.py", line 30, in add_module
    self.modules[name] = ModuleLoader(manager, params).exec(name)
  File "/opt/conda/envs/nf-core-rnafusion-1.1.0/lib/python3.7/site-packages/fusion_report/modules/loader.py", line 24, in exec
    variables = self.__build_factory(name, self.manager, self.params).load()
  File "/opt/conda/envs/nf-core-rnafusion-1.1.0/lib/python3.7/site-packages/fusion_report/modules/fusiongdb/variations/variations.py", line 26, in load
    'data': self.get_data(),
  File "/opt/conda/envs/nf-core-rnafusion-1.1.0/lib/python3.7/site-packages/fusion_report/modules/fusiongdb/variations/variations.py", line 19, in get_data
    self.params['fusion'].split('--')
  File "/opt/conda/envs/nf-core-rnafusion-1.1.0/lib/python3.7/site-packages/fusion_report/common/db.py", line 95, in select
    cur.execute(query, params)
sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 2, and there are 3 supplied.

Hi @jingwangiub, thank you for reporting the bug. Could you please run the latest fusion-report with the latest database and version? Seems like there has been some updated in FusionGDB. The latest versions should work.

Hello,
I encountered the same bug using nf-RNAfusion pipeline eventhough I updated fusionReport to v2.1.1 and I downloaded the databases with fusion_report donwload command yesterday.
I encountered this issue for 10 out of 19 samples, the other run fine

Here is the command used and the error message.

fusion_report run ${name} . databases \
    --arriba ${name}_arriba.tsv --starfusion star-fusion.fusion_predictions.tsv --pizzly ${name}_pizzly_filtered_fusion.txt --squid ${name}_fusions_annotated.txt --fusioncatcher ${name}_fusioncatcher.txt 

Traceback (most recent call last):
  File "/mnt/beegfs/home/tgutman/seqOIA/rnafusion/envs/RNAfusion-fusionreport/bin/fusion_report", line 13, in <module>
    app.run()
  File "/mnt/beegfs/home/tgutman/seqOIA/rnafusion/envs/RNAfusion-fusionreport/lib/python3.7/site-packages/fusion_report/app.py", line 61, in run
    self.generate_report(params)
  File "/mnt/beegfs/home/tgutman/seqOIA/rnafusion/envs/RNAfusion-fusionreport/lib/python3.7/site-packages/fusion_report/app.py", line 106, in generate_report
    params={'fusion': fusion.name, 'db_path': params.db_path}
  File "/mnt/beegfs/home/tgutman/seqOIA/rnafusion/envs/RNAfusion-fusionreport/lib/python3.7/site-packages/fusion_report/common/base_page.py", line 27, in add_module
    self.modules[name] = ModuleLoader(manager, params).exec(name)
  File "/mnt/beegfs/home/tgutman/seqOIA/rnafusion/envs/RNAfusion-fusionreport/lib/python3.7/site-packages/fusion_report/modules/loader.py", line 26, in exec
    variables = self.__build_factory(name, self.manager, self.params).load()
  File "/mnt/beegfs/home/tgutman/seqOIA/rnafusion/envs/RNAfusion-fusionreport/lib/python3.7/site-packages/fusion_report/modules/fusiongdb/variations/variations.py", line 26, in load
    'data': self.get_data(),
  File "/mnt/beegfs/home/tgutman/seqOIA/rnafusion/envs/RNAfusion-fusionreport/lib/python3.7/site-packages/fusion_report/modules/fusiongdb/variations/variations.py", line 19, in get_data
    self.params['fusion'].split('--')
  File "/mnt/beegfs/home/tgutman/seqOIA/rnafusion/envs/RNAfusion-fusionreport/lib/python3.7/site-packages/fusion_report/common/db.py", line 98, in select
    cur.execute(query, params)
sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 2, and there are 4 supplied.

I didn't find a solution yet.
Would you have a fix for that ?
Thank you

Hi @tomgutman, can you write me please on slack channel. I will need to see the list of the fusions you are getting.

@jingwangiub would you do the same please? I can't resolve a problem without an example fusions. It looks like the fusions you are providing are not in format geneX--geneY.

I got data from @tomgutman and I know where the issue is now. I will do my best to fix it tonight.

Fixed in new version 2.1.2. Read the docs here on how to deal with multiple reported fusions