menchelab / BioProfiling.jl

A flexible Julia toolkit for high-dimensional cellular profiles
MIT License
13 stars 1 forks source link

Negation of MembershipFilter #42

Closed koalive closed 1 year ago

koalive commented 1 year ago

The negation of MembershipFilter do not work as expected:

using DataFrames, BioProfiling, Random
data = DataFrame(A = rand(26), B = rand(26), C = rand(26), D = 'A':'Z')
xp = Experiment(data, description = "Example data")
confilter = MembershipFilter(['A', 'E', 'I', 'O', 'U'], :D,
                            description = "Remove consonnants")
valfilter = Filter(0.5, :A, >, "A > 0.5")
filter_entries(xp, valfilter) # Works
filter_entries(xp, confilter) # Works
filter_entries(xp, negation(valfilter)) # Works
filter_entries(xp, negation(confilter)) # Crashes
koalive commented 1 year ago

Supported as of 09bb97f26b80dfb846c043eb974a6f1ab5524168