Add lambda parameter for q-value estimation in enrichment script #1953
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses an issue discovered here, whereby very small p-values would lead to an ugly
seq
bug like this:(which can happen because the input file is too short, due to the fact that we remove all core functions/annotations when we generate the input file).
There are two new aspects of the code as of these changes:
max_lambda
is too small, we stop the script and print a nicer error for the user:--qlambda
parameter allowing the user to setmax_lambda
themselves. This optional parameter has been added to the programanvi-compute-functional-enrichment-across-genomes
.On my test data (Enterococcus genomes from the Infant Gut Tutorial, using the annotation source
COG20_PATHWAY
which only has 3 annotations differentially present across the genomes), using the--qlambda
parameter allows the script to proceed through the q-value estimation, but it still ends in this later error:Which I suspect is happening because the input file is just too darn small. So even the addition of this parameter doesn't really fix this issue. But at least now users have a bit more control.
@adw96, could you please take a look at these changes and let me know what you think? If you like them, I'll update the documentation and merge the code :)