(loc = loc_list; loc; loc = loc->
next) {
148 _ASSERT((*itr)->GetSegs().IsDenseg());
149 const CDense_seg& seg = (*itr)->GetSegs().GetDenseg();
150 const intkNumSegments = seg.
GetNumseg();
152 const intkNumDim = seg.
GetDim();
159 _ASSERT(kNumSegments*kNumDim == (
int) starts.size());
160 _ASSERT(kNumSegments == (
int) lengths.size());
161 _ASSERT(kNumSegments*kNumDim == (
int) strands.size());
163 intleft(0), right(0);
165 if(strands[0] == strands[1]) {
166left = starts.front();
167right = starts[(kNumSegments-1)*2] + lengths[kNumSegments-1] - 1;
169left = starts[(kNumSegments-1)*2];
170right = starts.front() + lengths.front() - 1;
190 for(
size_tquery_index = 0; query_index <
query.size(); ++query_index) {
193 if(
result.GetSeqAlign().Empty() ||
result.GetSeqAlign()->IsEmpty()) {
224 query[query_index].mask.Reset(filter_seqloc);
243 for(
size_tqindex = 0; qindex <
query.Size(); ++qindex) {
246 if(
result.GetSeqAlign().Empty() ||
result.GetSeqAlign()->IsEmpty()) {
257 constTFrameSet& used = frames->ListFrames();
261 ITERATE(TFrameSet, itr, used) {
271pplast = & (*pplast)->
next;
297 query.GetScope(qindex),
304 query.SetMaskedRegions(qindex, filter_seqloc);
352vector< CRef<CSeq_loc> > lcase_mask_v;
353lcase_mask_v.reserve(
query.size());
355 for(
unsigned intindex = 0; index <
query.size(); ++index) {
356lcase_mask_v.push_back(
query[index].
mask);
361 CLocalBlastblaster(query_factory, repeat_opts, target_db);
365 for(
unsigned intindex = 0; index <
query.size(); ++index) {
366 query[index].mask.Reset(lcase_mask_v[index]);
385 for(
size_t i= 0;
i< queries.
Size(); ++
i) {
394 CLocalBlastblaster(query_factory, repeat_opts, target_db);
Contains C++ wrapper classes to structures in algo/blast/core as well as some auxiliary functions to ...
BLAST filtering functions.
#define REPEATS_SEARCH_GAP_OPEN
Default gap opening cost.
#define REPEATS_SEARCH_WORD_SIZE
Default word size.
#define REPEATS_SEARCH_REWARD
Default match reward.
#define REPEATS_SEARCH_XDROP_FINAL
Default X-dropoff for gapped extension with traceback.
#define REPEATS_SEARCH_PENALTY
Default mismatch penalty.
void BlastSeqLocCombine(BlastSeqLoc **mask_loc, Int4 link_value)
Go through all mask locations in one sequence and combine any that overlap, deallocating the unneeded...
#define REPEATS_SEARCH_GAP_EXTEND
Default gap extension cost.
BlastSeqLoc * BlastSeqLocFree(BlastSeqLoc *loc)
Deallocate all BlastSeqLoc objects in a chain.
BlastSeqLoc * BlastSeqLocNew(BlastSeqLoc **head, Int4 from, Int4 to)
Create and initialize a new sequence interval.
#define REPEAT_MASK_LINK_VALUE
Largest gap allowed to be filled between repeat mask intervals.
#define REPEATS_SEARCH_MINSCORE
Default score cutoff.
#define REPEATS_SEARCH_XDROP_UNGAPPED
Default X-dropoff for ungapped extension.
Structures and API used for saving BLAST hits.
Declares the CBlastNucleotideOptionsHandle class.
EBlastProgramType
Defines the engine's notion of the different applications of the BLAST algorithm.
Declaration of ADT to retrieve sequences for the BLAST engine.
Internal auxiliary setup classes/functions for C++ BLAST APIs.
Definitions of special type used in BLAST.
ncbi::TMaskedQueryRegions mask
Handle to the nucleotide-nucleotide options to the BLAST algorithm.
Handle to the options to the BLAST algorithm.
Collection of BlastSeqLoc lists for filtering processing.
void AddQuery(CRef< CBlastSearchQuery > q)
Add a query to the set.
CRef< objects::CScope > GetScope(size_type i) const
Get the scope containing a query by index.
size_type Size() const
Returns the number of queries found in this query vector.
CConstRef< objects::CSeq_loc > GetQuerySeqLoc(size_type i) const
Get the query Seq-loc for a query by index.
Class to perform a BLAST search on local BLAST databases Note that PHI-BLAST can be run using this cl...
NCBI C++ Object Manager dependant implementation of IQueryFactory.
Search Results for All Queries.
Search Results for One Query.
Collection of masked regions for a single query sequence.
static void s_SeqAlignToBlastSeqLoc(const CSeq_align_set &alignment, BlastSeqLoc **locs)
Build a list of BlastSeqLoc's from a set of Dense-seg contained in a Seq-align-set.
BlastSeqLoc * CSeqLoc2BlastSeqLoc(const objects::CSeq_loc *slp)
Converts a CSeq_loc into a BlastSeqLoc structure used in NewBlast.
TMaskedQueryRegions PackedSeqLocToMaskedQueryRegions(CConstRef< objects::CSeq_loc > sloc, EBlastProgramType program, bool assume_both_strands=false)
Auxiliary function to convert a Seq-loc describing masked query regions to a TMaskedQueryRegions obje...
void SetMatchReward(int r)
Sets MatchReward.
CRef< CSearchResultSet > Run()
Executes the search.
void SetTraditionalBlastnDefaults()
Sets TraditionalBlastnDefaults.
void SetMismatchPenalty(int p)
Sets MismatchPenalty.
static CRef< CBlastOptionsHandle > s_CreateRepeatsSearchOptions()
Create an options handle with the defaults set for a search for repeats.
static CSeq_loc * s_BlastSeqLoc2CSeqloc(const CSeq_loc &query, CScope *scope, BlastSeqLoc *loc_list)
Convert a list of mask locations to a CSeq_loc object.
const CBlastOptions & GetOptions() const
Return the object which this object is a handle for.
void SetXDropoff(double x)
Sets XDropoff.
bool GetRepeatFiltering() const
Is repeat filtering enabled?
TMaskedQueryRegions s_BlastSeqLoc2MaskedRegions(const CSeq_loc &query, CScope *scope, BlastSeqLoc *loc_list, EBlastProgramType program)
Convert a list of mask locations to TMaskedQueryRegions.
void Blast_FindRepeatFilterLoc(TSeqLocVector &query_loc, const CBlastOptionsHandle *opts_handle)
Finds repeats locations for a given set of sequences.
void SetGapXDropoffFinal(double x)
Sets GapXDropoffFinal.
void SetGapExtensionCost(int e)
Sets GapExtensionCost.
bool GetMBIndexLoaded() const
const char * GetRepeatFilteringDB() const
Get the repeat filtering database.
void SetWordSize(int ws)
Sets WordSize.
static void s_FillMaskLocFromBlastResults(TSeqLocVector &query, const CSearchResultSet &results)
Fills the mask locations in the query SSeqLoc structures, as if it was a lower case mask,...
void SetDustFiltering(bool val)
Enable dust filtering.
void SetCutoffScore(int s)
Sets CutoffScore.
void SetGapOpeningCost(int g)
Sets GapOpeningCost.
@ eBlastDbIsNucleotide
nucleotide
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
void SetPacked_int(TPacked_int &v)
void SetNull(void)
Override all setters to incorporate cache invalidation.
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
TObjectType * Release(void)
Release a reference to the object and return a pointer to the object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define USING_SCOPE(ns)
Use the specified namespace.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
const TStarts & GetStarts(void) const
Get the Starts member data.
vector< ENa_strand > TStrands
const TLens & GetLens(void) const
Get the Lens member data.
vector< TSignedSeqPos > TStarts
TDim GetDim(void) const
Get the Dim member data.
TNumseg GetNumseg(void) const
Get the Numseg member data.
list< CRef< CSeq_align > > Tdata
const TStrands & GetStrands(void) const
Get the Strands member data.
const Tdata & Get(void) const
Get the member data.
Main class to perform a BLAST search on the local machine.
NOTE: This file contains work in progress and the APIs are likely to change, please do not rely on th...
C++ implementation of repeats filtering for C++ BLAST.
Implementation of the BlastSeqSrc interface using the C++ BLAST databases API.
vector< SSeqLoc > TSeqLocVector
Vector of sequence locations.
Used to hold a set of positions, mostly used for filtering.
SSeqRange * ssr
location data on the sequence.
struct BlastSeqLoc * next
next in linked list
Structure to represent a single sequence to be fed to BLAST.
Int4 left
left endpoint of range (zero based)
Int4 right
right endpoint of range (zero based)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4