Permalink
Browse files

fix 1 more time for RNA seq varall diversity

  • Loading branch information...
1 parent 417a8f1 commit e4131ee876bbde70ae164fd768ad177f10836723 earonesty committed Sep 17, 2014
Showing with 6 additions and 5 deletions.
  1. +6 −5 clipper/varcall.cpp
View
@@ -1054,6 +1054,9 @@ inline void PileupSummary::Parse(char *line, PileupReads &rds, tidx *adex, char
// position of read relative to my position
int pia = read_i->Pos >= 0 ? Pos-read_i->Pos : 0;
+
+ pia = pia % (meanreadlen*2);
+
if (pia >= depthbypos.size()) {
depthbypos.resize(pia+1);
depthbyposbycall.resize(pia+1);
@@ -1077,7 +1080,8 @@ inline void PileupSummary::Parse(char *line, PileupReads &rds, tidx *adex, char
is_ref = 1;
}
- if (o == '>' || o == '<') {
+ if (o == '>' || o == '<') {
+ /// splice! don't add to SEQ or depth, etc!
c = 'N'; // no call
is_ref = 1;
}
@@ -1177,7 +1181,7 @@ inline void PileupSummary::Parse(char *line, PileupReads &rds, tidx *adex, char
if (c == '-' || c == '+') {
warn("invalid pileup, at '%s', indel not attached to read?\n", cur_p);
} else {
- if (c != '*')
+ if (c != '*' && c != 'N')
read_i->Seq += c;
++cur_p;
}
@@ -1279,9 +1283,6 @@ inline void PileupSummary::Parse(char *line, PileupReads &rds, tidx *adex, char
}
}
- if (max_pia > meanreadlen*2)
- max_pia=meanreadlen*2;
-
// bool quit=0;
for (i=0;i < Calls.size();++i) { // total depth (exclude inserts for tot depth, otherwise they are double-counted)
if (Calls[i].depth()>0) {

0 comments on commit e4131ee

Please sign in to comment.