Skip to content

Commit

Permalink
v1.1.2 - small bug fix for the case when a gene overlapped by one bp …
Browse files Browse the repository at this point in the history
…the bundle of reads
  • Loading branch information
gpertea committed Nov 9, 2015
1 parent 3da84ae commit 73610b9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ properly sorted. For a SAM file, this can be done with the command:

sort -k 3,3 -k 4,4n input.sam > input.sorted.sam

For BAM files, the samtools program can be used to sort the alignments.
For BAM files, the samtools program should be used to sort the alignments.

Optionally, a reference annotation file in GTF/GFF3 format
can be provided to StringTie. In this case, StringTie will check
Expand Down
8 changes: 6 additions & 2 deletions rlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8681,8 +8681,10 @@ int build_graphs(BundleData* bdata, bool fast) {
edgeno[s].cAdd(0);
lastgpos[s].cAdd(0);
// I am overestmating the edgeno below, hopefully not by too much
while(g<ng && guides[g]->end<=bnode[sno][bundle[sno][b]->startnode]->start) g++;

while(g<ng && guides[g]->end<bnode[sno][bundle[sno][b]->startnode]->start) g++;
int cg=g;

while(cg<ng && guides[cg]->start<=bnode[sno][bundle[sno][b]->lastnodeid]->end) { // this are potential guides that might overlap the current bundle, and they might introduce extra edges
if(guides[cg]->strand==strnd) edgeno[s][b]+=2; // this is an overestimate: possibly I have both an extra source and an extra sink link
cg++;
Expand Down Expand Up @@ -8715,6 +8717,7 @@ int build_graphs(BundleData* bdata, bool fast) {
*
*/
// create graph then

graphno[s][b]=create_graph(refstart,s,b,bundle[sno][b],bnode[sno],junction,ejunction,
bundle2graph,no2gnode,transfrag,gpos,bpcov,edgeno[s][b],lastgpos[s][b]); // also I need to remember graph coverages somewhere -> probably in the create_graph procedure

Expand All @@ -8735,7 +8738,7 @@ int build_graphs(BundleData* bdata, bool fast) {
for(int b=0;b<bno[s];b++) {
if(graphno[s][b]) {
GStr pat;
fprintf(stderr,"Graph[%d][%d] with %d nodes and %d edges:",int(2*s),b,graphno[s][b],edgeno[s][b]);
fprintf(stderr,"Graph[%d][%d] with %d nodes and %d edges with lastgpos=%d:",int(2*s),b,graphno[s][b],edgeno[s][b],lastgpos[s][b]);
for(int nd=1;nd<graphno[s][b]-1;nd++)
fprintf(stderr," %d(%d-%d)",nd,no2gnode[s][b][nd]->start,no2gnode[s][b][nd]->end);
fprintf(stderr,"\n");
Expand Down Expand Up @@ -8808,6 +8811,7 @@ int build_graphs(BundleData* bdata, bool fast) {

// include source to guide starts links
GVec<CGuide> guidetrf;

if(guides.Count()) process_refguides(graphno[s][b],edgeno[s][b],gpos[s][b],lastgpos[s][b],no2gnode[s][b],transfrag[s][b],s,guides,guidetrf);

//process transfrags to eliminate noise, and set compatibilities, and node memberships
Expand Down
5 changes: 3 additions & 2 deletions stringtie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "proc_mem.h"
#endif

#define VERSION "1.1.1"
#define VERSION "1.1.2"

//uncomment this to show DBGPRINT messages (for threads)
//#define DEBUGPRINT 1
Expand All @@ -33,7 +33,7 @@
stringtie <input.bam> [-G <guide_gff>] [-l <label>] [-o <out_gtf>] [-p <cpus>]\n\
[-v] [-a <min_anchor_len>] [-m <min_tlen>] [-j <min_anchor_cov>] \n\
[-C <coverage_file_name>] [-c <min_bundle_cov>] [-g <bdist>]\n\
[-e] [-x <seqid,..>] [-A <gene_abund.out>] {-B | -b <dir_path>} \n\
[-e] [-x <seqid,..>] [-A <gene_abund.out>] [-h] {-B | -b <dir_path>} \n\
Assemble RNA-Seq alignments into potential transcripts.\n\
Options:\n\
--version : print just the version at stdout and exit\n\
Expand All @@ -59,6 +59,7 @@
created under the directory path given as <dir_path>\n\
-e only estimates the abundance of given reference transcripts (requires -G)\n\
-x do not assemble any transcripts on the given reference sequence(s)\n\
-h prints help message and exits.\n\
"
/*
-n sensitivity level: 0,1, or 2, 3, with 3 the most sensitive level (default 0)\n\ \\ deprecated for now
Expand Down

0 comments on commit 73610b9

Please sign in to comment.