Skip to content

Conversation

ryananeff
Copy link

@ryananeff ryananeff commented Apr 11, 2018

The p variable may at some point become a list of character strings that when sorted, do not sort properly due to the number of digits in the p-value. For instance, a p-value of 0.999984 would be sorted as being larger than 0.9999864 even though it's numeric value is smaller.

I believe this has the effect of increasing the q-values from the qvalue function because the list is no longer in order, so larger q-values may sometimes be treated as being smaller. This will then decrease the number of significant associations output by WGCNA.

Therefore, either ensure that the p-values are numeric before sorting or cast it to a numeric type.

The p variable at some point became a list of character strings that when sorted, do not sort properly due to the number of digits in the p-value. For instance, a p-value of 0.999984 would be sorted as being larger than 0.9999864 even though it's numeric value is smaller. 

I believe this has the effect of increasing the q-values from the qvalue function because the list is no longer in order, so larger q-values may sometimes be treated as being smaller. This will then decrease the number of significant associations output by WGCNA.
@ryananeff ryananeff changed the title Treat p-values as numeric before sorting Ensure p-values are numeric before sorting Apr 11, 2018
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

Successfully merging this pull request may close these issues.

1 participant