Skip to content

Commit

Permalink
Fixed FastqCheckUMI
Browse files Browse the repository at this point in the history
  • Loading branch information
ubuntolog committed Feb 21, 2025
1 parent b98be03 commit 9098079
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/FastqCheckUMI/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ class ConcreteTool

bool isValidSequence(QByteArray barcode, int& length)
{
QRegularExpression seq("[ATCGN]*");
barcode = barcode.trimmed().toUpper();
length = barcode.length();
QRegularExpression seq(QRegularExpression::anchoredPattern("[ATCGN]*"));
barcode = barcode.trimmed().toUpper();
length = barcode.length();
if(seq.match(barcode).hasMatch()) return true;
return false;
return false;
}
};

Expand Down
2 changes: 0 additions & 2 deletions src/GSvar/RepeatExpansionWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ void RepeatExpansionWidget::showContextMenu(QPoint pos)
}
else if (action==a_omim)
{
Log::info("RE!!!!!");
QRegularExpression mim_exp("([0-9]{6})");
QString text = getCell(row, "OMIM disease IDs");

Expand All @@ -208,7 +207,6 @@ void RepeatExpansionWidget::showContextMenu(QPoint pos)
{
QRegularExpressionMatch match = it.next();
QDesktopServices::openUrl(QUrl("https://www.omim.org/entry/" + match.captured(1)));
Log::info(match.captured(1));
}
}
else if (action==a_stripy)
Expand Down
2 changes: 1 addition & 1 deletion src/GSvar/VariantOpenDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void VariantOpenDialog::parseVariant(QString format, QString text, const FastaFi
//1 55056267 . CGGGCTTCTTGTGGCACGT C . .
text = text.replace("\t", " ");

QStringList parts = text.split(QRegExp("\\s+"));
QStringList parts = text.split(QRegularExpression("\\s+"));
if (parts.count()<5) THROW(ArgumentException, "Invalid VCF variant '" + text + "': less than 5 parts found!");

//parse parts
Expand Down
4 changes: 2 additions & 2 deletions src/GSvarServer-TEST/Controller-Test.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ private slots:
IS_TRUE(response.getStatusLine().split('\n').first().contains("404"));
IS_TRUE(response.getPayload().isNull());

QRegExp rx("(length:)(?:\\s*)(\\d+)");
QRegularExpression rx("(length:)(?:\\s*)(\\d+)");
rx.setCaseSensitivity(Qt::CaseInsensitive);
int pos = rx.indexIn(response.getHeaders());

Expand Down Expand Up @@ -265,7 +265,7 @@ private slots:
IS_TRUE(response.getStatusLine().split('\n').first().contains("200"));
IS_TRUE(response.getPayload().isNull());

QRegExp rx("(length:)(?:\\s*)(\\d+)");
QRegularExpression rx("(length:)(?:\\s*)(\\d+)");
rx.setCaseSensitivity(Qt::CaseInsensitive);
int pos = rx.indexIn(response.getHeaders());

Expand Down

0 comments on commit 9098079

Please sign in to comment.