Align reads¶
bsbit align maps bisulfite sequencing reads to a reference genome and writes
an input-order BAM. It supports directional and non-directional libraries with
either single-end or paired-end data.
Inputs¶
Alignment requires a reference index and one or two FASTQ files. FASTQ may be plain, gzip-compressed, or BGZF-compressed. For paired-end data, the two files must contain matching read names in the same order and have the same number of records. See Input data for the complete input requirements.
Run alignment¶
For paired-end data, supply both read files:
bsbit align \
-x GRCh38.bsbit \
-1 sample_R1.fastq.gz \
-2 sample_R2.fastq.gz \
-o sample.bam \
-t 8
For single-end data, supply only read 1:
Common options¶
Advanced parameters¶
Paired-end data also accepts the following parameters:
Sensitive alignment
The default mode balances speed and alignment sensitivity. Add
--sensitive to search a broader set of candidate alignments. It works
with single-end and paired-end data but may take longer:
Non-directional libraries
Directional alignment is used by default. Add --non-directional for a
non-directional library; bsbit then makes one placement decision across all
four supported bisulfite directions:
Paired-end template span
Template span is the number of reference bases covered from the outer
start of one mate to the outer end of the other. The accepted range is
0–1000 bp by default, inclusive. Change --min-template-span or
--max-template-span only when the expected fragment sizes require
different bounds.
BAM output options
Use --output-contract bismark only when a downstream tool requires
Bismark-style optional tags. --mapped-only omits reads or read pairs
without an accepted placement; accepted MAPQ-0 placements remain in the
BAM.
Thread and batching controls
-t is sufficient for most runs. --total-threads automatically divides
a paired-end core budget between mapping and BAM output and cannot be used
with -t or --compression-threads. Batch and queue settings normally do
not need adjustment.
Performance metrics
--metrics writes runtime and workload diagnostics without changing the
BAM. These metrics describe performance, not alignment quality. Redirect
standard output to save them:
See the CLI reference for parameter limits, conflicts, and automatic thread allocation.
BAM output¶
By default, the BAM includes the tags required by bsbit call. It is published
only after alignment completes successfully.
Validate the BAM¶
The BAM follows FASTQ input order and is not coordinate-sorted. Validate it before continuing: