Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
metaSNV
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Paul Igor Costea
metaSNV
Commits
f4b4a665
Commit
f4b4a665
authored
Feb 12, 2018
by
Paul Igor Costea
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refine the coverage counting to account for hard and soft clipping.
parent
646ddda7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
7 deletions
+26
-7
src/qaTools/qaCompute.cpp
src/qaTools/qaCompute.cpp
+26
-7
No files found.
src/qaTools/qaCompute.cpp
View file @
f4b4a665
...
...
@@ -526,13 +526,32 @@ int main(int argc, char *argv[])
++
duplicates
;
}
else
{
if
(
!
userOpt
.
spanCov
)
{
//All entries in SAM file are represented on the forward strand! (See specs of SAM format for details)
++
entireChr
[
core
->
pos
];
++
usedReads
;
if
((
uint32_t
)(
core
->
pos
+
core
->
l_qseq
)
>=
chrSize
)
--
entireChr
[
chrSize
-
1
];
else
--
entireChr
[
core
->
pos
+
core
->
l_qseq
];
//All entries in SAM file are represented on the forward strand! (See specs of SAM format for details)
uint32_t
*
cigar
=
bam1_cigar
(
b
);
uint32_t
pp
=
core
->
pos
+
1
;
int
i
=
0
;
if
(((
*
cigar
)
&
BAM_CIGAR_MASK
)
==
BAM_CSOFT_CLIP
||
((
*
cigar
)
&
BAM_CIGAR_MASK
)
==
BAM_CHARD_CLIP
)
{
//BWA is actively fucking with me.
//The start of the alignment is reported without this clip.
++
cigar
;
++
i
;
}
while
(
i
<
core
->
n_cigar
)
{
++
i
;
if
(((
*
cigar
)
&
BAM_CIGAR_MASK
)
!=
BAM_CMATCH
)
{
pp
=
pp
+
((
*
cigar
)
>>
BAM_CIGAR_SHIFT
);
}
else
{
++
entireChr
[
pp
];
pp
=
pp
+
((
*
cigar
)
>>
BAM_CIGAR_SHIFT
);
--
entireChr
[
pp
];
}
++
cigar
;
}
//++entireChr[core->pos];
++
usedReads
;
//if ((uint32_t)(core->pos+core->l_qseq) >= chrSize)
// --entireChr[chrSize-1];
//else
// --entireChr[core->pos+core->l_qseq];
}
else
{
//Computing span coverage.
//Only consider first read in pair! and extend a bit to the end of the insert
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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