~ubuntu-branches/ubuntu/edgy/ncbi-tools6/edgy

« back to all changes in this revision

Viewing changes to algo/blast/api/repeats_filter.c

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese
  • Date: 2006-07-19 23:28:07 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060719232807-et3cdmcjgmnyleyx
Tags: 6.1.20060507-3ubuntu1
Re-merge with Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
static char const rcsid[] = "$Id: repeats_filter.c,v 1.12 2005/09/20 18:27:50 kans Exp $";
 
1
static char const rcsid[] = "$Id: repeats_filter.c,v 1.14 2006/04/26 12:46:47 madden Exp $";
2
2
 
3
3
/*
4
4
 * ===========================================================================
166
166
Int2
167
167
Blast_FindRepeatFilterSeqLoc(SeqLoc* query_seqloc,
168
168
                             const char* filter_string, 
169
 
                             SeqLoc* *mask_loc)
 
169
                             SeqLoc* *mask_loc,
 
170
                             SBlastMessage **message)
170
171
{
171
172
    char* repeat_database = NULL;
172
173
    SBlastOptions* options = NULL;
178
179
    BlastHSPResults* results = NULL;
179
180
    SBlastFilterOptions* filtering_options = NULL;
180
181
 
 
182
    ASSERT(message);
181
183
    if (filter_string == NULL)
182
184
       return 0;
183
185
    
202
204
    seq_src = ReaddbBlastSeqSrcInit(repeat_database, FALSE, 0, 0);
203
205
    
204
206
    if (!seq_src) {
205
 
        Blast_MessageWrite(&sum_returns->error, 2, 1, 0,  
206
 
                           "Initialization of subject sequences source failed");
 
207
        SBlastMessageWrite(&sum_returns->error, SEV_ERROR, 
 
208
           "Initialization of subject sequences source failed", NULL, FALSE);
207
209
    } else {
208
210
        char* error_str = BlastSeqSrcGetInitError(seq_src);
209
211
        if (error_str)
210
 
            Blast_MessageWrite(&sum_returns->error, 2, 1, 0, error_str); 
 
212
           SBlastMessageWrite(&sum_returns->error, SEV_ERROR, error_str, NULL, FALSE); 
211
213
    }
212
214
 
213
215
    /* If there was an error initializing the sequence source, return without 
214
216
       doing the search. */
215
217
    if (sum_returns->error) {
216
218
        *mask_loc = NULL;
 
219
        *message = sum_returns->error;
 
220
        sum_returns->error = NULL;
 
221
        Blast_SummaryReturnFree(sum_returns);
217
222
        filtering_options = SBlastFilterOptionsFree(filtering_options);
218
223
        return -1;
219
224
    }