SearchWorker::SearchWorker(Options* opts, 
                           QueryInfo* qi,
                           FMIndex* index,
                           DbInfo* di,
                           CSymDustMasker* csdm,
                           CSeqMasker* win_m,
						   int tid)
{
    ASSERT(opts != NULL);
    global_queries = qi;
    options = opts;
    fmindex = index;
    dbinfo = di;
    results = new OutputFormat(options->output_options, options->hit_options, dbinfo);
    dust_masker = csdm;
    window_masker = win_m;
	thread_id = tid;
    
    word_params = NULL;
    ext_params = NULL;
    hit_params = NULL;
    eff_params = NULL;
    score_params = NULL;
    
    sbp = NULL;
    gapped_aligner = NULL;
    
    eff_options = BlastEffectiveLengthsOptionsNew();
}
Exemple #2
0
Int2 BLAST_InitDefaultOptions(EBlastProgramType program_number,
   LookupTableOptions** lookup_options,
   QuerySetUpOptions** query_setup_options, 
   BlastInitialWordOptions** word_options,
   BlastExtensionOptions** ext_options,
   BlastHitSavingOptions** hit_options,
   BlastScoringOptions** score_options,
   BlastEffectiveLengthsOptions** eff_len_options,
   PSIBlastOptions** psi_options,
   BlastDatabaseOptions** db_options)
{
   Int2 status;

   if ((status = LookupTableOptionsNew(program_number, lookup_options)))
      return status;

   if ((status=BlastQuerySetUpOptionsNew(query_setup_options)))
      return status;

   if ((status=BlastInitialWordOptionsNew(program_number, word_options)))
      return status;

   if ((status=BlastScoringOptionsNew(program_number, score_options)))
      return status;

   if ((status = BlastExtensionOptionsNew(program_number, ext_options,
                                       (*score_options)->gapped_calculation)))
      return status;

   if ((status=BlastHitSavingOptionsNew(program_number, hit_options,
                                        (*score_options)->gapped_calculation)))
      return status;

   if ((status=BlastEffectiveLengthsOptionsNew(eff_len_options)))
      return status;
   
   if ((status=PSIBlastOptionsNew(psi_options)))
      return status;

   if ((status=BlastDatabaseOptionsNew(db_options)))
      return status;

   return 0;

}
 /// Parametrized constructor
 /// @param options the BLAST options [in]
 CEffectiveSearchSpacesMemento(CBlastOptions* options)
     : m_Options(options), m_EffLenOrig(0), m_EffLenReplace(0)
 {
     _ASSERT(options);
     if (options->m_Local) {
         m_EffLenOrig = options->m_Local->m_EffLenOpts.Release();
         BlastEffectiveLengthsOptionsNew(&m_EffLenReplace);
         memcpy((void*) m_EffLenReplace,
                (void*) m_EffLenOrig,
                sizeof(*m_EffLenOrig));
         m_EffLenReplace->searchsp_eff = 
             (Int8*)malloc(sizeof(Int8) * m_EffLenOrig->num_searchspaces);
         memcpy((void*) m_EffLenReplace->searchsp_eff,
                (void*) m_EffLenOrig->searchsp_eff,
                sizeof(Int8) * m_EffLenOrig->num_searchspaces);
         options->m_Local->m_EffLenOpts.Reset(m_EffLenReplace);
     }
 }