samtools-pl
Quick Start
- Command:
samtools.pl <command> [arguments] - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/samtools.pl - Reference: See references/help.md for detailed usage information
When To Use This Tool
- Run legacy helper subcommands bundled with SAMtools.
- Compute alignment lengths from CIGAR strings with
showALEN. - Filter legacy consensus pileup variant calls with
varFilter. - Convert legacy
pileup -coutput into FASTQ-like consensus sequence withpileup2fq.
Common Patterns
# 1) Append alignment length derived from the CIGAR string
samtools.pl \
showALEN \
alignments.sam
# 2) Filter SNPs and short indels from legacy cns-pileup output
samtools.pl \
varFilter \
calls.cns-pileup \
> calls.filtered.txt
# 3) Convert legacy pileup consensus output into FASTQ
samtools.pl \
pileup2fq \
calls.cns-pileup \
> consensus.fq
Recommended Workflow
- Start by choosing the subcommand, because
samtools.plis a small helper-script collection rather than a single analysis tool. - Confirm the input format matches the chosen subcommand, especially for the legacy
cns-pileup-based modes. - Run the helper and redirect the text output to a new file for inspection.
- Validate the output before using it in modern SAM/BAM/VCF workflows, since these helpers target older SAMtools pipelines.
Guardrails
- The first argument must be a subcommand such as
showALEN,varFilter, orpileup2fq;-h,--help, and--versionare not valid top-level actions. varFilterandpileup2fqoperate on legacycns-pileupoutput, not modern VCF or mpileup-by-default formats.showALENreads SAM-like alignment text and derives an alignment length from the CIGAR string.- This is a legacy helper script; check whether a modern native
samtoolsorbcftoolssubcommand would be more appropriate before building new pipelines around it.