A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/splign__app_8cpp_source.html below:

NCBI C++ ToolKit: src/app/splign/splign_app.cpp Source File

77  const char

kDirSense[] =

"sense"

;

78  const char

kDirAntisense[] =

"antisense"

;

79  const char

kDirBoth[] =

"both"

;

80  const char

kDirAuto[] =

"auto"

;

81  const char

kDirDefault[] =

"default"

;

104

argdescr->AddOptionalKey

106  "[Batch mode] Externally computed local alignments " 107  "(such as blast hits), in blast tabular format. " 108  "The file must be collated by subject and query " 109  "(e.g. sort -k 2,2 -k 1,1)."

,

112

argdescr->AddOptionalKey

113

(

"comps"

,

"comps"

,

114  "[Batch mode] Compartments computed with Compart utility."

,

117

argdescr->AddOptionalKey

118

(

"mklds"

,

"mklds"

,

119  "Make LDS DB under the specified directory " 120  "with cDNA and genomic FASTA files or symlinks."

,

123

argdescr->AddOptionalKey

124

(

"blastdb"

,

"blastdb"

,

125  "Comma separated list of Blast DBs for sequence retrieval."

,

128

argdescr->AddOptionalKey

129

(

"ldsdir"

,

"ldsdir"

,

130  "Comma separated list of directories with LDS DBs."

,

135  "Add genbank loader. Not recommended in Batch mode."

);

137

argdescr->AddOptionalKey

138

(

"query"

,

"query"

,

139  "[Pairwise mode] FASTA file with the spliced sequence. " 140  "Not compatible with \"-query_id\"."

,

143

argdescr->AddOptionalKey

144

(

"query_id"

,

"query_id"

,

145  "[Pairwise mode] Query id. Not compatible with \"-query\"."

,

148

argdescr->AddOptionalKey

150  "[Pairwise mode] FASTA file with the genomic sequence. " 151  "Not compatible with \"-subj_id\"."

,

154

argdescr->AddOptionalKey

155

(

"subj_id"

,

"subj_id"

,

156  "[Pairwise mode] Subject id. Not compatible with \"-subj\"."

,

161  "[Pairwise mode] Use discontiguous megablast to facilitate " 162  "alignment of more divergent sequences such as those " 163  "from different organisms (cross-species alignment)."

);

165

argdescr->AddDefaultKey

166

(

"W"

,

"mbwordsize"

,

"[Pairwise mode] Megablast word size"

,

170

argdescr->AddOptionalKey

171

(

"mask_ranges"

,

"mask_ranges"

,

"[Pairwise mode] regions to mask out, query only, formatted as '1-2,5-8,33-44', 1-based"

,

177

argdescr->AddDefaultKey

180  "Query sequence orientation. " 181  "Auto orientation begins with the longest ORF direction (d1) " 182  "and proceeds with the opposite direction (d2) " 183  "if found a non-consensus splice in d1 or poly-a tail in d2. " 185  "Default translates to 'auto' in mRNA and " 186  "'both' in EST mode"

,

190

argdescr->AddDefaultKey(

"log"

,

"log"

,

"Splign log file"

,

194

argdescr->AddOptionalKey(

"asn"

,

"asn"

,

"ASN.1 output file name"

,

197

argdescr->AddOptionalKey(

"aln"

,

"aln"

,

"Pairwise alignment output file name"

,

202

->

Allow

(kDirDefault)

204

->

Allow

(kDirAntisense)

208

argdescr->SetConstraint(

"direction"

, constrain_direction);

220 #ifdef SPLIGNAPP_UNDECORATED_ARE_LOCALS 222

string::const_iterator ie = m8.end(), i0 = m8.begin(), i1 = i0;

223  while

(i1 != ie && *i1 !=

'\t'

) ++i1;

225

string::const_iterator i2 = ++i1;

226  while

(i2 != ie && *i2 !=

'\t'

) ++i2;

228  if

(find(i0, i1,

'|'

) == i1) {

229  const string

strid = rv->GetQueryId()->GetSeqIdString(

true

);

231

rv->SetQueryId(seqid);

233  if

(find(i1, i2,

'|'

) == i2) {

234  const string

strid = rv->GetSubjId()->GetSeqIdString(

true

);

236

rv->SetSubjId(seqid);

241  const string

errmsg =

string

(

"Incorrectly formatted blast hit:\n"

) + m8;

253

hitrefs_pair->resize(0);

255  const size_t

dim = hitrefs.size();

273

&& hitrefs[

m_CurHitRef

]->GetSubjId()->Match(*subj) )

296  query

= hitref->GetQueryId();

297

subj = hitref->GetSubjId();

306

ifs.getline(

buf

,

sizeof buf

,

'\n'

);

308  if

(pos1 == pos0)

break

;

309  if

(

buf

[0] ==

'#'

)

continue

;

310  const char

* p =

buf

;

311  while

(*p ==

' '

|| *p ==

'\t'

) ++p;

312  if

(*p == 0)

continue

;

315  if

(

query

.IsNull()) {

316  query

= hit->GetQueryId();

319

subj = hit->GetSubjId();

321  if

(hit->GetQueryStrand() ==

false

) {

324  if

(hit->GetSubjStop() == hit->GetSubjStart()) {

329  if

(hit->GetQueryId()->Match(*

query

) ==

false

||

330

hit->GetSubjId()->Match(*subj) ==

false

) {

346  for

(;

i

< pending_size; ++

i

) {

349  if

(h->GetQueryId()->Match(*

query

) ==

false

||

350

h->GetSubjId()->Match(*subj) ==

false

) {

354

hitrefs->resize(

i

);

360  return

hitrefs->size() > 0;

371  if

(phitrefs->empty())

continue

;

else break

;

374

phitrefs->push_back(h);

391  if

(!hitrefs_next.empty()) {

392

hitrefs.resize(hitrefs_next.size());

393  copy

(hitrefs_next.begin(), hitrefs_next.end(), hitrefs.begin());

394

hitrefs_next.clear();

409  else if

(smax !=

kUndef

) {

418  if

(!hitrefs_next.empty()

419

&& hitrefs.front()->GetSubjStrand() == hitrefs_next.front()->GetSubjStrand()

420

&& hitrefs.front()->GetQueryId()->Match(*(hitrefs_next.front()->GetQueryId()))

421

&& hitrefs.front()->GetSubjId()->Match(*(hitrefs_next.front()->GetSubjId())))

426

hitrefs.back()->GetSubjMin());

428

hitrefs_next.back()->GetSubjMin());

430

hitrefs.back()->GetSubjMax());

432

hitrefs_next.back()->GetSubjMax());

433  if

( max1 > min1 && min2 < max1 ) {

435

ostr <<

"\nTwo compartments intersect for pair "

<<hitrefs.front()->GetQueryId()->AsFastaString()

436

<<

" "

<<hitrefs.front()->GetSubjId()->AsFastaString()

437

<<

"\n compartment ranges are" 438

<<

"\n("

<< min1+1 <<

", "

<< max1+1 <<

')' 439

<<

"\n("

<< min2+1 <<

", "

<< max2+1 <<

")\n"

;

446  if

(hitrefs.front()->GetSubjStart() < hitrefs_next.front()->GetSubjStart()) {

447

*psubj_min = smin !=

kUndef

? smin: 0;

448

*psubj_max =

min

(hitrefs_next.front()->GetSubjMin(),

449

hitrefs_next.back()->GetSubjMin());

450

smin =

max

(hitrefs.front()->GetSubjMax(),

451

hitrefs.back()->GetSubjMax());

455

*psubj_min =

max

(hitrefs_next.front()->GetSubjMax(),

456

hitrefs_next.back()->GetSubjMax());

459

smax =

min

(hitrefs.front()->GetSubjMin(),

460

hitrefs.back()->GetSubjMin());

467  return

!hitrefs.empty();

479  case

TCompartment::eStatus_Ok: {

486

<<

'\t'

<<

query

->GetSeqIdString(

true

)

487

<<

'\t'

<< subj->GetSeqIdString(

true

)

494  case

TCompartment::eStatus_Error: {

497

<<

'\t'

<<

query

->GetSeqIdString(

true

)

498

<<

'\t'

<< subj->GetSeqIdString(

true

)

505  case

TCompartment::eStatus_Empty:

510  "Unexpected compartment status."

);

539  if

(blast_options_handle->

Validate

() ==

false

) {

542  "Incorrect blast setup"

);

545  return

blast_options_handle;

562  string

lds_db_dir = fasta_dir;

564  const size_t

fds = fasta_dir.size();

565  if

(fds > 0 && fasta_dir[fds-1] != sep) {

568

lds_db_dir +=

"_SplignLDS2_"

;

590

scope->AddTopLevelSeqEntry(*se);

605  if

( args[

"query"

] && args[

"query_id"

] ) {

608  "\"-query\" is not compatible with \"-query_id\". " 609  "Specify -help to print arguments."

);

612  if

( args[

"subj"

] && args[

"subj_id"

] ) {

615  "\"-subj\" is not compatible with \"-subj_id\". " 616  "Specify -help to print arguments."

);

619  const bool

is_mklds = args[

"mklds"

];

621  const bool

is_hits = args[

"hits"

];

622  const bool

is_query = args[

"query"

] || args[

"query_id"

];

623  const bool

is_subj = args[

"subj"

] || args[

"subj_id"

];

624  const bool

is_comps = args[

"comps"

];

626  const bool

use_disc_megablast (args[

"disc"

]);

630  string

fa_dir = args[

"mklds"

].AsString();

634  const size_t

curdirsize = curdir.size();

635  if

(curdirsize && curdir[curdirsize-1] != sep) {

638

fa_dir = curdir + fa_dir;

642  CDir

dir(lds_db_dir);

655  if

(is_query && is_subj && !(is_hits || is_comps)) {

658  else if

(is_hits && !(is_comps ||is_query || is_subj)) {

661  else if

(is_comps && !(is_hits ||is_query || is_subj)) {

668  "Incomplete or inconsistent set of arguments specified. " 669  "Specify -help to print arguments."

);

676  m_AsnOut

= args[

"asn"

]? & args[

"asn"

].AsOutputFile():

NULL

;

679  m_AlnOut

= args[

"aln"

]? & args[

"aln"

].AsOutputFile():

NULL

;

701  if

(args[

"genbank"

]) {

707  typedef

vector<string> TDbs;

711  if

(args[

"blastdb"

].

HasValue

()) {

712

blastdbstr = args[

"blastdb"

].AsString();

734

<<

" ("

<< priority <<

")"

);

739  if

(args[

"ldsdir"

].

HasValue

()) {

740

ldsdbstr = args[

"ldsdir"

].AsString();

745  const string

fasta_dir = *

i

;

757  LOG_POST

(

Info

<<

"added loader: LDS: "

<< db <<

" ("

<< priority <<

")"

);

769  if

(args[

"query"

]) {

771

}

else if

(args[

"query_id"

]) {

772  const string

& id_list = args[

"query_id"

].AsString();

786  "Specify -help to print arguments."

);

791  if

(args[

"subj"

]) {

793

}

else if

(args[

"subj_id"

]) {

794  const string

& id_list = args[

"subj_id"

].AsString();

807  "Subject is missing. " 808  "Specify -help to print arguments."

);

815  else if

(run_mode ==

eBatch1

) {

818  CNcbiIstream

& hit_stream = args[

"hits"

].AsInputFile();

823  else if

(run_mode ==

eBatch2

) {

825  CNcbiIstream

& hit_stream (args[

"comps"

].AsInputFile());

829  while

(

x_GetNextComp

(hit_stream, &hitrefs, &subj_min, &subj_max) ) {

831  if

(hitrefs.front()->GetScore() > 0) {

839  "Mode not implemented"

);

842

cout <<

"# END"

<< endl;

858

phitrefs->reserve(100);

861

seqloc_query->

SetWhole

().Assign(*seqid_query);

863

seqloc_subj->

SetWhole

().Assign(*seqid_subj);

876  if

((*ii)->IsSet()) {

880  if

(hitref->GetQueryStrand() ==

false

) {

881

hitref->FlipStrands();

883

phitrefs->push_back(hitref);

901

psplign_results->push_back(ac);

910  size_t

top_matches (0);

915  size_t

matches (0), nc_count(0);

916  typedef

CSplign::TSegments::const_iterator

TIterator

;

917  char

dnr [] = {0, 0, 0};

918  char

acc [] = {0, 0, 0};

919  size_t

exon_count (0);

927  const char

* p (jj->m_details.data()), * pe (p +jj->m_details.size());

929  for

(; p != pe; ++p) {

931  if

(

n

== 0) ++matches;

else if

(

n

> 0) matches +=

n

;

935  n

=

n

* 10 + *p -

'0'

;

944  if

(

n

== 0) ++matches;

else if

(

n

> 0) matches +=

n

;

946  if

(exon_count > 0) {

948  if

(jj->m_annot[2] ==

'<'

) {

950

acc[0] = jj->m_annot[0];

951

acc[1] = jj->m_annot[1];

960

p = jj->m_annot.data();

961  while

(*p++ !=

'>'

);

969  if

(matches > top_matches) {

971

top_matches = matches;

983  case 'A'

:

return 'T'

;

984  case 'G'

:

return 'C'

;

985  case 'T'

:

return 'A'

;

986  case 'C'

:

return 'G'

;

999  const bool

raw_hits (!args[

"comps"

]);

1001  if

(hitrefs.size() == 0) {

1006  if

(hitrefs.front()->GetScore() < 0) {

1014  if

(args[

"mask_ranges"

].

HasValue

()) {

1016  string

mask_ranges_arg = args[

"mask_ranges"

].AsString();

1017

list<string> range_strs;

1019  ITERATE

(list<string>, range_iter, range_strs) {

1020

list<string> bound_strs;

1022  TSeqRange

Curr(NStr::StringToNumeric<TSeqPos>(bound_strs.front())-1,

1023

NStr::StringToNumeric<TSeqPos>(bound_strs.back())-1);

1030  if

(qidh && !MaskRanges.

empty

()) {

1036  THit::TId

subj (hitrefs.front()->GetSubjId());

1040  string

strand (args[

"direction"

].AsString());

1042  if

(strand == kDirDefault) {

1043

strand = (args[

"type"

].AsString() ==

kQueryType_mRNA

)? kDirAuto: kDirBoth;

1048  if

(strand == kDirSense) {

1051  x_RunSplign

(raw_hits, &hitrefs, smin, smax, &splign_results);

1053  else if

(strand == kDirAntisense) {

1056  x_RunSplign

(raw_hits, &hitrefs, smin, smax, &splign_results);

1058  else if

(strand == kDirBoth) {

1065

hits0.push_back(h1);

1068  static size_t

mid (1);

1069  size_t

mid_plus, mid_minus;

1073  x_RunSplign

(raw_hits, &hitrefs, smin, smax, &splign_results);

1079  x_RunSplign

(raw_hits, &hits0, smin, smax, &splign_results);

1082

mid =

max

(mid_plus, mid_minus);

1092

hits0.push_back(h1);

1097  const size_t

orf_sense (orfs.first.second - orfs.first.first);

1098  const size_t

orf_antisense (orfs.second.first - orfs.second.second);

1099  const bool

sense_first (orf_sense >= orf_antisense);

1101  static size_t

mid (1);

1102  size_t

mid_first, mid_second;

1107  x_RunSplign

(raw_hits, &hitrefs, smin, smax, &splign_results);

1114  bool

polya_found (

false

);

1115  if

(nc_count == 0) {

1124

reverse (

str

.begin(),

str

.end());

1128

polya_found = (0 < polya && polya <

str

.size());

1131  if

(nc_count > 0 || polya_found) {

1134  x_RunSplign

(raw_hits, &hits0, smin, smax, &splign_results);

1136

mid =

max

(mid_first, mid_second);

1182 int main

(

int

argc,

const char

* argv[])

1184  const int

rv (

CSplignApp

().AppMain(argc, argv));

User-defined methods of the data storage class.

User-defined methods of the data storage class.

Data loader implementation that uses the blast databases.

Declares the CBl2Seq (BLAST 2 Sequences) class.

vector< CRef< objects::CSeq_align_set > > TSeqAlignVector

Vector of Seq-align-sets.

@ eMegablast

Nucl-Nucl (traditional megablast)

@ eDiscMegablast

Nucl-Nucl using discontiguous megablast.

void transform(Container &c, UnaryFunction *op)

Runs the BLAST algorithm between 2 sequences.

static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, const string &dbname="nr", const EDbType dbtype=eUnknown, bool use_fixed_size_slices=true, CObjectManager::EIsDefault is_default=CObjectManager::eNonDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)

EDbType

Describes the type of blast database to use.

@ eNucleotide

nucleotide database

@ eProtein

protein database

@ eUnknown

protein is attempted first, then nucleotide

Encapsulates ALL the BLAST algorithm's options.

Base class for reading FASTA sequences.

static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, CReader *reader=0, CObjectManager::EIsDefault is_default=CObjectManager::eDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)

static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, CObjectManager::EIsDefault is_default=CObjectManager::eNonDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)

Argument-less loader - for compatibility only, unusable.

Class for managing LDS2 database and related data files.

void AddDataDir(const string &data_dir, EDirMode mode=eDir_Recurse)

Add data directory.

void UpdateData(void)

Rescan all indexed files, check for modifications, update the database.

@ eDir_Recurse

Automatically scan sub-directories (default).

Simple implementation of ILineReader for regions of memory (such as memory-mapped files).

CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:

void AddScore(CScope &scope, CSeq_align &align, CSeq_align::EScoreType score)

@ eScore_ConsensusSplices

CRef< blast::CBlastOptionsHandle > x_SetupBlastOptions(bool cross)

CSplign::THitRefs THitRefs

static THitRef s_ReadBlastHit(const string &m8)

bool x_GetNextComp(istream &ifs, THitRefs *hitrefs, THit::TCoord *psubj_min, THit::TCoord *psubj_max)

bool x_GetNextPair(istream &ifs, THitRefs *hitrefs)

CRef< objects::CSeq_id > x_ReadFastaSetId(const CArgValue &argval, CRef< objects::CScope >)

void x_RunSplign(bool raw_hits, THitRefs *phitrefs, THit::TCoord smin, THit::TCoord smax, CSplign::TResults *psplign_results)

CNcbiOstream * m_logstream

blast::EProgram m_BlastProgram

virtual void Init()

Initialize the application.

CRef< blast::CBlastOptionsHandle > m_BlastOptionsHandle

CRef< CSplignFormatter > m_Formatter

virtual int Run()

Run the application.

void x_LogCompartmentStatus(const THit::TId &query, const THit::TId &subj, const CSplign::SAlignedCompartment &ac)

void x_GetBl2SeqHits(CRef< objects::CSeq_id > seqid_query, CRef< objects::CSeq_id > seqid_subj, CRef< objects::CScope > scope, THitRefs *phitrefs)

void x_ProcessPair(THitRefs &hitrefs, const CArgs &args, THit::TCoord smin=0, THit::TCoord smax=0)

CRef< objects::CObjectManager > m_ObjMgr

static void SetupArgDescriptions(CArgDescriptions *arg_desc)

Setup core splign argument descriptions for the application.

static void ArgsToSplign(CSplign *splign, const CArgs &args)

Translate command line arguments into splign algorithm core settings.

CRef< objects::CSeq_align_set > AsSeqAlignSet(const CSplign::TResults *results=0, int flags=eAF_SplicedSegWithParts) const

Format alignment as a seq-align-set.

void SetSeqIds(CConstRef< objects::CSeq_id > id1, CConstRef< objects::CSeq_id > id2)

string AsExonTable(const CSplign::TResults *results=0, int flags=eTF_None) const

string AsAlignmentText(CRef< objects::CScope > scope, const CSplign::TResults *results=0, size_t line_width=80, int segnum=-1) const

Format alignment as plain text.

@ eAF_SplicedSegWithParts

CSplign is the central library object for computing spliced cDNA-to-genomic alignments.

void Run(THitRefs *hitrefs)

void SetHardMaskRanges(objects::CSeq_id_Handle idh, const TSeqRangeColl &mask_ranges)

CRef< objects::CScope > & SetScope(void)

void SetStrand(bool strand)

const TResults & GetResult(void) const

bool AlignSingleCompartment(THitRefs *hitrefs, THit::TCoord range_left, THit::TCoord range_right, SAlignedCompartment *result)

static CVersionAPI & s_GetVersion(void)

Retrieve the library's version object.

CRef< objects::CScope > GetScope(void) const

Access the scope object that the library will use to retrieve the sequences.

void SetStartModelId(size_t model_id)

size_t GetNextModelId(void) const

vector< SAlignedCompartment > TResults

vector< THitRef > THitRefs

static size_t s_TestPolyA(const char *seq, size_t dim, size_t cds_stop=0)

TOrfPair GetCds(const THit::TId &id, const vector< char > *seq_data=0)

pair< TOrf, TOrf > TOrfPair

Simple implementation of ILineReader for i(o)streams.

Include a standard set of the NCBI C++ Toolkit most basic headers.

Operators to edit gaps in sequences.

static const char * str(char *buf, int n)

static bool s_IsConsensusSplice(const char *donor, const char *acceptor, bool semi_as_cons=false)

static CBlastOptionsHandle * Create(EProgram program, EAPILocality locality=CBlastOptions::eLocal)

Creates an options handle object configured with default options for the requested program,...

CBlastOptions & SetOptions()

Returns a reference to the internal options class which this object is a handle for.

virtual TSeqAlignVector Run()

Perform BLAST search Assuming N queries and M subjects, the structure of the returned vector is as fo...

bool Validate() const

Validate the options contained in this object.

CBlastOptionsHandle & SetOptionsHandle()

Set the options handle.

void SetMaskAtHash(bool val=true)

void SetDustFiltering(bool val=true)

virtual void SetDefaults()

Resets the state of the object to all default values.

void SetFullVersion(CRef< CVersionAPI > version)

Set version data for the program.

void HideStdArgs(THideStdArgs hide_mask)

Set the hide mask for the Hide Std Flags.

virtual const CArgs & GetArgs(void) const

Get parsed command line arguments.

virtual void SetupArgDescriptions(CArgDescriptions *arg_desc)

Setup the command line argument descriptions.

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

#define NON_CONST_ITERATE(Type, Var, Cont)

Non constant version of ITERATE macro.

const CNcbiArguments & GetArguments(void) const

Get the application's cached unprocessed command-line arguments.

@ fHideXmlHelp

Hide XML help description.

@ fHideLogfile

Hide log file description.

@ fHideFullHelp

Hide full help description.

@ fHideFullVersion

Hide full version description.

@ fHideDryRun

Hide dryrun description.

@ fHideConffile

Hide configuration file description.

@ fHideHelp

Hide help description.

@ fHideVersion

Hide version description.

@ eTakeOwnership

An object can take ownership of another.

virtual const string & AsString(void) const =0

Get the argument's string value.

virtual CNcbiIstream & AsInputFile(TFileFlags flags=0) const =0

Get the argument as an input file stream.

CArgAllow_Strings * Allow(const string &value)

Add allowed string values.

@ eInputFile

Name of file (must exist and be readable)

@ eString

An arbitrary string.

@ eOutputFile

Name of file (must be writable)

@ eInteger

Convertible into an integer number (int or Int8)

#define ERR_POST(message)

Error posting with file, line number information but without error codes.

#define LOG_POST(message)

This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...

@ eDiag_Fatal

Fatal error – guarantees exit(or abort)

#define NCBI_THROW(exception_class, err_code, message)

Generic macro to throw an exception, given the exception class, error code and message string.

string ReportAll(TDiagPostFlags flags=eDPF_Exception) const

Report all exceptions.

#define NCBI_THROW2(exception_class, err_code, message, extra)

Throw exception with extra parameter.

void Info(CExceptionArgs_Base &args)

static string NormalizePath(const string &path, EFollowLinks follow_links=eIgnoreLinks)

Normalize a path.

static string CreateAbsolutePath(const string &path, ERelativeToWhat rtw=eRelativeToCwd)

Get an absolute path from some, possibly relative, path.

static bool IsAbsolutePath(const string &path)

Check if a "path" is absolute for the current OS.

static char GetPathSeparator(void)

Get path separator symbol specific for the current platform.

static string ConcatPath(const string &first, const string &second)

Concatenate two parts of the path for the current OS.

bool Create(TCreateFlags flags=fCreate_Default) const

Create the directory using "dirname" passed in the constructor.

static string GetCwd(void)

Get the current working directory.

#define MSerial_AsnText

I/O stream manipulators –.

virtual CRef< CSeq_entry > ReadOneSeq(ILineErrorListener *pMessageListener=nullptr)

Read a single effective sequence, which may turn out to be a segmented set.

@ fAssumeNuc

Assume nucs unless accns indicate otherwise.

@ fOneSeq

Just read the first sequence found.

static SIZE_TYPE ParseFastaIds(CBioseq::TId &ids, const CTempString &s, bool allow_partial_failure=false)

Parse an entire set of |-delimited FASTA-style IDs, appending the results to IDS.

static CSeq_id_Handle GetHandle(const CSeq_id &id)

Normal way of getting a handle, works for any seq-id.

static CRef< CObjectManager > GetInstance(void)

Return the existing object manager or create one.

CBioseq_Handle GetBioseqHandle(const CSeq_id &id)

Get bioseq handle by seq-id.

void AddDefaults(TPriority pri=kPriority_Default)

Add default data loaders from object manager.

CSeqVector GetSeqVector(EVectorCoding coding, ENa_strand strand=eNa_strand_plus) const

Get sequence: Iupacna or Iupacaa if use_iupac_coding is true.

void GetSeqData(TSeqPos start, TSeqPos stop, string &buffer) const

Fill the buffer string with the sequence data for the interval [start, stop).

TObjectType * GetNonNullPointer(void)

Get pointer value and throw a null pointer exception if pointer is null.

bool IsNull(void) const THROWS_NONE

Check if pointer is null – same effect as Empty().

CRef< C > Ref(C *object)

Helper functions to get CRef<> and CConstRef<> objects.

void Reset(void)

Reset reference object.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define USING_SCOPE(ns)

Use the specified namespace.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

IO_PREFIX::istream CNcbiIstream

Portable alias for istream.

static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)

Split a string using specified delimiters.

static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)

Check if a string starts with a specified prefix value.

static string TruncateSpaces(const string &str, ETrunc where=eTrunc_Both)

Truncate whitespace in a string.

@ eNocase

Case insensitive compare.

C::value_type FindBestChoice(const C &container, F score_func)

Find the best choice (lowest score) for values in a container.

Tdata & Set(void)

Assign a value to data member.

list< CRef< CSeq_align > > Tdata

const TSeq & GetSeq(void) const

Get the variant data.

const TId & GetId(void) const

Get the Id member data.

list< CRef< CSeq_id > > TId

Main class to perform a BLAST search on the local machine.

Declares class which provides internal BLAST database representations to the internal BLAST APIs.

vector< CSeq_align const * >::const_iterator TIterator

const string version

version string

#define GetProgramName

Avoid name clash with the NCBI C Toolkit.

void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)

NOTE: This file contains work in progress and the APIs are likely to change, please do not rely on th...

static const float kUndef

string GetLdsDbDir(const string &fasta_dir)

void ReadCompartment(istream &istr, CSplign::THitRefs *phitrefs)

size_t GetNonConsensusSpliceCount(const CSplign::TResults &splign_results)

int main(int argc, const char *argv[])

const char kSplignLdsDb[]

ECompartmentStatus m_Status

Structure to represent a single sequence to be fed to BLAST.


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