cljam.algo.pileup
Functions to calculate pileup from the BAM.
->locus-pile
(->locus-pile chr [pos pile])
Converts a pile into `cljam.io.pileup.LocusPile`.
align-pileup-seqs
(align-pileup-seqs & xs)
Align multiple piled-up seqs.
basic-mpileup-pred
(basic-mpileup-pred min-mapq)
Basic predicate function for filtering alignments for mpileup.
create-mpileup
(create-mpileup in-sam out-mplp)
(create-mpileup in-sam in-ref out-mplp)
(create-mpileup in-sam in-ref out-mplp region)
(create-mpileup in-sam in-ref out-mplp region options)
Creates a mpileup file from the BAM file.
The following `options` are available:
- `min-base-quality` Minimum quality of called bases [13]
- `min-map-quality` Minimum quality of alignments [0]
- `ignore-overlaps?` Disable detecting overlapped bases of PE reads [false]
filter-by-base-quality
(filter-by-base-quality min-base-quality)
Returns a predicate for filtering piled-up reads by base quality at its
position.
index-cigar
(index-cigar aln)
Align bases and base quality scores with the reference coordinate.
mpileup
(mpileup region options & sam-readers)
Pile up alignments from multiple sources.
The following `options` are available:
- `min-base-quality` Minimum quality of called bases [13]
- `min-map-quality` Minimum quality of alignments [0]
- `ignore-overlaps?` Disable detecting overlapped bases of PE reads [false]
pileup
(pileup sam-reader region)
(pileup sam-reader {:keys [chr start end], :or {start 1, end Integer/MAX_VALUE}} {:keys [min-base-quality min-map-quality ignore-overlaps? chunk-size], :or {min-base-quality 13, min-map-quality 0, ignore-overlaps? false, chunk-size 5000}})
Piles up alignments in given region and returns a lazy sequence of
`cljam.io.pileup.LocusPile`s.
The following options are available:
- `min-base-quality` Minimum quality of called bases [13]
- `min-map-quality` Minimum quality of alignments [0]
- `ignore-overlaps?` Disable detecting overlapped bases of PE reads [false]
- `chunk-size` Size of a chunk to pile up at once [5000]
pileup-seq
(pileup-seq start end alns)
Returns a lazy sequence that each element contains [position (alignments
piled-up at the locus)].
resolve-base
(resolve-base ref-pos aln)
Find a piled-up base and an indel from an alignment.