annotate ParseInput.py @ 0:928db0f952e3 draft

"planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
author perssond
date Fri, 12 Mar 2021 00:19:24 +0000
parents
children aba3655fdef0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
1 #Functions for parsing command line arguments for ome ilastik prep
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
2 import argparse
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
3
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
4
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
5 def ParseInputDataExtract():
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
6 """Function for parsing command line arguments for input to single-cell
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
7 data extraction"""
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
8
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
9 #if __name__ == '__main__':
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
10 parser = argparse.ArgumentParser()
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
11 parser.add_argument('--masks',nargs='*')
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
12 parser.add_argument('--image')
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
13 parser.add_argument('--channel_names')
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
14 parser.add_argument('--output')
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
15 #parser.add_argument('--suffix')
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
16 args = parser.parse_args()
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
17 #Create a dictionary object to pass to the next function
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
18 dict = {'masks': args.masks, 'image': args.image,\
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
19 'channel_names': args.channel_names,'output':args.output}
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
20 #Print the dictionary object
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
21 print(dict)
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
22 #Return the dictionary
928db0f952e3 "planemo upload for repository https://github.com/ohsu-comp-bio/quantification commit a4349062e9177b5e60fb7c49115c57299e0d648d-dirty"
perssond
parents:
diff changeset
23 return dict