sbslee / fuc

Frequently used commands in bioinformatics
https://sbslee-fuc.readthedocs.io
MIT License
48 stars 5 forks source link

[General] `sorted_samples` function definition doesn't allow passing through count named argument or keyword arguments to `matrix_waterfall` #74

Open lottpaul opened 1 week ago

lottpaul commented 1 week ago

In api/common.py, the function on line 449:

def sorted_samples(self, by, mf=None, keep_empty=False, nonsyn=False):

doesn't define or allow passing through important parameters, such as count to matrix_waterfall function on line 461.

samples = mf.matrix_waterfall(keep_empty=keep_empty).columns

This results in the default count value being applied in matrix_waterfall.

An easy method to fix would be:

  1. Provide a named 'count' argument in sorted_samples function definition
  2. Have a **kwargs in the sorted_samples function definition line and passing this to matrix_waterfall.
sbslee commented 1 week ago

@lottpaul,

Thanks for raising this issue! I agree and added an optional argument count to the method in the 0.39.0-dev branch. Please read the documentation for details. Let me know if you have any further questions.