Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSQ field is not parsed properly in genmod score when using --skip_plugin_check #85

Open
hassanfa opened this issue May 21, 2018 · 2 comments
Labels

Comments

@hassanfa
Copy link

hassanfa commented May 21, 2018

Genmod version: 3.7.0 (replicated in 3.7.2 as well)

command: genmod score -s --skip_plugin_check -f sample.ped -c rank_model.ini -t ped new_sample.vcf

I am using a custom made rank model with CSQ field from the template. I get the following error while trying to run it on my VCF file from VEP's output. The error occurs only when I have the CSQ field in my ranked model. When I expand it into other info fields, it doesn't happen. So I suppose it is a CSQ field issue only.

Traceback (most recent call last):
  File "/Users/hassanforoughi/miniconda3/envs/scout/bin/genmod", line 11, in <module>
    sys.exit(cli())
  File "/Users/hassanforoughi/miniconda3/envs/scout/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/hassanforoughi/miniconda3/envs/scout/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/hassanforoughi/miniconda3/envs/scout/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/hassanforoughi/miniconda3/envs/scout/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/hassanforoughi/miniconda3/envs/scout/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/hassanforoughi/miniconda3/envs/scout/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/hassanforoughi/miniconda3/envs/scout/lib/python3.6/site-packages/genmod/commands/score_variants.py", line 177, in score
    csq_format=csq_format
  File "/Users/hassanforoughi/miniconda3/envs/scout/lib/python3.6/site-packages/genmod/score_variants/score_variant.py", line 59, in get_category_score
    csq_format = csq_format
  File "/Users/hassanforoughi/miniconda3/envs/scout/lib/python3.6/site-packages/genmod/score_variants/score_variant.py", line 27, in get_plugin_score
    value = plugin.get_value(variant_dict=variant, csq_format=csq_format)
  File "/Users/hassanforoughi/miniconda3/envs/scout/lib/python3.6/site-packages/extract_vcf/plugin.py", line 354, in get_value
    individual_id=individual_id):
  File "/Users/hassanforoughi/miniconda3/envs/scout/lib/python3.6/site-packages/extract_vcf/plugin.py", line 136, in get_entry
    entry += split_strings(csq_entry.split('|')[csq_column], self.separators)
UnboundLocalError: local variable 'csq_column' referenced before assignment

The VCF file has a standard VCF format and it is VEP's raw output.

@hassanfa hassanfa changed the title CSQ field is not parsed properly in genmod score CSQ field is not parsed properly in genmod score when using --skip_plugin_check May 21, 2018
@dnil
Copy link
Collaborator

dnil commented Oct 24, 2024

Hm, I'm guessing this is not current? We routinely use VEP CSQ for scoring, so I kind of guess something else is the matter.
But, I also see how this could happen if the CSQ key names are mismatched between annotation and score model. A better warning would be in place if https://github.com/moonso/extract_vcf/blob/c8381b362fa6734cd2ee65ef260738868d981aaf/extract_vcf/plugin.py#L133C29-L133C36 runs out of options!?

@dnil dnil added the Task label Oct 24, 2024
@dnil
Copy link
Collaborator

dnil commented Oct 24, 2024

Let's clone the repo, and fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants