{"action":"created","issue":{"url":"https://api.github.com/repos/vatlab/SoS/issues/976","repository_url":"https://api.github.com/repos/vatlab/SoS","labels_url":"https://api.github.com/repos/vatlab/SoS/issues/976/labels{/name}","comments_url":"https://api.github.com/repos/vatlab/SoS/issues/976/comments","events_url":"https://api.github.com/repos/vatlab/SoS/issues/976/events","html_url":"https://github.com/vatlab/SoS/issues/976","id":325884722,"number":976,"title":"List parameters and their annotations in `global` section with `-h` option","user":{"login":"gaow","id":917985,"avatar_url":"https://avatars1.githubusercontent.com/u/917985?v=4","gravatar_id":"","url":"https://api.github.com/users/gaow","html_url":"https://github.com/gaow","followers_url":"https://api.github.com/users/gaow/followers","following_url":"https://api.github.com/users/gaow/following{/other_user}","gists_url":"https://api.github.com/users/gaow/gists{/gist_id}","starred_url":"https://api.github.com/users/gaow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaow/subscriptions","organizations_url":"https://api.github.com/users/gaow/orgs","repos_url":"https://api.github.com/users/gaow/repos","events_url":"https://api.github.com/users/gaow/events{/privacy}","received_events_url":"https://api.github.com/users/gaow/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-05-23T21:45:05Z","updated_at":"2018-05-29T15:56:25Z","closed_at":null,"author_association":"MEMBER","body":"So suppose I have this workflow:\r\n\r\n```\r\n$ sos run workflows/fastqtl_to_mash.ipynb -h -v3\r\n\r\n\r\nAvailable workflows\r\n  export\r\n  default\r\n  convert\r\n\r\nSections\r\n  convert_0:           Generate utility functions\r\n  convert_1:           Convert summary stats gzip format to HDF5\r\n  convert_2:           Merge single study data to multivariate data\r\n  default_3:           Extract data to fit MASH model\r\n  default_4:           Compute for MASH EZ model and save to RDS\r\n  export:              Export notebook to HTML file\r\n```\r\n\r\nit neatly lists all steps in the workflow. But under `[global]` I have something like this:\r\n\r\n```\r\nparameter: cwd = path('./gtex6_workflow_output')\r\nparameter: data_list = path(\"data/eQTL_summary_files.txt\")\r\nparameter: gene_list = path()\r\nparameter: msg = \"GTEx eQTL summary statistics\"\r\n# maximum number of groups per HDF5 file\r\nparameter: maxsize = 1000 \r\nparameter: cols = [8, 9, 7]\r\nparameter: keep_ensg_version = 0\r\n# number of null samples per gene to train MASH mixture\r\nparameter: null_per_gene = 9 \r\n# a list of effect names (SNP names) to exclude from mash analysis\r\nparameter: exclude_mash_effects_list = 'NULL' \r\n# a list of condition names (tissue names) to include in mash output. \r\n# Default includes all conditions.\r\nparameter: include_mash_condition_list = 'NULL' \r\n# size of MASH train set\r\nparameter: mash_train_size = 20000 \r\n```\r\n\r\nCorrect me if I am wrong, but I thought we can list parameters with `-v`? I do not think it works, though. It would be great if we can list parameters along with what they are, eg:\r\n\r\n```\r\n--exclude_mash_effects_list: a list of effect names (SNP names) to exclude from mash analysis\r\n```\r\n\r\nNot sure if `#` is the best identifier for parameter comments to show, but we can also do `##` or `#'` (`roxygen` convention). I'm just saying that showing parameter options could be useful when I make quick software-type of workflows for others to run without looking into the details."},"comment":{"url":"https://api.github.com/repos/vatlab/SoS/issues/comments/392830762","html_url":"https://github.com/vatlab/SoS/issues/976#issuecomment-392830762","issue_url":"https://api.github.com/repos/vatlab/SoS/issues/976","id":392830762,"user":{"login":"BoPeng","id":9889312,"avatar_url":"https://avatars1.githubusercontent.com/u/9889312?v=4","gravatar_id":"","url":"https://api.github.com/users/BoPeng","html_url":"https://github.com/BoPeng","followers_url":"https://api.github.com/users/BoPeng/followers","following_url":"https://api.github.com/users/BoPeng/following{/other_user}","gists_url":"https://api.github.com/users/BoPeng/gists{/gist_id}","starred_url":"https://api.github.com/users/BoPeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BoPeng/subscriptions","organizations_url":"https://api.github.com/users/BoPeng/orgs","repos_url":"https://api.github.com/users/BoPeng/repos","events_url":"https://api.github.com/users/BoPeng/events{/privacy}","received_events_url":"https://api.github.com/users/BoPeng/received_events","type":"User","site_admin":false},"created_at":"2018-05-29T15:56:25Z","updated_at":"2018-05-29T15:56:25Z","author_association":"CONTRIBUTOR","body":"Just noticed that comment after `parameter:` will be displayed in help message due to the way parameter value is saved during parsing stage.\r\n\r\n```\r\nparameter: a = 1    # for whatever purpose\r\n```\r\n\r\n"}}
{"actor":{"display_login":"BoPeng"}}