File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ QWidget *PerSequenceQualityAnalysis::createResultWidget()
68
68
QList<int > keys = mAverageScoreCounts .keys ();
69
69
QList<quint64> values = mAverageScoreCounts .values ();
70
70
71
+
72
+
71
73
QChartView * view = new QChartView;
72
74
view->setRenderHint (QPainter::Antialiasing);
73
75
@@ -78,9 +80,13 @@ QWidget *PerSequenceQualityAnalysis::createResultWidget()
78
80
qSort (keys);
79
81
qSort (values);
80
82
83
+ mEncodingScheme = PhredEncoding::fastqEncodingOffset (keys.first ());
84
+
85
+
86
+
81
87
for (int key : keys )
82
88
{
83
- lineseries->append (QPoint (key, mAverageScoreCounts [key]));
89
+ lineseries->append (QPoint (key- mEncodingScheme . offset () , mAverageScoreCounts [key]));
84
90
}
85
91
86
92
@@ -91,7 +97,7 @@ QWidget *PerSequenceQualityAnalysis::createResultWidget()
91
97
92
98
QValueAxis * axisX= new QValueAxis;
93
99
axisX->setTickCount (10 );
94
- axisX->setRange (keys.first (), keys.last ());
100
+ axisX->setRange (keys.first ()- mEncodingScheme . offset () , keys.last ()- mEncodingScheme . offset ());
95
101
axisX->setLabelFormat (" %i" );
96
102
axisX->setTitleText (tr (" Score quality (phred)" ));
97
103
chart->setAxisX (axisX);
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ Copyright Copyright 2016-17 Sacha Schutz
26
26
#include < QtCore>
27
27
#include < QtCharts>
28
28
#include " analysis.h"
29
+ #include " phredencoding.h"
29
30
30
31
using namespace QT_CHARTS_NAMESPACE ;
31
32
/* !
@@ -47,7 +48,7 @@ class PerSequenceQualityAnalysis : public Analysis
47
48
48
49
private:
49
50
QHash<int , quint64> mAverageScoreCounts ;
50
-
51
+ PhredEncoding mEncodingScheme ;
51
52
};
52
53
53
54
#endif // PERSEQUENCEQUALITYANALYSIS_H
You can’t perform that action at this time.
0 commit comments