1 /**
2 * UGENE - Integrated Bioinformatics Tools.
3 * Copyright (C) 2008-2021 UniPro <ugene@unipro.ru>
4 * http://ugene.net
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 * MA 02110-1301, USA.
20 */
21
22 #include "MinLenStep.h"
23
24 #include <U2Core/U2SafePoints.h>
25
26 #include "trimmomatic/util/LengthSettingsWidget.h"
27
28 namespace U2 {
29 namespace LocalWorkflow {
30
31 const QString MinLenStepFactory::ID = "MINLEN";
32
MinLenStep()33 MinLenStep::MinLenStep()
34 : TrimmomaticStep(MinLenStepFactory::ID) {
35 name = "MINLEN";
36 description = tr("<html><head></head><body>"
37 "<h4>MINLEN</h4>"
38 "<p>This step removes reads that fall below the specified minimal length. "
39 "If required, it should normally be after all other processing steps. "
40 "Reads removed by this step will be counted and included in "
41 "the \"dropped reads\" count.</p>"
42 "<p>Input the following values:</p>"
43 "<ul>"
44 "<li><b>Length</b>: the minimum length of reads to be kept.</li>"
45 "</ul>"
46 "</body></html>");
47 }
48
createWidget() const49 TrimmomaticStepSettingsWidget *MinLenStep::createWidget() const {
50 return new LengthSettingsWidget(tr("The minimum length of reads to be kept."));
51 }
52
serializeState(const QVariantMap & widgetState) const53 QString MinLenStep::serializeState(const QVariantMap &widgetState) const {
54 return LengthSettingsWidget::serializeState(widgetState);
55 }
56
parseState(const QString & command) const57 QVariantMap MinLenStep::parseState(const QString &command) const {
58 return LengthSettingsWidget::parseState(command, id);
59 }
60
MinLenStepFactory()61 MinLenStepFactory::MinLenStepFactory()
62 : TrimmomaticStepFactory(ID) {
63 }
64
createStep() const65 MinLenStep *MinLenStepFactory::createStep() const {
66 return new MinLenStep();
67 }
68
69 } // namespace LocalWorkflow
70 } // namespace U2
71