Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/master' into lrGS_Methyl…
Browse files Browse the repository at this point in the history
…artist
  • Loading branch information
leonschuetz committed Jan 21, 2025
2 parents fc38567 + 55e6561 commit e1a0b74
Show file tree
Hide file tree
Showing 36 changed files with 671 additions and 882 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ The default output format of the quality control tools is [qcML](https://pubmed.

### VCF tools (small variants)

* [VcfAdd](doc/tools/VcfAdd.md) - Appends variants from a VCF file to another VCF file.
* [VcfAdd](doc/tools/VcfAdd.md) - Merges several VCF files into one VCF by appending one to the other.
* [VcfAnnotateConsequence](doc/tools/VcfAnnotateConsequence.md) - Adds transcript-specific consequence predictions to a VCF file (similar to Ensembl VEP).
* [VcfAnnotateFromBed](doc/tools/VcfAnnotateFromBed.md) - Annotates the INFO column of a VCF with data from a BED file.
* [VcfAnnotateFromBigWig](doc/tools/VcfAnnotateFromBigWig.md) - Annotates the INFO column of a VCF with data from a BED file.
Expand All @@ -137,7 +137,6 @@ The default output format of the quality control tools is [qcML](https://pubmed.
* [VcfExtractSamples](doc/tools/VcfExtractSamples.md) - Extract one or several samples from a VCF file. Can also be used to re-order sample columns.
* [VcfFilter](doc/tools/VcfFilter.md) - Filters a VCF based on the given criteria.
* [VcfLeftNormalize](doc/tools/VcfLeftNormalize.md) - Normalizes all variants and shifts indels to the left in a VCF file.
* [VcfMerge](doc/tools/VcfMerge.md) - Merges several VCF files into one VCF.
* [VcfSort](doc/tools/VcfSort.md) - Sorts variant lists according to chromosomal position.
* [VcfSplit](doc/tools/VcfSplit.md) - Splits a VCF into several chunks.
* [VcfStrip](doc/tools/VcfStrip.md) - Removes unwanted information from a VCF file
Expand Down
2 changes: 1 addition & 1 deletion bin/GSvar_filters.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Annotated pathogenic action=KEEP sources=HGMD,ClinVar also_likely_pathogenic=tru
Allele frequency max_af=3.0
Filter columns action=REMOVE entries=low_mappability,mosaic
Classification NGSD action=REMOVE classes=1,2
Classification NGSD action=KEEP classes=3,4,5,M,R*
Classification NGSD action=KEEP classes=3,4,5,M,R

#rare variants (non-coding, predicted splicing change)
Allele frequency max_af=1
Expand Down
7 changes: 7 additions & 0 deletions doc/GSvar/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# GSvar change log

## 2024_11-86 (20.01.25)

- general: renamed class 'R*' to 'R' (changed in HerediCare and HerediVar)
- general: improved opening QC files from GSvarServer
- variant details: updated allOfUs variant URL
- NGSD: Added device type 'Revio'

## 2024_11-50 (07.01.25)

- general: added sample counts dialog (NGSD > Sample counts)
Expand Down
6 changes: 4 additions & 2 deletions doc/tools/TsvSlice.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### TsvSlice tool help
TsvSlice (2024_08-113-g94a3b440)
TsvSlice (2024_11-86-g94c45dea)

Extracts/reorders columns of a TSV file.

Expand All @@ -13,6 +13,8 @@
Default value: ''
-numeric If set, column names are interpreted as 1-based column numbers.
Default value: 'false'
-rm If set, the columns given in 'cols' are removed instead of extracted.
Default value: 'false'

Special parameters:
--help Shows this help and exits.
Expand All @@ -22,6 +24,6 @@
--settings [file] Settings override file (no other settings files are used).

### TsvSlice changelog
TsvSlice 2024_08-113-g94a3b440
TsvSlice 2024_11-86-g94c45dea

[back to ngs-bits](https://github.com/imgag/ngs-bits)
6 changes: 3 additions & 3 deletions doc/tools/VariantFilterAnnotations.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### VariantFilterAnnotations tool help
VariantFilterAnnotations (2024_11-59-ge0a7288e)
VariantFilterAnnotations (2024_11-86-g94c45dea)

Filter a variant list in GSvar format based on variant annotations.

Expand Down Expand Up @@ -27,7 +27,7 @@
action - Action to perform [default=KEEP] [valid=KEEP,FILTER]
Classification NGSD Filter for variant classification from NGSD.
Parameters:
classes - NGSD classes [default=4,5] [valid=1,2,3,4,5,M,R*] [non-empty]
classes - NGSD classes [default=4,5] [valid=1,2,3,4,5,M,R] [non-empty]
action - Action to perform [default=KEEP] [valid=KEEP,FILTER,REMOVE]
Column match Filter that matches the content of a column against a perl-compatible regular expression.
For details about regular expressions, see http://perldoc.perl.org/perlretut.html
Expand Down Expand Up @@ -183,7 +183,7 @@
--settings [file] Settings override file (no other settings files are used).

### VariantFilterAnnotations changelog
VariantFilterAnnotations 2024_11-59-ge0a7288e
VariantFilterAnnotations 2024_11-86-g94c45dea

2018-07-30 Replaced command-line parameters by INI file and added many new filters.
2017-06-14 Refactoring of genotype-based filters: now also supports multi-sample filtering of affected and control samples.
Expand Down
20 changes: 10 additions & 10 deletions doc/tools/VcfAdd.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
### VcfAdd tool help
VcfAdd (2024_08-110-g317f43b9)
VcfAdd (2024_11-86-g94c45dea)

Appends variants from a VCF file to another VCF file.
Merges several VCF files into one VCF by appending one to the other.

VCF header lines are taken from 'in' only.
Variant lines from all other input files are appended to the first input file.
VCF header lines are taken from the first input file only.

Mandatory parameters:
-in2 <file> Input VCF file that is added to 'in'.
-in <filelist> Input VCF ro VCG.GZ files to merge.

Optional parameters:
-in <file> Input VCF file to add 'in2' to.
-out <file> Output VCF file with all variants.
Default value: ''
-out <file> Output VCF file with variants from 'in' and 'in2'.
Default value: ''
-filter <string> Tag variants from 'in2' with this filter entry.
-filter <string> Tag variants from all but the first input file with this filter entry.
Default value: ''
-filter_desc <string> Description used in the filter header - use underscore instead of spaces.
Default value: ''
-skip_duplicates Skip variants from 'in2' which are also contained in 'in'.
-skip_duplicates Skip variants if they occur more than once.
Default value: 'false'

Special parameters:
Expand All @@ -28,7 +27,8 @@
--settings [file] Settings override file (no other settings files are used).

### VcfAdd changelog
VcfAdd 2024_08-110-g317f43b9
VcfAdd 2024_11-86-g94c45dea

2025-01-17 Added support for gzipped VCFs and removing duplicates if there is only one input file.
2022-12-08 Initial implementation.
[back to ngs-bits](https://github.com/imgag/ngs-bits)
25 changes: 0 additions & 25 deletions doc/tools/VcfMerge.md

This file was deleted.

4 changes: 2 additions & 2 deletions src/GSvar/ClinvarUploadDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3048,7 +3048,7 @@ QString ClinvarUploadDialog::convertClassification(QString classification, bool
}
if (classification=="Established risk allele")
{
return "R*";
return "R";
}
}
else
Expand All @@ -3073,7 +3073,7 @@ QString ClinvarUploadDialog::convertClassification(QString classification, bool
{
return "Benign";
}
if (classification=="R*")
if (classification=="R")
{
return "Established risk allele";
}
Expand Down
66 changes: 39 additions & 27 deletions src/GSvar/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ MainWindow::MainWindow(QWidget *parent)
ui_.splitter_2->setStretchFactor(0, 10);
ui_.splitter_2->setStretchFactor(1, 1);
connect(ui_.tabs, SIGNAL(tabCloseRequested(int)), this, SLOT(closeTab(int)));
connect(ui_.tabs, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(tabContextMenu(QPoint)));

// add rna menu
rna_menu_btn_ = new QToolButton();
Expand Down Expand Up @@ -2242,7 +2243,7 @@ void MainWindow::openProcessedSampleFromNGSD(QString processed_sample_name, bool
analyses << GlobalServiceProvider::database().secondaryAnalyses(processed_sample_name + "-" + normal_sample, "somatic");
}
//check for germline trio/multi analyses
else if (search_multi)
if (search_multi)
{
analyses << GlobalServiceProvider::database().secondaryAnalyses(processed_sample_name, "trio");
analyses << GlobalServiceProvider::database().secondaryAnalyses(processed_sample_name, "multi sample");
Expand Down Expand Up @@ -2387,10 +2388,7 @@ void MainWindow::openProcessedSampleTab(QString ps_name)
connect(widget, SIGNAL(clearMainTableSomReport(QString)), this, SLOT(clearSomaticReportSettings(QString)));
connect(widget, SIGNAL(addModelessDialog(QSharedPointer<QDialog>, bool)), this, SLOT(addModelessDialog(QSharedPointer<QDialog>, bool)));
int index = openTab(QIcon(":/Icons/NGSD_sample.png"), ps_name, type, widget);
if (Settings::boolean("debug_mode_enabled"))
{
ui_.tabs->setTabToolTip(index, "NGSD ID: " + ps_id);
}
ui_.tabs->tabBar()->setTabData(index, ps_id);
}
catch (Exception& e)
{
Expand All @@ -2417,10 +2415,7 @@ void MainWindow::openRunTab(QString run_name)
SequencingRunWidget* widget = new SequencingRunWidget(this, QStringList() << run_id);
connect(widget, SIGNAL(addModelessDialog(QSharedPointer<QDialog>, bool)), this, SLOT(addModelessDialog(QSharedPointer<QDialog>, bool)));
int index = openTab(QIcon(":/Icons/NGSD_run.png"), run_name, type, widget);
if (Settings::boolean("debug_mode_enabled"))
{
ui_.tabs->setTabToolTip(index, "NGSD ID: " + run_id);
}
ui_.tabs->tabBar()->setTabData(index, run_id);
}

void MainWindow::openRunBatchTab(const QStringList& run_names)
Expand Down Expand Up @@ -2466,10 +2461,7 @@ void MainWindow::openGeneTab(QString symbol)

GeneWidget* widget = new GeneWidget(this, symbol.toUtf8());
int index = openTab(QIcon(":/Icons/NGSD_gene.png"), symbol, type, widget);
if (Settings::boolean("debug_mode_enabled"))
{
ui_.tabs->setTabToolTip(index, "NGSD ID: " + QString::number(NGSD().geneId(symbol.toUtf8())));
}
ui_.tabs->tabBar()->setTabData(index, QString::number(NGSD().geneId(symbol.toUtf8())));
}

void MainWindow::openVariantTab(Variant variant)
Expand All @@ -2487,12 +2479,7 @@ void MainWindow::openVariantTab(Variant variant)
//open tab
VariantWidget* widget = new VariantWidget(variant, this);
int index = openTab(QIcon(":/Icons/NGSD_variant.png"), name, type, widget);

//add database id
if (Settings::boolean("debug_mode_enabled"))
{
ui_.tabs->setTabToolTip(index, "NGSD ID: " + v_id);
}
ui_.tabs->tabBar()->setTabData(index, v_id);
}
catch(Exception& e)
{
Expand All @@ -2516,10 +2503,7 @@ void MainWindow::openProcessingSystemTab(QString system_name)

ProcessingSystemWidget* widget = new ProcessingSystemWidget(this, sys_id);
int index = openTab(QIcon(":/Icons/NGSD_processing_system.png"), name, type, widget);
if (Settings::boolean("debug_mode_enabled"))
{
ui_.tabs->setTabToolTip(index, "NGSD ID: " + QString::number(sys_id));
}
ui_.tabs->tabBar()->setTabData(index, QString::number(sys_id));
}

void MainWindow::openProjectTab(QString name)
Expand All @@ -2529,10 +2513,7 @@ void MainWindow::openProjectTab(QString name)

ProjectWidget* widget = new ProjectWidget(this, name);
int index = openTab(QIcon(":/Icons/NGSD_project.png"), name, type, widget);
if (Settings::boolean("debug_mode_enabled"))
{
ui_.tabs->setTabToolTip(index, "NGSD ID: " + NGSD().getValue("SELECT id FROM project WHERE name=:0", true, name).toString());
}
ui_.tabs->tabBar()->setTabData(index, NGSD().getValue("SELECT id FROM project WHERE name=:0", true, name).toString());
}

int MainWindow::openTab(QIcon icon, QString name, TabType type, QWidget* widget)
Expand Down Expand Up @@ -2600,6 +2581,37 @@ bool MainWindow::focusTab(TabType type, QString name)
return false;
}

