Skip to content

Commit

Permalink
updated h5ad with gs:// path for reference_gtf_file
Browse files Browse the repository at this point in the history
  • Loading branch information
ekiernan committed Jan 10, 2025
1 parent ab17c78 commit 13fbf2a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion pipelines/skylab/atac/atac.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,19 @@ task CreateFragmentFile {
# Add nhash_id to h5ad file as unstructured metadata
atac_data.uns['NHashID'] = atac_nhash_id
atac_data.uns['GTF'] = str(atac_gtf)
# Add GTF to uns field
# Original path from args.annotation_file
annotation_gtf = str(atac_gtf) # e.g., '/cromwell_root/gcp-public-data--broad-references/hg38/v0/star/v2_7_10a/modified_v43.annotation.gtf'
# Transform the path
if annotation_gtf.startswith('/cromwell_root/'):
stripped_path = annotation_gtf[len('/cromwell_root/'):] # Remove '/cromwell_root/'
updated_path = f'gs://{stripped_path}' # Add 'gs://' prefix
else:
updated_path = str(atac_gtf)
atac_data.uns["reference_gtf_file"] = updated_path
# calculate tsse metrics
snap.metrics.tsse(atac_data, atac_gtf)
# Write new atac file
Expand Down

0 comments on commit 13fbf2a

Please sign in to comment.