Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
xtpcpp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
A compter du 1er avril, attention à vos pipelines :
Nouvelles limitations de Docker Hub
Show more breadcrumbs
PAPPSO
xtpcpp
Commits
c48bf603
Commit
c48bf603
authored
7 years ago
by
Olivier Langella
Browse files
Options
Downloads
Patches
Plain Diff
direct output for tsv spectral count
parent
96cb5f1c
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/gui/main.ui
+23
-0
23 additions, 0 deletions
src/gui/main.ui
src/gui/mainwindow.cpp
+50
-4
50 additions, 4 deletions
src/gui/mainwindow.cpp
src/gui/mainwindow.h
+1
-0
1 addition, 0 deletions
src/gui/mainwindow.h
src/output/ods/comparbasesheet.cpp
+6
-2
6 additions, 2 deletions
src/output/ods/comparbasesheet.cpp
with
80 additions
and
6 deletions
src/gui/main.ui
+
23
−
0
View file @
c48bf603
...
...
@@ -41,6 +41,7 @@
<addaction
name=
"actionMassChroQ"
/>
<addaction
name=
"actionSpreadsheet"
/>
<addaction
name=
"actionProticDb"
/>
<addaction
name=
"action_spectral_counting_mcq"
/>
</widget>
<addaction
name=
"actionLoad_results"
/>
<addaction
name=
"actionLoad"
/>
...
...
@@ -108,6 +109,11 @@
<string>
PROTICdb
</string>
</property>
</action>
<action
name=
"action_spectral_counting_mcq"
>
<property
name=
"text"
>
<string>
Spectral Counting mcq
</string>
</property>
</action>
</widget>
<resources>
<include
location=
"../xtpcpp.qrc"
/>
...
...
@@ -257,6 +263,22 @@
</hint>
</hints>
</connection>
<connection>
<sender>
action_spectral_counting_mcq
</sender>
<signal>
triggered()
</signal>
<receiver>
Main
</receiver>
<slot>
doActionSpectralCountingMcq()
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
-1
</x>
<y>
-1
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
231
</x>
<y>
191
</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>
selectXpipFile()
</slot>
...
...
@@ -268,5 +290,6 @@
<slot>
doActionModifications()
</slot>
<slot>
doActionLabelingMethods()
</slot>
<slot>
doActionFasta()
</slot>
<slot>
doActionSpectralCountingMcq()
</slot>
</slots>
</ui>
This diff is collapsed.
Click to expand it.
src/gui/mainwindow.cpp
+
50
−
4
View file @
c48bf603
...
...
@@ -31,9 +31,21 @@
#include
"ui_main.h"
#include
<pappsomspp/pappsoexception.h>
#include
<pappsomspp/fasta/fastaoutputstream.h>
#include
<odsstream/tsvoutputstream.h>
#include
"../utils/utils.h"
#include
"workerthread.h"
#include
"output/ods/comparspectrasheet.h"
class
TsvNoSheetOutput
:
public
TsvOutputStream
{
public
:
TsvNoSheetOutput
(
QTextStream
&
otxtstream
)
:
TsvOutputStream
(
otxtstream
)
{
}
~
TsvNoSheetOutput
()
{
}
virtual
void
writeSheet
(
const
QString
&
sheetName
)
override
{
}
};
MainWindow
::
MainWindow
(
QWidget
*
parent
)
:
QMainWindow
(
parent
),
...
...
@@ -60,11 +72,11 @@ MainWindow::MainWindow(QWidget *parent):
//QDockWidget *dock = new QDockWidget(tr("Protein List"), this);
//dock->setWidget(_protein_list_window);
//addDockWidget(Qt::RightDockWidgetArea, dock);
qRegisterMetaType
<
ProjectSp
>
(
"ProjectSp"
);
qRegisterMetaType
<
AutomaticFilterParameters
>
(
"AutomaticFilterParameters"
);
qRegisterMetaType
<
GroupingType
>
(
"GroupingType"
);
#if QT_VERSION >= 0x050000
// Qt5 code
/*
...
...
@@ -263,6 +275,40 @@ void MainWindow::doActionSpreadsheet() {
qDebug
()
<<
"MainWindow::doActionSpreadsheet end"
;
}
void
MainWindow
::
doActionSpectralCountingMcq
()
{
qDebug
()
<<
"MainWindow::doActionSpectralCountingMcq begin"
;
QSettings
settings
;
QString
default_location
=
settings
.
value
(
"path/scmcqfile"
,
""
).
toString
();
QString
filename
=
QFileDialog
::
getSaveFileName
(
this
,
tr
(
"Save spectral count TSV text file"
),
QString
(
"%1/untitled.tsv"
).
arg
(
default_location
),
tr
(
"TSV (*.tsv)"
));
if
(
filename
.
isEmpty
())
{
return
;
}
settings
.
setValue
(
"path/scmcqfile"
,
QFileInfo
(
filename
).
absolutePath
());
QFile
outFile
;
outFile
.
setFileName
(
filename
);
outFile
.
open
(
QIODevice
::
WriteOnly
);
QTextStream
*
p_outputStream
=
new
QTextStream
(
&
outFile
);
TsvNoSheetOutput
*
p_writer
=
new
TsvNoSheetOutput
(
*
p_outputStream
);
ComparSpectraSheet
spectra_sheet
(
nullptr
,
p_writer
,
_project_sp
.
get
());
spectra_sheet
.
writeSheet
();
p_writer
->
close
();
delete
p_writer
;
delete
p_outputStream
;
outFile
.
close
();
qDebug
()
<<
"MainWindow::doActionSpectralCountingMcq end"
;
}
void
MainWindow
::
doActionFasta
()
{
try
{
...
...
@@ -324,7 +370,7 @@ void MainWindow::doActionMassChroQ() {
}
settings
.
setValue
(
"path/mcqfile"
,
QFileInfo
(
filename
).
absolutePath
());
showWaitingMessage
(
tr
(
"Writing %1 XPIP file"
).
arg
(
QFileInfo
(
filename
).
fileName
()));
emit
operateWritingMassChroqFile
(
filename
,
_project_sp
);
//emit operateXpipFile(filename);
...
...
@@ -352,7 +398,7 @@ void MainWindow::doActionProticDb() {
}
settings
.
setValue
(
"path/proticfile"
,
QFileInfo
(
filename
).
absolutePath
());
showWaitingMessage
(
tr
(
"Writing %1 PROTICdbML file"
).
arg
(
QFileInfo
(
filename
).
fileName
()));
emit
operateWritingProticFile
(
filename
,
_project_sp
);
//emit operateXpipFile(filename);
...
...
This diff is collapsed.
Click to expand it.
src/gui/mainwindow.h
+
1
−
0
View file @
c48bf603
...
...
@@ -71,6 +71,7 @@ public slots:
void
doOperationFailed
(
QString
);
void
doOperationFinished
();
void
doGroupingFinished
();
void
doActionSpectralCountingMcq
();
//void peptideEdited(QString peptideStr);
// void setColor(const QColor &color);
// void setShape(Shape shape);
...
...
This diff is collapsed.
Click to expand it.
src/output/ods/comparbasesheet.cpp
+
6
−
2
View file @
c48bf603
...
...
@@ -70,7 +70,7 @@ void ComparBaseSheet::writeHeaders(IdentificationGroup * p_ident) {
});
_p_writer
->
writeLine
();
//
_p_writer->writeLine();
_p_writer
->
writeCell
(
"Group ID"
);
_p_writer
->
writeCell
(
"Subgroup ID"
);
//_p_writer->setCellAnnotation("MS sample name (MS run)");
...
...
@@ -95,9 +95,13 @@ void ComparBaseSheet::writeProteinMatch(const ProteinMatch * p_protein_match) {
unsigned
int
subgroup_number
=
p_protein_match
->
getGrpProteinSp
().
get
()
->
getSubGroupNumber
();
unsigned
int
rank_number
=
p_protein_match
->
getGrpProteinSp
().
get
()
->
getRank
();
_p_ods_export
->
setEvenOrOddStyle
(
group_number
,
_p_writer
);
if
(
_p_ods_export
!=
nullptr
)
{
_p_ods_export
->
setEvenOrOddStyle
(
group_number
,
_p_writer
);
}
_p_writer
->
writeCell
(
pappso
::
Utils
::
getLexicalOrderedString
(
group_number
));
if
(
_p_ods_export
!=
nullptr
)
{
_p_ods_export
->
setEvenOrOddStyle
(
subgroup_number
,
_p_writer
);
}
_p_writer
->
writeCell
(
pappso
::
Utils
::
getLexicalOrderedString
(
subgroup_number
));
_p_writer
->
clearTableCellStyleRef
();
_p_writer
->
writeCell
(
p_protein_match
->
getGrpProteinSp
().
get
()
->
getGroupingId
());
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment