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

Qqplot bug #200

Merged
merged 4 commits into from
Nov 6, 2024
Merged

Qqplot bug #200

merged 4 commits into from
Nov 6, 2024

Conversation

roskamsh
Copy link
Contributor

@roskamsh roskamsh commented Nov 5, 2024

Branch to fix bug in TargeneCore.jl in which qqplot() function threw in error when only a single p-value was present in the results. This branch checks if the number of non-NA p-values are less than or equal to 1 and does not return a QQplot.png if this is the case. Tests also added.

@roskamsh roskamsh added the bug Something isn't working label Nov 5, 2024
@roskamsh roskamsh linked an issue Nov 5, 2024 that may be closed by this pull request
Copy link
Contributor

@joshua-slaughter joshua-slaughter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Nice catch!

test/outputs.jl Outdated Show resolved Hide resolved
src/outputs.jl Outdated Show resolved Hide resolved
@olivierlabayle
Copy link
Member

Thanks breeshey, I think a slight adjustment is necessary as explained in my comments. The test will probably have to be updated as well since a file will be created.

@roskamsh
Copy link
Contributor Author

roskamsh commented Nov 5, 2024

Thanks breeshey, I think a slight adjustment is necessary as explained in my comments. The test will probably have to be updated as well since a file will be created.

What do you mean a file will be created? In the current implementation, the number of p-values = 1, and so a QQplot is not generated. This is still consistent with the test I've implemented?

@olivierlabayle
Copy link
Member

Thanks breeshey, I think a slight adjustment is necessary as explained in my comments. The test will probably have to be updated as well since a file will be created.

What do you mean a file will be created? In the current implementation, the number of p-values = 1, and so a QQplot is not generated. This is still consistent with the test I've implemented?

If you use continue instead of return, I believe the plot will be created even if it will be empty.

@roskamsh
Copy link
Contributor Author

roskamsh commented Nov 5, 2024

Thanks breeshey, I think a slight adjustment is necessary as explained in my comments. The test will probably have to be updated as well since a file will be created.

What do you mean a file will be created? In the current implementation, the number of p-values = 1, and so a QQplot is not generated. This is still consistent with the test I've implemented?

If you use continue instead of return, I believe the plot will be created even if it will be empty.

Why would we want to create an empty file?

We can make the targene-pipeline adaptable to this context by adding it as an optional output. See: TARGENE/targene-pipeline@6835f0e

I see your comment about one of the estimators having sufficient values, but maybe we can not create a QQ plot if all estimators have less than or equal to 1 non-NA p-value?

@olivierlabayle
Copy link
Member

Thanks breeshey, I think a slight adjustment is necessary as explained in my comments. The test will probably have to be updated as well since a file will be created.

What do you mean a file will be created? In the current implementation, the number of p-values = 1, and so a QQplot is not generated. This is still consistent with the test I've implemented?

If you use continue instead of return, I believe the plot will be created even if it will be empty.

Why would we want to create an empty file?

We can make the targene-pipeline adaptable to this context by adding it as an optional output. See: TARGENE/targene-pipeline@6835f0e

I see your comment about one of the estimators having sufficient values, but maybe we can not create a QQ plot if all estimators have less than or equal to 1 non-NA p-value?

The goal is not to create an empty file but to leave the possibility for other estimators to have sufficiently many pvalues to be plotted. Regarding the case where no estimator has sufficiently many pvalues and the plot would be empty, this does not seem particulalry bad to me (from a user perspective, as compared to no plot file at all). If you have a strong opinion on this I'm happy to discuss. This is a bit more work and you will also have to update the documentation.

@roskamsh
Copy link
Contributor Author

roskamsh commented Nov 6, 2024

Thanks breeshey, I think a slight adjustment is necessary as explained in my comments. The test will probably have to be updated as well since a file will be created.

What do you mean a file will be created? In the current implementation, the number of p-values = 1, and so a QQplot is not generated. This is still consistent with the test I've implemented?

If you use continue instead of return, I believe the plot will be created even if it will be empty.

Why would we want to create an empty file?
We can make the targene-pipeline adaptable to this context by adding it as an optional output. See: TARGENE/targene-pipeline@6835f0e
I see your comment about one of the estimators having sufficient values, but maybe we can not create a QQ plot if all estimators have less than or equal to 1 non-NA p-value?

The goal is not to create an empty file but to leave the possibility for other estimators to have sufficiently many pvalues to be plotted. Regarding the case where no estimator has sufficiently many pvalues and the plot would be empty, this does not seem particulalry bad to me (from a user perspective, as compared to no plot file at all). If you have a strong opinion on this I'm happy to discuss. This is a bit more work and you will also have to update the documentation.

I see, I see. Okay - I guess the likeliness that this will happen is probably quite low anyways, as TarGene is most likely to be run across more than a single variant and single trait. I can go ahead with your suggestion and will update here!

Copy link
Member

@olivierlabayle olivierlabayle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, many thanks!

@roskamsh roskamsh merged commit 15d842e into main Nov 6, 2024
5 checks passed
@roskamsh roskamsh deleted the qqplot_bug branch November 6, 2024 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Single variant single trait runs fail to generate QQplot
3 participants