ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/gffread/gff_utils.cpp
(Generate patch)
# Line 325 | Line 325
325    GMessage("\n");
326   }
327  
328 + void preserveCDS(GffObj* t, GffObj* tfrom) {
329 + //transfer CDS info to the container t if it doesn't have any
330 + if (t->CDstart>0 || tfrom->CDstart<=0) return;
331 + if (tfrom->CDstart>=t->start) t->CDstart=tfrom->CDstart;
332 +                          else t->CDstart=t->start;
333 + if (tfrom->CDend<=t->end) t->CDend=tfrom->CDend;
334 +                      else t->CDend=t->end;
335 +
336 + }
337 +
338   void placeGf(GffObj* t, GenomicSeqData* gdata, bool doCluster, bool collapseRedundant, bool matchAllIntrons, bool fuzzSpan) {
339    //GMessage(">>Placing transcript %s\n", t->getID());
340    GTData* tdata=new GTData(t);
# Line 386 | Line 396
396                        (container=redundantTranscripts(*t, *(loc.rnas[ti]), matchAllIntrons, fuzzSpan))!=NULL) {
397                       if (container==t) {
398                          odata->replaced_by=t;
399 +                        preserveCDS(t, loc.rnas[ti]);
400                          }
401                       else {
402                          tdata->replaced_by=loc.rnas[ti];
403 +                        preserveCDS(loc.rnas[ti], t);
404                          }
405                       }
406                }//for each transcript in the exon-overlapping locus

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines