kevinrue / unisets

Collection of classes to store gene sets.
http://kevinrue.github.io/unisets
Other
3 stars 1 forks source link

Should `setLengths` return "deduplicated" set lengths? #42

Open kevinrue opened 5 years ago

kevinrue commented 5 years ago

Related to #41

setLengths and elementLengths should offer the possibility of ignoring duplicated relationships between the same element and set.

If multiple relationships between the same element and set with different relation metadata are not duplicated, then setLengths and elementLengths should do the deduplication themselves. If they are duplicated, then setLengths and elementLengths should simply call unique on the object before computing the lengths.

Practically, I would add a logical argument setLengths(..., unique=TRUE) (same for elementLengths).

The default argument should probably be TRUE, as the use case of including duplicated relationships is fairly unlikely.