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/bam__utils_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/packages/pkg_sequence/bam_utils.cpp Source File

69  if

( !seq_id && id_str.find(

'|'

) !=

NPOS

) {

74

seq_id = *ids.begin();

99  const string

& annot_name,

103  bool

is_estimated =

false

) :

110  if

(!assembly.empty()) {

121

unique_ptr<IIdMapper> mapper;

138  bool

need_id_mapping =

false

;

143

need_id_mapping =

true

;

154  auto

mapper =

m_Data

->GetMapper();

162  if

(annot_t && need_id_mapping &&

m_Data

->assm) {

163  auto

mapper =

m_Data

->GetMapper();

164

mapper->MapObject(*annot_t);

170

lock_guard<mutex> guard(

m_Data

->data_mutex);

176

move(src.begin(), src.end(), back_inserter(target));

179  m_Data

->annot->SetTitleDesc(

m_Data

->AnnotName +

" coverage graph"

);

192  const string

& index_file,

193  const string

& annot_name,

194  const string

& target_assembly,

200

shared_ptr<SCoverageData>

data

= make_shared<SCoverageData>(target_assembly,

207

vector<string> ref_ids;

211  CBamDb

db(mgr, bam_file, index_file);

212  auto

mapper =

data

->GetMapper();

222

return seq_id->Match(*ref_seq_id);

224  if

(it == ids->end())

227

ref_ids.push_back(sit.GetRefSeqId());

233  if

(ref_ids.size() == 1) {

237  static const int

kNumConvertorThreads = 6;

238  int

num_threads = max<int>(2, ref_ids.size() >= kNumConvertorThreads ? kNumConvertorThreads :

static_cast<int>

(ref_ids.size()));

239  CThreadPool

thread_pool(

static_cast<unsigned int>

(ref_ids.size()), num_threads);

240  for

(

auto

ref_id : ref_ids) {

268  for

(

auto

& desc : seq_annot.

GetDesc

().

Get

()) {

271  auto

& user = desc->GetUser();

272  if

(!(user.CanGetType() &&

273

user.GetType().IsStr() &&

280

bam_data = user.GetField(

kSourceFile

).GetString();

282

bam_index = user.GetField(

kIndexFile

).GetString();

284

assembly = user.GetField(

kAssembly

).GetString();

285

}

catch

(exception& e) {

289  if

(bam_data.empty())

298  else if

(!

value

.empty())

309  for

(

auto

& desc : seq_annot.

SetDesc

().Set()) {

312  auto

& user = desc->SetUser();

313  if

(!(user.CanGetType() &&

314

user.GetType().IsStr() &&

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

static void s_UpdateField(CUser_object &uo, const string &name, const string &value)

static CRef< CSeq_id > s_GetRefSeq_id(const string &id_str)

static const string kAssembly

static const string kIndexFile

struct SCoverageData SCoverageData

static const string kBAM_coverage

static const string kSourceFile

void SetGraphBinSize(TSeqPos bin_size)

void SetGraphTitle(const string &title)

void SetEstimated(bool estimated=true)

void SetGraphValueType(EGraphValueType type)

void SetAnnotName(const string &name)

CRef< CSeq_annot > MakeSeq_annot(CBamMgr &mgr, const string &bam_file, const string &bam_index)

Generate Seq-annot for BAM file using BAM file index.

void SetRefLabel(const string &ref_label)

void SetRefId(const CSeq_id &ref_id)

void SetIdMapper(IIdMapper *idmapper, EOwnership ownership)

static CRef< objects::CSeq_annot > CreateCoverageGraphs(const string &bam_file, const string &index_file, const string &annot_name, const string &assembly, int bin_size=1000, TSeqIdsVector *ids=0, bool is_esitmated=false, ICanceled *canceled=0)

static bool GetCoverageGraphInfo(const objects::CSeq_annot &seq_annot, string &bam_data, string &bam_index, string &assembly)

vector< CConstRef< objects::CSeq_id > > TSeqIdsVector

static void UpdateCoverageGraphInfo(objects::CSeq_annot &seq_annot, const string &bam_data, const string &bam_index, const string &assembly)

shared_ptr< SCoverageData > m_Data

CCreateCoverageTask(const string &id, shared_ptr< SCoverageData > data)

EStatus Execute(void)

Do the actual job.

static CRef< CGencollSvc > GetInstance(void)

void AddUserObject(CUser_object &obj)

Abstract class for representing single task executing in pool of threads To use this class in applica...

Main class implementing functionality of pool of threads.

CUser_field & SetValue(int value)

set a data field to a given value Int8 and TGi values can be stored into 'str' field if the value doe...

bool HasField(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const

Verify that a named field exists.

CUser_object & AddField(const string &label, const string &value, EParseField parse=eParse_String)

add a data field to the user object that holds a given value

CUser_field & SetField(const string &str, const string &delim=".", const string &obj_subtype=kEmptyStr, NStr::ECase use_case=NStr::eCase)

Access a named field in this user object.

Interface for testing cancellation request in a long lasting operation.

@ eNoOwnership

No ownership is assumed.

#define ERR_POST(message)

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

void Error(CExceptionArgs_Base &args)

static IIdMapper * GetIdMapper(CRef< objects::CGC_Assembly > assm)

static SIZE_TYPE ParseIDs(CBioseq::TId &ids, const CTempString &s, TParseFlags flags=fParse_Default)

Parse a string representing one or more Seq-ids, appending the results to IDS.

static CRef< CObjectManager > GetInstance(void)

Return the existing object manager or create one.

void AddDefaults(TPriority pri=kPriority_Default)

Add default data loaders from object manager.

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 BEGIN_NCBI_SCOPE

Define ncbi namespace.

virtual bool IsCanceled(void) const =0

EStatus

Status of the task.

void CancelTasks(TExclusiveFlags tasks_group)

Cancel the selected groups of tasks in the pool.

unsigned int GetExecutingTasksCount(void) const

Get the number of currently executing tasks.

bool IsCancelRequested(void) const

Check if cancellation of the task was requested.

void AddTask(CThreadPool_Task *task, const CTimeSpan *timeout=NULL)

Add task to the pool for execution.

unsigned int GetQueuedTasksCount(void) const

Get the number of tasks currently waiting in queue.

@ eCompleted

executed successfully

@ eCanceled

canceled - possible only if canceled before processing was started or if method Execute() returns res...

@ fCancelQueuedTasks

Cancel all tasks waiting in the queue and not yet executing.

@ fCancelExecutingTasks

Cancel all currently executing tasks.

void SetType(TType &value)

Assign a value to Type data member.

TGi GetGi(void) const

Get the variant data.

bool IsLocal(void) const

Check if variant Local is selected.

bool IsGi(void) const

Check if variant Gi is selected.

void SetData(TData &value)

Assign a value to Data data member.

const Tdata & Get(void) const

Get the member data.

list< CRef< CSeq_graph > > TGraph

void SetDesc(TDesc &value)

Assign a value to Desc data member.

const TDesc & GetDesc(void) const

Get the Desc member data.

list< CRef< CSeq_id > > TId

bool IsSetDesc(void) const

used only for stand alone Seq-annots Check if a value has been assigned to Desc data member.

Pool of generic task-executing threads.

double value_type

The numeric datatype used by the parser.

const GenericPointer< typename T::ValueType > T2 value

void SleepMilliSec(unsigned long ml_sec, EInterruptOnSignal onsignal=eRestartOnSignal)

SCoverageData(const string &assembly, const string &annot_name, int bin_size, const string &bam_file, const string &index_file, bool is_estimated=false)

unique_ptr< IIdMapper > GetMapper()

CRef< CGC_Assembly > assm


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