compomics / moFF

A modest Feature Finder (moFF) to extract MS1 intensities from Thermo raw file
Apache License 2.0
33 stars 11 forks source link

Cleaner CLI? #29

Closed caleb-easterly closed 5 years ago

caleb-easterly commented 6 years ago

Hi @Maux82,

I've been thinking for a while about if it's possible to implement a command line interface that: 1) can handle multiple files with or without MBR 2) has one command as an entry point to all modes

In particular, the first fix would make things a lot easier when there are a lot of files but MBR is not appropriate. The change would also remove redundancy in the parsers, and alleviate confusing about the different modes.

As an example, if there was a single entry point moff, the moff_all.py example from the README could be:

(with mbr)

moff --loc_in sample_folder/ --raw_repo sample_folder/ \
    --toll 10 --loc_out output_moff --peptide_summary 1 --mbr on

or (without mbr)

moff --loc_in sample_folder/ --raw_repo sample_folder/ \
    --toll 10 --loc_out output_moff --peptide_summary 1 --mbr off

or (mbr only, for testing)

moff --loc_in sample_folder/ --raw_repo sample_folder/ \
    --toll 10 --loc_out output_moff --peptide_summary 1 --mbr only

Then these three could replicate the three current scripts in a more elegant way.

Thoughts?

Maux82 commented 6 years ago

Hi @caleb-easterly ,

Thanks for your suggestions, both are really usefull. I will work on it. However, without mbr I think that a command line option for each file should be usefull in case where user embeds moFF on a custum pipeleline.
In meantime I have added an option where the user can specify all the option using a configuration file. I think this will usefull also on your side. With new filtering , the number of parameters is getting high I hope that a configurataion file could improve the usability of moFF.

caleb-easterly commented 6 years ago

Yes, it makes sense to maintain the flexibility of using either a single file or a directory. If the user was trying to analyze 1 pair, would it make sense to throw an error if the names were different?

re: the number of arguments, it would be possible to have just one set of arguments for input files (i.e., --ident_in and --raw_in), then detect whether it was a list of files (including a list with length 1) or a directory. But I'm not sure if that's good practice in general, or if it's easier to use than the current setup.