/******************************************* * WorkflowRunFromCMDLineBase *******************************************/ WorkflowRunFromCMDLineBase::WorkflowRunFromCMDLineBase() : Task(tr("Workflow run from cmdline"), TaskFlag_None), schema(NULL), optionsStartAt(-1), loadTask(NULL), workflowRunTask(NULL) { GCOUNTER(cvar,tvar,"workflow_run_from_cmdline"); CMDLineRegistry * cmdLineRegistry = AppContext::getCMDLineRegistry(); // try to process schema without 'task' option (it can only be the first one) QStringList pureValues = CMDLineRegistryUtils::getPureValues(); if( !pureValues.isEmpty() ) { QString schemaName = pureValues.first(); processLoadSchemaTask( schemaName, 1 ); // because after program name } if( loadTask != NULL ) { addSubTask( loadTask ); return; } // process schema with 'task' option int taskOptionIdx = CMDLineRegistryUtils::getParameterIndex( WorkflowDesignerPlugin::RUN_WORKFLOW ); if(taskOptionIdx != -1) { processLoadSchemaTask( cmdLineRegistry->getParameterValue( WorkflowDesignerPlugin::RUN_WORKFLOW, taskOptionIdx ), taskOptionIdx ); } if( loadTask == NULL ) { setError( tr( "no task to run" ) ); return; } addSubTask( loadTask ); }
void DatasetsListWidget::sl_newDataset() { GCOUNTER(cvar, tvar, "WD::Dataset::New Dataset"); QString error; QString text = getTip(); do { bool ok = false; text = QInputDialog::getText(this, tr("Enter Dataset Name"), tr("New dataset name:"), QLineEdit::Normal, text, &ok); if (!ok) { return; } U2OpStatusImpl os; ctrl->addDataset(text, os); error = os.getError(); if (!error.isEmpty()) { QMessageBox::critical(this, tr("Error"), error); } } while (!error.isEmpty()); // activate the tab after adding tabs->setCurrentIndex(tabs->count() - 1); }
void DatasetsListWidget::sl_renameDataset() { GCOUNTER(cvar, tvar, "WD::Dataset::Rename Dataset"); QAction *a = dynamic_cast<QAction*>(sender()); CHECK(NULL != a, ); int idx = a->property("idx").toInt(); CHECK(idx < tabs->count(), ); bool error = false; QString text = tabs->tabText(idx); do { bool ok = false; text = QInputDialog::getText(this, tr("Rename Dataset"), tr("New dataset name:"), QLineEdit::Normal, text, &ok); if (!ok) { return; } U2OpStatusImpl os; ctrl->renameDataset(idx, text, os); if (os.hasError()) { QMessageBox::critical(this, tr("Error"), os.getError()); } error = os.hasError(); } while (error); tabs->setTabText(idx, text); }
void DatasetsListWidget::sl_deleteDataset(int idx) { GCOUNTER(cvar, tvar, "WD::Dataset::Delete Dataset"); QWidget *w = tabs->widget(idx); tabs->removeTab(idx); ctrl->deleteDataset(idx); delete w; }
HMMCalibrateTask::HMMCalibrateTask(plan7_s* hmm, const UHMMCalibrateSettings& s) : HMMCalibrateAbstractTask("", hmm, s) { GCOUNTER( cvar, tvar, "HMMCalibrateTask" ); setTaskName(tr("HMM calibrate '%1'").arg(hmm->name)); tpm = Task::Progress_Manual; }
BlastDBCmdSupportTask::BlastDBCmdSupportTask(const BlastDBCmdSupportTaskSettings& _settings) : Task("Run NCBI BlastDBCmd task", TaskFlags_NR_FOSCOE),settings(_settings) { GCOUNTER( cvar, tvar, "BlastDBCmdSupportTask" ); blastDBCmdTask=NULL; toolName = ET_BLASTDBCMD; }
ExportMSA2SequencesTask::ExportMSA2SequencesTask(const MultipleSequenceAlignment& _ma, const QString& _url, bool _trimAli, DocumentFormatId _format) : DocumentProviderTask(tr("Export alignment to sequence: %1").arg(_url), TaskFlag_None), ma(_ma->getCopy()), url(_url), trimAli(_trimAli), format(_format) { GCOUNTER( cvar, tvar, "ExportMSA2SequencesTask"); setVerboseLogMode(true); }
ORFFindTask::ORFFindTask(const ORFAlgorithmSettings& s,const U2EntityRef& _entityRef) : Task (tr("ORF find"), TaskFlag_None),config(s),entityRef(_entityRef) { GCOUNTER( cvar, tvar, "ORFFindTask" ); tpm = Progress_Manual; assert(config.proteinTT && config.proteinTT->isThree2One()); }
PrimersDetailsDialog::PrimersDetailsDialog(QWidget *parent, const QString &details) : QDialog(parent) { GCOUNTER(cvar, tvar, "PrimersDetailsDialog"); setupUi(this); new HelpButton(this, buttonBox, "17469030"); textEdit->setText(details); }
SaveMSA2SequencesTask::SaveMSA2SequencesTask(const MAlignment& _ma, const QString& _url, bool _trimAli, DocumentFormatId _format) : Task(tr("Export alignment to sequence: %1").arg(_url), TaskFlag_None), ma(_ma), url(_url), trimAli(_trimAli), format(_format) { GCOUNTER( cvar, tvar, "ExportMSA2SequencesTask" ); setVerboseLogMode(true); stateInfo.setProgress(0); }
FormatDBSupportTask::FormatDBSupportTask(const QString& name, const FormatDBSupportTaskSettings& _settings) : Task(tr("Run NCBI FormatDB task"), TaskFlags_NR_FOSE_COSC | TaskFlag_ReportingIsSupported | TaskFlag_ReportingIsEnabled), prepareTask(NULL), formatDBTask(NULL), toolName(name), settings(_settings) { GCOUNTER(cvar, tvar, "FormatDBSupportTask"); }
////////////////////////////////////////////////////////////////////////// // DNAExportAlignmentTask ExportAlignmentTask::ExportAlignmentTask(const MultipleSequenceAlignment& _ma, const QString& _fileName, DocumentFormatId _f) : DocumentProviderTask("", TaskFlag_None), ma(_ma->getCopy()), fileName(_fileName), format(_f) { GCOUNTER( cvar, tvar, "ExportAlignmentTask" ); setTaskName(tr("Export alignment to '%1'").arg(QFileInfo(fileName).fileName())); setVerboseLogMode(true); assert(!ma->isEmpty()); }
void EditPrimerDialog::init() { GCOUNTER(cvar, tvar, "Add primer in library"); setupUi(this); new HelpButton(this, buttonBox, "17467823"); primerEdit->setValidator(new PrimerValidator(this)); connect(primerEdit, SIGNAL(textEdited(const QString &)), SLOT(sl_onPrimerChanged(const QString &))); connect(primerEdit, SIGNAL(textChanged(const QString &)), SLOT(sl_validate())); connect(nameEdit, SIGNAL(textChanged(const QString &)), SLOT(sl_validate())); sl_validate(); }
DNASequenceGeneratorTask::DNASequenceGeneratorTask(const DNASequenceGeneratorConfig& cfg) : Task(tr("Generate sequence task"), TaskFlag_NoRun), cfg(cfg), loadRefTask(NULL), evalTask(NULL), generateTask(NULL), saveTask(NULL) { GCOUNTER( cvar, tvar, "DNASequenceGeneratorTask" ); if (cfg.useReference()) { // do not load reference file if it is already in project and has loaded state const QString& docUrl = cfg.getReferenceUrl(); Project* prj = AppContext::getProject(); if (prj) { Document* doc = prj->findDocumentByURL(docUrl); if (doc && doc->isLoaded()) { QString err; evalTask = createEvaluationTask(doc, err); if (evalTask) { addSubTask(evalTask); } else { stateInfo.setError(err); } return; } } loadRefTask = LoadDocumentTask::getDefaultLoadDocTask(GUrl(docUrl)); if (loadRefTask) { addSubTask(loadRefTask); } else { stateInfo.setError(tr("Incorrect reference file")); return; } } else { generateTask = new GenerateDNASequenceTask(cfg.getContent(), cfg.getLength(), cfg.window, cfg.getNumberOfSequences(), cfg.seed); addSubTask(generateTask); } }
MuscleTask::MuscleTask(const MultipleSequenceAlignment &ma, const MuscleTaskSettings& _config) : Task(tr("MUSCLE alignment"), TaskFlags_FOSCOE | TaskFlag_MinimizeSubtaskErrorText), config(_config), inputMA(ma->getExplicitCopy()) { GCOUNTER( cvar, tvar, "MuscleTask" ); config.nThreads = (config.nThreads == 0 ? AppContext::getAppSettings()->getAppResourcePool()->getIdealThreadCount() : config.nThreads); SAFE_POINT_EXT(config.nThreads > 0, setError("Incorrect number of max parallel subtasks"), ); setMaxParallelSubtasks(config.nThreads); algoLog.info(tr("MUSCLE alignment started")); ctx = new MuscleContext(config.nThreads); ctx->params.g_bStable = config.stableMode; ctx->params.g_uMaxIters = config.maxIterations; ctx->params.g_ulMaxSecs = config.maxSecs; parallelSubTask = NULL; //todo: make more precise estimation, use config.op mode int aliLen = ma->getLength(); int nSeq = ma->getNumRows(); int memUseMB = qint64(aliLen) * qint64(nSeq) * 200 / (1024 * 1024); //200x per char in alignment TaskResourceUsage tru(RESOURCE_MEMORY, memUseMB); QString inputAlName = inputMA->getName(); resultMA->setName(inputAlName); resultSubMA->setName(inputAlName); inputSubMA = inputMA->getExplicitCopy(); if (config.alignRegion && config.regionToAlign.length != inputMA->getLength()) { SAFE_POINT_EXT(config.regionToAlign.length > 0, setError(tr("Incorrect region to align")), ); inputSubMA = inputMA->mid(config.regionToAlign.startPos, config.regionToAlign.length); CHECK_EXT(inputSubMA != MultipleSequenceAlignment(), setError(tr("Stopping MUSCLE task, because of error in MultipleSequenceAlignment::mid function")), ); }
WorkflowEditor::WorkflowEditor(WorkflowView *p) : QWidget(p), owner(p), custom(NULL), customWidget(NULL), subject(NULL), actor(NULL), onFirstTableShow(true) { GCOUNTER( cvar, tvar, "WorkflowEditor" ); setupUi(this); specialParameters = new SpecialParametersPanel(this); tableSplitter->insertWidget(0, specialParameters); specialParameters->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); table->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); specialParameters->hide(); #ifdef Q_OS_MAC QString style("QGroupBox::title {margin-top: 1px; margin-left: 15px;}"); editorBox->setStyleSheet(style); #endif QVBoxLayout *inputScrollAreaContainerLayout = new QVBoxLayout(); inputScrollAreaContainerLayout->setContentsMargins(0, 0, 0, 0); inputScrollAreaContainerLayout->setSpacing(0); inputScrollAreaContainerLayout->setSizeConstraint(QLayout::SetMinAndMaxSize); inputScrollAreaContainer->setLayout(inputScrollAreaContainerLayout); inputPortBox->setEnabled(false); inputPortBox->setVisible(true); connect(inputPortBox, SIGNAL(toggled(bool)), SLOT(sl_changeVisibleInput(bool))); QVBoxLayout *outputScrollAreaContainerLayout = new QVBoxLayout(); outputScrollAreaContainerLayout->setContentsMargins(0, 0, 0, 0); outputScrollAreaContainerLayout->setSpacing(0); outputScrollAreaContainerLayout->setSizeConstraint(QLayout::SetMinAndMaxSize); outputScrollAreaContainer->setLayout(outputScrollAreaContainerLayout); outputPortBox->setEnabled(false); outputPortBox->setVisible(true); connect(outputPortBox, SIGNAL(toggled(bool)), SLOT(sl_changeVisibleOutput(bool))); caption->setMinimumHeight(nameEdit->sizeHint().height()); actorModel = new ActorCfgModel(this, owner); proxyModel = new ActorCfgFilterProxyModel(this); proxyModel->setSourceModel(actorModel); table->setModel(proxyModel); table->horizontalHeader()->setSectionsClickable(false); table->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive); table->verticalHeader()->hide(); table->verticalHeader()->setDefaultSectionSize(QFontMetrics(QFont()).height() + 6); table->setItemDelegate(new SuperDelegate(this)); table->installEventFilter(this); reset(); doc->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); propDoc->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); doc->installEventFilter(this); connect(nameEdit, SIGNAL(editingFinished()), SLOT(editingLabelFinished())); connect(table->selectionModel(), SIGNAL(currentChanged(QModelIndex, QModelIndex)), SLOT(sl_showPropDoc())); connect(table->model(), SIGNAL(dataChanged(QModelIndex, QModelIndex)), SLOT(handleDataChanged(QModelIndex, QModelIndex))); // FIXME //connect(doc, SIGNAL(customContextMenuRequested(const QPoint &)), SLOT(sl_contextMenuForDoc(const QPoint &))); table->setTabKeyNavigation(true); }
////////////////////////////////////////////////////// //CASAVAFilterTask CASAVAFilterTask::CASAVAFilterTask(const BaseNGSSetting &settings) :BaseNGSTask(settings){ GCOUNTER(cvar, tvar, "NGS:CASAVAFilterTask"); }
////////////////////////////////////////////////////// //QualityTrimTask QualityTrimTask::QualityTrimTask(const BaseNGSSetting &settings) :BaseNGSTask(settings){ GCOUNTER(cvar, tvar, "NGS:FASTQQualityTrimmerTask"); }
////////////////////////////////////////////////////// //MergeFastqTask MergeFastqTask::MergeFastqTask(const BaseNGSSetting &settings) :BaseNGSTask(settings){ GCOUNTER(cvar, tvar, "NGS:FASTQMergeFastqmerTask"); }
void CreateAnnotationOptionsPanelWidget::countDescriptionUsage() const { if (!leDescription->text().isEmpty()) { GCOUNTER(cvar, tvar, "CreateAnnotationOptionsPanelWidget: description is used"); } }
SolventAccessibleSurface::SolventAccessibleSurface() { GCOUNTER( cvar, tvar, "SolventAccessibleSurface" ); }