We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4afb3bd commit 874e78fCopy full SHA for 874e78f
scripts/cnv_wdl/cnv_common_tasks.wdl
@@ -688,11 +688,13 @@ task ScatterPloidyCallsBySample {
688
689
# Archive call files by sample, renaming so they will be glob'd in order
690
sample_ids=(~{sep=" " samples})
691
+ num_samples=~{num_samples}
692
+ num_digits=${#num_samples}
693
for (( i=0; i<~{num_samples}; i++ ))
694
do
695
sample_id=${sample_ids[$i]}
- sample_no=`printf %04d $i`
- tar -czf sample_${sample_no}.${sample_id}.contig_ploidy_calls.tar.gz -C calls/SAMPLE_${i} .
696
+ padded_sample_index=$(printf "%0${num_digits}d" $i)
697
+ tar -czf sample_${padded_sample_index}.${sample_id}.contig_ploidy_calls.tar.gz -C calls/SAMPLE_${i} .
698
done
699
>>>
700
runtime {
0 commit comments