bam.cov.tile | R Documentation |
Quick way to get tiled coverage via piping to samtools (e.g. ~10 CPU-hours for 100bp tiles, 5e8 read pairs)
Gets coverage for window size "window" [bp], pulling "chunksize" records at a time and incrementing bin corresponding to midpoint or overlaps of corresponding (proper pair) fragment (uses TLEN and POS for positive strand reads that are part of a proper pair)
bam.cov.tile( bam.file, window = 100, chunksize = 1e+05, min.mapq = 30, reference = NULL, verbose = TRUE, max.tlen = 10000, st.flag = "-f 0x02 -F 0x10", fragments = TRUE, do.gc = FALSE, midpoint = TRUE, bai = NULL )
bam.file |
string Input BAM file |
window |
integer Window size (in bp) (default = 1e2) |
chunksize |
integer Size of window (default = 1e5) |
min.mapq |
integer Minimim map quality reads to consider for counts (default = 30) |
reference |
path to reference FASTA recommended if CRAM file is provided [NULL] |
verbose |
boolean Flag to increase vebosity (default = TRUE) |
max.tlen |
integer Maximum paired-read insert size to consider (default = 1e4) |
st.flag |
string Samtools flag to filter reads on (default = '-f 0x02 -F 0x10') |
fragments |
boolean flag (default = FALSE) detremining whether to compute fragment (i.e. proper pair footprint aka insert) density or read density |
do.gc |
boolean Flag to execute garbage collection via 'gc()' (default = FALSE) |
midpoint |
boolean Flag if TRUE will only use the fragment midpoint, if FALSE will count all bins that overlap the fragment (default = TRUE) |
GRanges of "window" bp tiles across seqlengths of bam.file with meta data field $counts specifying fragment counts centered (default = TRUE) in the given bin.
Marcin Imielinski
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.