eiryo-kawakami / wPGSA

5 stars 3 forks source link

use argparse to process command line arguments #2

Closed inutano closed 8 years ago

inutano commented 8 years ago

コマンドラインで実行するときに引数で渡すファイルの順序がばらばらでもいいようにキーワード引数にしました。(docker化するときに順序が変えられず困ったので)

$ python wPGSA --help

と実行すると引数のヘルプが見られるようになってます。

usage: wPGSA.py [-h] [--network-file network_file] [--logfc-file logFC_file]

Estimates relative activities of transcriptional regulators from given
transcriptome data.

optional arguments:
  -h, --help            show this help message and exit
  --network-file network_file
                        network file used as a reference, shared in /network
                        directory
  --logfc-file logFC_file
                        gene expression data file with the values in the Log2
                        fold-change, example in /sample_logFC_file

こんな感じです。 もしよければマージしてください!

(引数がなしで実行したときにもちゃんとメッセージ出すように実装しなければいけないけど後回しということで…)