File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -391,7 +391,18 @@ def create_h5ad_files(args):
391
391
new_data .var_names = [x for x in new_data .var ["Gene" ]]
392
392
393
393
# Add GTF to uns field
394
- new_data .uns ["GTF" ] = str (args .annotation_file )
394
+
395
+ # Original path from args.annotation_file
396
+ annotation_gtf = args .annotation_file # e.g., '/cromwell_root/gcp-public-data--broad-references/hg38/v0/star/v2_7_10a/modified_v43.annotation.gtf'
397
+
398
+ # Transform the path
399
+ if annotation_gtf .startswith ('/cromwell_root/' ):
400
+ stripped_path = annotation_gtf [len ('/cromwell_root/' ):] # Remove '/cromwell_root/'
401
+ updated_path = f'gs://{ stripped_path } ' # Add 'gs://' prefix
402
+ else :
403
+ updated_path = str (args .annotation_file )
404
+
405
+ new_data .uns ["reference_gtf_file" ] = updated_path
395
406
396
407
# Write h5ad file
397
408
new_data .write (args .output_h5ad_path + ".h5ad" )
You can’t perform that action at this time.
0 commit comments