Skip to content

Commit

Permalink
left a trailing _
Browse files Browse the repository at this point in the history
  • Loading branch information
fraser-combe committed Oct 31, 2024
1 parent ae5cebe commit c8e48a1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tasks/basecalling/task_dorado_demux.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ task dorado_demux {
echo "Processing $fastq_file"

if [[ "$fastq_file" == *"unclassified"* ]]; then
final_fastq="~{fastq_file_name}unclassified.fastq"
final_fastq="~{fastq_file_name}-unclassified.fastq"
else
barcode=$(echo "$fastq_file" | sed -E 's/.*_(barcode[0-9]+)\.fastq/\1/')
final_fastq="~{fastq_file_name}${barcode}.fastq"
final_fastq="~{fastq_file_name}-${barcode}.fastq"
fi

echo "Renaming $fastq_file to $final_fastq"
Expand All @@ -70,20 +70,20 @@ task dorado_demux {
done

echo "### Zipping all FASTQ files ###"
for fastq in ~{fastq_file_name}_*.fastq; do
for fastq in ~{fastq_file_name}-*.fastq; do
echo "Zipping $fastq"
gzip -f "$fastq"
done

echo "### Final FASTQ Files ###"
ls -lh ~{fastq_file_name}_*.fastq.gz || echo "No gzipped FASTQ files found."
ls -lh ~{fastq_file_name}-*.fastq.gz || echo "No gzipped FASTQ files found."

echo "### Dorado demux process completed successfully ###"
date
>>>

output {
Array[File] fastq_files = glob("~{fastq_file_name}*.fastq.gz")
Array[File] fastq_files = glob("~{fastq_file_name}-*.fastq.gz")
}

runtime {
Expand All @@ -92,4 +92,4 @@ task dorado_demux {
memory: "~{memory} GB"
disks: "local-disk ~{disk_size} SSD"
}
}
}

0 comments on commit c8e48a1

Please sign in to comment.