robinandeer/chanjo-report

How to setup and start up chanjo report server

biocyberman opened this issue · 1 comments

Hi @robinandeer
I know you are very busy with many work, so I write a bit documentation about this when you have time.

I ran chanjo report command without know how to setup and start the chanjo report server. The command did not produce any report. Another thing, I use sqlite database for chanjo. But I guess I have to setup and use MySQL database in order to use chanjo report. Is this the most important thing that causes chanjo report to fail?

Okay, something more informative appeared. I had to redirect the error to a file so I can read the top of it.

chanjo report -r pdf -s sample1 -l en -p BRCA1 -n "testname" 2>chanjo.debug.text

And the error has something to do with the query. Others discuss about the error here: http://stackoverflow.com/questions/7106016/too-many-sql-variables-error-in-django-witih-sqlite3

What would be the fix?

[2016-03-03 10:53:54,449] INFO    : chanjo.cli.root          : version 3.3.1
Traceback (most recent call last):
  File "~/bin/opt/anaconda/envs/pytools_env/bin/chanjo", line 11, in <module>
    sys.exit(root_command())
  File "~/bin/opt/anaconda/envs/pytools_env/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "~/bin/opt/anaconda/envs/pytools_env/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "~/bin/opt/anaconda/envs/pytools_env/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "~/bin/opt/anaconda/envs/pytools_env/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "~/bin/opt/anaconda/envs/pytools_env/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "~/bin/opt/anaconda/envs/pytools_env/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "~/bin/opt/anaconda/envs/pytools_env/lib/python2.7/site-packages/chanjo_report/cli/core.py", line 45, in report
    click.echo(render_method(api, options=context.obj))
  File "~/bin/opt/anaconda/envs/pytools_env/lib/python2.7/site-packages/chanjo_report/interfaces/pdf/core.py", line 26, in render_pdf
    return HTML(url).write_pdf()
  File "~/bin/opt/anaconda/envs/pytools_env/lib/python2.7/site-packages/flask_weasyprint/__init__.py", line 182, in HTML
    return _wrapper(weasyprint.HTML, *args, **kwargs)
  File "~/bin/opt/anaconda/envs/pytools_env/lib/python2.7/site-packages/flask_weasyprint/__init__.py", line 165, in _wrapper
    return class_(guess, *args, **kwargs)
  File "~/bin/opt/anaconda/envs/pytools_env/lib/python2.7/site-packages/weasyprint/__init__.py", line 82, in __init__
    with result as (source_type, source, base_url, protocol_encoding):
  File "~/bin/opt/anaconda/envs/pytools_env/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "~/bin/opt/anaconda/envs/pytools_env/lib/python2.7/site-packages/weasyprint/__init__.py", line 290, in _select_source
    with result as result:
  File "~/bin/opt/anaconda/envs/pytools_env/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "~/bin/opt/anaconda/envs/pytools_env/lib/python2.7/site-packages/weasyprint/__init__.py", line 298, in _select_source
    with fetch(url_fetcher, url) as result:
  File "~/bin/opt/anaconda/envs/pytools_env/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "~/bin/opt/anaconda/envs/pytools_env/lib/python2.7/site-packages/weasyprint/urls.py", line 315, in fetch
    raise URLFetchingError('%s: %s' % (name, value) if value else name)
weasyprint.urls.URLFetchingError: OperationalError: (sqlite3.OperationalError) too many SQL variables [SQL: u'SELECT count(*) AS count_1 \nFROM (SELECT DISTINCT transcript.id AS transcript_id_1, transcript.transcript_id AS transcript_transcript_id, transcript.gene_id AS transcript_gene_id \nFROM transcript JOIN exon__transcript AS exon__transcript_1 ON transcript.id = exon__transcript_1.transcript_id JOIN exon ON exon.id = exon__transcript_1.exon_id \nWHERE exon.exon_id IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?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truncated)
....
, u'22-50900633-50900901', u'22-50904389-50904502', u'22-50904778-50904910', u'22-50925326-50925340', u'22-50925813-50925893', u'22-50926703-50926770', u'22-50956169-50956237', u'22-50956401-50956480', u'22-50959393-50959464', u'22-50965593-50965711', u'22-50966016-50966145', u'22-50966940-50967038', u'22-50989673-50989830', u'22-51009319-51009471', u'22-51009586-51009720', u'22-51012921-51013028', u'22-51015285-51015462', u'22-51015752-51015891', u'22-51018993-51019088', u'22-51019848-51019981', u'22-51063572-51063891', u'22-51064006-51064108', u'22-51178121-51178404', u'22-51182488-51182633', u'22-51214199-51214278')]
(pytools_env)coveragels