34 #ifndef ALGO_BLAST_API___SSEQLOC__HPP
35 #define ALGO_BLAST_API___SSEQLOC__HPP
80 : seqloc(), scope(),
mask(), ignore_strand_in_mask(
true),
86 SSeqLoc(
const objects::CSeq_loc* sl, objects::CScope* s)
87 : seqloc(sl), scope(s),
mask(0), ignore_strand_in_mask(
true),
93 SSeqLoc(
const objects::CSeq_loc& sl, objects::CScope& s)
94 : seqloc(&sl), scope(&s),
mask(0), ignore_strand_in_mask(
true),
102 SSeqLoc(
const objects::CSeq_loc* sl, objects::CScope* s,
103 objects::CSeq_loc* m,
bool ignore_mask_strand =
true)
104 : seqloc(sl), scope(s),
mask(m),
105 ignore_strand_in_mask(ignore_mask_strand),
107 if (m !=
NULL && ignore_strand_in_mask) {
117 SSeqLoc(
const objects::CSeq_loc& sl, objects::CScope& s,
118 objects::CSeq_loc& m,
bool ignore_mask_strand =
true)
119 : seqloc(&sl), scope(&s),
mask(&m),
120 ignore_strand_in_mask(ignore_mask_strand),
122 if (ignore_strand_in_mask) {
156 objects::CScope & sc)
170 objects::CScope & sc,
265 "Only whole or int typed seq_loc is supported for CBlastQueryVector");
Contains C++ wrapper classes to structures in algo/blast/core as well as some auxiliary functions to ...
#define NCBI_XBLAST_EXPORT
NULL operations for other cases.
#define BLAST_GENETIC_CODE
Default genetic code for query and/or database.
Defines BLAST error codes (user errors included)
bool Empty() const
Returns true if this query vector is empty.
const_iterator end() const
Returns const_iterator to end of container, provided to facilitate STL-style iteration.
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.
TMaskedQueryRegions GetMaskedRegions(size_type i) const
Get the masked regions for a query by number.
void clear()
Clears the contents of this object.
const_iterator begin() const
Returns const_iterator to beginning of container, provided to facilitate STL-style iteration.
size_type Size() const
Returns the number of queries found in this query vector.
vector< value_type >::size_type size_type
size_type type definition
size_type size() const
Identical to Size, provided to facilitate STL-style iteration.
CConstRef< objects::CSeq_loc > GetQuerySeqLoc(size_type i) const
Get the query Seq-loc for a query by index.
void SetMaskedRegions(size_type i, TMaskedQueryRegions mqr)
Assign a list of masked regions to one query.
vector< CRef< CBlastSearchQuery > > m_Queries
The set of queries used for a search.
void AddMask(size_type i, CRef< CSeqLocInfo > sli)
Add a masked region to the set for a query.
vector< value_type >::const_iterator const_iterator
const_iterator type definition
CRef< objects::CSeq_loc > GetMasks(size_type i) const
Convenience method to get a CSeq_loc representing the masking locations.
void push_back(const value_type &element)
Add a value to the back of this container.
CRef< CBlastSearchQuery > value_type
CRef< CBlastSearchQuery > operator[](size_type i) const
Get the CBlastSearchQuery object at index i.
CRef< CBlastSearchQuery > GetBlastSearchQuery(size_type i) const
Get the CBlastSearchQuery object at index i.
void x_Validate()
Currently we only support whole or int. Throw exception otherwise.
CBlastSearchQuery()
Default constructor.
void SetGeneticCodeId(Uint4 gc_id)
Get the genetic code id.
Uint4 genetic_code_id
Genetic code id if this sequence should be translated.
CRef< objects::CScope > scope
This scope contains the query.
TMaskedQueryRegions mask
These regions of the query are masked.
CConstRef< objects::CSeq_loc > seqloc
The Seq-loc representing the query.
CConstRef< objects::CSeq_id > GetQueryId() const
Get the query Seq-id.
void SetMaskedRegions(TMaskedQueryRegions mqr)
Set the masked query regions.
CBlastSearchQuery(const objects::CSeq_loc &sl, objects::CScope &sc, TMaskedQueryRegions m)
Constructor.
TSeqPos GetLength() const
Get the length of the sequence represented by this object.
CBlastSearchQuery(const objects::CSeq_loc &sl, objects::CScope &sc)
Constructor.
CRef< objects::CScope > GetScope() const
Get the query CScope.
Uint4 GetGeneticCodeId() const
Get the genetic code id.
TMaskedQueryRegions GetMaskedRegions() const
Get the masked query regions.
void AddMask(CRef< CSeqLocInfo > sli)
Masked a region of this query.
CConstRef< objects::CSeq_loc > GetQuerySeqLoc() const
Get the query Seq-loc.
Collection of masked regions for a single query sequence.
Include a standard set of the NCBI C++ Toolkit most basic headers.
CRef< objects::CBioseq_set > TSeqLocVector2Bioseqs(const TSeqLocVector &input)
Convert a TSeqLocVector to a CBioseq_set.
CRef< objects::CSeq_loc > MaskedQueryRegionsToPackedSeqLoc(const TMaskedQueryRegions &sloc)
Interface to build a CSeq-loc from a TMaskedQueryRegion; note that conversion conversion in this dire...
unsigned int TSeqPos
Type for sequence locations and lengths.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
TSeqPos GetLength(const CSeq_id &id, CScope *scope)
Get sequence length if scope not null, else return max possible TSeqPos.
uint32_t Uint4
4-byte (32-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
vector< SSeqLoc > TSeqLocVector
Vector of sequence locations.
Structure to represent a single sequence to be fed to BLAST.
bool ignore_strand_in_mask
This member dictates how the strand in the mask member is interpreted.
Uint4 genetic_code_id
Genetic code id if this sequence should be translated.
SSeqLoc()
Default constructor.
SSeqLoc(const objects::CSeq_loc *sl, objects::CScope *s, objects::CSeq_loc *m, bool ignore_mask_strand=true)
Parameterized constructor.
CConstRef< objects::CSeq_loc > seqloc
Seq-loc describing the sequence to use as query/subject to BLAST The types of Seq-loc currently suppo...
CRef< objects::CScope > scope
Scope where the sequence referenced can be found by the toolkit's object manager.
SSeqLoc(const objects::CSeq_loc *sl, objects::CScope *s)
Parameterized constructor.
CRef< objects::CSeq_loc > mask
Seq-loc describing regions to mask in the seqloc field Acceptable types of Seq-loc are Seq-interval a...
SSeqLoc(const objects::CSeq_loc &sl, objects::CScope &s)
Parameterized constructor.
SSeqLoc(const objects::CSeq_loc &sl, objects::CScope &s, objects::CSeq_loc &m, bool ignore_mask_strand=true)
Parameterized constructor.