void MainWindow::tabContextMenu(QPoint pos)
{
int index = ui_.tabs->tabBar()->tabAt(pos);
QString data = ui_.tabs->tabBar()->tabData(index).toString();

// create menu
QMenu menu(ui_.tabs);
QAction* a_copy_text = menu.addAction("Copy text");
a_copy_text->setEnabled(index!=-1);
QAction* a_copy_id = menu.addAction("Copy NGSD id");
a_copy_id->setEnabled(index!=-1 && !data.isEmpty());

// execute menu
QAction* action = menu.exec(ui_.tabs->mapToGlobal(pos));
if (action == nullptr) return;

// execute
if (action==a_copy_text)
{
QApplication::clipboard()->setText(ui_.tabs->tabText(index));
}
else if (action==a_copy_id)
{
QApplication::clipboard()->setText(data);
}
else
{
THROW(ProgrammingException, "Invalid menu action in context menu selected!")
}
}

void MainWindow::on_actionChangeLog_triggered()
{
QDesktopServices::openUrl(QUrl("https://github.com/imgag/ngs-bits/tree/master/doc/GSvar/changelog.md"));
Expand Down
2 changes: 2 additions & 0 deletions src/GSvar/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,8 @@ public slots:
void closeTab(int index);
///Focus tab based on type and name. Returns if a tab was found and focused.
bool focusTab(TabType type, QString name);
///Show context menu of tab
void tabContextMenu(QPoint pos);

///Edits the variant configuration for the variant with the given index
void editVariantReportConfiguration(int index);
Expand Down
3 changes: 3 additions & 0 deletions src/GSvar/MainWindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
</property>
<item>
<widget class="QTabWidget" name="tabs">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="currentIndex">
<number>0</number>
</property>
Expand Down
Loading

0 comments on commit e1a0b74

Please sign in to comment.