コード例 #1
0
PrimerLibraryModel::PrimerLibraryModel(QObject *parent)
: QAbstractItemModel(parent)
{
    U2OpStatus2Log os;
    PrimerLibrary *primerLibrary = PrimerLibrary::getInstance(os);
    SAFE_POINT_OP(os, );
    primers = primerLibrary->getPrimers(os);
}
コード例 #2
0
void ImportPrimerFromObjectTask::run() {
    primer.name = sequenceObject->getGObjectName();
    primer.sequence = sequenceObject->getWholeSequenceData(stateInfo);
    CHECK_OP(stateInfo, );

    int pos = 0;
    if (validator.validate(primer.sequence, pos) == QValidator::Invalid) {
        setError(tr("The primer sequence contains non-ACGT symbols"));
        return;
    }

    PrimerLibrary *library = PrimerLibrary::getInstance(stateInfo);
    CHECK_OP(stateInfo, );
    library->addRawPrimer(primer, stateInfo);
}
コード例 #3
0
void ImportPrimerFromObjectTask::run() {
    primer.name = sequenceObject->getGObjectName();
    primer.sequence = sequenceObject->getWholeSequenceData(stateInfo);
    CHECK_OP(stateInfo, );

    QRegExp regExp("[^ACGT]");
    if (primer.sequence.contains(regExp)) {
        setError(tr("The primer sequence contains non-ACGT symbols"));
        return;
    }

    PrimerLibrary *library = PrimerLibrary::getInstance(stateInfo);
    CHECK_OP(stateInfo, );
    library->addRawPrimer(primer, stateInfo);
}