-
Notifications
You must be signed in to change notification settings - Fork 3
Using covtobed
Andrea Telatin edited this page Jan 2, 2020
·
11 revisions
Usage: covtobed [options] [BAM]...
Computes coverage from alignments
Options:
-h, --help show this help message and exit
--version show program's version number and exit
--physical-coverage compute physical coverage (needs paired alignments in input)
-q MINQ, --min-mapq=MINQ
skip alignments whose mapping quality is less than MINQ
(default: 0)
-m MINCOV, --min-cov=MINCOV
print BED feature only if the coverage is bigger than
(or equal to) MINCOV (default: 0)
-x MAXCOV, --max-cov=MAXCOV
print BED feature only if the coverage is lower than
MAXCOV (default: 100000)
-l MINLEN, --min-len=MINLEN
print BED feature only if its length is bigger (or equal
to) than MINLELN (default: 1)
-v prints program version
--output-strands outputs coverage and stats separately for each strand
--format=CHOICE output format
Usage examples:
When the target enrichment is performed with highly-multiplexed PCRs (e.g. MIPs) one could be interested in checking if a region is only covered by forward or reverse reads. To allow this check, covtobed --output-strands
will print two separate coverage columns:
covtobed --output-strands test/mp.bam
The output will print the coverage from forward reads in the 4th column, and coverage from reverse reads in the 5th column. The following example shows a strand bias at the beginning and the end of a chromosome:
NC_001416.1 0 2 0 0
NC_001416.1 2 13 0 1
NC_001416.1 13 14 0 2
NC_001416.1 14 18 0 3
NC_001416.1 18 21 0 4
NC_001416.1 21 31 0 5
[...]
NC_001416.1 2767 2772 5 0
NC_001416.1 2772 2774 4 0
NC_001416.1 2774 2778 3 0
NC_001416.1 2778 2796 1 0
Covtobed - Wiki - a simple tool to extract BED coverage tracks from BAM files