Closed johanneskoester closed 5 years ago
Great work. Thanks. I'm not a native python speaker, and jump between 3 languages. Could you explain why the check "if args.tracks:" is not neccessary (line 29 of report.py), and also why its not neccessary to split the track string (split(',')) before looping through the elements?
I get an error if I don't supply sample-columns
Traceback (most recent call last):
File "/Users/jrobinso/igv-team Dropbox/James Robinson/projects/igv-reports/igv_reports/report.py", line 169, in
My fault, I forgot to handle missing args, and assumed that argparse returns an empty list if e.g. --tracks is not specified. But that happens only with nargs="*"
.
Regarding the question about the splitting:
argparse does that automatically for you, if you tell it that an argument has multiple values, via nargs="+"
. Values are provided space separated then, not comma separated, which also adheres with standard POSIX behavior.
OK, thanks for the explanation. This all looks good, but it will probably be next week before I can test it and merge. I'm covered up with some pressing issues on other projects at the moment. The readme will need updated to reflect the new parameter names and space vs comma delimited.
Sure. A suggestion: consider setting up a CI in this repo. Would make it easier to handle pull requests.
Yes I will do that eventually, I've done it for my javascript and java projects but not python.
Thanks!
This PR does 3 things:
--sample-columns DP PL
. Columns will be displayed assamplename:id
in the table.