From 96ddb5c0bc43cd1a2c5e6effcceeaf44337eaf14 Mon Sep 17 00:00:00 2001 From: m-jahn Date: Thu, 6 Nov 2025 13:35:16 +0100 Subject: [PATCH 1/2] fix: enable usage of point features as long as they are within transcript margin --- stringtie.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/stringtie.cpp b/stringtie.cpp index d30b20f..1ee3808 100644 --- a/stringtie.cpp +++ b/stringtie.cpp @@ -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 cds; @@ -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_idxCount() && (int)(refptfs->Get(ptf_idx)->coord)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++; } } From 24662b0a2e59f6662fb8ce62a2e9362fd3d80205 Mon Sep 17 00:00:00 2001 From: m-jahn Date: Thu, 6 Nov 2025 13:35:55 +0100 Subject: [PATCH 2/2] fix: added gitignore for typical temp files --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1c88eaf --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +tests/* +**/*.o +htslib/* +gclib/* +stringtie \ No newline at end of file