ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/gffread/gff_utils.cpp
(Generate patch)
# Line 460 | Line 460
460            }
461         }
462       int i=locidx;  
463 <     while (i>0 && loc.start<gdata->loci[i-1]->start) {
463 >     while (i>0 && loc<*(gdata->loci[i-1])) {
464         //bubble down until it's in the proper order
465         i--;
466         gdata->loci.Swap(i,i+1);
# Line 525 | Line 525
525  
526  
527   void GffLoader::load(GList<GenomicSeqData>& seqdata, GFValidateFunc* gf_validate,
528 <                              bool doCluster, bool doCollapseRedundant, bool matchAllIntrons, bool fuzzSpan) {
528 >                          bool doCluster, bool doCollapseRedundant,
529 >                          bool matchAllIntrons, bool fuzzSpan, bool forceExons) {
530     GffReader* gffr=new GffReader(f, this->transcriptsOnly, false); //not only mRNA features, not sorted
531     gffr->showWarnings(this->showWarnings);
532     //           keepAttrs   mergeCloseExons  noExonAttr
# Line 538 | Line 539
539       GffObj* m=gffr->gflst[k];
540       if (strcmp(m->getFeatureName(), "locus")==0 &&
541            m->getAttr("transcripts")!=NULL) {
542 <        continue;
542 >        continue; //discard locus meta-features
543          }
544      
545       char* rloc=m->getAttr("locus");
# Line 550 | Line 551
551         //add a dummy exon just to have the generic exon checking work
552         m->addExon(m->start,m->end);
553         }
554 +     if (forceExons && m->children.Count()==0) {
555 +       m->exon_ftype_id=gff_fid_exon;
556 +       }
557       GList<GffObj> gfadd(false,false);
558       if (gf_validate!=NULL && !(*gf_validate)(m, &gfadd)) {
559         continue;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines