Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
R3
legacy
bedtools2
Commits
33d4cc21
Commit
33d4cc21
authored
Feb 21, 2015
by
jayhesselberth
Browse files
fix param parsing; add 1 to win number
parent
6eada05c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/windowMaker/windowMaker.cpp
View file @
33d4cc21
...
...
@@ -115,14 +115,14 @@ string WindowMaker::GenerateID(const BED& interval, uint32_t window_index, uint3
break
;
case
ID_WINDOW_NUMBER
:
if
(
_reverse
==
true
)
{
s
<<
"
\t
"
<<
num_windows
-
window_index
;
s
<<
"
\t
"
<<
num_windows
-
window_index
+
1
;
}
else
{
s
<<
"
\t
"
<<
window_index
;
}
break
;
case
ID_SOURCE_ID_WINDOW_NUMBER
:
if
(
_reverse
==
true
)
{
s
<<
"
\t
"
<<
interval
.
name
<<
"_"
<<
num_windows
-
window_index
;
s
<<
"
\t
"
<<
interval
.
name
<<
"_"
<<
num_windows
-
window_index
+
1
;
}
else
{
s
<<
"
\t
"
<<
interval
.
name
<<
"_"
<<
window_index
;
}
...
...
src/windowMaker/windowMakerMain.cpp
View file @
33d4cc21
...
...
@@ -98,10 +98,8 @@ int windowmaker_main(int argc, char* argv[]) {
i
++
;
}
}
else
if
(
PARAMETER_CHECK
(
"-reverse"
,
1
,
parameterLength
))
{
if
((
i
+
1
)
<
argc
)
{
reverse
=
true
;
}
else
if
(
PARAMETER_CHECK
(
"-reverse"
,
8
,
parameterLength
))
{
reverse
=
true
;
}
else
if
(
PARAMETER_CHECK
(
"-i"
,
2
,
parameterLength
))
{
if
((
i
+
1
)
<
argc
)
{
...
...
@@ -197,6 +195,10 @@ void windowmaker_help(void) {
cerr
<<
"
\t\t
to fixed number of windows (i.e. same number of windows, with"
<<
endl
;
cerr
<<
"
\t\t
varying window sizes)."
<<
endl
<<
endl
;
cerr
<<
"
\t
-reverse"
<<
endl
;
cerr
<<
"
\t\t
Reverse numbering of windows in the output, i.e. report "
<<
endl
;
cerr
<<
"
\t\t
windows in decreasing order"
<<
endl
<<
endl
;
cerr
<<
"ID Naming Options: "
<<
endl
;
cerr
<<
"
\t
-i src|winnum|srcwinnum"
<<
endl
;
cerr
<<
"
\t\t
The default output is 3 columns: chrom, start, end ."
<<
endl
;
...
...
@@ -206,10 +208,6 @@ void windowmaker_help(void) {
cerr
<<
"
\t\t
\"
-i srcwinnum
\"
- use the source interval's name with the window number."
<<
endl
;
cerr
<<
"
\t\t
See below for usage examples."
<<
endl
<<
endl
;
cerr
<<
"
\t
-reverse"
<<
endl
;
cerr
<<
"
\t\t
Reverse numbering of windows in the output, i.e. report "
<<
endl
;
cerr
<<
"
\t\t
windows in decreasing order"
<<
endl
<<
endl
;
cerr
<<
"Notes: "
<<
endl
;
cerr
<<
"
\t
(1) The genome file should tab delimited and structured as follows:"
<<
endl
;
cerr
<<
"
\t
<chromName><TAB><chromSize>"
<<
endl
<<
endl
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment