Skip to content

Commit f0ddbef

Browse files
committed
Adding patch to include singularity images to build config file
1 parent e61e8cf commit f0ddbef

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

rna-seek

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,9 @@ def _configure(sub_args, filename, git_repo):
867867
"""
868868
# Save config to output directory
869869
print("\nGenerating config file in '{}'... ".format(filename), end = "")
870+
# Resolves if an image needs to be pulled from an OCI registry or
871+
# a local SIF generated from the rna-seek cache subcommand exists
872+
sif_config = image_cache(sub_args, {})
870873
# Creates config file /path/to/output/config/build.yml
871874
with open(filename, 'w') as fh:
872875
fh.write('GENOME: "{}"\n'.format(sub_args.ref_name))
@@ -880,6 +883,12 @@ def _configure(sub_args, filename, git_repo):
880883
read_lengths = ['50', '75', '100', '125', '150']
881884
for rl in read_lengths:
882885
fh.write(' - {}\n'.format(rl))
886+
# Add singularity images URIs or local SIFs
887+
# Converts a nested json file to yaml format
888+
for k in sif_config.keys():
889+
fh.write('{}: \n'.format(k))
890+
for tag, uri in sif_config[k].items():
891+
fh.write(' {}: "{}"\n'.format(tag, uri))
883892
print("Done!")
884893

885894

0 commit comments

Comments
 (0)