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

Error with low amount of variant sites #3

Open
pgcudahy opened this issue Jul 30, 2020 · 0 comments
Open

Error with low amount of variant sites #3

pgcudahy opened this issue Jul 30, 2020 · 0 comments

Comments

@pgcudahy
Copy link
Collaborator

I've been getting errors with a few samples saying

Traceback (most recent call last):
  File "/home/pgcudahy/ngs-tools/SplitStrains/splitStrains.py", line 925, in <module>
    writeResult(bamFilePath, LR , thresh, alpha_level, [1])
NameError: name 'LR' is not defined

I think this issue is that with low variation samples, writeResult is called with LR as a parameter, but LR isn't defined until after the call.

# call single strain if not enough variation is found
    if len(freqVec) < 5:
        logging.info(f'Not enough variant sites.')
        writeResult(bamFilePath, LR , thresh, alpha_level, [1])
        exit()

# test null and alt hypthesis
    thresh, LR = likelyhood_ratio_test(freqVec, alpha_level, upperLimit, num_iter, init_p, init_err)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant