Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tests/*
**/*.o
htslib/*
gclib/*
stringtie
20 changes: 15 additions & 5 deletions stringtie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ uint bundledist=50; // reads at what distance should be considered part of sepa
uint runoffdist=200;
float mcov=1; // fraction of bundle allowed to be covered by multi-hit reads paper uses 1
int allowed_nodes=1000;
int ptf_margin = 5; // define the tolerance for supplied PTFs to be used for transcript boundary refinement
//bool adaptive=true; // adaptive read coverage -> depends on the overall gene coverage
//GPVec<CDSparam> cds;

Expand Down Expand Up @@ -609,11 +610,20 @@ if (ballgown)
if (bundle->readlist.Count()>0) { // process reads in previous bundle
// (readthr, junctionthr, mintranscriptlen are globals)
if (refptfs) { //point-features defined for this reference
while (ptf_idx<refptfs->Count() && (int)(refptfs->Get(ptf_idx)->coord)<currentstart)
ptf_idx++;
//TODO: what if a PtFeature is nearby, just outside the bundle?
while (ptf_idx<refptfs->Count() && (int)(refptfs->Get(ptf_idx)->coord)<=currentend) {
bundle->ptfs.Add(refptfs->Get(ptf_idx)); //keep this PtFeature
while (ptf_idx < refptfs->Count()) {
int coord = (int)(refptfs->Get(ptf_idx)->coord);
if (coord < currentstart - ptf_margin) {
if (verbose) {
GMessage("## Skipping PtFeature at %d not in bundle %d-%d\n", coord, currentstart, currentend);
}
} else if (coord <= currentend + ptf_margin) {
bundle->ptfs.Add(refptfs->Get(ptf_idx)); //keep this PtFeature
if (verbose) {
GMessage("## Adding PtFeature at %d to bundle %d-%d\n", coord, currentstart, currentend);
}
} else {
break; // exit the loop if coord is not between currentstart and end (+ margins)
}
ptf_idx++;
}
}
Expand Down