@@ -53,14 +53,14 @@ def get_files_info(file_to_upload, args):
5353 fname = os .path .basename (file_to_upload ).split ("." )
5454 input_wf = fname [5 ]
5555 variant_type = fname [7 ]
56- process_name = args .process_name if args . process_name else args . wf_short_name
56+ process_name = args .wf_short_name
5757 new_fname = "." .join (fname [0 :8 ]+ [process_name , 'vcf.gz' ]+ (['tbi' ] if file_to_upload .endswith ('.tbi' ) else []))
5858 file_info = {
5959 'fileName' : new_fname ,
6060 'fileType' : 'VCF' if new_fname .endswith ('.vcf.gz' ) else new_fname .split ("." )[- 1 ].upper (),
6161 'fileSize' : calculate_size (file_to_upload ),
6262 'fileMd5sum' : calculate_md5 (file_to_upload ),
63- 'fileAccess' : 'open' if not args .controlled else 'controlled' ,
63+ 'fileAccess' : 'open' if args .open else 'controlled' ,
6464 'info' : {
6565 'data_category' : variant_type_to_data_type_etc [variant_type ][0 ]
6666 }
@@ -85,7 +85,6 @@ def get_files_info(file_to_upload, args):
8585 pass
8686
8787 dst = os .path .join (os .getcwd (), new_dir , new_fname )
88- print (dst )
8988 os .symlink (os .path .abspath (file_to_upload ), dst )
9089
9190 return file_info
@@ -114,20 +113,18 @@ def main():
114113 parser .add_argument ("-v" , dest = "wf_version" , type = str , required = True , help = "workflow version" )
115114 parser .add_argument ("-r" , dest = "wf_run" , type = str , required = True , help = "workflow run ID" )
116115 parser .add_argument ("-j" , dest = "wf_session" , type = str , required = True , help = "workflow session ID" )
117- parser .add_argument ("-c" , dest = "controlled" , action = 'store_true' , help = "set file to be controlled access" )
118- parser .add_argument ("-p" , dest = "process_name" , type = str , help = "variant process name" )
119- parser .add_argument ("-t" , dest = "analysis_type" , type = str , default = "variant_processing" , help = "specify output song analysis type" )
116+ parser .add_argument ("-o" , dest = "open" , action = 'store_true' , help = "set file to be open access" )
120117 args = parser .parse_args ()
121118
122119 analysis = {}
123120 with open (args .analysis , 'r' ) as f :
124121 analysis = json .load (f )
125122
126123 input_analysis_type = analysis .get ('analysisType' ).get ('name' )
127-
124+ analysis_type = "variant_processing"
128125 payload = {
129126 'analysisType' : {
130- 'name' : args . analysis_type
127+ 'name' : analysis_type
131128 },
132129 'studyId' : analysis .get ('studyId' ),
133130 'experiment' : analysis .get ('experiment' ),
@@ -154,7 +151,7 @@ def main():
154151 file_info = get_files_info (f , args )
155152 payload ['files' ].append (file_info )
156153
157- with open ("%s.%s.payload.json" % (str (uuid .uuid4 ()), args . analysis_type ), 'w' ) as f :
154+ with open ("%s.%s.payload.json" % (str (uuid .uuid4 ()), analysis_type ), 'w' ) as f :
158155 f .write (json .dumps (payload , indent = 2 ))
159156
160157
0 commit comments