@@ -103,7 +103,9 @@ def download_and_patch_files(
103103
104104 # Save final data file
105105 final_data_path = os .path .join (out_dir , out_data_filename )
106- shutil .copyfile (downloaded_data_path , final_data_path )
106+ # Avoid SameFileError if source and destination are the same
107+ if os .path .abspath (downloaded_data_path ) != os .path .abspath (final_data_path ):
108+ shutil .copyfile (downloaded_data_path , final_data_path )
107109
108110 # Save final metadata file
109111 final_meta_path = os .path .join (out_dir , out_meta_filename )
@@ -122,16 +124,33 @@ def main():
122124 parser .add_argument ("--dataset" , required = True , help = "Dataset name" )
123125
124126 # Pair 1: generic assay
125- parser .add_argument ("--generic-assay-data-synid" , required = True )
126- parser .add_argument ("--generic-assay-metadata-synid" , required = True )
127+ parser .add_argument (
128+ "--generic-assay-data-synid" ,
129+ required = True ,
130+ help = "Synapse id of the generic assay data" ,
131+ )
132+ parser .add_argument (
133+ "--generic-assay-metadata-synid" ,
134+ required = True ,
135+ help = "Path to datahub-study-curation-tools repo" ,
136+ )
127137
128138 # Pair 2: expression
129- parser .add_argument ("--expression-data-synid" , required = True )
130- parser .add_argument ("--expression-metadata-synid" , required = True )
139+ parser .add_argument (
140+ "--expression-data-synid" ,
141+ required = True ,
142+ help = "Synapse id of the expression data" ,
143+ )
144+ parser .add_argument (
145+ "--expression-metadata-synid" ,
146+ required = True ,
147+ help = "Synapse id of the expression metadata file" ,
148+ )
131149
132150 parser .add_argument (
133151 "--datahub_tools_path" ,
134152 type = str ,
153+ required = True ,
135154 help = "Path to datahub-study-curation-tools repo" ,
136155 )
137156
0 commit comments