-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c94f59d
commit e3df8f6
Showing
2 changed files
with
13 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,16 @@ task basecall { | |
dorado --version > DORADO_VERSION 2>&1 | ||
echo "Captured Dorado version:" $(cat DORADO_VERSION) | ||
|
||
# Define the model to use, substituting "sup" with the full model name if given | ||
resolved_model="~{dorado_model}" | ||
if [ "$resolved_model" = "sup" ]; then | ||
resolved_model="[email protected]" | ||
fi | ||
|
||
# Log the resolved model name | ||
echo "Using Dorado model: $resolved_model" | ||
echo "$resolved_model" > "DORADO_MODEL" | ||
|
||
# Define a log file path to capture output | ||
log_file="dorado_basecall.log" | ||
|
||
|
@@ -47,13 +57,6 @@ task basecall { | |
generated_sam=$(find "$sam_output" -name "*.sam" | head -n 1) | ||
mv "$generated_sam" "$sam_file" | ||
|
||
# Extract the detailed model name from the log file or set a default if extraction fails | ||
model_name=$(grep -oP '(?<=downloading )[^ ]+' "$log_file" | head -n 1 || echo "unknown_model") | ||
|
||
# Write the model name to DORADO_MODEL, or default to "unknown_model" | ||
echo "Extracted Dorado model name: $model_name" | tee -a "$log_file" | ||
echo "$model_name" > "DORADO_MODEL" | ||
|
||
echo "Basecalling completed for ~{input_file}. SAM file renamed to: $sam_file" | tee -a "$log_file" | ||
>>> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters