ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/tophat_cpp/common.cpp
(Generate patch)
# Line 101 | Line 101
101   int island_extension = 25;
102   int segment_length = 25;
103   int segment_mismatches = 2;
104 <
104 > int max_read_mismatches = 2;
105   int max_splice_mismatches = 1;
106  
107   ReadFormat reads_format = FASTQ;
108  
109   bool verbose = false;
110  
111 < int max_multihits = 40;
111 > unsigned int max_multihits = 40;
112   bool no_closure_search = false;
113   bool no_coverage_search = false;
114   bool no_microexon_search = false;
# Line 135 | Line 135
135  
136   string gtf_juncs = "";
137  
138 + string flt_reads = "";
139 + string flt_mappings = "";
140 +
141   eLIBRARY_TYPE library_type = LIBRARY_TYPE_NONE;
142  
143   extern void print_usage();
# Line 221 | Line 224
224   }
225  
226  
227 < const char *short_options = "QCp:z:";
227 > const char *short_options = "QCp:z:N:";
228  
229   enum
230    {
# Line 241 | Line 244
244      OPT_NO_COVERAGE_SEARCH,
245      OPT_NO_MICROEXON_SEARCH,
246      OPT_SEGMENT_LENGTH,
247 +    OPT_READ_MISMATCHES,
248      OPT_SEGMENT_MISMATCHES,
249      OPT_MIN_CLOSURE_EXON,
250      OPT_MAX_CLOSURE_INTRON,
# Line 268 | Line 272
272      OPT_ZPACKER,
273      OPT_SAMTOOLS,
274      OPT_AUX_OUT,
275 <    OPT_GTF_JUNCS
275 >    OPT_GTF_JUNCS,
276 >    OPT_FILTER_READS,
277 >    OPT_FILTER_HITS
278    };
279  
280   static struct option long_options[] = {
# Line 290 | Line 296
296   {"no-microexon-search", no_argument,            0,  OPT_NO_MICROEXON_SEARCH},
297   {"segment-length",      required_argument,      0,  OPT_SEGMENT_LENGTH},
298   {"segment-mismatches",  required_argument,      0,  OPT_SEGMENT_MISMATCHES},
299 + {"max-mismatches",  required_argument,  0,  OPT_READ_MISMATCHES},
300   {"min-closure-exon",    required_argument,      0,  OPT_MIN_CLOSURE_EXON},
301   {"min-closure-intron",  required_argument,      0,  OPT_MIN_CLOSURE_INTRON},
302   {"max-closure-intron",  required_argument,      0,  OPT_MAX_CLOSURE_INTRON},
# Line 316 | Line 323
323   {"samtools", required_argument, 0, OPT_SAMTOOLS},
324   {"aux-outfile", required_argument, 0, OPT_AUX_OUT},
325   {"gtf-juncs", required_argument, 0, OPT_GTF_JUNCS},
326 + {"flt-reads",required_argument, 0, OPT_FILTER_READS},
327 + {"flt-hits",required_argument, 0, OPT_FILTER_HITS},
328   {0, 0, 0, 0} // terminator
329   };
330  
# Line 391 | Line 400
400      case OPT_SEGMENT_MISMATCHES:
401        segment_mismatches = parseIntOpt(0, "--segment-mismatches arg must be at least 0", print_usage);
402        break;
403 +    case 'N':
404 +    case OPT_READ_MISMATCHES:
405 +      max_read_mismatches = parseIntOpt(0, "--max-mismatches arg must be at least 0", print_usage);
406 +      break;
407      case OPT_MIN_CLOSURE_EXON:
408        min_closure_exon_length = parseIntOpt(1, "--min-closure-exon arg must be at least 1", print_usage);
409        break;
# Line 490 | Line 503
503      case OPT_GTF_JUNCS:
504        gtf_juncs = optarg;
505        break;
506 +    case OPT_FILTER_READS:
507 +      flt_reads = optarg;
508 +      break;
509 +    case OPT_FILTER_HITS:
510 +      flt_mappings = optarg;
511 +      break;
512      default:
513        print_usage();
514        return 1;
# Line 653 | Line 672
672  
673   string getUnpackCmd(const string& fname, bool use_all_cpus) {
674   //prep_reads should use guess_packer() instead
675 +  //otherwise compressed files MUST have the .z extension,
676 +  //as they are all internally generated
677   string pipecmd("");
678   string fext=getFext(fname);
679   if (fext=="bam") {
# Line 660 | Line 681
681      return pipecmd;
682      }
683   if (zpacker.empty() || fext!="z") {
684 <      return pipecmd;
684 >      return pipecmd; //no packer used
685        }
686   pipecmd=zpacker;
687   if (str_endsWith(pipecmd, "pigz") ||str_endsWith(pipecmd, "pbzip2")) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines