ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/tophat_cpp/tophat_reports.cpp
(Generate patch)
# Line 99 | Line 99
99                            bool final_report = false)
100   {
101    const vector<BowtieHit>& hits = hits_for_read.hits;
102 +
103 +  if (hits.size() >= max_multihits * 5)
104 +    return;
105 +
106    for (size_t i = 0; i < hits.size(); ++i)
107      {
108        if (hits[i].edit_dist() > max_read_mismatches)
# Line 217 | Line 221
221   {
222    const vector<BowtieHit>& left = left_hits.hits;
223    const vector<BowtieHit>& right = right_hits.hits;
224 <  
224 >
225 >  if (left.size() >= max_multihits * 5 || right.size() >= max_multihits * 5)
226 >    return;
227 >
228    for (size_t i = 0; i < left.size(); ++i)
229      {
230        if (left[i].edit_dist() > max_read_mismatches) continue;
231 <      
231 >
232        BowtieHit lh = left[i];
233        AlignStatus align_status(lh, gtf_junctions,
234                                 junctions, insertions, deletions, fusions, coverage);
# Line 261 | Line 268
268              }
269          }
270      }
271 <
271 >
272    if ((report_secondary_alignments || !final_report) && best_hits.size() > 0)
273      {
274        cmp_pair_alignment cmp(gtf_junctions);
# Line 823 | Line 830
830                      FusionSet& fusions,
831                      const FusionSet& fusions_ref = empty_fusions)
832   {
833 +  if (!fusion_search)
834 +    return;
835 +  
836    if (hits.hits.size() > fusion_multireads)
837      return;
838  
# Line 932 | Line 942
942              update_junctions(best_hits, *junctions);
943              update_insertions_and_deletions(best_hits, *insertions, *deletions);
944              update_fusions(best_hits, *rt, *fusions);
945 <            
945 >                        
946              // Get next hit group
947              l_hs.next_read_hits(curr_left_hit_group);
948              curr_left_obs_order = it.observation_order(curr_left_hit_group.insert_id);
# Line 1048 | Line 1058
1058      //if (!zpacker.empty()) left_um_fname+=".z";
1059      GBamWriter* left_um_out=new GBamWriter(left_um_fname.c_str(), sam_header.c_str());
1060      GBamWriter* right_um_out=NULL;
1061 <
1061 >    
1062      //if (left_um_out.openWrite(left_um_fname.c_str(), zpacker)==NULL)
1063      //  err_die("Error: cannot open file %s for writing!\n",left_um_fname.c_str());
1064      ReadStream right_reads_file(right_reads_fname);
# Line 1323 | Line 1333
1333                                 right_um_out, false);
1334  
1335  
1336 <   // pclose (pipe close), which waits for a process to end, seems to conflict with boost::thread::join somehow,
1337 <   // resulting in deadlock like behavior.
1336 >    // pclose (pipe close), which waits for a process to end, seems to conflict with boost::thread::join somehow,
1337 >    // resulting in deadlock like behavior.
1338      delete left_um_out;
1339      delete right_um_out;
1340  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines