brentp / bwa-meth

fast and accurate alignment of BS-Seq reads using bwa-mem and a 3-letter genome
https://arxiv.org/abs/1401.1129
MIT License
139 stars 53 forks source link

Better modularity #10

Closed superbobry closed 6 years ago

superbobry commented 10 years ago

I think it would be nice to split bwa-meth into separate subcommands, e.g.

+ bwameth
|
+-- index.py
+-- c2t.py
+-- tabulate.py
+-- cnvs.py
+-- __main__.py

Then each subcommand can be called with python -m bwameth.<cmd>.

brentp commented 10 years ago

I think then you'd need

bwameth/
               index/__main__.py
               c2t/__main__.py
               tabulate/__main.py

etc.

I'm not against this outright, but I think the code is quite simple as-is so I don't see the reasoning.

superbobry commented 10 years ago

Python modules (and not packages) should work just fine.

$ cat hw.py
if __name__ == "__main__":
    print("Hello world!")
$ python -m hw
Hello world!
brentp commented 10 years ago

ah, good to know!

brentp commented 10 years ago

still, let's not sacrifice simplicity for correctitude