remote/bin/ont-basecalling-model-info @ 69edbcc7ba7b
More
| author | Steve Losh <steve@stevelosh.com> |
|---|---|
| date | Tue, 25 Mar 2025 14:16:24 -0400 |
| parents | (none) |
| 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