remote/bin/ont-basecalling-model-info @ 26c18ba81503
More
| author | Steve Losh <steve@stevelosh.com> | 
|---|---|
| date | Fri, 29 Aug 2025 14:55:16 -0400 | 
| parents | 69edbcc7ba7b | 
| children | (none) | 
#!/usr/bin/env bash set -euo pipefail bam_file="$1" module load Bioinformatics samtools >/dev/null 2>&1 # view all the SAM headers # only look at @RG # pull out the basecall_model=… field # coalesce samtools view -H "$bam_file" \ | grep -P '^@RG' \ | grep -P -o $'basecall_model=[^ \t]+' \ | sort | uniq -c samtools view -H "$bam_file" \ | grep -P '^@RG' \ | grep -P -o $'modbase_models=[^ \t]+' \ | sort | uniq -c