Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
coverind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Salson Mikael
coverind
Commits
0348f123
Commit
0348f123
authored
5 years ago
by
Salson Mikael
Browse files
Options
Downloads
Patches
Plain Diff
MultiCover: Fix case when window is larger than chromosome
parent
81bfb8c1
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
multicover.hpp
+7
-1
7 additions, 1 deletion
multicover.hpp
with
7 additions
and
1 deletion
multicover.hpp
+
7
−
1
View file @
0348f123
...
...
@@ -178,7 +178,13 @@ template <class bv>
void
MultiCover
<
bv
>::
outputRangeBED
(
size_t
range_size
,
std
::
ostream
&
output
,
std
::
tuple
<
size_t
,
size_t
,
size_t
>
range
)
const
{
size_t
chr_index
=
std
::
get
<
0
>
(
range
);
for
(
size_t
i
=
std
::
get
<
1
>
(
range
);
i
<
std
::
get
<
2
>
(
range
)
-
range_size
+
1
;
i
+=
range_size
)
{
size_t
end
=
std
::
get
<
2
>
(
range
);
size_t
start
=
std
::
get
<
1
>
(
range
);
if
(
start
>
end
)
throw
std
::
invalid_argument
(
"start position should be before end position"
);
if
(
end
+
1
<
range_size
||
start
>
end
-
range_size
+
1
)
range_size
=
end
-
start
+
1
;
for
(
size_t
i
=
start
;
i
<=
end
-
range_size
+
1
;
i
+=
range_size
)
{
output
<<
target_names
[
chr_index
]
<<
"
\t
"
<<
i
<<
"
\t
"
<<
i
+
range_size
<<
"
\t
"
<<
covers
[
chr_index
]
->
count_reads_between
(
i
,
i
+
range_size
-
1
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment