ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/gffread/gffread.cpp
(Generate patch)
# Line 9 | Line 9
9  
10   #define USAGE "Usage:\n\
11   gffread <input_gff> [-g <genomic_seqs_fasta> | <dir>][-s <seq_info.fsize>] \n\
12 < [-o <outfile.gff>] [-t <tname>] [-r [[<strand>]<chr>:]<start>..<end>] \n\
13 < [-CTVNJMKQAFGRUVBHZWTOLE] [-w <spl_exons.fa>] [-x <spl_cds.fa>] [-y <tr_cds.fa>]\n\
12 > [-o <outfile.gff>] [-t <tname>] [-r [[<strand>]<chr>:]<start>..<end> [-R]]\n\
13 > [-CTVNJMKQAFGUBHZWTOLE] [-w <exons.fa>] [-x <cds.fa>] [-y <tr_cds.fa>]\n\
14   [-i <maxintron>] \n\
15   Filters and/or converts GFF3/GTF2 records.\n\
16   <input_gff> is a GFF file, use '-' if the GFF records will be given at stdin\n\
# Line 24 | Line 24
24        <seq-name> <seq-length> <seq-description>\n\
25        (useful for -A option with mRNA/EST/protein mappings)\n\
26    -i  discard transcripts having an intron larger than <maxintron>\n\
27 <  -r  only show transcripts crossing coordinate range <start>..<end>\n\
27 >  -r  only show transcripts overlapping coordinate range <start>..<end>\n\
28        (on chromosome/contig <chr>, strand <strand> if provided)\n\
29    -R  for -r option, discard all transcripts that are not fully \n\
30 <      contained within given range\n\
30 >      contained within the given range\n\
31    -U  discard single-exon transcripts\n\
32    -C  coding only: discard mRNAs that have no CDS feature\n\
33    -F  full GFF attribute preservation (all attributes are shown)\n\
# Line 52 | Line 52
52   \n\
53    -M/--merge : cluster the input transcripts into loci, collapsing matching\n\
54         transcripts (those with the same exact introns and fully contained)\n\
55 +  -d <dupinfo> : for -M option, write collapsing info to file <dupinfo>\n\
56    --cluster-only: same as --merge but without collapsing matching transcripts\n\
57    -K  for -M option: also collapse shorter, fully contained transcripts\n\
58        with fewer introns than the container\n\
# Line 601 | Line 602
602    if (reftbl.Count()>0) {
603          GStr refname(gffrec->getRefName());
604          RefTran* rt=reftbl.Find(refname.chars());
605 <        if (rt==NULL && refname[-2]=='.' && isdigit(refname[-1])) {
606 <           //try removing the version
605 >        if (rt==NULL && refname.length()>2 && refname[-2]=='.' && isdigit(refname[-1])) {
606 >           //try removing the version suffix
607             refname.cut(-2);
608             //GMessage("[DEBUG] Trying ref name '%s'...\n", refname.chars());
609             rt=reftbl.Find(refname.chars());
# Line 638 | Line 639
639       if (rfltStart!=0 || rfltEnd!=MAX_UINT) {
640         if (rfltWithin) {
641           if (gffrec->start<rfltStart || gffrec->end>rfltEnd) {
642 <            return false;
642 >            return false; //not within query range
643              }
644           }
645         else {
# Line 712 | Line 713
713        exit(1);
714        }
715      }
715 //protmap=(args.getOpt('P')!=NULL);
716   if (fullCDSonly) validCDSonly=true;
717   if (verbose) {
718       fprintf(stderr, "Command line was:\n");
# Line 785 | Line 785
785        rfltEnd=(uint)gsend.asInt();
786        if (rfltEnd==0) rfltEnd=MAX_UINT;
787        }
788  
788     } //gseq/range filtering
789   else {
790     if (rfltWithin)
791 <     GError("Error: option -R doesn't make sense without -r!\n");
791 >     GError("Error: option -R requires -r!\n");
792 >   //if (rfltWholeTranscript)
793 >   //  GError("Error: option -P requires -r!\n");
794     }
795   s=args.getOpt('m');
796   if (!s.is_empty()) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines