selkamand / ggoncoplot

Easily Create Interactive Oncoplots
https://selkamand.github.io/ggoncoplot/
Other
2 stars 0 forks source link

Mutation Type Assertion fails when factor is supplied #94

Closed selkamand closed 2 months ago

selkamand commented 2 months ago

Noticed that when mutation type is a factor, assertions::assert_excludes which tests for zero-length strings fails even though the factor levels contain no empty strings.

This is in part an issue with assertions::assert_excludes, which should work appropriately on factors. We actually have no reason not to autoconvert any factor we get to character, and that might reduce other edge-case issues as well. So we will resolve it in ggoncoplot by autoconverting factor-type mutation type columns to character.

The problematic assertion:

assertions::assert_excludes(.data[[col_mutation_type]], illegal = "", msg = "{.strong Mutation Type} column cannot contain zero-length strings")