You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bit/cli/cov_analyzer.py
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -6,17 +6,17 @@
6
6
defmain():
7
7
8
8
desc="""
9
-
This script identifies and pulls out regions of zero-coverage and relatively higher and lower coverage when
10
-
given a reference fasta and a bam file. It generates a bed file of the specified window-
11
-
and step-size, utilizes mosdepth to get the coverage of those windows, then generates stats
12
-
for those windows and pulls out regions with zero coverage and coverage above and below specified thresholds.
13
-
It outputs a table of coverage stats for all windows (if requested), a table of merged adjacent windows
14
-
("regions"), and identified regions in fasta format. By default it looks for coverage variations
15
-
from the global mean coverage, but you can tell it to use per-contig coverages by adding the
16
-
`--per-contig` flag. Additionally, it is recommended to exclude contigs holding mitochondrial
17
-
genomes or chloroplasts due to their generally very relative high coverage, unless you
18
-
specifically want to investigate them too (and if so, you should probably use `--per-contig` mode). For
19
-
version info, run `bit-version`.
9
+
This program analyzes coverage patterns given a reference fasta and a bam file as inputs.
10
+
11
+
It generates a bed file of the specified window- and step-size, utilizes mosdepth
12
+
to get the coverage of those windows, then generates stats for those windows and
13
+
pulls out regions with zero coverage and regions with coverage above and below specified thresholds.
14
+
Primary outputs include tables and fastas of all merged adjacent windows ("regions"). By default, it
15
+
looks for coverage variations from the global mean coverage, but you can tell it to use per-contig
16
+
coverages by adding the `--per-contig` flag. Additionally, it is recommended to exclude contigs
17
+
holding mitochondrial genomes or chloroplasts due to their relatively high coverage (if you
18
+
specifically want to investigate them too, you should probably use `--per-contig` mode).
19
+
For version info, run `bit-version`.
20
20
"""
21
21
22
22
parser=argparse.ArgumentParser(
@@ -95,7 +95,7 @@ def main():
95
95
"-w",
96
96
"--window-size",
97
97
metavar="<INT>",
98
-
help='Sliding window size (default: 100)',
98
+
help='Window size (default: 100)',
99
99
type=int,
100
100
default=100,
101
101
)
@@ -111,21 +111,21 @@ def main():
111
111
"-g",
112
112
"--allowed-gap",
113
113
metavar="<INT>",
114
-
help='Number of bases allowed between qualifying windows (those with coverages above/below the specified thresholds) to still merge them into one contiguous region (default: 1000)',
114
+
help='Number of bases allowed between qualifying windows to still merge them into one contiguous region (default: 1000)',
115
115
type=int,
116
116
default=1000,
117
117
)
118
118
optional.add_argument(
119
119
"-B",
120
120
"--buffer",
121
121
metavar="<INT>",
122
-
help='Add this length to each side of a high/low region of interest when pulled out as fasta (default: 100)',
122
+
help='Add this length to each side of a region of interest when pulled out as fasta (default: 100)',
123
123
type=int,
124
124
default=100,
125
125
)
126
126
optional.add_argument(
127
127
"--write-window-stats",
128
-
help='Add this flag to also write out individual window stats and histogram of coverages (saves spacetime by not doing so)',
128
+
help='Add this flag to also write out individual window stats and a histogram of coverages (saves spacetime by not doing so)',
0 commit comments