ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/tophat_cpp/common.cpp
(Generate patch)
# Line 77 | Line 77
77  
78   bool bowtie2 = true;
79   int bowtie2_min_score = -10;
80 < int max_segment_mapping = 20;
80 > int bowtie2_max_penalty = 6;
81 > int bowtie2_min_penalty = 2;
82 > int bowtie2_penalty_for_N = 1;
83 > int bowtie2_read_gap_open = 5;
84 > int bowtie2_read_gap_cont = 3;
85 > int bowtie2_ref_gap_open = 5;
86 > int bowtie2_ref_gap_cont = 3;
87  
88   // daehwan - temporary
89   bool parallel = true;
# Line 115 | Line 121
121  
122   bool verbose = false;
123  
124 < unsigned int max_multihits = 40;
124 > unsigned int max_multihits = 20;
125 > unsigned int max_seg_multihits = 40;
126   bool no_closure_search = false;
127   bool no_coverage_search = false;
128   bool no_microexon_search = false;
# Line 140 | Line 147
147   bool quals = false;
148   bool integer_quals = false;
149   bool color = false;
143 bool color_out = false;
144
150   string gtf_juncs = "";
151  
152 + bool report_secondary_alignments = false;
153 +
154   string flt_reads = "";
155   string flt_mappings = "";
156  
# Line 255 | Line 262
262      OPT_GENE_FILTER,
263      OPT_GFF_ANNOTATIONS,
264      OPT_MAX_MULTIHITS,
265 +    OPT_MAX_SEG_MULTIHITS,
266      OPT_NO_CLOSURE_SEARCH,
267      OPT_NO_COVERAGE_SEARCH,
268      OPT_NO_MICROEXON_SEARCH,
# Line 279 | Line 287
287      OPT_QUALS,
288      OPT_INTEGER_QUALS,
289      OPT_COLOR,
282    OPT_COLOR_OUT,
290      OPT_LIBRARY_TYPE,
291      OPT_MAX_DELETION_LENGTH,
292      OPT_MAX_INSERTION_LENGTH,
# Line 291 | Line 298
298      OPT_GTF_JUNCS,
299      OPT_FILTER_READS,
300      OPT_FILTER_HITS,
301 +    OPT_REPORT_SECONDARY_ALIGNMENTS,
302      OPT_FUSION_SEARCH,
303      OPT_FUSION_ANCHOR_LENGTH,
304      OPT_FUSION_MIN_DIST,
# Line 299 | Line 307
307      OPT_FUSION_MULTIPAIRS,
308      OPT_BOWTIE1,
309      OPT_BOWTIE2_MIN_SCORE,
310 +    OPT_BOWTIE2_MAX_PENALTY,
311 +    OPT_BOWTIE2_MIN_PENALTY,
312 +    OPT_BOWTIE2_PENALTY_FOR_N,
313 +    OPT_BOWTIE2_READ_GAP_OPEN,
314 +    OPT_BOWTIE2_READ_GAP_CONT,
315 +    OPT_BOWTIE2_REF_GAP_OPEN,
316 +    OPT_BOWTIE2_REF_GAP_CONT,
317    };
318  
319   static struct option long_options[] = {
# Line 315 | Line 330
330   {"gene-filter",         required_argument,      0,      OPT_GENE_FILTER},
331   {"gtf-annotations",     required_argument,      0,      OPT_GFF_ANNOTATIONS},
332   {"max-multihits",       required_argument,      0,  OPT_MAX_MULTIHITS},
333 + {"max-seg-multihits",   required_argument,      0,  OPT_MAX_SEG_MULTIHITS},
334   {"no-closure-search",   no_argument,            0,  OPT_NO_CLOSURE_SEARCH},
335   {"no-coverage-search",  no_argument,            0,  OPT_NO_COVERAGE_SEARCH},
336   {"no-microexon-search", no_argument,            0,  OPT_NO_MICROEXON_SEARCH},
# Line 338 | Line 354
354   {"quals",               no_argument,            0,      OPT_QUALS},
355   {"integer-quals",       no_argument,            0,      OPT_INTEGER_QUALS},
356   {"color",               no_argument,            0,      OPT_COLOR},
341 {"color-out",           no_argument,            0,      OPT_COLOR_OUT},
357   {"library-type",        required_argument,      0,      OPT_LIBRARY_TYPE},
358   {"max-deletion-length", required_argument, 0, OPT_MAX_DELETION_LENGTH},
359   {"max-insertion-length", required_argument, 0, OPT_MAX_INSERTION_LENGTH},
# Line 350 | Line 365
365   {"gtf-juncs", required_argument, 0, OPT_GTF_JUNCS},
366   {"flt-reads",required_argument, 0, OPT_FILTER_READS},
367   {"flt-hits",required_argument, 0, OPT_FILTER_HITS},
368 + {"report-secondary-alignments", no_argument, 0, OPT_REPORT_SECONDARY_ALIGNMENTS},
369   {"fusion-search", no_argument, 0, OPT_FUSION_SEARCH},
370   {"fusion-anchor-length", required_argument, 0, OPT_FUSION_ANCHOR_LENGTH},
371   {"fusion-min-dist", required_argument, 0, OPT_FUSION_MIN_DIST},
# Line 358 | Line 374
374   {"fusion-multipairs", required_argument, 0, OPT_FUSION_MULTIPAIRS},
375   {"bowtie1", no_argument, 0, OPT_BOWTIE1},
376   {"bowtie2-min-score", required_argument, 0, OPT_BOWTIE2_MIN_SCORE},
377 + {"bowtie2-max-penalty", required_argument, 0, OPT_BOWTIE2_MAX_PENALTY},
378 + {"bowtie2-min-penalty", required_argument, 0, OPT_BOWTIE2_MIN_PENALTY},
379 + {"bowtie2-penalty-for-N", required_argument, 0, OPT_BOWTIE2_PENALTY_FOR_N},
380 + {"bowtie2-read-gap-open", required_argument, 0, OPT_BOWTIE2_READ_GAP_OPEN},
381 + {"bowtie2-read-gap-cont", required_argument, 0, OPT_BOWTIE2_READ_GAP_CONT},
382 + {"bowtie2-ref-gap-open", required_argument, 0, OPT_BOWTIE2_REF_GAP_OPEN},
383 + {"bowtie2-ref-gap-cont", required_argument, 0, OPT_BOWTIE2_REF_GAP_CONT},
384   {0, 0, 0, 0} // terminator
385   };
386  
# Line 418 | Line 441
441      case OPT_MAX_MULTIHITS:
442        max_multihits = parseIntOpt(1, "--max-multihits arg must be at least 1", print_usage);
443        break;
444 +    case OPT_MAX_SEG_MULTIHITS:
445 +      max_seg_multihits = parseIntOpt(1, "--max-seg-multihits arg must be at least 1", print_usage);
446 +      break;
447      case OPT_NO_CLOSURE_SEARCH:
448        no_closure_search = true;
449        break;
# Line 496 | Line 522
522      case OPT_COLOR:
523        color = true;
524        break;
499    case OPT_COLOR_OUT:
500      color_out = true;
501      break;
525      case OPT_LIBRARY_TYPE:
526        if (strcmp(optarg, "fr-unstranded") == 0)
527          library_type = FR_UNSTRANDED;
# Line 545 | Line 568
568      case OPT_FILTER_HITS:
569        flt_mappings = optarg;
570        break;
571 +    case OPT_REPORT_SECONDARY_ALIGNMENTS:
572 +      report_secondary_alignments = true;
573 +      break;
574      case OPT_FUSION_SEARCH:
575        fusion_search = true;
576        break;
# Line 569 | Line 595
595      case OPT_BOWTIE2_MIN_SCORE:
596        bowtie2_min_score = -1 * parseIntOpt(0, "--bowtie2-min-score must be at least 0", print_usage);
597        break;
598 +    case OPT_BOWTIE2_MAX_PENALTY:
599 +      bowtie2_max_penalty = parseIntOpt(0, "--bowtie2-max-penalty must be at least 0", print_usage);
600 +      break;
601 +    case OPT_BOWTIE2_MIN_PENALTY:
602 +      bowtie2_min_penalty = parseIntOpt(0, "--bowtie2-min-penalty must be at least 0", print_usage);
603 +      break;
604 +    case OPT_BOWTIE2_PENALTY_FOR_N:
605 +      bowtie2_penalty_for_N = parseIntOpt(0, "--bowtie2-penalty-for-N must be at least 0", print_usage);
606 +      break;
607 +    case OPT_BOWTIE2_READ_GAP_OPEN:
608 +      bowtie2_read_gap_open = parseIntOpt(0, "--bowtie2-read-gap-open must be at least 0", print_usage);
609 +      break;
610 +    case OPT_BOWTIE2_READ_GAP_CONT:
611 +      bowtie2_read_gap_cont = parseIntOpt(0, "--bowtie2-read-gap-cont must be at least 0", print_usage);
612 +      break;
613 +    case OPT_BOWTIE2_REF_GAP_OPEN:
614 +      bowtie2_ref_gap_open = parseIntOpt(0, "--bowtie2-ref-gap-open must be at least 0", print_usage);
615 +      break;
616 +    case OPT_BOWTIE2_REF_GAP_CONT:
617 +      bowtie2_ref_gap_cont = parseIntOpt(0, "--bowtie2-ref-gap-cont must be at least 0", print_usage);
618 +      break;
619      default:
620        print_usage();
621        return 1;
# Line 939 | Line 986
986     }
987  
988   void GBamRecord::add_aux(const char* str) {
942   // daehwan - this is not thread-safe - I made these varaiables as class members
989       //requires: being called AFTER add_quals()
990       // static char tag[2];
991       // static uint8_t abuf[512];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines