diff --git a/.gitignore b/.gitignore index cbe0b1268596e2bbd45a26234f006b46d02336ac..055f7040ab68f1a2d9e06ff42b7bc38dc73ab36b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ **/_tmp src/_debug src/_release +src/qmake_msvc_proj_x32.cmd +src/qmake_msvc_proj_x64.cmd # Makefiles generated by qmake Makefile @@ -16,7 +18,8 @@ Makefile.Debug # Doxygen generated files /html -# VS project files +# VS project files and directories +/.vs/ *.sdf *.opensdf *.suo @@ -31,8 +34,7 @@ Makefile.Debug # Windows generated files *.obj -**/Win32/Debug/* -ugene.VC.db +*moc_predefs.h*ugene.VC.db ugene.VC.VC.opendb # Generated ugene shell launcher diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 586bc0bfc2124e2115bb0944b8ef96b23e098922..0000000000000000000000000000000000000000 --- a/.gitmodules +++ /dev/null @@ -1,5 +0,0 @@ -[submodule "QSpec"] - path = src/libs_3rdparty/QSpec - url = https://github.com/ugeneunipro/QSpec.git - branch = ugene - ignore = dirty \ No newline at end of file diff --git a/README.md b/README.md index 4a1de1b78541989fbd529b7b28136c879e7c7a25..0212d50fc5ed5f45490b7c3ca2c3d1459175eb5d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ### Prerequisites -Make sure the Qt (>= 5.2.1 and < 5.6) development libraries are installed: +Make sure the Qt (>= 5.3.2) development libraries are installed: * Ubuntu >=14.04: `sudo apt-get install qt5-default qttools5-dev-tools qtscript5-dev libqt5svg5-dev libqt5webkit5-dev` * Ubuntu 12.04: diff --git a/data/workflow_samples/NGS/fastqc.uwl b/data/workflow_samples/NGS/fastqc.uwl index bde5aa2c6f33d6fdb5d7a3679a757806073cf4a6..b29e9a77f4b88162ca631abf45f223f33cce0ebe 100644 --- a/data/workflow_samples/NGS/fastqc.uwl +++ b/data/workflow_samples/NGS/fastqc.uwl @@ -8,7 +8,6 @@ workflow "Quality control by FastQC"{ fastqc { type:fastqc; name:"FastQC Quality Control"; - out-mode:1; } get-file-list { type:get-file-list; @@ -29,8 +28,8 @@ workflow "Quality control by FastQC"{ fastqc.contaminants { alias:c; } - fastqc.custom-dir { - alias:out_dir; + fastqc.out-file { + alias:out_file; } fastqc.out-mode { alias:mode; @@ -41,13 +40,13 @@ workflow "Quality control by FastQC"{ } visual { fastqc { - pos:"-493 -559"; + pos:"-480 -540"; style:ext; bg-color-ext:"0 128 64 64"; in-file.angle:180; } get-file-list { - pos:"-773 -560"; + pos:"-765 -540"; style:ext; bg-color-ext:"216 113 57 64"; bounds:"-30 -30 116.25 84"; @@ -59,8 +58,7 @@ workflow "Quality control by FastQC"{ } wizard { name:"Quality Control by FastQC Wizard"; - help-page-id:16122729; - auto-run: true; + auto-run:true; page { id:1; title:"QC report settings"; diff --git a/data/workflow_samples/NGS/from_tools_menu_only/ngs_classification.uwl b/data/workflow_samples/NGS/from_tools_menu_only/ngs_classification.uwl index 6ce117097925928e45cd485811776f1ea4251295..6a8024cbdac6839ee91c2b9ab5dda9eb557b7438 100644 --- a/data/workflow_samples/NGS/from_tools_menu_only/ngs_classification.uwl +++ b/data/workflow_samples/NGS/from_tools_menu_only/ngs_classification.uwl @@ -32,7 +32,7 @@ workflow "NGS reads classification" { value { id: parallel; label: "Parallel reads classification"; - tooltip:"Improve reads quality with Trimmomatic, classify them with Kraken, CLARK and in case of single-end reads with DIAMOND. Join the classification output with WEVOTE."; + tooltip:"Improve reads quality with Trimmomatic, classify them with Kraken, CLARK, DIAMOND (in case of single-end reads), and MetaPhlAn2. Compare output from Kraken, CLARK, and DIAMOND with WEVOTE."; } value { id: de_novo; @@ -59,4 +59,4 @@ workflow "NGS reads classification" { } } } -} \ No newline at end of file +} diff --git a/data/workflow_samples/NGS/ngs_classification/ngs_classification_de_novo/ngs_classification_de_novo_single.uwl b/data/workflow_samples/NGS/ngs_classification/ngs_classification_de_novo/ngs_classification_de_novo_single.uwl index 1da9b27fe5191e86430efd6a23c5eb6125da1251..f20feeab68e825afa0e3808d02d9a7866665123c 100644 --- a/data/workflow_samples/NGS/ngs_classification/ngs_classification_de_novo/ngs_classification_de_novo_single.uwl +++ b/data/workflow_samples/NGS/ngs_classification/ngs_classification_de_novo/ngs_classification_de_novo_single.uwl @@ -55,6 +55,14 @@ workflow "SE reads assembly and classification"{ get-se-reads-list.reads-url1->trimmomatic.in.reads-url1 .meta { + parameter-aliases { + get-se-reads-list.url1 { + alias:in; + } + trimmomatic.trimming-steps { + alias:steps; + } + } visual { classification-report { pos:"-465 -300"; diff --git a/data/workflow_samples/NGS/ngs_classification/ngs_classification_parallel/ngs_classification_parallel_paired.uwl b/data/workflow_samples/NGS/ngs_classification/ngs_classification_parallel/ngs_classification_parallel_paired.uwl index 3bc8cc60b6a18b4f9f390f420ac83486e956c1ff..1a29897e849c4817fcda7e7346ed3c82bde5535a 100644 --- a/data/workflow_samples/NGS/ngs_classification/ngs_classification_parallel/ngs_classification_parallel_paired.uwl +++ b/data/workflow_samples/NGS/ngs_classification/ngs_classification_parallel/ngs_classification_parallel_paired.uwl @@ -57,19 +57,25 @@ workflow "Parallel classification for PE reads"{ name:Trimmomatic; input-data:paired-end; } + metaphlan2-classify { + type:metaphlan2-classify; + name:MetaPhlAn2; + input-data:paired-end; + } .actor-bindings { + get-pe-reads-list.out->fastqc-before-1.in-file + get-pe-reads-list.out->fastqc-before-2.in-file + get-pe-reads-list.out->trimmomatic.in + kraken-classify.out->ensemble-classification.tax-data1 + ensemble-classification.out->wevote-classify.in + clark-classify.out->ensemble-classification.tax-data2 wevote-classify.out->classification-report.in trimmomatic.out->fastqc-after-1.in-file trimmomatic.out->fastqc-after-2.in-file trimmomatic.out->kraken-classify.in trimmomatic.out->clark-classify.in - kraken-classify.out->ensemble-classification.tax-data1 - clark-classify.out->ensemble-classification.tax-data2 - ensemble-classification.out->wevote-classify.in - get-pe-reads-list.out->fastqc-before-1.in-file - get-pe-reads-list.out->fastqc-before-2.in-file - get-pe-reads-list.out->trimmomatic.in + trimmomatic.out->metaphlan2-classify.in } get-pe-reads-list.reads-url1->fastqc-before-1.in-file.url @@ -86,77 +92,85 @@ workflow "Parallel classification for PE reads"{ wevote-classify.tax-data->classification-report.in.tax-data get-pe-reads-list.reads-url1->trimmomatic.in.reads-url1 get-pe-reads-list.reads-url2->trimmomatic.in.reads-url2 + trimmomatic.reads-url1->metaphlan2-classify.in.reads-url1 + trimmomatic.reads-url2->metaphlan2-classify.in.reads-url2 .meta { visual { clark-classify { - pos:"-255 -435"; + pos:"-315 -420"; style:simple; bg-color-simple:"0 145 0 255"; in.angle:99.7276; out.angle:291.541; } classification-report { - pos:"-600 -285"; + pos:"-585 -270"; style:simple; bg-color-simple:"141 126 194 255"; in.angle:345.964; } ensemble-classification { - pos:"-165 -285"; + pos:"-150 -270"; style:simple; bg-color-simple:"102 102 102 255"; out.angle:186.911; - tax-data1.angle:53.427; + tax-data1.angle:90; tax-data2.angle:128.66; tax-data3.angle:225; } fastqc-after-1 { - pos:"-165 -705"; + pos:"-150 -690"; style:simple; bg-color-simple:"81 120 78 255"; in-file.angle:236.31; } fastqc-after-2 { - pos:"-60 -705"; + pos:"-45 -690"; style:simple; bg-color-simple:"81 120 78 255"; in-file.angle:212.471; } fastqc-before-1 { - pos:"-480 -705"; + pos:"-465 -690"; style:simple; bg-color-simple:"81 120 78 255"; in-file.angle:233.842; } fastqc-before-2 { - pos:"-375 -705"; + pos:"-360 -690"; style:simple; bg-color-simple:"81 120 78 255"; in-file.angle:227.911; } get-pe-reads-list { - pos:"-600 -585"; + pos:"-585 -570"; style:simple; bg-color-simple:"23 106 239 255"; out.angle:1.50744; } kraken-classify { - pos:"-105 -435"; + pos:"-165 -420"; + style:simple; + bg-color-simple:"0 145 0 255"; + in.angle:106.699; + out.angle:283.241; + } + metaphlan2-classify { + pos:"0 -420"; style:simple; bg-color-simple:"0 145 0 255"; - in.angle:90; - out.angle:244.179; + in.angle:126.529; } trimmomatic { - pos:"-330 -585"; + pos:"-315 -570"; style:simple; bg-color-simple:"127 127 127 255"; in.angle:180; out.angle:360; } wevote-classify { - pos:"-375 -285"; + pos:"-360 -270"; style:simple; bg-color-simple:"0 106 0 255"; in.angle:349.046; @@ -192,6 +206,9 @@ workflow "Parallel classification for PE reads"{ trimmomatic.out->kraken-classify.in { text-pos:"-3 7"; } + trimmomatic.out->metaphlan2-classify.in { + text-pos:"-45 -43"; + } wevote-classify.out->classification-report.in { text-pos:"-48 4"; } @@ -300,6 +317,34 @@ workflow "Parallel classification for PE reads"{ page { id:5; next:6; + title:"MetaPhlAn2 settings" + parameters-area { + group { + title:Classification; + label-size:180; + metaphlan2-classify.database { + } + metaphlan2-classify.analysis-type { + } + metaphlan2-classify.tax-level { + } + metaphlan2-classify.normalize-by-size { + } + metaphlan2-classify.presence-threshold { + } + } + group { + title:"Memory usage and efficiency"; + label-size:180; + type:hideable; + metaphlan2-classify.threads { + } + } + } + } + page { + id:6; + next:7; title:"WEVOTE settings"; parameters-area { group { @@ -322,7 +367,7 @@ workflow "Parallel classification for PE reads"{ } } page { - id:6; + id:7; title:"Output data"; parameters-area { group { @@ -334,6 +379,9 @@ workflow "Parallel classification for PE reads"{ clark-classify.output-url { label:"CLARK output file"; } + metaphlan2-classify.output-url { + label:"MetaPhlAn2 output file" + } wevote-classify.output-url { label:"WEVOTE output file"; } diff --git a/data/workflow_samples/NGS/ngs_classification/ngs_classification_parallel/ngs_classification_parallel_single.uwl b/data/workflow_samples/NGS/ngs_classification/ngs_classification_parallel/ngs_classification_parallel_single.uwl index 98ef0907ef6f31a49c56254aba4d82caf5f553d7..dbe6352f3f342f27f431f8428399417ca097324a 100644 --- a/data/workflow_samples/NGS/ngs_classification/ngs_classification_parallel/ngs_classification_parallel_single.uwl +++ b/data/workflow_samples/NGS/ngs_classification/ngs_classification_parallel/ngs_classification_parallel_single.uwl @@ -48,12 +48,16 @@ workflow "Parallel classification for SE reads"{ type:trimmomatic; name:Trimmomatic; } + metaphlan2-classify { + type:metaphlan2-classify; + name:MetaPhlAn2; + } .actor-bindings { - clark-classify.out->ensemble-classification.tax-data2 - kraken-classify.out->ensemble-classification.tax-data1 get-se-reads-list.out->fastqc-before.in-file get-se-reads-list.out->trimmomatic.in + kraken-classify.out->ensemble-classification.tax-data1 + clark-classify.out->ensemble-classification.tax-data2 diamond-classify.out->ensemble-classification.tax-data3 ensemble-classification.out->wevote-classify.in wevote-classify.out->classification-report.in @@ -61,6 +65,7 @@ workflow "Parallel classification for SE reads"{ trimmomatic.out->diamond-classify.in trimmomatic.out->clark-classify.in trimmomatic.out->kraken-classify.in + trimmomatic.out->metaphlan2-classify.in } get-se-reads-list.reads-url1->fastqc-before.in-file.url @@ -74,31 +79,32 @@ workflow "Parallel classification for SE reads"{ ensemble-classification.url->wevote-classify.in.url wevote-classify.tax-data->classification-report.in.tax-data get-se-reads-list.reads-url1->trimmomatic.in.reads-url1 + trimmomatic.reads-url1->metaphlan2-classify.in.reads-url1 .meta { visual { clark-classify { - pos:"-360 -405"; + pos:"-345 -390"; style:simple; bg-color-simple:"0 145 0 255"; in.angle:95.5275; out.angle:272.862; } classification-report { - pos:"45 -225"; + pos:"45 -210"; style:simple; bg-color-simple:"141 126 194 255"; in.angle:180; } diamond-classify { - pos:"-495 -405"; + pos:"-480 -390"; style:simple; bg-color-simple:"0 145 0 255"; in.angle:57.0948; out.angle:288.925; } ensemble-classification { - pos:"-330 -225"; + pos:"-315 -210"; style:simple; bg-color-simple:"102 102 102 255"; out.angle:356.1; @@ -107,39 +113,45 @@ workflow "Parallel classification for SE reads"{ tax-data3.angle:153.435; } fastqc-after { - pos:"-255 -705"; + pos:"-240 -690"; style:simple; bg-color-simple:"81 120 78 255"; in-file.angle:225; } fastqc-before { - pos:"-585 -705"; + pos:"-570 -690"; style:simple; bg-color-simple:"81 120 78 255"; in-file.angle:216.87; } get-se-reads-list { - pos:"-720 -600"; + pos:"-705 -585"; style:simple; bg-color-simple:"23 106 239 255"; out.angle:360; } kraken-classify { - pos:"-240 -405"; + pos:"-225 -390"; style:simple; bg-color-simple:"0 145 0 255"; in.angle:90; out.angle:247.964; } + metaphlan2-classify { + pos:"-90 -390"; + style:simple; + bg-color-simple:"0 145 0 255"; + in.angle:144.638; + } trimmomatic { - pos:"-435 -600"; + pos:"-420 -585"; style:simple; bg-color-simple:"127 127 127 255"; in.angle:180; out.angle:320.464; } wevote-classify { - pos:"-120 -225"; + pos:"-105 -210"; style:simple; bg-color-simple:"0 106 0 255"; in.angle:180; @@ -173,7 +185,10 @@ workflow "Parallel classification for SE reads"{ text-pos:"-45 -43"; } trimmomatic.out->kraken-classify.in { - text-pos:"20 2"; + text-pos:"5 15"; + } + trimmomatic.out->metaphlan2-classify.in { + text-pos:"67 9"; } wevote-classify.out->classification-report.in { text-pos:"-45 -43"; @@ -318,6 +333,34 @@ workflow "Parallel classification for SE reads"{ page { id:6; next:7; + title:"MetaPhlAn2 settings" + parameters-area { + group { + title:Classification; + label-size:180; + metaphlan2-classify.database { + } + metaphlan2-classify.analysis-type { + } + metaphlan2-classify.tax-level { + } + metaphlan2-classify.normalize-by-size { + } + metaphlan2-classify.presence-threshold { + } + } + group { + title:"Memory usage and efficiency"; + label-size:180; + type:hideable; + metaphlan2-classify.threads { + } + } + } + } + page { + id:7; + next:8; title:"WEVOTE settings"; parameters-area { group { @@ -340,7 +383,7 @@ workflow "Parallel classification for SE reads"{ } } page { - id:7; + id:8; title:"Output data"; parameters-area { group { @@ -355,6 +398,9 @@ workflow "Parallel classification for SE reads"{ diamond-classify.output-url { label:"DIAMOND output file"; } + metaphlan2-classify.output-url { + label:"MetaPhlAn2 output file" + } wevote-classify.output-url { label:"WEVOTE output file"; } diff --git a/data/workflow_samples/NGS/ngs_classification_parallel.uwl b/data/workflow_samples/NGS/ngs_classification_parallel.uwl index 5cb1ced9aad2ce53245c90d9ed65ba2db2c075c1..3146339f807027e1dead9e6c09dca537bce92b85 100644 --- a/data/workflow_samples/NGS/ngs_classification_parallel.uwl +++ b/data/workflow_samples/NGS/ngs_classification_parallel.uwl @@ -6,9 +6,10 @@ # - Classify the pre-processed reads with Kraken. # - Classify these reads with CLARK. # - Classify these reads with DIAMOND (in case of SE reads). -# - Ensemble the classification output into a CSV file. -# - Improve classification with WEVOTE. -# - Provide general classification reports +# - Classify these reads with MetaPhlAn2. +# - Ensemble the classification output from Kraken, CLARK, and DIAMOND into a CSV file. +# - Improve classification from these tools with WEVOTE. +# - Provide general classification reports. workflow "Parallel NGS reads classification" { .meta { @@ -45,4 +46,4 @@ workflow "Parallel NGS reads classification" { } } -} \ No newline at end of file +} diff --git a/installer/_common_data/ugene b/installer/_common_data/ugene index fe3b883afe28dfcd746a465dbc38d9b46384507d..8ad3c7145772abbbb5c647bbf75cc098c68630e3 100755 --- a/installer/_common_data/ugene +++ b/installer/_common_data/ugene @@ -26,10 +26,10 @@ dirname=$(dirname "`readlink -f "$0"`") tmp="${dirname#?}" if [ "${dirname%$tmp}" != "/" ]; then - dirname=$PWD/$dirname + dirname="$PWD/$dirname" fi -LD_LIBRARY_PATH=$dirname +LD_LIBRARY_PATH="$dirname" export LD_LIBRARY_PATH # check compatibility OS and UGENE (32-bit or 64-bit) @@ -44,7 +44,7 @@ esac ugene_i686=false ugene_x86_64=false -case "`file -b $dirname/$appname |cut -d "," -f1 |grep 64|wc -l|tr -d ' '`" in +case "`file -b \"$dirname\"/\"$appname\" |cut -d "," -f1 |grep 64|wc -l|tr -d ' '`" in 0*) ugene_i686=true;; 1*) ugene_x86_64=true;; esac @@ -63,8 +63,8 @@ fi export QT_QPA_PLATFORMTHEME= if [ -z $IS_KDE ]; then - "$dirname/$appname" "${params[@]}" + "$dirname"/"$appname" "${params[@]}" else - "$dirname/$appname" "${params[@]}" -style cleanlooks + "$dirname"/"$appname" "${params[@]}" -style cleanlooks fi diff --git a/installer/linux/X11/create_bundle.sh b/installer/linux/X11/create_bundle.sh index 8525796326f4d58d9b6195badb64c94d2fcb65bf..cef86b0f26b6d935adae1821ad7c5ce7c7f14448 100755 --- a/installer/linux/X11/create_bundle.sh +++ b/installer/linux/X11/create_bundle.sh @@ -1,7 +1,13 @@ # this script's home dir is trunk/installer/linux/X11 PRODUCT_NAME="ugene" -VERSION=`cat ../../../src/ugene_version.pri | grep UGENE_VERSION | awk -F'=' '{print $2}'` + +VERSION_MAJOR=`cat ../../../src/ugene_version.pri | grep 'UGENE_VER_MAJOR=' | awk -F'=' '{print $2}'` +VERSION_MINOR=`cat ../../../src/ugene_version.pri | grep 'UGENE_VER_MINOR=' | awk -F'=' '{print $2}'` +VERSION=`cat ../../../src/ugene_version.pri | grep UGENE_VERSION | awk -F'=' '{print $2}' | \ + sed -e 's/$${UGENE_VER_MAJOR}/'"$VERSION_MAJOR"'/g' \ + -e 's/$${UGENE_VER_MINOR}/'"$VERSION_MINOR"'/g'` + RELEASE_DIR=../../../src/_release SYMBOLS_DIR=symbols DUMP_SYMBOLS_LOG=dump_symbols_log.txt @@ -190,6 +196,7 @@ add-plugin hmm2 add-plugin kalign add-plugin kraken_support add-plugin linkdata_support +add-plugin metaphlan2_support add-plugin ngs_reads_classification add-plugin orf_marker add-plugin opencl_support diff --git a/src/Plugin.cmake b/src/Plugin.cmake index 9aca573c0ae072842278de8f799a9898db80d046..0a233d9613957b02a7d7e4b1dd74d5c7e57ce254 100644 --- a/src/Plugin.cmake +++ b/src/Plugin.cmake @@ -1,7 +1,5 @@ project(${UGENE_PLUGIN_NAME}) -cmake_minimum_required(VERSION 3.4) - set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOMOC ON) diff --git a/src/corelibs/U2Algorithm/U2Algorithm.pri b/src/corelibs/U2Algorithm/U2Algorithm.pri index e93630f968411b920bd5afd49a735161575c7488..54a6345a8cc89f32c4cf972fb93cd07698f97ca2 100644 --- a/src/corelibs/U2Algorithm/U2Algorithm.pri +++ b/src/corelibs/U2Algorithm/U2Algorithm.pri @@ -9,53 +9,29 @@ use_opencl(){ DEFINES += OPENCL_SUPPORT } -UGENE_RELATIVE_DESTDIR = '' DEFINES+= QT_FATAL_ASSERT BUILDING_U2ALGORITHM_DLL unix: QMAKE_CXXFLAGS += -Wno-char-subscripts -LIBS += -L../../_release -lU2Core -lsamtools -use_bundled_zlib() { - INCLUDEPATH += ../../libs_3rdparty/zlib/src - LIBS += -lzlib -} else { - LIBS += -lz -} +LIBS += $$add_z_lib() +LIBS += -L../../$$out_dir() +LIBS += -lU2Core$$D -lsamtools$$D + +DESTDIR = ../../$$out_dir() # Force re-linking when lib changes -unix:POST_TARGETDEPS += ../../_release/libsamtools.a +unix:POST_TARGETDEPS += ../../$$out_dir()/libsamtools$${D}.a # Same options which samtools is built with DEFINES+="_FILE_OFFSET_BITS=64" _LARGEFILE64_SOURCE _USE_KNETFILE INCLUDEPATH += ../../libs_3rdparty/samtools/src ../../libs_3rdparty/samtools/src/samtools win32:INCLUDEPATH += ../../libs_3rdparty/samtools/src/samtools/win32 win32:LIBS+=-lws2_32 -!debug_and_release|build_pass { - - CONFIG(debug, debug|release) { - DESTDIR=../../_debug - LIBS -= -L../../_release -lU2Core -lsamtools - LIBS += -L../../_debug -lU2Cored -lsamtoolsd - - unix:POST_TARGETDEPS -= ../../_release/libsamtools.a - unix:POST_TARGETDEPS += ../../_debug/libsamtoolsd.a - - use_bundled_zlib() { - LIBS += -lzlibd - LIBS -= -lzlib - } - } - - CONFIG(release, debug|release) { - DESTDIR=../../_release - } -} - win32-msvc2013 { DEFINES += NOMINMAX } unix { - target.path = $$UGENE_INSTALL_DIR/$$UGENE_RELATIVE_DESTDIR + target.path = $$UGENE_INSTALL_DIR/ INSTALLS += target } diff --git a/src/corelibs/U2Algorithm/U2Algorithm.pro b/src/corelibs/U2Algorithm/U2Algorithm.pro index 1724ca7eabdac9f5bc06ab1c3d2bd4db435badc4..b7a900b5d6e40e9897eeae2729c600713f7ea234 100644 --- a/src/corelibs/U2Algorithm/U2Algorithm.pro +++ b/src/corelibs/U2Algorithm/U2Algorithm.pro @@ -83,6 +83,9 @@ HEADERS += src/misc/BinaryFindOpenCL.h \ src/util_msa_distance/MSADistanceAlgorithmRegistry.h \ src/util_msaedit/CreateSubalignmentTask.h \ src/util_msaedit/MsaUtilTasks.h \ + src/util_msaedit/color_schemes/percentage_idententity/colored/ColumnCharsCounter.h \ + src/util_msaedit/color_schemes/percentage_idententity/colored/MsaColorSchemePercentageIdententityColored.h \ + src/util_msaedit/color_schemes/percentage_idententity/colored/MsaColorSchemePercentageIdententityColoredFactory.h \ src/util_msaedit/color_schemes/ColorSchemeUtils.h \ src/util_msaedit/color_schemes/MsaColorScheme.h \ src/util_msaedit/color_schemes/MsaColorSchemeClustalX.h \ @@ -183,6 +186,9 @@ SOURCES += src/misc/BinaryFindOpenCL.cpp \ src/util_msa_distance/MSADistanceAlgorithmRegistry.cpp \ src/util_msaedit/CreateSubalignmentTask.cpp \ src/util_msaedit/MsaUtilTasks.cpp \ + src/util_msaedit/color_schemes/percentage_idententity/colored/ColumnCharsCounter.cpp \ + src/util_msaedit/color_schemes/percentage_idententity/colored/MsaColorSchemePercentageIdententityColored.cpp \ + src/util_msaedit/color_schemes/percentage_idententity/colored/MsaColorSchemePercentageIdententityColoredFactory.cpp \ src/util_msaedit/color_schemes/ColorSchemeUtils.cpp \ src/util_msaedit/color_schemes/MsaColorScheme.cpp \ src/util_msaedit/color_schemes/MsaColorSchemeClustalX.cpp \ diff --git a/src/corelibs/U2Algorithm/src/misc/BinaryFindOpenCL.cpp b/src/corelibs/U2Algorithm/src/misc/BinaryFindOpenCL.cpp index 8a06ba40ffe701e73867c59832ddfcc342f69f1b..51ec5b08042bede8037cacab71ed8557a9b5e776 100644 --- a/src/corelibs/U2Algorithm/src/misc/BinaryFindOpenCL.cpp +++ b/src/corelibs/U2Algorithm/src/misc/BinaryFindOpenCL.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/misc/BinaryFindOpenCL.h b/src/corelibs/U2Algorithm/src/misc/BinaryFindOpenCL.h index dbbb8ea33963d7f8f33845f48e1cce4e4c9d2011..f6f7ed0a01b615ed2c22294a7fb36a99128a8f2b 100644 --- a/src/corelibs/U2Algorithm/src/misc/BinaryFindOpenCL.h +++ b/src/corelibs/U2Algorithm/src/misc/BinaryFindOpenCL.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/misc/BitsTable.cpp b/src/corelibs/U2Algorithm/src/misc/BitsTable.cpp index fbd6ed92ec2ae7cb38ac5f7c4f085b8ae2334960..43cc43cbd7bcf883b2c8e781e6b9c9268ac882c3 100644 --- a/src/corelibs/U2Algorithm/src/misc/BitsTable.cpp +++ b/src/corelibs/U2Algorithm/src/misc/BitsTable.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/misc/BitsTable.h b/src/corelibs/U2Algorithm/src/misc/BitsTable.h index 1cbcd517a5a3a58b92f2b2d9e363504b98af206e..a4e63858954afa4bc2a8b61c03a758e078fa71e7 100644 --- a/src/corelibs/U2Algorithm/src/misc/BitsTable.h +++ b/src/corelibs/U2Algorithm/src/misc/BitsTable.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/misc/CDSearchTaskFactory.h b/src/corelibs/U2Algorithm/src/misc/CDSearchTaskFactory.h index 091c8148950438629d94a2ab8e568d47864ee284..9fa1e6519d0096c2dd800e082058110ef80ecf72 100644 --- a/src/corelibs/U2Algorithm/src/misc/CDSearchTaskFactory.h +++ b/src/corelibs/U2Algorithm/src/misc/CDSearchTaskFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/misc/DnaAssemblyMultiTask.cpp b/src/corelibs/U2Algorithm/src/misc/DnaAssemblyMultiTask.cpp index 3c501ee9f2d10a5fb683c51c7d71e4364dcdbad8..ee05e6215889a0ff8d7af35cd97795eab55f7c99 100644 --- a/src/corelibs/U2Algorithm/src/misc/DnaAssemblyMultiTask.cpp +++ b/src/corelibs/U2Algorithm/src/misc/DnaAssemblyMultiTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/misc/DnaAssemblyMultiTask.h b/src/corelibs/U2Algorithm/src/misc/DnaAssemblyMultiTask.h index 2ef008545f1981f24e5a105960ae319f67a66e19..95d7fea9fa12e624392109cfee9db5fcbd44d2ef 100644 --- a/src/corelibs/U2Algorithm/src/misc/DnaAssemblyMultiTask.h +++ b/src/corelibs/U2Algorithm/src/misc/DnaAssemblyMultiTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/misc/DynTable.h b/src/corelibs/U2Algorithm/src/misc/DynTable.h index 54f3adb7a0c2fff712f793f4d1de424a6449dc7f..33d348940c0fdf3ce0d94a0b5a24f5c2f302f45d 100644 --- a/src/corelibs/U2Algorithm/src/misc/DynTable.h +++ b/src/corelibs/U2Algorithm/src/misc/DynTable.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/misc/EnzymeModel.cpp b/src/corelibs/U2Algorithm/src/misc/EnzymeModel.cpp index 39474cea28301dd09ab3eaefe2334e129c2de53b..2067232464a7c8e6e27962edfe5c3c60284a956f 100644 --- a/src/corelibs/U2Algorithm/src/misc/EnzymeModel.cpp +++ b/src/corelibs/U2Algorithm/src/misc/EnzymeModel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/misc/EnzymeModel.h b/src/corelibs/U2Algorithm/src/misc/EnzymeModel.h index 87cf4c9461a41bdd554e59bf1326a577221f59f4..e9692fed89a94fc522fff61f1757ef1d23894fea 100644 --- a/src/corelibs/U2Algorithm/src/misc/EnzymeModel.h +++ b/src/corelibs/U2Algorithm/src/misc/EnzymeModel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/misc/FindAlgorithm.cpp b/src/corelibs/U2Algorithm/src/misc/FindAlgorithm.cpp index b92a4ad977d16cb242859e13d4b8f3e0bd35d3d8..859d29623d721e9834863f0a498c262175741e82 100644 --- a/src/corelibs/U2Algorithm/src/misc/FindAlgorithm.cpp +++ b/src/corelibs/U2Algorithm/src/misc/FindAlgorithm.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -21,15 +21,16 @@ #include <QRegExp> +#include <U2Core/AppContext.h> #include <U2Core/DNATranslation.h> #include <U2Core/DNAAlphabet.h> #include <U2Core/Log.h> #include <U2Core/TextUtils.h> +#include <U2Core/U2AlphabetUtils.h> #include <U2Core/U2SafePoints.h> #include <U2Algorithm/DynTable.h> #include <U2Algorithm/RollingArray.h> -#include <U2Core/U2AlphabetUtils.h> #include "FindAlgorithm.h" @@ -483,17 +484,14 @@ static void regExpSearch( const QString &refSequence, if (cyclePoint == -1) { cyclePoint = sequenceRange.endPos(); } - + int percentsCompletedOnStart = percentsCompleted; int foundStartPos = 0; - while ( 0 == stopFlag - && -1 != ( foundStartPos = regExp.indexIn( refSequence, foundStartPos ) ) ) - { - // remember that there are a few iterations, so a single one yields - // 1 / @conEnd of total progress - percentsCompleted = ( 100 * foundStartPos * ( currentStrand + 1 ) ) - / ( sequenceRange.length * totalStrandCount ); + while (stopFlag == 0 && (foundStartPos = regExp.indexIn(refSequence, foundStartPos)) != -1 ) { + // remember that there are a few iterations, so a single one yields (1 / @conEnd) of total progress + int percentsCompletedInner = (100 * foundStartPos * (currentStrand + 1)) / (sequenceRange.length * totalStrandCount); + percentsCompleted = qMin(percentsCompletedOnStart + percentsCompletedInner, 100); - const int foundLength = regExp.matchedLength( ); + int foundLength = regExp.matchedLength(); if ( maxResultLen >= foundLength ) { int resultStartPos = refSeqIsAminoTranslation ? foundStartPos * 3 : foundStartPos; if (resultStartPos < cyclePoint || sequenceRange.startPos != 0) { @@ -518,12 +516,12 @@ static void regExpSearch( const QString &refSequence, if ( maxResultLen >= foundSubstrLength ) { int resultStartPos = refSeqIsAminoTranslation ? foundStartPos * 3 : foundStartPos; if (resultStartPos < cyclePoint || sequenceRange.startPos != 0) { - const int resultLen = refSeqIsAminoTranslation ? foundSubstrLength * 3 : foundSubstrLength; + int resultLen = refSeqIsAminoTranslation ? foundSubstrLength * 3 : foundSubstrLength; prepareResultPosition( sequenceRange.startPos + (refSeqIsAminoTranslation * aminoFrameNumber), sequenceRange.length - (refSeqIsAminoTranslation * aminoFrameNumber), resultStartPos, resultLen, - searchStrand ); + searchStrand); resultStartPos -= (searchStrand.isCompementary() && refSeqIsAminoTranslation ? tailCutted : 0); sendResultToListener( resultStartPos, resultLen, searchStrand, rl ); @@ -816,14 +814,24 @@ void FindAlgorithm::find( searchIsCircular = false; } + DNATranslation* newComplTT = complTT; + if (complTT != nullptr) { + const DNAAlphabet *destinationAlphabet = complTT->getDstAlphabet(); + if (destinationAlphabet->isExtended()) { + newComplTT = complTT; + } else { + newComplTT = AppContext::getDNATranslationRegistry()->lookupComplementTranslation(U2AlphabetUtils::getExtendedAlphabet(destinationAlphabet)); + } + } + if ( patternSettings == FindAlgorithmPatternSettings_RegExp ) { - findRegExp( rl, aminoTT, complTT, strand, seq, searchIsCircular, range, pattern, maxRegExpResult, stopFlag, + findRegExp( rl, aminoTT, newComplTT, strand, seq, searchIsCircular, range, pattern, maxRegExpResult, stopFlag, percentsCompleted ); return; } if( patternSettings == FindAlgorithmPatternSettings_Subst ) { - find_subst( rl, aminoTT, complTT, strand, seq, searchIsCircular, range, pattern, patternLen, + find_subst( rl, aminoTT, newComplTT, strand, seq, searchIsCircular, range, pattern, patternLen, useAmbiguousBases, maxErr, stopFlag, percentsCompleted ); return; } @@ -838,17 +846,17 @@ void FindAlgorithm::find( } if (aminoTT != NULL) { - findInAmino(rl, aminoTT, complTT, strand, insDel, seq, range, searchIsCircular, pattern, patternLen, maxErr, + findInAmino(rl, aminoTT, newComplTT, strand, insDel, seq, range, searchIsCircular, pattern, patternLen, maxErr, stopFlag, percentsCompleted ); return; } char* complPattern = NULL; QByteArray tmp; if (isComplement(strand)) { - SAFE_POINT( NULL != complTT, "Invalid translation supplied!", ); + SAFE_POINT( NULL != newComplTT, "Invalid translation supplied!", ); tmp.resize(patternLen); complPattern = tmp.data(); - TextUtils::translate(complTT->getOne2OneMapper(), pattern, patternLen, complPattern); + TextUtils::translate(newComplTT->getOne2OneMapper(), pattern, patternLen, complPattern); TextUtils::reverse(complPattern, patternLen); } diff --git a/src/corelibs/U2Algorithm/src/misc/FindAlgorithm.h b/src/corelibs/U2Algorithm/src/misc/FindAlgorithm.h index 01e26816de03e282aca083fb104efabfa4dc2822..cb7d0d74a2e146ef89633909887f991db9a87f59 100644 --- a/src/corelibs/U2Algorithm/src/misc/FindAlgorithm.h +++ b/src/corelibs/U2Algorithm/src/misc/FindAlgorithm.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/misc/FindAlgorithmTask.cpp b/src/corelibs/U2Algorithm/src/misc/FindAlgorithmTask.cpp index af30defaa754ad7921ebe0804c79ff46fb1287af..9d5fc207537a4d6623a14a9d25ec4958746a1103 100644 --- a/src/corelibs/U2Algorithm/src/misc/FindAlgorithmTask.cpp +++ b/src/corelibs/U2Algorithm/src/misc/FindAlgorithmTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/misc/FindAlgorithmTask.h b/src/corelibs/U2Algorithm/src/misc/FindAlgorithmTask.h index b281de2a166dd2749d1e320a12d5e55945e62654..292dddbb698a42704ff0b26cd07aab5b360a21e7 100644 --- a/src/corelibs/U2Algorithm/src/misc/FindAlgorithmTask.h +++ b/src/corelibs/U2Algorithm/src/misc/FindAlgorithmTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/misc/GenomeAssemblyMultiTask.cpp b/src/corelibs/U2Algorithm/src/misc/GenomeAssemblyMultiTask.cpp index 83127b8e3530229cd90bbaf55dc3600debfb5fe7..5a44b4a9df49926ff35d4d15e5eeeaf8498ad9b3 100644 --- a/src/corelibs/U2Algorithm/src/misc/GenomeAssemblyMultiTask.cpp +++ b/src/corelibs/U2Algorithm/src/misc/GenomeAssemblyMultiTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/misc/GenomeAssemblyMultiTask.h b/src/corelibs/U2Algorithm/src/misc/GenomeAssemblyMultiTask.h index 94524953b23b43e2b47358f0f1e48662c1a9adb1..c240738c9d70c2b575dcdcdba645f5d499c9ba90 100644 --- a/src/corelibs/U2Algorithm/src/misc/GenomeAssemblyMultiTask.h +++ b/src/corelibs/U2Algorithm/src/misc/GenomeAssemblyMultiTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/misc/RepeatFinderSettings.h b/src/corelibs/U2Algorithm/src/misc/RepeatFinderSettings.h index ca4eb410d236991bf09d366c4518be5df60bddd3..c22c74f00203781ce1ed1de4d3d2640c8dc9efcf 100644 --- a/src/corelibs/U2Algorithm/src/misc/RepeatFinderSettings.h +++ b/src/corelibs/U2Algorithm/src/misc/RepeatFinderSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/misc/RepeatFinderTaskFactory.h b/src/corelibs/U2Algorithm/src/misc/RepeatFinderTaskFactory.h index 94d0705e296cdda5bd783e1560f6610f4b38cbc7..8531c2b78454d1fbb419d48f273c71b4e6668e5e 100644 --- a/src/corelibs/U2Algorithm/src/misc/RepeatFinderTaskFactory.h +++ b/src/corelibs/U2Algorithm/src/misc/RepeatFinderTaskFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/misc/RollingArray.h b/src/corelibs/U2Algorithm/src/misc/RollingArray.h index 3b138dd0b37c831d7d9a544aa719073429297d8a..26f1ec6ac59be68cad02192387010df3ffdc1aff 100644 --- a/src/corelibs/U2Algorithm/src/misc/RollingArray.h +++ b/src/corelibs/U2Algorithm/src/misc/RollingArray.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/misc/RollingMatrix.h b/src/corelibs/U2Algorithm/src/misc/RollingMatrix.h index a1cb4b5c70e399f0dda8241ece31979452bdd75d..7c5a829a147280fe31913d3ebdf4cf743202555f 100644 --- a/src/corelibs/U2Algorithm/src/misc/RollingMatrix.h +++ b/src/corelibs/U2Algorithm/src/misc/RollingMatrix.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/misc/SequenceContentFilterTask.cpp b/src/corelibs/U2Algorithm/src/misc/SequenceContentFilterTask.cpp index b69482ed08cac2f9ec4d00acfbdea8431dfe2ea7..a9e3043ee2b754dbd78305f5d77e4841e551c1f5 100644 --- a/src/corelibs/U2Algorithm/src/misc/SequenceContentFilterTask.cpp +++ b/src/corelibs/U2Algorithm/src/misc/SequenceContentFilterTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/misc/SequenceContentFilterTask.h b/src/corelibs/U2Algorithm/src/misc/SequenceContentFilterTask.h index e3466afcd8a82c92921c1ec285201504bf0e6127..a025ac151db11a4bfbd4155680d25b349fcebc8c 100644 --- a/src/corelibs/U2Algorithm/src/misc/SequenceContentFilterTask.h +++ b/src/corelibs/U2Algorithm/src/misc/SequenceContentFilterTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/misc/SyncSort.h b/src/corelibs/U2Algorithm/src/misc/SyncSort.h index e582a1ecd25510cf8705084d83d9184b65bd545e..ec03b6cc3e58053509f07f2cffae36541308c55a 100644 --- a/src/corelibs/U2Algorithm/src/misc/SyncSort.h +++ b/src/corelibs/U2Algorithm/src/misc/SyncSort.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/molecular_geometry/GeomUtils.cpp b/src/corelibs/U2Algorithm/src/molecular_geometry/GeomUtils.cpp index 449d670076ba0f4219b5ec34e59ad2716d3a0a15..cfd3dea73deefa148eb61207d05c2df25c13a7a7 100644 --- a/src/corelibs/U2Algorithm/src/molecular_geometry/GeomUtils.cpp +++ b/src/corelibs/U2Algorithm/src/molecular_geometry/GeomUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/molecular_geometry/GeomUtils.h b/src/corelibs/U2Algorithm/src/molecular_geometry/GeomUtils.h index 9d2c05ce33164d74cf1669d3154e4609e4192998..6c8d873ad7127f6cd422cca299f39d45b978f06a 100644 --- a/src/corelibs/U2Algorithm/src/molecular_geometry/GeomUtils.h +++ b/src/corelibs/U2Algorithm/src/molecular_geometry/GeomUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/molecular_geometry/MolecularSurface.cpp b/src/corelibs/U2Algorithm/src/molecular_geometry/MolecularSurface.cpp index 8be4dcacaa6b782d2d37a69cd36e3183d5d5cdd5..ff4513a6148bd0ccaa26a2d2f7f832d2da3fb13a 100644 --- a/src/corelibs/U2Algorithm/src/molecular_geometry/MolecularSurface.cpp +++ b/src/corelibs/U2Algorithm/src/molecular_geometry/MolecularSurface.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/molecular_geometry/MolecularSurface.h b/src/corelibs/U2Algorithm/src/molecular_geometry/MolecularSurface.h index 68e7e2a63220a466cfff92b6998d40058f77bc29..3eae50e8ea82a87ffe8583e744f190197862c4cd 100644 --- a/src/corelibs/U2Algorithm/src/molecular_geometry/MolecularSurface.h +++ b/src/corelibs/U2Algorithm/src/molecular_geometry/MolecularSurface.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/molecular_geometry/MolecularSurfaceFactoryRegistry.cpp b/src/corelibs/U2Algorithm/src/molecular_geometry/MolecularSurfaceFactoryRegistry.cpp index 3b6482396abccb7b574769f9d227879e5f54e7ec..4759ec0c84141ea4cf26b361fe33e9f1b55e78f7 100644 --- a/src/corelibs/U2Algorithm/src/molecular_geometry/MolecularSurfaceFactoryRegistry.cpp +++ b/src/corelibs/U2Algorithm/src/molecular_geometry/MolecularSurfaceFactoryRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/molecular_geometry/MolecularSurfaceFactoryRegistry.h b/src/corelibs/U2Algorithm/src/molecular_geometry/MolecularSurfaceFactoryRegistry.h index 630e31bfe96d48469f7b8a5bdbaec3235f1c6a96..568d57112729d70458583b936454d3df96cc5335 100644 --- a/src/corelibs/U2Algorithm/src/molecular_geometry/MolecularSurfaceFactoryRegistry.h +++ b/src/corelibs/U2Algorithm/src/molecular_geometry/MolecularSurfaceFactoryRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/molecular_geometry/VanDerWaalsSurface.cpp b/src/corelibs/U2Algorithm/src/molecular_geometry/VanDerWaalsSurface.cpp index c64df8ce42658ab252b4b0f9669bcd1dc1071d52..b78604d568ff9a6ee116b7d3ff9e9b5d9f6d69f0 100644 --- a/src/corelibs/U2Algorithm/src/molecular_geometry/VanDerWaalsSurface.cpp +++ b/src/corelibs/U2Algorithm/src/molecular_geometry/VanDerWaalsSurface.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/molecular_geometry/VanDerWaalsSurface.h b/src/corelibs/U2Algorithm/src/molecular_geometry/VanDerWaalsSurface.h index 72bd1f896fe06a6eb94d191d27aca4494d65ff64..7b2b0696d962ce3228538f54054abccac0c32dd8 100644 --- a/src/corelibs/U2Algorithm/src/molecular_geometry/VanDerWaalsSurface.h +++ b/src/corelibs/U2Algorithm/src/molecular_geometry/VanDerWaalsSurface.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/msa_alignment/AbstractAlignmentTask.cpp b/src/corelibs/U2Algorithm/src/msa_alignment/AbstractAlignmentTask.cpp index 7d5a16be93122eee3401235bc870723ec88d415e..1171ac9e6a6ed4397a91d8057e309ec4bda877f2 100644 --- a/src/corelibs/U2Algorithm/src/msa_alignment/AbstractAlignmentTask.cpp +++ b/src/corelibs/U2Algorithm/src/msa_alignment/AbstractAlignmentTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/msa_alignment/AbstractAlignmentTask.h b/src/corelibs/U2Algorithm/src/msa_alignment/AbstractAlignmentTask.h index 575515f3df19efd5470ca39d2449e2570f85c0c8..1c45bcd695789369fcb89fb61291c69b45d2c974 100644 --- a/src/corelibs/U2Algorithm/src/msa_alignment/AbstractAlignmentTask.h +++ b/src/corelibs/U2Algorithm/src/msa_alignment/AbstractAlignmentTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/msa_alignment/AlignSequencesToAlignmentTaskSettings.cpp b/src/corelibs/U2Algorithm/src/msa_alignment/AlignSequencesToAlignmentTaskSettings.cpp index 3eb24605cca303eb1b0766bfd599a02fd4a3a037..7297a2fa14a10e0cc38872cdee82108a208dc500 100644 --- a/src/corelibs/U2Algorithm/src/msa_alignment/AlignSequencesToAlignmentTaskSettings.cpp +++ b/src/corelibs/U2Algorithm/src/msa_alignment/AlignSequencesToAlignmentTaskSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/msa_alignment/AlignSequencesToAlignmentTaskSettings.h b/src/corelibs/U2Algorithm/src/msa_alignment/AlignSequencesToAlignmentTaskSettings.h index 0c8996daa845951b97413876b0673b83ae09036b..49c964f68e73f3ffa4cc9bd49f4ae1f907b264cd 100644 --- a/src/corelibs/U2Algorithm/src/msa_alignment/AlignSequencesToAlignmentTaskSettings.h +++ b/src/corelibs/U2Algorithm/src/msa_alignment/AlignSequencesToAlignmentTaskSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/msa_alignment/BaseAlignmentAlgorithmIds.cpp b/src/corelibs/U2Algorithm/src/msa_alignment/BaseAlignmentAlgorithmIds.cpp index af8829326c2678d777447654f4329c9ca5d27a0c..a8e1d643899cb9851134d0849d6a6848aab54303 100644 --- a/src/corelibs/U2Algorithm/src/msa_alignment/BaseAlignmentAlgorithmIds.cpp +++ b/src/corelibs/U2Algorithm/src/msa_alignment/BaseAlignmentAlgorithmIds.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/msa_alignment/BaseAlignmentAlgorithmIds.h b/src/corelibs/U2Algorithm/src/msa_alignment/BaseAlignmentAlgorithmIds.h index 722108659fc3182cf95b991405c19918d1fea9b6..5b00fb47b0a98058be24e6c602d8f4a1a3b7ff21 100644 --- a/src/corelibs/U2Algorithm/src/msa_alignment/BaseAlignmentAlgorithmIds.h +++ b/src/corelibs/U2Algorithm/src/msa_alignment/BaseAlignmentAlgorithmIds.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/msa_alignment/SimpleAddingToAlignment.cpp b/src/corelibs/U2Algorithm/src/msa_alignment/SimpleAddingToAlignment.cpp index 3b5ec346f94b3c28779a6e24b2aaccc2c6d8492c..d98826ec8f83c5de2da27fc66143dbf6945c456e 100644 --- a/src/corelibs/U2Algorithm/src/msa_alignment/SimpleAddingToAlignment.cpp +++ b/src/corelibs/U2Algorithm/src/msa_alignment/SimpleAddingToAlignment.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/msa_alignment/SimpleAddingToAlignment.h b/src/corelibs/U2Algorithm/src/msa_alignment/SimpleAddingToAlignment.h index 93bb136af3e8dd457d5756f82dbf4485c786b08b..204d87861cbdbb5ed2e76d79bafa21d122a8cffd 100644 --- a/src/corelibs/U2Algorithm/src/msa_alignment/SimpleAddingToAlignment.h +++ b/src/corelibs/U2Algorithm/src/msa_alignment/SimpleAddingToAlignment.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/pairwise_alignment/NWAligner.cpp b/src/corelibs/U2Algorithm/src/pairwise_alignment/NWAligner.cpp index eea29456016b094ca0a2f8805ce202db6b9156ea..b27a9aaf7197338139401e034dcb158ebd19128b 100644 --- a/src/corelibs/U2Algorithm/src/pairwise_alignment/NWAligner.cpp +++ b/src/corelibs/U2Algorithm/src/pairwise_alignment/NWAligner.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/pairwise_alignment/NWAligner.h b/src/corelibs/U2Algorithm/src/pairwise_alignment/NWAligner.h index 38d5537ee5cd73d1fa5d81932c8d465bd1d46463..ae5783aae1726f99c8472b1d3ef73a93cd6b3893 100644 --- a/src/corelibs/U2Algorithm/src/pairwise_alignment/NWAligner.h +++ b/src/corelibs/U2Algorithm/src/pairwise_alignment/NWAligner.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/pairwise_alignment/PairwiseAligner.cpp b/src/corelibs/U2Algorithm/src/pairwise_alignment/PairwiseAligner.cpp index f33f81a1c03e6af726f2d17c3d3afb34ed22576c..a3f9f395b24630ea6e2f690b8b9f60b61b42d668 100644 --- a/src/corelibs/U2Algorithm/src/pairwise_alignment/PairwiseAligner.cpp +++ b/src/corelibs/U2Algorithm/src/pairwise_alignment/PairwiseAligner.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/pairwise_alignment/PairwiseAligner.h b/src/corelibs/U2Algorithm/src/pairwise_alignment/PairwiseAligner.h index 2de55cc88d8b6bb27d5cd5989ad927925f70c40c..14c47faedb9ce7cedab24d1e3667fa2c2d8adb7e 100644 --- a/src/corelibs/U2Algorithm/src/pairwise_alignment/PairwiseAligner.h +++ b/src/corelibs/U2Algorithm/src/pairwise_alignment/PairwiseAligner.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/pairwise_alignment/PairwiseAlignmentTask.cpp b/src/corelibs/U2Algorithm/src/pairwise_alignment/PairwiseAlignmentTask.cpp index 34d6ee839ec6c1ee9c2edf3e480e2e879142a0fb..b13e8bb8afece704f2638ef9d8f3fd31882dce23 100644 --- a/src/corelibs/U2Algorithm/src/pairwise_alignment/PairwiseAlignmentTask.cpp +++ b/src/corelibs/U2Algorithm/src/pairwise_alignment/PairwiseAlignmentTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/pairwise_alignment/PairwiseAlignmentTask.h b/src/corelibs/U2Algorithm/src/pairwise_alignment/PairwiseAlignmentTask.h index 6eb6a3413acf31367cb4627d54edd27a9bf82b5d..8a5ac59f31d4ed36930e9704fb89f5b3447479bf 100644 --- a/src/corelibs/U2Algorithm/src/pairwise_alignment/PairwiseAlignmentTask.h +++ b/src/corelibs/U2Algorithm/src/pairwise_alignment/PairwiseAlignmentTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/phyltree/CreatePhyTreeSettings.cpp b/src/corelibs/U2Algorithm/src/phyltree/CreatePhyTreeSettings.cpp index 64cfce1990775e3f228278011b26d2f57cd6aa77..930c14962548ce9f83fe14e03ea3495cd79a6847 100644 --- a/src/corelibs/U2Algorithm/src/phyltree/CreatePhyTreeSettings.cpp +++ b/src/corelibs/U2Algorithm/src/phyltree/CreatePhyTreeSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,7 +24,7 @@ namespace U2{ CreatePhyTreeSettings::CreatePhyTreeSettings() : - algorithmId(""), + algorithm(""), matrixId(""), displayWithAlignmentEditor(true), syncAlignmentWithTree(true), diff --git a/src/corelibs/U2Algorithm/src/phyltree/CreatePhyTreeSettings.h b/src/corelibs/U2Algorithm/src/phyltree/CreatePhyTreeSettings.h index 36172eb054aa910999687a381c1ff2085f3c43a9..ae3aaa38a10eaed42232b53c18ea44c54429fc92 100644 --- a/src/corelibs/U2Algorithm/src/phyltree/CreatePhyTreeSettings.h +++ b/src/corelibs/U2Algorithm/src/phyltree/CreatePhyTreeSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,7 +33,7 @@ namespace U2{ class U2ALGORITHM_EXPORT CreatePhyTreeSettings{ public: CreatePhyTreeSettings(); - QString algorithmId; + QString algorithm; QString matrixId; bool displayWithAlignmentEditor; bool syncAlignmentWithTree; diff --git a/src/corelibs/U2Algorithm/src/phyltree/PhyTreeGenerator.h b/src/corelibs/U2Algorithm/src/phyltree/PhyTreeGenerator.h index c1a7aaf9beac2158b026d2f1fa2eb10c9a2a0507..d6aa6372785e68e99c328c98d60d2b47a6924334 100644 --- a/src/corelibs/U2Algorithm/src/phyltree/PhyTreeGenerator.h +++ b/src/corelibs/U2Algorithm/src/phyltree/PhyTreeGenerator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/phyltree/PhyTreeGeneratorRegistry.cpp b/src/corelibs/U2Algorithm/src/phyltree/PhyTreeGeneratorRegistry.cpp index ae4fb41a266a0d8e5e6b24bdd55f747c23e9b3fb..78f4e65ac08c65f33d277ea0957e8ae069818119 100644 --- a/src/corelibs/U2Algorithm/src/phyltree/PhyTreeGeneratorRegistry.cpp +++ b/src/corelibs/U2Algorithm/src/phyltree/PhyTreeGeneratorRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/phyltree/PhyTreeGeneratorRegistry.h b/src/corelibs/U2Algorithm/src/phyltree/PhyTreeGeneratorRegistry.h index e1ee0d26bea4ebede786355c44918439831df6bd..05eb93c75e66429d320fc5926e09d6f6be0d9dad 100644 --- a/src/corelibs/U2Algorithm/src/phyltree/PhyTreeGeneratorRegistry.h +++ b/src/corelibs/U2Algorithm/src/phyltree/PhyTreeGeneratorRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/phyltree/PhyTreeGeneratorTask.cpp b/src/corelibs/U2Algorithm/src/phyltree/PhyTreeGeneratorTask.cpp index 16f7ca821e7080c6c0f3e106d00ae0754bbd046e..03dcf18503ecf6b9efa79cdca9a1633c78107b1a 100644 --- a/src/corelibs/U2Algorithm/src/phyltree/PhyTreeGeneratorTask.cpp +++ b/src/corelibs/U2Algorithm/src/phyltree/PhyTreeGeneratorTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -46,7 +46,7 @@ PhyTreeGeneratorLauncherTask::PhyTreeGeneratorLauncherTask(const MultipleSequenc tpm = Task::Progress_SubTasksBased; } void PhyTreeGeneratorLauncherTask::prepare(){ - QString algId = settings.algorithmId; + QString algId = settings.algorithm; PhyTreeGeneratorRegistry* registry = AppContext::getPhyTreeGeneratorRegistry(); PhyTreeGenerator* generator = registry->getGenerator(algId); assert(generator!=NULL); diff --git a/src/corelibs/U2Algorithm/src/phyltree/PhyTreeGeneratorTask.h b/src/corelibs/U2Algorithm/src/phyltree/PhyTreeGeneratorTask.h index 68f75eeb9f86d4bb29c99327d26f1bb561cd0bb5..14ba8bdb6c941228b7351c704e43ea0369ac0ced 100644 --- a/src/corelibs/U2Algorithm/src/phyltree/PhyTreeGeneratorTask.h +++ b/src/corelibs/U2Algorithm/src/phyltree/PhyTreeGeneratorTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/AlignmentAlgorithmsRegistry.cpp b/src/corelibs/U2Algorithm/src/registry/AlignmentAlgorithmsRegistry.cpp index 952b4b537cf6431cc2d510cf2cac86669e168824..fd6d0d40cd860f4c0e7705ddee130774f95a5c1d 100644 --- a/src/corelibs/U2Algorithm/src/registry/AlignmentAlgorithmsRegistry.cpp +++ b/src/corelibs/U2Algorithm/src/registry/AlignmentAlgorithmsRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/AlignmentAlgorithmsRegistry.h b/src/corelibs/U2Algorithm/src/registry/AlignmentAlgorithmsRegistry.h index 18f226d5cf0f46acbec20a8e85d4f0b996f24834..0da3c2e9c434cb1ee990918f0acc635ef9579781 100644 --- a/src/corelibs/U2Algorithm/src/registry/AlignmentAlgorithmsRegistry.h +++ b/src/corelibs/U2Algorithm/src/registry/AlignmentAlgorithmsRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/CDSearchTaskFactoryRegistry.h b/src/corelibs/U2Algorithm/src/registry/CDSearchTaskFactoryRegistry.h index ff3d65bdeb4aff6b31c0e709c57eb0b94921df26..2176269e4e39bfd3c6f2902c906921a1b5752aca 100644 --- a/src/corelibs/U2Algorithm/src/registry/CDSearchTaskFactoryRegistry.h +++ b/src/corelibs/U2Algorithm/src/registry/CDSearchTaskFactoryRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/CudaGpuRegistry.cpp b/src/corelibs/U2Algorithm/src/registry/CudaGpuRegistry.cpp index 59fb3eddef5f404fabb439fd8aa2f3e5179b62d4..0d148ed8ff3559d0305ad1ff28276c4d9f967682 100644 --- a/src/corelibs/U2Algorithm/src/registry/CudaGpuRegistry.cpp +++ b/src/corelibs/U2Algorithm/src/registry/CudaGpuRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/CudaGpuRegistry.h b/src/corelibs/U2Algorithm/src/registry/CudaGpuRegistry.h index f76299abad571f67ce3aae5fbc73de6646595a27..2af2233c9e1112d22a31680b35879b5935da59bd 100644 --- a/src/corelibs/U2Algorithm/src/registry/CudaGpuRegistry.h +++ b/src/corelibs/U2Algorithm/src/registry/CudaGpuRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/DnaAssemblyAlgRegistry.cpp b/src/corelibs/U2Algorithm/src/registry/DnaAssemblyAlgRegistry.cpp index 1cf6c63a1fe6ea401a41551f84c729bbea9e5cb3..85ad8e71adadd7e8254890ac8f1b3e89ccdb3cf4 100644 --- a/src/corelibs/U2Algorithm/src/registry/DnaAssemblyAlgRegistry.cpp +++ b/src/corelibs/U2Algorithm/src/registry/DnaAssemblyAlgRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/DnaAssemblyAlgRegistry.h b/src/corelibs/U2Algorithm/src/registry/DnaAssemblyAlgRegistry.h index 56c3596f1311a716cc6057a6317c0989c5fe9083..2629e24d4f15d3cdc1f7ceabb9ca4aebe048e66f 100644 --- a/src/corelibs/U2Algorithm/src/registry/DnaAssemblyAlgRegistry.h +++ b/src/corelibs/U2Algorithm/src/registry/DnaAssemblyAlgRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/DnaAssemblyTask.cpp b/src/corelibs/U2Algorithm/src/registry/DnaAssemblyTask.cpp index 465d8e2255d555134db36d694e353c61be210af2..95bf5abd37347a37c228ecfe87f85003036e1654 100644 --- a/src/corelibs/U2Algorithm/src/registry/DnaAssemblyTask.cpp +++ b/src/corelibs/U2Algorithm/src/registry/DnaAssemblyTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -42,10 +42,6 @@ DnaAssemblyToReferenceTask::DnaAssemblyToReferenceTask(const DnaAssemblyToRefTas } void DnaAssemblyToReferenceTask::setUpIndexBuilding(const QStringList &indexSuffixes) { - if (settings.prebuiltIndex) { - return; - } - if (isIndexUrl(settings.refSeqUrl.getURLString(), indexSuffixes)) { settings.prebuiltIndex = true; settings.refSeqUrl = getBaseUrl(settings.refSeqUrl.getURLString(), indexSuffixes); diff --git a/src/corelibs/U2Algorithm/src/registry/DnaAssemblyTask.h b/src/corelibs/U2Algorithm/src/registry/DnaAssemblyTask.h index 908520a6cc8e9fb27d791cc4c71459302a225d6d..c6fc6e3f9d52af05a3d054eba4b33657351d6bc4 100644 --- a/src/corelibs/U2Algorithm/src/registry/DnaAssemblyTask.h +++ b/src/corelibs/U2Algorithm/src/registry/DnaAssemblyTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/GenomeAssemblyRegistry.cpp b/src/corelibs/U2Algorithm/src/registry/GenomeAssemblyRegistry.cpp index 4ecde5460185a2d21e247e3aacfb8ece908a7e8f..4dec9cbae2472497af0ce6b6ac2d277db35b5c84 100644 --- a/src/corelibs/U2Algorithm/src/registry/GenomeAssemblyRegistry.cpp +++ b/src/corelibs/U2Algorithm/src/registry/GenomeAssemblyRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/GenomeAssemblyRegistry.h b/src/corelibs/U2Algorithm/src/registry/GenomeAssemblyRegistry.h index ae7c222f4465349259a3505341f6560b111b88ae..dc6defab81d51a869d3a28d433090461eb387814 100644 --- a/src/corelibs/U2Algorithm/src/registry/GenomeAssemblyRegistry.h +++ b/src/corelibs/U2Algorithm/src/registry/GenomeAssemblyRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/OpenCLGpuRegistry.cpp b/src/corelibs/U2Algorithm/src/registry/OpenCLGpuRegistry.cpp index 1f9c993b9e055e81adadc06ac531a9c2dfa82fa4..1af27d729e3149db55fd398ade7e609b0254dd13 100644 --- a/src/corelibs/U2Algorithm/src/registry/OpenCLGpuRegistry.cpp +++ b/src/corelibs/U2Algorithm/src/registry/OpenCLGpuRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/OpenCLGpuRegistry.h b/src/corelibs/U2Algorithm/src/registry/OpenCLGpuRegistry.h index cbdef202929e9d203f4ab6b2d1aa4e8abc1c58bd..59341f9d43349fe6e28e69527bec8df97e7e9c1f 100644 --- a/src/corelibs/U2Algorithm/src/registry/OpenCLGpuRegistry.h +++ b/src/corelibs/U2Algorithm/src/registry/OpenCLGpuRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/RepeatFinderTaskFactoryRegistry.cpp b/src/corelibs/U2Algorithm/src/registry/RepeatFinderTaskFactoryRegistry.cpp index 3c0c1c51f4fcea223d2a698321241e704d873321..c32f14248ba1b57aac2bc628afc44d804992e23a 100644 --- a/src/corelibs/U2Algorithm/src/registry/RepeatFinderTaskFactoryRegistry.cpp +++ b/src/corelibs/U2Algorithm/src/registry/RepeatFinderTaskFactoryRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/RepeatFinderTaskFactoryRegistry.h b/src/corelibs/U2Algorithm/src/registry/RepeatFinderTaskFactoryRegistry.h index 97bc4692b67511f8ec2d4e90a6a2b8fa5db329c2..7f66040360833aef7abd9b3c1d2cf543ef391787 100644 --- a/src/corelibs/U2Algorithm/src/registry/RepeatFinderTaskFactoryRegistry.h +++ b/src/corelibs/U2Algorithm/src/registry/RepeatFinderTaskFactoryRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/SecStructPredictAlgRegistry.cpp b/src/corelibs/U2Algorithm/src/registry/SecStructPredictAlgRegistry.cpp index 3ce67507c1b4aea8f6b193569d7b8415034e96fb..4b96368e9f37c4ff32e8dba9489d61670374c7f3 100644 --- a/src/corelibs/U2Algorithm/src/registry/SecStructPredictAlgRegistry.cpp +++ b/src/corelibs/U2Algorithm/src/registry/SecStructPredictAlgRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/SecStructPredictAlgRegistry.h b/src/corelibs/U2Algorithm/src/registry/SecStructPredictAlgRegistry.h index 5a740b79653d8b1a1acb2492dc7332c01155a34c..1735ea4b3307269c6b4198c1495f27c749859d3c 100644 --- a/src/corelibs/U2Algorithm/src/registry/SecStructPredictAlgRegistry.h +++ b/src/corelibs/U2Algorithm/src/registry/SecStructPredictAlgRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/SecStructPredictTask.cpp b/src/corelibs/U2Algorithm/src/registry/SecStructPredictTask.cpp index 4c54c3a43924616ca2c38e2b54f0320e7d359d38..685ff82a0055aab9fd48b4a1165406bef4808958 100644 --- a/src/corelibs/U2Algorithm/src/registry/SecStructPredictTask.cpp +++ b/src/corelibs/U2Algorithm/src/registry/SecStructPredictTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/SecStructPredictTask.h b/src/corelibs/U2Algorithm/src/registry/SecStructPredictTask.h index f623a51f6b262dde900fe902a1222b3d4c4a0a09..7482d3cb0879ff87e89a78df23e88679468acf06 100644 --- a/src/corelibs/U2Algorithm/src/registry/SecStructPredictTask.h +++ b/src/corelibs/U2Algorithm/src/registry/SecStructPredictTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/SplicedAlignmentTask.cpp b/src/corelibs/U2Algorithm/src/registry/SplicedAlignmentTask.cpp index 6e90a39dfa7f485f3b9277e2b851f435e28a6ec6..a1323c74d3fc1e5e2b9181b0eb9470610054c238 100644 --- a/src/corelibs/U2Algorithm/src/registry/SplicedAlignmentTask.cpp +++ b/src/corelibs/U2Algorithm/src/registry/SplicedAlignmentTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/SplicedAlignmentTask.h b/src/corelibs/U2Algorithm/src/registry/SplicedAlignmentTask.h index aaa451d5f9909fdb6ff2c4c23370d7374a3e679f..fc56d72c0caaaf57347e5b1a115e05f244f6b51c 100644 --- a/src/corelibs/U2Algorithm/src/registry/SplicedAlignmentTask.h +++ b/src/corelibs/U2Algorithm/src/registry/SplicedAlignmentTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/SplicedAlignmentTaskRegistry.cpp b/src/corelibs/U2Algorithm/src/registry/SplicedAlignmentTaskRegistry.cpp index f07972483f3644ca0c1c3c128f0dc164b6ed620d..c10f5c80925eeeadd22a1e6a5fa5ee7a289fc65c 100644 --- a/src/corelibs/U2Algorithm/src/registry/SplicedAlignmentTaskRegistry.cpp +++ b/src/corelibs/U2Algorithm/src/registry/SplicedAlignmentTaskRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/SplicedAlignmentTaskRegistry.h b/src/corelibs/U2Algorithm/src/registry/SplicedAlignmentTaskRegistry.h index c2a6d880ada5c6b3f24a30de1767c4b032f22b62..a5d80c1495a58e30ce9775cadfbf681fab431d52 100644 --- a/src/corelibs/U2Algorithm/src/registry/SplicedAlignmentTaskRegistry.h +++ b/src/corelibs/U2Algorithm/src/registry/SplicedAlignmentTaskRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/SubstMatrixRegistry.cpp b/src/corelibs/U2Algorithm/src/registry/SubstMatrixRegistry.cpp index bad540d5156fcde7850bc0a564cfff28f283bbaa..87a5cc71c96560c3a583fa0a69788e2ff42dd391 100644 --- a/src/corelibs/U2Algorithm/src/registry/SubstMatrixRegistry.cpp +++ b/src/corelibs/U2Algorithm/src/registry/SubstMatrixRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/registry/SubstMatrixRegistry.h b/src/corelibs/U2Algorithm/src/registry/SubstMatrixRegistry.h index c13a4c22d480e22400993abd1b01a06bb99679de..67fa6af6fa58cb32fce0a5fa6218d3e6786bf056 100644 --- a/src/corelibs/U2Algorithm/src/registry/SubstMatrixRegistry.h +++ b/src/corelibs/U2Algorithm/src/registry/SubstMatrixRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignExternalPropTag.cpp b/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignExternalPropTag.cpp index e2062ed445a6d30c6b7ed9fd7a37f29cd8372c76..0c1ce2b2424c710f28b075d304b6d841b5f1b8e1 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignExternalPropTag.cpp +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignExternalPropTag.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignExternalPropTag.h b/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignExternalPropTag.h index a8b017084bbb89d8017af28d09541ca2aa317187..5221103697b17a443778e3a972a8aa4bc4119597 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignExternalPropTag.h +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignExternalPropTag.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignResultNamesTag.h b/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignResultNamesTag.h index 45d5012b92352e98a4de41696fb7a604f44951f0..3ccff4accbefb4dd3dc872ce84bcbc9ca83e9685 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignResultNamesTag.h +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignResultNamesTag.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignResultNamesTagsRegistry.cpp b/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignResultNamesTagsRegistry.cpp index ef7d0276430bd35f1c76771ddb96263bf43d79db..d533237e9eeb1c3061cdffe339858c5250b6404f 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignResultNamesTagsRegistry.cpp +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignResultNamesTagsRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignResultNamesTagsRegistry.h b/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignResultNamesTagsRegistry.h index 6b7bd0959155ae49b26b318fa7a8cdde3b2721bc..551cbb917bd5e10d0a2e8b6a5bc5ff66125f1350 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignResultNamesTagsRegistry.h +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignResultNamesTagsRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignSeqPrefixTag.cpp b/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignSeqPrefixTag.cpp index e098ddf6cd79b185c9aad17b309d5b7d2f7857c7..04e089232485b46c1577fc5f75eef227b063e736 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignSeqPrefixTag.cpp +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignSeqPrefixTag.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignSeqPrefixTag.h b/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignSeqPrefixTag.h index 0a575f5aa0e801a67ae17e06709006a288bed882..371405f93a0e52c329b2258bb0c74f0fb4f7a00b 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignSeqPrefixTag.h +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignSeqPrefixTag.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignSubseqPropTag.cpp b/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignSubseqPropTag.cpp index f5c95f67fef7a126361d5695524a658bfdbb98a2..3f2830602ea6704dc340dceb1b5daf50271e747b 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignSubseqPropTag.cpp +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignSubseqPropTag.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignSubseqPropTag.h b/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignSubseqPropTag.h index f8b4db913abd61054bc72eb0fae658c428208e84..836947baeddd111bf31c8f72ec1a68690f66b4c0 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignSubseqPropTag.h +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SWMulAlignSubseqPropTag.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SWResultFilterRegistry.cpp b/src/corelibs/U2Algorithm/src/smith_waterman/SWResultFilterRegistry.cpp index fb122d2d3aba5cb54b46ca3133fa7f94e28952bb..93d5fbd51d9d27767a6cc9bfe796c0c06cc2d848 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SWResultFilterRegistry.cpp +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SWResultFilterRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SWResultFilterRegistry.h b/src/corelibs/U2Algorithm/src/smith_waterman/SWResultFilterRegistry.h index 328e3b80a004a5c670678f543a1f5e3b698f4382..18411f9f32322eb6458f2932963ffa303b93882a 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SWResultFilterRegistry.h +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SWResultFilterRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -48,7 +48,7 @@ public: private: QMutex mutex; - QHash<QString, SmithWatermanResultFilter*> filters; + QMap<QString, SmithWatermanResultFilter*> filters; QString defaultFilterId; }; diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanReportCallback.cpp b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanReportCallback.cpp index c5db9d9a5905577ee2208b07610eebc47df7f108..8a67971cc5f7116c69a859ff0fe46573bacb7e8c 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanReportCallback.cpp +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanReportCallback.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanReportCallback.h b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanReportCallback.h index fb4d35c856da131b13525d8cb8f2dbef3670802d..9d41f6814e56dd8cee63cd73e98695a50cc852ae 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanReportCallback.h +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanReportCallback.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanResult.cpp b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanResult.cpp index dc64be1dedf1af553029331ad704091f0c7b742f..c83bf3fc7c169553c0da12b486b93889429c5413 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanResult.cpp +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanResult.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanResult.h b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanResult.h index 45c19181d1871c5ddc71e4fa06c3aec3608fa50f..79b9b296e8ef58a2965342ba3c7a25a7ac86826f 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanResult.h +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanResult.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanResultFilters.cpp b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanResultFilters.cpp index 66ae99de9231ad00615cae062a0c1c3ab12931df..5a401ed1a16f1004b9b63fd12473a25d74e834e6 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanResultFilters.cpp +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanResultFilters.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanResultFilters.h b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanResultFilters.h index ceb6a43ef6c45e2486717d4a8ffb2368e5f42898..bd5f01746297f17c981650948d185584fd98fad0 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanResultFilters.h +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanResultFilters.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanSettings.h b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanSettings.h index 9c6427d46a0cad29210fe7fe39a043642a249e7e..a5ad4774e20949700c703686635c1497ea8f2c1b 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanSettings.h +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanTaskFactory.h b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanTaskFactory.h index fda6783da47d23eb3b2cdbd409740a644d28e768..105aa63c777cbcc509f267552e5c5c8140d3bbec 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanTaskFactory.h +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanTaskFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanTaskFactoryRegistry.cpp b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanTaskFactoryRegistry.cpp index 472a87fd70d33b0d7e94f76ca14dd01485ecc5b2..b9831d0a7cba82f5f63d9108f0e117ad37fa3a5c 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanTaskFactoryRegistry.cpp +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanTaskFactoryRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanTaskFactoryRegistry.h b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanTaskFactoryRegistry.h index 47c7a1593f20856e0644126057402087c6ff5799..3e5b4573b9f12ec54bfc66f0331eb697967a33bd 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanTaskFactoryRegistry.h +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanTaskFactoryRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanUtil.cpp b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanUtil.cpp index 24ca8f7fa182c601cfdbf79cb69ee660f1ad95ab..fb5851c96c15c067384d6117c38d19428a8854c2 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanUtil.cpp +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanUtil.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanUtil.h b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanUtil.h index e6aaeabc871283ac224cd5caffb94d7a52f5a4d9..a2ccf65e75cfc7cabdb8759b450a827603da8ad3 100644 --- a/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanUtil.h +++ b/src/corelibs/U2Algorithm/src/smith_waterman/SmithWatermanUtil.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithm.cpp b/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithm.cpp index 81bfb864ef7dc68d5c95048ff315f15b8ae21535..e23f06991e1b749c543bad8da5848506574c6931 100644 --- a/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithm.cpp +++ b/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithm.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithm.h b/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithm.h index b1d2b552556c6c28dbc53fd0f4eaa607ed3ab805..ccf83fe74ca32b97a2aa168ece211e53ab2e391e 100644 --- a/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithm.h +++ b/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithm.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithmFactory.cpp b/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithmFactory.cpp index 22c21a48727e376734ac0ed2c5197746ee72dcd1..408dbf9f8d69b685d947d0666000d55052912280 100644 --- a/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithmFactory.cpp +++ b/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithmFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithmFactory.h b/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithmFactory.h index 04c84e05924270808c0a3050baca7721174fccd6..b0c684508231e0b54fdb8f67678f2c432740426d 100644 --- a/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithmFactory.h +++ b/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithmFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithmRegistry.cpp b/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithmRegistry.cpp index 5dbc0cf3add08e2a449032e64b91a4bdcdc8db39..0e4da04b9d7ca7aa510d8a06a9ca08882e5f8a87 100644 --- a/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithmRegistry.cpp +++ b/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithmRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithmRegistry.h b/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithmRegistry.h index e3936bc9ee9aefcd6521f8e3ad32925d4dcfe243..071500ef587fb932ecc20aab1a8b28bfd2ad66a8 100644 --- a/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithmRegistry.h +++ b/src/corelibs/U2Algorithm/src/structural_alignment/StructuralAlignmentAlgorithmRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithm.cpp b/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithm.cpp index 01c04a0e28af97e71f98f92f1ea7f7837720d9dd..c348fead224ff86cd8eb887fc5025e101a2e0bec 100644 --- a/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithm.cpp +++ b/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithm.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithm.h b/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithm.h index f284ee1082dfedd035975b27ba009732ed9e41a8..a1033182a774db39514b4adaaefe46312c1484a2 100644 --- a/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithm.h +++ b/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithm.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmDefault.cpp b/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmDefault.cpp index 37fa2817a1ae34b5a123d713898f74a9cf39dd0b..bd1bbbe12fdeee61ba7f524e628ee9c052546574 100644 --- a/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmDefault.cpp +++ b/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmDefault.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmDefault.h b/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmDefault.h index b773314acf2a8845f64ea4bca1d2a8f965a6b068..06e30869e2ec789893b0fc9f4b1b5cf69167b491 100644 --- a/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmDefault.h +++ b/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmDefault.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmRegistry.cpp b/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmRegistry.cpp index 57145b54367250482b09a7d1ff86a1383308f5da..c858f8c4ac9d0844d11103fcefa7c9baf4e59e21 100644 --- a/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmRegistry.cpp +++ b/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmRegistry.h b/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmRegistry.h index d10d9ba3b269865a05471a93924e4c557041034e..a73b47a67252ea4675e5645847de883defb6dd8f 100644 --- a/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmRegistry.h +++ b/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmSamtools.cpp b/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmSamtools.cpp index 1f7bdc8ad0da6fd2f6e26e65e39fb140458ff0f9..f09a8754d2b2172f5a0866da6db97f4ff617a720 100644 --- a/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmSamtools.cpp +++ b/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmSamtools.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmSamtools.h b/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmSamtools.h index fc17aae880f1ac6c188cafbe8b74caa5290f75c3..c74a71fce956c53566bd6c1d395fd9a8b5ace75e 100644 --- a/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmSamtools.h +++ b/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusAlgorithmSamtools.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusUtils.cpp b/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusUtils.cpp index 252873b8f29f3b29672de38822b57e6030f58e26..102f260f3aaf56fa03fd4bc736f987078fc0c1f4 100644 --- a/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusUtils.cpp +++ b/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusUtils.h b/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusUtils.h index 637df22ef7d544c9858fd2eb91918a6e674e2dc7..8d0e94eb09fb7c38fcfb799b561f8e3e0752275e 100644 --- a/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusUtils.h +++ b/src/corelibs/U2Algorithm/src/util_assembly_consensus/AssemblyConsensusUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,6 +22,8 @@ #ifndef _U2_ASSEMBLY_CONSENSUS_UTILS_H_ #define _U2_ASSEMBLY_CONSENSUS_UTILS_H_ +#include <QVector> + #include <U2Core/U2Assembly.h> #include <U2Core/U2Type.h> diff --git a/src/corelibs/U2Algorithm/src/util_assembly_consensus/BuiltInAssemblyConsensusAlgorithms.cpp b/src/corelibs/U2Algorithm/src/util_assembly_consensus/BuiltInAssemblyConsensusAlgorithms.cpp index aee18b072393ae1a697877cda3e1a7c61d0fc422..b8bbfb07e3a46916432022a56672ef5ccf008a9a 100644 --- a/src/corelibs/U2Algorithm/src/util_assembly_consensus/BuiltInAssemblyConsensusAlgorithms.cpp +++ b/src/corelibs/U2Algorithm/src/util_assembly_consensus/BuiltInAssemblyConsensusAlgorithms.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_assembly_consensus/BuiltInAssemblyConsensusAlgorithms.h b/src/corelibs/U2Algorithm/src/util_assembly_consensus/BuiltInAssemblyConsensusAlgorithms.h index d633a4349150307e8d3c64a1f017bd713f7a56f2..81ba632a575f2c74208670a41e91a1d0f36d71e0 100644 --- a/src/corelibs/U2Algorithm/src/util_assembly_consensus/BuiltInAssemblyConsensusAlgorithms.h +++ b/src/corelibs/U2Algorithm/src/util_assembly_consensus/BuiltInAssemblyConsensusAlgorithms.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_gpu/opencl/BinaryFind.cl b/src/corelibs/U2Algorithm/src/util_gpu/opencl/BinaryFind.cl index 5d73c44d27f2aa8f9cdccefb5960f5de38f132b9..f8dcfcc9b4d13734fb982f2ef4202b83a524db8e 100755 --- a/src/corelibs/U2Algorithm/src/util_gpu/opencl/BinaryFind.cl +++ b/src/corelibs/U2Algorithm/src/util_gpu/opencl/BinaryFind.cl @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_gpu/opencl/OpenCLHelper.cpp b/src/corelibs/U2Algorithm/src/util_gpu/opencl/OpenCLHelper.cpp index 64911fd46c15668599708157087f62d19cc76e31..aafe75ddee2fea89d8521d9a965b568feccb7b21 100644 --- a/src/corelibs/U2Algorithm/src/util_gpu/opencl/OpenCLHelper.cpp +++ b/src/corelibs/U2Algorithm/src/util_gpu/opencl/OpenCLHelper.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_gpu/opencl/OpenCLHelper.h b/src/corelibs/U2Algorithm/src/util_gpu/opencl/OpenCLHelper.h index 797d7b722cbdda8a27e912024d57664ee0d7cf7e..d36372499667371ab184a1ac95922cc1ef380cc9 100644 --- a/src/corelibs/U2Algorithm/src/util_gpu/opencl/OpenCLHelper.h +++ b/src/corelibs/U2Algorithm/src/util_gpu/opencl/OpenCLHelper.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_gpu/opencl/OpenCLUtils.cpp b/src/corelibs/U2Algorithm/src/util_gpu/opencl/OpenCLUtils.cpp index cf932ee7270db9addace4f5d539db41e73dbb8ab..c124c027c506810558ad10475d04c10daf76ee76 100644 --- a/src/corelibs/U2Algorithm/src/util_gpu/opencl/OpenCLUtils.cpp +++ b/src/corelibs/U2Algorithm/src/util_gpu/opencl/OpenCLUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_gpu/opencl/OpenCLUtils.h b/src/corelibs/U2Algorithm/src/util_gpu/opencl/OpenCLUtils.h index efbfe9d04a07153a2c7772649221e61a90de1575..75cb64b59f5710ea8db77424f90db4fbc14000e4 100644 --- a/src/corelibs/U2Algorithm/src/util_gpu/opencl/OpenCLUtils.h +++ b/src/corelibs/U2Algorithm/src/util_gpu/opencl/OpenCLUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_consensus/BuiltInConsensusAlgorithms.cpp b/src/corelibs/U2Algorithm/src/util_msa_consensus/BuiltInConsensusAlgorithms.cpp index 7a39560d50a35bb1766bdbe01fad08745bf5ea01..105eac4842461ca3aef5b0e3504191bbe3ed8d62 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_consensus/BuiltInConsensusAlgorithms.cpp +++ b/src/corelibs/U2Algorithm/src/util_msa_consensus/BuiltInConsensusAlgorithms.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_consensus/BuiltInConsensusAlgorithms.h b/src/corelibs/U2Algorithm/src/util_msa_consensus/BuiltInConsensusAlgorithms.h index 4d8c12f0fb78b406e79ebba8bee0eab932994278..4312a41b748203b30bebb887aa5d50b700132056 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_consensus/BuiltInConsensusAlgorithms.h +++ b/src/corelibs/U2Algorithm/src/util_msa_consensus/BuiltInConsensusAlgorithms.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithm.cpp b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithm.cpp index 1d1858c0a9a4a6546abf5e365c378d93bdd7bcf1..3499f289bf5176e595b09c69107fea3d044fe2f1 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithm.cpp +++ b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithm.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithm.h b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithm.h index 85b008fa151abd0c7b2c768ad8128dd5faceb3d9..57282999010e8b4e8c442de80a6eac257f856d4f 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithm.h +++ b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithm.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmClustal.cpp b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmClustal.cpp index e3306a004b42e8665d8ab192f94ae592967c93a6..cefac3e13529cc9b955f2351ff6831e47d7c2b65 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmClustal.cpp +++ b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmClustal.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmClustal.h b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmClustal.h index d29ab3defa0bc7d717a466f40a472f097c71e874..792d2331f276d4a32dee1c9427f58b701ea036bf 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmClustal.h +++ b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmClustal.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmDefault.cpp b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmDefault.cpp index 40c8e9741a6ecef896f9f928ce901fae162125e7..b9382dda5977da42d2775b5252832bf7635fa264 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmDefault.cpp +++ b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmDefault.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmDefault.h b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmDefault.h index 80716654b3cbab6b6bf07926ccfa7ecc34cdb57f..84708d6ffa21a2df9a7e88f1dafd4c62ff8bff3d 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmDefault.h +++ b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmDefault.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmLevitsky.cpp b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmLevitsky.cpp index a9241fc4749dc9c42fa9f0fb975c55f15a7d014e..3a1b0bc3ef6edc28608962b8b3b237d1149caf00 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmLevitsky.cpp +++ b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmLevitsky.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmLevitsky.h b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmLevitsky.h index e288540710a52fcb412aac996993da93ec41f80f..7f0c6025fff3826173967606f958dfeedefad356 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmLevitsky.h +++ b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmLevitsky.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmRegistry.cpp b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmRegistry.cpp index ab3499bd64b90d71169f1028115d94a080b4b4e6..ce15f83560fee5c682346a988219ea3d02e63f1a 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmRegistry.cpp +++ b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmRegistry.h b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmRegistry.h index 4709a608b32673156be9163f7ac05a998611daf1..d59e229aef0180db5fc56ef2e00978c7a5d48f34 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmRegistry.h +++ b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmStrict.cpp b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmStrict.cpp index 029e329d1b77b634caf93e636f449a858add0c5a..2f85e787a87d66eea7719ab41b85e95abd2eed32 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmStrict.cpp +++ b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmStrict.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmStrict.h b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmStrict.h index c6012eec1a34360a80e19a0a6968ff528115fede..2531a2bb5bda37eb6b386289a9a2b736c67f9ab2 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmStrict.h +++ b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusAlgorithmStrict.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusUtils.cpp b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusUtils.cpp index dc2565069ed72aef17196ccba771371312a51710..f1a8e7cd956799fcd42df68d9ed1cb0dba7fa9e4 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusUtils.cpp +++ b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusUtils.h b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusUtils.h index 0f346db3f6c29b9d6d1943cbdad1d3fd224950e1..49c3375de4fe5b647c566b73307098c25ebaaf9a 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusUtils.h +++ b/src/corelibs/U2Algorithm/src/util_msa_consensus/MSAConsensusUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_consensus/MaConsensusAlgorithmSimpleExtended.cpp b/src/corelibs/U2Algorithm/src/util_msa_consensus/MaConsensusAlgorithmSimpleExtended.cpp index 121ca8bfcb7b3e643c66fac320d430641d5c0a41..62fe32ea271dda57d00b7f5a166e80d95cad1edf 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_consensus/MaConsensusAlgorithmSimpleExtended.cpp +++ b/src/corelibs/U2Algorithm/src/util_msa_consensus/MaConsensusAlgorithmSimpleExtended.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_consensus/MaConsensusAlgorithmSimpleExtended.h b/src/corelibs/U2Algorithm/src/util_msa_consensus/MaConsensusAlgorithmSimpleExtended.h index 2bea99399a5dbb2c6112fcf4f4e326bf174f3984..72248468d0b932241fd3c2fd26ec085fd9ffdf8c 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_consensus/MaConsensusAlgorithmSimpleExtended.h +++ b/src/corelibs/U2Algorithm/src/util_msa_consensus/MaConsensusAlgorithmSimpleExtended.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_distance/BuiltInDistanceAlgorithms.cpp b/src/corelibs/U2Algorithm/src/util_msa_distance/BuiltInDistanceAlgorithms.cpp index cd47e9367bb7e2f6322652d30405480bbf5dfac1..16c5c37c0f98845e37e7ca16a2a05a712b7a8fe0 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_distance/BuiltInDistanceAlgorithms.cpp +++ b/src/corelibs/U2Algorithm/src/util_msa_distance/BuiltInDistanceAlgorithms.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_distance/BuiltInDistanceAlgorithms.h b/src/corelibs/U2Algorithm/src/util_msa_distance/BuiltInDistanceAlgorithms.h index 939adf4ec899adbfcb7f7a8e4f15e91d71bc631e..e08e59c272a4f6c5e616af627c0581e88a14f033 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_distance/BuiltInDistanceAlgorithms.h +++ b/src/corelibs/U2Algorithm/src/util_msa_distance/BuiltInDistanceAlgorithms.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithm.cpp b/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithm.cpp index a04ae3916d512957bc9a92a0bc7d706a6a38167c..e738b1a25d7c3b72120e2dde4614a439220f4290 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithm.cpp +++ b/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithm.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithm.h b/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithm.h index 4bfca68d8aa9cd8d18dbc38ced9f3f3e8506f54c..df2cbd6259c45a8ab2018d10aec7013a6889c7d9 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithm.h +++ b/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithm.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmHamming.cpp b/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmHamming.cpp index 84e774dc78f48575256aee6b16d13475503cbd5a..d055963332689e7c816a538d8c4fc1091f47030b 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmHamming.cpp +++ b/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmHamming.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmHamming.h b/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmHamming.h index 089012b5bdada75ae9ec9f6bf773cdf5aad05b5e..364411ec24365234ed9a199dd1ae90d8a2c70694 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmHamming.h +++ b/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmHamming.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmHammingRevCompl.cpp b/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmHammingRevCompl.cpp index c053f69d535b996c681ba83ea2c8b97539fae3ee..e5613b173ef728652c1e83df3328dc33ee37b7fc 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmHammingRevCompl.cpp +++ b/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmHammingRevCompl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmHammingRevCompl.h b/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmHammingRevCompl.h index fb9ed08f924d0297e5a750c8cb72afe6989eb3b6..4d12517d5ec52e6189169abbd6803d929509b8c2 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmHammingRevCompl.h +++ b/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmHammingRevCompl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmRegistry.cpp b/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmRegistry.cpp index d6526b88840aad7554f9cd1a3084aedcc326e1ee..b0f764be599f64dba8356a53e0cb641673ea6d31 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmRegistry.cpp +++ b/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmRegistry.h b/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmRegistry.h index 2d47b02db92f3dad62a3d4641d4a8e39c4cade02..f5af6d4467a9e64a386c3747a1828f0af96d4ee8 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmRegistry.h +++ b/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmSimilarity.cpp b/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmSimilarity.cpp index eab328eb24ebffda4490d5f14352f05d75f14cf3..5372d47aa385f7ad5e610c2b20f0688e299a0333 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmSimilarity.cpp +++ b/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmSimilarity.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmSimilarity.h b/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmSimilarity.h index 0ed8869111e77e1668ea967cdb3a97d39cd09ca4..9695e8d2e7563ecef94b61799024c44f74f9721a 100644 --- a/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmSimilarity.h +++ b/src/corelibs/U2Algorithm/src/util_msa_distance/MSADistanceAlgorithmSimilarity.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/CreateSubalignmentTask.cpp b/src/corelibs/U2Algorithm/src/util_msaedit/CreateSubalignmentTask.cpp index 32ee2df8a8e7f1158671b5bbc727d183b393592c..3282d92566d05d31345883820437c74a2d8e3098 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/CreateSubalignmentTask.cpp +++ b/src/corelibs/U2Algorithm/src/util_msaedit/CreateSubalignmentTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -86,11 +86,11 @@ void CreateSubalignmentTask::prepare() { } //TODO: add "remove empty rows and columns" flag to crop function - QSet<QString> rowNames; - foreach (const QString& name, cfg.seqNames) { - rowNames.insert(name); + if (cfg.rowIds.isEmpty()) { + resultMAObj->crop(cfg.window, cfg.sequenceNames.toSet()); + } else { + resultMAObj->crop(cfg.window, cfg.rowIds); } - resultMAObj->crop(cfg.window, rowNames); if (cfg.saveImmediately) { addSubTask(new SaveDocumentTask(resultDocument, iof)); diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/CreateSubalignmentTask.h b/src/corelibs/U2Algorithm/src/util_msaedit/CreateSubalignmentTask.h index 29baa2c292e26d74d304337b58b95b751211da6e..1b17fcf478b313cfffd52cd708d66168a903088a 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/CreateSubalignmentTask.h +++ b/src/corelibs/U2Algorithm/src/util_msaedit/CreateSubalignmentTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,11 +34,22 @@ namespace U2{ class U2ALGORITHM_EXPORT CreateSubalignmentSettings { public: CreateSubalignmentSettings(){} + CreateSubalignmentSettings(const U2Region& w, const QStringList& sNames, const GUrl& path, bool save, bool add, DocumentFormatId formatId) - : window(w), seqNames(sNames), url(path), saveImmediately(save), addToProject(add), formatIdToSave(formatId) {} + : window(w), sequenceNames(sNames), url(path), saveImmediately(save), addToProject(add), formatIdToSave(formatId) {} + + CreateSubalignmentSettings(const U2Region& w, const QList<qint64>& rIds, const GUrl& path, bool save, bool add, DocumentFormatId formatId) + : window(w), rowIds(rIds), url(path), saveImmediately(save), addToProject(add), formatIdToSave(formatId) {} U2Region window; - QStringList seqNames; + + // Row ids to export + QList<qint64> rowIds; + + // Sequence names to export. Ignored if rowIds is not empty! + // This field may be removed after all code is migrated to row ids. + QStringList sequenceNames; + GUrl url; bool saveImmediately; bool addToProject; @@ -49,7 +60,7 @@ public: class U2ALGORITHM_EXPORT CreateSubalignmentTask : public DocumentProviderTask { Q_OBJECT public: - CreateSubalignmentTask(MultipleSequenceAlignmentObject* _maObj, const CreateSubalignmentSettings& settings ); + CreateSubalignmentTask(MultipleSequenceAlignmentObject* _maObj, const CreateSubalignmentSettings& settings); virtual void prepare(); const CreateSubalignmentSettings& getSettings() { return cfg; } diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/MsaUtilTasks.cpp b/src/corelibs/U2Algorithm/src/util_msaedit/MsaUtilTasks.cpp index d0e444b1b5f6a00190eaf18baac79b586b86e351..ced76a7bf5ac52d6e7d9361062db1696294ef7f7 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/MsaUtilTasks.cpp +++ b/src/corelibs/U2Algorithm/src/util_msaedit/MsaUtilTasks.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/MsaUtilTasks.h b/src/corelibs/U2Algorithm/src/util_msaedit/MsaUtilTasks.h index c142b7815ddf21d233a3c7eb07120feeeced75b8..2370084fb09171bc62bfd1ffe050da1360246bbf 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/MsaUtilTasks.h +++ b/src/corelibs/U2Algorithm/src/util_msaedit/MsaUtilTasks.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/ColorSchemeUtils.cpp b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/ColorSchemeUtils.cpp index 7f1ff6d44a10dec55af1dcc9bf1cc0a6a159b91c..6ea3f8ba16daa811f6935fedc87d57d03fbbd26b 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/ColorSchemeUtils.cpp +++ b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/ColorSchemeUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/ColorSchemeUtils.h b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/ColorSchemeUtils.h index 855ea5aae45b5873162355fef226d7e5df552a25..07a0ec3960f8aef926d746daa68d16e2ef73226c 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/ColorSchemeUtils.h +++ b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/ColorSchemeUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorScheme.cpp b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorScheme.cpp index dd900d98d5dc2396d5d2223e123ef1365dd13644..12cba471eb768798133f0252a5a3044c0ebef081 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorScheme.cpp +++ b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorScheme.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,6 +25,7 @@ #include <U2Core/MultipleSequenceAlignment.h> #include <U2Core/U2SafePoints.h> +#include "percentage_idententity/colored/MsaColorSchemePercentageIdententityColoredFactory.h" #include "ColorSchemeUtils.h" #include "MsaColorScheme.h" #include "MsaColorSchemeClustalX.h" @@ -35,27 +36,30 @@ namespace U2 { -const QString MsaColorScheme::EMPTY = "COLOR_SCHEME_EMPTY"; - -const QString MsaColorScheme::UGENE_NUCL = "COLOR_SCHEME_UGENE_NUCL"; -const QString MsaColorScheme::UGENE_SANGER_NUCL = "COLOR_SCHEME_UGENE_SANGER_NUCL"; -const QString MsaColorScheme::JALVIEW_NUCL = "COLOR_SCHEME_JALVIEW_NUCL"; -const QString MsaColorScheme::IDENTPERC_NUCL = "COLOR_SCHEME_IDENTPERC_NUCL"; -const QString MsaColorScheme::IDENTPERC_NUCL_GRAY = "COLOR_SCHEME_IDENTPERC_NUCL_GRAY"; -const QString MsaColorScheme::CUSTOM_NUCL = "COLOR_SCHEME_CUSTOM_NUCL"; - -const QString MsaColorScheme::UGENE_AMINO = "COLOR_SCHEME_UGENE_AMINO"; -const QString MsaColorScheme::ZAPPO_AMINO = "COLOR_SCHEME_ZAPPO_AMINO"; -const QString MsaColorScheme::TAILOR_AMINO = "COLOR_SCHEME_TAILOR_AMINO"; -const QString MsaColorScheme::HYDRO_AMINO = "COLOR_SCHEME_HYDRO_AMINO"; -const QString MsaColorScheme::HELIX_AMINO = "COLOR_SCHEME_HELIX_AMINO"; -const QString MsaColorScheme::STRAND_AMINO = "COLOR_SCHEME_STRAND_AMINO"; -const QString MsaColorScheme::TURN_AMINO = "COLOR_SCHEME_TURN_AMINO"; -const QString MsaColorScheme::BURIED_AMINO = "COLOR_SCHEME_BURIED_AMINO"; -const QString MsaColorScheme::IDENTPERC_AMINO = "COLOR_SCHEME_IDENTPERC_AMINO"; -const QString MsaColorScheme::IDENTPERC_AMINO_GRAY = "COLOR_SCHEME_IDENTPERC_AMINO_GRAY"; -const QString MsaColorScheme::CLUSTALX_AMINO = "COLOR_SCHEME_CLUSTALX_AMINO"; -const QString MsaColorScheme::CUSTOM_AMINO = "COLOR_SCHEME_CUSTOM_AMINO"; +const QString MsaColorScheme::EMPTY = "COLOR_SCHEME_EMPTY"; + +const QString MsaColorScheme::UGENE_NUCL = "COLOR_SCHEME_UGENE_NUCL"; +const QString MsaColorScheme::UGENE_SANGER_NUCL = "COLOR_SCHEME_UGENE_SANGER_NUCL"; +const QString MsaColorScheme::JALVIEW_NUCL = "COLOR_SCHEME_JALVIEW_NUCL"; +const QString MsaColorScheme::IDENTPERC_NUCL = "COLOR_SCHEME_IDENTPERC_NUCL"; +const QString MsaColorScheme::IDENTPERC_NUCL_COLORED = "COLOR_SCHEME_IDENTPERC_NUCL_COLORED"; +const QString MsaColorScheme::IDENTPERC_NUCL_GRAY = "COLOR_SCHEME_IDENTPERC_NUCL_GRAY"; +const QString MsaColorScheme::CUSTOM_NUCL = "COLOR_SCHEME_CUSTOM_NUCL"; + +const QString MsaColorScheme::UGENE_AMINO = "COLOR_SCHEME_UGENE_AMINO"; +const QString MsaColorScheme::ZAPPO_AMINO = "COLOR_SCHEME_ZAPPO_AMINO"; +const QString MsaColorScheme::TAILOR_AMINO = "COLOR_SCHEME_TAILOR_AMINO"; +const QString MsaColorScheme::HYDRO_AMINO = "COLOR_SCHEME_HYDRO_AMINO"; +const QString MsaColorScheme::HELIX_AMINO = "COLOR_SCHEME_HELIX_AMINO"; +const QString MsaColorScheme::STRAND_AMINO = "COLOR_SCHEME_STRAND_AMINO"; +const QString MsaColorScheme::TURN_AMINO = "COLOR_SCHEME_TURN_AMINO"; +const QString MsaColorScheme::BURIED_AMINO = "COLOR_SCHEME_BURIED_AMINO"; +const QString MsaColorScheme::IDENTPERC_AMINO = "COLOR_SCHEME_IDENTPERC_AMINO"; +const QString MsaColorScheme::IDENTPERC_AMINO_GRAY = "COLOR_SCHEME_IDENTPERC_AMINO_GRAY"; +const QString MsaColorScheme::CLUSTALX_AMINO = "COLOR_SCHEME_CLUSTALX_AMINO"; +const QString MsaColorScheme::CUSTOM_AMINO = "COLOR_SCHEME_CUSTOM_AMINO"; + +const QString MsaColorScheme::THRESHOLD_PARAMETER_NAME = "threshold"; MsaColorScheme::MsaColorScheme(QObject *parent, const MsaColorSchemeFactory *factory, MultipleAlignmentObject *maObj) : QObject(parent), @@ -64,6 +68,10 @@ MsaColorScheme::MsaColorScheme(QObject *parent, const MsaColorSchemeFactory *fac } +void MsaColorScheme::applySettings(const QVariantMap& settings) { + Q_UNUSED(settings); +} + const MsaColorSchemeFactory * MsaColorScheme::getFactory() const { return factory; } @@ -72,8 +80,8 @@ MsaColorSchemeFactory::MsaColorSchemeFactory(QObject *parent, const QString &id, : QObject(parent), id(id), name(name), - supportedAlphabets(supportedAlphabets){ -} + supportedAlphabets(supportedAlphabets), + needThreshold(false) {} const QString & MsaColorSchemeFactory::getId() const { return id; @@ -91,6 +99,10 @@ const AlphabetFlags MsaColorSchemeFactory::getSupportedAlphabets() const { return supportedAlphabets; } +bool MsaColorSchemeFactory::isThresholdNeeded() const { + return needThreshold; +} + MsaColorSchemeRegistry::MsaColorSchemeRegistry() { initBuiltInSchemes(); initCustomSchema(); @@ -556,8 +568,9 @@ void MsaColorSchemeRegistry::initBuiltInSchemes() { addJalviewNucleotide(colorsPerChar); addMsaColorSchemeFactory(new MsaColorSchemeStaticFactory(this, MsaColorScheme::JALVIEW_NUCL, tr("Jalview"), DNAAlphabet_NUCL | DNAAlphabet_RAW, colorsPerChar)); - addMsaColorSchemeFactory(new MsaColorSchemePercentageIdentityFactory(this, MsaColorScheme::IDENTPERC_NUCL, tr("Percentage Identity"), DNAAlphabet_NUCL | DNAAlphabet_RAW)); - addMsaColorSchemeFactory(new MsaColorSchemePercentageIdententityGrayscaleFactory(this, MsaColorScheme::IDENTPERC_NUCL_GRAY, tr("Percentage Identity (gray)"), DNAAlphabet_NUCL | DNAAlphabet_RAW)); + addMsaColorSchemeFactory(new MsaColorSchemePercentageIdentityFactory(this, MsaColorScheme::IDENTPERC_NUCL, tr("Percentage identity"), DNAAlphabet_NUCL | DNAAlphabet_RAW)); + addMsaColorSchemeFactory(new MsaColorSchemePercentageIdententityColoredFactory(this, MsaColorScheme::IDENTPERC_NUCL_COLORED, tr("Percentage identity (colored)"), DNAAlphabet_NUCL | DNAAlphabet_RAW)); + addMsaColorSchemeFactory(new MsaColorSchemePercentageIdententityGrayscaleFactory(this, MsaColorScheme::IDENTPERC_NUCL_GRAY, tr("Percentage identity (gray)"), DNAAlphabet_NUCL | DNAAlphabet_RAW)); //amino ColorSchemeUtils::fillEmptyColorScheme(colorsPerChar); @@ -594,8 +607,8 @@ void MsaColorSchemeRegistry::initBuiltInSchemes() { addBuriedAmino(colorsPerChar); addMsaColorSchemeFactory(new MsaColorSchemeStaticFactory(this, MsaColorScheme::BURIED_AMINO, tr("Buried index"), DNAAlphabet_AMINO | DNAAlphabet_RAW, colorsPerChar)); - addMsaColorSchemeFactory(new MsaColorSchemePercentageIdentityFactory(this, MsaColorScheme::IDENTPERC_AMINO, tr("Percentage Identity"), DNAAlphabet_AMINO | DNAAlphabet_RAW)); - addMsaColorSchemeFactory(new MsaColorSchemePercentageIdententityGrayscaleFactory(this, MsaColorScheme::IDENTPERC_AMINO_GRAY, tr("Percentage Identity (gray)"), DNAAlphabet_AMINO | DNAAlphabet_RAW)); + addMsaColorSchemeFactory(new MsaColorSchemePercentageIdentityFactory(this, MsaColorScheme::IDENTPERC_AMINO, tr("Percentage identity"), DNAAlphabet_AMINO | DNAAlphabet_RAW)); + addMsaColorSchemeFactory(new MsaColorSchemePercentageIdententityGrayscaleFactory(this, MsaColorScheme::IDENTPERC_AMINO_GRAY, tr("Percentage identity (gray)"), DNAAlphabet_AMINO | DNAAlphabet_RAW)); addMsaColorSchemeFactory(new MsaColorSchemeClustalXFactory(this, MsaColorScheme::CLUSTALX_AMINO, tr("Clustal X"), DNAAlphabet_AMINO | DNAAlphabet_RAW)); } diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorScheme.h b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorScheme.h index 7d22cf815de9e41c044c9a3a7f3ea2209a33c7b8..8593428bcf490d94b1b8dbc64d18462844fc0514 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorScheme.h +++ b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorScheme.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -49,7 +49,10 @@ public: MsaColorScheme(QObject *parent, const MsaColorSchemeFactory *factory, MultipleAlignmentObject *maObj); //Get color for symbol "c" on position [seq, pos]. Variable "c" has been added for optimization. - virtual QColor getColor(int seq, int pos, char c) const = 0; + virtual QColor getBackgroundColor(int seq, int pos, char c) const = 0; + virtual QColor getFontColor(int seq, int pos, char c) const = 0; + + virtual void applySettings(const QVariantMap& settings); const MsaColorSchemeFactory * getFactory() const; @@ -59,6 +62,7 @@ public: static const QString UGENE_SANGER_NUCL; static const QString JALVIEW_NUCL; static const QString IDENTPERC_NUCL; + static const QString IDENTPERC_NUCL_COLORED; static const QString IDENTPERC_NUCL_GRAY; static const QString CUSTOM_NUCL; @@ -75,6 +79,8 @@ public: static const QString CLUSTALX_AMINO; static const QString CUSTOM_AMINO; + static const QString THRESHOLD_PARAMETER_NAME; + protected: const MsaColorSchemeFactory * factory; MultipleAlignmentObject * maObj; @@ -91,13 +97,16 @@ public: bool isAlphabetTypeSupported(const DNAAlphabetType& alphabetType) const; const AlphabetFlags getSupportedAlphabets() const; + bool isThresholdNeeded() const; + signals: void si_factoryChanged(); protected: QString id; QString name; - AlphabetFlags supportedAlphabets; + AlphabetFlags supportedAlphabets; + bool needThreshold; }; class U2ALGORITHM_EXPORT MsaColorSchemeRegistry : public QObject { diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeClustalX.cpp b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeClustalX.cpp index 9907cd6c3417ef81cd3d2c84d1561c0277b805ae..b550c70e2939b3752c5008f72c76375199ca7cff 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeClustalX.cpp +++ b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeClustalX.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -45,7 +45,7 @@ MsaColorSchemeClustalX::MsaColorSchemeClustalX(QObject *parent, const MsaColorSc connect(maObj, SIGNAL(si_alignmentChanged(const MultipleAlignment &, const MaModificationInfo &)), SLOT(sl_alignmentChanged())); } -QColor MsaColorSchemeClustalX::getColor(int seq, int pos, char) const { +QColor MsaColorSchemeClustalX::getBackgroundColor(int seq, int pos, char) const { if (cacheVersion != objVersion) { updateCache(); } @@ -55,6 +55,14 @@ QColor MsaColorSchemeClustalX::getColor(int seq, int pos, char) const { return colorByIdx[idx]; } +QColor MsaColorSchemeClustalX::getFontColor(int seq, int pos, char c) const { + Q_UNUSED(seq); + Q_UNUSED(pos); + Q_UNUSED(c); + + return QColor(); +} + void MsaColorSchemeClustalX::sl_alignmentChanged() { objVersion++; } diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeClustalX.h b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeClustalX.h index fc17c01c295efe3e316dbbe5cad9d163779a2b88..b0166f3702bf4962bd96fdbb4ab336a90fee79b0 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeClustalX.h +++ b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeClustalX.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -35,7 +35,8 @@ class U2ALGORITHM_EXPORT MsaColorSchemeClustalX : public MsaColorScheme { public: MsaColorSchemeClustalX(QObject *parent, const MsaColorSchemeFactory *factory, MultipleAlignmentObject *maObj); - QColor getColor(int seq, int pos, char c) const; + QColor getBackgroundColor(int seq, int pos, char c) const override; + QColor getFontColor(int seq, int pos, char c) const override; private slots: void sl_alignmentChanged(); diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeCustom.cpp b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeCustom.cpp index 2ac278143fac92f3875dbe19f202279a0358e7b3..56388306d94f00d7222fc94ca185d77541df20a7 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeCustom.cpp +++ b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeCustom.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeCustom.h b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeCustom.h index 5261321e6ca76529fd5bdb38f0f89afefab72e40..2edee6f9ed4f004321a6b61fd0541566b9b2167c 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeCustom.h +++ b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeCustom.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemePercentageIdententityGrayscale.cpp b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemePercentageIdententityGrayscale.cpp index 2762af5eaf82cde92569e7f9d3e9020318ffd066..0826cdd3dfc20478123c4a48a7a6a467d756acc3 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemePercentageIdententityGrayscale.cpp +++ b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemePercentageIdententityGrayscale.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemePercentageIdententityGrayscale.h b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemePercentageIdententityGrayscale.h index 9f87db863575038f7dd3844483c4e6af01fe15e2..f354eadaefa51ccd3d0c77d2b63f5ec558100fc2 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemePercentageIdententityGrayscale.h +++ b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemePercentageIdententityGrayscale.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemePercentageIdentity.cpp b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemePercentageIdentity.cpp index c067e0b37a14ad8ae60af4801f48b29367f5bf09..a7e6a65e6471190122d67460ee517375d8a68a6d 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemePercentageIdentity.cpp +++ b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemePercentageIdentity.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -51,14 +51,16 @@ MsaColorSchemePercentageIdentity::MsaColorSchemePercentageIdentity(QObject *pare connect(maObj, SIGNAL(si_alignmentChanged(const MultipleAlignment &, const MaModificationInfo &)), SLOT(sl_alignmentChanged())); } -QColor MsaColorSchemePercentageIdentity::getColor(int /*seq*/, int pos, char c) const { +QColor MsaColorSchemePercentageIdentity::getBackgroundColor(int seq, int pos, char c) const { + Q_UNUSED(seq); + updateCache(); if (c == U2Msa::GAP_CHAR) { return QColor(); } quint32 packedVal = indentCache[pos]; MSAConsensusUtils::unpackConsensusCharsFromInt(packedVal, tmpChars, tmpRanges); - for (int i=0; i < 4; i++) { + for (int i = 0; i < 4; i++) { if (c == tmpChars[i]) { int range = tmpRanges[i]; return colorsByRange[range]; @@ -67,6 +69,14 @@ QColor MsaColorSchemePercentageIdentity::getColor(int /*seq*/, int pos, char c) return QColor(); } +QColor MsaColorSchemePercentageIdentity::getFontColor(int seq, int pos, char c) const { + Q_UNUSED(seq); + Q_UNUSED(pos); + Q_UNUSED(c); + + return QColor(); +} + void MsaColorSchemePercentageIdentity::sl_alignmentChanged() { objVersion++; } diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemePercentageIdentity.h b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemePercentageIdentity.h index 3d4dce3966469765632cba64f30c620114b70e2e..37a25b09ce39f34113124433c6f99383064a17a0 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemePercentageIdentity.h +++ b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemePercentageIdentity.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,7 +34,8 @@ class U2ALGORITHM_EXPORT MsaColorSchemePercentageIdentity : public MsaColorSchem public: MsaColorSchemePercentageIdentity(QObject *parent, const MsaColorSchemeFactory *factory, MultipleAlignmentObject *maObj); - QColor getColor(int seq, int pos, char c) const; + QColor getBackgroundColor(int seq, int pos, char c) const override; + QColor getFontColor(int seq, int pos, char c) const override; private slots: void sl_alignmentChanged(); diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeStatic.cpp b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeStatic.cpp index 8a8389820bcf75eb76284ccde294abf52b82644d..982f8e3c1f406aba80d440dcafe1c2a238a2205d 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeStatic.cpp +++ b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeStatic.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,10 +30,21 @@ MsaColorSchemeStatic::MsaColorSchemeStatic(QObject *parent, const MsaColorScheme } -QColor MsaColorSchemeStatic::getColor(int /*seq*/, int /*pos*/, char c) const { +QColor MsaColorSchemeStatic::getBackgroundColor(int seq, int pos, char c) const { + Q_UNUSED(seq); + Q_UNUSED(pos); + return colorsPerChar[(quint8)c]; } +QColor MsaColorSchemeStatic::getFontColor(int seq, int pos, char c) const { + Q_UNUSED(seq); + Q_UNUSED(pos); + Q_UNUSED(c); + + return QColor(); +} + MsaColorSchemeStaticFactory::MsaColorSchemeStaticFactory(QObject *parent, const QString &id, const QString &name, const AlphabetFlags &supportedAlphabets, const QVector<QColor> &colorsPerChar) : MsaColorSchemeFactory(parent, id, name, supportedAlphabets), colorsPerChar(colorsPerChar) diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeStatic.h b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeStatic.h index 768a70dfee59a2eb7b6fb1e13c3596cbde9d0216..c07422c88d6cd54110c08a6bf8734b37ac21281b 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeStatic.h +++ b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/MsaColorSchemeStatic.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,7 +34,8 @@ class U2ALGORITHM_EXPORT MsaColorSchemeStatic : public MsaColorScheme { public: MsaColorSchemeStatic(QObject *parent, const MsaColorSchemeFactory *factory, MultipleAlignmentObject *maObj, const QVector<QColor> &colorsPerChar); - QColor getColor(int seq, int pos, char c) const; + QColor getBackgroundColor(int seq, int pos, char c) const override; + QColor getFontColor(int seq, int pos, char c) const override; private: QVector<QColor> colorsPerChar; diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/percentage_idententity/colored/ColumnCharsCounter.cpp b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/percentage_idententity/colored/ColumnCharsCounter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..18bd8c337cbf6091d6bdaf6082cc2f08bb159296 --- /dev/null +++ b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/percentage_idententity/colored/ColumnCharsCounter.cpp @@ -0,0 +1,160 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "ColumnCharsCounter.h" +#include "MsaColorSchemePercentageIdententityColored.h" + +#include <U2Core/U2SafePoints.h> + +namespace U2 { + +/******************************/ +/*Nucleotide*/ +/******************************/ + +Nucleotide::Nucleotide(const char c) : character(c), + frequency(1) {} + +bool Nucleotide::operator<(const Nucleotide& other) const { + SAFE_POINT(MsaColorSchemePercentageIdententityColored::NUCLEOTIDE_LIST.contains(this->character) + && MsaColorSchemePercentageIdententityColored::NUCLEOTIDE_LIST.contains(other.character), "Unexpected nucleotide", false); + + bool result = false; + if (this->frequency > other.frequency) { + result = true; + } else if (this->frequency == other.frequency) { + result = MsaColorSchemePercentageIdententityColored::NUCLEOTIDE_LIST.indexOf(this->character) < MsaColorSchemePercentageIdententityColored::NUCLEOTIDE_LIST.indexOf(other.character); + } else { + result = false; + } + + return result; +} + +bool Nucleotide::operator==(const Nucleotide& other) const { + return this->character == other.character && this->frequency == other.frequency; +} + +/******************************/ +/*ColumnCharsCounter*/ +/******************************/ + +ColumnCharsCounter::ColumnCharsCounter() : gapsNumber(0), nonAlphabetCharsNumber(0) {} + +void ColumnCharsCounter::addNucleotide(const char nucleotide) { + if (isNucleotideAlreadyInList(nucleotide)) { + increaseNucleotideCounter(nucleotide); + } else { + Nucleotide n(nucleotide); + nucleotideList.append(n); + } +} + +void ColumnCharsCounter::addGap() { + gapsNumber++; +} + +void ColumnCharsCounter::addNonAlphabetCharacter() { + nonAlphabetCharsNumber++; +} + +QList<Nucleotide> ColumnCharsCounter::getNucleotideList() const { + return nucleotideList; +} + +//const int ColumnCharsCounter::getIndexOfNucleotideWithCharacter(const char c) const { +// int result = -1; +// foreach(const Nucleotide& nucl, nucleotideList) { +// CHECK_CONTINUE(nucl.character == c); +// +// result = nucleotideList.indexOf(nucl); +// break; +// } +// +// return result; +//} + +bool ColumnCharsCounter::hasGaps() const { + return gapsNumber != 0; +} + +bool ColumnCharsCounter::hasNonAlphabetCharsNumber() const { + return nonAlphabetCharsNumber != 0; +} + +bool ColumnCharsCounter::hasPercentageMoreThen(const double& threshold) const { + return getTopCharacterPercentage() >= threshold; +} + +void ColumnCharsCounter::sortNucleotideList() { + std::sort(nucleotideList.begin(), nucleotideList.end()); +} + +//bool ColumnCharsCounter::hasEqualPercentage() const { +// CHECK(!nucleotideList.isEmpty(), false); +// +// bool result = true; +// double firstPercentage = nucleotideList.first().percentage; +// foreach(const Nucleotide& n, nucleotideList) { +// CHECK_CONTINUE(firstPercentage != n.percentage); +// +// result = false; +// break; +// } +// +// return result; +//} + +bool ColumnCharsCounter::isNucleotideAlreadyInList(const char character) const { + bool result = false; + foreach(const Nucleotide& n, nucleotideList) { + CHECK_CONTINUE(n.character == character); + + result = true; + break; + } + + return result; +} + +void ColumnCharsCounter::increaseNucleotideCounter(const char character) { + for (auto& n : nucleotideList) { + CHECK_CONTINUE(n.character == character); + + n.frequency++; + break; + } +} + +double ColumnCharsCounter::getTopCharacterPercentage() const { + int charsNumber = gapsNumber + nonAlphabetCharsNumber; + foreach(const Nucleotide & nucl, nucleotideList) { + charsNumber += nucl.frequency; + } + SAFE_POINT(!nucleotideList.isEmpty(), "Nucleotide List is unexpected empty", 0.0); + + const Nucleotide n = nucleotideList.first(); + double result = (double(n.frequency) / charsNumber) * 100; + + return result; +} + +} \ No newline at end of file diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/percentage_idententity/colored/ColumnCharsCounter.h b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/percentage_idententity/colored/ColumnCharsCounter.h new file mode 100644 index 0000000000000000000000000000000000000000..288a704ae44616992ea76d0bb0ff810c3611c818 --- /dev/null +++ b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/percentage_idententity/colored/ColumnCharsCounter.h @@ -0,0 +1,66 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_COLUMN_CHARS_COUNTER_H_ +#define _U2_COLUMN_CHARS_COUNTER_H_ + +#include <QList> + +namespace U2 { + +struct Nucleotide { + Nucleotide(const char c); + bool operator<(const Nucleotide& other) const; + bool operator==(const Nucleotide& other) const; + + char character; + int frequency; +}; + +class ColumnCharsCounter { +public: + ColumnCharsCounter(); + + void addNucleotide(const char nucleotide); + void addGap(); + void addNonAlphabetCharacter(); + QList<Nucleotide> getNucleotideList() const; + //const int getIndexOfNucleotideWithCharacter(const char c) const; + bool hasGaps() const; + bool hasNonAlphabetCharsNumber() const; + bool hasPercentageMoreThen(const double& threshold) const; + void sortNucleotideList(); + //bool hasEqualPercentage() const; + +private: + bool isNucleotideAlreadyInList(const char character) const; + void increaseNucleotideCounter(const char character); + double getTopCharacterPercentage() const; + + QList<Nucleotide> nucleotideList; + int gapsNumber; + int nonAlphabetCharsNumber; +}; + + +} + +#endif // _U2_COLUMN_CHARS_COUNTER_H_ \ No newline at end of file diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/percentage_idententity/colored/MsaColorSchemePercentageIdententityColored.cpp b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/percentage_idententity/colored/MsaColorSchemePercentageIdententityColored.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7fd39390324c501cf33bd75f1a4e7907c737155c --- /dev/null +++ b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/percentage_idententity/colored/MsaColorSchemePercentageIdententityColored.cpp @@ -0,0 +1,162 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "MsaColorSchemePercentageIdententityColored.h" + +#include <U2Core/MultipleAlignmentObject.h> +#include <U2Core/U2SafePoints.h> + +namespace U2 { + +const QList<char> MsaColorSchemePercentageIdententityColored::NUCLEOTIDE_LIST = { 'T', 'U', 'G', 'C', 'A', 'B', 'D', 'H', 'K', 'M', 'R', 'S', 'V', 'W', 'Y', 'N'}; +const QList<QColor> MsaColorSchemePercentageIdententityColored::BACKGROUND_COLORS = { Qt::white, Qt::yellow, Qt::green, Qt::cyan }; +const QList<QColor> MsaColorSchemePercentageIdententityColored::FONT_COLORS = { Qt::black, Qt::red, Qt::black, Qt::blue }; + +//const QString MsaColorSchemePercentageIdententityColored::LIGHT_GREEN = "#00CC99"; +//const QList<QColor> MsaColorSchemePercentageIdententityColored::WEAK_SIMILARITIES_BACKGROUND_COLORS = { QColor(LIGHT_GREEN), +// QColor(Qt::cyan), +// QColor(Qt::white), +// QColor(Qt::darkGray) }; + +MsaColorSchemePercentageIdententityColored::MsaColorSchemePercentageIdententityColored(QObject *parent, const MsaColorSchemeFactory *factory, MultipleAlignmentObject *maObj) + : MsaColorScheme(parent, factory, maObj), + alignmentChanged(false), + threshold(50.0) { + connect(maObj, SIGNAL(si_alignmentChanged(const MultipleAlignment&, const MaModificationInfo&)), this, SLOT(sl_alignmentChanged())); +} + +QColor MsaColorSchemePercentageIdententityColored::getBackgroundColor(int rowNum, int columnNum, char c) const { + Q_UNUSED(rowNum); + + updateCache(columnNum); + SAFE_POINT(cachedData.keys().contains(columnNum), "Column data is absent", QColor()); + + int backgroundColorIndex = getColorIndex(columnNum, c); + QColor backgroundColor = BACKGROUND_COLORS.value(backgroundColorIndex, QColor()); + + /*if (showWeakSimilarities) { + const int charIndex = currentColumnData.getIndexOfNucleotideWithCharacter(c); + SAFE_POINT(charIndex != -1, "Unexpected character", QColor()); + + const bool hasEqualPercentage = currentColumnData.hasEqualPercentage(); + int colorIndex = getWeakSimilaritiesColorIndex(charIndex, hasEqualPercentage); + resultColor = WEAK_SIMILARITIES_BACKGROUND_COLORS.value(colorIndex, QColor()); + }*/ + + return backgroundColor; +} + +QColor MsaColorSchemePercentageIdententityColored::getFontColor(int rowNum, int columnNum, char c) const { + Q_UNUSED(rowNum); + + updateCache(columnNum); + SAFE_POINT(cachedData.keys().contains(columnNum), "Column data is absent", QColor()); + + int fontColorIndex = getColorIndex(columnNum, c); + QColor fontColor = FONT_COLORS.value(fontColorIndex, QColor()); + + return fontColor; +} + +void MsaColorSchemePercentageIdententityColored::applySettings(const QVariantMap& settings) { + threshold = settings.value(THRESHOLD_PARAMETER_NAME).toDouble(); +} + +void MsaColorSchemePercentageIdententityColored::sl_alignmentChanged() { + alignmentChanged = true; +} + +void MsaColorSchemePercentageIdententityColored::updateCache(const int columnNum) const { + if (alignmentChanged) { + cachedData.clear(); + alignmentChanged = false; + } + CHECK(!cachedData.keys().contains(columnNum), ); + SAFE_POINT(columnNum < maObj->getLength(), "Unexpected column number", ); + + ColumnCharsCounter currentRowCounter; + foreach(const MultipleAlignmentRow& row, maObj->getRows()) { + char ch = row.data()->charAt(columnNum); + if (NUCLEOTIDE_LIST.contains(ch)) { + currentRowCounter.addNucleotide(ch); + } else if (ch == U2Msa::GAP_CHAR) { + currentRowCounter.addGap(); + } else { + currentRowCounter.addNonAlphabetCharacter(); + } + } + currentRowCounter.sortNucleotideList(); + + cachedData.insert(columnNum, currentRowCounter); +} + +int MsaColorSchemePercentageIdententityColored::getColorIndex(const int columnNum, const char c) const { + int index = 0; + const ColumnCharsCounter currentColumnData = cachedData.value(columnNum); + QList<Nucleotide> currentNucleotideList = currentColumnData.getNucleotideList(); + const int size = currentNucleotideList.size(); + CHECK(size > 0, index); + + const bool hasGaps = currentColumnData.hasGaps(); + const bool hasNonAlphabetCharsNumber = currentColumnData.hasNonAlphabetCharsNumber(); + const bool hasPercentageMoreThenThreshold = currentColumnData.hasPercentageMoreThen(threshold); + if (size == 1 && !hasGaps && !hasNonAlphabetCharsNumber) { + index = 1; + } else if (size == 2 && !hasNonAlphabetCharsNumber && + currentNucleotideList[0].frequency == currentNucleotideList[1].frequency && + currentNucleotideList[0].character == c) { + index = 2; + } else if (hasPercentageMoreThenThreshold && + currentNucleotideList[0].character == c) { + index = 3; + } + + return index; +} + +//int MsaColorSchemePercentageIdententityColored::getWeakSimilaritiesColorIndex(const int indexOf, const bool equalPercentage) const { +// int colorIndex = -1; +// switch (indexOf) { +// case 0: +// if (equalPercentage) { +// colorIndex = 0; +// } else { +// colorIndex = 1; +// } +// break; +// case 1: +// case 2: +// colorIndex = 2; +// break; +// case 3: +// colorIndex = 3; +// break; +// case 4: +// default: +// colorIndex = 2; +// break; +// } +// +// return colorIndex; +//} + + +} // namespace U2 diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/percentage_idententity/colored/MsaColorSchemePercentageIdententityColored.h b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/percentage_idententity/colored/MsaColorSchemePercentageIdententityColored.h new file mode 100644 index 0000000000000000000000000000000000000000..a6d91176b9a73d76f4628e07558c4894afb0dad7 --- /dev/null +++ b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/percentage_idententity/colored/MsaColorSchemePercentageIdententityColored.h @@ -0,0 +1,64 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_MSA_COLOR_SCHEME_PERCENTAGE_IDENTENTITY_COLORED_H_ +#define _U2_MSA_COLOR_SCHEME_PERCENTAGE_IDENTENTITY_COLORED_H_ + +#include "../../MsaColorScheme.h" +#include "ColumnCharsCounter.h" + +#include <QList> + +namespace U2 { + +class U2ALGORITHM_EXPORT MsaColorSchemePercentageIdententityColored : public MsaColorScheme { + Q_OBJECT +public: + MsaColorSchemePercentageIdententityColored(QObject *parent, const MsaColorSchemeFactory *factory, MultipleAlignmentObject *maObj); + + QColor getBackgroundColor(int rowNum, int columnNum, char c) const override; + QColor getFontColor(int rowNum, int columnNum, char c) const override; + + void applySettings(const QVariantMap& settings) override; + + static const QList<char> NUCLEOTIDE_LIST; + +private slots: + void sl_alignmentChanged(); + +private: + static const QList<QColor> BACKGROUND_COLORS; + static const QList<QColor> FONT_COLORS; + //static const QList<QColor> WEAK_SIMILARITIES_BACKGROUND_COLORS; + //static const QString LIGHT_GREEN; + void updateCache(const int columnNum) const; + int getColorIndex(const int columnNum, const char c) const; + //int getWeakSimilaritiesColorIndex(const int indexOf, const bool equalPercentage) const; + + mutable QMap<qint64, ColumnCharsCounter> cachedData; //first value - column number + mutable bool alignmentChanged; + + double threshold; +}; + +} // namespace U2 + +#endif // _U2_MSA_COLOR_SCHEME_PERCENTAGE_IDENTENTITY_COLORED_H_ diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/percentage_idententity/colored/MsaColorSchemePercentageIdententityColoredFactory.cpp b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/percentage_idententity/colored/MsaColorSchemePercentageIdententityColoredFactory.cpp new file mode 100644 index 0000000000000000000000000000000000000000..92561d5382a90a3b3235cb659b965ceadbd33c32 --- /dev/null +++ b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/percentage_idententity/colored/MsaColorSchemePercentageIdententityColoredFactory.cpp @@ -0,0 +1,36 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "MsaColorSchemePercentageIdententityColored.h" +#include "MsaColorSchemePercentageIdententityColoredFactory.h" + +namespace U2 { + +MsaColorSchemePercentageIdententityColoredFactory::MsaColorSchemePercentageIdententityColoredFactory(QObject *parent, const QString &id, const QString &name, const AlphabetFlags &supportedAlphabets) + : MsaColorSchemeFactory(parent, id, name, supportedAlphabets) { + needThreshold = true; +} + +MsaColorScheme * MsaColorSchemePercentageIdententityColoredFactory::create(QObject *parent, MultipleAlignmentObject *maObj) const { + return new MsaColorSchemePercentageIdententityColored(parent, this, maObj); +} + +} // namespace U2 diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/percentage_idententity/colored/MsaColorSchemePercentageIdententityColoredFactory.h b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/percentage_idententity/colored/MsaColorSchemePercentageIdententityColoredFactory.h new file mode 100644 index 0000000000000000000000000000000000000000..996bbdd12d5b562f601179defc53a65577c1b67a --- /dev/null +++ b/src/corelibs/U2Algorithm/src/util_msaedit/color_schemes/percentage_idententity/colored/MsaColorSchemePercentageIdententityColoredFactory.h @@ -0,0 +1,39 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_MSA_COLOR_SCHEME_PERCENTAGE_IDENTENTITY_COLORED_FACTORY_H_ +#define _U2_MSA_COLOR_SCHEME_PERCENTAGE_IDENTENTITY_COLORED_FACTORY_H_ + +#include "../../MsaColorSchemePercentageIdentity.h" + +namespace U2 { + +class MsaColorSchemePercentageIdententityColoredFactory : public MsaColorSchemeFactory { + Q_OBJECT +public: + MsaColorSchemePercentageIdententityColoredFactory(QObject *parent, const QString &id, const QString &name, const AlphabetFlags &supportedAlphabets); + + MsaColorScheme * create(QObject *parent, MultipleAlignmentObject *maObj) const; +}; + +} // namespace U2 + +#endif // _U2_MSA_COLOR_SCHEME_PERCENTAGE_IDENTENTITY_COLORED_FACTORY_H_ diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingScheme.cpp b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingScheme.cpp index 80082d2137b88a51603f19724089000bfe4a2bf3..77403bc374d8d49ba09b798f87cf5db726e1eaed 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingScheme.cpp +++ b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingScheme.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingScheme.h b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingScheme.h index d4096de74a8dad862ba58a5d060fdb8959ea57ab..1306c271fd16a7a575a243808887cc9e640b2e39 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingScheme.h +++ b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingScheme.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeAgreements.cpp b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeAgreements.cpp index 4bcdc1816a39e2bbe07d6fb6e6bb602ac2562a4c..11ba7ba80859d7f5b7a5fde4a8a8d027f1f7cd27 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeAgreements.cpp +++ b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeAgreements.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeAgreements.h b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeAgreements.h index 6a73dfa1daf08f0e3c9966dfbe141a1aae0413df..5714fdd23505254dc847c2a0f45276a1a2a032d5 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeAgreements.h +++ b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeAgreements.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeConservation.cpp b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeConservation.cpp index 7a73071377f9674f0101389c7389becf4bafaca1..d705cd9f0df292628a4326436607ab8c8b4512ce 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeConservation.cpp +++ b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeConservation.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeConservation.h b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeConservation.h index 2ec7452e270bfab9b6b182e63095377144afd97f..b8785b19555941d97451a9dfaa9041040f3d48c6 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeConservation.h +++ b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeConservation.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeDisagreements.cpp b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeDisagreements.cpp index cb88e61862b9729bc254b53d6f38d5a717be400b..10c1f10781cdaf64529727807f9dd3aaa0dfaabd 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeDisagreements.cpp +++ b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeDisagreements.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeDisagreements.h b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeDisagreements.h index fa675db44c26d01e648cc7cf2a50995e088553b7..95f865a69a30b56634b1f3c9c857933f7de2dde3 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeDisagreements.h +++ b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeDisagreements.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeGaps.cpp b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeGaps.cpp index 27f89699f674184331825eb438fa9c9cf900758f..56d5164b91a9f86ba8f1cd21e39c070bca419c5b 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeGaps.cpp +++ b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeGaps.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeGaps.h b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeGaps.h index f6423197b7d9f88025187ced6b55342c94ad5367..d42bb942d5bb91b0105f78e0a81aa82a82f3d903 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeGaps.h +++ b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeGaps.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeNoColors.cpp b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeNoColors.cpp index 29543add377f6acb55a27f2b604b86df9b835741..30e06209c55ccea398002d4740140a43712df473 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeNoColors.cpp +++ b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeNoColors.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeNoColors.h b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeNoColors.h index a9c6dd49dc58a9ce14190b8478ae3d2a26d05fe5..66102eba2accde4551ef17af25999facf18ee573 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeNoColors.h +++ b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeNoColors.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeTransitions.cpp b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeTransitions.cpp index d5ac40df7dd0988be21a0cd15681914e5134115b..97402b4bb154c42357df17acac29025631af3a7b 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeTransitions.cpp +++ b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeTransitions.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeTransitions.h b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeTransitions.h index 0598931f75dbda382d642b0094a06d66c71e7296..19eb45971fdf685f56ee881dc560b37b73424f39 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeTransitions.h +++ b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeTransitions.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeTransversions.cpp b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeTransversions.cpp index 2e155fbdff1ccc3c2799ea895a57833d72dfc5a9..1c280657ef44656282e49712a2af7f497779660e 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeTransversions.cpp +++ b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeTransversions.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeTransversions.h b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeTransversions.h index 01db132b00a48dab6ccdcea5cc4cdddc73f735d9..8a9b806889a7463971c1a5e8d5f36bb6687fe97d 100644 --- a/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeTransversions.h +++ b/src/corelibs/U2Algorithm/src/util_msaedit/highlighting_schemes/MsaHighlightingSchemeTransversions.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_orf/ORFAlgorithmTask.cpp b/src/corelibs/U2Algorithm/src/util_orf/ORFAlgorithmTask.cpp index 90ff38243e1c5e93f2d6168fb9faed896e53d475..5a427a802f4c18780eba4cbb2c3419d0dfea797c 100644 --- a/src/corelibs/U2Algorithm/src/util_orf/ORFAlgorithmTask.cpp +++ b/src/corelibs/U2Algorithm/src/util_orf/ORFAlgorithmTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_orf/ORFAlgorithmTask.h b/src/corelibs/U2Algorithm/src/util_orf/ORFAlgorithmTask.h index 72e4244813c8239c4592a70ffcaf85b100693884..5cadec478cdc4856bc6ef105cc6b4c76b7a77fcb 100644 --- a/src/corelibs/U2Algorithm/src/util_orf/ORFAlgorithmTask.h +++ b/src/corelibs/U2Algorithm/src/util_orf/ORFAlgorithmTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_orf/ORFFinder.cpp b/src/corelibs/U2Algorithm/src/util_orf/ORFFinder.cpp index b15a2df1ee8c8fb17c9becaf2c0d33cb7382cd6d..4fa9b945580029757f55c9d48015b74a9d7f8909 100644 --- a/src/corelibs/U2Algorithm/src/util_orf/ORFFinder.cpp +++ b/src/corelibs/U2Algorithm/src/util_orf/ORFFinder.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -423,7 +423,7 @@ void ORFFindAlgorithm::checkStopCodonOnJunction(const U2SequenceObject &dnaSeq, char* ORFFindAlgorithm::getCodonFromJunction(const U2SequenceObject &dnaSeq, ORFAlgorithmStrand strand, int symbolsFromEnd) { SAFE_POINT(strand != ORFAlgorithmStrand_Both, "Invalid strand: direct or complement are the only possible variants!", NULL); - SAFE_POINT(symbolsFromEnd == 1 || symbolsFromEnd == 2, "Codon can be splitted only in two places: after the first or the second symbol!", NULL); + SAFE_POINT(symbolsFromEnd == 1 || symbolsFromEnd == 2, "Codon can be split only in two places: after the first or the second symbol!", NULL); char *tmp = new char[3]; int seqLen = dnaSeq.getSequenceLength(); diff --git a/src/corelibs/U2Algorithm/src/util_orf/ORFFinder.h b/src/corelibs/U2Algorithm/src/util_orf/ORFFinder.h index f9a3730a6e03ceccd2f6a31ca11c7d7fea416748..bd0a5449d04ffa9f7ede6863a4cf1012ea897e8e 100644 --- a/src/corelibs/U2Algorithm/src/util_orf/ORFFinder.h +++ b/src/corelibs/U2Algorithm/src/util_orf/ORFFinder.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_sarray/SArrayBasedFindTask.cpp b/src/corelibs/U2Algorithm/src/util_sarray/SArrayBasedFindTask.cpp index 9eae23bf79bae615adc59dfe6ecdc0bc56ab97ff..17cecc7cc3a3ae137231c92cc5f5bbf916cf8f42 100644 --- a/src/corelibs/U2Algorithm/src/util_sarray/SArrayBasedFindTask.cpp +++ b/src/corelibs/U2Algorithm/src/util_sarray/SArrayBasedFindTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_sarray/SArrayBasedFindTask.h b/src/corelibs/U2Algorithm/src/util_sarray/SArrayBasedFindTask.h index 1acc5430cf60487015f411295a620c94dcd1c238..d5d0fcebd9a6e4a418c9cbabe77af322abf31918 100644 --- a/src/corelibs/U2Algorithm/src/util_sarray/SArrayBasedFindTask.h +++ b/src/corelibs/U2Algorithm/src/util_sarray/SArrayBasedFindTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_sarray/SArrayIndex.cpp b/src/corelibs/U2Algorithm/src/util_sarray/SArrayIndex.cpp index 29ae5e8fcebb725835dc185c76c96a51be4899d2..8a62a7a139b4dd12c242aca3d2b2eac744d88825 100644 --- a/src/corelibs/U2Algorithm/src/util_sarray/SArrayIndex.cpp +++ b/src/corelibs/U2Algorithm/src/util_sarray/SArrayIndex.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_sarray/SArrayIndex.h b/src/corelibs/U2Algorithm/src/util_sarray/SArrayIndex.h index 48bfcbd99c4004bcab8ffabf1da09c0a729da121..91d8edcf3b95ba0438ead2d96007d5b13636f6f1 100644 --- a/src/corelibs/U2Algorithm/src/util_sarray/SArrayIndex.h +++ b/src/corelibs/U2Algorithm/src/util_sarray/SArrayIndex.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_sarray/SArrayIndexSerializer.cpp b/src/corelibs/U2Algorithm/src/util_sarray/SArrayIndexSerializer.cpp index 8b3ef68dcc8d36358a2f22cd70201ea5528536c8..02c3dbd8e3f2bb378e92db525cd334547baf48d5 100644 --- a/src/corelibs/U2Algorithm/src/util_sarray/SArrayIndexSerializer.cpp +++ b/src/corelibs/U2Algorithm/src/util_sarray/SArrayIndexSerializer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_sarray/SArrayIndexSerializer.h b/src/corelibs/U2Algorithm/src/util_sarray/SArrayIndexSerializer.h index 567c6f5719227398fe45d4d95c3612bef31a0a4d..1162fdbd16f4d3793d1ddf035633604cf8fb49f5 100644 --- a/src/corelibs/U2Algorithm/src/util_sarray/SArrayIndexSerializer.h +++ b/src/corelibs/U2Algorithm/src/util_sarray/SArrayIndexSerializer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_weight_matrix/BuiltInPWMConversionAlgorithms.cpp b/src/corelibs/U2Algorithm/src/util_weight_matrix/BuiltInPWMConversionAlgorithms.cpp index e1ab0a71d6ae94305928d191bf8d04a731ae1044..583a04dca21ea8a7c247f6a79a856a817915e0c8 100644 --- a/src/corelibs/U2Algorithm/src/util_weight_matrix/BuiltInPWMConversionAlgorithms.cpp +++ b/src/corelibs/U2Algorithm/src/util_weight_matrix/BuiltInPWMConversionAlgorithms.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_weight_matrix/BuiltInPWMConversionAlgorithms.h b/src/corelibs/U2Algorithm/src/util_weight_matrix/BuiltInPWMConversionAlgorithms.h index 9b02ab04a54d509ff0b794575ccbf7eec55b3f43..93351a02a766be2502bc5ae7d8a56942b6824876 100644 --- a/src/corelibs/U2Algorithm/src/util_weight_matrix/BuiltInPWMConversionAlgorithms.h +++ b/src/corelibs/U2Algorithm/src/util_weight_matrix/BuiltInPWMConversionAlgorithms.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithm.cpp b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithm.cpp index f3b9dcd28442e578fafb5b522328e7dcab38b411..e8044db3690a07e4cafa0632f5d1eba194c2f93c 100644 --- a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithm.cpp +++ b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithm.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithm.h b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithm.h index 53bd231e65bb31d4bda45e162a4453bc50de32c1..ada1322d514be86ca3080401191ef03f0e8088f7 100644 --- a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithm.h +++ b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithm.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmBVH.cpp b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmBVH.cpp index 897c3808d3a298bc6c90f424d1d7d52415135f97..59cf9ff3fcd427bdec881429b8ae71bb974fa715 100644 --- a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmBVH.cpp +++ b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmBVH.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmBVH.h b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmBVH.h index 683c99ce6583daf4469b1b0236939af877ffe9c8..0a8726b15984173a284fbf189839e4eb7c1b4b17 100644 --- a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmBVH.h +++ b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmBVH.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmLOD.cpp b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmLOD.cpp index 665258531b9cb3965316bef8090c736b4fd4c8d9..65a93cd270f9445c64d8275d8fa05088f2ee692b 100644 --- a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmLOD.cpp +++ b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmLOD.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmLOD.h b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmLOD.h index 7221adf03863a01336c90efa0e01176f489089f1..2e23d2d2029dc0badf9c1e73d788606b865483ec 100644 --- a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmLOD.h +++ b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmLOD.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmMCH.cpp b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmMCH.cpp index dbbca179f27afbcd051d0b96a38675b144b0f2cc..fa88f11ff8a29266a6ddebc5d4dbdfcf043574e8 100644 --- a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmMCH.cpp +++ b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmMCH.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmMCH.h b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmMCH.h index cf1f8c093e75f3cf9fe0b5229b55fb1a421049d9..a904ce0895e30a0d0b8b3d978cc824c5606acbb2 100644 --- a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmMCH.h +++ b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmMCH.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmNLG.cpp b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmNLG.cpp index 09d63a082ec324495b65328a48d0c172f6d8734b..ac8c858124c7f2fea8c4009f797ce8227e23880f 100644 --- a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmNLG.cpp +++ b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmNLG.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmNLG.h b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmNLG.h index 9fc5b10edd21292825aea3a730ee0890d2b70bdb..54776f6e029e3b09a26b2be47336632f9241576c 100644 --- a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmNLG.h +++ b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmNLG.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmRegistry.cpp b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmRegistry.cpp index e50be9fbb51350455b3f3e1efabc55ee80ec3463..44071ab33ef2df7d435e4a7351e15759b6424f7b 100644 --- a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmRegistry.cpp +++ b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmRegistry.h b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmRegistry.h index dd56768e1a25c1735a8bd88a837d658913b98443..648c168eac285f3dfe8424dcbf8364ad133cac2b 100644 --- a/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmRegistry.h +++ b/src/corelibs/U2Algorithm/src/util_weight_matrix/PWMConversionAlgorithmRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Algorithm/transl/russian.ts b/src/corelibs/U2Algorithm/transl/russian.ts index ccb8063b91a6a04dea3dee3515d779856fcdc5b1..bae4a414dc9dc3bc31fde5af55f1a10fcfcac75e 100644 --- a/src/corelibs/U2Algorithm/transl/russian.ts +++ b/src/corelibs/U2Algorithm/transl/russian.ts @@ -210,7 +210,7 @@ <context> <name>U2::DnaAssemblyToReferenceTask</name> <message> - <location filename="../src/registry/DnaAssemblyTask.cpp" line="34"/> + <location filename="../src/registry/DnaAssemblyTask.cpp" line="37"/> <source>Align short reads</source> <translation>Align short reads</translation> </message> @@ -226,10 +226,30 @@ <context> <name>U2::GenomeAssemblyMultiTask</name> <message> - <location filename="../src/misc/GenomeAssemblyMultiTask.cpp" line="81"/> + <location filename="../src/misc/GenomeAssemblyMultiTask.cpp" line="82"/> <source>Assembly cannot be performed.</source> <translation>Assembly cannot be performed.</translation> </message> + <message> + <location filename="../src/misc/GenomeAssemblyMultiTask.cpp" line="101"/> + <source>Assembly task finished with error: %1</source> + <translation>Assembly task finished with error: %1</translation> + </message> + <message> + <location filename="../src/misc/GenomeAssemblyMultiTask.cpp" line="103"/> + <source>Assembly task wasn't set</source> + <translation>Assembly task wasn't set</translation> + </message> + <message> + <location filename="../src/misc/GenomeAssemblyMultiTask.cpp" line="106"/> + <source>Assembly was finished successfully</source> + <translation>Assembly was finished successfully</translation> + </message> + <message> + <location filename="../src/misc/GenomeAssemblyMultiTask.cpp" line="108"/> + <source>Assembly failed.</source> + <translation>Assembly failed.</translation> + </message> </context> <context> <name>U2::LoadPatternsFileTask</name> @@ -379,70 +399,75 @@ For every column selects the most rare symbol in the whole alignment with percen <context> <name>U2::MsaColorSchemeRegistry</name> <message> - <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="545"/> + <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="557"/> <source>No colors</source> <translation>Без цвета</translation> </message> <message> - <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="553"/> + <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="565"/> <source>UGENE Sanger</source> <translatorcomment>UGENE Sanger</translatorcomment> <translation>UGENE Sanger</translation> </message> <message> - <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="557"/> + <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="569"/> <source>Jalview</source> <translation>РаÑкраÑка Jalview</translation> </message> <message> - <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="559"/> - <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="597"/> + <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="571"/> + <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="610"/> <source>Percentage Identity</source> <translation>По процентному Ñоотношению</translation> </message> <message> - <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="560"/> - <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="598"/> + <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="572"/> + <source>Percentage Identity (colored)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="573"/> + <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="611"/> <source>Percentage Identity (gray)</source> <translation>По процентному Ñоотношению (Ñерый)</translation> </message> <message> - <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="571"/> + <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="584"/> <source>Zappo</source> <translation>Zappo</translation> </message> <message> - <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="575"/> + <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="588"/> <source>Tailor</source> <translation>Tailor</translation> </message> <message> - <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="579"/> + <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="592"/> <source>Hydrophobicity</source> <translation>ГидрофобноÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="583"/> + <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="596"/> <source>Helix propensity</source> <translation>СклонноÑÑ‚ÑŒ к ÑпиральноÑти</translation> </message> <message> - <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="587"/> + <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="600"/> <source>Strand propensity</source> <translation>СклонноÑÑ‚ÑŒ к линейноÑти</translation> </message> <message> - <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="591"/> + <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="604"/> <source>Turn propensity</source> <translation>СклонноÑÑ‚ÑŒ к Ñворачиванию</translation> </message> <message> - <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="595"/> + <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="608"/> <source>Buried index</source> <translation>ИндекÑ</translation> </message> <message> - <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="600"/> + <location filename="../src/util_msaedit/color_schemes/MsaColorScheme.cpp" line="613"/> <source>Clustal X</source> <translation>Clustal X</translation> </message> diff --git a/src/corelibs/U2Core/U2Core.pri b/src/corelibs/U2Core/U2Core.pri index f7ea61510266d208dd16f20bb0f72922546908ce..0f1bc3f29fdd276f14510ff7ac173bd4fa435c6a 100644 --- a/src/corelibs/U2Core/U2Core.pri +++ b/src/corelibs/U2Core/U2Core.pri @@ -3,50 +3,26 @@ MODULE_ID=U2Core include( ../../ugene_lib_common.pri ) -UGENE_RELATIVE_DESTDIR = '' - QT += network xml widgets DEFINES+=UGENE_MIN_VERSION_SQLITE=$${UGENE_MIN_VERSION_SQLITE} DEFINES+=UGENE_MIN_VERSION_MYSQL=$${UGENE_MIN_VERSION_MYSQL} DEFINES+=QT_FATAL_ASSERT BUILDING_U2CORE_DLL -use_bundled_zlib() { - LIBS += -lzlib -} else { - LIBS += -lz -} +LIBS += $$add_z_lib() +LIBS += $$add_sqlite_lib() +LIBS += -L../../$$out_dir() -unix: QMAKE_CXXFLAGS += -Wno-char-subscripts +DESTDIR = ../../$$out_dir() -LIBS += -L../../_release -LIBS += -lugenedb - -!debug_and_release|build_pass { - - CONFIG(debug, debug|release) { - DESTDIR=../../_debug - LIBS += -L../../_debug - LIBS -= -L../../_release - use_bundled_zlib() { - LIBS += -lzlibd - LIBS -= -lzlib - } - LIBS -= -lugenedb - LIBS += -lugenedbd - } - - CONFIG(release, debug|release) { - DESTDIR=../../_release - } -} +unix: QMAKE_CXXFLAGS += -Wno-char-subscripts # Special compiler flags for windows configuration win32 { - LIBS += Psapi.lib User32.lib + LIBS += User32.lib } unix { - target.path = $$UGENE_INSTALL_DIR/$$UGENE_RELATIVE_DESTDIR + target.path = $$UGENE_INSTALL_DIR/ INSTALLS += target } diff --git a/src/corelibs/U2Core/U2Core.pro b/src/corelibs/U2Core/U2Core.pro index 893f1791e545fbb9ef51b02cad2490b9049825e0..275c267f0081734128d7bf7030097259600f177d 100644 --- a/src/corelibs/U2Core/U2Core.pro +++ b/src/corelibs/U2Core/U2Core.pro @@ -93,6 +93,7 @@ HEADERS += src/cmdline/CMDLineCoreOptions.h \ src/globals/ClipboardController.h \ src/globals/Counter.h \ src/globals/CredentialsAsker.h \ + src/globals/CustomExternalTool.h \ src/globals/DataBaseRegistry.h \ src/globals/DataPathRegistry.h \ src/globals/DBXRefRegistry.h \ @@ -332,6 +333,7 @@ SOURCES += src/cmdline/CMDLineCoreOptions.cpp \ src/globals/ClipboardController.cpp \ src/globals/Counter.cpp \ src/globals/CredentialsAsker.cpp \ + src/globals/CustomExternalTool.cpp \ src/globals/DataBaseRegistry.cpp \ src/globals/DataPathRegistry.cpp \ src/globals/DBXRefRegistry.cpp \ diff --git a/src/corelibs/U2Core/src/cmdline/CMDLineCoreOptions.cpp b/src/corelibs/U2Core/src/cmdline/CMDLineCoreOptions.cpp index 9dd60086e96e1cff6aa92cf04024e46c0a0cd221..b65b81dbcfad6ee03eadd79ec07123241eef0d14 100644 --- a/src/corelibs/U2Core/src/cmdline/CMDLineCoreOptions.cpp +++ b/src/corelibs/U2Core/src/cmdline/CMDLineCoreOptions.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -28,26 +28,27 @@ namespace U2 { -const QString CMDLineCoreOptions::INI_FILE = "ini-file"; -const QString CMDLineCoreOptions::SUITE_URLS = "test-suite"; -const QString CMDLineCoreOptions::API_TEST_URLS = "api-test-suite"; -const QString CMDLineCoreOptions::TEST_REPORT = "test-report"; -const QString CMDLineCoreOptions::HELP = "help"; -const QString CMDLineCoreOptions::HELP_SHORT = "h"; -const QString CMDLineCoreOptions::TRANSLATION = "lang"; -const QString CMDLineCoreOptions::TEST_THREADS = "test-threads"; -const QString CMDLineCoreOptions::TEAMCITY_OUTPUT = "log-teamcity-out"; -const QString CMDLineCoreOptions::LOG_FORMAT = "log-format"; -const QString CMDLineCoreOptions::LOG_LEVEL = "log-level"; -const QString CMDLineCoreOptions::CREATE_GUI_TEST = "create-gui-test"; -const QString CMDLineCoreOptions::LAUNCH_GUI_TEST = "gui-test"; -const QString CMDLineCoreOptions::LAUNCH_GUI_TEST_NO_IGNORED = "gui-test-no-ignored"; -const QString CMDLineCoreOptions::LAUNCH_GUI_TEST_BATCH = "gui-test-batch"; -const QString CMDLineCoreOptions::LAUNCH_GUI_TEST_SUITE = "gui-test-suite"; -const QString CMDLineCoreOptions::LAUNCH_GUI_TEST_CRAZY_USER = "gui-test-crazy-user"; -const QString CMDLineCoreOptions::USAGE = "usage"; -const QString CMDLineCoreOptions::TMP_DIR = "tmp-dir"; -const QString CMDLineCoreOptions::SESSION_DB = "session-db"; +const QString CMDLineCoreOptions::INI_FILE = "ini-file"; +const QString CMDLineCoreOptions::SUITE_URLS = "test-suite"; +const QString CMDLineCoreOptions::API_TEST_URLS = "api-test-suite"; +const QString CMDLineCoreOptions::TEST_REPORT = "test-report"; +const QString CMDLineCoreOptions::HELP = "help"; +const QString CMDLineCoreOptions::HELP_SHORT = "h"; +const QString CMDLineCoreOptions::TRANSLATION = "lang"; +const QString CMDLineCoreOptions::TEST_THREADS = "test-threads"; +const QString CMDLineCoreOptions::TEAMCITY_OUTPUT = "log-teamcity-out"; +const QString CMDLineCoreOptions::LOG_FORMAT = "log-format"; +const QString CMDLineCoreOptions::LOG_LEVEL = "log-level"; +const QString CMDLineCoreOptions::CREATE_GUI_TEST = "create-gui-test"; +const QString CMDLineCoreOptions::LAUNCH_GUI_TEST = "gui-test"; +const QString CMDLineCoreOptions::LAUNCH_GUI_TEST_NO_IGNORED = "gui-test-no-ignored"; +const QString CMDLineCoreOptions::LAUNCH_GUI_TEST_BATCH = "gui-test-batch"; +const QString CMDLineCoreOptions::LAUNCH_GUI_TEST_SUITE = "gui-test-suite"; +const QString CMDLineCoreOptions::LAUNCH_GUI_TEST_CRAZY_USER = "gui-test-crazy-user"; +const QString CMDLineCoreOptions::USAGE = "usage"; +const QString CMDLineCoreOptions::TMP_DIR = "tmp-dir"; +const QString CMDLineCoreOptions::SESSION_DB = "session-db"; +const QString CMDLineCoreOptions::USE_SAME_INI_FOR_TESTS = "use-same-ini-for-tests"; void CMDLineCoreOptions::initHelp() { diff --git a/src/corelibs/U2Core/src/cmdline/CMDLineCoreOptions.h b/src/corelibs/U2Core/src/cmdline/CMDLineCoreOptions.h index 06ba4a4bf57b7fc667549b86240bd03eaaaa6549..dd4b4010b2cd9a488abd5b1c21f06fdac2bed9e9 100644 --- a/src/corelibs/U2Core/src/cmdline/CMDLineCoreOptions.h +++ b/src/corelibs/U2Core/src/cmdline/CMDLineCoreOptions.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -52,6 +52,7 @@ public: static const QString USAGE; static const QString TMP_DIR; static const QString SESSION_DB; + static const QString USE_SAME_INI_FOR_TESTS; public: // initialize help for core cmdline options diff --git a/src/corelibs/U2Core/src/cmdline/CMDLineHelpProvider.h b/src/corelibs/U2Core/src/cmdline/CMDLineHelpProvider.h index 83618891849a84631ffdb5ba37fd5b60c3f8fb2a..d28fa2b88abc10af367376e1c08239742ed595ff 100644 --- a/src/corelibs/U2Core/src/cmdline/CMDLineHelpProvider.h +++ b/src/corelibs/U2Core/src/cmdline/CMDLineHelpProvider.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/cmdline/CMDLineRegistry.cpp b/src/corelibs/U2Core/src/cmdline/CMDLineRegistry.cpp index 246694a76e5257a243f08e8d0ed72bfdaf60fbba..96956a5f50c7f3fe78e976b72e835f357dad3804 100644 --- a/src/corelibs/U2Core/src/cmdline/CMDLineRegistry.cpp +++ b/src/corelibs/U2Core/src/cmdline/CMDLineRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/cmdline/CMDLineRegistry.h b/src/corelibs/U2Core/src/cmdline/CMDLineRegistry.h index 87dec6caa5b8f0d6bc135566a519803c43b520cb..cbc0e103ffed4be27aa5808127e92ef797af2599 100644 --- a/src/corelibs/U2Core/src/cmdline/CMDLineRegistry.h +++ b/src/corelibs/U2Core/src/cmdline/CMDLineRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,7 +25,6 @@ #include <QMap> #include <QStringList> -#include <U2Core/global.h> #include <U2Core/StrPackUtils.h> namespace U2 { @@ -38,7 +37,7 @@ class CMDLineHelpProvider; --paramName=paramValue -> (paramName, paramValue) -paramName paramValue -> (paramName, paramValue) paramValue1 paramValue2 -> ("", paramValue1), ("", paramValue2) -*/ + */ class U2CORE_EXPORT CMDLineRegistry : public QObject { Q_OBJECT public: @@ -53,9 +52,9 @@ public: QStringList getOrderedParameterNames() const; // finding starts at startsWithIdx - bool hasParameter( const QString & paramName, int startsWithIdx = 0 ) const; + bool hasParameter(const QString & paramName, int startsWithIdx = 0) const; // returns value of first appearance from startWithIdx of paramName key - QString getParameterValue( const QString & paramName, int startWithIdx = 0 ) const; + QString getParameterValue(const QString & paramName, int startWithIdx = 0) const; void registerCMDLineHelpProvider(CMDLineHelpProvider* provider); void unregisterCMDLineHelpProvider(CMDLineHelpProvider* provider); diff --git a/src/corelibs/U2Core/src/cmdline/CMDLineUtils.cpp b/src/corelibs/U2Core/src/cmdline/CMDLineUtils.cpp index 958ff19db305bcdc52842bf5119871240ce775af..c052e38db789d24904292daeb04774c735a2f6ec 100644 --- a/src/corelibs/U2Core/src/cmdline/CMDLineUtils.cpp +++ b/src/corelibs/U2Core/src/cmdline/CMDLineUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/cmdline/CMDLineUtils.h b/src/corelibs/U2Core/src/cmdline/CMDLineUtils.h index e05b3a473fae71b6925976c9842df966147e282a..16feb37525478327a4c9fbc27104c85c675ff30b 100644 --- a/src/corelibs/U2Core/src/cmdline/CMDLineUtils.h +++ b/src/corelibs/U2Core/src/cmdline/CMDLineUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/Annotation.cpp b/src/corelibs/U2Core/src/datatype/Annotation.cpp index b8c9695ce6e05c157615786d0b9e381b967fde11..bb85a8c4476db312e5efa15c265e083b72386488 100644 --- a/src/corelibs/U2Core/src/datatype/Annotation.cpp +++ b/src/corelibs/U2Core/src/datatype/Annotation.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/Annotation.h b/src/corelibs/U2Core/src/datatype/Annotation.h index 67bc1356e75a6224610d7de84490bca7bf0c0e11..fdb051cb9b4e55100ac57f69502f1251f810d01a 100644 --- a/src/corelibs/U2Core/src/datatype/Annotation.h +++ b/src/corelibs/U2Core/src/datatype/Annotation.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/AnnotationData.cpp b/src/corelibs/U2Core/src/datatype/AnnotationData.cpp index 3e94d1d22b8b4dd701dc53b5bedd34c36fa8b3bd..c1b8f1c7ed4bbbeb11c0c4c0dfbea7eff9f9ced9 100644 --- a/src/corelibs/U2Core/src/datatype/AnnotationData.cpp +++ b/src/corelibs/U2Core/src/datatype/AnnotationData.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,15 +19,12 @@ * MA 02110-1301, USA. */ -#include <QDataStream> - #include "AnnotationData.h" namespace U2 { AnnotationData::AnnotationData() - : location(new U2LocationData()), caseAnnotation(false), type(U2FeatureTypes::MiscFeature) -{ + : location(new U2LocationData()), caseAnnotation(false), type(U2FeatureTypes::MiscFeature) { } @@ -43,11 +40,11 @@ bool AnnotationData::isBond() const { return location->isBond(); } -U2Strand AnnotationData::getStrand() const { +U2Strand AnnotationData::getStrand() const { return location->strand; } -void AnnotationData::setStrand(U2Strand s) { +void AnnotationData::setStrand(U2Strand s) { location->strand = s; } @@ -55,7 +52,7 @@ U2LocationOperator AnnotationData::getLocationOperator() const { return location->op; } -void AnnotationData::setLocationOperator(U2LocationOperator o) { +void AnnotationData::setLocationOperator(U2LocationOperator o) { location->op = o; } @@ -142,18 +139,18 @@ QDataStream & operator>>(QDataStream &dataStream, TriState &state) { int st; dataStream >> st; switch (st) { - case 0: state = TriState_Yes; break; - case 1: state = TriState_No; break; - default: state = TriState_Unknown; + case 0: state = TriState_Yes; break; + case 1: state = TriState_No; break; + default: state = TriState_Unknown; } return dataStream; } QDataStream & operator<<(QDataStream &dataStream, const TriState &state) { switch (state) { - case TriState_Yes: return dataStream << 0; - case TriState_No: return dataStream << 1; - default: return dataStream << 2; + case TriState_Yes: return dataStream << 0; + case TriState_No: return dataStream << 1; + default: return dataStream << 2; } } @@ -168,13 +165,13 @@ QDataStream & operator<<(QDataStream &dataStream, const U2Qualifier &q) { QDataStream & operator>>(QDataStream &dataStream, AnnotationData &) { assert(0); return dataStream; -// return dataStream >> data.name >> data.location >> data.qualifiers; + // return dataStream >> data.name >> data.location >> data.qualifiers; } QDataStream & operator<<(QDataStream &dataStream, const AnnotationData &) { assert(0); return dataStream; -// return dataStream << data.name << data.location << data.qualifiers; + // return dataStream << data.name << data.location << data.qualifiers; } } //namespace U2 diff --git a/src/corelibs/U2Core/src/datatype/AnnotationData.h b/src/corelibs/U2Core/src/datatype/AnnotationData.h index a0afc80673268be3c0bf47bc8afe1ca7d9019b47..72d9c93c68202d050da44cc5bcc2267f94d7f54a 100644 --- a/src/corelibs/U2Core/src/datatype/AnnotationData.h +++ b/src/corelibs/U2Core/src/datatype/AnnotationData.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,6 +26,7 @@ #include <U2Core/U2Location.h> #include <U2Core/U2Qualifier.h> +#include <QDataStream> #include <QSharedData> #include <QVector> #include <QStringList> diff --git a/src/corelibs/U2Core/src/datatype/AnnotationGroup.cpp b/src/corelibs/U2Core/src/datatype/AnnotationGroup.cpp index b39fd1bbdc292c5ca1eab2aa1775145a882cabcf..474ba1e9c7590c2943ac026417dd04e5ebed543d 100644 --- a/src/corelibs/U2Core/src/datatype/AnnotationGroup.cpp +++ b/src/corelibs/U2Core/src/datatype/AnnotationGroup.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,8 +19,6 @@ * MA 02110-1301, USA. */ -#include <U2Core/Annotation.h> -#include <U2Core/AnnotationModification.h> #include <U2Core/AnnotationTableObject.h> #include <U2Core/L10n.h> #include <U2Core/TextUtils.h> @@ -37,14 +35,12 @@ const QString AnnotationGroup::ROOT_GROUP_NAME("/"); const QChar AnnotationGroup::GROUP_PATH_SEPARATOR('/'); AnnotationGroup::AnnotationGroup() - : U2Entity(), parentObject(NULL), parentGroup(NULL) -{ + : U2Entity(), parentObject(NULL), parentGroup(NULL) { } AnnotationGroup::AnnotationGroup(const U2DataId &featureId, const QString &name, AnnotationGroup *parentGroup, AnnotationTableObject *parentObject) - : U2Entity(featureId), parentObject(parentObject), name(name), parentGroup(parentGroup) -{ + : U2Entity(featureId), parentObject(parentObject), name(name), parentGroup(parentGroup) { SAFE_POINT(NULL != parentObject && hasValidId(), "Invalid feature table detected", ); } @@ -71,19 +67,19 @@ bool AnnotationGroup::isValidGroupName(const QString &name, bool pathMode) { if (!TextUtils::fits(validChars, groupName.constData(), groupName.size())) { return false; } - if (' ' == groupName[0] || ' ' == groupName[groupName.size()-1]) { + if (' ' == groupName[0] || ' ' == groupName[groupName.size() - 1]) { return false; } return true; } void AnnotationGroup::findAllAnnotationsInGroupSubTree(QList<Annotation *> &set) const { - foreach (Annotation *a, annotations) { + foreach(Annotation *a, annotations) { if (!set.contains(a)) { set.append(a); } } - foreach (AnnotationGroup *subgroup, subgroups) { + foreach(AnnotationGroup *subgroup, subgroups) { subgroup->findAllAnnotationsInGroupSubTree(set); } } @@ -91,7 +87,7 @@ void AnnotationGroup::findAllAnnotationsInGroupSubTree(QList<Annotation *> &set) QList<Annotation *> AnnotationGroup::getAnnotations(bool recurcively) const { QList<Annotation *> result = annotations; if (recurcively) { - foreach (AnnotationGroup *subgroup, subgroups) { + foreach(AnnotationGroup *subgroup, subgroups) { result.append(subgroup->getAnnotations(true)); } } @@ -102,7 +98,7 @@ bool AnnotationGroup::hasAnnotations() const { if (!annotations.isEmpty()) { return true; } - foreach (AnnotationGroup *subgroup, subgroups) { + foreach(AnnotationGroup *subgroup, subgroups) { if (subgroup->hasAnnotations()) { return true; } @@ -119,7 +115,7 @@ QList<Annotation *> AnnotationGroup::addAnnotations(const QList<SharedAnnotation Q_UNUSED(opBlock); CHECK_OP(os, result); - foreach (const SharedAnnotationData &d, anns) { + foreach(const SharedAnnotationData &d, anns) { const U2Feature feature = U2FeatureUtils::exportAnnotationDataToFeatures(d, parentObject->getRootFeatureId(), id, parentObject->getEntityRef().dbiRef, os); @@ -127,7 +123,7 @@ QList<Annotation *> AnnotationGroup::addAnnotations(const QList<SharedAnnotation SAFE_POINT_OP(os, result); } - foreach (Annotation *a, result) { + foreach(Annotation *a, result) { annotationById[a->id] = a; } annotations.append(result); @@ -140,7 +136,7 @@ QList<Annotation *> AnnotationGroup::addAnnotations(const QList<SharedAnnotation void AnnotationGroup::addShallowAnnotations(const QList<Annotation *> &anns, bool newAnnotations) { #ifdef _DEBUG - foreach (Annotation *a, anns) { + foreach(Annotation *a, anns) { SAFE_POINT(a->getGroup() == this, "Unexpected annotation group", ); } #endif @@ -161,14 +157,14 @@ void AnnotationGroup::removeAnnotations(const QList<Annotation *> &anns) { U2OpStatusImpl os; QList<U2DataId> annotationsIds; - foreach (Annotation *a, anns) { + foreach(Annotation *a, anns) { SAFE_POINT(NULL != a && a->getGroup() == this, "Unexpected annotation group", ); annotationsIds.append(a->id); } U2FeatureUtils::removeFeatures(annotationsIds, parentObject->getEntityRef().dbiRef, os); SAFE_POINT_OP(os, ); - foreach (Annotation *a, anns) { + foreach(Annotation *a, anns) { annotationById.remove(a->id); annotations.removeOne(a); delete a; @@ -243,7 +239,7 @@ AnnotationGroup * AnnotationGroup::getSubgroup(const QString &path, bool create) : ((0 == separatorFirstPosition) ? path.mid(1) : path.left(separatorFirstPosition)); AnnotationGroup *subgroup = NULL; - foreach (AnnotationGroup *g, subgroups) { + foreach(AnnotationGroup *g, subgroups) { if (g->getName() == subgroupName) { subgroup = g; break; @@ -302,7 +298,7 @@ Annotation * AnnotationGroup::findAnnotationById(const U2DataId &featureId) cons AnnotationGroup * AnnotationGroup::findSubgroupById(const U2DataId &featureId) const { SAFE_POINT(!featureId.isEmpty(), "Unexpected feature provided", NULL); - foreach (AnnotationGroup *g, subgroups) { + foreach(AnnotationGroup *g, subgroups) { if (g->id == featureId) { return g; } @@ -319,7 +315,7 @@ void AnnotationGroup::getSubgroupPaths(QStringList &res) const { if (!isRootGroup()) { res.append(getGroupPath()); } - foreach (const AnnotationGroup *g, subgroups) { + foreach(const AnnotationGroup *g, subgroups) { g->getSubgroupPaths(res); } } diff --git a/src/corelibs/U2Core/src/datatype/AnnotationGroup.h b/src/corelibs/U2Core/src/datatype/AnnotationGroup.h index 46ffeba98f4bee8a88ce97b3d0f974bb11692a86..00667e40cad7fc40edb912b264f34774b7a71405 100644 --- a/src/corelibs/U2Core/src/datatype/AnnotationGroup.h +++ b/src/corelibs/U2Core/src/datatype/AnnotationGroup.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/AnnotationModification.cpp b/src/corelibs/U2Core/src/datatype/AnnotationModification.cpp index 4e95865e05934128e60d7cc73fa8a1b5487fe766..2e7d4c110846f4542a352fe168a102b763f89ef4 100644 --- a/src/corelibs/U2Core/src/datatype/AnnotationModification.cpp +++ b/src/corelibs/U2Core/src/datatype/AnnotationModification.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/AnnotationModification.h b/src/corelibs/U2Core/src/datatype/AnnotationModification.h index 793512fa4bc4c1ebb23dd74df5fe6ea96a3b747c..677ef01962df18c53cd4772a487a1646b1b0680a 100644 --- a/src/corelibs/U2Core/src/datatype/AnnotationModification.h +++ b/src/corelibs/U2Core/src/datatype/AnnotationModification.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/AnnotationSettings.cpp b/src/corelibs/U2Core/src/datatype/AnnotationSettings.cpp index 2d98b28fd37550136ce9464c6b6890d739d34e4d..053193aef65941e433f62e4f498345d79c753772 100644 --- a/src/corelibs/U2Core/src/datatype/AnnotationSettings.cpp +++ b/src/corelibs/U2Core/src/datatype/AnnotationSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/AnnotationSettings.h b/src/corelibs/U2Core/src/datatype/AnnotationSettings.h index 380424d587f3feaf952162f22e48b6001ee70183..0cfc6808b9742ef4220b85b63f97acb27df408f4 100644 --- a/src/corelibs/U2Core/src/datatype/AnnotationSettings.h +++ b/src/corelibs/U2Core/src/datatype/AnnotationSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/AnnotationTableObjectConstraints.cpp b/src/corelibs/U2Core/src/datatype/AnnotationTableObjectConstraints.cpp index 3121efd9449e050a2db5b9d6184aa4248639bda1..ab48c8660c91e1e465de4879a62cd43d504ef3d6 100644 --- a/src/corelibs/U2Core/src/datatype/AnnotationTableObjectConstraints.cpp +++ b/src/corelibs/U2Core/src/datatype/AnnotationTableObjectConstraints.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/AnnotationTableObjectConstraints.h b/src/corelibs/U2Core/src/datatype/AnnotationTableObjectConstraints.h index 0df6f9381a6aa8a3d39f4279959beb4193a8bace..44276114e1e5712e787d9583c50576be452e69f5 100644 --- a/src/corelibs/U2Core/src/datatype/AnnotationTableObjectConstraints.h +++ b/src/corelibs/U2Core/src/datatype/AnnotationTableObjectConstraints.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/BaseAlphabets.cpp b/src/corelibs/U2Core/src/datatype/BaseAlphabets.cpp index 8c8f121cb429a63cc03b923fa8ded1a5c03b6818..ba94d76c934f1f6232c6adb06d8c4c6dc87307d2 100644 --- a/src/corelibs/U2Core/src/datatype/BaseAlphabets.cpp +++ b/src/corelibs/U2Core/src/datatype/BaseAlphabets.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/BaseTranslations.cpp b/src/corelibs/U2Core/src/datatype/BaseTranslations.cpp index cdcaa0bfa04bcd0c509d852da9751acae55d0ee5..336a6423cce2c81c09472bc43a0ecd499d7ce569 100644 --- a/src/corelibs/U2Core/src/datatype/BaseTranslations.cpp +++ b/src/corelibs/U2Core/src/datatype/BaseTranslations.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/BioStruct3D.cpp b/src/corelibs/U2Core/src/datatype/BioStruct3D.cpp index 7ee5bc893ed0b5f65abf68bc30344a8abf2ef5d6..171d36d2da6589f39bebcbf6ce2add9e7a7cd548 100644 --- a/src/corelibs/U2Core/src/datatype/BioStruct3D.cpp +++ b/src/corelibs/U2Core/src/datatype/BioStruct3D.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/BioStruct3D.h b/src/corelibs/U2Core/src/datatype/BioStruct3D.h index 8b6a5386d59e137bd1d60a6a6c3cc6f329b6d56e..7f0022db779ccaf75e31428c333c232c0beccc6c 100644 --- a/src/corelibs/U2Core/src/datatype/BioStruct3D.h +++ b/src/corelibs/U2Core/src/datatype/BioStruct3D.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -31,14 +31,12 @@ #include <QList> #include <QMap> #include <QSharedData> -#include <QMultiMap> namespace U2 { class U2Region; -class U2CORE_EXPORT ResidueIndex -{ +class U2CORE_EXPORT ResidueIndex { int resId; int order; // to keep order of residues in the chain char insCode; @@ -57,8 +55,7 @@ public: //! Represents biopolimer residue -class ResidueData : public QSharedData -{ +class ResidueData : public QSharedData { public: enum Type { TYPE_UNKNOWN, TYPE_PROTEIN, TYPE_DNA, TYPE_RNA @@ -73,8 +70,7 @@ public: typedef QSharedDataPointer<ResidueData> SharedResidue; //! Represents atom -class AtomData : public QSharedData -{ +class AtomData : public QSharedData { public: int atomicNumber; int chainIndex; @@ -96,12 +92,11 @@ public: typedef QSharedDataPointer<AtomData> SharedAtom; //! Represents chemical bond between atoms -class Bond -{ +class Bond { SharedAtom atom1; SharedAtom atom2; public: - Bond(const SharedAtom& a1, const SharedAtom& a2) : atom1(a1), atom2(a2) { } + Bond(const SharedAtom& a1, const SharedAtom& a2) : atom1(a1), atom2(a2) {} const SharedAtom getAtom1() const { return atom1; } const SharedAtom getAtom2() const { return atom2; } }; @@ -121,8 +116,7 @@ public: int endSequenceNumber; public: - SecondaryStructure() : type(Type_None) - { + SecondaryStructure() : type(Type_None) { startSequenceNumber = 0; endSequenceNumber = 0; chainIndex = 0; @@ -135,9 +129,8 @@ typedef QSharedDataPointer<SecondaryStructure> SharedSecondaryStructure; //! Model 3D /*! Represents collection of molecule atomic coordinates and bonds -*/ -class Molecule3DModel -{ + */ +class Molecule3DModel { public: QList<SharedAtom> atoms; QList<Bond> bonds; @@ -146,7 +139,7 @@ public: //! Molecule /*! Represents molecule chain (biopolymer or any other) -*/ + */ class MoleculeData : public QSharedData { public: @@ -209,7 +202,7 @@ public: // Theese three methods need to solve confusion between model ids (same as in PDB) // and internal model indexes, both are used in UGENE // model ids should be used for user interface, and one fine day may become a strings - // model index numbers used by internal UGENE parts, and shoud be consequent int values from 0 + // model index numbers used by internal UGENE parts, and should be consequent int values from 0 /** @returns list of model ids (same as in PDB), that can be not consequent */ const QList<int> getModelsNames() const; diff --git a/src/corelibs/U2Core/src/datatype/DIProperties.h b/src/corelibs/U2Core/src/datatype/DIProperties.h index 808dc0782297ef25aad318f7be28b2d986f64d00..6765dad543f91203ca2c0f7fe87e668a6b4f05bc 100644 --- a/src/corelibs/U2Core/src/datatype/DIProperties.h +++ b/src/corelibs/U2Core/src/datatype/DIProperties.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,8 +24,6 @@ #include <assert.h> -#include <QList> -#include <QMap> #include <QObject> #include <QString> @@ -53,26 +51,26 @@ int DiProperty::index(char c) { if (c == 'A') { return 0; } if (c == 'C') { return 1; } if (c == 'G') { return 2; } - if (c == 'T' || c == 'U') {return 3;} + if (c == 'T' || c == 'U') { return 3; } return 0; //default is 'A' } char DiProperty::fromIndex(int index) { - assert (index >=0); - assert (index < 4); + assert(index >= 0); + assert(index < 4); char a[] = "ACGT"; return a[index]; } char DiProperty::fromIndexLo(int index) { - assert (index >= 0); - assert (index < 16); + assert(index >= 0); + assert(index < 16); return fromIndex(index & 3); } char DiProperty::fromIndexHi(int index) { - assert (index >= 0); - assert (index < 16); + assert(index >= 0); + assert(index < 16); return fromIndex(index >> 2); } diff --git a/src/corelibs/U2Core/src/datatype/DNAAlphabet.cpp b/src/corelibs/U2Core/src/datatype/DNAAlphabet.cpp index f132f1ef4e32564ff76d8254ce7fc92151410468..869402a3fd9610c9916f5652999cdf52dcf16794 100644 --- a/src/corelibs/U2Core/src/datatype/DNAAlphabet.cpp +++ b/src/corelibs/U2Core/src/datatype/DNAAlphabet.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/DNAAlphabet.h b/src/corelibs/U2Core/src/datatype/DNAAlphabet.h index 59cb1c5d20a5138eee2493069065c3bd27457c22..8c637e68f75a37a433d03e0f0e7a9b7c4300496b 100644 --- a/src/corelibs/U2Core/src/datatype/DNAAlphabet.h +++ b/src/corelibs/U2Core/src/datatype/DNAAlphabet.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/DNAAlphabetRegistryImpl.cpp b/src/corelibs/U2Core/src/datatype/DNAAlphabetRegistryImpl.cpp index a43effc9133edd4b4f095af2c5cf5ffc5f134d04..095bbc5ead5188b8e91ce7f7191fa9a0e6def787 100644 --- a/src/corelibs/U2Core/src/datatype/DNAAlphabetRegistryImpl.cpp +++ b/src/corelibs/U2Core/src/datatype/DNAAlphabetRegistryImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/DNAAlphabetRegistryImpl.h b/src/corelibs/U2Core/src/datatype/DNAAlphabetRegistryImpl.h index c6de213e288d34161eaf6541b553cfd9a74d90c4..fdf8379a1a591e76c243733ab84e125d5cab44e0 100644 --- a/src/corelibs/U2Core/src/datatype/DNAAlphabetRegistryImpl.h +++ b/src/corelibs/U2Core/src/datatype/DNAAlphabetRegistryImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/DNAChromatogram.cpp b/src/corelibs/U2Core/src/datatype/DNAChromatogram.cpp index 6da104218f527c2a76e95d5a70a57b02718dca6f..603aa62fa6e3244d513f0569fcf0a39895c498c5 100644 --- a/src/corelibs/U2Core/src/datatype/DNAChromatogram.cpp +++ b/src/corelibs/U2Core/src/datatype/DNAChromatogram.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/DNAChromatogram.h b/src/corelibs/U2Core/src/datatype/DNAChromatogram.h index 3d2ad7e32c8e464f65cc40bbc4b9408a80b86ee8..fe15d91566f2aff96a492c6c341d87a70f27a984 100644 --- a/src/corelibs/U2Core/src/datatype/DNAChromatogram.h +++ b/src/corelibs/U2Core/src/datatype/DNAChromatogram.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/DNAInfo.cpp b/src/corelibs/U2Core/src/datatype/DNAInfo.cpp index 09dd2d03b838f9b325945a18bf2e267813cc00d7..e233fca71813a5f85b9fad5bd3bab4f0ed7e6bb5 100644 --- a/src/corelibs/U2Core/src/datatype/DNAInfo.cpp +++ b/src/corelibs/U2Core/src/datatype/DNAInfo.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/DNAInfo.h b/src/corelibs/U2Core/src/datatype/DNAInfo.h index bf927e8aaf6c58289abdc0cf0d0f34074befa0ba..cdda98eb4b8b023b041723800f8b382cbcced1cf 100644 --- a/src/corelibs/U2Core/src/datatype/DNAInfo.h +++ b/src/corelibs/U2Core/src/datatype/DNAInfo.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/DNAQuality.cpp b/src/corelibs/U2Core/src/datatype/DNAQuality.cpp index aae1d7be0a7198b2b9344db3749bc19411d8aa9e..00b98fc4062848148732a12990464a48fca5e145 100644 --- a/src/corelibs/U2Core/src/datatype/DNAQuality.cpp +++ b/src/corelibs/U2Core/src/datatype/DNAQuality.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/DNAQuality.h b/src/corelibs/U2Core/src/datatype/DNAQuality.h index 5e28d6d7d07a7ff24de49980def3fc99d1320ce7..c7f9eac0beef45568287068a3a7c0603336235a3 100644 --- a/src/corelibs/U2Core/src/datatype/DNAQuality.h +++ b/src/corelibs/U2Core/src/datatype/DNAQuality.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/DNASequence.cpp b/src/corelibs/U2Core/src/datatype/DNASequence.cpp index 1ce964fdf3ee0d0e1600b27c8da8784c2fe6754b..e804d989d29b980fa20db281b7e72b4e18f33395 100644 --- a/src/corelibs/U2Core/src/datatype/DNASequence.cpp +++ b/src/corelibs/U2Core/src/datatype/DNASequence.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/DNASequence.h b/src/corelibs/U2Core/src/datatype/DNASequence.h index e9e97869dbbe4a67d394ea60200cd86ef9af943f..0a0fd49f63d6aceab0b653e9fdea3225de10b002 100644 --- a/src/corelibs/U2Core/src/datatype/DNASequence.h +++ b/src/corelibs/U2Core/src/datatype/DNASequence.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/DNASequenceUtils.cpp b/src/corelibs/U2Core/src/datatype/DNASequenceUtils.cpp index eabedbcc68a958fc32606ecd933f8b877948b08a..b796afada1e38cfe3d860ec67ce97eb0c48dfbb7 100644 --- a/src/corelibs/U2Core/src/datatype/DNASequenceUtils.cpp +++ b/src/corelibs/U2Core/src/datatype/DNASequenceUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -20,7 +20,6 @@ */ #include <U2Core/AppContext.h> -#include <U2Core/DNAAlphabet.h> #include <U2Core/DNATranslation.h> #include <U2Core/L10n.h> #include <U2Core/Log.h> @@ -39,8 +38,7 @@ void DNASequenceUtils::append(DNASequence& sequence, const DNASequence& appended DnaSequencesMatchStatus DNASequenceUtils::compare(const DNASequence& firstSeq, const DNASequence& secondSec) { if (firstSeq.constSequence() == secondSec.constSequence()) { return MatchExactly; - } - else { + } else { return DoNotMatch; } } @@ -75,7 +73,7 @@ void DNASequenceUtils::insertChars(QByteArray& sequence, int startPos, const QBy void DNASequenceUtils::replaceChars(QByteArray& sequence, int startPos, const QByteArray& newChars, U2OpStatus& os) { int endPos = startPos + newChars.length(); - CHECK_EXT(newChars.length() > 0, os.setError("Array of chars for replacing is empty!"),); + CHECK_EXT(newChars.length() > 0, os.setError("Array of chars for replacing is empty!"), ); if ((startPos < 0) || (endPos > sequence.length())) { coreLog.trace(QString("Internal error: incorrect parameters was passed to DNASequenceUtils::replaceChars," "startPos '%1', endPos '%2', sequence length '%3'!").arg(startPos).arg(endPos).arg(sequence.length())); diff --git a/src/corelibs/U2Core/src/datatype/DNASequenceUtils.h b/src/corelibs/U2Core/src/datatype/DNASequenceUtils.h index 20d65e8721518a80bf95ca742211ee67fc8ca5fa..b5a167e87be48c19b9ccef4a90155d2eb61812bd 100644 --- a/src/corelibs/U2Core/src/datatype/DNASequenceUtils.h +++ b/src/corelibs/U2Core/src/datatype/DNASequenceUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/DNATranslation.cpp b/src/corelibs/U2Core/src/datatype/DNATranslation.cpp index 881a799fffa56dfe26f9d5059bf6bc2edb1149e6..fb15664a3be61ccf3c13a29506bdf91818205a78 100644 --- a/src/corelibs/U2Core/src/datatype/DNATranslation.cpp +++ b/src/corelibs/U2Core/src/datatype/DNATranslation.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -136,7 +136,7 @@ DNATranslation* DNATranslationRegistry::getStandardGeneticCodeTranslation(const if (srcAlphabet->isNucleic()) { return lookupTranslation(srcAlphabet, DNATranslationID(1)); } - FAIL("Standart genetic code is used only with source nucleic alphabet", NULL); + FAIL("Standard genetic code is used only with source nucleic alphabet", NULL); } DNATranslation* DNATranslationRegistry::lookupTranslation(const DNAAlphabet* srcAlphabet, diff --git a/src/corelibs/U2Core/src/datatype/DNATranslation.h b/src/corelibs/U2Core/src/datatype/DNATranslation.h index 2003f1f8bb73fe9f8b170af2a7497a30dee14132..816eccc3b77479ff59347563a60395d1495103da 100644 --- a/src/corelibs/U2Core/src/datatype/DNATranslation.h +++ b/src/corelibs/U2Core/src/datatype/DNATranslation.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/DNATranslationImpl.cpp b/src/corelibs/U2Core/src/datatype/DNATranslationImpl.cpp index 14a75a09fb26e0f4eab252e700afb878dac1198b..c4fea01532d41dc4233f73c147df2cfee845ba11 100644 --- a/src/corelibs/U2Core/src/datatype/DNATranslationImpl.cpp +++ b/src/corelibs/U2Core/src/datatype/DNATranslationImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/DNATranslationImpl.h b/src/corelibs/U2Core/src/datatype/DNATranslationImpl.h index 833117d89ccebd5d27320c603a273740d4c33b16..0b2ee085e4cd6f0c60d2f6c98d3719a5fff9b398 100644 --- a/src/corelibs/U2Core/src/datatype/DNATranslationImpl.h +++ b/src/corelibs/U2Core/src/datatype/DNATranslationImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/FeatureColors.cpp b/src/corelibs/U2Core/src/datatype/FeatureColors.cpp index ff375bd9b901f881afdb94afa00a680c39ab4667..77f176d3a232b1299897e960bac0efe6c55e593e 100644 --- a/src/corelibs/U2Core/src/datatype/FeatureColors.cpp +++ b/src/corelibs/U2Core/src/datatype/FeatureColors.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/FeatureColors.h b/src/corelibs/U2Core/src/datatype/FeatureColors.h index a665a8787492f54cf0ad812a5b7e43cd2e7bac24..a469f55bdc1105bf2634ee1001594fdf52c28e57 100644 --- a/src/corelibs/U2Core/src/datatype/FeatureColors.h +++ b/src/corelibs/U2Core/src/datatype/FeatureColors.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/Matrix44.cpp b/src/corelibs/U2Core/src/datatype/Matrix44.cpp index 39873bc7ab1b0f16d244e831dcb1b5466b3be297..624576564f1d219d2ff00ffd675f41b32acfe58d 100644 --- a/src/corelibs/U2Core/src/datatype/Matrix44.cpp +++ b/src/corelibs/U2Core/src/datatype/Matrix44.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/Matrix44.h b/src/corelibs/U2Core/src/datatype/Matrix44.h index 88de7fa3fdf8627aa3023a3e7841242dbe3b01f8..e9757528b83119fac89cb16b8cd2911d6d0a97ff 100644 --- a/src/corelibs/U2Core/src/datatype/Matrix44.h +++ b/src/corelibs/U2Core/src/datatype/Matrix44.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,7 +23,6 @@ #define _U2_MATRIX_44_H_ #include <QVector> -#include <QVariantList> #include <U2Core/global.h> diff --git a/src/corelibs/U2Core/src/datatype/PFMatrix.cpp b/src/corelibs/U2Core/src/datatype/PFMatrix.cpp index c6d035053ad84107cade2bc42bd081da7a6537ca..5f61676c2f3bff6939a4d71fc642160192a3e9ac 100644 --- a/src/corelibs/U2Core/src/datatype/PFMatrix.cpp +++ b/src/corelibs/U2Core/src/datatype/PFMatrix.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/PFMatrix.h b/src/corelibs/U2Core/src/datatype/PFMatrix.h index 6378f25ae95af6f1c1f254f112f6d871ab5faada..9618cc9d06217fc9f55ff08e0d16a04262eb3de3 100644 --- a/src/corelibs/U2Core/src/datatype/PFMatrix.h +++ b/src/corelibs/U2Core/src/datatype/PFMatrix.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -28,7 +28,6 @@ #include <U2Core/DNASequence.h> #include <QVarLengthArray> -#include <QList> #include <QMap> namespace U2 { @@ -45,7 +44,7 @@ public: //constructor from matrix_list.txt string JasparInfo(const QString& line); - QString getProperty (const QString& name) const; + QString getProperty(const QString& name) const; QMap<QString, QString> getProperties() const; @@ -75,25 +74,25 @@ public: //create matrix from set of sequences with equal length PFMatrix(const QList<DNASequence*>& data, const PFMatrixType type); - PFMatrix(const PFMatrix &m):data(m.data), length(m.length), type(m.type), info(m.info){}; + PFMatrix(const PFMatrix &m) :data(m.data), length(m.length), type(m.type), info(m.info) {}; //get internal index of position in 1-dimensional array - int index (int row, int column) const; + int index(int row, int column) const; //get length of matrix row - int getLength () const; + int getLength() const; //get type of matrix: mono- or dinucleotide PFMatrixType getType() const; //get value at specified position - int getValue (int row, int column) const; + int getValue(int row, int column) const; //set JASPAR info for matrix - void setInfo (const JasparInfo& info); + void setInfo(const JasparInfo& info); //get specified Jaspar property - QString getProperty (const QString& propertyName) const; + QString getProperty(const QString& propertyName) const; //get all Jaspar properties QMap<QString, QString> getProperties() const; diff --git a/src/corelibs/U2Core/src/datatype/PWMatrix.cpp b/src/corelibs/U2Core/src/datatype/PWMatrix.cpp index 0321f807202913917dd47a232472e9647be3ee0d..098d9cbf58af1ff882e9b19622f98a8ac770ec83 100644 --- a/src/corelibs/U2Core/src/datatype/PWMatrix.cpp +++ b/src/corelibs/U2Core/src/datatype/PWMatrix.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/PWMatrix.h b/src/corelibs/U2Core/src/datatype/PWMatrix.h index 5c52c75a7db1262cdee22fcff81c97be256be38a..fb0c374f7fe7a8aa48c314336466801b572e1249 100644 --- a/src/corelibs/U2Core/src/datatype/PWMatrix.h +++ b/src/corelibs/U2Core/src/datatype/PWMatrix.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/PhyTree.cpp b/src/corelibs/U2Core/src/datatype/PhyTree.cpp index 2f56ce066bdde2f74d3306be2f75479bd4a0e716..23ed018930d8e10ba0e4d4961884df2b253e5023 100644 --- a/src/corelibs/U2Core/src/datatype/PhyTree.cpp +++ b/src/corelibs/U2Core/src/datatype/PhyTree.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,21 +19,24 @@ * MA 02110-1301, USA. */ -#include "PhyTree.h" -#include <U2Core/U2SafePoints.h> #include <iostream> +#include <QSet> + +#include <U2Core/U2SafePoints.h> + +#include "PhyTree.h" + namespace U2 { -PhyTreeData::PhyTreeData() : rootNode(NULL), haveNodeLabels(false) { -} +PhyTreeData::PhyTreeData() : rootNode(NULL), haveNodeLabels(false) {} PhyTreeData::PhyTreeData(const PhyTreeData& other) : QSharedData(other), haveNodeLabels(false) { rootNode = other.rootNode == NULL ? NULL : other.rootNode->clone(); } PhyTreeData::~PhyTreeData() { - if (rootNode != NULL){ + if (rootNode != NULL) { delete rootNode; rootNode = NULL; } @@ -70,34 +73,31 @@ void PhyTreeData::setUsingNodeLabels(bool _haveNodeLabels) { } void PhyTreeData::renameNodes(const QMap<QString, QString>& newNamesByOldNames) { - SAFE_POINT(NULL != rootNode, QObject::tr("UGENE internal error"),); + SAFE_POINT(NULL != rootNode, QObject::tr("UGENE internal error"), ); QList<PhyNode*> treeNodes = rootNode->getChildrenNodes(); treeNodes.append(rootNode); foreach(PhyNode* currentNode, treeNodes) { QString newName = newNamesByOldNames[currentNode->getName()]; - if(!newName.isEmpty()) { + if (!newName.isEmpty()) { currentNode->setName(newName); } } } -PhyNode::PhyNode() { -} +PhyNode::PhyNode() {} -PhyBranch::PhyBranch() : node1(NULL), node2(NULL), distance(0), nodeValue(-1.0) { -} +PhyBranch::PhyBranch() : node1(NULL), node2(NULL), distance(0), nodeValue(-1.0) {} -void PhyTreeData::print() const{ +void PhyTreeData::print() const { QList<PhyNode* > nodes; int tab = 0; int distance = 0; - rootNode->print(nodes,distance, tab); + rootNode->print(nodes, distance, tab); } -QList<const PhyNode*> PhyTreeData::collectNodes() const -{ +QList<const PhyNode*> PhyTreeData::collectNodes() const { QList<const PhyNode*> track; if (rootNode != NULL) { @@ -127,7 +127,7 @@ void PhyNode::validate(QList<const PhyNode*>& track) const { } track.append(this); foreach(PhyBranch* b, branches) { - assert(b->node1 != NULL && b->node2!=NULL); + assert(b->node1 != NULL && b->node2 != NULL); if (b->node1 != this) { b->node1->validate(track); } else if (b->node2 != this) { @@ -147,7 +147,7 @@ bool PhyNode::isConnected(const PhyNode* node) const { PhyNode * PhyNode::parent() const { foreach(PhyBranch* currentBrunch, branches) { - if(currentBrunch->node2 == this) + if (currentBrunch->node2 == this) return currentBrunch->node1; } return NULL; @@ -171,27 +171,25 @@ PhyBranch * PhyNode::getBranch(int i) const { void PhyNode::setParentNode(PhyNode* newParent, double distance) { int branchesNumber = branches.size(); - for(int i = 0; i < branchesNumber; i++) { + for (int i = 0; i < branchesNumber; i++) { PhyBranch* currentBrunch = branches.at(i); - if(currentBrunch->node1 == newParent) { + if (currentBrunch->node1 == newParent) { return; - } - else if(currentBrunch->node2 == newParent) { + } else if (currentBrunch->node2 == newParent) { //Invert branch nodes if newParent currently is a child currentBrunch->node1 = newParent; currentBrunch->node2 = this; currentBrunch->distance = distance; return; - } - else if(currentBrunch->node2 == this) { + } else if (currentBrunch->node2 == this) { //Remove link between the node and previous parent PhyNode* parentNode = currentBrunch->node1; - if(NULL != parentNode) { + if (NULL != parentNode) { parentNode->branches.removeOne(currentBrunch); } //Link the node to the new parent - if(NULL != newParent) { + if (NULL != newParent) { currentBrunch->node1 = newParent; currentBrunch->distance = distance; newParent->branches.append(currentBrunch); @@ -213,7 +211,7 @@ void PhyNode::setParentNode(PhyNode* newParent, double distance) { QList<PhyNode*> PhyNode::getChildrenNodes() const { QList<PhyNode*> childNodes; foreach(PhyBranch* branch, branches) { - if(branch->node1 == this) { + if (branch->node1 == this) { childNodes.append(branch->node2); } } @@ -225,7 +223,7 @@ QList<PhyNode*> PhyNode::getChildrenNodes() const { const PhyBranch* PhyNode::getParentBranch() const { foreach(PhyBranch* branch, branches) { - if(branch->node2 == this) { + if (branch->node2 == this) { return branch; } } @@ -233,20 +231,19 @@ const PhyBranch* PhyNode::getParentBranch() const { return NULL; } -PhyNode::~PhyNode(){ +PhyNode::~PhyNode() { for (int i = 0, s = branches.size(); i < s; ++i) { PhyBranch* curBranch = branches[i]; - SAFE_POINT(NULL != curBranch, "NULL pointer to PhyBranch",); + SAFE_POINT(NULL != curBranch, "NULL pointer to PhyBranch", ); PhyNode* childNode = curBranch->node2; - SAFE_POINT(NULL != childNode, "NULL pointer to PhyNode",); + SAFE_POINT(NULL != childNode, "NULL pointer to PhyNode", ); if (childNode != this) { childNode->branches.removeOne(branches[i]); delete curBranch; delete childNode; - } - else { + } else { PhyNode* parentNode = curBranch->node1; - if(parentNode != NULL) { + if (parentNode != NULL) { parentNode->branches.removeOne(branches[i]); } delete curBranch; @@ -271,28 +268,28 @@ PhyNode* PhyNode::clone() const { foreach(PhyBranch* b, allBranches) { PhyNode* node1 = nodeTable[b->node1]; PhyNode* node2 = nodeTable[b->node2]; - assert(node1!=NULL && node2!=NULL); + assert(node1 != NULL && node2 != NULL); PhyTreeData::addBranch(node1, node2, b->distance); } PhyNode* myClone = nodeTable.value(this); - assert(myClone!=NULL); + assert(myClone != NULL); return myClone; } void PhyNode::print(QList<PhyNode*>& nodes, int tab, int distance) { - if(nodes.contains(this)){ + if (nodes.contains(this)) { return; } nodes.append(this); - for(int i=0; i<tab; i++){ - std::cout<<" "; + for (int i = 0; i < tab; i++) { + std::cout << " "; } tab++; - std::cout<<"name: "<<this->name.toLatin1().constData() <<" distance: "<<distance<<std::endl; + std::cout << "name: " << this->name.toLatin1().constData() << " distance: " << distance << std::endl; QList<PhyBranch* > blist = this->branches; int s = blist.size(); - for(int i=0; i<s; i++){ - if(blist[i]->node2!=0){ + for (int i = 0; i < s; i++) { + if (blist[i]->node2 != 0) { int d = blist[i]->distance; blist[i]->node2->print(nodes, tab, d); } @@ -314,10 +311,10 @@ double PhyNode::getDistanceToRoot() const { double distanceToRoot = 0.0; const PhyBranch *currentBranch = getParentBranch(); const PhyNode *currentNode = getParentNode(); - while(NULL != currentBranch) { + while (NULL != currentBranch) { SAFE_POINT(currentNode != this, "There is cyclic graph in the phylogenetic tree", 0.0); distanceToRoot += currentBranch->distance; - if(NULL == currentNode) { + if (NULL == currentNode) { break; } currentBranch = currentNode->getParentBranch(); @@ -357,7 +354,7 @@ void PhyTreeUtils::rerootPhyTree(PhyTree& phyTree, PhyNode* node) { } PhyNode* centralNode = node->getParentNode(); if (centralNode == curRoot) { - if(centralNode->getChildrenNodes().at(0) != node) { + if (centralNode->getChildrenNodes().at(0) != node) { centralNode->swapBranches(0, 1); } return; @@ -367,14 +364,14 @@ void PhyTreeUtils::rerootPhyTree(PhyTree& phyTree, PhyNode* node) { distance = node->getDistanceToRoot() - newRoot->getDistanceToRoot(); node->setParentNode(newRoot, distance); PhyNode* oldParent = centralNode->getParentNode(); - if(NULL != oldParent) { + if (NULL != oldParent) { distance = centralNode->getDistanceToRoot() - newRoot->getDistanceToRoot(); centralNode->setParentNode(newRoot, distance); } PhyNode* s = NULL; const PhyNode* firstNode = oldParent; - while(NULL != oldParent) { + while (NULL != oldParent) { s = oldParent->getParentNode(); SAFE_POINT(s != firstNode, "There is cyclic graph in the phylogenetic tree", ); distance = oldParent->getDistanceToRoot() - centralNode->getDistanceToRoot(); @@ -385,7 +382,7 @@ void PhyTreeUtils::rerootPhyTree(PhyTree& phyTree, PhyNode* node) { oldParent = s; } - if(centralNode->getChildrenNodes().size() == 1) { + if (centralNode->getChildrenNodes().size() == 1) { /* remove old root */ oldParent = centralNode->getChildrenNodes().at(0); distance = oldParent->getDistanceToRoot() - newParentNode->getDistanceToRoot(); diff --git a/src/corelibs/U2Core/src/datatype/PhyTree.h b/src/corelibs/U2Core/src/datatype/PhyTree.h index b9aee6d94a7df222417163b6ff5bcb96743aa7d3..da14e95dbcb009a715bb8d701ca7fec3cb5af9a6 100644 --- a/src/corelibs/U2Core/src/datatype/PhyTree.h +++ b/src/corelibs/U2Core/src/datatype/PhyTree.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,7 +24,6 @@ #include <QMap> #include <QObject> -#include <QSet> #include <QSharedData> #include <QVector> @@ -43,14 +42,14 @@ public: QList<const PhyNode*> collectNodes() const; void print() const; - void setRootNode(PhyNode* _rootNode) {rootNode = _rootNode;} - PhyNode* getRootNode() const { return rootNode;} + void setRootNode(PhyNode* _rootNode) { rootNode = _rootNode; } + PhyNode* getRootNode() const { return rootNode; } static PhyBranch* addBranch(PhyNode* node1, PhyNode* node2, double distance); static void removeBranch(PhyNode* node1, PhyNode* node2); void setUsingNodeLabels(bool haveNodeLabels); - bool usingNodeLabels() const {return haveNodeLabels;} + bool usingNodeLabels() const { return haveNodeLabels; } void renameNodes(const QMap<QString, QString>& newNamesByOldNames); private: @@ -60,7 +59,7 @@ private: }; typedef QSharedDataPointer<PhyTreeData> PhyTree; -class U2CORE_EXPORT PhyBranch : public QObject{ +class U2CORE_EXPORT PhyBranch : public QObject { Q_OBJECT public: PhyBranch(); @@ -75,7 +74,7 @@ public: class U2CORE_EXPORT PhyNode { Q_DISABLE_COPY(PhyNode) - friend class PhyTreeUtils; + friend class PhyTreeUtils; friend class PhyTreeData; public: PhyNode(); @@ -83,7 +82,7 @@ public: /* const */ const QString & getName() const { return name; } - int branchCount() const {return branches.size();} + int branchCount() const { return branches.size(); } const PhyNode * getSecondNodeOfBranch(int branchNumber) const; double getBranchesDistance(int branchNumber) const; double getBranchesNodeValue(int branchNumber) const; @@ -92,18 +91,18 @@ public: PhyNode * clone() const; PhyBranch * getBranch(int i) const; - void setName(const QString& _name){ name = _name; } + void setName(const QString& _name) { name = _name; } /* For distance matrix */ const PhyNode * getParentNode() const; PhyNode * getParentNode(); - void setBranchesDistance(int branchNumber, double distance) { branches.at(branchNumber)->distance = distance;} + void setBranchesDistance(int branchNumber, double distance) { branches.at(branchNumber)->distance = distance; } void print(QList<PhyNode*>& nodes, int distance, int tab); /* For reroot */ void setParentNode(PhyNode* newParent, double distance); QList<PhyNode*> getChildrenNodes() const; - void swapBranches(int firstBrunch, int secondBranch){branches.swap(firstBrunch, secondBranch);} + void swapBranches(int firstBrunch, int secondBranch) { branches.swap(firstBrunch, secondBranch); } double getDistanceToRoot() const; const PhyBranch * getParentBranch() const; diff --git a/src/corelibs/U2Core/src/datatype/SMatrix.cpp b/src/corelibs/U2Core/src/datatype/SMatrix.cpp index 62d047da69d5709c969cb1e947c551e5da8ee8c7..5a09b1ca1c682f0838ca8059cc72c0614b88b098 100644 --- a/src/corelibs/U2Core/src/datatype/SMatrix.cpp +++ b/src/corelibs/U2Core/src/datatype/SMatrix.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,10 +19,7 @@ * MA 02110-1301, USA. */ -#include <QVariant> - #include <U2Core/AppContext.h> -#include <U2Core/Log.h> #include <U2Core/TextUtils.h> #include "SMatrix.h" @@ -32,11 +29,10 @@ namespace U2 { #define DEFAULT_FILL_VALUE -1000000.0f SMatrix::SMatrix(const QString& _name, const DNAAlphabet* _alphabet, const QList<SScore>& rawMatrix, const QString& _description) -: name(_name), description(_description), alphabet(_alphabet) -{ + : name(_name), description(_description), alphabet(_alphabet) { validCharacters = alphabet->getAlphabetChars(); TextUtils::charBounds(validCharacters.constData(), validCharacters.size(), minChar, maxChar); - charsInRow = maxChar - minChar + 1; + charsInRow = maxChar - minChar + 1; scores.resize(charsInRow*charsInRow); qFill(scores.data(), scores.data() + scores.size(), -1000000); @@ -72,7 +68,7 @@ SMatrix::SMatrix(const QString& _name, const DNAAlphabet* _alphabet, const QList } void SMatrix::copyCharValues(char srcChar, char dstChar) { - for (int i=0; i < validCharacters.size(); i++) { + for (int i = 0; i < validCharacters.size(); i++) { char c = validCharacters.at(i); float scoreSrc1 = getScore(srcChar, c); setScore(dstChar, c, scoreSrc1); @@ -94,7 +90,7 @@ QVariant SMatrix::toQVariant() const { res.append(double(maxScore)); res.append(scores.size()); - for (int i=0; i< scores.size(); i++) { + for (int i = 0; i < scores.size(); i++) { res.append(double(scores[i])); } @@ -120,14 +116,13 @@ SMatrix SMatrix::fromQVariant(const QVariant& v) { int nScores = list.at(n++).toInt(); m.scores.resize(nScores); - for(int i = 0; i< nScores; i++) { + for (int i = 0; i < nScores; i++) { m.scores[i] = float(list.at(n++).toDouble()); } if (m.name.isEmpty() || m.alphabet == NULL || m.validCharacters.isEmpty() || !m.validCharacters.contains(m.minChar) || !m.validCharacters.contains(m.maxChar) - || m.maxChar - m.minChar + 1 != m.charsInRow) - { + || m.maxChar - m.minChar + 1 != m.charsInRow) { coreLog.error("Error during substitution matrix deserialization!"); return SMatrix(); } diff --git a/src/corelibs/U2Core/src/datatype/SMatrix.h b/src/corelibs/U2Core/src/datatype/SMatrix.h index c9d816f9e602347fab17fd33da438a46a76be738..e8215ecbe982cf97875792a554bc8ae58fd5a435 100644 --- a/src/corelibs/U2Core/src/datatype/SMatrix.h +++ b/src/corelibs/U2Core/src/datatype/SMatrix.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2Alphabet.h b/src/corelibs/U2Core/src/datatype/U2Alphabet.h index 86a001383c8c78dce4d8b3cdc700cf5f082c6244..079eaba4f1e114a1cefd0389960517ef10117263 100644 --- a/src/corelibs/U2Core/src/datatype/U2Alphabet.h +++ b/src/corelibs/U2Core/src/datatype/U2Alphabet.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2Assembly.h b/src/corelibs/U2Core/src/datatype/U2Assembly.h index 9ce4669748b52619fc88388354f9cd95e244ec3a..174e82f4866d4fa705e0f7b71d39b9b22eb432cc 100644 --- a/src/corelibs/U2Core/src/datatype/U2Assembly.h +++ b/src/corelibs/U2Core/src/datatype/U2Assembly.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2Attribute.h b/src/corelibs/U2Core/src/datatype/U2Attribute.h index 17df9383595b485d8eeb7d6c22a4b53217e936ee..5440d2847ed8195ab169d4aa7e285e6c610b6204 100644 --- a/src/corelibs/U2Core/src/datatype/U2Attribute.h +++ b/src/corelibs/U2Core/src/datatype/U2Attribute.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,10 +23,6 @@ #define _U2_ATTRIBUTE_H_ #include <U2Core/U2Type.h> -#include <U2Core/U2Region.h> - -#include <QDateTime> -#include <QVector> namespace U2 { @@ -35,7 +31,7 @@ namespace U2 { /** Attribute for any top-level object record. Some name/value are supported internally and must be tracked by the system on sequence modification -*/ + */ class U2CORE_EXPORT U2Attribute : public U2Entity { public: U2Attribute(const U2DataId& o = U2DataId(), const QString& n = QString()) : objectId(o), version(0), name(n) {} @@ -77,7 +73,7 @@ public: }; /** Byte array attribute */ -class U2CORE_EXPORT U2ByteArrayAttribute: public U2Attribute { +class U2CORE_EXPORT U2ByteArrayAttribute : public U2Attribute { public: U2ByteArrayAttribute(const U2DataId& o = U2DataId(), const QString& n = QString(), const QByteArray& val = QByteArray()) : U2Attribute(o, n), value(val) {} diff --git a/src/corelibs/U2Core/src/datatype/U2CoreAttributes.cpp b/src/corelibs/U2Core/src/datatype/U2CoreAttributes.cpp index d6fcff1867b96277be66e5ea878733b7344b5b6e..b31923f84cee99b83103715d28a45a305de41e96 100644 --- a/src/corelibs/U2Core/src/datatype/U2CoreAttributes.cpp +++ b/src/corelibs/U2Core/src/datatype/U2CoreAttributes.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,8 +19,6 @@ * MA 02110-1301, USA. */ -#include <QStringList> - #include "U2CoreAttributes.h" namespace U2 { diff --git a/src/corelibs/U2Core/src/datatype/U2CoreAttributes.h b/src/corelibs/U2Core/src/datatype/U2CoreAttributes.h index 721151e1a2bd062c218f99ba40d5abc7e17051f8..adc62ab0633025ada7a0bc08c1f6532291e87974 100644 --- a/src/corelibs/U2Core/src/datatype/U2CoreAttributes.h +++ b/src/corelibs/U2Core/src/datatype/U2CoreAttributes.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2Feature.h b/src/corelibs/U2Core/src/datatype/U2Feature.h index 35cc9025bf0b89f8c6a6828a76a08d2f61423c34..0ee516b37cf53b3f849586904c466336422e9f04 100644 --- a/src/corelibs/U2Core/src/datatype/U2Feature.h +++ b/src/corelibs/U2Core/src/datatype/U2Feature.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,10 +22,6 @@ #ifndef _U2_FEATURE_H_ #define _U2_FEATURE_H_ -#include <QSharedData> -#include <QStringList> -#include <QVector> - #include <U2Core/U2FeatureType.h> #include <U2Core/U2Region.h> #include <U2Core/U2Type.h> @@ -34,13 +30,11 @@ namespace U2 { class U2CORE_EXPORT U2AnnotationTable : public U2Object { public: - U2AnnotationTable( ) : U2Object( ) - { + U2AnnotationTable() : U2Object() { } - U2AnnotationTable( const U2DataId &id, const QString &dbId, qint64 version ) - : U2Object( id, dbId, version ) - { + U2AnnotationTable(const U2DataId &id, const QString &dbId, qint64 version) + : U2Object(id, dbId, version) { } @@ -53,13 +47,12 @@ public: /** Feature location */ class U2CORE_EXPORT U2FeatureLocation { public: - U2FeatureLocation( ) { + U2FeatureLocation() { } - U2FeatureLocation( const U2Strand &strand_, const U2Region & region_ ) - : strand( strand_ ), region( region_ ) - { + U2FeatureLocation(const U2Strand &strand_, const U2Region & region_) + : strand(strand_), region(region_) { } @@ -71,7 +64,7 @@ public: bool operator==(const U2FeatureLocation& l) const; - bool operator!=(const U2FeatureLocation& l) const {return !(*this == l);} + bool operator!=(const U2FeatureLocation& l) const { return !(*this == l); } }; inline bool U2FeatureLocation::operator==(const U2FeatureLocation& l) const { @@ -101,13 +94,12 @@ public: U2Feature() : featureClass(Annotation), - featureType(U2FeatureTypes::Invalid) - { + featureType(U2FeatureTypes::Invalid) { } - bool operator== ( const U2Feature &f ) const { return f.id == id; } - bool operator!= ( const U2Feature &f ) const { return !( *this == f ); } + bool operator== (const U2Feature &f) const { return f.id == id; } + bool operator!= (const U2Feature &f) const { return !(*this == f); } /** * Sequence this annotation is related to */ @@ -142,29 +134,28 @@ typedef QFlags<U2Feature::FeatureClass> FeatureFlags; */ class U2CORE_EXPORT U2FeatureKey { public: - U2FeatureKey( ) { + U2FeatureKey() { } /** * Constructs new feature key instance with key and value set */ - U2FeatureKey( const QString &_name, const QString &_value) - : name( _name ), value( _value ) - { + U2FeatureKey(const QString &_name, const QString &_value) + : name(_name), value(_value) { } /** * Feature key is valid if its name is not empty */ - bool isValid( ) const { return !name.isEmpty( ); } + bool isValid() const { return !name.isEmpty(); } /** * Any two keys are equal if their names & values are equal */ - bool operator== ( const U2FeatureKey &k ) const { return k.name == name && k.value == value; } + bool operator== (const U2FeatureKey &k) const { return k.name == name && k.value == value; } /** * Any two keys are not equal if either their names or values are not equal */ - bool operator!= ( const U2FeatureKey &k ) const { return !( *this == k ); } + bool operator!= (const U2FeatureKey &k) const { return !(*this == k); } /** * Feature key name diff --git a/src/corelibs/U2Core/src/datatype/U2FeatureKeys.h b/src/corelibs/U2Core/src/datatype/U2FeatureKeys.h index 6fc09d037490bff4597ce31eb6dd6eb4b6cc671c..41b873b67b4bf40c4cb0cc8b1b67ecee02d89c6d 100644 --- a/src/corelibs/U2Core/src/datatype/U2FeatureKeys.h +++ b/src/corelibs/U2Core/src/datatype/U2FeatureKeys.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2FeatureType.cpp b/src/corelibs/U2Core/src/datatype/U2FeatureType.cpp index cfc3db7f34828d9613bd3646aa380feffa5be31a..ae7a04afd535126037015b7db958a52624e58a4d 100644 --- a/src/corelibs/U2Core/src/datatype/U2FeatureType.cpp +++ b/src/corelibs/U2Core/src/datatype/U2FeatureType.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2FeatureType.h b/src/corelibs/U2Core/src/datatype/U2FeatureType.h index d4a169aa9b3a20e0c4d0c857ab15b4a024959425..632868f7a7b0b1ac9c158f6e16f44d262b87a5ef 100644 --- a/src/corelibs/U2Core/src/datatype/U2FeatureType.h +++ b/src/corelibs/U2Core/src/datatype/U2FeatureType.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2IdTypes.h b/src/corelibs/U2Core/src/datatype/U2IdTypes.h index 46d5a4cfe146f29a6ef61e220df630dccfdfe79a..b56d10520f93e48872b2753c1f6f419c55625be3 100644 --- a/src/corelibs/U2Core/src/datatype/U2IdTypes.h +++ b/src/corelibs/U2Core/src/datatype/U2IdTypes.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2Identity.h b/src/corelibs/U2Core/src/datatype/U2Identity.h index 43f681e69da852d3c71116009e6ef53e527beb6b..b4076c610c23226d2133997fbd6c971491d8aa9c 100644 --- a/src/corelibs/U2Core/src/datatype/U2Identity.h +++ b/src/corelibs/U2Core/src/datatype/U2Identity.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2Location.h b/src/corelibs/U2Core/src/datatype/U2Location.h index c72356c83c6feb8f1bfd97e906cf37aaf5e54fd6..b5b04f7b20fe0572184520a4dbf2728d5a699f63 100644 --- a/src/corelibs/U2Core/src/datatype/U2Location.h +++ b/src/corelibs/U2Core/src/datatype/U2Location.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2Mca.cpp b/src/corelibs/U2Core/src/datatype/U2Mca.cpp index bf438d37ac2325ad4f96e07965bf650ed9804372..5ea17603ebdc0815042cd8005016d141cc36e12c 100644 --- a/src/corelibs/U2Core/src/datatype/U2Mca.cpp +++ b/src/corelibs/U2Core/src/datatype/U2Mca.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2Mca.h b/src/corelibs/U2Core/src/datatype/U2Mca.h index bc0f985ecd88d688b147b28784bb60e3af6368df..c27d11297760ccdfbb7656f659c081da5ac87c65 100644 --- a/src/corelibs/U2Core/src/datatype/U2Mca.h +++ b/src/corelibs/U2Core/src/datatype/U2Mca.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2Mod.cpp b/src/corelibs/U2Core/src/datatype/U2Mod.cpp index a9b1220d35a5a5f36a3bb827cad4d9bad719ba9f..bd5a2ce4802f70f8026c4e04d391488571f91a88 100644 --- a/src/corelibs/U2Core/src/datatype/U2Mod.cpp +++ b/src/corelibs/U2Core/src/datatype/U2Mod.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2Mod.h b/src/corelibs/U2Core/src/datatype/U2Mod.h index d22a47bea7341500059bd8171170c2aa68e66dff..48f31d22a09a9f1b15dc0c97d60a797e243e4369 100644 --- a/src/corelibs/U2Core/src/datatype/U2Mod.h +++ b/src/corelibs/U2Core/src/datatype/U2Mod.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2Msa.cpp b/src/corelibs/U2Core/src/datatype/U2Msa.cpp index 5c3bf4063b554f52b6c7cef838c2f79186914f32..1af35716ca8979e402ea23c643d664979a837ed9 100644 --- a/src/corelibs/U2Core/src/datatype/U2Msa.cpp +++ b/src/corelibs/U2Core/src/datatype/U2Msa.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2Msa.h b/src/corelibs/U2Core/src/datatype/U2Msa.h index 056275cf7718d28410bfeba0aaa3e788dc546ef3..b0425b71890431bd525148999be10378f0f82a59 100644 --- a/src/corelibs/U2Core/src/datatype/U2Msa.h +++ b/src/corelibs/U2Core/src/datatype/U2Msa.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2Qualifier.cpp b/src/corelibs/U2Core/src/datatype/U2Qualifier.cpp index 97825a436ef86e93e94925c6322c0fe8778acbee..8389c2612e898cad401820a3fb56b9a0797cb3e9 100644 --- a/src/corelibs/U2Core/src/datatype/U2Qualifier.cpp +++ b/src/corelibs/U2Core/src/datatype/U2Qualifier.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -20,22 +20,19 @@ */ #include <U2Core/TextUtils.h> -#include <U2Core/U2SafePoints.h> #include "U2Qualifier.h" namespace U2 { -U2Qualifier::U2Qualifier() -{ +U2Qualifier::U2Qualifier() { } U2Qualifier::U2Qualifier(const QString &name, const QString &value) : name(name), - value(value) -{ -// SAFE_POINT(isValid(), "An attempt to create an invalid qualifier", ); + value(value) { + // SAFE_POINT(isValid(), "An attempt to create an invalid qualifier", ); } bool U2Qualifier::isValid() const { @@ -51,7 +48,7 @@ bool U2Qualifier::operator!=(const U2Qualifier &q) const { } bool U2Qualifier::isValidQualifierName(const QString &name) { - return !name.isEmpty() && name.length() <= 20 && TextUtils::fits(TextUtils::QUALIFIER_NAME_CHARS, name.toLocal8Bit().data(), name.length()); + return !name.isEmpty() && TextUtils::fits(TextUtils::QUALIFIER_NAME_CHARS, name.toLocal8Bit().data(), name.length()); } bool U2Qualifier::isValidQualifierValue(const QString &) { diff --git a/src/corelibs/U2Core/src/datatype/U2Qualifier.h b/src/corelibs/U2Core/src/datatype/U2Qualifier.h index 606f82eba8768b38a14d483d316afbb7e7b30069..4e2b94488ccf6b826975ed10d611ac3ef2712c60 100644 --- a/src/corelibs/U2Core/src/datatype/U2Qualifier.h +++ b/src/corelibs/U2Core/src/datatype/U2Qualifier.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2Range.h b/src/corelibs/U2Core/src/datatype/U2Range.h index ebac9eec0786240cbbdfd4f30221bff9ae3c3f73..f51130c8b45139386a68c62e8cbdf9b3a7f5d5a0 100644 --- a/src/corelibs/U2Core/src/datatype/U2Range.h +++ b/src/corelibs/U2Core/src/datatype/U2Range.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2RawData.h b/src/corelibs/U2Core/src/datatype/U2RawData.h index 74e0aa5bbcecd3902ff21baeb2ea87340b75294d..2a82e5f6149ff569092d710d468df0884f1e5c8f 100644 --- a/src/corelibs/U2Core/src/datatype/U2RawData.h +++ b/src/corelibs/U2Core/src/datatype/U2RawData.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2Region.cpp b/src/corelibs/U2Core/src/datatype/U2Region.cpp index 9ae4106dfd7037881c7f4b6ebd0500fa91a0e5d8..33df3885f26ca92ec4d04c8f82847279036f818f 100644 --- a/src/corelibs/U2Core/src/datatype/U2Region.cpp +++ b/src/corelibs/U2Core/src/datatype/U2Region.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2Region.h b/src/corelibs/U2Core/src/datatype/U2Region.h index ff086c0566147ee3a941ab4483ab8ed3ca99b8a9..bc25e11ba38a80b0c8b6d217b1757ee9b98b029c 100644 --- a/src/corelibs/U2Core/src/datatype/U2Region.h +++ b/src/corelibs/U2Core/src/datatype/U2Region.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2Sequence.h b/src/corelibs/U2Core/src/datatype/U2Sequence.h index c820048e79f4955f27a7c6f36c3ef7dd651e0a3b..b9eefcbd7fc87a70c07e90a1a2d7ab7fe74481f7 100644 --- a/src/corelibs/U2Core/src/datatype/U2Sequence.h +++ b/src/corelibs/U2Core/src/datatype/U2Sequence.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,7 +23,6 @@ #define _U2_SEQUENCE_H_ #include <U2Core/U2Type.h> -#include <U2Core/U2Region.h> #include <U2Core/U2Alphabet.h> namespace U2 { @@ -31,11 +30,11 @@ namespace U2 { /** Sequence representation. 'Length' field contains the overall length of all sequence parts. -*/ + */ class U2CORE_EXPORT U2Sequence : public U2Object { public: - U2Sequence() : length (0), circular(false){} - U2Sequence(const U2DataId& id, const QString& dbId, qint64 version) : U2Object(id, dbId, version), length(0){} + U2Sequence() : length(0), circular(false) {} + U2Sequence(const U2DataId& id, const QString& dbId, qint64 version) : U2Object(id, dbId, version), length(0) {} /** Sequence alphabet id */ U2AlphabetId alphabet; diff --git a/src/corelibs/U2Core/src/datatype/U2Type.cpp b/src/corelibs/U2Core/src/datatype/U2Type.cpp index d5f251b258fc84dbdbdf878912ee65fe1162152b..7c836e793025d2f1f4edfe301a5b0ef96d7aa9e0 100644 --- a/src/corelibs/U2Core/src/datatype/U2Type.cpp +++ b/src/corelibs/U2Core/src/datatype/U2Type.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,8 +19,6 @@ * MA 02110-1301, USA. */ -#include <QDataStream> - #include "U2Type.h" namespace U2 { @@ -30,39 +28,37 @@ namespace U2 { ////////////////////////////////////////////////////////////////////////// U2Entity::U2Entity(const U2DataId &id) - : id(id) -{ + : id(id) { } -U2Entity::U2Entity( const U2Entity &other ) - : id( other.id ) -{ +U2Entity::U2Entity(const U2Entity &other) + : id(other.id) { } -U2Entity::~U2Entity( ) { +U2Entity::~U2Entity() { } -bool U2Entity::hasValidId( ) const { - return !id.isEmpty( ); +bool U2Entity::hasValidId() const { + return !id.isEmpty(); } -U2Entity U2Entity::operator =( const U2Entity &other ) { +U2Entity U2Entity::operator =(const U2Entity &other) { id = other.id; return *this; } -bool U2Entity::operator ==( const U2Entity &other ) const { +bool U2Entity::operator ==(const U2Entity &other) const { return id == other.id; } -bool U2Entity::operator !=( const U2Entity &other ) const { +bool U2Entity::operator !=(const U2Entity &other) const { return id != other.id; } -bool U2Entity::operator <( const U2Entity &other ) const { +bool U2Entity::operator <(const U2Entity &other) const { return id < other.id; } @@ -71,8 +67,7 @@ bool U2Entity::operator <( const U2Entity &other ) const { ////////////////////////////////////////////////////////////////////////// U2DbiRef::U2DbiRef(const U2DbiFactoryId &dbiFactoryId, const U2DbiId &dbiId) - : dbiFactoryId(dbiFactoryId), dbiId(dbiId) -{ + : dbiFactoryId(dbiFactoryId), dbiId(dbiId) { } @@ -108,14 +103,12 @@ QDataStream & operator >>(QDataStream &in, U2DbiRef &dbiRef) { ////////////////////////////////////////////////////////////////////////// U2EntityRef::U2EntityRef() - : version(0) -{ + : version(0) { } U2EntityRef::U2EntityRef(const U2DbiRef &dbiRef, const U2DataId &entityId) - : dbiRef(dbiRef), entityId(entityId), version(0) -{ + : dbiRef(dbiRef), entityId(entityId), version(0) { } diff --git a/src/corelibs/U2Core/src/datatype/U2Type.h b/src/corelibs/U2Core/src/datatype/U2Type.h index c25187d5a534b2bbc57e55c5134dbc37df1e6e3d..ac20db700963c98d6926de794c68dfc3edb0df22 100644 --- a/src/corelibs/U2Core/src/datatype/U2Type.h +++ b/src/corelibs/U2Core/src/datatype/U2Type.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2TypeIds.h b/src/corelibs/U2Core/src/datatype/U2TypeIds.h index 0d0ce4c25e783724224e2b1365f715b440e89c9e..50b6a638a1048183f10cbd1dcab2ec0717d8f2a4 100644 --- a/src/corelibs/U2Core/src/datatype/U2TypeIds.h +++ b/src/corelibs/U2Core/src/datatype/U2TypeIds.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2Variant.cpp b/src/corelibs/U2Core/src/datatype/U2Variant.cpp index 24d9c7aa30b8c6579e8f3d5fdd79490085da3fe0..e70e568b9bbb394a9b1c6d49ae41a7c72c663d1e 100644 --- a/src/corelibs/U2Core/src/datatype/U2Variant.cpp +++ b/src/corelibs/U2Core/src/datatype/U2Variant.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/U2Variant.h b/src/corelibs/U2Core/src/datatype/U2Variant.h index aa8be7c714f3e734f33cc5012054412a1f2b02ac..4813705f013b0ff8bfee3bd8eaf9810f599fef03 100644 --- a/src/corelibs/U2Core/src/datatype/U2Variant.h +++ b/src/corelibs/U2Core/src/datatype/U2Variant.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/UdrRecord.cpp b/src/corelibs/U2Core/src/datatype/UdrRecord.cpp index 6ec7cc5ae12f61a761726d07ef0d7f854009adde..b7863afc627004ec7fa38b8e133aa934b130389c 100644 --- a/src/corelibs/U2Core/src/datatype/UdrRecord.cpp +++ b/src/corelibs/U2Core/src/datatype/UdrRecord.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/UdrRecord.h b/src/corelibs/U2Core/src/datatype/UdrRecord.h index 6c64fa7d2a11d16cbc23478a7a8bb8e60e114e8f..b8e29f6b4068ac973b3c4e0a6cc3280ef206604c 100644 --- a/src/corelibs/U2Core/src/datatype/UdrRecord.h +++ b/src/corelibs/U2Core/src/datatype/UdrRecord.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/UdrSchema.cpp b/src/corelibs/U2Core/src/datatype/UdrSchema.cpp index 66a2b33ce92e522e543c0846e6d7fca26de6f3f9..27f83cf5d2db508dab202029166b9fb88c913c3c 100644 --- a/src/corelibs/U2Core/src/datatype/UdrSchema.cpp +++ b/src/corelibs/U2Core/src/datatype/UdrSchema.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/UdrSchema.h b/src/corelibs/U2Core/src/datatype/UdrSchema.h index ae0d49d6495fdb19b5cb4107e0d369fda2b6070f..d4a6286997ba902f64c4210af0d6427fd9348912 100644 --- a/src/corelibs/U2Core/src/datatype/UdrSchema.h +++ b/src/corelibs/U2Core/src/datatype/UdrSchema.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,7 +23,6 @@ #define _U2_UDRSCHEMA_H_ #include <U2Core/U2OpStatus.h> -#include <U2Core/U2Type.h> namespace U2 { diff --git a/src/corelibs/U2Core/src/datatype/UdrSchemaRegistry.cpp b/src/corelibs/U2Core/src/datatype/UdrSchemaRegistry.cpp index 7350c6e34500525b7d9895be4c4258e6bb535651..6fb9f76871ca622d1c32cc53124006577c305f62 100644 --- a/src/corelibs/U2Core/src/datatype/UdrSchemaRegistry.cpp +++ b/src/corelibs/U2Core/src/datatype/UdrSchemaRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/UdrSchemaRegistry.h b/src/corelibs/U2Core/src/datatype/UdrSchemaRegistry.h index a02e91568b61a3aad9b5d091e8450b446b556ac6..9ba3ad8fe873643482c9fd2fe32a16bad01286fb 100644 --- a/src/corelibs/U2Core/src/datatype/UdrSchemaRegistry.h +++ b/src/corelibs/U2Core/src/datatype/UdrSchemaRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/Vector3D.cpp b/src/corelibs/U2Core/src/datatype/Vector3D.cpp index 8f58d101076e6d630f145e826126457ce16fbbfc..9c6f290f254553356e43cd5f2e76034061c88bfb 100644 --- a/src/corelibs/U2Core/src/datatype/Vector3D.cpp +++ b/src/corelibs/U2Core/src/datatype/Vector3D.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,6 +19,8 @@ * MA 02110-1301, USA. */ +#include <math.h> + #include "Vector3D.h" #include <U2Core/Matrix44.h> diff --git a/src/corelibs/U2Core/src/datatype/Vector3D.h b/src/corelibs/U2Core/src/datatype/Vector3D.h index 574c37990ad747e53f14f1dc850e2faee13320f2..70d65708dc4e29bb737f8f6bfa8bd32456b9077d 100644 --- a/src/corelibs/U2Core/src/datatype/Vector3D.h +++ b/src/corelibs/U2Core/src/datatype/Vector3D.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,11 +23,9 @@ #define _U2_VECTOR_MATH_H_ #include <QtGlobal> -#include <math.h> #include <U2Core/global.h> -namespace U2 -{ +namespace U2 { class Matrix44; diff --git a/src/corelibs/U2Core/src/datatype/msa/MaStateCheck.cpp b/src/corelibs/U2Core/src/datatype/msa/MaStateCheck.cpp index e989355b9729e57a2648e86336c1006efa44ed50..5591ca74d818f2e37d8675638c3dd0b1bdad4984 100644 --- a/src/corelibs/U2Core/src/datatype/msa/MaStateCheck.cpp +++ b/src/corelibs/U2Core/src/datatype/msa/MaStateCheck.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/msa/MaStateCheck.h b/src/corelibs/U2Core/src/datatype/msa/MaStateCheck.h index 4d1860daecee0d55c4824d0bfdb2c97ea69932d7..1a5886c741ae9ac628a651f688eb2d20a4069873 100644 --- a/src/corelibs/U2Core/src/datatype/msa/MaStateCheck.h +++ b/src/corelibs/U2Core/src/datatype/msa/MaStateCheck.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/msa/MultipleAlignment.cpp b/src/corelibs/U2Core/src/datatype/msa/MultipleAlignment.cpp index 3de9b65f715027f27e3a4f03cdb8ece341619f64..c7b84fb162b8deb6dea88e335a98b5835b69faf7 100644 --- a/src/corelibs/U2Core/src/datatype/msa/MultipleAlignment.cpp +++ b/src/corelibs/U2Core/src/datatype/msa/MultipleAlignment.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/msa/MultipleAlignment.h b/src/corelibs/U2Core/src/datatype/msa/MultipleAlignment.h index 36f9048453d968617b05c970e51801a89c4c3ff6..a695ba6678890bb84cf7e203b674b70d2f84a082 100644 --- a/src/corelibs/U2Core/src/datatype/msa/MultipleAlignment.h +++ b/src/corelibs/U2Core/src/datatype/msa/MultipleAlignment.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,8 +24,6 @@ #include <QVariantMap> -#include <U2Core/U2Region.h> - #include "MultipleAlignmentRow.h" namespace U2 { @@ -82,15 +80,15 @@ protected: * The name must be provided if this is not default alignment. */ MultipleAlignmentData(const QString &name = QString(), - const DNAAlphabet *alphabet = NULL, - const QList<MultipleAlignmentRow> &rows = QList<MultipleAlignmentRow>()); + const DNAAlphabet *alphabet = NULL, + const QList<MultipleAlignmentRow> &rows = QList<MultipleAlignmentRow>()); MultipleAlignmentData(const MultipleAlignmentData &multipleAlignment); public: virtual ~MultipleAlignmentData(); // TODO: marked to remove (if it is not used) -// const MultipleAlignmentData & operator=(const MultipleAlignmentData &other); + // const MultipleAlignmentData & operator=(const MultipleAlignmentData &other); /** * Clears the alignment. Makes alignment length == 0. diff --git a/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentInfo.cpp b/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentInfo.cpp index 120dcd56d5334598f25086f6cb06cdde3777a860..550dccfed98eb18c7e9a7ad7e2b400fce11d81ca 100644 --- a/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentInfo.cpp +++ b/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentInfo.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentInfo.h b/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentInfo.h index 7c34d8cf3c821f5d9ed62f1eda6e351d4fde506f..96ed842d3e85fec139f10a14109ae08417d9f8cb 100644 --- a/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentInfo.h +++ b/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentInfo.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentRow.cpp b/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentRow.cpp index 00cdd23420fa35654645ff2992b817d6f7689721..40eed4a1af8e6609836f3637bdf9318d7156b891 100644 --- a/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentRow.cpp +++ b/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentRow.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentRow.h b/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentRow.h index 107ea0be23bd8cf93db594bf2be3063a4aaedb29..c46d1da4218f2bb4f724dab43faab8c184fadc0e 100644 --- a/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentRow.h +++ b/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentRow.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentRowInfo.cpp b/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentRowInfo.cpp index 82355f3a73e731dfb945fe129f7f4f1eaf1b5ed1..3f13e9f85429ae4fa9a65a359816fbbdb109ebeb 100644 --- a/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentRowInfo.cpp +++ b/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentRowInfo.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentRowInfo.h b/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentRowInfo.h index eb30040e2e2b9e1ad12a0885b1b9dbc1d1a7025f..5af35f8c6ea0f88de0759d17c30fe17be691e325 100644 --- a/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentRowInfo.h +++ b/src/corelibs/U2Core/src/datatype/msa/MultipleAlignmentRowInfo.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/msa/MultipleChromatogramAlignment.cpp b/src/corelibs/U2Core/src/datatype/msa/MultipleChromatogramAlignment.cpp index e209765265a86e7bfc519643464c1752f84ab278..3488f80070c0d2494582644fefcaaacc4cec510d 100644 --- a/src/corelibs/U2Core/src/datatype/msa/MultipleChromatogramAlignment.cpp +++ b/src/corelibs/U2Core/src/datatype/msa/MultipleChromatogramAlignment.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,7 +24,6 @@ #include <QSet> #include <U2Core/McaRowInnerData.h> -#include <U2Core/MsaRowUtils.h> #include <U2Core/U2OpStatusUtils.h> #include <U2Core/U2SafePoints.h> @@ -35,26 +34,22 @@ namespace U2 { MultipleChromatogramAlignment::MultipleChromatogramAlignment() - : MultipleAlignment(new MultipleChromatogramAlignmentData()) -{ + : MultipleAlignment(new MultipleChromatogramAlignmentData()) { } MultipleChromatogramAlignment::MultipleChromatogramAlignment(const MultipleAlignment &ma) - : MultipleAlignment(ma) -{ + : MultipleAlignment(ma) { SAFE_POINT(NULL != maData.dynamicCast<MultipleChromatogramAlignmentData>(), "Can't cast MultipleAlignment to MultipleChromatogramAlignment", ); } MultipleChromatogramAlignment::MultipleChromatogramAlignment(MultipleChromatogramAlignmentData *mcaData) - : MultipleAlignment(mcaData) -{ + : MultipleAlignment(mcaData) { } MultipleChromatogramAlignment::MultipleChromatogramAlignment(const QString &name, const DNAAlphabet *alphabet, const QList<MultipleChromatogramAlignmentRow> &rows) - : MultipleAlignment(new MultipleChromatogramAlignmentData(name, alphabet, rows)) -{ + : MultipleAlignment(new MultipleChromatogramAlignmentData(name, alphabet, rows)) { } @@ -90,7 +85,7 @@ namespace { QList<MultipleAlignmentRow> convertToMaRows(const QList<MultipleChromatogramAlignmentRow> &mcaRows) { QList<MultipleAlignmentRow> maRows; - foreach (const MultipleChromatogramAlignmentRow &mcaRow, mcaRows) { + foreach(const MultipleChromatogramAlignmentRow &mcaRow, mcaRows) { maRows << mcaRow; } return maRows; @@ -99,14 +94,12 @@ QList<MultipleAlignmentRow> convertToMaRows(const QList<MultipleChromatogramAlig } MultipleChromatogramAlignmentData::MultipleChromatogramAlignmentData(const QString &name, const DNAAlphabet *alphabet, const QList<MultipleChromatogramAlignmentRow> &rows) - : MultipleAlignmentData(name, alphabet, convertToMaRows(rows)) -{ + : MultipleAlignmentData(name, alphabet, convertToMaRows(rows)) { } MultipleChromatogramAlignmentData::MultipleChromatogramAlignmentData(const MultipleChromatogramAlignmentData &mcaData) - : MultipleAlignmentData() -{ + : MultipleAlignmentData() { copy(mcaData); } @@ -125,11 +118,11 @@ bool MultipleChromatogramAlignmentData::trim(bool removeLeadingGaps) { bool result = false; - if ( removeLeadingGaps ) { + if (removeLeadingGaps) { // Verify if there are leading columns of gaps // by checking the first gap in each row qint64 leadingGapColumnsNum = 0; - foreach (const MultipleChromatogramAlignmentRow &row, rows) { + foreach(const MultipleChromatogramAlignmentRow &row, rows) { if (row->getGapModel().count() > 0) { const U2MsaGap firstGap = row->getGapModel().first(); if (firstGap.offset > 0) { @@ -161,7 +154,7 @@ bool MultipleChromatogramAlignmentData::trim(bool removeLeadingGaps) { // Verify right side of the alignment (trailing gaps and rows' lengths) qint64 newLength = 0; - foreach (const MultipleChromatogramAlignmentRow &row, rows) { + foreach(const MultipleChromatogramAlignmentRow &row, rows) { if (newLength == 0) { newLength = row->getRowLengthWithoutTrailing(); } else { @@ -197,7 +190,7 @@ bool MultipleChromatogramAlignmentData::simplify() { } bool MultipleChromatogramAlignmentData::hasEmptyGapModel() const { - foreach (const MultipleChromatogramAlignmentRow &row, rows) { + foreach(const MultipleChromatogramAlignmentRow &row, rows) { if (!row->getGapModel().isEmpty()) { return false; } @@ -220,16 +213,16 @@ bool MultipleChromatogramAlignmentData::hasEqualLength() const { MultipleChromatogramAlignment MultipleChromatogramAlignmentData::mid(int start, int len) const { SAFE_POINT(start >= 0 && start + len <= length, - QString("Incorrect parameters were passed to MultipleChromatogramAlignmentData::mid: " - "start '%1', len '%2', the alignment length is '%3'").arg(start).arg(len).arg(length), - MultipleChromatogramAlignment()); + QString("Incorrect parameters were passed to MultipleChromatogramAlignmentData::mid: " + "start '%1', len '%2', the alignment length is '%3'").arg(start).arg(len).arg(length), + MultipleChromatogramAlignment()); MultipleChromatogramAlignment res(getName(), alphabet); MaStateCheck check(res.data()); Q_UNUSED(check); U2OpStatus2Log os; - foreach (const MultipleChromatogramAlignmentRow &row, rows) { + foreach(const MultipleChromatogramAlignmentRow &row, rows) { MultipleChromatogramAlignmentRow mRow = row->mid(start, len, os); mRow->setParentAlignment(res); res->rows << mRow; @@ -271,7 +264,7 @@ bool MultipleChromatogramAlignmentData::operator!=(const MultipleChromatogramAli bool MultipleChromatogramAlignmentData::crop(const U2Region ®ion, const QSet<QString> &rowNames, U2OpStatus &os) { if (!(region.startPos >= 0 && region.length > 0 && region.length < length && region.startPos < length)) { os.setError(QString("Incorrect region was passed to MultipleChromatogramAlignmentData::crop, " - "startPos '%1', length '%2'").arg(region.startPos).arg(region.length)); + "startPos '%1', length '%2'").arg(region.startPos).arg(region.length)); return false; } @@ -284,10 +277,10 @@ bool MultipleChromatogramAlignmentData::crop(const U2Region ®ion, const QSet< Q_UNUSED(check); QList<MultipleChromatogramAlignmentRow> newList; - for (int i = 0 ; i < rows.size(); i++) { + for (int i = 0; i < rows.size(); i++) { MultipleChromatogramAlignmentRow row = getMcaRow(i).clone(); const QString rowName = row->getName(); - if (rowNames.contains(rowName)){ + if (rowNames.contains(rowName)) { row->crop(os, region.startPos, cropLen); CHECK_OP(os, false); newList << row; @@ -327,7 +320,7 @@ MultipleChromatogramAlignmentRow MultipleChromatogramAlignmentData::createRow(co } int length = sequence.length(); - foreach (const U2MsaGap &gap, gaps) { + foreach(const U2MsaGap &gap, gaps) { if (gap.offset > length || !gap.isValid()) { coreLog.trace("Incorrect gap model was passed to MultipleChromatogramAlignmentData::createRow"); os.setError(errorDescr); @@ -369,7 +362,7 @@ void MultipleChromatogramAlignmentData::addRow(const QString &name, const DNAChr CHECK_OP(os, ); int len = sequence.length(); - foreach (const U2MsaGap &gap, gaps) { + foreach(const U2MsaGap &gap, gaps) { len += gap.gap; } @@ -443,10 +436,10 @@ void MultipleChromatogramAlignmentData::appendChars(int row, qint64 afterPos, co void MultipleChromatogramAlignmentData::removeRegion(int startPos, int startRow, int nBases, int nRows, bool removeEmptyRows) { SAFE_POINT(startPos >= 0 && startPos + nBases <= length && nBases > 0, QString("Incorrect parameters were passed to MultipleChromatogramAlignmentData::removeRegion: startPos '%1', " - "nBases '%2', the length is '%3'").arg(startPos).arg(nBases).arg(length),); + "nBases '%2', the length is '%3'").arg(startPos).arg(nBases).arg(length), ); SAFE_POINT(startRow >= 0 && startRow + nRows <= getNumRows() && nRows > 0, QString("Incorrect parameters were passed to MultipleChromatogramAlignmentData::removeRegion: startRow '%1', " - "nRows '%2', the number of rows is '%3'").arg(startRow).arg(nRows).arg(getNumRows()),); + "nRows '%2', the number of rows is '%3'").arg(startRow).arg(nRows).arg(getNumRows()), ); MaStateCheck check(this); Q_UNUSED(check); @@ -564,7 +557,7 @@ bool MultipleChromatogramAlignmentData::sortRowsBySimilarity(QVector<U2Region> & const QList<MultipleChromatogramAlignmentRow> MultipleChromatogramAlignmentData::getMcaRows() const { QList<MultipleChromatogramAlignmentRow> mcaRows; - foreach (const MultipleAlignmentRow &maRow, rows) { + foreach(const MultipleAlignmentRow &maRow, rows) { mcaRows << maRow.dynamicCast<MultipleChromatogramAlignmentRow>(); } return mcaRows; diff --git a/src/corelibs/U2Core/src/datatype/msa/MultipleChromatogramAlignment.h b/src/corelibs/U2Core/src/datatype/msa/MultipleChromatogramAlignment.h index 094e2dfad00ed4b2e01336786219bc8669d91be1..2a2ff0ba1a4304322a5b1fba4082d72372e33052 100644 --- a/src/corelibs/U2Core/src/datatype/msa/MultipleChromatogramAlignment.h +++ b/src/corelibs/U2Core/src/datatype/msa/MultipleChromatogramAlignment.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/msa/MultipleChromatogramAlignmentRow.cpp b/src/corelibs/U2Core/src/datatype/msa/MultipleChromatogramAlignmentRow.cpp index 5cf3e7c3bbd403f83f75998776dc6b74c144d536..ed0b150bbc39f5674465c9b0beeeeb38e04567bf 100644 --- a/src/corelibs/U2Core/src/datatype/msa/MultipleChromatogramAlignmentRow.cpp +++ b/src/corelibs/U2Core/src/datatype/msa/MultipleChromatogramAlignmentRow.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/msa/MultipleChromatogramAlignmentRow.h b/src/corelibs/U2Core/src/datatype/msa/MultipleChromatogramAlignmentRow.h index 17522e2e17863a052229942a455123b60272be9f..a78f0f42844e60c3f22cfd18163c0200e65cf5b7 100644 --- a/src/corelibs/U2Core/src/datatype/msa/MultipleChromatogramAlignmentRow.h +++ b/src/corelibs/U2Core/src/datatype/msa/MultipleChromatogramAlignmentRow.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/msa/MultipleSequenceAlignment.cpp b/src/corelibs/U2Core/src/datatype/msa/MultipleSequenceAlignment.cpp index e982c3b233737c64203d160c1407c522b9ce8351..62e95c74220d531e23acd10bd697bb6e8cb52542 100644 --- a/src/corelibs/U2Core/src/datatype/msa/MultipleSequenceAlignment.cpp +++ b/src/corelibs/U2Core/src/datatype/msa/MultipleSequenceAlignment.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/msa/MultipleSequenceAlignment.h b/src/corelibs/U2Core/src/datatype/msa/MultipleSequenceAlignment.h index 4b8fa441036c62db129e2eb5fa843cce29678d84..3d2d664b38d71245df9f8c567d2a89fad927e37d 100644 --- a/src/corelibs/U2Core/src/datatype/msa/MultipleSequenceAlignment.h +++ b/src/corelibs/U2Core/src/datatype/msa/MultipleSequenceAlignment.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -37,8 +37,8 @@ class U2Region; class U2CORE_EXPORT MultipleSequenceAlignment : public MultipleAlignment { public: MultipleSequenceAlignment(const QString &name = QString(), - const DNAAlphabet *alphabet = NULL, - const QList<MultipleSequenceAlignmentRow> &rows = QList<MultipleSequenceAlignmentRow>()); + const DNAAlphabet *alphabet = NULL, + const QList<MultipleSequenceAlignmentRow> &rows = QList<MultipleSequenceAlignmentRow>()); MultipleSequenceAlignment(const MultipleAlignment &ma); MultipleSequenceAlignment(MultipleSequenceAlignmentData *msaData); @@ -72,8 +72,8 @@ protected: * The name must be provided if this is not default alignment. */ MultipleSequenceAlignmentData(const QString &name = QString(), - const DNAAlphabet *alphabet = NULL, - const QList<MultipleSequenceAlignmentRow> &rows = QList<MultipleSequenceAlignmentRow>()); + const DNAAlphabet *alphabet = NULL, + const QList<MultipleSequenceAlignmentRow> &rows = QList<MultipleSequenceAlignmentRow>()); MultipleSequenceAlignmentData(const MultipleSequenceAlignmentData &msaData); public: diff --git a/src/corelibs/U2Core/src/datatype/msa/MultipleSequenceAlignmentRow.cpp b/src/corelibs/U2Core/src/datatype/msa/MultipleSequenceAlignmentRow.cpp index d815f519599df78bfa77cdb968e6368b22d3e871..dd1b209f9b250c631f34caedb3de24afc9b57b5b 100644 --- a/src/corelibs/U2Core/src/datatype/msa/MultipleSequenceAlignmentRow.cpp +++ b/src/corelibs/U2Core/src/datatype/msa/MultipleSequenceAlignmentRow.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/msa/MultipleSequenceAlignmentRow.h b/src/corelibs/U2Core/src/datatype/msa/MultipleSequenceAlignmentRow.h index 0aad6178885d9c1ef189abdaf622596d89527a9f..60b606256f34396dbb7e00179f3aaac08c6b62a5 100644 --- a/src/corelibs/U2Core/src/datatype/msa/MultipleSequenceAlignmentRow.h +++ b/src/corelibs/U2Core/src/datatype/msa/MultipleSequenceAlignmentRow.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/udr/RawDataUdrSchema.cpp b/src/corelibs/U2Core/src/datatype/udr/RawDataUdrSchema.cpp index e2dd60c184f5cb77b56bbc87d6004b5b6323561f..0dd5cea50f0f393c8b8b77e0f880f25136a825d2 100644 --- a/src/corelibs/U2Core/src/datatype/udr/RawDataUdrSchema.cpp +++ b/src/corelibs/U2Core/src/datatype/udr/RawDataUdrSchema.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/datatype/udr/RawDataUdrSchema.h b/src/corelibs/U2Core/src/datatype/udr/RawDataUdrSchema.h index a90eb8f5578f00f0af6272f43837e84edd80390f..23e772fd9ce2fc5ee7727f4bf7812275527ad58e 100644 --- a/src/corelibs/U2Core/src/datatype/udr/RawDataUdrSchema.h +++ b/src/corelibs/U2Core/src/datatype/udr/RawDataUdrSchema.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,7 +23,6 @@ #define _U2_RAWDATAUDRSCHEMA_H_ #include <U2Core/U2RawData.h> -#include <U2Core/UdrRecord.h> #include <U2Core/UdrSchema.h> #include <U2Core/global.h> diff --git a/src/corelibs/U2Core/src/dbi/DbiConnection.cpp b/src/corelibs/U2Core/src/dbi/DbiConnection.cpp index 41f66e185ec2a0ca43e3d2d30d72916ac4ec054d..056e09a7204b433d9b8bc7457006b7c20dcd1147 100644 --- a/src/corelibs/U2Core/src/dbi/DbiConnection.cpp +++ b/src/corelibs/U2Core/src/dbi/DbiConnection.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/DbiConnection.h b/src/corelibs/U2Core/src/dbi/DbiConnection.h index 628096072fe250cc86e86904236a4bf10500f808..c7e1af7f6953ac6081e82a2f3b8f953138fa9cf2 100644 --- a/src/corelibs/U2Core/src/dbi/DbiConnection.h +++ b/src/corelibs/U2Core/src/dbi/DbiConnection.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/DbiDocumentFormat.cpp b/src/corelibs/U2Core/src/dbi/DbiDocumentFormat.cpp index 8bdd549d511c213b2ebe7d82cb6f5f734df61091..961aad77299a7a3246e349316a043f46a0c0ba3e 100644 --- a/src/corelibs/U2Core/src/dbi/DbiDocumentFormat.cpp +++ b/src/corelibs/U2Core/src/dbi/DbiDocumentFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,48 +25,43 @@ #include <U2Core/DNASequenceObject.h> #include <U2Core/GObjectUtils.h> #include <U2Core/IOAdapter.h> -#include <U2Core/U2AssemblyDbi.h> -#include <U2Core/U2DbiRegistry.h> #include <U2Core/U2DbiUtils.h> #include <U2Core/U2ObjectDbi.h> #include <U2Core/U2ObjectRelationsDbi.h> #include <U2Core/U2OpStatusUtils.h> #include <U2Core/U2SafePoints.h> -#include <U2Core/U2SequenceDbi.h> #include "DbiDocumentFormat.h" namespace U2 { DbiDocumentFormat::DbiDocumentFormat(const U2DbiFactoryId& _id, const DocumentFormatId& _formatId, - const QString& _formatName, const QStringList& exts, DocumentFormatFlags flags, QObject* p) -: DocumentFormat(p, flags, exts) -{ + const QString& _formatName, const QStringList& exts, DocumentFormatFlags flags, QObject* p) + : DocumentFormat(p, _formatId, flags, exts) { id = _id; - formatId = _formatId; formatName = _formatName; formatDescription = tr("ugenedb is a internal UGENE database file format"); supportedObjectTypes += GObjectTypes::ASSEMBLY; supportedObjectTypes += GObjectTypes::MULTIPLE_CHROMATOGRAM_ALIGNMENT; supportedObjectTypes += GObjectTypes::SEQUENCE; supportedObjectTypes += GObjectTypes::ANNOTATION_TABLE; - formatFlags|=DocumentFormatFlag_NoPack; - formatFlags|=DocumentFormatFlag_NoFullMemoryLoad; - formatFlags|=DocumentFormatFlag_DirectWriteOperations; + formatFlags |= DocumentFormatFlag_NoPack; + formatFlags |= DocumentFormatFlag_NoFullMemoryLoad; + formatFlags |= DocumentFormatFlag_DirectWriteOperations; } static void renameObjectsIfNamesEqual(QList<GObject*> & objs) { - for(int i = 0; i < objs.size(); ++i) { + for (int i = 0; i < objs.size(); ++i) { int howManyEquals = 0; - for(int j = i + 1; j < objs.size(); ++j) { - if(objs[i]->getGObjectName() == objs[j]->getGObjectName()) { + for (int j = i + 1; j < objs.size(); ++j) { + if (objs[i]->getGObjectName() == objs[j]->getGObjectName()) { objs[j]->setGObjectName(QString("%1 %2").arg(objs[j]->getGObjectName()).arg(++howManyEquals)); } } } } -Document* DbiDocumentFormat::loadDocument(IOAdapter* io, const U2DbiRef& dstDbiRef, const QVariantMap& fs, U2OpStatus& os){ +Document* DbiDocumentFormat::loadDocument(IOAdapter* io, const U2DbiRef& dstDbiRef, const QVariantMap& fs, U2OpStatus& os) { //1. open db //2. read all objects //3. if there is a DEEP_COPY_OBJECT hint, all objects are cloned to the db defined by dstDbiRef @@ -142,7 +137,7 @@ QList<GObject *> DbiDocumentFormat::prepareObjects(DbiConnection &handle, const SAFE_POINT(srcObj != NULL, "Source object is NULL", QList<GObject *>()); QList<GObjectRelation> gRelations; QList<U2ObjectRelation> relations = handle.dbi->getObjectRelationsDbi()->getObjectRelations(id, status); - foreach (const U2ObjectRelation& r, relations) { + foreach(const U2ObjectRelation& r, relations) { GObject* relatedObject = match[r.referencedObject]; if (relatedObject == NULL) { continue; @@ -164,7 +159,7 @@ QList<GObject *> DbiDocumentFormat::cloneObjects(const QList<GObject *> &srcObje int number = 0; int total = srcObjects.size(); - foreach (GObject *srcObject, srcObjects) { + foreach(GObject *srcObject, srcObjects) { U2OpStatusMapping mapping(number, (number + 1) / total); U2OpStatusChildImpl childOs(&os, mapping); GObject *clonedObject = srcObject->clone(dstDbiRef, childOs, hints); @@ -188,7 +183,7 @@ void DbiDocumentFormat::storeDocument(Document* d, IOAdapter* ioAdapter, U2OpSta QMap<GObject*, GObject*> clonedObjects; QMap<GObjectReference, GObjectReference> match; - foreach (GObject *object, d->getObjects()) { + foreach(GObject *object, d->getObjects()) { if (!supportedObjectTypes.contains(object->getGObjectType())) { continue; } @@ -204,18 +199,18 @@ void DbiDocumentFormat::storeDocument(Document* d, IOAdapter* ioAdapter, U2OpSta clonedObjects[object] = resultObject; match[GObjectReference(object, false)] = GObjectReference(url, resultObject->getGObjectName(), - resultObject->getGObjectType(), resultObject->getEntityRef()); + resultObject->getGObjectType(), resultObject->getEntityRef()); } - foreach (GObject* initialObj, clonedObjects.keys()) { - GObject* cloned = clonedObjects[initialObj]; - QList<GObjectRelation> relations; - foreach (const GObjectRelation& r, initialObj->getObjectRelations()) { - if (match.contains(r.ref)) { - relations << GObjectRelation(match[r.ref], r.role); - } - } - cloned->setObjectRelations(relations); + foreach(GObject* initialObj, clonedObjects.keys()) { + GObject* cloned = clonedObjects[initialObj]; + QList<GObjectRelation> relations; + foreach(const GObjectRelation& r, initialObj->getObjectRelations()) { + if (match.contains(r.ref)) { + relations << GObjectRelation(match[r.ref], r.role); + } + } + cloned->setObjectRelations(relations); } qDeleteAll(clonedObjects); diff --git a/src/corelibs/U2Core/src/dbi/DbiDocumentFormat.h b/src/corelibs/U2Core/src/dbi/DbiDocumentFormat.h index 0f5c0725a6d8d459f08589a97d85202eb1bad341..7413ead60ac73e0348436e0166c10e6a7f030897 100644 --- a/src/corelibs/U2Core/src/dbi/DbiDocumentFormat.h +++ b/src/corelibs/U2Core/src/dbi/DbiDocumentFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -35,10 +35,6 @@ public: DbiDocumentFormat(const U2DbiFactoryId& id, const DocumentFormatId& formatId, const QString& formatName, const QStringList& exits, DocumentFormatFlags flags, QObject* p = NULL); - virtual DocumentFormatId getFormatId() const {return formatId;} - - virtual const QString& getFormatName() const {return formatName;} - virtual void storeDocument(Document* d, IOAdapter* io, U2OpStatus& os); virtual FormatCheckResult checkRawData(const QByteArray& rawData, const GUrl& url = GUrl()) const; @@ -50,9 +46,7 @@ protected: QList<GObject *> cloneObjects(const QList<GObject *> &srcObjects, const U2DbiRef &dstDbiRef, const QVariantMap &hints, U2OpStatus &os); private: - QString formatName; U2DbiFactoryId id; - DocumentFormatId formatId; }; }//namespace diff --git a/src/corelibs/U2Core/src/dbi/U2AbstractDbi.h b/src/corelibs/U2Core/src/dbi/U2AbstractDbi.h index 90214709b18bf84a073e7507980263976cd85c0c..87b24810f3a22300103149894cc567e6c3d4cee0 100644 --- a/src/corelibs/U2Core/src/dbi/U2AbstractDbi.h +++ b/src/corelibs/U2Core/src/dbi/U2AbstractDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/U2AssemblyDbi.h b/src/corelibs/U2Core/src/dbi/U2AssemblyDbi.h index a210f2fbfc2bbbfeb638a7f0920811fb7c2c5b56..3d830a78c56e9a0cfd965cb6e232f9e541724e31 100644 --- a/src/corelibs/U2Core/src/dbi/U2AssemblyDbi.h +++ b/src/corelibs/U2Core/src/dbi/U2AssemblyDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/U2AttributeDbi.h b/src/corelibs/U2Core/src/dbi/U2AttributeDbi.h index 7e68a50873334892746e2bb691b276daf6ff219f..ff7daeb38e1dd61ff5efe0de4755c6f442b9705f 100644 --- a/src/corelibs/U2Core/src/dbi/U2AttributeDbi.h +++ b/src/corelibs/U2Core/src/dbi/U2AttributeDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/U2CrossDatabaseReferenceDbi.h b/src/corelibs/U2Core/src/dbi/U2CrossDatabaseReferenceDbi.h index 3f6c87a48cf43061c74bcaf48c1a7d2c7faec2f0..db1f463e4881bd72c3a347cb50b98651a00f1959 100644 --- a/src/corelibs/U2Core/src/dbi/U2CrossDatabaseReferenceDbi.h +++ b/src/corelibs/U2Core/src/dbi/U2CrossDatabaseReferenceDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/U2Dbi.cpp b/src/corelibs/U2Core/src/dbi/U2Dbi.cpp index 46e0ed3ec9d4ae8ced6821e86cf3eee0ad7742c6..83f0b45fde801be14e4e8fdd7552c0029ac2a9c8 100644 --- a/src/corelibs/U2Core/src/dbi/U2Dbi.cpp +++ b/src/corelibs/U2Core/src/dbi/U2Dbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/U2Dbi.h b/src/corelibs/U2Core/src/dbi/U2Dbi.h index 2582e3b91dc66e872ab206a2277416d38a041a22..0f203dc98a3219652c89f4e49c06e943de00d8b2 100644 --- a/src/corelibs/U2Core/src/dbi/U2Dbi.h +++ b/src/corelibs/U2Core/src/dbi/U2Dbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,14 +22,11 @@ #ifndef _U2_DBI_H_ #define _U2_DBI_H_ -#include <U2Core/U2Type.h> #include <U2Core/U2FormatCheckResult.h> #include <U2Core/U2Feature.h> #include <U2Core/U2Assembly.h> -#include <U2Core/U2Attribute.h> #include <U2Core/U2Mod.h> #include <U2Core/U2Msa.h> -#include <U2Core/U2Sequence.h> #include <U2Core/GUrl.h> #include <QHash> @@ -56,7 +53,7 @@ class UdrDbi; class Version; class U2CORE_EXPORT U2DbiOptions { -public : +public: /** Application version number that is supposed to be minimum version required to make use of the database */ static const QString APP_MIN_COMPATIBLE_VERSION; @@ -81,7 +78,7 @@ public : /** Operational state of the database. -*/ + */ enum U2DbiState { U2DbiState_Void = 1, U2DbiState_Starting = 2, @@ -91,72 +88,72 @@ enum U2DbiState { /** DBI feature flags -*/ + */ enum U2DbiFeature { /** DBI supports sequence reading methods */ - U2DbiFeature_ReadSequence = 1, + U2DbiFeature_ReadSequence = 1, /** DBI supports MSA reading methods */ - U2DbiFeature_ReadMsa = 2, + U2DbiFeature_ReadMsa = 2, /** DBI supports Assembly reading methods */ - U2DbiFeature_ReadAssembly = 3, + U2DbiFeature_ReadAssembly = 3, /** DBI supports sequence annotations reading methods */ - U2DbiFeature_ReadFeatures = 4, + U2DbiFeature_ReadFeatures = 4, /** DBI supports read methods for attributes */ - U2DbiFeature_ReadAttributes = 5, + U2DbiFeature_ReadAttributes = 5, /** DBI supports read methods for remote objects */ - U2DbiFeature_ReadCrossDatabaseReferences = 6, + U2DbiFeature_ReadCrossDatabaseReferences = 6, /** DBI supports readings Variants and VariantTracks */ - U2DbiFeature_ReadVariant = 7, + U2DbiFeature_ReadVariant = 7, /** DBI supports readings of custom properties */ - U2DbiFeature_ReadProperties = 8, + U2DbiFeature_ReadProperties = 8, /** DBI supports reading of objects modification tracks */ - U2DbiFeature_ReadModifications = 9, + U2DbiFeature_ReadModifications = 9, /** DBI supports UDR reading methods */ - U2DbiFeature_ReadUdr = 10, + U2DbiFeature_ReadUdr = 10, /** DBI supports reading of object relations */ - U2DbiFeature_ReadRelations = 11, + U2DbiFeature_ReadRelations = 11, /** DBI supports changing/storing sequences */ - U2DbiFeature_WriteSequence = 101, + U2DbiFeature_WriteSequence = 101, /** DBI supports changing/storing multiple sequence alignments */ - U2DbiFeature_WriteMsa = 102, + U2DbiFeature_WriteMsa = 102, /** DBI supports changing/storing assemblies */ - U2DbiFeature_WriteAssembly = 103 + U2DbiFeature_WriteAssembly = 103 /** DBI supports changing/storing sequence annotations */, - U2DbiFeature_WriteFeatures = 104, + U2DbiFeature_WriteFeatures = 104, /** DBI supports changing/storing attributes */ - U2DbiFeature_WriteAttributes = 105, + U2DbiFeature_WriteAttributes = 105, /** DBI supports cross database references */ - U2DbiFeature_WriteCrossDatabaseReferences = 106, + U2DbiFeature_WriteCrossDatabaseReferences = 106, /** DBI supports changing/storing Variants and VariantTracks */ - U2DbiFeature_WriteVariant = 107, + U2DbiFeature_WriteVariant = 107, /** DBI supports changing/storing custom properties */ - U2DbiFeature_WriteProperties = 108, + U2DbiFeature_WriteProperties = 108, /** DBI supports changing/storing of objects modification tracks */ - U2DbiFeature_WriteModifications = 109, + U2DbiFeature_WriteModifications = 109, /** DBI supports changing/storing UDR */ - U2DbiFeature_WriteUdr = 110, + U2DbiFeature_WriteUdr = 110, /** DBI supports writing of object relations */ - U2DbiFeature_WriteRelations = 111, + U2DbiFeature_WriteRelations = 111, /** DBI supports removal of objects */ - U2DbiFeature_RemoveObjects = 200, + U2DbiFeature_RemoveObjects = 200, /** DBI supports set folder modification operations */ - U2DbiFeature_ChangeFolders = 201, + U2DbiFeature_ChangeFolders = 201, /** DBI provides optimized algorithm for assembly reads packing */ - U2DbiFeature_AssemblyReadsPacking = 300, + U2DbiFeature_AssemblyReadsPacking = 300, /** DBI provides optimized algorithm for coverage calculation */ - U2DbiFeature_AssemblyCoverageStat = 301, + U2DbiFeature_AssemblyCoverageStat = 301, /** DBI provides optimized algorithm for sorting attributes */ - U2DbiFeature_AttributeSorting = 400, + U2DbiFeature_AttributeSorting = 400, /** DBI supports undo/redo of changing operations */ - U2DbiFeature_UndoRedo = 500, + U2DbiFeature_UndoRedo = 500, - U2DbiFeature_GlobalReadOnly = 600 + U2DbiFeature_GlobalReadOnly = 600 }; /** Indicates object life-cycle and storage location */ @@ -172,7 +169,7 @@ enum U2DbiObjectRank { /** DBI factory provides functions to create new DBI instances and check file content to ensure that file is a valid database file -*/ + */ class U2CORE_EXPORT U2DbiFactory { public: U2DbiFactory(); @@ -188,7 +185,7 @@ public: Checks that data pointed by properties is a valid DBI resource rawData param is used for compatibility with UGENE 1.x format detection and can be used by factory directly to check database header - */ + */ virtual FormatCheckResult isValidDbi(const QHash<QString, QString>& properties, const QByteArray& rawData, U2OpStatus& os) const = 0; virtual GUrl id2Url(const U2DbiId& id) const = 0; @@ -200,7 +197,7 @@ public: /** Database access interface. Database examples: fasta file, genbank file, BAM file, SQLite file -*/ + */ class U2CORE_EXPORT U2Dbi { public: virtual ~U2Dbi(); @@ -211,13 +208,13 @@ public: /** Boots the database up to functional state. Some property names are reserved: - 'url' - url of the DBI - 'create' - '1' or '0'- if DBI does not exist, asks to create instance if possible - 'user', 'password' - user and password to access to the DBI + 'url' - url of the DBI + 'create' - '1' or '0'- if DBI does not exist, asks to create instance if possible + 'user', 'password' - user and password to access to the DBI The 'persistentData' parameter provides database state saved from previous session in a project or workspace, if any. @see shutdown() - */ + */ virtual void init(const QHash<QString, QString>& properties, const QVariantMap& persistentData, U2OpStatus& os) = 0; /** Stops the database and frees up used resources. @@ -233,25 +230,25 @@ public: /** Ensures that dbi state is synchronized with storage Return 'true' of operation is successful - */ + */ virtual bool flush(U2OpStatus& os) = 0; /** Unique database id. Usually is an URL of the database */ virtual U2DbiId getDbiId() const = 0; /** Return factory instance for this DBI */ - virtual U2DbiFactoryId getFactoryId() const = 0; + virtual U2DbiFactoryId getFactoryId() const = 0; virtual U2DbiRef getDbiRef() const; /** Returning result specifies whether the database internal structure is ready for work, namely, the database schema is created correctly. - */ + */ virtual bool isInitialized(U2OpStatus &); /** Performs initialization of the database schema. The database is supposed to be available for use after this function returns if @os has no error. - */ + */ virtual void populateDefaultSchema(U2OpStatus &os); /** Returns all features supported by this DBI instance */ @@ -272,83 +269,83 @@ public: /** Database interface to access objects All dbi implementations must support a subset of this interface - */ + */ virtual U2ObjectDbi* getObjectDbi() = 0; /** Database interface to access object relations. - */ + */ virtual U2ObjectRelationsDbi* getObjectRelationsDbi(); /** U2Sequence related DBI routines Not NULL only if U2DbiFeature_ReadSequences supported - */ + */ virtual U2SequenceDbi* getSequenceDbi() = 0; /** U2Feature related DBI routines Not NULL only if U2DbiFeature_ReadFeatures supported - */ + */ virtual U2FeatureDbi* getFeatureDbi() = 0; /** U2Annotation related DBI routines Not NULL only if U2DbiFeature_ReadMsa supported - */ + */ virtual U2MsaDbi* getMsaDbi() = 0; /** U2Annotation related DBI routines Not NULL only if U2DbiFeature_ReadAssembly supported - */ - virtual U2AssemblyDbi* getAssemblyDbi() = 0; + */ + virtual U2AssemblyDbi* getAssemblyDbi() = 0; /** U2Attribute related DBI routines Not NULL only if U2DbiFeature_ReadAttributes supported - */ - virtual U2AttributeDbi* getAttributeDbi() = 0; + */ + virtual U2AttributeDbi* getAttributeDbi() = 0; /** U2Variant related DBI routines Not NULL only if U2DbiFeature_ReadVariants supported - */ - virtual U2VariantDbi* getVariantDbi() = 0; + */ + virtual U2VariantDbi* getVariantDbi() = 0; /** Cross database references handling routines Not NULL only if U2DbiFeature_ReadCrossDatabaseReferences supported - */ + */ virtual U2CrossDatabaseReferenceDbi* getCrossDatabaseReferenceDbi() = 0; /** U2Mod related DBI routines Not NULL only if U2DbiFeature_ReadModifications supported - */ + */ virtual U2ModDbi* getModDbi() = 0; /** UdrRecord related DBI routines Not NULL only if U2DbiFeature_ReadUdr supported - */ + */ virtual UdrDbi* getUdrDbi() = 0; /** Reads database global properties. Requires U2DbiFeature_ReadProperties support - */ + */ virtual QString getProperty(const QString& name, const QString& defaultValue, U2OpStatus& os) = 0; /** Sets database global properties. Requires U2DbiFeature_WriteProperties support - */ + */ virtual void setProperty(const QString& name, const QString& value, U2OpStatus& os) = 0; /** Initializes execution of the block of operation through the one transaction - */ + */ virtual void startOperationsBlock(U2OpStatus &os); virtual void stopOperationBlock(U2OpStatus &os); @@ -356,7 +353,7 @@ public: /** Returns a mutex that synchronizes access to internal database handler. This method is supposed to be used by caching DBIs in order to prevent cache inconsistency. */ - virtual QMutex * getDbMutex( ) const; + virtual QMutex * getDbMutex() const; virtual bool isReadOnly() const = 0; @@ -371,7 +368,7 @@ protected: /** Base class for all *Dbi classes provided by U2Dbi Contains reference to root-level dbi -*/ + */ class U2CORE_EXPORT U2ChildDbi { protected: U2ChildDbi(U2Dbi* _rootDbi); diff --git a/src/corelibs/U2Core/src/dbi/U2DbiPackUtils.cpp b/src/corelibs/U2Core/src/dbi/U2DbiPackUtils.cpp index d3b4009486a26c043f4e0eb9007eec467fe904ea..e2edadc4ff2587a774aa59453377d102d63deb07 100644 --- a/src/corelibs/U2Core/src/dbi/U2DbiPackUtils.cpp +++ b/src/corelibs/U2Core/src/dbi/U2DbiPackUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/U2DbiPackUtils.h b/src/corelibs/U2Core/src/dbi/U2DbiPackUtils.h index 0124c91e1facdf438d689128eb923ca36af971f5..d74657c0540fc53850249039c47a11e29fb61fab 100644 --- a/src/corelibs/U2Core/src/dbi/U2DbiPackUtils.h +++ b/src/corelibs/U2Core/src/dbi/U2DbiPackUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/U2DbiRegistry.cpp b/src/corelibs/U2Core/src/dbi/U2DbiRegistry.cpp index 5a5420185d5115828900a62470b8bc5ad6cc5d28..87844983185fceea4d600f2c19d4111aaa21d03d 100644 --- a/src/corelibs/U2Core/src/dbi/U2DbiRegistry.cpp +++ b/src/corelibs/U2Core/src/dbi/U2DbiRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/U2DbiRegistry.h b/src/corelibs/U2Core/src/dbi/U2DbiRegistry.h index fd61676a245973eff6cba4ab9605b3c5f1967461..560050b9d2b3edff1d2fb7ee008bf720418a7720 100644 --- a/src/corelibs/U2Core/src/dbi/U2DbiRegistry.h +++ b/src/corelibs/U2Core/src/dbi/U2DbiRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/U2DbiUtils.cpp b/src/corelibs/U2Core/src/dbi/U2DbiUtils.cpp index ca7fee2cce4544a2845586a24a0df84501154d72..4d5e61982331df88671282f54ad9a7a5d05c8a44 100644 --- a/src/corelibs/U2Core/src/dbi/U2DbiUtils.cpp +++ b/src/corelibs/U2Core/src/dbi/U2DbiUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -43,7 +43,7 @@ namespace U2 { static U2DataId emptyId; -const QString U2DbiUtils::PUBLIC_DATABASE_NAME = QObject::tr("UGENE public database"); +const QString U2DbiUtils::PUBLIC_DATABASE_NAME = "UGENE public database"; const QString U2DbiUtils::PUBLIC_DATABASE_LOGIN = "public"; const QString U2DbiUtils::PUBLIC_DATABASE_PASSWORD = "public"; const QString U2DbiUtils::PUBLIC_DATABASE_URL = U2DbiUtils::createFullDbiUrl(PUBLIC_DATABASE_LOGIN, "5.9.139.103", 3306, "public_ugene_1_25"); diff --git a/src/corelibs/U2Core/src/dbi/U2DbiUtils.h b/src/corelibs/U2Core/src/dbi/U2DbiUtils.h index 05fabee49e69db7b273a9f1d69273d76f045c657..5b7c514f5f55caec26a546c22bf9d0e0da19b774 100644 --- a/src/corelibs/U2Core/src/dbi/U2DbiUtils.h +++ b/src/corelibs/U2Core/src/dbi/U2DbiUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/U2FeatureDbi.h b/src/corelibs/U2Core/src/dbi/U2FeatureDbi.h index 19a962cf2a1f06330d8fb39065266db5b6c3b199..cbd1c031e7b87f822f9354246a05d8866800f65e 100644 --- a/src/corelibs/U2Core/src/dbi/U2FeatureDbi.h +++ b/src/corelibs/U2Core/src/dbi/U2FeatureDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/U2FormatCheckResult.h b/src/corelibs/U2Core/src/dbi/U2FormatCheckResult.h index 79f3b161e3b882d06c4b8c1f95c881e3087e9e19..11bff1073245ab69b93fc18f6c5a089b6d34676a 100644 --- a/src/corelibs/U2Core/src/dbi/U2FormatCheckResult.h +++ b/src/corelibs/U2Core/src/dbi/U2FormatCheckResult.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/U2ModDbi.h b/src/corelibs/U2Core/src/dbi/U2ModDbi.h index 86f36a1cf8915cbf65221a3bfd1be41fb5dd9bd6..f63f79d4d7ac092db5b9f224065d3b196e329d0e 100644 --- a/src/corelibs/U2Core/src/dbi/U2ModDbi.h +++ b/src/corelibs/U2Core/src/dbi/U2ModDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/U2MsaDbi.h b/src/corelibs/U2Core/src/dbi/U2MsaDbi.h index 72db75a25b40377547afd6f49a07d2ee74cfae0c..47946925312beb3c9188d1791bd35622f9f12c29 100644 --- a/src/corelibs/U2Core/src/dbi/U2MsaDbi.h +++ b/src/corelibs/U2Core/src/dbi/U2MsaDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/U2ObjectDbi.cpp b/src/corelibs/U2Core/src/dbi/U2ObjectDbi.cpp index 157431c05ebd299b66ed1319c04470a6283d2f12..af4e43354b3fc884a5c10989f009bb46177a95ee 100644 --- a/src/corelibs/U2Core/src/dbi/U2ObjectDbi.cpp +++ b/src/corelibs/U2Core/src/dbi/U2ObjectDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/U2ObjectDbi.h b/src/corelibs/U2Core/src/dbi/U2ObjectDbi.h index 7ddab143ace7150fe2549ec0226da2f29c9033f8..811e00bae57cda397fe3dd84df7e4ecdfed4c4f9 100644 --- a/src/corelibs/U2Core/src/dbi/U2ObjectDbi.h +++ b/src/corelibs/U2Core/src/dbi/U2ObjectDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,7 +22,6 @@ #ifndef _U2_OBJECT_DBI_H_ #define _U2_OBJECT_DBI_H_ -#include <U2Core/U2Type.h> #include <U2Core/U2Dbi.h> namespace U2 { @@ -31,7 +30,7 @@ namespace U2 { Any database contains objects that are placed into folders Folders have unique string IDs - constructed similar to full folders names on Unix systems The root folder "/" is required for any DBI -*/ + */ enum DbFolderFlag { DbFolderFlag_None = 0, @@ -57,7 +56,7 @@ public: /** Retrieves U2Object fields from database entry with 'id' and sets these fields for 'object' - */ + */ virtual void getObject(U2Object& object, const U2DataId& id, U2OpStatus& os) = 0; /** @@ -80,7 +79,7 @@ public: /** Returns parents for the entity. If entity is object, returns other object this object is a part of If object is not a part of any other object and does not belongs to any folder - it's automatically removed. - */ + */ virtual QList<U2DataId> getParents(const U2DataId& entityId, U2OpStatus& os) = 0; @@ -91,7 +90,7 @@ public: /** Returns list of folders stored in database. Folders are represented as paths, separated by '/' character. At least one root folder is required. - */ + */ virtual QStringList getFolders(U2OpStatus& os) = 0; /** Returns the map: object -> folder path. */ @@ -100,12 +99,12 @@ public: /** Returns version of the folder. The folder version increases if new object(s)/subfolder(s) are added into this folder Note that if object(s)/folder(s) are added into one of the subfolders the folder version is not changed - */ + */ virtual qint64 getFolderLocalVersion(const QString& folder, U2OpStatus& os) = 0; /** Returns version of the folder that changes every time object(s)/folder(s) added to the specified folder or any of its child folders - */ + */ virtual qint64 getFolderGlobalVersion(const QString& folder, U2OpStatus& os) = 0; /** Returns number of top-level U2Objects in folder */ @@ -141,7 +140,7 @@ public: If @force is true, the object will be removed if it is possible, else dbi implementation can refuse to remove it. Requires: U2DbiFeature_RemoveObjects feature support - */ + */ virtual bool removeObject(const U2DataId& dataId, bool force, U2OpStatus& os) = 0; virtual bool removeObject(const U2DataId& dataId, U2OpStatus& os) { return removeObject(dataId, false, os); } @@ -150,7 +149,7 @@ public: If @force is true, the object will be removed if it is possible, else dbi implementation can refuse to remove it. Requires: U2DbiFeature_RemoveObjects feature support - */ + */ virtual bool removeObjects(const QList<U2DataId>& dataIds, bool force, U2OpStatus& os) = 0; virtual bool removeObjects(const QList<U2DataId>& dataIds, U2OpStatus& os) { return removeObjects(dataIds, false, os); } @@ -159,20 +158,20 @@ public: If the specified path is already presented in the database, nothing will be done. It is not required that parent folders must exist, they are created automatically. Requires: U2DbiFeature_ChangeFolders feature support - */ + */ virtual void createFolder(const QString& path, U2OpStatus& os) = 0; /** Removes folder. The folder must be existing path. Runs GC check for all objects in the folder Requires: U2DbiFeature_ChangeFolders feature support - */ + */ virtual bool removeFolder(const QString& folder, U2OpStatus& os) = 0; /** Renames the folder. Replaces all inner folders into the new one. The specified new path must be a valid unique path, not existing in the database. It is not required that parent folders must exist, they are created automatically. Requires: U2DbiFeature_ChangeFolders feature support - */ + */ virtual void renameFolder(const QString &oldPath, const QString &newPath, U2OpStatus &os) = 0; /** Returns the folder's previous path if it is set or an empty string if folder has not been moved. */ @@ -181,7 +180,7 @@ public: /** Adds objects to the specified folder. All objects must exist and have a top-level type. Requires: U2DbiFeature_ChangeFolders feature support - */ + */ virtual void addObjectsToFolder(const QList<U2DataId>& objectIds, const QString& toFolder, U2OpStatus& os) = 0; /** Moves objects between folders. @@ -196,32 +195,32 @@ public: is needed in order to restore the object afterwards. Requires: U2DbiFeature_ChangeFolders feature support - */ + */ virtual void moveObjects(const QList<U2DataId>& objectIds, const QString& fromFolder, const QString& toFolder, U2OpStatus& os, bool saveFromFolder = false) = 0; /** Sets the new name @newName for the object with the given @id. - */ + */ virtual void renameObject(const U2DataId &id, const QString &newName, U2OpStatus &os) = 0; /** Moves objects to the folder whose path was previously stored by the 'moveObjects' method Returns the new path - */ + */ virtual QStringList restoreObjects(const QList<U2DataId> &objectIds, U2OpStatus &os) = 0; /** Method for databases allowing multiple clients. Updates timestamp of last access time to the object having `objectId` - */ + */ virtual void updateObjectAccessTime(const U2DataId &objectId, U2OpStatus &os); /** Returns whether the object is used by some client of the DB. The method should be overridden for DBIs with multiple clients - */ + */ virtual bool isObjectInUse(const U2DataId &id, U2OpStatus &os); virtual QList<U2DataId> getAllObjectsInUse(U2OpStatus &os); - /** Undo the last update operation for the object. */ + /** Undo the last update operation for the object. */ virtual void undo(const U2DataId& objId, U2OpStatus& os) = 0; /** Redo the last update operation for the object. */ diff --git a/src/corelibs/U2Core/src/dbi/U2ObjectRelationsDbi.cpp b/src/corelibs/U2Core/src/dbi/U2ObjectRelationsDbi.cpp index 533723bf84543459f5ef6019d5fcb5618428a6af..3e74c7b2113b6fd20529b0dfef9381f885b9b3a4 100644 --- a/src/corelibs/U2Core/src/dbi/U2ObjectRelationsDbi.cpp +++ b/src/corelibs/U2Core/src/dbi/U2ObjectRelationsDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/U2ObjectRelationsDbi.h b/src/corelibs/U2Core/src/dbi/U2ObjectRelationsDbi.h index 74f23f27b52ef44b494353a8bc4001e554915844..3ffdf18b10ba37764288a11ebcd27c75250f1521 100644 --- a/src/corelibs/U2Core/src/dbi/U2ObjectRelationsDbi.h +++ b/src/corelibs/U2Core/src/dbi/U2ObjectRelationsDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/U2SQLiteTripleStore.cpp b/src/corelibs/U2Core/src/dbi/U2SQLiteTripleStore.cpp index 85c22d4bc4740f6fad29b1ae2259571207d82d4b..6f08371c3ece7ea277d7411a20e32e50543baf4d 100644 --- a/src/corelibs/U2Core/src/dbi/U2SQLiteTripleStore.cpp +++ b/src/corelibs/U2Core/src/dbi/U2SQLiteTripleStore.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/U2SQLiteTripleStore.h b/src/corelibs/U2Core/src/dbi/U2SQLiteTripleStore.h index 86656d270f5da9de06b2b936de489c431ad1f6cd..d1619db20d5247a75febb435aa8bf57657af32c9 100644 --- a/src/corelibs/U2Core/src/dbi/U2SQLiteTripleStore.h +++ b/src/corelibs/U2Core/src/dbi/U2SQLiteTripleStore.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/U2SequenceDbi.h b/src/corelibs/U2Core/src/dbi/U2SequenceDbi.h index 9e802fc1642038d3673ebdbf12007fb0e79c117a..f6a8ef22ba28fb95dbd8d6f22a0c6d523da28354 100644 --- a/src/corelibs/U2Core/src/dbi/U2SequenceDbi.h +++ b/src/corelibs/U2Core/src/dbi/U2SequenceDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/U2SqlHelpers.cpp b/src/corelibs/U2Core/src/dbi/U2SqlHelpers.cpp index eaeb0327627ec4f994a06359ee494f3883b06140..59a8ff505f8368867dbd1d3d89bb4193b15b18a9 100644 --- a/src/corelibs/U2Core/src/dbi/U2SqlHelpers.cpp +++ b/src/corelibs/U2Core/src/dbi/U2SqlHelpers.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -154,7 +154,7 @@ bool SQLiteQuery::reset(bool clearBindings) { } int rc = sqlite3_reset(st); if (rc != SQLITE_OK) { - setError(QString("SQLite: Error reseting statement: ") + U2DbiL10n::queryError(sqlite3_errmsg(db->handle))); + setError(QString("SQLite: Error resetting statement: ") + U2DbiL10n::queryError(sqlite3_errmsg(db->handle))); return false; } return true; @@ -298,8 +298,7 @@ void SQLiteQuery::bindString(int idx, const QString& val) { } assert(st!=NULL); QByteArray utf8 = val.toUtf8(); - bool transient = true; - int rc = sqlite3_bind_text(st, idx, utf8, utf8.length(), transient ? SQLITE_TRANSIENT : SQLITE_STATIC); + int rc = sqlite3_bind_text(st, idx, utf8, utf8.length(), SQLITE_TRANSIENT); if (rc != SQLITE_OK) { setError(U2DbiL10n::tr("Error binding text value! Query: '%1', idx: %2, value: '%3'").arg(sql).arg(idx).arg(val)); return; diff --git a/src/corelibs/U2Core/src/dbi/U2SqlHelpers.h b/src/corelibs/U2Core/src/dbi/U2SqlHelpers.h index 2e66b42689e835810ea3304fa0d6c98c18c05542..cf2b8cd0c0e83c7a46e6755e05f45a5a5a9bef3f 100644 --- a/src/corelibs/U2Core/src/dbi/U2SqlHelpers.h +++ b/src/corelibs/U2Core/src/dbi/U2SqlHelpers.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/U2VariantDbi.h b/src/corelibs/U2Core/src/dbi/U2VariantDbi.h index d3a86b7e9fc71df4578cb34127d62f6adad696a1..e86d870464e29c4426ed2199a1b70af8b244a2d8 100644 --- a/src/corelibs/U2Core/src/dbi/U2VariantDbi.h +++ b/src/corelibs/U2Core/src/dbi/U2VariantDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/UdrDbi.cpp b/src/corelibs/U2Core/src/dbi/UdrDbi.cpp index 465eb5c377c7c7f129175fd33f12bff596e65190..0c88d395c7dc42be48cb9b4f1c4c067b317aac25 100644 --- a/src/corelibs/U2Core/src/dbi/UdrDbi.cpp +++ b/src/corelibs/U2Core/src/dbi/UdrDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/dbi/UdrDbi.h b/src/corelibs/U2Core/src/dbi/UdrDbi.h index e4f3795704635c3c88e7ff283b34ef6d2effc364..92b87c66c912dfbb4563c2ecd28a5686fb3d9962 100644 --- a/src/corelibs/U2Core/src/dbi/UdrDbi.h +++ b/src/corelibs/U2Core/src/dbi/UdrDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,7 +25,6 @@ #include <U2Core/InputStream.h> #include <U2Core/OutputStream.h> #include <U2Core/U2Dbi.h> -#include <U2Core/UdrSchema.h> #include <U2Core/UdrRecord.h> namespace U2 { diff --git a/src/corelibs/U2Core/src/globals/AppContext.cpp b/src/corelibs/U2Core/src/globals/AppContext.cpp index d95f81adff7f6b9305b69dc6cb6c6ee57225a6f9..47f39d93064ebf647a0daa6c39c47953fd2f8e23 100644 --- a/src/corelibs/U2Core/src/globals/AppContext.cpp +++ b/src/corelibs/U2Core/src/globals/AppContext.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/AppContext.h b/src/corelibs/U2Core/src/globals/AppContext.h index ddbe98f4a0241db9be8a5f54a2c70dc3e40f7bc1..2441a53a41c41b0b3ba853e8f8a4b1614730c915 100644 --- a/src/corelibs/U2Core/src/globals/AppContext.h +++ b/src/corelibs/U2Core/src/globals/AppContext.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -45,6 +45,7 @@ class CudaGpuRegistry; class DBXRefRegistry; class DNAAlphabetRegistry; class DNATranslationRegistry; +class DashboardInfoRegistry; class DataBaseRegistry; class DnaAssemblyAlgRegistry; class DocumentFormatRegistry; @@ -259,6 +260,8 @@ public: static PasteFactory* getPasteFactory() {return getInstance()->_getPasteFactory();} + static DashboardInfoRegistry *getDashboardInfoRegistry() { return getInstance()->_getDashboardInfoRegistry(); } + protected: static AppContext* getInstance() {assert(instance); return instance;} @@ -330,6 +333,7 @@ protected: virtual IdRegistry<WelcomePageAction>* _getWelcomePageActionRegistry() const = 0; virtual ProjectFilterTaskRegistry * _getProjectFilterTaskRegistry() const = 0; virtual PasteFactory * _getPasteFactory() const = 0; + virtual DashboardInfoRegistry * _getDashboardInfoRegistry() const = 0; virtual void _registerGlobalObject(AppGlobalObject* go) = 0; virtual void _unregisterGlobalObject(const QString& id) = 0; diff --git a/src/corelibs/U2Core/src/globals/AppFileStorage.cpp b/src/corelibs/U2Core/src/globals/AppFileStorage.cpp index 0203ccf64e8b5681c6866c020d2ba9d288729bc1..ef07934b8dbd5b005a429c83e6fd5d603d7d5e94 100644 --- a/src/corelibs/U2Core/src/globals/AppFileStorage.cpp +++ b/src/corelibs/U2Core/src/globals/AppFileStorage.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/AppFileStorage.h b/src/corelibs/U2Core/src/globals/AppFileStorage.h index 6c04d40d4132657181537b0d7f49e58106f289f7..23b60ac89e44421cb891a0c895a097b403da11e7 100644 --- a/src/corelibs/U2Core/src/globals/AppFileStorage.h +++ b/src/corelibs/U2Core/src/globals/AppFileStorage.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/AppGlobalObject.cpp b/src/corelibs/U2Core/src/globals/AppGlobalObject.cpp index 4efe2a3b7bb8e557d5593cc7b36b88f3effeb3dd..9afa7b95f55f36f946fcc53577edf576ee4491cb 100644 --- a/src/corelibs/U2Core/src/globals/AppGlobalObject.cpp +++ b/src/corelibs/U2Core/src/globals/AppGlobalObject.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/AppGlobalObject.h b/src/corelibs/U2Core/src/globals/AppGlobalObject.h index ba9ef65f192fde65fa7992a7d154c6d204731281..e5518cfc91567e95d1dbba9277079ebad0007d3b 100644 --- a/src/corelibs/U2Core/src/globals/AppGlobalObject.h +++ b/src/corelibs/U2Core/src/globals/AppGlobalObject.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,7 +24,6 @@ #include <QObject> -#include <U2Core/global.h> #include <U2Core/Identifiable.h> namespace U2 { diff --git a/src/corelibs/U2Core/src/globals/AppResources.cpp b/src/corelibs/U2Core/src/globals/AppResources.cpp index cb44a8dd52bfd3dfbf2fc791d1a763b9042f1b1b..bd713117bf3997a5c644becdb418552e97d8eb46 100644 --- a/src/corelibs/U2Core/src/globals/AppResources.cpp +++ b/src/corelibs/U2Core/src/globals/AppResources.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -151,6 +151,14 @@ int AppResourcePool::getTotalPhysicalMemory() { return totalPhysicalMemory; } +bool AppResourcePool::is32BitBuild() { + bool result = false; +#ifdef Q_PROCESSOR_X86_32 + result = true; +#endif + return result; +} + bool AppResourcePool::isSystem64bit() { #ifdef Q_OS_MAC QProcess p; diff --git a/src/corelibs/U2Core/src/globals/AppResources.h b/src/corelibs/U2Core/src/globals/AppResources.h index 1ba02f4b23c1dcd5dfac10f7f2b4d0b29a83afdc..aabe2a74165b10a7cb195221169967d9d441c7bb 100644 --- a/src/corelibs/U2Core/src/globals/AppResources.h +++ b/src/corelibs/U2Core/src/globals/AppResources.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -281,6 +281,19 @@ public: static int getTotalPhysicalMemory(); + /* + * Returns true if UGENE is built in 32bit mode. + * Otherwise UGENE is built in 64bit mode. + */ + static bool is32BitBuild(); + + /* + * Returns true if OS is 64 bit. + * Note: even 32-bit UGENE may be run on 64-bit OS. + * Warning: + * this method is implemented for MacOS only. + * TODO: check if this method can be safely moved to external tools package (the only user) from here. + */ static bool isSystem64bit(); static const int x32MaxMemoryLimitMb = 3*512; // 1536Mb diff --git a/src/corelibs/U2Core/src/globals/AppSettings.h b/src/corelibs/U2Core/src/globals/AppSettings.h index 95fa5a80a9b5269b053cf7f870722a1b075db355..0b33783540856ddc82fc2721cac0172485712522 100644 --- a/src/corelibs/U2Core/src/globals/AppSettings.h +++ b/src/corelibs/U2Core/src/globals/AppSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/AutoAnnotationsSupport.cpp b/src/corelibs/U2Core/src/globals/AutoAnnotationsSupport.cpp index d269ac0a26b4d23ddd346e78e0a604a10fe9428f..fdddbfceb3c2eb861130baff89f442b1eeba8c7f 100644 --- a/src/corelibs/U2Core/src/globals/AutoAnnotationsSupport.cpp +++ b/src/corelibs/U2Core/src/globals/AutoAnnotationsSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -27,7 +27,6 @@ #include <U2Core/L10n.h> #include <U2Core/RemoveAnnotationsTask.h> #include <U2Core/Settings.h> -#include <U2Core/U2DbiRegistry.h> #include <U2Core/U2DbiUtils.h> #include <U2Core/U2ObjectDbi.h> #include <U2Core/U2OpStatusUtils.h> @@ -37,17 +36,16 @@ namespace U2 { -const QString AutoAnnotationObject::AUTO_ANNOTATION_HINT( "auto-annotation object" ); +const QString AutoAnnotationObject::AUTO_ANNOTATION_HINT("auto-annotation object"); AutoAnnotationsUpdater::AutoAnnotationsUpdater(const QString &nm, const QString &gName, bool alwaysOff, bool translationDependent) - : groupName(gName), name(nm), alwaysOffByDefault(alwaysOff), translationDependent(translationDependent) -{ - checkedByDefault = alwaysOffByDefault ? false : AppContext::getSettings( ) - ->getValue( AUTO_ANNOTATION_SETTINGS + groupName, false, true ).toBool( ); + : groupName(gName), name(nm), alwaysOffByDefault(alwaysOff), translationDependent(translationDependent) { + checkedByDefault = alwaysOffByDefault ? false : AppContext::getSettings() + ->getValue(AUTO_ANNOTATION_SETTINGS + groupName, false, true).toBool(); } -AutoAnnotationsUpdater::~AutoAnnotationsUpdater( ) { - AppContext::getSettings( )->setValue( AUTO_ANNOTATION_SETTINGS + groupName, checkedByDefault, true ); +AutoAnnotationsUpdater::~AutoAnnotationsUpdater() { + AppContext::getSettings()->setValue(AUTO_ANNOTATION_SETTINGS + groupName, checkedByDefault, true); } bool AutoAnnotationsUpdater::isTranslationDependent() { @@ -58,18 +56,18 @@ QList<AutoAnnotationsUpdater *> AutoAnnotationsSupport::getAutoAnnotationUpdater return aaUpdaters; } -AutoAnnotationsUpdater * AutoAnnotationsSupport::findUpdaterByGroupName( const QString& groupName ) { - foreach ( AutoAnnotationsUpdater *updater, aaUpdaters ) { - if ( groupName == updater->getGroupName( ) ) { +AutoAnnotationsUpdater * AutoAnnotationsSupport::findUpdaterByGroupName(const QString& groupName) { + foreach(AutoAnnotationsUpdater *updater, aaUpdaters) { + if (groupName == updater->getGroupName()) { return updater; } } return NULL; } -AutoAnnotationsUpdater * AutoAnnotationsSupport::findUpdaterByName( const QString &name ) { - foreach ( AutoAnnotationsUpdater *updater, aaUpdaters ) { - if ( updater->getName( ) == name ) { +AutoAnnotationsUpdater * AutoAnnotationsSupport::findUpdaterByName(const QString &name) { + foreach(AutoAnnotationsUpdater *updater, aaUpdaters) { + if (updater->getName() == name) { return updater; } } @@ -78,48 +76,47 @@ AutoAnnotationsUpdater * AutoAnnotationsSupport::findUpdaterByName( const QStrin ////////////////////////////////////////////////////////////////////////// -void AutoAnnotationsSupport::registerAutoAnnotationsUpdater( AutoAnnotationsUpdater *updater ) { - aaUpdaters.append( updater ); +void AutoAnnotationsSupport::registerAutoAnnotationsUpdater(AutoAnnotationsUpdater *updater) { + aaUpdaters.append(updater); } -void AutoAnnotationsSupport::unregisterAutoAnnotationsUpdater( AutoAnnotationsUpdater *updater ) { - aaUpdaters.removeOne( updater ); +void AutoAnnotationsSupport::unregisterAutoAnnotationsUpdater(AutoAnnotationsUpdater *updater) { + aaUpdaters.removeOne(updater); } -AutoAnnotationsSupport::~AutoAnnotationsSupport( ) { - qDeleteAll( aaUpdaters ); +AutoAnnotationsSupport::~AutoAnnotationsSupport() { + qDeleteAll(aaUpdaters); } -bool AutoAnnotationsSupport::isAutoAnnotation( const AnnotationTableObject *obj ) { - return obj->getGHintsMap( ).value( AutoAnnotationObject::AUTO_ANNOTATION_HINT ).toBool( ); +bool AutoAnnotationsSupport::isAutoAnnotation(const AnnotationTableObject *obj) { + return obj->getGHintsMap().value(AutoAnnotationObject::AUTO_ANNOTATION_HINT).toBool(); } -bool AutoAnnotationsSupport::isAutoAnnotation( const GObject* obj ) { - bool isAnnotationObject = obj->getGObjectType( ) == GObjectTypes::ANNOTATION_TABLE; - bool hasAutoAnnotationHint = obj->getGHintsMap( ).value( AutoAnnotationObject::AUTO_ANNOTATION_HINT ).toBool( ); - return ( isAnnotationObject && hasAutoAnnotationHint ); +bool AutoAnnotationsSupport::isAutoAnnotation(const GObject* obj) { + bool isAnnotationObject = obj->getGObjectType() == GObjectTypes::ANNOTATION_TABLE; + bool hasAutoAnnotationHint = obj->getGHintsMap().value(AutoAnnotationObject::AUTO_ANNOTATION_HINT).toBool(); + return (isAnnotationObject && hasAutoAnnotationHint); } ////////////////////////////////////////////////////////////////////////// AutoAnnotationObject::AutoAnnotationObject(U2SequenceObject *obj, DNATranslation *aminoTT, QObject *parent) - : QObject(parent), dnaObj(obj), aminoTT(aminoTT) -{ + : QObject(parent), dnaObj(obj), aminoTT(aminoTT) { QVariantMap hints; hints.insert(AUTO_ANNOTATION_HINT, true); - const QString tableName = AutoAnnotationsSupport::tr( "Auto-annotations [%1 | %2]" ) - .arg( obj->getDocument( )->getName( ) ).arg( obj->getGObjectName( ) ); + QString tableName = AutoAnnotationsSupport::tr("Auto-annotations [%1 | %2]") + .arg(obj->getDocument()->getName()).arg(obj->getGObjectName()); U2OpStatusImpl os; const U2DbiRef localDbiRef = AppContext::getDbiRegistry()->getSessionTmpDbiRef(os); SAFE_POINT_OP(os, ); - aobj = new AnnotationTableObject( tableName, localDbiRef, hints ); - aobj->addObjectRelation( dnaObj, ObjectRole_Sequence ); - aaSupport = AppContext::getAutoAnnotationsSupport( ); + aobj = new AnnotationTableObject(tableName, localDbiRef, hints); + aobj->addObjectRelation(dnaObj, ObjectRole_Sequence); + aaSupport = AppContext::getAutoAnnotationsSupport(); } -AutoAnnotationObject::~AutoAnnotationObject( ) { +AutoAnnotationObject::~AutoAnnotationObject() { U2OpStatusImpl os; const U2EntityRef &entity = aobj->getEntityRef(); @@ -127,12 +124,12 @@ AutoAnnotationObject::~AutoAnnotationObject( ) { DbiConnection con(entity.dbiRef, os); con.dbi->getObjectDbi()->removeObject(entity.entityId, os); delete aobj; - SAFE_POINT_OP( os, ); + SAFE_POINT_OP(os, ); } -void AutoAnnotationObject::updateAll( ) { - QList<AutoAnnotationsUpdater *> aaUpdaters = aaSupport->getAutoAnnotationUpdaters( ); - handleUpdate( aaUpdaters ); +void AutoAnnotationObject::updateAll() { + QList<AutoAnnotationsUpdater *> aaUpdaters = aaSupport->getAutoAnnotationUpdaters(); + handleUpdate(aaUpdaters); } void AutoAnnotationObject::updateTranslationDependent(DNATranslation *newAminoTT) { @@ -146,12 +143,12 @@ void AutoAnnotationObject::updateTranslationDependent(DNATranslation *newAminoTT handleUpdate(aaUpdaters); } -void AutoAnnotationObject::updateGroup( const QString &groupName ) { - AutoAnnotationsUpdater *updater = aaSupport->findUpdaterByGroupName( groupName ); - if ( NULL != updater ) { +void AutoAnnotationObject::updateGroup(const QString &groupName) { + AutoAnnotationsUpdater *updater = aaSupport->findUpdaterByGroupName(groupName); + if (NULL != updater) { QList<AutoAnnotationsUpdater *> updaters; updaters << updater; - handleUpdate( updaters ); + handleUpdate(updaters); } } @@ -175,7 +172,7 @@ bool AutoAnnotationObject::cancelRunningUpdateTasks(AutoAnnotationsUpdater *upda SAFE_POINT(NULL != updater, L10N::nullPointerError("Auto-annotation updater"), false); const bool result = !runningUpdateTasks[updater].isEmpty(); - foreach (Task *task, runningUpdateTasks[updater]) { + foreach(Task *task, runningUpdateTasks[updater]) { task->cancel(); } @@ -189,7 +186,7 @@ void AutoAnnotationObject::handleUpdate(const QList<AutoAnnotationsUpdater *> &u QList<Task*> subTasks; QStringList groupNames; - foreach (AutoAnnotationsUpdater *updater, updaters) { + foreach(AutoAnnotationsUpdater *updater, updaters) { // check constraints AutoAnnotationConstraints cns; cns.alphabet = dnaObj->getAlphabet(); @@ -241,7 +238,7 @@ void AutoAnnotationObject::sl_updateTaskFinished() { CHECK(task->isFinished(), ); - foreach (AutoAnnotationsUpdater *updater, runningUpdateTasks.keys()) { + foreach(AutoAnnotationsUpdater *updater, runningUpdateTasks.keys()) { QList<Task *> &updateTasks = runningUpdateTasks[updater]; if (updateTasks.contains(task)) { updateTasks.removeAll(task); @@ -255,19 +252,19 @@ void AutoAnnotationObject::sl_updateTaskFinished() { } } -void AutoAnnotationObject::setGroupEnabled( const QString &groupName, bool enabled ) { - if ( enabled ) { - enabledGroups.insert( groupName ); +void AutoAnnotationObject::setGroupEnabled(const QString &groupName, bool enabled) { + if (enabled) { + enabledGroups.insert(groupName); } else { - enabledGroups.remove( groupName ); + enabledGroups.remove(groupName); } } -void AutoAnnotationObject::emitStateChange( bool started ) { - if ( started ) { - emit si_updateStarted( ); +void AutoAnnotationObject::emitStateChange(bool started) { + if (started) { + emit si_updateStarted(); } else { - emit si_updateFinshed( ); + emit si_updateFinshed(); } } @@ -276,57 +273,55 @@ DNATranslation* AutoAnnotationObject::getAminoTT() const { } AutoAnnotationConstraints::AutoAnnotationConstraints() - : alphabet( NULL ), hints( NULL ) -{ + : alphabet(NULL), hints(NULL) { } ////////////////////////////////////////////////////////////////////////// -const QString AutoAnnotationsUpdateTask::NAME( "Auto-annotations update task" ); +const QString AutoAnnotationsUpdateTask::NAME("Auto-annotations update task"); -AutoAnnotationsUpdateTask::AutoAnnotationsUpdateTask( AutoAnnotationObject *aaObj, - QList<Task *> updateTasks ) - : Task( NAME, TaskFlags_NR_FOSE_COSC), aa( aaObj ), aaSeqObj( NULL ), lock( NULL ), - subTasks( updateTasks ) -{ +AutoAnnotationsUpdateTask::AutoAnnotationsUpdateTask(AutoAnnotationObject *aaObj, + QList<Task *> updateTasks) + : Task(NAME, TaskFlags_NR_FOSE_COSC), aa(aaObj), aaSeqObj(NULL), lock(NULL), + subTasks(updateTasks) { aaObjectInvalid = false; - setMaxParallelSubtasks( 1 ); + setMaxParallelSubtasks(1); connect(aaObj, SIGNAL(destroyed(QObject*)), SLOT(sl_onSequenceDeleted())); } -AutoAnnotationsUpdateTask::~AutoAnnotationsUpdateTask( ) { - cleanup( ); +AutoAnnotationsUpdateTask::~AutoAnnotationsUpdateTask() { + cleanup(); } -void AutoAnnotationsUpdateTask::prepare( ) { - SAFE_POINT( NULL != aa, tr( "Empty auto-annotation object" ), ); +void AutoAnnotationsUpdateTask::prepare() { + SAFE_POINT(NULL != aa, tr("Empty auto-annotation object"), ); - lock = new StateLock( "Auto-annotations update", StateLockFlag_LiveLock ); - aaSeqObj = aa->getSeqObject( ); - aaSeqObj->lockState( lock ); + lock = new StateLock("Auto-annotations update", StateLockFlag_LiveLock); + aaSeqObj = aa->getSeqObject(); + aaSeqObj->lockState(lock); - aa->emitStateChange( true ); - foreach ( Task *subtask, subTasks ) { - addSubTask( subtask ); + aa->emitStateChange(true); + foreach(Task *subtask, subTasks) { + addSubTask(subtask); } } -void AutoAnnotationsUpdateTask::cleanup( ) { - if ( NULL != lock ) { +void AutoAnnotationsUpdateTask::cleanup() { + if (NULL != lock) { CHECK_EXT(!aa.isNull(), cancel(), ); - aaSeqObj->unlockState( lock ); + aaSeqObj->unlockState(lock); delete lock; } } -Task::ReportResult AutoAnnotationsUpdateTask::report( ) { - if ( isCanceled( ) && aaObjectInvalid ) { +Task::ReportResult AutoAnnotationsUpdateTask::report() { + if (isCanceled() && aaObjectInvalid) { return ReportResult_Finished; } CHECK_EXT(!aa.isNull(), cancel(), ReportResult_Finished); - aa->emitStateChange( false ); + aa->emitStateChange(false); return ReportResult_Finished; } diff --git a/src/corelibs/U2Core/src/globals/AutoAnnotationsSupport.h b/src/corelibs/U2Core/src/globals/AutoAnnotationsSupport.h index 709d3792710a331847d8f6a48a38fba702b680e7..c9e5fb2eea8d9ce56951e3a6dd7a92daecde3c04 100644 --- a/src/corelibs/U2Core/src/globals/AutoAnnotationsSupport.h +++ b/src/corelibs/U2Core/src/globals/AutoAnnotationsSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,7 +22,6 @@ #ifndef _U2_AUTO_ANNOTATIONS_SUPPORT_H_ #define _U2_AUTO_ANNOTATIONS_SUPPORT_H_ -#include <QMutex> #include <QSet> #include <U2Core/AnnotationTableObject.h> @@ -46,28 +45,27 @@ class AutoAnnotationsSupport; * such as for example restriction sites or ORFS. * Auto-annotations are controlled by AnnotatedDNAView. */ -class U2CORE_EXPORT AutoAnnotationObject : public QObject -{ +class U2CORE_EXPORT AutoAnnotationObject : public QObject { Q_OBJECT public: AutoAnnotationObject(U2SequenceObject *obj, DNATranslation *aminoTT, QObject *parent); ~AutoAnnotationObject(); - AnnotationTableObject * getAnnotationObject( ) const { return aobj; } - U2SequenceObject * getSeqObject( ) const { return dnaObj; } - void setGroupEnabled( const QString &groupName, bool enabled ); - void updateAll( ); + AnnotationTableObject * getAnnotationObject() const { return aobj; } + U2SequenceObject * getSeqObject() const { return dnaObj; } + void setGroupEnabled(const QString &groupName, bool enabled); + void updateAll(); void updateTranslationDependent(DNATranslation *newAminoTT); - void updateGroup( const QString &groupName ); - void emitStateChange( bool started ); + void updateGroup(const QString &groupName); + void emitStateChange(bool started); DNATranslation* getAminoTT() const; static const QString AUTO_ANNOTATION_HINT; signals: - void si_updateStarted( ); - void si_updateFinshed( ); + void si_updateStarted(); + void si_updateFinshed(); -private slots: + private slots: void sl_updateTaskFinished(); private: @@ -89,7 +87,7 @@ private: #define AUTO_ANNOTATION_SETTINGS "auto-annotations/" struct U2CORE_EXPORT AutoAnnotationConstraints { - AutoAnnotationConstraints( ); + AutoAnnotationConstraints(); const DNAAlphabet * alphabet; GHints * hints; @@ -99,14 +97,14 @@ class U2CORE_EXPORT AutoAnnotationsUpdater : public QObject { Q_OBJECT public: AutoAnnotationsUpdater(const QString &nm, const QString &gName, bool offByDefault = false, bool translationDependant = false); - virtual ~AutoAnnotationsUpdater( ); - const QString & getGroupName( ) { return groupName; } - const QString & getName( ) { return name; } - bool isCheckedByDefault( ) { return checkedByDefault; } + virtual ~AutoAnnotationsUpdater(); + const QString & getGroupName() { return groupName; } + const QString & getName() { return name; } + bool isCheckedByDefault() { return checkedByDefault; } bool isTranslationDependent(); - void setCheckedByDefault( bool checked ) { checkedByDefault = alwaysOffByDefault ? false : checked; } - virtual bool checkConstraints( const AutoAnnotationConstraints &constraints ) = 0; - virtual Task * createAutoAnnotationsUpdateTask( const AutoAnnotationObject *aa ) = 0; + void setCheckedByDefault(bool checked) { checkedByDefault = alwaysOffByDefault ? false : checked; } + virtual bool checkConstraints(const AutoAnnotationConstraints &constraints) = 0; + virtual Task * createAutoAnnotationsUpdateTask(const AutoAnnotationObject *aa) = 0; private: QString groupName; @@ -119,14 +117,14 @@ private: class U2CORE_EXPORT AutoAnnotationsSupport : public QObject { Q_OBJECT public: - ~AutoAnnotationsSupport( ); - void registerAutoAnnotationsUpdater( AutoAnnotationsUpdater *updater ); - void unregisterAutoAnnotationsUpdater( AutoAnnotationsUpdater *updater ); - QList<AutoAnnotationsUpdater *> getAutoAnnotationUpdaters( ); - AutoAnnotationsUpdater* findUpdaterByGroupName( const QString& groupName ); - AutoAnnotationsUpdater* findUpdaterByName( const QString &name ); - static bool isAutoAnnotation( const AnnotationTableObject *obj ); - static bool isAutoAnnotation( const GObject *obj ); + ~AutoAnnotationsSupport(); + void registerAutoAnnotationsUpdater(AutoAnnotationsUpdater *updater); + void unregisterAutoAnnotationsUpdater(AutoAnnotationsUpdater *updater); + QList<AutoAnnotationsUpdater *> getAutoAnnotationUpdaters(); + AutoAnnotationsUpdater* findUpdaterByGroupName(const QString& groupName); + AutoAnnotationsUpdater* findUpdaterByName(const QString &name); + static bool isAutoAnnotation(const AnnotationTableObject *obj); + static bool isAutoAnnotation(const GObject *obj); private: QList<AutoAnnotationsUpdater *> aaUpdaters; @@ -135,13 +133,13 @@ private: class U2CORE_EXPORT AutoAnnotationsUpdateTask : public Task { Q_OBJECT public: - AutoAnnotationsUpdateTask( AutoAnnotationObject *aaObj, QList<Task *> subtasks ); - virtual ~AutoAnnotationsUpdateTask( ); - virtual void prepare( ); - virtual void cleanup( ); - ReportResult report( ); + AutoAnnotationsUpdateTask(AutoAnnotationObject *aaObj, QList<Task *> subtasks); + virtual ~AutoAnnotationsUpdateTask(); + virtual void prepare(); + virtual void cleanup(); + ReportResult report(); void setAutoAnnotationInvalid() { aaObjectInvalid = true; } - AutoAnnotationObject * getAutoAnnotationObject( ) { return aa; } + AutoAnnotationObject * getAutoAnnotationObject() { return aa; } U2SequenceObject* getSequenceObject() const; static const QString NAME; diff --git a/src/corelibs/U2Core/src/globals/BaseDocumentFormats.cpp b/src/corelibs/U2Core/src/globals/BaseDocumentFormats.cpp index 6fa933a98a1e7901fa180d9ec835b1c80540404a..3d56047c1a303f3d01be96d2000b95a58357c2f7 100644 --- a/src/corelibs/U2Core/src/globals/BaseDocumentFormats.cpp +++ b/src/corelibs/U2Core/src/globals/BaseDocumentFormats.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/BaseDocumentFormats.h b/src/corelibs/U2Core/src/globals/BaseDocumentFormats.h index b53b5e740d2758664b5810fe5c22ccb3274838e5..52b9e3bd02fc584ecada7350deacfb942121a6d3 100644 --- a/src/corelibs/U2Core/src/globals/BaseDocumentFormats.h +++ b/src/corelibs/U2Core/src/globals/BaseDocumentFormats.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/ClipboardController.cpp b/src/corelibs/U2Core/src/globals/ClipboardController.cpp index 3de16702fbc92a51ca1ac347e8c612af9a50a01c..8ac7196292f74aad38ee3f4de01663ebb81d1103 100644 --- a/src/corelibs/U2Core/src/globals/ClipboardController.cpp +++ b/src/corelibs/U2Core/src/globals/ClipboardController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/ClipboardController.h b/src/corelibs/U2Core/src/globals/ClipboardController.h index dedcae2da33bf4841866f9a5d5b3b0b9d18be367..3e3b2c2fa0e643a562871488f3bbc1b5d1d2f307 100644 --- a/src/corelibs/U2Core/src/globals/ClipboardController.h +++ b/src/corelibs/U2Core/src/globals/ClipboardController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,14 +23,13 @@ #define _U2_CLIPBOARD_CONTROLLER_H_ #include <U2Core/DocumentUtils.h> -#include <U2Core/U2OpStatus.h> #include <U2Core/Task.h> #include <QClipboard> namespace U2 { -class U2CORE_EXPORT PasteTask : public Task{ +class U2CORE_EXPORT PasteTask : public Task { Q_OBJECT public: PasteTask(); @@ -38,13 +37,13 @@ public: virtual QList<GUrl> getUrls() const = 0; virtual QList<Document*> getDocuments() const = 0; protected: - virtual void processDocument(Document* doc); + virtual void processDocument(Document* doc); }; class U2CORE_EXPORT PasteFactory : public QObject { Q_OBJECT public: - PasteFactory(QObject *parent=0); + PasteFactory(QObject *parent = 0); virtual PasteTask* pasteTask(bool useInSequenceWidget) = 0; }; diff --git a/src/corelibs/U2Core/src/globals/Counter.cpp b/src/corelibs/U2Core/src/globals/Counter.cpp index 0dbb53c435b263a828d1e215f58cc64cb8320c62..44610402fa9b241920f71aeade813b5b0049c958 100644 --- a/src/corelibs/U2Core/src/globals/Counter.cpp +++ b/src/corelibs/U2Core/src/globals/Counter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/Counter.h b/src/corelibs/U2Core/src/globals/Counter.h index ac68a991035b3aee7676d17e9983cec19b61d4eb..c64a25840c57bb0e4573c4017402344805a47783 100644 --- a/src/corelibs/U2Core/src/globals/Counter.h +++ b/src/corelibs/U2Core/src/globals/Counter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/CredentialsAsker.cpp b/src/corelibs/U2Core/src/globals/CredentialsAsker.cpp index 3f96bdc65a0d3c9a1b9d79bec9bf010de75ccc6c..1c27e1d14f843e49f334d96059c51e7f8293948c 100644 --- a/src/corelibs/U2Core/src/globals/CredentialsAsker.cpp +++ b/src/corelibs/U2Core/src/globals/CredentialsAsker.cpp @@ -1,5 +1,5 @@ /** - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * UGENE - Integrated Bioinformatics Tools. * diff --git a/src/corelibs/U2Core/src/globals/CredentialsAsker.h b/src/corelibs/U2Core/src/globals/CredentialsAsker.h index 70ca220d0637e68fb7035355f70da5a64b12fdeb..a99d2265b1ff8cdab418399bb1dff348f60cb1a0 100644 --- a/src/corelibs/U2Core/src/globals/CredentialsAsker.h +++ b/src/corelibs/U2Core/src/globals/CredentialsAsker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/CustomExternalTool.cpp b/src/corelibs/U2Core/src/globals/CustomExternalTool.cpp new file mode 100644 index 0000000000000000000000000000000000000000..688ae6a78ee0bd51eaa5aa30e8cc347195cc04d4 --- /dev/null +++ b/src/corelibs/U2Core/src/globals/CustomExternalTool.cpp @@ -0,0 +1,96 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "CustomExternalTool.h" + +namespace U2 { + +CustomExternalTool::CustomExternalTool() + : ExternalTool(QString(), QString(), QString()) +{ + isCustomTool = true; +} + +void CustomExternalTool::setId(const QString& _id) { + id = _id; +} + +void CustomExternalTool::setName(const QString &_name) { + name = _name; +} + +void CustomExternalTool::setIcon(const QIcon &_icon) { + icon = _icon; +} + +void CustomExternalTool::setGrayIcon(const QIcon &_icon) { + grayIcon = _icon; +} + +void CustomExternalTool::setWarnIcon(const QIcon &_icon) { + warnIcon = _icon; +} + +void CustomExternalTool::setDescription(const QString &_description) { + description = _description; +} + +void CustomExternalTool::setLauncher(const QString &launcherId) { + toolRunnerProgram = launcherId; +} + +void CustomExternalTool::setBinaryName(const QString &binaryName) { + executableFileName = binaryName; +} + +void CustomExternalTool::setValidationArguments(const QStringList &arguments) { + validationArguments = arguments; +} + +void CustomExternalTool::setValidationExpectedText(const QString &text) { + validMessage = text; +} + +void CustomExternalTool::setPredefinedVersion(const QString &version) { + predefinedVersion = version; +} + +void CustomExternalTool::setVersionRegExp(const QRegExp &_versionRegExp) { + versionRegExp = _versionRegExp; +} + +void CustomExternalTool::setToolkitName(const QString &_toolkitName) { + toolKitName = _toolkitName; +} + +void CustomExternalTool::setDependencies(const QStringList &_dependencies) { + dependencies = _dependencies; +} + +void CustomExternalTool::setConfigFilePath(const QString &_configFilePath) { + configFilePath = _configFilePath; +} + +const QString &CustomExternalTool::getConfigFilePath() const { + return configFilePath; +} + +} // namespace U2 diff --git a/src/corelibs/U2Core/src/globals/CustomExternalTool.h b/src/corelibs/U2Core/src/globals/CustomExternalTool.h new file mode 100644 index 0000000000000000000000000000000000000000..250c2b09798f7f33cb207fecd72d8341f01bdad6 --- /dev/null +++ b/src/corelibs/U2Core/src/globals/CustomExternalTool.h @@ -0,0 +1,58 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_CUSTOM_EXTERNAL_TOOL_H_ +#define _U2_CUSTOM_EXTERNAL_TOOL_H_ + +#include "ExternalToolRegistry.h" + +namespace U2 { + +class U2CORE_EXPORT CustomExternalTool : public ExternalTool { + Q_OBJECT +public: + CustomExternalTool(); + + void setId(const QString& id); + void setName(const QString &name); + void setIcon(const QIcon &icon); + void setGrayIcon(const QIcon &icon); + void setWarnIcon(const QIcon &icon); + void setDescription(const QString &description); + void setLauncher(const QString &launcherId); + void setBinaryName(const QString &binaryName); + void setValidationArguments(const QStringList &arguments); + void setValidationExpectedText(const QString &text); + void setPredefinedVersion(const QString &version); + void setVersionRegExp(const QRegExp &versionRegExp); + void setToolkitName(const QString &toolkitName); + void setDependencies(const QStringList &dependencies); + void setConfigFilePath(const QString &configFilePath); + + const QString &getConfigFilePath() const; + +private: + QString configFilePath; +}; + +} // namespace U2 + +#endif // _U2_CUSTOM_EXTERNAL_TOOL_H_ diff --git a/src/corelibs/U2Core/src/globals/DBXRefRegistry.cpp b/src/corelibs/U2Core/src/globals/DBXRefRegistry.cpp index 7cb8e20edfbad00a2c5f1e4750a4d6c77aecb7a6..49232a85c95e14812c6c0637319fd8a49d77fc71 100644 --- a/src/corelibs/U2Core/src/globals/DBXRefRegistry.cpp +++ b/src/corelibs/U2Core/src/globals/DBXRefRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,7 +22,6 @@ #include "DBXRefRegistry.h" #include <U2Core/Log.h> -#include <QApplication> #include <QFile> #include <QTextStream> @@ -31,46 +30,47 @@ namespace U2 { #define DB_XREF_FILE_NAME "DBXRefRegistry.txt" DBXRefRegistry::DBXRefRegistry(QObject *p) : QObject(p) { - QFile file( QString(PATH_PREFIX_DATA)+ ":" + DB_XREF_FILE_NAME ); + QFile file(QString(PATH_PREFIX_DATA) + ":" + DB_XREF_FILE_NAME); - if(!file.exists() || !file.open(QIODevice::ReadOnly)){ + if (!file.exists() || !file.open(QIODevice::ReadOnly)) { coreLog.error(tr("File with db_xref mappings not found: %1").arg(DB_XREF_FILE_NAME)); return; } QTextStream in(&file); while (!in.atEnd()) { QString line = in.readLine(); - if(line.length()==0 || line.startsWith("#")) { + if (line.length() == 0 || line.startsWith("#")) { continue; } QStringList fields = line.split("|"); - if (fields.size()!=4) { + if (fields.size() != 4) { coreLog.error(tr("Illegal db_xref file entry: %1").arg(line)); continue; } - DBXRefInfo info(fields[0], fields[1], fields[2],fields[3].trimmed()); + DBXRefInfo info(fields[0], fields[1], fields[2], fields[3].trimmed()); refsByKey[info.name] = info; } file.close(); } -QScriptValue DBXRefRegistry::toScriptValue(QScriptEngine *engine, DBXRefRegistry* const &in) -{ return engine->newQObject(in); } +QScriptValue DBXRefRegistry::toScriptValue(QScriptEngine *engine, DBXRefRegistry* const &in) { + return engine->newQObject(in); +} -void DBXRefRegistry::fromScriptValue(const QScriptValue &object, DBXRefRegistry* &out) -{ out = qobject_cast<DBXRefRegistry *>(object.toQObject()); } +void DBXRefRegistry::fromScriptValue(const QScriptValue &object, DBXRefRegistry* &out) { + out = qobject_cast<DBXRefRegistry *>(object.toQObject()); +} -void DBXRefRegistry::setupToEngine(QScriptEngine *engine){ +void DBXRefRegistry::setupToEngine(QScriptEngine *engine) { DBXRefInfo::setupToEngine(engine); qScriptRegisterMetaType(engine, toScriptValue, fromScriptValue); } -QScriptValue DBXRefInfo::toScriptValue(QScriptEngine *engine, DBXRefInfo const &in) -{ - QScriptValue res=engine->newObject(); - res.setProperty("name", QScriptValue(engine,in.name)); - res.setProperty("url", QScriptValue(engine,in.url)); - res.setProperty("fileUrl", QScriptValue(engine,in.fileUrl)); - res.setProperty("comment", QScriptValue(engine,in.comment)); +QScriptValue DBXRefInfo::toScriptValue(QScriptEngine *engine, DBXRefInfo const &in) { + QScriptValue res = engine->newObject(); + res.setProperty("name", QScriptValue(engine, in.name)); + res.setProperty("url", QScriptValue(engine, in.url)); + res.setProperty("fileUrl", QScriptValue(engine, in.fileUrl)); + res.setProperty("comment", QScriptValue(engine, in.comment)); return res; } @@ -79,7 +79,7 @@ void DBXRefInfo::fromScriptValue(const QScriptValue &object, DBXRefInfo &out) { out = NULL != info ? *info : DBXRefInfo(); } -void DBXRefInfo::setupToEngine(QScriptEngine *engine){ +void DBXRefInfo::setupToEngine(QScriptEngine *engine) { qScriptRegisterMetaType(engine, toScriptValue, fromScriptValue); } diff --git a/src/corelibs/U2Core/src/globals/DBXRefRegistry.h b/src/corelibs/U2Core/src/globals/DBXRefRegistry.h index 5fa51441a62d63d038bf081517df65556043509c..98f5444d2547af8d3c4171cd7787301c27014fee 100644 --- a/src/corelibs/U2Core/src/globals/DBXRefRegistry.h +++ b/src/corelibs/U2Core/src/globals/DBXRefRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,7 +26,6 @@ #include <QMap> #include <QObject> -#include <QScriptValue> #include <QScriptEngine> #include <QStringList> @@ -34,10 +33,10 @@ namespace U2 { class U2CORE_EXPORT DBXRefInfo { public: - DBXRefInfo(){} + DBXRefInfo() {} DBXRefInfo(const QString& _name, const QString& _url, - const QString& _fileUrl, const QString& _comment) - : name(_name), url(_url), fileUrl(_fileUrl), comment(_comment){} + const QString& _fileUrl, const QString& _comment) + : name(_name), url(_url), fileUrl(_fileUrl), comment(_comment) {} QString name; QString url; @@ -56,15 +55,15 @@ class U2CORE_EXPORT DBXRefRegistry : public QObject { public: DBXRefRegistry(QObject* p = NULL); - Q_INVOKABLE DBXRefInfo getRefByKey(const QString& dbxrefKey)const {return refsByKey.value(dbxrefKey);} + Q_INVOKABLE DBXRefInfo getRefByKey(const QString& dbxrefKey)const { return refsByKey.value(dbxrefKey); } static void setupToEngine(QScriptEngine *engine); - const QMap<QString,DBXRefInfo>& getEntries() { return refsByKey; } + const QMap<QString, DBXRefInfo>& getEntries() { return refsByKey; } private: static QScriptValue toScriptValue(QScriptEngine *engine, DBXRefRegistry* const &in); static void fromScriptValue(const QScriptValue &object, DBXRefRegistry* &out); - QMap<QString,DBXRefInfo> refsByKey; + QMap<QString, DBXRefInfo> refsByKey; }; }//namespace Q_DECLARE_METATYPE(U2::DBXRefRegistry*) diff --git a/src/corelibs/U2Core/src/globals/DataBaseRegistry.cpp b/src/corelibs/U2Core/src/globals/DataBaseRegistry.cpp index 7396106e0d6ec6b95894ccc9822f47ba78cf7ae3..3a622bb1dfc5ba84ff9c0478f90c42ed358cbde5 100644 --- a/src/corelibs/U2Core/src/globals/DataBaseRegistry.cpp +++ b/src/corelibs/U2Core/src/globals/DataBaseRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/DataBaseRegistry.h b/src/corelibs/U2Core/src/globals/DataBaseRegistry.h index 7058899139872617185ffd7f5754c0842bd3abe5..13850f4d44f428fcc761458a94bc292a586c2514 100644 --- a/src/corelibs/U2Core/src/globals/DataBaseRegistry.h +++ b/src/corelibs/U2Core/src/globals/DataBaseRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -27,7 +27,6 @@ #include <QList> #include <QObject> -#include <U2Core/global.h> #include <U2Core/AnnotationData.h> #include <U2Core/Task.h> @@ -35,14 +34,13 @@ namespace U2 { class HttpRequest { public: - virtual void sendRequest(const QString &program,const QString &query) = 0; + virtual void sendRequest(const QString &program, const QString &query) = 0; virtual QList<SharedAnnotationData> getAnnotations() { return result; } virtual QString getError() { return error; } - virtual QByteArray getOutputFile() {return NULL;} + virtual QByteArray getOutputFile() { return NULL; } virtual ~HttpRequest() {}; - bool connectionError; protected: - HttpRequest(Task *_task):connectionError(false),error(""),task(_task){}; + HttpRequest(Task *_task) :error(""), task(_task) {}; QString error; QList<SharedAnnotationData> result; Task *task; @@ -54,17 +52,17 @@ public: virtual HttpRequest * getRequest(Task *t) = 0; }; -class U2CORE_EXPORT DataBaseRegistry:public QObject{ +class U2CORE_EXPORT DataBaseRegistry :public QObject { Q_OBJECT public: - DataBaseRegistry(QObject *o = 0); + DataBaseRegistry(QObject *o = NULL); ~DataBaseRegistry(); bool registerDataBase(DataBaseFactory *f, const QString &id); DataBaseFactory *getFactoryById(const QString& id); bool isRegistered(const QString& id); private: - QMap<QString,DataBaseFactory *> factories; + QMap<QString, DataBaseFactory *> factories; }; } diff --git a/src/corelibs/U2Core/src/globals/DataPathRegistry.cpp b/src/corelibs/U2Core/src/globals/DataPathRegistry.cpp index 5ecedfdf92f54c1deff725065e0cd5707ce330c4..f4e273287a7d9dfb2289e6fac4456e7279d9b4a2 100644 --- a/src/corelibs/U2Core/src/globals/DataPathRegistry.cpp +++ b/src/corelibs/U2Core/src/globals/DataPathRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -182,6 +182,7 @@ bool U2DataPathRegistry::registerEntry(U2DataPath *dp) { } void U2DataPathRegistry::unregisterEntry(const QString &name) { + CHECK(registry.contains(name), ); delete registry.take(name); } diff --git a/src/corelibs/U2Core/src/globals/DataPathRegistry.h b/src/corelibs/U2Core/src/globals/DataPathRegistry.h index 9eda057008eba7eb033bc69b7314c40419894032..8b702c762c073e0ef9ee107ade92553ee12d2660 100644 --- a/src/corelibs/U2Core/src/globals/DataPathRegistry.h +++ b/src/corelibs/U2Core/src/globals/DataPathRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/ExternalToolRegistry.cpp b/src/corelibs/U2Core/src/globals/ExternalToolRegistry.cpp index 066e8f502aa4189da7b78bf00e657e9ce105d91b..6d8259987e638703aa37229c56b8a870d4bf5c7a 100644 --- a/src/corelibs/U2Core/src/globals/ExternalToolRegistry.cpp +++ b/src/corelibs/U2Core/src/globals/ExternalToolRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,6 +19,8 @@ * MA 02110-1301, USA. */ +#include <QRegularExpression> + #include "ExternalToolRegistry.h" #include <U2Core/AppContext.h> @@ -27,6 +29,7 @@ #include <U2Core/U2SafePoints.h> #include <U2Core/Log.h> + namespace U2 { //////////////////////////////////////// @@ -35,13 +38,16 @@ const QString ExternalToolValidation::DEFAULT_DESCR_KEY = "DEFAULT_DESCR"; //////////////////////////////////////// //ExternalTool -ExternalTool::ExternalTool(QString _name, QString _path) - : name(_name), +ExternalTool::ExternalTool(QString _id, QString _name, QString _path) + : id(_id), + name(_name), path(_path), isValidTool(false), toolKitName(_name), muted(false), - isModuleTool(false) + isModuleTool(false), + isCustomTool(false), + isRunnerTool(false) { if (NULL != AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/cmdline.png"); @@ -50,7 +56,72 @@ ExternalTool::ExternalTool(QString _name, QString _path) } } -ExternalTool::~ExternalTool() { +const QString &ExternalTool::getId() const { + return id; +} + +const QString &ExternalTool::getName() const { + return name; +} + +const QString &ExternalTool::getPath() const { + return path; +} + +const QIcon &ExternalTool::getIcon() const { + return icon; +} + +const QIcon &ExternalTool::getGrayIcon() const { + return grayIcon; +} + +const QIcon &ExternalTool::getWarnIcon() const { + return warnIcon; +} + +const QString &ExternalTool::getDescription() const { + return description; +} + +const QString &ExternalTool::getToolRunnerProgramId() const { + return toolRunnerProgram; +} + +QStringList ExternalTool::getToolRunnerAdditionalOptions() const { + return QStringList(); +} + +const QString &ExternalTool::getExecutableFileName() const { + return executableFileName; +} + +const QStringList &ExternalTool::getValidationArguments() const { + return validationArguments; +} + +const QString &ExternalTool::getValidMessage() const { + return validMessage; +} + +const QString &ExternalTool::getVersion() const { + return version; +} + +const QString &ExternalTool::getPredefinedVersion() const { + return predefinedVersion; +} + +const QRegExp &ExternalTool::getVersionRegExp() const { + return versionRegExp; +} + +const QString &ExternalTool::getToolKitName() const { + return toolKitName; +} + +const StrStrMap &ExternalTool::getErrorDescriptions() const { + return errorDescriptions; } const StrStrMap &ExternalTool::getAdditionalInfo() const { @@ -61,27 +132,65 @@ QStringList ExternalTool::getAdditionalPaths() const { return QStringList(); } +QStringList ExternalTool::getRunParameters() const { + return QStringList(); +} + +void ExternalTool::extractAdditionalParameters(const QString & /*output*/) { + // do nothing +} + +void ExternalTool::performAdditionalChecks(const QString& /*toolPath*/) { + // do nothing +} + +ExternalToolValidation ExternalTool::getToolValidation() { + ExternalToolValidation result(toolRunnerProgram, executableFileName, validationArguments, validMessage, errorDescriptions); + return result; +} + +const QList<ExternalToolValidation> &ExternalTool::getToolAdditionalValidations() const { + return additionalValidators; +} + +const QStringList &ExternalTool::getDependencies() const { + return dependencies; +} + +const QString& ExternalTool::getAdditionalErrorMessage() const { + return additionalErrorMesage; +} + +void ExternalTool::setAdditionalErrorMessage(const QString& message) { + additionalErrorMesage = message; +} + +bool ExternalTool::hasAdditionalErrorMessage() const { + return !additionalErrorMesage.isEmpty(); +} + void ExternalTool::setPath(const QString& _path) { - if (path!=_path) { - path=_path; + if (path != _path) { + path = _path; emit si_pathChanged(); } } -void ExternalTool::setValid(bool _isValid){ - isValidTool=_isValid; + +void ExternalTool::setValid(bool _isValid) { + isValidTool = _isValid; emit si_toolValidationStatusChanged(isValidTool); } + void ExternalTool::setVersion(const QString& _version) { - version=_version; + version = _version; } void ExternalTool::setAdditionalInfo(const StrStrMap &newAdditionalInfo) { additionalInfo = newAdditionalInfo; } -ExternalToolValidation ExternalTool::getToolValidation() { - ExternalToolValidation result(toolRunnerProgramm, executableFileName, validationArguments, validMessage, errorDescriptions); - return result; +bool ExternalTool::isValid() const { + return isValidTool; } bool ExternalTool::isMuted() const { @@ -93,14 +202,26 @@ bool ExternalTool::isMuted() const { #endif } +bool ExternalTool::isModule() const { + return isModuleTool; +} + +bool ExternalTool::isCustom() const { + return isCustomTool; +} + +bool ExternalTool::isRunner() const { + return isRunnerTool; +} + //////////////////////////////////////// //ExternalToolValidationListener -ExternalToolValidationListener::ExternalToolValidationListener(const QString& toolName) { - toolNames << toolName; +ExternalToolValidationListener::ExternalToolValidationListener(const QString& toolId) { + toolIds << toolId; } -ExternalToolValidationListener::ExternalToolValidationListener(const QStringList& _toolNames) { - toolNames = _toolNames; +ExternalToolValidationListener::ExternalToolValidationListener(const QStringList& _toolIds) { + toolIds = _toolIds; } void ExternalToolValidationListener::sl_validationTaskStateChanged() { @@ -122,26 +243,59 @@ ExternalToolRegistry::~ExternalToolRegistry() { qDeleteAll(registry.values()); } -ExternalTool* ExternalToolRegistry::getByName(const QString& id) -{ +ExternalTool* ExternalToolRegistry::getByName(const QString& name) const { + ExternalTool* result = nullptr; + foreach(ExternalTool* tool, registry.values()) { + CHECK_CONTINUE(tool->getName() == name); + + result = tool; + break; + } + + return result; +} + +ExternalTool* ExternalToolRegistry::getById(const QString& id) const { return registry.value(id, NULL); } -bool ExternalToolRegistry::registerEntry(ExternalTool *t){ - if (registry.contains(t->getName())) { +QString ExternalToolRegistry::getToolNameById(const QString& id) const { + ExternalTool* et = getById(id); + CHECK(nullptr != et, QString()); + + return et->getName(); +} + +namespace { +bool containsCaseInsensitive(const QList<QString>& values, const QString& value) { + bool result = false; + foreach(const QString& v, values) { + CHECK_CONTINUE(QString::compare(v, value, Qt::CaseInsensitive) == 0); + result = true; + break; + }; + return result; +} +} + +bool ExternalToolRegistry::registerEntry(ExternalTool *t) { + if (containsCaseInsensitive(registry.keys(), t->getId())) { return false; } else { registryOrder.append(t); - registry.insert(t->getName(), t); + registry.insert(t->getId(), t); + emit si_toolAdded(t->getId()); return true; } } void ExternalToolRegistry::unregisterEntry(const QString &id){ - ExternalTool* et = registry.take(id); - if(et!=NULL){ + CHECK(registry.contains(id), ); + emit si_toolIsAboutToBeRemoved(id); + ExternalTool *et = registry.take(id); + if (nullptr != et) { int idx = registryOrder.indexOf(et); - if (idx!=-1){ + if (-1 != idx){ registryOrder.removeAt(idx); } diff --git a/src/corelibs/U2Core/src/globals/ExternalToolRegistry.h b/src/corelibs/U2Core/src/globals/ExternalToolRegistry.h index 8f29248a2cd7a466796ddc02eb90733b13cdafc8..9fa6b504425362e334549162834f2398e1fbbbbc 100644 --- a/src/corelibs/U2Core/src/globals/ExternalToolRegistry.h +++ b/src/corelibs/U2Core/src/globals/ExternalToolRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -29,8 +29,6 @@ #include <QStringList> #include <QVariant> -#include <U2Core/IdRegistry.h> -#include <U2Core/global.h> #include <U2Core/StrPackUtils.h> namespace U2 { @@ -41,11 +39,10 @@ public: ExternalToolValidation(const QString& _toolRunnerProgram, const QString& _executableFile, const QStringList& _arguments, const QString& _expectedMsg, const StrStrMap& _possibleErrorsDescr = StrStrMap()) :toolRunnerProgram(_toolRunnerProgram) - ,executableFile(_executableFile) - ,arguments(_arguments) - ,expectedMsg(_expectedMsg) - ,possibleErrorsDescr(_possibleErrorsDescr) - {} + , executableFile(_executableFile) + , arguments(_arguments) + , expectedMsg(_expectedMsg) + , possibleErrorsDescr(_possibleErrorsDescr) {} public: QString toolRunnerProgram; @@ -60,58 +57,68 @@ public: class U2CORE_EXPORT ExternalTool : public QObject { Q_OBJECT public: - ExternalTool(QString name, QString path = ""); - ~ExternalTool(); - - const QString& getName() const { return name; } - const QString& getPath() const { return path; } - const QIcon& getIcon() const { return icon; } - const QIcon& getGrayIcon() const { return grayIcon; } - const QIcon& getWarnIcon() const { return warnIcon; } - const QString& getDescription() const { return description; } - const QString& getToolRunnerProgram() const { return toolRunnerProgramm; } - const virtual QStringList getToolRunnerAdditionalOptions() { return QStringList();} - const QString& getExecutableFileName() const { return executableFileName; } - const QStringList& getValidationArguments() const { return validationArguments; } - const QString& getValidMessage() const { return validMessage; } - const QString& getVersion() const { return version; } - const QRegExp& getVersionRegExp() const { return versionRegExp; } - const QString& getToolKitName() const { return toolKitName; } - const StrStrMap& getErrorDescriptions() const { return errorDescriptions; } + ExternalTool(QString id, QString name, QString path); + + const QString& getId() const; + const QString& getName() const; + const QString& getPath() const; + const QIcon& getIcon() const; + const QIcon& getGrayIcon() const; + const QIcon& getWarnIcon() const; + const QString& getDescription() const; + const QString& getToolRunnerProgramId() const; + virtual QStringList getToolRunnerAdditionalOptions() const; + const QString& getExecutableFileName() const; + const QStringList& getValidationArguments() const; + const QString& getValidMessage() const; + const QString& getVersion() const; + const QString& getPredefinedVersion() const; + const QRegExp& getVersionRegExp() const; + const QString& getToolKitName() const; + const StrStrMap& getErrorDescriptions() const; const StrStrMap& getAdditionalInfo() const; virtual QStringList getAdditionalPaths() const; + virtual QStringList getRunParameters() const; - virtual void getAdditionalParameters(const QString& output) { Q_UNUSED(output) } + virtual void extractAdditionalParameters(const QString& output); + virtual void performAdditionalChecks(const QString& toolPath); ExternalToolValidation getToolValidation(); - const QList<ExternalToolValidation>& getToolAdditionalValidations() const { return additionalValidators; } - const QStringList& getDependencies() const { return dependencies; } + const QList<ExternalToolValidation>& getToolAdditionalValidations() const; + const QStringList& getDependencies() const; + const QString& getAdditionalErrorMessage() const; + void setAdditionalErrorMessage(const QString& message); + bool hasAdditionalErrorMessage() const; void setPath(const QString& _path); void setValid(bool _isValid); void setVersion(const QString& _version); void setAdditionalInfo(const StrStrMap &additionalInfo); - bool isValid() const { return isValidTool; } + bool isValid() const; bool isMuted() const; - bool isModule() const { return isModuleTool; } + bool isModule() const; + bool isCustom() const; + bool isRunner() const; signals: void si_pathChanged(); void si_toolValidationStatusChanged(bool isValid); protected: + QString id; // tool id QString name; // tool name QString path; // tool path QIcon icon; // valid tool icon QIcon grayIcon; // not set tool icon QIcon warnIcon; // invalid tool icon QString description; // tool description - QString toolRunnerProgramm; // starter program (e.g. python for scripts) + QString toolRunnerProgram; // starter program (e.g. python for scripts) QString executableFileName; // executable file name (without path) QStringList validationArguments; // arguments to validation run (such as --version) QString validMessage; // expected message in the validation run output QString version; // tool version + QString predefinedVersion; // tool's predefined version, this value is used if tool is not validated and there is no possibility to get actual version QRegExp versionRegExp; // RegExp to get the version from the validation run output bool isValidTool; // tool state QString toolKitName; // toolkit which includes the tool @@ -119,30 +126,35 @@ protected: StrStrMap additionalInfo; // any additional info, it is specific for the extenal tool QList<ExternalToolValidation> additionalValidators; // validators for the environment state (e.g. some external program should be installed) QStringList dependencies; // a list of dependencies for the tool of another external tools (e.g. python for python scripts). + QString additionalErrorMesage; // a string, which contains an error message, specific for each tool bool muted; // a muted tool doesn't write its validation error to the log bool isModuleTool; // a module tool is a part of another external tool + bool isCustomTool; // the tool is described in a user-written config file and imported to UGENE + bool isRunnerTool; // the tool could be used as script-runner }; // ExternalTool class U2CORE_EXPORT ExternalToolModule : public ExternalTool { Q_OBJECT public: - ExternalToolModule(const QString& name) : - ExternalTool(name, "") { isModuleTool = true; } + ExternalToolModule(const QString& id, const QString& name) : + ExternalTool(id, name, "") { + isModuleTool = true; + } }; class U2CORE_EXPORT ExternalToolValidationListener : public QObject { Q_OBJECT public: - ExternalToolValidationListener(const QString& toolName = QString()); - ExternalToolValidationListener(const QStringList& toolNames); + ExternalToolValidationListener(const QString& toolId = QString()); + ExternalToolValidationListener(const QStringList& toolIds); - const QStringList& getToolNames() const { return toolNames; } + const QStringList& getToolIds() const { return toolIds; } void validationFinished() { emit si_validationComplete(); } - void setToolState(const QString& toolName, bool isValid) { toolStates.insert(toolName, isValid); } - bool getToolState(const QString& toolName) const { return toolStates.value(toolName, false); } + void setToolState(const QString& toolId, bool isValid) { toolStates.insert(toolId, isValid); } + bool getToolState(const QString& toolId) const { return toolStates.value(toolId, false); } signals: void si_validationComplete(); @@ -151,7 +163,7 @@ public slots: void sl_validationTaskStateChanged(); private: - QStringList toolNames; + QStringList toolIds; QMap<QString, bool> toolStates; }; @@ -177,10 +189,10 @@ public: virtual void check(const QString& toolName, const QString& toolPath, ExternalToolValidationListener* listener) = 0; virtual void check(const QStringList& toolNames, const StrStrMap& toolPaths, ExternalToolValidationListener* listener) = 0; - virtual void validate(const QString& toolName, ExternalToolValidationListener* listener = NULL) = 0; - virtual void validate(const QString& toolName, const QString& path, ExternalToolValidationListener* listener = NULL) = 0; - virtual void validate(const QStringList& toolNames, ExternalToolValidationListener* listener = NULL) = 0; - virtual void validate(const QStringList& toolNames, const StrStrMap& toolPaths, ExternalToolValidationListener* listener = NULL) = 0; + virtual void validate(const QString& toolName, ExternalToolValidationListener* listener = nullptr) = 0; + virtual void validate(const QString& toolName, const QString& path, ExternalToolValidationListener* listener = nullptr) = 0; + virtual void validate(const QStringList& toolNames, ExternalToolValidationListener* listener = nullptr) = 0; + virtual void validate(const QStringList& toolNames, const StrStrMap& toolPaths, ExternalToolValidationListener* listener = nullptr) = 0; virtual bool isValid(const QString& toolName) const = 0; virtual ExternalToolState getToolState(const QString& toolName) const = 0; @@ -197,13 +209,15 @@ public: ExternalToolRegistry(); ~ExternalToolRegistry(); - ExternalTool* getByName(const QString& id); + ExternalTool* getByName(const QString& name) const; + ExternalTool* getById(const QString& id) const; + QString getToolNameById(const QString& id) const; bool registerEntry(ExternalTool* t); void unregisterEntry(const QString& id); - void setToolkitDescription(const QString& toolkit, const QString& desc) {toolkits[toolkit] = desc;} - QString getToolkitDescription(const QString& toolkit) const {return toolkits[toolkit];} + void setToolkitDescription(const QString& toolkit, const QString& desc) { toolkits[toolkit] = desc; } + QString getToolkitDescription(const QString& toolkit) const { return toolkits[toolkit]; } QList<ExternalTool*> getAllEntries() const; QList< QList<ExternalTool*> > getAllEntriesSortedByToolKits() const; @@ -211,6 +225,10 @@ public: void setManager(ExternalToolManager* manager); ExternalToolManager* getManager() const; +signals: + void si_toolAdded(const QString &id); + void si_toolIsAboutToBeRemoved(const QString &id); + protected: QList<ExternalTool*> registryOrder; QMap<QString, ExternalTool*> registry; @@ -220,7 +238,7 @@ protected: }; // ExternalToolRegistry -class U2CORE_EXPORT DefaultExternalToolValidations{ +class U2CORE_EXPORT DefaultExternalToolValidations { public: static ExternalToolValidation pythonValidation(); static ExternalToolValidation rValidation(); diff --git a/src/corelibs/U2Core/src/globals/FormatSettings.cpp b/src/corelibs/U2Core/src/globals/FormatSettings.cpp index 89c9e39583c53cddd44cd0a610d409f23588dc6f..c417f5c45aeb8b681294452f2516e1a701be60cb 100644 --- a/src/corelibs/U2Core/src/globals/FormatSettings.cpp +++ b/src/corelibs/U2Core/src/globals/FormatSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/FormatSettings.h b/src/corelibs/U2Core/src/globals/FormatSettings.h index 94e8caf62532d9f0171625951e8e52e1403621c8..0629d02448349ab256ccc6ac00e08eb367697c4a 100644 --- a/src/corelibs/U2Core/src/globals/FormatSettings.h +++ b/src/corelibs/U2Core/src/globals/FormatSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/GUrl.cpp b/src/corelibs/U2Core/src/globals/GUrl.cpp index 41dffbf0b5d2e4da2c2331193257c356061b8812..fa7bf4a3742361bd6dca0cccd7e373595051e4ad 100644 --- a/src/corelibs/U2Core/src/globals/GUrl.cpp +++ b/src/corelibs/U2Core/src/globals/GUrl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/GUrl.h b/src/corelibs/U2Core/src/globals/GUrl.h index e3c0b27a7a4dbe68d4d57690d79933e7878806f2..bc2f9b812709b7c61e4d75d76fd5ae1afc52dad3 100644 --- a/src/corelibs/U2Core/src/globals/GUrl.h +++ b/src/corelibs/U2Core/src/globals/GUrl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/IdRegistry.h b/src/corelibs/U2Core/src/globals/IdRegistry.h index f118913da70ea168561034cff0ef8368de40cbc3..ecb536de83e1526582760368c893bbd4d4daec9b 100644 --- a/src/corelibs/U2Core/src/globals/IdRegistry.h +++ b/src/corelibs/U2Core/src/globals/IdRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/Identifiable.h b/src/corelibs/U2Core/src/globals/Identifiable.h index 61b40c74845a538f791f5376115fdc28cbc80fd8..35b22aca5ffb87784c1bb5b7ed41a9747859bbd5 100644 --- a/src/corelibs/U2Core/src/globals/Identifiable.h +++ b/src/corelibs/U2Core/src/globals/Identifiable.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,7 +32,7 @@ template<typename T> class Identifiable { public: Identifiable(const T& _id) : id(_id) {} - const T& getId() const {return id;} + const T& getId() const { return id; } private: T id; diff --git a/src/corelibs/U2Core/src/globals/L10n.h b/src/corelibs/U2Core/src/globals/L10n.h index e79577830d16e55a53d701690e88298cbe0da2dc..360c97c27dd0397600a39cb90c078624e3b5d282 100644 --- a/src/corelibs/U2Core/src/globals/L10n.h +++ b/src/corelibs/U2Core/src/globals/L10n.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/Log.cpp b/src/corelibs/U2Core/src/globals/Log.cpp index d783a44c8e335544262204e0487dc77ef2171825..3e720ee6b41757ab7bc59c9fbe0f1dd4902c3926 100644 --- a/src/corelibs/U2Core/src/globals/Log.cpp +++ b/src/corelibs/U2Core/src/globals/Log.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/Log.h b/src/corelibs/U2Core/src/globals/Log.h index 707b3fe5da5aa8894794713be22ccbbc97393f1c..32b134cb6022ddf9152a3020c0dee3a9026ffa65 100644 --- a/src/corelibs/U2Core/src/globals/Log.h +++ b/src/corelibs/U2Core/src/globals/Log.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/LogCache.cpp b/src/corelibs/U2Core/src/globals/LogCache.cpp index d35e3788474250d24ec9aec65c541c402d6d4a80..6650505a6559878dc10331eba5f7771c20d366ee 100644 --- a/src/corelibs/U2Core/src/globals/LogCache.cpp +++ b/src/corelibs/U2Core/src/globals/LogCache.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/LogCache.h b/src/corelibs/U2Core/src/globals/LogCache.h index 52b4a74561bd4489983bd1bb78970af87263640d..c9e3d84614efd013f5b95138567c24001ca8fee8 100644 --- a/src/corelibs/U2Core/src/globals/LogCache.h +++ b/src/corelibs/U2Core/src/globals/LogCache.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,7 +24,6 @@ #include <U2Core/Log.h> -#include <QFile> #include <QFileInfo> #include <QReadWriteLock> @@ -41,9 +40,9 @@ public: class U2CORE_EXPORT LogFilter { public: - LogFilter(){} + LogFilter() {} QList<LogFilterItem> filters; - bool isEmpty() const {return filters.isEmpty();} + bool isEmpty() const { return filters.isEmpty(); } bool matches(const LogMessage& msg) const; QString selectEffectiveCategory(const LogMessage& msg) const; @@ -57,7 +56,7 @@ public: virtual ~LogCache(); static void setAppGlobalInstance(LogCache* cache); - static LogCache* getAppGlobalInstance() {return appGlobalCache;} + static LogCache* getAppGlobalInstance() { return appGlobalCache; } virtual void onMessage(const LogMessage& msg); QList<LogMessage> getLastMessages(int count = -1); @@ -80,13 +79,13 @@ class U2CORE_EXPORT LogCacheExt : public LogCache { public: LogCacheExt(); - void setConsoleOutputEnabled(bool enabled) {consoleEnabled = enabled;} - bool isConsoleOutputEnabled() const {return consoleEnabled;} + void setConsoleOutputEnabled(bool enabled) { consoleEnabled = enabled; } + bool isConsoleOutputEnabled() const { return consoleEnabled; } bool setFileOutputEnabled(const QString& file); void setFileOutputDisabled(); - bool isFileOutputEnabled() const {return fileEnabled;} - QString getFileOutputPath() const {return QFileInfo(file).canonicalFilePath();} + bool isFileOutputEnabled() const { return fileEnabled; } + QString getFileOutputPath() const { return QFileInfo(file).canonicalFilePath(); } virtual void onMessage(const LogMessage& msg); diff --git a/src/corelibs/U2Core/src/globals/NetworkConfiguration.cpp b/src/corelibs/U2Core/src/globals/NetworkConfiguration.cpp index c1e067f604b556d2f0eb4a0cbccd6efb958a9b1b..2cd0dd5c8b36b86a01dba2d8a9fe855397f7309b 100644 --- a/src/corelibs/U2Core/src/globals/NetworkConfiguration.cpp +++ b/src/corelibs/U2Core/src/globals/NetworkConfiguration.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/NetworkConfiguration.h b/src/corelibs/U2Core/src/globals/NetworkConfiguration.h index 0a70fbb22484829f6fcfd1d6b9b2f994ed0a486f..34a43c65a669c36b46b7aeac47ac1c707d7e62f8 100644 --- a/src/corelibs/U2Core/src/globals/NetworkConfiguration.h +++ b/src/corelibs/U2Core/src/globals/NetworkConfiguration.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/PasswordStorage.cpp b/src/corelibs/U2Core/src/globals/PasswordStorage.cpp index bcb314d3853a34262e5d7f060fdb91cffa7c0a4f..ffbfaf5d2851e22c85299a7720cf4e080fc555aa 100644 --- a/src/corelibs/U2Core/src/globals/PasswordStorage.cpp +++ b/src/corelibs/U2Core/src/globals/PasswordStorage.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -21,7 +21,6 @@ #include <U2Core/AppContext.h> #include <U2Core/Settings.h> -#include <U2Core/U2SafePoints.h> #include "PasswordStorage.h" diff --git a/src/corelibs/U2Core/src/globals/PasswordStorage.h b/src/corelibs/U2Core/src/globals/PasswordStorage.h index 319098749fa5e708705a45baac5e7cffc254b406..8b7564cd98b0f0d5a9e9cea2151112cbd757a79d 100644 --- a/src/corelibs/U2Core/src/globals/PasswordStorage.h +++ b/src/corelibs/U2Core/src/globals/PasswordStorage.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/PluginModel.cpp b/src/corelibs/U2Core/src/globals/PluginModel.cpp index d1c1adf9940d1e98f37945f89d8a3457cc50a5d6..569a0c7454ec5c2341c19f023de93e7c2900674d 100644 --- a/src/corelibs/U2Core/src/globals/PluginModel.cpp +++ b/src/corelibs/U2Core/src/globals/PluginModel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/PluginModel.h b/src/corelibs/U2Core/src/globals/PluginModel.h index f68b6f4b9985977d36b8a2a565533c401e632b92..6c8e6b5aab5a9add730e585931b3d78f7e121643 100644 --- a/src/corelibs/U2Core/src/globals/PluginModel.h +++ b/src/corelibs/U2Core/src/globals/PluginModel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,7 +26,6 @@ #include <QObject> #include <QString> -#include <U2Core/global.h> #include <U2Core/GUrl.h> namespace U2 { @@ -48,7 +47,7 @@ class Task; #define U2_PLUGIN_FAIL_MASSAGE_NAME "ugene_plugin_fail_message" typedef Plugin* (*PLUG_INIT_FUNC) (); -typedef bool (*PLUG_VERIFY_FUNC) (); +typedef bool(*PLUG_VERIFY_FUNC) (); typedef QString * (*PLUG_FAIL_MESSAGE_FUNC) (); enum PluginState { @@ -62,27 +61,27 @@ public: Plugin(const QString & _name, const QString& _desc, const bool _isFree = true, PluginState _state = PluginState_Loaded); //plugin is deallocated by plugin_support service when it's removed or on application shutting down - virtual ~Plugin(){} + virtual ~Plugin() {} const QString & getId() const; void setId(const QString &value); - const QString& getName() const {return name;} + const QString& getName() const { return name; } - const QString& getDescription() const {return description;} + const QString& getDescription() const { return description; } - const GUrl& getLicensePath() const {return licensePath;} + const GUrl& getLicensePath() const { return licensePath; } void setLicensePath(const QString& licensePath); - PluginState getState() const {return state;} + PluginState getState() const { return state; } - bool isFree() const {return isFreeValue;} - bool isLicenseAccepted() const {return isLicenseAcceptedValue;} + bool isFree() const { return isFreeValue; } + bool isLicenseAccepted() const { return isLicenseAcceptedValue; } void acceptLicense(); // returns list of services provided by the plugin // after plugin is loaded all services from this list are automatically registered - const QList<Service*>& getServices() const {return services;} + const QList<Service*>& getServices() const { return services; } protected: QString id; @@ -101,18 +100,10 @@ class U2CORE_EXPORT PluginSupport : public QObject { public: virtual const QList<Plugin*>& getPlugins() = 0; - - virtual Task* addPluginTask(const QString& pathToPlugin) = 0; - - //plugin will not be removed from the plugin list during the next app run - virtual void setRemoveFlag(Plugin* p, bool v) = 0; - virtual bool getRemoveFlag(Plugin* p) const = 0; virtual void setLicenseAccepted(Plugin* p) = 0; virtual bool isAllPluginsLoaded() const = 0; signals: - void si_pluginAdded(Plugin*); - void si_pluginRemoveFlagChanged(Plugin*); void si_allStartUpPluginsLoaded(); }; diff --git a/src/corelibs/U2Core/src/globals/ProjectFilterTaskRegistry.cpp b/src/corelibs/U2Core/src/globals/ProjectFilterTaskRegistry.cpp index 886d9ae53e9c95c273ff32b19ad174adfc88172e..a216f1303deec1abf0747ceff3a16b1178ae2123 100644 --- a/src/corelibs/U2Core/src/globals/ProjectFilterTaskRegistry.cpp +++ b/src/corelibs/U2Core/src/globals/ProjectFilterTaskRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/ProjectFilterTaskRegistry.h b/src/corelibs/U2Core/src/globals/ProjectFilterTaskRegistry.h index ce03bf6f3a48b53b25b35d5afb207f1386310815..c5c5f85031cdee230678b751fcf38903c20c9d69 100644 --- a/src/corelibs/U2Core/src/globals/ProjectFilterTaskRegistry.h +++ b/src/corelibs/U2Core/src/globals/ProjectFilterTaskRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/ProjectService.cpp b/src/corelibs/U2Core/src/globals/ProjectService.cpp index 951dea3fc1cc5d1c3b5019f3b68064a04295ddb6..cfc656190dbd196aa5abd121a157967048828d22 100644 --- a/src/corelibs/U2Core/src/globals/ProjectService.cpp +++ b/src/corelibs/U2Core/src/globals/ProjectService.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/ProjectService.h b/src/corelibs/U2Core/src/globals/ProjectService.h index abfe87624b40a321ced733c1a2c12b7d02f34772..6f20aba2e32908b8ad633f558c4694591ed32078 100644 --- a/src/corelibs/U2Core/src/globals/ProjectService.h +++ b/src/corelibs/U2Core/src/globals/ProjectService.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,36 +23,33 @@ #define _U2_PROJECT_SERVICE_H_ #include <U2Core/ProjectModel.h> -#include <U2Core/ServiceModel.h> #include <U2Core/ServiceTypes.h> #include <U2Core/Task.h> -#include <QAction> - namespace U2 { - enum SaveProjectTaskKind { - SaveProjectTaskKind_SaveProjectOnly, - SaveProjectTaskKind_SaveProjectAndDocuments, - SaveProjectTaskKind_SaveProjectAndDocumentsAskEach - }; +enum SaveProjectTaskKind { + SaveProjectTaskKind_SaveProjectOnly, + SaveProjectTaskKind_SaveProjectAndDocuments, + SaveProjectTaskKind_SaveProjectAndDocumentsAskEach +}; - class U2CORE_EXPORT ProjectService : public Service { - public: - ProjectService(const QString& sname, const QString& sdesc) - : Service(Service_Project, sname, sdesc, QList<ServiceType>(), ServiceFlag_Singleton) {} +class U2CORE_EXPORT ProjectService : public Service { +public: + ProjectService(const QString& sname, const QString& sdesc) + : Service(Service_Project, sname, sdesc, QList<ServiceType>(), ServiceFlag_Singleton) {} - virtual Project* getProject() const = 0; + virtual Project* getProject() const = 0; - virtual Task* saveProjectTask(SaveProjectTaskKind kind) = 0; + virtual Task* saveProjectTask(SaveProjectTaskKind kind) = 0; - virtual Task* closeProjectTask() = 0; + virtual Task* closeProjectTask() = 0; - // hack to work around ambigous shortcuts - virtual void enableSaveAction(bool e) = 0; - }; + // hack to work around ambigous shortcuts + virtual void enableSaveAction(bool e) = 0; +}; }//namespace diff --git a/src/corelibs/U2Core/src/globals/ProjectTreeControllerModeSettings.cpp b/src/corelibs/U2Core/src/globals/ProjectTreeControllerModeSettings.cpp index 87057747dd0ce0e344ece14403d910b224794a28..254ca776b4fcef1974396fde23ab9170b5b0c2f7 100644 --- a/src/corelibs/U2Core/src/globals/ProjectTreeControllerModeSettings.cpp +++ b/src/corelibs/U2Core/src/globals/ProjectTreeControllerModeSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/ProjectTreeControllerModeSettings.h b/src/corelibs/U2Core/src/globals/ProjectTreeControllerModeSettings.h index 84bde152f32090818bbcb148101e320e7eb2da01..595c4c0fbd54e3c2fe316fae79b89d0fdb90bc11 100644 --- a/src/corelibs/U2Core/src/globals/ProjectTreeControllerModeSettings.h +++ b/src/corelibs/U2Core/src/globals/ProjectTreeControllerModeSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/ResourceTracker.cpp b/src/corelibs/U2Core/src/globals/ResourceTracker.cpp index 2b84f60a85b087ca7963015e9df15ea41fb45fca..cb0a4581edd307499e7a4471d0e5f069c52d7694 100644 --- a/src/corelibs/U2Core/src/globals/ResourceTracker.cpp +++ b/src/corelibs/U2Core/src/globals/ResourceTracker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -21,7 +21,6 @@ #include "ResourceTracker.h" -#include <U2Core/Log.h> #include "Task.h" namespace U2 { diff --git a/src/corelibs/U2Core/src/globals/ResourceTracker.h b/src/corelibs/U2Core/src/globals/ResourceTracker.h index f83ce12ed6aa334cb3fb4b6b6b396711eea54b21..0089c40aeb06ebffbf554bc767eeab9942c05bd8 100644 --- a/src/corelibs/U2Core/src/globals/ResourceTracker.h +++ b/src/corelibs/U2Core/src/globals/ResourceTracker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/ScriptingToolRegistry.cpp b/src/corelibs/U2Core/src/globals/ScriptingToolRegistry.cpp index b97759e56bee6e3831d3673d3bf094733028f8b3..dab73c904c1e55a1a199efd670aa5d5e93842394 100644 --- a/src/corelibs/U2Core/src/globals/ScriptingToolRegistry.cpp +++ b/src/corelibs/U2Core/src/globals/ScriptingToolRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -29,22 +29,22 @@ namespace U2 { //////////////////////////////////////// //ScriptingTool -ScriptingTool::ScriptingTool(QString _name, QString _path, const QStringList& _runParams) : name(_name), path(_path), runParams(_runParams) { -} +ScriptingTool::ScriptingTool(const QString& _id, const QString& _name, const QString& _path, const QStringList& _runParams) + : id(_id), name(_name), path(_path), runParams(_runParams) {} void ScriptingTool::onPathChanged(ExternalTool *tool, const QStringList& runParams) { ScriptingToolRegistry* reg = AppContext::getScriptingToolRegistry(); CHECK(NULL != reg, ); if (tool->isValid()){ - if (NULL != reg->getByName(tool->getName())){ - reg->unregisterEntry(tool->getName()); + if (NULL != reg->getById(tool->getId())){ + reg->unregisterEntry(tool->getId()); } if (!tool->getPath().isEmpty()){ - reg->registerEntry(new ScriptingTool(tool->getName(), tool->getPath(), runParams)); + reg->registerEntry(new ScriptingTool(tool->getId(), tool->getName(), tool->getPath(), runParams)); } } else { - reg->unregisterEntry(tool->getName()); + reg->unregisterEntry(tool->getId()); } } @@ -54,15 +54,15 @@ ScriptingToolRegistry::~ScriptingToolRegistry() { qDeleteAll(registry.values()); } -ScriptingTool* ScriptingToolRegistry::getByName(const QString& id){ +ScriptingTool* ScriptingToolRegistry::getById(const QString& id){ return registry.value(id, NULL); } bool ScriptingToolRegistry::registerEntry(ScriptingTool *t){ - if (registry.contains(t->getName())) { + if (registry.contains(t->getId())) { return false; } else { - registry.insert(t->getName(), t); + registry.insert(t->getId(), t); return true; } } @@ -75,4 +75,8 @@ QList<ScriptingTool*> ScriptingToolRegistry::getAllEntries() const{ return registry.values(); } +QStringList ScriptingToolRegistry::getAllNames() const { + return registry.keys(); +} + }//namespace diff --git a/src/corelibs/U2Core/src/globals/ScriptingToolRegistry.h b/src/corelibs/U2Core/src/globals/ScriptingToolRegistry.h index 27a7668b6d7d5df8cf420c62c0bfbc87e1b392cd..28238b35138ae6034568193b47322b119f120964 100644 --- a/src/corelibs/U2Core/src/globals/ScriptingToolRegistry.h +++ b/src/corelibs/U2Core/src/globals/ScriptingToolRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,8 +34,9 @@ class ExternalTool; class U2CORE_EXPORT ScriptingTool : public QObject { Q_OBJECT public: - ScriptingTool(QString name, QString executablePath, const QStringList& runParams = QStringList()); + ScriptingTool(const QString& id, const QString& name, const QString& path, const QStringList& runParams = QStringList()); + const QString getId() const { return id; } const QString getName() const {return name;} const QString getPath() const {return path;} const QStringList getRunParameters() const {return runParams;} @@ -43,6 +44,7 @@ public: static void onPathChanged(ExternalTool *tool, const QStringList& runParams = QStringList()); protected: + QString id; QString name; QString path; QStringList runParams; //used for every program run (e.g. -jar in Java) @@ -54,12 +56,13 @@ class U2CORE_EXPORT ScriptingToolRegistry : public QObject { public: ~ScriptingToolRegistry(); - ScriptingTool* getByName(const QString& id); + ScriptingTool* getById(const QString& id); bool registerEntry(ScriptingTool* t); void unregisterEntry(const QString& id); QList<ScriptingTool*> getAllEntries() const; + QStringList getAllNames() const; protected: QMap<QString, ScriptingTool*> registry; diff --git a/src/corelibs/U2Core/src/globals/ServiceModel.cpp b/src/corelibs/U2Core/src/globals/ServiceModel.cpp index 521ce64d0d6193ee943ffa640e2f693b41f6b4ba..4c35aa3eaa26b1aa3221611ea8eb663c69375221 100644 --- a/src/corelibs/U2Core/src/globals/ServiceModel.cpp +++ b/src/corelibs/U2Core/src/globals/ServiceModel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,7 +22,6 @@ #include "PluginModel.h" #include "ServiceModel.h" -#include <algorithm> #include <U2Core/AppContext.h> #include <U2Core/AppSettings.h> #include <U2Core/AppResources.h> @@ -32,34 +31,31 @@ namespace U2 { Service::Service(ServiceType t, const QString& _name, const QString& _desc, const QList<ServiceType>& _parentServices, ServiceFlags f) -: type(t), name(_name), description(_desc), parentServices(_parentServices), state(ServiceState_Disabled_New), flags(f) -{ + : type(t), name(_name), description(_desc), parentServices(_parentServices), state(ServiceState_Disabled_New), flags(f) { //Register service resource AppSettings* settings = AppContext::getAppSettings(); - SAFE_POINT(NULL != settings, "Can not get application settings",); + SAFE_POINT(NULL != settings, "Can not get application settings", ); AppResourcePool* resourcePool = settings->getAppResourcePool(); - SAFE_POINT(NULL != resourcePool, "Can not get resource pool",); + SAFE_POINT(NULL != resourcePool, "Can not get resource pool", ); AppResource* resource = resourcePool->getResource(t.id); - if(NULL == resource) { + if (NULL == resource) { AppResourceSemaphore* serviceResource = new AppResourceSemaphore(t.id, 1, _name); resourcePool->registerResource(serviceResource); - } - else { - SAFE_POINT(resource->name == _name, QString("Resources %1 and %2 have the same identifiers").arg(resource->name).arg(_name),); + } else { + SAFE_POINT(resource->name == _name, QString("Resources %1 and %2 have the same identifiers").arg(resource->name).arg(_name), ); } } -void ServiceRegistry::_setServiceState(Service* s, ServiceState state) -{ - assert(s->state!=state); +void ServiceRegistry::_setServiceState(Service* s, ServiceState state) { + assert(s->state != state); ServiceState oldState = s->state; bool enabledBefore = s->isEnabled(); s->state = state; bool enabledAfter = s->isEnabled(); - s->serviceStateChangedCallback(oldState, enabledBefore!=enabledAfter); + s->serviceStateChangedCallback(oldState, enabledBefore != enabledAfter); emit si_serviceStateChanged(s, oldState); } diff --git a/src/corelibs/U2Core/src/globals/ServiceModel.h b/src/corelibs/U2Core/src/globals/ServiceModel.h index b64b39f4c911516659bdc5813d204addc4c6a491..37d0b85cb16168855d75675efc24e1acd3f749e9 100644 --- a/src/corelibs/U2Core/src/globals/ServiceModel.h +++ b/src/corelibs/U2Core/src/globals/ServiceModel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -126,7 +126,6 @@ protected: signals: - void si_serviceRegistered(Service* s); void si_serviceUnregistered(Service* s); void si_serviceStateChanged(Service* s, ServiceState oldState); }; diff --git a/src/corelibs/U2Core/src/globals/ServiceTypes.h b/src/corelibs/U2Core/src/globals/ServiceTypes.h index 27b237a941716aa389698d95101d6a51707778a6..8a4552863be1afb4093fc5a3046a275762414426 100644 --- a/src/corelibs/U2Core/src/globals/ServiceTypes.h +++ b/src/corelibs/U2Core/src/globals/ServiceTypes.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/Settings.h b/src/corelibs/U2Core/src/globals/Settings.h index d3a4be4c01218de837625d18dcacdff61ad86581..41a468ded24f28625526251ff5f0b54b032cddfd 100644 --- a/src/corelibs/U2Core/src/globals/Settings.h +++ b/src/corelibs/U2Core/src/globals/Settings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/Task.cpp b/src/corelibs/U2Core/src/globals/Task.cpp index 6b284087b007f78fc36152495a9cba7949209f25..2b21592876ccfd11171cff3a55f3ffe099815d46 100644 --- a/src/corelibs/U2Core/src/globals/Task.cpp +++ b/src/corelibs/U2Core/src/globals/Task.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -85,6 +85,18 @@ void Task::cancel() { stateInfo.cancelFlag = true; } +const QList<QPointer<Task> > &Task::getSubtasks() const { + return subtasks; +} + +QList<Task *> Task::getPureSubtasks() const { + QList<Task*> subtasksPointers; + subtasksPointers.reserve(subtasks.size()); + foreach(const QPointer<Task> &subtask, subtasks) { + subtasksPointers << subtask.data(); + } + return subtasksPointers; +} void Task::addSubTask(Task* sub) { SAFE_POINT(sub != NULL, "Trying to add NULL subtask",); @@ -99,7 +111,9 @@ void Task::addSubTask(Task* sub) { void Task::cleanup() { assert(isFinished()); - foreach(Task* sub, getSubtasks()) { + foreach(const QPointer<Task> &sub, getSubtasks()) { + CHECK_CONTINUE(!sub.isNull()); + sub->cleanup(); } } @@ -116,9 +130,9 @@ bool Task::propagateSubtaskError() { } Task* Task::getSubtaskWithErrors() const { - foreach(Task* sub, getSubtasks()) { + foreach(const QPointer<Task> &sub, getSubtasks()) { if (sub->hasError()) { - return sub; + return sub.data(); } } return NULL; @@ -152,6 +166,18 @@ void Task::addTaskResource(const TaskResourceUsage& r) { taskResources.append(r); } +bool Task::isMinimizeSubtaskErrorText() const { + bool result = false; + Task* parentTask = getParentTask(); + if (getFlags().testFlag(TaskFlag_MinimizeSubtaskErrorText)) { + result = true; + } else if (parentTask != nullptr) { + result = parentTask->isMinimizeSubtaskErrorText(); + } + + return result; +} + void Task::setCollectChildrensWarningsFlag(bool v) { setFlag(TaskFlag_CollectChildrenWarnings, v); if (v) { diff --git a/src/corelibs/U2Core/src/globals/Task.h b/src/corelibs/U2Core/src/globals/Task.h index c85572f71ed87c33f347add5483c3e5867148d84..50b4ce2ab2190b46dcd58d1fdbd2daad154abfb8 100644 --- a/src/corelibs/U2Core/src/globals/Task.h +++ b/src/corelibs/U2Core/src/globals/Task.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -27,9 +27,10 @@ #include <U2Core/U2OpStatus.h> #include <QDateTime> +#include <QPointer> +#include <QReadWriteLock> #include <QStringList> #include <QVarLengthArray> -#include <QReadWriteLock> namespace U2 { @@ -149,8 +150,9 @@ enum TaskFlag { TaskFlag_VerboseStateLog = 1 << 22, //tasks prepared/finished state is dumped to the 'info' log category. Effective for top-level tasks only - TaskFlag_MinimizeSubtaskErrorText = 1 << 23, //for TaskFlag_FailOnSubtaskError task minimizes the error text - // excluding task-names info from the text + TaskFlag_MinimizeSubtaskErrorText = 1 << 23, // for TaskFlag_FailOnSubtaskError task minimizes the error text + // excluding task-names info from the text + // applies this behaviour for the current task and all children of the current task TaskFlag_SuppressErrorNotification = 1 << 24, //for top level tasks only: if task fails, tells if notification is shown @@ -158,7 +160,9 @@ enum TaskFlag { TaskFlag_OnlyNotificationReport = 1 << 26, // task is asked to generate report - TaskFlag_CollectChildrenWarnings = 1 << 27 + TaskFlag_CollectChildrenWarnings = 1 << 27, + + TaskFlag_ConcatenateChildrenErrors = 1 << 28 // task collects errors from all children and unites them into one report }; #define TaskFlags_FOSCOE (TaskFlags(TaskFlag_FailOnSubtaskError) | TaskFlag_FailOnSubtaskCancel) @@ -220,7 +224,8 @@ public: bool isCanceled() const {return stateInfo.cancelFlag;} // Returns subtasks of the task. Task must prepare it's subtask on prepare() call and can't change them latter. - QList<Task*> getSubtasks() const {return subtasks;} + const QList<QPointer<Task> > &getSubtasks() const; + QList<Task *> getPureSubtasks() const; QString getTaskName() const {return taskName;} @@ -315,6 +320,10 @@ public: void setVerboseOnTaskCancel(bool v) { setFlag(TaskFlag_VerboseOnTaskCancel, v); } + bool isConcatenateChildrenErrors() const { return flags.testFlag(TaskFlag_ConcatenateChildrenErrors); } + + void setConcatenateChildrenErrors(bool v) { setFlag(TaskFlag_ConcatenateChildrenErrors, v); } + const TaskResources& getTaskResources() {return taskResources;} //WARN: if set to MAX_PARALLEL_SUBTASKS_AUTO, returns unprocessed value (MAX_PARALLEL_SUBTASKS_AUTO = 0) @@ -338,6 +347,8 @@ public: void addTaskResource(const TaskResourceUsage& r); + bool isMinimizeSubtaskErrorText() const; + public slots: // Set's cancelFlag to true. Does not wait for task to be stopped void cancel(); @@ -356,27 +367,26 @@ protected: void setTaskName(const QString& taskName); - - TaskStateInfo stateInfo; - TaskTimeInfo timeInfo; - ProgressManagement tpm; - - float progressWeightAsSubtask; - int maxParallelSubtasks; - -private: void setFlag(TaskFlag f, bool v) { flags = v ? (flags | f) : flags & (~f); } - TaskFlags flags; - QString taskName; - State state; - Task* parentTask; - QList<Task*> subtasks; - qint64 taskId; - TaskResources taskResources; - bool insidePrepare; + TaskStateInfo stateInfo; + TaskTimeInfo timeInfo; + ProgressManagement tpm; + + float progressWeightAsSubtask; + int maxParallelSubtasks; + +private: + TaskFlags flags; + QString taskName; + State state; + Task* parentTask; + QList<QPointer<Task> > subtasks; + qint64 taskId; + TaskResources taskResources; + bool insidePrepare; }; diff --git a/src/corelibs/U2Core/src/globals/Timer.cpp b/src/corelibs/U2Core/src/globals/Timer.cpp index 81fd66c3c23cf199bea6a8357b6d0519fdd45cea..74de02413f85bbbb4af5e47d0ab9239b5339e1e1 100644 --- a/src/corelibs/U2Core/src/globals/Timer.cpp +++ b/src/corelibs/U2Core/src/globals/Timer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/Timer.h b/src/corelibs/U2Core/src/globals/Timer.h index b05abcb3bce37d7cc54fc756a9f7edfa75a289dc..130bbb6bd1f644274d420249685746b30052f1b7 100644 --- a/src/corelibs/U2Core/src/globals/Timer.h +++ b/src/corelibs/U2Core/src/globals/Timer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/U2OpStatus.h b/src/corelibs/U2Core/src/globals/U2OpStatus.h index 0935c34867600a91a80db4ffe7c6fc1e09778e70..d6d935a759a987de48b942ff41b17d3400196382 100644 --- a/src/corelibs/U2Core/src/globals/U2OpStatus.h +++ b/src/corelibs/U2Core/src/globals/U2OpStatus.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/U2SafePoints.h b/src/corelibs/U2Core/src/globals/U2SafePoints.h index 2dd754271d2755693bfeee4912226e0ce8087ded..cd72493b16f6c025f372cc81c260989376528de9 100644 --- a/src/corelibs/U2Core/src/globals/U2SafePoints.h +++ b/src/corelibs/U2Core/src/globals/U2SafePoints.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/UserActionsWriter.cpp b/src/corelibs/U2Core/src/globals/UserActionsWriter.cpp index 25cf3b0663eebbb8efa136a1452ffd5d96e16503..caf49e0f5988753340c8c5b94c2e8058ff02335a 100644 --- a/src/corelibs/U2Core/src/globals/UserActionsWriter.cpp +++ b/src/corelibs/U2Core/src/globals/UserActionsWriter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -21,15 +21,12 @@ #include <QAbstractSpinBox> #include <QApplication> -#include <QDialog> #include <QLabel> #include <QLineEdit> #include <QListWidget> #include <QMainWindow> -#include <QMenu> #include <QMenuBar> #include <QMessageBox> -#include <QMouseEvent> #include <QPushButton> #include <QTreeWidget> #include <QWidget> @@ -49,13 +46,13 @@ bool UserActionsWriter::eventFilter(QObject *obj, QEvent *event) { Q_UNUSED(locker); if (event->type() == QEvent::MouseButtonPress || - event->type() == QEvent::MouseButtonRelease || - event->type() == QEvent::MouseButtonDblClick) { + event->type() == QEvent::MouseButtonRelease || + event->type() == QEvent::MouseButtonDblClick) { QMouseEvent* m = dynamic_cast<QMouseEvent *>(event); generateMouseMessage(m); return false; } else if (event->type() == QEvent::KeyPress || - event->type() == QEvent::KeyRelease) { + event->type() == QEvent::KeyRelease) { QKeyEvent* k = dynamic_cast<QKeyEvent *>(event); generateKeyMessage(k); return false; @@ -64,7 +61,7 @@ bool UserActionsWriter::eventFilter(QObject *obj, QEvent *event) { } } -void UserActionsWriter::generateMouseMessage(QMouseEvent* m){ +void UserActionsWriter::generateMouseMessage(QMouseEvent* m) { CHECK_EXT(m, userActLog.error(QString("MouseEvent is NULL %1:%2").arg(__FILE__).arg(__LINE__)), ); QString message(""); @@ -114,7 +111,7 @@ void UserActionsWriter::generateMouseMessage(QMouseEvent* m){ filterMouseMessages(message); } -QString UserActionsWriter::getMouseButtonInfo(QMouseEvent* m){ +QString UserActionsWriter::getMouseButtonInfo(QMouseEvent* m) { CHECK_EXT(m, userActLog.error(QString("MouseEvent is NULL %1:%2").arg(__FILE__).arg(__LINE__)), ""); switch (m->button()) { case Qt::RightButton: { @@ -126,12 +123,12 @@ QString UserActionsWriter::getMouseButtonInfo(QMouseEvent* m){ break; } default: { - return QString("Other_button "); + return QString("Other_button "); } } } -QString UserActionsWriter::getTreeWidgetInfo(QMouseEvent* m, QWidget *parent){ +QString UserActionsWriter::getTreeWidgetInfo(QMouseEvent* m, QWidget *parent) { CHECK_EXT(m, userActLog.error(QString("MouseEvent is NULL %1:%2").arg(__FILE__).arg(__LINE__)), ""); CHECK_EXT(parent, userActLog.error(QString("Widget is NULL %1:%2").arg(__FILE__).arg(__LINE__)), ""); @@ -155,7 +152,7 @@ QString UserActionsWriter::getTreeWidgetInfo(QMouseEvent* m, QWidget *parent){ return message; } -QString UserActionsWriter::getAdditionalWidgetInfo(QMouseEvent* m, QWidget *w){ +QString UserActionsWriter::getAdditionalWidgetInfo(QMouseEvent* m, QWidget *w) { CHECK_EXT(m, userActLog.error(QString("MouseEvent is NULL %1:%2").arg(__FILE__).arg(__LINE__)), ""); CHECK_EXT(w, userActLog.error(QString("Widget is NULL %1:%2").arg(__FILE__).arg(__LINE__)), ""); @@ -178,7 +175,7 @@ QString UserActionsWriter::getAdditionalWidgetInfo(QMouseEvent* m, QWidget *w){ return message; } -QString UserActionsWriter::getWidgetText(QMouseEvent* m, QWidget* w){ +QString UserActionsWriter::getWidgetText(QMouseEvent* m, QWidget* w) { CHECK_EXT(m, userActLog.error(QString("MouseEvent is NULL %1:%2").arg(__FILE__).arg(__LINE__)), ""); CHECK_EXT(w, userActLog.error(QString("Widget is NULL %1:%2").arg(__FILE__).arg(__LINE__)), ""); @@ -197,7 +194,7 @@ QString UserActionsWriter::getWidgetText(QMouseEvent* m, QWidget* w){ QMenu* menu = qobject_cast<QMenu*>(w); if (menu) { QAction* menuAct = menu->actionAt(menu->mapFromGlobal(m->globalPos())); - if (menuAct){ + if (menuAct) { text.append(menuAct->text()); } } @@ -254,7 +251,7 @@ void UserActionsWriter::filterMouseMessages(QString message) { /*Do not duplicate event information when logging mouse release event*/ if (prevMessage.right(prevMessage.length() - typeMap.value(QEvent::MouseButtonPress).length()) == - message.right(message.length() - typeMap.value(QEvent::MouseButtonRelease).length())) { + message.right(message.length() - typeMap.value(QEvent::MouseButtonRelease).length())) { userActLog.trace("mouse_release"); prevMessage = message; return; @@ -276,14 +273,14 @@ void UserActionsWriter::filterKeyboardMessages(QKeyEvent *k, QString message) { if (message != prevMessage && typeMap.value(k->type()) != NULL) { /*Do not duplicate event information when logging key release event*/ if (prevMessage.right(prevMessage.length() - typeMap.value(QEvent::KeyPress).length()) == - message.right(message.length() - typeMap.value(QEvent::KeyRelease).length())) { + message.right(message.length() - typeMap.value(QEvent::KeyRelease).length())) { prevMessage = message; return; } /*If one key pressed several times, count presses*/ if (prevMessage.right(prevMessage.length() - typeMap.value(QEvent::KeyRelease).length()) == - message.right(message.length() - typeMap.value(QEvent::KeyPress).length()) && !BUFFER_CONDITION(k)) { + message.right(message.length() - typeMap.value(QEvent::KeyPress).length()) && !BUFFER_CONDITION(k)) { prevMessage = message; counter++; return; @@ -330,7 +327,7 @@ QString UserActionsWriter::getKeyModifiersInfo(QKeyEvent *k) { if (m.testFlag(Qt::ShiftModifier) && k->key() != Qt::Key_Shift) { return QString("shift + "); } - if (m.testFlag(Qt::AltModifier)&& k->key() != Qt::Key_Alt) { + if (m.testFlag(Qt::AltModifier) && k->key() != Qt::Key_Alt) { return QString("alt + "); } if (m.testFlag(Qt::ControlModifier) && k->key() != Qt::Key_Control) { diff --git a/src/corelibs/U2Core/src/globals/UserActionsWriter.h b/src/corelibs/U2Core/src/globals/UserActionsWriter.h index dabf0ba7a4a49f53c14b7cfa6c3c69ca27516962..3adb6845ddc7784a6eaa33af3a313eb289fd217a 100644 --- a/src/corelibs/U2Core/src/globals/UserActionsWriter.h +++ b/src/corelibs/U2Core/src/globals/UserActionsWriter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,7 +23,6 @@ #define _U2_USER_ACTIONS_WRITER_H_ #include <QEvent> -#include <QFile> #include <QMouseEvent> #include <QObject> #include <QMutex> @@ -36,7 +35,7 @@ namespace U2 { class U2CORE_EXPORT UserActionsWriter : public QObject { Q_OBJECT public: - UserActionsWriter(); + UserActionsWriter(); protected: bool eventFilter(QObject *obj, QEvent *event); diff --git a/src/corelibs/U2Core/src/globals/UserApplicationsSettings.cpp b/src/corelibs/U2Core/src/globals/UserApplicationsSettings.cpp index c16c35bef75b31b3400535ef411278aeb3e4cc54..99edc5575180b7d46e49fe310c0c3623d7e0df1b 100644 --- a/src/corelibs/U2Core/src/globals/UserApplicationsSettings.cpp +++ b/src/corelibs/U2Core/src/globals/UserApplicationsSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -46,6 +46,7 @@ namespace U2 { #define SAVE_PROJECT_STATE QString("save_project") #define VISUAL_STYLE QString("style") #define DOWNLOAD_DIR QString("download_file") +#define CUSTOM_EXTERNAL_TOOL_CONFIGS_DIR QString("custom_external_tool_configs_dir") #define RECENTLY_DOWNLOADED QString("recently_downloaded") #define TEMPORARY_DIR QString("temporary_dir") #define DATA_DIR QString("data_dir") @@ -118,23 +119,17 @@ bool UserAppsSettings::resetSettings() const { return AppContext::getSettings()->getValue(SETTINGS_ROOT + RESET_SETTINGS_FLAG, false).toBool(); } -void UserAppsSettings::setResetSettings(bool b){ +void UserAppsSettings::setResetSettings(bool b) { AppContext::getSettings()->setValue(SETTINGS_ROOT + RESET_SETTINGS_FLAG, b); } QString UserAppsSettings::getVisualStyle() const { -#ifdef Q_OS_LINUX - // Use a nice looking 'Fusion' style by default (used by QtCreator's UI Designer on Linux). - // GTK2 style which is selected by default on Linux looks ugly (groupboxes, etc...) - QString defaultStyle = "Fusion"; -#else - QString defaultStyle = QApplication::style()->objectName(); -#endif + QString defaultStyle = QApplication::style()->objectName(); #ifdef Q_OS_WIN #define DEFAULT_STYLE_NAME ".NET" const char* version = qVersion(); - if (QString("4.4.0")!=version) { + if (QString("4.4.0") != version) { if (QStyleFactory::keys().contains(DEFAULT_STYLE_NAME)) { defaultStyle = DEFAULT_STYLE_NAME; } @@ -149,13 +144,39 @@ void UserAppsSettings::setVisualStyle(const QString& newStyle) { } QString UserAppsSettings::getDownloadDirPath() const { - return AppContext::getSettings()->getValue(SETTINGS_ROOT + DOWNLOAD_DIR, QDir::homePath()+"/.UGENE_downloaded").toString(); + return AppContext::getSettings()->getValue(SETTINGS_ROOT + DOWNLOAD_DIR, QDir::homePath() + "/.UGENE_downloaded").toString(); } void UserAppsSettings::setDownloadDirPath(const QString& newPath) const { AppContext::getSettings()->setValue(SETTINGS_ROOT + DOWNLOAD_DIR, newPath); } +QString UserAppsSettings::getCustomToolsConfigsDirPath() const { + const QString defaultDir = GUrl(AppContext::getSettings()->fileName()).dirPath() + "/CustomExternalToolConfig"; + return AppContext::getSettings()->getValue(SETTINGS_ROOT + CUSTOM_EXTERNAL_TOOL_CONFIGS_DIR, defaultDir).toString(); +} + +void UserAppsSettings::setCustomToolsConfigsDirPath(const QString &newPath) const { + const QString oldPath = getCustomToolsConfigsDirPath(); + + Settings *s = AppContext::getSettings(); + s->setValue(SETTINGS_ROOT + CUSTOM_EXTERNAL_TOOL_CONFIGS_DIR, newPath, true); + + if(oldPath != newPath) { + QDir dir(oldPath); + if (!dir.exists()) { + return; + } + + dir.setNameFilters(QStringList() << "*.xml"); + QFileInfoList fileList = dir.entryInfoList(); + foreach (const QFileInfo &fileInfo, fileList) { + const QString newFileUrl = newPath + "/" + fileInfo.fileName(); + QFile::copy(fileInfo.filePath(), newFileUrl); + } + } +} + QStringList UserAppsSettings::getRecentlyDownloadedFileNames() const { QStringList empty; return AppContext::getSettings()->getValue(SETTINGS_ROOT + RECENTLY_DOWNLOADED, empty).toStringList(); @@ -174,17 +195,17 @@ void UserAppsSettings::setUserTemporaryDirPath(const QString& newPath) { emit si_temporaryPathChanged(); } -QString UserAppsSettings::getDefaultDataDirPath() const{ +QString UserAppsSettings::getDefaultDataDirPath() const { QString dirpath; dirpath = AppContext::getSettings()->getValue(SETTINGS_ROOT + DATA_DIR, QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation) + "/" + "UGENE_Data").toString(); QDir d(dirpath); - if(!d.exists(dirpath)){ + if (!d.exists(dirpath)) { d.mkpath(dirpath); } return dirpath; } -void UserAppsSettings::setDefaultDataDirPath( const QString& newPath ){ +void UserAppsSettings::setDefaultDataDirPath(const QString& newPath) { AppContext::getSettings()->setValue(SETTINGS_ROOT + DATA_DIR, newPath); } @@ -208,7 +229,7 @@ void UserAppsSettings::setTabbedWindowLayout(bool b) { QString UserAppsSettings::getCurrentProcessTemporaryDirPath(const QString& domain) const { qint64 pid = QCoreApplication::applicationPid(); - QString tmpDirPath = getUserTemporaryDirPath() + "/" + QString("ugene_tmp/p%1").arg(pid); + QString tmpDirPath = getUserTemporaryDirPath() + "/" + QString("ugene_tmp/p%1").arg(pid); if (!domain.isEmpty()) { tmpDirPath += "/" + domain; } @@ -249,7 +270,7 @@ QString UserAppsSettings::createCurrentProcessTemporarySubDir(U2OpStatus &os, co } QString UserAppsSettings::getFileStorageDir() const { - return AppContext::getSettings()->getValue(SETTINGS_ROOT + FILE_STORAGE_DIR, QDir::homePath()+"/.UGENE_files").toString(); + return AppContext::getSettings()->getValue(SETTINGS_ROOT + FILE_STORAGE_DIR, QDir::homePath() + "/.UGENE_files").toString(); } void UserAppsSettings::setFileStorageDir(const QString &newPath) { diff --git a/src/corelibs/U2Core/src/globals/UserApplicationsSettings.h b/src/corelibs/U2Core/src/globals/UserApplicationsSettings.h index be1e7f142235face93f9c9e63191618f1a66d627..b5bb0237c507aedc26a17ce763a7c95beb2ed8b7 100644 --- a/src/corelibs/U2Core/src/globals/UserApplicationsSettings.h +++ b/src/corelibs/U2Core/src/globals/UserApplicationsSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,7 +24,6 @@ #include <QObject> -#include <U2Core/global.h> #include <U2Core/U2OpStatus.h> namespace U2 { @@ -58,6 +57,10 @@ public: QString getDownloadDirPath() const; void setDownloadDirPath(const QString& newPath) const; + // storage dir for custom external tool config files + QString getCustomToolsConfigsDirPath() const; + void setCustomToolsConfigsDirPath(const QString& newPath) const; + // recently downloaded file names QStringList getRecentlyDownloadedFileNames() const; void setRecentlyDownloadedFileNames(const QStringList& fileNames) const; diff --git a/src/corelibs/U2Core/src/globals/Version.cpp b/src/corelibs/U2Core/src/globals/Version.cpp index c555c8dd2d2e998ebddcba1ae8fa5abbd53e66f8..71d4637b1a74525e2e4e4adaac1d7920b9c8af97 100644 --- a/src/corelibs/U2Core/src/globals/Version.cpp +++ b/src/corelibs/U2Core/src/globals/Version.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/Version.h b/src/corelibs/U2Core/src/globals/Version.h index 35f73fa5f8b009a86624f48889b59ed8363ff727..a113103e9ef6fe23737a38a29789485d9cbd7adf 100644 --- a/src/corelibs/U2Core/src/globals/Version.h +++ b/src/corelibs/U2Core/src/globals/Version.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/globals/global.h b/src/corelibs/U2Core/src/globals/global.h index 09195cbb6d4c03dc106d26e4ec2da6ccc4d49569..1d0216bccced9cba65902411a0a9ab87f95c112b 100644 --- a/src/corelibs/U2Core/src/globals/global.h +++ b/src/corelibs/U2Core/src/globals/global.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -31,9 +31,9 @@ #include <U2Core/U2IdTypes.h> #ifdef _DEBUG -# define U2_PRODUCT_NAME "UGENED" +#define U2_PRODUCT_NAME "UGENED" #else -# define U2_PRODUCT_NAME "UGENE" +#define U2_PRODUCT_NAME "UGENE" #endif /** used to store settings with a project name in a key, etc. Same in debug and release */ @@ -50,49 +50,49 @@ #ifdef BUILDING_U2CORE_DLL -# define U2CORE_EXPORT Q_DECL_EXPORT +#define U2CORE_EXPORT Q_DECL_EXPORT #else -# define U2CORE_EXPORT Q_DECL_IMPORT +#define U2CORE_EXPORT Q_DECL_IMPORT #endif #ifdef BUILDING_U2FORMATS_DLL -# define U2FORMATS_EXPORT Q_DECL_EXPORT +#define U2FORMATS_EXPORT Q_DECL_EXPORT #else -# define U2FORMATS_EXPORT Q_DECL_IMPORT +#define U2FORMATS_EXPORT Q_DECL_IMPORT #endif #ifdef BUILDING_U2ALGORITHM_DLL -# define U2ALGORITHM_EXPORT Q_DECL_EXPORT +#define U2ALGORITHM_EXPORT Q_DECL_EXPORT #else -# define U2ALGORITHM_EXPORT Q_DECL_IMPORT +#define U2ALGORITHM_EXPORT Q_DECL_IMPORT #endif #ifdef BUILDING_U2TEST_DLL -# define U2TEST_EXPORT Q_DECL_EXPORT +#define U2TEST_EXPORT Q_DECL_EXPORT #else -# define U2TEST_EXPORT Q_DECL_IMPORT +#define U2TEST_EXPORT Q_DECL_IMPORT #endif #ifdef BUILDING_U2LANG_DLL -# define U2LANG_EXPORT Q_DECL_EXPORT +#define U2LANG_EXPORT Q_DECL_EXPORT #else -# define U2LANG_EXPORT Q_DECL_IMPORT +#define U2LANG_EXPORT Q_DECL_IMPORT #endif #ifdef BUILDING_U2GUI_DLL -# define U2GUI_EXPORT Q_DECL_EXPORT +#define U2GUI_EXPORT Q_DECL_EXPORT #else -# define U2GUI_EXPORT Q_DECL_IMPORT +#define U2GUI_EXPORT Q_DECL_IMPORT #endif #ifdef BUILDING_U2VIEW_DLL -# define U2VIEW_EXPORT Q_DECL_EXPORT +#define U2VIEW_EXPORT Q_DECL_EXPORT #else -# define U2VIEW_EXPORT Q_DECL_IMPORT +#define U2VIEW_EXPORT Q_DECL_IMPORT #endif #ifdef BUILDING_U2DESIGNER_DLL -# define U2DESIGNER_EXPORT Q_DECL_EXPORT +#define U2DESIGNER_EXPORT Q_DECL_EXPORT #else -# define U2DESIGNER_EXPORT Q_DECL_IMPORT +#define U2DESIGNER_EXPORT Q_DECL_IMPORT #endif #ifdef BUILDING_U2PRIVATE_DLL -# define U2PRIVATE_EXPORT Q_DECL_EXPORT +#define U2PRIVATE_EXPORT Q_DECL_EXPORT #else -# define U2PRIVATE_EXPORT Q_DECL_IMPORT +#define U2PRIVATE_EXPORT Q_DECL_IMPORT #endif // UGENE_VERSION must be supplied as a preprocessor directive @@ -113,9 +113,9 @@ #define ENV_USE_NATIVE_DIALOGS "UGENE_USE_NATIVE_DIALOGS" #ifdef __GNUC__ - #define ATTR_UNUSED __attribute__((unused)) +#define ATTR_UNUSED __attribute__((unused)) #else - #define ATTR_UNUSED +#define ATTR_UNUSED #endif #define PATH_PREFIX_DATA "data" @@ -143,9 +143,9 @@ enum NavigationDirection { enum DNAAlphabetType { DNAAlphabet_UNDEFINED = 0x0, - DNAAlphabet_RAW = 0x1, - DNAAlphabet_NUCL = 0x2, - DNAAlphabet_AMINO = 0x4 + DNAAlphabet_RAW = 0x1, + DNAAlphabet_NUCL = 0x2, + DNAAlphabet_AMINO = 0x4 }; Q_DECLARE_FLAGS(AlphabetFlags, DNAAlphabetType) diff --git a/src/corelibs/U2Core/src/gobjects/AnnotationTableObject.cpp b/src/corelibs/U2Core/src/gobjects/AnnotationTableObject.cpp index 7c7bbf82bc267f579ffe17fb321975a1718e9433..5b21ab595d48af442a418191d0831ed9219ad482 100644 --- a/src/corelibs/U2Core/src/gobjects/AnnotationTableObject.cpp +++ b/src/corelibs/U2Core/src/gobjects/AnnotationTableObject.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -201,6 +201,20 @@ QList<Annotation *> AnnotationTableObject::getAnnotationsByRegion(const U2Region return result; } +QList<Annotation *> AnnotationTableObject::getAnnotationsByType(const U2FeatureType featureType) const { + QList<Annotation *> result; + + ensureDataLoaded(); + + foreach(Annotation *a, getAnnotations()) { + if (a->getType() == featureType) { + result.append(a); + } + } + + return result; +} + bool AnnotationTableObject::checkConstraints(const GObjectConstraints *c) const { const AnnotationTableObjectConstraints *ac = qobject_cast<const AnnotationTableObjectConstraints *>(c); SAFE_POINT(NULL != ac, "Invalid feature constraints", false); diff --git a/src/corelibs/U2Core/src/gobjects/AnnotationTableObject.h b/src/corelibs/U2Core/src/gobjects/AnnotationTableObject.h index abbaab83d616919e02511f4ebc41ee0588f3b4e5..67de42ad5ddb44b9fb05e162d5207cff7a051216 100644 --- a/src/corelibs/U2Core/src/gobjects/AnnotationTableObject.h +++ b/src/corelibs/U2Core/src/gobjects/AnnotationTableObject.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,7 +25,6 @@ #include <U2Core/Annotation.h> #include <U2Core/AnnotationGroup.h> #include <U2Core/GObject.h> -#include <U2Core/U2Feature.h> namespace U2 { @@ -38,15 +37,15 @@ public: * This constructor is intended for interaction with Document. It encapsulates creation of * annotation table entity in DB. */ - AnnotationTableObject(const QString &objectName, const U2DbiRef &dbiRef, - const QVariantMap &hintsMap = QVariantMap()); + AnnotationTableObject(const QString &objectName, const U2DbiRef &dbiRef, + const QVariantMap &hintsMap = QVariantMap()); /** * This constructor works with existed annotation table entity available via @tableRef. */ - AnnotationTableObject(const QString &objectName, const U2EntityRef &tableRef, - const QVariantMap &hintsMap = QVariantMap()); + AnnotationTableObject(const QString &objectName, const U2EntityRef &tableRef, + const QVariantMap &hintsMap = QVariantMap()); - ~AnnotationTableObject(); + ~AnnotationTableObject(); /** * Converts all the features stored in DB to annotations and returns the result */ @@ -81,6 +80,10 @@ public: * beyond the @region or each annotation that intersects it. */ QList<Annotation *> getAnnotationsByRegion(const U2Region ®ion, bool contains = false) const; + /** + * Return the list of annotations having @featureType + */ + QList<Annotation *> getAnnotationsByType(const U2FeatureType featureType) const; /** * Reimplemented from GObject */ diff --git a/src/corelibs/U2Core/src/gobjects/AssemblyObject.cpp b/src/corelibs/U2Core/src/gobjects/AssemblyObject.cpp index 09d1e7bdcf2648ae09a9efbea1061c97fe06ad62..e305d871e050989c2c8e0672c4dffb1b7184b284 100644 --- a/src/corelibs/U2Core/src/gobjects/AssemblyObject.cpp +++ b/src/corelibs/U2Core/src/gobjects/AssemblyObject.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/gobjects/AssemblyObject.h b/src/corelibs/U2Core/src/gobjects/AssemblyObject.h index 8d556953817f048e028100f7bab98e05e4cde4a7..91a27f85aa07519bf32e29e0c72bc971a5651d7e 100644 --- a/src/corelibs/U2Core/src/gobjects/AssemblyObject.h +++ b/src/corelibs/U2Core/src/gobjects/AssemblyObject.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/gobjects/BioStruct3DObject.cpp b/src/corelibs/U2Core/src/gobjects/BioStruct3DObject.cpp index edecb1a25697c5f5e224d60868893212d6cc154a..e3bcaa595ac1ab110673fcb143a6d86fb0b3315a 100644 --- a/src/corelibs/U2Core/src/gobjects/BioStruct3DObject.cpp +++ b/src/corelibs/U2Core/src/gobjects/BioStruct3DObject.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -20,7 +20,6 @@ */ #include <U2Core/DatatypeSerializeUtils.h> -#include <U2Core/DNASequence.h> #include <U2Core/DocumentModel.h> #include <U2Core/GHints.h> #include <U2Core/GObjectTypes.h> @@ -50,8 +49,7 @@ U2DataType U2BioStruct3D::getType() const { /////// BioStruct3DObject Implementation /////////////////////////////////////////////////////////////////// BioStruct3DObject * BioStruct3DObject::createInstance(const BioStruct3D &bioStruct3D, - const QString &objectName, const U2DbiRef &dbiRef, U2OpStatus &os, const QVariantMap &hintsMap) -{ + const QString &objectName, const U2DbiRef &dbiRef, U2OpStatus &os, const QVariantMap &hintsMap) { U2BioStruct3D object(dbiRef); object.visualName = objectName; object.serializer = BioStruct3DSerializer::ID; @@ -70,15 +68,13 @@ BioStruct3DObject * BioStruct3DObject::createInstance(const BioStruct3D &bioStru BioStruct3DObject::BioStruct3DObject(const QString &objectName, const U2EntityRef &structRef, const QVariantMap &hintsMap) - : GObject(GObjectTypes::BIOSTRUCTURE_3D, objectName, hintsMap) -{ + : GObject(GObjectTypes::BIOSTRUCTURE_3D, objectName, hintsMap) { entityRef = structRef; } BioStruct3DObject::BioStruct3DObject(const BioStruct3D &bioStruct3D, const QString &objectName, const U2EntityRef &structRef, const QVariantMap &hintsMap) - : GObject(GObjectTypes::BIOSTRUCTURE_3D, objectName, hintsMap), bioStruct3D(bioStruct3D) -{ + : GObject(GObjectTypes::BIOSTRUCTURE_3D, objectName, hintsMap), bioStruct3D(bioStruct3D) { entityRef = structRef; } diff --git a/src/corelibs/U2Core/src/gobjects/BioStruct3DObject.h b/src/corelibs/U2Core/src/gobjects/BioStruct3DObject.h index 41c9bc332205a1ecedb23cd0d21d09b0cc5c4b0f..1c30808c3eb5f157357e14aa31922dda77f72727 100644 --- a/src/corelibs/U2Core/src/gobjects/BioStruct3DObject.h +++ b/src/corelibs/U2Core/src/gobjects/BioStruct3DObject.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,7 +23,6 @@ #define _U2_BIOSTRUCT3D_OBJECT_H_ #include <U2Core/GObject.h> -#include <U2Core/U2Region.h> #include <U2Core/BioStruct3D.h> #include <U2Core/U2RawData.h> @@ -37,7 +36,7 @@ public: U2DataType getType() const; }; -class U2CORE_EXPORT BioStruct3DObject: public GObject { +class U2CORE_EXPORT BioStruct3DObject : public GObject { Q_OBJECT public: static BioStruct3DObject * createInstance(const BioStruct3D &bioStruct3D, const QString &objectName, const U2DbiRef &dbiRef, U2OpStatus &os, const QVariantMap &hintsMap = QVariantMap()); diff --git a/src/corelibs/U2Core/src/gobjects/DNAChromatogramObject.cpp b/src/corelibs/U2Core/src/gobjects/DNAChromatogramObject.cpp index 0515dce26982327bd39fa241948662775995333a..4b16ce48386dc3086f94e05e52d13d52b3785af2 100644 --- a/src/corelibs/U2Core/src/gobjects/DNAChromatogramObject.cpp +++ b/src/corelibs/U2Core/src/gobjects/DNAChromatogramObject.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/gobjects/DNAChromatogramObject.h b/src/corelibs/U2Core/src/gobjects/DNAChromatogramObject.h index 624ef426df0d4e854982ac5e3f4b25faa7fb4935..a5ca85468571692cf4bd44b693e843c62a9465e7 100644 --- a/src/corelibs/U2Core/src/gobjects/DNAChromatogramObject.h +++ b/src/corelibs/U2Core/src/gobjects/DNAChromatogramObject.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/gobjects/DNASequenceObject.cpp b/src/corelibs/U2Core/src/gobjects/DNASequenceObject.cpp index 8c3d816abacf913025d8f058939d0a5db0df13b2..65431f0ea7aa654f79b5b20be8a2409b27fc5e25 100644 --- a/src/corelibs/U2Core/src/gobjects/DNASequenceObject.cpp +++ b/src/corelibs/U2Core/src/gobjects/DNASequenceObject.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,10 +23,8 @@ #include <U2Core/AppContext.h> #include <U2Core/AppResources.h> -#include <U2Core/AppSettings.h> #include <U2Core/DocumentModel.h> #include <U2Core/GHints.h> -#include <U2Core/L10n.h> #include <U2Core/U2AlphabetUtils.h> #include <U2Core/U2AttributeDbi.h> #include <U2Core/U2AttributeUtils.h> @@ -43,16 +41,13 @@ namespace U2 { #define NO_LENGTH_CONSTRAINT -1 U2SequenceObjectConstraints::U2SequenceObjectConstraints(QObject* p) -: GObjectConstraints(GObjectTypes::SEQUENCE, p), sequenceSize(NO_LENGTH_CONSTRAINT) -{ -} + : GObjectConstraints(GObjectTypes::SEQUENCE, p), sequenceSize(NO_LENGTH_CONSTRAINT) {} ////////////////////////////////////////////////////////////////////////// // U2SequenceObject U2SequenceObject::U2SequenceObject(const QString& name, const U2EntityRef& seqRef, const QVariantMap& hintsMap) - : GObject(GObjectTypes::SEQUENCE, name, hintsMap), cachedAlphabet(NULL), cachedLength(-1), cachedCircular(TriState_Unknown) -{ + : GObject(GObjectTypes::SEQUENCE, name, hintsMap), cachedAlphabet(NULL), cachedLength(-1), cachedCircular(TriState_Unknown) { entityRef = seqRef; } @@ -85,7 +80,7 @@ qint64 U2SequenceObject::getSequenceLength() const { return cachedLength; } -QString U2SequenceObject::getSequenceName() const { +QString U2SequenceObject::getSequenceName() const { if (cachedName.isEmpty()) { updateCachedValues(); } @@ -100,7 +95,7 @@ QString U2SequenceObject::getSequenceName() const { seq = con.dbi->getSequenceDbi()->getSequenceObject(entityRef.entityId, os); \ CHECK_OP(os, DNASequence()); \ seqGet = true; \ - } + } DNASequence U2SequenceObject::getSequence(const U2Region ®ion, U2OpStatus& os) const { U2Sequence seq; @@ -196,7 +191,7 @@ bool U2SequenceObject::isValidDbiObject(U2OpStatus &os) { CHECK_OP(os, false); U2Sequence s = con.dbi->getSequenceDbi()->getSequenceObject(entityRef.entityId, os); CHECK_OP(os, false); - if(U2AlphabetUtils::getById(s.alphabet) == NULL) { + if (U2AlphabetUtils::getById(s.alphabet) == NULL) { os.setError(tr("Internal error, sequence alphabet id '%1' is invalid").arg(s.alphabet.id)); return false; } @@ -255,7 +250,7 @@ GObject * U2SequenceObject::clone(const U2DbiRef &dbiRef, U2OpStatus &os, const void U2SequenceObject::setCircular(bool isCircular) { TriState newVal = isCircular ? TriState_Yes : TriState_No; - if ( newVal == cachedCircular ){ + if (newVal == cachedCircular) { return; } U2OpStatus2Log os; @@ -264,7 +259,7 @@ void U2SequenceObject::setCircular(bool isCircular) { U2Sequence u2seq = con.dbi->getSequenceDbi()->getSequenceObject(entityRef.entityId, os); CHECK_OP(os, ); u2seq.circular = isCircular; - con.dbi->getSequenceDbi()->updateSequenceObject(u2seq,os); + con.dbi->getSequenceDbi()->updateSequenceObject(u2seq, os); CHECK_OP(os, ); cachedCircular = newVal; setModified(true); @@ -280,14 +275,14 @@ DNAQuality U2SequenceObject::getQuality() const { U2OpStatus2Log os; DbiConnection con(entityRef.dbiRef, os); DNAQuality res; - QList<U2DataId> idQualList=con.dbi->getAttributeDbi()->getObjectAttributes(entityRef.entityId,DNAInfo::FASTQ_QUAL_CODES,os); + QList<U2DataId> idQualList = con.dbi->getAttributeDbi()->getObjectAttributes(entityRef.entityId, DNAInfo::FASTQ_QUAL_CODES, os); CHECK_OP(os, res); - QList<U2DataId> idQualTypeList=con.dbi->getAttributeDbi()->getObjectAttributes(entityRef.entityId,DNAInfo::FASTQ_QUAL_TYPE,os); + QList<U2DataId> idQualTypeList = con.dbi->getAttributeDbi()->getObjectAttributes(entityRef.entityId, DNAInfo::FASTQ_QUAL_TYPE, os); CHECK_OP(os, res); - if(!idQualList.isEmpty() && !idQualTypeList.isEmpty()){ - res.qualCodes=con.dbi->getAttributeDbi()->getByteArrayAttribute(idQualList.first(),os).value; + if (!idQualList.isEmpty() && !idQualTypeList.isEmpty()) { + res.qualCodes = con.dbi->getAttributeDbi()->getByteArrayAttribute(idQualList.first(), os).value; CHECK_OP(os, DNAQuality()); - res.type=(DNAQualityType)con.dbi->getAttributeDbi()->getIntegerAttribute(idQualTypeList.first(),os).value; + res.type = (DNAQualityType)con.dbi->getAttributeDbi()->getIntegerAttribute(idQualTypeList.first(), os).value; CHECK_OP(os, DNAQuality()); } return res; @@ -315,10 +310,10 @@ void U2SequenceObject::setStringAttribute(const QString& newStringAttributeValue U2OpStatus2Log os; DbiConnection con(entityRef.dbiRef, os); CHECK_OP(os, ); - QList<U2DataId> oldStringAttributeList = con.dbi->getAttributeDbi()->getObjectAttributes(entityRef.entityId,type,os); + QList<U2DataId> oldStringAttributeList = con.dbi->getAttributeDbi()->getObjectAttributes(entityRef.entityId, type, os); CHECK_OP(os, ); - if(!oldStringAttributeList.isEmpty()){ - con.dbi->getAttributeDbi()->removeObjectAttributes(oldStringAttributeList.first(),os); + if (!oldStringAttributeList.isEmpty()) { + con.dbi->getAttributeDbi()->removeObjectAttributes(oldStringAttributeList.first(), os); CHECK_OP(os, ); } U2StringAttribute newStringAttribute(entityRef.entityId, type, newStringAttributeValue); @@ -334,10 +329,10 @@ void U2SequenceObject::setIntegerAttribute(int newIntegerAttributeValue, const Q U2OpStatus2Log os; DbiConnection con(entityRef.dbiRef, os); CHECK_OP(os, ); - QList<U2DataId> oldIntegerAttributeList = con.dbi->getAttributeDbi()->getObjectAttributes(entityRef.entityId,type,os); + QList<U2DataId> oldIntegerAttributeList = con.dbi->getAttributeDbi()->getObjectAttributes(entityRef.entityId, type, os); CHECK_OP(os, ); - if(!oldIntegerAttributeList.isEmpty()){ - con.dbi->getAttributeDbi()->removeObjectAttributes(oldIntegerAttributeList.first(),os); + if (!oldIntegerAttributeList.isEmpty()) { + con.dbi->getAttributeDbi()->removeObjectAttributes(oldIntegerAttributeList.first(), os); CHECK_OP(os, ); } U2IntegerAttribute newIntegerAttribute(entityRef.entityId, type, newIntegerAttributeValue); @@ -353,10 +348,10 @@ void U2SequenceObject::setRealAttribute(double newRealAttributeValue, const QStr U2OpStatus2Log os; DbiConnection con(entityRef.dbiRef, os); CHECK_OP(os, ); - QList<U2DataId> oldRealAttributeList = con.dbi->getAttributeDbi()->getObjectAttributes(entityRef.entityId,type,os); + QList<U2DataId> oldRealAttributeList = con.dbi->getAttributeDbi()->getObjectAttributes(entityRef.entityId, type, os); CHECK_OP(os, ); - if(!oldRealAttributeList.isEmpty()){ - con.dbi->getAttributeDbi()->removeObjectAttributes(oldRealAttributeList.first(),os); + if (!oldRealAttributeList.isEmpty()) { + con.dbi->getAttributeDbi()->removeObjectAttributes(oldRealAttributeList.first(), os); CHECK_OP(os, ); } U2RealAttribute newRealAttribute(entityRef.entityId, type, newRealAttributeValue); @@ -372,10 +367,10 @@ void U2SequenceObject::setByteArrayAttribute(const QByteArray& newByteArrayAttri U2OpStatus2Log os; DbiConnection con(entityRef.dbiRef, os); CHECK_OP(os, ); - QList<U2DataId> oldByteArrayAttributeList = con.dbi->getAttributeDbi()->getObjectAttributes(entityRef.entityId,type,os); + QList<U2DataId> oldByteArrayAttributeList = con.dbi->getAttributeDbi()->getObjectAttributes(entityRef.entityId, type, os); CHECK_OP(os, ); - if(!oldByteArrayAttributeList.isEmpty()){ - con.dbi->getAttributeDbi()->removeObjectAttributes(oldByteArrayAttributeList.first(),os); + if (!oldByteArrayAttributeList.isEmpty()) { + con.dbi->getAttributeDbi()->removeObjectAttributes(oldByteArrayAttributeList.first(), os); CHECK_OP(os, ); } U2ByteArrayAttribute newByteArrayAttribute(entityRef.entityId, type, newByteArrayAttributeValue); diff --git a/src/corelibs/U2Core/src/gobjects/DNASequenceObject.h b/src/corelibs/U2Core/src/gobjects/DNASequenceObject.h index 34ca8ca2c527a3da40e3b0be3de2506f889052da..132e99306e14e987a360e02149654347b0fb5441 100644 --- a/src/corelibs/U2Core/src/gobjects/DNASequenceObject.h +++ b/src/corelibs/U2Core/src/gobjects/DNASequenceObject.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/gobjects/GObjectRelationRoles.cpp b/src/corelibs/U2Core/src/gobjects/GObjectRelationRoles.cpp index 828ada537869761686cff34cd0bc15458eddfdb4..a94f0a22002a70c53cc21c9048a5d3e98688ef60 100644 --- a/src/corelibs/U2Core/src/gobjects/GObjectRelationRoles.cpp +++ b/src/corelibs/U2Core/src/gobjects/GObjectRelationRoles.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/gobjects/GObjectRelationRoles.h b/src/corelibs/U2Core/src/gobjects/GObjectRelationRoles.h index 420c40fbbbf40572d424a4e2bac56532a5acbd12..d26954faee40eb122d8ae19ccd8f902d18d56df3 100644 --- a/src/corelibs/U2Core/src/gobjects/GObjectRelationRoles.h +++ b/src/corelibs/U2Core/src/gobjects/GObjectRelationRoles.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/gobjects/GObjectTypes.cpp b/src/corelibs/U2Core/src/gobjects/GObjectTypes.cpp index d781515fa6f9df6e9c6763dbeca3d4d62cfec0d6..03644f3ec32befda4f63cd601201bde3da1c8e3f 100644 --- a/src/corelibs/U2Core/src/gobjects/GObjectTypes.cpp +++ b/src/corelibs/U2Core/src/gobjects/GObjectTypes.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/gobjects/GObjectTypes.h b/src/corelibs/U2Core/src/gobjects/GObjectTypes.h index 0fb64114f80aaae1c9332872975e815f38875d2c..e008031a0a0ec53cda7efc8664c95cdf11c0ccc1 100644 --- a/src/corelibs/U2Core/src/gobjects/GObjectTypes.h +++ b/src/corelibs/U2Core/src/gobjects/GObjectTypes.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/gobjects/GObjectUtils.cpp b/src/corelibs/U2Core/src/gobjects/GObjectUtils.cpp index 7eebd8217ca8bfcfd0268889473a4688bdbe1e96..8c40ed8da2720846cbbe982945d1b3e405f6458f 100644 --- a/src/corelibs/U2Core/src/gobjects/GObjectUtils.cpp +++ b/src/corelibs/U2Core/src/gobjects/GObjectUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,12 +23,9 @@ #include <U2Core/AppContext.h> #include <U2Core/AssemblyObject.h> #include <U2Core/BioStruct3DObject.h> -#include <U2Core/BioStruct3DObject.h> #include <U2Core/DNAAlphabet.h> -#include <U2Core/DNAChromatogramObject.h> #include <U2Core/DNASequenceObject.h> #include <U2Core/DNATranslation.h> -#include <U2Core/DocumentModel.h> #include <U2Core/GHints.h> #include <U2Core/GObjectRelationRoles.h> #include <U2Core/GObjectTypes.h> @@ -40,7 +37,6 @@ #include <U2Core/PhyTreeObject.h> #include <U2Core/ProjectModel.h> #include <U2Core/TextObject.h> -#include <U2Core/U2DbiUtils.h> #include <U2Core/U2ObjectRelationsDbi.h> #include <U2Core/U2OpStatusUtils.h> #include <U2Core/U2SafePoints.h> @@ -75,15 +71,15 @@ GObject* GObjectUtils::selectOne(const QList<GObject*>& objects, GObjectType typ QList<GObject*> GObjectUtils::findAllObjects(UnloadedObjectFilter f, GObjectType t) { QList<GObject*> res; - SAFE_POINT(AppContext::getProject()!=NULL, "No active project found", res); + SAFE_POINT(AppContext::getProject() != NULL, "No active project found", res); foreach(Document* doc, AppContext::getProject()->getDocuments()) { if (t.isEmpty()) { if (doc->isLoaded() || f == UOF_LoadedAndUnloaded) { - res+=doc->getObjects(); + res += doc->getObjects(); } } else { - res+=doc->findGObjectByType(t, f); + res += doc->findGObjectByType(t, f); } } return res; @@ -92,16 +88,15 @@ QList<GObject*> GObjectUtils::findAllObjects(UnloadedObjectFilter f, GObjectType QList<GObject*> GObjectUtils::selectRelations(GObject* obj, GObjectType type, GObjectRelationRole relationRole, const QList<GObject*>& fromObjects, - UnloadedObjectFilter f) -{ + UnloadedObjectFilter f) { QList<GObject*> res; QList<GObjectRelation> relations = obj->getObjectRelations(); foreach(const GObjectRelation& r, relations) { - if (r.role != relationRole || (!type.isEmpty() && r.ref.objType!=type)) { + if (r.role != relationRole || (!type.isEmpty() && r.ref.objType != type)) { continue; } GObject* obj = selectObjectByReference(r.ref, fromObjects, f); - if (obj!=NULL) { + if (obj != NULL) { res.append(obj); } } @@ -121,7 +116,7 @@ QList<GObject *> GObjectUtils::selectRelationsFromParentDoc(const GObject* obj, const QList<U2ObjectRelation> relations = relationsDbi->getObjectRelations(obj->getEntityRef().entityId, os); CHECK_OP(os, result); - foreach (const U2ObjectRelation &relation, relations) { + foreach(const U2ObjectRelation &relation, relations) { if (type == relation.referencedType && relationRole == relation.relationRole) { GObject *referenceObj = parentDoc->getObjectById(relation.referencedObject); if (NULL != referenceObj) { @@ -162,7 +157,7 @@ QList<GObject *> findRelatedObjectsForLoadedObjects(const GObjectReference &obj, const GObjectRelation objRelation(obj, role); QHash<Document *, U2DbiRef> doc2DbiRef; - foreach (GObject *object, fromObjects) { + foreach(GObject *object, fromObjects) { Document *doc = object->getDocument(); SAFE_POINT(NULL != doc, "Invalid parent document detected", res); if (!doc->isDatabaseConnection()) { @@ -180,7 +175,7 @@ QList<GObject *> findRelatedObjectsForLoadedObjects(const GObjectReference &obj, } U2OpStatusImpl os; - foreach (Document *doc, doc2DbiRef.keys()) { + foreach(Document *doc, doc2DbiRef.keys()) { const U2DbiRef dbiRef = doc2DbiRef.value(doc); if (!dbiRef.isValid()) { coreLog.error("Invalid DBI reference detected"); @@ -193,7 +188,7 @@ QList<GObject *> findRelatedObjectsForLoadedObjects(const GObjectReference &obj, const QList<U2DataId> relatedIds = relationsDbi->getReferenceRelatedObjects(obj.entityRef.entityId, role, os); SAFE_POINT_OP(os, res); - foreach (const U2DataId &objId, relatedIds) { + foreach(const U2DataId &objId, relatedIds) { GObject *object = doc->getObjectById(objId); if (fromObjects.contains(object)) { res.append(object); @@ -207,14 +202,12 @@ QList<GObject *> findRelatedObjectsForLoadedObjects(const GObjectReference &obj, } QList<GObject*> GObjectUtils::findObjectsRelatedToObjectByRole(const GObject* obj, GObjectType resultObjType, GObjectRelationRole role, - const QList<GObject*>& fromObjects, UnloadedObjectFilter f) -{ + const QList<GObject*>& fromObjects, UnloadedObjectFilter f) { return findObjectsRelatedToObjectByRole(GObjectReference(obj), resultObjType, role, fromObjects, f); } QList<GObject*> GObjectUtils::findObjectsRelatedToObjectByRole(const GObjectReference &obj, GObjectType resultObjType, GObjectRelationRole role, - const QList<GObject*>& fromObjects, UnloadedObjectFilter f) -{ + const QList<GObject*>& fromObjects, UnloadedObjectFilter f) { QList<GObject *> res; QSet<GObject *> loadedObjs; QSet<GObject *> unloadedObjs; @@ -247,13 +240,12 @@ QList<GObject*> GObjectUtils::findObjectsRelatedToObjectByRole(const GObjectRefe } QList<GObject*> GObjectUtils::selectObjectsWithRelation(const QList<GObject*>& objs, GObjectType type, GObjectRelationRole relationRole, - UnloadedObjectFilter f, bool availableObjectsOnly) -{ + UnloadedObjectFilter f, bool availableObjectsOnly) { QList<GObject*> res; foreach(GObject* obj, objs) { QList<GObjectRelation> relations = obj->getObjectRelations(); foreach(const GObjectRelation& r, relations) { - if (r.role != relationRole || (!type.isEmpty() && r.ref.objType!=type)) { + if (r.role != relationRole || (!type.isEmpty() && r.ref.objType != type)) { continue; } if (availableObjectsOnly) { @@ -373,7 +365,7 @@ void GObjectUtils::updateRelationsURL(GObject* o, const GUrl& fromURL, const GUr void GObjectUtils::updateRelationsURL(GObject* o, const QString& fromURL, const QString& toURL) { QList<GObjectRelation> relations = o->getObjectRelations(); bool changed = false; - for(int i=0; i<relations.size(); i++) { + for (int i = 0; i < relations.size(); i++) { GObjectRelation& r = relations[i]; if (r.ref.docUrl == fromURL) { r.ref.docUrl = toURL; @@ -390,7 +382,7 @@ void GObjectUtils::replaceAnnotationQualfier(SharedAnnotationData &a, const QStr a->findQualifiers(name, quals); QList<U2Qualifier> qualifiersList = a->qualifiers.toList(); - foreach (const U2Qualifier &q, quals) { + foreach(const U2Qualifier &q, quals) { qualifiersList.removeAll(q); } a->qualifiers = qualifiersList.toVector(); diff --git a/src/corelibs/U2Core/src/gobjects/GObjectUtils.h b/src/corelibs/U2Core/src/gobjects/GObjectUtils.h index d80a34dd56af8152d27f694d1af2d1efb587eb72..13852a53dad6c359f0649ef3d0f6cfa8c5138b02 100644 --- a/src/corelibs/U2Core/src/gobjects/GObjectUtils.h +++ b/src/corelibs/U2Core/src/gobjects/GObjectUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,7 +24,6 @@ #include <U2Core/AnnotationData.h> #include <U2Core/GObject.h> -#include <U2Core/GObjectTypes.h> namespace U2 { @@ -45,7 +44,7 @@ public: /* * Select objects from @fromObjects that are referenced by relations stored in @obj with @relationRole and @type. - */ + */ static QList<GObject*> selectRelations(GObject* obj, GObjectType type, GObjectRelationRole relationRole, const QList<GObject*>& fromObjects, UnloadedObjectFilter f); diff --git a/src/corelibs/U2Core/src/gobjects/MultipleAlignmentObject.cpp b/src/corelibs/U2Core/src/gobjects/MultipleAlignmentObject.cpp index cdb984db1a06f62fe54dfa1d7a9f4a372b7f1351..be522cb735f7d54420953919315af083e1354fe7 100644 --- a/src/corelibs/U2Core/src/gobjects/MultipleAlignmentObject.cpp +++ b/src/corelibs/U2Core/src/gobjects/MultipleAlignmentObject.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -20,8 +20,6 @@ */ #include <U2Core/DbiConnection.h> -#include <U2Core/DocumentModel.h> -#include <U2Core/GHints.h> #include <U2Core/MsaDbiUtils.h> #include <U2Core/MSAUtils.h> #include <U2Core/U2AlphabetUtils.h> @@ -35,8 +33,7 @@ namespace U2 { MaSavedState::MaSavedState() - : lastState(NULL) -{ + : lastState(NULL) { } @@ -63,13 +60,12 @@ void MaSavedState::setState(const MultipleAlignment &ma) { } MultipleAlignmentObject::MultipleAlignmentObject(const QString &gobjectType, - const QString &name, - const U2EntityRef &maRef, - const QVariantMap &hintsMap, - const MultipleAlignment &alignment) + const QString &name, + const U2EntityRef &maRef, + const QVariantMap &hintsMap, + const MultipleAlignment &alignment) : GObject(gobjectType, name, hintsMap), - cachedMa(alignment->getCopy()) -{ + cachedMa(alignment->getCopy()) { entityRef = maRef; dataLoaded = false; @@ -78,7 +74,7 @@ MultipleAlignmentObject::MultipleAlignmentObject(const QString &gobjectType, } } -MultipleAlignmentObject::~MultipleAlignmentObject(){ +MultipleAlignmentObject::~MultipleAlignmentObject() { emit si_invalidateAlignmentObject(); } @@ -142,6 +138,10 @@ qint64 MultipleAlignmentObject::getNumRows() const { return getMultipleAlignment()->getNumRows(); } +const QList<MultipleAlignmentRow>& MultipleAlignmentObject::getRows() const { + return getMultipleAlignment()->getRows(); +} + const MultipleAlignmentRow MultipleAlignmentObject::getRow(int row) const { return getMultipleAlignment()->getRow(row); } @@ -290,12 +290,12 @@ void MultipleAlignmentObject::updateCachedMultipleAlignment(const MaModification } } - if (mi.modifiedRowIds.isEmpty() && removedRowIds.isEmpty()) { // suppose that in this case all the alignment has changed + if (mi.modifiedRowIds.isEmpty() && removedRowIds.isEmpty()) { // suppose that in this case all the alignment has changed loadAlignment(os); SAFE_POINT_OP(os, ); } else { // only specified rows were changed if (!removedRowIds.isEmpty()) { - foreach (qint64 rowId, removedRowIds) { + foreach(qint64 rowId, removedRowIds) { const int rowIndex = cachedMa->getRowIndexByRowId(rowId, os); SAFE_POINT_OP(os, ); cachedMa->removeRow(rowIndex, os); @@ -375,7 +375,7 @@ namespace { template<typename T> inline QList<T> mergeLists(const QList<T> &first, const QList<T> &second) { QList<T> result = first; - foreach (const T &item, second) { + foreach(const T &item, second) { if (!result.contains(item)) { result.append(item); } @@ -388,7 +388,7 @@ QList<qint64> getRowsAffectedByDeletion(const MultipleAlignment &ma, const QList U2OpStatus2Log os; const QList<qint64> maRows = ma->getRowsIds(); int previousRemovedRowIndex = -1; - foreach (qint64 removedRowId, removedRowIds) { + foreach(qint64 removedRowId, removedRowIds) { if (-1 != previousRemovedRowIndex) { const int currentRemovedRowIndex = ma->getRowIndexByRowId(removedRowId, os); SAFE_POINT_OP(os, QList<qint64>()); @@ -437,7 +437,7 @@ void MultipleAlignmentObject::removeRegion(int startPos, int startRow, int nBase if (!removedRows.isEmpty()) { // suppose that if at least one row in msa was removed then // all the rows below it were changed const QList<qint64> rowIdsAffectedByDeletion = getRowsAffectedByDeletion(ma, removedRows); - foreach (qint64 removedRowId, removedRows) { // removed rows ain't need to be update + foreach(qint64 removedRowId, removedRows) { // removed rows ain't need to be update modifiedRowIds.removeAll(removedRowId); } modifiedRowIds = mergeLists(modifiedRowIds, rowIdsAffectedByDeletion); @@ -532,7 +532,7 @@ int MultipleAlignmentObject::shiftRegion(int startPos, int startRow, int nBases, return n; } -void MultipleAlignmentObject::saveState(){ +void MultipleAlignmentObject::saveState() { const MultipleAlignment &ma = getMultipleAlignment(); emit si_completeStateChanged(false); savedState.setState(ma); @@ -568,7 +568,7 @@ void MultipleAlignmentObject::loadDataCore(U2OpStatus &os) { int MultipleAlignmentObject::getMaxWidthOfGapRegion(U2OpStatus &os, const U2Region &rows, int pos, int maxGaps) { const MultipleAlignment &ma = getMultipleAlignment(); SAFE_POINT_EXT(U2Region(0, ma->getNumRows()).contains(rows) && 0 <= pos && 0 <= maxGaps && ma->getLength() > pos, - os.setError("Illegal parameters of the gap region"), 0); + os.setError("Illegal parameters of the gap region"), 0); const int maxRemovedGaps = qBound(0, maxGaps, ma->getLength() - pos); // check if there is nothing to remove diff --git a/src/corelibs/U2Core/src/gobjects/MultipleAlignmentObject.h b/src/corelibs/U2Core/src/gobjects/MultipleAlignmentObject.h index c53aa8bacf5bf88294baeea564281410d5cd369c..b9efffa175b6e4b826b2ef4d3282556fcd8fccbb 100644 --- a/src/corelibs/U2Core/src/gobjects/MultipleAlignmentObject.h +++ b/src/corelibs/U2Core/src/gobjects/MultipleAlignmentObject.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -66,6 +66,7 @@ public: const DNAAlphabet * getAlphabet() const; qint64 getLength() const; qint64 getNumRows() const; + const QList<MultipleAlignmentRow>& getRows() const; const MultipleAlignmentRow getRow(int row) const; int getRowPosById(qint64 rowId) const; virtual char charAt(int seqNum, qint64 position) const = 0; diff --git a/src/corelibs/U2Core/src/gobjects/MultipleChromatogramAlignmentObject.cpp b/src/corelibs/U2Core/src/gobjects/MultipleChromatogramAlignmentObject.cpp index ddafb4c170dcba2412fbd28491157b15f9110b16..4645ffed9468d709a1c58399b35c6b46d86fdedd 100644 --- a/src/corelibs/U2Core/src/gobjects/MultipleChromatogramAlignmentObject.cpp +++ b/src/corelibs/U2Core/src/gobjects/MultipleChromatogramAlignmentObject.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -20,9 +20,7 @@ */ #include <U2Core/DbiConnection.h> -#include <U2Core/DNAAlphabet.h> #include <U2Core/DNASequenceObject.h> -#include <U2Core/DocumentModel.h> #include <U2Core/GHints.h> #include <U2Core/GObjectTypes.h> #include <U2Core/GObjectUtils.h> @@ -34,7 +32,6 @@ #include <U2Core/U2AlphabetUtils.h> #include <U2Core/U2AttributeDbi.h> #include <U2Core/U2AttributeUtils.h> -#include <U2Core/U2DbiUtils.h> #include <U2Core/U2ObjectDbi.h> #include <U2Core/U2OpStatusUtils.h> #include <U2Core/U2SafePoints.h> @@ -47,12 +44,10 @@ namespace U2 { const QString MultipleChromatogramAlignmentObject::MCAOBJECT_REFERENCE = "MCAOBJECT_REFERENCE"; MultipleChromatogramAlignmentObject::MultipleChromatogramAlignmentObject(const QString &name, - const U2EntityRef &mcaRef, - const QVariantMap &hintsMap, - const MultipleChromatogramAlignment &mca) - : MultipleAlignmentObject(GObjectTypes::MULTIPLE_CHROMATOGRAM_ALIGNMENT, name, mcaRef, hintsMap, mca), referenceObj(NULL) -{ -} + const U2EntityRef &mcaRef, + const QVariantMap &hintsMap, + const MultipleChromatogramAlignment &mca) + : MultipleAlignmentObject(GObjectTypes::MULTIPLE_CHROMATOGRAM_ALIGNMENT, name, mcaRef, hintsMap, mca), referenceObj(NULL) {} MultipleChromatogramAlignmentObject::~MultipleChromatogramAlignmentObject() { delete referenceObj; @@ -240,15 +235,15 @@ void MultipleChromatogramAlignmentObject::trimRow(const int rowIndex, int curren int pos = 0; int count = 0; switch (edge) { - case Left: - pos = row->getCoreStart(); - count = currentPos - pos; - break; - case Right: - pos = currentPos + 1; - int lengthWithoutTrailing = row->getRowLengthWithoutTrailing(); - count = lengthWithoutTrailing - currentPos; - break; + case Left: + pos = row->getCoreStart(); + count = currentPos - pos; + break; + case Right: + pos = currentPos + 1; + int lengthWithoutTrailing = row->getRowLengthWithoutTrailing(); + count = lengthWithoutTrailing - currentPos; + break; } McaDbiUtils::removeRegion(entityRef, rowId, pos, count, os); U2Region region(rowIndex, 1); @@ -274,7 +269,7 @@ void MultipleChromatogramAlignmentObject::updateCachedRows(U2OpStatus &os, const MultipleChromatogramAlignmentExporter mcaExporter; QMap<qint64, McaRowMemoryData> mcaRowsMemoryData = mcaExporter.getMcaRowMemoryData(os, entityRef.dbiRef, entityRef.entityId, rowIds); SAFE_POINT_OP(os, ); - foreach (const qint64 rowId, mcaRowsMemoryData.keys()) { + foreach(const qint64 rowId, mcaRowsMemoryData.keys()) { const int rowIndex = cachedMca->getRowIndexByRowId(rowId, os); SAFE_POINT_OP(os, ); cachedMca->setRowContent(rowIndex, mcaRowsMemoryData[rowId]); @@ -293,7 +288,7 @@ void MultipleChromatogramAlignmentObject::removeRowPrivate(U2OpStatus &os, const } void MultipleChromatogramAlignmentObject::removeRegionPrivate(U2OpStatus &os, const U2EntityRef &maRef, - const QList<qint64> &rows, int startPos, int nBases) { + const QList<qint64> &rows, int startPos, int nBases) { McaDbiUtils::removeCharacters(maRef, rows, startPos, nBases, os); } diff --git a/src/corelibs/U2Core/src/gobjects/MultipleChromatogramAlignmentObject.h b/src/corelibs/U2Core/src/gobjects/MultipleChromatogramAlignmentObject.h index 1ecafd2928f58c3f760194a19eb1956f49685516..cf4889a2d27d3a63223725c3a1044ae9abba6a23 100644 --- a/src/corelibs/U2Core/src/gobjects/MultipleChromatogramAlignmentObject.h +++ b/src/corelibs/U2Core/src/gobjects/MultipleChromatogramAlignmentObject.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,7 +22,6 @@ #ifndef _U2_MULTIPLE_CHROMATOGRAM_ALIGNMENT_OBJECT_H_ #define _U2_MULTIPLE_CHROMATOGRAM_ALIGNMENT_OBJECT_H_ -#include <U2Core/MaModificationInfo.h> #include <U2Core/MultipleAlignmentObject.h> #include <U2Core/MultipleChromatogramAlignment.h> #include <U2Core/GObject.h> @@ -44,9 +43,9 @@ public: static const QString MCAOBJECT_REFERENCE; MultipleChromatogramAlignmentObject(const QString &name, - const U2EntityRef &mcaRef, - const QVariantMap &hintsMap = QVariantMap(), - const MultipleChromatogramAlignment &mca = MultipleChromatogramAlignment()); + const U2EntityRef &mcaRef, + const QVariantMap &hintsMap = QVariantMap(), + const MultipleChromatogramAlignment &mca = MultipleChromatogramAlignment()); virtual ~MultipleChromatogramAlignmentObject(); @@ -77,7 +76,7 @@ private: void updateDatabase(U2OpStatus &os, const MultipleAlignment &ma); void removeRowPrivate(U2OpStatus &os, const U2EntityRef &mcaRef, qint64 rowId); void removeRegionPrivate(U2OpStatus &os, const U2EntityRef &maRef, const QList<qint64> &rows, - int startPos, int nBases); + int startPos, int nBases); virtual void insertGap(const U2Region &rows, int pos, int nGaps); QList<U2Region> getColumnsWithGaps(int requiredGapsCount) const; U2MsaRowGapModel getReferenceGapModel() const; diff --git a/src/corelibs/U2Core/src/gobjects/MultipleSequenceAlignmentObject.cpp b/src/corelibs/U2Core/src/gobjects/MultipleSequenceAlignmentObject.cpp index 7713d51f17bc1acb95cb4ea3a84817a06740bc3a..b068dbd602e39a212d2441de26f1a679a24d7138 100644 --- a/src/corelibs/U2Core/src/gobjects/MultipleSequenceAlignmentObject.cpp +++ b/src/corelibs/U2Core/src/gobjects/MultipleSequenceAlignmentObject.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,7 +19,6 @@ * MA 02110-1301, USA. */ -#include <U2Core/DocumentModel.h> #include <U2Core/GHints.h> #include <U2Core/GObjectTypes.h> #include <U2Core/MsaDbiUtils.h> @@ -37,11 +36,10 @@ namespace U2 { MultipleSequenceAlignmentObject::MultipleSequenceAlignmentObject(const QString &name, - const U2EntityRef &msaRef, - const QVariantMap &hintsMap, - const MultipleSequenceAlignment &alnData) - : MultipleAlignmentObject(GObjectTypes::MULTIPLE_SEQUENCE_ALIGNMENT, name, msaRef, hintsMap, alnData) -{ + const U2EntityRef &msaRef, + const QVariantMap &hintsMap, + const MultipleSequenceAlignment &alnData) + : MultipleAlignmentObject(GObjectTypes::MULTIPLE_SEQUENCE_ALIGNMENT, name, msaRef, hintsMap, alnData) { } @@ -86,7 +84,7 @@ void MultipleSequenceAlignmentObject::updateGapModel(U2OpStatus &os, const U2Msa const QList<qint64> rowIds = msa->getRowsIds(); QList<qint64> modifiedRowIds; - foreach (qint64 rowId, rowsGapModel.keys()) { + foreach(qint64 rowId, rowsGapModel.keys()) { if (!rowIds.contains(rowId)) { os.setError(QString("Can't update gaps of a multiple alignment: cannot find a row with the id %1").arg(rowId)); return; @@ -143,6 +141,15 @@ void MultipleSequenceAlignmentObject::crop(const U2Region &window, const QSet<QS updateCachedMultipleAlignment(); } +void MultipleSequenceAlignmentObject::crop(const U2Region &window, const QList<qint64> &rowIds) { + SAFE_POINT(!isStateLocked(), "Alignment state is locked", ); + U2OpStatus2Log os; + MsaDbiUtils::crop(entityRef, rowIds, window.startPos, window.length, os); + SAFE_POINT_OP(os, ); + + updateCachedMultipleAlignment(); +} + void MultipleSequenceAlignmentObject::crop(const U2Region &window) { crop(window, QSet<QString>()); } @@ -235,7 +242,7 @@ void MultipleSequenceAlignmentObject::updateCachedRows(U2OpStatus &os, const QLi MultipleSequenceAlignmentExporter msaExporter; QList<MsaRowReplacementData> rowsAndSeqs = msaExporter.getAlignmentRows(entityRef.dbiRef, entityRef.entityId, rowIds, os); SAFE_POINT_OP(os, ); - foreach (const MsaRowReplacementData &data, rowsAndSeqs) { + foreach(const MsaRowReplacementData &data, rowsAndSeqs) { const int rowIndex = cachedMsa->getRowIndexByRowId(data.row.rowId, os); SAFE_POINT_OP(os, ); cachedMsa->setRowContent(rowIndex, data.sequence.seq); @@ -254,7 +261,7 @@ void MultipleSequenceAlignmentObject::removeRowPrivate(U2OpStatus &os, const U2E } void MultipleSequenceAlignmentObject::removeRegionPrivate(U2OpStatus &os, const U2EntityRef &maRef, const QList<qint64> &rows, - int startPos, int nBases) { + int startPos, int nBases) { MsaDbiUtils::removeRegion(maRef, rows, startPos, nBases, os); } diff --git a/src/corelibs/U2Core/src/gobjects/MultipleSequenceAlignmentObject.h b/src/corelibs/U2Core/src/gobjects/MultipleSequenceAlignmentObject.h index 88ad819cf77c7d8f7cb99f37fc2d59820dfe935d..f3e4d872376daa90d4f912ce103161b15fa6e454 100644 --- a/src/corelibs/U2Core/src/gobjects/MultipleSequenceAlignmentObject.h +++ b/src/corelibs/U2Core/src/gobjects/MultipleSequenceAlignmentObject.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -53,6 +53,7 @@ public: void updateGapModel(const QList<MultipleSequenceAlignmentRow> &sourceRows); void crop(const U2Region &window, const QSet<QString> &rowNames); + void crop(const U2Region &window, const QList<qint64> &rowIds); void crop(const U2Region &window); /** Methods to work with rows */ diff --git a/src/corelibs/U2Core/src/gobjects/PFMatrixObject.cpp b/src/corelibs/U2Core/src/gobjects/PFMatrixObject.cpp index 2098ab6cf98e128f597dd3d2813d38d2206c9a00..ad2525780c2d6404c266166decb73c7a71e63643 100644 --- a/src/corelibs/U2Core/src/gobjects/PFMatrixObject.cpp +++ b/src/corelibs/U2Core/src/gobjects/PFMatrixObject.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,7 +22,6 @@ #include <U2Core/DatatypeSerializeUtils.h> #include <U2Core/DocumentModel.h> #include <U2Core/GHints.h> -#include <U2Core/RawDataUdrSchema.h> #include <U2Core/U2DbiUtils.h> #include <U2Core/U2ObjectDbi.h> @@ -51,8 +50,7 @@ U2DataType U2PFMatrix::getType() const { //PFMatrixObject ////////////////////////////////////////////////////////////////////////// PFMatrixObject * PFMatrixObject::createInstance(const PFMatrix &matrix, const QString &objectName, - const U2DbiRef &dbiRef, U2OpStatus &os, const QVariantMap &hintsMap) -{ + const U2DbiRef &dbiRef, U2OpStatus &os, const QVariantMap &hintsMap) { U2PFMatrix object(dbiRef); const QString dstFolder = hintsMap.value(DocumentFormat::DBI_FOLDER_HINT, U2ObjectDbi::ROOT_FOLDER).toString(); const U2EntityRef entRef = PMatrixSerializeUtils<FMatrixSerializer, PFMatrix>::commit(matrix, @@ -63,15 +61,13 @@ PFMatrixObject * PFMatrixObject::createInstance(const PFMatrix &matrix, const QS PFMatrixObject::PFMatrixObject(const QString &objectName, const U2EntityRef &matrixRef, const QVariantMap &hintsMap) - : GObject(TYPE, objectName, hintsMap) -{ + : GObject(TYPE, objectName, hintsMap) { entityRef = matrixRef; } PFMatrixObject::PFMatrixObject(const PFMatrix &matrix, const QString &objectName, const U2EntityRef &matrixRef, const QVariantMap &hintsMap) - : GObject(TYPE, objectName, hintsMap), m(matrix) -{ + : GObject(TYPE, objectName, hintsMap), m(matrix) { entityRef = matrixRef; } diff --git a/src/corelibs/U2Core/src/gobjects/PFMatrixObject.h b/src/corelibs/U2Core/src/gobjects/PFMatrixObject.h index 9a4399215bbd6f2b896ce8fe760759ffc16dd79f..4cea62ccce1e97cd725c904c2cbc35c973ade899 100644 --- a/src/corelibs/U2Core/src/gobjects/PFMatrixObject.h +++ b/src/corelibs/U2Core/src/gobjects/PFMatrixObject.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/gobjects/PWMatrixObject.cpp b/src/corelibs/U2Core/src/gobjects/PWMatrixObject.cpp index 48a19effb7f9219edff48e32b135c74e812928a1..2c9389730952a0da3bd2c81205d0529d3481b3a5 100644 --- a/src/corelibs/U2Core/src/gobjects/PWMatrixObject.cpp +++ b/src/corelibs/U2Core/src/gobjects/PWMatrixObject.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,7 +22,6 @@ #include <U2Core/DatatypeSerializeUtils.h> #include <U2Core/DocumentModel.h> #include <U2Core/GHints.h> -#include <U2Core/RawDataUdrSchema.h> #include <U2Core/U2DbiUtils.h> #include <U2Core/U2ObjectDbi.h> @@ -51,8 +50,7 @@ U2DataType U2PWMatrix::getType() const { //PWMatrixObject ////////////////////////////////////////////////////////////////////////// PWMatrixObject * PWMatrixObject::createInstance(const PWMatrix &matrix, const QString &objectName, - const U2DbiRef &dbiRef, U2OpStatus &os, const QVariantMap &hintsMap) -{ + const U2DbiRef &dbiRef, U2OpStatus &os, const QVariantMap &hintsMap) { U2PWMatrix object(dbiRef); const QString dstFolder = hintsMap.value(DocumentFormat::DBI_FOLDER_HINT, U2ObjectDbi::ROOT_FOLDER).toString(); const U2EntityRef entRef = PMatrixSerializeUtils<WMatrixSerializer, PWMatrix>::commit(matrix, @@ -63,15 +61,13 @@ PWMatrixObject * PWMatrixObject::createInstance(const PWMatrix &matrix, const QS PWMatrixObject::PWMatrixObject(const QString &objectName, const U2EntityRef &matrixRef, const QVariantMap &hintsMap) - : GObject(TYPE, objectName, hintsMap) -{ + : GObject(TYPE, objectName, hintsMap) { entityRef = matrixRef; } PWMatrixObject::PWMatrixObject(const PWMatrix &matrix, const QString &objectName, const U2EntityRef &matrixRef, const QVariantMap &hintsMap) - : GObject(TYPE, objectName, hintsMap), m(matrix) -{ + : GObject(TYPE, objectName, hintsMap), m(matrix) { entityRef = matrixRef; } diff --git a/src/corelibs/U2Core/src/gobjects/PWMatrixObject.h b/src/corelibs/U2Core/src/gobjects/PWMatrixObject.h index c748de67794c6505c4d9dec9f47c9fb166c7ab8c..f170a16806a3be0338b5dc7923c52f7378f8dd1f 100644 --- a/src/corelibs/U2Core/src/gobjects/PWMatrixObject.h +++ b/src/corelibs/U2Core/src/gobjects/PWMatrixObject.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/gobjects/PhyTreeObject.cpp b/src/corelibs/U2Core/src/gobjects/PhyTreeObject.cpp index ecb6e3bff11237957a06f83568f855dd78042291..5fd9d9098c6dee0ae77806efb7d3a4f3f803608e 100644 --- a/src/corelibs/U2Core/src/gobjects/PhyTreeObject.cpp +++ b/src/corelibs/U2Core/src/gobjects/PhyTreeObject.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/gobjects/PhyTreeObject.h b/src/corelibs/U2Core/src/gobjects/PhyTreeObject.h index f35ea57e690c622be503346d02c4527ed95908b6..c6820ad65e32e70eab3d219eeb10068fe0735a0b 100644 --- a/src/corelibs/U2Core/src/gobjects/PhyTreeObject.h +++ b/src/corelibs/U2Core/src/gobjects/PhyTreeObject.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/gobjects/TextObject.cpp b/src/corelibs/U2Core/src/gobjects/TextObject.cpp index d254200fdfaf0fa121b459b75709e76b8ce5c859..07ab9b41b0fd521f7a9e40ca3d087194a8ea3882 100644 --- a/src/corelibs/U2Core/src/gobjects/TextObject.cpp +++ b/src/corelibs/U2Core/src/gobjects/TextObject.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/gobjects/TextObject.h b/src/corelibs/U2Core/src/gobjects/TextObject.h index da8fd42b25ca9e6c7f990d38e3b23fbf3ba70dbb..6217400a67bcc3519e86b14d887e119249903610 100644 --- a/src/corelibs/U2Core/src/gobjects/TextObject.h +++ b/src/corelibs/U2Core/src/gobjects/TextObject.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,8 +26,6 @@ #include <U2Core/U2RawData.h> #include <U2Core/UdrRecord.h> -#include "GObjectTypes.h" - namespace U2 { class U2CORE_EXPORT U2Text : public U2RawData { @@ -38,7 +36,7 @@ public: U2DataType getType() const; }; -class U2CORE_EXPORT TextObject: public GObject { +class U2CORE_EXPORT TextObject : public GObject { Q_OBJECT public: static TextObject * createInstance(const QString &text, const QString &objectName, diff --git a/src/corelibs/U2Core/src/gobjects/UnloadedObject.cpp b/src/corelibs/U2Core/src/gobjects/UnloadedObject.cpp index 2d4465d2141e9d3aaab51935d6601dc92fa60478..3720dd8c0b1a8d2c275bda58379ef6f2f85b6aff 100644 --- a/src/corelibs/U2Core/src/gobjects/UnloadedObject.cpp +++ b/src/corelibs/U2Core/src/gobjects/UnloadedObject.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/gobjects/UnloadedObject.h b/src/corelibs/U2Core/src/gobjects/UnloadedObject.h index 9ebb907014eee13869da8dcd99339f67cab6ea39..43adcfac2fe60f9bec0e60a0a9d1e6ac1fdf2d03 100644 --- a/src/corelibs/U2Core/src/gobjects/UnloadedObject.h +++ b/src/corelibs/U2Core/src/gobjects/UnloadedObject.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/gobjects/VariantTrackObject.cpp b/src/corelibs/U2Core/src/gobjects/VariantTrackObject.cpp index 1ee3edd103ecbc7fc3894640bbc381bfb43f4918..e17b6599b9d6eae4965704dc9fb40e5d620be752 100644 --- a/src/corelibs/U2Core/src/gobjects/VariantTrackObject.cpp +++ b/src/corelibs/U2Core/src/gobjects/VariantTrackObject.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/gobjects/VariantTrackObject.h b/src/corelibs/U2Core/src/gobjects/VariantTrackObject.h index 7dab9865d0153b7358a915ad13ceef405ac9d792..948228f64ca7864dd6a6e722ae5a550bfe8ce115 100644 --- a/src/corelibs/U2Core/src/gobjects/VariantTrackObject.h +++ b/src/corelibs/U2Core/src/gobjects/VariantTrackObject.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,11 +26,10 @@ #include <U2Core/U2Type.h> #include <U2Core/U2Variant.h> #include <U2Core/U2Region.h> -#include <U2Core/U2Feature.h> -namespace U2{ +namespace U2 { -class U2CORE_EXPORT VariantTrackObject: public GObject { +class U2CORE_EXPORT VariantTrackObject : public GObject { Q_OBJECT public: @@ -41,7 +40,7 @@ public: GObject * clone(const U2DbiRef &dbiRef, U2OpStatus &os, const QVariantMap &hints = QVariantMap()) const; /**U2_REGION_MAX to get all variants*/ - U2DbiIterator<U2Variant>* getVariants(const U2Region& reg, U2OpStatus& os ) const; + U2DbiIterator<U2Variant>* getVariants(const U2Region& reg, U2OpStatus& os) const; int getVariantCount(U2OpStatus &os) const; void addVariants(const QList<U2Variant>& variants, U2OpStatus& os); diff --git a/src/corelibs/U2Core/src/io/DatabaseConnectionAdapter.cpp b/src/corelibs/U2Core/src/io/DatabaseConnectionAdapter.cpp index 227fad6352c221711bd5be438359dcaee3de1087..3087f1bacf0e954bdce3574db675a7913040ee27 100644 --- a/src/corelibs/U2Core/src/io/DatabaseConnectionAdapter.cpp +++ b/src/corelibs/U2Core/src/io/DatabaseConnectionAdapter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/io/DatabaseConnectionAdapter.h b/src/corelibs/U2Core/src/io/DatabaseConnectionAdapter.h index 38e4b31b503d9342e329cbbffbadc54d01c309d5..a165e0fc528f48a1643d52086f9ecec9a9619c7a 100644 --- a/src/corelibs/U2Core/src/io/DatabaseConnectionAdapter.h +++ b/src/corelibs/U2Core/src/io/DatabaseConnectionAdapter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/io/HttpFileAdapter.cpp b/src/corelibs/U2Core/src/io/HttpFileAdapter.cpp index 247cb7f9df0983877e63e94c4b678fdbd5441648..31ffa8b6c0fe0cbe7d6c99c7261a7532f1831f9f 100644 --- a/src/corelibs/U2Core/src/io/HttpFileAdapter.cpp +++ b/src/corelibs/U2Core/src/io/HttpFileAdapter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -61,8 +61,6 @@ QNetworkProxy HttpFileAdapterFactory::getProxyByUrl( const QUrl & url ) const { return nc->getProxyByUrl(url); } - - HttpFileAdapter::HttpFileAdapter(HttpFileAdapterFactory* factory, QObject* o) : IOAdapter(factory, o), is_cached(false), begin_ptr(-1), end_ptr(0), reply(NULL), badstate(false), is_downloaded(false), downloaded(0), total(0) @@ -104,14 +102,14 @@ bool HttpFileAdapter::open( const QUrl& url, const QNetworkProxy & p) } netManager->setProxy(p); connect(netManager, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)), this, SLOT(onProxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*))); - if(url.toString().length()>MAX_GET_LENGTH) { + if (url.toString().length() > MAX_GET_LENGTH) { QStringList splittedStrings = url.toString().split(RemoteRequestConfig::HTTP_BODY_SEPARATOR); if(splittedStrings.count() > 1) { SAFE_POINT(2 == splittedStrings.count(), tr("Incorrect url string has been passed to HttpFileAdapter::open()"), false); QString headerString = splittedStrings.at(0); - QString data = splittedStrings.at(1); + postData = splittedStrings.at(1).toLatin1(); QNetworkRequest netRequest(headerString); - reply=netManager->post(netRequest, data.toLatin1()); + reply=netManager->post(netRequest, postData); } else { QNetworkRequest netRequest(url); @@ -165,7 +163,8 @@ qint64 HttpFileAdapter::readBlock(char* data, qint64 size) qint64 howmuch = qMin( size - write_offs, (qint64)firstChunkContains() ); readFromChunk(data + write_offs, howmuch); if (formatMode == TextMode) { - cutByteOrderMarks(data, howmuch); + cutByteOrderMarks(data, errorMessage, howmuch); + CHECK(errorMessage.isEmpty(), -1); } write_offs += howmuch; } @@ -322,11 +321,15 @@ void HttpFileAdapter::done() { QString locationHeaderValue = reply->header(QNetworkRequest::LocationHeader).toString(); if (!locationHeaderValue.isEmpty()) { - QUrl redirectedUrl(locationHeaderValue); + QUrl redirectUrl(locationHeaderValue); chunk_list.clear(); close(); coreLog.details(tr("Redirecting to %1").arg(locationHeaderValue)); - open(redirectedUrl, netManager->proxy()); + QString fullRedirectUrl(redirectUrl.toString()); + if (!postData.isEmpty()) { + fullRedirectUrl = redirectUrl.toString() + RemoteRequestConfig::HTTP_BODY_SEPARATOR + postData; + } + open(fullRedirectUrl, netManager->proxy()); return; } is_downloaded = true; @@ -347,10 +350,13 @@ void HttpFileAdapter::progress( qint64 done_, qint64 total_ ) } QString HttpFileAdapter::errorString() const{ + QString result; if (reply){ - return reply->errorString(); + result = reply->errorString(); + } else { + result = errorMessage; } - return ""; + return result; } void HttpFileAdapter::onProxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *auth){ diff --git a/src/corelibs/U2Core/src/io/HttpFileAdapter.h b/src/corelibs/U2Core/src/io/HttpFileAdapter.h index 554ed2b414c9978780fb0e2848641f4af0a8199e..9034004af95cf9a6080f65b578167f13aef5813a 100644 --- a/src/corelibs/U2Core/src/io/HttpFileAdapter.h +++ b/src/corelibs/U2Core/src/io/HttpFileAdapter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -65,7 +65,7 @@ public: virtual IOAdapterId getAdapterId() const { return BaseIOAdapters::GZIPPED_HTTP_FILE; } }; -class HttpFileAdapter: public IOAdapter { +class U2CORE_EXPORT HttpFileAdapter : public IOAdapter { Q_OBJECT public: HttpFileAdapter(HttpFileAdapterFactory* f, QObject* o = NULL); @@ -124,6 +124,7 @@ private: QMutex rwmut; QEventLoop loop; GUrl gurl; + QByteArray postData; private slots: void add_data(); void done(); diff --git a/src/corelibs/U2Core/src/io/IOAdapter.cpp b/src/corelibs/U2Core/src/io/IOAdapter.cpp index 3e36b2db02a206a44f320f3ac53bce8039801cd8..60282c5a5ecfc98a65bcb23b67ebb94c5f5ec0f0 100644 --- a/src/corelibs/U2Core/src/io/IOAdapter.cpp +++ b/src/corelibs/U2Core/src/io/IOAdapter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -87,7 +87,7 @@ qint64 IOAdapter::readUntil(char* buf, qint64 maxSize, bool IOAdapter::isEof() { char ch; - int ret = readBlock( &ch, 1 ); + qint64 ret = readBlock( &ch, 1 ); if (ret == 1) { skip( -ret ); } @@ -117,9 +117,9 @@ qint64 IOAdapter::readLine( char* buff, qint64 maxSize, bool* terminatorFound /* return len; } -void IOAdapter::cutByteOrderMarks(char* data, qint64& length) { +void IOAdapter::cutByteOrderMarks(char* data, QString& errorString, qint64& length) { QByteArray dataByteArray(data, length); - qint64 newCached = TextUtils::cutByteOrderMarks(data, length); + qint64 newCached = TextUtils::cutByteOrderMarks(data, errorString, length); QByteArray newDatatByteArray(data); if (dataByteArray != newDatatByteArray) { length = newCached; diff --git a/src/corelibs/U2Core/src/io/IOAdapter.h b/src/corelibs/U2Core/src/io/IOAdapter.h index d2e0db208c72211b0882f73821a96b0fd9987675..376252d00ac694fcabdc2e3035bfe894a28a9ba6 100644 --- a/src/corelibs/U2Core/src/io/IOAdapter.h +++ b/src/corelibs/U2Core/src/io/IOAdapter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,7 +24,6 @@ #include <QObject> -#include <U2Core/global.h> #include <U2Core/GUrl.h> namespace U2 { @@ -39,9 +38,9 @@ class IOAdapter; class U2CORE_EXPORT IOAdapterFactory : public QObject { public: - IOAdapterFactory(QObject* p) : QObject(p){} + IOAdapterFactory(QObject* p) : QObject(p) {} - virtual IOAdapter* createIOAdapter() = 0; + virtual IOAdapter* createIOAdapter() = 0; virtual IOAdapterId getAdapterId() const = 0; @@ -59,15 +58,15 @@ class U2CORE_EXPORT IOAdapter : public QObject { public: IOAdapter(IOAdapterFactory* f, QObject* o = NULL) : QObject(o), formatMode(BinaryMode), factory(f) {} - virtual ~IOAdapter(){} + virtual ~IOAdapter() {} - IOAdapterId getAdapterId() const {return factory->getAdapterId();} + IOAdapterId getAdapterId() const { return factory->getAdapterId(); } - virtual const QString& getAdapterName() const {return factory->getAdapterName();} + virtual const QString& getAdapterName() const { return factory->getAdapterName(); } - virtual bool isIOModeSupported(IOAdapterMode m) const {return factory->isIOModeSupported(m);} + virtual bool isIOModeSupported(IOAdapterMode m) const { return factory->isIOModeSupported(m); } - IOAdapterFactory* getFactory() const {return factory;} + IOAdapterFactory* getFactory() const { return factory; } virtual bool open(const GUrl& url, IOAdapterMode m) = 0; @@ -93,7 +92,7 @@ public: virtual qint64 readUntil(char* buff, qint64 maxSize, const QBitArray& readTerminators, TerminatorHandling th, bool* terminatorFound = 0); - virtual bool getChar(char* buff) {return 1 == readBlock(buff, 1);} + virtual bool getChar(char* buff) { return 1 == readBlock(buff, 1); } //If an error occurs, this function returns -1 virtual qint64 readBlock(char* buff, qint64 maxSize) = 0; @@ -103,7 +102,7 @@ public: virtual qint64 writeBlock(const char* buff, qint64 size) = 0; - qint64 writeBlock(const QByteArray& a) {return writeBlock(a.data(), a.size());} + qint64 writeBlock(const QByteArray& a) { return writeBlock(a.data(), a.size()); } /** * Both positive and negative values are accepted. @@ -117,27 +116,30 @@ public: /* Percent values in range 0..100, negative if unknown. */ virtual int getProgress() const = 0; - bool isEof(); + virtual bool isEof(); virtual qint64 bytesRead() const { return -1; } virtual GUrl getURL() const = 0; - virtual QString toString() const {return getURL().getURLString();} + virtual QString toString() const { return getURL().getURLString(); } /* Returns a human-readable description of the last device error that occurred */ virtual QString errorString() const = 0; + bool hasError() const { return !errorString().isEmpty(); } + protected: - static void cutByteOrderMarks(char* data, qint64& length); + static void cutByteOrderMarks(char* data, QString& errorString, qint64& length); FormatMode formatMode; + QString errorMessage; private: IOAdapterFactory* factory; }; -class U2CORE_EXPORT IOAdapterRegistry : public QObject { +class U2CORE_EXPORT IOAdapterRegistry : public QObject { public: IOAdapterRegistry(QObject* p = NULL) : QObject(p) {} diff --git a/src/corelibs/U2Core/src/io/InputStream.h b/src/corelibs/U2Core/src/io/InputStream.h index 69d63705c09c00c2a817f6085d71a055f27a7e40..45e1710d6c17d396bf0a0ac1a114369f76df9b34 100644 --- a/src/corelibs/U2Core/src/io/InputStream.h +++ b/src/corelibs/U2Core/src/io/InputStream.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/io/LocalFileAdapter.cpp b/src/corelibs/U2Core/src/io/LocalFileAdapter.cpp index 700e1ecd7bce486d5ee0637e69faa8c089ac6386..0b1ce6da6fa7b50861f783a7e46e16e4e2da7985 100644 --- a/src/corelibs/U2Core/src/io/LocalFileAdapter.cpp +++ b/src/corelibs/U2Core/src/io/LocalFileAdapter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,7 +22,6 @@ #include "LocalFileAdapter.h" #include "ZlibAdapter.h" -#include <U2Core/U2SafePoints.h> #include <U2Core/DocumentModel.h> #include <U2Core/TextUtils.h> @@ -37,7 +36,7 @@ IOAdapter* LocalFileAdapterFactory::createIOAdapter() { } GzippedLocalFileAdapterFactory::GzippedLocalFileAdapterFactory(QObject* o) -: LocalFileAdapterFactory(o) { + : LocalFileAdapterFactory(o) { name = tr("GZIP file"); } @@ -48,8 +47,7 @@ IOAdapter* GzippedLocalFileAdapterFactory::createIOAdapter() { const quint64 LocalFileAdapter::BUF_SIZE = DocumentFormat::READ_BUFF_SIZE; LocalFileAdapter::LocalFileAdapter(LocalFileAdapterFactory* factory, QObject* o, bool b) - : IOAdapter(factory, o), f(NULL), fileSize(0), bufferOptimization(b) -{ + : IOAdapter(factory, o), f(NULL), fileSize(0), bufferOptimization(b) { bufferOptimization = true; if (bufferOptimization) { buffer = QByteArray(BUF_SIZE, '\0'); @@ -77,9 +75,9 @@ bool LocalFileAdapter::open(const GUrl& url, IOAdapterMode m) { f = new QFile(url.getURLString()); QIODevice::OpenMode iomode; switch (m) { - case IOAdapterMode_Read: iomode = QIODevice::ReadOnly; break; - case IOAdapterMode_Write: iomode = QIODevice::WriteOnly | QIODevice::Truncate; break; - case IOAdapterMode_Append: iomode = QIODevice::WriteOnly | QIODevice::Append; break; + case IOAdapterMode_Read: iomode = QIODevice::ReadOnly; break; + case IOAdapterMode_Write: iomode = QIODevice::WriteOnly | QIODevice::Truncate; break; + case IOAdapterMode_Append: iomode = QIODevice::WriteOnly | QIODevice::Append; break; } bool res = f->open(iomode); if (!res) { @@ -96,7 +94,7 @@ bool LocalFileAdapter::isOpen() const { } void LocalFileAdapter::close() { - SAFE_POINT(isOpen(), "Adapter is not opened!",); + SAFE_POINT(isOpen(), "Adapter is not opened!", ); f->close(); delete f; f = NULL; @@ -104,7 +102,7 @@ void LocalFileAdapter::close() { } qint64 LocalFileAdapter::readBlock(char* data, qint64 size) { - SAFE_POINT(isOpen(), "Adapter is not opened!",-1); + SAFE_POINT(isOpen(), "Adapter is not opened!", -1); qint64 l = 0; if (bufferOptimization) { qint64 copySize = 0; @@ -112,16 +110,16 @@ qint64 LocalFileAdapter::readBlock(char* data, qint64 size) { if (currentPos == bufLen) { bufLen = f->read(bufData, BUF_SIZE); if (formatMode == TextMode) { - bufLen = TextUtils::cutByteOrderMarks(bufData, bufLen); + bufLen = TextUtils::cutByteOrderMarks(bufData, errorMessage, bufLen); } - if (bufLen == -1){ + if (bufLen == -1 || hasError()) { //error return -1; } currentPos = 0; } copySize = qMin(bufLen - currentPos, size - l); - if (0 == copySize) { + if (0 == copySize || hasError()) { break; } memcpy(data + l, bufData + currentPos, copySize); @@ -131,21 +129,22 @@ qint64 LocalFileAdapter::readBlock(char* data, qint64 size) { } else { l = f->read(data, size); if (formatMode == TextMode) { - l = TextUtils::cutByteOrderMarks(bufData, l); + l = TextUtils::cutByteOrderMarks(bufData, errorMessage, l); } + CHECK(!hasError(), -1); } return l; } qint64 LocalFileAdapter::writeBlock(const char* data, qint64 size) { - SAFE_POINT(isOpen(), "Adapter is not opened!",-1); + SAFE_POINT(isOpen(), "Adapter is not opened!", -1); qint64 l = f->write(data, size); fileSize += size; return l; } bool LocalFileAdapter::skip(qint64 nBytes) { - SAFE_POINT(isOpen(), "Adapter is not opened!",false); + SAFE_POINT(isOpen(), "Adapter is not opened!", false); if (bufferOptimization) { qint64 newPos = currentPos + nBytes; if (newPos < 0 || newPos >= bufLen) { @@ -161,12 +160,12 @@ bool LocalFileAdapter::skip(qint64 nBytes) { } } else { qint64 p = f->pos(); - return f->seek(p+nBytes); + return f->seek(p + nBytes); } } qint64 LocalFileAdapter::left() const { - SAFE_POINT(isOpen(), "Adapter is not opened!",-1); + SAFE_POINT(isOpen(), "Adapter is not opened!", -1); qint64 p = f->pos(); if (bufferOptimization) { p -= bufLen - currentPos; @@ -175,7 +174,7 @@ qint64 LocalFileAdapter::left() const { } int LocalFileAdapter::getProgress() const { - SAFE_POINT(isOpen(), "Adapter is not opened!",false); + SAFE_POINT(isOpen(), "Adapter is not opened!", false); return int(100 * float(bytesRead()) / fileSize); } @@ -191,8 +190,8 @@ GUrl LocalFileAdapter::getURL() const { return GUrl(f->fileName(), GUrl_File); } -QString LocalFileAdapter::errorString() const{ - return f->errorString(); +QString LocalFileAdapter::errorString() const { + return (f->error() == QFile::NoError) ? errorMessage : f->errorString(); } };//namespace diff --git a/src/corelibs/U2Core/src/io/LocalFileAdapter.h b/src/corelibs/U2Core/src/io/LocalFileAdapter.h index 449a507378c39e7ed06583139b3082399cb1944d..5bb15aca21de68e11e47802a88b7143cd4e3c85e 100644 --- a/src/corelibs/U2Core/src/io/LocalFileAdapter.h +++ b/src/corelibs/U2Core/src/io/LocalFileAdapter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/io/OutputStream.h b/src/corelibs/U2Core/src/io/OutputStream.h index 0c70e8736a81e314264a6fda332033a0f4aae457..85e67c52482666eec03a671225da558d61d6545a 100644 --- a/src/corelibs/U2Core/src/io/OutputStream.h +++ b/src/corelibs/U2Core/src/io/OutputStream.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/io/RingBuffer.h b/src/corelibs/U2Core/src/io/RingBuffer.h index 9654469db081db01ef490fc62b5d5cf4a14c9d40..3db613c6cb71e9fed8b66521b7397550fe190778 100644 --- a/src/corelibs/U2Core/src/io/RingBuffer.h +++ b/src/corelibs/U2Core/src/io/RingBuffer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/io/StringAdapter.cpp b/src/corelibs/U2Core/src/io/StringAdapter.cpp index b098e0d8307bc57416f2a7e386c910faf7a5b970..be96cfefb46f97243e5a94101196ef1729e1aa74 100644 --- a/src/corelibs/U2Core/src/io/StringAdapter.cpp +++ b/src/corelibs/U2Core/src/io/StringAdapter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -21,6 +21,8 @@ #include "StringAdapter.h" +#include <U2Core/U2SafePoints.h> + namespace U2 { StringAdapterFactory::StringAdapterFactory(QObject* o) : IOAdapterFactory(o) { @@ -72,7 +74,8 @@ qint64 StringAdapter::readBlock(char * data, qint64 maxSize) { qint64 size = qMin<qint64>((buffer.length() - pos), maxSize); memcpy(data, buffer.constData() + pos, size); if (formatMode == TextMode) { - cutByteOrderMarks(data, size); + cutByteOrderMarks(data, errorMessage, size); + CHECK(errorMessage.isEmpty(), -1); } pos += size; return size; @@ -113,7 +116,7 @@ qint64 StringAdapter::bytesRead() const { } QString StringAdapter::errorString() const { - return ""; + return errorMessage; } GUrl StringAdapter::getURL() const { diff --git a/src/corelibs/U2Core/src/io/StringAdapter.h b/src/corelibs/U2Core/src/io/StringAdapter.h index 5bf8d1449ee273b4de173c55301dd7cf7539332c..24527b6151879c2222b33cdfdd963db4d42472c8 100644 --- a/src/corelibs/U2Core/src/io/StringAdapter.h +++ b/src/corelibs/U2Core/src/io/StringAdapter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/io/VFSAdapter.cpp b/src/corelibs/U2Core/src/io/VFSAdapter.cpp index 41273562cc7b0aef0ab7b250c5500d8958bd97ce..13c228c9f9feb9d535c9772f88507cb1f8cde75d 100644 --- a/src/corelibs/U2Core/src/io/VFSAdapter.cpp +++ b/src/corelibs/U2Core/src/io/VFSAdapter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -90,7 +90,8 @@ void VFSAdapter::close() { qint64 VFSAdapter::readBlock(char* data, qint64 size) { qint64 l = buffer->read(data, size); if (formatMode == TextMode) { - l = TextUtils::cutByteOrderMarks(data, l); + l = TextUtils::cutByteOrderMarks(data, errorMessage, l); + CHECK(errorMessage.isEmpty(), -1); } return l; } @@ -124,8 +125,8 @@ qint64 VFSAdapter::bytesRead() const { return buffer->pos(); } -QString VFSAdapter::errorString() const{ - return buffer->errorString(); +QString VFSAdapter::errorString() const { + return buffer->errorString().isEmpty() ? errorMessage : buffer->errorString(); } diff --git a/src/corelibs/U2Core/src/io/VFSAdapter.h b/src/corelibs/U2Core/src/io/VFSAdapter.h index b5ff36c91a3d2afdd20f113c13031895d4295c8e..fea8cede9bc44d6613813fc14ab789bb19d2d900 100644 --- a/src/corelibs/U2Core/src/io/VFSAdapter.h +++ b/src/corelibs/U2Core/src/io/VFSAdapter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/io/VirtualFileSystem.cpp b/src/corelibs/U2Core/src/io/VirtualFileSystem.cpp index 0367c093cb37db3cc7744bffc71d932546cfe523..0bc0bb648e806659162cab8ebff4b5c121c678fe 100644 --- a/src/corelibs/U2Core/src/io/VirtualFileSystem.cpp +++ b/src/corelibs/U2Core/src/io/VirtualFileSystem.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,7 +22,6 @@ #include "VirtualFileSystem.h" #include <U2Core/AppContext.h> -#include <U2Core/IOAdapter.h> #include <U2Core/IOAdapterUtils.h> #include <U2Core/U2SafePoints.h> @@ -36,94 +35,91 @@ namespace U2 { * VirtualFileSystem *******************************************/ -VirtualFileSystem::VirtualFileSystem() { -} +VirtualFileSystem::VirtualFileSystem() {} -VirtualFileSystem::VirtualFileSystem( const QString & fsName ) : fileSystemName( fsName ) { -} +VirtualFileSystem::VirtualFileSystem(const QString & fsName) : fileSystemName(fsName) {} -VirtualFileSystem::~VirtualFileSystem() { -} +VirtualFileSystem::~VirtualFileSystem() {} -bool VirtualFileSystem::createFile( const QString & filename, const QByteArray & data ) { - if( files.contains( filename ) ) { +bool VirtualFileSystem::createFile(const QString & filename, const QByteArray & data) { + if (files.contains(filename)) { return false; } files[filename] = data; return true; } -bool VirtualFileSystem::mapFile( const QString & filename, const QString & filePath ) { - IOAdapterFactory * iof = AppContext::getIOAdapterRegistry()->getIOAdapterFactoryById( IOAdapterUtils::url2io( filePath ) ); +bool VirtualFileSystem::mapFile(const QString & filename, const QString & filePath) { + IOAdapterFactory * iof = AppContext::getIOAdapterRegistry()->getIOAdapterFactoryById(IOAdapterUtils::url2io(filePath)); SAFE_POINT(iof != NULL, QString("Failed to find IO adapter factory: %1").arg(filePath), false); - QScopedPointer<IOAdapter> io( iof->createIOAdapter() ); - if( !io->open( filePath, IOAdapterMode_Read ) ) { + QScopedPointer<IOAdapter> io(iof->createIOAdapter()); + if (!io->open(filePath, IOAdapterMode_Read)) { return false; } QByteArray bytes; - while( !io->isEof() ) { - QByteArray bytesBlock( READ_BLOCK_SZ, '\0' ); - qint64 howMany = io->readBlock( bytesBlock.data(), READ_BLOCK_SZ ); - if( -1 == howMany ) { + while (!io->isEof()) { + QByteArray bytesBlock(READ_BLOCK_SZ, '\0'); + qint64 howMany = io->readBlock(bytesBlock.data(), READ_BLOCK_SZ); + if (-1 == howMany) { return false; - } else if( 0 == howMany) { - assert( io->isEof() ); + } else if (0 == howMany) { + assert(io->isEof()); continue; } - bytes.append( QByteArray( bytesBlock.data(), howMany ) ); + bytes.append(QByteArray(bytesBlock.data(), howMany)); } - modifyFile( filename, bytes ); + modifyFile(filename, bytes); return true; } -bool VirtualFileSystem::mapBack( const QString & filename, const QString & filePath ) const { - if( !files.contains( filename ) ) { +bool VirtualFileSystem::mapBack(const QString & filename, const QString & filePath) const { + if (!files.contains(filename)) { return false; } - IOAdapterFactory * iof = AppContext::getIOAdapterRegistry()->getIOAdapterFactoryById( IOAdapterUtils::url2io( filePath ) ); + IOAdapterFactory * iof = AppContext::getIOAdapterRegistry()->getIOAdapterFactoryById(IOAdapterUtils::url2io(filePath)); SAFE_POINT(iof != NULL, QString("Failed to find IO adapter factory: %1").arg(filePath), false); - QScopedPointer<IOAdapter> io( iof->createIOAdapter() ); - if( !io->open( filePath, IOAdapterMode_Write ) ) { + QScopedPointer<IOAdapter> io(iof->createIOAdapter()); + if (!io->open(filePath, IOAdapterMode_Write)) { return false; } - io->writeBlock( files[filename] ); + io->writeBlock(files[filename]); return true; } -void VirtualFileSystem::modifyFile( const QString & filename, const QByteArray & data ) { +void VirtualFileSystem::modifyFile(const QString & filename, const QByteArray & data) { files[filename] = data; } -QByteArray VirtualFileSystem::removeFile( const QString & filename ) { - return files.take( filename ); +QByteArray VirtualFileSystem::removeFile(const QString & filename) { + return files.take(filename); } void VirtualFileSystem::removeAllFiles() { QStringList keys = files.keys(); - foreach( const QString & key, keys ) { - removeFile( key ); + foreach(const QString & key, keys) { + removeFile(key); } } -bool VirtualFileSystem::fileExists( const QString & filename ) const { - return files.contains( filename ); +bool VirtualFileSystem::fileExists(const QString & filename) const { + return files.contains(filename); } -QByteArray & VirtualFileSystem::getFileByName( const QString & filename ) { +QByteArray & VirtualFileSystem::getFileByName(const QString & filename) { return files[filename]; } -QByteArray VirtualFileSystem::getFileByName( const QString & filename ) const { - return files.value( filename ); +QByteArray VirtualFileSystem::getFileByName(const QString & filename) const { + return files.value(filename); } -void VirtualFileSystem::setId( const QString & id ) { +void VirtualFileSystem::setId(const QString & id) { fileSystemName = id; } @@ -139,29 +135,28 @@ QStringList VirtualFileSystem::getAllFilenames() const { * VirtualFileSystemRegistry *******************************************/ -VirtualFileSystemRegistry::VirtualFileSystemRegistry() { -} +VirtualFileSystemRegistry::VirtualFileSystemRegistry() {} VirtualFileSystemRegistry::~VirtualFileSystemRegistry() { - qDeleteAll( registry.values() ); + qDeleteAll(registry.values()); } -bool VirtualFileSystemRegistry::registerFileSystem( VirtualFileSystem * entry ) { +bool VirtualFileSystemRegistry::registerFileSystem(VirtualFileSystem * entry) { SAFE_POINT(entry != NULL, "FS is NULL!", false); QString id = entry->getId(); - if( registry.contains( id ) ) { + if (registry.contains(id)) { return false; } registry[id] = entry; return true; } -VirtualFileSystem * VirtualFileSystemRegistry::unregisterFileSystem( const QString & id ) { - return registry.take( id ); +VirtualFileSystem * VirtualFileSystemRegistry::unregisterFileSystem(const QString & id) { + return registry.take(id); } -VirtualFileSystem * VirtualFileSystemRegistry::getFileSystemById( const QString & id ) const { +VirtualFileSystem * VirtualFileSystemRegistry::getFileSystemById(const QString & id) const { return registry[id]; } diff --git a/src/corelibs/U2Core/src/io/VirtualFileSystem.h b/src/corelibs/U2Core/src/io/VirtualFileSystem.h index aa58ad3d9fadfca17556fd91a5ef890f56ecc6f4..a4559d6dd0f3d608063675d1f10ba067cdd03b0f 100644 --- a/src/corelibs/U2Core/src/io/VirtualFileSystem.h +++ b/src/corelibs/U2Core/src/io/VirtualFileSystem.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/io/ZlibAdapter.cpp b/src/corelibs/U2Core/src/io/ZlibAdapter.cpp index 27605fbd6d91782fac9240f1d8fb21729abac5b5..b3d77283df57cfc360c0d47329c9274a693047c6 100644 --- a/src/corelibs/U2Core/src/io/ZlibAdapter.cpp +++ b/src/corelibs/U2Core/src/io/ZlibAdapter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -31,37 +31,6 @@ #include <assert.h> -namespace { - -using namespace U2; - -// used in GZipIndex building -void setIfYouCan( bool what, bool* to ) { - if( NULL != to ) { - *to = what; - } -} -// used in GZipIndex building -void addAccessPoint( GZipIndex& index, int bits, qint64 in, qint64 out, quint32 left, char* wnd ) { - assert( NULL != wnd ); - - QByteArray window; - GZipIndexAccessPoint next; - next.bits = bits; - next.in = in; - next.out = out; - if (left) { - window.append( QByteArray( wnd + GZipIndex::WINSIZE - left, left ) ); - } - if (left < quint32(GZipIndex::WINSIZE)) { - window.append( QByteArray( wnd, GZipIndex::WINSIZE - left ) ); - } - next.window = qCompress( window ).toBase64(); - index.points.append( next ); -} - -} // anonymous namespace - namespace U2 { class GzipUtil { @@ -172,7 +141,7 @@ qint64 GzipUtil::uncompress(char* outBuff, qint64 outSize) qint64 GzipUtil::compress(const char* inBuff, qint64 inSize, bool finish) { - int ret; Q_UNUSED(ret); + int ret = Z_OK; Q_UNUSED(ret); /* Based on gun.c (example from zlib, copyrighted (C) 2003, 2005 Mark Adler) */ strm.avail_in = inSize; strm.next_in = (Bytef*)inBuff; @@ -207,14 +176,13 @@ bool GzipUtil::skip( const GZipIndexAccessPoint& here, qint64 offset ) { return false; } int ret = 0; - bool ok = false; char discard[GZipIndex::WINSIZE]; LocalFileAdapter* localIO = qobject_cast< LocalFileAdapter* >( io ); if( NULL == localIO ) { return false; } - ok = localIO->skip( here.in - ( here.bits ? 1 : 0 ) ); + bool ok = localIO->skip( here.in - ( here.bits ? 1 : 0 ) ); if ( !ok ) { return false; } @@ -235,13 +203,13 @@ bool GzipUtil::skip( const GZipIndexAccessPoint& here, qint64 offset ) { do { /* define where to put uncompressed data, and how much */ qint64 howMany = 0; - if ( 0 == offset ) { /* at offset now */ + if ( offset == 0) { /* at offset now */ break; /* all that we want */ } if ( offset > GZipIndex::WINSIZE ) { /* skip WINSIZE bytes */ howMany = GZipIndex::WINSIZE; } - else if ( 0 != offset ) { /* last skip */ + else { /* last skip */ howMany = offset; } offset -= howMany; @@ -294,7 +262,8 @@ bool ZlibAdapter::open(const GUrl& url, IOAdapterMode m ) { qint64 ZlibAdapter::readBlock(char* data, qint64 size) { if (!isOpen() || z->isCompressing()) { - assert(0 && "not ready to read"); + qCritical("not ready to read"); + Q_ASSERT(false); return false; } // first use data put back to buffer if any @@ -303,8 +272,9 @@ qint64 ZlibAdapter::readBlock(char* data, qint64 size) assert(rewinded > 0 && rewinded <= buf->length()); cached = buf->read(data, size, buf->length() - rewinded); if (formatMode == TextMode) { - cutByteOrderMarks(data, cached); + cutByteOrderMarks(data, errorMessage, cached); } + CHECK(errorMessage.isEmpty(), -1); if (cached == size) { rewinded -= size; return size; @@ -314,9 +284,9 @@ qint64 ZlibAdapter::readBlock(char* data, qint64 size) } size = z->uncompress(data + cached, size - cached); if (formatMode == TextMode) { - cutByteOrderMarks(data, size); + cutByteOrderMarks(data, errorMessage, size); } - if (size == -1) { + if (size == -1 || !errorMessage.isEmpty()) { return -1; } buf->append(data + cached, size); @@ -326,7 +296,8 @@ qint64 ZlibAdapter::readBlock(char* data, qint64 size) qint64 ZlibAdapter::writeBlock(const char* data, qint64 size) { if (!isOpen() || !z->isCompressing()) { - assert(0 && "not ready to write"); + qCritical("not ready to write"); + Q_ASSERT(false); return false; } qint64 l = z->compress(data, size); @@ -335,7 +306,8 @@ qint64 ZlibAdapter::writeBlock(const char* data, qint64 size) { bool ZlibAdapter::skip(qint64 nBytes) { if (!isOpen() || z->isCompressing()) { - assert(0 && "not ready to seek"); + qCritical("not ready to seek"); + Q_ASSERT(false); return false; } assert(buf); @@ -377,90 +349,6 @@ qint64 ZlibAdapter::bytesRead() const { return z->getPos() - rewinded; } -// based on zran.c ( example from zlib Copyright (C) 2005 Mark Adler ) -GZipIndex ZlibAdapter::buildGzipIndex( IOAdapter* io, qint64 span, bool* ok ) { - assert( NULL != io && io->isOpen() ); - - int ret = 0; - qint64 totin = 0; // our own total counters - qint64 totout = 0; // to avoid 4GB limit - qint64 last = 0; // totout value of last access point - - GZipIndex index; // index being generated - z_stream strm; - - char input[GZipIndex::CHUNK]; - char window[GZipIndex::WINSIZE]; - - /* initialize inflate */ - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit2(&strm, 47); /* automatic zlib or gzip decoding */ - if (ret != Z_OK) { - setIfYouCan( false, ok ); - return GZipIndex(); - } - - /* inflate the input, maintain a sliding window, and build an index -- this - also validates the integrity of the compressed data using the check - information at the end of the gzip or zlib stream */ - totin = totout = last = 0; - strm.avail_out = 0; - do { - /* get some compressed data from input file */ - strm.avail_in = io->readBlock( input, GZipIndex::CHUNK ); - if ( -1 == int(strm.avail_in) || 0 == strm.avail_in ) { - setIfYouCan( false, ok ); - return GZipIndex(); - } - strm.next_in = ( Bytef* )&input[0]; - - /* process all of that, or until end of stream */ - do { - /* reset sliding window if necessary */ - if (strm.avail_out == 0) { - strm.avail_out = GZipIndex::WINSIZE; - strm.next_out = (Bytef*)window; - } - - /* inflate until out of input, output, or at end of block -- - update the total input and output counters */ - totin += strm.avail_in; - totout += strm.avail_out; - ret = inflate(&strm, Z_BLOCK); /* return at end of block */ - totin -= strm.avail_in; - totout -= strm.avail_out; - if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR || ret == Z_NEED_DICT ) { - setIfYouCan( false, ok ); - return GZipIndex(); - } - if (ret == Z_STREAM_END) { - break; - } - /* if at end of block, consider adding an index entry (note that if - data_type indicates an end-of-block, then all of the - uncompressed data from that block has been delivered, and none - of the compressed data after that block has been consumed, - except for up to seven bits) -- the totout == 0 provides an - entry point after the zlib or gzip header, and assures that the - index always has at least one access point; we avoid creating an - access point after the last block by checking bit 6 of data_type - */ - if ((strm.data_type & 128) && !(strm.data_type & 64) && (totout == 0 || totout - last > span)) { - addAccessPoint(index, strm.data_type & 7, totin, totout, strm.avail_out, window); - last = totout; - } - } while (strm.avail_in != 0); - } while (ret != Z_STREAM_END); - - (void)inflateEnd(&strm); - setIfYouCan( true, ok ); - return index; -} - qint64 ZlibAdapter::getUncompressedFileSizeInBytes(const GUrl &url) { QFile file(url.getURLString()); if (!file.open(QIODevice::ReadOnly)) { @@ -482,7 +370,7 @@ GUrl ZlibAdapter::getURL() const { } QString ZlibAdapter::errorString() const{ - return io->errorString(); + return io->errorString().isEmpty() ? errorMessage : io->errorString(); } };//namespace diff --git a/src/corelibs/U2Core/src/io/ZlibAdapter.h b/src/corelibs/U2Core/src/io/ZlibAdapter.h index cd433da8e1d863b484d442c13b7685c9887cb925..85861938895a32b7b66b3ceae74b3326c203a404 100644 --- a/src/corelibs/U2Core/src/io/ZlibAdapter.h +++ b/src/corelibs/U2Core/src/io/ZlibAdapter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -62,12 +62,6 @@ public: */ bool skip( const GZipIndexAccessPoint& point, qint64 offset ); - /** - * on error *ok set to false and GZipIndex() is returned - * io - opened ioadapter, on the beginning of the file - */ - static GZipIndex buildGzipIndex( IOAdapter* io, qint64 span, bool* ok = NULL ); - /** * returns -1 if a file is failed to open */ diff --git a/src/corelibs/U2Core/src/models/BunchMimeData.cpp b/src/corelibs/U2Core/src/models/BunchMimeData.cpp index 38b0538e2c305bdf24c4e0b0de71ed8da608f5d5..59d3e7ad3e08483d7b952fc6c5b8031537823efe 100644 --- a/src/corelibs/U2Core/src/models/BunchMimeData.cpp +++ b/src/corelibs/U2Core/src/models/BunchMimeData.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/models/BunchMimeData.h b/src/corelibs/U2Core/src/models/BunchMimeData.h index a06b66deb198d55ed3888727d570d1988ed152e4..b4b33d8de80b993b6b0c6a3cea1e2ed107a15ef9 100644 --- a/src/corelibs/U2Core/src/models/BunchMimeData.h +++ b/src/corelibs/U2Core/src/models/BunchMimeData.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/models/DocumentImport.cpp b/src/corelibs/U2Core/src/models/DocumentImport.cpp index 882146a5069d5371fd913ccb04e00bab418c1364..f6cae91583edee96b5683bdde59b7e1a13513620 100644 --- a/src/corelibs/U2Core/src/models/DocumentImport.cpp +++ b/src/corelibs/U2Core/src/models/DocumentImport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/models/DocumentImport.h b/src/corelibs/U2Core/src/models/DocumentImport.h index ffedcc80b261292b5cb97915b42aa901fc680550..e1628ab465ee4c119c56333add4720f3770c0014 100644 --- a/src/corelibs/U2Core/src/models/DocumentImport.h +++ b/src/corelibs/U2Core/src/models/DocumentImport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/models/DocumentModel.cpp b/src/corelibs/U2Core/src/models/DocumentModel.cpp index d3c5344b4633441f2da67b3860d184b2294209b5..a298f10e311679b015916aeaa1a99d2f4f2ac51b 100644 --- a/src/corelibs/U2Core/src/models/DocumentModel.cpp +++ b/src/corelibs/U2Core/src/models/DocumentModel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -37,8 +37,6 @@ #include <U2Core/L10n.h> #include <U2Core/Log.h> #include <U2Core/Task.h> -#include <U2Core/U2Dbi.h> -#include <U2Core/U2DbiRegistry.h> #include <U2Core/U2DbiUtils.h> #include <U2Core/U2ObjectDbi.h> #include <U2Core/U2OpStatusUtils.h> @@ -49,8 +47,6 @@ namespace U2 { -const QString DocumentFormat::CREATED_NOT_BY_UGENE(QObject::tr("The document is created not by UGENE")); -const QString DocumentFormat::MERGED_SEQ_LOCK(QObject::tr("Document sequences were merged")); const QString DocumentFormat::DBI_REF_HINT("dbi_alias"); const QString DocumentFormat::DBI_FOLDER_HINT("dbi_folder"); const QString DocumentFormat::DEEP_COPY_OBJECT("deep_copy_object"); @@ -58,10 +54,15 @@ const QString DocumentMimeData::MIME_TYPE("application/x-ugene-document-mime"); const int DocumentFormat::READ_BUFF_SIZE = 4194304; //4Mb optimal buffer size for reading from network drives +DocumentFormat::DocumentFormat(QObject* p, const DocumentFormatId& _id, DocumentFormatFlags _flags, const QStringList& fileExts) : QObject(p), +id(_id), +formatFlags(_flags), +fileExtensions(fileExts) +{} + Document* DocumentFormat::createNewLoadedDocument(IOAdapterFactory* iof, const GUrl& url, - U2OpStatus& os, const QVariantMap& hints) -{ - const U2DbiRef tmpDbiRef = fetchDbiRef(hints, os); + U2OpStatus& os, const QVariantMap& hints) { + U2DbiRef tmpDbiRef = fetchDbiRef(hints, os); CHECK_OP(os, NULL); Document* doc = new Document(this, iof, url, tmpDbiRef, QList<UnloadedObjectInfo>(), @@ -73,10 +74,9 @@ Document* DocumentFormat::createNewLoadedDocument(IOAdapterFactory* iof, const G } Document* DocumentFormat::createNewUnloadedDocument(IOAdapterFactory* iof, const GUrl& url, - U2OpStatus& os, const QVariantMap& hints, - const QList<UnloadedObjectInfo>& info, - const QString& instanceModLockDesc) -{ + U2OpStatus& os, const QVariantMap& hints, + const QList<UnloadedObjectInfo>& info, + const QString& instanceModLockDesc) { Q_UNUSED(os); U2DbiRef dbiRef = (hints[DocumentFormat::DBI_REF_HINT]).value<U2DbiRef>(); Document* doc = new Document(this, iof, url, dbiRef, info, hints, instanceModLockDesc); @@ -93,7 +93,7 @@ Document* DocumentFormat::loadDocument(IOAdapterFactory* iof, const GUrl& url, c Document* res = NULL; - const U2DbiRef dbiRef = fetchDbiRef(hints, os); + U2DbiRef dbiRef = fetchDbiRef(hints, os); CHECK_OP(os, NULL); if (dbiRef.isValid()) { @@ -122,14 +122,14 @@ DNASequence* DocumentFormat::loadSequence(IOAdapter*, U2OpStatus& os) { return NULL; } -void DocumentFormat::storeDocument(Document* , IOAdapter* , U2OpStatus& os) { +void DocumentFormat::storeDocument(Document*, IOAdapter*, U2OpStatus& os) { assert(0); - os.setError(tr("Writing is not supported for this format (%1). Feel free to send a feature request though.").arg(getFormatName())); + os.setError(tr("Writing is not supported for this format (%1). Feel free to send a feature request though.").arg(formatName)); } void DocumentFormat::storeDocument(Document* doc, U2OpStatus& os, IOAdapterFactory* iof, const GUrl& newDocURL) { SAFE_POINT_EXT(formatFlags.testFlag(DocumentFormatFlag_SupportWriting), - os.setError(tr("Writing is not supported for this format (%1). Feel free to send a feature request though.").arg(getFormatName())),); + os.setError(tr("Writing is not supported for this format (%1). Feel free to send a feature request though.").arg(formatName)), ); assert(doc->getDocumentModLock(DocumentModLock_FORMAT_AS_INSTANCE) == NULL); if (iof == NULL) { @@ -141,7 +141,7 @@ void DocumentFormat::storeDocument(Document* doc, U2OpStatus& os, IOAdapterFacto if (url.isLocalFile()) { QString error; QString res = GUrlUtils::prepareFileLocation(url.getURLString(), os); - CHECK_OP(os,); + CHECK_OP(os, ); Q_UNUSED(res); assert(res == url.getURLString()); //ensure that GUrls are always canonical } @@ -166,7 +166,7 @@ bool DocumentFormat::checkConstraints(const DocumentFormatConstraints& c) const return false; // filtered by exclude flags } - if (c.formatsToExclude.contains(getFormatId())) { + if (c.formatsToExclude.contains(id)) { return false; // format is explicetely excluded } @@ -175,7 +175,7 @@ bool DocumentFormat::checkConstraints(const DocumentFormatConstraints& c) const } bool areTypesSatisfied = !c.allowPartialTypeMapping; - foreach (const GObjectType &objType, c.supportedObjectTypes) { + foreach(const GObjectType &objType, c.supportedObjectTypes) { if (c.allowPartialTypeMapping && supportedObjectTypes.contains(objType)) { // at least one type is supported areTypesSatisfied = true; break; @@ -221,11 +221,10 @@ bool DocumentFormat::isObjectOpSupported(const Document* d, DocObjectOp op, GObj const QString Document::UNLOAD_LOCK_NAME = "unload_document_lock"; Document::Document(DocumentFormat* _df, IOAdapterFactory* _io, const GUrl& _url, - const U2DbiRef& _dbiRef, - const QList<UnloadedObjectInfo>& unloadedObjects,const QVariantMap& hints, - const QString& instanceModLockDesc) - : StateLockableTreeItem(), df(_df), io(_io), url(_url), dbiRef(_dbiRef) -{ + const U2DbiRef& _dbiRef, + const QList<UnloadedObjectInfo>& unloadedObjects, const QVariantMap& hints, + const QString& instanceModLockDesc) + : StateLockableTreeItem(), df(_df), io(_io), url(_url), dbiRef(_dbiRef) { documentOwnsDbiResources = false; ctxState = new GHintsDefaultImpl(hints); @@ -239,15 +238,14 @@ Document::Document(DocumentFormat* _df, IOAdapterFactory* _io, const GUrl& _url, initModLocks(instanceModLockDesc, false); checkUnloadedState(); -// assert(!isModified()); + // assert(!isModified()); } Document::Document(DocumentFormat* _df, IOAdapterFactory* _io, const GUrl& _url, - const U2DbiRef& _dbiRef, - const QList<GObject*>& _objects, const QVariantMap& hints, - const QString& instanceModLockDesc) - : StateLockableTreeItem(), df(_df), io(_io), url(_url), dbiRef(_dbiRef) -{ + const U2DbiRef& _dbiRef, + const QList<GObject*>& _objects, const QVariantMap& hints, + const QString& instanceModLockDesc) + : StateLockableTreeItem(), df(_df), io(_io), url(_url), dbiRef(_dbiRef) { documentOwnsDbiResources = true; ctxState = new GHintsDefaultImpl(hints); @@ -275,9 +273,9 @@ Document *Document::getSimpleCopy(DocumentFormat *df, IOAdapterFactory *io, cons } Document::~Document() { - for (int i=0;i<DocumentModLock_NUM_LOCKS; i++) { + for (int i = 0;i < DocumentModLock_NUM_LOCKS; i++) { StateLock* sl = modLocks[i]; - if (sl!=NULL) { + if (sl != NULL) { unlockState(sl); delete sl; } @@ -298,12 +296,12 @@ void Document::setObjectsInUse(const QSet<U2DataId> &objs) { objectsInUse = objs; } -void Document::addObject(GObject* obj){ - SAFE_POINT(obj != NULL, "Object is NULL",); - SAFE_POINT(obj->getDocument() == NULL, "Object already belongs to some document",); - SAFE_POINT(df->isObjectOpSupported(this, DocumentFormat::DocObjectOp_Add, obj->getGObjectType()), "Document format doesn't support new objects adding",); - SAFE_POINT(isLoaded(), "The destination document is not loaded",); - SAFE_POINT(obj->getGObjectType() !=GObjectTypes::UNLOADED, "Object is not loaded",); +void Document::addObject(GObject* obj) { + SAFE_POINT(obj != NULL, "Object is NULL", ); + SAFE_POINT(obj->getDocument() == NULL, "Object already belongs to some document", ); + SAFE_POINT(df->isObjectOpSupported(this, DocumentFormat::DocObjectOp_Add, obj->getGObjectType()), "Document format doesn't support new objects adding", ); + SAFE_POINT(isLoaded(), "The destination document is not loaded", ); + SAFE_POINT(obj->getGObjectType() != GObjectTypes::UNLOADED, "Object is not loaded", ); _addObject(obj); } @@ -376,8 +374,7 @@ void Document::makeClean() { } void Document::setModificationTrack(bool track) { - DocumentFormatFlags ugenedbFlags( DocumentFormatFlag_DirectWriteOperations); - if (df != NULL && df->checkFlags(ugenedbFlags)) { + if (df != NULL && df->checkFlags(DocumentFormatFlag_DirectWriteOperations)) { StateLockableTreeItem::setModificationTrack(false); } else { StateLockableTreeItem::setModificationTrack(track); @@ -438,7 +435,7 @@ void Document::checkUniqueObjectNames() const { #ifdef _DEBUG QVariantMap hints = getGHintsMap(); bool dontCheckUniqueNames = hints.value(DocumentReadingMode_DontMakeUniqueNames, false).toBool(); - if (dontCheckUniqueNames){ + if (dontCheckUniqueNames) { return; } QSet<QString> names; @@ -463,8 +460,7 @@ void Document::checkLoadedState() const { class DocumentChildEventsHelper { public: DocumentChildEventsHelper(Document *doc) - : doc(doc) - { + : doc(doc) { if (NULL != doc) { doc->d_ptr->receiveChildEvents = false; } @@ -481,9 +477,9 @@ private: }; void Document::loadFrom(Document* sourceDoc) { - SAFE_POINT(!isLoaded(), QString("Document is already loaded: ").arg(getURLString()),) + SAFE_POINT(!isLoaded(), QString("Document is already loaded: ").arg(getURLString()), ) - DocumentChildEventsHelper eventsHelper(this); + DocumentChildEventsHelper eventsHelper(this); Q_UNUSED(eventsHelper); sourceDoc->checkLoadedState(); @@ -513,7 +509,7 @@ void Document::loadFrom(Document* sourceDoc) { } else { mLock->setUserDesc(dLock->getUserDesc()); } - } else if (dLock!=NULL) { + } else if (dLock != NULL) { modLocks[DocumentModLock_FORMAT_AS_INSTANCE] = new StateLock(dLock->getUserDesc()); lockState(modLocks[DocumentModLock_FORMAT_AS_INSTANCE]); } @@ -633,7 +629,7 @@ bool Document::checkConstraints(const Document::Constraints& c) const { } foreach(DocumentModLock l, c.notAllowedStateLocks) { - if (modLocks[l]!=NULL) { + if (modLocks[l] != NULL) { return false; } } @@ -663,7 +659,7 @@ void Document::setUserModLock(bool v) { } //hack: readonly settings are stored in project, so if document is in project -> mark project as modified - if (getParentStateLockItem()!=NULL) { + if (getParentStateLockItem() != NULL) { getParentStateLockItem()->setModified(true); } } @@ -688,7 +684,7 @@ bool Document::unload(bool deleteObjects) { QList<UnloadedObjectInfo> unloadedInfo; QList<GObject *> tmpObjects; - foreach (GObject* obj, objects) { + foreach(GObject* obj, objects) { unloadedInfo.append(UnloadedObjectInfo(obj)); // exclude objects from the document tmpObjects.append(obj); @@ -729,7 +725,7 @@ bool Document::isDatabaseConnection() const { } void Document::setModified(bool modified, const QString& modType) { - CHECK(!df->checkFlags(DocumentFormatFlag_DirectWriteOperations),); + CHECK(!df->checkFlags(DocumentFormatFlag_DirectWriteOperations), ); if (loadStateChangeMode && modified && modType == StateLockModType_AddChild) { //ignore modification events during loading/unloading return; } @@ -744,9 +740,9 @@ bool Document::isModificationAllowed(const QString& modType) { void Document::setGHints(GHints* newHints) { - assert(newHints!=NULL); + assert(newHints != NULL); //gobjects in document keep states in parent document map -> preserve gobject hints - if (newHints == ctxState){ + if (newHints == ctxState) { return; } QList<QVariantMap> objectHints; @@ -779,18 +775,15 @@ QVariantMap Document::getGHintsMap() const { return ctxState->getMap(); } -void Document::setupToEngine(QScriptEngine *engine) -{ +void Document::setupToEngine(QScriptEngine *engine) { qScriptRegisterMetaType(engine, toScriptValue, fromScriptValue); } -QScriptValue Document::toScriptValue(QScriptEngine *engine, Document* const &in) -{ +QScriptValue Document::toScriptValue(QScriptEngine *engine, Document* const &in) { return engine->newQObject(in); } -void Document::fromScriptValue(const QScriptValue &object, Document* &out) -{ +void Document::fromScriptValue(const QScriptValue &object, Document* &out) { out = qobject_cast<Document*>(object.toQObject()); } @@ -804,16 +797,16 @@ void Document::removeObjectsDataFromDbi(QList<GObject *> objects) { } else { U2OpStatus2Log os; DbiOperationsBlock opBlock(dbiRef, os); - CHECK_OP(os,); + CHECK_OP(os, ); Q_UNUSED(opBlock); DbiConnection con(dbiRef, os); - CHECK_OP(os,); - CHECK(con.dbi->getFeatures().contains(U2DbiFeature_RemoveObjects),); + CHECK_OP(os, ); + CHECK(con.dbi->getFeatures().contains(U2DbiFeature_RemoveObjects), ); - foreach (GObject* object, objects) { + foreach(GObject* object, objects) { U2OpStatus2Log osLog; - SAFE_POINT(object != NULL, "NULL object was provided",); + SAFE_POINT(object != NULL, "NULL object was provided", ); con.dbi->getObjectDbi()->removeObject(object->getEntityRef().entityId, true, osLog); } } @@ -842,7 +835,7 @@ void Document::setIOAdapterFactory(IOAdapterFactory* iof) { } DocumentMimeData::DocumentMimeData(Document* obj) - : objPtr(obj){ + : objPtr(obj) { setUrls(QList<QUrl>() << QUrl(GUrlUtils::gUrl2qUrl(obj->getURL()))); } diff --git a/src/corelibs/U2Core/src/models/DocumentModel.h b/src/corelibs/U2Core/src/models/DocumentModel.h index bf32cacfb3119fefdacf9402e69358c61559e707..65fb45dee2d759fa8d71063cac72747236bb5293 100644 --- a/src/corelibs/U2Core/src/models/DocumentModel.h +++ b/src/corelibs/U2Core/src/models/DocumentModel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -130,8 +130,6 @@ typedef QFlags<DocumentFormatFlag> DocumentFormatFlags; class U2CORE_EXPORT DocumentFormat: public QObject { Q_OBJECT public: - static const QString CREATED_NOT_BY_UGENE; - static const QString MERGED_SEQ_LOCK; static const QString DBI_REF_HINT; static const QString DBI_FOLDER_HINT; static const QString DEEP_COPY_OBJECT; @@ -144,17 +142,17 @@ public: }; - DocumentFormat(QObject* p, DocumentFormatFlags _flags, const QStringList& fileExts = QStringList()) - : QObject(p), - formatFlags(_flags), - fileExtensions(fileExts) - {} + DocumentFormat(QObject* p, const DocumentFormatId& id, DocumentFormatFlags _flags, const QStringList& fileExts = QStringList()); /* returns unique document format id */ - virtual DocumentFormatId getFormatId() const = 0; + const DocumentFormatId& getFormatId() const {return id;} + + /* Returns localized format name. */ + const QString& getFormatName() const {return formatName;} + + /* Returns localized format description. */ + const QString& getFormatDescription() const {return formatDescription;} - /* returns localized name of the format */ - virtual const QString& getFormatName() const = 0; /* returns list of usual file extensions for the format Example: "fa", "fasta", "gb" ... @@ -202,9 +200,6 @@ public: */ virtual FormatCheckResult checkRawData(const QByteArray& dataPrefix, const GUrl& url = GUrl()) const = 0; - /** Returns generic format description */ - virtual QString getFormatDescription() const {return formatDescription;} - /* Checks that document format satisfies given constraints */ virtual bool checkConstraints(const DocumentFormatConstraints& c) const; @@ -238,9 +233,11 @@ protected: */ virtual Document* loadDocument(IOAdapter* io, const U2DbiRef& targetDb, const QVariantMap& hints, U2OpStatus& os) = 0; + DocumentFormatId id; DocumentFormatFlags formatFlags; QStringList fileExtensions; QSet<GObjectType> supportedObjectTypes; + QString formatName; QString formatDescription; private: diff --git a/src/corelibs/U2Core/src/models/DocumentUtils.cpp b/src/corelibs/U2Core/src/models/DocumentUtils.cpp index 479637437dbde1495be14233101d5425d79dd962..7109f5d9fb28334482bfcb91481a0d0a638b2716 100644 --- a/src/corelibs/U2Core/src/models/DocumentUtils.cpp +++ b/src/corelibs/U2Core/src/models/DocumentUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,7 +24,6 @@ #include <U2Core/AppContext.h> #include <U2Core/DocumentImport.h> #include <U2Core/GUrlUtils.h> -#include <U2Core/IOAdapter.h> #include <U2Core/IOAdapterUtils.h> #include <U2Core/MSAUtils.h> #include <U2Core/MultipleSequenceAlignmentObject.h> @@ -46,7 +45,7 @@ QSet<QString> DocumentUtils::getURLs(const QList<Document*>& docs) { QSet<QString> DocumentUtils::getNewDocFileNameExcludesHint() { QSet<QString> excludeFileNames; Project* p = AppContext::getProject(); - if (p!=NULL) { + if (p != NULL) { excludeFileNames = DocumentUtils::getURLs(p->getDocuments()); } return excludeFileNames; @@ -87,9 +86,8 @@ static void placeOrderedByScore(const FormatDetectionResult& info, QList<FormatD // returns formats with FormatDetectionResult != Not matched sorted by FormatDetectionResult // FormatDetectionResult is adjusted by +FORMAT_DETECTION_EXT_BONUS if extension is matched -QList<FormatDetectionResult> DocumentUtils::detectFormat( const QByteArray& rawData, const QString& ext, - const GUrl& url, const FormatDetectionConfig& conf) -{ +QList<FormatDetectionResult> DocumentUtils::detectFormat(const QByteArray& rawData, const QString& ext, + const GUrl& url, const FormatDetectionConfig& conf) { DocumentFormatRegistry* fr = AppContext::getDocumentFormatRegistry(); QList< DocumentFormatId > allFormats = fr->getRegisteredFormats(); @@ -97,7 +95,7 @@ QList<FormatDetectionResult> DocumentUtils::detectFormat( const QByteArray& rawD foreach(const DocumentFormatId& id, allFormats) { DocumentFormat* f = fr->getFormatById(id); FormatCheckResult cr = f->checkRawData(rawData, url); - if (cr.score == FormatDetection_NotMatched) { + if (cr.score == FormatDetection_NotMatched) { continue; } if (conf.useExtensionBonus && f->getSupportedDocumentFileExtensions().contains(ext) && cr.score >= FormatDetection_VeryLowSimilarity) { @@ -135,7 +133,7 @@ QList<FormatDetectionResult> DocumentUtils::detectFormat( const QByteArray& rawD QList<FormatDetectionResult> DocumentUtils::detectFormat(const GUrl& url, const FormatDetectionConfig& conf) { QList<FormatDetectionResult> result; - if( url.isEmpty() ) { + if (url.isEmpty()) { return result; } QByteArray rawData = IOAdapterUtils::readFileHeader(url); @@ -153,9 +151,9 @@ QList<FormatDetectionResult> DocumentUtils::detectFormat(IOAdapter *io, const Fo if (io == NULL || !io->isOpen()) { return result; } - QByteArray rawData = IOAdapterUtils::readFileHeader( io ); + QByteArray rawData = IOAdapterUtils::readFileHeader(io); QString ext = GUrlUtils::getUncompressedExtension(io->getURL()); - result = detectFormat( rawData, ext , io->getURL(), conf); + result = detectFormat(rawData, ext, io->getURL(), conf); return result; } @@ -189,8 +187,7 @@ QList<DocumentFormat*> DocumentUtils::toFormats(const QList<FormatDetectionResul return result; } -bool DocumentUtils::canAddGObjectsToDocument( Document* doc, const GObjectType& type ) -{ +bool DocumentUtils::canAddGObjectsToDocument(Document* doc, const GObjectType& type) { if (!doc->isLoaded() || doc->isStateLocked()) { return false; } @@ -199,8 +196,7 @@ bool DocumentUtils::canAddGObjectsToDocument( Document* doc, const GObjectType& return df->isObjectOpSupported(doc, DocumentFormat::DocObjectOp_Add, type); } -bool DocumentUtils::canRemoveGObjectFromDocument(GObject *obj) -{ +bool DocumentUtils::canRemoveGObjectFromDocument(GObject *obj) { Document* doc = obj->getDocument(); if (NULL == doc || !doc->isLoaded() || doc->isStateLocked()) { @@ -215,14 +211,13 @@ bool DocumentUtils::canRemoveGObjectFromDocument(GObject *obj) return true; } -void DocumentUtils::removeDocumentsContainigGObjectFromProject(GObject *obj) -{ +void DocumentUtils::removeDocumentsContainigGObjectFromProject(GObject *obj) { // no results found -> delete empty annotation document Project* proj = AppContext::getProject(); - if (proj!=NULL) { + if (proj != NULL) { Document* toDelete = NULL; QList<Document*> docs = proj->getDocuments(); - foreach (Document* doc, docs) { + foreach(Document* doc, docs) { if (doc->getObjects().contains(obj)) { toDelete = doc; break; @@ -234,7 +229,7 @@ void DocumentUtils::removeDocumentsContainigGObjectFromProject(GObject *obj) } } -QFile::Permissions DocumentUtils::getPermissions(Document *doc){ +QFile::Permissions DocumentUtils::getPermissions(Document *doc) { return QFile(doc->getURLString()).permissions(); } diff --git a/src/corelibs/U2Core/src/models/DocumentUtils.h b/src/corelibs/U2Core/src/models/DocumentUtils.h index 5e8474e0260587e3694fc9624fc397367992db14..c7a9834ab8c7d1a26073dec9923294a2127469d3 100644 --- a/src/corelibs/U2Core/src/models/DocumentUtils.h +++ b/src/corelibs/U2Core/src/models/DocumentUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,8 +24,6 @@ #include <QFile> -#include <U2Core/global.h> - #include "DocumentModel.h" namespace U2 { @@ -35,10 +33,10 @@ class DocumentImporter; /** Result of the format detection. contains score and ( format or importer ) instance pointer -*/ + */ class U2CORE_EXPORT FormatDetectionResult { public: - FormatDetectionResult() : format(NULL), importer(NULL){} + FormatDetectionResult() : format(NULL), importer(NULL) {} DocumentFormat* format; DocumentImporter* importer; QByteArray rawData; @@ -49,7 +47,7 @@ public: QString getFormatDescriptionText() const; QString getFormatOrImporterName() const; - int score() const {return rawDataCheckResult.score;} + int score() const { return rawDataCheckResult.score; } }; @@ -70,7 +68,7 @@ public: bool excludeHiddenFormats; }; -class U2CORE_EXPORT DocumentUtils: public QObject { +class U2CORE_EXPORT DocumentUtils : public QObject { Q_OBJECT public: /* returns set with document urls */ @@ -78,7 +76,7 @@ public: /* The set of urls that should not be used for new documents returns list of loaded urls. Gets them from the active project - */ + */ static QSet<QString> getNewDocFileNameExcludesHint(); /* Detects document format. The best match goes first in the returned list */ @@ -87,19 +85,19 @@ public: /* Detects document format. The best match goes first in the returned list IOAdapter must be opened - */ + */ static QList<FormatDetectionResult> detectFormat(IOAdapter* io, const FormatDetectionConfig& conf = FormatDetectionConfig()); /* Detects document format. The best match goes first in the returned list ext & url can be used here to add extension bonus to the final score - */ + */ static QList<FormatDetectionResult> detectFormat(const QByteArray& rawData, const QString& ext = QString(), - const GUrl& url = GUrl(), const FormatDetectionConfig& conf = FormatDetectionConfig()); + const GUrl& url = GUrl(), const FormatDetectionConfig& conf = FormatDetectionConfig()); /* Find the best matching document format and stores it in @resultId. - */ + */ enum Detection { UNKNOWN, FORMAT, diff --git a/src/corelibs/U2Core/src/models/Folder.cpp b/src/corelibs/U2Core/src/models/Folder.cpp index f0a8e0180a3eea2d41233a6c10ff58215b138560..9dbdbb5f952ba7c8f86a8e4fa1080152a99189c5 100644 --- a/src/corelibs/U2Core/src/models/Folder.cpp +++ b/src/corelibs/U2Core/src/models/Folder.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/models/Folder.h b/src/corelibs/U2Core/src/models/Folder.h index 8976c8d2616ba7561a55161a233d958df71a7b9c..401df129f0566f896184008e25f454be71d30eac 100644 --- a/src/corelibs/U2Core/src/models/Folder.h +++ b/src/corelibs/U2Core/src/models/Folder.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,9 +22,6 @@ #ifndef _U2_FOLDER_H_ #define _U2_FOLDER_H_ -#include <QMimeData> -#include <QPointer> - #include <U2Core/DocumentModel.h> namespace U2 { diff --git a/src/corelibs/U2Core/src/models/GHints.cpp b/src/corelibs/U2Core/src/models/GHints.cpp index ff374323be54f15d020e891c9e435e95173b4e27..8f749b33565654749df2a2974e3b6ffc9c26ca6b 100644 --- a/src/corelibs/U2Core/src/models/GHints.cpp +++ b/src/corelibs/U2Core/src/models/GHints.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/models/GHints.h b/src/corelibs/U2Core/src/models/GHints.h index a944c1f924f7c38696693e3efeadc5f7a1d52402..de9e1e2009f88dcc678bb8d67e88499a88402258 100644 --- a/src/corelibs/U2Core/src/models/GHints.h +++ b/src/corelibs/U2Core/src/models/GHints.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/models/GObject.cpp b/src/corelibs/U2Core/src/models/GObject.cpp index bcf8a394f86add3a225b1079b7e21e4b2fc047f8..26942d78fbe7ff76c3e627c093d3302b773ed025 100644 --- a/src/corelibs/U2Core/src/models/GObject.cpp +++ b/src/corelibs/U2Core/src/models/GObject.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,20 +26,17 @@ #include "GHints.h" #include <U2Core/GObjectTypes.h> -#include <U2Core/GObjectUtils.h> #include <U2Core/U2DbiUtils.h> #include <U2Core/U2ObjectDbi.h> #include <U2Core/U2ObjectRelationsDbi.h> #include <U2Core/U2ObjectTypeUtils.h> #include <U2Core/U2OpStatusUtils.h> #include <U2Core/U2SafePoints.h> -#include <U2Core/UnloadedObject.h> namespace U2 { GObject::GObject(QString _type, const QString& _name, const QVariantMap& hintsMap) - : dataLoaded(false), type (_type), name(_name), arePermanentRelationsFetched(false) -{ + : dataLoaded(false), type(_type), name(_name), arePermanentRelationsFetched(false) { SAFE_POINT(!name.isEmpty(), "Invalid object name detected", ); setupHints(hintsMap); } @@ -123,7 +120,7 @@ void GObject::fetchPermanentGObjectRelations(QList<GObjectRelation> &res) const const QString docUrl = parentDoc->getURLString(); QList<GObjectRelation> dbRelations; - foreach (const U2ObjectRelation &relation, rawDbRelations) { + foreach(const U2ObjectRelation &relation, rawDbRelations) { if (NULL != parentDoc->findGObjectByName(relation.referencedName)) { GObjectReference reference(docUrl, relation.referencedName, relation.referencedType); reference.entityRef = U2EntityRef(entityRef.dbiRef, relation.referencedObject); @@ -137,7 +134,7 @@ void GObject::fetchPermanentGObjectRelations(QList<GObjectRelation> &res) const } QList<GObjectRelation> relationsMissedFromDb; - foreach (const GObjectRelation &relation, res) { + foreach(const GObjectRelation &relation, res) { if (!dbRelations.contains(relation)) { relationsMissedFromDb.append(relation); } @@ -168,7 +165,7 @@ void GObject::setRelationsInDb(QList<GObjectRelation>& list) const { U2ObjectDbi *oDbi = con.dbi->getObjectDbi(); QList<U2ObjectRelation> dbRelations; - for (int i = 0, n = list.size(); i < n; ++i ) { + for (int i = 0, n = list.size(); i < n; ++i) { GObjectRelation &relation = list[i]; const U2DataType refType = U2ObjectTypeUtils::toDataType(relation.ref.objType); const bool relatedObjectDbReferenceValid = relation.ref.entityRef.dbiRef.isValid(); @@ -243,7 +240,7 @@ void GObject::addObjectRelation(const GObjectRelation& rel) { void GObject::removeObjectRelation(const GObjectRelation& ref) { QList<GObjectRelation> list = getObjectRelations(); - bool ok = list.removeOne(ref); + bool ok = list.removeOne(ref); if (ok) { setObjectRelations(list); } @@ -266,7 +263,7 @@ bool relationsAreEqualExceptDbId(const GObjectRelation &f, const GObjectRelation bool GObject::hasObjectRelation(const GObjectRelation& r) const { Document *parentDoc = getDocument(); if (NULL != parentDoc && !parentDoc->isDatabaseConnection()) { - foreach (const GObjectRelation &rel, getObjectRelations()) { + foreach(const GObjectRelation &rel, getObjectRelations()) { if (relationsAreEqualExceptDbId(rel, r)) { return true; } @@ -379,7 +376,7 @@ void GObject::checkIfBelongToSharedDatabase(StateLockableTreeItem *parent) { } void GObject::removeAllLocks() { - foreach (StateLock* lock, modLocks.values()) { + foreach(StateLock* lock, modLocks.values()) { unlockState(lock); } qDeleteAll(modLocks.values()); diff --git a/src/corelibs/U2Core/src/models/GObject.h b/src/corelibs/U2Core/src/models/GObject.h index 17075bd02d510407ba863590669f60ba460ef88f..f35e3c9274207938c357d00a1441f0a64922e163 100644 --- a/src/corelibs/U2Core/src/models/GObject.h +++ b/src/corelibs/U2Core/src/models/GObject.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,9 +24,7 @@ #include <QMimeData> #include <QMutex> -#include <QPointer> -#include <U2Core/global.h> #include "StateLockableDataModel.h" #include "GObjectReference.h" #include <U2Core/U2Type.h> @@ -69,15 +67,15 @@ public: virtual Document* getDocument() const; - const QString& getGObjectName() const {return name;} + const QString& getGObjectName() const { return name; } virtual void setGObjectName(const QString& newName); - GObjectType getGObjectType() const {return type;} + GObjectType getGObjectType() const { return type; } - virtual bool checkConstraints(const GObjectConstraints* c) const {Q_UNUSED(c); return true;} + virtual bool checkConstraints(const GObjectConstraints* c) const { Q_UNUSED(c); return true; } - GHints* getGHints() const {return hints;} + GHints* getGHints() const { return hints; } QVariantMap getGHintsMap() const; @@ -107,11 +105,11 @@ public: bool hasObjectRelation(const GObjectRelation& r) const; - QHash< QString, QString > getIndexInfo() const {return indexInfo;} + QHash< QString, QString > getIndexInfo() const { return indexInfo; } - void setIndexInfo( const QHash<QString, QString>& ii) {indexInfo = ii;} + void setIndexInfo(const QHash<QString, QString>& ii) { indexInfo = ii; } - const U2EntityRef& getEntityRef() const {return entityRef;} + const U2EntityRef& getEntityRef() const { return entityRef; } bool isUnloaded() const; @@ -156,7 +154,7 @@ private: class GObjectConstraints : public QObject { Q_OBJECT public: - GObjectConstraints(const GObjectType& t, QObject* parent = NULL) : QObject(parent), objectType(t){} + GObjectConstraints(const GObjectType& t, QObject* parent = NULL) : QObject(parent), objectType(t) {} const GObjectType objectType; }; @@ -164,7 +162,7 @@ public: class U2CORE_EXPORT GObjectMimeData : public QMimeData { Q_OBJECT public: - GObjectMimeData(GObject* obj) : objPtr(obj){} + GObjectMimeData(GObject* obj) : objPtr(obj) {} QPointer<GObject> objPtr; diff --git a/src/corelibs/U2Core/src/models/GObjectReference.cpp b/src/corelibs/U2Core/src/models/GObjectReference.cpp index b9bf81e786d61e7509fbd061b7776a880cbdf392..505410c157103d07c8e70293e2aede799c5caae4 100644 --- a/src/corelibs/U2Core/src/models/GObjectReference.cpp +++ b/src/corelibs/U2Core/src/models/GObjectReference.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/models/GObjectReference.h b/src/corelibs/U2Core/src/models/GObjectReference.h index 01dca8bbc223fc449b18b3d37ba93f76774ed258..efde07d3ded6741355200c02b43b1d1b54273356 100644 --- a/src/corelibs/U2Core/src/models/GObjectReference.h +++ b/src/corelibs/U2Core/src/models/GObjectReference.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/models/MimeDataIterator.cpp b/src/corelibs/U2Core/src/models/MimeDataIterator.cpp index fa9b6341d5857b6719286f3ee5f22452fca879db..db3f0da3b625cebf650a1aa1a2aeeb02f3fac1f3 100644 --- a/src/corelibs/U2Core/src/models/MimeDataIterator.cpp +++ b/src/corelibs/U2Core/src/models/MimeDataIterator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/models/MimeDataIterator.h b/src/corelibs/U2Core/src/models/MimeDataIterator.h index 25700c932a70ea347765d42dd9d1abc843c7c745..a9ac84a0b611714713bb6157875835155973531c 100644 --- a/src/corelibs/U2Core/src/models/MimeDataIterator.h +++ b/src/corelibs/U2Core/src/models/MimeDataIterator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/models/ProjectModel.cpp b/src/corelibs/U2Core/src/models/ProjectModel.cpp index 73d8c9c57235b862a45ee0dc53dc4c668538c41c..9500e374901977015f63901850efa3e42f0d4f3b 100644 --- a/src/corelibs/U2Core/src/models/ProjectModel.cpp +++ b/src/corelibs/U2Core/src/models/ProjectModel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -21,7 +21,6 @@ #include <QScriptEngine> -#include <U2Core/AppContext.h> #include "ProjectModel.h" namespace U2 { @@ -30,19 +29,16 @@ Project::~Project() { } -void Project::setupToEngine(QScriptEngine *engine) -{ +void Project::setupToEngine(QScriptEngine *engine) { Document::setupToEngine(engine); qScriptRegisterMetaType(engine, toScriptValue, fromScriptValue); qScriptRegisterSequenceMetaType<QList<Document*> >(engine); }; -QScriptValue Project::toScriptValue(QScriptEngine *engine, Project* const &in) -{ +QScriptValue Project::toScriptValue(QScriptEngine *engine, Project* const &in) { return engine->newQObject(in); } -void Project::fromScriptValue(const QScriptValue &object, Project* &out) -{ +void Project::fromScriptValue(const QScriptValue &object, Project* &out) { out = qobject_cast<Project*>(object.toQObject()); } diff --git a/src/corelibs/U2Core/src/models/ProjectModel.h b/src/corelibs/U2Core/src/models/ProjectModel.h index 3dff62face05e330df0a87e10f3d6a02c15c788b..aab5116d9f245e4a403a2f8b849fbe3b6880beff 100644 --- a/src/corelibs/U2Core/src/models/ProjectModel.h +++ b/src/corelibs/U2Core/src/models/ProjectModel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/models/StateLockableDataModel.cpp b/src/corelibs/U2Core/src/models/StateLockableDataModel.cpp index f6274c3604d78c7b30e51eb53d9a59ce85a4bfaf..df4dd530b799b6347b2516437767937bf87f836e 100644 --- a/src/corelibs/U2Core/src/models/StateLockableDataModel.cpp +++ b/src/corelibs/U2Core/src/models/StateLockableDataModel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/models/StateLockableDataModel.h b/src/corelibs/U2Core/src/models/StateLockableDataModel.h index 00c0a13a8cad6062b26031cde2c389ee01dbffa3..a1835304d424e37540eee9f362db47edb71191e6 100644 --- a/src/corelibs/U2Core/src/models/StateLockableDataModel.h +++ b/src/corelibs/U2Core/src/models/StateLockableDataModel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/selection/AnnotationSelection.cpp b/src/corelibs/U2Core/src/selection/AnnotationSelection.cpp index 75e9f2d4dde0fdbcf5de46c16afec8af9d92e64f..a6a39f79d9d2816b2ea15c2e48977fe4e20c3cfb 100644 --- a/src/corelibs/U2Core/src/selection/AnnotationSelection.cpp +++ b/src/corelibs/U2Core/src/selection/AnnotationSelection.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,7 +24,6 @@ #include <U2Core/SelectionTypes.h> #include <U2Core/TextUtils.h> #include <U2Core/U2SafePoints.h> -#include <U2Core/U2DbiUtils.h> #include <U2Core/U2SequenceDbi.h> #include <U2Core/U2OpStatus.h> #include <U2Core/U2SequenceUtils.h> @@ -36,8 +35,7 @@ namespace U2 { static QList<Annotation *> emptyAnnotations; AnnotationSelectionData::AnnotationSelectionData(Annotation *a, int lIdx) - : annotation(a) -{ + : annotation(a) { if (lIdx != -1) { locationIdxList.append(lIdx); } else { @@ -49,8 +47,7 @@ AnnotationSelectionData::AnnotationSelectionData(Annotation *a, int lIdx) AnnotationSelectionData::AnnotationSelectionData(Annotation *a, const QList<int> &listIdx) : annotation(a), - locationIdxList(listIdx) -{ + locationIdxList(listIdx) { qSort(locationIdxList); } @@ -65,7 +62,7 @@ QVector<U2Region> AnnotationSelectionData::getSelectedRegions() const { } QVector<U2Region> res; - foreach (int idx, locationIdxList) { + foreach(int idx, locationIdxList) { SAFE_POINT(0 <= idx && idx < regions.size(), "Invalid location index", QVector<U2Region>()); res << regions[idx]; } @@ -106,7 +103,7 @@ bool AnnotationSelectionData::deselectLocation(int locIndx) { } void AnnotationSelectionData::addLocation(int locIdx) { - SAFE_POINT(-1 <= locIdx && locIdx < annotation->getRegions().size(), "Invalid location index",); + SAFE_POINT(-1 <= locIdx && locIdx < annotation->getRegions().size(), "Invalid location index", ); if (locationIdxList.contains(locIdx)) { return; } @@ -124,7 +121,7 @@ void AnnotationSelectionData::addLocation(int locIdx) { int AnnotationSelectionData::getSelectedRegionsLen() const { int len = 0; QVector<U2Region> regions = annotation->getRegions(); - foreach (int idx, locationIdxList) { + foreach(int idx, locationIdxList) { SAFE_POINT(0 <= idx && idx < regions.size(), "Invalid location index", 0); len += regions[idx].length; } @@ -149,7 +146,7 @@ void AnnotationSelection::clear() { return; } QList<Annotation *> tmpRemoved; - foreach (const AnnotationSelectionData &asd, selection) { + foreach(const AnnotationSelectionData &asd, selection) { tmpRemoved.push_back(asd.annotation); } selection.clear(); @@ -162,8 +159,8 @@ bool AnnotationSelection::contains(Annotation *a) const { void AnnotationSelection::removeObjectAnnotations(AnnotationTableObject *obj) { QList<Annotation *> removed; - foreach (Annotation *a, obj->getAnnotations()) { - for(int i = 0; i < selection.size(); i++) { + foreach(Annotation *a, obj->getAnnotations()) { + for (int i = 0; i < selection.size(); i++) { if (selection[i].annotation == a) { removed.append(a); selection.removeAt(i); @@ -176,7 +173,7 @@ void AnnotationSelection::removeObjectAnnotations(AnnotationTableObject *obj) { void AnnotationSelection::addToSelection(Annotation *a, int locationIdx) { const int nRegionsTotal = a->getRegions().size(); - SAFE_POINT(locationIdx >=-1 && locationIdx < nRegionsTotal, "Invalid location index!",); + SAFE_POINT(locationIdx >= -1 && locationIdx < nRegionsTotal, "Invalid location index!", ); for (int i = 0; i < selection.size(); i++) { AnnotationSelectionData &asd = selection[i]; @@ -200,7 +197,7 @@ void AnnotationSelection::addToSelection(Annotation *a, int locationIdx) { } void AnnotationSelection::removeFromSelection(Annotation *a, int locationIdx) { - for(int i = 0; i < selection.size(); i++) { + for (int i = 0; i < selection.size(); i++) { AnnotationSelectionData& asd = selection[i]; if (asd.annotation == a) { if (!asd.contains(locationIdx)) { @@ -219,7 +216,7 @@ void AnnotationSelection::removeFromSelection(Annotation *a, int locationIdx) { } const AnnotationSelectionData * AnnotationSelection::getAnnotationData(Annotation *a) const { - foreach (const AnnotationSelectionData &asd, selection) { + foreach(const AnnotationSelectionData &asd, selection) { if (asd.annotation == a) { return &asd; } @@ -228,17 +225,16 @@ const AnnotationSelectionData * AnnotationSelection::getAnnotationData(Annotatio } void AnnotationSelection::getAnnotationSequence(QByteArray &res, const AnnotationSelectionData &ad, char gapSym, const U2EntityRef &seqRef, - const DNATranslation *complTT, const DNATranslation *aminoTT, U2OpStatus &os) -{ + const DNATranslation *complTT, const DNATranslation *aminoTT, U2OpStatus &os) { QVector<U2Region> regions = ad.getSelectedRegions(); - QList<QByteArray> parts = U2SequenceUtils::extractRegions(seqRef, regions, complTT, aminoTT, false, os); - CHECK_OP(os,); + QList<QByteArray> parts = U2SequenceUtils::extractRegions(seqRef, regions, complTT, aminoTT, false, os); + CHECK_OP(os, ); qint64 resLen = 0; - foreach (const QByteArray &p, parts) { + foreach(const QByteArray &p, parts) { resLen += p.length(); } res.reserve(resLen); - foreach (const QByteArray &p, parts) { + foreach(const QByteArray &p, parts) { if (!res.isEmpty()) { res.append(gapSym); } @@ -247,7 +243,7 @@ void AnnotationSelection::getAnnotationSequence(QByteArray &res, const Annotatio } bool AnnotationSelection::contains(Annotation *a, int locationIdx) const { - foreach (const AnnotationSelectionData &asd, selection) { + foreach(const AnnotationSelectionData &asd, selection) { if (asd.annotation == a && asd.contains(locationIdx)) { return true; } @@ -256,7 +252,7 @@ bool AnnotationSelection::contains(Annotation *a, int locationIdx) const { } bool AnnotationSelection::contains(const AnnotationSelectionData &selData) const { - foreach (const AnnotationSelectionData& asd, selection) { + foreach(const AnnotationSelectionData& asd, selection) { if (asd.contains(selData)) { return true; } @@ -270,8 +266,7 @@ bool AnnotationSelection::contains(const AnnotationSelectionData &selData) const static QList<AnnotationGroup *> emptyGroups; AnnotationGroupSelection::AnnotationGroupSelection(QObject *p) - : GSelection(GSelectionTypes::ANNOTATION_GROUPS, p) -{ + : GSelection(GSelectionTypes::ANNOTATION_GROUPS, p) { connect(this, SIGNAL(si_selectionChanged(AnnotationGroupSelection *, const QList<AnnotationGroup *> &, const QList<AnnotationGroup *> &)), SLOT(sl_selectionChanged())); } @@ -299,12 +294,12 @@ void AnnotationGroupSelection::clear() { void AnnotationGroupSelection::removeObjectGroups(AnnotationTableObject *obj) { QList<AnnotationGroup *> tmpRemoved; - foreach (AnnotationGroup *g, selection) { + foreach(AnnotationGroup *g, selection) { if (g->getGObject() == obj) { tmpRemoved.append(g); } } - foreach (AnnotationGroup *g, tmpRemoved) { + foreach(AnnotationGroup *g, tmpRemoved) { selection.removeOne(g); } emit si_selectionChanged(this, emptyGroups, tmpRemoved); @@ -336,7 +331,7 @@ QVector<U2Region> AnnotationSelection::getSelectedLocations(const QSet<Annotatio if (objects.isEmpty()) { return result; } - foreach (const AnnotationSelectionData &d, selection) { + foreach(const AnnotationSelectionData &d, selection) { if (objects.contains(d.annotation->getGObject())) { result << d.getSelectedRegions(); } diff --git a/src/corelibs/U2Core/src/selection/AnnotationSelection.h b/src/corelibs/U2Core/src/selection/AnnotationSelection.h index 5454bef5589eb12e7dd9102c3c1a70f430c684bb..85cc9ae7bcdcdfa8f1c6f3b77a558bf9b50ed50c 100644 --- a/src/corelibs/U2Core/src/selection/AnnotationSelection.h +++ b/src/corelibs/U2Core/src/selection/AnnotationSelection.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/selection/DNASequenceSelection.h b/src/corelibs/U2Core/src/selection/DNASequenceSelection.h index 076790c4b5416e2d906b9d4c09b0585ae9655c3c..69c51085a3c578ff915e09e36ec2d71ca66134b5 100644 --- a/src/corelibs/U2Core/src/selection/DNASequenceSelection.h +++ b/src/corelibs/U2Core/src/selection/DNASequenceSelection.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/selection/DocumentSelection.cpp b/src/corelibs/U2Core/src/selection/DocumentSelection.cpp index dad41842b3d2a942502835d0f6b2a4b7af764fa9..c33ceb885aee9182d559da336251e8ed73df3a5c 100644 --- a/src/corelibs/U2Core/src/selection/DocumentSelection.cpp +++ b/src/corelibs/U2Core/src/selection/DocumentSelection.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/selection/DocumentSelection.h b/src/corelibs/U2Core/src/selection/DocumentSelection.h index 1d90cd3af7be5d923e6de81f351f2d6c35b60c0e..24029ea229fb0661055c82db268bd5675baa2793 100644 --- a/src/corelibs/U2Core/src/selection/DocumentSelection.h +++ b/src/corelibs/U2Core/src/selection/DocumentSelection.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/selection/FolderSelection.cpp b/src/corelibs/U2Core/src/selection/FolderSelection.cpp index b6a6da1d5d6546558891542e4794b1cccc981af4..b392ec8a10cdd627e8feed0c24f79c01bf3b5d2c 100644 --- a/src/corelibs/U2Core/src/selection/FolderSelection.cpp +++ b/src/corelibs/U2Core/src/selection/FolderSelection.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/selection/FolderSelection.h b/src/corelibs/U2Core/src/selection/FolderSelection.h index ab379d14cb292ca1e72373de5c15a1b1f3a6bcbe..9c46bf51511dc44e00fd2d710552c785156e4ed6 100644 --- a/src/corelibs/U2Core/src/selection/FolderSelection.h +++ b/src/corelibs/U2Core/src/selection/FolderSelection.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/selection/GObjectSelection.cpp b/src/corelibs/U2Core/src/selection/GObjectSelection.cpp index 73e91f303080d86fafc373a2f60c0bba92c96d9f..3f0289400a2f00510f664752b2074d1ebfb08e78 100644 --- a/src/corelibs/U2Core/src/selection/GObjectSelection.cpp +++ b/src/corelibs/U2Core/src/selection/GObjectSelection.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/selection/GObjectSelection.h b/src/corelibs/U2Core/src/selection/GObjectSelection.h index 7880da5c47b674b84f5eeb29762096ed6fb45862..0e1669efa433063a41b76d3a8d1fdf7867e74bac 100644 --- a/src/corelibs/U2Core/src/selection/GObjectSelection.h +++ b/src/corelibs/U2Core/src/selection/GObjectSelection.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/selection/LRegionsSelection.cpp b/src/corelibs/U2Core/src/selection/LRegionsSelection.cpp index 8ab78f24191ef4ea21e8830f41a1f57b12b75f79..f1c9dfe7a36c48b9449be559f2aafbdd908fda64 100644 --- a/src/corelibs/U2Core/src/selection/LRegionsSelection.cpp +++ b/src/corelibs/U2Core/src/selection/LRegionsSelection.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/selection/LRegionsSelection.h b/src/corelibs/U2Core/src/selection/LRegionsSelection.h index d2913a8248c922a6f8e06dc1f88b9512fb58d77c..9f06d2a33d79787f2377e76fd5f270d72587d25c 100644 --- a/src/corelibs/U2Core/src/selection/LRegionsSelection.h +++ b/src/corelibs/U2Core/src/selection/LRegionsSelection.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/selection/SelectionModel.cpp b/src/corelibs/U2Core/src/selection/SelectionModel.cpp index e5b701f5e6858d10635ba375117b60be635fd2d4..76a18022e553c6a92b1d599a16aa0558890a4617 100644 --- a/src/corelibs/U2Core/src/selection/SelectionModel.cpp +++ b/src/corelibs/U2Core/src/selection/SelectionModel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/selection/SelectionModel.h b/src/corelibs/U2Core/src/selection/SelectionModel.h index 638f085ba052b094094b59030609ea1a372af128..d1dc8766d54c7d4c00471ccfbee6280be1bbdbe0 100644 --- a/src/corelibs/U2Core/src/selection/SelectionModel.h +++ b/src/corelibs/U2Core/src/selection/SelectionModel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/selection/SelectionTypes.cpp b/src/corelibs/U2Core/src/selection/SelectionTypes.cpp index f701b5ab848d3ca329924d58d03f85924ed293e7..6d64d0a89035d81e2600fc7c928a6a3dc127d193 100644 --- a/src/corelibs/U2Core/src/selection/SelectionTypes.cpp +++ b/src/corelibs/U2Core/src/selection/SelectionTypes.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/selection/SelectionTypes.h b/src/corelibs/U2Core/src/selection/SelectionTypes.h index 25b9913f5019f0fb09403f1759dd48dc0c5c1b39..6255cf21dd659d68934af46e560ebaaafe0d0bcf 100644 --- a/src/corelibs/U2Core/src/selection/SelectionTypes.h +++ b/src/corelibs/U2Core/src/selection/SelectionTypes.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/selection/SelectionUtils.cpp b/src/corelibs/U2Core/src/selection/SelectionUtils.cpp index c9177302202a8a726ceb032468ac4b36e08821c0..68ff08834fe0762a3a824efffe0b451675cc2a4b 100644 --- a/src/corelibs/U2Core/src/selection/SelectionUtils.cpp +++ b/src/corelibs/U2Core/src/selection/SelectionUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,12 +24,9 @@ #include "GObjectSelection.h" #include "SelectionTypes.h" -#include <U2Core/GObject.h> #include <U2Core/DocumentModel.h> -#include <U2Core/GObjectTypes.h> #include <U2Core/GObjectUtils.h> -#include <U2Core/UnloadedObject.h> #include <U2Core/SelectionModel.h> @@ -38,8 +35,8 @@ namespace U2 { //Warn: works only for pointer type template<class T> static void removeDuplicatesPointersFromList(QList<T*>& list) { QSet<const T*> tracked; - for(int i=0, n = list.size(); i < n ; i++) { - const T* val = list.at(i); + for (int i = 0, n = list.size(); i < n; i++) { + const T* val = list.at(i); if (tracked.contains(val)) { list[i] = NULL; } else { @@ -53,7 +50,7 @@ QList<GObject*> SelectionUtils::findObjects(GObjectType t, const MultiGSelection QList<GObject*> res; foreach(const GSelection* s, ms->getSelections()) { QList<GObject*> tmp = findObjects(t, s, f); - res+=tmp; + res += tmp; } removeDuplicatesPointersFromList(res); @@ -64,7 +61,7 @@ QList<GObject*> SelectionUtils::findObjectsKeepOrder(GObjectType t, const MultiG QList<GObject*> res; foreach(const GSelection* s, ms->getSelections()) { QList<GObject*> tmp = findObjectsKeepOrder(t, s, f); - res+=tmp; + res += tmp; } //now remove duplicates from list @@ -84,13 +81,13 @@ QList<GObject*> SelectionUtils::findObjectsKeepOrder(GObjectType t, const GSelec if (stype == GSelectionTypes::DOCUMENTS) { const DocumentSelection* ds = qobject_cast<const DocumentSelection*>(s); foreach(Document* d, ds->getSelectedDocuments()) { - const QList<GObject*>& objs= d->getObjects(); + const QList<GObject*>& objs = d->getObjects(); QList<GObject*> tmp = GObjectUtils::select(objs, t, f); - res+=tmp; + res += tmp; } } else if (stype == GSelectionTypes::GOBJECTS) { const GObjectSelection* os = qobject_cast<const GObjectSelection*>(s); - const QList<GObject*>& objs= os->getSelectedObjects(); + const QList<GObject*>& objs = os->getSelectedObjects(); res = GObjectUtils::select(objs, t, f); } return res; @@ -100,7 +97,7 @@ QList<GObject*> SelectionUtils::findObjectsKeepOrder(GObjectType t, const GSelec QSet<Document*> SelectionUtils::findDocumentsWithObjects(GObjectType t, const MultiGSelection* ms, UnloadedObjectFilter f, bool deriveDocsFromObjectSelection) { QSet<Document*> res; foreach(const GSelection* s, ms->getSelections()) { - res+=findDocumentsWithObjects(t, s, f, deriveDocsFromObjectSelection); + res += findDocumentsWithObjects(t, s, f, deriveDocsFromObjectSelection); } return res; } @@ -117,19 +114,19 @@ QSet<Document*> SelectionUtils::findDocumentsWithObjects(GObjectType t, const GS if (!d->getObjects().isEmpty()) { QList<GObject*> objs = d->findGObjectByType(t, f); if (!objs.isEmpty()) { - res+=d; + res += d; } } else if (f == UOF_LoadedAndUnloaded && !d->isLoaded()) { //document is unloaded DocumentFormat* df = d->getDocumentFormat(); if (df->checkConstraints(c)) { - res+=d; + res += d; } } } } else if (st == GSelectionTypes::GOBJECTS && deriveDocsFromObjectSelection) { QList<GObject*> objects = findObjects(t, s, f); foreach(GObject* o, objects) { - res+=o->getDocument(); + res += o->getDocument(); } } return res; @@ -182,24 +179,24 @@ QList<GObject*> SelectionUtils::getSelectedObjects(const MultiGSelection& ms) { U2Region SelectionUtils::normalizeRegionBy3(U2Region reg, int seqLen, bool direct) { assert(reg.length > 0); - if ( seqLen < 3 ){ + if (seqLen < 3) { return reg; } int d = reg.length % 3; if (d == 1) { if (direct) { - reg.length-=1; + reg.length -= 1; } else { - reg.startPos+=1; - reg.length-=1; + reg.startPos += 1; + reg.length -= 1; } } else if (d == 2) { if (direct) { - reg.length+=(reg.length+1 < seqLen) ? +1 : -2; + reg.length += (reg.length + 1 < seqLen) ? +1 : -2; } else { int prevStart = reg.startPos; - reg.startPos+=(reg.startPos > 0) ? -1 : +2; - reg.length+=prevStart - reg.startPos; + reg.startPos += (reg.startPos > 0) ? -1 : +2; + reg.length += prevStart - reg.startPos; } } return reg; diff --git a/src/corelibs/U2Core/src/selection/SelectionUtils.h b/src/corelibs/U2Core/src/selection/SelectionUtils.h index bbe44a20623c91a8f6e848f950cd1cfb8c70658b..4363cc040149e7962524530882a0ffabbd96be11 100644 --- a/src/corelibs/U2Core/src/selection/SelectionUtils.h +++ b/src/corelibs/U2Core/src/selection/SelectionUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/selection/TextSelection.h b/src/corelibs/U2Core/src/selection/TextSelection.h index 2619a2f957f80925d1c9bcc7328d5e6f2c32b90b..1c17a3ae9f9c1dc208cb3fd7145e73ce05b545bd 100644 --- a/src/corelibs/U2Core/src/selection/TextSelection.h +++ b/src/corelibs/U2Core/src/selection/TextSelection.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,7 +32,6 @@ class TextObject; class U2CORE_EXPORT TextSelection : public LRegionsSelection { public: TextSelection(TextObject* _obj, QObject* p = NULL) : LRegionsSelection(GSelectionTypes::TEXT, p), obj(_obj) {} - TextObject *getObject() const { return obj; } private: diff --git a/src/corelibs/U2Core/src/tasks/AbstractProjectFilterTask.cpp b/src/corelibs/U2Core/src/tasks/AbstractProjectFilterTask.cpp index 6fe53caa2f1205c2b656033c19d2572f2397289a..ac1466ac87502b170f28adfb3ca525ecf5d213dd 100644 --- a/src/corelibs/U2Core/src/tasks/AbstractProjectFilterTask.cpp +++ b/src/corelibs/U2Core/src/tasks/AbstractProjectFilterTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/AbstractProjectFilterTask.h b/src/corelibs/U2Core/src/tasks/AbstractProjectFilterTask.h index cf8b61dcd18c5f235dd0853b371a5a6d51d85929..2777585e6be136ed5b7b1d9f6e1f9657ebd87f01 100644 --- a/src/corelibs/U2Core/src/tasks/AbstractProjectFilterTask.h +++ b/src/corelibs/U2Core/src/tasks/AbstractProjectFilterTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/AddDocumentTask.cpp b/src/corelibs/U2Core/src/tasks/AddDocumentTask.cpp index 3b27e86253ff1760734a6217c1be0ca972dc53d1..f9edc9e9b97031304348f46104cead879432b07a 100644 --- a/src/corelibs/U2Core/src/tasks/AddDocumentTask.cpp +++ b/src/corelibs/U2Core/src/tasks/AddDocumentTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/AddDocumentTask.h b/src/corelibs/U2Core/src/tasks/AddDocumentTask.h index cff36ae1bbc7ccdec60815763f264da7d9869df3..8c250e639461befcfb19c5957844c4f4f84e9e2d 100644 --- a/src/corelibs/U2Core/src/tasks/AddDocumentTask.h +++ b/src/corelibs/U2Core/src/tasks/AddDocumentTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,8 +25,6 @@ #include <U2Core/Task.h> #include <U2Core/DocumentModel.h> -#include <QPointer> - namespace U2 { class Document; @@ -49,7 +47,7 @@ public: ReportResult report(); QList<Task*> onSubTaskFinished(Task* subTask); - Document* getDocument() {return document;} + Document* getDocument() { return document; } private: Document* document; diff --git a/src/corelibs/U2Core/src/tasks/AddObjectsToDocumentTask.cpp b/src/corelibs/U2Core/src/tasks/AddObjectsToDocumentTask.cpp index c2f4e660aa50f05f7b6a002c268d2ba70ff8bc31..6470451878e09dcce2d13f9aace2202ae995c59c 100644 --- a/src/corelibs/U2Core/src/tasks/AddObjectsToDocumentTask.cpp +++ b/src/corelibs/U2Core/src/tasks/AddObjectsToDocumentTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -20,7 +20,6 @@ */ #include "AddObjectsToDocumentTask.h" -#include <U2Core/GObject.h> #include <U2Core/DocumentModel.h> #include <U2Core/U2ObjectDbi.h> #include <U2Core/U2OpStatusUtils.h> diff --git a/src/corelibs/U2Core/src/tasks/AddObjectsToDocumentTask.h b/src/corelibs/U2Core/src/tasks/AddObjectsToDocumentTask.h index bc86333a24633cc2dda2fa107e44cc6922515981..5b3a2584225c9a30f2188890289b55d90114fd2d 100644 --- a/src/corelibs/U2Core/src/tasks/AddObjectsToDocumentTask.h +++ b/src/corelibs/U2Core/src/tasks/AddObjectsToDocumentTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/AddSequencesToAlignmentTask.cpp b/src/corelibs/U2Core/src/tasks/AddSequencesToAlignmentTask.cpp index 8bafb797aed13da7c907c0cd372fe150e812d53a..b7d1e9f19ac387644040fde33be70e52c1fa4cc4 100644 --- a/src/corelibs/U2Core/src/tasks/AddSequencesToAlignmentTask.cpp +++ b/src/corelibs/U2Core/src/tasks/AddSequencesToAlignmentTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -27,7 +27,6 @@ #include <U2Core/IOAdapter.h> #include <U2Core/LoadDocumentTask.h> #include <U2Core/MSAUtils.h> -#include <U2Core/MsaDbiUtils.h> #include <U2Core/U2AlphabetUtils.h> #include <U2Core/U2DbiUtils.h> #include <U2Core/U2MsaDbi.h> @@ -40,13 +39,12 @@ const int AddSequenceObjectsToAlignmentTask::maxErrorListSize = 5; AddSequenceObjectsToAlignmentTask::AddSequenceObjectsToAlignmentTask(MultipleSequenceAlignmentObject* obj, const QList<DNASequence>& seqList) : Task("Add sequences to alignment task", TaskFlags(TaskFlags_FOSE_COSC)), - seqList(seqList), - maObj(obj), - stateLock(NULL), - msaAlphabet(maObj->getAlphabet()), - dbi(NULL), - modStep(NULL) -{ + seqList(seqList), + maObj(obj), + stateLock(NULL), + msaAlphabet(maObj->getAlphabet()), + dbi(NULL), + modStep(NULL) { entityRef = maObj->getEntityRef(); // reset modification inf. @@ -125,7 +123,7 @@ Task::ReportResult AddSequenceObjectsToAlignmentTask::report() { qint64 AddSequenceObjectsToAlignmentTask::createRows(QList<U2MsaRow> &rows) { qint64 maxLength = 0; U2EntityRef entityRef = maObj->getEntityRef(); - foreach (const DNASequence& seqObj, seqList) { + foreach(const DNASequence& seqObj, seqList) { if (isCanceled() || hasError()) { return 0; } @@ -177,9 +175,9 @@ void AddSequenceObjectsToAlignmentTask::setupError() { setError(error); } -void AddSequenceObjectsToAlignmentTask::releaseLock(){ +void AddSequenceObjectsToAlignmentTask::releaseLock() { if (stateLock != NULL) { - if(maObj != NULL) { + if (maObj != NULL) { maObj->unlockState(stateLock); } delete stateLock; diff --git a/src/corelibs/U2Core/src/tasks/AddSequencesToAlignmentTask.h b/src/corelibs/U2Core/src/tasks/AddSequencesToAlignmentTask.h index 4b8c85d5dab76d2b824bb56537615da3f45e7b2a..3d30b92dd923215f29aa90ac74a66ffbb17392bc 100644 --- a/src/corelibs/U2Core/src/tasks/AddSequencesToAlignmentTask.h +++ b/src/corelibs/U2Core/src/tasks/AddSequencesToAlignmentTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/BackgroundTaskRunner.cpp b/src/corelibs/U2Core/src/tasks/BackgroundTaskRunner.cpp index d875448b87d9252376e63c13b8db5625b3fec3df..1c7efec6f31bb8a98d23abd57aa3b1822041425b 100644 --- a/src/corelibs/U2Core/src/tasks/BackgroundTaskRunner.cpp +++ b/src/corelibs/U2Core/src/tasks/BackgroundTaskRunner.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/BackgroundTaskRunner.h b/src/corelibs/U2Core/src/tasks/BackgroundTaskRunner.h index d012b039665835be09c743c5c979d1156033c72c..9abcfcf02e99db6db48cf2dfa8421f82e1488d9d 100644 --- a/src/corelibs/U2Core/src/tasks/BackgroundTaskRunner.h +++ b/src/corelibs/U2Core/src/tasks/BackgroundTaskRunner.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/CleanupFileStorageTask.cpp b/src/corelibs/U2Core/src/tasks/CleanupFileStorageTask.cpp index dadcfe788aa92f8a17d889e2e1b8449a26633035..e96e85b1c4bc9ae219a3f3c632aa8a1e53a9f44b 100644 --- a/src/corelibs/U2Core/src/tasks/CleanupFileStorageTask.cpp +++ b/src/corelibs/U2Core/src/tasks/CleanupFileStorageTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/CleanupFileStorageTask.h b/src/corelibs/U2Core/src/tasks/CleanupFileStorageTask.h index 0d75bdad453a1efc8ff5f956727bc3dbc3bb80a7..3656f6d0b26581d3617b3009751303ef37907444 100644 --- a/src/corelibs/U2Core/src/tasks/CleanupFileStorageTask.h +++ b/src/corelibs/U2Core/src/tasks/CleanupFileStorageTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/CloneObjectTask.cpp b/src/corelibs/U2Core/src/tasks/CloneObjectTask.cpp index a591fdfcd8caf3e6155e79f491203a2daabc70f6..2abfe0808b64d1c5f0e53b7de2fa80d96a2b2d45 100644 --- a/src/corelibs/U2Core/src/tasks/CloneObjectTask.cpp +++ b/src/corelibs/U2Core/src/tasks/CloneObjectTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/CloneObjectTask.h b/src/corelibs/U2Core/src/tasks/CloneObjectTask.h index bc85239766f52b329d37b1e2f2f65021cd895f72..72615cd7672caa4588175a98a3e0eac301abff21 100644 --- a/src/corelibs/U2Core/src/tasks/CloneObjectTask.h +++ b/src/corelibs/U2Core/src/tasks/CloneObjectTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/CmdlineInOutTaskRunner.cpp b/src/corelibs/U2Core/src/tasks/CmdlineInOutTaskRunner.cpp index d557588c1ebb48e5b1fcac2ba46761c2fcb1325c..306fafd4e9d82497e9e717e1e5171b7fb6402166 100644 --- a/src/corelibs/U2Core/src/tasks/CmdlineInOutTaskRunner.cpp +++ b/src/corelibs/U2Core/src/tasks/CmdlineInOutTaskRunner.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/CmdlineInOutTaskRunner.h b/src/corelibs/U2Core/src/tasks/CmdlineInOutTaskRunner.h index a4d2706778aaf16a1229a46925f8a99e311c5f69..6f684bc4b847491045b3b90e1adc35b7090e972e 100644 --- a/src/corelibs/U2Core/src/tasks/CmdlineInOutTaskRunner.h +++ b/src/corelibs/U2Core/src/tasks/CmdlineInOutTaskRunner.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/CmdlineTaskRunner.cpp b/src/corelibs/U2Core/src/tasks/CmdlineTaskRunner.cpp index 4cd3750fb353c62f5129e2b18e2e6aab47a8a184..8c933005f11c64fd32e432f7c245876d11ecdd2b 100644 --- a/src/corelibs/U2Core/src/tasks/CmdlineTaskRunner.cpp +++ b/src/corelibs/U2Core/src/tasks/CmdlineTaskRunner.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,7 +22,6 @@ #include <QTextCodec> #include <QTimer> #include <U2Core/AppContext.h> -#include <U2Core/CMDLineRegistry.h> #include <U2Core/CMDLineUtils.h> #include <U2Core/ExternalToolRunTask.h> #include <U2Core/Settings.h> @@ -32,73 +31,192 @@ #include <Windows.h> #endif +#ifdef Q_OS_WIN +#include <tlhelp32.h> +#else +#include <unistd.h> +#endif + #include "CmdlineTaskRunner.h" namespace U2 { CmdlineTaskConfig::CmdlineTaskConfig() -: logLevel(LogLevel_DETAILS), withPluginList(false) -{ -} + : logLevel(LogLevel_DETAILS), withPluginList(false) {} /************************************************************************/ /* CmdlineTaskRunner */ /************************************************************************/ namespace { - const QString OUTPUT_ERROR_ARG = "ugene-output-error"; - const QString OUTPUT_PROGRESS_ARG = "ugene-output-progress-state"; - const QString OUTPUT_PROGRESS_TAG = "task-progress="; - const QString ERROR_KEYWORD = "#%*ugene-finished-with-error#%*"; - - inline int getLogNameCandidate(const QString &line, QString &nameCandidate) { - if ("" == line) { - return -1; - } +const QString OUTPUT_ERROR_ARG = "ugene-output-error"; +const QString OUTPUT_PROGRESS_ARG = "ugene-output-progress-state"; +const QString OUTPUT_PROGRESS_TAG = "task-progress="; +const QString ERROR_KEYWORD = "#%*ugene-finished-with-error#%*"; + +inline int getLogNameCandidate(const QString &line, QString &nameCandidate) { + if ("" == line) { + return -1; + } - if (!line.startsWith("[")) { - return -1; - } + if (!line.startsWith("[")) { + return -1; + } - // maybe, @line is "[time][loglevel] log" - int openPos = line.indexOf("[", 1); // 1 because it is needed to skip first [time] substring - if (-1 == openPos) { - return -1; - } - int closePos = line.indexOf("]", openPos); - if (-1 == closePos) { - return -1; - } - nameCandidate = line.mid(openPos + 1, closePos - openPos - 1); - return closePos; + // maybe, @line is "[time][loglevel] log" + int openPos = line.indexOf("[", 1); // 1 because it is needed to skip first [time] substring + if (-1 == openPos) { + return -1; + } + int closePos = line.indexOf("]", openPos); + if (-1 == closePos) { + return -1; + } + nameCandidate = line.mid(openPos + 1, closePos - openPos - 1); + return closePos; +} + +QString getLogLevelName(LogLevel l) { + switch (l) { + case LogLevel_TRACE: return "TRACE"; + case LogLevel_DETAILS: return "DETAILS"; + case LogLevel_INFO: return "INFO"; + case LogLevel_ERROR: return "ERROR"; + default: assert(0); } + return ""; +} - QString getLogLevelName(LogLevel l) { - switch (l) { - case LogLevel_TRACE: return "TRACE"; - case LogLevel_DETAILS: return "DETAILS"; - case LogLevel_INFO: return "INFO"; - case LogLevel_ERROR: return "ERROR"; - default: assert(0); +bool containsPrefix(const QStringList &args, const QString &prefix) { + foreach(const QString &arg, args) { + if (arg.startsWith(prefix)) { + return true; } - return ""; } + return false; +} +} - bool containsPrefix(const QStringList &args, const QString &prefix) { - foreach(const QString &arg, args) { - if (arg.startsWith(prefix)) { - return true; +const QString CmdlineTaskRunner::REPORT_FILE_ARG = "ugene-write-task-report-to-file"; + +QList<long> CmdlineTaskRunner::getChildrenProcesses(qint64 processId, bool fullTree) { + QList<long> children; + +#if defined(Q_OS_LINUX) || defined(Q_OS_MAC) + char *buff = NULL; + size_t len = 255; + char command[256] = {0}; + + sprintf(command,"ps -ef|awk '$3==%u {print $2}'", (unsigned)processId); + FILE *fp = (FILE*) popen(command, "r"); + while (getline(&buff, &len, fp) >= 0) { + int child_process_id = QString(buff).toInt(); + if (child_process_id != 0) { + children << child_process_id; + } + } + free(buff); + fclose(fp); +#elif defined(Q_OS_WIN) + HANDLE hProcessSnap; + HANDLE hProcess; + PROCESSENTRY32 pe32; + + // Take a snapshot of all processes in the system. + hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); + CHECK(hProcessSnap != INVALID_HANDLE_VALUE, children); + + // Set the size of the structure before using it. + pe32.dwSize = sizeof(PROCESSENTRY32); + + // Retrieve information about the first process, + // and exit if unsuccessful + CHECK_EXT(Process32First(hProcessSnap, &pe32), CloseHandle(hProcessSnap), children); + + // Now walk the snapshot of processes, and + // display information about each process in turn + do { + if (pe32.th32ParentProcessID == processId) { + hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pe32.th32ProcessID); + if (hProcess != NULL) { + CloseHandle(hProcess); + children << pe32.th32ProcessID; } } - return false; + } while (Process32Next(hProcessSnap, &pe32)); + + CloseHandle(hProcessSnap); +#endif + + if (fullTree && children.length() > 0) { + foreach(long child, children) { + QList<long> children2 = getChildrenProcesses(child, fullTree); + children << children2; + } } + + return children; } -const QString CmdlineTaskRunner::REPORT_FILE_ARG = "ugene-write-task-report-to-file"; +int CmdlineTaskRunner::killChildrenProcesses(qint64 processId, bool fullTree) { + int result = 0; + + QList<long> children = getChildrenProcesses(processId, fullTree); + + if (!children.isEmpty()) { + uiLog.trace("kill all children of process: " + QString::number(processId)); + } + while (!children.isEmpty()) { + long child = children.takeLast(); + + uiLog.trace(" kill process: " + QString::number(child)); + result += killProcess(child); + +#if defined(Q_OS_LINUX) || defined(Q_OS_MAC) + usleep(1000000); +#elif defined(Q_OS_WIN) + Sleep(1000); +#endif + } + + return result; +} + +int CmdlineTaskRunner::killProcessTree(QProcess *process) { + qint64 processId = process->processId(); + return killProcessTree(processId); +} + +int CmdlineTaskRunner::killProcessTree(qint64 processId) { + uiLog.trace("Killing full processes tree: " + QString::number(processId)); + uiLog.trace("Killing children processes: " + QString::number(processId)); + int result = killChildrenProcesses(processId); + uiLog.trace("Killing parent process: " + QString::number(processId)); + result += killProcess(processId); + return result; +} + +int CmdlineTaskRunner::killProcess(qint64 processId) { + int result = 0; +#if defined(Q_OS_LINUX) || defined(Q_OS_MAC) + int exist = QProcess::execute("kill -0 " + QString::number(processId)); + if (exist == 0) { + result = QProcess::execute("kill -9 " + QString::number(processId)); + } +#elif defined(Q_OS_WIN) + DWORD dwDesiredAccess = PROCESS_TERMINATE; + BOOL bInheritHandle = FALSE; + HANDLE hProcess = OpenProcess(dwDesiredAccess, bInheritHandle, processId); + if (hProcess != NULL) { + result = TerminateProcess(hProcess, 1); + CloseHandle(hProcess); + } +#endif + return result; +} CmdlineTaskRunner::CmdlineTaskRunner(const CmdlineTaskConfig &config) -: Task(tr("Run UGENE command line: %1").arg(config.command), TaskFlag_NoRun), config(config), process(NULL) -{ + : Task(tr("Run UGENE command line: %1").arg(config.command), TaskFlag_NoRun), config(config), process(NULL) { tpm = Progress_Manual; } @@ -181,7 +299,7 @@ void CmdlineTaskRunner::writeLog(QStringList &lines) { continue; } - for (int i=config.logLevel; i<LogLevel_NumLevels; i++) { + for (int i = config.logLevel; i < LogLevel_NumLevels; i++) { QString logLevelName = getLogLevelName((LogLevel)i); if (logLevelName != nameCandidate) { continue; @@ -190,7 +308,7 @@ void CmdlineTaskRunner::writeLog(QStringList &lines) { QString logLine = line.mid(closePos + 1); logLine = logLine.trimmed(); bool commandToken = logLine.startsWith(OUTPUT_PROGRESS_TAG) || logLine.startsWith(ERROR_KEYWORD) || isCommandLogLine(logLine); - if (commandToken) { + if (commandToken) { continue; } taskLog.message((LogLevel)i, processLogPrefix + logLine); @@ -247,7 +365,7 @@ void CmdlineTaskRunner::sl_onReadStandardOutput() { foreach(const QString &line, lines) { QStringList words = line.split(QRegExp("\\s+"), QString::SkipEmptyParts); - foreach (const QString &word, words) { + foreach(const QString &word, words) { if (word.startsWith(OUTPUT_PROGRESS_TAG)) { QString numStr = word.mid(OUTPUT_PROGRESS_TAG.size()); bool ok = false; @@ -277,16 +395,15 @@ void CmdlineTaskRunner::sl_onFinish(int exitCode, QProcess::ExitStatus exitStatu /* CmdlineTask */ /************************************************************************/ namespace { - const int UPDATE_PROGRESS_INTERVAL = 500; +const int UPDATE_PROGRESS_INTERVAL = 500; - void logError(const QString &error) { - coreLog.info(QString("%1%2%1").arg(ERROR_KEYWORD).arg(error)); - } +void logError(const QString &error) { + coreLog.info(QString("%1%2%1").arg(ERROR_KEYWORD).arg(error)); +} } CmdlineTask::CmdlineTask(const QString &name, TaskFlags flags) -: Task(name, flags) -{ + : Task(name, flags) { if (AppContext::getCMDLineRegistry()->hasParameter(OUTPUT_PROGRESS_ARG)) { QTimer *timer = new QTimer(this); connect(timer, SIGNAL(timeout()), SLOT(sl_outputProgressAndState())); @@ -314,5 +431,4 @@ QString CmdlineTask::getTaskError() const { void CmdlineTask::sl_outputProgressAndState() { coreLog.info(QString("%1%2").arg(OUTPUT_PROGRESS_TAG).arg(getProgress())); } - } // U2 diff --git a/src/corelibs/U2Core/src/tasks/CmdlineTaskRunner.h b/src/corelibs/U2Core/src/tasks/CmdlineTaskRunner.h index f7e63abd2024bc284b293a86e228547649f1e8c9..0108ec95d9d1ad7520d6bdd0a33e879920695be9 100644 --- a/src/corelibs/U2Core/src/tasks/CmdlineTaskRunner.h +++ b/src/corelibs/U2Core/src/tasks/CmdlineTaskRunner.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -42,6 +42,12 @@ public: class U2CORE_EXPORT CmdlineTaskRunner : public Task { Q_OBJECT public: + static QList<long> getChildrenProcesses(qint64 processId, bool fullTree=true); + static int killChildrenProcesses(qint64 processId, bool fullTree=true); + static int killProcessTree(QProcess *process); + static int killProcessTree(qint64 processId); + static int killProcess(qint64 processId); + CmdlineTaskRunner(const CmdlineTaskConfig &config); void prepare(); diff --git a/src/corelibs/U2Core/src/tasks/ConnectSharedDatabaseTask.cpp b/src/corelibs/U2Core/src/tasks/ConnectSharedDatabaseTask.cpp index 85d3560537c1c21fdcac35ef2a882a84400a2cd2..25878c6ec2d30cc4eaf190b6ec660a0f509acb81 100644 --- a/src/corelibs/U2Core/src/tasks/ConnectSharedDatabaseTask.cpp +++ b/src/corelibs/U2Core/src/tasks/ConnectSharedDatabaseTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/ConnectSharedDatabaseTask.h b/src/corelibs/U2Core/src/tasks/ConnectSharedDatabaseTask.h index 18c324e8f91dd056ae186ba1c0d32cc5ff7db3f4..505df0537d55a15bd5adbefcf208c0de359b5205 100644 --- a/src/corelibs/U2Core/src/tasks/ConnectSharedDatabaseTask.h +++ b/src/corelibs/U2Core/src/tasks/ConnectSharedDatabaseTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/ConsoleShutdownTask.cpp b/src/corelibs/U2Core/src/tasks/ConsoleShutdownTask.cpp index 243dc25438a13bd3b90cb3f598e390b3ae140874..4937011a1077f779a4ff2dada8453b9f68731b1b 100644 --- a/src/corelibs/U2Core/src/tasks/ConsoleShutdownTask.cpp +++ b/src/corelibs/U2Core/src/tasks/ConsoleShutdownTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/ConsoleShutdownTask.h b/src/corelibs/U2Core/src/tasks/ConsoleShutdownTask.h index afe96d8bd000c36f08ef4cecbca980118cff6a15..b4439935d799c0ae9a5c5081f31c502de5cdc90b 100644 --- a/src/corelibs/U2Core/src/tasks/ConsoleShutdownTask.h +++ b/src/corelibs/U2Core/src/tasks/ConsoleShutdownTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/CopyDataTask.cpp b/src/corelibs/U2Core/src/tasks/CopyDataTask.cpp index 00095da70f012e6fc793951b832b40e8b2fdb555..5185c97eacbf34c6847e7bc292963b9809609b94 100644 --- a/src/corelibs/U2Core/src/tasks/CopyDataTask.cpp +++ b/src/corelibs/U2Core/src/tasks/CopyDataTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/CopyDataTask.h b/src/corelibs/U2Core/src/tasks/CopyDataTask.h index 58680f2c0def20c17a80ffe083fb70d2dbfc2f7e..0a17303a0207a5c7f8c97b7af1b2e53ee9431068 100644 --- a/src/corelibs/U2Core/src/tasks/CopyDataTask.h +++ b/src/corelibs/U2Core/src/tasks/CopyDataTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/CopyDocumentTask.cpp b/src/corelibs/U2Core/src/tasks/CopyDocumentTask.cpp index e2f78781cb42d2d373210c22f7660316c4205d4a..9ffb5257d39f6c1ee75b8e4772829058b801e544 100644 --- a/src/corelibs/U2Core/src/tasks/CopyDocumentTask.cpp +++ b/src/corelibs/U2Core/src/tasks/CopyDocumentTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,7 +24,6 @@ #include <U2Core/AppContext.h> #include <U2Core/AssemblyObject.h> -#include <U2Core/DocumentModel.h> #include <U2Core/DocumentUtils.h> #include <U2Core/GObjectUtils.h> #include <U2Core/GUrlUtils.h> @@ -40,10 +39,9 @@ namespace U2 { CopyDocumentTask::CopyDocumentTask(Document *_srcDoc, const DocumentFormatId &_formatId, - const QString &_dstUrl, bool _addToProject) -: Task("Copy document", TaskFlag_NoRun), srcDoc(_srcDoc), dstDoc(NULL), formatId(_formatId), -dstUrl(_dstUrl), addToProject(_addToProject), cloneTask(NULL), saveTask(NULL) -{ + const QString &_dstUrl, bool _addToProject) + : Task("Copy document", TaskFlag_NoRun), srcDoc(_srcDoc), dstDoc(NULL), formatId(_formatId), + dstUrl(_dstUrl), addToProject(_addToProject), cloneTask(NULL), saveTask(NULL) { } @@ -62,7 +60,7 @@ void CopyDocumentTask::prepare() { } IOAdapterFactory *iof = AppContext::getIOAdapterRegistry()->getIOAdapterFactoryById(IOAdapterUtils::url2io(dstUrl)); CHECK_EXT(iof != NULL, stateInfo.setError(QString("Can not create IO factory for %1").arg(dstUrl)), ); - DocumentFormatRegistry *dfr = AppContext::getDocumentFormatRegistry(); + DocumentFormatRegistry *dfr = AppContext::getDocumentFormatRegistry(); DocumentFormat *df = dfr->getFormatById(formatId); CHECK_EXT(df != NULL, stateInfo.setError(QString("Unknown document format IO factory: %1").arg(formatId)), ); @@ -114,8 +112,7 @@ void CopyDocumentTask::sl_onCopySaved() { } CloneObjectsTask::CloneObjectsTask(Document *_srcDoc, Document *_dstDoc) -: Task("Clone objects", TaskFlag_None), srcDoc(_srcDoc), dstDoc(_dstDoc) -{ + : Task("Clone objects", TaskFlag_None), srcDoc(_srcDoc), dstDoc(_dstDoc) { CHECK_EXT(NULL != srcDoc, stateInfo.setError("NULL source document"), ); CHECK_EXT(NULL != dstDoc, stateInfo.setError("NULL destination document"), ); } @@ -125,11 +122,11 @@ void CloneObjectsTask::run() { CHECK_EXT(NULL != df, stateInfo.setError("NULL document format"), ); QList<GObject*> objs = srcDoc->getObjects(); - foreach(GObject *srcObj, objs){ - if(df->isObjectOpSupported(dstDoc, DocumentFormat::DocObjectOp_Add, srcObj->getGObjectType())){ + foreach(GObject *srcObj, objs) { + if (df->isObjectOpSupported(dstDoc, DocumentFormat::DocObjectOp_Add, srcObj->getGObjectType())) { GObject *dstObj = srcObj->clone(dstDoc->getDbiRef(), stateInfo); CHECK_OP(stateInfo, ); - if (dstObj->getGObjectType() == GObjectTypes::MULTIPLE_SEQUENCE_ALIGNMENT){ + if (dstObj->getGObjectType() == GObjectTypes::MULTIPLE_SEQUENCE_ALIGNMENT) { QString name = QFileInfo(dstDoc->getURLString()).baseName(); dstObj->setGObjectName(name); dstObj->setModified(false); diff --git a/src/corelibs/U2Core/src/tasks/CopyDocumentTask.h b/src/corelibs/U2Core/src/tasks/CopyDocumentTask.h index 6cf88dd7898e0e210ac28918984d16faada4f18a..c8eadd027dc4125974969bde4b82685c49139991 100644 --- a/src/corelibs/U2Core/src/tasks/CopyDocumentTask.h +++ b/src/corelibs/U2Core/src/tasks/CopyDocumentTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/CopyFileTask.cpp b/src/corelibs/U2Core/src/tasks/CopyFileTask.cpp index 775481703c84a764f0b205da10bdaec4efc62263..6187f72577d1c66792122b22c359b34cbe89106f 100644 --- a/src/corelibs/U2Core/src/tasks/CopyFileTask.cpp +++ b/src/corelibs/U2Core/src/tasks/CopyFileTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/CopyFileTask.h b/src/corelibs/U2Core/src/tasks/CopyFileTask.h index f3abd972d8664b5f59ca5fa1b2dec0cd4e8aa346..13a4f8ef5c70f6ab70627b04b60c4110daafb9ef 100644 --- a/src/corelibs/U2Core/src/tasks/CopyFileTask.h +++ b/src/corelibs/U2Core/src/tasks/CopyFileTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/CreateAnnotationTask.cpp b/src/corelibs/U2Core/src/tasks/CreateAnnotationTask.cpp index 5a65f0de9b30a01fd8d4423568f11a531b3edaec..488af8222bf3acfd39a6b649d0d8c5fddbbba7f0 100644 --- a/src/corelibs/U2Core/src/tasks/CreateAnnotationTask.cpp +++ b/src/corelibs/U2Core/src/tasks/CreateAnnotationTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/CreateAnnotationTask.h b/src/corelibs/U2Core/src/tasks/CreateAnnotationTask.h index 1e78bed65915ef6f0fab3e4b0b117be8ae60eafd..ba4d211d85d04e5f376e63bb0ddb486c4b3393d1 100644 --- a/src/corelibs/U2Core/src/tasks/CreateAnnotationTask.h +++ b/src/corelibs/U2Core/src/tasks/CreateAnnotationTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/DeleteObjectsTask.cpp b/src/corelibs/U2Core/src/tasks/DeleteObjectsTask.cpp index 01aa0b5b6866f412f62e21e6d507430a14c67efa..9a6bf369e3d00e8ec393f95b91baf18dc9bfab5e 100644 --- a/src/corelibs/U2Core/src/tasks/DeleteObjectsTask.cpp +++ b/src/corelibs/U2Core/src/tasks/DeleteObjectsTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/DeleteObjectsTask.h b/src/corelibs/U2Core/src/tasks/DeleteObjectsTask.h index ae84568ea6ab3fc4a14e6f9ba951657bc39ede8e..6b4f36fa036da974718d3b07c17d59102b66328f 100644 --- a/src/corelibs/U2Core/src/tasks/DeleteObjectsTask.h +++ b/src/corelibs/U2Core/src/tasks/DeleteObjectsTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/DocumentProviderTask.cpp b/src/corelibs/U2Core/src/tasks/DocumentProviderTask.cpp index 2c59289e556c6f60c1641d84682ffa86cadeb6b7..4ed57301ee9da076572edea1606036a5f500be2c 100644 --- a/src/corelibs/U2Core/src/tasks/DocumentProviderTask.cpp +++ b/src/corelibs/U2Core/src/tasks/DocumentProviderTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/DocumentProviderTask.h b/src/corelibs/U2Core/src/tasks/DocumentProviderTask.h index 0aba91c855150072b7e5100513454dcef6bd71de..07bfd0c988472312356c47b84a1e878bc1ab1c06 100644 --- a/src/corelibs/U2Core/src/tasks/DocumentProviderTask.h +++ b/src/corelibs/U2Core/src/tasks/DocumentProviderTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/ExternalToolRunTask.cpp b/src/corelibs/U2Core/src/tasks/ExternalToolRunTask.cpp index ef41430a0ed4e6a14415e06a13ac74e1197f2c61..d143b4c5200f1524bdeb00a517d7df37afdcbcde 100644 --- a/src/corelibs/U2Core/src/tasks/ExternalToolRunTask.cpp +++ b/src/corelibs/U2Core/src/tasks/ExternalToolRunTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,19 +24,16 @@ #include <U2Core/AnnotationTableObject.h> #include <U2Core/AppContext.h> #include <U2Core/AppSettings.h> -#include <U2Core/BaseDocumentFormats.h> +#include <U2Core/CmdlineTaskRunner.h> #include <U2Core/ExternalToolRegistry.h> #include <U2Core/GUrlUtils.h> -#include <U2Core/IOAdapter.h> -#include <U2Core/L10n.h> #include <U2Core/Log.h> -#include <U2Core/SaveDocumentTask.h> -#include <U2Core/UserApplicationsSettings.h> #include <U2Core/ScriptingToolRegistry.h> #include <U2Core/U2SafePoints.h> +#include <U2Core/UserApplicationsSettings.h> #include <QDir> -#include <QCoreApplication> +#include <QRegularExpression> #ifdef Q_OS_WIN #include <windows.h> @@ -53,37 +50,39 @@ namespace U2 { #define WIN_LAUNCH_CMD_COMMAND "cmd /C " #define START_WAIT_MSEC 3000 -ExternalToolRunTask::ExternalToolRunTask(const QString &_toolName, const QStringList &_arguments, -ExternalToolLogParser *_logParser, const QString &_workingDirectory, const QStringList &_additionalPaths, -const QString &_additionalProcessToKill, bool parseOutputFile) -: Task(_toolName + tr(" tool"), TaskFlag_None), - arguments(_arguments), - logParser(_logParser), - toolName(_toolName), - workingDirectory(_workingDirectory), - additionalPaths(_additionalPaths), - externalToolProcess(NULL), - helper(NULL), - listener(NULL), - additionalProcessToKill(_additionalProcessToKill), - parseOutputFile(parseOutputFile) -{ +ExternalToolRunTask::ExternalToolRunTask(const QString &_toolId, const QStringList &_arguments, + ExternalToolLogParser *_logParser, const QString &_workingDirectory, const QStringList &_additionalPaths, + const QString &_additionalProcessToKill, bool parseOutputFile) + : Task(AppContext::getExternalToolRegistry()->getToolNameById(_toolId) + tr(" tool"), TaskFlag_None), + arguments(_arguments), + logParser(_logParser), + toolId(_toolId), + workingDirectory(_workingDirectory), + additionalPaths(_additionalPaths), + externalToolProcess(NULL), + helper(NULL), + listener(NULL), + additionalProcessToKill(_additionalProcessToKill), + parseOutputFile(parseOutputFile) { + CHECK_EXT(AppContext::getExternalToolRegistry()->getById(toolId) != nullptr, stateInfo.setError(tr("External tool is absent")), ); + + toolName = AppContext::getExternalToolRegistry()->getToolNameById(toolId); coreLog.trace("Creating run task for: " + toolName); if (NULL != logParser) { logParser->setParent(this); } } -ExternalToolRunTask::~ExternalToolRunTask(){ +ExternalToolRunTask::~ExternalToolRunTask() { delete externalToolProcess; } -void ExternalToolRunTask::run(){ +void ExternalToolRunTask::run() { if (hasError() || isCanceled()) { return; } - ProcessRun pRun = ExternalToolSupportUtils::prepareProcess(toolName, arguments, workingDirectory, additionalPaths, stateInfo, listener); + ProcessRun pRun = ExternalToolSupportUtils::prepareProcess(toolId, arguments, workingDirectory, additionalPaths, stateInfo, listener); CHECK_OP(stateInfo, ); externalToolProcess = pRun.process; @@ -95,32 +94,32 @@ void ExternalToolRunTask::run(){ } if (!additionalEnvVariables.isEmpty()) { QProcessEnvironment processEnvironment = externalToolProcess->processEnvironment(); - foreach (const QString& envVarName, additionalEnvVariables.keys()) { + foreach(const QString& envVarName, additionalEnvVariables.keys()) { processEnvironment.insert(envVarName, additionalEnvVariables.value(envVarName)); } externalToolProcess->setProcessEnvironment(processEnvironment); } helper.reset(new ExternalToolRunTaskHelper(this)); - if(NULL != listener) { + if (NULL != listener) { helper->addOutputListener(listener); } externalToolProcess->start(pRun.program, pRun.arguments); bool started = externalToolProcess->waitForStarted(START_WAIT_MSEC); - if (!started){ - ExternalTool* tool = AppContext::getExternalToolRegistry()->getByName(toolName); - if (tool->isValid()){ + if (!started) { + ExternalTool* tool = AppContext::getExternalToolRegistry()->getById(toolId); + if (tool->isValid()) { stateInfo.setError(tr("Can not run %1 tool.").arg(toolName)); } else { stateInfo.setError(tr("Can not run %1 tool. May be tool path '%2' not valid?") - .arg(toolName) - .arg(AppContext::getExternalToolRegistry()->getByName(toolName)->getPath())); + .arg(toolName) + .arg(AppContext::getExternalToolRegistry()->getById(toolId)->getPath())); } return; } - while(!externalToolProcess->waitForFinished(1000)){ + while (!externalToolProcess->waitForFinished(1000)) { if (isCanceled()) { killProcess(externalToolProcess, additionalProcessToKill); algoLog.details(tr("Tool %1 is cancelled").arg(toolName)); @@ -129,94 +128,63 @@ void ExternalToolRunTask::run(){ } { + + QProcess::ExitStatus status = externalToolProcess->exitStatus(); int exitCode = externalToolProcess->exitCode(); - if(exitCode != EXIT_SUCCESS && !hasError()) { - QString error; - if (parseOutputFile) { - parseStandartOutputFile(outputFile); + if (status == QProcess::CrashExit && !hasError()) { + QString error = parseStandartOutputFile(); + if (error.isEmpty()) { + QString intendedError = tr("%1 tool exited with the following error: %2 (Code: %3)") + .arg(toolName) + .arg(externalToolProcess->errorString()) + .arg(externalToolProcess->exitCode()); + parseError(intendedError); error = logParser->getLastError(); } + + setError(error); + } else if (status == QProcess::NormalExit && exitCode != EXIT_SUCCESS && !hasError()) { + QString error = parseStandartOutputFile(); setError(error.isEmpty() ? tr("%1 tool exited with code %2").arg(toolName).arg(exitCode) : error); - } else { + } else if (status == QProcess::NormalExit && exitCode == EXIT_SUCCESS && !hasError()) { algoLog.details(tr("Tool %1 finished successfully").arg(toolName)); } } } void ExternalToolRunTask::killProcess(QProcess *process, QString childProcesses) { - Q_UNUSED(childProcesses) - -#if (!defined(Q_OS_WIN32) && !defined(Q_OS_WINCE)) || defined(qdoc) - long numPid = process->pid(); - Q_UNUSED(numPid); -#else - Q_PID pid = process->pid(); - long numPid = pid->dwProcessId; - Q_UNUSED(numPid); -#endif -#ifdef Q_OS_WIN - QProcess::execute(QString("taskkill /PID %1 /T /F").arg(numPid)); - if (!childProcesses.isEmpty()) { - QProcess::execute(QString("taskkill /IM %1 /T /F").arg(childProcesses)); - } -#endif -#ifdef Q_OS_UNIX - QList<long> pids = getChildPidsRecursive(numPid); - pids << numPid; - foreach (const long pid, pids) { - taskLog.trace(QString("Kill process: %1").arg(pid)); - kill(pid, SIGTERM); - } -#endif + CmdlineTaskRunner::killProcessTree(process); } QList<long> ExternalToolRunTask::getChildPidsRecursive(long parentPid) { - QList<long> res; - - QProcess p; - p.start("ps", QStringList() << "-axo pid,ppid"); - p.waitForFinished(); - const QStringList lines = QString(p.readAllStandardOutput()).split('\n'); - p.close(); - - foreach (const QString& line, lines) { - CHECK_OPERATION(line.contains(QString::number(parentPid)), continue); - - const QStringList pidStrings = line.split(QRegExp("\\s"), QString::SkipEmptyParts); - CHECK_OPERATION(2 == pidStrings.size(), continue); - CHECK_OPERATION(pidStrings.last() == QString::number(parentPid), continue); - - bool ok = false; - long pid = pidStrings.first().toLong(&ok); - CHECK_OPERATIONS(ok, - taskLog.trace(QString("Fail to convert process' PID to number: '%1'").arg(pidStrings.first())), - continue); - - res << getChildPidsRecursive(pid); - res << pid; - } - - return res; + return CmdlineTaskRunner::getChildrenProcesses(parentPid); } void ExternalToolRunTask::addOutputListener(ExternalToolListener* outputListener) { - if(helper) { + if (helper) { helper->addOutputListener(outputListener); } listener = outputListener; } -void ExternalToolRunTask::parseStandartOutputFile(QString &filepath) { - QFile f(filepath); - if (!f.open(QIODevice::ReadOnly)) { - return; - } +QString ExternalToolRunTask::parseStandartOutputFile() const { + CHECK(parseOutputFile, QString()); + + QFile f(outputFile); + CHECK(f.open(QIODevice::ReadOnly), QString()); + QString output; for (QByteArray line = f.readLine(); line.length() > 0; line = f.readLine()) { output += line; } f.close(); logParser->parseOutput(output); + + return logParser->getLastError(); +} + +void ExternalToolRunTask::parseError(const QString& error) const { + logParser->parseErrOutput(error); } //////////////////////////////////////// @@ -239,22 +207,20 @@ ExternalToolListener* ExternalToolSupportTask::getListener(int listenerNumber) { //////////////////////////////////////// //ExternalToolRunTaskHelper ExternalToolRunTaskHelper::ExternalToolRunTaskHelper(ExternalToolRunTask* t) -: process(t->externalToolProcess), logParser(t->logParser), os(t->stateInfo), listener(NULL) -{ + : process(t->externalToolProcess), logParser(t->logParser), os(t->stateInfo), listener(NULL) { logData.resize(1000); connect(process, SIGNAL(readyReadStandardOutput()), SLOT(sl_onReadyToReadLog())); connect(process, SIGNAL(readyReadStandardError()), SLOT(sl_onReadyToReadErrLog())); } ExternalToolRunTaskHelper::ExternalToolRunTaskHelper(QProcess *_process, ExternalToolLogParser *_logParser, U2OpStatus &_os) -: process(_process), logParser(_logParser), os(_os), listener(NULL) -{ + : process(_process), logParser(_logParser), os(_os), listener(NULL) { logData.resize(1000); connect(process, SIGNAL(readyReadStandardOutput()), SLOT(sl_onReadyToReadLog())); connect(process, SIGNAL(readyReadStandardError()), SLOT(sl_onReadyToReadErrLog())); } -void ExternalToolRunTaskHelper::sl_onReadyToReadLog(){ +void ExternalToolRunTaskHelper::sl_onReadyToReadLog() { QMutexLocker locker(&logMutex); CHECK(NULL != process, ); @@ -262,11 +228,11 @@ void ExternalToolRunTaskHelper::sl_onReadyToReadLog(){ process->setReadChannel(QProcess::StandardOutput); } int numberReadChars = process->read(logData.data(), logData.size()); - while(numberReadChars > 0){ + while (numberReadChars > 0) { //call log parser QString line = QString::fromLocal8Bit(logData.constData(), numberReadChars); logParser->parseOutput(line); - if(NULL != listener) { + if (NULL != listener) { listener->addNewLogMessage(line, ExternalToolListener::OUTPUT_LOG); } numberReadChars = process->read(logData.data(), logData.size()); @@ -274,7 +240,7 @@ void ExternalToolRunTaskHelper::sl_onReadyToReadLog(){ os.setProgress(logParser->getProgress()); } -void ExternalToolRunTaskHelper::sl_onReadyToReadErrLog(){ +void ExternalToolRunTaskHelper::sl_onReadyToReadErrLog() { QMutexLocker locker(&logMutex); CHECK(NULL != process, ); @@ -282,19 +248,16 @@ void ExternalToolRunTaskHelper::sl_onReadyToReadErrLog(){ process->setReadChannel(QProcess::StandardError); } int numberReadChars = process->read(logData.data(), logData.size()); - while(numberReadChars > 0){ + while (numberReadChars > 0) { //call log parser QString line = QString::fromLocal8Bit(logData.constData(), numberReadChars); logParser->parseErrOutput(line); - if(NULL != listener) { + if (NULL != listener) { listener->addNewLogMessage(line, ExternalToolListener::ERROR_LOG); } numberReadChars = process->read(logData.data(), logData.size()); } - QString lastErr = logParser->getLastError(); - if (!lastErr.isEmpty()) { - os.setError(lastErr); - } + processErrorToLog(); os.setProgress(logParser->getProgress()); } @@ -302,28 +265,37 @@ void ExternalToolRunTaskHelper::addOutputListener(ExternalToolListener* _listene listener = _listener; } +void ExternalToolRunTaskHelper::processErrorToLog() { + QString lastErr = logParser->getLastError(); + if (!lastErr.isEmpty()) { + os.setError(lastErr); + } +} + //////////////////////////////////////// //ExternalToolLogParser ExternalToolLogParser::ExternalToolLogParser() { - progress=-1; - lastLine=""; - lastErrLine=""; - lastError=""; + progress = -1; + lastLine = ""; + lastErrLine = ""; + lastError = ""; } -void ExternalToolLogParser::parseOutput(const QString &partOfLog){ - lastPartOfLog = partOfLog.split(QChar('\n')); - lastPartOfLog.first() = lastLine+lastPartOfLog.first(); - lastLine = lastPartOfLog.takeLast(); +void ExternalToolLogParser::parseOutput(const QString &partOfLog) { + lastPartOfLog = partOfLog.split(QRegularExpression("\\r?\\n")); + lastPartOfLog.first() = lastLine + lastPartOfLog.first(); + //It's a possible situation, that one message will be processed twice + lastLine = lastPartOfLog.last(); foreach (const QString &buf, lastPartOfLog) { processLine(buf); } } -void ExternalToolLogParser::parseErrOutput(const QString &partOfLog){ - lastPartOfLog = partOfLog.split(QChar('\n')); - lastPartOfLog.first() = lastErrLine+lastPartOfLog.first(); - lastErrLine = lastPartOfLog.takeLast(); +void ExternalToolLogParser::parseErrOutput(const QString &partOfLog) { + lastPartOfLog = partOfLog.split(QRegularExpression("\\r?\\n")); + lastPartOfLog.first() = lastErrLine + lastPartOfLog.first(); + //It's a possible situation, that one message will be processed twice + lastErrLine = lastPartOfLog.last(); foreach(const QString &buf, lastPartOfLog) { processErrLine(buf); } @@ -358,19 +330,19 @@ void ExternalToolLogParser::setLastError(const QString &value) { //////////////////////////////////////// //ExternalToolSupportUtils -void ExternalToolSupportUtils::removeTmpDir( const QString& tmpDirUrl, U2OpStatus& os) { +void ExternalToolSupportUtils::removeTmpDir(const QString& tmpDirUrl, U2OpStatus& os) { if (tmpDirUrl.isEmpty()) { os.setError(tr("Can not remove temporary folder: path is empty.")); return; } QDir tmpDir(tmpDirUrl); - foreach(const QString& file, tmpDir.entryList(QDir::NoDotAndDotDot | QDir::AllEntries)){ + foreach(const QString& file, tmpDir.entryList(QDir::NoDotAndDotDot | QDir::AllEntries)) { if (!tmpDir.remove(file)) { os.setError(tr("Can not remove files from temporary folder.")); return; } } - if (!tmpDir.rmdir(tmpDir.absolutePath())){ + if (!tmpDir.rmdir(tmpDir.absolutePath())) { os.setError(tr("Can not remove folder for temporary files.")); } } @@ -409,9 +381,9 @@ bool ExternalToolSupportUtils::startExternalProcess(QProcess *process, const QSt bool started = process->waitForStarted(START_WAIT_MSEC); #ifdef Q_OS_WIN32 - if(!started) { + if (!started) { QString execStr = WIN_LAUNCH_CMD_COMMAND + program; - foreach (const QString arg, arguments) { + foreach(const QString arg, arguments) { execStr += " " + arg; } process->start(execStr); @@ -424,42 +396,39 @@ bool ExternalToolSupportUtils::startExternalProcess(QProcess *process, const QSt return started; } -ProcessRun ExternalToolSupportUtils::prepareProcess(const QString &toolName, const QStringList &arguments, const QString &workingDirectory, const QStringList &additionalPaths, U2OpStatus &os, ExternalToolListener* listener) { +ProcessRun ExternalToolSupportUtils::prepareProcess(const QString &toolId, const QStringList &arguments, const QString &workingDirectory, const QStringList &additionalPaths, U2OpStatus &os, ExternalToolListener* listener) { ProcessRun result; result.process = NULL; result.arguments = arguments; - ExternalTool *tool = AppContext::getExternalToolRegistry()->getByName(toolName); - if (NULL == tool) { - os.setError(tr("Undefined tool: '%1'").arg(toolName)); - return result; - } + ExternalTool *tool = AppContext::getExternalToolRegistry()->getById(toolId); + CHECK_EXT(nullptr != tool, os.setError(tr("A tool with the ID %1 is absent").arg(toolId)), result); + + const QString toolName = tool->getName(); if (tool->getPath().isEmpty()) { os.setError(tr("Path for '%1' tool not set").arg(toolName)); return result; } result.program = tool->getPath(); - QString toolRunnerProgram = tool->getToolRunnerProgram(); - QString listenerProgramMessage = result.program; + QString toolRunnerProgram = tool->getToolRunnerProgramId(); - if (!toolRunnerProgram.isEmpty()){ + if (!toolRunnerProgram.isEmpty()) { ScriptingToolRegistry *stregister = AppContext::getScriptingToolRegistry(); SAFE_POINT_EXT(NULL != stregister, os.setError("No scripting tool registry"), result); - ScriptingTool *stool = stregister->getByName(toolRunnerProgram); - if (NULL == stool || stool->getPath().isEmpty()){ + ScriptingTool *stool = stregister->getById(toolRunnerProgram); + if (NULL == stool || stool->getPath().isEmpty()) { os.setError(QString("The tool %1 that runs %2 is not installed. Please set the path of the tool in the External Tools settings").arg(toolRunnerProgram).arg(toolName)); return result; } result.arguments.prepend(result.program); - for (int i = stool->getRunParameters().size() - 1; i >= 0; i--){ + for (int i = stool->getRunParameters().size() - 1; i >= 0; i--) { result.arguments.prepend(stool->getRunParameters().at(i)); } foreach(const QString ¶m, tool->getToolRunnerAdditionalOptions()) { result.arguments.prepend(param); } result.program = stool->getPath(); - listenerProgramMessage.prepend(result.program + " "); } #ifdef Q_OS_WIN @@ -470,8 +439,8 @@ ProcessRun ExternalToolSupportUtils::prepareProcess(const QString &toolName, con QProcessEnvironment processEnvironment = QProcessEnvironment::systemEnvironment(); QString path = additionalPaths.join(pathVariableSeparator) + pathVariableSeparator + - tool->getAdditionalPaths().join(pathVariableSeparator) + pathVariableSeparator + - processEnvironment.value("PATH"); + tool->getAdditionalPaths().join(pathVariableSeparator) + pathVariableSeparator + + processEnvironment.value("PATH"); if (!additionalPaths.isEmpty()) { algoLog.trace(QString("PATH environment variable: '%1'").arg(path)); } @@ -479,26 +448,19 @@ ProcessRun ExternalToolSupportUtils::prepareProcess(const QString &toolName, con result.process = new QProcess(); result.process->setProcessEnvironment(processEnvironment); - if (!workingDirectory.isEmpty()){ + if (!workingDirectory.isEmpty()) { result.process->setWorkingDirectory(workingDirectory); algoLog.details(tr("Working folder is \"%1\"").arg(result.process->workingDirectory())); } // QProcess wraps arguments that contain spaces in quotes automatically. // But launched line should look correctly in the log. - QStringList argumentListForDisplay; - foreach (const QString& arg, result.arguments) { - argumentListForDisplay << GUrlUtils::getQuotedString(arg); - } - algoLog.details(tr("Launching %1 tool: %2 %3").arg(toolName).arg(result.program).arg(argumentListForDisplay.join(" "))); + const QString commandWithArguments = GUrlUtils::getQuotedString(result.program) + ExternalToolSupportUtils::prepareArgumentsForCmdLine(result.arguments); + algoLog.details(tr("Launching %1 tool: %2").arg(toolName).arg(commandWithArguments)); - if(NULL != listener) { + if (NULL != listener) { listener->setToolName(toolName); - listener->addNewLogMessage(listenerProgramMessage, ExternalToolListener::PROGRAM_PATH); - QString argumentsLine = ExternalToolSupportUtils::prepareArgumentsForCmdLine(arguments); - argumentsLine.replace(" -", "\n-"); - - listener->addNewLogMessage(argumentsLine, ExternalToolListener::ARGUMENTS); + listener->addNewLogMessage(commandWithArguments, ExternalToolListener::PROGRAM_WITH_ARGUMENTS); } return result; } @@ -519,6 +481,47 @@ QString ExternalToolSupportUtils::prepareArgumentsForCmdLine(const QStringList & return argumentsLine; } +QStringList ExternalToolSupportUtils::splitCmdLineArguments(const QString &program) { + // a function body from "qprocess.cpp" + + QStringList args; + QString tmp; + int quoteCount = 0; + bool inQuote = false; + + // handle quoting. tokens can be surrounded by double quotes + // "hello world". three consecutive double quotes represent + // the quote character itself. + for (int i = 0; i < program.size(); ++i) { + if (program.at(i) == QLatin1Char('"') || program.at(i) == QLatin1Char('\'')) { + ++quoteCount; + if (quoteCount == 3) { + // third consecutive quote + quoteCount = 0; + tmp += program.at(i); + } + continue; + } + if (quoteCount) { + if (quoteCount == 1) + inQuote = !inQuote; + quoteCount = 0; + } + if (!inQuote && program.at(i).isSpace()) { + if (!tmp.isEmpty()) { + args += tmp; + tmp.clear(); + } + } else { + tmp += program.at(i); + } + } + if (!tmp.isEmpty()) + args += tmp; + + return args; +} + QVariantMap ExternalToolSupportUtils::getScoresGapDependencyMap() { QVariantMap map; QVariantMap gaps; @@ -588,8 +591,7 @@ ExternalToolLogProcessor::~ExternalToolLogProcessor() { } ExternalToolListener::ExternalToolListener(ExternalToolLogProcessor *logProcessor) : - logProcessor(logProcessor) -{ +logProcessor(logProcessor) { } diff --git a/src/corelibs/U2Core/src/tasks/ExternalToolRunTask.h b/src/corelibs/U2Core/src/tasks/ExternalToolRunTask.h index bbddf969d780257ed44b0618c69ac7a3b0d1fd30..37450f29491b0852b3a7e4937a20b24896b6b983 100644 --- a/src/corelibs/U2Core/src/tasks/ExternalToolRunTask.h +++ b/src/corelibs/U2Core/src/tasks/ExternalToolRunTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -52,7 +52,7 @@ public: /** * Don't delete logParser, it will be deleted automatically. */ - ExternalToolRunTask(const QString& toolName, const QStringList& arguments, ExternalToolLogParser* logParser, + ExternalToolRunTask(const QString& toolId, const QStringList& arguments, ExternalToolLogParser* logParser, const QString& workingDirectory = "", const QStringList& additionalPaths = QStringList(), const QString &additionalProcessToKill = QString(), bool parseOutputFile = false); ~ExternalToolRunTask(); @@ -68,10 +68,12 @@ public: static void killProcess(QProcess *process, QString childProcesses = ""); private: static QList<long> getChildPidsRecursive(long parentPid); - void parseStandartOutputFile(QString &filepath); + QString parseStandartOutputFile() const; + void parseError(const QString& error) const; QStringList arguments; ExternalToolLogParser* logParser; + const QString toolId; QString toolName; QString workingDirectory; QString inputFile; @@ -105,7 +107,6 @@ private: /** Part of ExternalToolRunTask that belongs to task run thread -> get signals from that thread directly */ class U2CORE_EXPORT ExternalToolRunTaskHelper : public QObject { Q_OBJECT - public: ExternalToolRunTaskHelper(ExternalToolRunTask* t); ExternalToolRunTaskHelper(QProcess *process, ExternalToolLogParser *logParser, U2OpStatus &os); @@ -116,12 +117,15 @@ public slots: void sl_onReadyToReadLog(); void sl_onReadyToReadErrLog(); +protected: + virtual void processErrorToLog(); + private: QMutex logMutex; - QProcess *process; - ExternalToolLogParser *logParser; - U2OpStatus &os; - QByteArray logData; + U2OpStatus& os; + ExternalToolLogParser* logParser; + QProcess* process; + QByteArray logData; ExternalToolListener* listener; }; @@ -138,6 +142,7 @@ public: static bool startExternalProcess(QProcess *process, const QString &program, const QStringList &arguments); static ProcessRun prepareProcess(const QString &toolName, const QStringList &arguments, const QString &workingDirectory, const QStringList &additionalPaths, U2OpStatus &os, ExternalToolListener* listener); static QString prepareArgumentsForCmdLine(const QStringList &arguments); + static QStringList splitCmdLineArguments(const QString &execString); static QVariantMap getScoresGapDependencyMap(); }; @@ -155,8 +160,7 @@ protected: virtual void processLine(const QString &line); virtual void processErrLine(const QString &line); virtual bool isError(const QString &line) const; - - void setLastError(const QString &value); + virtual void setLastError(const QString &value); private: /* If any error occurred, this variable will be non-empty */ @@ -188,10 +192,9 @@ public: class U2CORE_EXPORT ExternalToolListener { public: enum LogType { - ERROR_LOG, - OUTPUT_LOG, - PROGRAM_PATH, - ARGUMENTS + ERROR_LOG = 0, + OUTPUT_LOG = 1, + PROGRAM_WITH_ARGUMENTS = 2 }; ExternalToolListener(ExternalToolLogProcessor *logProcessor = NULL); @@ -199,7 +202,7 @@ public: virtual void addNewLogMessage(const QString& message, int messageType) = 0; - void setToolName(const QString& toolName); + virtual void setToolName(const QString& toolName); void setLogProcessor(ExternalToolLogProcessor *logProcessor); const QString &getToolName() const; diff --git a/src/corelibs/U2Core/src/tasks/ExtractAnnotatedRegionTask.cpp b/src/corelibs/U2Core/src/tasks/ExtractAnnotatedRegionTask.cpp index 1d2c5e70aa98c6e70a02e41c6c7987f49d6ba9b1..a40bd00a71db93618c74399546cb1783a7ed1caa 100644 --- a/src/corelibs/U2Core/src/tasks/ExtractAnnotatedRegionTask.cpp +++ b/src/corelibs/U2Core/src/tasks/ExtractAnnotatedRegionTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,17 +22,15 @@ #include <U2Core/AppContext.h> #include <U2Core/DNAAlphabet.h> #include <U2Core/TextUtils.h> -#include <U2Core/AnnotationSettings.h> #include <U2Core/SequenceUtils.h> #include "ExtractAnnotatedRegionTask.h" -namespace U2{ +namespace U2 { ExtractAnnotatedRegionTask::ExtractAnnotatedRegionTask(const DNASequence & sequence_, const SharedAnnotationData &sd_, const ExtractAnnotatedRegionTaskSettings & cfg_) - : Task(tr("Extract annotated regions"), TaskFlag_None), inputSeq(sequence_), inputAnn(sd_), cfg(cfg_), complT(NULL), aminoT(NULL) -{ + : Task(tr("Extract annotated regions"), TaskFlag_None), inputSeq(sequence_), inputAnn(sd_), cfg(cfg_), complT(NULL), aminoT(NULL) { } @@ -57,8 +55,8 @@ void ExtractAnnotatedRegionTask::prepareTranslations() { DNATranslationType dnaTranslType = (inputSeq.alphabet->getType() == DNAAlphabet_NUCL) ? DNATranslationType_NUCL_2_AMINO : DNATranslationType_RAW_2_AMINO; QList<DNATranslation*> aminoTTs = AppContext::getDNATranslationRegistry()->lookupTranslation(inputSeq.alphabet, dnaTranslType); - if(!aminoTTs.isEmpty()) { - aminoT = AppContext::getDNATranslationRegistry()->getStandardGeneticCodeTranslation(inputSeq.alphabet); + if (!aminoTTs.isEmpty()) { + aminoT = AppContext::getDNATranslationRegistry()->getStandardGeneticCodeTranslation(inputSeq.alphabet); } } } @@ -70,7 +68,7 @@ void ExtractAnnotatedRegionTask::run() { if (aminoT == NULL) { // extension does not work for translated annotations if (cfg.extLeft > 0) { int annStart = safeLocation.first().startPos; - int preStart = qMax(0, annStart - cfg.extLeft); + int preStart = qMax(0, annStart - cfg.extLeft); int preLen = annStart - preStart; QByteArray preSeq = inputSeq.seq.mid(preStart, preLen); resParts.prepend(preSeq); @@ -95,26 +93,26 @@ void ExtractAnnotatedRegionTask::run() { } else { resParts = U1SequenceUtils::translateRegions(resParts, aminoT, inputAnn->isJoin()); } - foreach (const QByteArray &seq, resParts) { + foreach(const QByteArray &seq, resParts) { bool onlyOneIteration = false; DNASequence s; s.info[DNAInfo::ID] = inputSeq.getName(); - if (!cfg.splitJoined || resParts.size() == 1){ + if (!cfg.splitJoined || resParts.size() == 1) { s.seq = resParts.size() == 1 ? resParts.first() : U1SequenceUtils::joinRegions(resParts, cfg.gapLength); onlyOneIteration = true; - }else{ + } else { s.seq = seq; } s.alphabet = aminoT ? aminoT->getDstAlphabet() : complT ? complT->getDstAlphabet() : inputSeq.alphabet; if (aminoT != NULL) { s.alphabet = aminoT->getDstAlphabet(); - }else if (complT != NULL) { + } else if (complT != NULL) { s.alphabet = complT->getDstAlphabet(); - }else { + } else { s.alphabet = inputSeq.alphabet; } resultedSeqList.append(s); - if (onlyOneIteration){ + if (onlyOneIteration) { break; } } diff --git a/src/corelibs/U2Core/src/tasks/ExtractAnnotatedRegionTask.h b/src/corelibs/U2Core/src/tasks/ExtractAnnotatedRegionTask.h index 827500ce693ac4f496ab3a6ab715fab29666ed19..5876fe3f4a3ab6616f4d86af3705eb7764ee321b 100644 --- a/src/corelibs/U2Core/src/tasks/ExtractAnnotatedRegionTask.h +++ b/src/corelibs/U2Core/src/tasks/ExtractAnnotatedRegionTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/FailTask.h b/src/corelibs/U2Core/src/tasks/FailTask.h index 74af1b332c9ea8a3aee1e434738da86ea32233fb..a3b9db274c8ca5abbb31e4874b88fc162209389a 100644 --- a/src/corelibs/U2Core/src/tasks/FailTask.h +++ b/src/corelibs/U2Core/src/tasks/FailTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/LoadDocumentTask.cpp b/src/corelibs/U2Core/src/tasks/LoadDocumentTask.cpp index 1b76a3d127ab5080796ef92cc93fd3537471a34b..75a8535222746fb5bf1864c28052781ea193ab21 100644 --- a/src/corelibs/U2Core/src/tasks/LoadDocumentTask.cpp +++ b/src/corelibs/U2Core/src/tasks/LoadDocumentTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,27 +23,22 @@ #include <U2Core/AppContext.h> #include <U2Core/AppSettings.h> #include <U2Core/ProjectModel.h> -#include <U2Core/Log.h> #include <U2Core/ResourceTracker.h> #include <U2Core/DocumentImport.h> #include <U2Core/DocumentModel.h> #include <U2Core/GObjectReference.h> #include <U2Core/GObject.h> -#include <U2Core/IOAdapter.h> #include <U2Core/IOAdapterUtils.h> #include <U2Core/GHints.h> #include <U2Core/AppResources.h> #include <U2Core/DocumentUtils.h> #include <U2Core/ZlibAdapter.h> -#include <U2Core/GObjectSelection.h> #include <U2Core/GObjectTypes.h> #include <U2Core/GObjectUtils.h> -#include <U2Core/GObjectRelationRoles.h> #include <U2Core/U2SafePoints.h> #include <U2Core/DNASequenceObject.h> -#include <U2Core/MultipleSequenceAlignmentObject.h> #include <U2Core/AnnotationTableObject.h> #include <U2Core/MSAUtils.h> #include <U2Core/SequenceUtils.h> @@ -51,7 +46,6 @@ #include <U2Core/IOAdapter.h> #include <U2Core/U2OpStatusUtils.h> #include <U2Core/L10n.h> -#include <U2Core/U2DbiRegistry.h> #include <U2Core/U2DbiUtils.h> #include <QApplication> @@ -72,11 +66,10 @@ namespace U2 { //TODO: avoid multiple load tasks when opening view for unloaded doc! LoadUnloadedDocumentTask::LoadUnloadedDocumentTask(Document* d, const LoadDocumentTaskConfig& _config) - : DocumentProviderTask ("", TaskFlags_NR_FOSCOE | TaskFlag_MinimizeSubtaskErrorText | TaskFlag_CollectChildrenWarnings), - loadTask(NULL), - unloadedDoc(d), - config(_config) -{ + : DocumentProviderTask("", TaskFlags_NR_FOSCOE | TaskFlag_MinimizeSubtaskErrorText | TaskFlag_CollectChildrenWarnings), + loadTask(NULL), + unloadedDoc(d), + config(_config) { assert(config.checkObjRef.objType != GObjectTypes::UNLOADED); assert(unloadedDoc != NULL); @@ -132,7 +125,7 @@ Task::ReportResult LoadUnloadedDocumentTask::report() { clearResourceUse(); resName.clear(); } - } else if (isCanceled() || (loadTask!=NULL && loadTask->isCanceled())) { + } else if (isCanceled() || (loadTask != NULL && loadTask->isCanceled())) { //do nothing } else if (unloadedDoc->isLoaded()) { //do nothing @@ -145,18 +138,17 @@ Task::ReportResult LoadUnloadedDocumentTask::report() { const QList<StateLock*>& locks = unloadedDoc->getStateLocks(); bool readyToLoad = true; foreach(StateLock* lock, locks) { - if ( lock != unloadedDoc->getDocumentModLock(DocumentModLock_IO) + if (lock != unloadedDoc->getDocumentModLock(DocumentModLock_IO) && lock != unloadedDoc->getDocumentModLock(DocumentModLock_USER) && lock != unloadedDoc->getDocumentModLock(DocumentModLock_FORMAT_AS_CLASS) && lock != unloadedDoc->getDocumentModLock(DocumentModLock_FORMAT_AS_INSTANCE) - && lock != unloadedDoc->getDocumentModLock(DocumentModLock_UNLOADED_STATE)) - { + && lock != unloadedDoc->getDocumentModLock(DocumentModLock_UNLOADED_STATE)) { readyToLoad = false; } } if (!readyToLoad) { stateInfo.setError(tr("Document is locked")); //todo: wait instead? - } else { + } else { Document* sourceDoc = loadTask->getDocument(); unloadedDoc->loadFrom(sourceDoc); // get all data from source doc; assert(!unloadedDoc->isTreeItemModified()); @@ -182,7 +174,7 @@ LoadUnloadedDocumentTask* LoadUnloadedDocumentTask::findActiveLoadingTask(Docume QList<Task*> tasks = AppContext::getResourceTracker()->getResourceUsers(res); foreach(Task* t, tasks) { LoadUnloadedDocumentTask* lut = qobject_cast<LoadUnloadedDocumentTask*>(t); - if (lut!=NULL) { + if (lut != NULL) { return lut; } } @@ -202,7 +194,7 @@ bool LoadUnloadedDocumentTask::addLoadingSubtask(Task* t, const LoadDocumentTask return false; } -Document* LoadUnloadedDocumentTask::getDocument(bool ) { +Document* LoadUnloadedDocumentTask::getDocument(bool) { if (unloadedDoc.isNull()) { return NULL; } @@ -214,14 +206,13 @@ Document* LoadUnloadedDocumentTask::getDocument(bool ) { LoadDocumentTask::LoadDocumentTask(DocumentFormatId f, const GUrl& u, - IOAdapterFactory* i, const QVariantMap& map, const LoadDocumentTaskConfig& _config) + IOAdapterFactory* i, const QVariantMap& map, const LoadDocumentTaskConfig& _config) : DocumentProviderTask("", TaskFlag_None), - format(NULL), - url(u), - iof(i), - hints(map), - config(_config) -{ + format(NULL), + url(u), + iof(i), + hints(map), + config(_config) { setTaskName(tr("Read document: '%1'").arg(u.fileName())); documentDescription = u.getURLString(); format = AppContext::getDocumentFormatRegistry()->getFormatById(f); @@ -229,23 +220,22 @@ LoadDocumentTask::LoadDocumentTask(DocumentFormatId f, const GUrl& u, } LoadDocumentTask::LoadDocumentTask(DocumentFormat* f, const GUrl& u, - IOAdapterFactory* i, const QVariantMap& map, const LoadDocumentTaskConfig& _config) + IOAdapterFactory* i, const QVariantMap& map, const LoadDocumentTaskConfig& _config) : DocumentProviderTask("", TaskFlag_None), - format(NULL), - url(u), - iof(i), - hints(map), - config(_config) -{ + format(NULL), + url(u), + iof(i), + hints(map), + config(_config) { setTaskName(tr("Read document: '%1'").arg(u.fileName())); documentDescription = u.getURLString(); format = f; init(); } -static bool isLoadFromMultipleFiles(QVariantMap& hints){ - if(hints.value(ProjectLoaderHint_MultipleFilesMode_Flag, false).toBool() == true){ // if that document was/is collected from different files - if(!QFile::exists(hints[ProjectLoaderHint_MultipleFilesMode_Flag].toString())){// if not exist - load as collected +static bool isLoadFromMultipleFiles(QVariantMap& hints) { + if (hints.value(ProjectLoaderHint_MultipleFilesMode_Flag, false).toBool() == true) { // if that document was/is collected from different files + if (!QFile::exists(hints[ProjectLoaderHint_MultipleFilesMode_Flag].toString())) {// if not exist - load as collected return true; } hints.remove(ProjectLoaderHint_MultipleFilesMode_Flag); // if exist - remove hints indicated that document is collected . Now document is genbank or clustalw @@ -258,7 +248,7 @@ static bool isLoadFromMultipleFiles(QVariantMap& hints){ void LoadDocumentTask::init() { tpm = Progress_Manual; - CHECK_EXT(format != NULL, setError(tr("Document format is NULL!")), ); + CHECK_EXT(format != NULL, setError(tr("Document format is NULL!")), ); CHECK_EXT(iof != NULL, setError(tr("IO adapter factory is NULL!")), ); documentDescription = url.getURLString(); if (format->getSupportedObjectTypes().contains(GObjectTypes::SEQUENCE)) { @@ -286,20 +276,20 @@ LoadDocumentTask *LoadDocumentTask::getDefaultLoadDocTask(U2OpStatus &os, const return new LoadDocumentTask(df->getFormatId(), url, iof, hints); } -DocumentProviderTask * LoadDocumentTask::getCommonLoadDocTask( const GUrl & url ) { - if( url.isEmpty() ) { +DocumentProviderTask * LoadDocumentTask::getCommonLoadDocTask(const GUrl & url) { + if (url.isEmpty()) { return NULL; } - IOAdapterFactory * iof = AppContext::getIOAdapterRegistry()->getIOAdapterFactoryById( IOAdapterUtils::url2io( url ) ); - if ( iof == NULL ) { + IOAdapterFactory * iof = AppContext::getIOAdapterRegistry()->getIOAdapterFactoryById(IOAdapterUtils::url2io(url)); + if (iof == NULL) { return NULL; } FormatDetectionConfig conf; conf.useImporters = true; QList<FormatDetectionResult> dfs = DocumentUtils::detectFormat(url, conf); - if( dfs.isEmpty() ) { + if (dfs.isEmpty()) { return NULL; } @@ -308,7 +298,7 @@ DocumentProviderTask * LoadDocumentTask::getCommonLoadDocTask( const GUrl & url DocumentProviderTask* task = NULL; if (df) { - task = new LoadDocumentTask( df->getFormatId(), url, iof ); + task = new LoadDocumentTask(df->getFormatId(), url, iof); } else if (di) { task = di->createImportTask(dfs.first(), true, QVariantMap()); } @@ -316,18 +306,18 @@ DocumentProviderTask * LoadDocumentTask::getCommonLoadDocTask( const GUrl & url return task; } -static bool isLoadToMem(const DocumentFormatId& id){ +static bool isLoadToMem(const DocumentFormatId& id) { // files that use dbi not loaded to memory - if(id == BaseDocumentFormats::FASTA || id == BaseDocumentFormats::PLAIN_GENBANK || + if (id == BaseDocumentFormats::FASTA || id == BaseDocumentFormats::PLAIN_GENBANK || id == BaseDocumentFormats::RAW_DNA_SEQUENCE || id == BaseDocumentFormats::FASTQ - || id == BaseDocumentFormats::GFF || id == BaseDocumentFormats::PDW){ - return false; + || id == BaseDocumentFormats::GFF || id == BaseDocumentFormats::PDW) { + return false; } return true; } void LoadDocumentTask::prepare() { - if(hasError() || isCanceled()) { + if (hasError() || isCanceled()) { return; } @@ -337,7 +327,7 @@ void LoadDocumentTask::prepare() { } } -static QList<Document*> loadMulti(const QVariantMap& fs, U2OpStatus& os){ +static QList<Document*> loadMulti(const QVariantMap& fs, U2OpStatus& os) { QList<Document*> docs; os.setProgress(0); @@ -345,7 +335,7 @@ static QList<Document*> loadMulti(const QVariantMap& fs, U2OpStatus& os){ QStringList urls = fs[ProjectLoaderHint_MultipleFilesMode_URLsDocumentConsistOf].toStringList(); - foreach(const QString& url, urls){ + foreach(const QString& url, urls) { FormatDetectionConfig conf; conf.useImporters = true; conf.bestMatchesOnly = false; @@ -355,7 +345,7 @@ static QList<Document*> loadMulti(const QVariantMap& fs, U2OpStatus& os){ int len = 100 / urls.size(); U2OpStatusChildImpl localOs(&os, U2OpStatusMapping(curentDocIdx * len, - (curentDocIdx == urls.size() - 1) ?(100 - curentDocIdx * len) : len)); + (curentDocIdx == urls.size() - 1) ? (100 - curentDocIdx * len) : len)); QVariantMap fsLocal; fsLocal.unite(fs); @@ -363,7 +353,7 @@ static QList<Document*> loadMulti(const QVariantMap& fs, U2OpStatus& os){ SAFE_POINT_EXT(AppContext::getDocumentFormatRegistry() != NULL, os.setError("DocumentFormatRegistry is NULL"), docs); DocumentFormat* df = AppContext::getDocumentFormatRegistry()->getFormatById(formats[0].format->getFormatId()); SAFE_POINT_EXT(AppContext::getIOAdapterRegistry() != NULL, os.setError("IOAdapterRegistry is NULL"), docs); - IOAdapterFactory *factory = AppContext::getIOAdapterRegistry()->getIOAdapterFactoryById( IOAdapterUtils::url2io(gurl) ); + IOAdapterFactory *factory = AppContext::getIOAdapterRegistry()->getIOAdapterFactoryById(IOAdapterUtils::url2io(gurl)); SAFE_POINT_EXT(factory != NULL, os.setError("IOAdapterFactory is NULL"), docs); Document* doc = df->loadDocument(factory, gurl, fsLocal, localOs); CHECK_OP(os, docs); @@ -376,28 +366,27 @@ static QList<Document*> loadMulti(const QVariantMap& fs, U2OpStatus& os){ return docs; } -void loadHintsNewDocument(bool saveDoc, IOAdapterFactory* iof, Document* doc, U2OpStatus& os){ - if(saveDoc){ +void loadHintsNewDocument(bool saveDoc, IOAdapterFactory* iof, Document* doc, U2OpStatus& os) { + if (saveDoc) { QScopedPointer<IOAdapter> io(iof->createIOAdapter()); QString url = doc->getURLString(); - if (!io->open(url ,IOAdapterMode_Write)) { + if (!io->open(url, IOAdapterMode_Write)) { os.setError(L10N::errorOpeningFileWrite(url)); } else { //TODO remove after genbank can storing without getWholeSequence try { doc->getDocumentFormat()->storeDocument(doc, io.data(), os); - } - catch (const std::bad_alloc &) { + } catch (const std::bad_alloc &) { os.setError(QString("Not enough memory to storing %1 file").arg(doc->getURLString())); } } } } -static Document* loadFromMultipleFiles(IOAdapterFactory* iof, QVariantMap& fs, U2OpStatus& os){ +static Document* loadFromMultipleFiles(IOAdapterFactory* iof, QVariantMap& fs, U2OpStatus& os) { QList<Document*> docs = loadMulti(fs, os); - if(os.isCoR()){ - foreach(Document* doc, docs){ + if (os.isCoR()) { + foreach(Document* doc, docs) { delete doc; } return NULL; @@ -406,24 +395,22 @@ static Document* loadFromMultipleFiles(IOAdapterFactory* iof, QVariantMap& fs, U Document* doc = NULL; QString newStringUrl = fs[ProjectLoaderHint_MultipleFilesMode_URLDocument].toString(); GUrl newUrl(newStringUrl, GUrl_File); - DocumentFormat* df= AppContext::getDocumentFormatRegistry()->getFormatById(fs[ProjectLoaderHint_MultipleFilesMode_RealDocumentFormat].toString()); + DocumentFormat* df = AppContext::getDocumentFormatRegistry()->getFormatById(fs[ProjectLoaderHint_MultipleFilesMode_RealDocumentFormat].toString()); QList<GObject*> newObjects; U2DbiRef ref; - if(fs.value(DocumentReadingMode_SequenceMergeGapSize, -1) != - 1){ + if (fs.value(DocumentReadingMode_SequenceMergeGapSize, -1) != -1) { ref = AppContext::getDbiRegistry()->getSessionTmpDbiRef(os); QList<GObject*> sequences = U1SequenceUtils::mergeSequences(docs, ref, newStringUrl, fs, os); CHECK_OP(os, NULL); newObjects << sequences; - } - else if(fs.value(DocumentReadingMode_SequenceAsAlignmentHint).toBool()){ + } else if (fs.value(DocumentReadingMode_SequenceAsAlignmentHint).toBool()) { MultipleSequenceAlignmentObject* msaObject = MSAUtils::seqDocs2msaObj(docs, fs, os); CHECK_OP(os, NULL); SAFE_POINT_EXT(NULL != msaObject, os.setError("The alignment object is NULL!"), NULL); newObjects << msaObject; ref = U2DbiRef(); - } - else{ + } else { os.setError("Multiple files reading mode: unsupported flags"); } CHECK_OP(os, NULL); @@ -432,7 +419,7 @@ static Document* loadFromMultipleFiles(IOAdapterFactory* iof, QVariantMap& fs, U bool saveDoc = fs.value(ProjectLoaderHint_MultipleFilesMode_SaveDocumentFlag, false).toBool(); loadHintsNewDocument(saveDoc, iof, doc, os); - if (!saveDoc){ + if (!saveDoc) { fs.insert(ProjectLoaderHint_DontCheckForExistence, true); } @@ -453,14 +440,12 @@ void LoadDocumentTask::run() { hints.remove(GObjectHint_NamesList); try { - if(isLoadFromMultipleFiles(hints)){ + if (isLoadFromMultipleFiles(hints)) { resultDocument = loadFromMultipleFiles(iof, hints, stateInfo); - } - else{ + } else { resultDocument = format->loadDocument(iof, url, hints, stateInfo); } - } - catch(std::bad_alloc) { + } catch (std::bad_alloc) { resultDocument = NULL; setError(tr("Not enough memory to load document %1").arg(url.getURLString())); } @@ -474,7 +459,7 @@ void LoadDocumentTask::run() { delete resultDocument; resultDocument = convertedDoc; } - if (hints.contains(DocumentReadingMode_MaxObjectsInDoc) ) { + if (hints.contains(DocumentReadingMode_MaxObjectsInDoc)) { int maxObjects = hints.value(DocumentReadingMode_MaxObjectsInDoc).toInt(); int docObjects = resultDocument->getObjects().size(); if (docObjects > maxObjects) { @@ -487,7 +472,7 @@ void LoadDocumentTask::run() { if (config.checkObjRef.isValid() && !hasError()) { processObjRef(); } - if ((NULL != resultDocument) && hints.value(ProjectLoaderHint_DontCheckForExistence, false).toBool()){ + if ((NULL != resultDocument) && hints.value(ProjectLoaderHint_DontCheckForExistence, false).toBool()) { resultDocument->getGHints()->set(ProjectLoaderHint_DontCheckForExistence, true); } assert(stateInfo.isCoR() || resultDocument != NULL); @@ -504,7 +489,7 @@ Task::ReportResult LoadDocumentTask::report() { void LoadDocumentTask::processObjRef() { assert(config.checkObjRef.isValid()); - assert(resultDocument!=NULL); + assert(resultDocument != NULL); if (GObjectUtils::selectObjectByReference(config.checkObjRef, resultDocument->getObjects(), UOF_LoadedOnly) == NULL) { if (config.objFactory == NULL) { @@ -518,7 +503,7 @@ void LoadDocumentTask::processObjRef() { stateInfo.setError(tr("Can't add object. Document format constraints check failed: %1").arg(resultDocument->getName())); } else { GObject* obj = config.objFactory->create(config.checkObjRef); - assert(obj!=NULL); + assert(obj != NULL); resultDocument->addObject(obj); } } @@ -528,9 +513,9 @@ void LoadDocumentTask::processObjRef() { int LoadDocumentTask::calculateMemory() const { int memUseMB = 0; - if(!format->getFlags().testFlag(DocumentFormatFlag_NoFullMemoryLoad) && isLoadToMem(format->getFormatId())) { // document is fully loaded to memory + if (!format->getFlags().testFlag(DocumentFormatFlag_NoFullMemoryLoad) && isLoadToMem(format->getFormatId())) { // document is fully loaded to memory QFileInfo file(url.getURLString()); - memUseMB = file.size() / (1000*1000); + memUseMB = file.size() / (1000 * 1000); double DEFAULT_COMPRESS_RATIO = 2.5; if (iof->getAdapterId() == BaseIOAdapters::GZIPPED_LOCAL_FILE) { @@ -538,7 +523,7 @@ int LoadDocumentTask::calculateMemory() const { if (fileSizeInBytes < 0) { memUseMB *= DEFAULT_COMPRESS_RATIO; //Need to calculate compress level } else { - memUseMB = fileSizeInBytes / (1000*1000); + memUseMB = fileSizeInBytes / (1000 * 1000); } } else if (iof->getAdapterId() == BaseIOAdapters::GZIPPED_HTTP_FILE) { memUseMB *= DEFAULT_COMPRESS_RATIO; //Need to calculate compress level @@ -567,7 +552,7 @@ void LoadDocumentTask::renameObjects(Document* doc, const QStringList& names) { int maxIters = nObjects; int currentIter = 0; //to avoid endless loop in case of duplicate names while (!notRenamedObjects.isEmpty() && currentIter < maxIters) { - for (int i = 0; i < nObjects; i++) { + for (int i = 0; i < nObjects; i++) { GObject* obj = objects[i]; if (!notRenamedObjects.contains(obj)) { continue; @@ -590,13 +575,13 @@ QString LoadDocumentTask::getURLString() const { return url.getURLString(); } -GObject * LDTObjectFactory::create( const GObjectReference &ref ) { +GObject * LDTObjectFactory::create(const GObjectReference &ref) { // TODO: handle other core types - SAFE_POINT( ref.objType == GObjectTypes::ANNOTATION_TABLE, "Invalid object type!", NULL ); + SAFE_POINT(ref.objType == GObjectTypes::ANNOTATION_TABLE, "Invalid object type!", NULL); U2OpStatusImpl os; - const U2DbiRef dbiRef = AppContext::getDbiRegistry( )->getSessionTmpDbiRef( os ); - SAFE_POINT_OP( os, NULL ); - return new AnnotationTableObject( ref.objName, dbiRef ); + const U2DbiRef dbiRef = AppContext::getDbiRegistry()->getSessionTmpDbiRef(os); + SAFE_POINT_OP(os, NULL); + return new AnnotationTableObject(ref.objName, dbiRef); } }//namespace diff --git a/src/corelibs/U2Core/src/tasks/LoadDocumentTask.h b/src/corelibs/U2Core/src/tasks/LoadDocumentTask.h index 5265221ba995f668f02e7e21a7f84ae34a5ebf1d..805f0d922879d98ad78729aedc5ea38b134d5cd7 100644 --- a/src/corelibs/U2Core/src/tasks/LoadDocumentTask.h +++ b/src/corelibs/U2Core/src/tasks/LoadDocumentTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/LoadRemoteDocumentTask.cpp b/src/corelibs/U2Core/src/tasks/LoadRemoteDocumentTask.cpp index 650b1b1743b5b184af4132456b95b5a4bf91217e..8c3ed64b7155c705a0496426f06afbcf98b39b3e 100644 --- a/src/corelibs/U2Core/src/tasks/LoadRemoteDocumentTask.cpp +++ b/src/corelibs/U2Core/src/tasks/LoadRemoteDocumentTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,21 +22,17 @@ #include <QDir> #include <QEventLoop> #include <QTimer> -#include <QUrl> #include <U2Core/AppContext.h> #include <U2Core/AppSettings.h> #include <U2Core/UserApplicationsSettings.h> #include <U2Core/DocumentModel.h> -#include <U2Core/IOAdapter.h> #include <U2Core/IOAdapterUtils.h> #include <U2Core/Log.h> #include <U2Core/ProjectModel.h> -#include <U2Core/NetworkConfiguration.h> #include <U2Core/Counter.h> #include <U2Core/DBXRefRegistry.h> #include <U2Core/DocumentUtils.h> -#include <U2Core/AddDocumentTask.h> #include <U2Core/CopyDataTask.h> #include <U2Core/LoadDocumentTask.h> #include <U2Core/U2SafePoints.h> @@ -66,15 +62,14 @@ const QString RemoteDBRegistry::UNIPROTKB_TREMBL("UniProtKB/TrEMBL"); //////////////////////////////////////////////////////////////////////////// //BaseLoadRemoteDocumentTask BaseLoadRemoteDocumentTask::BaseLoadRemoteDocumentTask(const QString& _downloadPath, const QVariantMap &hints, TaskFlags flags) -:DocumentProviderTask(tr("Load remote document"), flags), hints(hints) -{ + :DocumentProviderTask(tr("Load remote document"), flags), hints(hints) { downloadPath = _downloadPath; sourceUrl = GUrl(""); fullPath = ""; fileName = ""; } -void BaseLoadRemoteDocumentTask::prepare(){ +void BaseLoadRemoteDocumentTask::prepare() { sourceUrl = getSourceUrl(); fileName = getFileName(); @@ -101,20 +96,18 @@ void BaseLoadRemoteDocumentTask::prepare(){ } -Task::ReportResult BaseLoadRemoteDocumentTask::report() -{ +Task::ReportResult BaseLoadRemoteDocumentTask::report() { return ReportResult_Finished; } -bool BaseLoadRemoteDocumentTask::prepareDownloadDirectory( QString &path ){ +bool BaseLoadRemoteDocumentTask::prepareDownloadDirectory(QString &path) { if (!QDir(path).exists()) { if (path == getDefaultDownloadDirectory()) { // Creating default folder if it doesn't exist if (!QDir().mkpath(path)) { return false; } - } - else { + } else { // We do not touch user specified directories from here return false; } @@ -123,12 +116,12 @@ bool BaseLoadRemoteDocumentTask::prepareDownloadDirectory( QString &path ){ return true; } -QString BaseLoadRemoteDocumentTask::getDefaultDownloadDirectory(){ +QString BaseLoadRemoteDocumentTask::getDefaultDownloadDirectory() { QString path = AppContext::getAppSettings()->getUserAppsSettings()->getDownloadDirPath(); return path; } -bool BaseLoadRemoteDocumentTask::initLoadDocumentTask(){ +bool BaseLoadRemoteDocumentTask::initLoadDocumentTask() { // Check if the document has been loaded Project* proj = AppContext::getProject(); if (proj != NULL) { @@ -151,13 +144,13 @@ bool BaseLoadRemoteDocumentTask::initLoadDocumentTask(){ return true; } -bool BaseLoadRemoteDocumentTask::isCached(){ +bool BaseLoadRemoteDocumentTask::isCached() { // Check if the file has already been downloaded RecentlyDownloadedCache* cache = AppContext::getRecentlyDownloadedCache(); - if( cache != NULL && cache->contains(fileName)) { + if (cache != NULL && cache->contains(fileName)) { QString cachedUrl = cache->getFullPath(fileName); - if( fullPath == cachedUrl ) { - if (initLoadDocumentTask() ) { + if (fullPath == cachedUrl) { + if (initLoadDocumentTask()) { addSubTask(loadDocumentTask); } return true; @@ -167,7 +160,7 @@ bool BaseLoadRemoteDocumentTask::isCached(){ return false; } -void BaseLoadRemoteDocumentTask::createLoadedDocument(){ +void BaseLoadRemoteDocumentTask::createLoadedDocument() { GUrl url(fullPath); // Detect format if (formatId.isEmpty()) { @@ -181,27 +174,25 @@ void BaseLoadRemoteDocumentTask::createLoadedDocument(){ ////////////////////////////////////////////////////////////////////////// //LoadRemoteDocumentTask -LoadRemoteDocumentTask::LoadRemoteDocumentTask( const GUrl& url ) +LoadRemoteDocumentTask::LoadRemoteDocumentTask(const GUrl& url) : BaseLoadRemoteDocumentTask(), - loadDataFromEntrezTask(NULL) -{ + loadDataFromEntrezTask(NULL) { fileUrl = url; - GCOUNTER( cvar, tvar, "LoadRemoteDocumentTask" ); + GCOUNTER(cvar, tvar, "LoadRemoteDocumentTask"); } -LoadRemoteDocumentTask::LoadRemoteDocumentTask( const QString & accId, const QString & dbName, const QString & fullPathDir, const QString& fileFormat, const QVariantMap &hints) +LoadRemoteDocumentTask::LoadRemoteDocumentTask(const QString & accId, const QString & dbName, const QString & fullPathDir, const QString& fileFormat, const QVariantMap &hints) :BaseLoadRemoteDocumentTask(fullPathDir, hints), loadDataFromEntrezTask(NULL), accNumber(accId), - dbName(dbName) -{ - GCOUNTER( cvar, tvar, "LoadRemoteDocumentTask" ); + dbName(dbName) { + GCOUNTER(cvar, tvar, "LoadRemoteDocumentTask"); format = fileFormat; } -void LoadRemoteDocumentTask::prepare(){ +void LoadRemoteDocumentTask::prepare() { BaseLoadRemoteDocumentTask::prepare(); - if (!isCached()){ + if (!isCached()) { if (sourceUrl.isHyperLink()) { IOAdapterFactory* iof = AppContext::getIOAdapterRegistry()->getIOAdapterFactoryById(BaseIOAdapters::HTTP_FILE); IOAdapterFactory * iow = AppContext::getIOAdapterRegistry()->getIOAdapterFactoryById(BaseIOAdapters::LOCAL_FILE); @@ -210,7 +201,7 @@ void LoadRemoteDocumentTask::prepare(){ } else { assert(sourceUrl.isLocalFile()); QString dbId = RemoteDBRegistry::getRemoteDBRegistry().getDbEntrezName(dbName); - if(dbId.isEmpty()) { + if (dbId.isEmpty()) { setError(tr("Undefined database: '%1'").arg(dbName)); return; } else { @@ -221,7 +212,7 @@ void LoadRemoteDocumentTask::prepare(){ } } -QString LoadRemoteDocumentTask::getFileFormat( const QString & dbid ){ +QString LoadRemoteDocumentTask::getFileFormat(const QString & dbid) { QString dbId = RemoteDBRegistry::getRemoteDBRegistry().getDbEntrezName(dbid); if (dbId == GENBANK_NUCLEOTIDE_ID || dbId == GENBANK_PROTEIN_ID) { return GENBANK_FORMAT; @@ -230,26 +221,26 @@ QString LoadRemoteDocumentTask::getFileFormat( const QString & dbid ){ } } -GUrl LoadRemoteDocumentTask::getSourceUrl(){ - if (!fileUrl.isEmpty()){ +GUrl LoadRemoteDocumentTask::getSourceUrl() { + if (!fileUrl.isEmpty()) { return fileUrl; - }else{ + } else { RemoteDBRegistry::getRemoteDBRegistry().convertAlias(dbName); return GUrl(RemoteDBRegistry::getRemoteDBRegistry().getURL(accNumber, dbName)); } } -QString LoadRemoteDocumentTask::getFileName(){ +QString LoadRemoteDocumentTask::getFileName() { - if( sourceUrl.isHyperLink() ) { + if (sourceUrl.isHyperLink()) { return dbName == RemoteDBRegistry::ENSEMBL ? QString("%1.fa").arg(accNumber) : sourceUrl.fileName(); } else { if (format.isEmpty()) { format = getFileFormat(dbName); } - accNumber.replace(";",","); + accNumber.replace(";", ","); QStringList accIds = accNumber.split(","); - if (accIds.size() == 1 ) { + if (accIds.size() == 1) { return accNumber + "." + format; } else if (accIds.size() > 1) { return accIds.first() + "_misc." + format; @@ -259,10 +250,10 @@ QString LoadRemoteDocumentTask::getFileName(){ return ""; } -QList<Task*> LoadRemoteDocumentTask::onSubTaskFinished( Task* subTask ){ +QList<Task*> LoadRemoteDocumentTask::onSubTaskFinished(Task* subTask) { QList<Task*> subTasks; if (subTask->hasError()) { - if( subTask == copyDataTask || subTask == loadDataFromEntrezTask ) { + if (subTask == copyDataTask || subTask == loadDataFromEntrezTask) { setError(tr("Cannot find %1 in %2 database").arg(accNumber).arg(dbName) + ": " + subTask->getError()); } return subTasks; @@ -272,7 +263,7 @@ QList<Task*> LoadRemoteDocumentTask::onSubTaskFinished( Task* subTask ){ subTasks.append(loadDocumentTask); if (!subTask->isCanceled()) { RecentlyDownloadedCache * cache = AppContext::getRecentlyDownloadedCache(); - if(cache != NULL) { + if (cache != NULL) { cache->append(fullPath); } } else if (subTask == copyDataTask) { @@ -280,7 +271,7 @@ QList<Task*> LoadRemoteDocumentTask::onSubTaskFinished( Task* subTask ){ notLoadedFile.remove(); } } - } else if ( subTask == loadDocumentTask) { + } else if (subTask == loadDocumentTask) { resultDocument = loadDocumentTask->takeDocument(); } return subTasks; @@ -297,7 +288,7 @@ QString LoadRemoteDocumentTask::getRetType() const { //////////////////////////////////////////////////////////////////////////////////////////////////// RecentlyDownloadedCache::RecentlyDownloadedCache() { QStringList fileNames = AppContext::getAppSettings()->getUserAppsSettings()->getRecentlyDownloadedFileNames(); - foreach (const QString& path, fileNames) { + foreach(const QString& path, fileNames) { QFileInfo info(path); if (info.exists()) { append(path); @@ -309,13 +300,13 @@ bool RecentlyDownloadedCache::contains(const QString& fileName) { if (!urlMap.contains(fileName)) { return false; } else { - QString fullPath=getFullPath(fileName); + QString fullPath = getFullPath(fileName); QFile cachedFile(fullPath); return cachedFile.exists(); } } -void RecentlyDownloadedCache::append( const QString& fileName ) { +void RecentlyDownloadedCache::append(const QString& fileName) { QFileInfo info(fileName); urlMap.insert(info.fileName(), fileName); } @@ -324,7 +315,7 @@ void RecentlyDownloadedCache::remove(const QString& fullPath) { urlMap.remove(QFileInfo(fullPath).fileName()); } -QString RecentlyDownloadedCache::getFullPath( const QString& fileName ) { +QString RecentlyDownloadedCache::getFullPath(const QString& fileName) { return urlMap.value(fileName); } @@ -338,102 +329,95 @@ RecentlyDownloadedCache::~RecentlyDownloadedCache() { ////////////////////////////////////////////////////////////////////////// -BaseEntrezRequestTask::BaseEntrezRequestTask( const QString &taskName ) - : Task( taskName, TaskFlags_FOSCOE | TaskFlag_MinimizeSubtaskErrorText ), - loop( NULL ), networkManager( NULL ) -{ +BaseEntrezRequestTask::BaseEntrezRequestTask(const QString &taskName) + : Task(taskName, TaskFlags_FOSCOE | TaskFlag_MinimizeSubtaskErrorText), + loop(NULL), networkManager(NULL) { } -BaseEntrezRequestTask::~BaseEntrezRequestTask( ) -{ +BaseEntrezRequestTask::~BaseEntrezRequestTask() { delete loop; loop = NULL; delete networkManager; networkManager = NULL; } -void BaseEntrezRequestTask::sl_onError(QNetworkReply::NetworkError error) -{ - stateInfo.setError( QString( "NetworkReply error %1" ).arg( error ) ); - loop->exit( ); +void BaseEntrezRequestTask::sl_onError(QNetworkReply::NetworkError error) { + stateInfo.setError(QString("NetworkReply error %1").arg(error)); + loop->exit(); } -void BaseEntrezRequestTask::sl_uploadProgress( qint64 bytesSent, qint64 bytesTotal) -{ +void BaseEntrezRequestTask::sl_uploadProgress(qint64 bytesSent, qint64 bytesTotal) { stateInfo.progress = bytesSent / bytesTotal * 100; } -void BaseEntrezRequestTask::onProxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *auth){ +void BaseEntrezRequestTask::onProxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *auth) { auth->setUser(proxy.user()); auth->setPassword(proxy.password()); disconnect(this, SLOT(onProxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*))); } -void BaseEntrezRequestTask::createLoopAndNetworkManager(const QString& queryString) -{ - SAFE_POINT( NULL == networkManager, "Attempting to initialize network manager twice", ); +void BaseEntrezRequestTask::createLoopAndNetworkManager(const QString& queryString) { + SAFE_POINT(NULL == networkManager, "Attempting to initialize network manager twice", ); networkManager = new QNetworkAccessManager; - connect( networkManager, SIGNAL( finished( QNetworkReply * ) ), this, - SLOT( sl_replyFinished( QNetworkReply* ) ) ); + connect(networkManager, SIGNAL(finished(QNetworkReply *)), this, + SLOT(sl_replyFinished(QNetworkReply*))); - NetworkConfiguration* nc = AppContext::getAppSettings( )->getNetworkConfiguration( ); - QNetworkProxy proxy = nc->getProxyByUrl( queryString ); - networkManager->setProxy( proxy ); + NetworkConfiguration* nc = AppContext::getAppSettings()->getNetworkConfiguration(); + QNetworkProxy proxy = nc->getProxyByUrl(queryString); + networkManager->setProxy(proxy); connect(networkManager, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)), this, SLOT(onProxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*))); - SAFE_POINT( NULL == loop, "Attempting to initialize loop twice", ); + SAFE_POINT(NULL == loop, "Attempting to initialize loop twice", ); loop = new QEventLoop; } ////////////////////////////////////////////////////////////////////////// LoadDataFromEntrezTask::LoadDataFromEntrezTask(const QString& dbId, - const QString& accNum, - const QString& retType, - const QString& path) - : BaseEntrezRequestTask( "LoadDataFromEntrez"), - searchReply(NULL), - downloadReply(NULL), - db(dbId), - accNumber(accNum), - fullPath(path), - format(retType) -{ - -} - -void LoadDataFromEntrezTask::run( ) -{ + const QString& accNum, + const QString& retType, + const QString& path) + : BaseEntrezRequestTask("LoadDataFromEntrez"), + searchReply(NULL), + downloadReply(NULL), + db(dbId), + accNumber(accNum), + fullPath(path), + format(retType) { + +} + +void LoadDataFromEntrezTask::run() { stateInfo.progress = 0; - ioLog.trace( "Load data from Entrez started..." ); + ioLog.trace("Load data from Entrez started..."); // Step one: download the file - QString traceFetchUrl = QString( EntrezUtils::NCBI_EFETCH_URL ).arg( db ).arg( accNumber ).arg( format ); + QString traceFetchUrl = QString(EntrezUtils::NCBI_EFETCH_URL).arg(db).arg(accNumber).arg(format); createLoopAndNetworkManager(traceFetchUrl); ioLog.details(tr("Downloading file %1").arg(traceFetchUrl)); QUrl requestUrl(EntrezUtils::NCBI_EFETCH_URL.arg(db).arg(accNumber).arg(format)); runRequest(requestUrl); - loop->exec( ); + loop->exec(); - if ( !isCanceled( ) ) { - ioLog.trace( "Download finished." ); + if (!isCanceled()) { + ioLog.trace("Download finished."); - QByteArray result = downloadReply->readAll( ); + QByteArray result = downloadReply->readAll(); if (((result.size() < 100) && result.contains("Nothing has been found")) || (result.contains("ID list is empty! In it there are neither IDs nor accessions"))) { - setError( tr( "Sequence with ID=%1 is not found." ).arg( accNumber ) ); + setError(tr("Sequence with ID=%1 is not found.").arg(accNumber)); return; } - QFile downloadedFile( fullPath ); - if ( !downloadedFile.open( QIODevice::WriteOnly ) ) { - stateInfo.setError( "Cannot open file to write!" ); + QFile downloadedFile(fullPath); + if (!downloadedFile.open(QIODevice::WriteOnly)) { + stateInfo.setError("Cannot open file to write!"); return; } - downloadedFile.write( result ); - downloadedFile.close( ); + downloadedFile.write(result); + downloadedFile.close(); } } @@ -457,13 +441,12 @@ void LoadDataFromEntrezTask::sl_cancelCheck() { } } -void LoadDataFromEntrezTask::sl_replyFinished( QNetworkReply* reply ) -{ - if ( isCanceled( ) ) { - loop->exit( ); +void LoadDataFromEntrezTask::sl_replyFinished(QNetworkReply* reply) { + if (isCanceled()) { + loop->exit(); return; } - if ( reply == searchReply ) { + if (reply == searchReply) { QString locationHeaderValue = reply->header(QNetworkRequest::LocationHeader).toString(); if (!locationHeaderValue.isEmpty()) { QUrl redirectedUrl(locationHeaderValue); @@ -482,45 +465,41 @@ void LoadDataFromEntrezTask::sl_replyFinished( QNetworkReply* reply ) } delete handler; } - loop->exit( ); + loop->exit(); } ////////////////////////////////////////////////////////////////////////// -EntrezQueryTask::EntrezQueryTask( QXmlDefaultHandler* rHandler, const QString& searchQuery ) +EntrezQueryTask::EntrezQueryTask(QXmlDefaultHandler* rHandler, const QString& searchQuery) : BaseEntrezRequestTask("EntrezQueryTask"), - queryReply(NULL), - resultHandler(rHandler), - query(searchQuery) -{ - SAFE_POINT( NULL != rHandler, "Invalid pointer encountered", ); + queryReply(NULL), + resultHandler(rHandler), + query(searchQuery) { + SAFE_POINT(NULL != rHandler, "Invalid pointer encountered", ); } -void EntrezQueryTask::run( ) -{ +void EntrezQueryTask::run() { stateInfo.progress = 0; - ioLog.trace( "Entrez query task started..." ); + ioLog.trace("Entrez query task started..."); createLoopAndNetworkManager(query); - QUrl request( query ); + QUrl request(query); runRequest(request); - loop->exec( ); - if ( !isCanceled( ) ) { + loop->exec(); + if (!isCanceled()) { ioLog.trace("Query finished."); } } -const QXmlDefaultHandler * EntrezQueryTask::getResultHandler() const -{ +const QXmlDefaultHandler * EntrezQueryTask::getResultHandler() const { return resultHandler; } -void EntrezQueryTask::sl_replyFinished( QNetworkReply* reply ) -{ +void EntrezQueryTask::sl_replyFinished(QNetworkReply* reply) { assert(reply == queryReply); - if ( isCanceled( ) ) { + if (isCanceled()) { loop->exit(); return; } @@ -551,8 +530,7 @@ void EntrezQueryTask::runRequest(const QUrl& requestUrl) { ////////////////////////////////////////////////////////////////////////// -bool ESearchResultHandler::startElement( const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &attributes ) -{ +bool ESearchResultHandler::startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &attributes) { Q_UNUSED(namespaceURI); Q_UNUSED(localName); Q_UNUSED(attributes); if (!metESearchResult && qName != "eSearchResult") { @@ -566,29 +544,25 @@ bool ESearchResultHandler::startElement( const QString &namespaceURI, const QStr return true; } -bool ESearchResultHandler::endElement( const QString &namespaceURI, const QString &localName, const QString &qName ) -{ +bool ESearchResultHandler::endElement(const QString &namespaceURI, const QString &localName, const QString &qName) { Q_UNUSED(namespaceURI); Q_UNUSED(localName); if ("Id" == qName) { - idList.append( curText ); + idList.append(curText); } return true; } -ESearchResultHandler::ESearchResultHandler() -{ +ESearchResultHandler::ESearchResultHandler() { metESearchResult = false; } -bool ESearchResultHandler::characters( const QString &str ) -{ +bool ESearchResultHandler::characters(const QString &str) { curText += str; return true; } -bool ESearchResultHandler::fatalError( const QXmlParseException &exception ) -{ +bool ESearchResultHandler::fatalError(const QXmlParseException &exception) { Q_UNUSED(exception); assert(0); return false; @@ -596,8 +570,7 @@ bool ESearchResultHandler::fatalError( const QXmlParseException &exception ) } ////////////////////////////////////////////////////////////////////////// -bool ESummaryResultHandler::startElement( const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &attributes ) -{ +bool ESummaryResultHandler::startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &attributes) { Q_UNUSED(namespaceURI); Q_UNUSED(localName); Q_UNUSED(attributes); if (!metESummaryResult && qName != "eSummaryResult") { @@ -612,8 +585,7 @@ bool ESummaryResultHandler::startElement( const QString &namespaceURI, const QSt return true; } -bool ESummaryResultHandler::endElement( const QString &namespaceURI, const QString &localName, const QString &qName ) -{ +bool ESummaryResultHandler::endElement(const QString &namespaceURI, const QString &localName, const QString &qName) { Q_UNUSED(namespaceURI); Q_UNUSED(localName); if ("DocSum" == qName) { results.append(currentSummary); @@ -625,7 +597,7 @@ bool ESummaryResultHandler::endElement( const QString &namespaceURI, const QStri if ("Caption" == itemName) { currentSummary.name = curText; - } else if ("Title" == itemName ) { + } else if ("Title" == itemName) { currentSummary.title = curText; } else if ("Length" == itemName) { currentSummary.size = curText.toInt(); @@ -635,19 +607,16 @@ bool ESummaryResultHandler::endElement( const QString &namespaceURI, const QStri } ESummaryResultHandler::ESummaryResultHandler() - : QXmlDefaultHandler() -{ + : QXmlDefaultHandler() { metESummaryResult = false; } -bool ESummaryResultHandler::characters( const QString &str ) -{ +bool ESummaryResultHandler::characters(const QString &str) { curText += str; return true; } -bool ESummaryResultHandler::fatalError( const QXmlParseException &exception ) -{ +bool ESummaryResultHandler::fatalError(const QXmlParseException &exception) { errorStr = QString("ESummary result parsing failed: %1").arg(exception.message()); @@ -656,7 +625,7 @@ bool ESummaryResultHandler::fatalError( const QXmlParseException &exception ) } ////////////////////////////////////////////////////////////////////////// -static QString makeIDLink(const QString& id){ +static QString makeIDLink(const QString& id) { QString res = "<a href=\"%1\"><span style=\" text-decoration: underline;\">%1</span></a>"; res = res.arg(id); @@ -665,7 +634,7 @@ static QString makeIDLink(const QString& id){ } RemoteDBRegistry::RemoteDBRegistry() { - queryDBs.insert(GENBANK_DNA, GENBANK_NUCLEOTIDE_ID); + queryDBs.insert(GENBANK_DNA, GENBANK_NUCLEOTIDE_ID); queryDBs.insert(GENBANK_PROTEIN, GENBANK_PROTEIN_ID); aliases.insert("ENSEMBL", ENSEMBL); @@ -677,7 +646,7 @@ RemoteDBRegistry::RemoteDBRegistry() { aliases.insert("nucleotide", GENBANK_DNA); aliases.insert("protein", GENBANK_PROTEIN); - const QMap<QString,DBXRefInfo>& entries = AppContext::getDBXRefRegistry()->getEntries(); + const QMap<QString, DBXRefInfo>& entries = AppContext::getDBXRefRegistry()->getEntries(); foreach(const DBXRefInfo& info, entries.values()) { if (!info.fileUrl.isEmpty()) { httpDBs.insert(info.name, info.fileUrl); @@ -700,10 +669,10 @@ RemoteDBRegistry& RemoteDBRegistry::getRemoteDBRegistry() { QList<QString> RemoteDBRegistry::getDBs() { - return ( queryDBs.keys() + httpDBs.keys() ); + return (queryDBs.keys() + httpDBs.keys()); } -QString RemoteDBRegistry::getURL( const QString& accId, const QString& dbName ) { +QString RemoteDBRegistry::getURL(const QString& accId, const QString& dbName) { QString result(""); if (httpDBs.contains(dbName)) { result = QString(httpDBs.value(dbName)).arg(accId); @@ -711,11 +680,11 @@ QString RemoteDBRegistry::getURL( const QString& accId, const QString& dbName ) return result; } -QString RemoteDBRegistry::getDbEntrezName( const QString& dbName ){ +QString RemoteDBRegistry::getDbEntrezName(const QString& dbName) { return queryDBs.value(dbName); } -QString RemoteDBRegistry::getHint( const QString& dbName ) { +QString RemoteDBRegistry::getHint(const QString& dbName) { if (hints.contains(dbName)) { return hints.value(dbName); } else { @@ -724,13 +693,13 @@ QString RemoteDBRegistry::getHint( const QString& dbName ) { } -void RemoteDBRegistry::convertAlias( QString& dbName ) { +void RemoteDBRegistry::convertAlias(QString& dbName) { if (aliases.contains(dbName)) { dbName = aliases.value(dbName); } } -bool RemoteDBRegistry::hasDbId(const QString& dbId){ +bool RemoteDBRegistry::hasDbId(const QString& dbId) { return queryDBs.contains(dbId) || httpDBs.contains(dbId); } diff --git a/src/corelibs/U2Core/src/tasks/LoadRemoteDocumentTask.h b/src/corelibs/U2Core/src/tasks/LoadRemoteDocumentTask.h index 21e540e86286af2975ccf0afd40016c1fe076351..2be1585a48b3abda6503b9f3e7add738af04775c 100644 --- a/src/corelibs/U2Core/src/tasks/LoadRemoteDocumentTask.h +++ b/src/corelibs/U2Core/src/tasks/LoadRemoteDocumentTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,7 +26,6 @@ #include <U2Core/GUrl.h> #include <U2Core/NetworkConfiguration.h> -#include <QUrl> #include <QNetworkReply> #include <QAuthenticator> #include <QXmlReader> @@ -52,10 +51,10 @@ class LoadDataFromEntrezTask; class U2CORE_EXPORT RemoteDBRegistry { RemoteDBRegistry(); - QMap<QString,QString> queryDBs; - QMap<QString,QString> httpDBs; - QMap<QString,QString> hints; - QMap<QString,QString> aliases; + QMap<QString, QString> queryDBs; + QMap<QString, QString> httpDBs; + QMap<QString, QString> hints; + QMap<QString, QString> aliases; public: QString getURL(const QString& accId, const QString& dbName); QString getDbEntrezName(const QString& dbName); @@ -79,7 +78,7 @@ public: class U2CORE_EXPORT RecentlyDownloadedCache : public QObject { Q_OBJECT - QMap<QString, QString> urlMap; + QMap<QString, QString> urlMap; void loadCacheFromSettings(); void saveCacheToSettings(); public: @@ -110,7 +109,7 @@ class U2CORE_EXPORT BaseLoadRemoteDocumentTask : public DocumentProviderTask { public: BaseLoadRemoteDocumentTask(const QString& downloadPath = QString(), const QVariantMap &hints = QVariantMap(), TaskFlags flags = TaskFlags(TaskFlags_NR_FOSCOE | TaskFlag_MinimizeSubtaskErrorText)); virtual void prepare(); - QString getLocalUrl(){ return fullPath; } + QString getLocalUrl() { return fullPath; } virtual ReportResult report(); @@ -170,13 +169,13 @@ private: class U2CORE_EXPORT BaseEntrezRequestTask : public Task { Q_OBJECT public: - BaseEntrezRequestTask( const QString &taskName ); - virtual ~BaseEntrezRequestTask( ); + BaseEntrezRequestTask(const QString &taskName); + virtual ~BaseEntrezRequestTask(); -protected slots: - virtual void sl_replyFinished( QNetworkReply *reply ) = 0; - void sl_onError( QNetworkReply::NetworkError error ); - void sl_uploadProgress( qint64 bytesSent, qint64 bytesTotal ); + protected slots: + virtual void sl_replyFinished(QNetworkReply *reply) = 0; + void sl_onError(QNetworkReply::NetworkError error); + void sl_uploadProgress(qint64 bytesSent, qint64 bytesTotal); virtual void onProxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*); protected: @@ -196,13 +195,13 @@ class U2CORE_EXPORT LoadDataFromEntrezTask : public BaseEntrezRequestTask { Q_OBJECT public: LoadDataFromEntrezTask(const QString& dbId, - const QString& accNumber, - const QString& retType, - const QString& fullPath); + const QString& accNumber, + const QString& retType, + const QString& fullPath); void run(); -private slots: + private slots: void sl_replyFinished(QNetworkReply* reply); void sl_cancelCheck(); @@ -222,12 +221,12 @@ private: class U2CORE_EXPORT EntrezQueryTask : public BaseEntrezRequestTask { Q_OBJECT public: - EntrezQueryTask( QXmlDefaultHandler* resultHandler, const QString& query ); + EntrezQueryTask(QXmlDefaultHandler* resultHandler, const QString& query); void run(); const QXmlDefaultHandler* getResultHandler() const; -private slots: + private slots: void sl_replyFinished(QNetworkReply* reply); private: diff --git a/src/corelibs/U2Core/src/tasks/ModifySequenceObjectTask.cpp b/src/corelibs/U2Core/src/tasks/ModifySequenceObjectTask.cpp index e08b48f83c01326f59815222d0f6b0b69853739a..f83c618dcf057385ec019c083e181a9aac7a8491 100644 --- a/src/corelibs/U2Core/src/tasks/ModifySequenceObjectTask.cpp +++ b/src/corelibs/U2Core/src/tasks/ModifySequenceObjectTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,7 +22,6 @@ #include <U2Core/AddDocumentTask.h> #include <U2Core/AnnotationTableObject.h> #include <U2Core/AppContext.h> -#include <U2Core/BaseDocumentFormats.h> #include <U2Core/Counter.h> #include <U2Core/DNAAlphabet.h> #include <U2Core/DNASequenceObject.h> @@ -32,14 +31,11 @@ #include <U2Core/GObject.h> #include <U2Core/GObjectRelationRoles.h> #include <U2Core/GObjectUtils.h> -#include <U2Core/IOAdapter.h> #include <U2Core/IOAdapterUtils.h> -#include <U2Core/L10n.h> #include <U2Core/Log.h> #include <U2Core/MultiTask.h> #include <U2Core/ProjectModel.h> #include <U2Core/SaveDocumentTask.h> -#include <U2Core/U1AnnotationUtils.h> #include <U2Core/U2ObjectDbi.h> #include <U2Core/U2OpStatusUtils.h> #include <U2Core/U2SafePoints.h> @@ -55,8 +51,7 @@ ModifySequenceContentTask::ModifySequenceContentTask(const DocumentFormatId &dfI const DNASequence &seq2Insert, bool recalculateQualifiers, U1AnnotationUtils::AnnotationStrategyForResize str, const GUrl &url, bool mergeAnnotations) : Task(tr("Modify sequence task"), TaskFlags(TaskFlag_NoRun) | TaskFlag_ReportingIsSupported), resultFormatId(dfId), mergeAnnotations(mergeAnnotations), recalculateQualifiers(recalculateQualifiers), curDoc(seqObj->getDocument()), newDoc(NULL), url(url), strat(str), - seqObj(seqObj), regionToReplace(regionTodelete), sequence2Insert(seq2Insert) -{ + seqObj(seqObj), regionToReplace(regionTodelete), sequence2Insert(seq2Insert) { GCOUNTER(cvar, tvar, "Modify sequence task"); inplaceMod = url == curDoc->getURL() || url.isEmpty(); } @@ -112,7 +107,7 @@ namespace { QString formatPairList(const QList<QStrStrPair> &pairList, bool useFirst) { QString result; const QString lineSeparator = "<br>"; - foreach (const QStrStrPair &pair, pairList) { + foreach(const QStrStrPair &pair, pairList) { result += useFirst ? pair.first : pair.second; result += lineSeparator; } @@ -138,7 +133,7 @@ QString ModifySequenceContentTask::generateReport() const { report += tr("Referenced Region"); report += "</th></tr>"; - foreach (Annotation *an, annotationForReport.keys()) { + foreach(Annotation *an, annotationForReport.keys()) { if (annotationForReport[an].isEmpty()) { coreLog.error(tr("Unexpected qualifiers count")); assert(false); @@ -183,12 +178,12 @@ void ModifySequenceContentTask::cloneSequenceAndAnnotations() { AnnotationTableObject *newDocAto = new AnnotationTableObject("Annotations", newDoc->getDbiRef()); newDocAto->addObjectRelation(seqObj, ObjectRole_Sequence); - foreach (Document *d, docs) { + foreach(Document *d, docs) { QList<GObject *> annotationTablesList = d->findGObjectByType(GObjectTypes::ANNOTATION_TABLE); - foreach (GObject *table, annotationTablesList) { + foreach(GObject *table, annotationTablesList) { AnnotationTableObject *ato = qobject_cast<AnnotationTableObject *>(table); if (ato->hasObjectRelation(oldSeqObj, ObjectRole_Sequence)) { - foreach (Annotation *ann, ato->getAnnotations()) { + foreach(Annotation *ann, ato->getAnnotations()) { newDocAto->addAnnotations(QList<SharedAnnotationData>() << ann->getData(), ann->getGroup()->getName()); } } @@ -197,7 +192,7 @@ void ModifySequenceContentTask::cloneSequenceAndAnnotations() { newDoc->addObject(newDocAto); } else { // use only sequence-doc annotations - foreach (GObject *o, curDoc->getObjects()) { + foreach(GObject *o, curDoc->getObjects()) { AnnotationTableObject *aObj = qobject_cast<AnnotationTableObject *>(o); if (NULL != aObj) { U2OpStatus2Log os; diff --git a/src/corelibs/U2Core/src/tasks/ModifySequenceObjectTask.h b/src/corelibs/U2Core/src/tasks/ModifySequenceObjectTask.h index f3bbefd938f324f63a186a8c83d84b27cd55d691..06f1da055f8d42670bb7f20b89dd6b1c8882d029 100644 --- a/src/corelibs/U2Core/src/tasks/ModifySequenceObjectTask.h +++ b/src/corelibs/U2Core/src/tasks/ModifySequenceObjectTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/MultiTask.cpp b/src/corelibs/U2Core/src/tasks/MultiTask.cpp index dc1b4f7adbdfaf605393f68ca96f0b28a1bdd3c1..5dd1721161eedbf46000aec2178f3b65e5a8744f 100644 --- a/src/corelibs/U2Core/src/tasks/MultiTask.cpp +++ b/src/corelibs/U2Core/src/tasks/MultiTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -56,6 +56,13 @@ Task::ReportResult MultiTask::report() { delete l; l = NULL; } + foreach(Task* t, tasks) { + CHECK_CONTINUE(t->isConcatenateChildrenErrors()); + + setReportingSupported(true); + setReportingEnabled(true); + break; + } return Task::ReportResult_Finished; } diff --git a/src/corelibs/U2Core/src/tasks/MultiTask.h b/src/corelibs/U2Core/src/tasks/MultiTask.h index 1ebb4311848a216be0f087e3763e81afbe7496b8..071f879f89bc0ed2c943edd6cc0966aefb0dfbcd 100644 --- a/src/corelibs/U2Core/src/tasks/MultiTask.h +++ b/src/corelibs/U2Core/src/tasks/MultiTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/RemoveAnnotationsTask.cpp b/src/corelibs/U2Core/src/tasks/RemoveAnnotationsTask.cpp index 686a776d4e310ad88a193f3d2a5e32e154cf08d0..c333deed49302e4071cd2ccf1a9762e715207bef 100644 --- a/src/corelibs/U2Core/src/tasks/RemoveAnnotationsTask.cpp +++ b/src/corelibs/U2Core/src/tasks/RemoveAnnotationsTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/RemoveAnnotationsTask.h b/src/corelibs/U2Core/src/tasks/RemoveAnnotationsTask.h index e676bd2a5244391a86d2cec3a9c01f656ea6af36..f29b4cb7a8b01b8996b578de05bc7b0bf2421178 100644 --- a/src/corelibs/U2Core/src/tasks/RemoveAnnotationsTask.h +++ b/src/corelibs/U2Core/src/tasks/RemoveAnnotationsTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/RemoveDocumentTask.cpp b/src/corelibs/U2Core/src/tasks/RemoveDocumentTask.cpp index 996d47be8ce4111cef1c3cb7832b3d53e09278eb..e56b8dd681dc89fba871bc169451d9000d98a5da 100644 --- a/src/corelibs/U2Core/src/tasks/RemoveDocumentTask.cpp +++ b/src/corelibs/U2Core/src/tasks/RemoveDocumentTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,7 +23,6 @@ #include "SaveDocumentTask.h" -#include <U2Core/DocumentModel.h> #include <U2Core/ProjectModel.h> #include <U2Core/AppContext.h> @@ -31,10 +30,9 @@ namespace U2 { RemoveMultipleDocumentsTask::RemoveMultipleDocumentsTask(Project* _p, const QList<Document*>& _docs, bool _saveModifiedDocs, bool _useGUI) -: Task(tr("Remove document"), TaskFlags(TaskFlag_NoRun) | TaskFlag_CancelOnSubtaskCancel), p(_p), saveModifiedDocs(_saveModifiedDocs), useGUI(_useGUI) -{ + : Task(tr("Remove document"), TaskFlags(TaskFlag_NoRun) | TaskFlag_CancelOnSubtaskCancel), p(_p), saveModifiedDocs(_saveModifiedDocs), useGUI(_useGUI) { assert(!_docs.empty()); - assert(p!=NULL); + assert(p != NULL); foreach(Document* d, _docs) { docPtrs.append(d); @@ -51,7 +49,7 @@ void RemoveMultipleDocumentsTask::prepare() { if (p->isTreeItemModified() && saveModifiedDocs) { QList<Document*> docs; foreach(Document* d, docPtrs) { - if (d!=NULL) { + if (d != NULL) { docs.append(d); } } @@ -66,14 +64,14 @@ void RemoveMultipleDocumentsTask::prepare() { Task::ReportResult RemoveMultipleDocumentsTask::report() { - if (lock!=NULL) { + if (lock != NULL) { assert(!p.isNull()); p->unlockState(lock); delete lock; lock = NULL; Task* t = getSubtaskWithErrors(); - if (t!=NULL) { + if (t != NULL) { stateInfo.setError(t->getError()); return Task::ReportResult_Finished; } @@ -92,10 +90,10 @@ Task::ReportResult RemoveMultipleDocumentsTask::report() { } foreach(Document* doc, docPtrs) { - if ( doc != NULL ) { + if (doc != NULL) { // check for "stay-alive" locked objects - if ( doc->hasLocks(StateLockableTreeFlags_ItemAndChildren, StateLockFlag_LiveLock) ) { - setError( tr("Cannot remove document %1, since it is locked by some task.").arg(doc->getName()) ); + if (doc->hasLocks(StateLockableTreeFlags_ItemAndChildren, StateLockFlag_LiveLock)) { + setError(tr("Cannot remove document %1, since it is locked by some task.").arg(doc->getName())); continue; } else { p->removeDocument(doc); diff --git a/src/corelibs/U2Core/src/tasks/RemoveDocumentTask.h b/src/corelibs/U2Core/src/tasks/RemoveDocumentTask.h index 7cfd7a8ec4ac956501d1df8e99bf4b7c5c6246db..895e970a565295f00f04ac210f8903cd60f0fd5c 100644 --- a/src/corelibs/U2Core/src/tasks/RemoveDocumentTask.h +++ b/src/corelibs/U2Core/src/tasks/RemoveDocumentTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/ReverseSequenceTask.cpp b/src/corelibs/U2Core/src/tasks/ReverseSequenceTask.cpp index fba3ff818ed7fe7b5de81fea4e5b6a55fade7617..4297780d51514c0d7a8c4b467292ff652ed46515 100644 --- a/src/corelibs/U2Core/src/tasks/ReverseSequenceTask.cpp +++ b/src/corelibs/U2Core/src/tasks/ReverseSequenceTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/ReverseSequenceTask.h b/src/corelibs/U2Core/src/tasks/ReverseSequenceTask.h index b1166ff22705ea9c8720d67e5726ae412afc1774..0854f6d6b10554898f693a945ba63a847d92893e 100644 --- a/src/corelibs/U2Core/src/tasks/ReverseSequenceTask.h +++ b/src/corelibs/U2Core/src/tasks/ReverseSequenceTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/SaveDocumentStreamingTask.cpp b/src/corelibs/U2Core/src/tasks/SaveDocumentStreamingTask.cpp index 8e79f83bf0258e2b6516851708a8999d091ebce4..9ebe87425fe0efe236065faf9d7bf9b20659f6f9 100644 --- a/src/corelibs/U2Core/src/tasks/SaveDocumentStreamingTask.cpp +++ b/src/corelibs/U2Core/src/tasks/SaveDocumentStreamingTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/SaveDocumentStreamingTask.h b/src/corelibs/U2Core/src/tasks/SaveDocumentStreamingTask.h index 1eab2d7975942a272abbabdc7dbb01ca558a3ce7..7fc5e9e791f0628f9896720ca9df692baf6fd65c 100644 --- a/src/corelibs/U2Core/src/tasks/SaveDocumentStreamingTask.h +++ b/src/corelibs/U2Core/src/tasks/SaveDocumentStreamingTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/SaveDocumentTask.cpp b/src/corelibs/U2Core/src/tasks/SaveDocumentTask.cpp index 46177e1b4f659292ff4266dc8529559142196a8a..1f598f5c00ee799d2ff247ad3b4281d165286d71 100644 --- a/src/corelibs/U2Core/src/tasks/SaveDocumentTask.cpp +++ b/src/corelibs/U2Core/src/tasks/SaveDocumentTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,7 +30,6 @@ #include <U2Core/GHints.h> #include <U2Core/GObjectUtils.h> #include <U2Core/GUrlUtils.h> -#include <U2Core/IOAdapter.h> #include <U2Core/IOAdapterUtils.h> #include <U2Core/L10n.h> #include <U2Core/Log.h> @@ -52,9 +51,8 @@ bool isNoWritePermission(GUrl &url) { } SaveDocumentTask::SaveDocumentTask(Document* _doc, IOAdapterFactory* _io, const GUrl& _url, SaveDocFlags _flags) -: Task(tr("Save document"), TaskFlag_None), doc(_doc), iof(_io), url(_url), flags(_flags) -{ - assert(doc!=NULL); + : Task(tr("Save document"), TaskFlag_None), doc(_doc), iof(_io), url(_url), flags(_flags) { + assert(doc != NULL); if (iof == NULL) { iof = doc->getIOAdapterFactory(); } @@ -62,30 +60,29 @@ SaveDocumentTask::SaveDocumentTask(Document* _doc, IOAdapterFactory* _io, const url = doc->getURLString(); } if (isNoWritePermission(url)) { - stateInfo.setError(tr("No permission to write to '%1' file.").arg(url.fileName())); + stateInfo.setError(tr("No permission to write to '%1' file.").arg(url.getURLString())); } lock = NULL; } SaveDocumentTask::SaveDocumentTask(Document* _doc, SaveDocFlags f, const QSet<QString>& _excludeFileNames) -: Task(tr("Save document"), TaskFlag_None), -doc(_doc), iof(doc->getIOAdapterFactory()), url(doc->getURL()), flags(f), excludeFileNames(_excludeFileNames) -{ - assert(doc!=NULL); + : Task(tr("Save document"), TaskFlag_None), + doc(_doc), iof(doc->getIOAdapterFactory()), url(doc->getURL()), flags(f), excludeFileNames(_excludeFileNames) { + assert(doc != NULL); if (isNoWritePermission(url)) { - stateInfo.setError(tr("No permission to write to '%1' file.").arg(url.fileName())); + stateInfo.setError(tr("No permission to write to '%1' file.").arg(url.getURLString())); } } void SaveDocumentTask::addFlag(SaveDocFlag f) { - flags|=f; + flags |= f; } void SaveDocumentTask::prepare() { if (doc.isNull()) { - setError("Document was removed"); + setError(tr("Document was removed")); return; } lock = new StateLock(getTaskName(), StateLockFlag_LiveLock); @@ -106,17 +103,21 @@ void SaveDocumentTask::run() { DocumentFormat* df = doc->getDocumentFormat(); QString originalFilePath = url.getURLString(); - QFile originalFile( originalFilePath ); - const bool originalFileExists = ( url.isLocalFile( ) ) - ? originalFile.exists( ) && 0 != originalFile.size( ) + QFile originalFile(originalFilePath); + const bool originalFileExists = (url.isLocalFile()) + ? originalFile.exists() && 0 != originalFile.size() : false; if (originalFileExists && df->checkFlags(DocumentFormatFlag_DirectWriteOperations)) { // Changes are already applied, the file shouldn't be saved + coreLog.trace(QString("Document with 'direct write operations' flag saving: " + "file '%1' exists, all changes are already applied, finishing the task").arg(url.getURLString())); return; } if (url.isLocalFile() && originalFileExists) { + coreLog.trace(QString("Local file '%1' already exists, going to overwrite it").arg(url.getURLString())); + // make tmp file QString tmpFileName = GUrlUtils::prepareTmpFileLocation(url.dirPath(), url.fileName(), "tmp", stateInfo); @@ -150,6 +151,7 @@ void SaveDocumentTask::run() { bool renamed = QFile::rename(tmpFileName, originalFilePath); CHECK_EXT(renamed == true, stateInfo.setError(tr("Can't rename saved tmp file to original file")), ); } else { + coreLog.trace(QString("File '%1' doesn't exist, going to write it directly").arg(url.getURLString())); QScopedPointer<IOAdapter> io(IOAdapterUtils::open(url, stateInfo, flags.testFlag(SaveDoc_Append) ? IOAdapterMode_Append : IOAdapterMode_Write, doc->getIOAdapterFactory())); CHECK_OP(stateInfo, ); df->storeDocument(doc, io.data(), stateInfo); @@ -160,7 +162,7 @@ void SaveDocumentTask::run() { } Task::ReportResult SaveDocumentTask::report() { - if (lock!=NULL) { + if (lock != NULL) { assert(!doc.isNull()); doc->unlockState(lock); delete lock; @@ -180,11 +182,11 @@ Task::ReportResult SaveDocumentTask::report() { if (!dontUnload) { doc->unload(); } - CHECK( AppContext::getProject() != NULL, ReportResult_Finished); + CHECK(AppContext::getProject() != NULL, ReportResult_Finished); AppContext::getProject()->removeDocument(doc, true); } - if(flags.testFlag(SaveDoc_UnloadAfter)) { - if(!doc->unload()) { + if (flags.testFlag(SaveDoc_UnloadAfter)) { + if (!doc->unload()) { stateInfo.setError(tr("Document '%1' can't be unloaded: ").arg(doc->getName()) + tr("unexpected error")); coreLog.error(stateInfo.getError()); } @@ -203,11 +205,10 @@ Task::ReportResult SaveDocumentTask::report() { /// save multiple SaveMultipleDocuments::SaveMultipleDocuments(const QList<Document*>& docs, bool askBeforeSave, SavedNewDocFlag saveAndOpenFlag) -: Task(tr("Save multiple documents"), TaskFlag_NoRun) -{ + : Task(tr("Save multiple documents"), TaskFlag_NoRun) { bool saveAll = false; foreach(Document* doc, docs) { - bool save=true; + bool save = true; if (askBeforeSave) { QMessageBox::StandardButtons buttons = QMessageBox::StandardButtons(QMessageBox::Yes) | QMessageBox::No | QMessageBox::Cancel; if (docs.size() > 1) { @@ -215,10 +216,10 @@ SaveMultipleDocuments::SaveMultipleDocuments(const QList<Document*>& docs, bool } QObjectScopedPointer<QMessageBox> messageBox(new QMessageBox(QMessageBox::Question, - tr("Question?"), - tr("Save document: %1").arg(doc->getURLString()), - buttons, - QApplication::activeWindow())); + tr("Question?"), + tr("Save document: %1").arg(doc->getURLString()), + buttons, + QApplication::activeWindow())); messageBox->button(QMessageBox::Cancel)->hide(); int res = saveAll ? QMessageBox::YesToAll : messageBox->exec(); @@ -245,7 +246,7 @@ SaveMultipleDocuments::SaveMultipleDocuments(const QList<Document*>& docs, bool if (!url.isEmpty()) { if (saveAndOpenFlag == SavedNewDoc_Open) { addSubTask(new SaveDocumentTask(doc, doc->getIOAdapterFactory(), url, - SaveDocFlags(SaveDoc_Overwrite) | SaveDoc_DestroyAfter | SaveDoc_OpenAfter)); + SaveDocFlags(SaveDoc_Overwrite) | SaveDoc_DestroyAfter | SaveDoc_OpenAfter)); } else { addSubTask(new SaveDocumentTask(doc, doc->getIOAdapterFactory(), url)); } @@ -279,22 +280,22 @@ GUrl SaveMultipleDocuments::chooseAnotherUrl(Document* doc) { msgBox->setText(tr("You have no permission to write to '%1' file.\nUGENE contains unsaved modifications.").arg(doc->getURL().fileName())); msgBox->setInformativeText(tr("Do you want to save changes to another file?")); - QPushButton *saveButton = msgBox->addButton( QMessageBox::Save ); - msgBox->addButton( QMessageBox::Cancel ); + QPushButton *saveButton = msgBox->addButton(QMessageBox::Save); + msgBox->addButton(QMessageBox::Cancel); msgBox->setDefaultButton(saveButton); msgBox->setObjectName("permissionBox"); msgBox->exec(); CHECK(!msgBox.isNull(), url); if (msgBox->clickedButton() == saveButton) { - QString newFileUrl = GUrlUtils::rollFileName(doc->getURLString(), "_modified_", DocumentUtils::getNewDocFileNameExcludesHint( ) ); + QString newFileUrl = GUrlUtils::rollFileName(doc->getURLString(), "_modified_", DocumentUtils::getNewDocFileNameExcludesHint()); QString saveFileFilter = doc->getDocumentFormat()->getSupportedDocumentFileExtensions().join(" *.").prepend("*."); QWidget *activeWindow = qobject_cast<QWidget*>(QApplication::activeWindow()); QFileDialog::Options options; #if defined(Q_OS_MAC) | defined(Q_OS_WIN) if (qgetenv(ENV_GUI_TEST).toInt() == 1 && qgetenv(ENV_USE_NATIVE_DIALOGS).toInt() == 0) { options = QFileDialog::DontUseNativeDialog; - }else { + } else { options = 0; } #endif @@ -320,8 +321,7 @@ GUrl SaveMultipleDocuments::chooseAnotherUrl(Document* doc) { ////////////////////////////////////////////////////////////////////////// // save a copy and add to project SaveCopyAndAddToProjectTask::SaveCopyAndAddToProjectTask(Document* doc, IOAdapterFactory* iof, const GUrl& _url) -: Task (tr("Save a copy %1").arg(_url.getURLString()), TaskFlags_NR_FOSCOE), url(_url) -{ + : Task(tr("Save a copy %1").arg(_url.getURLString()), TaskFlags_NR_FOSCOE), url(_url) { origURL = doc->getURL(); df = doc->getDocumentFormat(); hints = doc->getGHintsMap(); @@ -360,9 +360,7 @@ Task::ReportResult SaveCopyAndAddToProjectTask::report() { // relocate task RelocateDocumentTask::RelocateDocumentTask(const GUrl& fu, const GUrl& tu) -: Task (tr("Relocate document %1 -> %2").arg(fu.getURLString()).arg(tu.getURLString()), TaskFlag_NoRun), fromURL(fu), toURL(tu) -{ -} + : Task(tr("Relocate document %1 -> %2").arg(fu.getURLString()).arg(tu.getURLString()), TaskFlag_NoRun), fromURL(fu), toURL(tu) {} Task::ReportResult RelocateDocumentTask::report() { Project* p = AppContext::getProject(); diff --git a/src/corelibs/U2Core/src/tasks/SaveDocumentTask.h b/src/corelibs/U2Core/src/tasks/SaveDocumentTask.h index 17026aa535fd10b9b98541c5b8486af9555a35a8..a48f28b741401d0288c8080d2dcd48e52b9d54ab 100644 --- a/src/corelibs/U2Core/src/tasks/SaveDocumentTask.h +++ b/src/corelibs/U2Core/src/tasks/SaveDocumentTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/ScriptTask.cpp b/src/corelibs/U2Core/src/tasks/ScriptTask.cpp index 8d6bf4db5e9b90887ae70027c22ba45723c5cf5b..597f2ddb244a2979127269a3601e481ec79bebcb 100644 --- a/src/corelibs/U2Core/src/tasks/ScriptTask.cpp +++ b/src/corelibs/U2Core/src/tasks/ScriptTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/ScriptTask.h b/src/corelibs/U2Core/src/tasks/ScriptTask.h index 377dd90cb57f4a8fe94a908481185d623aa411df..81ca96d4ab71d95a1423d6f43e9f4c0912e83439 100644 --- a/src/corelibs/U2Core/src/tasks/ScriptTask.h +++ b/src/corelibs/U2Core/src/tasks/ScriptTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/SequenceDbiWalkerTask.cpp b/src/corelibs/U2Core/src/tasks/SequenceDbiWalkerTask.cpp index 181914c46ca1e61199fe98ba1f2fbdcd095b39bb..48646638bb1f3d0ea4161fc6c113296ea67cb7e9 100644 --- a/src/corelibs/U2Core/src/tasks/SequenceDbiWalkerTask.cpp +++ b/src/corelibs/U2Core/src/tasks/SequenceDbiWalkerTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/SequenceDbiWalkerTask.h b/src/corelibs/U2Core/src/tasks/SequenceDbiWalkerTask.h index d911bf3edaf7580343299234efbc8d9144e4d167..150bef6c020c7a0e9a8becea29c9f79aa82aeb1f 100644 --- a/src/corelibs/U2Core/src/tasks/SequenceDbiWalkerTask.h +++ b/src/corelibs/U2Core/src/tasks/SequenceDbiWalkerTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,7 +23,6 @@ #define _U2_SEQUENCE_DBI_WALKER_TASK_H_ #include <U2Core/Task.h> -#include <U2Core/U2Region.h> #include <U2Core/U2Type.h> #include "SequenceWalkerTask.h" @@ -39,14 +38,14 @@ public: class U2CORE_EXPORT SequenceDbiWalkerCallback { public: - virtual ~SequenceDbiWalkerCallback(){} + virtual ~SequenceDbiWalkerCallback() {} virtual void onRegion(SequenceDbiWalkerSubtask* t, TaskStateInfo& ti) = 0; /* implement this to give SequenceDbiWalkerSubtask required resources * here are resources for ONE(!) SequenceDbiWalkerSubtask execution e.g. for one execution of onRegion function */ - virtual QList< TaskResourceUsage > getResources( SequenceDbiWalkerSubtask * t ) {Q_UNUSED(t); return QList< TaskResourceUsage >(); } + virtual QList< TaskResourceUsage > getResources(SequenceDbiWalkerSubtask * t) { Q_UNUSED(t); return QList< TaskResourceUsage >(); } }; class U2CORE_EXPORT SequenceDbiWalkerTask : public Task { @@ -55,13 +54,13 @@ public: SequenceDbiWalkerTask(const SequenceDbiWalkerConfig& config, SequenceDbiWalkerCallback* callback, const QString& name, TaskFlags tf = TaskFlags_NR_FOSE_COSC); - SequenceDbiWalkerCallback* getCallback() const {return callback;} - const SequenceDbiWalkerConfig& getConfig() const {return config;} + SequenceDbiWalkerCallback* getCallback() const { return callback; } + const SequenceDbiWalkerConfig& getConfig() const { return config; } // reverseMode - start splitting from the end of the range static QVector<U2Region> splitRange(const U2Region& range, int chunkSize, int overlapSize, int lastChunkExtraLen, bool reverseMode); - void setError(const QString& err) {stateInfo.setError(err);} + void setError(const QString& err) { stateInfo.setError(err); } private: QList<SequenceDbiWalkerSubtask*> prepareSubtasks(); @@ -75,7 +74,7 @@ class U2CORE_EXPORT SequenceDbiWalkerSubtask : public Task { Q_OBJECT public: SequenceDbiWalkerSubtask(SequenceDbiWalkerTask* t, const U2Region& globalReg, bool lo, bool ro, - const U2EntityRef& seqRef, int localLen, bool doCompl, bool doAmino); + const U2EntityRef& seqRef, int localLen, bool doCompl, bool doAmino); void run(); @@ -83,20 +82,20 @@ public: int getRegionSequenceLen(); - bool isDNAComplemented() const {return doCompl;} + bool isDNAComplemented() const { return doCompl; } - bool isAminoTranslated() const {return doAmino;} + bool isAminoTranslated() const { return doAmino; } - U2Region getGlobalRegion() const {return globalRegion;} + U2Region getGlobalRegion() const { return globalRegion; } - const SequenceDbiWalkerConfig& getGlobalConfig() const {return t->getConfig();} + const SequenceDbiWalkerConfig& getGlobalConfig() const { return t->getConfig(); } bool intersectsWithOverlaps(const U2Region& globalReg) const; - bool hasLeftOverlap() const {return leftOverlap;} - bool hasRightOverlap() const {return rightOverlap;} + bool hasLeftOverlap() const { return leftOverlap; } + bool hasRightOverlap() const { return rightOverlap; } private: - bool needLocalRegionProcessing() const {return (doAmino || doCompl) && processedSeqImage.isEmpty();} + bool needLocalRegionProcessing() const { return (doAmino || doCompl) && processedSeqImage.isEmpty(); } void prepareLocalRegion(); SequenceDbiWalkerTask* t; diff --git a/src/corelibs/U2Core/src/tasks/SequenceWalkerTask.cpp b/src/corelibs/U2Core/src/tasks/SequenceWalkerTask.cpp index 18f10d2a224d20a19cff44c6ba4f20efd16d3d8d..f261fd3aaeac0e94b7a5add1cfa5fee7a87b5a25 100644 --- a/src/corelibs/U2Core/src/tasks/SequenceWalkerTask.cpp +++ b/src/corelibs/U2Core/src/tasks/SequenceWalkerTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/SequenceWalkerTask.h b/src/corelibs/U2Core/src/tasks/SequenceWalkerTask.h index 90459a3364d7e9e77e9ec73d00582e0a78cb4159..0c4d22d598e75381aa8f61d2d68eba4a4c049e22 100644 --- a/src/corelibs/U2Core/src/tasks/SequenceWalkerTask.h +++ b/src/corelibs/U2Core/src/tasks/SequenceWalkerTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/TLSTask.cpp b/src/corelibs/U2Core/src/tasks/TLSTask.cpp index c507ab89b212a8dff4045bee6f78f25f826a71cb..b4cfa45536a807a4b0cc3a9cd0dfbe3012785036 100644 --- a/src/corelibs/U2Core/src/tasks/TLSTask.cpp +++ b/src/corelibs/U2Core/src/tasks/TLSTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/TLSTask.h b/src/corelibs/U2Core/src/tasks/TLSTask.h index 010a00ded279e472930e1730bfbd286f0891b0c5..37cb7eb56d4318d25342cd5390f207c771d4d3c6 100644 --- a/src/corelibs/U2Core/src/tasks/TLSTask.h +++ b/src/corelibs/U2Core/src/tasks/TLSTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/TaskSignalMapper.cpp b/src/corelibs/U2Core/src/tasks/TaskSignalMapper.cpp index 5b524aad29f0eacc27fd5930c3857a0cb6311cf0..76842f450a1eb66de01238c7e9130a2f77e13313 100644 --- a/src/corelibs/U2Core/src/tasks/TaskSignalMapper.cpp +++ b/src/corelibs/U2Core/src/tasks/TaskSignalMapper.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/TaskSignalMapper.h b/src/corelibs/U2Core/src/tasks/TaskSignalMapper.h index 9ca2480fa6b1746165e2e2a22aa91a699db507dc..9209a5b6980b4fd2c1456848f5abe0c4a07bbe3f 100644 --- a/src/corelibs/U2Core/src/tasks/TaskSignalMapper.h +++ b/src/corelibs/U2Core/src/tasks/TaskSignalMapper.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/TaskStarter.cpp b/src/corelibs/U2Core/src/tasks/TaskStarter.cpp index 86d0d8deffe624ff1712edb6203092ba70fcbf83..31f01f2925e6693572d9d567164a16ad1cb098a9 100644 --- a/src/corelibs/U2Core/src/tasks/TaskStarter.cpp +++ b/src/corelibs/U2Core/src/tasks/TaskStarter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/TaskStarter.h b/src/corelibs/U2Core/src/tasks/TaskStarter.h index da04ae1dcc072fff15e09323f7f31d9d25893f18..cc62a44a26ffb9fc8d8b270274bd72ba8322828c 100644 --- a/src/corelibs/U2Core/src/tasks/TaskStarter.h +++ b/src/corelibs/U2Core/src/tasks/TaskStarter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/TmpDirChecker.cpp b/src/corelibs/U2Core/src/tasks/TmpDirChecker.cpp index f542b8f29e0ad3f6fb557cff567a3aac670146a5..ffa439a3158e40d6228e4faaaae4a56e226879d0 100644 --- a/src/corelibs/U2Core/src/tasks/TmpDirChecker.cpp +++ b/src/corelibs/U2Core/src/tasks/TmpDirChecker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/TmpDirChecker.h b/src/corelibs/U2Core/src/tasks/TmpDirChecker.h index f7f497e0f325b3d5a2c444482c1ba6f8f5e35dd1..2b44002209a594c4e92d6648067f16df03e3a153 100644 --- a/src/corelibs/U2Core/src/tasks/TmpDirChecker.h +++ b/src/corelibs/U2Core/src/tasks/TmpDirChecker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/shared_db/ImportDirToDatabaseTask.cpp b/src/corelibs/U2Core/src/tasks/shared_db/ImportDirToDatabaseTask.cpp index 20e10c70b7a580c16f66361ce86f745d416ab767..57bd6037151fba8d119aab34bc27efca29da0825 100644 --- a/src/corelibs/U2Core/src/tasks/shared_db/ImportDirToDatabaseTask.cpp +++ b/src/corelibs/U2Core/src/tasks/shared_db/ImportDirToDatabaseTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/shared_db/ImportDirToDatabaseTask.h b/src/corelibs/U2Core/src/tasks/shared_db/ImportDirToDatabaseTask.h index e8a3479feefe408b30b44b7811928439aef7198f..4d4a2e93658faf495d329886f69ee775ab63f77a 100644 --- a/src/corelibs/U2Core/src/tasks/shared_db/ImportDirToDatabaseTask.h +++ b/src/corelibs/U2Core/src/tasks/shared_db/ImportDirToDatabaseTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/shared_db/ImportDocumentToDatabaseTask.cpp b/src/corelibs/U2Core/src/tasks/shared_db/ImportDocumentToDatabaseTask.cpp index 43b188bd0e1361bc42031620690d73d7ab5c45c3..147e939f870feda71f9e17ce79b02f00bb402d21 100644 --- a/src/corelibs/U2Core/src/tasks/shared_db/ImportDocumentToDatabaseTask.cpp +++ b/src/corelibs/U2Core/src/tasks/shared_db/ImportDocumentToDatabaseTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -20,7 +20,6 @@ */ #include <U2Core/Counter.h> -#include <U2Core/DocumentModel.h> #include <U2Core/Folder.h> #include <U2Core/U2DbiUtils.h> #include <U2Core/U2ObjectDbi.h> @@ -32,12 +31,11 @@ namespace U2 { ImportDocumentToDatabaseTask::ImportDocumentToDatabaseTask(Document* document, const U2DbiRef& dstDbiRef, const QString& dstFolder, const ImportToDatabaseOptions& options) : - Task(tr("Import document %1 to the database").arg(NULL != document ? document->getName() : ""), TaskFlag_NoRun), - document(document), - dstDbiRef(dstDbiRef), - dstFolder(dstFolder), - options(options) -{ +Task(tr("Import document %1 to the database").arg(NULL != document ? document->getName() : ""), TaskFlag_NoRun), +document(document), +dstDbiRef(dstDbiRef), +dstFolder(dstFolder), +options(options) { GCOUNTER(cvar, tvar, "ImportDocumentToDatabaseTask"); CHECK_EXT(NULL != document, setError(tr("Invalid document to import")), ); CHECK_EXT(dstDbiRef.isValid(), setError(tr("Invalid database reference")), ); @@ -50,7 +48,7 @@ ImportDocumentToDatabaseTask::ImportDocumentToDatabaseTask(Document* document, c } void ImportDocumentToDatabaseTask::prepare() { - foreach (GObject* object, document->getObjects()) { + foreach(GObject* object, document->getObjects()) { addSubTask(new ImportObjectToDatabaseTask(object, dstDbiRef, dstFolder)); } } @@ -89,7 +87,7 @@ Document *ImportDocumentToDatabaseTask::getSourceDocument() const { QStringList ImportDocumentToDatabaseTask::getImportedObjectNames() const { QStringList result; const QMap<GObject *, GObject *> objects = getObjectPairs(); - foreach (GObject* object, objects) { + foreach(GObject* object, objects) { result << object->getGObjectName(); } @@ -98,7 +96,7 @@ QStringList ImportDocumentToDatabaseTask::getImportedObjectNames() const { QStringList ImportDocumentToDatabaseTask::getSkippedObjectNames() const { QStringList result; - foreach (Task* subtask, getSubtasks()) { + foreach(const QPointer<Task> &subtask, getSubtasks()) { if (subtask->isCanceled() || subtask->hasError()) { ImportObjectToDatabaseTask* importObjectTask = qobject_cast<ImportObjectToDatabaseTask*>(subtask); if (NULL != importObjectTask) { @@ -127,7 +125,7 @@ QSet<GObject *> ImportDocumentToDatabaseTask::getImportedObjects() const { QMap<GObject *, GObject *> ImportDocumentToDatabaseTask::getObjectPairs() const { QMap<GObject *, GObject *> objects; - foreach (Task* subtask, getSubtasks()) { + foreach(const QPointer<Task> &subtask, getSubtasks()) { if (!subtask->isCanceled() && !subtask->hasError()) { ImportObjectToDatabaseTask* importObjectTask = qobject_cast<ImportObjectToDatabaseTask*>(subtask); if (NULL != importObjectTask) { @@ -152,7 +150,7 @@ void ImportDocumentToDatabaseTask::propagateObjectsRelations(QStringList& errors dstObject->setObjectRelations(QList<GObjectRelation>()); QList<GObjectRelation> relations = srcObject->getObjectRelations(); - foreach (const GObjectRelation& relation, relations) { + foreach(const GObjectRelation& relation, relations) { if (srcDocUrl != relation.getDocURL()) { // skip this relation: target object is not imported to the database continue; @@ -170,9 +168,9 @@ void ImportDocumentToDatabaseTask::propagateObjectsRelations(QStringList& errors GObject* dstRelationTargetObject = objects.value(srcRelationTargetObject); GObjectReference dstReference(U2DbiUtils::ref2Url(dstDbiRef), - dstRelationTargetObject->getGObjectName(), - dstRelationTargetObject->getGObjectType(), - dstRelationTargetObject->getEntityRef()); + dstRelationTargetObject->getGObjectName(), + dstRelationTargetObject->getGObjectType(), + dstRelationTargetObject->getEntityRef()); GObjectRelation dstRelation(dstReference, relation.role); dstObject->addObjectRelation(dstRelation); } @@ -182,7 +180,7 @@ void ImportDocumentToDatabaseTask::propagateObjectsRelations(QStringList& errors GObject *ImportDocumentToDatabaseTask::getAppropriateObject(const QList<GObject *> objects, const GObject *pattern) { CHECK(NULL != pattern, NULL); - foreach (GObject* object, objects) { + foreach(GObject* object, objects) { if (object->getGObjectName() == pattern->getGObjectName() && object->getGObjectType() == pattern->getGObjectType()) { return object; diff --git a/src/corelibs/U2Core/src/tasks/shared_db/ImportDocumentToDatabaseTask.h b/src/corelibs/U2Core/src/tasks/shared_db/ImportDocumentToDatabaseTask.h index e6aa286a2b0c745e3b28c1f208d22067936fd719..0c273819998dc0208574c400cfabe91f17b4f659 100644 --- a/src/corelibs/U2Core/src/tasks/shared_db/ImportDocumentToDatabaseTask.h +++ b/src/corelibs/U2Core/src/tasks/shared_db/ImportDocumentToDatabaseTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/shared_db/ImportFileToDatabaseTask.cpp b/src/corelibs/U2Core/src/tasks/shared_db/ImportFileToDatabaseTask.cpp index 1c7c6ff5a6addd30d4e1396cfc830ca87472ff59..9119c074fe17657984a32feae23fc75e3775f7d3 100644 --- a/src/corelibs/U2Core/src/tasks/shared_db/ImportFileToDatabaseTask.cpp +++ b/src/corelibs/U2Core/src/tasks/shared_db/ImportFileToDatabaseTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,7 +26,6 @@ #include <U2Core/DocumentImport.h> #include <U2Core/DocumentProviderTask.h> #include <U2Core/GUrl.h> -#include <U2Core/IOAdapter.h> #include <U2Core/IOAdapterUtils.h> #include <U2Core/ProjectModel.h> #include <U2Core/U2DbiUtils.h> @@ -34,20 +33,17 @@ #include <U2Core/U2OpStatusUtils.h> #include <U2Core/U2SafePoints.h> -#include <U2Gui/ProjectView.h> - #include "ImportFileToDatabaseTask.h" namespace U2 { ImportFileToDatabaseTask::ImportFileToDatabaseTask(const QString& srcUrl, const U2DbiRef& dstDbiRef, const QString& dstFolder, const ImportToDatabaseOptions& options) : - Task(tr("Import file %1 to the database").arg(QFileInfo(srcUrl).fileName()), TaskFlags_FOSE_COSC), - srcUrl(srcUrl), - dstDbiRef(dstDbiRef), - dstFolder(dstFolder), - options(options), - format(NULL) -{ +Task(tr("Import file %1 to the database").arg(QFileInfo(srcUrl).fileName()), TaskFlags_FOSE_COSC), +srcUrl(srcUrl), +dstDbiRef(dstDbiRef), +dstFolder(dstFolder), +options(options), +format(NULL) { GCOUNTER(cvar, tvar, "ImportFileToDatabaseTask"); CHECK_EXT(QFileInfo(srcUrl).isFile(), setError(tr("It is not a file: ") + srcUrl), ); CHECK_EXT(dstDbiRef.isValid(), setError(tr("Invalid database reference")), ); @@ -122,15 +118,15 @@ QVariantMap ImportFileToDatabaseTask::prepareHints() const { hints[DocumentFormat::DEEP_COPY_OBJECT] = true; switch (options.multiSequencePolicy) { - case ImportToDatabaseOptions::SEPARATE: - // do nothing, it is a standard behavior - break; - case ImportToDatabaseOptions::MERGE: - hints[DocumentReadingMode_SequenceMergeGapSize] = options.mergeMultiSequencePolicySeparatorSize; - break; - case ImportToDatabaseOptions::MALIGNMENT: - hints[DocumentReadingMode_SequenceAsAlignmentHint] = true; - break; + case ImportToDatabaseOptions::SEPARATE: + // do nothing, it is a standard behavior + break; + case ImportToDatabaseOptions::MERGE: + hints[DocumentReadingMode_SequenceMergeGapSize] = options.mergeMultiSequencePolicySeparatorSize; + break; + case ImportToDatabaseOptions::MALIGNMENT: + hints[DocumentReadingMode_SequenceAsAlignmentHint] = true; + break; }; return hints; @@ -160,7 +156,7 @@ FormatDetectionResult ImportFileToDatabaseTask::getPreferredFormat(const QList<F CHECK(!options.preferredFormats.isEmpty(), detectedFormats.first()); QStringList detectedFormatIds; - foreach (const FormatDetectionResult &detectedFormat, detectedFormats) { + foreach(const FormatDetectionResult &detectedFormat, detectedFormats) { if (NULL != detectedFormat.format) { detectedFormatIds << detectedFormat.format->getFormatId(); } else if (NULL != detectedFormat.importer) { @@ -170,7 +166,7 @@ FormatDetectionResult ImportFileToDatabaseTask::getPreferredFormat(const QList<F } } - foreach (const QString &formatId, options.preferredFormats) { + foreach(const QString &formatId, options.preferredFormats) { int i = detectedFormatIds.indexOf(formatId); if (i >= 0) { return detectedFormats[i]; diff --git a/src/corelibs/U2Core/src/tasks/shared_db/ImportFileToDatabaseTask.h b/src/corelibs/U2Core/src/tasks/shared_db/ImportFileToDatabaseTask.h index f15535319a278cd213adda4de7fbbbcf304840e6..bccf2976febdf3c4bcd49c651fc95faa8fb01634 100644 --- a/src/corelibs/U2Core/src/tasks/shared_db/ImportFileToDatabaseTask.h +++ b/src/corelibs/U2Core/src/tasks/shared_db/ImportFileToDatabaseTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/shared_db/ImportObjectToDatabaseTask.cpp b/src/corelibs/U2Core/src/tasks/shared_db/ImportObjectToDatabaseTask.cpp index f240930a9b578ec89ceef716b833be4f255a7189..a58258a98369726bdd713d3863dd13bfe5bcbc41 100644 --- a/src/corelibs/U2Core/src/tasks/shared_db/ImportObjectToDatabaseTask.cpp +++ b/src/corelibs/U2Core/src/tasks/shared_db/ImportObjectToDatabaseTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,8 +19,6 @@ * MA 02110-1301, USA. */ -#include <QCoreApplication> - #include <U2Core/Counter.h> #include <U2Core/DocumentModel.h> #include <U2Core/U2SafePoints.h> @@ -32,12 +30,11 @@ namespace U2 { ImportObjectToDatabaseTask::ImportObjectToDatabaseTask(GObject* object, const U2DbiRef& dstDbiRef, const QString& dstFolder) : - Task(tr("Import object %1 to database").arg(NULL != object ? object->getGObjectName() : ""), TaskFlag_None), - object(object), - dstDbiRef(dstDbiRef), - dstFolder(dstFolder), - dstObject(NULL) -{ +Task(tr("Import object %1 to database").arg(NULL != object ? object->getGObjectName() : ""), TaskFlag_None), +object(object), +dstDbiRef(dstDbiRef), +dstFolder(dstFolder), +dstObject(NULL) { GCOUNTER(cvar, tvar, "ImportObjectToDatabaseTask"); CHECK_EXT(NULL != object, setError(tr("Invalid object to import")), ); CHECK_EXT(dstDbiRef.isValid(), setError(tr("Invalid database reference")), ); diff --git a/src/corelibs/U2Core/src/tasks/shared_db/ImportObjectToDatabaseTask.h b/src/corelibs/U2Core/src/tasks/shared_db/ImportObjectToDatabaseTask.h index e69ee0a6f7663f0041b28a58e26401217a27f3ae..f2c23b3337851e5c1b3028ca7f8d7284fe63b887 100644 --- a/src/corelibs/U2Core/src/tasks/shared_db/ImportObjectToDatabaseTask.h +++ b/src/corelibs/U2Core/src/tasks/shared_db/ImportObjectToDatabaseTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/tasks/shared_db/ImportToDatabaseTask.cpp b/src/corelibs/U2Core/src/tasks/shared_db/ImportToDatabaseTask.cpp index 937965407456f459995045e1ffdf3e31605cd85f..7a02b5beb1e8fba0936a83364d226e21b360791a 100644 --- a/src/corelibs/U2Core/src/tasks/shared_db/ImportToDatabaseTask.cpp +++ b/src/corelibs/U2Core/src/tasks/shared_db/ImportToDatabaseTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -54,11 +54,11 @@ Task::ReportResult ImportToDatabaseTask::report() { } void ImportToDatabaseTask::sortSubtasks() const { - foreach (Task* subtask, getSubtasks()) { - ImportDirToDatabaseTask* dirSubtask = qobject_cast<ImportDirToDatabaseTask*>(subtask); - ImportDocumentToDatabaseTask* documentSubtask = qobject_cast<ImportDocumentToDatabaseTask*>(subtask); - ImportFileToDatabaseTask* fileSubtask = qobject_cast<ImportFileToDatabaseTask*>(subtask); - ImportObjectToDatabaseTask* objectSubtask = qobject_cast<ImportObjectToDatabaseTask*>(subtask); + foreach (const QPointer<Task> &subtask, getSubtasks()) { + ImportDirToDatabaseTask* dirSubtask = qobject_cast<ImportDirToDatabaseTask*>(subtask.data()); + ImportDocumentToDatabaseTask* documentSubtask = qobject_cast<ImportDocumentToDatabaseTask*>(subtask.data()); + ImportFileToDatabaseTask* fileSubtask = qobject_cast<ImportFileToDatabaseTask*>(subtask.data()); + ImportObjectToDatabaseTask* objectSubtask = qobject_cast<ImportObjectToDatabaseTask*>(subtask.data()); if (NULL != dirSubtask) { dirSubtasks << dirSubtask; diff --git a/src/corelibs/U2Core/src/tasks/shared_db/ImportToDatabaseTask.h b/src/corelibs/U2Core/src/tasks/shared_db/ImportToDatabaseTask.h index 0248c88599b75cd9611fc9150d326582693b2552..64240d889cd39a363255444cbd4962789b4bb289 100644 --- a/src/corelibs/U2Core/src/tasks/shared_db/ImportToDatabaseTask.h +++ b/src/corelibs/U2Core/src/tasks/shared_db/ImportToDatabaseTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/AnnotationCreationPattern.cpp b/src/corelibs/U2Core/src/util/AnnotationCreationPattern.cpp index 8a54b67d3c987d6219921606f23176a03d945636..e05694834a6a9aba4eb6aa99c17f3f0538666345 100644 --- a/src/corelibs/U2Core/src/util/AnnotationCreationPattern.cpp +++ b/src/corelibs/U2Core/src/util/AnnotationCreationPattern.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/AnnotationCreationPattern.h b/src/corelibs/U2Core/src/util/AnnotationCreationPattern.h index fc94f3fbade3943eecdb5bc6ec1b704e4b1dba8d..4511b1e8203416a9d2351e99a5e162c09e98d99c 100644 --- a/src/corelibs/U2Core/src/util/AnnotationCreationPattern.h +++ b/src/corelibs/U2Core/src/util/AnnotationCreationPattern.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/AssemblyImporter.cpp b/src/corelibs/U2Core/src/util/AssemblyImporter.cpp index 039983bac26240cda4b70675f6f812b7dea2ad5f..058e137bee189163c9e50f4005a176da2e4a9733 100644 --- a/src/corelibs/U2Core/src/util/AssemblyImporter.cpp +++ b/src/corelibs/U2Core/src/util/AssemblyImporter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -125,7 +125,7 @@ void AssemblyImporter::finalizeAssembly() { SAFE_POINT_OP(innerOs, ); if (connection.dbi->isTransactionActive()) { - coreLog.trace("Assembly finalization inside a transaction occured: there can be some troubles"); + coreLog.trace("Assembly finalization inside a transaction occurred: there can be some troubles"); Q_ASSERT(false); } diff --git a/src/corelibs/U2Core/src/util/AssemblyImporter.h b/src/corelibs/U2Core/src/util/AssemblyImporter.h index d22600b015061d7742d24cbe90761687a2df3a38..dc6637404f2ee3413ed2a16a03b6e3177ce09552 100644 --- a/src/corelibs/U2Core/src/util/AssemblyImporter.h +++ b/src/corelibs/U2Core/src/util/AssemblyImporter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/ChromatogramUtils.cpp b/src/corelibs/U2Core/src/util/ChromatogramUtils.cpp index f0cf200c67c807436f74f9f123a122883192c0b6..23a0ce6411240adc66b94a9bc0ce0f9b91bdaa81 100644 --- a/src/corelibs/U2Core/src/util/ChromatogramUtils.cpp +++ b/src/corelibs/U2Core/src/util/ChromatogramUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -20,8 +20,6 @@ */ #include <U2Core/DatatypeSerializeUtils.h> -#include <U2Core/DbiConnection.h> -#include <U2Core/DNAChromatogramObject.h> #include <U2Core/Log.h> #include <U2Core/L10n.h> #include <U2Core/RawDataUdrSchema.h> @@ -69,7 +67,7 @@ void ChromatogramUtils::removeBaseCalls(U2OpStatus &os, DNAChromatogram &chromat void ChromatogramUtils::removeRegion(U2OpStatus &os, DNAChromatogram &chromatogram, int startPos, int endPos) { if ((endPos <= startPos) || (startPos < 0) || (endPos > chromatogram.seqLength)) { coreLog.trace(L10N::internalError("incorrect parameters were passed to ChromatogramUtils::removeRegion, " - "startPos '%1', endPos '%2', chromatogram sequence length '%3'").arg(startPos).arg(endPos).arg(chromatogram.seqLength)); + "startPos '%1', endPos '%2', chromatogram sequence length '%3'").arg(startPos).arg(endPos).arg(chromatogram.seqLength)); os.setError("Can't remove current region"); return; } @@ -100,17 +98,17 @@ void ChromatogramUtils::removeRegion(U2OpStatus &os, DNAChromatogram &chromatogr bool ChromatogramUtils::areEqual(const DNAChromatogram &first, const DNAChromatogram &second) { return first.traceLength == second.traceLength && - first.seqLength == second.seqLength && - first.baseCalls == second.baseCalls && - first.A == second.A && - first.C == second.C && - first.G == second.G && - first.T == second.T && - first.prob_A == second.prob_A && - first.prob_C == second.prob_C && - first.prob_G == second.prob_G && - first.prob_T == second.prob_T && - first.hasQV == second.hasQV; + first.seqLength == second.seqLength && + first.baseCalls == second.baseCalls && + first.A == second.A && + first.C == second.C && + first.G == second.G && + first.T == second.T && + first.prob_A == second.prob_A && + first.prob_C == second.prob_C && + first.prob_G == second.prob_G && + first.prob_T == second.prob_T && + first.hasQV == second.hasQV; } namespace { @@ -187,7 +185,7 @@ void ChromatogramUtils::updateChromatogramData(U2OpStatus &os, const U2EntityRef } void ChromatogramUtils::updateChromatogramData(U2OpStatus &os, const U2DataId& masterId, - const U2EntityRef &chromatogramRef, const DNAChromatogram &chromatogram) { + const U2EntityRef &chromatogramRef, const DNAChromatogram &chromatogram) { const QByteArray data = DNAChromatogramSerializer::serialize(chromatogram); RawDataUdrSchema::writeContent(masterId, data, chromatogramRef, os); @@ -202,7 +200,7 @@ U2EntityRef ChromatogramUtils::getChromatogramIdByRelatedSequenceId(U2OpStatus & CHECK_OP(os, U2EntityRef()); QList<U2DataId> chromatogramsIds; - foreach (const U2DataId &dataId, relatedObjects) { + foreach(const U2DataId &dataId, relatedObjects) { if (U2Type::Chromatogram != U2DbiUtils::toType(dataId)) { continue; } @@ -276,8 +274,8 @@ DNAChromatogram ChromatogramUtils::reverseComplement(const DNAChromatogram &chro U2Region ChromatogramUtils::sequenceRegion2TraceRegion(const DNAChromatogram &chromatogram, const U2Region &sequenceRegion) { CHECK(sequenceRegion.startPos <= chromatogram.baseCalls.length() - && sequenceRegion.endPos() <= chromatogram.baseCalls.length() - && 0 < sequenceRegion.length, U2Region()); + && sequenceRegion.endPos() <= chromatogram.baseCalls.length() + && 0 < sequenceRegion.length, U2Region()); const int traceStartPos = sequenceRegion.startPos == 0 ? 0 : chromatogram.baseCalls[sequenceRegion.startPos - 1]; const int traceLength = chromatogram.baseCalls[sequenceRegion.endPos() - 1] - traceStartPos + 1; @@ -285,10 +283,10 @@ U2Region ChromatogramUtils::sequenceRegion2TraceRegion(const DNAChromatogram &ch } void ChromatogramUtils::insertBase(DNAChromatogram &chromatogram, int posUngapped, - const QList<U2MsaGap>& gapModel, int posWithGaps) { + const QList<U2MsaGap>& gapModel, int posWithGaps) { SAFE_POINT(posUngapped >= 0 && posUngapped < chromatogram.seqLength, - QString("Invalid parameters for ChromatogramUtils::insertBase: pos - %1, chrom.sequence len - %2") - .arg(posUngapped).arg(chromatogram.seqLength), ); + QString("Invalid parameters for ChromatogramUtils::insertBase: pos - %1, chrom.sequence len - %2") + .arg(posUngapped).arg(chromatogram.seqLength), ); int leadingGap = gapModel.isEmpty() ? 0 : gapModel.first().offset == 0 ? gapModel.first().gap : 0; DNAChromatogram gappedChrom = getGappedChromatogram(chromatogram, gapModel); @@ -298,9 +296,9 @@ void ChromatogramUtils::insertBase(DNAChromatogram &chromatogram, int posUngappe if (posWithGaps - leadingGap == -1) { leadingGap--; } - SAFE_POINT(posWithGaps- leadingGap >= 0 && posWithGaps - leadingGap < gappedChrom.seqLength, - QString("Incorrect gapped position for ChromatogramUtils::insertBase: pos - %1, gapped chrom.len - %2") - .arg(posWithGaps).arg(gappedChrom.seqLength), ); + SAFE_POINT(posWithGaps - leadingGap >= 0 && posWithGaps - leadingGap < gappedChrom.seqLength, + QString("Incorrect gapped position for ChromatogramUtils::insertBase: pos - %1, gapped chrom.len - %2") + .arg(posWithGaps).arg(gappedChrom.seqLength), ); ushort newTracePos = gappedChrom.baseCalls[posWithGaps - leadingGap]; chromatogram.baseCalls.insert(posUngapped, newTracePos); @@ -315,7 +313,7 @@ void ChromatogramUtils::insertBase(DNAChromatogram &chromatogram, int posUngappe DNAChromatogram ChromatogramUtils::getGappedChromatogram(const DNAChromatogram &chromatogram, const QList<U2MsaGap> &gapModel) { DNAChromatogram gappedChromatogram = chromatogram; const U2MsaGap leadingGap = gapModel.isEmpty() ? U2MsaGap() : gapModel.first().offset == 0 ? gapModel.first() : U2MsaGap(); - foreach (const U2MsaGap &gap, gapModel) { + foreach(const U2MsaGap &gap, gapModel) { if (gap.offset == 0) { continue; } diff --git a/src/corelibs/U2Core/src/util/ChromatogramUtils.h b/src/corelibs/U2Core/src/util/ChromatogramUtils.h index 4f10ec23adf0c8e0716776f95b8ab79c7915f480..43584c310200be8fe3d227c38f8588ef4aa89183 100644 --- a/src/corelibs/U2Core/src/util/ChromatogramUtils.h +++ b/src/corelibs/U2Core/src/util/ChromatogramUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/DatatypeSerializeUtils.cpp b/src/corelibs/U2Core/src/util/DatatypeSerializeUtils.cpp index 15c909aed21efcfdcbec7c6c8395595a792731d0..ddf9102769be56f2408822c641011f32a463b5a4 100644 --- a/src/corelibs/U2Core/src/util/DatatypeSerializeUtils.cpp +++ b/src/corelibs/U2Core/src/util/DatatypeSerializeUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -20,7 +20,6 @@ */ #include <QBitArray> -#include <QHash> #include <QStack> #include <QtEndian> @@ -42,105 +41,105 @@ const QString FMatrixSerializer::ID = "fm_1.14"; if (offset + size > length) { \ os.setError("The data are too short"); \ return result; \ - } + } namespace { - template<class T> - inline QByteArray packNum(const T &num) { - T leNum = qToLittleEndian<T>(num); - return QByteArray((char*)&leNum, sizeof(T)); - } - template<> - inline QByteArray packNum(const double &num) { - QByteArray numStr = QByteArray::number(num); - return packNum<int>(numStr.size()) + numStr; - } - template<> - inline QByteArray packNum(const float &num) { - QByteArray numStr = QByteArray::number(num); - return packNum<int>(numStr.size()) + numStr; - } - template<class T> - inline T unpackNum(const uchar *data, int length, int &offset, U2OpStatus &os) { - CHECK_SIZE(int(sizeof(T)), T()); - T result = qFromLittleEndian<T>(data + offset); - offset += sizeof(T); - return result; - } - inline QByteArray unpackReal(const uchar *data, int length, int &offset, U2OpStatus &os) { - int size = unpackNum<int>(data, length, offset, os); - CHECK_OP(os, ""); - CHECK_SIZE(size, ""); - QByteArray result((const char*)data + offset, size); - offset += size; - return result; - } - template<> - inline double unpackNum(const uchar *data, int length, int &offset, U2OpStatus &os) { - QByteArray numStr = unpackReal(data, length, offset, os); - CHECK_OP(os, 0.0); - return numStr.toDouble(); - } - template<> - inline float unpackNum(const uchar *data, int length, int &offset, U2OpStatus &os) { - QByteArray numStr = unpackReal(data, length, offset, os); - CHECK_OP(os, 0.0f); - return numStr.toFloat(); - } +template<class T> +inline QByteArray packNum(const T &num) { + T leNum = qToLittleEndian<T>(num); + return QByteArray((char*)&leNum, sizeof(T)); +} +template<> +inline QByteArray packNum(const double &num) { + QByteArray numStr = QByteArray::number(num); + return packNum<int>(numStr.size()) + numStr; +} +template<> +inline QByteArray packNum(const float &num) { + QByteArray numStr = QByteArray::number(num); + return packNum<int>(numStr.size()) + numStr; +} +template<class T> +inline T unpackNum(const uchar *data, int length, int &offset, U2OpStatus &os) { + CHECK_SIZE(int(sizeof(T)), T()); + T result = qFromLittleEndian<T>(data + offset); + offset += sizeof(T); + return result; +} +inline QByteArray unpackReal(const uchar *data, int length, int &offset, U2OpStatus &os) { + int size = unpackNum<int>(data, length, offset, os); + CHECK_OP(os, ""); + CHECK_SIZE(size, ""); + QByteArray result((const char*)data + offset, size); + offset += size; + return result; +} +template<> +inline double unpackNum(const uchar *data, int length, int &offset, U2OpStatus &os) { + QByteArray numStr = unpackReal(data, length, offset, os); + CHECK_OP(os, 0.0); + return numStr.toDouble(); +} +template<> +inline float unpackNum(const uchar *data, int length, int &offset, U2OpStatus &os) { + QByteArray numStr = unpackReal(data, length, offset, os); + CHECK_OP(os, 0.0f); + return numStr.toFloat(); +} - template<class T> - inline QByteArray packNumVector(const QVector<T> &vector) { - QByteArray result; - result += packNum<int>(vector.size()); - foreach (const T &num, vector) { - result += packNum<T>(num); - } - return result; +template<class T> +inline QByteArray packNumVector(const QVector<T> &vector) { + QByteArray result; + result += packNum<int>(vector.size()); + foreach(const T &num, vector) { + result += packNum<T>(num); } - template<class T> - inline QVector<T> unpackNumVector(const uchar *data, int length, int &offset, U2OpStatus &os) { - QVector<T> result; - int size = unpackNum<int>(data, length, offset, os); + return result; +} +template<class T> +inline QVector<T> unpackNumVector(const uchar *data, int length, int &offset, U2OpStatus &os) { + QVector<T> result; + int size = unpackNum<int>(data, length, offset, os); + CHECK_OP(os, result); + for (int i = 0; i < size; i++) { + T num = unpackNum<T>(data, length, offset, os); CHECK_OP(os, result); - for (int i=0; i<size; i++) { - T num = unpackNum<T>(data, length, offset, os); - CHECK_OP(os, result); - result << num; - } - return result; + result << num; } + return result; +} - inline QByteArray packCharVector(const QVector<char> &vector) { - QByteArray result; - result += packNum<int>(vector.size()); - foreach (const char &c, vector) { - result += c; - } - return result; +inline QByteArray packCharVector(const QVector<char> &vector) { + QByteArray result; + result += packNum<int>(vector.size()); + foreach(const char &c, vector) { + result += c; } - inline QVector<char> unpackCharVector(const uchar *data, int length, int &offset, U2OpStatus &os) { - QVector<char> result; - int size = unpackNum<int>(data, length, offset, os); - CHECK_OP(os, result); - for (int i=0; i<size; i++) { - CHECK_SIZE(1, result); - result << data[offset]; - offset++; - } - return result; + return result; +} +inline QVector<char> unpackCharVector(const uchar *data, int length, int &offset, U2OpStatus &os) { + QVector<char> result; + int size = unpackNum<int>(data, length, offset, os); + CHECK_OP(os, result); + for (int i = 0; i < size; i++) { + CHECK_SIZE(1, result); + result << data[offset]; + offset++; } + return result; +} - inline QByteArray packBool(bool value) { - char c = (value) ? 1 : 0; - return QByteArray(1, c); - } +inline QByteArray packBool(bool value) { + char c = (value) ? 1 : 0; + return QByteArray(1, c); +} - inline bool unpackBool(const uchar *data, int length, int &offset, U2OpStatus &os) { - CHECK_SIZE(1, false); - uchar c = data[offset]; - offset++; - return (0 == c) ? false : true; - } +inline bool unpackBool(const uchar *data, int length, int &offset, U2OpStatus &os) { + CHECK_SIZE(1, false); + uchar c = data[offset]; + offset++; + return (0 == c) ? false : true; +} } /************************************************************************/ @@ -199,41 +198,41 @@ DNAChromatogram DNAChromatogramSerializer::deserialize(const QByteArray &binary, /* NewickPhyTreeSerializer */ /************************************************************************/ namespace { - enum ReadState {RS_NAME, RS_WEIGHT, RS_QUOTED_NAME, RS_NAME_OR_WEIGHT}; - - void packTreeNode(QByteArray &binary, const PhyNode *node) { - int branches = node->branchCount(); - if (branches == 1 && (node->getName() == "" || node->getName() == "ROOT")) { - assert(node != node->getSecondNodeOfBranch(0)); - packTreeNode(binary, node->getSecondNodeOfBranch(0)); - return; - } - if (branches > 1) { - binary.append("("); - bool first = true; - for (int i = 0; i < branches; ++i) { - if (node->getSecondNodeOfBranch(i)!= node) { - if (first) { - first = false; - } else { - binary.append(","); - } - packTreeNode(binary, node->getSecondNodeOfBranch(i)); - if(node->getBranchesNodeValue(i) >= 0) { - binary.append(QByteArray::number(node->getBranchesNodeValue(i))); - } - binary.append(":"); - binary.append(QByteArray::number(node->getBranchesDistance(i))); +enum ReadState { RS_NAME, RS_WEIGHT, RS_QUOTED_NAME, RS_NAME_OR_WEIGHT }; + +void packTreeNode(QByteArray &binary, const PhyNode *node) { + int branches = node->branchCount(); + if (branches == 1 && (node->getName() == "" || node->getName() == "ROOT")) { + assert(node != node->getSecondNodeOfBranch(0)); + packTreeNode(binary, node->getSecondNodeOfBranch(0)); + return; + } + if (branches > 1) { + binary.append("("); + bool first = true; + for (int i = 0; i < branches; ++i) { + if (node->getSecondNodeOfBranch(i) != node) { + if (first) { + first = false; + } else { + binary.append(","); + } + packTreeNode(binary, node->getSecondNodeOfBranch(i)); + if (node->getBranchesNodeValue(i) >= 0) { + binary.append(QByteArray::number(node->getBranchesNodeValue(i))); } + binary.append(":"); + binary.append(QByteArray::number(node->getBranchesDistance(i))); } - binary.append(")"); - } else if(node->getName().contains(QRegExp("\\s|[(]|[)]|[:]|[;]|[,]"))) { - binary.append(QString("\'%1\'").arg(node->getName()).toLocal8Bit()); - } else { - binary.append(QString(node->getName()).toLatin1()); } + binary.append(")"); + } else if (node->getName().contains(QRegExp("\\s|[(]|[)]|[:]|[;]|[,]"))) { + binary.append(QString("\'%1\'").arg(node->getName()).toLocal8Bit()); + } else { + binary.append(QString(node->getName()).toLatin1()); } } +} #define BUFF_SIZE 1024 /* TODO: @@ -242,7 +241,7 @@ namespace { Blanks or tabs may appear anywhere except within unquoted labels or branch_lengths. Newlines may appear anywhere except within labels or branch_lengths. Comments are enclosed in square brackets and may appear anywhere newlines are permitted. -*/ + */ QList<PhyTree> NewickPhyTreeSerializer::parseTrees(IOAdapter *io, U2OpStatus& si) { QList<PhyTree> result; QByteArray block(BUFF_SIZE, '\0'); @@ -269,7 +268,7 @@ QList<PhyTree> NewickPhyTreeSerializer::parseTrees(IOAdapter *io, U2OpStatus& si for (int i = 0; i < blockLen; ++i) { unsigned char c = block[i]; if (TextUtils::WHITES[(uchar)c]) { - if(state == RS_QUOTED_NAME) { + if (state == RS_QUOTED_NAME) { lastStr.append(c); } continue; @@ -285,12 +284,12 @@ QList<PhyTree> NewickPhyTreeSerializer::parseTrees(IOAdapter *io, U2OpStatus& si state = (c == ':') ? RS_WEIGHT : RS_NAME; } - if(c == '\'') { - if(state == RS_NAME) { + if (c == '\'') { + if (state == RS_NAME) { state = RS_QUOTED_NAME; - } else if(state == RS_QUOTED_NAME) { - unsigned char nextChar = block[i+1]; - if(nextChar == '\'') { + } else if (state == RS_QUOTED_NAME) { + unsigned char nextChar = block[i + 1]; + if (nextChar == '\'') { lastStr.append(c); ++i; } else { @@ -298,12 +297,12 @@ QList<PhyTree> NewickPhyTreeSerializer::parseTrees(IOAdapter *io, U2OpStatus& si } } continue; - } else if(state == RS_QUOTED_NAME) { + } else if (state == RS_QUOTED_NAME) { lastStr.append(c); continue; } - if(!lastStr.isEmpty()) { + if (!lastStr.isEmpty()) { if (state == RS_NAME) { nodeStack.top()->setName(lastStr); } else { @@ -323,7 +322,7 @@ QList<PhyTree> NewickPhyTreeSerializer::parseTrees(IOAdapter *io, U2OpStatus& si if (c == '(') { //new child CHECK_EXT_BREAK(!nodeStack.isEmpty(), si.setError(DatatypeSerializers::tr("Tree node stack is empty"))); PhyNode* pn = new PhyNode(); - PhyBranch* bd = PhyTreeData::addBranch(nodeStack.top(),pn, 0); + PhyBranch* bd = PhyTreeData::addBranch(nodeStack.top(), pn, 0); nodeStack.push(pn); branchStack.push(bd); state = RS_NAME; @@ -341,7 +340,7 @@ QList<PhyTree> NewickPhyTreeSerializer::parseTrees(IOAdapter *io, U2OpStatus& si } } state = RS_WEIGHT; - } else if ( c == ',') { //new sibling + } else if (c == ',') { //new sibling CHECK_EXT_BREAK(!nodeStack.isEmpty(), si.setError(DatatypeSerializers::tr("Tree node stack is empty"))); CHECK_EXT_BREAK(!branchStack.isEmpty(), si.setError(DatatypeSerializers::tr("Branch node stack is empty"))); if (nodeStack.isEmpty() || branchStack.isEmpty()) { @@ -355,7 +354,7 @@ QList<PhyTree> NewickPhyTreeSerializer::parseTrees(IOAdapter *io, U2OpStatus& si nodeStack.push(pn); branchStack.push(bd); state = RS_NAME; - } else if ( c == ')' ) { //end of the branch, go up + } else if (c == ')') { //end of the branch, go up nodeStack.pop(); if (nodeStack.isEmpty()) { si.setError(DatatypeSerializers::tr("Unexpected closing bracket :%1").arg(lastStr)); @@ -365,7 +364,7 @@ QList<PhyTree> NewickPhyTreeSerializer::parseTrees(IOAdapter *io, U2OpStatus& si branchStack.pop(); state = RS_NAME_OR_WEIGHT; } else if (c == ';') { - if (!branchStack.isEmpty() || nodeStack.size()!=1) { + if (!branchStack.isEmpty() || nodeStack.size() != 1) { si.setError(DatatypeSerializers::tr("Unexpected end of file")); break; } @@ -385,8 +384,12 @@ QList<PhyTree> NewickPhyTreeSerializer::parseTrees(IOAdapter *io, U2OpStatus& si } si.setProgress(io->getProgress()); } + if (io->hasError()) { + si.setError(io->errorString()); + } + if (!si.isCoR()) { - if (!branchStack.isEmpty() || nodeStack.size()!=1) { + if (!branchStack.isEmpty() || nodeStack.size() != 1) { delete rd; si.setError(DatatypeSerializers::tr("Unexpected end of file")); return result; @@ -429,356 +432,356 @@ PhyTree NewickPhyTreeSerializer::deserialize(const QByteArray &binary, U2OpStatu /* BioStruct3DSerializer */ /************************************************************************/ namespace { - class PackContext { - public: - QHash<const AtomData*, SharedAtom> atoms; - QHash<const AtomData*, int> atomPositions; - QHash<int, const AtomData*> atomByPosition; - }; - - template<class T> - T unpack(const uchar *data, int length, int &offset, U2OpStatus &os); - template<class T> - T unpack(const uchar *data, int length, int &offset, U2OpStatus &os, PackContext &ctx); - - template<> - inline char unpack(const uchar *data, int length, int &offset, U2OpStatus &os) { - CHECK_SIZE(1, 0); - char result = data[offset]; - offset++; - return result; - } +class PackContext { +public: + QHash<const AtomData*, SharedAtom> atoms; + QHash<const AtomData*, int> atomPositions; + QHash<int, const AtomData*> atomByPosition; +}; + +template<class T> +T unpack(const uchar *data, int length, int &offset, U2OpStatus &os); +template<class T> +T unpack(const uchar *data, int length, int &offset, U2OpStatus &os, PackContext &ctx); + +template<> +inline char unpack(const uchar *data, int length, int &offset, U2OpStatus &os) { + CHECK_SIZE(1, 0); + char result = data[offset]; + offset++; + return result; +} - inline QByteArray pack(const QByteArray &data) { - return packNum<int>(data.size()) + data; - } - template<> - inline QByteArray unpack(const uchar *data, int length, int &offset, U2OpStatus &os) { - int size = unpackNum<int>(data, length, offset, os); - CHECK_SIZE(size, ""); - QByteArray result((const char*)data + offset, size); - offset += size; - return result; - } +inline QByteArray pack(const QByteArray &data) { + return packNum<int>(data.size()) + data; +} +template<> +inline QByteArray unpack(const uchar *data, int length, int &offset, U2OpStatus &os) { + int size = unpackNum<int>(data, length, offset, os); + CHECK_SIZE(size, ""); + QByteArray result((const char*)data + offset, size); + offset += size; + return result; +} - inline QByteArray pack(const QString &data) { - return pack(data.toUtf8()); - } - template<> - inline QString unpack(const uchar *data, int length, int &offset, U2OpStatus &os) { - return QString::fromUtf8(unpack<QByteArray>(data, length, offset, os)); - } +inline QByteArray pack(const QString &data) { + return pack(data.toUtf8()); +} +template<> +inline QString unpack(const uchar *data, int length, int &offset, U2OpStatus &os) { + return QString::fromUtf8(unpack<QByteArray>(data, length, offset, os)); +} - inline QByteArray pack(const ResidueIndex &data) { - QByteArray result; - result += packNum<int>(data.toInt()); - result += packNum<int>(data.getOrder()); - result += data.getInsCode(); - return result; - } - template<> - inline ResidueIndex unpack(const uchar *data, int length, int &offset, U2OpStatus &os) { - int resId = unpackNum<int>(data, length, offset, os); - CHECK_OP(os, ResidueIndex()); - int order = unpackNum<int>(data, length, offset, os); - CHECK_OP(os, ResidueIndex()); - char insCode = unpack<char>(data, length, offset, os); - CHECK_OP(os, ResidueIndex()); - - ResidueIndex result(resId, insCode); - result.setOrder(order); - return result; - } - template<> - inline QByteArray packNum(const ResidueIndex &num) { - return pack(num); - } - template<> - inline ResidueIndex unpackNum(const uchar *data, int length, int &offset, U2OpStatus &os) { - return unpack<ResidueIndex>(data, length, offset, os); - } +inline QByteArray pack(const ResidueIndex &data) { + QByteArray result; + result += packNum<int>(data.toInt()); + result += packNum<int>(data.getOrder()); + result += data.getInsCode(); + return result; +} +template<> +inline ResidueIndex unpack(const uchar *data, int length, int &offset, U2OpStatus &os) { + int resId = unpackNum<int>(data, length, offset, os); + CHECK_OP(os, ResidueIndex()); + int order = unpackNum<int>(data, length, offset, os); + CHECK_OP(os, ResidueIndex()); + char insCode = unpack<char>(data, length, offset, os); + CHECK_OP(os, ResidueIndex()); + + ResidueIndex result(resId, insCode); + result.setOrder(order); + return result; +} +template<> +inline QByteArray packNum(const ResidueIndex &num) { + return pack(num); +} +template<> +inline ResidueIndex unpackNum(const uchar *data, int length, int &offset, U2OpStatus &os) { + return unpack<ResidueIndex>(data, length, offset, os); +} - inline QByteArray pack(const ResidueData &data) { - QByteArray result; - result += char(data.type); - result += pack(data.name); - result += data.acronym; - result += packNum<int>(data.chainIndex); - return result; - } - inline QByteArray pack(const SharedResidue &data, PackContext & /*ctx*/) { - return pack(*data.data()); - } - template<> - inline SharedResidue unpack(const uchar *data, int length, int &offset, U2OpStatus &os, PackContext & /*ctx*/) { - SharedResidue result(new ResidueData()); - result->type = ResidueData::Type(unpack<char>(data, length, offset, os)); - CHECK_OP(os, result); +inline QByteArray pack(const ResidueData &data) { + QByteArray result; + result += char(data.type); + result += pack(data.name); + result += data.acronym; + result += packNum<int>(data.chainIndex); + return result; +} +inline QByteArray pack(const SharedResidue &data, PackContext & /*ctx*/) { + return pack(*data.data()); +} +template<> +inline SharedResidue unpack(const uchar *data, int length, int &offset, U2OpStatus &os, PackContext & /*ctx*/) { + SharedResidue result(new ResidueData()); + result->type = ResidueData::Type(unpack<char>(data, length, offset, os)); + CHECK_OP(os, result); - result->name = unpack<QByteArray>(data, length, offset, os); - CHECK_OP(os, result); + result->name = unpack<QByteArray>(data, length, offset, os); + CHECK_OP(os, result); - result->acronym = unpack<char>(data, length, offset, os); - CHECK_OP(os, result); + result->acronym = unpack<char>(data, length, offset, os); + CHECK_OP(os, result); - result->chainIndex = unpackNum<int>(data, length, offset, os); - return result; - } + result->chainIndex = unpackNum<int>(data, length, offset, os); + return result; +} - inline QByteArray pack(const Vector3D &data) { - QByteArray result; - result += packNum<double>(data.x); - result += packNum<double>(data.y); - result += packNum<double>(data.z); - return result; - } - template<> - inline Vector3D unpack(const uchar *data, int length, int &offset, U2OpStatus &os) { - Vector3D result; - result.x = unpackNum<double>(data, length, offset, os); - CHECK_OP(os, result); - result.y = unpackNum<double>(data, length, offset, os); - CHECK_OP(os, result); - result.z = unpackNum<double>(data, length, offset, os); - return result; - } +inline QByteArray pack(const Vector3D &data) { + QByteArray result; + result += packNum<double>(data.x); + result += packNum<double>(data.y); + result += packNum<double>(data.z); + return result; +} +template<> +inline Vector3D unpack(const uchar *data, int length, int &offset, U2OpStatus &os) { + Vector3D result; + result.x = unpackNum<double>(data, length, offset, os); + CHECK_OP(os, result); + result.y = unpackNum<double>(data, length, offset, os); + CHECK_OP(os, result); + result.z = unpackNum<double>(data, length, offset, os); + return result; +} - inline QByteArray pack(const Matrix44 &data) { - QByteArray result; - for (int i=0; i<16; i++) { - result += packNum<float>(data[i]); - } - return result; +inline QByteArray pack(const Matrix44 &data) { + QByteArray result; + for (int i = 0; i < 16; i++) { + result += packNum<float>(data[i]); } - template<> - inline Matrix44 unpack(const uchar *data, int length, int &offset, U2OpStatus &os) { - Matrix44 result; - for (int i=0; i<16; i++) { - result[i] = unpackNum<float>(data, length, offset, os); - CHECK_OP(os, result); - } - return result; + return result; +} +template<> +inline Matrix44 unpack(const uchar *data, int length, int &offset, U2OpStatus &os) { + Matrix44 result; + for (int i = 0; i < 16; i++) { + result[i] = unpackNum<float>(data, length, offset, os); + CHECK_OP(os, result); } + return result; +} - inline QByteArray pack(const AtomData &data) { - QByteArray result; - result += packNum<int>(data.atomicNumber); - result += packNum<int>(data.chainIndex); - result += pack(data.residueIndex); - result += pack(data.name); - result += pack(data.coord3d); - result += packNum<float>(data.occupancy); - result += packNum<float>(data.temperature); - return result; +inline QByteArray pack(const AtomData &data) { + QByteArray result; + result += packNum<int>(data.atomicNumber); + result += packNum<int>(data.chainIndex); + result += pack(data.residueIndex); + result += pack(data.name); + result += pack(data.coord3d); + result += packNum<float>(data.occupancy); + result += packNum<float>(data.temperature); + return result; +} +inline QByteArray pack(const SharedAtom &data, PackContext &ctx) { + int num = ctx.atomPositions.value(data.constData(), -1); + if (-1 != num) { + return packNum<int>(num); } - inline QByteArray pack(const SharedAtom &data, PackContext &ctx) { - int num = ctx.atomPositions.value(data.constData(), -1); - if (-1 != num) { - return packNum<int>(num); - } - QByteArray result; - result += packNum<int>(ctx.atoms.size()); - result += pack(*data.data()); + QByteArray result; + result += packNum<int>(ctx.atoms.size()); + result += pack(*data.data()); - int position = ctx.atomPositions.size(); - ctx.atoms.insert(data.constData(), data); - ctx.atomPositions.insert(data.constData(), position); - ctx.atomByPosition.insert(position, data.constData()); + int position = ctx.atomPositions.size(); + ctx.atoms.insert(data.constData(), data); + ctx.atomPositions.insert(data.constData(), position); + ctx.atomByPosition.insert(position, data.constData()); - return result; - } - template<> - inline AtomData unpack(const uchar *data, int length, int &offset, U2OpStatus &os) { - AtomData result; - result.atomicNumber = unpackNum<int>(data, length, offset, os); - CHECK_OP(os, result); - result.chainIndex = unpackNum<int>(data, length, offset, os); - CHECK_OP(os, result); - result.residueIndex = unpack<ResidueIndex>(data, length, offset, os); - CHECK_OP(os, result); - result.name = unpack<QByteArray>(data, length, offset, os); - CHECK_OP(os, result); - result.coord3d = unpack<Vector3D>(data, length, offset, os); - CHECK_OP(os, result); - result.occupancy = unpackNum<float>(data, length, offset, os); - CHECK_OP(os, result); - result.temperature = unpackNum<float>(data, length, offset, os); - return result; - } - template<> - inline SharedAtom unpack(const uchar *data, int length, int &offset, U2OpStatus &os, PackContext &ctx) { - int num = unpackNum<int>(data, length, offset, os); - CHECK_OP(os, SharedAtom()); - if (num < ctx.atoms.size()) { - return ctx.atoms.value(ctx.atomByPosition.value(num, NULL)); - } - SAFE_POINT_EXT(num == ctx.atoms.size(), os.setError("Unexpected atom number"), SharedAtom()); - AtomData atom = unpack<AtomData>(data, length, offset, os); - CHECK_OP(os, SharedAtom()); - SharedAtom result(new AtomData(atom)); - - int position = ctx.atomPositions.size(); - ctx.atoms.insert(result.constData(), result); - ctx.atomPositions.insert(result.constData(), position); - ctx.atomByPosition.insert(position, result.constData()); + return result; +} +template<> +inline AtomData unpack(const uchar *data, int length, int &offset, U2OpStatus &os) { + AtomData result; + result.atomicNumber = unpackNum<int>(data, length, offset, os); + CHECK_OP(os, result); + result.chainIndex = unpackNum<int>(data, length, offset, os); + CHECK_OP(os, result); + result.residueIndex = unpack<ResidueIndex>(data, length, offset, os); + CHECK_OP(os, result); + result.name = unpack<QByteArray>(data, length, offset, os); + CHECK_OP(os, result); + result.coord3d = unpack<Vector3D>(data, length, offset, os); + CHECK_OP(os, result); + result.occupancy = unpackNum<float>(data, length, offset, os); + CHECK_OP(os, result); + result.temperature = unpackNum<float>(data, length, offset, os); + return result; +} +template<> +inline SharedAtom unpack(const uchar *data, int length, int &offset, U2OpStatus &os, PackContext &ctx) { + int num = unpackNum<int>(data, length, offset, os); + CHECK_OP(os, SharedAtom()); + if (num < ctx.atoms.size()) { + return ctx.atoms.value(ctx.atomByPosition.value(num, NULL)); + } + SAFE_POINT_EXT(num == ctx.atoms.size(), os.setError("Unexpected atom number"), SharedAtom()); + AtomData atom = unpack<AtomData>(data, length, offset, os); + CHECK_OP(os, SharedAtom()); + SharedAtom result(new AtomData(atom)); + + int position = ctx.atomPositions.size(); + ctx.atoms.insert(result.constData(), result); + ctx.atomPositions.insert(result.constData(), position); + ctx.atomByPosition.insert(position, result.constData()); - return result; - } + return result; +} - inline QByteArray pack(const Bond &data, PackContext &ctx) { - QByteArray result; - result += pack(data.getAtom1(), ctx); - result += pack(data.getAtom2(), ctx); - return result; - } - template<> - inline Bond unpack(const uchar *data, int length, int &offset, U2OpStatus &os, PackContext &ctx) { - SharedAtom atom1 = unpack<SharedAtom>(data, length, offset, os, ctx); - CHECK_OP(os, Bond(SharedAtom(), SharedAtom())); - SharedAtom atom2 = unpack<SharedAtom>(data, length, offset, os, ctx); - return Bond(atom1, atom2); - } +inline QByteArray pack(const Bond &data, PackContext &ctx) { + QByteArray result; + result += pack(data.getAtom1(), ctx); + result += pack(data.getAtom2(), ctx); + return result; +} +template<> +inline Bond unpack(const uchar *data, int length, int &offset, U2OpStatus &os, PackContext &ctx) { + SharedAtom atom1 = unpack<SharedAtom>(data, length, offset, os, ctx); + CHECK_OP(os, Bond(SharedAtom(), SharedAtom())); + SharedAtom atom2 = unpack<SharedAtom>(data, length, offset, os, ctx); + return Bond(atom1, atom2); +} - inline QByteArray pack(const SecondaryStructure &data) { - QByteArray result; - result += char(data.type); - result += data.chainIdentifier; - result += packNum<int>(data.chainIndex); - result += packNum<int>(data.startSequenceNumber); - result += packNum<int>(data.endSequenceNumber); - return result; - } - inline QByteArray pack(const SharedSecondaryStructure &data, PackContext & /*ctx*/) { - return pack(*data.data()); - } - template<> - inline SharedSecondaryStructure unpack(const uchar *data, int length, int &offset, U2OpStatus &os, PackContext & /*ctx*/) { - SharedSecondaryStructure result(new SecondaryStructure()); - result->type = SecondaryStructure::Type(unpack<char>(data, length, offset, os)); - CHECK_OP(os, result); +inline QByteArray pack(const SecondaryStructure &data) { + QByteArray result; + result += char(data.type); + result += data.chainIdentifier; + result += packNum<int>(data.chainIndex); + result += packNum<int>(data.startSequenceNumber); + result += packNum<int>(data.endSequenceNumber); + return result; +} +inline QByteArray pack(const SharedSecondaryStructure &data, PackContext & /*ctx*/) { + return pack(*data.data()); +} +template<> +inline SharedSecondaryStructure unpack(const uchar *data, int length, int &offset, U2OpStatus &os, PackContext & /*ctx*/) { + SharedSecondaryStructure result(new SecondaryStructure()); + result->type = SecondaryStructure::Type(unpack<char>(data, length, offset, os)); + CHECK_OP(os, result); - result->chainIdentifier = unpack<char>(data, length, offset, os); - CHECK_OP(os, result); + result->chainIdentifier = unpack<char>(data, length, offset, os); + CHECK_OP(os, result); - result->chainIndex = unpackNum<int>(data, length, offset, os); - result->startSequenceNumber = unpackNum<int>(data, length, offset, os); - result->endSequenceNumber = unpackNum<int>(data, length, offset, os); - return result; - } + result->chainIndex = unpackNum<int>(data, length, offset, os); + result->startSequenceNumber = unpackNum<int>(data, length, offset, os); + result->endSequenceNumber = unpackNum<int>(data, length, offset, os); + return result; +} - template<class T> - inline QByteArray packList(const QList<T> &data, PackContext &ctx) { - QByteArray result; - result += packNum<int>(data.size()); - foreach (const T &d, data) { - result += pack(d, ctx); - } - return result; +template<class T> +inline QByteArray packList(const QList<T> &data, PackContext &ctx) { + QByteArray result; + result += packNum<int>(data.size()); + foreach(const T &d, data) { + result += pack(d, ctx); } - template<class T> - inline QList<T> unpackList(const uchar *data, int length, int &offset, U2OpStatus &os, PackContext &ctx) { - QList<T> result; - int size = unpackNum<int>(data, length, offset, os); + return result; +} +template<class T> +inline QList<T> unpackList(const uchar *data, int length, int &offset, U2OpStatus &os, PackContext &ctx) { + QList<T> result; + int size = unpackNum<int>(data, length, offset, os); + CHECK_OP(os, result); + for (int i = 0; i < size; i++) { + result << unpack<T>(data, length, offset, os, ctx); CHECK_OP(os, result); - for (int i=0; i<size; i++) { - result << unpack<T>(data, length, offset, os, ctx); - CHECK_OP(os, result); - } - return result; } + return result; +} + +inline QByteArray pack(const Molecule3DModel &data, PackContext &ctx) { + QByteArray result; + result += packList<SharedAtom>(data.atoms, ctx); + result += packList<Bond>(data.bonds, ctx); + return result; +} +template<> +inline Molecule3DModel unpack(const uchar *data, int length, int &offset, U2OpStatus &os, PackContext &ctx) { + Molecule3DModel result; + result.atoms = unpackList<SharedAtom>(data, length, offset, os, ctx); + CHECK_OP(os, result); + result.bonds = unpackList<Bond>(data, length, offset, os, ctx); + CHECK_OP(os, result); + return result; +} - inline QByteArray pack(const Molecule3DModel &data, PackContext &ctx) { - QByteArray result; - result += packList<SharedAtom>(data.atoms, ctx); - result += packList<Bond>(data.bonds, ctx); - return result; +template<class KeyT, class ValueT> +inline QByteArray packMap(const QMap<KeyT, ValueT> &data, PackContext &ctx) { + QByteArray result; + result += packNum<int>(data.size()); + foreach(const KeyT &idx, data.keys()) { + result += packNum<KeyT>(idx); + result += pack(data[idx], ctx); } - template<> - inline Molecule3DModel unpack(const uchar *data, int length, int &offset, U2OpStatus &os, PackContext &ctx) { - Molecule3DModel result; - result.atoms = unpackList<SharedAtom>(data, length, offset, os, ctx); + return result; +} +template<class KeyT, class ValueT> +inline QMap<KeyT, ValueT> unpackMap(const uchar *data, int length, int &offset, U2OpStatus &os, PackContext &ctx) { + QMap<KeyT, ValueT> result; + int size = unpackNum<int>(data, length, offset, os); + CHECK_OP(os, result); + for (int i = 0; i < size; i++) { + KeyT key = unpackNum<KeyT>(data, length, offset, os); CHECK_OP(os, result); - result.bonds = unpackList<Bond>(data, length, offset, os, ctx); + ValueT value = unpack<ValueT>(data, length, offset, os, ctx); CHECK_OP(os, result); - return result; + result[key] = value; } + return result; +} - template<class KeyT, class ValueT> - inline QByteArray packMap(const QMap<KeyT, ValueT> &data, PackContext &ctx) { - QByteArray result; - result += packNum<int>(data.size()); - foreach (const KeyT &idx, data.keys()) { - result += packNum<KeyT>(idx); - result += pack(data[idx], ctx); - } - return result; - } - template<class KeyT, class ValueT> - inline QMap<KeyT, ValueT> unpackMap(const uchar *data, int length, int &offset, U2OpStatus &os, PackContext &ctx) { - QMap<KeyT, ValueT> result; - int size = unpackNum<int>(data, length, offset, os); - CHECK_OP(os, result); - for (int i=0; i<size; i++) { - KeyT key = unpackNum<KeyT>(data, length, offset, os); - CHECK_OP(os, result); - ValueT value = unpack<ValueT>(data, length, offset, os, ctx); - CHECK_OP(os, result); - result[key] = value; - } - return result; - } +inline QByteArray pack(const MoleculeData &data, PackContext &ctx) { + QByteArray result; + result += packMap<ResidueIndex, SharedResidue>(data.residueMap, ctx); + result += packMap<int, Molecule3DModel>(data.models, ctx); + result += pack(data.name); + result += data.chainId; + result += packBool(data.engineered); + return result; +} +inline QByteArray pack(const SharedMolecule &data, PackContext &ctx) { + return pack(*data.data(), ctx); +} +template<> +inline SharedMolecule unpack(const uchar *data, int length, int &offset, U2OpStatus &os, PackContext &ctx) { + SharedMolecule result(new MoleculeData()); + result->residueMap = unpackMap<ResidueIndex, SharedResidue>(data, length, offset, os, ctx); + CHECK_OP(os, result); + result->models = unpackMap<int, Molecule3DModel>(data, length, offset, os, ctx); + CHECK_OP(os, result); + result->name = unpack<QString>(data, length, offset, os); + CHECK_OP(os, result); + result->chainId = unpack<char>(data, length, offset, os); + CHECK_OP(os, result); + result->engineered = unpackBool(data, length, offset, os); + return result; +} - inline QByteArray pack(const MoleculeData &data, PackContext &ctx) { - QByteArray result; - result += packMap<ResidueIndex, SharedResidue>(data.residueMap, ctx); - result += packMap<int, Molecule3DModel>(data.models, ctx); - result += pack(data.name); - result += data.chainId; - result += packBool(data.engineered); - return result; - } - inline QByteArray pack(const SharedMolecule &data, PackContext &ctx) { - return pack(*data.data(), ctx); +inline QByteArray pack(const AtomCoordSet &data, PackContext &ctx) { + QByteArray result; + result += packNum<int>(data.size()); + foreach(int idx, data.keys()) { + result += packNum<int>(idx); + result += pack(data[idx], ctx); } - template<> - inline SharedMolecule unpack(const uchar *data, int length, int &offset, U2OpStatus &os, PackContext &ctx) { - SharedMolecule result(new MoleculeData()); - result->residueMap = unpackMap<ResidueIndex, SharedResidue>(data, length, offset, os, ctx); - CHECK_OP(os, result); - result->models = unpackMap<int, Molecule3DModel>(data, length, offset, os, ctx); - CHECK_OP(os, result); - result->name = unpack<QString>(data, length, offset, os); - CHECK_OP(os, result); - result->chainId = unpack<char>(data, length, offset, os); + return result; +} +template<> +inline AtomCoordSet unpack(const uchar *data, int length, int &offset, U2OpStatus &os, PackContext &ctx) { + AtomCoordSet result; + int size = unpackNum<int>(data, length, offset, os); + CHECK_OP(os, result); + for (int i = 0; i < size; i++) { + int key = unpackNum<int>(data, length, offset, os); CHECK_OP(os, result); - result->engineered = unpackBool(data, length, offset, os); - return result; - } - - inline QByteArray pack(const AtomCoordSet &data, PackContext &ctx) { - QByteArray result; - result += packNum<int>(data.size()); - foreach (int idx, data.keys()) { - result += packNum<int>(idx); - result += pack(data[idx], ctx); - } - return result; - } - template<> - inline AtomCoordSet unpack(const uchar *data, int length, int &offset, U2OpStatus &os, PackContext &ctx) { - AtomCoordSet result; - int size = unpackNum<int>(data, length, offset, os); + SharedAtom value = unpack<SharedAtom>(data, length, offset, os, ctx); CHECK_OP(os, result); - for (int i=0; i<size; i++) { - int key = unpackNum<int>(data, length, offset, os); - CHECK_OP(os, result); - SharedAtom value = unpack<SharedAtom>(data, length, offset, os, ctx); - CHECK_OP(os, result); - result[key] = value; - } - return result; + result[key] = value; } + return result; +} } QByteArray BioStruct3DSerializer::serialize(const BioStruct3D &bioStruct) { @@ -827,48 +830,48 @@ BioStruct3D BioStruct3DSerializer::deserialize(const QByteArray &binary, U2OpSta /* WMatrixSerializer */ /************************************************************************/ namespace { - template<class T> - inline QByteArray packArray(const QVarLengthArray<T> &data) { - QByteArray result; - result += packNum<int>(data.size()); - foreach (const T &d, data) { - result += packNum<T>(d); - } - return result; +template<class T> +inline QByteArray packArray(const QVarLengthArray<T> &data) { + QByteArray result; + result += packNum<int>(data.size()); + foreach(const T &d, data) { + result += packNum<T>(d); } - template<class T> - inline QVarLengthArray<T> unpackArray(const uchar *data, int length, int &offset, U2OpStatus &os) { - QVarLengthArray<T> result; - int size = unpackNum<int>(data, length, offset, os); + return result; +} +template<class T> +inline QVarLengthArray<T> unpackArray(const uchar *data, int length, int &offset, U2OpStatus &os) { + QVarLengthArray<T> result; + int size = unpackNum<int>(data, length, offset, os); + CHECK_OP(os, result); + for (int i = 0; i < size; i++) { + result << unpackNum<T>(data, length, offset, os); CHECK_OP(os, result); - for (int i=0; i<size; i++) { - result << unpackNum<T>(data, length, offset, os); - CHECK_OP(os, result); - } - return result; } - inline QByteArray packMap(const QMap<QString, QString> &data) { - QByteArray result; - result += packNum<int>(data.size()); - foreach (const QString &key, data.keys()) { - result += pack(key); - result += pack(data[key]); - } - return result; + return result; +} +inline QByteArray packMap(const QMap<QString, QString> &data) { + QByteArray result; + result += packNum<int>(data.size()); + foreach(const QString &key, data.keys()) { + result += pack(key); + result += pack(data[key]); } - inline QMap<QString, QString> unpackMap(const uchar *data, int length, int &offset, U2OpStatus &os) { - QMap<QString, QString> result; - int size = unpackNum<int>(data, length, offset, os); + return result; +} +inline QMap<QString, QString> unpackMap(const uchar *data, int length, int &offset, U2OpStatus &os) { + QMap<QString, QString> result; + int size = unpackNum<int>(data, length, offset, os); + CHECK_OP(os, result); + for (int i = 0; i < size; i++) { + QString key = unpack<QString>(data, length, offset, os); CHECK_OP(os, result); - for (int i=0; i<size; i++) { - QString key = unpack<QString>(data, length, offset, os); - CHECK_OP(os, result); - QString value = unpack<QString>(data, length, offset, os); - CHECK_OP(os, result); - result[key] = value; - } - return result; + QString value = unpack<QString>(data, length, offset, os); + CHECK_OP(os, result); + result[key] = value; } + return result; +} } QByteArray WMatrixSerializer::serialize(const PWMatrix &matrix) { diff --git a/src/corelibs/U2Core/src/util/DatatypeSerializeUtils.h b/src/corelibs/U2Core/src/util/DatatypeSerializeUtils.h index 72cfcbf40b106f4e88e062183f3a4686f07ac06a..8072a5b2fb3b7617778cdc338b4d93b4f436c6fa 100644 --- a/src/corelibs/U2Core/src/util/DatatypeSerializeUtils.h +++ b/src/corelibs/U2Core/src/util/DatatypeSerializeUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -28,7 +28,6 @@ #include <U2Core/PFMatrix.h> #include <U2Core/PWMatrix.h> #include <U2Core/PhyTree.h> -#include <U2Core/U2OpStatus.h> namespace U2 { diff --git a/src/corelibs/U2Core/src/util/DnaChromatogramUtils.cpp b/src/corelibs/U2Core/src/util/DnaChromatogramUtils.cpp index d81a1d4ecc424293a67ae2abfd84c47f7a9b010e..d130d0e0ebd22eb7c97bf4081607e7ed2aa5e4b1 100644 --- a/src/corelibs/U2Core/src/util/DnaChromatogramUtils.cpp +++ b/src/corelibs/U2Core/src/util/DnaChromatogramUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/DnaChromatogramUtils.h b/src/corelibs/U2Core/src/util/DnaChromatogramUtils.h index 9d065571c53b5d7044f0a227c59264f704163f1e..915c1be59303aac9199d42ccd01c05e1bccee507 100644 --- a/src/corelibs/U2Core/src/util/DnaChromatogramUtils.h +++ b/src/corelibs/U2Core/src/util/DnaChromatogramUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/FileAndDirectoryUtils.cpp b/src/corelibs/U2Core/src/util/FileAndDirectoryUtils.cpp index 3eefb639f795a448178fd02a3ed8132ccb75cf06..80e646fbc4351da359e343e3aa520ce52bea6926 100644 --- a/src/corelibs/U2Core/src/util/FileAndDirectoryUtils.cpp +++ b/src/corelibs/U2Core/src/util/FileAndDirectoryUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -41,7 +41,7 @@ QString FileAndDirectoryUtils::getFormatId(const FormatDetectionResult &r) { return ""; } -QString FileAndDirectoryUtils::createWorkingDir(const QString &fileUrl, int dirMode, const QString &customDir, const QString &workingDir){ +QString FileAndDirectoryUtils::getWorkingDir(const QString &fileUrl, int dirMode, const QString &customDir, const QString &workingDir) { QString result; bool useInternal = false; @@ -71,8 +71,20 @@ QString FileAndDirectoryUtils::createWorkingDir(const QString &fileUrl, int dirM if (!result.endsWith("/")) { result += "/"; } + if (dirMode == WORKFLOW_INTERNAL_CUSTOM) { + if (!customDir.isEmpty()) { + result += customDir; + } + if (!result.endsWith("/")) { + result += "/"; + } + } } + return result; +} +QString FileAndDirectoryUtils::createWorkingDir(const QString &fileUrl, int dirMode, const QString &customDir, const QString &workingDir){ + const QString result = getWorkingDir(fileUrl, dirMode, customDir, workingDir); QDir dir(result); if (!dir.exists(result)) { dir.mkdir(result); diff --git a/src/corelibs/U2Core/src/util/FileAndDirectoryUtils.h b/src/corelibs/U2Core/src/util/FileAndDirectoryUtils.h index fbe34dcd68c46c9724319d9dc8e797bc291bcada..a595e3e0b8924d2046e5d284542b760196ced85c 100644 --- a/src/corelibs/U2Core/src/util/FileAndDirectoryUtils.h +++ b/src/corelibs/U2Core/src/util/FileAndDirectoryUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,9 +34,11 @@ public: enum OutDirectory { FILE_DIRECTORY = 0, WORKFLOW_INTERNAL, - CUSTOM + CUSTOM, + WORKFLOW_INTERNAL_CUSTOM }; + static QString getWorkingDir(const QString& fileUrl, int dirMode, const QString& customDir, const QString& workingDir); static QString createWorkingDir(const QString& fileUrl, int dirMode, const QString& customDir, const QString& workingDir); static QString detectFormat(const QString &url); static bool isFileEmpty(const QString& url); diff --git a/src/corelibs/U2Core/src/util/FileStorageUtils.cpp b/src/corelibs/U2Core/src/util/FileStorageUtils.cpp index 83ec34e21e8b75cfc41a82f970c5d080a7d9f417..5ccbfe969880d92f75a6b7920bb6446e16ffb629 100644 --- a/src/corelibs/U2Core/src/util/FileStorageUtils.cpp +++ b/src/corelibs/U2Core/src/util/FileStorageUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/FileStorageUtils.h b/src/corelibs/U2Core/src/util/FileStorageUtils.h index 97aed4c1a4d6a286d490058b2bba6e2ff8bce4f3..7bbc2940a68f5fd894b84e28257fbf4499aea2bb 100644 --- a/src/corelibs/U2Core/src/util/FileStorageUtils.h +++ b/src/corelibs/U2Core/src/util/FileStorageUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/FilesIterator.cpp b/src/corelibs/U2Core/src/util/FilesIterator.cpp index 9db7fe6ed470c0cefd6ab221e28011ed9a21c7c3..c1a1cf53f9f8f8c61049c3ad449af4ff2b9931df 100644 --- a/src/corelibs/U2Core/src/util/FilesIterator.cpp +++ b/src/corelibs/U2Core/src/util/FilesIterator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/FilesIterator.h b/src/corelibs/U2Core/src/util/FilesIterator.h index df27edba30e666c763e2a1af9a7412daefeb111e..80f36098a9f7ce43ac669f5d28d0ee254b52efb1 100644 --- a/src/corelibs/U2Core/src/util/FilesIterator.h +++ b/src/corelibs/U2Core/src/util/FilesIterator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/FormatUtils.cpp b/src/corelibs/U2Core/src/util/FormatUtils.cpp index 0b53b649a9cfcb90ed79805560ed6513b101a7ca..f46c63764c09be8077b1c4faa9ef3981f3ecf1de 100644 --- a/src/corelibs/U2Core/src/util/FormatUtils.cpp +++ b/src/corelibs/U2Core/src/util/FormatUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/FormatUtils.h b/src/corelibs/U2Core/src/util/FormatUtils.h index 082791dd6aa10990c259ed842958fce655ebb9a6..97b3ef795ee16dc7f67d08a5c18e134f6590a5a8 100644 --- a/src/corelibs/U2Core/src/util/FormatUtils.h +++ b/src/corelibs/U2Core/src/util/FormatUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/GAutoDeleteList.cpp b/src/corelibs/U2Core/src/util/GAutoDeleteList.cpp index b64e8dd0e2054880e4145bbadb1ba3388ea856c6..d5237449a17bf39e14a305e50ac7a91a1af457a0 100644 --- a/src/corelibs/U2Core/src/util/GAutoDeleteList.cpp +++ b/src/corelibs/U2Core/src/util/GAutoDeleteList.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/GAutoDeleteList.h b/src/corelibs/U2Core/src/util/GAutoDeleteList.h index 65cabac84f2c9c000813e76f53475df5b282ea39..5681daf88bd9d150575205ce5e34a331e2df2d3f 100644 --- a/src/corelibs/U2Core/src/util/GAutoDeleteList.h +++ b/src/corelibs/U2Core/src/util/GAutoDeleteList.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/GUrlUtils.cpp b/src/corelibs/U2Core/src/util/GUrlUtils.cpp index d7885ea4c5f07e91dd2644aa39dad75bee3b3799..bf8ada8d2a55babcb2368daa87e82b34868b245f 100644 --- a/src/corelibs/U2Core/src/util/GUrlUtils.cpp +++ b/src/corelibs/U2Core/src/util/GUrlUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,7 +25,6 @@ #include <U2Core/AppSettings.h> #include <U2Core/DocumentModel.h> #include <U2Core/DocumentUtils.h> -#include <U2Core/Log.h> #include <U2Core/Task.h> #include <U2Core/U2OpStatus.h> #include <U2Core/U2SafePoints.h> @@ -47,7 +46,7 @@ QString GUrlUtils::getUncompressedExtension(const GUrl& url) { QString GUrlUtils::getUncompressedCompleteBaseName(const GUrl &url) { QString filePath = url.getURLString(); - if ("gz" == url.lastFileSuffix()) { + if ("gz" == url.lastFileSuffix()) { filePath.chop(QString(".gz").length()); } return QFileInfo(filePath).completeBaseName(); @@ -56,7 +55,7 @@ QString GUrlUtils::getUncompressedCompleteBaseName(const GUrl &url) { GUrl GUrlUtils::ensureFileExt(const GUrl& url, const QStringList& typeExt) { SAFE_POINT(!typeExt.isEmpty(), "Type extension is empty!", GUrl()); - if( url.isVFSFile() ) { + if (url.isVFSFile()) { return url; } @@ -67,7 +66,7 @@ GUrl GUrlUtils::ensureFileExt(const GUrl& url, const QStringList& typeExt) { if (typeExt.contains(GUrlUtils::getUncompressedExtension(url))) { return url; } - return GUrl(url.getURLString() + "." + typeExt.first(), url.getType()); + return GUrl(url.getURLString() + "." + typeExt.first(), url.getType()); } bool GUrlUtils::containSpaces(const QString &string) { @@ -167,10 +166,10 @@ static void getPreNPost(const QString &originalUrl, QString &pre, QString &post, if (idx != -1) { QString extSuffix = pre.mid(idx); - if(extSuffix == ".gz") { + if (extSuffix == ".gz") { pre.chop(extSuffix.length()); idx = pre.lastIndexOf("."); - if(idx != -1) { + if (idx != -1) { extSuffix = pre.mid(idx) + extSuffix; pre.append(".gz"); } @@ -194,7 +193,7 @@ static void getPreNPost(const QString &originalUrl, QString &pre, QString &post, QString GUrlUtils::insertSuffix(const QString &originalUrl, const QString &suffix) { QString pre, post; int i = 0; - getPreNPost(originalUrl, pre, post, i,suffix); + getPreNPost(originalUrl, pre, post, i, suffix); return pre + suffix + post; } @@ -224,8 +223,8 @@ QString GUrlUtils::rollFileName(const QString& originalUrl, const QString& rolle return resultUrl; } -QUrl GUrlUtils::gUrl2qUrl( const GUrl& gurl) { - if( gurl.isVFSFile() ) { +QUrl GUrlUtils::gUrl2qUrl(const GUrl& gurl) { + if (gurl.isVFSFile()) { return QUrl(); } @@ -237,7 +236,7 @@ QUrl GUrlUtils::gUrl2qUrl( const GUrl& gurl) { } } -QList<QUrl> GUrlUtils::gUrls2qUrls( const QList<GUrl>& gurls) { +QList<QUrl> GUrlUtils::gUrls2qUrls(const QList<GUrl>& gurls) { QList<QUrl> urls; foreach(const GUrl& gurl, gurls) { urls << gUrl2qUrl(gurl); @@ -245,12 +244,12 @@ QList<QUrl> GUrlUtils::gUrls2qUrls( const QList<GUrl>& gurls) { return urls; } -GUrl GUrlUtils::qUrl2gUrl( const QUrl& qurl) { +GUrl GUrlUtils::qUrl2gUrl(const QUrl& qurl) { QString str = qurl.toString(); return GUrl(str); } -QList<GUrl> GUrlUtils::qUrls2gUrls( const QList<QUrl>& qurls) { +QList<GUrl> GUrlUtils::qUrls2gUrls(const QList<QUrl>& qurls) { QList<GUrl> urls; foreach(const QUrl& qurl, qurls) { urls << qUrl2gUrl(qurl); @@ -277,7 +276,7 @@ QString GUrlUtils::prepareFileName(const QString& url, const QString& baseSuffix return url + QString(".%1.%2").arg(baseSuffix).arg(typeExt.first()); } QString base = fi.baseName(); - while(!suffixList.isEmpty()) { + while (!suffixList.isEmpty()) { QString nextSuffix = suffixList.takeFirst(); if (nextSuffix == ext) { break; @@ -349,7 +348,7 @@ QString GUrlUtils::prepareTmpFileLocation(const QString& dir, const QString& pre void GUrlUtils::removeDir(const QString& dirPath, U2OpStatus& os) { QDir dir(dirPath); CHECK(dir.exists(), ); - QList<QFileInfo> entries = dir.entryInfoList(QDir::NoDotAndDotDot | QDir::System | QDir::Hidden | QDir::AllDirs | QDir::Files, QDir::DirsFirst); + QList<QFileInfo> entries = dir.entryInfoList(QDir::NoDotAndDotDot | QDir::System | QDir::Hidden | QDir::AllDirs | QDir::Files, QDir::DirsFirst); foreach(const QFileInfo& info, entries) { if (info.isDir()) { removeDir(info.absoluteFilePath(), os); @@ -361,13 +360,13 @@ void GUrlUtils::removeDir(const QString& dirPath, U2OpStatus& os) { QDir().rmdir(dirPath); } -void GUrlUtils::removeFile( const QString& filePath, U2OpStatus& os ){ +void GUrlUtils::removeFile(const QString& filePath, U2OpStatus& os) { CHECK_EXT(!filePath.isEmpty(), os.setError(tr("File path is not specified")), ); QFileInfo info(filePath); CHECK_EXT(!info.isDir(), os.setError(tr("Folder path instead of file path")), ); - if(info.exists()){ + if (info.exists()) { QFile::remove(info.absoluteFilePath()); } @@ -396,7 +395,7 @@ bool GUrlUtils::canWriteFile(const QString &path) { return res; } -QString GUrlUtils::getDefaultDataPath(){ +QString GUrlUtils::getDefaultDataPath() { QString res; QString path = AppContext::getAppSettings()->getUserAppsSettings()->getDefaultDataDirPath(); @@ -411,7 +410,7 @@ QString GUrlUtils::getDefaultDataPath(){ return res; } -QString GUrlUtils::getQuotedString( const QString& inString ){ +QString GUrlUtils::getQuotedString(const QString& inString) { if (inString.contains(QRegExp("\\s"))) { return "\"" + inString + "\""; } @@ -429,18 +428,18 @@ QString GUrlUtils::createDirectory(const QString &path, const QString &suffix, U } namespace { - QString getDotExtension(const DocumentFormatId &formatId) { - DocumentFormatRegistry *dfr = AppContext::getDocumentFormatRegistry(); - SAFE_POINT(NULL != dfr, "NULL document format registry", ""); +QString getDotExtension(const DocumentFormatId &formatId) { + DocumentFormatRegistry *dfr = AppContext::getDocumentFormatRegistry(); + SAFE_POINT(NULL != dfr, "NULL document format registry", ""); - DocumentFormat *format = AppContext::getDocumentFormatRegistry()->getFormatById(formatId); - CHECK(NULL != format, ""); + DocumentFormat *format = AppContext::getDocumentFormatRegistry()->getFormatById(formatId); + CHECK(NULL != format, ""); - QStringList results = format->getSupportedDocumentFileExtensions(); - CHECK(!results.isEmpty(), ""); + QStringList results = format->getSupportedDocumentFileExtensions(); + CHECK(!results.isEmpty(), ""); - return "." + results.first(); - } + return "." + results.first(); +} } void GUrlUtils::getLocalPathFromUrl(const GUrl &url, const QString &defaultBaseFileName, QString &dirPath, QString &baseFileName) { @@ -494,12 +493,12 @@ void GUrlUtils::validateLocalFileUrl(const GUrl &url, U2OpStatus &os, const QStr QString GUrlUtils::getPairedFastqFilesBaseName(const QString &sourceFileUrl, bool truncate) { static const QStringList pairedSuffixes = QStringList() << "-R1" << "-R2" - << "_1" << "_2" - << "_R1_001" << "_R2_001" - << "_R1" << "_R2"; + << "_1" << "_2" + << "_R1_001" << "_R2_001" + << "_R1" << "_R2"; QString baseName = QFileInfo(sourceFileUrl).completeBaseName(); if (truncate) { - foreach (const QString &suffix, pairedSuffixes) { + foreach(const QString &suffix, pairedSuffixes) { if (baseName.endsWith(suffix)) { baseName.chop(suffix.length()); break; diff --git a/src/corelibs/U2Core/src/util/GUrlUtils.h b/src/corelibs/U2Core/src/util/GUrlUtils.h index 797011696f3d5425cb45e9e4c8215f7152420658..549c5b623a05bf71acabca2859a601d87fa2ca12 100644 --- a/src/corelibs/U2Core/src/util/GUrlUtils.h +++ b/src/corelibs/U2Core/src/util/GUrlUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/GenbankFeatures.cpp b/src/corelibs/U2Core/src/util/GenbankFeatures.cpp index fd6dd8a8d02657bed6495fe74050752027d564c9..50e54246be6fccac4a4eed74604ca0c91a4c16aa 100644 --- a/src/corelibs/U2Core/src/util/GenbankFeatures.cpp +++ b/src/corelibs/U2Core/src/util/GenbankFeatures.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,7 +23,6 @@ #include <QHash> #include <QMutex> -#include <QMutexLocker> #include <U2Core/FeatureColors.h> @@ -49,7 +48,7 @@ const QString GBFeatureUtils::QUALIFIER_TRANSLATION = "translation"; static QColor cl(const QString& txt) { QColor res; if (txt != "000000") { - res.setNamedColor("#"+txt); + res.setNamedColor("#" + txt); } return res; } @@ -59,7 +58,7 @@ static QColor cl(const QString& txt) { features[key] = GBFeatureKeyInfo(key, type, text, color.isValid() ? color : FeatureColors::genLightColor(text), amino, desc); \ if (strlen(quals) > 0) { \ features[key].namingQuals = QString(quals).split(",", QString::SkipEmptyParts);\ - } + } #define FK(key, type, text, color, amino, desc) \ FKE(key, type, text, color, amino, desc, "label") @@ -73,90 +72,90 @@ const QVector<GBFeatureKeyInfo>& GBFeatureUtils::allKeys() { return features; } inited = true; - FK(GBFeatureKey_assembly_gap, U2FeatureTypes::AssemblyGap, "assemlby_gap", cl("000000"), false, QObject::tr("Gap between two components of a genome or transcriptome assembly")); - FK(GBFeatureKey_attenuator, U2FeatureTypes::Attenuator, "attenuator", cl("000000"), false, QObject::tr("Sequence related to transcription termination")); - FK(GBFeatureKey_bond, U2FeatureTypes::Disulfide, "Bond", cl("000000"), false, QObject::tr("Describes disulfide bonds (for protein files)")); - FK(GBFeatureKey_C_region, U2FeatureTypes::CRegion, "C_region", cl("000000"), false, QObject::tr("Span of the C immunological feature")); - FK(GBFeatureKey_CAAT_signal, U2FeatureTypes::CaatSignal, "CAAT_signal", cl("000000"), false, QObject::tr("`CAAT box' in eukaryotic promoters")); - FKE(GBFeatureKey_CDS, U2FeatureTypes::Cds, "CDS", cl("9bffff"), true, QObject::tr("Sequence coding for amino acids in protein (includes stop codon)"), + FK(GBFeatureKey_assembly_gap, U2FeatureTypes::AssemblyGap, "assemlby_gap", cl("000000"), false, QObject::tr("Gap between two components of a genome or transcriptome assembly")); + FK(GBFeatureKey_attenuator, U2FeatureTypes::Attenuator, "attenuator", cl("000000"), false, QObject::tr("Sequence related to transcription termination")); + FK(GBFeatureKey_bond, U2FeatureTypes::Disulfide, "Bond", cl("000000"), false, QObject::tr("Describes disulfide bonds (for protein files)")); + FK(GBFeatureKey_C_region, U2FeatureTypes::CRegion, "C_region", cl("000000"), false, QObject::tr("Span of the C immunological feature")); + FK(GBFeatureKey_CAAT_signal, U2FeatureTypes::CaatSignal, "CAAT_signal", cl("000000"), false, QObject::tr("`CAAT box' in eukaryotic promoters")); + FKE(GBFeatureKey_CDS, U2FeatureTypes::Cds, "CDS", cl("9bffff"), true, QObject::tr("Sequence coding for amino acids in protein (includes stop codon)"), "label,protein_id,locus_tag,gene,function,product"); - FK(GBFeatureKey_conflict, U2FeatureTypes::Conflict, "conflict", cl("000000"), false, QObject::tr("Independent sequence determinations differ")); - FK(GBFeatureKey_centromere, U2FeatureTypes::Centromere, "centromere", cl("000000"), false, QObject::tr("Region of biological interest identified as a centromere and which has been experimentally characterized")); - FK(GBFeatureKey_D_loop, U2FeatureTypes::DLoop, "D-loop", cl("000000"), false, QObject::tr("Displacement loop")); - FK(GBFeatureKey_D_segment, U2FeatureTypes::DSegment, "D_segment", cl("000000"), false, QObject::tr("Span of the D immunological feature")); - FK(GBFeatureKey_enhancer, U2FeatureTypes::Enhancer, "enhancer", cl("000000"), false, QObject::tr("Cis-acting enhancer of promoter function")); - FK(GBFeatureKey_exon, U2FeatureTypes::Exon, "exon", cl("000000"), false, QObject::tr("Region that codes for part of spliced mRNA")); - FK(GBFeatureKey_gap, U2FeatureTypes::Gap, "gap", cl("000000"), false, QObject::tr("Gap in the sequence")); - FKE(GBFeatureKey_gene, U2FeatureTypes::Gene, "gene", cl("00ffc8"), false, QObject::tr("Region that defines a functional gene, possibly including upstream (promotor, enhancer, etc) and downstream control elements, and for which a name has been assigned."), + FK(GBFeatureKey_conflict, U2FeatureTypes::Conflict, "conflict", cl("000000"), false, QObject::tr("Independent sequence determinations differ")); + FK(GBFeatureKey_centromere, U2FeatureTypes::Centromere, "centromere", cl("000000"), false, QObject::tr("Region of biological interest identified as a centromere and which has been experimentally characterized")); + FK(GBFeatureKey_D_loop, U2FeatureTypes::DLoop, "D-loop", cl("000000"), false, QObject::tr("Displacement loop")); + FK(GBFeatureKey_D_segment, U2FeatureTypes::DSegment, "D_segment", cl("000000"), false, QObject::tr("Span of the D immunological feature")); + FK(GBFeatureKey_enhancer, U2FeatureTypes::Enhancer, "enhancer", cl("000000"), false, QObject::tr("Cis-acting enhancer of promoter function")); + FK(GBFeatureKey_exon, U2FeatureTypes::Exon, "exon", cl("000000"), false, QObject::tr("Region that codes for part of spliced mRNA")); + FK(GBFeatureKey_gap, U2FeatureTypes::Gap, "gap", cl("000000"), false, QObject::tr("Gap in the sequence")); + FKE(GBFeatureKey_gene, U2FeatureTypes::Gene, "gene", cl("00ffc8"), false, QObject::tr("Region that defines a functional gene, possibly including upstream (promotor, enhancer, etc) and downstream control elements, and for which a name has been assigned."), "label,gene,locus_tag,product,function"); - FK(GBFeatureKey_GC_signal, U2FeatureTypes::GcSignal, "GC_signal", cl("000000"), false, QObject::tr("`GC box' in eukaryotic promoters")); - FK(GBFeatureKey_iDNA, U2FeatureTypes::IDna, "iDNA", cl("000000"), false, QObject::tr("Intervening DNA eliminated by recombination")); - FK(GBFeatureKey_intron, U2FeatureTypes::Intron, "intron", cl("000000"), false, QObject::tr("Transcribed region excised by mRNA splicing")); - FK(GBFeatureKey_J_region, U2FeatureTypes::JRegion, "J_region", cl("000000"), false, QObject::tr("Span of the J immunological feature")); - FK(GBFeatureKey_J_segment, U2FeatureTypes::JSegment, "J_segment", cl("000000"), false, QObject::tr("Joining segment of immunoglobulin light and heavy chains, and T-cell receptor alpha, beta, and gamma chains")); - FK(GBFeatureKey_LTR, U2FeatureTypes::Ltr, "LTR", cl("000000"), false, QObject::tr("Long terminal repeat")); - FK(GBFeatureKey_mat_peptide, U2FeatureTypes::MaturePeptide, "mat_peptide", cl("000000"), true, QObject::tr("Mature peptide coding region (does not include stop codon)")); - FK(GBFeatureKey_misc_binding, U2FeatureTypes::MiscBindingSite, "misc_binding", cl("000000"), false, QObject::tr("Miscellaneous binding site")); - FK(GBFeatureKey_misc_difference, U2FeatureTypes::MiscDifference, "misc_difference", cl("000000"), false, QObject::tr("Miscellaneous difference feature")); - FKE(GBFeatureKey_misc_feature, U2FeatureTypes::MiscFeature, "misc_feature", cl("000000"), false, QObject::tr("Region of biological significance that cannot be described by any other feature") + FK(GBFeatureKey_GC_signal, U2FeatureTypes::GcSignal, "GC_signal", cl("000000"), false, QObject::tr("`GC box' in eukaryotic promoters")); + FK(GBFeatureKey_iDNA, U2FeatureTypes::IDna, "iDNA", cl("000000"), false, QObject::tr("Intervening DNA eliminated by recombination")); + FK(GBFeatureKey_intron, U2FeatureTypes::Intron, "intron", cl("000000"), false, QObject::tr("Transcribed region excised by mRNA splicing")); + FK(GBFeatureKey_J_region, U2FeatureTypes::JRegion, "J_region", cl("000000"), false, QObject::tr("Span of the J immunological feature")); + FK(GBFeatureKey_J_segment, U2FeatureTypes::JSegment, "J_segment", cl("000000"), false, QObject::tr("Joining segment of immunoglobulin light and heavy chains, and T-cell receptor alpha, beta, and gamma chains")); + FK(GBFeatureKey_LTR, U2FeatureTypes::Ltr, "LTR", cl("000000"), false, QObject::tr("Long terminal repeat")); + FK(GBFeatureKey_mat_peptide, U2FeatureTypes::MaturePeptide, "mat_peptide", cl("000000"), true, QObject::tr("Mature peptide coding region (does not include stop codon)")); + FK(GBFeatureKey_misc_binding, U2FeatureTypes::MiscBindingSite, "misc_binding", cl("000000"), false, QObject::tr("Miscellaneous binding site")); + FK(GBFeatureKey_misc_difference, U2FeatureTypes::MiscDifference, "misc_difference", cl("000000"), false, QObject::tr("Miscellaneous difference feature")); + FKE(GBFeatureKey_misc_feature, U2FeatureTypes::MiscFeature, "misc_feature", cl("000000"), false, QObject::tr("Region of biological significance that cannot be described by any other feature") , "label,note"); - FK(GBFeatureKey_misc_recomb, U2FeatureTypes::MiscRecombination, "misc_recomb", cl("000000"), false, QObject::tr("Miscellaneous, recombination feature")); - FK(GBFeatureKey_misc_RNA, U2FeatureTypes::MiscRna, "misc_RNA", cl("000000"), false, QObject::tr("Miscellaneous transcript feature not defined by other RNA keys")); - FK(GBFeatureKey_misc_signal, U2FeatureTypes::MiscSignal, "misc_signal", cl("000000"), false, QObject::tr("Miscellaneous signal")); - FK(GBFeatureKey_misc_structure, U2FeatureTypes::MiscStructure, "misc_structure", cl("000000"), false, QObject::tr("Miscellaneous DNA or RNA structure")); - FK(GBFeatureKey_mobile_element, U2FeatureTypes::MobileElement, "mobile_element", cl("000000"), false, QObject::tr("Region of genome containing mobile elements")); - FK(GBFeatureKey_modified_base, U2FeatureTypes::ModifiedBase, "modified_base", cl("000000"), false, QObject::tr("The indicated base is a modified nucleotide")); - FK(GBFeatureKey_mRNA, U2FeatureTypes::MRna, "mRNA", cl("000000"), false, QObject::tr("Messenger RNA")); - FK(GBFeatureKey_ncRNA, U2FeatureTypes::NcRna, "ncRNA", cl("000000"), false, QObject::tr("A non-protein-coding gene, other than ribosomal RNA and transfer RNA, the functional molecule of which is the RNA transcrip")) - FK(GBFeatureKey_N_region, U2FeatureTypes::NRegion, "N_region", cl("000000"), false, QObject::tr("Span of the N immunological feature")); - FK(GBFeatureKey_old_sequence, U2FeatureTypes::OldSequence, "old_sequence", cl("000000"), false, QObject::tr("Presented sequence revises a previous version")); - FK(GBFeatureKey_operon, U2FeatureTypes::Operon, "operon", cl("000000"), false, QObject::tr("Region containing polycistronic transcript including a cluster of genes that are under the control of the same regulatory sequences/promotor and in the same biological pathway")); - FK(GBFeatureKey_oriT, U2FeatureTypes::OriT, "oriT", cl("000000"), false, QObject::tr("Origin of transfer; region of a DNA molecule where transfer is initiated during the process of conjugation or mobilization")); - FK(GBFeatureKey_polyA_signal, U2FeatureTypes::PolyASignal, "polyA_signal", cl("000000"), false, QObject::tr("Signal for cleavage & polyadenylation")); - FK(GBFeatureKey_polyA_site, U2FeatureTypes::PolyASite, "polyA_site", cl("000000"), false, QObject::tr("Site at which polyadenine is added to mRNA")); - FK(GBFeatureKey_precursor_RNA, U2FeatureTypes::PrecursorRna, "precursor_RNA", cl("000000"), false, QObject::tr("Any RNA species that is not yet the mature RNA product")); - FK(GBFeatureKey_prim_transcript, U2FeatureTypes::PrimaryTranscript, "prim_transcript", cl("000000"), false, QObject::tr("Primary (unprocessed) transcript")); - FK(GBFeatureKey_primer, U2FeatureTypes::Primer, "primer", cl("000000"), false, QObject::tr("Primer binding region used with PCR")); - FK(GBFeatureKey_primer_bind, U2FeatureTypes::PrimerBindingSite, "primer_bind", cl("000000"), false, QObject::tr("Non-covalent primer binding site")); - FK(GBFeatureKey_promoter, U2FeatureTypes::Promoter, "promoter", cl("000000"), false, QObject::tr("A region involved in transcription initiation")); - FK(GBFeatureKey_protein_bind, U2FeatureTypes::ProteinBindingSite, "protein_bind", cl("000000"), false, QObject::tr("Non-covalent protein binding site on DNA or RNA")); - FK(GBFeatureKey_RBS, U2FeatureTypes::Rbs, "RBS", cl("000000"), false, QObject::tr("Ribosome binding site")); - FK(GBFeatureKey_rep_origin, U2FeatureTypes::ReplicationOrigin, "rep_origin", cl("000000"), false, QObject::tr("Replication origin for duplex DNA")); - FK(GBFeatureKey_repeat_region, U2FeatureTypes::RepeatRegion, "repeat_region", cl("ccccff"), false, QObject::tr("Sequence containing repeated subsequences")); - FK(GBFeatureKey_repeat_unit, U2FeatureTypes::RepeatUnit, "repeat_unit", cl("ccccff"), false, QObject::tr("One repeated unit of a repeat_region")); - FK(GBFeatureKey_rRNA, U2FeatureTypes::RRna, "rRNA", cl("000000"), false, QObject::tr("Ribosomal RNA")); - FK(GBFeatureKey_S_region, U2FeatureTypes::SRegion, "S_region", cl("000000"), false, QObject::tr("Span of the S immunological feature")); - FK(GBFeatureKey_satellite, U2FeatureTypes::Satellite, "satellite", cl("000000"), false, QObject::tr("Satellite repeated sequence")); - FK(GBFeatureKey_scRNA, U2FeatureTypes::ScRna, "scRNA", cl("000000"), false, QObject::tr("Small cytoplasmic RNA")); - FK(GBFeatureKey_sig_peptide, U2FeatureTypes::SignalPeptide, "sig_peptide", cl("000000"), false, QObject::tr("Signal peptide coding region")); - FK(GBFeatureKey_snRNA, U2FeatureTypes::SnRna, "snRNA", cl("000000"), false, QObject::tr("Small nuclear RNA")); - FK(GBFeatureKey_source, U2FeatureTypes::Source, "source", cl("cccccc"), false, QObject::tr("Identifies the biological source of the specified span of the sequence")); - FK(GBFeatureKey_stem_loop, U2FeatureTypes::StemLoop, "stem_loop", cl("000000"), false, QObject::tr("Hair-pin loop structure in DNA or RNA")); - FK(GBFeatureKey_STS, U2FeatureTypes::Sts, "STS", cl("00dcdc"), false, QObject::tr("Sequence Tagged Site; operationally unique sequence that identifies the combination of primer spans used in a PCR assay")); - FK(GBFeatureKey_TATA_signal, U2FeatureTypes::TataSignal, "TATA_signal", cl("000000"), false, QObject::tr("`TATA box' in eukaryotic promoters")); - FK(GBFeatureKey_telomere, U2FeatureTypes::Telomere, "telomere", cl("000000"), false, QObject::tr("Region of biological interest identified as a telomere and which has been experimentally characterized")); - FK(GBFeatureKey_terminator, U2FeatureTypes::Terminator, "terminator", cl("000000"), false, QObject::tr("Sequence causing transcription termination")); - FK(GBFeatureKey_tmRNA, U2FeatureTypes::TmRna, "tmRNA", cl("000000"), false, QObject::tr("Transfer messenger RNA; tmRNA acts as a tRNA first, and then as an mRNA that encodes a peptide tag; the ribosome translates this mRNA region of tmRNA and attaches the encoded peptide tag to the C-terminus of the unfinished protein; this attached tag targets the protein for destruction or proteolysis")); - FK(GBFeatureKey_transit_peptide, U2FeatureTypes::TransitPeptide, "transit_peptide", cl("000000"), false, QObject::tr("Transit peptide coding region")); - FK(GBFeatureKey_transposon, U2FeatureTypes::Transposon, "transposon", cl("000000"), false, QObject::tr("Transposable element (TN)")); - FK(GBFeatureKey_tRNA, U2FeatureTypes::TRna, "tRNA", cl("c8fac8"), false, QObject::tr("Transfer RNA")); - FK(GBFeatureKey_unsure, U2FeatureTypes::Unsure, "unsure", cl("000000"), false, QObject::tr("Authors are unsure about the sequence in this region")); - FK(GBFeatureKey_V_region, U2FeatureTypes::VRegion, "V_region", cl("000000"), false, QObject::tr("Span of the V immunological feature")); - FK(GBFeatureKey_V_segment, U2FeatureTypes::VSegment, "V_segment", cl("000000"), false, QObject::tr("Variable segment of immunoglobulin light and heavy chains, and T-cell receptor alpha, beta, and gamma chains; codes for most of the variable region (V_region) and the last few amino acids of the leader peptide")); - FK(GBFeatureKey_variation, U2FeatureTypes::Variation, "variation", cl("e32636"), false, QObject::tr("A related population contains stable mutation")); - FK(GBFeatureKey__10_signal, U2FeatureTypes::Minus10Signal, "-10_signal", cl("000000"), false, QObject::tr("`Pribnow box' in prokaryotic promoters")); - FK(GBFeatureKey__35_signal, U2FeatureTypes::Minus35Signal, "-35_signal", cl("000000"), false, QObject::tr("`-35 box' in prokaryotic promoters")); - FK(GBFeatureKey_3_clip, U2FeatureTypes::ThreePrimeClip, "3'clip", cl("000000"), false, QObject::tr("3'-most region of a precursor transcript removed in processing")); - FK(GBFeatureKey_3_UTR, U2FeatureTypes::ThreePrimeUtr, "3'UTR", cl("ffcde6"), false, QObject::tr("3' untranslated region (trailer)")); - FK(GBFeatureKey_5_clip, U2FeatureTypes::FivePrimeClip, "5'clip", cl("000000"), false, QObject::tr("5'-most region of a precursor transcript removed in processing")); - FK(GBFeatureKey_5_UTR, U2FeatureTypes::FivePrimeUtr, "5'UTR", cl("ffc8c8"), false, QObject::tr("5' untranslated region (leader)")); - FK(GBFeatureKey_Protein, U2FeatureTypes::Protein, "Protein", cl("000000"), false, QObject::tr("'Protein' feature key")); - FK(GBFeatureKey_Region, U2FeatureTypes::Region, "Region", cl("000000"), false, QObject::tr("'Region' feature key")); - FK(GBFeatureKey_Site, U2FeatureTypes::Site, "Site", cl("000000"), false, QObject::tr("'Site' feature key")); - FK(GBFeatureKey_regulatory, U2FeatureTypes::Regulatory, "regulatory", cl("000000"), false, QObject::tr("Any region of sequence that functions in the regulation of transcription or translation")); + FK(GBFeatureKey_misc_recomb, U2FeatureTypes::MiscRecombination, "misc_recomb", cl("000000"), false, QObject::tr("Miscellaneous, recombination feature")); + FK(GBFeatureKey_misc_RNA, U2FeatureTypes::MiscRna, "misc_RNA", cl("000000"), false, QObject::tr("Miscellaneous transcript feature not defined by other RNA keys")); + FK(GBFeatureKey_misc_signal, U2FeatureTypes::MiscSignal, "misc_signal", cl("000000"), false, QObject::tr("Miscellaneous signal")); + FK(GBFeatureKey_misc_structure, U2FeatureTypes::MiscStructure, "misc_structure", cl("000000"), false, QObject::tr("Miscellaneous DNA or RNA structure")); + FK(GBFeatureKey_mobile_element, U2FeatureTypes::MobileElement, "mobile_element", cl("000000"), false, QObject::tr("Region of genome containing mobile elements")); + FK(GBFeatureKey_modified_base, U2FeatureTypes::ModifiedBase, "modified_base", cl("000000"), false, QObject::tr("The indicated base is a modified nucleotide")); + FK(GBFeatureKey_mRNA, U2FeatureTypes::MRna, "mRNA", cl("000000"), false, QObject::tr("Messenger RNA")); + FK(GBFeatureKey_ncRNA, U2FeatureTypes::NcRna, "ncRNA", cl("000000"), false, QObject::tr("A non-protein-coding gene, other than ribosomal RNA and transfer RNA, the functional molecule of which is the RNA transcrip")) + FK(GBFeatureKey_N_region, U2FeatureTypes::NRegion, "N_region", cl("000000"), false, QObject::tr("Span of the N immunological feature")); + FK(GBFeatureKey_old_sequence, U2FeatureTypes::OldSequence, "old_sequence", cl("000000"), false, QObject::tr("Presented sequence revises a previous version")); + FK(GBFeatureKey_operon, U2FeatureTypes::Operon, "operon", cl("000000"), false, QObject::tr("Region containing polycistronic transcript including a cluster of genes that are under the control of the same regulatory sequences/promotor and in the same biological pathway")); + FK(GBFeatureKey_oriT, U2FeatureTypes::OriT, "oriT", cl("000000"), false, QObject::tr("Origin of transfer; region of a DNA molecule where transfer is initiated during the process of conjugation or mobilization")); + FK(GBFeatureKey_polyA_signal, U2FeatureTypes::PolyASignal, "polyA_signal", cl("000000"), false, QObject::tr("Signal for cleavage & polyadenylation")); + FK(GBFeatureKey_polyA_site, U2FeatureTypes::PolyASite, "polyA_site", cl("000000"), false, QObject::tr("Site at which polyadenine is added to mRNA")); + FK(GBFeatureKey_precursor_RNA, U2FeatureTypes::PrecursorRna, "precursor_RNA", cl("000000"), false, QObject::tr("Any RNA species that is not yet the mature RNA product")); + FK(GBFeatureKey_prim_transcript, U2FeatureTypes::PrimaryTranscript, "prim_transcript", cl("000000"), false, QObject::tr("Primary (unprocessed) transcript")); + FK(GBFeatureKey_primer, U2FeatureTypes::Primer, "primer", cl("000000"), false, QObject::tr("Primer binding region used with PCR")); + FK(GBFeatureKey_primer_bind, U2FeatureTypes::PrimerBindingSite, "primer_bind", cl("000000"), false, QObject::tr("Non-covalent primer binding site")); + FK(GBFeatureKey_promoter, U2FeatureTypes::Promoter, "promoter", cl("000000"), false, QObject::tr("A region involved in transcription initiation")); + FK(GBFeatureKey_protein_bind, U2FeatureTypes::ProteinBindingSite, "protein_bind", cl("000000"), false, QObject::tr("Non-covalent protein binding site on DNA or RNA")); + FK(GBFeatureKey_RBS, U2FeatureTypes::Rbs, "RBS", cl("000000"), false, QObject::tr("Ribosome binding site")); + FK(GBFeatureKey_rep_origin, U2FeatureTypes::ReplicationOrigin, "rep_origin", cl("000000"), false, QObject::tr("Replication origin for duplex DNA")); + FK(GBFeatureKey_repeat_region, U2FeatureTypes::RepeatRegion, "repeat_region", cl("ccccff"), false, QObject::tr("Sequence containing repeated subsequences")); + FK(GBFeatureKey_repeat_unit, U2FeatureTypes::RepeatUnit, "repeat_unit", cl("ccccff"), false, QObject::tr("One repeated unit of a repeat_region")); + FK(GBFeatureKey_rRNA, U2FeatureTypes::RRna, "rRNA", cl("000000"), false, QObject::tr("Ribosomal RNA")); + FK(GBFeatureKey_S_region, U2FeatureTypes::SRegion, "S_region", cl("000000"), false, QObject::tr("Span of the S immunological feature")); + FK(GBFeatureKey_satellite, U2FeatureTypes::Satellite, "satellite", cl("000000"), false, QObject::tr("Satellite repeated sequence")); + FK(GBFeatureKey_scRNA, U2FeatureTypes::ScRna, "scRNA", cl("000000"), false, QObject::tr("Small cytoplasmic RNA")); + FK(GBFeatureKey_sig_peptide, U2FeatureTypes::SignalPeptide, "sig_peptide", cl("000000"), false, QObject::tr("Signal peptide coding region")); + FK(GBFeatureKey_snRNA, U2FeatureTypes::SnRna, "snRNA", cl("000000"), false, QObject::tr("Small nuclear RNA")); + FK(GBFeatureKey_source, U2FeatureTypes::Source, "source", cl("cccccc"), false, QObject::tr("Identifies the biological source of the specified span of the sequence")); + FK(GBFeatureKey_stem_loop, U2FeatureTypes::StemLoop, "stem_loop", cl("000000"), false, QObject::tr("Hair-pin loop structure in DNA or RNA")); + FK(GBFeatureKey_STS, U2FeatureTypes::Sts, "STS", cl("00dcdc"), false, QObject::tr("Sequence Tagged Site; operationally unique sequence that identifies the combination of primer spans used in a PCR assay")); + FK(GBFeatureKey_TATA_signal, U2FeatureTypes::TataSignal, "TATA_signal", cl("000000"), false, QObject::tr("`TATA box' in eukaryotic promoters")); + FK(GBFeatureKey_telomere, U2FeatureTypes::Telomere, "telomere", cl("000000"), false, QObject::tr("Region of biological interest identified as a telomere and which has been experimentally characterized")); + FK(GBFeatureKey_terminator, U2FeatureTypes::Terminator, "terminator", cl("000000"), false, QObject::tr("Sequence causing transcription termination")); + FK(GBFeatureKey_tmRNA, U2FeatureTypes::TmRna, "tmRNA", cl("000000"), false, QObject::tr("Transfer messenger RNA; tmRNA acts as a tRNA first, and then as an mRNA that encodes a peptide tag; the ribosome translates this mRNA region of tmRNA and attaches the encoded peptide tag to the C-terminus of the unfinished protein; this attached tag targets the protein for destruction or proteolysis")); + FK(GBFeatureKey_transit_peptide, U2FeatureTypes::TransitPeptide, "transit_peptide", cl("000000"), false, QObject::tr("Transit peptide coding region")); + FK(GBFeatureKey_transposon, U2FeatureTypes::Transposon, "transposon", cl("000000"), false, QObject::tr("Transposable element (TN)")); + FK(GBFeatureKey_tRNA, U2FeatureTypes::TRna, "tRNA", cl("c8fac8"), false, QObject::tr("Transfer RNA")); + FK(GBFeatureKey_unsure, U2FeatureTypes::Unsure, "unsure", cl("000000"), false, QObject::tr("Authors are unsure about the sequence in this region")); + FK(GBFeatureKey_V_region, U2FeatureTypes::VRegion, "V_region", cl("000000"), false, QObject::tr("Span of the V immunological feature")); + FK(GBFeatureKey_V_segment, U2FeatureTypes::VSegment, "V_segment", cl("000000"), false, QObject::tr("Variable segment of immunoglobulin light and heavy chains, and T-cell receptor alpha, beta, and gamma chains; codes for most of the variable region (V_region) and the last few amino acids of the leader peptide")); + FK(GBFeatureKey_variation, U2FeatureTypes::Variation, "variation", cl("e32636"), false, QObject::tr("A related population contains stable mutation")); + FK(GBFeatureKey__10_signal, U2FeatureTypes::Minus10Signal, "-10_signal", cl("000000"), false, QObject::tr("`Pribnow box' in prokaryotic promoters")); + FK(GBFeatureKey__35_signal, U2FeatureTypes::Minus35Signal, "-35_signal", cl("000000"), false, QObject::tr("`-35 box' in prokaryotic promoters")); + FK(GBFeatureKey_3_clip, U2FeatureTypes::ThreePrimeClip, "3'clip", cl("000000"), false, QObject::tr("3'-most region of a precursor transcript removed in processing")); + FK(GBFeatureKey_3_UTR, U2FeatureTypes::ThreePrimeUtr, "3'UTR", cl("ffcde6"), false, QObject::tr("3' untranslated region (trailer)")); + FK(GBFeatureKey_5_clip, U2FeatureTypes::FivePrimeClip, "5'clip", cl("000000"), false, QObject::tr("5'-most region of a precursor transcript removed in processing")); + FK(GBFeatureKey_5_UTR, U2FeatureTypes::FivePrimeUtr, "5'UTR", cl("ffc8c8"), false, QObject::tr("5' untranslated region (leader)")); + FK(GBFeatureKey_Protein, U2FeatureTypes::Protein, "Protein", cl("000000"), false, QObject::tr("'Protein' feature key")); + FK(GBFeatureKey_Region, U2FeatureTypes::Region, "Region", cl("000000"), false, QObject::tr("'Region' feature key")); + FK(GBFeatureKey_Site, U2FeatureTypes::Site, "Site", cl("000000"), false, QObject::tr("'Site' feature key")); + FK(GBFeatureKey_regulatory, U2FeatureTypes::Regulatory, "regulatory", cl("000000"), false, QObject::tr("Any region of sequence that functions in the regulation of transcription or translation")); #ifdef _DEBUG - for (int i=0; i<features.size(); i++) { + for (int i = 0; i < features.size(); i++) { assert(features[i].id != GBFeatureKey_UNKNOWN && features[i].id == i); assert(!features[i].text.isEmpty()); assert(!features[i].desc.isEmpty()); @@ -276,11 +275,11 @@ const QMultiMap<QString, GBFeatureKey>& GBFeatureUtils::getKeyGroups() { QVector<bool> featureInGroup(GBFeatureKey_NUM_KEYS, false); foreach(const QString& groupName, groups.keys()) { QList<GBFeatureKey> values = groups.values(groupName); - foreach (GBFeatureKey k, values) { + foreach(GBFeatureKey k, values) { featureInGroup[k] = true; } } - for (int i=0; i<GBFeatureKey_NUM_KEYS; i++) { + for (int i = 0; i < GBFeatureKey_NUM_KEYS; i++) { GBFeatureKey fk = GBFeatureKey(i); assert(featureInGroup[fk]); } @@ -289,10 +288,8 @@ const QMultiMap<QString, GBFeatureKey>& GBFeatureUtils::getKeyGroups() { return groups; } -bool GBFeatureUtils::isFeatureHasNoValue(const QString& featureName) -{ - if (featureName == "pseudo") - { +bool GBFeatureUtils::isFeatureHasNoValue(const QString& featureName) { + if (featureName == "pseudo") { return true; } return false; diff --git a/src/corelibs/U2Core/src/util/GenbankFeatures.h b/src/corelibs/U2Core/src/util/GenbankFeatures.h index cd71dae3fcc570f06e7242cadc44f4f6a69d2261..ecf903f0dd6b7038e48a478378a89b07d98695a0 100644 --- a/src/corelibs/U2Core/src/util/GenbankFeatures.h +++ b/src/corelibs/U2Core/src/util/GenbankFeatures.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/IOAdapterUtils.cpp b/src/corelibs/U2Core/src/util/IOAdapterUtils.cpp index e2e9a77017decd8d777efdd7b0f58817b219f9e4..45666fa6b5564f249b4e0caa02d5fcb8d5f5f665 100644 --- a/src/corelibs/U2Core/src/util/IOAdapterUtils.cpp +++ b/src/corelibs/U2Core/src/util/IOAdapterUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/IOAdapterUtils.h b/src/corelibs/U2Core/src/util/IOAdapterUtils.h index 23e4646a9dc625cf14247712aebaf8470c77bb43..b258e12398f4478ed30b07d4526bc82dbf6abb11 100644 --- a/src/corelibs/U2Core/src/util/IOAdapterUtils.h +++ b/src/corelibs/U2Core/src/util/IOAdapterUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/ImportToDatabaseOptions.cpp b/src/corelibs/U2Core/src/util/ImportToDatabaseOptions.cpp index a6cb33088726d28cccfdd5eac5fc18624b31a7ae..2342d115522c95509728889ba2ac0c8a64b74ebd 100644 --- a/src/corelibs/U2Core/src/util/ImportToDatabaseOptions.cpp +++ b/src/corelibs/U2Core/src/util/ImportToDatabaseOptions.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -21,8 +21,6 @@ #include <QFileInfo> -#include <U2Core/U2SafePoints.h> - #include "ImportToDatabaseOptions.h" namespace U2 { @@ -39,29 +37,27 @@ const QString ImportToDatabaseOptions::CREATE_SUBFOLDER_FOR_DOCUMENT = "create_s const QString ImportToDatabaseOptions::MERGE_MULTI_SEQUENCE_POLICY_SEPARATOR_SIZE = "merge_multi_sequence_policy_separator_size"; ImportToDatabaseOptions::ImportToDatabaseOptions() : - createSubfolderForEachDocument(true), - createSubfolderForEachFile(true), - createSubfolderForTopLevelFolder(false), - importUnknownAsUdr(false), - keepFileExtension(false), - keepFoldersStructure(true), - mergeMultiSequencePolicySeparatorSize(10), - multiSequencePolicy(SEPARATE), - processFoldersRecursively(true) -{ -} +createSubfolderForEachDocument(true), +createSubfolderForEachFile(true), +createSubfolderForTopLevelFolder(false), +importUnknownAsUdr(false), +keepFileExtension(false), +keepFoldersStructure(true), +mergeMultiSequencePolicySeparatorSize(10), +multiSequencePolicy(SEPARATE), +processFoldersRecursively(true) {} bool ImportToDatabaseOptions::operator == (const ImportToDatabaseOptions &other) const { return createSubfolderForEachDocument == other.createSubfolderForEachDocument && - createSubfolderForEachFile == other.createSubfolderForEachFile && - createSubfolderForTopLevelFolder == other.createSubfolderForTopLevelFolder && - importUnknownAsUdr == other.importUnknownAsUdr && - keepFileExtension == other.keepFileExtension && - keepFoldersStructure == other.keepFoldersStructure && - mergeMultiSequencePolicySeparatorSize == other.mergeMultiSequencePolicySeparatorSize && - multiSequencePolicy == other.multiSequencePolicy && - preferredFormats == other.preferredFormats && - processFoldersRecursively == other.processFoldersRecursively; + createSubfolderForEachFile == other.createSubfolderForEachFile && + createSubfolderForTopLevelFolder == other.createSubfolderForTopLevelFolder && + importUnknownAsUdr == other.importUnknownAsUdr && + keepFileExtension == other.keepFileExtension && + keepFoldersStructure == other.keepFoldersStructure && + mergeMultiSequencePolicySeparatorSize == other.mergeMultiSequencePolicySeparatorSize && + multiSequencePolicy == other.multiSequencePolicy && + preferredFormats == other.preferredFormats && + processFoldersRecursively == other.processFoldersRecursively; } bool ImportToDatabaseOptions::operator !=(const ImportToDatabaseOptions &other) const { diff --git a/src/corelibs/U2Core/src/util/ImportToDatabaseOptions.h b/src/corelibs/U2Core/src/util/ImportToDatabaseOptions.h index c458198f25daccf522d49d3c240dd022e03ed52b..029efece676ed1b6bb41dc38a06434d0fcbb20f3 100644 --- a/src/corelibs/U2Core/src/util/ImportToDatabaseOptions.h +++ b/src/corelibs/U2Core/src/util/ImportToDatabaseOptions.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/MSAUtils.cpp b/src/corelibs/U2Core/src/util/MSAUtils.cpp index 9269cb4616a9669335a00b12e89df5395d5204f9..d92bd483155b4e92efb9c4867b13f2e1134f469f 100644 --- a/src/corelibs/U2Core/src/util/MSAUtils.cpp +++ b/src/corelibs/U2Core/src/util/MSAUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -21,7 +21,6 @@ #include "MSAUtils.h" -#include <U2Core/DNAAlphabet.h> #include <U2Core/DNASequenceObject.h> #include <U2Core/GObject.h> #include <U2Core/MultipleSequenceAlignment.h> @@ -43,10 +42,10 @@ bool MSAUtils::equalsIgnoreGaps(const MultipleAlignmentRow& row, int startPos, c int pLen = pat.size(); int i = startPos; int gapsCounter = 0; - for (int j = 0; i < sLen && j < pLen; i++, j++) { + for (int j = 0; i < sLen && j < pLen; i++, j++) { char c1 = row->charAt(i); char c2 = pat[j]; - while(c1 == U2Msa::GAP_CHAR && ++i < sLen) { + while (c1 == U2Msa::GAP_CHAR && ++i < sLen) { gapsCounter++; c1 = row->charAt(i); } @@ -67,10 +66,10 @@ int MSAUtils::getPatternSimilarityIgnoreGaps(const MultipleSequenceAlignmentRow& int pLen = pat.size(); int i = startPos; int similarity = 0; - for (int j = 0; i < sLen && j < pLen; i++, j++) { + for (int j = 0; i < sLen && j < pLen; i++, j++) { char c1 = row->charAt(i); char c2 = pat[j]; - while(c1 == U2Msa::GAP_CHAR && ++i < sLen) { + while (c1 == U2Msa::GAP_CHAR && ++i < sLen) { c1 = row->charAt(i); } if (c1 == c2) { @@ -95,9 +94,8 @@ MultipleSequenceAlignment MSAUtils::seq2ma(const QList<DNASequence>& list, U2OpS namespace { MultipleSequenceAlignmentObject * prepareSequenceHeadersList(const QList<GObject *> &list, bool useGenbankHeader, QList<U2SequenceObject *> &dnaList, - QList<QString> &nameList) -{ - foreach (GObject *obj, list) { + QList<QString> &nameList) { + foreach(GObject *obj, list) { U2SequenceObject *dnaObj = qobject_cast<U2SequenceObject *>(obj); if (dnaObj == NULL) { if (MultipleSequenceAlignmentObject *maObj = qobject_cast<MultipleSequenceAlignmentObject *>(obj)) { @@ -178,7 +176,7 @@ void MSAUtils::updateAlignmentAlphabet(MultipleSequenceAlignment& ma, const DNAA } else { al = U2AlphabetUtils::deriveCommonAlphabet(al, alphabet); if (al == NULL) { - if (ma->getAlphabet() == NULL && alphabet == NULL){ + if (ma->getAlphabet() == NULL && alphabet == NULL) { os.setError(tr("Alphabets of the alignment and the sequence cannot be derived")); return; } @@ -212,6 +210,26 @@ QList<DNASequence> MSAUtils::ma2seq(const MultipleSequenceAlignment& ma, bool tr return lst; } +QList<DNASequence> MSAUtils::ma2seq(const MultipleSequenceAlignment& ma, bool trimGaps, const QSet<qint64>& rowIds) { + QBitArray gapCharMap = TextUtils::createBitMap(U2Msa::GAP_CHAR); + int len = ma->getLength(); + const DNAAlphabet* al = ma->getAlphabet(); + U2OpStatus2Log os; + QList<DNASequence> result; + foreach(const MultipleSequenceAlignmentRow& row, ma->getMsaRows()) { + if (rowIds.contains(row->getRowId())) { + DNASequence s(row->getName(), row->toByteArray(os, len), al); + if (trimGaps) { + int newLen = TextUtils::remove(s.seq.data(), s.length(), gapCharMap); + s.seq.resize(newLen); + } + result << s; + } + } + return result; +} + + bool MSAUtils::checkPackedModelSymmetry(const MultipleSequenceAlignment& ali, U2OpStatus& ti) { if (ali->getLength() == 0) { @@ -223,7 +241,7 @@ bool MSAUtils::checkPackedModelSymmetry(const MultipleSequenceAlignment& ali, U2 ti.setError(tr("Alignment is empty!")); return false; } - for (int i=0, n = ali->getNumRows(); i < n; i++) { + for (int i = 0, n = ali->getNumRows(); i < n; i++) { int rowCoreLength = ali->getMsaRow(i)->getCoreLength(); if (rowCoreLength > coreLen) { ti.setError(tr("Sequences in alignment have different sizes!")); @@ -250,7 +268,7 @@ namespace { bool listContainsSeqObject(const QList<GObject *> &objs, int &firstSeqObjPos) { int objectNumber = 0; - foreach (GObject *o, objs) { + foreach(GObject *o, objs) { if (o->getGObjectType() == GObjectTypes::SEQUENCE) { firstSeqObjPos = objectNumber; return true; @@ -302,10 +320,10 @@ MultipleSequenceAlignmentObject * MSAUtils::seqObjs2msaObj(const QList<GObject * return MultipleSequenceAlignmentImporter::createAlignment(dbiRef, dstFolder, ma, os, sequencesInDB); } -MultipleSequenceAlignmentObject* MSAUtils::seqDocs2msaObj(QList<Document*> docs, const QVariantMap& hints, U2OpStatus& os){ +MultipleSequenceAlignmentObject* MSAUtils::seqDocs2msaObj(QList<Document*> docs, const QVariantMap& hints, U2OpStatus& os) { CHECK(!docs.isEmpty(), NULL); QList<GObject*> objects; - foreach(Document* doc, docs){ + foreach(Document* doc, docs) { objects << doc->getObjects(); } return seqObjs2msaObj(objects, hints, os); @@ -319,7 +337,7 @@ QList<qint64> MSAUtils::compareRowsAfterAlignment(const MultipleSequenceAlignmen QString rowName = newMsaRow->getName().replace(" ", "_"); bool rowFound = false; - foreach (const MultipleSequenceAlignmentRow &origMsaRow, origMsaRows) { + foreach(const MultipleSequenceAlignmentRow &origMsaRow, origMsaRows) { if (origMsaRow->getName().replace(" ", "_") == rowName && origMsaRow->getSequence().seq == newMsaRow->getSequence().seq) { rowFound = true; qint64 rowId = origMsaRow->getRowDbInfo().rowId; @@ -407,12 +425,12 @@ MultipleSequenceAlignment MSAUtils::setUniqueRowNames(const MultipleSequenceAlig bool MSAUtils::restoreRowNames(MultipleSequenceAlignment &ma, const QStringList &names) { int rowNumber = ma->getNumRows(); - CHECK( rowNumber == names.size(), false); + CHECK(rowNumber == names.size(), false); QStringList oldNames = ma->getRowNames(); for (int i = 0; i < rowNumber; i++) { int idx = oldNames[i].toInt(); - CHECK( 0 <= idx && idx <= rowNumber, false); + CHECK(0 <= idx && idx <= rowNumber, false); ma->renameRow(i, names[idx]); } return true; diff --git a/src/corelibs/U2Core/src/util/MSAUtils.h b/src/corelibs/U2Core/src/util/MSAUtils.h index 8262b7fdcd1672013e06f23254859479dc5462c3..2417254bc5e1e78d4d4e71d7a67d30334167de49 100644 --- a/src/corelibs/U2Core/src/util/MSAUtils.h +++ b/src/corelibs/U2Core/src/util/MSAUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,7 +22,8 @@ #ifndef _U2_MSA_UTILS_H_ #define _U2_MSA_UTILS_H_ -#include <U2Core/DNASequence.h> +#include <QSet> + #include <U2Core/DocumentModel.h> #include <U2Core/MultipleSequenceAlignmentObject.h> @@ -42,6 +43,8 @@ public: static QList<DNASequence> ma2seq(const MultipleSequenceAlignment& ma, bool trimGaps); + static QList<DNASequence> ma2seq(const MultipleSequenceAlignment& ma, bool trimGaps, const QSet<qint64>& rowIds); + // sets alphabet if no alignment alphabet was set; checks is the new alphabet equal old alphabet, otherwise sets error static void updateAlignmentAlphabet(MultipleSequenceAlignment& ma, const DNAAlphabet* a, U2OpStatus& os); diff --git a/src/corelibs/U2Core/src/util/MaIterator.cpp b/src/corelibs/U2Core/src/util/MaIterator.cpp index dc253533bd0591203f3962a8123df30e4916a455..11584cde36068bd7a0c149d4eac5bee56a66be16 100644 --- a/src/corelibs/U2Core/src/util/MaIterator.cpp +++ b/src/corelibs/U2Core/src/util/MaIterator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,6 +19,8 @@ * MA 02110-1301, USA. */ +#include <QPoint> + #include <U2Core/U2SafePoints.h> #include "MaIterator.h" @@ -134,10 +136,8 @@ int MaIterator::getStep(qint64 position) const { switch (direction) { case Forward: return row->getCoreEnd() <= columnNumber ? ma->getLength() - columnNumber : 1; - break; case Backward: return row->getCoreStart() >= columnNumber ? ma->getLength() - columnNumber : 1; - break; default: FAIL("An unknown direction", 1); } diff --git a/src/corelibs/U2Core/src/util/MaIterator.h b/src/corelibs/U2Core/src/util/MaIterator.h index e290f3f291adda4423333eee6d8d9290b8d41f1b..457f45d41f0e15890bb8035bdc3e1483e9048454 100644 --- a/src/corelibs/U2Core/src/util/MaIterator.h +++ b/src/corelibs/U2Core/src/util/MaIterator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,8 +22,6 @@ #ifndef _MA_ITERATOR_H_ #define _MA_ITERATOR_H_ -#include <QPoint> - #include <U2Core/MultipleAlignment.h> namespace U2 { diff --git a/src/corelibs/U2Core/src/util/MaModificationInfo.cpp b/src/corelibs/U2Core/src/util/MaModificationInfo.cpp index 522e50410d12b894cb45d8f0268d3634553a34bf..b2be3fdfa14ad1d6f578e1bfd5a33d3965b0cd38 100644 --- a/src/corelibs/U2Core/src/util/MaModificationInfo.cpp +++ b/src/corelibs/U2Core/src/util/MaModificationInfo.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/MaModificationInfo.h b/src/corelibs/U2Core/src/util/MaModificationInfo.h index 092090a035fc3c46ba8f69fdefd00220b4d8cace..2777ef10a58677f4e83c55b73ffbe958852f9c54 100644 --- a/src/corelibs/U2Core/src/util/MaModificationInfo.h +++ b/src/corelibs/U2Core/src/util/MaModificationInfo.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/McaDbiUtils.cpp b/src/corelibs/U2Core/src/util/McaDbiUtils.cpp index bd9fd2434a80ba8917170cb942e450e38d544066..3039022e3797d222b208bcd1daa46cb23174c35a 100644 --- a/src/corelibs/U2Core/src/util/McaDbiUtils.cpp +++ b/src/corelibs/U2Core/src/util/McaDbiUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -21,14 +21,11 @@ #include <U2Core/ChromatogramUtils.h> #include <U2Core/DatatypeSerializeUtils.h> -#include <U2Core/DbiConnection.h> #include <U2Core/DNAAlphabet.h> #include <U2Core/DNAChromatogram.h> #include <U2Core/DNASequence.h> -#include <U2Core/McaRowInnerData.h> #include <U2Core/MsaDbiUtils.h> #include <U2Core/MultipleChromatogramAlignment.h> -#include <U2Core/RawDataUdrSchema.h> #include <U2Core/U2AttributeDbi.h> #include <U2Core/U2ObjectDbi.h> #include <U2Core/U2OpStatus.h> @@ -88,7 +85,7 @@ void McaDbiUtils::updateMca(U2OpStatus &os, const U2EntityRef &mcaRef, const Mul // TODO: get the mca folder and create child objects there const QString dbFolder = U2ObjectDbi::ROOT_FOLDER; - foreach (const U2McaRow ¤tRow, currentRows) { + foreach(const U2McaRow ¤tRow, currentRows) { currentRowIds << currentRow.rowId; // Update data for rows with the same row and child objects IDs @@ -163,7 +160,7 @@ void McaDbiUtils::updateMca(U2OpStatus &os, const U2EntityRef &mcaRef, const Mul //// UPDATE ALIGNMENT ATTRIBUTES QVariantMap info = mca->getInfo(); - foreach (const QString &key, info.keys()) { + foreach(const QString &key, info.keys()) { QString value = info.value(key).toString(); U2StringAttribute attribute(mcaRef.entityId, key, value); @@ -204,7 +201,7 @@ QList<U2McaRow> McaDbiUtils::getMcaRows(U2OpStatus &os, const U2EntityRef &mcaRe const QList<U2MsaRow> msaRows = msaDbi->getRows(mcaRef.entityId, os); CHECK_OP(os, mcaRows); - foreach (const U2MsaRow &msaRow, msaRows) { + foreach(const U2MsaRow &msaRow, msaRows) { U2McaRow mcaRow(msaRow); mcaRow.chromatogramId = ChromatogramUtils::getChromatogramIdByRelatedSequenceId(os, U2EntityRef(mcaRef.dbiRef, msaRow.sequenceId)).entityId; CHECK_OP(os, mcaRows); @@ -259,7 +256,7 @@ void McaDbiUtils::removeCharacters(const U2EntityRef &mcaRef, const QList<qint64 CHECK_OP(os, ); // Remove region for each row from the list - foreach (qint64 rowId, rowIds) { + foreach(qint64 rowId, rowIds) { U2McaRow row = getMcaRow(os, mcaRef, rowId); SAFE_POINT_OP(os, ); @@ -269,10 +266,10 @@ void McaDbiUtils::removeCharacters(const U2EntityRef &mcaRef, const QList<qint64 if (U2Msa::GAP_CHAR != MsaRowUtils::charAt(seq, row.gaps, pos)) { qint64 startPosInSeq = -1; - qint64 endPosInSeq= -1; + qint64 endPosInSeq = -1; MaDbiUtils::getStartAndEndSequencePositions(seq, row.gaps, - pos, count, - startPosInSeq, endPosInSeq); + pos, count, + startPosInSeq, endPosInSeq); DNAChromatogram chrom = ChromatogramUtils::exportChromatogram(os, U2EntityRef(mcaRef.dbiRef, row.chromatogramId)); ChromatogramUtils::removeBaseCalls(os, chrom, startPosInSeq, endPosInSeq); @@ -303,7 +300,7 @@ void McaDbiUtils::replaceCharacterInRow(const U2EntityRef& mcaRef, qint64 rowId, U2McaRow row = getMcaRow(os, mcaRef, rowId); CHECK_OP(os, ); qint64 msaLength = msaDbi->getMsaLength(mcaRef.entityId, os); - CHECK(pos < msaLength,); + CHECK(pos < msaLength, ); U2Region seqReg(0, row.length); QByteArray seq = sequenceDbi->getSequenceData(row.sequenceId, seqReg, os); @@ -358,8 +355,8 @@ void McaDbiUtils::removeRegion(const U2EntityRef& entityRef, const qint64 rowId, qint64 startPosInSeq = -1; qint64 endPosInSeq = -1; MaDbiUtils::getStartAndEndSequencePositions(seq, row.gaps, - pos, count, - startPosInSeq, endPosInSeq); + pos, count, + startPosInSeq, endPosInSeq); DNAChromatogram chrom = ChromatogramUtils::exportChromatogram(os, U2EntityRef(entityRef.dbiRef, row.chromatogramId)); ChromatogramUtils::removeRegion(os, chrom, startPosInSeq, endPosInSeq); diff --git a/src/corelibs/U2Core/src/util/McaDbiUtils.h b/src/corelibs/U2Core/src/util/McaDbiUtils.h index 014dd981fc6d08dcc1cca0e6f973329c03ff1945..b740818d751f2575f7720df92f52b59ad28998e5 100644 --- a/src/corelibs/U2Core/src/util/McaDbiUtils.h +++ b/src/corelibs/U2Core/src/util/McaDbiUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,9 +22,6 @@ #ifndef _U2_MCA_DBI_UTILS_H_ #define _U2_MCA_DBI_UTILS_H_ -#include <U2Core/U2Alphabet.h> -#include <U2Core/U2Msa.h> - namespace U2 { class MultipleChromatogramAlignment; diff --git a/src/corelibs/U2Core/src/util/McaRowInnerData.cpp b/src/corelibs/U2Core/src/util/McaRowInnerData.cpp index b1228ad6627505fcc5372b27a54d04be31f515c2..0ea1a882eafcff0d5da9db7a23ac8d103f9c8e6a 100644 --- a/src/corelibs/U2Core/src/util/McaRowInnerData.cpp +++ b/src/corelibs/U2Core/src/util/McaRowInnerData.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/McaRowInnerData.h b/src/corelibs/U2Core/src/util/McaRowInnerData.h index 16823227a401a8d6548bba37af6d7cdd7dc55a5d..c91e195d2b2dd083b2546c7386090be62c53b9a4 100644 --- a/src/corelibs/U2Core/src/util/McaRowInnerData.h +++ b/src/corelibs/U2Core/src/util/McaRowInnerData.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/MsaDbiUtils.cpp b/src/corelibs/U2Core/src/util/MsaDbiUtils.cpp index 34d7fee322383f8b325ce8c1ebfe484ba1d5466a..ad5a08567bd7ade9250be563a8fca0f3d9bf441c 100644 --- a/src/corelibs/U2Core/src/util/MsaDbiUtils.cpp +++ b/src/corelibs/U2Core/src/util/MsaDbiUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,8 +26,6 @@ #include <U2Core/U2AlphabetUtils.h> #include <U2Core/U2AttributeDbi.h> #include <U2Core/U2DbiUtils.h> -#include <U2Core/U2MsaDbi.h> -#include <U2Core/U2ObjectDbi.h> #include <U2Core/U2OpStatusUtils.h> #include <U2Core/U2SafePoints.h> #include <U2Core/U2SequenceDbi.h> @@ -64,8 +62,7 @@ void MaDbiUtils::splitBytesToCharsAndGaps(const QByteArray& input, QByteArray& s for (int i = 0; i < input.count(); ++i) { // A char - if ((U2Msa::GAP_CHAR != input.at(i))) - { + if ((U2Msa::GAP_CHAR != input.at(i))) { if (previousCharIsGap) { U2MsaGap gap(gapsOffset, gapsCount); gapModel.append(gap); @@ -141,7 +138,7 @@ U2AlphabetId MaDbiUtils::getMaAlphabet(const U2EntityRef& maRef, U2OpStatus& os) void MaDbiUtils::updateMaAlphabet(const U2EntityRef& maRef, const U2AlphabetId& alphabet, U2OpStatus& os) { // Prepare the connection - SAFE_POINT_EXT(alphabet.isValid(), os.setError("Invalid alphabet was passed !"),); + SAFE_POINT_EXT(alphabet.isValid(), os.setError("Invalid alphabet was passed !"), ); DbiConnection con(maRef.dbiRef, os); CHECK_OP(os, ); @@ -162,7 +159,7 @@ void MaDbiUtils::renameMa(const U2EntityRef& maRef, const QString& newName, U2Op CHECK_OP(os, ); U2MsaDbi* msaDbi = con.dbi->getMsaDbi(); - SAFE_POINT(NULL != msaDbi, "NULL Msa Dbi!",); + SAFE_POINT(NULL != msaDbi, "NULL Msa Dbi!", ); // Update the name msaDbi->updateMsaName(maRef.entityId, newName, os); @@ -202,7 +199,7 @@ void MaDbiUtils::renameRow(const U2EntityRef& msaRef, qint64 rowId, const QStrin CHECK_OP(os, ); U2MsaDbi* msaDbi = con.dbi->getMsaDbi(); - SAFE_POINT(NULL != msaDbi, "NULL Msa Dbi!",); + SAFE_POINT(NULL != msaDbi, "NULL Msa Dbi!", ); // Update the row name msaDbi->updateRowName(msaRef.entityId, rowId, newName, os); @@ -273,7 +270,7 @@ void MaDbiUtils::moveRows(const U2EntityRef& msaRef, const QList<qint64>& rowsTo } } QPair<int, int> coords; - foreach (coords, from_To) { + foreach(coords, from_To) { rowIds.move(coords.first, coords.second); } msaDbi->setNewRowsOrder(msaRef.entityId, rowIds, os); @@ -298,8 +295,7 @@ void MaDbiUtils::getStartAndEndSequencePositions(const QByteArray &seq, const QL i++; } startPosInSeq = MsaRowUtils::getUngappedPosition(gaps, seq.length(), pos + i); - } - else { + } else { startPosInSeq = MsaRowUtils::getUngappedPosition(gaps, seq.length(), pos); } @@ -312,8 +308,7 @@ void MaDbiUtils::getStartAndEndSequencePositions(const QByteArray &seq, const QL if (endRegionPos == rowLengthWithoutTrailingGap) { endPosInSeq = seq.length(); - } - else { + } else { if (U2Msa::GAP_CHAR == MsaRowUtils::charAt(seq, gaps, endRegionPos)) { int i = 1; while (U2Msa::GAP_CHAR == MsaRowUtils::charAt(seq, gaps, endRegionPos + i)) { @@ -323,8 +318,7 @@ void MaDbiUtils::getStartAndEndSequencePositions(const QByteArray &seq, const QL i++; } endPosInSeq = MsaRowUtils::getUngappedPosition(gaps, seq.length(), endRegionPos + i); - } - else { + } else { endPosInSeq = MsaRowUtils::getUngappedPosition(gaps, seq.length(), endRegionPos); } } @@ -354,7 +348,7 @@ DbiConnection * MaDbiUtils::getCheckedConnection(const U2DbiRef &dbiRef, U2OpSta /** Validates that all 'rowIds' contains in the alignment rows */ bool MaDbiUtils::validateRowIds(const MultipleSequenceAlignment& al, const QList<qint64>& rowIds) { QList<qint64> alRowIds = al->getRowsIds(); - foreach (qint64 rowId, rowIds) { + foreach(qint64 rowId, rowIds) { if (!alRowIds.contains(rowId)) { coreLog.trace(QString("No row ID '%1' in '%2' alignment!").arg(rowId).arg(al->getName())); return false; @@ -367,10 +361,10 @@ void MaDbiUtils::validateRowIds(U2MsaDbi *msaDbi, const U2DataId &msaId, const Q QList<U2MsaRow> allRows = msaDbi->getRows(msaId, os); CHECK_OP(os, ); QList<qint64> allRowIds; - foreach (const U2MsaRow &row, allRows) { + foreach(const U2MsaRow &row, allRows) { allRowIds << row.rowId; } - foreach (qint64 rowId, rowIds) { + foreach(qint64 rowId, rowIds) { if (!allRowIds.contains(rowId)) { os.setError(QString("No row ID '%1' in an alignment!").arg(rowId)); return; @@ -398,8 +392,7 @@ void MsaDbiUtils::calculateGapModelAfterInsert(QList<U2MsaGap>& gapModel, qint64 U2MsaGap& firstGap = gapModel[0]; if (0 == firstGap.offset) { firstGap.gap += count; - } - else { + } else { U2MsaGap beginningGap(0, count); gapModel.insert(0, beginningGap); } @@ -416,8 +409,7 @@ void MsaDbiUtils::calculateGapModelAfterInsert(QList<U2MsaGap>& gapModel, qint64 else { // A gap is near if (gapInPosition(gapModel, pos) || - gapInPosition(gapModel, pos - 1)) - { + gapInPosition(gapModel, pos - 1)) { // Find the gaps and append 'count' gaps to it // Shift all gaps that further in the row for (int i = 0; i < gapModel.count(); ++i) { @@ -425,8 +417,7 @@ void MsaDbiUtils::calculateGapModelAfterInsert(QList<U2MsaGap>& gapModel, qint64 if (pos <= gapModel[i].offset + gapModel[i].gap) { gapModel[i].gap += count; } - } - else { + } else { gapModel[i].offset += count; } } @@ -439,8 +430,7 @@ void MsaDbiUtils::calculateGapModelAfterInsert(QList<U2MsaGap>& gapModel, qint64 for (int i = 0; i < gapModel.count(); ++i) { if (pos > gapModel[i].offset + gapModel[i].gap) { continue; - } - else { + } else { found = true; U2MsaGap newGap(pos, count); gapModel.insert(i, newGap); @@ -474,10 +464,9 @@ QList<U2MsaRow> MsaDbiUtils::cutOffLeadingGaps(QList<U2MsaRow>& rows) { // If some rows haven't any gaps // If some rows first gap's offset isn't zero // return - if ( leadingGapsToRemove == 0 + if (leadingGapsToRemove == 0 || true == rows[i].gaps.isEmpty() - || rows[i].gaps.first().offset != 0 ) - { + || rows[i].gaps.first().offset != 0) { leadingGapsToRemove = 0; return QList<U2MsaRow>(); } @@ -486,7 +475,7 @@ QList<U2MsaRow> MsaDbiUtils::cutOffLeadingGaps(QList<U2MsaRow>& rows) { // If there is any leading gaps after all, they should be removed. if (leadingGapsToRemove != 0) { - for (qint64 i = 0; i < rows.length(); ++i) { + for (qint64 i = 0; i < rows.length(); ++i) { calculateGapModelAfterRemove(rows[i].gaps, 0, leadingGapsToRemove); } } @@ -505,16 +494,14 @@ QList<U2MsaRow> MsaDbiUtils::cutOffTrailingGaps(QList<U2MsaRow>& rows, const qin for (int gapReverseIndex = rowIt->gaps.size() - 1; gapReverseIndex >= 0 && gapReverseIndex < rowIt->gaps.size() && rowIt->gaps.at(gapReverseIndex).offset > msaLength - 1; - --gapReverseIndex) - { + --gapReverseIndex) { rowIt->gaps.removeAt(gapReverseIndex++); affectedRows << *rowIt; } // Cut off all gaps with offset before msa length and end after msa length if (!rowIt->gaps.isEmpty() - && rowIt->gaps.last().gap + rowIt->gaps.last().offset > msaLength) - { + && rowIt->gaps.last().gap + rowIt->gaps.last().offset > msaLength) { rowIt->gaps.last().gap = msaLength - rowIt->gaps.last().offset; affectedRows << *rowIt; } @@ -525,33 +512,28 @@ QList<U2MsaRow> MsaDbiUtils::cutOffTrailingGaps(QList<U2MsaRow>& rows, const qin void MsaDbiUtils::calculateGapModelAfterRemove(QList<U2MsaGap>& gapModel, qint64 pos, qint64 count) { QList<U2MsaGap> newGapModel; qint64 endRegionPos = pos + count; // non-inclusive - foreach (U2MsaGap gap, gapModel) - { + foreach(U2MsaGap gap, gapModel) { qint64 gapEnd = gap.offset + gap.gap; if (gapEnd < pos) { newGapModel << gap; - } - else if (gapEnd <= endRegionPos) { + } else if (gapEnd <= endRegionPos) { if (gap.offset < pos) { gap.gap = pos - gap.offset; newGapModel << gap; } // Otherwise just remove the gap (do not write to the new gap model) - } - else { + } else { if (gap.offset < pos) { gap.gap -= count; SAFE_POINT(gap.gap >= 0, "Non-positive gap length!", ); newGapModel << gap; - } - else if (gap.offset < endRegionPos) { + } else if (gap.offset < endRegionPos) { gap.gap = gapEnd - endRegionPos; gap.offset = pos; SAFE_POINT(gap.gap > 0, "Non-positive gap length!", ); SAFE_POINT(gap.offset >= 0, "Negative gap offset!", ); newGapModel << gap; - } - else { + } else { // Shift the gap gap.offset -= count; SAFE_POINT(gap.offset >= 0, "Negative gap offset!", ); @@ -565,7 +547,7 @@ void MsaDbiUtils::calculateGapModelAfterRemove(QList<U2MsaGap>& gapModel, qint64 qint64 MsaDbiUtils::calculateGapsLength(const QList<U2MsaGap>& gapModel) { qint64 length = 0; - foreach (U2MsaGap elt, gapModel) { + foreach(U2MsaGap elt, gapModel) { length += elt.gap; } return length; @@ -590,14 +572,13 @@ void MsaDbiUtils::mergeConsecutiveGaps(QList<U2MsaGap>& gapModel) { newGapModel[indexInNewGapModel].gap - 1; int currectGapStart = gapModel[i].offset; SAFE_POINT(currectGapStart > previousGapEnd, - "Incorrect gap model during merging consecutive gaps!",); + "Incorrect gap model during merging consecutive gaps!", ); if (currectGapStart == previousGapEnd + 1) { // Merge gaps qint64 newGapLength = newGapModel[indexInNewGapModel].gap + gapModel[i].gap; SAFE_POINT(newGapLength > 0, "Non-positive gap length!", ) newGapModel[indexInNewGapModel].gap = newGapLength; - } - else { + } else { // Add the gap to the list newGapModel << gapModel[i]; indexInNewGapModel++; @@ -702,8 +683,8 @@ void MsaDbiUtils::replaceCharInRow(QByteArray &seq, QList<U2MsaGap> &gaps, qint6 } void MsaDbiUtils::cropCharsFromRow(MultipleSequenceAlignmentRow& alRow, qint64 pos, qint64 count) { - SAFE_POINT(pos >= 0, "Incorrect position!",); - SAFE_POINT(count > 0, "Incorrect characters count!",); + SAFE_POINT(pos >= 0, "Incorrect position!", ); + SAFE_POINT(count > 0, "Incorrect characters count!", ); // Change the sequence qint64 initialRowLength = alRow->getRowLength(); @@ -712,8 +693,7 @@ void MsaDbiUtils::cropCharsFromRow(MultipleSequenceAlignmentRow& alRow, qint64 p if (pos >= alRow->getRowLengthWithoutTrailing()) { DNASequenceUtils::makeEmpty(modifiedSeq); - } - else { + } else { qint64 startPosInSeq = -1; qint64 endPosInSeq = -1; MaDbiUtils::getStartAndEndSequencePositions(alRow->getSequence().seq, alRow->getGapModel(), @@ -721,10 +701,9 @@ void MsaDbiUtils::cropCharsFromRow(MultipleSequenceAlignmentRow& alRow, qint64 p startPosInSeq, endPosInSeq); // Remove inside a gap - if ((startPosInSeq <= endPosInSeq) && (-1 != startPosInSeq) && (-1 != endPosInSeq)) - { + if ((startPosInSeq <= endPosInSeq) && (-1 != startPosInSeq) && (-1 != endPosInSeq)) { U2OpStatus2Log os; - if (endPosInSeq < initialSeqLength){ + if (endPosInSeq < initialSeqLength) { DNASequenceUtils::removeChars(modifiedSeq, endPosInSeq, initialSeqLength, os); SAFE_POINT_OP(os, ); } @@ -752,7 +731,7 @@ void MsaDbiUtils::cropCharsFromRow(MultipleSequenceAlignmentRow& alRow, qint64 p /** Returns "true" if there is a gap on position "pos" */ bool MsaDbiUtils::gapInPosition(const QList<U2MsaGap>& gapModel, qint64 pos) { - foreach (const U2MsaGap& gap, gapModel) { + foreach(const U2MsaGap& gap, gapModel) { if (gap.offset + gap.gap - 1 < pos) { continue; } @@ -811,7 +790,7 @@ void MsaDbiUtils::updateMsa(const U2EntityRef& msaRef, const MultipleSequenceAli QList<qint64> newRowsIds = al->getRowsIds(); QList<qint64> eliminatedRows; - foreach (const U2MsaRow ¤tRow, currentRows) { + foreach(const U2MsaRow ¤tRow, currentRows) { currentRowIds.append(currentRow.rowId); // Update data for rows with the same row and sequence IDs @@ -894,7 +873,7 @@ void MsaDbiUtils::updateMsa(const U2EntityRef& msaRef, const MultipleSequenceAli //// UPDATE MALIGNMENT ATTRIBUTES QVariantMap alInfo = al->getInfo(); - foreach (QString key, alInfo.keys()) { + foreach(QString key, alInfo.keys()) { QString val = alInfo.value(key).value<QString>(); U2StringAttribute attr(msaRef.entityId, key, val); @@ -904,8 +883,8 @@ void MsaDbiUtils::updateMsa(const U2EntityRef& msaRef, const MultipleSequenceAli } void MsaDbiUtils::updateRowContent(const U2EntityRef& msaRef, qint64 rowId, - const QByteArray& seqBytes, const QList<U2MsaGap>& gaps, - U2OpStatus& os) { + const QByteArray& seqBytes, const QList<U2MsaGap>& gaps, + U2OpStatus& os) { // Prepare the connection DbiConnection con(msaRef.dbiRef, os); CHECK_OP(os, ); @@ -923,7 +902,7 @@ void MsaDbiUtils::insertGaps(const U2EntityRef& msaRef, const QList<qint64>& row CHECK_OP(os, ); U2MsaDbi *msaDbi = con.dbi->getMsaDbi(); - SAFE_POINT(NULL != msaDbi, "NULL Msa Dbi!",); + SAFE_POINT(NULL != msaDbi, "NULL Msa Dbi!", ); // Get the MSA properties const U2Msa msaObj = msaDbi->getMsaObject(msaRef.entityId, os); @@ -945,7 +924,7 @@ void MsaDbiUtils::insertGaps(const U2EntityRef& msaRef, const QList<qint64>& row // Insert gaps into rows QList<U2MsaRow> rows; - foreach (qint64 rowId, rowIds) { + foreach(qint64 rowId, rowIds) { const U2MsaRow row = msaDbi->getRow(msaRef.entityId, rowId, os); CHECK_OP(os, ); @@ -953,7 +932,7 @@ void MsaDbiUtils::insertGaps(const U2EntityRef& msaRef, const QList<qint64>& row } int trailingGapsColumns = count; - foreach (U2MsaRow row, rows) { + foreach(U2MsaRow row, rows) { // Calculate the new gap model calculateGapModelAfterInsert(row.gaps, pos, count); @@ -1020,7 +999,7 @@ void MsaDbiUtils::removeRegion(const U2EntityRef& msaRef, const QList<qint64>& r } // Remove region for each row from the list - foreach (qint64 rowId, rowIds) { + foreach(qint64 rowId, rowIds) { U2MsaRow row = msaDbi->getRow(msaRef.entityId, rowId, os); SAFE_POINT_OP(os, ); @@ -1058,7 +1037,7 @@ void MsaDbiUtils::replaceCharacterInRow(const U2EntityRef& msaRef, qint64 rowId, U2MsaRow row = msaDbi->getRow(msaRef.entityId, rowId, os); CHECK_OP(os, ); qint64 msaLength = msaDbi->getMsaLength(msaRef.entityId, os); - CHECK(pos < msaLength,); + CHECK(pos < msaLength, ); U2Region seqReg(row.gstart, row.gend - row.gstart); QByteArray seq = sequenceDbi->getSequenceData(row.sequenceId, seqReg, os); @@ -1081,7 +1060,7 @@ QList<qint64> MsaDbiUtils::removeEmptyRows(const U2EntityRef& msaRef, const QLis // find empty rows QList<qint64> emptyRowIds; - foreach (qint64 rowId, rowIds) { + foreach(qint64 rowId, rowIds) { U2MsaRow row = msaDbi->getRow(msaRef.entityId, rowId, os); SAFE_POINT_OP(os, QList<qint64>()); U2Sequence seq = sequenceDbi->getSequenceObject(row.sequenceId, os); @@ -1090,7 +1069,7 @@ QList<qint64> MsaDbiUtils::removeEmptyRows(const U2EntityRef& msaRef, const QLis emptyRowIds << row.rowId; } } - if ( !emptyRowIds.isEmpty( ) ) { + if (!emptyRowIds.isEmpty()) { // remove empty rows msaDbi->removeRows(msaRef.entityId, emptyRowIds, os); SAFE_POINT_OP(os, QList<qint64>()); @@ -1106,8 +1085,7 @@ void MsaDbiUtils::crop(const U2EntityRef& msaRef, const QList<qint64> rowIds, qi // Validate the parameters if (!validatePos(al, pos) || !validateCharactersCount(count) || - !MaDbiUtils::validateRowIds(al, rowIds)) - { + !MaDbiUtils::validateRowIds(al, rowIds)) { os.setError(tr("Failed to crop an alignment!")); return; } @@ -1133,8 +1111,7 @@ void MsaDbiUtils::crop(const U2EntityRef& msaRef, const QList<qint64> rowIds, qi // Put the new sequence and gap model into the database msaDbi->updateRowContent(msaRef.entityId, rowId, row->getSequence().constSequence(), row->getGapModel(), os); CHECK_OP(os, ); - } - else { + } else { MsaDbiUtils::removeRow(msaRef, row->getRowId(), os); CHECK_OP(os, ); } @@ -1167,24 +1144,24 @@ QList<qint64> MsaDbiUtils::trim(const U2EntityRef& msaRef, U2OpStatus& os) { const QList<U2MsaRow> cutOffStartResult = cutOffLeadingGaps(rows); // if cutting off leading gaps was performed then all rows has changed - if ( !cutOffStartResult.isEmpty( ) ) { + if (!cutOffStartResult.isEmpty()) { modifiedRows << cutOffStartResult; } QList<qint64> modifiedRowIds; // Update gap model - foreach ( U2MsaRow row, modifiedRows ) { + foreach(U2MsaRow row, modifiedRows) { msaDbi->updateGapModel(msaRef.entityId, row.rowId, row.gaps, os); CHECK_OP(os, invalidResult); - modifiedRowIds.append( row.rowId ); + modifiedRowIds.append(row.rowId); } qint64 newMsaLen = -1; // check if rows contains modified rows whitoud leading gaps rows = msaDbi->getRows(msaRef.entityId, os); - CHECK_OP(os, invalidResult); - SAFE_POINT(!rows.isEmpty(), "Msa rows list is empty.", invalidResult); - foreach ( U2MsaRow row, rows) { + CHECK_OP(os, invalidResult); + SAFE_POINT(!rows.isEmpty(), "Msa rows list is empty.", invalidResult); + foreach(U2MsaRow row, rows) { if (row.length != 0) { // row is not empty if (newMsaLen == -1) { @@ -1212,7 +1189,7 @@ void MsaDbiUtils::addRow(const U2EntityRef& msaRef, qint64 posInMsa, U2MsaRow& r CHECK_OP(os, ); U2MsaDbi* msaDbi = con.dbi->getMsaDbi(); - SAFE_POINT(NULL != msaDbi, "NULL Msa Dbi!",); + SAFE_POINT(NULL != msaDbi, "NULL Msa Dbi!", ); // Add the row msaDbi->addRow(msaRef.entityId, posInMsa, row, os); diff --git a/src/corelibs/U2Core/src/util/MsaDbiUtils.h b/src/corelibs/U2Core/src/util/MsaDbiUtils.h index 6248f7e3844cbd0875c24af8bae9217737f6522f..34ad36d34c946b087c05984580c73999b3aad051 100644 --- a/src/corelibs/U2Core/src/util/MsaDbiUtils.h +++ b/src/corelibs/U2Core/src/util/MsaDbiUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -103,7 +103,7 @@ public: class U2CORE_EXPORT MsaDbiUtils : public QObject { Q_OBJECT - friend class McaDbiUtils; + friend class McaDbiUtils; public: /** @@ -178,8 +178,8 @@ public: * Parameter 'rowId' must contain a valid row ID in the database. */ static void updateRowContent(const U2EntityRef& msaRef, qint64 rowId, - const QByteArray& seqBytes, const QList<U2MsaGap>& gaps, - U2OpStatus& os); + const QByteArray& seqBytes, const QList<U2MsaGap>& gaps, + U2OpStatus& os); /** * If some of specified rows is empty it will be removed. diff --git a/src/corelibs/U2Core/src/util/MsaRowUtils.cpp b/src/corelibs/U2Core/src/util/MsaRowUtils.cpp index 7e79321be09cb49e3a764504c70c628662c4ef42..b769f8f07c9575152e7781d0d50018b4e3e96623 100644 --- a/src/corelibs/U2Core/src/util/MsaRowUtils.cpp +++ b/src/corelibs/U2Core/src/util/MsaRowUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/MsaRowUtils.h b/src/corelibs/U2Core/src/util/MsaRowUtils.h index 4662d343756b6d01066c6160944ece30c7a21161..670f8f0c79f526f7b9a83e5f790e4fee594f5566 100644 --- a/src/corelibs/U2Core/src/util/MsaRowUtils.h +++ b/src/corelibs/U2Core/src/util/MsaRowUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/MultipleChromatogramAlignmentExporter.cpp b/src/corelibs/U2Core/src/util/MultipleChromatogramAlignmentExporter.cpp index cef76471040f8d80f5e79fafaa894888a54385b2..636a34187f72ad0bb10e9256a772532066c4fd9f 100644 --- a/src/corelibs/U2Core/src/util/MultipleChromatogramAlignmentExporter.cpp +++ b/src/corelibs/U2Core/src/util/MultipleChromatogramAlignmentExporter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,7 +22,6 @@ #include <U2Core/ChromatogramUtils.h> #include <U2Core/DatatypeSerializeUtils.h> #include <U2Core/McaDbiUtils.h> -#include <U2Core/RawDataUdrSchema.h> #include <U2Core/U2AlphabetUtils.h> #include <U2Core/U2AttributeDbi.h> #include <U2Core/U2MsaDbi.h> @@ -99,7 +98,7 @@ QList<U2McaRow> MultipleChromatogramAlignmentExporter::exportRows(U2OpStatus &os QList<U2McaRow> MultipleChromatogramAlignmentExporter::exportRows(U2OpStatus &os, const U2DbiRef &dbiRef, const U2DataId &mcaId, const QList<qint64> rowIds) const { QList<U2McaRow> result; - foreach (qint64 rowId, rowIds) { + foreach(qint64 rowId, rowIds) { result << McaDbiUtils::getMcaRow(os, U2EntityRef(dbiRef, mcaId), rowId); CHECK_OP(os, QList<U2McaRow>()); } @@ -110,7 +109,7 @@ QList<McaRowMemoryData> MultipleChromatogramAlignmentExporter::exportDataOfRows( QList<McaRowMemoryData> mcaRowsMemoryData; mcaRowsMemoryData.reserve(rows.count()); - foreach (const U2McaRow &row, rows) { + foreach(const U2McaRow &row, rows) { McaRowMemoryData mcaRowMemoryData; mcaRowMemoryData.chromatogram = ChromatogramUtils::exportChromatogram(os, U2EntityRef(connection.dbi->getDbiRef(), row.chromatogramId)); CHECK_OP(os, QList<McaRowMemoryData>()); @@ -174,7 +173,7 @@ QVariantMap MultipleChromatogramAlignmentExporter::exportAlignmentInfo(U2OpStatu QList<U2DataId> attributeIds = attributeDbi->getObjectAttributes(mcaId, "", os); CHECK_OP(os, QVariantMap()); - foreach (const U2DataId &attributeId, attributeIds) { + foreach(const U2DataId &attributeId, attributeIds) { if (dbi->getEntityTypeById(attributeId) != U2Type::AttributeString) { continue; } diff --git a/src/corelibs/U2Core/src/util/MultipleChromatogramAlignmentExporter.h b/src/corelibs/U2Core/src/util/MultipleChromatogramAlignmentExporter.h index 0c97469950cf561cb87d8d45c3e813cd9ee5345c..2acb2ee7f02175b22ac863f919ca127c9e9b5292 100644 --- a/src/corelibs/U2Core/src/util/MultipleChromatogramAlignmentExporter.h +++ b/src/corelibs/U2Core/src/util/MultipleChromatogramAlignmentExporter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/MultipleChromatogramAlignmentImporter.cpp b/src/corelibs/U2Core/src/util/MultipleChromatogramAlignmentImporter.cpp index e31a0f3c492034ecde973140fb1dd88623f86c2f..755328dce0a58021d8aa6181715aef8a03c8cf10 100644 --- a/src/corelibs/U2Core/src/util/MultipleChromatogramAlignmentImporter.cpp +++ b/src/corelibs/U2Core/src/util/MultipleChromatogramAlignmentImporter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -20,17 +20,14 @@ */ #include <U2Core/ChromatogramUtils.h> -#include <U2Core/DbiConnection.h> #include <U2Core/DNAAlphabet.h> #include <U2Core/GObjectTypes.h> #include <U2Core/L10n.h> #include <U2Core/McaDbiUtils.h> #include <U2Core/MultipleAlignmentInfo.h> -#include <U2Core/MultipleChromatogramAlignment.h> #include <U2Core/MultipleChromatogramAlignmentObject.h> #include <U2Core/MultipleChromatogramAlignmentRow.h> #include <U2Core/U2AttributeDbi.h> -#include <U2Core/U2DbiUtils.h> #include <U2Core/U2MsaDbi.h> #include <U2Core/U2ObjectDbi.h> #include <U2Core/U2ObjectRelationsDbi.h> @@ -45,9 +42,9 @@ namespace U2 { MultipleChromatogramAlignmentObject * MultipleChromatogramAlignmentImporter::createAlignment(U2OpStatus &os, - const U2DbiRef &dbiRef, - const QString &folder, - MultipleChromatogramAlignment &mca) { + const U2DbiRef &dbiRef, + const QString &folder, + MultipleChromatogramAlignment &mca) { DbiConnection connection(dbiRef, true, os); CHECK(!os.isCanceled(), NULL); SAFE_POINT_OP(os, NULL); @@ -108,9 +105,9 @@ void MultipleChromatogramAlignmentImporter::importMcaInfo(U2OpStatus &os, const U2AttributeDbi *attributeDbi = connection.dbi->getAttributeDbi(); SAFE_POINT_EXT(NULL != attributeDbi, os.setError("NULL Attribute Dbi during importing an alignment"), ); - foreach (const QString key, info.keys()) { + foreach(const QString key, info.keys()) { if (key != MultipleAlignmentInfo::NAME) { // name is stored in the object - const QString value = info.value(key).toString(); + const QString value = info.value(key).toString(); U2StringAttribute attribute(mcaId, key, value); attributeDbi->createStringAttribute(attribute, os); CHECK_OP(os, ); @@ -119,9 +116,9 @@ void MultipleChromatogramAlignmentImporter::importMcaInfo(U2OpStatus &os, const } QList<McaRowDatabaseData> MultipleChromatogramAlignmentImporter::importRowChildObjects(U2OpStatus &os, - const DbiConnection &connection, - const QString &folder, - const MultipleChromatogramAlignment &mca) { + const DbiConnection &connection, + const QString &folder, + const MultipleChromatogramAlignment &mca) { QList<McaRowDatabaseData> mcaRowsDatabaseData; UdrDbi *udrDbi = connection.dbi->getUdrDbi(); SAFE_POINT_EXT(NULL != udrDbi, os.setError("NULL UDR Dbi during importing an alignment"), mcaRowsDatabaseData); @@ -132,7 +129,7 @@ QList<McaRowDatabaseData> MultipleChromatogramAlignmentImporter::importRowChildO SAFE_POINT_EXT(NULL != alphabet, os.setError("MCA alphabet is NULL"), mcaRowsDatabaseData); const U2AlphabetId alphabetId = alphabet->getId(); - foreach (const MultipleChromatogramAlignmentRow &row, mca->getMcaRows()) { + foreach(const MultipleChromatogramAlignmentRow &row, mca->getMcaRows()) { McaRowDatabaseData mcaRowDatabaseData; mcaRowDatabaseData.chromatogram = importChromatogram(os, connection, folder, row->getChromatogram()); @@ -157,12 +154,12 @@ QList<McaRowDatabaseData> MultipleChromatogramAlignmentImporter::importRowChildO } QList<U2McaRow> MultipleChromatogramAlignmentImporter::importRows(U2OpStatus &os, - const DbiConnection &connection, - U2Mca &dbMca, - const QList<McaRowDatabaseData> &mcaRowsDatabaseData) { + const DbiConnection &connection, + U2Mca &dbMca, + const QList<McaRowDatabaseData> &mcaRowsDatabaseData) { QList<U2McaRow> rows; - foreach (const McaRowDatabaseData &mcaRowDatabaseData, mcaRowsDatabaseData) { + foreach(const McaRowDatabaseData &mcaRowDatabaseData, mcaRowsDatabaseData) { U2McaRow row; row.chromatogramId = mcaRowDatabaseData.chromatogram.id; row.sequenceId = mcaRowDatabaseData.sequence.id; @@ -180,9 +177,9 @@ QList<U2McaRow> MultipleChromatogramAlignmentImporter::importRows(U2OpStatus &os } U2Chromatogram MultipleChromatogramAlignmentImporter::importChromatogram(U2OpStatus &os, - const DbiConnection &connection, - const QString &folder, - const DNAChromatogram &chromatogram) { + const DbiConnection &connection, + const QString &folder, + const DNAChromatogram &chromatogram) { const U2EntityRef chromatogramRef = ChromatogramUtils::import(os, connection.dbi->getDbiRef(), folder, chromatogram); CHECK_OP(os, U2Chromatogram()); connection.dbi->getObjectDbi()->setObjectRank(chromatogramRef.entityId, U2DbiObjectRank_Child, os); @@ -191,10 +188,10 @@ U2Chromatogram MultipleChromatogramAlignmentImporter::importChromatogram(U2OpSta } U2Sequence MultipleChromatogramAlignmentImporter::importSequence(U2OpStatus &os, - const DbiConnection &connection, - const QString &folder, - const DNASequence &sequence, - const U2AlphabetId &alphabetId) { + const DbiConnection &connection, + const QString &folder, + const DNASequence &sequence, + const U2AlphabetId &alphabetId) { const U2EntityRef sequenceRef = U2SequenceUtils::import(os, connection.dbi->getDbiRef(), folder, sequence, alphabetId); CHECK_OP(os, U2Sequence()); connection.dbi->getObjectDbi()->setObjectRank(sequenceRef.entityId, U2DbiObjectRank_Child, os); diff --git a/src/corelibs/U2Core/src/util/MultipleChromatogramAlignmentImporter.h b/src/corelibs/U2Core/src/util/MultipleChromatogramAlignmentImporter.h index e393b905e7dc0e83c4e70781bccc6b3794499763..a1b06ff931886c2b54041c5a208d1e0b985dd874 100644 --- a/src/corelibs/U2Core/src/util/MultipleChromatogramAlignmentImporter.h +++ b/src/corelibs/U2Core/src/util/MultipleChromatogramAlignmentImporter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentExporter.cpp b/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentExporter.cpp index 35cbc7a91a3b390b3deb9b34f7ad6767ef63d494..5105e06070e7b87a54a69883e7a82930dc41ca4d 100644 --- a/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentExporter.cpp +++ b/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentExporter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,18 +24,16 @@ #include <U2Core/U2AlphabetUtils.h> #include <U2Core/U2AttributeDbi.h> #include <U2Core/U2MsaDbi.h> -#include <U2Core/U2ObjectDbi.h> #include <U2Core/U2OpStatusUtils.h> #include <U2Core/U2SequenceDbi.h> -static const char *NULL_MSA_DBI_ERROR = "NULL MSA Dbi during exporting rows of an alignment!"; -static const char *OPENED_DBI_CONNECTION_ERROR = "Connection is already opened!"; +static const char *NULL_MSA_DBI_ERROR = "NULL MSA Dbi during exporting rows of an alignment!"; +static const char *OPENED_DBI_CONNECTION_ERROR = "Connection is already opened!"; static const char *ROWS_SEQS_COUNT_MISMATCH_ERROR = "Different number of rows and sequences!"; namespace U2 { -MultipleSequenceAlignmentExporter::MultipleSequenceAlignmentExporter() -{ +MultipleSequenceAlignmentExporter::MultipleSequenceAlignmentExporter() { } @@ -88,8 +86,7 @@ U2Msa MultipleSequenceAlignmentExporter::getAlignmentObject(const U2DbiRef &dbiR } QList<MsaRowReplacementData> MultipleSequenceAlignmentExporter::getAlignmentRows(const U2DbiRef& dbiRef, - const U2DataId& msaId, const QList<qint64> rowIds, U2OpStatus& os) const -{ + const U2DataId& msaId, const QList<qint64> rowIds, U2OpStatus& os) const { SAFE_POINT(!con.isOpen(), OPENED_DBI_CONNECTION_ERROR, QList<MsaRowReplacementData>()); con.open(dbiRef, false, os); CHECK_OP(os, QList<MsaRowReplacementData>()); @@ -103,8 +100,8 @@ QList<MsaRowReplacementData> MultipleSequenceAlignmentExporter::getAlignmentRows QList<MsaRowReplacementData> result; SAFE_POINT(rows.count() == sequences.count(), ROWS_SEQS_COUNT_MISMATCH_ERROR, QList<MsaRowReplacementData>()); - for ( int i = 0; i < rows.length( ); ++i ) { - result << MsaRowReplacementData( sequences.at(i), rows.at( i ) ); + for (int i = 0; i < rows.length(); ++i) { + result << MsaRowReplacementData(sequences.at(i), rows.at(i)); } return result; } @@ -116,15 +113,14 @@ QList<U2MsaRow> MultipleSequenceAlignmentExporter::exportRows(const U2DataId& ms return msaDbi->getRows(msaId, os); } -QList<U2MsaRow> MultipleSequenceAlignmentExporter::exportRows( const U2DataId &msaId, const QList<qint64> rowIds, - U2OpStatus &os ) const -{ - U2MsaDbi* msaDbi = con.dbi->getMsaDbi( ); - SAFE_POINT( NULL != msaDbi, NULL_MSA_DBI_ERROR, QList<U2MsaRow>( ) ); +QList<U2MsaRow> MultipleSequenceAlignmentExporter::exportRows(const U2DataId &msaId, const QList<qint64> rowIds, + U2OpStatus &os) const { + U2MsaDbi* msaDbi = con.dbi->getMsaDbi(); + SAFE_POINT(NULL != msaDbi, NULL_MSA_DBI_ERROR, QList<U2MsaRow>()); QList<U2MsaRow> result; - foreach ( qint64 rowId, rowIds ) { - result.append( msaDbi->getRow( msaId, rowId, os) ); - SAFE_POINT_OP( os, QList<U2MsaRow>( ) ); + foreach(qint64 rowId, rowIds) { + result.append(msaDbi->getRow(msaId, rowId, os)); + SAFE_POINT_OP(os, QList<U2MsaRow>()); } return result; } @@ -135,7 +131,7 @@ QList<DNASequence> MultipleSequenceAlignmentExporter::exportSequencesOfRows(QLis SAFE_POINT(NULL != sequenceDbi, "NULL Sequence Dbi during exporting rows sequences!", QList<DNASequence>()); QList<DNASequence> sequences; - sequences.reserve( rows.count( ) ); + sequences.reserve(rows.count()); for (int i = 0, n = rows.count(); i < n; ++i) { const U2DataId& sequenceId = rows[i].sequenceId; qint64 gstart = rows[i].gstart; @@ -161,10 +157,10 @@ QVariantMap MultipleSequenceAlignmentExporter::exportAlignmentInfo(const U2DataI // Get all MSA attributes QVariantMap alInfo; - QList<U2DataId> attributeIds = attrDbi->getObjectAttributes(msaId, "", os); + QList<U2DataId> attributeIds = attrDbi->getObjectAttributes(msaId, "", os); CHECK_OP(os, QVariantMap()); - foreach (U2DataId attributeId, attributeIds) { + foreach(U2DataId attributeId, attributeIds) { U2StringAttribute attr = attrDbi->getStringAttribute(attributeId, os); CHECK_OP(os, QVariantMap()); diff --git a/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentExporter.h b/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentExporter.h index 25e882ec1552c69f2e0e5fb278b273423cc75650..1b2c7066580e4be89ddce1d19335536e90eafcb7 100644 --- a/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentExporter.h +++ b/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentExporter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,14 +25,12 @@ #include <U2Core/MultipleSequenceAlignment.h> #include <U2Core/U2Msa.h> #include <U2Core/U2DbiUtils.h> -#include <U2Core/U2OpStatus.h> - namespace U2 { struct MsaRowReplacementData { - MsaRowReplacementData( const DNASequence &_sequence, const U2MsaRow &_row ) - : sequence( _sequence ), row( _row ) { } + MsaRowReplacementData(const DNASequence &_sequence, const U2MsaRow &_row) + : sequence(_sequence), row(_row) {} DNASequence sequence; U2MsaRow row; @@ -41,13 +39,13 @@ struct MsaRowReplacementData { /** Getting a multiple sequence alignment from DBI */ class U2CORE_EXPORT MultipleSequenceAlignmentExporter { public: - MultipleSequenceAlignmentExporter(); + MultipleSequenceAlignmentExporter(); MultipleSequenceAlignment getAlignment(const U2DbiRef& dbiRef, const U2DataId& msaId, - U2OpStatus& os) const; + U2OpStatus& os) const; U2Msa getAlignmentObject(const U2DbiRef& dbiRef, const U2DataId& msaId, U2OpStatus& os) const; QList<MsaRowReplacementData> getAlignmentRows(const U2DbiRef& dbiRef, const U2DataId& msaId, - const QList<qint64> rowIds, U2OpStatus& os) const; + const QList<qint64> rowIds, U2OpStatus& os) const; private: QList<U2MsaRow> exportRows(const U2DataId&, U2OpStatus&) const; diff --git a/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentImporter.cpp b/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentImporter.cpp index 12d649bebc1ffce01590b71b97a8703fcaa0fe23..817c3d2c2aaf0703aed09ad868b9c3e01e48657d 100644 --- a/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentImporter.cpp +++ b/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentImporter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentImporter.h b/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentImporter.h index a89b88965ad83b46cd5abd6dd2577a7d7b55b3da..a09aafde13664433d4b422df25dfb6a8b28cd8cd 100644 --- a/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentImporter.h +++ b/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentImporter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentWalker.cpp b/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentWalker.cpp index 013ba8cfae3b3e96d84cf52d06366b3dd6b44d1c..a164a04bea2d96d05fd57a16cf06c7baec285975 100644 --- a/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentWalker.cpp +++ b/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentWalker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentWalker.h b/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentWalker.h index 34684df030e7bd9cb311dc8c290b5d9275311b4e..43520f23fc41d86eeb3a7ff61dfe38dcd06a6a41 100644 --- a/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentWalker.h +++ b/src/corelibs/U2Core/src/util/MultipleSequenceAlignmentWalker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/PMatrixSerializeUtils.h b/src/corelibs/U2Core/src/util/PMatrixSerializeUtils.h index 13e91390df0d4861a61ce26ef9621fcd27ebb20a..6eb62ce7dc9344238aae22313154157e2b632492 100644 --- a/src/corelibs/U2Core/src/util/PMatrixSerializeUtils.h +++ b/src/corelibs/U2Core/src/util/PMatrixSerializeUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/QObjectScopedPointer.h b/src/corelibs/U2Core/src/util/QObjectScopedPointer.h index cbaa6692c2edb5809f4463d7e02b19bf5f3f6269..857e4678829f19b71ee64a174a406d271ac029af 100644 --- a/src/corelibs/U2Core/src/util/QObjectScopedPointer.h +++ b/src/corelibs/U2Core/src/util/QObjectScopedPointer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,16 +24,13 @@ #include <QPointer> -#include <U2Core/global.h> - namespace U2 { template <class T> class QObjectScopedPointer { public: QObjectScopedPointer(T *dialog = NULL) : - pointer(dialog) - { + pointer(dialog) { } ~QObjectScopedPointer() { @@ -44,8 +41,8 @@ public: return pointer.isNull(); } - T * operator->() const {return pointer.operator ->();} - T & operator*() const {return *pointer.operator *();} + T * operator->() const { return pointer.operator ->(); } + T & operator*() const { return *pointer.operator *(); } T * data() const { return pointer.data(); } @@ -59,12 +56,14 @@ private: }; template <class T> -inline bool operator==(const T *o, const QObjectScopedPointer<T> &p) -{ return o == p.operator->(); } +inline bool operator==(const T *o, const QObjectScopedPointer<T> &p) { + return o == p.operator->(); +} template<class T> -inline bool operator==(const QObjectScopedPointer<T> &p, const T *o) -{ return p.operator->() == o; } +inline bool operator==(const QObjectScopedPointer<T> &p, const T *o) { + return p.operator->() == o; +} } // namespace U2 diff --git a/src/corelibs/U2Core/src/util/QVariantUtils.cpp b/src/corelibs/U2Core/src/util/QVariantUtils.cpp index 0b1d4a21c0556f392e458071f6a4eb00f09a948f..c9fe6e28aa67d94cd689c35e893ccbe8adaacf44 100644 --- a/src/corelibs/U2Core/src/util/QVariantUtils.cpp +++ b/src/corelibs/U2Core/src/util/QVariantUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/QVariantUtils.h b/src/corelibs/U2Core/src/util/QVariantUtils.h index f56c393427f8153f7e0e9c6565642921cbaf5fe0..cd10601f26d840356648ad03c381f8e1628410b8 100644 --- a/src/corelibs/U2Core/src/util/QVariantUtils.h +++ b/src/corelibs/U2Core/src/util/QVariantUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/SequenceUtils.cpp b/src/corelibs/U2Core/src/util/SequenceUtils.cpp index 18c9a3d0cc33dcdff9f3acae102c6b1e774be7ac..6c0cc0ba6706534a9f9796b30f5b5a054b391874 100644 --- a/src/corelibs/U2Core/src/util/SequenceUtils.cpp +++ b/src/corelibs/U2Core/src/util/SequenceUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -28,8 +28,6 @@ #include <U2Core/ProjectModel.h> #include <U2Core/TextUtils.h> #include <U2Core/U2AlphabetUtils.h> -#include <U2Core/U2DbiRegistry.h> -#include <U2Core/U2DbiUtils.h> #include <U2Core/U2ObjectDbi.h> #include <U2Core/U2OpStatusUtils.h> #include <U2Core/U2SafePoints.h> @@ -45,7 +43,7 @@ QList<QByteArray> U1SequenceUtils::translateRegions(const QList<QByteArray>& ori assert(aminoTT != NULL); if (join) { resParts.append(U1SequenceUtils::joinRegions(origParts)); - } else { + } else { resParts.append(origParts); } for (int i = 0, n = resParts.length(); i < n; i++) { @@ -80,8 +78,7 @@ static QList<QByteArray> _extractRegions(const QByteArray& seq, const QVector<U2 } QList<QByteArray> U1SequenceUtils::extractRegions(const QByteArray& seq, const QVector<U2Region>& origLocation, - const DNATranslation* complTT, const DNATranslation* aminoTT, bool circular, bool join) -{ + const DNATranslation* complTT, const DNATranslation* aminoTT, bool circular, bool join) { QList<QByteArray> res = _extractRegions(seq, origLocation, complTT); if (circular && res.size() > 1) { const U2Region& firstL = origLocation.first(); @@ -118,10 +115,10 @@ QVector<U2Region> U1SequenceUtils::getJoinedMapping(const QList<QByteArray>& seq } -static void reorderingObjects(QList<GObject* >& objs){ - if(objs.size() >= 2){ // ordering the object. Ahead of objects is sequence and annotations are behind. - for(int i = 0; i < objs.size(); ++i){ - if(objs.at(i)->getGObjectType() == GObjectTypes::SEQUENCE){ +static void reorderingObjects(QList<GObject* >& objs) { + if (objs.size() >= 2) { // ordering the object. Ahead of objects is sequence and annotations are behind. + for (int i = 0; i < objs.size(); ++i) { + if (objs.at(i)->getGObjectType() == GObjectTypes::SEQUENCE) { objs.push_front(objs.at(i)); objs.removeAt(i + 1); } @@ -129,26 +126,26 @@ static void reorderingObjects(QList<GObject* >& objs){ } } -static QString getSuffixByAlphabet(const DNAAlphabetType& alpType){ +static QString getSuffixByAlphabet(const DNAAlphabetType& alpType) { QString suffix; - switch(alpType){ - case DNAAlphabet_AMINO: suffix = "amino"; - break; - case DNAAlphabet_NUCL : suffix = "dna"; - break; - case DNAAlphabet_RAW : suffix = "raw"; - break; - default: - assert(false && "Unknown alphabet"); + switch (alpType) { + case DNAAlphabet_AMINO: suffix = "amino"; + break; + case DNAAlphabet_NUCL: suffix = "dna"; + break; + case DNAAlphabet_RAW: suffix = "raw"; + break; + default: + assert(false && "Unknown alphabet"); } return "_" + suffix; } -static bool isGenbankHeaderUsed(const QVariantMap& hints, const QString& urlGenbank){ +static bool isGenbankHeaderUsed(const QVariantMap& hints, const QString& urlGenbank) { return hints.value(RawDataCheckResult_HeaderSequenceLength + urlGenbank, -1) != -1; } -static U2SequenceObject* storeSequenceUseGenbankHeader(const QVariantMap& hints, const QString& urlGenbank, const QString& seqName, U2OpStatus& os){ +static U2SequenceObject* storeSequenceUseGenbankHeader(const QVariantMap& hints, const QString& urlGenbank, const QString& seqName, U2OpStatus& os) { qint64 sequenceLength = hints[RawDataCheckResult_HeaderSequenceLength + urlGenbank].toLongLong(); const U2DbiRef dbiRef = AppContext::getDbiRegistry()->getSessionTmpDbiRef(os); CHECK_OP(os, NULL); @@ -177,8 +174,8 @@ static void shiftAnnotations(AnnotationTableObject *newAnnObj, QList<AnnotationT ad->location->regions << contigReg; newAnnObj->addAnnotations(QList<SharedAnnotationData>() << ad); - foreach (AnnotationTableObject *annObj, annObjects) { - foreach (Annotation *a, annObj->getAnnotations()) { + foreach(AnnotationTableObject *annObj, annObjects) { + foreach(Annotation *a, annObj->getAnnotations()) { SharedAnnotationData newAnnotation(new AnnotationData(*a->getData())); U2Location newLocation = newAnnotation->location; U2Region::shift(contigReg.startPos, newLocation->regions); @@ -192,18 +189,17 @@ static void shiftAnnotations(AnnotationTableObject *newAnnObj, QList<AnnotationT static void importGroupSequences2newObject(const QList<U2SequenceObject *> &seqObjects, AnnotationTableObject *newAnnObj, int mergeGap, U2SequenceImporter &seqImport, const QHash<U2SequenceObject *, QList<AnnotationTableObject *> >&annotationsBySequenceObjectName, - U2OpStatus &os) -{ + U2OpStatus &os) { qint64 currentSeqLen = 0; - foreach (U2SequenceObject *seqObj, seqObjects) { + foreach(U2SequenceObject *seqObj, seqObjects) { if (currentSeqLen > 0) { seqImport.addDefaultSymbolsBlock(mergeGap, os); CHECK_OP(os, ); currentSeqLen += mergeGap; } U2Region contigReg(currentSeqLen, seqObj->getSequenceLength()); - currentSeqLen+=seqObj->getSequenceLength(); + currentSeqLen += seqObj->getSequenceLength(); seqImport.addSequenceBlock(seqObj->getSequenceRef(), U2_REGION_MAX, os); CHECK_OP(os, ); @@ -215,12 +211,11 @@ static void importGroupSequences2newObject(const QList<U2SequenceObject *> &seqO void processOldObjects(const QList<GObject *> &objs, QHash<U2SequenceObject *, QList<AnnotationTableObject *> > &annotationsBySequenceObjectName, QMap<DNAAlphabetType, QList<U2SequenceObject *> > &mapObjects2Alphabets, const QString &url, - const QString &fileName, const QVariantMap &hints, U2OpStatus &os) -{ + const QString &fileName, const QVariantMap &hints, U2OpStatus &os) { U2SequenceObject* seqObj = NULL; int currentObject = -1; - foreach (GObject *obj, objs) { + foreach(GObject *obj, objs) { currentObject++; AnnotationTableObject* annObj = qobject_cast<AnnotationTableObject *>(obj); if (NULL == annObj) { @@ -234,7 +229,7 @@ void processOldObjects(const QList<GObject *> &objs, // GENBANK without sequence but header have sequence length - made sequence with 'N' characters if (0 == currentObject && isGenbankHeaderUsed(hints, url)) { U2SequenceObject *seqObj = storeSequenceUseGenbankHeader(hints, url, fileName, os); - GObjectReference sequenceRef( GObjectReference(url, seqObj->getGObjectName(), GObjectTypes::SEQUENCE, seqObj->getEntityRef())); + GObjectReference sequenceRef(GObjectReference(url, seqObj->getGObjectName(), GObjectTypes::SEQUENCE, seqObj->getEntityRef())); annObj->addObjectRelation(GObjectRelation(sequenceRef, ObjectRole_Sequence)); const DNAAlphabet *seqAl = seqObj->getAlphabet(); @@ -242,7 +237,7 @@ void processOldObjects(const QList<GObject *> &objs, } QList<GObjectRelation> seqRelations = annObj->findRelatedObjectsByRole(ObjectRole_Sequence); - foreach (const GObjectRelation &rel, seqRelations) { + foreach(const GObjectRelation &rel, seqRelations) { const QString &relDocUrl = rel.getDocURL(); if (relDocUrl == url) { QList<AnnotationTableObject *> &annObjs = annotationsBySequenceObjectName[seqObj]; @@ -255,27 +250,25 @@ void processOldObjects(const QList<GObject *> &objs, } static QList<GObject *> createNewObjects( - const QHash< U2SequenceObject *, QList<AnnotationTableObject *> > &annotationsBySequenceObjectName, - const QMap<DNAAlphabetType, - QList<U2SequenceObject *> > &mapObjects2Alpabets, - const U2DbiRef &ref, - const GUrl &newUrl, - QVariantMap &hints, - int mergeGap, - U2OpStatus &os) -{ + const QHash< U2SequenceObject *, QList<AnnotationTableObject *> > &annotationsBySequenceObjectName, + const QMap<DNAAlphabetType, + QList<U2SequenceObject *> > &mapObjects2Alpabets, + const U2DbiRef &ref, + const GUrl &newUrl, + QVariantMap &hints, + int mergeGap, + U2OpStatus &os) { QList<GObject *> objects; // Creating sequence object for group sequence with the same alphabets. Amount of different alphabets = amount of sequence objects bool init = false; - for ( QMap<DNAAlphabetType, QList<U2SequenceObject *> >::const_iterator it - = mapObjects2Alpabets.begin( ); it != mapObjects2Alpabets.end( ); ++it ) - { + for (QMap<DNAAlphabetType, QList<U2SequenceObject *> >::const_iterator it + = mapObjects2Alpabets.begin(); it != mapObjects2Alpabets.end(); ++it) { U2SequenceImporter seqImport; const QString folder = hints.value(DocumentFormat::DBI_FOLDER_HINT, U2ObjectDbi::ROOT_FOLDER).toString(); - QString seqName = newUrl.fileName( ); - if ( mapObjects2Alpabets.size() > 1 ) { - seqName += getSuffixByAlphabet( it.key( ) ); - if ( !init ) { + QString seqName = newUrl.fileName(); + if (mapObjects2Alpabets.size() > 1) { + seqName += getSuffixByAlphabet(it.key()); + if (!init) { hints[ProjectLoaderHint_MergeMode_DifferentAlphabets] = QObject::tr("Loaded sequences have different alphabets. " "That's why several sequence objects are created, each for specified alphabet. All sequences at one object have the same alphabet " "and sequences from different objects have different alphabets."); @@ -283,31 +276,30 @@ static QList<GObject *> createNewObjects( } } seqImport.startSequence(os, ref, folder, seqName, false); - CHECK_OP( os, QList<GObject*>( ) ); + CHECK_OP(os, QList<GObject*>()); - AnnotationTableObject *newAnnObj = new AnnotationTableObject( seqName + " annotations", ref, hints ); - QList<U2SequenceObject *> seqObjects = it.value( ); - importGroupSequences2newObject( seqObjects, newAnnObj, mergeGap, seqImport, - annotationsBySequenceObjectName, os ); + AnnotationTableObject *newAnnObj = new AnnotationTableObject(seqName + " annotations", ref, hints); + QList<U2SequenceObject *> seqObjects = it.value(); + importGroupSequences2newObject(seqObjects, newAnnObj, mergeGap, seqImport, + annotationsBySequenceObjectName, os); - U2Sequence u2seq = seqImport.finalizeSequenceAndValidate( os ); - CHECK_OP( os, QList<GObject *>( ) ); + U2Sequence u2seq = seqImport.finalizeSequenceAndValidate(os); + CHECK_OP(os, QList<GObject *>()); - if ( !newUrl.getURLString( ).isEmpty( ) ) { - GObjectReference r( newUrl.getURLString( ), u2seq.visualName, GObjectTypes::SEQUENCE, U2EntityRef( ref, u2seq.id ) ); - newAnnObj->addObjectRelation( GObjectRelation( r, ObjectRole_Sequence ) ); + if (!newUrl.getURLString().isEmpty()) { + GObjectReference r(newUrl.getURLString(), u2seq.visualName, GObjectTypes::SEQUENCE, U2EntityRef(ref, u2seq.id)); + newAnnObj->addObjectRelation(GObjectRelation(r, ObjectRole_Sequence)); } - U2SequenceObject *seqObj = new U2SequenceObject( u2seq.visualName, - U2EntityRef( ref, u2seq.id ) ); - objects << seqObj << newAnnObj ; + U2SequenceObject *seqObj = new U2SequenceObject(u2seq.visualName, + U2EntityRef(ref, u2seq.id)); + objects << seqObj << newAnnObj; } return objects; } QList<GObject *> U1SequenceUtils::mergeSequences(const QList<Document *> docs, const U2DbiRef &ref, const QString &newStringUrl, - QVariantMap &hints, U2OpStatus &os) -{ + QVariantMap &hints, U2OpStatus &os) { // prepare annotation object -> sequence object mapping first // and precompute resulted sequence size and alphabet int mergeGap = hints[DocumentReadingMode_SequenceMergeGapSize].toInt(); @@ -317,7 +309,7 @@ QList<GObject *> U1SequenceUtils::mergeSequences(const QList<Document *> docs, c QMap<DNAAlphabetType, QList<U2SequenceObject *> > mapObjects2Alpabets; - foreach (const Document *doc, docs) { + foreach(const Document *doc, docs) { QList<GObject *> objs = doc->getObjects(); reorderingObjects(objs); processOldObjects(objs, annotationsBySequenceObjectName, mapObjects2Alpabets, doc->getURLString(), doc->getURL().fileName(), hints, os); @@ -327,7 +319,7 @@ QList<GObject *> U1SequenceUtils::mergeSequences(const QList<Document *> docs, c return createNewObjects(annotationsBySequenceObjectName, mapObjects2Alpabets, ref, newUrl, hints, mergeGap, os); } -QList<GObject*> U1SequenceUtils::mergeSequences(Document* doc, const U2DbiRef& ref, QVariantMap& hints, U2OpStatus& os){ +QList<GObject*> U1SequenceUtils::mergeSequences(Document* doc, const U2DbiRef& ref, QVariantMap& hints, U2OpStatus& os) { QList<Document* > docs; docs << doc; return mergeSequences(docs, ref, doc->getURLString(), hints, os); } @@ -337,7 +329,7 @@ QByteArray U1SequenceUtils::joinRegions(const QList<QByteArray>& parts, int gapS if (parts.size() == 1) { return parts.first(); } - int size =0; + int size = 0; foreach(const QByteArray& p, parts) { size += p.size(); } @@ -348,7 +340,7 @@ QByteArray U1SequenceUtils::joinRegions(const QList<QByteArray>& parts, int gapS QByteArray res; res.reserve(size); res.append(parts.first()); - for(int i = 1; i < parts.size(); i++){ + for (int i = 1; i < parts.size(); i++) { res.append(QByteArray(gapSize, alphabet->getDefaultSymbol())); res.append(parts[i]); } diff --git a/src/corelibs/U2Core/src/util/SequenceUtils.h b/src/corelibs/U2Core/src/util/SequenceUtils.h index dc8f3a1bc9089c8169551192550baff35fce0c1d..bce716dc11c926a1a0e21d304cc3ebeda81439ab 100644 --- a/src/corelibs/U2Core/src/util/SequenceUtils.h +++ b/src/corelibs/U2Core/src/util/SequenceUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,8 +24,6 @@ #include <U2Core/U2Region.h> -#include <QVariant> - namespace U2 { class DNATranslation; @@ -38,7 +36,7 @@ class U2CORE_EXPORT U1SequenceUtils { public: /** Extract sequence parts marked by the regions Note: the order of complemented regions is also reversed - */ + */ static QList<QByteArray> extractRegions(const QByteArray& seq, const QVector<U2Region>& regions, const DNATranslation* complTT, const DNATranslation* aminoTT = NULL, bool circular = false, bool join = false); diff --git a/src/corelibs/U2Core/src/util/SignalBlocker.cpp b/src/corelibs/U2Core/src/util/SignalBlocker.cpp index 9d75ef4f43e1dca3bba6f286fe14bdff5d10a238..0e9fe0bfcabf0694d4d10e3e899d0fd1874acbda 100644 --- a/src/corelibs/U2Core/src/util/SignalBlocker.cpp +++ b/src/corelibs/U2Core/src/util/SignalBlocker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/SignalBlocker.h b/src/corelibs/U2Core/src/util/SignalBlocker.h index 75916cf75e99a4581bec33bfd78aeac63ddb65cf..f53a2bf392332352e10785b2f45a34a8e3c3fe91 100644 --- a/src/corelibs/U2Core/src/util/SignalBlocker.h +++ b/src/corelibs/U2Core/src/util/SignalBlocker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/SnpeffDictionary.cpp b/src/corelibs/U2Core/src/util/SnpeffDictionary.cpp index a12194c5f5a5e48fb0df3ea2d751a273cd6e3c92..845ffcfefe95f0cbd054c5363017e02867c3a562 100644 --- a/src/corelibs/U2Core/src/util/SnpeffDictionary.cpp +++ b/src/corelibs/U2Core/src/util/SnpeffDictionary.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -49,7 +49,7 @@ QMap<QString, QString> SnpeffDictionary::initEffectDescriptions() { result.insert("downstream_gene_variant", "Downstream of a gene (default length: 5K bases)."); result.insert("exon_variant", "The variant hits an exon (from a non-coding transcript) or a retained intron."); result.insert("exon_loss_variant", "A deletion removes the whole exon."); - result.insert("frameshift_variant", "Insertion or deletion causes a frame shift. E.g.: An indel size is not multple of 3."); + result.insert("frameshift_variant", "Insertion or deletion causes a frame shift. E.g.: An indel size is not multiple of 3."); result.insert("gene_variant", "The variant hits a gene."); result.insert("intergenic_region", "The variant is in an intergenic region."); result.insert("conserved_intergenic_variant", "The variant is in a highly conserved intergenic region."); @@ -93,7 +93,7 @@ QMap<QString, QString> SnpeffDictionary::initEffectDescriptions() { result.insert("DOWNSTREAM", "Downstream of a gene (default length: 5K bases)."); result.insert("EXON", "The variant hits an exon (from a non-coding transcript) or a retained intron."); result.insert("EXON_DELETED", "A deletion removes the whole exon."); - result.insert("FRAME_SHIFT", "Insertion or deletion causes a frame shift. E.g.: An indel size is not multple of 3."); + result.insert("FRAME_SHIFT", "Insertion or deletion causes a frame shift. E.g.: An indel size is not multiple of 3."); result.insert("GENE", "The variant hits a gene."); result.insert("INTERGENIC", "The variant is in an intergenic region."); result.insert("INTERGENIC_CONSERVED", "The variant is in a highly conserved intergenic region."); diff --git a/src/corelibs/U2Core/src/util/SnpeffDictionary.h b/src/corelibs/U2Core/src/util/SnpeffDictionary.h index d56cef9744d38b407e41cf0e37a95ead7a72e5cf..0d2f8198ee01f7e17dcecbc892957f0674886b76 100644 --- a/src/corelibs/U2Core/src/util/SnpeffDictionary.h +++ b/src/corelibs/U2Core/src/util/SnpeffDictionary.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/StrPackUtils.cpp b/src/corelibs/U2Core/src/util/StrPackUtils.cpp index 3ade475b7301c7afaf898a1db719d48009773acb..4efa630d6feb7d4e9d685fb52967411d36224da1 100644 --- a/src/corelibs/U2Core/src/util/StrPackUtils.cpp +++ b/src/corelibs/U2Core/src/util/StrPackUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/StrPackUtils.h b/src/corelibs/U2Core/src/util/StrPackUtils.h index a1e5f7d8f39ad08cede79f3fe685870da48b5090..644b41d4ae57873a2a931fd18aab9b4ef8d75684 100644 --- a/src/corelibs/U2Core/src/util/StrPackUtils.h +++ b/src/corelibs/U2Core/src/util/StrPackUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/SyncHttp.cpp b/src/corelibs/U2Core/src/util/SyncHttp.cpp index 149ee080765a631189b930c5908e36c68c90d099..30bfdc64a9add1aaeb0458d753f9a5c2bebdb38c 100644 --- a/src/corelibs/U2Core/src/util/SyncHttp.cpp +++ b/src/corelibs/U2Core/src/util/SyncHttp.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/SyncHttp.h b/src/corelibs/U2Core/src/util/SyncHttp.h index 766d41087919cc3f652edf41ce960512517b9dec..c5082090b831d3814ccb0fce4641ef28b78c0061 100644 --- a/src/corelibs/U2Core/src/util/SyncHttp.h +++ b/src/corelibs/U2Core/src/util/SyncHttp.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -28,7 +28,6 @@ #include <QAuthenticator> #include <QEventLoop> -#include <U2Core/global.h> #include <U2Core/U2OpStatus.h> namespace U2 { diff --git a/src/corelibs/U2Core/src/util/TaskWatchdog.cpp b/src/corelibs/U2Core/src/util/TaskWatchdog.cpp index 1854eb7182bad5604de47f77c3a26d90e875f3d6..3efb4a812e9dd38046e1988a0a61a8704a23aad7 100644 --- a/src/corelibs/U2Core/src/util/TaskWatchdog.cpp +++ b/src/corelibs/U2Core/src/util/TaskWatchdog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/TaskWatchdog.h b/src/corelibs/U2Core/src/util/TaskWatchdog.h index 95f5e3d9be40b0dd26de02ad62c4badb2c7d33f6..6a2e668f9847c613905ea52512159672d3fe386c 100644 --- a/src/corelibs/U2Core/src/util/TaskWatchdog.h +++ b/src/corelibs/U2Core/src/util/TaskWatchdog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/TextUtils.cpp b/src/corelibs/U2Core/src/util/TextUtils.cpp index 6817a57c0d86f03c4683bdde688bb6d2893ec234..2e62eff7e0eff21e7178cc02bddb089e019e7279 100644 --- a/src/corelibs/U2Core/src/util/TextUtils.cpp +++ b/src/corelibs/U2Core/src/util/TextUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -183,18 +183,24 @@ QString TextUtils::variate(const QString& prefix, const QString& sep, const QSet return res; } -QByteArray TextUtils::cutByteOrderMarks(const QByteArray& data) { +QByteArray TextUtils::cutByteOrderMarks(const QByteArray& data, QString& errorMessage) { QTextStream textStream(data); textStream.setGenerateByteOrderMark(false); QByteArray resultData = textStream.readAll().toLocal8Bit(); + if (resultData.size() > data.size()) { + errorMessage = tr("The text file can't be read. Check the file encoding and make sure the file is not corrupted."); + resultData = QByteArray(); + } return resultData; } -qint64 TextUtils::cutByteOrderMarks(char* data, qint64 buffLen) { +qint64 TextUtils::cutByteOrderMarks(char* data, QString& errorMessage, qint64 buffLen) { CHECK(buffLen != 0, 0); QByteArray byteArrayData = buffLen != -1 ? QByteArray(data, buffLen) : QByteArray(data); - QByteArray resByteArrayData = cutByteOrderMarks(byteArrayData); + QByteArray resByteArrayData = cutByteOrderMarks(byteArrayData, errorMessage); + CHECK(errorMessage.isEmpty(), -1); + qint64 result = resByteArrayData.size(); memcpy(data, resByteArrayData.data(), result); diff --git a/src/corelibs/U2Core/src/util/TextUtils.h b/src/corelibs/U2Core/src/util/TextUtils.h index e3621233a88c18f20c95c4f827a509af26c24cbe..bbf89eefe7095982f139a68796e38c81477f1756 100644 --- a/src/corelibs/U2Core/src/util/TextUtils.h +++ b/src/corelibs/U2Core/src/util/TextUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -28,6 +28,7 @@ #include <assert.h> #include <QBitArray> +#include <QCoreApplication> #include <QSet> #include <QStringList> #include <QTextStream> @@ -36,6 +37,7 @@ namespace U2 { class U2CORE_EXPORT TextUtils { + Q_DECLARE_TR_FUNCTIONS(TextUtils) public: static const QBitArray ALPHAS; static const QBitArray ALPHA_NUMS; @@ -97,9 +99,9 @@ public: inline static void charBounds(const char* data, int dataSize, char& minChar, char& maxChar); - static QByteArray cutByteOrderMarks(const QByteArray& data); + static QByteArray cutByteOrderMarks(const QByteArray& data, QString& errorMessage); - static qint64 cutByteOrderMarks(char* data, qint64 buffLen = -1); + static qint64 cutByteOrderMarks(char* data, QString& errorMessage, qint64 buffLen = -1); //todo: move this method to another class inline static QByteArray selectIdx256(const QBitArray& map, bool sign); diff --git a/src/corelibs/U2Core/src/util/U1AnnotationUtils.cpp b/src/corelibs/U2Core/src/util/U1AnnotationUtils.cpp index 4755fbdfe3bd51056022f53a75ad1b98e3dbe79c..f867f4c480c1ff8da0c39a976146c49ddbc22b1e 100644 --- a/src/corelibs/U2Core/src/util/U1AnnotationUtils.cpp +++ b/src/corelibs/U2Core/src/util/U1AnnotationUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -355,6 +355,29 @@ QList<U2Region> U1AnnotationUtils::getRelatedLowerCaseRegions(const U2SequenceOb return lowerCaseRegs; } +bool U1AnnotationUtils::isAnnotationAroundJunctionPoint(AnnotationSelectionData* asd, const qint64 sequenceLength) { + const QVector<U2Region> selectedRegions = asd->getSelectedRegions(); + CHECK(2 == selectedRegions.size(), false); + CHECK(2 == asd->locationIdxList.size(), false); + + bool hasCorrectStart = false; + bool hasCorrectEnd = false; + foreach(const U2Region& reg, selectedRegions) { + if (reg.startPos == 0) { + hasCorrectStart = true; + continue; + } + const qint64 endPos = reg.endPos(); + if (endPos == sequenceLength) { + hasCorrectEnd = true; + continue; + } + } + bool hasJunctionPoint = hasCorrectStart && hasCorrectEnd; + + return hasJunctionPoint; +} + char * U1AnnotationUtils::applyLowerCaseRegions(char *seq, qint64 first, qint64 len, qint64 globalOffset, const QList<U2Region> ®s) { diff --git a/src/corelibs/U2Core/src/util/U1AnnotationUtils.h b/src/corelibs/U2Core/src/util/U1AnnotationUtils.h index 28c0519c3650e90968d126aa672c91d07b93d36e..e8460075060cd8a24b3bba384aa534be57bb1906 100644 --- a/src/corelibs/U2Core/src/util/U1AnnotationUtils.h +++ b/src/corelibs/U2Core/src/util/U1AnnotationUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,8 +22,9 @@ #ifndef _U1_ANNOTATION_UTILS_H_ #define _U1_ANNOTATION_UTILS_H_ -#include <U2Core/AnnotationData.h> #include <U2Core/Annotation.h> +#include <U2Core/AnnotationData.h> +#include <U2Core/AnnotationSelection.h> #include <U2Core/DNASequence.h> #include <U2Core/GUrl.h> @@ -94,6 +95,13 @@ public: static QList<U2Region> getRelatedLowerCaseRegions(const U2SequenceObject *so, const QList<GObject *> &anns); + /** + * Check if it's the selection of the circular view, which contains the junction point + * Return true if the "Annotation Selection Data" argument contains two selected regions and two location IDs, + * And if one of these regions has start point equals to zero, and another one has end pos equals to sequence length + */ + static bool isAnnotationAroundJunctionPoint(AnnotationSelectionData* asd, const qint64 sequenceLength); + static char * applyLowerCaseRegions(char *seq, qint64 first, qint64 len, qint64 globalOffset, const QList<U2Region> ®s); static QString guessAminoTranslation(AnnotationTableObject *ao, const DNAAlphabet *al); diff --git a/src/corelibs/U2Core/src/util/U2AlphabetUtils.cpp b/src/corelibs/U2Core/src/util/U2AlphabetUtils.cpp index c5daca5fe109bf352ef0fff188f4d7dd1f59a14f..9fe5e44cf034d428260d79a612c5b709d027640f 100644 --- a/src/corelibs/U2Core/src/util/U2AlphabetUtils.cpp +++ b/src/corelibs/U2Core/src/util/U2AlphabetUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -246,9 +246,20 @@ const DNAAlphabet* U2AlphabetUtils::deriveCommonAlphabet(const DNAAlphabet* al1, } } - const DNAAlphabet* U2AlphabetUtils::getById(const QString& id) { return AppContext::getDNAAlphabetRegistry()->findById(id); } +const U2::DNAAlphabet* U2AlphabetUtils::getExtendedAlphabet(const DNAAlphabet* al) { + if (al->getId() == BaseDNAAlphabetIds::NUCL_RNA_DEFAULT()) { + return AppContext::getDNAAlphabetRegistry()->findById(BaseDNAAlphabetIds::NUCL_RNA_EXTENDED()); + } else if (al->getId() == BaseDNAAlphabetIds::NUCL_DNA_DEFAULT()) { + return AppContext::getDNAAlphabetRegistry()->findById(BaseDNAAlphabetIds::NUCL_DNA_EXTENDED()); + } else if (al->getId() == BaseDNAAlphabetIds::AMINO_DEFAULT()) { + return AppContext::getDNAAlphabetRegistry()->findById(BaseDNAAlphabetIds::AMINO_EXTENDED()); + } else { + return al; + } +} + } //namespace diff --git a/src/corelibs/U2Core/src/util/U2AlphabetUtils.h b/src/corelibs/U2Core/src/util/U2AlphabetUtils.h index 0ed94cd0c0e610a8f1123acfdfc5577c7a9d064d..d8538e53f03c893c2d27ad03d10a54eb64d85ad8 100644 --- a/src/corelibs/U2Core/src/util/U2AlphabetUtils.h +++ b/src/corelibs/U2Core/src/util/U2AlphabetUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -140,7 +140,7 @@ public: static const DNAAlphabet* deriveCommonAlphabet(const DNAAlphabet* al1, const DNAAlphabet* al2); - + static const DNAAlphabet* getExtendedAlphabet(const DNAAlphabet* al); }; }//namespace diff --git a/src/corelibs/U2Core/src/util/U2AssemblyReadIterator.cpp b/src/corelibs/U2Core/src/util/U2AssemblyReadIterator.cpp index d903e9a90bb4e4c70952750c1a5fef879ef6489e..af5b659ab9ac8259b61d8ae63959f52cff4dbd72 100644 --- a/src/corelibs/U2Core/src/util/U2AssemblyReadIterator.cpp +++ b/src/corelibs/U2Core/src/util/U2AssemblyReadIterator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/U2AssemblyReadIterator.h b/src/corelibs/U2Core/src/util/U2AssemblyReadIterator.h index 2f7c8257d16f230c71e45d35eea5d319ff6b017b..44b0057fb6e90b2dcefb9cc97b9b188a076525b4 100644 --- a/src/corelibs/U2Core/src/util/U2AssemblyReadIterator.h +++ b/src/corelibs/U2Core/src/util/U2AssemblyReadIterator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/U2AssemblyUtils.cpp b/src/corelibs/U2Core/src/util/U2AssemblyUtils.cpp index 72784a2b40ad1c25e86c6691eeb18f71f873c9c0..5022f4876bf467173c3365a3bfd984a08dc4f40d 100644 --- a/src/corelibs/U2Core/src/util/U2AssemblyUtils.cpp +++ b/src/corelibs/U2Core/src/util/U2AssemblyUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,33 +24,31 @@ #include <U2Core/TextUtils.h> #include <U2Core/U2OpStatus.h> -#include <QRegExp> - namespace U2 { -const int U2AssemblyUtils::MAX_COVERAGE_VECTOR_SIZE = 1000*1000; +const int U2AssemblyUtils::MAX_COVERAGE_VECTOR_SIZE = 1000 * 1000; U2CigarOp U2AssemblyUtils::char2Cigar(char c, QString& err) { char cu = TextUtils::UPPER_CASE_MAP[c]; switch (cu) { - case 'D': - return U2CigarOp_D; // deleted - case 'I': - return U2CigarOp_I; // inserted - case 'H': - return U2CigarOp_H; // hard-clipped - case 'M': - return U2CigarOp_M; // matched - case 'N': - return U2CigarOp_N; // skipped - case 'P': - return U2CigarOp_P; // padded - case 'S': - return U2CigarOp_S; // soft-clipped - case '=': - return U2CigarOp_EQ; // sequence match - case 'X': - return U2CigarOp_X; // sequence mismatch + case 'D': + return U2CigarOp_D; // deleted + case 'I': + return U2CigarOp_I; // inserted + case 'H': + return U2CigarOp_H; // hard-clipped + case 'M': + return U2CigarOp_M; // matched + case 'N': + return U2CigarOp_N; // skipped + case 'P': + return U2CigarOp_P; // padded + case 'S': + return U2CigarOp_S; // soft-clipped + case '=': + return U2CigarOp_EQ; // sequence match + case 'X': + return U2CigarOp_X; // sequence mismatch } err = tr("Invalid CIGAR op: '%1'!").arg(c); return U2CigarOp_Invalid; @@ -58,17 +56,17 @@ U2CigarOp U2AssemblyUtils::char2Cigar(char c, QString& err) { char U2AssemblyUtils::cigar2Char(U2CigarOp op) { char c; - switch(op) { - case U2CigarOp_D: c = 'D'; break; - case U2CigarOp_I: c = 'I'; break; - case U2CigarOp_H: c = 'H'; break; - case U2CigarOp_M: c = 'M'; break; - case U2CigarOp_N: c = 'N'; break; - case U2CigarOp_P: c = 'P'; break; - case U2CigarOp_S: c = 'S'; break; - case U2CigarOp_EQ:c = '='; break; - case U2CigarOp_X: c = 'X'; break; - default: assert(0); c = '?'; + switch (op) { + case U2CigarOp_D: c = 'D'; break; + case U2CigarOp_I: c = 'I'; break; + case U2CigarOp_H: c = 'H'; break; + case U2CigarOp_M: c = 'M'; break; + case U2CigarOp_N: c = 'N'; break; + case U2CigarOp_P: c = 'P'; break; + case U2CigarOp_S: c = 'S'; break; + case U2CigarOp_EQ:c = '='; break; + case U2CigarOp_X: c = 'X'; break; + default: assert(0); c = '?'; } return c; } @@ -79,7 +77,7 @@ QList<U2CigarToken> U2AssemblyUtils::parseCigar(const QByteArray& cigarString, Q const char* cigar = cigarString.constData(); int count = 0; // count numbers - while (pos < len ) { + while (pos < len) { char c = cigar[pos++]; if (c >= '0' && c <= '9') { int n = c - '0'; @@ -114,16 +112,16 @@ qint64 U2AssemblyUtils::getEffectiveReadLength(const U2AssemblyRead& read) { qint64 U2AssemblyUtils::getCigarExtraLength(const QList<U2CigarToken>& cigar) { qint64 res = 0; foreach(const U2CigarToken& t, cigar) { - switch(t.op) { - case U2CigarOp_I: - case U2CigarOp_S: - res-=t.count; - break; - case U2CigarOp_D: - case U2CigarOp_N: - res+=t.count; - break; - default:; + switch (t.op) { + case U2CigarOp_I: + case U2CigarOp_S: + res -= t.count; + break; + case U2CigarOp_D: + case U2CigarOp_N: + res += t.count; + break; + default:; } } return res; @@ -131,9 +129,9 @@ qint64 U2AssemblyUtils::getCigarExtraLength(const QList<U2CigarToken>& cigar) { QByteArray U2AssemblyUtils::serializeCoverageStat(const U2AssemblyCoverageStat& coverageStat) { QByteArray data; - for(int index = 0;index < coverageStat.size();index++) { - for(int i = 0;i < 4;i++) { - data.append((char)(coverageStat[index] >> (i*8))); + for (int index = 0;index < coverageStat.size();index++) { + for (int i = 0;i < 4;i++) { + data.append((char)(coverageStat[index] >> (i * 8))); } } return data; @@ -141,11 +139,11 @@ QByteArray U2AssemblyUtils::serializeCoverageStat(const U2AssemblyCoverageStat& void U2AssemblyUtils::deserializeCoverageStat(QByteArray data, U2AssemblyCoverageStat& res, U2OpStatus &os) { res.clear(); - if(!data.isEmpty() && 0 == (data.size() % 4)) { - for(int index = 0;index < data.size()/4;index++) { + if (!data.isEmpty() && 0 == (data.size() % 4)) { + for (int index = 0;index < data.size() / 4;index++) { int value = 0; - for(int i = 0;i < 4;i++) { - value |= ((int)data[index*4 + i] & 0xff) << (i*8); + for (int i = 0;i < 4;i++) { + value |= ((int)data[index * 4 + i] & 0xff) << (i * 8); } res.append(value); } diff --git a/src/corelibs/U2Core/src/util/U2AssemblyUtils.h b/src/corelibs/U2Core/src/util/U2AssemblyUtils.h index 331512de651efd3cf3769c3838907f8c14852f2e..a12eaeb729bd421704865ead084c577abb33711b 100644 --- a/src/corelibs/U2Core/src/util/U2AssemblyUtils.h +++ b/src/corelibs/U2Core/src/util/U2AssemblyUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/U2AttributeUtils.cpp b/src/corelibs/U2Core/src/util/U2AttributeUtils.cpp index f033b7bbe83c27d284048fdddd909d25cb968f04..89bbc487f4b763e57e27fd29c0de46ea2616fbb4 100644 --- a/src/corelibs/U2Core/src/util/U2AttributeUtils.cpp +++ b/src/corelibs/U2Core/src/util/U2AttributeUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/U2AttributeUtils.h b/src/corelibs/U2Core/src/util/U2AttributeUtils.h index 1572c8e3c08ac04e8784333fea5db0f2555f9b96..886b0ea5191036219c40d28421c7c6eae3eab8ef 100644 --- a/src/corelibs/U2Core/src/util/U2AttributeUtils.h +++ b/src/corelibs/U2Core/src/util/U2AttributeUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,7 +33,7 @@ class U2OpStatus; /** U2Attribute utility functions - All functions return empty attribute if it is not found or error occured. + All functions return empty attribute if it is not found or error occurred. Use U2Entity::hasValidId() to check for valid value. */ class U2CORE_EXPORT U2AttributeUtils : public QObject { diff --git a/src/corelibs/U2Core/src/util/U2Bits.cpp b/src/corelibs/U2Core/src/util/U2Bits.cpp index 87aaa61cb3f4008268f055f3d8d9d01c884ac6c7..61ddc375fa61ac6f87005510552d2dfce12c4ef3 100644 --- a/src/corelibs/U2Core/src/util/U2Bits.cpp +++ b/src/corelibs/U2Core/src/util/U2Bits.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/U2Bits.h b/src/corelibs/U2Core/src/util/U2Bits.h index 12fb72a3b6c8688f82547903000124233a581bdc..eb0a2cd3b1e3c180c67eb7f27f523dcc3ddaf7bd 100644 --- a/src/corelibs/U2Core/src/util/U2Bits.h +++ b/src/corelibs/U2Core/src/util/U2Bits.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/U2DbiUpgrader.cpp b/src/corelibs/U2Core/src/util/U2DbiUpgrader.cpp index 10f9728582899f10dd7b08459a5c32548b0ef221..a99ca5e2eae85a9c1e6eaf1148bd3052c16f7279 100644 --- a/src/corelibs/U2Core/src/util/U2DbiUpgrader.cpp +++ b/src/corelibs/U2Core/src/util/U2DbiUpgrader.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/U2DbiUpgrader.h b/src/corelibs/U2Core/src/util/U2DbiUpgrader.h index f72a0ca40b89e4bfa9ecca5747980434fde7c4e2..cf37214abfa65187c0b2981e0bcb738a352bc38a 100644 --- a/src/corelibs/U2Core/src/util/U2DbiUpgrader.h +++ b/src/corelibs/U2Core/src/util/U2DbiUpgrader.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/U2FeatureUtils.cpp b/src/corelibs/U2Core/src/util/U2FeatureUtils.cpp index 92eb5edd98dac8b46b7e288de6cfa74db5b474df..b53b27458881eaebb9c5396bea3d9e80c11903db 100644 --- a/src/corelibs/U2Core/src/util/U2FeatureUtils.cpp +++ b/src/corelibs/U2Core/src/util/U2FeatureUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,10 +23,8 @@ #include <U2Core/AnnotationGroup.h> #include <U2Core/L10n.h> #include <U2Core/U2DbiUtils.h> -#include <U2Core/U2FeatureDbi.h> #include <U2Core/U2FeatureKeys.h> #include <U2Core/U2Location.h> -#include <U2Core/U2ObjectDbi.h> #include <U2Core/U2OpStatusUtils.h> #include <U2Core/U2SafePoints.h> @@ -63,8 +61,7 @@ U2AnnotationTable U2FeatureUtils::getAnnotationTable(const U2EntityRef &tableRef } U2Feature U2FeatureUtils::exportAnnotationDataToFeatures(const SharedAnnotationData &a, const U2DataId &rootFeatureId, - const U2DataId &parentFeatureId, const U2DbiRef &dbiRef, U2OpStatus &os) -{ + const U2DataId &parentFeatureId, const U2DbiRef &dbiRef, U2OpStatus &os) { U2Feature feature; QList<U2FeatureKey> fKeys; SAFE_POINT(!parentFeatureId.isEmpty(), "Invalid feature ID detected!", feature); @@ -93,8 +90,7 @@ U2Feature U2FeatureUtils::exportAnnotationDataToFeatures(const SharedAnnotationD } U2Feature U2FeatureUtils::exportAnnotationGroupToFeature(const QString &name, const U2DataId &rootFeatureId, - const U2DataId &parentFeatureId, const U2DbiRef &dbiRef, U2OpStatus &os) -{ + const U2DataId &parentFeatureId, const U2DbiRef &dbiRef, U2OpStatus &os) { U2Feature result; SAFE_POINT(!name.isEmpty() && (!name.contains(AnnotationGroup::GROUP_PATH_SEPARATOR) || name == AnnotationGroup::ROOT_GROUP_NAME), "Invalid annotation group detected!", result); @@ -154,7 +150,7 @@ void U2FeatureUtils::removeFeature(const U2DataId &featureId, const U2DbiRef &db } void U2FeatureUtils::removeFeatures(const QList<U2DataId> &featureIds, const U2DbiRef &dbiRef, U2OpStatus &os) { - foreach (const U2DataId &featureId, featureIds) { + foreach(const U2DataId &featureId, featureIds) { SAFE_POINT(!featureId.isEmpty(), "Invalid feature detected!", ); } SAFE_POINT(dbiRef.isValid(), "Invalid DBI reference detected!", ); @@ -168,8 +164,7 @@ void U2FeatureUtils::removeFeatures(const QList<U2DataId> &featureIds, const U2D } void U2FeatureUtils::addSubFeatures(const QVector<U2Region> ®ions, const U2Strand &strand, const U2DataId &parentFeatureId, - const U2DataId &rootFeatureId, const U2DbiRef &dbiRef, U2OpStatus &os) -{ + const U2DataId &rootFeatureId, const U2DbiRef &dbiRef, U2OpStatus &os) { SAFE_POINT(!parentFeatureId.isEmpty(), "Invalid feature ID detected!", ); SAFE_POINT(dbiRef.isValid(), "Invalid DBI reference detected!", ); CHECK(!regions.isEmpty(), ); @@ -179,7 +174,7 @@ void U2FeatureUtils::addSubFeatures(const QVector<U2Region> ®ions, const U2St U2FeatureDbi *dbi = connection.dbi->getFeatureDbi(); SAFE_POINT(NULL != dbi, "Invalid DBI pointer encountered!", ); - foreach (const U2Region ®, regions) { + foreach(const U2Region ®, regions) { SAFE_POINT(!reg.isEmpty(), "Attempting to assign annotation to an empty region!", ); U2Feature sub; sub.featureClass = U2Feature::Annotation; @@ -189,7 +184,7 @@ void U2FeatureUtils::addSubFeatures(const QVector<U2Region> ®ions, const U2St sub.rootFeatureId = rootFeatureId; dbi->createFeature(sub, QList<U2FeatureKey>(), os); CHECK_OP(os, ); - } + } } QList<FeatureAndKey> U2FeatureUtils::getSortedSubgroups(QList<FeatureAndKey> &fkList, const U2DataId &parentId) { @@ -215,8 +210,7 @@ QList<FeatureAndKey> U2FeatureUtils::getSortedSubgroups(QList<FeatureAndKey> &fk } AnnotationGroup * U2FeatureUtils::loadAnnotationTable(const U2DataId &rootFeatureId, const U2DbiRef &dbiRef, - AnnotationTableObject *parentObj, U2OpStatus &os) -{ + AnnotationTableObject *parentObj, U2OpStatus &os) { SAFE_POINT(!rootFeatureId.isEmpty(), "Invalid feature ID detected!", NULL); SAFE_POINT(NULL != parentObj, L10N::nullPointerError("Annotation table object"), NULL); SAFE_POINT(dbiRef.isValid(), "Invalid DBI reference detected!", NULL); @@ -233,7 +227,7 @@ AnnotationGroup * U2FeatureUtils::loadAnnotationTable(const U2DataId &rootFeatur QList<FeatureAndKey> groups = getSortedSubgroups(rawData, rootFeatureId); rawData = groups + rawData; - foreach (const FeatureAndKey &fnk, rawData) { + foreach(const FeatureAndKey &fnk, rawData) { if (U2Feature::Group == fnk.feature.featureClass) { rootGroup->addSubgroup(fnk.feature); } else if (NULL != (currentAnnotation = rootGroup->findAnnotationById(fnk.feature.parentFeatureId))) { @@ -302,8 +296,7 @@ void U2FeatureUtils::updateFeatureName(const U2DataId &featureId, const QString } void U2FeatureUtils::updateFeatureLocation(const U2DataId &featureId, const U2DataId &rootFeatureId, const U2Location &location, - const U2DbiRef &dbiRef, U2OpStatus &os) -{ + const U2DbiRef &dbiRef, U2OpStatus &os) { SAFE_POINT(!featureId.isEmpty(), "Invalid feature ID detected!", ); SAFE_POINT(dbiRef.isValid(), "Invalid DBI reference detected!", ); @@ -311,7 +304,7 @@ void U2FeatureUtils::updateFeatureLocation(const U2DataId &featureId, const U2Da connection.open(dbiRef, os); CHECK_OP(os, ); U2FeatureDbi *dbi = connection.dbi->getFeatureDbi(); - SAFE_POINT(NULL != dbi, "Invalid DBI pointer encountered!",); + SAFE_POINT(NULL != dbi, "Invalid DBI pointer encountered!", ); dbi->removeFeaturesByParent(featureId, os, NotSelectParentFeature); @@ -348,7 +341,7 @@ void U2FeatureUtils::addFeatureKey(const U2DataId &featureId, const U2FeatureKey DbiConnection connection(dbiRef, os); CHECK_OP(os, ); U2FeatureDbi *dbi = connection.dbi->getFeatureDbi(); - SAFE_POINT(NULL != dbi, "Invalid DBI pointer encountered!",); + SAFE_POINT(NULL != dbi, "Invalid DBI pointer encountered!", ); dbi->addKey(featureId, key, os); } @@ -380,7 +373,7 @@ SharedAnnotationData U2FeatureUtils::getAnnotationDataFromFeature(const U2DataId // extract feature keys first to check if the feature actually represents an annotation group QList<U2FeatureKey> fKeys = fDbi->getFeatureKeys(featureId, op); CHECK_OP(op, result); - foreach (const U2FeatureKey &key, fKeys) { + foreach(const U2FeatureKey &key, fKeys) { addFeatureKeyToAnnotation(key, result, op); CHECK_OP(op, result); } @@ -390,7 +383,7 @@ SharedAnnotationData U2FeatureUtils::getAnnotationDataFromFeature(const U2DataId U2Feature annotatingFeature; QVector<U2Region> regions; - foreach (const U2Feature &f, features) { + foreach(const U2Feature &f, features) { SAFE_POINT_EXT(U2Feature::Annotation == f.featureClass, op.setError("Invalid feature type detected!"), result); if (Q_UNLIKELY(f.id == featureId)) { CHECK_EXT(!annotatingFeature.hasValidId(), op.setError("Invalid feature selection occurred!"), result); @@ -412,24 +405,21 @@ SharedAnnotationData U2FeatureUtils::getAnnotationDataFromFeature(const U2DataId } QList<U2Feature> U2FeatureUtils::getSubAnnotations(const U2DataId &parentFeatureId, const U2DbiRef &dbiRef, U2OpStatus &os, - OperationScope resursive, ParentFeatureStatus parent) -{ + OperationScope resursive, ParentFeatureStatus parent) { return (Root == parent) ? getFeaturesByRoot(parentFeatureId, dbiRef, os, resursive, U2Feature::Annotation) : getFeaturesByParent(parentFeatureId, dbiRef, os, resursive, U2Feature::Annotation); } QList<U2Feature> U2FeatureUtils::getSubGroups(const U2DataId &parentFeatureId, const U2DbiRef &dbiRef, U2OpStatus &os, - OperationScope resursive, ParentFeatureStatus parent) -{ + OperationScope resursive, ParentFeatureStatus parent) { return (Root == parent) ? getFeaturesByRoot(parentFeatureId, dbiRef, os, resursive, U2Feature::Group) : getFeaturesByParent(parentFeatureId, dbiRef, os, resursive, U2Feature::Group); } QList<U2Feature> U2FeatureUtils::getFeaturesByParent(const U2DataId &parentFeatureId, const U2DbiRef &dbiRef, U2OpStatus &os, - OperationScope scope, const FeatureFlags &featureClass, SubfeatureSelectionMode mode) -{ + OperationScope scope, const FeatureFlags &featureClass, SubfeatureSelectionMode mode) { QList<U2Feature> result; SAFE_POINT(!parentFeatureId.isEmpty(), "Invalid feature detected!", result); SAFE_POINT(dbiRef.isValid(), "Invalid DBI reference detected!", result); @@ -463,8 +453,7 @@ QList<U2Feature> U2FeatureUtils::getFeaturesByParent(const U2DataId &parentFeatu } QList<U2Feature> U2FeatureUtils::getFeaturesByRoot(const U2DataId &rootFeatureId, const U2DbiRef &dbiRef, - U2OpStatus &os, OperationScope scope, const FeatureFlags &featureClass) -{ + U2OpStatus &os, OperationScope scope, const FeatureFlags &featureClass) { QList<U2Feature> result; SAFE_POINT(!rootFeatureId.isEmpty(), "Invalid feature detected!", result); SAFE_POINT(dbiRef.isValid(), "Invalid DBI reference detected!", result); @@ -512,8 +501,7 @@ U2Feature U2FeatureUtils::getFeatureById(const U2DataId &id, const U2DbiRef &dbi } void U2FeatureUtils::createFeatureEntityFromAnnotationData(const SharedAnnotationData &annotation, const U2DataId &rootFeatureId, - const U2DataId &parentFeatureId, U2Feature &resFeature, QList<U2FeatureKey> &resFeatureKeys) -{ + const U2DataId &parentFeatureId, U2Feature &resFeature, QList<U2FeatureKey> &resFeatureKeys) { resFeature.featureClass = U2Feature::Annotation; //copy data resFeature.name = annotation->name; @@ -526,7 +514,7 @@ void U2FeatureUtils::createFeatureEntityFromAnnotationData(const SharedAnnotatio } //add qualifiers - foreach (const U2Qualifier &qual, annotation->qualifiers) { + foreach(const U2Qualifier &qual, annotation->qualifiers) { resFeatureKeys.append(U2FeatureKey(qual.name, qual.value)); } @@ -544,10 +532,10 @@ void U2FeatureUtils::createFeatureEntityFromAnnotationData(const SharedAnnotatio U2FeatureKey U2FeatureUtils::createFeatureKeyLocationOperator(U2LocationOperator value) { U2FeatureKey result; switch (value) { - case U2LocationOperator_Join : + case U2LocationOperator_Join: result = U2FeatureKey(U2FeatureKeyOperation, U2FeatureKeyOperationJoin); break; - case U2LocationOperator_Order : + case U2LocationOperator_Order: result = U2FeatureKey(U2FeatureKeyOperation, U2FeatureKeyOperationOrder); break; case U2LocationOperator_Bond: diff --git a/src/corelibs/U2Core/src/util/U2FeatureUtils.h b/src/corelibs/U2Core/src/util/U2FeatureUtils.h index acced328767602e64a6bc36a8bdaccae4924d535..95b9058eb114aa7ea50f0a3427b2c06207344026 100644 --- a/src/corelibs/U2Core/src/util/U2FeatureUtils.h +++ b/src/corelibs/U2Core/src/util/U2FeatureUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/U2ObjectTypeUtils.cpp b/src/corelibs/U2Core/src/util/U2ObjectTypeUtils.cpp index 861f1349d035311807bf7f91b16d3d3dc1645c86..0d775b927f24084acd2c2846cc5318d851beebe5 100644 --- a/src/corelibs/U2Core/src/util/U2ObjectTypeUtils.cpp +++ b/src/corelibs/U2Core/src/util/U2ObjectTypeUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/U2ObjectTypeUtils.h b/src/corelibs/U2Core/src/util/U2ObjectTypeUtils.h index 5c74d3067e768ae555ae892495ee6523b988a9b9..6dc466b33fdafe0f85526e57cfe89ac99edf8abc 100644 --- a/src/corelibs/U2Core/src/util/U2ObjectTypeUtils.h +++ b/src/corelibs/U2Core/src/util/U2ObjectTypeUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/U2OpStatusUtils.h b/src/corelibs/U2Core/src/util/U2OpStatusUtils.h index 386ce03e78ab0ae969e461845a9a59ac50ac1a47..e0c8e0a2a16b507d7476fff5ec3d418703983fbe 100644 --- a/src/corelibs/U2Core/src/util/U2OpStatusUtils.h +++ b/src/corelibs/U2Core/src/util/U2OpStatusUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Core/src/util/U2SequenceUtils.cpp b/src/corelibs/U2Core/src/util/U2SequenceUtils.cpp index 83c6267b631974b3fe75703c2bc2a47180e5c248..cfca1416bf0c386c3cd6b6da3974bc29d544c0ab 100644 --- a/src/corelibs/U2Core/src/util/U2SequenceUtils.cpp +++ b/src/corelibs/U2Core/src/util/U2SequenceUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,7 +22,6 @@ #include <QApplication> #include <U2Core/AppContext.h> -#include <U2Core/DNASequence.h> #include <U2Core/DNASequenceObject.h> #include <U2Core/DNATranslation.h> #include <U2Core/GObject.h> @@ -31,7 +30,6 @@ #include <U2Core/U2AlphabetUtils.h> #include <U2Core/U2AttributeDbi.h> #include <U2Core/U2AttributeUtils.h> -#include <U2Core/U2DbiUtils.h> #include <U2Core/U2ObjectDbi.h> #include <U2Core/U2OpStatus.h> #include <U2Core/U2OpStatusUtils.h> @@ -144,8 +142,7 @@ U2Sequence U2SequenceUtils::copySequence(const U2EntityRef& srcSeq, const U2DbiR } static QList<QByteArray> _extractRegions(const U2EntityRef& seqRef, const QVector<U2Region>& regions, const DNATranslation* complTT, - U2OpStatus& os) -{ + U2OpStatus& os) { QList<QByteArray> res; DbiConnection con(seqRef.dbiRef, os); @@ -160,7 +157,7 @@ static QList<QByteArray> _extractRegions(const U2EntityRef& seqRef, const QVecto for (int i = 0, n = safeLocation.size(); i < n; i++) { const U2Region& oReg = safeLocation.at(i); if (complTT == NULL) { - QByteArray part = seqDbi->getSequenceData(seq.id, U2Region(oReg.startPos, oReg.length) , os); + QByteArray part = seqDbi->getSequenceData(seq.id, U2Region(oReg.startPos, oReg.length), os); CHECK_OP(os, QList<QByteArray>()); res.append(part); } else { @@ -175,12 +172,11 @@ static QList<QByteArray> _extractRegions(const U2EntityRef& seqRef, const QVecto } QList<QByteArray> U2SequenceUtils::extractRegions(const U2EntityRef& seqRef, const QVector<U2Region>& origLocation, - const DNATranslation* complTT, const DNATranslation* aminoTT, bool join, U2OpStatus& os) -{ + const DNATranslation* complTT, const DNATranslation* aminoTT, bool join, U2OpStatus& os) { QList<QByteArray> res = _extractRegions(seqRef, origLocation, complTT, os); CHECK_OP(os, res) - DbiConnection con(seqRef.dbiRef, os); + DbiConnection con(seqRef.dbiRef, os); CHECK_OP(os, res); U2SequenceDbi* seqDbi = con.dbi->getSequenceDbi(); @@ -242,24 +238,24 @@ void U2SequenceUtils::setQuality(const U2EntityRef& entityRef, const DNAQuality& U2OpStatus2Log os; DbiConnection con(entityRef.dbiRef, os); CHECK_OP(os, ); - QList<U2DataId> idQualList=con.dbi->getAttributeDbi()->getObjectAttributes(entityRef.entityId,DNAInfo::FASTQ_QUAL_CODES,os); + QList<U2DataId> idQualList = con.dbi->getAttributeDbi()->getObjectAttributes(entityRef.entityId, DNAInfo::FASTQ_QUAL_CODES, os); CHECK_OP(os, ); - if(!idQualList.isEmpty()){ - con.dbi->getAttributeDbi()->removeAttributes(idQualList,os); + if (!idQualList.isEmpty()) { + con.dbi->getAttributeDbi()->removeAttributes(idQualList, os); CHECK_OP(os, ); } - QList<U2DataId> idQualTypeList=con.dbi->getAttributeDbi()->getObjectAttributes(entityRef.entityId,DNAInfo::FASTQ_QUAL_TYPE,os); + QList<U2DataId> idQualTypeList = con.dbi->getAttributeDbi()->getObjectAttributes(entityRef.entityId, DNAInfo::FASTQ_QUAL_TYPE, os); CHECK_OP(os, ); - if(!idQualTypeList.isEmpty()){ - con.dbi->getAttributeDbi()->removeAttributes(idQualTypeList,os); + if (!idQualTypeList.isEmpty()) { + con.dbi->getAttributeDbi()->removeAttributes(idQualTypeList, os); CHECK_OP(os, ); } - U2ByteArrayAttribute qualityCodes(entityRef.entityId, DNAInfo::FASTQ_QUAL_CODES,q.qualCodes); - U2IntegerAttribute qualityType(entityRef.entityId, DNAInfo::FASTQ_QUAL_TYPE,q.type); - con.dbi->getAttributeDbi()->createByteArrayAttribute(qualityCodes,os); + U2ByteArrayAttribute qualityCodes(entityRef.entityId, DNAInfo::FASTQ_QUAL_CODES, q.qualCodes); + U2IntegerAttribute qualityType(entityRef.entityId, DNAInfo::FASTQ_QUAL_TYPE, q.type); + con.dbi->getAttributeDbi()->createByteArrayAttribute(qualityCodes, os); CHECK_OP(os, ); - con.dbi->getAttributeDbi()->createIntegerAttribute(qualityType,os); + con.dbi->getAttributeDbi()->createIntegerAttribute(qualityType, os); CHECK_OP(os, ); } @@ -268,19 +264,19 @@ void U2SequenceUtils::setSequenceInfo(U2OpStatus &os, const U2EntityRef& entityR CHECK_OP(os, ); QList<U2DataId> chainIdList = con.dbi->getAttributeDbi()->getObjectAttributes(entityRef.entityId, DNAInfo::CHAIN_ID, os); CHECK_OP(os, ); - if (!chainIdList.isEmpty()){ + if (!chainIdList.isEmpty()) { con.dbi->getAttributeDbi()->removeObjectAttributes(chainIdList.first(), os); CHECK_OP(os, ); } QList<U2DataId> commentList = con.dbi->getAttributeDbi()->getObjectAttributes(entityRef.entityId, DNAInfo::COMMENT, os); CHECK_OP(os, ); - if (!commentList.isEmpty()){ + if (!commentList.isEmpty()) { con.dbi->getAttributeDbi()->removeObjectAttributes(commentList.first(), os); CHECK_OP(os, ); } QList<U2DataId> definitionList = con.dbi->getAttributeDbi()->getObjectAttributes(entityRef.entityId, DNAInfo::DEFINITION, os); CHECK_OP(os, ); - if (!definitionList.isEmpty()){ + if (!definitionList.isEmpty()) { con.dbi->getAttributeDbi()->removeObjectAttributes(definitionList.first(), os); CHECK_OP(os, ); } @@ -366,8 +362,7 @@ U2Sequence U2SequenceUtils::getSequenceDbInfo(U2SequenceObject *seqObj) { * then the method verifies the value and returns it (if it is correct). * Otherwise, returns NO_CASE_ANNS. */ -static CaseAnnotationsMode getCaseAnnotationsModeHint(const QVariantMap& fs) -{ +static CaseAnnotationsMode getCaseAnnotationsModeHint(const QVariantMap& fs) { if (fs.keys().contains(GObjectHint_CaseAnns)) { QVariant caseAnnsVariant = fs.value(GObjectHint_CaseAnns); SAFE_POINT(caseAnnsVariant.canConvert<int>(), "Can't convert a case annotations hint!", NO_CASE_ANNS); @@ -390,8 +385,7 @@ const QString U2SequenceImporter::EMPTY_SEQUENCE_ERROR = QApplication::translate "Sequence was not imported. Probably, this is because the sequence is empty."); U2SequenceImporter::U2SequenceImporter(const QVariantMap& fs, bool lazyMode, bool singleThread) -: lazyMode(lazyMode), singleThread(singleThread), sequenceCreated(false) -{ + : lazyMode(lazyMode), singleThread(singleThread), sequenceCreated(false) { insertBlockSize = DEFAULT_SEQUENCE_INSERT_BLOCK_SIZE; currentLength = 0; isUnfinishedRegion = false; @@ -401,8 +395,7 @@ U2SequenceImporter::U2SequenceImporter(const QVariantMap& fs, bool lazyMode, boo } U2SequenceImporter::U2SequenceImporter(qint64 _insertBlockSize, const QVariantMap& fs, bool lazyMode, bool singleThread) -: insertBlockSize(_insertBlockSize), lazyMode(lazyMode), singleThread(singleThread) -{ + : insertBlockSize(_insertBlockSize), lazyMode(lazyMode), singleThread(singleThread) { insertBlockSize = qMin((qint64)10, insertBlockSize); currentLength = 0; isUnfinishedRegion = false; @@ -421,11 +414,11 @@ U2SequenceImporter::~U2SequenceImporter() { void U2SequenceImporter::startSequence(U2OpStatus &os, - const U2DbiRef &dbiRef, - const QString &dstFolder, - const QString &visualName, - bool circular, - const U2AlphabetId &alphabetId) { + const U2DbiRef &dbiRef, + const QString &dstFolder, + const QString &visualName, + bool circular, + const U2AlphabetId &alphabetId) { SAFE_POINT(!con.isOpen(), "Connection is already opened!", ); con.open(dbiRef, true, os); CHECK_OP(os, ); @@ -456,16 +449,14 @@ void U2SequenceImporter::addBlock(const char* data, qint64 len, U2OpStatus& os) const DNAAlphabet* oldAl = U2AlphabetUtils::getById(sequence.alphabet); const DNAAlphabet* resAl = blockAl; if (oldAl != NULL) { - if(oldAl->getType() == DNAAlphabet_AMINO && resAl->getType() == DNAAlphabet_NUCL){ + if (oldAl->getType() == DNAAlphabet_AMINO && resAl->getType() == DNAAlphabet_NUCL) { resAl = oldAl; - } - else if(resAl->getType() == DNAAlphabet_AMINO && oldAl->getType() == DNAAlphabet_NUCL){ + } else if (resAl->getType() == DNAAlphabet_AMINO && oldAl->getType() == DNAAlphabet_NUCL) { oldAl = resAl; - } - else{ + } else { resAl = U2AlphabetUtils::deriveCommonAlphabet(blockAl, oldAl); } - CHECK_EXT(resAl!=NULL, os.setError(U2SequenceUtils::tr("Failed to derive sequence alphabet!")), ); + CHECK_EXT(resAl != NULL, os.setError(U2SequenceUtils::tr("Failed to derive sequence alphabet!")), ); } if (resAl != U2AlphabetUtils::getById(sequence.alphabet)) { @@ -573,7 +564,7 @@ U2Sequence U2SequenceImporter::finalizeSequence(U2OpStatus& os) { _addBuffer2Db(os); LOG_OP(os); // If sequence is empty, addBlock is never called and alphabet is not set. So set it here to some default value - if(! sequence.alphabet.isValid() && sequence.version != 0) { + if (!sequence.alphabet.isValid() && sequence.version != 0) { sequence.alphabet.id = BaseDNAAlphabetIds::RAW(); con.dbi->getSequenceDbi()->updateSequenceObject(sequence, os); LOG_OP(os); @@ -583,7 +574,7 @@ U2Sequence U2SequenceImporter::finalizeSequence(U2OpStatus& os) { annList << U1AnnotationUtils::finalizeUnfinishedRegion(isUnfinishedRegion, unfinishedRegion, LOWER_CASE == caseAnnsMode); if (1 == annList.size()) { - const QVector<U2Region> ®s = annList.first()->getRegions( ); + const QVector<U2Region> ®s = annList.first()->getRegions(); if (1 == regs.size()) { U2Region reg = regs.first(); if (0 == reg.startPos && sequence.length == reg.length) { @@ -635,16 +626,14 @@ void U2MemorySequenceImporter::addBlock(const char* data, qint64 len, U2OpStatus const DNAAlphabet* oldAl = U2AlphabetUtils::getById(sequence.alphabet); const DNAAlphabet* resAl = blockAl; if (oldAl != NULL) { - if(oldAl->getType() == DNAAlphabet_AMINO && resAl->getType() == DNAAlphabet_NUCL){ + if (oldAl->getType() == DNAAlphabet_AMINO && resAl->getType() == DNAAlphabet_NUCL) { resAl = oldAl; - } - else if(resAl->getType() == DNAAlphabet_AMINO && oldAl->getType() == DNAAlphabet_NUCL){ + } else if (resAl->getType() == DNAAlphabet_AMINO && oldAl->getType() == DNAAlphabet_NUCL) { oldAl = resAl; - } - else{ + } else { resAl = U2AlphabetUtils::deriveCommonAlphabet(blockAl, oldAl); } - CHECK_EXT(resAl!=NULL, os.setError(U2SequenceUtils::tr("Failed to derive sequence alphabet!")), ); + CHECK_EXT(resAl != NULL, os.setError(U2SequenceUtils::tr("Failed to derive sequence alphabet!")), ); } if (resAl != U2AlphabetUtils::getById(sequence.alphabet)) { @@ -683,7 +672,7 @@ QVector<U2Region> U2PseudoCircularization::uncircularizeRegion(const U2Region& r if (region.endPos() > seqLen) { uncircularized = true; return QVector<U2Region>() << U2Region(region.startPos, seqLen - region.startPos) - << U2Region(0, region.endPos() - seqLen); + << U2Region(0, region.endPos() - seqLen); } return QVector<U2Region>() << region; } diff --git a/src/corelibs/U2Core/src/util/U2SequenceUtils.h b/src/corelibs/U2Core/src/util/U2SequenceUtils.h index 8e2c3be2b5e4f1ed4011f30ccea05ef430d64149..301cab14ce9e8a7183e2b07730ab0d71bc90f781 100644 --- a/src/corelibs/U2Core/src/util/U2SequenceUtils.h +++ b/src/corelibs/U2Core/src/util/U2SequenceUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -37,14 +37,14 @@ class U2SequenceObject; /** U2Sequence and related structures utility functions -*/ + */ class U2CORE_EXPORT U2SequenceUtils : public QObject { Q_OBJECT public: /** Extract sequence parts marked by the regions Note: the order of complemented regions is also reversed - */ + */ static QList<QByteArray> extractRegions(const U2EntityRef& seqRef, const QVector<U2Region>& regions, const DNATranslation* complTT, const DNATranslation* aminoTT, bool join, U2OpStatus& os); @@ -84,7 +84,7 @@ public: U2Sequence finalizeSequence(U2OpStatus& os); /** Checks that finalized sequence has the valid id */ U2Sequence finalizeSequenceAndValidate(U2OpStatus& os); - U2AlphabetId getAlphabet() const {return sequence.alphabet;} + U2AlphabetId getAlphabet() const { return sequence.alphabet; } void setCaseAnnotationsMode(CaseAnnotationsMode mode); bool isCaseAnnotationsModeOn() const; diff --git a/src/corelibs/U2Core/src/util/U2VariationUtils.cpp b/src/corelibs/U2Core/src/util/U2VariationUtils.cpp index a54aa722d1ba3623c0906b23932f2e6fa4576d64..191d36ede69856eb295c4019e38d518bbae38370 100644 --- a/src/corelibs/U2Core/src/util/U2VariationUtils.cpp +++ b/src/corelibs/U2Core/src/util/U2VariationUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -21,8 +21,6 @@ #include <U2Core/AnnotationTableObject.h> #include <U2Core/AppContext.h> -#include <U2Core/AppSettings.h> -#include <U2Core/U2DbiUtils.h> #include <U2Core/U2ObjectDbi.h> #include <U2Core/U2OpStatus.h> #include <U2Core/U2OpStatusUtils.h> @@ -33,7 +31,7 @@ namespace U2 { -void U2VariationUtils::addVariationsToTrack( const U2EntityRef& ref, const QList<U2Variant>& variants, U2OpStatus& os ){ +void U2VariationUtils::addVariationsToTrack(const U2EntityRef& ref, const QList<U2Variant>& variants, U2OpStatus& os) { DbiConnection con(ref.dbiRef, os); CHECK_OP(os, ); @@ -47,7 +45,7 @@ void U2VariationUtils::addVariationsToTrack( const U2EntityRef& ref, const QList vdbi->addVariantsToTrack(track, &bufIter, os); } -U2VariantTrack U2VariationUtils::createVariantTrack( const U2DbiRef &dbiRef, const QString& seqName, U2OpStatus& os ){ +U2VariantTrack U2VariationUtils::createVariantTrack(const U2DbiRef &dbiRef, const QString& seqName, U2OpStatus& os) { DbiConnection con(dbiRef, os); CHECK_OP(os, U2VariantTrack()); @@ -61,7 +59,7 @@ U2VariantTrack U2VariationUtils::createVariantTrack( const U2DbiRef &dbiRef, con return track; } -AnnotationData U2VariationUtils::variantToAnnotation( const U2Variant &var ) { +AnnotationData U2VariationUtils::variantToAnnotation(const U2Variant &var) { AnnotationData d; U2Region varRegion; @@ -69,15 +67,15 @@ AnnotationData U2VariationUtils::variantToAnnotation( const U2Variant &var ) { varRegion.length = var.endPos - var.startPos + 1; d.location->regions << varRegion; - d.qualifiers << U2Qualifier( "public_id", var.publicId ); - d.qualifiers << U2Qualifier( "ref_data", var.refData ); - d.qualifiers << U2Qualifier( "obs_data", var.obsData ); + d.qualifiers << U2Qualifier("public_id", var.publicId); + d.qualifiers << U2Qualifier("ref_data", var.refData); + d.qualifiers << U2Qualifier("obs_data", var.obsData); d.name = "variation"; return d; } -U2Feature U2VariationUtils::variantToFeature( const U2Variant& var ){ +U2Feature U2VariationUtils::variantToFeature(const U2Variant& var) { U2Feature res; res.id = var.id; @@ -87,38 +85,38 @@ U2Feature U2VariationUtils::variantToFeature( const U2Variant& var ){ return res; } -QList<U2Variant> U2VariationUtils::getSNPFromSequences( const QByteArray& refSeq, const QByteArray& varSeq, CallVariationsMode mode, bool ignoreGaps, - const QString& namePrefix, int nameStartIdx){ +QList<U2Variant> U2VariationUtils::getSNPFromSequences(const QByteArray& refSeq, const QByteArray& varSeq, CallVariationsMode mode, bool ignoreGaps, + const QString& namePrefix, int nameStartIdx) { QList<U2Variant> res; qint64 len = qMin(refSeq.size(), varSeq.size()); - for(qint64 i = 0; i < len; i++){ + for (qint64 i = 0; i < len; i++) { char refChar = refSeq.at(i); char obsChar = varSeq.at(i); bool addVariation = false; - if( ! ( ignoreGaps && (refChar == '-' || obsChar == '-') ) ){ - - switch(mode){ - case Mode_Variations: - addVariation = (refChar != obsChar); - break; - case Mode_Similar: - addVariation = (refChar == obsChar); - break; - case Mode_All: - addVariation = true; + if (!(ignoreGaps && (refChar == '-' || obsChar == '-'))) { + + switch (mode) { + case Mode_Variations: + addVariation = (refChar != obsChar); + break; + case Mode_Similar: + addVariation = (refChar == obsChar); + break; + case Mode_All: + addVariation = true; } } - if (addVariation){ - U2Variant var; - var.refData = QByteArray(1, refChar); - var.obsData = QByteArray(1, obsChar); - var.startPos = i+nameStartIdx; - var.publicId = (QString(namePrefix+"%1").arg(i+nameStartIdx)); - res.append(var); + if (addVariation) { + U2Variant var; + var.refData = QByteArray(1, refChar); + var.obsData = QByteArray(1, obsChar); + var.startPos = i + nameStartIdx; + var.publicId = (QString(namePrefix + "%1").arg(i + nameStartIdx)); + res.append(var); } } diff --git a/src/corelibs/U2Core/src/util/U2VariationUtils.h b/src/corelibs/U2Core/src/util/U2VariationUtils.h index ac0d6be35604fde7e05883ef47283781097d5e01..0b9a0b856554b75fe0af3a63a1ad0004e96da147 100644 --- a/src/corelibs/U2Core/src/util/U2VariationUtils.h +++ b/src/corelibs/U2Core/src/util/U2VariationUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,7 +34,7 @@ namespace U2 { * U2Variant and related structures utility functions */ -enum CallVariationsMode{ +enum CallVariationsMode { Mode_Variations = 0, Mode_Similar, Mode_All @@ -43,17 +43,17 @@ enum CallVariationsMode{ class U2CORE_EXPORT U2VariationUtils { public: //track manipulations - static void addVariationsToTrack( const U2EntityRef &ref, const QList<U2Variant> &variants, - U2OpStatus &os ); - static U2VariantTrack createVariantTrack( const U2DbiRef &dbiRef, const QString &seqName, - U2OpStatus &os ); + static void addVariationsToTrack(const U2EntityRef &ref, const QList<U2Variant> &variants, + U2OpStatus &os); + static U2VariantTrack createVariantTrack(const U2DbiRef &dbiRef, const QString &seqName, + U2OpStatus &os); //convertors - static AnnotationData variantToAnnotation( const U2Variant &var ); - static U2Feature variantToFeature (const U2Variant &var); + static AnnotationData variantToAnnotation(const U2Variant &var); + static U2Feature variantToFeature(const U2Variant &var); //variations revealing - static QList<U2Variant> getSNPFromSequences( const QByteArray &refSeq, const QByteArray &varSeq, + static QList<U2Variant> getSNPFromSequences(const QByteArray &refSeq, const QByteArray &varSeq, CallVariationsMode mode = Mode_Variations, bool ignoreGaps = false, - const QString &namePrefix = QString( ), int nameStartIdx = 0 ); + const QString &namePrefix = QString(), int nameStartIdx = 0); }; } //namespace diff --git a/src/corelibs/U2Core/src/util/VariationPropertiesUtils.h b/src/corelibs/U2Core/src/util/VariationPropertiesUtils.h index 0f90b10e2bee431f418adca27abdec9b69034875..8e1be692457c99bff57dbc42d595fce92822ed8f 100644 --- a/src/corelibs/U2Core/src/util/VariationPropertiesUtils.h +++ b/src/corelibs/U2Core/src/util/VariationPropertiesUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -21,10 +21,7 @@ #ifndef _U2_VARIATION_PROPERTIES_UTILS_H_ #define _U2_VARIATION_PROPERTIES_UTILS_H_ -#include <U2Core/Gene.h> - #include <U2Core/U2Variant.h> -#include <U2Core/U2OpStatus.h> #include <U2Core/U2SequenceDbi.h> #include <U2Core/U2FeatureDbi.h> #include <U2Core/DNATranslation.h> @@ -37,21 +34,21 @@ namespace U2 { ////////////////////////////////////////////////////////////////////////// //SequenceQueryCache - /** a simple cache for fast access sequence data for variations - assuming that variations are sorted by start pos*/ -class U2CORE_EXPORT SequenceQueryCache{ +/** a simple cache for fast access sequence data for variations +assuming that variations are sorted by start pos*/ +class U2CORE_EXPORT SequenceQueryCache { public: SequenceQueryCache(U2SequenceDbi* seqDbi, const U2DataId& seqDataId); void setSequenceDbi(U2SequenceDbi* sDbi); void setSequenceId(const U2DataId& seqDataId); void clear(); - U2Region getRegion(){return seqRegion;} + U2Region getRegion() { return seqRegion; } QByteArray getSequenceData(const U2Region& region, U2OpStatus& os); private: void fetchData(int startPos, U2OpStatus& os); const static int OVERLAP_SIZE = 1024; - const static int SEQ_BUF_SIZE = 1*256*1024; + const static int SEQ_BUF_SIZE = 1 * 256 * 1024; U2Region seqRegion; QByteArray seqBuffer; U2SequenceDbi* seqDbi; @@ -61,23 +58,23 @@ private: /*Class for managing variation properties*/ -class U2CORE_EXPORT VariationPropertiesUtils{ +class U2CORE_EXPORT VariationPropertiesUtils { public: /*Convert damage effect matrix to compressed array*/ - static QByteArray DamageEffectToArray (const QVector<float>& vect); + static QByteArray DamageEffectToArray(const QVector<float>& vect); /*Convert damage effect compressed array to matrix*/ - static QVector<float> DamageEffectToVector (const QByteArray& ba); + static QVector<float> DamageEffectToVector(const QByteArray& ba); /*Check if a variation could damage protein of the gene*/ - static bool isDamageProtein (const U2Variant& var, const Gene& gene ); + static bool isDamageProtein(const U2Variant& var, const Gene& gene); /*The function is 'in silico' splicing. It provides start position of Variant in nucl sequence and corresponding codon number after splicing. Return true if spliced successfully and false otherwise*/ static bool getFrameStartPositionsForCoding(int* nuclSeqPos, int* aaSeqPos, int* codonPos, const U2Variant& var, const Gene& gene); - static int getFrameStartPosition (const U2Variant& var, const Gene& gene); + static int getFrameStartPosition(const U2Variant& var, const Gene& gene); static QByteArray getSortedAAcidAlphabet(); @@ -89,20 +86,20 @@ public: static QByteArray varyTriplet(const QByteArray& tripl, const U2Variant& var, int codonPos, DNATranslation* complTransl = NULL); - static QByteArray getCodingSequence (const Gene& gene, const U2DataId& seqId, U2SequenceDbi* dbi, U2OpStatus& os); + static QByteArray getCodingSequence(const Gene& gene, const U2DataId& seqId, U2SequenceDbi* dbi, U2OpStatus& os); - static QByteArray getAASequence (const QByteArray& nuclSeq); + static QByteArray getAASequence(const QByteArray& nuclSeq); static QPair< QByteArray, QByteArray> getAASubstitution(U2Dbi* database, const Gene& gene, const U2DataId& seqId, const U2Variant& var, int* aaPos, U2OpStatus& os); - static inline bool isInDonorSpliceSite (const U2Region& exon, qint64 varPos, int spliceSiteLen){ + static inline bool isInDonorSpliceSite(const U2Region& exon, qint64 varPos, int spliceSiteLen) { bool res = false; - res = U2Region(exon.endPos() - spliceSiteLen, 2*spliceSiteLen).contains(varPos); + res = U2Region(exon.endPos() - spliceSiteLen, 2 * spliceSiteLen).contains(varPos); return res; } - static inline bool isInAcceptorSpliceSite (const U2Region& exon, qint64 varPos, int spliceSiteLen){ + static inline bool isInAcceptorSpliceSite(const U2Region& exon, qint64 varPos, int spliceSiteLen) { bool res = false; - res = U2Region(exon.startPos - spliceSiteLen, 2*spliceSiteLen).contains(varPos); + res = U2Region(exon.startPos - spliceSiteLen, 2 * spliceSiteLen).contains(varPos); return res; } @@ -111,7 +108,7 @@ public: otherwise U2_REGION_MAX returned if in splice-site nearest exon and is donor/acceptor are set else neaarestExon = U2_REGION_MAX*/ - static U2Region getIntron (const U2Region& geneRegion, const QVector<U2Region>& exons, qint64 varPos, U2Region& nearestExon, bool& isDonor); + static U2Region getIntron(const U2Region& geneRegion, const QVector<U2Region>& exons, qint64 varPos, U2Region& nearestExon, bool& isDonor); static bool isInSpliceSite(const QVector<U2Region>& exons, qint64 varPos, int spliceSiteLen, bool isCompl); diff --git a/src/corelibs/U2Core/transl/russian.ts b/src/corelibs/U2Core/transl/russian.ts index c52539e5ef5e7cb02d17fce5fe505fd9a644b2bb..2c78d201fe91f12fd0c4350b187c86125e9593e8 100644 --- a/src/corelibs/U2Core/transl/russian.ts +++ b/src/corelibs/U2Core/transl/russian.ts @@ -9,47 +9,47 @@ <translation>Ðто не ÑвлÑетÑÑ Ñ€ÐµÐ·ÑƒÐ»ÑŒÑ‚Ð°Ñ‚Ð¾Ð¼ ESearch!</translation> </message> <message> - <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="582"/> + <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="577"/> <source>This is not a ESummary result!</source> <translation>Ðто не ÑвлÑетÑÑ Ñ€ÐµÐ·ÑƒÐ»ÑŒÑ‚Ð°Ñ‚Ð¾Ð¼ ESummary!</translation> </message> <message> - <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="665"/> + <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="656"/> <source>Use Ensembl ID. For example: %1 or %2</source> <translation>ИÑпользуйте Ensembl ID. Ðапример: %1 или %2</translation> </message> <message> - <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="666"/> + <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="657"/> <source>Use Genbank DNA accession number. For example: %1 or %2</source> <translation>ИÑпользуйте Genbank DNA Accession Number. Ðапример: %1 или %2</translation> </message> <message> - <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="667"/> + <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="658"/> <source>Use Genbank protein accession number. For example: %1</source> <translation>ИÑпользуйте Genbank Protein Accession Number. Ðапример: %1</translation> </message> <message> - <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="668"/> + <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="659"/> <source>Use PDB molecule four-letter identifier. For example: %1 or %2</source> <translation>ИÑпользуйте 4-Ñ… Ñимвольный идентификатор PDB. Ðапример: %1 или %2</translation> </message> <message> - <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="669"/> + <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="660"/> <source>Use SWISS-PROT accession number. For example: %1 or %2</source> <translation>ИÑпользуйте SWISS-PROT Accession Number. Ðапример: %1 или %2</translation> </message> <message> - <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="670"/> + <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="661"/> <source>Use UniProtKB/Swiss-Prot accession number. For example: %1</source> <translation>ИÑпользуйте UniProtKB/Swiss-Prot Accession Number. Ðапример: %1</translation> </message> <message> - <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="671"/> + <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="662"/> <source>Use UniProtKB/TrEMBL accession number. For example: %1</source> <translation>ИÑпользуйте UniProtKB/TrEMBL Accession Number. Ðапример: %1</translation> </message> <message> - <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="700"/> + <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="691"/> <source>Use %1 unique identifier.</source> <translation>ИÑплользуйте уникальный идентификатор %1.</translation> </message> @@ -59,7 +59,7 @@ <translation>Ð’Ñе файлы</translation> </message> <message> - <location filename="../src/util/SequenceUtils.cpp" line="279"/> + <location filename="../src/util/SequenceUtils.cpp" line="272"/> <source>Loaded sequences have different alphabets. That's why several sequence objects are created, each for specified alphabet. All sequences at one object have the same alphabet and sequences from different objects have different alphabets.</source> <translation>Загруженные поÑледовательноÑти имеют разные алфавиты. ПоÑтому Ñоздано неÑколько объектов типа поÑледовательноÑÑ‚ÑŒ Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ алфавита. Ð’Ñе поÑледовательноÑти одного объекта имеют одинаковый афлфавит и поÑледовательноÑти из разных объектов имеют разные алфавиты.</translation> </message> @@ -74,7 +74,7 @@ <translation>ТранÑлÑциÑ</translation> </message> <message> - <location filename="../src/datatype/PhyTree.cpp" line="73"/> + <location filename="../src/datatype/PhyTree.cpp" line="76"/> <source>UGENE internal error</source> <translation>ВнутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ° UGENE</translation> </message> @@ -84,467 +84,464 @@ <translation>Ðеверный тип базы: %1</translation> </message> <message> - <location filename="../src/gobjects/GObjectUtils.cpp" line="440"/> + <location filename="../src/gobjects/GObjectUtils.cpp" line="432"/> <source>Unsupported object type: %1</source> <translation>Ðеподдерживаемый тип объекта: %1</translation> </message> <message> - <location filename="../src/util/U2SequenceUtils.cpp" line="503"/> + <location filename="../src/util/U2SequenceUtils.cpp" line="494"/> <source>Unable to detect sequence alphabet. Probably, this is because some of merged sequences are empty.</source> <translation>Ðевозможно определить алфавит поÑледовательноÑти. Возможно Ñто вызвано тем, что некоторые из поÑледовательноÑтей ÑвлÑÑŽÑ‚ÑÑ Ð¿ÑƒÑтыми.</translation> </message> <message> - <location filename="../src/util/U2SequenceUtils.cpp" line="658"/> + <location filename="../src/util/U2SequenceUtils.cpp" line="647"/> <source>Invalid number of symbols: %1</source> <translation>Ðеверное чиÑло Ñимволов: %1</translation> </message> <message> - <location filename="../src/models/DocumentModel.cpp" line="52"/> <source>The document is created not by UGENE</source> - <translation>Документ Ñоздан не в UGENE</translation> + <translation type="vanished">Документ Ñоздан не в UGENE</translation> </message> <message> - <location filename="../src/models/DocumentModel.cpp" line="53"/> <source>Document sequences were merged</source> - <translation>ПоÑледовательноÑти из документа были Ñоединены</translation> + <translation type="vanished">ПоÑледовательноÑти из документа были Ñоединены</translation> </message> <message> - <location filename="../src/dbi/U2DbiUtils.cpp" line="46"/> <source>UGENE public database</source> - <translation>ÐŸÑƒÐ±Ð»Ð¸Ñ‡Ð½Ð°Ñ Ð±Ð°Ð·Ð° данных UGENE</translation> + <translation type="vanished">ÐŸÑƒÐ±Ð»Ð¸Ñ‡Ð½Ð°Ñ Ð±Ð°Ð·Ð° данных UGENE</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="76"/> + <location filename="../src/util/GenbankFeatures.cpp" line="75"/> <source>Gap between two components of a genome or transcriptome assembly</source> <translation>Gap between two components of a genome or transcriptome assembly</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="77"/> + <location filename="../src/util/GenbankFeatures.cpp" line="76"/> <source>Sequence related to transcription termination</source> <translation>Sequence related to transcription termination</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="78"/> + <location filename="../src/util/GenbankFeatures.cpp" line="77"/> <source>Describes disulfide bonds (for protein files)</source> <translation>Describes disulfide bonds (for protein files)</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="79"/> + <location filename="../src/util/GenbankFeatures.cpp" line="78"/> <source>Span of the C immunological feature</source> <translation>Span of the C immunological feature</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="80"/> + <location filename="../src/util/GenbankFeatures.cpp" line="79"/> <source>`CAAT box' in eukaryotic promoters</source> <translation>`CAAT box' in eukaryotic promoters</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="81"/> + <location filename="../src/util/GenbankFeatures.cpp" line="80"/> <source>Sequence coding for amino acids in protein (includes stop codon)</source> <translation>Sequence coding for amino acids in protein (includes stop codon)</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="83"/> + <location filename="../src/util/GenbankFeatures.cpp" line="82"/> <source>Independent sequence determinations differ</source> <translation>Independent sequence determinations differ</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="84"/> + <location filename="../src/util/GenbankFeatures.cpp" line="83"/> <source>Region of biological interest identified as a centromere and which has been experimentally characterized</source> <translation>Region of biological interest identified as a centromere and which has been experimentally characterized</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="85"/> + <location filename="../src/util/GenbankFeatures.cpp" line="84"/> <source>Displacement loop</source> <translation>Displacement loop</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="86"/> + <location filename="../src/util/GenbankFeatures.cpp" line="85"/> <source>Span of the D immunological feature</source> <translation>Span of the D immunological feature</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="87"/> + <location filename="../src/util/GenbankFeatures.cpp" line="86"/> <source>Cis-acting enhancer of promoter function</source> <translation>Cis-acting enhancer of promoter function</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="88"/> + <location filename="../src/util/GenbankFeatures.cpp" line="87"/> <source>Region that codes for part of spliced mRNA</source> <translation>Region that codes for part of spliced mRNA</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="89"/> + <location filename="../src/util/GenbankFeatures.cpp" line="88"/> <source>Gap in the sequence</source> <translation>Gap in the sequence</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="90"/> + <location filename="../src/util/GenbankFeatures.cpp" line="89"/> <source>Region that defines a functional gene, possibly including upstream (promotor, enhancer, etc) and downstream control elements, and for which a name has been assigned.</source> <translation>Region that defines a functional gene, possibly including upstream (promotor, enhancer, etc) and downstream control elements, and for which a name has been assigned.</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="92"/> + <location filename="../src/util/GenbankFeatures.cpp" line="91"/> <source>`GC box' in eukaryotic promoters</source> <translation>`GC box' in eukaryotic promoters</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="93"/> + <location filename="../src/util/GenbankFeatures.cpp" line="92"/> <source>Intervening DNA eliminated by recombination</source> <translation>Intervening DNA eliminated by recombination</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="94"/> + <location filename="../src/util/GenbankFeatures.cpp" line="93"/> <source>Transcribed region excised by mRNA splicing</source> <translation>Transcribed region excised by mRNA splicing</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="95"/> + <location filename="../src/util/GenbankFeatures.cpp" line="94"/> <source>Span of the J immunological feature</source> <translation>Span of the J immunological feature</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="96"/> + <location filename="../src/util/GenbankFeatures.cpp" line="95"/> <source>Joining segment of immunoglobulin light and heavy chains, and T-cell receptor alpha, beta, and gamma chains</source> <translation>Joining segment of immunoglobulin light and heavy chains, and T-cell receptor alpha, beta, and gamma chains</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="97"/> + <location filename="../src/util/GenbankFeatures.cpp" line="96"/> <source>Long terminal repeat</source> <translation>Long terminal repeat</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="98"/> + <location filename="../src/util/GenbankFeatures.cpp" line="97"/> <source>Mature peptide coding region (does not include stop codon)</source> <translation>Mature peptide coding region (does not include stop codon)</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="99"/> + <location filename="../src/util/GenbankFeatures.cpp" line="98"/> <source>Miscellaneous binding site</source> <translation>Miscellaneous binding site</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="100"/> + <location filename="../src/util/GenbankFeatures.cpp" line="99"/> <source>Miscellaneous difference feature</source> <translation>Miscellaneous difference feature</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="101"/> + <location filename="../src/util/GenbankFeatures.cpp" line="100"/> <source>Region of biological significance that cannot be described by any other feature</source> <translation>Region of biological significance that cannot be described by any other feature</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="103"/> + <location filename="../src/util/GenbankFeatures.cpp" line="102"/> <source>Miscellaneous, recombination feature</source> <translation>Miscellaneous, recombination feature</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="104"/> + <location filename="../src/util/GenbankFeatures.cpp" line="103"/> <source>Miscellaneous transcript feature not defined by other RNA keys</source> <translation>Miscellaneous transcript feature not defined by other RNA keys</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="105"/> + <location filename="../src/util/GenbankFeatures.cpp" line="104"/> <source>Miscellaneous signal</source> <translation>Miscellaneous signal</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="106"/> + <location filename="../src/util/GenbankFeatures.cpp" line="105"/> <source>Miscellaneous DNA or RNA structure</source> <translation>Miscellaneous DNA or RNA structure</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="107"/> + <location filename="../src/util/GenbankFeatures.cpp" line="106"/> <source>Region of genome containing mobile elements</source> <translation>Region of genome containing mobile elements</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="108"/> + <location filename="../src/util/GenbankFeatures.cpp" line="107"/> <source>The indicated base is a modified nucleotide</source> <translation>The indicated base is a modified nucleotide</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="109"/> + <location filename="../src/util/GenbankFeatures.cpp" line="108"/> <source>Messenger RNA</source> <translation>Messenger RNA</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="110"/> + <location filename="../src/util/GenbankFeatures.cpp" line="109"/> <source>A non-protein-coding gene, other than ribosomal RNA and transfer RNA, the functional molecule of which is the RNA transcrip</source> <translation>A non-protein-coding gene, other than ribosomal RNA and transfer RNA, the functional molecule of which is the RNA transcrip</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="111"/> + <location filename="../src/util/GenbankFeatures.cpp" line="110"/> <source>Span of the N immunological feature</source> <translation>Span of the N immunological feature</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="112"/> + <location filename="../src/util/GenbankFeatures.cpp" line="111"/> <source>Presented sequence revises a previous version</source> <translation>Presented sequence revises a previous version</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="113"/> + <location filename="../src/util/GenbankFeatures.cpp" line="112"/> <source>Region containing polycistronic transcript including a cluster of genes that are under the control of the same regulatory sequences/promotor and in the same biological pathway</source> <translation>Region containing polycistronic transcript including a cluster of genes that are under the control of the same regulatory sequences/promotor and in the same biological pathway</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="114"/> + <location filename="../src/util/GenbankFeatures.cpp" line="113"/> <source>Origin of transfer; region of a DNA molecule where transfer is initiated during the process of conjugation or mobilization</source> <translation>Origin of transfer; region of a DNA molecule where transfer is initiated during the process of conjugation or mobilization</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="115"/> + <location filename="../src/util/GenbankFeatures.cpp" line="114"/> <source>Signal for cleavage & polyadenylation</source> <translation>Signal for cleavage & polyadenylation</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="116"/> + <location filename="../src/util/GenbankFeatures.cpp" line="115"/> <source>Site at which polyadenine is added to mRNA</source> <translation>Site at which polyadenine is added to mRNA</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="117"/> + <location filename="../src/util/GenbankFeatures.cpp" line="116"/> <source>Any RNA species that is not yet the mature RNA product</source> <translation>Any RNA species that is not yet the mature RNA product</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="118"/> + <location filename="../src/util/GenbankFeatures.cpp" line="117"/> <source>Primary (unprocessed) transcript</source> <translation>Primary (unprocessed) transcript</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="119"/> + <location filename="../src/util/GenbankFeatures.cpp" line="118"/> <source>Primer binding region used with PCR</source> <translation>Primer binding region used with PCR</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="120"/> + <location filename="../src/util/GenbankFeatures.cpp" line="119"/> <source>Non-covalent primer binding site</source> <translation>Non-covalent primer binding site</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="121"/> + <location filename="../src/util/GenbankFeatures.cpp" line="120"/> <source>A region involved in transcription initiation</source> <translation>A region involved in transcription initiation</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="122"/> + <location filename="../src/util/GenbankFeatures.cpp" line="121"/> <source>Non-covalent protein binding site on DNA or RNA</source> <translation>Non-covalent protein binding site on DNA or RNA</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="123"/> + <location filename="../src/util/GenbankFeatures.cpp" line="122"/> <source>Ribosome binding site</source> <translation>Ribosome binding site</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="124"/> + <location filename="../src/util/GenbankFeatures.cpp" line="123"/> <source>Replication origin for duplex DNA</source> <translation>Replication origin for duplex DNA</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="125"/> + <location filename="../src/util/GenbankFeatures.cpp" line="124"/> <source>Sequence containing repeated subsequences</source> <translation>Sequence containing repeated subsequences</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="126"/> + <location filename="../src/util/GenbankFeatures.cpp" line="125"/> <source>One repeated unit of a repeat_region</source> <translation>One repeated unit of a repeat_region</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="127"/> + <location filename="../src/util/GenbankFeatures.cpp" line="126"/> <source>Ribosomal RNA</source> <translation>Ribosomal RNA</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="128"/> + <location filename="../src/util/GenbankFeatures.cpp" line="127"/> <source>Span of the S immunological feature</source> <translation>Span of the S immunological feature</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="129"/> + <location filename="../src/util/GenbankFeatures.cpp" line="128"/> <source>Satellite repeated sequence</source> <translation>Satellite repeated sequence</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="130"/> + <location filename="../src/util/GenbankFeatures.cpp" line="129"/> <source>Small cytoplasmic RNA</source> <translation>Small cytoplasmic RNA</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="131"/> + <location filename="../src/util/GenbankFeatures.cpp" line="130"/> <source>Signal peptide coding region</source> <translation>Signal peptide coding region</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="132"/> + <location filename="../src/util/GenbankFeatures.cpp" line="131"/> <source>Small nuclear RNA</source> <translation>Small nuclear RNA</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="133"/> + <location filename="../src/util/GenbankFeatures.cpp" line="132"/> <source>Identifies the biological source of the specified span of the sequence</source> <translation>Identifies the biological source of the specified span of the sequence</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="134"/> + <location filename="../src/util/GenbankFeatures.cpp" line="133"/> <source>Hair-pin loop structure in DNA or RNA</source> <translation>Hair-pin loop structure in DNA or RNA</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="135"/> + <location filename="../src/util/GenbankFeatures.cpp" line="134"/> <source>Sequence Tagged Site; operationally unique sequence that identifies the combination of primer spans used in a PCR assay</source> <translation>Sequence Tagged Site; operationally unique sequence that identifies the combination of primer spans used in a PCR assay</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="136"/> + <location filename="../src/util/GenbankFeatures.cpp" line="135"/> <source>`TATA box' in eukaryotic promoters</source> <translation>`TATA box' in eukaryotic promoters</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="137"/> + <location filename="../src/util/GenbankFeatures.cpp" line="136"/> <source>Region of biological interest identified as a telomere and which has been experimentally characterized</source> <translation>Region of biological interest identified as a telomere and which has been experimentally characterized</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="138"/> + <location filename="../src/util/GenbankFeatures.cpp" line="137"/> <source>Sequence causing transcription termination</source> <translation>Sequence causing transcription termination</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="139"/> + <location filename="../src/util/GenbankFeatures.cpp" line="138"/> <source>Transfer messenger RNA; tmRNA acts as a tRNA first, and then as an mRNA that encodes a peptide tag; the ribosome translates this mRNA region of tmRNA and attaches the encoded peptide tag to the C-terminus of the unfinished protein; this attached tag targets the protein for destruction or proteolysis</source> <translation>Transfer messenger RNA; tmRNA acts as a tRNA first, and then as an mRNA that encodes a peptide tag; the ribosome translates this mRNA region of tmRNA and attaches the encoded peptide tag to the C-terminus of the unfinished protein; this attached tag targets the protein for destruction or proteolysis</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="140"/> + <location filename="../src/util/GenbankFeatures.cpp" line="139"/> <source>Transit peptide coding region</source> <translation>Transit peptide coding region</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="141"/> + <location filename="../src/util/GenbankFeatures.cpp" line="140"/> <source>Transposable element (TN)</source> <translation>Transposable element (TN)</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="142"/> + <location filename="../src/util/GenbankFeatures.cpp" line="141"/> <source>Transfer RNA</source> <translation>Transfer RNA</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="143"/> + <location filename="../src/util/GenbankFeatures.cpp" line="142"/> <source>Authors are unsure about the sequence in this region</source> <translation>Authors are unsure about the sequence in this region</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="144"/> + <location filename="../src/util/GenbankFeatures.cpp" line="143"/> <source>Span of the V immunological feature</source> <translation>Span of the V immunological feature</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="145"/> + <location filename="../src/util/GenbankFeatures.cpp" line="144"/> <source>Variable segment of immunoglobulin light and heavy chains, and T-cell receptor alpha, beta, and gamma chains; codes for most of the variable region (V_region) and the last few amino acids of the leader peptide</source> <translation>Variable segment of immunoglobulin light and heavy chains, and T-cell receptor alpha, beta, and gamma chains; codes for most of the variable region (V_region) and the last few amino acids of the leader peptide</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="146"/> + <location filename="../src/util/GenbankFeatures.cpp" line="145"/> <source>A related population contains stable mutation</source> <translation>A related population contains stable mutation</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="147"/> + <location filename="../src/util/GenbankFeatures.cpp" line="146"/> <source>`Pribnow box' in prokaryotic promoters</source> <translation>`Pribnow box' in prokaryotic promoters</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="148"/> + <location filename="../src/util/GenbankFeatures.cpp" line="147"/> <source>`-35 box' in prokaryotic promoters</source> <translation>`-35 box' in prokaryotic promoters</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="149"/> + <location filename="../src/util/GenbankFeatures.cpp" line="148"/> <source>3'-most region of a precursor transcript removed in processing</source> <translation>3'-most region of a precursor transcript removed in processing</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="150"/> + <location filename="../src/util/GenbankFeatures.cpp" line="149"/> <source>3' untranslated region (trailer)</source> <translation>3' untranslated region (trailer)</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="151"/> + <location filename="../src/util/GenbankFeatures.cpp" line="150"/> <source>5'-most region of a precursor transcript removed in processing</source> <translation>5'-most region of a precursor transcript removed in processing</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="152"/> + <location filename="../src/util/GenbankFeatures.cpp" line="151"/> <source>5' untranslated region (leader)</source> <translation>5' untranslated region (leader)</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="153"/> + <location filename="../src/util/GenbankFeatures.cpp" line="152"/> <source>'Protein' feature key</source> <translation>'Protein' feature key</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="154"/> + <location filename="../src/util/GenbankFeatures.cpp" line="153"/> <source>'Region' feature key</source> <translation>'Region' feature key</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="155"/> + <location filename="../src/util/GenbankFeatures.cpp" line="154"/> <source>'Site' feature key</source> <translation>'Site' feature key</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="156"/> + <location filename="../src/util/GenbankFeatures.cpp" line="155"/> <source>Any region of sequence that functions in the regulation of transcription or translation</source> <translation>Any region of sequence that functions in the regulation of transcription or translation</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="176"/> + <location filename="../src/util/GenbankFeatures.cpp" line="175"/> <source>Genes</source> <translation>Гены</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="191"/> + <location filename="../src/util/GenbankFeatures.cpp" line="190"/> <source>Signals</source> <translation>Сигналы</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="212"/> + <location filename="../src/util/GenbankFeatures.cpp" line="211"/> <source>Binding</source> <translation>СвÑзывание</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="218"/> + <location filename="../src/util/GenbankFeatures.cpp" line="217"/> <source>Variation</source> <translation>ВариациÑ</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="227"/> + <location filename="../src/util/GenbankFeatures.cpp" line="226"/> <source>Repeats</source> <translation>Повторы</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="234"/> + <location filename="../src/util/GenbankFeatures.cpp" line="233"/> <source>RNA</source> <translation>Ð ÐК</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="244"/> + <location filename="../src/util/GenbankFeatures.cpp" line="243"/> <source>Misc</source> <translation>Разное</translation> </message> <message> - <location filename="../src/util/GenbankFeatures.cpp" line="264"/> + <location filename="../src/util/GenbankFeatures.cpp" line="263"/> <source>Spans</source> <translation>Диапазоны</translation> </message> <message> - <location filename="../src/util/U2FeatureUtils.cpp" line="133"/> + <location filename="../src/util/U2FeatureUtils.cpp" line="129"/> <source>Unexpected feature operator value detected.</source> <translation>Unexpected feature operator value detected.</translation> </message> @@ -564,11 +561,27 @@ <translation>Symbol is not belong to alphabet</translation> </message> <message> - <location filename="../src/util/MultipleChromatogramAlignmentImporter.cpp" line="72"/> + <location filename="../src/util/MultipleChromatogramAlignmentImporter.cpp" line="69"/> <source>Unexpected error on MCA rows import</source> <translation>Unexpected error on MCA rows import</translation> </message> </context> +<context> + <name>StrPackUtils</name> + <message> + <location filename="../src/util/StrPackUtils.cpp" line="69"/> + <source>QVariant value can't be converted to string</source> + <translation>QVariant value can't be converted to string</translation> + </message> +</context> +<context> + <name>TextUtils</name> + <message> + <location filename="../src/util/TextUtils.cpp" line="191"/> + <source>The text file can't be read. Check the file encoding and make sure the file is not corrupted.</source> + <translation>The text file can't be read. Check the file encoding and make sure the file is not corrupted.</translation> + </message> +</context> <context> <name>U2::AbstractProjectFilterTask</name> <message> @@ -604,7 +617,7 @@ <context> <name>U2::AddObjectsToDocumentTask</name> <message> - <location filename="../src/tasks/AddObjectsToDocumentTask.cpp" line="35"/> + <location filename="../src/tasks/AddObjectsToDocumentTask.cpp" line="34"/> <source>Add objects to document</source> <translation>Add objects to document</translation> </message> @@ -612,22 +625,22 @@ <context> <name>U2::AddSequenceObjectsToAlignmentTask</name> <message> - <location filename="../src/tasks/AddSequencesToAlignmentTask.cpp" line="60"/> + <location filename="../src/tasks/AddSequencesToAlignmentTask.cpp" line="59"/> <source>Object is empty.</source> <translation>Объект пуÑÑ‚.</translation> </message> <message> - <location filename="../src/tasks/AddSequencesToAlignmentTask.cpp" line="65"/> + <location filename="../src/tasks/AddSequencesToAlignmentTask.cpp" line="64"/> <source>Object is locked for modifications.</source> <translation>Объект заблокирован Ð´Ð»Ñ Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ.</translation> </message> <message> - <location filename="../src/tasks/AddSequencesToAlignmentTask.cpp" line="172"/> + <location filename="../src/tasks/AddSequencesToAlignmentTask.cpp" line="177"/> <source>Some sequences have wrong alphabet: </source> <translation>Ðекоторые поÑледовательноÑти имеют неправильный алфавит: </translation> </message> <message> - <location filename="../src/tasks/AddSequencesToAlignmentTask.cpp" line="175"/> + <location filename="../src/tasks/AddSequencesToAlignmentTask.cpp" line="180"/> <source> and others</source> <translation> и другие</translation> </message> @@ -658,7 +671,7 @@ <context> <name>U2::AutoAnnotationsSupport</name> <message> - <location filename="../src/globals/AutoAnnotationsSupport.cpp" line="110"/> + <location filename="../src/globals/AutoAnnotationsSupport.cpp" line="107"/> <source>Auto-annotations [%1 | %2]</source> <translation>Ðвтоаннотации [%1 | %2]</translation> </message> @@ -666,7 +679,7 @@ <context> <name>U2::AutoAnnotationsUpdateTask</name> <message> - <location filename="../src/globals/AutoAnnotationsSupport.cpp" line="303"/> + <location filename="../src/globals/AutoAnnotationsSupport.cpp" line="298"/> <source>Empty auto-annotation object</source> <translation>Объект автоаннотации пуÑÑ‚</translation> </message> @@ -674,12 +687,12 @@ <context> <name>U2::BaseLoadRemoteDocumentTask</name> <message> - <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="69"/> + <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="65"/> <source>Load remote document</source> <translation>Загрузка удаленного документа</translation> </message> <message> - <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="145"/> + <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="138"/> <source>Unknown file format!</source> <translation>ÐеизвеÑтный формат файла!</translation> </message> @@ -687,49 +700,49 @@ <context> <name>U2::CMDLineCoreOptions</name> <message> - <location filename="../src/cmdline/CMDLineCoreOptions.cpp" line="59"/> + <location filename="../src/cmdline/CMDLineCoreOptions.cpp" line="60"/> <source>Shows help information.</source> <translation>Показывает Ñправочную информацию.</translation> </message> <message> - <location filename="../src/cmdline/CMDLineCoreOptions.cpp" line="66"/> + <location filename="../src/cmdline/CMDLineCoreOptions.cpp" line="67"/> <source>Loads UGENE configuration.</source> <translation>Загружает конфигурацию UGENE.</translation> </message> <message> - <location filename="../src/cmdline/CMDLineCoreOptions.cpp" line="67"/> + <location filename="../src/cmdline/CMDLineCoreOptions.cpp" line="68"/> <source>Loads configuration from the specified .ini file. By default the UGENE.ini file is used.</source> <translation>Загружает конфигурацию из указанного .ini файла. По умолчанию иÑпользуетÑÑ UGENE.ini файл.</translation> </message> <message> - <location filename="../src/cmdline/CMDLineCoreOptions.cpp" line="68"/> - <location filename="../src/cmdline/CMDLineCoreOptions.cpp" line="80"/> - <location filename="../src/cmdline/CMDLineCoreOptions.cpp" line="89"/> + <location filename="../src/cmdline/CMDLineCoreOptions.cpp" line="69"/> + <location filename="../src/cmdline/CMDLineCoreOptions.cpp" line="81"/> + <location filename="../src/cmdline/CMDLineCoreOptions.cpp" line="90"/> <source><path_to_file></source> <translation><path_to_file></translation> </message> <message> - <location filename="../src/cmdline/CMDLineCoreOptions.cpp" line="72"/> + <location filename="../src/cmdline/CMDLineCoreOptions.cpp" line="73"/> <source>Specifies the language to use.</source> <translation>УÑтанавливает иÑпользуемый Ñзык.</translation> </message> <message> - <location filename="../src/cmdline/CMDLineCoreOptions.cpp" line="73"/> + <location filename="../src/cmdline/CMDLineCoreOptions.cpp" line="74"/> <source>Specifies the language to use. The following values are available: CS, EN, RU, ZH.</source> <translation>УÑтанавливает иÑпользуемый Ñзык. Следующие Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð´Ð¾Ñтупны: CS, EN, RU, ZH.</translation> </message> <message> - <location filename="../src/cmdline/CMDLineCoreOptions.cpp" line="74"/> + <location filename="../src/cmdline/CMDLineCoreOptions.cpp" line="75"/> <source><language_code></source> <translation><language_code></translation> </message> <message> - <location filename="../src/cmdline/CMDLineCoreOptions.cpp" line="84"/> + <location filename="../src/cmdline/CMDLineCoreOptions.cpp" line="85"/> <source>Path to the session database file</source> <translation>Путь до ÑеÑÑионного файла базы</translation> </message> <message> - <location filename="../src/cmdline/CMDLineCoreOptions.cpp" line="85"/> + <location filename="../src/cmdline/CMDLineCoreOptions.cpp" line="86"/> <source>Session database is stored in the temporary file that is created for every UGENE run. But it can be supplied with the command line argument. If the supplied file does not exist it will be created. @@ -802,37 +815,37 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::CmdlineTaskRunner</name> <message> - <location filename="../src/tasks/CmdlineTaskRunner.cpp" line="100"/> + <location filename="../src/tasks/CmdlineTaskRunner.cpp" line="219"/> <source>Run UGENE command line: %1</source> <translation>Run UGENE command line: %1</translation> </message> <message> - <location filename="../src/tasks/CmdlineTaskRunner.cpp" line="146"/> + <location filename="../src/tasks/CmdlineTaskRunner.cpp" line="264"/> <source>Cannot start process '%1'</source> <translation>Cannot start process '%1'</translation> </message> <message> - <location filename="../src/tasks/CmdlineTaskRunner.cpp" line="216"/> + <location filename="../src/tasks/CmdlineTaskRunner.cpp" line="334"/> <source>The process '%1' failed to start. Either the invoked program is missing, or you may have insufficient permissions to invoke the program</source> <translation>The process '%1' failed to start. Either the invoked program is missing, or you may have insufficient permissions to invoke the program</translation> </message> <message> - <location filename="../src/tasks/CmdlineTaskRunner.cpp" line="220"/> + <location filename="../src/tasks/CmdlineTaskRunner.cpp" line="338"/> <source>The process '%1' crashed some time after starting successfully</source> <translation>The process '%1' crashed some time after starting successfully</translation> </message> <message> - <location filename="../src/tasks/CmdlineTaskRunner.cpp" line="224"/> + <location filename="../src/tasks/CmdlineTaskRunner.cpp" line="342"/> <source>Error occurred while reading from or writing to channel</source> <translation>Error occurred while reading from or writing to channel</translation> </message> <message> - <location filename="../src/tasks/CmdlineTaskRunner.cpp" line="227"/> + <location filename="../src/tasks/CmdlineTaskRunner.cpp" line="345"/> <source>Unknown error occurred</source> <translation>Unknown error occurred</translation> </message> <message> - <location filename="../src/tasks/CmdlineTaskRunner.cpp" line="272"/> + <location filename="../src/tasks/CmdlineTaskRunner.cpp" line="390"/> <source>An error occurred. Process is not finished successfully.</source> <translation>An error occurred. Process is not finished successfully.</translation> </message> @@ -941,12 +954,12 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::DBXRefRegistry</name> <message> - <location filename="../src/globals/DBXRefRegistry.cpp" line="37"/> + <location filename="../src/globals/DBXRefRegistry.cpp" line="36"/> <source>File with db_xref mappings not found: %1</source> <translation>Ðе найден файл рееÑтра db_xref: %1</translation> </message> <message> - <location filename="../src/globals/DBXRefRegistry.cpp" line="48"/> + <location filename="../src/globals/DBXRefRegistry.cpp" line="47"/> <source>Illegal db_xref file entry: %1</source> <translation>Ðеверный формат Ñлемента: "%1"</translation> </message> @@ -1250,55 +1263,55 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::DatatypeSerializers</name> <message> - <location filename="../src/util/DatatypeSerializeUtils.cpp" line="310"/> + <location filename="../src/util/DatatypeSerializeUtils.cpp" line="309"/> <source>Incorrect tree parsing state</source> <translation>Incorrect tree parsing state</translation> </message> <message> - <location filename="../src/util/DatatypeSerializeUtils.cpp" line="313"/> + <location filename="../src/util/DatatypeSerializeUtils.cpp" line="312"/> <source>Unexpected weight: %1</source> <translation>Ðеожиданный веÑ: %1</translation> </message> <message> - <location filename="../src/util/DatatypeSerializeUtils.cpp" line="317"/> + <location filename="../src/util/DatatypeSerializeUtils.cpp" line="316"/> <source>Error parsing weight: %1</source> <translation>Ошибка парÑинга веÑа: %1</translation> </message> <message> - <location filename="../src/util/DatatypeSerializeUtils.cpp" line="324"/> - <location filename="../src/util/DatatypeSerializeUtils.cpp" line="345"/> + <location filename="../src/util/DatatypeSerializeUtils.cpp" line="323"/> + <location filename="../src/util/DatatypeSerializeUtils.cpp" line="344"/> <source>Tree node stack is empty</source> <translation>Tree node stack is empty</translation> </message> <message> - <location filename="../src/util/DatatypeSerializeUtils.cpp" line="336"/> + <location filename="../src/util/DatatypeSerializeUtils.cpp" line="335"/> <source>Error parsing nodeValue: %1</source> <translation>Error parsing nodeValue: %1</translation> </message> <message> - <location filename="../src/util/DatatypeSerializeUtils.cpp" line="346"/> - <location filename="../src/util/DatatypeSerializeUtils.cpp" line="364"/> + <location filename="../src/util/DatatypeSerializeUtils.cpp" line="345"/> + <location filename="../src/util/DatatypeSerializeUtils.cpp" line="363"/> <source>Branch node stack is empty</source> <translation>Branch node stack is empty</translation> </message> <message> - <location filename="../src/util/DatatypeSerializeUtils.cpp" line="348"/> + <location filename="../src/util/DatatypeSerializeUtils.cpp" line="347"/> <source>Unexpected new sibling %1</source> <translation>Ðеожиданный новый родÑтвенник %1</translation> </message> <message> - <location filename="../src/util/DatatypeSerializeUtils.cpp" line="361"/> + <location filename="../src/util/DatatypeSerializeUtils.cpp" line="360"/> <source>Unexpected closing bracket :%1</source> <translation>Ðеожиданные закрывающие Ñкобки: %1</translation> </message> <message> - <location filename="../src/util/DatatypeSerializeUtils.cpp" line="369"/> - <location filename="../src/util/DatatypeSerializeUtils.cpp" line="391"/> + <location filename="../src/util/DatatypeSerializeUtils.cpp" line="368"/> + <location filename="../src/util/DatatypeSerializeUtils.cpp" line="394"/> <source>Unexpected end of file</source> <translation>Ðеожиданный конец файла</translation> </message> <message> - <location filename="../src/util/DatatypeSerializeUtils.cpp" line="403"/> + <location filename="../src/util/DatatypeSerializeUtils.cpp" line="406"/> <source>Empty file</source> <translation>ПуÑтой файл</translation> </message> @@ -1306,12 +1319,12 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::DbiDocumentFormat</name> <message> - <location filename="../src/dbi/DbiDocumentFormat.cpp" line="48"/> + <location filename="../src/dbi/DbiDocumentFormat.cpp" line="43"/> <source>ugenedb is a internal UGENE database file format</source> <translation>ugenedb Ñто внутренний формат файла базы данных UGENE</translation> </message> <message> - <location filename="../src/dbi/DbiDocumentFormat.cpp" line="163"/> + <location filename="../src/dbi/DbiDocumentFormat.cpp" line="158"/> <source>Invalid destination database reference</source> <translation>Ðеверное раÑположение референÑа базы</translation> </message> @@ -1335,27 +1348,27 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::Document</name> <message> - <location filename="../src/models/DocumentModel.cpp" line="566"/> + <location filename="../src/models/DocumentModel.cpp" line="562"/> <source>Document is not loaded</source> <translation>Документ не загружен</translation> </message> <message> - <location filename="../src/models/DocumentModel.cpp" line="579"/> + <location filename="../src/models/DocumentModel.cpp" line="575"/> <source>IO adapter does not support write operation</source> <translation>Ðдаптер ввода/вывода не поддерживает запиÑÑŒ</translation> </message> <message> - <location filename="../src/models/DocumentModel.cpp" line="585"/> + <location filename="../src/models/DocumentModel.cpp" line="581"/> <source>No write support for document format</source> <translation>ЗапиÑÑŒ Ð´Ð»Ñ Ð´Ð°Ð½Ð½Ð¾Ð³Ð¾ формата не поддерживаетÑÑ</translation> </message> <message> - <location filename="../src/models/DocumentModel.cpp" line="655"/> + <location filename="../src/models/DocumentModel.cpp" line="651"/> <source>Locked by user</source> <translation>Заблокирован пользователем</translation> </message> <message> - <location filename="../src/models/DocumentModel.cpp" line="679"/> + <location filename="../src/models/DocumentModel.cpp" line="675"/> <source>Lock is NULL</source> <translation>Lock is NULL</translation> </message> @@ -1380,45 +1393,58 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::DocumentUtils</name> <message> - <location filename="../src/models/DocumentUtils.cpp" line="261"/> + <location filename="../src/models/DocumentUtils.cpp" line="256"/> <source>Format does not support writing of alignments</source> <translation>Формат не поддерживает запиÑÑŒ выравниваний</translation> </message> <message> - <location filename="../src/models/DocumentUtils.cpp" line="272"/> + <location filename="../src/models/DocumentUtils.cpp" line="267"/> <source>File content was merged</source> <translation>Содержимое файла было Ñоединено</translation> </message> </context> +<context> + <name>U2::EntrezQueryTask</name> + <message> + <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="510"/> + <source>Redirecting to %1</source> + <translation>Redirecting to %1</translation> + </message> +</context> <context> <name>U2::ExternalToolRunTask</name> <message> - <location filename="../src/tasks/ExternalToolRunTask.cpp" line="59"/> + <location filename="../src/tasks/ExternalToolRunTask.cpp" line="56"/> <source> tool</source> <translation> tool</translation> </message> <message> - <location filename="../src/tasks/ExternalToolRunTask.cpp" line="115"/> + <location filename="../src/tasks/ExternalToolRunTask.cpp" line="111"/> <source>Can not run %1 tool.</source> <translation>Ðевозможно запуÑтить %1 инÑтрумент.</translation> </message> <message> - <location filename="../src/tasks/ExternalToolRunTask.cpp" line="117"/> + <location filename="../src/tasks/ExternalToolRunTask.cpp" line="113"/> <source>Can not run %1 tool. May be tool path '%2' not valid?</source> <translation>Ðевозможно запуÑтить %1 инÑтрумент. Возможно путь до инÑтрумента '%2' указан неверно?</translation> </message> <message> - <location filename="../src/tasks/ExternalToolRunTask.cpp" line="126"/> + <location filename="../src/tasks/ExternalToolRunTask.cpp" line="122"/> <source>Tool %1 is cancelled</source> <translation>Tool %1 is cancelled</translation> </message> <message> - <location filename="../src/tasks/ExternalToolRunTask.cpp" line="139"/> + <location filename="../src/tasks/ExternalToolRunTask.cpp" line="134"/> + <source>%1 tool exited with the following error: %2 (Code: %3)</source> + <translation>%1 tool exited with the following error: %2 (Code: %3)</translation> + </message> + <message> + <location filename="../src/tasks/ExternalToolRunTask.cpp" line="145"/> <source>%1 tool exited with code %2</source> <translation>%1 инÑтрумент завершил работу Ñ ÐºÐ¾Ð´Ð¾Ð¼ %2</translation> </message> <message> - <location filename="../src/tasks/ExternalToolRunTask.cpp" line="141"/> + <location filename="../src/tasks/ExternalToolRunTask.cpp" line="147"/> <source>Tool %1 finished successfully</source> <translation>ИнÑтрумент %1 завершил работу корректно</translation> </message> @@ -1426,55 +1452,59 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::ExternalToolSupportUtils</name> <message> - <location filename="../src/tasks/ExternalToolRunTask.cpp" line="363"/> + <location filename="../src/tasks/ExternalToolRunTask.cpp" line="328"/> <source>Can not remove temporary folder: path is empty.</source> <translation>Ðевозможно удалить временную папку: пуÑтой путь.</translation> </message> <message> - <location filename="../src/tasks/ExternalToolRunTask.cpp" line="369"/> + <location filename="../src/tasks/ExternalToolRunTask.cpp" line="334"/> <source>Can not remove files from temporary folder.</source> <translation>Ðевозможно удалить файлы из временной папку.</translation> </message> <message> - <location filename="../src/tasks/ExternalToolRunTask.cpp" line="374"/> + <location filename="../src/tasks/ExternalToolRunTask.cpp" line="339"/> <source>Can not remove folder for temporary files.</source> <translation>Ðевозможно удалить папку Ð´Ð»Ñ Ð²Ñ€ÐµÐ¼ÐµÐ½Ð½Ñ‹Ñ… файлов.</translation> </message> <message> - <location filename="../src/tasks/ExternalToolRunTask.cpp" line="387"/> + <location filename="../src/tasks/ExternalToolRunTask.cpp" line="352"/> <source>Can not create folder for temporary files: %1</source> <translation>Ðевозможно Ñоздать папку Ð´Ð»Ñ Ð²Ñ€ÐµÐ¼ÐµÐ½Ð½Ñ‹Ñ… файлов: %1</translation> </message> <message> - <location filename="../src/tasks/ExternalToolRunTask.cpp" line="418"/> + <location filename="../src/tasks/ExternalToolRunTask.cpp" line="383"/> <source>Can't run an executable file "%1" as it is. Try to run it as a cmd line command: "%2"</source> <translation>Ðевозможно запуÑтить иÑполнÑемый файл "%1". Попробуйте запуÑтить его из командной Ñтроки: "%2"</translation> </message> <message> - <location filename="../src/tasks/ExternalToolRunTask.cpp" line="434"/> + <location filename="../src/tasks/ExternalToolRunTask.cpp" line="399"/> <source>Undefined tool: '%1'</source> <translation>Ðеопределенный инÑтрумент: '%1'</translation> </message> <message> - <location filename="../src/tasks/ExternalToolRunTask.cpp" line="438"/> + <location filename="../src/tasks/ExternalToolRunTask.cpp" line="403"/> <source>Path for '%1' tool not set</source> <translation>Путь до инÑтрумента '%1' не уÑтановлен</translation> </message> <message> - <location filename="../src/tasks/ExternalToolRunTask.cpp" line="484"/> + <location filename="../src/tasks/ExternalToolRunTask.cpp" line="447"/> <source>Working folder is "%1"</source> <translation>Ð Ð°Ð±Ð¾Ñ‡Ð°Ñ Ð¿Ð°Ð¿ÐºÐ° "%1"</translation> </message> <message> - <location filename="../src/tasks/ExternalToolRunTask.cpp" line="493"/> + <location filename="../src/tasks/ExternalToolRunTask.cpp" line="453"/> + <source>Launching %1 tool: %2</source> + <translation>ЗапуÑк инÑтрумента %1: %2 {1 ?}</translation> + </message> + <message> <source>Launching %1 tool: %2 %3</source> - <translation>ЗапуÑк инÑтрумента %1: %2 %3</translation> + <translation type="vanished">ЗапуÑк инÑтрумента %1: %2 %3</translation> </message> </context> <context> <name>U2::ExtractAnnotatedRegionTask</name> <message> - <location filename="../src/tasks/ExtractAnnotatedRegionTask.cpp" line="34"/> + <location filename="../src/tasks/ExtractAnnotatedRegionTask.cpp" line="33"/> <source>Extract annotated regions</source> <translation>Разбиение поÑледовательноÑти на аннотированные регионы</translation> </message> @@ -1590,57 +1620,57 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::GUrlUtils</name> <message> - <location filename="../src/util/GUrlUtils.cpp" line="154"/> + <location filename="../src/util/GUrlUtils.cpp" line="153"/> <source>Renamed %1 to %2</source> <translation>Старый файл %1 переименован в %2</translation> </message> <message> - <location filename="../src/util/GUrlUtils.cpp" line="158"/> + <location filename="../src/util/GUrlUtils.cpp" line="157"/> <source>Failed to rename %1 to %2</source> <translation>Ðе удалоÑÑŒ переименовать %1 в %2</translation> </message> <message> - <location filename="../src/util/GUrlUtils.cpp" line="313"/> + <location filename="../src/util/GUrlUtils.cpp" line="312"/> <source>Folder is not specified</source> <translation>Папка не указана</translation> </message> <message> - <location filename="../src/util/GUrlUtils.cpp" line="318"/> + <location filename="../src/util/GUrlUtils.cpp" line="317"/> <source>Folder can't be created: %1</source> <translation>Ðевозможно Ñоздать папку: %1</translation> </message> <message> - <location filename="../src/util/GUrlUtils.cpp" line="323"/> + <location filename="../src/util/GUrlUtils.cpp" line="322"/> <source>Folder can't be read: %1</source> <translation>Файлы папки %1 невозможно открыть на чтение</translation> </message> <message> - <location filename="../src/util/GUrlUtils.cpp" line="365"/> + <location filename="../src/util/GUrlUtils.cpp" line="364"/> <source>File path is not specified</source> <translation>Путь до файла не задан</translation> </message> <message> - <location filename="../src/util/GUrlUtils.cpp" line="368"/> + <location filename="../src/util/GUrlUtils.cpp" line="367"/> <source>Folder path instead of file path</source> <translation>Путь до папки вмеÑто пути до файла</translation> </message> <message> - <location filename="../src/util/GUrlUtils.cpp" line="426"/> + <location filename="../src/util/GUrlUtils.cpp" line="425"/> <source>Can not create a folder: %1</source> <translation>Ðевозможно Ñоздать папку: %1</translation> </message> <message> - <location filename="../src/util/GUrlUtils.cpp" line="476"/> + <location filename="../src/util/GUrlUtils.cpp" line="475"/> <source>%1 is not a local file [%2].</source> <translation>%1 is not a local file [%2].</translation> </message> <message> - <location filename="../src/util/GUrlUtils.cpp" line="485"/> + <location filename="../src/util/GUrlUtils.cpp" line="484"/> <source>Can not create a folder [%1].</source> <translation>Can not create a folder [%1].</translation> </message> <message> - <location filename="../src/util/GUrlUtils.cpp" line="490"/> + <location filename="../src/util/GUrlUtils.cpp" line="489"/> <source>%1 is a folder [%2].</source> <translation>%1 is a folder [%2].</translation> </message> @@ -1653,7 +1683,7 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::GzippedHttpFileAdapterFactory</name> <message> - <location filename="../src/io/HttpFileAdapter.cpp" line="51"/> + <location filename="../src/io/HttpFileAdapter.cpp" line="52"/> <source>HTTP GZIP adaptor</source> <translation>HTTP GZIP адаптер</translation> </message> @@ -1661,7 +1691,7 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::GzippedLocalFileAdapterFactory</name> <message> - <location filename="../src/io/LocalFileAdapter.cpp" line="41"/> + <location filename="../src/io/LocalFileAdapter.cpp" line="40"/> <source>GZIP file</source> <translation>Локальный GZIP адаптер</translation> </message> @@ -1669,15 +1699,25 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::HttpFileAdapter</name> <message> - <location filename="../src/io/HttpFileAdapter.cpp" line="109"/> + <location filename="../src/io/HttpFileAdapter.cpp" line="108"/> <source>Incorrect url string has been passed to HttpFileAdapter::open()</source> <translation>ÐÐµÐ¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ð°Ñ Ñтрока адреÑа была передана в HttpFileAdapter::open()</translation> </message> + <message> + <location filename="../src/io/HttpFileAdapter.cpp" line="125"/> + <source>Downloading from %1</source> + <translation>Downloading from %1</translation> + </message> + <message> + <location filename="../src/io/HttpFileAdapter.cpp" line="327"/> + <source>Redirecting to %1</source> + <translation>Redirecting to %1</translation> + </message> </context> <context> <name>U2::HttpFileAdapterFactory</name> <message> - <location filename="../src/io/HttpFileAdapter.cpp" line="42"/> + <location filename="../src/io/HttpFileAdapter.cpp" line="43"/> <source>HTTP file</source> <translation>HTTP адаптер</translation> </message> @@ -1708,32 +1748,32 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::ImportDocumentToDatabaseTask</name> <message> - <location filename="../src/tasks/shared_db/ImportDocumentToDatabaseTask.cpp" line="35"/> + <location filename="../src/tasks/shared_db/ImportDocumentToDatabaseTask.cpp" line="34"/> <source>Import document %1 to the database</source> <translation>Импорт документа %1 в базу данных</translation> </message> <message> - <location filename="../src/tasks/shared_db/ImportDocumentToDatabaseTask.cpp" line="42"/> + <location filename="../src/tasks/shared_db/ImportDocumentToDatabaseTask.cpp" line="40"/> <source>Invalid document to import</source> <translation>Ðекорректный документ Ð´Ð»Ñ Ð¸Ð¼Ð¿Ð¾Ñ€Ñ‚Ð°</translation> </message> <message> - <location filename="../src/tasks/shared_db/ImportDocumentToDatabaseTask.cpp" line="43"/> + <location filename="../src/tasks/shared_db/ImportDocumentToDatabaseTask.cpp" line="41"/> <source>Invalid database reference</source> <translation>Ðекорректный Ñ€ÐµÑ„ÐµÑ€ÐµÐ½Ñ Ð±Ð°Ð·Ñ‹ данных</translation> </message> <message> - <location filename="../src/tasks/shared_db/ImportDocumentToDatabaseTask.cpp" line="74"/> + <location filename="../src/tasks/shared_db/ImportDocumentToDatabaseTask.cpp" line="72"/> <source>Source document was removed, can't set object relations</source> <translation>ИÑточник документа был удален, невозможно уÑтановить ÑвÑзи объекта</translation> </message> <message> - <location filename="../src/tasks/shared_db/ImportDocumentToDatabaseTask.cpp" line="163"/> + <location filename="../src/tasks/shared_db/ImportDocumentToDatabaseTask.cpp" line="161"/> <source>Can't set object relation: target object is not found in the source document (%1)</source> <translation>Ðевозможно уÑтановить ÑвÑзь объекта: контрольный объект не найден в иÑходном документе (%1)</translation> </message> <message> - <location filename="../src/tasks/shared_db/ImportDocumentToDatabaseTask.cpp" line="167"/> + <location filename="../src/tasks/shared_db/ImportDocumentToDatabaseTask.cpp" line="165"/> <source>Can't set object relation: target object is not imported (%1)</source> <translation>Ðевозможно уÑтановить ÑвÑзь объекта: контрольный объект не импортирован (%1)</translation> </message> @@ -1741,28 +1781,28 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::ImportFileToDatabaseTask</name> <message> - <location filename="../src/tasks/shared_db/ImportFileToDatabaseTask.cpp" line="44"/> + <location filename="../src/tasks/shared_db/ImportFileToDatabaseTask.cpp" line="41"/> <source>Import file %1 to the database</source> <translation>Импорт файла %1 в базу данных</translation> </message> <message> - <location filename="../src/tasks/shared_db/ImportFileToDatabaseTask.cpp" line="52"/> + <location filename="../src/tasks/shared_db/ImportFileToDatabaseTask.cpp" line="48"/> <source>It is not a file: </source> <translation>Ðто не ÑвлÑетÑÑ Ñ„Ð°Ð¹Ð»Ð¾Ð¼: </translation> </message> <message> - <location filename="../src/tasks/shared_db/ImportFileToDatabaseTask.cpp" line="53"/> + <location filename="../src/tasks/shared_db/ImportFileToDatabaseTask.cpp" line="49"/> <source>Invalid database reference</source> <translation>Ðеверный Ñ€ÐµÑ„ÐµÑ€ÐµÐ½Ñ Ð±Ð°Ð·Ñ‹ данных</translation> </message> <message> - <location filename="../src/tasks/shared_db/ImportFileToDatabaseTask.cpp" line="58"/> - <location filename="../src/tasks/shared_db/ImportFileToDatabaseTask.cpp" line="101"/> + <location filename="../src/tasks/shared_db/ImportFileToDatabaseTask.cpp" line="54"/> + <location filename="../src/tasks/shared_db/ImportFileToDatabaseTask.cpp" line="97"/> <source>File format is not recognized</source> <translation>Формат файла не раÑпознаетÑÑ</translation> </message> <message> - <location filename="../src/tasks/shared_db/ImportFileToDatabaseTask.cpp" line="74"/> + <location filename="../src/tasks/shared_db/ImportFileToDatabaseTask.cpp" line="70"/> <source>Unrecognized url: </source> <translation>СÑылка не раÑпознаетÑÑ: </translation> </message> @@ -1770,32 +1810,32 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::ImportObjectToDatabaseTask</name> <message> - <location filename="../src/tasks/shared_db/ImportObjectToDatabaseTask.cpp" line="35"/> + <location filename="../src/tasks/shared_db/ImportObjectToDatabaseTask.cpp" line="33"/> <source>Import object %1 to database</source> <translation>Импорт объекта %1 в базу данных</translation> </message> <message> - <location filename="../src/tasks/shared_db/ImportObjectToDatabaseTask.cpp" line="42"/> + <location filename="../src/tasks/shared_db/ImportObjectToDatabaseTask.cpp" line="39"/> <source>Invalid object to import</source> <translation>Ðекорректный объект Ð´Ð»Ñ Ð¸Ð¼Ð¿Ð¾Ñ€Ñ‚Ð°</translation> </message> <message> - <location filename="../src/tasks/shared_db/ImportObjectToDatabaseTask.cpp" line="43"/> + <location filename="../src/tasks/shared_db/ImportObjectToDatabaseTask.cpp" line="40"/> <source>Invalid database reference</source> <translation>Ðеверный Ñ€ÐµÑ„ÐµÑ€ÐµÐ½Ñ Ð±Ð°Ð·Ñ‹ данных</translation> </message> <message> - <location filename="../src/tasks/shared_db/ImportObjectToDatabaseTask.cpp" line="50"/> + <location filename="../src/tasks/shared_db/ImportObjectToDatabaseTask.cpp" line="47"/> <source>Error! No DBI</source> <translation>Ошибка! Ðет DBI</translation> </message> <message> - <location filename="../src/tasks/shared_db/ImportObjectToDatabaseTask.cpp" line="52"/> + <location filename="../src/tasks/shared_db/ImportObjectToDatabaseTask.cpp" line="49"/> <source>Error! No object DBI</source> <translation>Ошибка! Ðет объекта DBI</translation> </message> <message> - <location filename="../src/tasks/shared_db/ImportObjectToDatabaseTask.cpp" line="57"/> + <location filename="../src/tasks/shared_db/ImportObjectToDatabaseTask.cpp" line="54"/> <source>The object has been removed</source> <translation>Объект был удален</translation> </message> @@ -2033,71 +2073,81 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::LoadDataFromEntrezTask</name> <message> - <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="433"/> + <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="400"/> + <source>Downloading file %1</source> + <translation>Downloading file %1</translation> + </message> + <message> + <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="410"/> <source>Sequence with ID=%1 is not found.</source> <translation>ПоÑледовательноÑÑ‚ÑŒ Ñ Ð¸Ð´ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ‚Ð¾Ñ€Ð¾Ð¼=%1 не найдена.</translation> </message> + <message> + <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="453"/> + <source>Redirecting to %1</source> + <translation>Redirecting to %1</translation> + </message> </context> <context> <name>U2::LoadDocumentTask</name> <message> - <location filename="../src/tasks/LoadDocumentTask.cpp" line="225"/> - <location filename="../src/tasks/LoadDocumentTask.cpp" line="240"/> + <location filename="../src/tasks/LoadDocumentTask.cpp" line="216"/> + <location filename="../src/tasks/LoadDocumentTask.cpp" line="230"/> <source>Read document: '%1'</source> <translation>Чтение документа: %1</translation> </message> <message> - <location filename="../src/tasks/LoadDocumentTask.cpp" line="261"/> + <location filename="../src/tasks/LoadDocumentTask.cpp" line="251"/> <source>Document format is NULL!</source> <translation>Формат документа NULL!</translation> </message> <message> - <location filename="../src/tasks/LoadDocumentTask.cpp" line="262"/> + <location filename="../src/tasks/LoadDocumentTask.cpp" line="252"/> <source>IO adapter factory is NULL!</source> <translation>IO адаптер NULL!</translation> </message> <message> - <location filename="../src/tasks/LoadDocumentTask.cpp" line="276"/> + <location filename="../src/tasks/LoadDocumentTask.cpp" line="266"/> <source>The fileURL to load is empty</source> <translation>The fileURL to load is empty</translation> </message> <message> - <location filename="../src/tasks/LoadDocumentTask.cpp" line="279"/> + <location filename="../src/tasks/LoadDocumentTask.cpp" line="269"/> <source>Cannot get an IO file adapter factory for the file URL: %1</source> <translation>Cannot get an IO file adapter factory for the file URL: %1</translation> </message> <message> - <location filename="../src/tasks/LoadDocumentTask.cpp" line="282"/> + <location filename="../src/tasks/LoadDocumentTask.cpp" line="272"/> <source>Cannot detect the file format: %1</source> <translation>Cannot detect the file format: %1</translation> </message> <message> - <location filename="../src/tasks/LoadDocumentTask.cpp" line="285"/> + <location filename="../src/tasks/LoadDocumentTask.cpp" line="275"/> <source>Document format is NULL (format ID: '%1', file URL: '%2')</source> <translation>Document format is NULL (format ID: '%1', file URL: '%2')</translation> </message> <message> - <location filename="../src/tasks/LoadDocumentTask.cpp" line="445"/> + <location filename="../src/tasks/LoadDocumentTask.cpp" line="432"/> <source>Document not found %1</source> <translation>Документ не найден: %1</translation> </message> <message> - <location filename="../src/tasks/LoadDocumentTask.cpp" line="465"/> + <location filename="../src/tasks/LoadDocumentTask.cpp" line="450"/> <source>Not enough memory to load document %1</source> <translation>ÐедоÑтаточно памÑти Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ документа %1</translation> </message> <message> - <location filename="../src/tasks/LoadDocumentTask.cpp" line="481"/> + <location filename="../src/tasks/LoadDocumentTask.cpp" line="466"/> <source>Maximum number of objects per document limit reached for %1. Try different options for opening the document!</source> <translation>МакÑимальное количеÑтво объектов в документе доÑтигнуто Ð´Ð»Ñ %1. Попробуйте другие ÑпоÑобы Ð´Ð»Ñ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ð¸Ñ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð°!</translation> </message> <message> - <location filename="../src/tasks/LoadDocumentTask.cpp" line="511"/> + <location filename="../src/tasks/LoadDocumentTask.cpp" line="496"/> <source>Object not found: %1</source> <translation>Объект не найден: "%1"</translation> </message> <message> - <location filename="../src/tasks/LoadDocumentTask.cpp" line="518"/> + <location filename="../src/tasks/LoadDocumentTask.cpp" line="503"/> <source>Can't add object. Document format constraints check failed: %1</source> <translation>Ðевозможно добавить объект. Проверка ограничений формата завершилаÑÑŒ неудачно: %1</translation> </message> @@ -2105,12 +2155,12 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::LoadRemoteDocumentTask</name> <message> - <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="214"/> + <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="205"/> <source>Undefined database: '%1'</source> <translation>ÐÐµÐ¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð½Ð°Ñ Ð±Ð°Ð·Ð° данных: '%1'</translation> </message> <message> - <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="266"/> + <location filename="../src/tasks/LoadRemoteDocumentTask.cpp" line="257"/> <source>Cannot find %1 in %2 database</source> <translation>Ðевозможно найти %1 в базе данных %2</translation> </message> @@ -2118,37 +2168,37 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::LoadUnloadedDocumentTask</name> <message> - <location filename="../src/tasks/LoadDocumentTask.cpp" line="125"/> + <location filename="../src/tasks/LoadDocumentTask.cpp" line="118"/> <source>Document was removed</source> <translation>Документ был удалён</translation> </message> <message> - <location filename="../src/tasks/LoadDocumentTask.cpp" line="177"/> + <location filename="../src/tasks/LoadDocumentTask.cpp" line="169"/> <source>Project Document:</source> <translation>Документ проекта:</translation> </message> <message> - <location filename="../src/tasks/LoadDocumentTask.cpp" line="158"/> + <location filename="../src/tasks/LoadDocumentTask.cpp" line="150"/> <source>Document is locked</source> <translation>Документ заблокирован</translation> </message> <message> - <location filename="../src/tasks/LoadDocumentTask.cpp" line="84"/> + <location filename="../src/tasks/LoadDocumentTask.cpp" line="77"/> <source>Load '%1'</source> <translation>Загрузка: %1</translation> </message> <message> - <location filename="../src/tasks/LoadDocumentTask.cpp" line="99"/> + <location filename="../src/tasks/LoadDocumentTask.cpp" line="92"/> <source>Starting load document from %1, document format %2</source> <translation>Ðачата загрузка из "%1", формат документа: %2</translation> </message> <message> - <location filename="../src/tasks/LoadDocumentTask.cpp" line="92"/> + <location filename="../src/tasks/LoadDocumentTask.cpp" line="85"/> <source>Document not found</source> <translation>Документ не найден</translation> </message> <message> - <location filename="../src/tasks/LoadDocumentTask.cpp" line="195"/> + <location filename="../src/tasks/LoadDocumentTask.cpp" line="187"/> <source>Annotation object not found</source> <translation>Ðе найдена таблица аннотаций</translation> </message> @@ -2156,7 +2206,7 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::LocalFileAdapterFactory</name> <message> - <location filename="../src/io/LocalFileAdapter.cpp" line="32"/> + <location filename="../src/io/LocalFileAdapter.cpp" line="31"/> <source>Local file</source> <translation>Локальный адаптер</translation> </message> @@ -2164,28 +2214,28 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::MSAUtils</name> <message> - <location filename="../src/util/MSAUtils.cpp" line="182"/> + <location filename="../src/util/MSAUtils.cpp" line="180"/> <source>Alphabets of the alignment and the sequence cannot be derived</source> <translation>Ðлфавиты Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ Ð¸ поÑледовательноÑти не могут быть получены</translation> </message> <message> - <location filename="../src/util/MSAUtils.cpp" line="190"/> + <location filename="../src/util/MSAUtils.cpp" line="188"/> <source>Sequences have different alphabets.</source> <translation>Ðлфавиты поÑледовательноÑтей не Ñовпадают.</translation> </message> <message> - <location filename="../src/util/MSAUtils.cpp" line="218"/> - <location filename="../src/util/MSAUtils.cpp" line="223"/> + <location filename="../src/util/MSAUtils.cpp" line="236"/> + <location filename="../src/util/MSAUtils.cpp" line="241"/> <source>Alignment is empty!</source> <translation>Выравнивание пуÑто!</translation> </message> <message> - <location filename="../src/util/MSAUtils.cpp" line="229"/> + <location filename="../src/util/MSAUtils.cpp" line="247"/> <source>Sequences in alignment have different sizes!</source> <translation>ПоÑледовательноÑти в выравнивании имеют разный размер!</translation> </message> <message> - <location filename="../src/util/MSAUtils.cpp" line="337"/> + <location filename="../src/util/MSAUtils.cpp" line="355"/> <source>Can't find a row in an alignment!</source> <translation>Ðевозможно найти Ñтроку в выравнивании!</translation> </message> @@ -2193,12 +2243,12 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::MaDbiUtils</name> <message> - <location filename="../src/util/MsaDbiUtils.cpp" line="157"/> + <location filename="../src/util/MsaDbiUtils.cpp" line="154"/> <source>Can't rename an alignment to an empty name!</source> <translation>Ðевозможно переименовать выравнивание, Ñ‚.к. Ð¸Ð¼Ñ Ð¿ÑƒÑтое!</translation> </message> <message> - <location filename="../src/util/MsaDbiUtils.cpp" line="197"/> + <location filename="../src/util/MsaDbiUtils.cpp" line="194"/> <source>Can't rename a row to an empty name!</source> <translation>Ðе удалоÑÑŒ переименовать Ñтроку, Ñ‚.к. Ð¸Ð¼Ñ Ð¿ÑƒÑтое!</translation> </message> @@ -2206,47 +2256,47 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::ModifySequenceContentTask</name> <message> - <location filename="../src/tasks/ModifySequenceObjectTask.cpp" line="56"/> + <location filename="../src/tasks/ModifySequenceObjectTask.cpp" line="52"/> <source>Modify sequence task</source> <translation>Задача Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¿Ð¾ÑледовательноÑти</translation> </message> <message> - <location filename="../src/tasks/ModifySequenceObjectTask.cpp" line="66"/> + <location filename="../src/tasks/ModifySequenceObjectTask.cpp" line="61"/> <source>Document is locked</source> <translation>Документ заблокирован</translation> </message> <message> - <location filename="../src/tasks/ModifySequenceObjectTask.cpp" line="70"/> + <location filename="../src/tasks/ModifySequenceObjectTask.cpp" line="65"/> <source>Region to delete is larger than the whole sequence</source> <translation>Регион Ð´Ð»Ñ ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ð±Ð¾Ð»ÑŒÑˆÐµ чем вÑÑ Ð¿Ð¾ÑледовательноÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/tasks/ModifySequenceObjectTask.cpp" line="128"/> + <location filename="../src/tasks/ModifySequenceObjectTask.cpp" line="123"/> <source>Some annotations have qualifiers referring a sequence region that has been removed during the sequence editing. You might want to change the qualifiers manually. Find them in the table below</source> <translation>Ðекоторые аннотации имеют квалификаторы, которые ÑÑылаютÑÑ Ð½Ð° регионы поÑледовательноÑти, которые были удалены в процеÑÑе редактированиÑ</translation> </message> <message> - <location filename="../src/tasks/ModifySequenceObjectTask.cpp" line="132"/> + <location filename="../src/tasks/ModifySequenceObjectTask.cpp" line="127"/> <source>Annotation Name</source> <translation>Ð˜Ð¼Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ð¸</translation> </message> <message> - <location filename="../src/tasks/ModifySequenceObjectTask.cpp" line="134"/> + <location filename="../src/tasks/ModifySequenceObjectTask.cpp" line="129"/> <source>Annotation Location</source> <translation>РаÑположение аннотации</translation> </message> <message> - <location filename="../src/tasks/ModifySequenceObjectTask.cpp" line="136"/> + <location filename="../src/tasks/ModifySequenceObjectTask.cpp" line="131"/> <source>Qualifier Name</source> <translation>Ð˜Ð¼Ñ ÐºÐ²Ð°Ð»Ð¸Ñ„Ð¸ÐºÐ°Ñ‚Ð¾Ñ€Ð°</translation> </message> <message> - <location filename="../src/tasks/ModifySequenceObjectTask.cpp" line="138"/> + <location filename="../src/tasks/ModifySequenceObjectTask.cpp" line="133"/> <source>Referenced Region</source> <translation>Регион</translation> </message> <message> - <location filename="../src/tasks/ModifySequenceObjectTask.cpp" line="143"/> + <location filename="../src/tasks/ModifySequenceObjectTask.cpp" line="138"/> <source>Unexpected qualifiers count</source> <translation>Unexpected qualifiers count</translation> </message> @@ -2258,13 +2308,13 @@ The session database file is removed after closing of UGENE.</source> <translation type="vanished">Ðевозможно переименовать выравнивание, Ñ‚.к. Ð¸Ð¼Ñ Ð¿ÑƒÑтое!</translation> </message> <message> - <location filename="../src/util/MsaDbiUtils.cpp" line="935"/> - <location filename="../src/util/MsaDbiUtils.cpp" line="942"/> + <location filename="../src/util/MsaDbiUtils.cpp" line="914"/> + <location filename="../src/util/MsaDbiUtils.cpp" line="921"/> <source>Failed to insert gaps into an alignment!</source> <translation>Ðе удалоÑÑŒ вÑтавить пробелы в выравнивание!</translation> </message> <message> - <location filename="../src/util/MsaDbiUtils.cpp" line="1111"/> + <location filename="../src/util/MsaDbiUtils.cpp" line="1089"/> <source>Failed to crop an alignment!</source> <translation>Ðе удалоÑÑŒ обрезать выравнивание!</translation> </message> @@ -2326,17 +2376,17 @@ The session database file is removed after closing of UGENE.</source> <translation>Перемещение документа %1 -> %2</translation> </message> <message> - <location filename="../src/tasks/SaveDocumentTask.cpp" line="370"/> + <location filename="../src/tasks/SaveDocumentTask.cpp" line="368"/> <source>No active project found</source> <translation>Ðет проекта</translation> </message> <message> - <location filename="../src/tasks/SaveDocumentTask.cpp" line="374"/> + <location filename="../src/tasks/SaveDocumentTask.cpp" line="372"/> <source>Project is locked</source> <translation>Проект заблокирован</translation> </message> <message> - <location filename="../src/tasks/SaveDocumentTask.cpp" line="383"/> + <location filename="../src/tasks/SaveDocumentTask.cpp" line="381"/> <source>Only unloaded objects can be relocated</source> <translation>Можно перемещать только выгруженные документы</translation> </message> @@ -2352,12 +2402,12 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::RemoveMultipleDocumentsTask</name> <message> - <location filename="../src/tasks/RemoveDocumentTask.cpp" line="34"/> + <location filename="../src/tasks/RemoveDocumentTask.cpp" line="33"/> <source>Remove document</source> <translation>Удаление документа</translation> </message> <message> - <location filename="../src/tasks/RemoveDocumentTask.cpp" line="98"/> + <location filename="../src/tasks/RemoveDocumentTask.cpp" line="96"/> <source>Cannot remove document %1, since it is locked by some task.</source> <translation>Ðевозможно удалить документ %1, Ñ‚.к. он заблокирован другой задачей.</translation> </message> @@ -2365,12 +2415,12 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::ResourceTracker</name> <message> - <location filename="../src/globals/ResourceTracker.cpp" line="39"/> + <location filename="../src/globals/ResourceTracker.cpp" line="38"/> <source>resource '%1' is used by '%2'</source> <translation>РеÑÑƒÑ€Ñ "%1" заблокирован задачей "%2"</translation> </message> <message> - <location filename="../src/globals/ResourceTracker.cpp" line="55"/> + <location filename="../src/globals/ResourceTracker.cpp" line="54"/> <source>resource '%1' is released by '%2'</source> <translation>РеÑÑƒÑ€Ñ "%1" разблокирован задачей "%2"</translation> </message> @@ -2394,7 +2444,7 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::SaveCopyAndAddToProjectTask</name> <message> - <location filename="../src/tasks/SaveDocumentTask.cpp" line="323"/> + <location filename="../src/tasks/SaveDocumentTask.cpp" line="324"/> <source>Save a copy %1</source> <translation>Сохранение копии %1</translation> </message> @@ -2425,51 +2475,56 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::SaveDocumentTask</name> <message> - <location filename="../src/tasks/SaveDocumentTask.cpp" line="55"/> - <location filename="../src/tasks/SaveDocumentTask.cpp" line="72"/> + <location filename="../src/tasks/SaveDocumentTask.cpp" line="54"/> + <location filename="../src/tasks/SaveDocumentTask.cpp" line="70"/> <source>Save document</source> <translation>Сохранение документа</translation> </message> <message> - <location filename="../src/tasks/SaveDocumentTask.cpp" line="65"/> - <location filename="../src/tasks/SaveDocumentTask.cpp" line="78"/> + <location filename="../src/tasks/SaveDocumentTask.cpp" line="63"/> + <location filename="../src/tasks/SaveDocumentTask.cpp" line="75"/> <source>No permission to write to '%1' file.</source> <translation>Ðет прав на запиÑÑŒ в '%1' файл.</translation> </message> <message> - <location filename="../src/tasks/SaveDocumentTask.cpp" line="100"/> + <location filename="../src/tasks/SaveDocumentTask.cpp" line="85"/> + <source>Document was removed</source> + <translation>Документ был удалён</translation> + </message> + <message> + <location filename="../src/tasks/SaveDocumentTask.cpp" line="97"/> <source>Saving document %1 </source> <translation>Сохранение документа: %1 </translation> </message> <message> - <location filename="../src/tasks/SaveDocumentTask.cpp" line="126"/> + <location filename="../src/tasks/SaveDocumentTask.cpp" line="127"/> <source>Can't create tmp file</source> <translation>Ðевозможно Ñоздать временный файл</translation> </message> <message> - <location filename="../src/tasks/SaveDocumentTask.cpp" line="131"/> + <location filename="../src/tasks/SaveDocumentTask.cpp" line="132"/> <source>Can't copy file to tmp file while trying to save document by append</source> <translation>Ðевозможно Ñкопировать Ñкопировать файл во временный файл при попытке ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð° при добавлении</translation> </message> <message> - <location filename="../src/tasks/SaveDocumentTask.cpp" line="148"/> + <location filename="../src/tasks/SaveDocumentTask.cpp" line="149"/> <source>Can't remove original file to place tmp file instead</source> <translation>Ðевозможно удалить оригинальный файл чтобы заменить его временным</translation> </message> <message> - <location filename="../src/tasks/SaveDocumentTask.cpp" line="151"/> + <location filename="../src/tasks/SaveDocumentTask.cpp" line="152"/> <source>Can't rename saved tmp file to original file</source> <translation>Ðевозможно переименовать Ñохраненный временный файл в оригинальный</translation> </message> <message> - <location filename="../src/tasks/SaveDocumentTask.cpp" line="188"/> + <location filename="../src/tasks/SaveDocumentTask.cpp" line="190"/> <source>Document '%1' can't be unloaded: </source> <translation>Документ '%1' не может быть выгружен: </translation> </message> <message> - <location filename="../src/tasks/SaveDocumentTask.cpp" line="188"/> + <location filename="../src/tasks/SaveDocumentTask.cpp" line="190"/> <source>unexpected error</source> <translation>Ð½ÐµÐ¾Ð¶Ð¸Ð´Ð°Ð½Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°</translation> </message> @@ -2477,34 +2532,34 @@ The session database file is removed after closing of UGENE.</source> <context> <name>U2::SaveMultipleDocuments</name> <message> - <location filename="../src/tasks/SaveDocumentTask.cpp" line="206"/> + <location filename="../src/tasks/SaveDocumentTask.cpp" line="208"/> <source>Save multiple documents</source> <translation>Сохранение неÑкольких документов</translation> </message> <message> - <location filename="../src/tasks/SaveDocumentTask.cpp" line="218"/> + <location filename="../src/tasks/SaveDocumentTask.cpp" line="219"/> <source>Question?</source> <translation>ВопроÑ?</translation> </message> <message> - <location filename="../src/tasks/SaveDocumentTask.cpp" line="219"/> + <location filename="../src/tasks/SaveDocumentTask.cpp" line="220"/> <source>Save document: %1</source> <translation>Сохранить документ: %1</translation> </message> <message> - <location filename="../src/tasks/SaveDocumentTask.cpp" line="279"/> + <location filename="../src/tasks/SaveDocumentTask.cpp" line="280"/> <source>You have no permission to write to '%1' file. UGENE contains unsaved modifications.</source> <translation>У Ð²Ð°Ñ Ð½ÐµÐ´Ð¾Ñтаточно прав Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи в '%1' файл. UGENE Ñодержит неÑохраненные изменениÑ.</translation> </message> <message> - <location filename="../src/tasks/SaveDocumentTask.cpp" line="280"/> + <location filename="../src/tasks/SaveDocumentTask.cpp" line="281"/> <source>Do you want to save changes to another file?</source> <translation>Хотите Ñохранить Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð² другой файл?</translation> </message> <message> - <location filename="../src/tasks/SaveDocumentTask.cpp" line="301"/> + <location filename="../src/tasks/SaveDocumentTask.cpp" line="302"/> <source>Save as</source> <translation>Сохранить как</translation> </message> @@ -2549,7 +2604,7 @@ UGENE Ñодержит неÑохраненные изменениÑ.</translati <context> <name>U2::StringAdapterFactory</name> <message> - <location filename="../src/io/StringAdapter.cpp" line="27"/> + <location filename="../src/io/StringAdapter.cpp" line="29"/> <source>String buffer</source> <translation>Буфер Ñтроки</translation> </message> @@ -2600,7 +2655,7 @@ UGENE Ñодержит неÑохраненные изменениÑ.</translati <context> <name>U2::U2AssemblyUtils</name> <message> - <location filename="../src/util/U2AssemblyUtils.cpp" line="55"/> + <location filename="../src/util/U2AssemblyUtils.cpp" line="53"/> <source>Invalid CIGAR op: '%1'!</source> <translation>Ðеверный CIGAR : '%1'!</translation> </message> @@ -2636,38 +2691,38 @@ UGENE Ñодержит неÑохраненные изменениÑ.</translati <translation>Ошибка ÑвÑÐ·Ñ‹Ð²Ð°Ð½Ð¸Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ NULL! ЗапроÑ: '%1', idx: %2</translation> </message> <message> - <location filename="../src/dbi/U2SqlHelpers.cpp" line="304"/> + <location filename="../src/dbi/U2SqlHelpers.cpp" line="303"/> <source>Error binding text value! Query: '%1', idx: %2, value: '%3'</source> <translation>Ошибка ÑвÑÐ·Ñ‹Ð²Ð°Ð½Ð¸Ñ Ñ‚ÐµÐºÑтового значениÑ! ЗапроÑ: '%1', idx: %2, значение: '%3'</translation> </message> <message> - <location filename="../src/dbi/U2SqlHelpers.cpp" line="316"/> + <location filename="../src/dbi/U2SqlHelpers.cpp" line="315"/> <source>Error binding int32 value! Query: '%1', idx: %2, value: %3</source> <translation>Ошибка ÑвÑÐ·Ñ‹Ð²Ð°Ð½Ð¸Ñ int32 значениÑ! ЗапроÑ: '%1', idx: %2, значение: %3</translation> </message> <message> - <location filename="../src/dbi/U2SqlHelpers.cpp" line="328"/> - <location filename="../src/dbi/U2SqlHelpers.cpp" line="340"/> + <location filename="../src/dbi/U2SqlHelpers.cpp" line="327"/> + <location filename="../src/dbi/U2SqlHelpers.cpp" line="339"/> <source>Error binding int64 value! Query: '%1', idx: %2, value: %3</source> <translation>Ошибка ÑвÑÐ·Ñ‹Ð²Ð°Ð½Ð¸Ñ int64 значениÑ! ЗапроÑ: '%1', idx: %2, значение: %3</translation> </message> <message> - <location filename="../src/dbi/U2SqlHelpers.cpp" line="353"/> + <location filename="../src/dbi/U2SqlHelpers.cpp" line="352"/> <source>Error binding boolean value! Query: '%1', idx: %2, value: %3</source> <translation>Ошибка ÑвÑÐ·Ñ‹Ð²Ð°Ð½Ð¸Ñ Ð»Ð¾Ð³Ð¸Ñ‡ÐµÑкого значениÑ! ЗапроÑ: '%1', idx: %2, значение: %3</translation> </message> <message> - <location filename="../src/dbi/U2SqlHelpers.cpp" line="370"/> + <location filename="../src/dbi/U2SqlHelpers.cpp" line="369"/> <source>Error binding blob value! Query: '%1', idx: %2, size: %3</source> <translation>Ошибка ÑвÑÐ·Ñ‹Ð²Ð°Ð½Ð¸Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ blob! ЗапроÑ: '%1', idx: %2, размер: %3</translation> </message> <message> - <location filename="../src/dbi/U2SqlHelpers.cpp" line="382"/> + <location filename="../src/dbi/U2SqlHelpers.cpp" line="381"/> <source>Error binding blob value! Query: '%1', idx: %2</source> <translation>Ошибка ÑвÑÐ·Ñ‹Ð²Ð°Ð½Ð¸Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ blob! ЗапроÑ: '%1', idx: %2</translation> </message> <message> - <location filename="../src/dbi/U2SqlHelpers.cpp" line="395"/> + <location filename="../src/dbi/U2SqlHelpers.cpp" line="394"/> <source>Unexpected row count! Query: '%1', rows: %2</source> <translation>Значение неожиданной Ñтроки! Ð—Ð°Ð¿Ñ€Ð¾Ñ '%1', Ñтроки: %2</translation> </message> @@ -2715,12 +2770,12 @@ UGENE Ñодержит неÑохраненные изменениÑ.</translati <context> <name>U2::U2SequenceObject</name> <message> - <location filename="../src/gobjects/DNASequenceObject.cpp" line="200"/> + <location filename="../src/gobjects/DNASequenceObject.cpp" line="195"/> <source>Internal error, sequence alphabet id '%1' is invalid</source> <translation>ВнутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ°, неверный алфавит поÑледовательноÑти '%1'</translation> </message> <message> - <location filename="../src/gobjects/DNASequenceObject.cpp" line="213"/> + <location filename="../src/gobjects/DNASequenceObject.cpp" line="208"/> <source>Modified sequence & region have different alphabet</source> <translation>Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð½Ð°Ñ Ð¿Ð¾ÑледовательноÑÑ‚ÑŒ и регион имеют разные алфавиты</translation> </message> @@ -2728,19 +2783,19 @@ UGENE Ñодержит неÑохраненные изменениÑ.</translati <context> <name>U2::U2SequenceUtils</name> <message> - <location filename="../src/util/U2SequenceUtils.cpp" line="56"/> + <location filename="../src/util/U2SequenceUtils.cpp" line="54"/> <source>Alphabet is not found!</source> <translation>Ðлфавит не найден!</translation> </message> <message> - <location filename="../src/util/U2SequenceUtils.cpp" line="103"/> - <location filename="../src/util/U2SequenceUtils.cpp" line="119"/> + <location filename="../src/util/U2SequenceUtils.cpp" line="101"/> + <location filename="../src/util/U2SequenceUtils.cpp" line="117"/> <source>Invalid sequence DBI</source> <translation>Invalid sequence DBI</translation> </message> <message> - <location filename="../src/util/U2SequenceUtils.cpp" line="468"/> - <location filename="../src/util/U2SequenceUtils.cpp" line="647"/> + <location filename="../src/util/U2SequenceUtils.cpp" line="459"/> + <location filename="../src/util/U2SequenceUtils.cpp" line="636"/> <source>Failed to derive sequence alphabet!</source> <translation>Ðе удалоÑÑŒ раÑпознать алфавит!</translation> </message> @@ -2748,7 +2803,7 @@ UGENE Ñодержит неÑохраненные изменениÑ.</translati <context> <name>U2::UserAppsSettings</name> <message> - <location filename="../src/globals/UserApplicationsSettings.cpp" line="71"/> + <location filename="../src/globals/UserApplicationsSettings.cpp" line="72"/> <source>Cleaning temp dir: %1</source> <translation>ОчиÑтка временной папки: %1</translation> </message> @@ -2764,7 +2819,7 @@ UGENE Ñодержит неÑохраненные изменениÑ.</translati <context> <name>U2SequenceImporter</name> <message> - <location filename="../src/util/U2SequenceUtils.cpp" line="389"/> + <location filename="../src/util/U2SequenceUtils.cpp" line="384"/> <source>Sequence was not imported. Probably, this is because the sequence is empty.</source> <translation>ПоÑледовательноÑÑ‚ÑŒ не была импортирована. Возможно Ñто произошло из-за того, что поÑледовательноÑÑ‚ÑŒ ÑвлÑетÑÑ Ð¿ÑƒÑтой.</translation> </message> diff --git a/src/corelibs/U2Designer/U2Designer.pri b/src/corelibs/U2Designer/U2Designer.pri index 8649d981705ac0ae403f55fae810bc29ae60e576..e2eb1381fdf8e3053b14c3285d22ff4e46931034 100644 --- a/src/corelibs/U2Designer/U2Designer.pri +++ b/src/corelibs/U2Designer/U2Designer.pri @@ -3,29 +3,21 @@ MODULE_ID=U2Designer include( ../../ugene_lib_common.pri ) -UGENE_RELATIVE_DESTDIR = '' - -QT += svg webkit widgets webkitwidgets +QT += svg +useWebKit() { + QT += webkitwidgets +} else { + QT += webengine webenginewidgets +} DEFINES+= QT_FATAL_ASSERT BUILDING_U2DESIGNER_DLL -LIBS += -L../../_release -lU2Core -lU2Lang -lU2Gui - -!debug_and_release|build_pass { +LIBS += -L../../$$out_dir() +LIBS += -lU2Core$$D -lU2Lang$$D -lU2Gui$$D - CONFIG(debug, debug|release) { - DESTDIR=../../_debug - LIBS -= -L../../_release -lU2Core -lU2Lang -lU2Gui - LIBS += -L../../_debug -lU2Cored -lU2Langd -lU2Guid - } - - CONFIG(release, debug|release) { - DESTDIR=../../_release - } -} +DESTDIR = ../../$$out_dir() unix { - target.path = $$UGENE_INSTALL_DIR/$$UGENE_RELATIVE_DESTDIR + target.path = $$UGENE_INSTALL_DIR/ INSTALLS += target } - diff --git a/src/corelibs/U2Designer/U2Designer.pro b/src/corelibs/U2Designer/U2Designer.pro index 1b7cdfa0d8993fe3a6760f97102b8ccb653348c1..a0e3c86804f6a5b4e47dee72d6579d9f7770c331 100644 --- a/src/corelibs/U2Designer/U2Designer.pro +++ b/src/corelibs/U2Designer/U2Designer.pro @@ -26,13 +26,12 @@ HEADERS += src/BreakpointHitCountDialog.h \ src/UrlItem.h \ src/WorkflowGUIUtils.h \ src/dashboard/Dashboard.h \ - src/dashboard/ExternalToolsWidget.h \ - src/dashboard/NotificationsWidget.h \ - src/dashboard/OutputFilesWidget.h \ - src/dashboard/ParametersWidget.h \ - src/dashboard/ResourcesWidget.h \ - src/dashboard/StatisticsWidget.h \ - src/dashboard/TableWidget.h \ + src/dashboard/DashboardInfo.h \ + src/dashboard/DashboardInfoRegistry.h \ + src/dashboard/DashboardJsAgent.h \ + src/dashboard/DashboardPageController.h \ + src/dashboard/RemoveDashboardsTask.h \ + src/dashboard/ScanDashboardsDirTask.h \ src/support/OutputDirectoryWidget.h \ src/support/URLLineEdit.h \ src/wizard/BowtieWidgetController.h \ @@ -48,6 +47,7 @@ HEADERS += src/BreakpointHitCountDialog.h \ src/wizard/WidgetController.h \ src/wizard/WizardController.h \ src/wizard/WizardPageController.h + FORMS += src/AnnsActionDialog.ui \ src/BreakpointHitCountDialog.ui \ src/CreateDirectoryDialog.ui \ @@ -68,6 +68,7 @@ FORMS += src/AnnsActionDialog.ui \ src/OutputFileDialog.ui \ src/SequenceActionDialog.ui \ src/StringActionDialog.ui + SOURCES += src/BreakpointHitCountDialog.cpp \ src/DatasetsController.cpp \ src/DatasetsListWidget.cpp \ @@ -93,13 +94,12 @@ SOURCES += src/BreakpointHitCountDialog.cpp \ src/UrlItem.cpp \ src/WorkflowGUIUtils.cpp \ src/dashboard/Dashboard.cpp \ - src/dashboard/ExternalToolsWidget.cpp \ - src/dashboard/NotificationsWidget.cpp \ - src/dashboard/OutputFilesWidget.cpp \ - src/dashboard/ParametersWidget.cpp \ - src/dashboard/ResourcesWidget.cpp \ - src/dashboard/StatisticsWidget.cpp \ - src/dashboard/TableWidget.cpp \ + src/dashboard/DashboardInfo.cpp \ + src/dashboard/DashboardInfoRegistry.cpp \ + src/dashboard/DashboardJsAgent.cpp \ + src/dashboard/DashboardPageController.cpp \ + src/dashboard/RemoveDashboardsTask.cpp \ + src/dashboard/ScanDashboardsDirTask.cpp \ src/support/OutputDirectoryWidget.cpp \ src/support/URLLineEdit.cpp \ src/wizard/BowtieWidgetController.cpp \ @@ -115,5 +115,6 @@ SOURCES += src/BreakpointHitCountDialog.cpp \ src/wizard/WidgetController.cpp \ src/wizard/WizardController.cpp \ src/wizard/WizardPageController.cpp + RESOURCES += U2Designer.qrc TRANSLATIONS += transl/russian.ts diff --git a/src/corelibs/U2Designer/U2Designer.qrc b/src/corelibs/U2Designer/U2Designer.qrc index 1cea557a105cab72fc8bfb870c48402a4179c8ff..647500351472f2ef012f13dc13eb86471248ff78 100644 --- a/src/corelibs/U2Designer/U2Designer.qrc +++ b/src/corelibs/U2Designer/U2Designer.qrc @@ -2,8 +2,6 @@ <qresource prefix="/U2Designer"> <file>html/Dashboard.css</file> <file>html/Dashboard.html</file> - <file>html/EstimationReport.css</file> - <file>html/EstimationReport.html</file> <file>javascript/Common.js</file> <file>javascript/ParametersWidget.js</file> <file>javascript/ExternalToolsWidget.js</file> @@ -28,6 +26,10 @@ <file>images/database_add.png</file> <file>images/database_folder.png</file> <file>images/blue_circle.png</file> + <file>javascript/ProblemsWidget.js</file> + <file>javascript/StatisticsWidget.js</file> + <file>javascript/TableWidget.js</file> + <file>javascript/StatusWidget.js</file> </qresource> <qresource prefix="/"> <file>javascript/bootstrap/css/bootstrap-responsive.css</file> diff --git a/src/corelibs/U2Designer/html/Dashboard.css b/src/corelibs/U2Designer/html/Dashboard.css index 39637ea8fec9a81c114e53244090407390837b4a..0c422aade7a8bd52f33be733ba145e8f1933f60f 100644 --- a/src/corelibs/U2Designer/html/Dashboard.css +++ b/src/corelibs/U2Designer/html/Dashboard.css @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -20,12 +20,12 @@ */ body { - background: url("qrc:U2Designer/images/background.png") repeat scroll 0% 0% transparent; + background: url("qrc:///U2Designer/images/background.png") repeat scroll 0% 0% transparent; } #wrapper { /** Fill the whole horizontal space */ - display: table; + display: table; width: 100%; } @@ -77,14 +77,14 @@ body { } .dash-menu-line { - background: url("qrc:U2Designer/images/background-menu.png") repeat scroll 0% 0% transparent; + background: url("qrc:///U2Designer/images/background-menu.png") repeat scroll 0% 0% transparent; padding-left: 20px; margin-bottom: 30px; min-width: 500px; } .dash-nav > .active > a, .dash-nav > .active > a:hover, .dash-nav > .active > a:focus { - background: url("qrc:U2Designer/images/background-menu-button.png") repeat scroll 0% 0% transparent; + background: url("qrc:///U2Designer/images/background-menu-button.png") repeat scroll 0% 0% transparent; color: white; } @@ -209,7 +209,7 @@ table.table-fixed { .load-btn div { width: 16px; height: 16px; - background-image: url("qrc:U2Designer/images/load_schema.png"); + background-image: url("qrc:///U2Designer/images/load_schema.png"); background-repeat: no-repeat; } @@ -285,7 +285,11 @@ span.badge word-break: break-all; -webkit-hyphens: auto; } -span.badge.program-path +span.badge.command +{ + background-color:#79ACAC; +} +span.badge.program-path /* deprecated: new dashboards won't contain elements of this class, it was replaced with 'span.badge.command' */ { background-color:#BCBC90; } @@ -293,7 +297,7 @@ span.badge.tool-info { background-color:#9999CC; } -span.badge.tool-args +span.badge.tool-args /* deprecated: new dashboards won't contain elements of this class, it was replaced with 'span.badge.command' */ { background-color:#79ACAC; } @@ -306,6 +310,14 @@ span.badge.badge-important { background-color:#CC6666; } +span.badge.actor-node +{ + background-color:#92939E; +} +span.badge.actor-tick-node +{ + background-color:#bdb0a0; +} span.badge.tool-node { background-color:#bdb0a0; @@ -325,6 +337,20 @@ span.content -webkit-hyphens: auto; width: 830px; } +span.badge.limitation-message +{ + background-color: #CC6666; +} +a.log-folder-link +{ + text-decoration: underline; + color: inherit; +} +a.log-file-link +{ + text-decoration: underline; + color: inherit; +} .dropdown-menu.context { display: block; @@ -336,12 +362,12 @@ span.content { position: absolute; display: inline-block; - background-image: url("qrc:U2Designer/images/copy.png"); + background-image: url("qrc:///U2Designer/images/copy.png"); background-repeat: no-repeat; background-position:center; border: 1px solid #999; - border-left: 2px solid white; - height: inherit; + border-left: 1px solid white; + height: 22px; width: 22px; -webkit-border-radius: 0 6px 6px 0; margin-top: -4px; diff --git a/src/corelibs/U2Designer/html/Dashboard.html b/src/corelibs/U2Designer/html/Dashboard.html index ac8d42ba56c6e8021ec96810e5c3aba8f6a60083..ff65bb573f859987c2e0e7a40ec67a6660853904 100644 --- a/src/corelibs/U2Designer/html/Dashboard.html +++ b/src/corelibs/U2Designer/html/Dashboard.html @@ -1,18 +1,18 @@ <!-- UGENE - Integrated Bioinformatics Tools. - Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> http://ugene.net - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, @@ -20,19 +20,28 @@ --> <!DOCTYPE html> <html> -<head> - <meta charset="utf-8"> + <head> + <meta charset="utf-8" /> <title>Dashboard</title> - <link rel="stylesheet" type="text/css" href="qrc:javascript/bootstrap/css/bootstrap.min.css"/> - <link rel="stylesheet" type="text/css" href="qrc:U2Designer/html/Dashboard.css"/> - <script type="text/javascript" src="qrc:javascript/jquery/jquery.js"></script> - <script type="text/javascript" src="qrc:javascript/bootstrap/js/bootstrap.js"></script> - <script type="text/javascript" src="qrc:U2Designer/javascript/Common.js"></script> - <script type="text/javascript" src="qrc:U2Designer/javascript/ContextMenu.js"></script> - <script type="text/javascript" src="qrc:U2Designer/javascript/ParametersWidget.js"></script> - <script type="text/javascript" src="qrc:U2Designer/javascript/ExternalToolsWidget.js"></script> - <script type="text/javascript" language="javascript"> - var sec = 0; + + <link rel="stylesheet" type="text/css" href="qrc:///javascript/bootstrap/css/bootstrap.min.css"/> + <link rel="stylesheet" type="text/css" href="qrc:///U2Designer/html/Dashboard.css"/> + <script type="text/javascript" src="qrc:///javascript/jquery/jquery.js"></script> + <script type="text/javascript" src="qrc:///javascript/bootstrap/js/bootstrap.js"></script> + <script type="text/javascript" src="qrc:///U2Designer/javascript/Common.js"></script> + <script type="text/javascript" src="qrc:///U2Designer/javascript/ContextMenu.js"></script> + <script type="text/javascript" src="qrc:///U2Designer/javascript/TableWidget.js"></script> + <script type="text/javascript" src="qrc:///U2Designer/javascript/ParametersWidget.js"></script> + <script type="text/javascript" src="qrc:///U2Designer/javascript/ExternalToolsWidget.js"></script> + <script type="text/javascript" src="qrc:///U2Designer/javascript/ProblemsWidget.js"></script> + <script type="text/javascript" src="qrc:///U2Designer/javascript/StatisticsWidget.js"></script> + <script type="text/javascript" src="qrc:///U2Designer/javascript/StatusWidget.js"></script> + </head> + + <body> + <script> + "use strict"; + var sec = 0; var min = 0; var hour = 0; var paused = true; @@ -66,42 +75,70 @@ min = 0; hour++; } - document.getElementById("timer").innerHTML = timeToString(hour, min, sec); sec++; } + function containerSize(insideElt, name) { + var cont = document.getElementById(name); + if (tabContainer == null) { + agent.sl_onJsError("NULL container"); + return; + } + return cont.getElementsByName(".widget").length; + } addEventListeners(); + var externalToolsWidget = null; + var outputWidget; + var parametersWidget; + var problemWidget = null; + var statisticsWidget; + var statusWidget; </script> -</head> -<body> - -<div id="wrapper"> - <div class="tabbable"> + <div id="wrapper"> + <div class="tabbable"> <div class="dash-menu-line"> - <ul class="nav nav-pills dash-nav"> - <li class="active"><a href="#overview_tab" data-toggle="tab" class="dash-tab-name">Overview</a></li> - <li class=""><a href="#input_tab" data-toggle="tab" class="dash-tab-name">Input</a></li> - <!--<li class=""><a href="#output_tab" data-toggle="tab" class="dash-tab-name">Output</a></li>--> - </ul> + <ul class="nav nav-pills dash-nav"> + <li class="active"> + <a href="#overview_tab" data-toggle="tab" class="dash-tab-name"><span lang="en" class="translatable">Overview</span><span lang="ru" class="translatable">Обзор</span></a> + </li> + <li class=""> + <a href="#input_tab" data-toggle="tab" class="dash-tab-name"><span lang="en" class="translatable">Input</span><span lang="ru" class="translatable">Параметры Ñхемы</span></a> + </li> + <li id="ext_tools_tab_menu" class="" style="display: none;"> + <a href="#ext_tools_tab" data-toggle="tab" class="dash-tab-name"><span lang="en" class="translatable">External Tools</span><span lang="ru" class="translatable">Внешние инÑтрументы</span></a> + </li> + </ul> </div> <div class="dash-outer-tab-content"> - <div class="tab-content dash-tab-content"> - <div class="tab-pane active" id="overview_tab"> - <div class="left-container"></div> - <div class="right-container"></div> - </div> - <div class="tab-pane" id="input_tab"> + <div class="tab-content dash-tab-content"> + <div class="tab-pane active" id="overview_tab"> + <div class="left-container"></div> + <div class="right-container"></div> + </div> + <div class="tab-pane" id="input_tab"> + <div class="widget"> + <div class="title"> + <div class="title-content"><span lang="en" class="translatable">Parameters</span><span lang="ru" class="translatable">Параметры</span></div> </div> - <div class="tab-pane" id="ext_tools_tab"> + <div class="widget-content" id="parametersWidget"></div> + </div> + + </div> + <div class="tab-pane" id="ext_tools_tab"> + <div class="widget"> + <div class="title"> + <div class="title-content"><span lang="en" class="translatable">External Tools</span><span lang="ru" class="translatable">Внешние инÑтрументы</span></div> </div> - <!--<div class="tab-pane" id="output_tab"> - <div class="left-container"></div> - <div class="right-container"></div> - </div>--> + <div class="widget-content" id="externalToolsWidget"></div> + </div> </div> + </div> </div> + </div> + </div> </div> -</div> + <!--For debug purposes--> + <div id="log_messages" style="position: fixed; top: 10%; left: 2%;"></div> + </body> -</body> </html> diff --git a/src/corelibs/U2Designer/html/EstimationReport.html b/src/corelibs/U2Designer/html/EstimationReport.html deleted file mode 100644 index 4792e3990bdd0f47d3d87c3acbdad8e5d83e260c..0000000000000000000000000000000000000000 --- a/src/corelibs/U2Designer/html/EstimationReport.html +++ /dev/null @@ -1,96 +0,0 @@ -<!-- - UGENE - Integrated Bioinformatics Tools. - Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> - http://ugene.net - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - MA 02110-1301, USA. ---> -<!DOCTYPE html> -<html> -<head> - <meta charset="utf-8"> - <title>Estimation report</title> - <link rel="stylesheet" type="text/css" href="qrc:javascript/bootstrap/css/bootstrap.css"/> - <link rel="stylesheet" type="text/css" href="qrc:U2Designer/html/EstimationReport.css"/> - <script type="text/javascript" src="qrc:javascript/jquery/jquery.js"></script> - <script type="text/javascript" src="qrc:javascript/bootstrap/js/bootstrap.js"></script> - <script type="text/javascript" language="javascript"> - String.prototype.toHMS = function () { - var secNum = parseInt(this, 10); - var hours = Math.floor(secNum / 3600); - var minutes = Math.floor((secNum - (hours * 3600)) / 60); - var minutesUp = Math.floor((secNum + 59 - (hours * 3600)) / 60); - - var time; - if (minutes > 0 || hours > 0) { - time = minutesUp + 'm'; - } else { - time = "< 1m"; - } - if (hours > 0) { - time = hours + 'h ' + time; - } - return time; - } - function applyTranslations() { - document.getElementById("header").innerHTML = "Workflow estimation"; - } - function checkValue(value, elId) { - var num = parseInt(value, 10); - if (num < 0) { - var el = document.getElementById(elId); - el.parentNode.removeChild(el); - return false; - } - return true; - } - function idHtml(id) { - return document.getElementById(id).innerHTML; - } - function setTime(timeSec) { - if (checkValue(timeSec, "timeP")) { - document.getElementById("time").innerHTML = timeSec.toHMS(); - } - } - function setRAM(ramMb) { - if (checkValue(ramMb, "ramP")) { - document.getElementById("ram").innerHTML = ramMb + 'Mb'; - } - } - function setHDD(hddMb) { - if (checkValue(hddMb, "hddP")) { - document.getElementById("hdd").innerHTML = hddMb + 'Mb'; - } - } - function setCPU(value) { - if (checkValue(value, "cpuP")) { - document.getElementById("cpu").innerHTML = value; - } - } - </script> -</head> -<body onload="applyTranslations()"> - - <center><h1 id="header">Workflow estimation</h1></center> - <div class="well well-large report-area"> - <p id="timeP"><span class="blue-text">Required time:</span> <span id="time"></span></p> - <p id="ramP"><span class="blue-text">RAM peak:</span> <span id="ram"></span></p> - <!--p id="hddP"><span class="blue-text">HDD:</span> <span id="hdd">1.7 Gb</span></p> - <p id="cpuP"><span class="blue-text">CPU:</span> <span id="cpu">1</span></p--> - </div> - -</body> -</html> diff --git a/src/corelibs/U2Designer/javascript/Common.js b/src/corelibs/U2Designer/javascript/Common.js index 884954bebd43ac7bc62ceb5a40d1e6ff80dadf09..c021cc815e7ac1f69994f56525674120a4904619 100644 --- a/src/corelibs/U2Designer/javascript/Common.js +++ b/src/corelibs/U2Designer/javascript/Common.js @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -18,18 +18,28 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ - + +var needCreateWidgets = false; + function wrapLongText(text) { return '<div class="long-text" title="' + text + '">' + text + '</div>'; } +function wrapLongText25Symbols(text) { // a workaround for a dropdown submenu + if (text.length > 28) { + return text.substr(0, 25) + '…'; + } else { + return text; + } +} + /** * Hides the hint of the load scheme button and * specifies not to show it anymore. */ function hideLoadBtnHint() { var hint = document.getElementById("load-btn-hint-container"); - if (null != hint) { + if (null !== hint) { hint.parentNode.removeChild(hint); } } @@ -43,54 +53,260 @@ function showLoadButton(showHint) { var btnDef = "<button class='btn load-btn' onclick='agent.loadSchema()' title='Load dashboard workflow'><div /></button>"; menuLine.insertAdjacentHTML('beforeend', btnDef); - if (showHint == true) { + if (showHint === true) { var hintDef = - "<div id='load-btn-hint-container'>" + - "<div id='load-btn-hint' class='popover fade bottom in' style='display: block'>" + + "<div id='load-btn-hint-container'>" + + "<div id='load-btn-hint' class='popover fade bottom in' style='display: block'>" + "<div class='arrow' style='left: 91%'></div>" + "<div class='popover-content'>" + - "You can always open the original workflow for your results by clicking on this button." + - "<div style='text-align: center;'>" + - "<button class='btn' onclick='agent.hideLoadButtonHint()' style='margin-bottom: 4px; margin-top: 6px;'>OK, got it!</button>" + - "</div>" + + "<span lang=\"en\" class=\"translatable\">You can always open the original workflow for your results by clicking on this button.</span>" + + "<span lang=\"ru\" class=\"translatable\">Ð’Ñ‹ вÑегда можете открыть иÑходную вычиÑлительную Ñхему Ð´Ð»Ñ Ð²Ð°ÑˆÐ¸Ñ… результатов, нажав на Ñту кнопку.</span>" + + "<div style='text-align: center;'>" + + "<button class='btn' onclick='agent.hideLoadButtonHint()' style='margin-bottom: 4px; margin-top: 6px;'><span lang=\"en\" class=\"translatable\">OK, got it!</span><span lang=\"ru\" class=\"translatable\">Хорошо!</span></button>" + + "</div>" + + "</div>" + "</div>" + - "</div>" + - "</div>"; + "</div>"; menuLine.insertAdjacentHTML('beforeend', hintDef); } } -function showFileButton(url, disabled) { - if (disabled == true) { +function showFileButton(url, disabled, notOpenedByUgene) { + if (disabled === true) { disabled = 'disabled'; } else { disabled = ''; } - if (url.length == 0) + if (url.length === 0) return ""; var fileName = url.slice(url.lastIndexOf('/') + 1, url.length); var path = url.slice(0, url.lastIndexOf('/') + 1); - var button = - '<div class="file-button-ctn">' + - '<div class="btn-group full-width file-btn-group">' + + var button; + if (notOpenedByUgene) { + button = + '<div class="file-button-ctn">' + + '<div class="btn-group full-width file-btn-group">' + + '<button class="btn full-width long-text" onclick="agent.openByOS(\'' + path + fileName + '\')"' + + disabled + '>' + fileName + + '</button>' + + '<button class="btn dropdown-toggle" data-toggle="dropdown">' + + '<span class="caret"></span>' + + '</button>' + + '<ul class="dropdown-menu full-width">' + + '<li><a style="white-space: normal;" onclick="agent.openByOS(\'' + path + '\')"><span lang=\"en\" class=\"translatable\">Open containing folder</span><span lang=\"ru\" class=\"translatable\">Открыть директорию, Ñодержащую файл</span></a></li>' + + '</ul>' + + '</div>' + + '</div>'; + } else { + button = + '<div class="file-button-ctn">' + + '<div class="btn-group full-width file-btn-group">' + '<button class="btn full-width long-text" onclick="agent.openUrl(\'' + url + '\')"' + - disabled + '>' + fileName + + disabled + '>' + fileName + + '</button>' + + '<button class="btn dropdown-toggle" data-toggle="dropdown">' + + '<span class="caret"></span>' + '</button>' + - '<button class="btn dropdown-toggle" data-toggle="dropdown">' + - '<span class="caret"></span>' + - '</button>' + '<ul class="dropdown-menu full-width">' + - '<li><a href="#" onclick="agent.openByOS(\'' + path + '\')">Open containing folder</a></li>' + - '<li><a href="#" onclick="agent.openByOS(\'' + path + fileName + '\')">Open by operating system</a></li>' + - '</ul>' + - '</div>' + - '</div>'; + '<li><a style="white-space: normal;" onclick="agent.openByOS(\'' + path + '\')"><span lang=\"en\" class=\"translatable\">Open containing folder</span><span lang=\"ru\" class=\"translatable\">Открыть директорию, Ñодержащую файл</span></a></li>' + + '<li><a style="white-space: normal;" onclick="agent.openByOS(\'' + path + fileName + '\')"><span lang=\"en\" class=\"translatable\">Open by operating system</span><span lang=\"ru\" class=\"translatable\">Открыть при помощи операционной ÑиÑтемы</span></a></li>' + + '</ul>' + + '</div>' + + '</div>'; + } return button; } +function showFileMenu(url) { + if (url.length === 0) + return ""; + var fileName = url.slice(url.lastIndexOf('/') + 1, url.length); + var path = url.slice(0, url.lastIndexOf('/') + 1); + var li = + '<li class="file-sub-menu dropdown-submenu left-align">' + + '<a tabindex="-1" href="#" onclick="agent.openUrl(\'' + url + '\')" title="' + url + '">' + wrapLongText25Symbols(fileName) + '</a>' + + '<ul class="dropdown-menu ">' + + '<li><a href="#" onclick="agent.openByOS(\'' + path + '\')"><span lang=\"en\" class=\"translatable\">Open containing folder</span><span lang=\"ru\" class=\"translatable\">Открыть директорию, Ñодержащую файл</span></a></li>' + + '<li><a href="#" onclick="agent.openByOS(\'' + path + fileName + '\')"><span lang=\"en\" class=\"translatable\">Open by operating system</span><span lang=\"ru\" class=\"translatable\">Открыть при помощи операционной ÑиÑтемы</span></a></li>' + + '</ul></li>'; + return li; +} + function addTab(tabId, tabName) { var tabsList = document.getElementsByClassName("nav nav-pills dash-nav")[0]; var newTab = "<li class=''><a href='" + tabId + "' data-toggle='tab' class='dash-tab-name'>" + tabName + "</a></li>"; tabsList.insertAdjacentHTML('beforeend', newTab); } + +function addWidget(title, dashTab, cntNum, id) { + var tabContainer = document.getElementById(dashTab); + if (tabContainer === null) { + agent.sl_onJsError("Can't find the tab container!"); + return; + } + var hasInnerContainers = true; + var InputDashTab = "input_tab"; + var ExternalToolsTab = "ext_tools_tab"; + if (InputDashTab == dashTab || ExternalToolsTab == dashTab) { + hasInnerContainers = false; + } + var mainContainer = tabContainer; + if (hasInnerContainers) { + var left = true; + if (0 === cntNum) { + left = true; + } else if (1 == cntNum) { + left = false; + } else if (containerSize(tabContainer, ".left-container") <= containerSize(tabContainer, ".right-container")) { + left = true; + } else { + left = false; + } + + var elements = tabContainer.getElementsByClassName(left ? "left-container" : "right-container"); + if (elements[0] === null) { + agent.sl_onJsError("Can't find a container inside a tab!"); + return; + } + mainContainer = elements[0]; + mainContainer.innerHTML = mainContainer.innerHTML +"<div class=\"widget\">" + + "<div class=\"title\"><div class=\"title-content\">" + title + "</div></div>" + + "<div class=\"widget-content\" id=\"" + id + "\"></div>" + + "</div>"; + } +} + +function showOnlyLang(lang) { + var elements = document.getElementsByClassName("translatable"); + for (var i = 0; i<elements.length; i++) { + var attr = elements[i].getAttribute("lang"); + if (attr !== lang) { + elements[i].style.display = "none"; + } else { + elements[i].style.display = ""; + } + } +} + +function loadScript(url, callback) { + // Adding the script tag to the head as suggested before + var head = document.getElementsByTagName('head')[0]; + var script = document.createElement('script'); + script.type = 'text/javascript'; + script.src = url; + + // Then bind the event to the callback function. + // There are several events for cross browser compatibility. + script.onreadystatechange = callback; + script.onload = callback; + + // Fire the loading + head.appendChild(script); +} + +function createWidgets() { + parametersWidget = new ParametersWidget("parametersWidget"); + outputWidget = new OutputFilesWidget("outputWidget"); + statusWidget = new StatusWidget("statusWidget"); + statisticsWidget = new StatisticsWidget("statisticsWidget"); + startTimer(); +} + +function connect() { + try { + agent.si_progressChanged.connect(function(progress) { + statusWidget.sl_progressChanged(progress); + }); + + window.agent.si_taskStateChanged.connect(function(state) { + statusWidget.sl_taskStateChanged(state); + }); + + window.agent.si_newProblem.connect(function(problem) { + problem = JSON.parse(problem); + if (document.getElementById("problemsWidget") === null) { + problemWidget = new ProblemsWidget("problemsWidget"); + } + problemWidget.sl_newProblem(problem, problem.count); + }); + + window.agent.si_workerStatsInfoChanged.connect(function(info) { + info = JSON.parse(info); + statisticsWidget.sl_workerStatsInfoChanged(info); + }); + + window.agent.si_workerStatsUpdate.connect(function(workersStatisticsInfo) { + workersStatisticsInfo = JSON.parse(workersStatisticsInfo); + statisticsWidget.sl_workerStatsUpdate(workersStatisticsInfo); + }); + + window.agent.si_newOutputFile.connect(function(fileInfo) { + fileInfo = JSON.parse(fileInfo); + window.outputWidget.sl_newOutputFile(fileInfo); + }); + + window.agent.si_onLogChanged.connect(function(logEntry) { + logEntry = JSON.parse(logEntry); + if (externalToolsWidget === null) { + externalToolsWidget = new ExternalToolsWidget("externalToolsWidget"); + } + externalToolsWidget.sl_onLogChanged(logEntry); + }); + } catch (e) { + agent.sl_onJsError(e); + } +} + +function initializeWebkitPage() { + if (needCreateWidgets) { + createWidgets(); + connect(); + } + + showOnlyLang(agent.lang); + agent.sl_pageInitialized(); +} + +var createAgent = function(channel) { + window.agent = channel.objects.agent; + if (needCreateWidgets) { + createWidgets(); + connect(); + } + + showOnlyLang(agent.lang); + //document.getElementById("log_messages").innerHTML += "Agent created! <br/>"; // sample of debug message + agent.sl_pageInitialized(); +} + +function installWebChannel(onSockets, port) { + if (onSockets) { + var baseUrl = "ws://127.0.0.1:" + port; + var socket = new WebSocket(baseUrl); + + socket.onclose = function() { + console.error("web channel closed"); + }; + + socket.onerror = function(error) { + console.error("web channel error: " + error); + }; + + socket.onopen = function() { + loadScript("qrc:///qtwebchannel/qwebchannel.js", + function() { + new QWebChannel(socket, createAgent); + }); + } + } else { + loadScript("qrc:///qtwebchannel/qwebchannel.js", + function() { + new QWebChannel(qt.webChannelTransport, createAgent); + }); + } +} + +function setNeedCreateWidgets(_needCreateWidgets) { + needCreateWidgets = _needCreateWidgets; +} diff --git a/src/corelibs/U2Designer/javascript/ContextMenu.js b/src/corelibs/U2Designer/javascript/ContextMenu.js index 89c12fd7ed6de6ef416095e755e76293043361bb..fb68e7059e81b137a9f25b69a5a9054ac3cb2c4b 100644 --- a/src/corelibs/U2Designer/javascript/ContextMenu.js +++ b/src/corelibs/U2Designer/javascript/ContextMenu.js @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -18,26 +18,25 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ - + //'Copy' menu definition function initializeCopyMenu() { var items = [{ - isDivider: false, - tag: "a", - id: "copy_selected_action", - innerText: "Copy selected text", - command: "copySelected(event, this)", - active: true - }, { - isDivider: false, - tag: "a", - id: "copy_all_action", - innerText: "Copy element content", - command: "copyElementContent(event, this)", - active: true - }]; + isDivider: false, + tag: "a", + id: "copy_selected_action", + innerText: "Copy selected text", + command: "copySelected(event, this)", + active: true + }, { + isDivider: false, + tag: "a", + id: "copy_all_action", + innerText: "Copy element content", + command: "copyElementContent(event, this)", + active: true + }]; initializeMenu("ext_menu", items); - } function addEventListeners() { @@ -45,10 +44,8 @@ function addEventListeners() { } function copySelected(e, element) { - var menuObj = document.getElementById(element.getAttribute("menuId")); - agent.setClipboardText(document.getSelection()); + agent.setClipboardText(document.getSelection() + ""); e.stopPropagation(); - menuObj.hide(); } function copyElementContent(e, element) { @@ -56,15 +53,13 @@ function copyElementContent(e, element) { var targetObj = document.getElementById(menuObj.getAttribute("target")); agent.setClipboardText(targetObj.innerText); e.stopPropagation(); - menuObj.hide(); } function contextmenu(e, element) { //Check that right button is pressed - if(e.which == 3 || e.button == 2) { + if (e.which === 3 || e.button === 2) { return onContextMenuTriggered(e, "ext_menu", element.id); - } - else { + } else { return true; } } @@ -73,12 +68,12 @@ function contextmenu(e, element) { function initializeMenu(menuId, menuItems) { var container = document.body; var menu = createContextMenu(menuId, menuItems); - $("#"+menuId).hide(); + $("#"+menuId).hide(); } function onContextMenuTriggered(e, menuId, element) { var menu = document.getElementById(menuId); - if(menu === null) { + if (menu === null) { return false; } $("#" + menuId).show(); @@ -86,11 +81,10 @@ function onContextMenuTriggered(e, menuId, element) { menu.setAttribute("target", element); var copySelAction = document.getElementById("li_copy_selected_action"); - if(copySelAction !== null) { - if(document.getSelection() && document.getSelection() != "") { - copySelAction.className = ""; - } - else { + if (copySelAction !== null) { + if (document.getSelection() && document.getSelection() != "") { + copySelAction.className = ""; + } else { copySelAction.className = "disabled"; } } @@ -102,15 +96,15 @@ function createContextMenu(menuId, menuElements) { var newMenu = document.createElement("ul"); newMenu.className = "dropdown-menu context"; newMenu.id = menuId; - document.body.appendChild(newMenu); + document.body.appendChild(newMenu); - for(var i = 0; i < menuElements.length; i++) { + for (var i = 0; i < menuElements.length; i++) { var currentElement = menuElements[i]; var listElement = document.createElement("li"); listElement.id = "li_" + currentElement.id; newMenu.appendChild(listElement); - if(currentElement.isDivider) { - listElement.className = "divider"; + if (currentElement.isDivider) { + listElement.className = "divider"; continue; } @@ -131,15 +125,13 @@ function setCoordsForMenu(menuObj, event) { if ((event.pageX + menuObj.offsetWidth) > winWidth) { menuObj.style.left = (event.pageX - menuObj.offsetWidth.toString()) + 'px'; - } - else { + } else { menuObj.style.left = event.pageX.toString() + 'px'; } if ((event.pageY + menuObj.offsetHeight) > winHeight) { menuObj.style.top = (event.pageY - menuObj.offsetHeight).toString() + 'px'; - } - else { + } else { menuObj.style.top = event.pageY.toString() + 'px'; } } diff --git a/src/corelibs/U2Designer/javascript/ExternalToolsWidget.js b/src/corelibs/U2Designer/javascript/ExternalToolsWidget.js index 435c8d3940b38a831d4683bc89e9976732227cde..16c63868ffdf4a105d3c46e1a6ccb42be4624711 100644 --- a/src/corelibs/U2Designer/javascript/ExternalToolsWidget.js +++ b/src/corelibs/U2Designer/javascript/ExternalToolsWidget.js @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,140 +19,425 @@ * MA 02110-1301, USA. */ - /** Creates the ParametersWidget layout and the first active tab (without parameters). */ +/** Creates the ParametersWidget layout and the first active tab (without parameters). */ -function lwInitConteiner(container, activeTabId) { - var mainHtml = - '<div class="tree" id="treeRoot">' + - '<ul>' + - '</ul>' + - '</div>'; +/** +The tree will look like this: - container.innerHTML = mainHtml; - initializeCopyMenu(); -} +root node (invisible) +|- Actor_1 node (actorNode) +| |- Actor_1 run node (actorTickNode) +| | |- Tool run node (toolRunNode) +| | |- Command +| | |- Stdout +| | |- Stderr +| |- Actor_1 run node (actorTickNode) +| |- Tool run node (toolRunNode) +| |- Command +| |- Stdout +| |- Stderr +|- Actor_2 node (actorNode) + |- Actor_2 run node (actorTickNode) + | |- Tool run node (toolRunNode) + | |- Command + | |- Stdout + | |- Stderr + |- Actor_2 run node (actorTickNode) + |- Tool run node (toolRunNode) + |- Command + |- Stdout + |- Stderr -function addChildrenElement(parentObject, elemTag, elemHTML) { - var newElem = document.createElement(elemTag); - newElem.innerHTML = elemHTML; - parentObject.appendChild(newElem); - return newElem; -} -function addChildrenNode(parentNode, nodeContent, spanId, nodeClass) { +There could be several actor nodes. +Each 'actor' node can have several 'actor tick' nodes - it depends on how many external tools based tasks the element has created. +Each 'actor tick' node can have several 'tool run' node - it depends on how many external tools were launched with listeners. +Each 'tool run' node have one 'command' node and two 'output' nodes, which are shown if there are any messages in the appropriate output. - var newListElem = addChildrenElement(parentNode, 'LI', ''); - newListElem.className = 'parent_li'; - var span = addChildrenElement(newListElem, 'span', nodeContent); - span.setAttribute('title', 'Collapse this branch'); +Count of nodes is limited: + MAXIMUM_TOOL_RUN_NODES_PER_ACTOR 'tool run' nodes per one actor; + MAXIMUM_TOOL_RUN_NODES_TOTAL 'tool run' nodes per one workflow launch; + MAXIMUM_ACTOR_TICK_NODES 'actor tick' nodes per one workflow launch; + MAXIMUM_ACTOR_NODES 'actor' nodes per one workflow launch. +A node with message will appear in case of limit exeeded. - span.setAttribute('onclick', 'collapseNode(this)'); - span.setAttribute('onmouseover', 'highlightElement(this, event, true)'); - span.setAttribute('onmouseout', 'highlightElement(this, event, false)'); - span.setAttribute('onmouseup', 'return contextmenu(event, this);'); +Size of each 'output' node is limited with MAXIMUM_TOOL_RUN_CONTENT_SIZE. A message will appear at the end of the 'output' node in case of limit exeeded. +*/ - span.id = spanId; - span.className = nodeClass; - var newList = addChildrenElement(newListElem, 'UL', ''); +function ExternalToolsWidget(containerId) { + document.getElementById("ext_tools_tab_menu").style.display = ""; // set visible menu + DashboardWidget.apply(this, arguments); //inheritance + var LINE_BREAK = "break_line"; + var BACK_SLASH = "s_quote"; + var SINGLE_QUOTE = "b_slash"; - return newList; -} + var TREE_ROOT_DIV_ID = 'treeRootDiv'; + var TREE_ROOT_ID = 'treeRoot'; -function collapseNode(element) { - var children = $(element).parent('li.parent_li').find(' > ul > li'); - if (children.is(":visible") == $(element).is(":visible")) { - children.hide(0); - $(element).attr('title', 'Expand this branch'); - } else { - children.show(0); - $(element).attr('title', 'Collapse this branch'); - } -}; - -function lwAddTreeNode(nodeName, activeTabName, activeTabId, content, nodeNum, contentType) { - var actorTab = document.getElementById(activeTabName); - if(actorTab === null) { - var root = document.getElementById("treeRoot"); - var rootList = root.getElementsByTagName('ul')[0]; - actorTab = addChildrenNode(rootList, activeTabName, activeTabName + '_span', 'badge tool-node'); - actorTab.id = activeTabName; - var activeTabSpan = document.getElementById(activeTabName + '_span'); - } - - var launchNodeId = activeTabName + nodeName + "_l"; - var launchNode = document.getElementById(launchNodeId); - var idBase = activeTabId + nodeName + "_" + nodeNum; - var isLaunchNodeCreated = false; - if(null === launchNode) { - isLaunchNodeCreated = true; - var activeTabSpan = document.getElementById(activeTabName + '_span'); - launchNode = addChildrenNode(actorTab, nodeName, launchNodeId + '_span', 'badge badge-success'); - launchNode.id = launchNodeId; - var launchSpan = document.getElementById(launchNodeId + '_span'); - - var copyRunInfoButton = document.createElement('button'); - copyRunInfoButton.className = "copyRunInfo"; - copyRunInfoButton.setAttribute("title", "Copy external tool run string"); - copyRunInfoButton.setAttribute("onclick", "copyRunInfo(event, \'" + idBase + "\'); return false;"); - - copyRunInfoButton.setAttribute('onmousedown', 'return onButtonPressed(this, event);'); - copyRunInfoButton.setAttribute('onmouseup', 'return onButtonReleased(this, event);'); - - copyRunInfoButton.setAttribute('onmouseover', 'highlightElement(this, event, true)'); - copyRunInfoButton.setAttribute('onmouseout', 'highlightElement(this, event, false)'); - - launchSpan.appendChild(copyRunInfoButton); - if(activeTabSpan.getAttribute('title') === 'Expand this branch') { - collapseNode(activeTabSpan); - } - } - if(content) { - content = content.replace(/break_line/g, '<br>'); - content = content.replace(/(<br>){3,}/g, '<br><br>'); - content = content.replace(/s_quote/g, '\''); - content = content.replace(/b_slash/g, '\\'); + var LIMIT_EXEEDED_ATTRIBUTE = 'limitExeeded'; + var TEXT_UPDATED_ATTRIBUTE = 'textUpdated'; + + var MAXIMUM_TOOL_RUN_CONTENT_SIZE = 100000; + var MAXIMUM_TOOL_RUN_NODES_PER_ACTOR = 3; + var MAXIMUM_TOOL_RUN_NODES_TOTAL = 100; + var MAXIMUM_ACTOR_TICK_NODES = 1000; + var MAXIMUM_ACTOR_NODES = 1000; + + // see enum initialization in ExternalToolRunTask.h + var ERROR_LOG = 0; + var OUTPUT_LOG = 1; + var PROGRAM_WITH_ARGUMENTS = 2; + + //private + var self = this; + + //public + this.sl_onLogChanged = function(entry) { + addInfoToWidget(entry); + }; + + this.sl_onLogUpdate = function(extToolsLog) { + if (lastEntryIndex === extToolsLog.length - 1) + return; + var logEntries = extToolsLog; + for (var i = lastEntryIndex + 1; i < logEntries.length; i++) { + var entry = logEntries[i]; + addInfoToWidget(entry); + } + lastEntryIndex = extToolsLog.length - 1; + }; + + function lwInitContainer(container) { + var mainHtml = + '<div class="tree" id="' + TREE_ROOT_DIV_ID + '">' + + '<ul id="' + TREE_ROOT_ID + '">' + + '</ul>' + + '</div>'; + + container.innerHTML = mainHtml; + initializeCopyMenu(); } - else { - return; - } - - var infoNode = document.getElementById(launchNodeId + '_info_' + nodeNum); - var launchSpan = document.getElementById(launchNodeId + '_span'); - switch(contentType) { - case "error": - addContent(launchNode, 'Error log', idBase + '_er', 'badge badge-important', content); - launchSpan.className = 'badge badge-important'; - break; - case "output": - addContent(launchNode, 'Output log', idBase + '_out', 'badge badge-info', content); - break; - case "program": - if (null === infoNode) { - infoNode = addInfoNode(launchNode, nodeNum); - if (nodeNum > 1) { - var outNode = document.getElementById(activeTabId + nodeName + '_0_out_label'); - if (outNode !== null) { - infoNode.parentNode.parentNode.insertBefore(infoNode.parentNode, outNode.parentNode); - } - } + + //constructor + lwInitContainer(self._container); + showOnlyLang(agent.lang); //translate labels + + //private + var lastEntryIndex = 0; + + function getActorNodeId(entry) { + return "log_tab_id_" + entry.actorId; + } + + function getActorTickNodeId(entry) { + return "actor_" + entry.actorId + "_run_" + entry.actorRunNumber; + } + + function getToolRunNodeId(entry) { + return getActorTickNodeId(entry) + "_tool_" + entry.toolName + "_run_" + entry.toolRunNumber; + } + + function getToolRunCommandLabelNodeId(entry) { + return getToolRunNodeId(entry) + '_command'; + } + + function getToolRunStdoutLabelNodeId(entry) { + return getToolRunNodeId(entry) + '_stdout'; + } + + function getToolRunStderrLabelNodeId(entry) { + return getToolRunNodeId(entry) + '_stderr'; + } + + function getToolRunContentLabelNodeId(entry) { + switch (entry.contentType) { + case ERROR_LOG: + return getToolRunStderrLabelNodeId(entry); + case OUTPUT_LOG: + return getToolRunStdoutLabelNodeId(entry); + case PROGRAM_WITH_ARGUMENTS: + return getToolRunCommandLabelNodeId(entry); + } + } + + function getToolRunContentLabelNodeText(contentType) { + switch (contentType) { + case ERROR_LOG: + return 'Output log (stderr)'; + case OUTPUT_LOG: + return 'Output log (stdout)'; + case PROGRAM_WITH_ARGUMENTS: + return 'Command'; + } + } + + function getToolRunContentLabelNodeClass(contentType) { + switch (contentType) { + case ERROR_LOG: + return 'badge badge-important'; + case OUTPUT_LOG: + return 'badge badge-info'; + case PROGRAM_WITH_ARGUMENTS: + return 'badge command'; + } + } + + function getAppropriateSpanId(nodeId) { + return nodeId + '_span'; + } + + function addInfoToWidget(entry) { + var content = entry.lastLine; + content = content.replace(new RegExp("\n", 'g'), "break_line"); + content = content.replace(new RegExp("\r", 'g'), ""); + content = content.replace("'", "s_quote"); + lwAddTreeNode(entry, content); + } + + function addChildrenElement(parentObject, elemTag, elemHTML) { + var newElem = document.createElement(elemTag); + newElem.innerHTML = elemHTML; + parentObject.appendChild(newElem); + return newElem; + } + + function addLimitationMessageNode(parentNode) { + var newListElem = addChildrenElement(parentNode, 'LI', ''); + newListElem.className = 'parent_li'; + + var logsFolderUrl = agent.getLogsFolderUrl(); + var linkClass = 'log-folder-link'; + var messageNodeText = 'Messages limit on the dashboard exceeded. See <a onclick=\"openLog(\'' + logsFolderUrl + '\')\" class=\'' + linkClass + '\'>log files</a>, if required.'; + var messageNode = addChildrenElement(newListElem, 'span', messageNodeText); + messageNode.className = 'badge limitation-message'; + } + + function addNoncollapsibleChildrenNode(parentNode, nodeContent, nodeId, nodeClass) { + var newListElem = addChildrenElement(parentNode, 'LI', ''); + newListElem.className = 'parent_li'; + var span = addChildrenElement(newListElem, 'span', nodeContent); + + span.setAttribute('onmouseover', 'highlightElement(this, event, true)'); + span.setAttribute('onmouseout', 'highlightElement(this, event, false)'); + span.setAttribute('onmouseup', 'return contextmenu(event, this);'); + + span.id = getAppropriateSpanId(nodeId); + span.className = nodeClass; + var newList = addChildrenElement(newListElem, 'UL', ''); + newList.id = nodeId; + + return newList; + } + + function addChildrenNode(parentNode, nodeContent, nodeId, nodeClass) { + var newList = addNoncollapsibleChildrenNode(parentNode, nodeContent, nodeId, nodeClass); + + var span = document.getElementById(getAppropriateSpanId(nodeId)); + span.setAttribute('title', 'Collapse this branch'); + span.setAttribute('onclick', 'collapseNode(this)'); + + return newList; + } + + function getActorNode(entry) { + var actorNodeId = getActorNodeId(entry); + var actorNode = document.getElementById(actorNodeId); + + if (actorNode === null) { + var rootList = document.getElementById(TREE_ROOT_ID); + + if (rootList.hasAttribute(LIMIT_EXEEDED_ATTRIBUTE)) { + return; + } + + if (rootList.childElementCount >= MAXIMUM_ACTOR_TICK_NODES) { + addLimitationMessageNode(rootList); + rootList.setAttribute(LIMIT_EXEEDED_ATTRIBUTE, ''); + return; + } + + actorNode = addChildrenNode(rootList, entry.actorName, actorNodeId, 'badge actor-node'); + } + + return actorNode; + } + + function getActorTickNode(entry) { + var actorNode = getActorNode(entry); + + var actorTickNodeId = getActorTickNodeId(entry); + var actorTickNode = document.getElementById(actorTickNodeId); + + if (actorTickNode === null) { + if (actorNode.hasAttribute(LIMIT_EXEEDED_ATTRIBUTE)) { + return; + } + + var rootList = document.getElementById(TREE_ROOT_ID); + if (rootList.hasAttribute(LIMIT_EXEEDED_ATTRIBUTE)) { + return; + } + + if (actorNode.childElementCount >= MAXIMUM_ACTOR_TICK_NODES) { + addLimitationMessageNode(actorNode); + actorNode.setAttribute(LIMIT_EXEEDED_ATTRIBUTE, ''); + return; } - addContent(infoNode, 'Executable file', idBase + '_program', 'badge program-path', content); - break; - case "arguments": - if(null === infoNode) { - infoNode = addInfoNode(launchNode, nodeNum); - var outNode = document.getElementById(activeTabId + nodeName + '_0_out_label'); - if (outNode !== null) { - infoNode.parentNode.parentNode.insertBefore(infoNode.parentNode, outNode.parentNode); + + var actorTickNodeText = entry.actorName + ' run ' + entry.actorRunNumber; + actorTickNode = addChildrenNode(actorNode, actorTickNodeText, actorTickNodeId, 'badge actor-tick-node'); + } + + return actorTickNode; + } + + function updateFirstToolRunNode(entry) { + var toolRunNumber = entry.toolRunNumber; + entry.toolRunNumber = 1; + var toolRunNodeId = getToolRunNodeId(entry); + var toolRunNode = document.getElementById(toolRunNodeId); + + if (!toolRunNode.hasAttribute(TEXT_UPDATED_ATTRIBUTE)) { + var toolRunNodeText = entry.toolName + ' run ' + entry.toolRunNumber; + var toolRunSpan = document.getElementById(getAppropriateSpanId(toolRunNodeId)); + agent.setClipboardText(toolRunSpan.innerHTML); + var originalText = entry.toolName + ' run '; + toolRunSpan.innerHTML = toolRunSpan.innerHTML.replace(originalText, originalText + entry.toolRunNumber + ' '); + toolRunNode.setAttribute(TEXT_UPDATED_ATTRIBUTE, ''); + } + + entry.toolRunNumber = toolRunNumber; + } + + function getTotalToolRunNodesConut() { + return document.querySelectorAll('.tool-run-node').length; + } + + function getToolRunNode(entry) { + var actorTickNode = getActorTickNode(entry); + + var toolRunNodeId = getToolRunNodeId(entry); + var toolRunNode = document.getElementById(toolRunNodeId); + + if (toolRunNode === null) { + if (actorTickNode.hasAttribute(LIMIT_EXEEDED_ATTRIBUTE)) { + return; + } + + if (actorTickNode.childElementCount >= MAXIMUM_TOOL_RUN_NODES_PER_ACTOR) { + addLimitationMessageNode(actorTickNode); + actorTickNode.setAttribute(LIMIT_EXEEDED_ATTRIBUTE, ''); + return; + } + + if (getTotalToolRunNodesConut() >= MAXIMUM_TOOL_RUN_NODES_TOTAL) { + var rootList = document.getElementById(TREE_ROOT_ID); + if (rootList.hasAttribute(LIMIT_EXEEDED_ATTRIBUTE)) { + return; } + + addLimitationMessageNode(rootList); + rootList.setAttribute(LIMIT_EXEEDED_ATTRIBUTE, ''); + return; } - addContent(infoNode, 'Arguments', idBase + '_args', 'badge tool-args', content); - break; + + var toolRunNodeText = entry.toolName + ' run '; + if (entry.toolRunNumber > 1) { + updateFirstToolRunNode(entry); + toolRunNodeText += entry.toolRunNumber + ' '; + } + toolRunNode = addChildrenNode(actorTickNode, toolRunNodeText, toolRunNodeId, 'badge badge-success tool-run-node'); + + var toolRunSpan = document.getElementById(getAppropriateSpanId(toolRunNodeId)); + + var copyRunInfoButton = document.createElement('button'); + copyRunInfoButton.className = "copyRunInfo"; + copyRunInfoButton.setAttribute("title", "Copy external tool run string"); + copyRunInfoButton.setAttribute("onclick", "copyRunInfo(event, \'" + toolRunNodeId + "\'); return false;"); + + copyRunInfoButton.setAttribute('onmousedown', 'return onButtonPressed(this, event);'); + copyRunInfoButton.setAttribute('onmouseup', 'return onButtonReleased(this, event);'); + + copyRunInfoButton.setAttribute('onmouseover', 'highlightElement(this, event, true)'); + copyRunInfoButton.setAttribute('onmouseout', 'highlightElement(this, event, false)'); + + toolRunSpan.appendChild(copyRunInfoButton); + + if (!isNodeCollapsed(toolRunSpan)) { + collapseNode(toolRunSpan); + } + } + + return toolRunNode; } - if(isLaunchNodeCreated && launchSpan.getAttribute('title') !== 'Expand this branch'){ - launchSpan = document.getElementById(launchNodeId + '_span'); - collapseNode(launchSpan); + + function getToolRunContentNode(entry) { + var toolRunNode = getToolRunNode(entry); + if (!toolRunNode) { + return; + } + + var toolRunContentLabelNodeId = getToolRunContentLabelNodeId(entry); + var toolRunContentLabelNode = document.getElementById(toolRunContentLabelNodeId); + + var toolRunContentNodeId = toolRunContentLabelNodeId + '_content'; + var toolRunContentNode = null; + + if (toolRunContentLabelNode === null) { + var toolRunContentLabelNodeText = getToolRunContentLabelNodeText(entry.contentType); + var labelNodeClass = getToolRunContentLabelNodeClass(entry.contentType); + toolRunContentLabelNode = addChildrenNode(toolRunNode, toolRunContentLabelNodeText, toolRunContentLabelNodeId, labelNodeClass); + toolRunContentNode = addNoncollapsibleChildrenNode(toolRunContentLabelNode, '', toolRunContentNodeId, 'content'); + } else { + toolRunContentNode = document.getElementById(toolRunContentNodeId); + } + + return toolRunContentNode; + } + + function lwAddTreeNode(entry, content) { + if (content) { + content = content.replace(/break_line/g, '<br>'); + content = content.replace(/(<br>){3,}/g, '<br><br>'); + content = content.replace(/s_quote/g, '\''); + content = content.replace(/b_slash/g, '\\'); + } else { + return; + } + + var toolRunContentNode = getToolRunContentNode(entry); + if (!toolRunContentNode) { + return; + } + + if (!toolRunContentNode.innerHTML) { + content = content.replace(/^(<br>)+/, ""); + } + + if (ERROR_LOG === entry.contentType) { + var toolRunNodeSpan = document.getElementById(getAppropriateSpanId(getToolRunNodeId(entry))); + toolRunNodeSpan.className = 'badge badge-important tool-run-node'; + } + + var toolRunContentNodeSpan = document.getElementById(getAppropriateSpanId(toolRunContentNode.id)); + if (toolRunContentNodeSpan.hasAttribute(LIMIT_EXEEDED_ATTRIBUTE)) { + return; + } + + if (toolRunContentNodeSpan.innerHTML.length >= MAXIMUM_TOOL_RUN_CONTENT_SIZE) { + var logUrl = agent.getLogUrl(entry.actorId, entry.actorRunNumber, entry.toolName, entry.toolRunNumber, entry.contentType); + var linkClass = 'log-file-link'; + content = '<br/><br/>The external tools output is too large and can\'t be visualized on the dashboard. Find full output in <a onclick=\"openLog(\'' + logUrl + '\')\" class=\'' + linkClass + '\'>this file</a>.' + toolRunContentNodeSpan.setAttribute(LIMIT_EXEEDED_ATTRIBUTE, ''); + } + + toolRunContentNodeSpan.innerHTML += content; + } + + function setElementBackground(element, backgroundColor) { + element.style.backgroundColor = backgroundColor; } } + function onButtonPressed(element, event) { if(1 === event.which) { $(element).addClass('pressed'); @@ -160,72 +445,36 @@ function onButtonPressed(element, event) { event.stopPropagation(); return false; } + function onButtonReleased(element, event) { $(element).removeClass('pressed'); event.stopPropagation(); return false; } -function addInfoNode(launchNode, nodeNum) { - if(null === launchNode) { - return null; - } - var launchNodeId = launchNode.id; - var nodeContent = 'Run info ' + nodeNum; - var infoNode = addChildrenNode(launchNode, nodeContent, launchNodeId + '_info_span', 'badge run-info'); - infoNode.id = launchNodeId + '_info_' + nodeNum; - - var launchSpan = document.getElementById(launchNodeId + '_span'); - if(null === launchSpan) { - return infoNode; - } - if(launchSpan.getAttribute('title') === 'Expand this branch') { - collapseNode(launchSpan); - } - return infoNode; +function copyRunInfo(event, toolRunNodeId) { + agent.setClipboardText(document.getElementById(toolRunNodeId + '_command_content_span').innerHTML); + event.stopPropagation(); } -function addContent(parentNode, contentHead, nodeId, contentType, content) { - var node = document.getElementById(nodeId); - - if (node !== null) { - node.innerHTML += content; - } else if(content) { - node = addChildrenNode(parentNode, contentHead, nodeId + '_label', contentType); - content = content.replace(/^(<br>)+/, ""); - addChildrenNode(node, content, nodeId, 'content'); - var parentSpan = document.getElementById(parentNode.id + '_span'); - if(null === parentSpan) { - return; - } - if(parentSpan.getAttribute('title') === 'Expand this branch') { - collapseNode(parentSpan); - } - } +function isNodeCollapsed(node) { + return node.getAttribute('title') === 'Expand this branch'; } -function copyRunInfo(event, idBase) { - var resultString = ""; - - resultString += '\"' + getElementText(idBase + '_program') + "\" "; - resultString += getElementText(idBase + '_args'); - agent.setClipboardText(resultString); - event.stopPropagation(); -} -//Get text of the element without linebreak symbols -function getElementText(elementId) { - var pathNode = document.getElementById(elementId); - var resultString = ""; - if(pathNode !== null) { - resultString = pathNode.innerHTML; - resultString = resultString.replace(/<br>/g, ' '); - } - return resultString; +function collapseNode(element) { + var children = $(element).parent('li.parent_li').find('ul:first'); + if (children.is(":visible") === $(element).is(":visible")) { + children.hide(0); + $(element).attr('title', 'Expand this branch'); + } else { + children.show(0); + $(element).attr('title', 'Collapse this branch'); + } } function highlightElement(element, e, isHighlighted) { if(true === isHighlighted) { - $('li span').removeClass('hoverIntent') + $('li span').removeClass('hoverIntent'); $(element).addClass('hoverIntent'); e.stopPropagation(); } @@ -234,6 +483,6 @@ function highlightElement(element, e, isHighlighted) { } } -function setElementBackground(element, backgroundColor) { - element.style.backgroundColor = backgroundColor; +function openLog(logUrl) { + agent.openByOS(logUrl); } diff --git a/src/corelibs/U2Designer/javascript/ParametersWidget.js b/src/corelibs/U2Designer/javascript/ParametersWidget.js index 96ae276d25c5fba1e53f11690a7861eb11ab740d..dfb9760bf1b9fbecd14fe9be026cc2fcdc653c3d 100644 --- a/src/corelibs/U2Designer/javascript/ParametersWidget.js +++ b/src/corelibs/U2Designer/javascript/ParametersWidget.js @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,100 +19,138 @@ * MA 02110-1301, USA. */ - /** Creates the ParametersWidget layout and the first active tab (without parameters). */ -function pwInitAndActiveTab(container, activeTabName, activeTabId) { - var mainHtml = - '<div class="tabbable tabs-left">' + - '<ul class="nav nav-tabs params-nav-tabs">' + +function ParametersWidget(containerId) { + DashboardWidget.apply(this, arguments); //inheritance + + //private + var self = this; + + //public + this.createWidget = function(workersParamsInfo) { + var i = 0; + workersParamsInfo.forEach(function(info) { + //create tab + var tabId = "params_tab_id_" + i; + if (i === 0) { + pwInitAndActiveTab(self._container, info.workerName, tabId); + } else { + pwAddTab(self._container, info.workerName, tabId); + } + //create parameters table + info.parameters.forEach(function(parameter) { + if (parameter.isDataset) { + pwAddFilesParameter(tabId, parameter.name, parameter.value, false); + } else { + if (parameter.isUrl) { + pwAddFilesParameter(tabId, parameter.name, parameter.value, (parameter.type === "Dir")); + } else { + pwAddCommonParameter(tabId, parameter.name, parameter.value); + } + } + }); + i++; + }); + }; + + /** Creates the ParametersWidget layout and the first active tab (without parameters). */ + function pwInitAndActiveTab(container, activeTabName, activeTabId) { + var mainHtml = + '<div class="tabbable tabs-left">' + + '<ul class="nav nav-tabs params-nav-tabs">' + '<li class="active"><a href="#' + activeTabId + '" data-toggle="tab">' + activeTabName + '</a></li>' + - '</ul>' + - '<div class="tab-content params-tab-content">' + + '</ul>' + + '<div class="tab-content params-tab-content">' + '<div class="tab-pane active" id="' + activeTabId + '">' + - '<table class="table table-bordered table-fixed param-value-column">' + - '<col width="45%">' + - '<col width="55%">' + - '<thead>' + - '<tr>' + - '<th><span class="text">Parameter</span></th>' + - '<th><span class="text">Value</span></th>' + - '</tr>' + - '</thead>' + - '<tbody scroll="yes">' + - '</tbody>' + - '</table>' + + '<table class="table table-bordered table-fixed param-value-column">' + + '<col width="45%">' + + '<col width="55%">' + + '<thead>' + + '<tr>' + + '<th><span lang=\"en\" class=\"translatable text\">Parameter</span><span lang=\"ru\" class=\"translatable text\">Параметр</span></th>' + + '<th><span lang=\"en\" class=\"translatable text\">Value</span><span lang=\"ru\" class=\"translatable text\">Значение</span></th>' + + '</tr>' + + '</thead>' + + '<tbody scroll="yes">' + + '</tbody>' + + '</table>' + '</div>' + - '</div>' + - '</div>'; - - container.innerHTML = mainHtml; -} + '</div>' + + '</div>'; -/** Add a parameter with the specified name and value to the specified parameters tab. */ -function pwAddCommonParameter(paramsTabId, paramName, paramValue) { - var paramsTab = document.getElementById(paramsTabId); - var paramsTable = paramsTab.getElementsByTagName('table')[0]; - var rowCount = paramsTable.rows.length; - var row = paramsTable.insertRow(rowCount); - var cell1 = row.insertCell(0); - var cell2 = row.insertCell(1); - cell1.innerHTML = wrapLongText(paramName); - cell2.innerHTML = wrapLongText(paramValue); -} + container.innerHTML = mainHtml; + } -/** - * Add a parameter with the specified name and several values. - * The values should be joined by ';' and - * input to the method as a single string ('paramValue'). - */ -function pwAddFilesParameter(paramsTabId, paramName, paramValue, disableOpeningByUgene) { - var paramsTab = document.getElementById(paramsTabId); - var paramsTable = paramsTab.getElementsByTagName('table')[0]; + /** Add a parameter with the specified name and value to the specified parameters tab. */ + function pwAddCommonParameter(paramsTabId, paramName, paramValue) { + var paramsTab = document.getElementById(paramsTabId); + var paramsTable = paramsTab.getElementsByTagName('table')[0]; + var rowCount = paramsTable.rows.length; + var row = paramsTable.insertRow(rowCount); + var cell1 = row.insertCell(0); + var cell2 = row.insertCell(1); + cell1.innerHTML = wrapLongText(paramName); + cell2.innerHTML = wrapLongText(paramValue); + } - var urls = paramValue.split(';'); + /** + * Add a parameter with the specified name and several values. + * The values should be joined by ';' and + * input to the method as a single string ('paramValue'). + */ + function pwAddFilesParameter(paramsTabId, paramName, paramValue, disableOpeningByUgene) { + var paramsTab = document.getElementById(paramsTabId); + var paramsTable = paramsTab.getElementsByTagName('table')[0]; - var rowCount = paramsTable.rows.length; - var row1 = paramsTable.insertRow(rowCount); + var urls = paramValue.split(';'); - var cell1 = row1.insertCell(0); - cell1.innerHTML = wrapLongText(paramName); - cell1.rowSpan = urls.length; + var rowCount = paramsTable.rows.length; + var row1 = paramsTable.insertRow(rowCount); - var cell2 = row1.insertCell(1); - cell2.innerHTML = showFileButton(urls[0], disableOpeningByUgene); + var cell1 = row1.insertCell(0); + cell1.innerHTML = wrapLongText(paramName); + cell1.rowSpan = urls.length; - for (var i = 1; i < urls.length; i++) { - var row = paramsTable.insertRow(rowCount + i); - var cell = row.insertCell(0); - cell.innerHTML = showFileButton(urls[i], disableOpeningByUgene); + var cell2 = row1.insertCell(1); + cell2.innerHTML = showFileButton(urls[0], disableOpeningByUgene); + + for (var i = 1; i < urls.length; i++) { + var row = paramsTable.insertRow(rowCount + i); + var cell = row.insertCell(0); + cell.innerHTML = showFileButton(urls[i], disableOpeningByUgene); + } } -} -/** - * Searches for the ParametersWidget initial layout in the container and - * appends a new common (non-active) tab without parameters. - */ -function pwAddTab(container, tabName, tabId) { - var tabsList = container.getElementsByClassName("params-nav-tabs")[0]; - var tabsContent = container.getElementsByClassName("params-tab-content")[0]; - - var newTabsListEntry = '<li><a href="#' + tabId + '" data-toggle="tab">' + tabName + '</a></li>'; - var newTabsContentEntry = - '<div class="tab-pane" id="' + tabId + '">' + - '<table class="table table-bordered table-fixed param-value-column">' + + /** + * Searches for the ParametersWidget initial layout in the container and + * appends a new common (non-active) tab without parameters. + */ + function pwAddTab(container, tabName, tabId) { + var tabsList = container.getElementsByClassName("params-nav-tabs")[0]; + var tabsContent = container.getElementsByClassName("params-tab-content")[0]; + + var newTabsListEntry = '<li><a href="#' + tabId + '" data-toggle="tab">' + tabName + '</a></li>'; + var newTabsContentEntry = + '<div class="tab-pane" id="' + tabId + '">' + + '<table class="table table-bordered table-fixed param-value-column">' + '<col width="45%">' + '<col width="55%">' + '<thead>' + - '<tr>' + - '<th><span class="text">Parameter</span></th>' + - '<th><span class="text">Value</span></th>' + - '</tr>' + + '<tr>' + + '<th><span class="text">Parameter</span></th>' + + '<th><span class="text">Value</span></th>' + + '</tr>' + '</thead>' + '<tbody scroll="yes">' + '</tbody>' + - '</table>' + - '</div>'; - - tabsList.insertAdjacentHTML('beforeend', newTabsListEntry); - tabsContent.insertAdjacentHTML('beforeend', newTabsContentEntry); -} + '</table>' + + '</div>'; + tabsList.insertAdjacentHTML('beforeend', newTabsListEntry); + tabsContent.insertAdjacentHTML('beforeend', newTabsContentEntry); + } + + //constructor code + var infos = JSON.parse(agent.workersParamsInfo); + self.createWidget(infos); + showOnlyLang(agent.lang); //translate labels +} diff --git a/src/corelibs/U2Designer/javascript/ProblemsWidget.js b/src/corelibs/U2Designer/javascript/ProblemsWidget.js new file mode 100644 index 0000000000000000000000000000000000000000..7d62a7fb3a97c9c3ea39e47e839d801821f535ce --- /dev/null +++ b/src/corelibs/U2Designer/javascript/ProblemsWidget.js @@ -0,0 +1,104 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +function ProblemsWidget(containerId) { // may be add first problem as second argument function ProblemsWidget(containerId, firstProblemInfo) + addWidget("<span lang=\"en\" class=\"translatable\">Notifications</span>" + "<span lang=\"ru\" class=\"translatable\">УведомлениÑ</span>", "overview_tab", 0, containerId); + TableWidget.apply(this, arguments); //inheritance + + //private + var self = this; + + //public + this.widths = [10, 30, 60]; + this.headers = ["<span lang=\"en\" class=\"translatable\">Type</span>" + "<span lang=\"ru\" class=\"translatable\">Тип</span>", + "<span lang=\"en\" class=\"translatable\">Element</span>" + "<span lang=\"ru\" class=\"translatable\">Ðлемент</span>", + "<span lang=\"en\" class=\"translatable\">Message</span>" + "<span lang=\"ru\" class=\"translatable\">Сообщение</span>" + ]; + + this.sl_newProblem = function (problemInfo, count) { + if (!self._isContainerExists()) { + agent.sl_onJsError("Can't find container by id = " + self._containerId + "!"); + return; + } + if (id(problemInfo) in self._rows) { + self._updateRow(id(problemInfo), createRow(problemInfo, /*multi row*/ true, count)); + } else { + self._addRow(id(problemInfo), createRow(problemInfo)); + } + }; + + this.problemImage = function (problemInfo) { + var image = "qrc:///U2Lang/images/"; + if ("error" === problemInfo.type) { + image += "error.png"; + tooltip = (agent.lang !== "ru") ? "Error" : "Ошибка"; + } else if ("warning" === problemInfo.type) { + image += "warning.png"; + tooltip = (agent.lang !== "ru") ? "Warning" : "Предупреждение"; + } else if ("info" === problemInfo.type) { + image = "qrc:///core/images/info.png"; + tooltip = (agent.lang !== "ru") ? "Information" : "ИнформациÑ"; + } else { + agent.sl_onJsError("Unknown type: " + problemInfo.type, ""); + } + return "<img src=\"" + image + "\" title=\"" + tooltip + "\" class=\"problem-icon\"/>"; + }; + + //protected + this._createRow = function(rowData) { + var row = ""; + rowData.forEach(function(item) { + row += "<td style=\"word-wrap: break-word\">" + item + "</td>"; + }); + return row; + }; + + //private + function createRow(info, multi, count) { + multi = multi || false; + count = count || 1; + var result = []; + var prefix = ""; + if (multi) { + prefix = "(" + count + ") "; + } + + result.push(self.problemImage(info)); + result.push(self.wrapLongText(info.actorName)); + result.push(getTextWithWordBreaks(prefix + info.message)); + + return result; + } + + function getTextWithWordBreaks(text) { + var textWithBreaks = text; + textWithBreaks = textWithBreaks.replace("\\", "\\<wbr>").replace("/", "/<wbr>"); + return textWithBreaks; + } + + function id(info) { + return info.actorId + info.message; + } + + //constructor code + this._createTable(); + showOnlyLang(agent.lang); //translate labels +} diff --git a/src/corelibs/U2Designer/javascript/StatisticsWidget.js b/src/corelibs/U2Designer/javascript/StatisticsWidget.js new file mode 100644 index 0000000000000000000000000000000000000000..b9266a44311f2a36a3c1ab4217f15cfe7a84eef7 --- /dev/null +++ b/src/corelibs/U2Designer/javascript/StatisticsWidget.js @@ -0,0 +1,85 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +function StatisticsWidget(containerId) { + //create parent widget + addWidget("<span lang=\"en\" class=\"translatable\">Common Statistics</span>" + "<span lang=\"ru\" class=\"translatable\">ÐžÐ±Ñ‰Ð°Ñ ÑтатиÑтика</span>", "overview_tab", 1, containerId); + TableWidget.apply(this, arguments); //inheritance + + //private + var self = this; + + //protected + this._useEmptyRows = false; + + //public + this.widths = [40, 30, 30]; + this.headers = ["<span lang=\"en\" class=\"translatable\">Element</span>" + "<span lang=\"ru\" class=\"translatable\">Ðлемент</span>", + "<span lang=\"en\" class=\"translatable\">Elapsed time</span>" + "<span lang=\"ru\" class=\"translatable\">Прошедшее времÑ</span>", + "<span lang=\"en\" class=\"translatable\">Output messages</span>" + "<span lang=\"ru\" class=\"translatable\">Выходные ÑообщениÑ</span>" + ]; + + this.sl_workerStatsInfoChanged = function(info) { + if (!self._isContainerExists()) { + agent.sl_onJsError("Can't find container by id = " + self._containerId + "!"); + return; + } + self._updateRow(id(info.actorId), createRowByWorker(info)); + }; + + this.sl_workerStatsUpdate = function(workersStatisticsInfo){ + if (!self._isContainerExists()) { + agent.sl_onJsError("Can't find container by id = " + self._containerId + "!"); + return; + } + workersStatisticsInfo.forEach(function(workerInfo){ + self._updateRow(id(workerInfo.actorId), createRowByWorker(workerInfo)); + }); + }; + + //private + function createRowByWorker(info) { + var result = []; + + result.push(wrapLongText(/*m->actorName(*/info.actor)); + result.push(timeStr(info.timeMks));// << timeStr(info.timeMks); + result.push(info.countOfProducedData); + return result; + } + + function timeStr(timeMks){ + var date = new Date(timeMks/1000); + var milliseconds = date.getUTCMilliseconds() > 99 ? date.getUTCMilliseconds() : (date.getUTCMilliseconds() > 9 ? "0"+date.getUTCMilliseconds() : "00"+date.getUTCMilliseconds()); + var seconds = date.getUTCSeconds() > 9 ? date.getUTCSeconds() : "0"+date.getUTCSeconds(); + var minutes = date.getUTCMinutes() > 9 ? date.getUTCMinutes() : "0"+date.getUTCMinutes(); + var hours = date.getUTCHours() > 9 ? date.getUTCHours() : "0"+date.getUTCHours(); + return hours + ":" + minutes + ":" + seconds + "." + milliseconds; + } + + function id(actor) { + return "stw_" + actor; + } + + //constructor code + this._createTable(); + this._fillTable(); + showOnlyLang(agent.lang); //translate labels +} diff --git a/src/corelibs/U2Designer/javascript/StatusWidget.js b/src/corelibs/U2Designer/javascript/StatusWidget.js new file mode 100644 index 0000000000000000000000000000000000000000..b4a343b6e1cdf25657b5ce58300cf647cf365652 --- /dev/null +++ b/src/corelibs/U2Designer/javascript/StatusWidget.js @@ -0,0 +1,146 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +function StatusWidget(containerId) { + //create parent widget + addWidget("<span lang=\"en\" class=\"translatable\">Workflow task</span>" + "<span lang=\"ru\" class=\"translatable\">Задача Ñхемы</span>", "overview_tab", 1, containerId); + DashboardWidget.apply(this, arguments); //inheritance + + //private + var self = this; + + //public + this.sl_progressChanged = function(progress){ //int progress + if (!self._isContainerExists()) { + agent.sl_onJsError("Can't find container by id = " + self._containerId + "!"); + return; + } + bar = self._container.getElementsByClassName("bar"); + if (bar === null) { + agent.sl_onJsError("Can't find element by class = bar!"); + return; + } + bar[0].style.width = progress+"%"; + }; + + this.sl_taskStateChanged = function(state){ //Monitor::TaskState + if (!self._isContainerExists()) { + agent.sl_onJsError("Can't find container by id = " + self._containerId + "!"); + return; + } + updatePrivateVariables(); + + var isFinished = false; + if ("RUNNING" == state) { + running(); + } else if ("RUNNING_WITH_PROBLEMS" == state) { + runningWithProblems(); + } else if ("FINISHED_WITH_PROBLEMS" == state) { + isFinished = true; + finishedWithProblems(); + } else if ("FAILED" == state) { + isFinished = true; + failed(); + } else if ("SUCCESS" == state) { + isFinished = true; + success(); + } else { + isFinished = true; + canceled(); + } + if(isFinished){ + pauseTimer(); + } + + var hint = document.getElementById("load-btn-hint-container");//only for debug + if(isFinished && hint === null){ + showLoadButton(agent.showHint); + } + showOnlyLang(agent.lang); //translate labels + }; + + //private + function running() { + statusBar.classList.add("alert-info"); + statusMessage.innerHTML = "<span lang=\"en\" class=\"translatable\">The workflow task is in progress...</span>" + + "<span lang=\"ru\" class=\"translatable\">Задача Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñхемы в процеÑÑе...</span>"; + } + + function runningWithProblems() { + statusBar.classList.remove("alert-info"); + statusMessage.innerHTML = "<span lang=\"en\" class=\"translatable\">The workflow task is in progress. There are problems...</span>" + + "<span lang=\"ru\" class=\"translatable\">Задача Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñхемы в процеÑÑе. ЕÑÑ‚ÑŒ проблемы...</span>"; + } + + function finishedWithProblems() { + statusBar.classList.remove("alert-info"); + statusMessage.innerHTML = "<span lang=\"en\" class=\"translatable\">The workflow task has been finished with warnings!</span>" + + "<span lang=\"ru\" class=\"translatable\">Задача Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñхемы завершилаÑÑŒ Ñ Ð¿Ñ€ÐµÐ´ÑƒÐ¿Ñ€ÐµÐ¶Ð´ÐµÐ½Ð¸Ñми!</span>"; + } + + function failed() { + statusBar.classList.remove("alert-info"); + statusBar.classList.add("alert-error"); + statusMessage.innerHTML = "<span lang=\"en\" class=\"translatable\">The workflow task has been finished with errors!</span>" + + "<span lang=\"ru\" class=\"translatable\">Задача Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñхемы завершилаÑÑŒ Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°Ð¼Ð¸!</span>"; + } + + function success() { + statusBar.classList.remove("alert-info"); + statusBar.classList.add("alert-success"); + statusMessage.innerHTML = "<span lang=\"en\" class=\"translatable\">The workflow task has been finished successfully!</span>" + + "<span lang=\"ru\" class=\"translatable\">Задача Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñхемы завершилаÑÑŒ без ошибок!</span>"; + } + + function canceled() { + statusBar.classList.remove("alert-info"); + statusMessage.innerHTML = "<span lang=\"en\" class=\"translatable\">The workflow task has been canceled!</span>" + + "<span lang=\"ru\" class=\"translatable\">Задача Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñхемы была отменена!</span>"; + } + + function updatePrivateVariables() { + statusBar = document.getElementById("status-bar"); + statusMessage = document.getElementById("status-message"); + } + + //constructor + var content = "<div class=\"well well-small vlayout-item\">" + + "<span lang=\"en\" class=\"translatable\">Time</span>" + + "<span lang=\"ru\" class=\"translatable\">ВремÑ</span>" + + " <span id=\"timer\"></span>" + + "</div>" + + "<div class=\"progress-wrapper vlayout-item\">" + + "<div class=\"progress-container\">" + + "<div id=\"progressBar\" class=\"progress small-bar\">" + + "<div class=\"bar\" style=\"width: 0%;\"></div>" + + "</div>" + + "</div>" + + "</div>" + + "<div id=\"status-bar\" class=\"vlayout-item alert\">" + + "<p id=\"status-message\"/>" + + "</div>"; + self._container.innerHTML += content; + var statusBar = document.getElementById("status-bar"); + var statusMessage = document.getElementById("status-message"); + self.sl_progressChanged(0); + running(); + showOnlyLang(agent.lang); //translate labels +} diff --git a/src/corelibs/U2Designer/javascript/TableWidget.js b/src/corelibs/U2Designer/javascript/TableWidget.js new file mode 100644 index 0000000000000000000000000000000000000000..3c6a876bc693fa724f1fcf4ef85b5e03bfb87e84 --- /dev/null +++ b/src/corelibs/U2Designer/javascript/TableWidget.js @@ -0,0 +1,283 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +function DashboardWidget(containerId) { + //private + var self = this; + this._container = document.getElementById(containerId); + this._isContainerExists = function (){ + self._container = document.getElementById(containerId); + if (self._container === null) { + return false; + } + return true; + }; +} + +function TableWidget(containerId) { + DashboardWidget.apply(this, arguments); //inheritance + var MIN_ROW_COUNT = 3; + //private + var self = this; + //protected + this._containerId = containerId; + this._useEmptyRows = true; + this._rows = Object.create(null); //hash-map + + //public + this.widths = []; + this.headers = []; + this.data = [ + [] + ]; + this.wrapLongText = function(text) { + return "<div class=\"long-text\" title=\"" + text + "\">" + text + "</div>"; + }; + + //protected functions + this._addContent = function(content) { + if (!self._isContainerExists()) { + agent.sl_onJsError("Can't find container by id = " + self._containerId + "!"); + return; + } + self._container.innerHTML = self._container.innerHTML + content; + }; + + this._addRow = function(rowId, rowData) { + if (!self._isContainerExists()) { + agent.sl_onJsError("Can't find container by id = " + self._containerId + "!"); + return; + } + + var row = "<tr class=\"filled-row\" id=\"" + rowId + "\">"; + row += self._createRow(rowData); + row += "</tr>"; + var body = self._container.getElementsByTagName('tbody')[0]; + //alert(body.id); + var emptyRows = body.getElementsByClassName("empty-row"); + if (emptyRows.length === 0) { + body.innerHTML += row; + self._rows[rowId] = row; + } else { + emptyRows[0].id=rowId; + emptyRows[0].outerHTML = row; + + self._rows[rowId] = row; + } + }; + + this._createRow = function(rowData) { + var row = ""; + rowData.forEach(function(item) { + row += "<td>" + item + "</td>"; + }); + return row; + }; + + this._createTable = function() { + var content = "<table class=\"table table-bordered table-fixed\">"; + self.widths.forEach(function(item) { + content += "<col width=\"" + item + "%\" />"; + }); + content += "<thead><tr>"; + self.headers.forEach(function(item) { + content += "<th><span class=\"text\">" + item + "</span></th>"; + }); + content += "<thead><tr>"; + content += "<tbody scroll=\"yes\" id=\""+self._containerId+"123\"/>"; + content += "</table>"; + self._addContent(content); + if (self._useEmptyRows) { + addEmptyRows(); + } + }; + + this._fillTable = function() { + self.data.forEach(function(row) { + self._addRow(row[1], row.slice(1)); + }); + }; + + this._updateRow = function(rowId, rowData) { + var row = document.getElementById(rowId); //TODO container? + if (row === null) { + self._addRow(rowId, rowData); + } else { + row.innerHTML = self._createRow(rowData); + } + }; + + //private functions + var addEmptyRows = function() { + if (!self._isContainerExists()) { + agent.sl_onJsError("Can't find container by id = " + self._containerId + "!"); + return; + } + + var body = self._container.getElementsByTagName('tbody')[0]; + + var rowIdx = 0; + for (var key in self._rows) { + rowIdx++; + } + while (rowIdx < MIN_ROW_COUNT) { + var row = "<tr class=\"empty-row\">"; + for (i = 0; i < self.headers.length; i++) { + row += "<td> </td>"; + } + row += "</tr>"; + body.innerHTML += row; + rowIdx++; + } + }; +} + +function OutputFilesWidget(containerId) { //TODO + //create parent widget + addWidget("<span lang=\"en\" class=\"translatable\">Output files</span>" + "<span lang=\"ru\" class=\"translatable\">Выходные файлы</span>", "overview_tab", 0, containerId); + TableWidget.apply(this, arguments); //inheritance + var MAX_FILES_COUNT = 10; + var MAX_LEN = 25; //for file's name + //private + var self = this; + var collapsed = false; + var files = []; + var actors = []; + + //public + this.widths = [50, 50]; + this.headers = ["<span lang=\"en\" class=\"translatable\">File</span>" + "<span lang=\"ru\" class=\"translatable\">Файл</span>", + "<span lang=\"en\" class=\"translatable\">Producer</span>" + "<span lang=\"ru\" class=\"translatable\">Производитель</span>" + ]; + + this.sl_newOutputFile = function (fileInfo) { + files.push(fileInfo); + if (files.length > MAX_FILES_COUNT && !collapsed) { + collapse(); + showOnlyLang(agent.lang); + return; + } + if (collapsed /*&& id(fileInfo) in self._rows*/) { + addFileMenu(fileInfo); + } else { + self._addRow(id(fileInfo), createRowByFile(fileInfo)); + } + showOnlyLang(agent.lang); + }; + + //private + function id(fileInfo){ + if (collapsed) { + return ":;" + fileInfo.actor + ":;"; + } + return fileInfo.url; + } + + function createRowByFile(fileInfo){ + var result = []; + // const WorkflowMonitor *m = dashboard->monitor(); + // CHECK(NULL != m, result); + + //result.push(createFileButton(fileInfo)); + result.push(showFileButton(fileInfo.url, false, fileInfo.openBySystem)); + result.push(self.wrapLongText(fileInfo.actor));// result << wrapLongText(m->actorName(info.actor)); + return result; + } + + function createFileButton(fileInfo /*relativeURLPath, relativeDirPath, openBySystem, fileName, openByOsTranslation, openContainingDirTranslation*/) { + var content = "<div class=\"file-button-ctn\">" + + "<div class=\"btn-group full-width file-btn-group\">" + + "<button class=\"btn full-width long-text\" onclick=" + + onClickAction(fileInfo) + + "onmouseover=\"this.title=agent.absolute('"+ + relativeURLPath + + "')\">" + + fileName + + "</button><button class=\"btn dropdown-toggle\" data-toggle=\"dropdown\">" + + "<span class=\"caret\"></span></button>" + + createActionsSubMenu(relativeURLPath, relativeDirPath, true, openBySystem, openByOsTranslation, openContainingDirTranslation) + + "</div></div>"; + return content; + } + + function onClickAction(fileInfo) { + var content = (fileInfo.openBySystem === true ) ? "\"agent.openByOS('" + relativeURLPath + "')\"":"\"agent.openUrl('" + relativeURLPath + "')\""; + return content; + } + + function addFileMenu(fileInfo) { + var dropDownMenuId = "drop-down-menu-"+fileInfo.actor; + var hasActor = (actors.filter(function(actor) { + return actor === fileInfo.actor; + }).length !== 0); + if(hasActor){ + //add to exist dropdown menu + var menu = document.getElementById(dropDownMenuId); + if (!menu) { + agent.sl_onJsError("Can't find container by id = " + self._containerId + "!"); + return; + } + var subMenu = menu.getElementsByClassName("files-menu")[0]; + subMenu.innerHTML += showFileMenu(fileInfo.url); + var counter = menu.getElementsByClassName("counter")[0]; + //alert(counter); + counter.innerHTML = files.filter(function(info) { + return info.actor === fileInfo.actor; + }).length; + //var result = []; + // result.push(menu); + // result.push(self.wrapLongText(fileInfo.actor));// result << wrapLongText(m->actorName(info.actor)); + // self._updateRow(id(fileInfo), result); + } else { + //create new dropdown menu + var filesButton = "<div id=\""+dropDownMenuId+"\" class=\"btn-group full-width\">" + + "<button class=\"files-btn btn dropdown-toggle full-width\" data-toggle=\"dropdown\">" + + "<span class=\"counter\">1</span> <span lang=\"en\" class=\"translatable\">file(s)</span><span lang=\"ru\" class=\"translatable\">файл(ов)</span>" + + "</button>" + + "<ul class=\"files-menu dropdown-menu full-width\"/>" + + showFileMenu(fileInfo.url)+ + "</div>"; + + var result = []; + result.push(filesButton); + result.push(self.wrapLongText(fileInfo.actor));// result << wrapLongText(m->actorName(info.actor)); + self._addRow(id(fileInfo), result); + actors.push(fileInfo.actor); + } + } + + function collapse() { + collapsed = true; + self._container.innerHTML = ""; + self._createTable(); + // var actors = files.map(function(fileInfo){ + // return fileInfo.actor; + // }); + files.forEach(function(fileInfo){ + addFileMenu(fileInfo); + }); + console.log("Collapse!!!"); + } + + //constructor code + this._createTable(); + showOnlyLang(agent.lang); //translate labels +} diff --git a/src/corelibs/U2Designer/javascript/bootstrap/css/bootstrap.css b/src/corelibs/U2Designer/javascript/bootstrap/css/bootstrap.css index 6054e0857fa82899e636aec26770e5c4f01ea98e..6965cd7bfc7f3e83f3f9174c7540256657c6d5ae 100644 --- a/src/corelibs/U2Designer/javascript/bootstrap/css/bootstrap.css +++ b/src/corelibs/U2Designer/javascript/bootstrap/css/bootstrap.css @@ -2282,7 +2282,7 @@ table th[class*="span"], *margin-right: .3em; line-height: 14px; vertical-align: text-top; - background-image: url("qrc:javascript/bootstrap/img/glyphicons-halflings.png"); + background-image: url("qrc:///javascript/bootstrap/img/glyphicons-halflings.png"); background-position: 14px 14px; background-repeat: no-repeat; } diff --git a/src/corelibs/U2Designer/src/BreakpointHitCountDialog.cpp b/src/corelibs/U2Designer/src/BreakpointHitCountDialog.cpp index 27ca206ac901738471200c390bec52ef4a324063..0fa445e9059138ecf97f9a7c49e175dd93b2727f 100644 --- a/src/corelibs/U2Designer/src/BreakpointHitCountDialog.cpp +++ b/src/corelibs/U2Designer/src/BreakpointHitCountDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -20,14 +20,15 @@ */ #include <limits> + #include <QIntValidator> #include <QMessageBox> #include <QPushButton> -#include "ui_BreakpointHitCountDialog.h" -#include "BreakpointHitCountDialog.h" #include <U2Gui/HelpButton.h> +#include "BreakpointHitCountDialog.h" +#include "ui_BreakpointHitCountDialog.h" const int LOWER_BOUNDARY_FOR_HIT_COUNTER_PARAMETER = 1; const int UPPER_BOUNDARY_FOR_HIT_COUNTER_PARAMETER = std::numeric_limits<int>::max(); @@ -51,7 +52,7 @@ BreakpointHitCountDialog::BreakpointHitCountDialog(const QStringList &hitCountCo { ui = new Ui_BreakpointHitCountDialog(); ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22056453"); + new HelpButton(this, ui->buttonBox, "24740355"); ui->hitConditionCombo->addItems(hitCountConditions); ui->hitConditionCombo->setCurrentIndex(hitCountConditions.indexOf(conditionOnLaunch)); diff --git a/src/corelibs/U2Designer/src/BreakpointHitCountDialog.h b/src/corelibs/U2Designer/src/BreakpointHitCountDialog.h index 7f74391df0f162c101473a53c567ca9ef39fa7ae..9ee5a3688f002db57dbd572ff6a7eb334c3c1f1d 100644 --- a/src/corelibs/U2Designer/src/BreakpointHitCountDialog.h +++ b/src/corelibs/U2Designer/src/BreakpointHitCountDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/DatasetWidget.cpp b/src/corelibs/U2Designer/src/DatasetWidget.cpp index 8ee044313bb27eb49ed6a81b50b403164d9535aa..69774abe79d8120f0dc7937ea4b856e6368b6b9f 100644 --- a/src/corelibs/U2Designer/src/DatasetWidget.cpp +++ b/src/corelibs/U2Designer/src/DatasetWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/DatasetWidget.h b/src/corelibs/U2Designer/src/DatasetWidget.h index b5d8e5a31a093fbeb49ac499c85e6716f7a655d5..8f0fd736220c101fd5b31c2c32827e56a2a3ba92 100644 --- a/src/corelibs/U2Designer/src/DatasetWidget.h +++ b/src/corelibs/U2Designer/src/DatasetWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/DatasetsController.cpp b/src/corelibs/U2Designer/src/DatasetsController.cpp index fdebc29265fcdab8ee590ff5cbabc377effaf403..e8b1b6f03bad0c0bcfcf165f72abbe640c8d46b6 100644 --- a/src/corelibs/U2Designer/src/DatasetsController.cpp +++ b/src/corelibs/U2Designer/src/DatasetsController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/DatasetsController.h b/src/corelibs/U2Designer/src/DatasetsController.h index 7c2e1e1ee9ed8c8c0ac204ab6a052ea7d700e000..30c4bbe7cfe1129a6b29f466c94b804a62297ef6 100644 --- a/src/corelibs/U2Designer/src/DatasetsController.h +++ b/src/corelibs/U2Designer/src/DatasetsController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/DatasetsListWidget.cpp b/src/corelibs/U2Designer/src/DatasetsListWidget.cpp index a601936c567bddde7f146f97969e3e00e7e41c36..e0fd91f7f8153a766f3b10b159618a79b7b109d2 100644 --- a/src/corelibs/U2Designer/src/DatasetsListWidget.cpp +++ b/src/corelibs/U2Designer/src/DatasetsListWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -44,6 +44,8 @@ DatasetsListWidget::DatasetsListWidget(DatasetsController *_ctrl) tabs = new DatasetsTabWidget(this); l->addWidget(tabs); + setObjectName("DatasetsListWidget"); + QToolButton *newTabButton = new QToolButton(this); tabs->setCornerWidget(newTabButton, Qt::TopRightCorner); newTabButton->setCursor(Qt::ArrowCursor); @@ -53,6 +55,7 @@ DatasetsListWidget::DatasetsListWidget(DatasetsController *_ctrl) newTabButton->setToolTip(tr("Add dataset")); QIcon addIcon = QIcon(QString(":U2Designer/images/add.png")); newTabButton->setIcon(addIcon); + connect(newTabButton, SIGNAL(clicked()), SLOT(sl_newDataset())); connect(tabs, SIGNAL(tabCloseRequested(int)), SLOT(sl_deleteDataset(int))); connect(tabs, SIGNAL(si_contextMenu(const QPoint &, int)), SLOT(sl_contextMenu(const QPoint &, int))); @@ -158,6 +161,7 @@ void DatasetsListWidget::sl_contextMenu(const QPoint &p, int idx) { DatasetsTabWidget::DatasetsTabWidget(QWidget *parent) : QTabWidget(parent) { + setObjectName("DatasetsTabWidget"); setUsesScrollButtons(true); setTabsClosable(true); tabBar()->setContextMenuPolicy(Qt::CustomContextMenu); diff --git a/src/corelibs/U2Designer/src/DatasetsListWidget.h b/src/corelibs/U2Designer/src/DatasetsListWidget.h index 583e2803361f6292a71f4e3068e2ee919df674fb..0b70cfe19a52485b9fe71f2e4c889f80a97722b6 100644 --- a/src/corelibs/U2Designer/src/DatasetsListWidget.h +++ b/src/corelibs/U2Designer/src/DatasetsListWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/DbFolderItem.cpp b/src/corelibs/U2Designer/src/DbFolderItem.cpp index a83504345717afa5fb1869ebd03f00777e2bbb72..cf2b4d9e695c786bb767ceef90a2ed96d8270c39 100644 --- a/src/corelibs/U2Designer/src/DbFolderItem.cpp +++ b/src/corelibs/U2Designer/src/DbFolderItem.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/DbFolderItem.h b/src/corelibs/U2Designer/src/DbFolderItem.h index ff7bfa1855d33025a870ac7235985268335181a4..b80e3a6ba264aba685f8d1351f5b034dddc6eb4d 100644 --- a/src/corelibs/U2Designer/src/DbFolderItem.h +++ b/src/corelibs/U2Designer/src/DbFolderItem.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/DbObjectItem.cpp b/src/corelibs/U2Designer/src/DbObjectItem.cpp index dcc2db85a625bca10599fc70788db34d02c581e6..0e20e80eda55af50961af5b32639231f8bfa1f71 100644 --- a/src/corelibs/U2Designer/src/DbObjectItem.cpp +++ b/src/corelibs/U2Designer/src/DbObjectItem.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/DbObjectItem.h b/src/corelibs/U2Designer/src/DbObjectItem.h index 42d4a980023c2a9023a8f5599dffd0e9e67b9c9b..5eff4adbb368aac5e887469971dc945f4a84a493 100644 --- a/src/corelibs/U2Designer/src/DbObjectItem.h +++ b/src/corelibs/U2Designer/src/DbObjectItem.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/DelegateEditors.cpp b/src/corelibs/U2Designer/src/DelegateEditors.cpp index e6763be3adba18712000fceeaf5fd201f0ef425a..24b0d55f83e0f13afd381251f019b56a244fe518 100644 --- a/src/corelibs/U2Designer/src/DelegateEditors.cpp +++ b/src/corelibs/U2Designer/src/DelegateEditors.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -496,7 +496,7 @@ URLDelegate::URLDelegate(const DelegateTags &_tags, const QString &type, const O *tags() = _tags; } -URLDelegate::URLDelegate(const QString& filter, const QString& type, bool multi, bool isPath, bool saveFile, QObject *parent, const QString &format, bool noFilesMode) +URLDelegate::URLDelegate(const QString& filter, const QString& type, bool multi, bool isPath, bool saveFile, QObject *parent, const QString &format, bool noFilesMode, bool doNotUseWorkflowOutputFolder) : PropertyDelegate(parent), lastDirType(type) { tags()->set(DelegateTags::FILTER, filter); @@ -506,9 +506,10 @@ URLDelegate::URLDelegate(const QString& filter, const QString& type, bool multi, options |= isPath ? AllowSelectOnlyExistingDir : None; options |= saveFile ? SelectFileToSave : None; options |= noFilesMode ? SelectParentDirInsteadSelectedFile : None; + options |= doNotUseWorkflowOutputFolder ? DoNotUseWorkflowOutputFolder : None; } -URLDelegate::URLDelegate(const DelegateTags &_tags, const QString &type, bool multi, bool isPath, bool saveFile, QObject *parent, bool noFilesMode) : +URLDelegate::URLDelegate(const DelegateTags &_tags, const QString &type, bool multi, bool isPath, bool saveFile, QObject *parent, bool noFilesMode, bool doNotUseWorkflowOutputFolder) : PropertyDelegate(parent), lastDirType(type) { @@ -518,6 +519,7 @@ URLDelegate::URLDelegate(const DelegateTags &_tags, const QString &type, bool mu options |= isPath ? AllowSelectOnlyExistingDir : None; options |= saveFile ? SelectFileToSave : None; options |= noFilesMode ? SelectParentDirInsteadSelectedFile : None; + options |= doNotUseWorkflowOutputFolder ? DoNotUseWorkflowOutputFolder : None; } QVariant URLDelegate::getDisplayValue(const QVariant &v) const { @@ -542,7 +544,7 @@ URLWidget *URLDelegate::createWidget(QWidget *parent) const { tags(), parent); } - if (options.testFlag(SelectFileToSave) && !options.testFlag(DoNotUseWorkflowOutputFolder)) { + if (!options.testFlag(DoNotUseWorkflowOutputFolder)) { result->setSchemaConfig(schemaConfig); } return result; @@ -619,20 +621,20 @@ FileModeDelegate::FileModeDelegate(bool appendSupported, QObject *parent) /******************************** * SchemaRunModeDelegate ********************************/ -const QString SchemaRunModeDelegate::THIS_COMPUTER_STR = SchemaRunModeDelegate::tr( "This computer" ); -const QString SchemaRunModeDelegate::REMOTE_COMPUTER_STR = SchemaRunModeDelegate::tr( "Remote computer" ); - SchemaRunModeDelegate::SchemaRunModeDelegate( QObject * parent ) : ComboBoxDelegate( QVariantMap(), parent ) { - comboItems.append(qMakePair( THIS_COMPUTER_STR, true )); - comboItems.append(qMakePair( REMOTE_COMPUTER_STR, false )); + thisComputerOption = SchemaRunModeDelegate::tr( "This computer" ); + remoteComputerOption = SchemaRunModeDelegate::tr( "Remote computer" ); + + comboItems.append(qMakePair(thisComputerOption, true )); + comboItems.append(qMakePair(remoteComputerOption, false )); connect( this, SIGNAL( si_valueChanged( const QString & ) ), this, SLOT( sl_valueChanged( const QString & ) ) ); } void SchemaRunModeDelegate::sl_valueChanged( const QString & val ) { - emit si_showOpenFileButton( THIS_COMPUTER_STR == val ); + emit si_showOpenFileButton( thisComputerOption == val ); } @@ -922,29 +924,67 @@ void StringSelectorDelegate::setModelData(QWidget *, QAbstractItemModel *model, * CharacterDelegate ********************************/ PropertyWidget * CharacterDelegate::createWizardWidget(U2OpStatus & /*os*/, QWidget *parent) const { - return new DefaultPropertyWidget(1, parent); + return new IgnoreUpDownPropertyWidget(1, parent); } QWidget * CharacterDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &/* option */, const QModelIndex &/* index */) const { - return new DefaultPropertyWidget(1, parent); + return new IgnoreUpDownPropertyWidget(1, parent); } void CharacterDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const { QVariant val = index.model()->data(index, ConfigurationEditor::ItemValueRole); - DefaultPropertyWidget *lineEdit = dynamic_cast<DefaultPropertyWidget*>(editor); + IgnoreUpDownPropertyWidget *lineEdit = dynamic_cast<IgnoreUpDownPropertyWidget*>(editor); lineEdit->setValue(val); } void CharacterDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const { - DefaultPropertyWidget *lineEdit = dynamic_cast<DefaultPropertyWidget*>(editor); + IgnoreUpDownPropertyWidget *lineEdit = dynamic_cast<IgnoreUpDownPropertyWidget*>(editor); + model->setData(index, lineEdit->value().toString(), ConfigurationEditor::ItemValueRole); +} + +LineEditWithValidatorDelegate::LineEditWithValidatorDelegate(const QRegularExpression &_regExp, QObject *_parent) + : PropertyDelegate(_parent), + regExp(_regExp) +{ + +} + +QWidget *LineEditWithValidatorDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem & /*option*/, const QModelIndex & /*index*/) const { + QScopedPointer<IgnoreUpDownPropertyWidget> editor(new IgnoreUpDownPropertyWidget(NO_LIMIT, parent)); + QLineEdit *lineEdit = editor->findChild<QLineEdit *>("mainWidget"); + SAFE_POINT(nullptr != lineEdit, "Line edit is nullptr", nullptr); + + lineEdit->setValidator(new QRegularExpressionValidator(regExp, lineEdit)); + connect(editor.data(), SIGNAL(si_valueChanged(const QVariant &)), SLOT(sl_valueChanged())); + return editor.take(); +} + +void LineEditWithValidatorDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const { + QVariant val = index.model()->data(index, ConfigurationEditor::ItemValueRole); + IgnoreUpDownPropertyWidget *lineEdit = qobject_cast<IgnoreUpDownPropertyWidget *>(editor); + lineEdit->setValue(val); +} + +void LineEditWithValidatorDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const { + IgnoreUpDownPropertyWidget *lineEdit = qobject_cast<IgnoreUpDownPropertyWidget *>(editor); model->setData(index, lineEdit->value().toString(), ConfigurationEditor::ItemValueRole); } -}//namespace U2 +LineEditWithValidatorDelegate *LineEditWithValidatorDelegate::clone() { + return new LineEditWithValidatorDelegate(regExp, parent()); +} + +void LineEditWithValidatorDelegate::sl_valueChanged() { + IgnoreUpDownPropertyWidget* editor = qobject_cast<IgnoreUpDownPropertyWidget *>(sender()); + CHECK(editor != NULL, ); + emit commitData(editor); +} + +} // namespace U2 diff --git a/src/corelibs/U2Designer/src/DelegateEditors.h b/src/corelibs/U2Designer/src/DelegateEditors.h index 31f7ee9fd5bcc049494d655b9d6879a4207a746d..c690145ec53c57e59f3a163189b5116f4b15a108 100644 --- a/src/corelibs/U2Designer/src/DelegateEditors.h +++ b/src/corelibs/U2Designer/src/DelegateEditors.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,10 +22,6 @@ #ifndef _U2_WORKFLOW_URL_H_ #define _U2_WORKFLOW_URL_H_ -#include <U2Designer/URLLineEdit.h> - -#include <U2Lang/ConfigurationEditor.h> - #include <QComboBox> #include <QCoreApplication> #include <QDialog> @@ -43,6 +39,10 @@ #include <QToolButton> #include <QVBoxLayout> +#include <U2Designer/URLLineEdit.h> + +#include <U2Lang/ConfigurationEditor.h> + #include "PropertyWidget.h" namespace U2 { @@ -89,15 +89,15 @@ public: AllowSelectSeveralFiles = 1 << 0, // allows to select several files. Ignored, if AllowSelectOnlyExistingDir is set. AllowSelectOnlyExistingDir = 1 << 1, // allows to select only existing directory. Otherwise, files can be selected (existing or not). SelectFileToSave = 1 << 2, // allows to select file to save. File can be existing or not. Ignored, if AllowSelectOnlyExistingDir or AllowSelectSeveralFiles is set. - SelectParentDirInsteadSelectedFile = 1 << 3, // user can select files, but the directory will be commited as the selected item. It is not possible to select the directory in this mode, AllowSelectOnlyExistingDir flag is ignored. - DoNotUseWorkflowOutputFolder = 1 << 4 // do not offer to save file to thw workflow output folder, show the default save dialog. Only if SelectFileToSave flag is set. + SelectParentDirInsteadSelectedFile = 1 << 3, // user can select files, but the directory will be committed as the selected item. It is not possible to select the directory in this mode, AllowSelectOnlyExistingDir flag is ignored. + DoNotUseWorkflowOutputFolder = 1 << 4 // do not offer to save file to the workflow output folder, show the default save dialog. Only if SelectFileToSave flag is set. }; Q_DECLARE_FLAGS(Options, Option) - URLDelegate(const QString& filter, const QString &type, const Options &options, QObject *parent = 0, const QString &format = ""); - URLDelegate(const DelegateTags& tags, const QString &type, const Options &options, QObject *parent = 0); - URLDelegate(const QString& filter, const QString& type, bool multi = false, bool isPath = false, bool saveFile = true, QObject *parent = 0, const QString &format = "", bool noFilesMode = false); - URLDelegate(const DelegateTags& tags, const QString& type, bool multi = false, bool isPath = false, bool saveFile = true, QObject *parent = 0, bool noFilesMode = false); + URLDelegate(const QString& filter, const QString &type, const Options &options, QObject *parent = nullptr, const QString &format = ""); + URLDelegate(const DelegateTags& tags, const QString &type, const Options &options, QObject *parent = nullptr); + URLDelegate(const QString& filter, const QString& type, bool multi = false, bool isPath = false, bool saveFile = true, QObject *parent = nullptr, const QString &format = "", bool noFilesMode = false, bool doNotUseWorkflowOutputFolder = false); + URLDelegate(const DelegateTags& tags, const QString& type, bool multi = false, bool isPath = false, bool saveFile = true, QObject *parent = nullptr, bool noFilesMode = false, bool doNotUseWorkflowOutputFolder = false); QVariant getDisplayValue(const QVariant &v) const; @@ -358,9 +358,9 @@ public: class U2DESIGNER_EXPORT SchemaRunModeDelegate : public ComboBoxDelegate { Q_OBJECT -public: - static const QString THIS_COMPUTER_STR; - static const QString REMOTE_COMPUTER_STR; +private: + QString thisComputerOption; + QString remoteComputerOption; public: SchemaRunModeDelegate(QObject * parent = 0); @@ -527,7 +527,25 @@ public: }; // CharacterDelegate -}//namespace U2 +class U2DESIGNER_EXPORT LineEditWithValidatorDelegate : public PropertyDelegate { + Q_OBJECT +public: + LineEditWithValidatorDelegate(const QRegularExpression ®Exp, QObject *parent = nullptr); + + QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override; + void setEditorData(QWidget *editor, const QModelIndex &index) const override; + void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override; + + virtual LineEditWithValidatorDelegate *clone() override; + +private slots: + void sl_valueChanged(); + +private: + const QRegularExpression regExp; +}; + +} // namespace U2 Q_DECLARE_OPERATORS_FOR_FLAGS(U2::URLDelegate::Options) diff --git a/src/corelibs/U2Designer/src/DesignerUtils.cpp b/src/corelibs/U2Designer/src/DesignerUtils.cpp index 6201ab60411b82b74c954cbce99bf7b9bd564d55..002d8a193afefcb28e35d5bf615ce58c6d12d18b 100644 --- a/src/corelibs/U2Designer/src/DesignerUtils.cpp +++ b/src/corelibs/U2Designer/src/DesignerUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/DesignerUtils.h b/src/corelibs/U2Designer/src/DesignerUtils.h index 118f21d95675c88422d1dd04a4a0b81c7e7125dd..8f338eb21a5b276ed5bb22a8e59daf8b4f999148 100644 --- a/src/corelibs/U2Designer/src/DesignerUtils.h +++ b/src/corelibs/U2Designer/src/DesignerUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/DirectoryItem.cpp b/src/corelibs/U2Designer/src/DirectoryItem.cpp index a6dda707978686b08cc82153b238fc22169f72cd..d6ce056775e188e1fc758fb675b431775582f062 100644 --- a/src/corelibs/U2Designer/src/DirectoryItem.cpp +++ b/src/corelibs/U2Designer/src/DirectoryItem.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/DirectoryItem.h b/src/corelibs/U2Designer/src/DirectoryItem.h index 6513be760c5c9096841bd8595bb684834788305c..d0ba2c09dfaddac2459016f973e1f50b1d74da5f 100644 --- a/src/corelibs/U2Designer/src/DirectoryItem.h +++ b/src/corelibs/U2Designer/src/DirectoryItem.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/EditBreakpointLabelsDialog.cpp b/src/corelibs/U2Designer/src/EditBreakpointLabelsDialog.cpp index 1727f0668b1ae6b42142482e6fe0d3d12fc7a388..d54915cae35d4e08339a1448f54a1bb9010b90be 100644 --- a/src/corelibs/U2Designer/src/EditBreakpointLabelsDialog.cpp +++ b/src/corelibs/U2Designer/src/EditBreakpointLabelsDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -40,7 +40,7 @@ EditBreakpointLabelsDialog::EditBreakpointLabelsDialog(const QStringList &existi ui(new Ui_EditBreakpointLabelsDialog()) { ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22056453"); + new HelpButton(this, ui->buttonBox, "24740355"); ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2Designer/src/EditBreakpointLabelsDialog.h b/src/corelibs/U2Designer/src/EditBreakpointLabelsDialog.h index e06657bcce1b83aef16147768d2f2353768d58c3..fbaf0d2e4c33c8fb405e284792c2cd08dd3061c1 100644 --- a/src/corelibs/U2Designer/src/EditBreakpointLabelsDialog.h +++ b/src/corelibs/U2Designer/src/EditBreakpointLabelsDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/EditMarkerGroupDialog.cpp b/src/corelibs/U2Designer/src/EditMarkerGroupDialog.cpp index 5faec6f7b7df26be2d28a78109157a1b3acd893f..694fc1ad51b7b00f421d24e7f46b29efca2ad429 100644 --- a/src/corelibs/U2Designer/src/EditMarkerGroupDialog.cpp +++ b/src/corelibs/U2Designer/src/EditMarkerGroupDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -44,7 +44,7 @@ EditMarkerGroupDialog::EditMarkerGroupDialog(bool isNew, Marker *marker, Workflo : QDialog(parent), isNew(isNew), marker(NULL), allModel(_allModel), currentTypeIndex(-1) { setupUi(this); - new HelpButton(this, buttonBox, "22056337"); + new HelpButton(this, buttonBox, "24740226"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); { @@ -394,7 +394,7 @@ EditMarkerDialog::EditMarkerDialog(bool isNew, const QString &type, const QStrin : QDialog(parent), isNew(isNew), type(type), name(name), values(values), editWidget(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22056337"); + new HelpButton(this, buttonBox, "24740226"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); if (!isNew) { diff --git a/src/corelibs/U2Designer/src/EditMarkerGroupDialog.h b/src/corelibs/U2Designer/src/EditMarkerGroupDialog.h index 5612e7a7638055d5e4903caeda490c387e3b918d..8d0011ac283552b70b1d3b5dbca62931e12a60fb 100644 --- a/src/corelibs/U2Designer/src/EditMarkerGroupDialog.h +++ b/src/corelibs/U2Designer/src/EditMarkerGroupDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/EstimationReporter.cpp b/src/corelibs/U2Designer/src/EstimationReporter.cpp index d9aba49ab4f4b910f822dfc308b1e6ba134bb7bc..214d27410600eff44e6e603ab074c480d04734ec 100644 --- a/src/corelibs/U2Designer/src/EstimationReporter.cpp +++ b/src/corelibs/U2Designer/src/EstimationReporter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -20,55 +20,12 @@ */ #include <QApplication> -#include <QWebFrame> #include <QTextStream> -#include <U2Core/U2SafePoints.h> - #include "EstimationReporter.h" namespace U2 { -static QWebFrame * frame(QWebView *view) { - return view->page()->mainFrame(); -} - -static void eval(QWebView *view, const QString &code) { - frame(view)->evaluateJavaScript(code); -} - -static QString getHtml(const QString &loadUrl) { - QFile file(loadUrl); - bool opened = file.open(QIODevice::ReadOnly); - if (!opened) { - coreLog.error("Can not load " + loadUrl); - return ""; - } - - QTextStream stream(&file); - stream.setCodec("UTF-8"); - QString html = stream.readAll(); - file.close(); - - return html; -} - -QWebView * EstimationReporter::generateReport(const Workflow::EstimationResult &er) { - QWebView *result = new QWebView(); - ReportGenerationHelper helper(result); - result->setHtml(getHtml(":U2Designer/html/EstimationReport.html")); - helper.waitLoading(); - SAFE_POINT(helper.loadedOk, "Can not load html", result); - - eval(result, "setTime('" + QString::number(er.timeSec) + "')"); - eval(result, "setRAM('" + QString::number(er.ramMb) + "')"); - //eval(result, "setHDD('" + QString::number(er.hddMb) + "')"); - //eval(result, "setCPU('" + QString::number(er.cpuCount) + "')"); - - result->setContextMenuPolicy(Qt::NoContextMenu); - return result; -} - static QString toTimeString(qint64 timeSec) { qint64 hours = timeSec / 3600; qint64 minutes = (timeSec - (hours * 3600)) / 60; @@ -97,21 +54,4 @@ QMessageBox * EstimationReporter::createTimeMessage(const Workflow::EstimationRe return result; } -ReportGenerationHelper::ReportGenerationHelper(QWebView *view) { - loaded = false; - loadedOk = false; - connect(view, SIGNAL(loadFinished(bool)), SLOT(sl_loadFinished(bool))); -} - -void ReportGenerationHelper::sl_loadFinished(bool ok) { - loaded = true; - loadedOk = ok; -} - -void ReportGenerationHelper::waitLoading() { - while (!loaded) { - QApplication::processEvents(); - } -} - } // U2 diff --git a/src/corelibs/U2Designer/src/EstimationReporter.h b/src/corelibs/U2Designer/src/EstimationReporter.h index bc7dddaabd82ae907831d96c05bb4947582cf635..08570081028c034c965b3d7a5006469d0df5f9a4 100644 --- a/src/corelibs/U2Designer/src/EstimationReporter.h +++ b/src/corelibs/U2Designer/src/EstimationReporter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,7 +23,6 @@ #define _U2_ESTIMATION_REPORTER_H_ #include <QMessageBox> -#include <QWebView> #include <U2Core/global.h> #include <U2Lang/SchemaEstimationTask.h> @@ -32,24 +31,9 @@ namespace U2 { class U2DESIGNER_EXPORT EstimationReporter { public: - static QWebView * generateReport(const Workflow::EstimationResult &er); static QMessageBox * createTimeMessage(const Workflow::EstimationResult &er); }; -class ReportGenerationHelper : public QObject { - Q_OBJECT -public: - ReportGenerationHelper(QWebView *view); - void waitLoading(); - bool loadedOk; - -public slots: - void sl_loadFinished(bool ok); - -private: - bool loaded; -}; - } //U2 #endif // _U2_ESTIMATION_REPORTER_H_ diff --git a/src/corelibs/U2Designer/src/FileItem.cpp b/src/corelibs/U2Designer/src/FileItem.cpp index 02e885d8e31ae004c78dca0b3856d0892f453b8b..667767d444d6e4363a8b8216bb2663a10cde0180 100644 --- a/src/corelibs/U2Designer/src/FileItem.cpp +++ b/src/corelibs/U2Designer/src/FileItem.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/FileItem.h b/src/corelibs/U2Designer/src/FileItem.h index 421060b71598718aa2a76e05798681d8f2b9e3b5..7520728656ddf73d3a353f438b3b2482c8190baf 100644 --- a/src/corelibs/U2Designer/src/FileItem.h +++ b/src/corelibs/U2Designer/src/FileItem.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/GrouperEditor.cpp b/src/corelibs/U2Designer/src/GrouperEditor.cpp index 0848399fa667a99fe1e8ecb09455239c15a38930..6dd152bc546decbaea1417d1ea51e3d146c7b524 100644 --- a/src/corelibs/U2Designer/src/GrouperEditor.cpp +++ b/src/corelibs/U2Designer/src/GrouperEditor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -55,8 +55,6 @@ QWidget *GrouperEditor::createGUI() { GrouperEditorWidget *gui = new GrouperEditorWidget(grouperModel, cfg); connect(gui, SIGNAL(si_grouperCfgChanged()), SIGNAL(si_configurationChanged())); - emit si_configurationChanged(); - return gui; } diff --git a/src/corelibs/U2Designer/src/GrouperEditor.h b/src/corelibs/U2Designer/src/GrouperEditor.h index 707352b5b4a068c145b43ff9812b36d3f89d2359..eee2a97a41e5c210777e602cc150eefa7cd86262 100644 --- a/src/corelibs/U2Designer/src/GrouperEditor.h +++ b/src/corelibs/U2Designer/src/GrouperEditor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/GrouperEditorWidget.cpp b/src/corelibs/U2Designer/src/GrouperEditorWidget.cpp index 86d96c8c4b092232eeff136d18a9fb7388a9ba37..46a325589f56ae64b65a0e9bf0cbdb9fbdca36f7 100644 --- a/src/corelibs/U2Designer/src/GrouperEditorWidget.cpp +++ b/src/corelibs/U2Designer/src/GrouperEditorWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/GrouperEditorWidget.h b/src/corelibs/U2Designer/src/GrouperEditorWidget.h index b9b955d348217e6775187dd54681038a3df4c862..3c613539277e2a8f6cc587ecb4e55f17ae6be8e6 100644 --- a/src/corelibs/U2Designer/src/GrouperEditorWidget.h +++ b/src/corelibs/U2Designer/src/GrouperEditorWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/MarkerEditor.cpp b/src/corelibs/U2Designer/src/MarkerEditor.cpp index 6e1b172cd9ca210a9ca14a78d037670d566901fa..9719ae12fb369cd1404a2248b1510cf33164ef1e 100644 --- a/src/corelibs/U2Designer/src/MarkerEditor.cpp +++ b/src/corelibs/U2Designer/src/MarkerEditor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/MarkerEditor.h b/src/corelibs/U2Designer/src/MarkerEditor.h index 699b80120fcd7a1b6caff2f78e4af8bd38c4a34a..0c734179e96663d9229ea75e0385ee56b734b57e 100644 --- a/src/corelibs/U2Designer/src/MarkerEditor.h +++ b/src/corelibs/U2Designer/src/MarkerEditor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/MarkerEditorWidget.cpp b/src/corelibs/U2Designer/src/MarkerEditorWidget.cpp index 5b7bab45a3a6c4c7c6b2778752183c360b234e19..8e718dc6febcb44120dc92cb3a5dac411bea0621 100644 --- a/src/corelibs/U2Designer/src/MarkerEditorWidget.cpp +++ b/src/corelibs/U2Designer/src/MarkerEditorWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/MarkerEditorWidget.h b/src/corelibs/U2Designer/src/MarkerEditorWidget.h index a96432a45355862820b53c0551d4ef11e5029a7a..b832b740d8d5918434545d05081f8b939dac1e53 100644 --- a/src/corelibs/U2Designer/src/MarkerEditorWidget.h +++ b/src/corelibs/U2Designer/src/MarkerEditorWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/NewBreakpointDialog.cpp b/src/corelibs/U2Designer/src/NewBreakpointDialog.cpp index 1559eb3e6c5d3a21da4280ffd1563c5c38621f1a..a07eabafb3d9cb5b33139cb292c455a4de88a5d6 100644 --- a/src/corelibs/U2Designer/src/NewBreakpointDialog.cpp +++ b/src/corelibs/U2Designer/src/NewBreakpointDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ NewBreakpointDialog::NewBreakpointDialog(const QStringList &elementsNames, QWidg Qt::WindowFlags f) : QDialog(parent, f), ui(new Ui_NewBreakpointDialog()) { ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22056452"); + new HelpButton(this, ui->buttonBox, "24740354"); ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); ui->elementCombo->addItems(elementsNames); diff --git a/src/corelibs/U2Designer/src/NewBreakpointDialog.h b/src/corelibs/U2Designer/src/NewBreakpointDialog.h index 7ada86df276d240ae1e32475bee414067a804980..12291e8a58c00d1271ad6788b9ed90f5f03d86a4 100644 --- a/src/corelibs/U2Designer/src/NewBreakpointDialog.h +++ b/src/corelibs/U2Designer/src/NewBreakpointDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/NewGrouperSlotDialog.cpp b/src/corelibs/U2Designer/src/NewGrouperSlotDialog.cpp index 5c89c2711c6a8c2a1e26817426b43ef40b953a9b..f3cd084ca28e8ae674e390ff0628591518903d7a 100644 --- a/src/corelibs/U2Designer/src/NewGrouperSlotDialog.cpp +++ b/src/corelibs/U2Designer/src/NewGrouperSlotDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -35,7 +35,7 @@ NewGrouperSlotDialog::NewGrouperSlotDialog(QWidget *parent, QList<Descriptor> &i : QDialog(parent), inSlots(inSlots), names(names) { setupUi(this); - new HelpButton(this, buttonBox, "22056335"); + new HelpButton(this, buttonBox, "24740224"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -105,7 +105,7 @@ AnnsActionDialog::AnnsActionDialog(QWidget *parent, GrouperSlotAction *action, Q : ActionDialog(parent) { setupUi(this); - new HelpButton(this, buttonBox, "22056335"); + new HelpButton(this, buttonBox, "24740224"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -152,7 +152,7 @@ SequeceActionDialog::SequeceActionDialog(QWidget *parent, GrouperSlotAction *act : ActionDialog(parent) { setupUi(this); - new HelpButton(this, buttonBox, "22056335"); + new HelpButton(this, buttonBox, "24740224"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -217,7 +217,7 @@ MsaActionDialog::MsaActionDialog(QWidget *parent, GrouperSlotAction *action) : ActionDialog(parent) { setupUi(this); - new HelpButton(this, buttonBox, "22056335"); + new HelpButton(this, buttonBox, "24740224"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); if (NULL != action) { @@ -251,7 +251,7 @@ StringActionDialog::StringActionDialog(QWidget *parent, GrouperSlotAction *actio : ActionDialog(parent) { setupUi(this); - new HelpButton(this, buttonBox, "22056335"); + new HelpButton(this, buttonBox, "24740224"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); if (NULL != action) { diff --git a/src/corelibs/U2Designer/src/NewGrouperSlotDialog.h b/src/corelibs/U2Designer/src/NewGrouperSlotDialog.h index 7258b7d120342e122de4b3ec1a251584d11f660d..3e411596e3e3839574c8ccc43b09ca86896b3b1e 100644 --- a/src/corelibs/U2Designer/src/NewGrouperSlotDialog.h +++ b/src/corelibs/U2Designer/src/NewGrouperSlotDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/OutputFileDialog.cpp b/src/corelibs/U2Designer/src/OutputFileDialog.cpp index 9342fad8611320b0abfda36db66bc66969943798..890fc9406f9e8e518e9dc444206f6c39cfc68fba 100644 --- a/src/corelibs/U2Designer/src/OutputFileDialog.cpp +++ b/src/corelibs/U2Designer/src/OutputFileDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/OutputFileDialog.h b/src/corelibs/U2Designer/src/OutputFileDialog.h index 38f66b8a00bfa1d8ce6fd86de67f9af12003c08f..59c7f63b9d1362fa3ca4575f5cd39a3d932d6add 100644 --- a/src/corelibs/U2Designer/src/OutputFileDialog.h +++ b/src/corelibs/U2Designer/src/OutputFileDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/PropertyWidget.cpp b/src/corelibs/U2Designer/src/PropertyWidget.cpp index 1dcf7d2ea997a43cc101be275bd2279965a80062..11fd868d4ce1e5bffe74d084e31dd3d7c7e4a23f 100644 --- a/src/corelibs/U2Designer/src/PropertyWidget.cpp +++ b/src/corelibs/U2Designer/src/PropertyWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,6 +19,7 @@ * MA 02110-1301, USA. */ +#include <QKeyEvent> #include <QLayout> #include <QListView> #include <QMessageBox> @@ -45,37 +46,75 @@ namespace U2 { /************************************************************************/ -/* DefaultPropertyWidget */ +/* AbstractDefaultPropertyWidget */ /************************************************************************/ -DefaultPropertyWidget::DefaultPropertyWidget(int maxLength, QWidget *parent) -: PropertyWidget(parent) -{ - lineEdit = new QLineEdit(this); - if (maxLength >= 0) { - lineEdit->setMaxLength(maxLength); - } - addMainWidget(lineEdit); - connect(lineEdit, SIGNAL(textChanged(const QString &)), SLOT(sl_valueChanged(const QString &))); -} +BaseDefaultPropertyWidget::BaseDefaultPropertyWidget(int maxLength, QWidget *parent) + : PropertyWidget(parent) {} -QVariant DefaultPropertyWidget::value() { +QVariant BaseDefaultPropertyWidget::value() { return lineEdit->text(); } -void DefaultPropertyWidget::setValue(const QVariant &value) { +void BaseDefaultPropertyWidget::setValue(const QVariant &value) { lineEdit->setText(value.toString()); } -void DefaultPropertyWidget::setRequired() { +void BaseDefaultPropertyWidget::setRequired() { if (lineEdit->placeholderText().isEmpty()) { lineEdit->setPlaceholderText(L10N::required()); } } -void DefaultPropertyWidget::sl_valueChanged(const QString &value) { +void BaseDefaultPropertyWidget::sl_valueChanged(const QString &value) { emit si_valueChanged(value); } +void BaseDefaultPropertyWidget::configureLineEdit(const int maxLength) { + if (maxLength >= 0) { + lineEdit->setMaxLength(maxLength); + } + addMainWidget(lineEdit); + connect(lineEdit, SIGNAL(textChanged(const QString&)), SLOT(sl_valueChanged(const QString&))); +} + +/************************************************************************/ +/* DefaultPropertyWidget */ +/************************************************************************/ + +DefaultPropertyWidget::DefaultPropertyWidget(int maxLength, QWidget* parent) + : BaseDefaultPropertyWidget(maxLength, parent) +{ + lineEdit = new QLineEdit(this); + configureLineEdit(maxLength); +} + +/************************************************************************/ +/* IgnoreUpDownPropertyWidget */ +/************************************************************************/ + +IgnoreUpDownPropertyWidget::IgnoreUpDownPropertyWidget(int maxLength, QWidget* parent) + : BaseDefaultPropertyWidget(maxLength, parent) +{ + lineEdit = new LineEditIgnoreUpDown(this); + configureLineEdit(maxLength); +} + +/************************************************************************/ +/* LineEditIgnoreUpDown */ +/************************************************************************/ + +LineEditIgnoreUpDown::LineEditIgnoreUpDown(QWidget* parent) + : QLineEdit(parent) {} + +void LineEditIgnoreUpDown::keyPressEvent(QKeyEvent* e) { + if ((e->key() == Qt::Key_Up) || (e->key() == Qt::Key_Down)) { + e->ignore(); + return; + } + + QLineEdit::keyPressEvent(e); +} + /************************************************************************/ /* SpinBoxWidget */ /************************************************************************/ @@ -555,7 +594,6 @@ void URLWidget::sl_browse() { urlLine->sl_onBrowse(); return; } - RunFileSystem *rfs = getRFS(); if (NULL == rfs) { urlLine->sl_onBrowse(); diff --git a/src/corelibs/U2Designer/src/PropertyWidget.h b/src/corelibs/U2Designer/src/PropertyWidget.h index 052a94d6adf860f65520198cb326f46171e5ba11..6b9ddaf61187ced7b271612fa59baba27e8bff96 100644 --- a/src/corelibs/U2Designer/src/PropertyWidget.h +++ b/src/corelibs/U2Designer/src/PropertyWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -42,25 +42,60 @@ namespace U2 { typedef QPair<QString, QVariant> ComboItem; /************************************************************************/ -/* DefaultPropertyWidget */ +/* BaseDefaultPropertyWidget */ /************************************************************************/ + static const int NO_LIMIT = -1; -class DefaultPropertyWidget : public PropertyWidget { +class BaseDefaultPropertyWidget : public PropertyWidget { Q_OBJECT public: - DefaultPropertyWidget(int maxLength = NO_LIMIT, QWidget *parent = NULL); + BaseDefaultPropertyWidget(int maxLength, QWidget *parent); virtual QVariant value(); virtual void setValue(const QVariant &value); virtual void setRequired(); -private: +protected: + void configureLineEdit(const int maxLength); + QLineEdit *lineEdit; private slots: void sl_valueChanged(const QString &value); }; +/************************************************************************/ +/* DefaultPropertyWidget */ +/************************************************************************/ + +class DefaultPropertyWidget : public BaseDefaultPropertyWidget { + Q_OBJECT +public: + DefaultPropertyWidget(int maxLength = NO_LIMIT, QWidget* parent = nullptr); +}; + +/************************************************************************/ +/* IgnoreUpDownPropertyWidget */ +/************************************************************************/ + +class IgnoreUpDownPropertyWidget : public BaseDefaultPropertyWidget { + Q_OBJECT +public: + IgnoreUpDownPropertyWidget(int maxLength = NO_LIMIT, QWidget* parent = nullptr); +}; + +/************************************************************************/ +/* LineEditSkipUpDown */ +/************************************************************************/ + +class LineEditIgnoreUpDown : public QLineEdit { +public: + LineEditIgnoreUpDown(QWidget* parent = nullptr); + +private: + void keyPressEvent(QKeyEvent* e) override; +}; + /************************************************************************/ /* SpinBoxWidget */ /************************************************************************/ diff --git a/src/corelibs/U2Designer/src/QDScheduler.cpp b/src/corelibs/U2Designer/src/QDScheduler.cpp index 92e9dea3aba604c2ed25158f8c8d630b05f98557..1fb8dc0b5c691a6bf19aedbcfd637b57aa1caa08 100644 --- a/src/corelibs/U2Designer/src/QDScheduler.cpp +++ b/src/corelibs/U2Designer/src/QDScheduler.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/QDScheduler.h b/src/corelibs/U2Designer/src/QDScheduler.h index 750b0be04268151319d45dddaa114d8e8c256d56..fcab20f3dc43a7ebcc0c6967b8f8ce57778a731b 100644 --- a/src/corelibs/U2Designer/src/QDScheduler.h +++ b/src/corelibs/U2Designer/src/QDScheduler.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/UrlItem.cpp b/src/corelibs/U2Designer/src/UrlItem.cpp index d8f05d71e37eceff40003054604130db231a85b5..bc628165b0efbb7491d6e4a47be603f48ad841e2 100644 --- a/src/corelibs/U2Designer/src/UrlItem.cpp +++ b/src/corelibs/U2Designer/src/UrlItem.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/UrlItem.h b/src/corelibs/U2Designer/src/UrlItem.h index deba4f4924195d111c48b46da8dfd36952bbd70a..686240cc8630fbd6d547f314e4597b430e8cb3c0 100644 --- a/src/corelibs/U2Designer/src/UrlItem.h +++ b/src/corelibs/U2Designer/src/UrlItem.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/WorkflowGUIUtils.cpp b/src/corelibs/U2Designer/src/WorkflowGUIUtils.cpp index 4a8bfd3ca8d7fb9654d0aac9d35118f69e66f167..d7a56f1b1fa06e20ce6ca978d46aab791038303e 100644 --- a/src/corelibs/U2Designer/src/WorkflowGUIUtils.cpp +++ b/src/corelibs/U2Designer/src/WorkflowGUIUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -143,6 +143,7 @@ void DesignerGUIUtils::setupSamplesDocument(const Descriptor& d, const QIcon& ic if (hasIcon) { doc->addResource(QTextDocument::ImageResource, QUrl(img), ico.pixmap(200)); } + QString body = d.getDocumentation().toHtmlEscaped().replace("\n", "<br>"); int brk = body.indexOf("<br><br>"); int shift = 8; diff --git a/src/corelibs/U2Designer/src/WorkflowGUIUtils.h b/src/corelibs/U2Designer/src/WorkflowGUIUtils.h index 7722dd1e15de5c7cae7629c059341b5de1611119..44335a4003c2afdff498caa8e5dd6357732c5b38 100644 --- a/src/corelibs/U2Designer/src/WorkflowGUIUtils.h +++ b/src/corelibs/U2Designer/src/WorkflowGUIUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/dashboard/Dashboard.cpp b/src/corelibs/U2Designer/src/dashboard/Dashboard.cpp index 63a1d54804cdbf4a5fe12fac129f7282a0b1c5e3..a228fd65737fb7ce622cfa4c000095c375fb59f0 100644 --- a/src/corelibs/U2Designer/src/dashboard/Dashboard.cpp +++ b/src/corelibs/U2Designer/src/dashboard/Dashboard.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,323 +24,129 @@ #include <QDesktopServices> #include <QDir> #include <QFile> +#include <QJsonDocument> +#include <QJsonObject> #include <QMessageBox> #include <QSettings> -#include <QWebFrame> -#include <QTextStream> #include <U2Core/AppContext.h> +#include <U2Core/AppSettings.h> #include <U2Core/GUrlUtils.h> #include <U2Core/ProjectModel.h> #include <U2Core/Task.h> #include <U2Core/U2OpStatusUtils.h> #include <U2Core/U2SafePoints.h> +#include <U2Core/UserApplicationsSettings.h> + +#include <U2Designer/DashboardInfoRegistry.h> #include <U2Gui/MainWindow.h> -#include <U2Lang/ActorModel.h> +#include <U2Lang/URLAttribute.h> +#include <U2Lang/URLContainer.h> #include <U2Lang/WorkflowSettings.h> +#include <U2Lang/WorkflowUtils.h> #include "Dashboard.h" -#include "ExternalToolsWidget.h" -#include "OutputFilesWidget.h" -#include "ParametersWidget.h" -#include "NotificationsWidget.h" -#include "ResourcesWidget.h" -#include "StatisticsWidget.h" +#include "DashboardPageController.h" namespace U2 { -static const QString REPORT_SUB_DIR("report/"); -static const QString DB_FILE_NAME("dashboard.html"); -static const QString SETTINGS_FILE_NAME("settings.ini"); -static const QString OPENED_SETTING("opened"); -static const QString NAME_SETTING("name"); +const QString Dashboard::REPORT_SUB_DIR = "report/"; +const QString Dashboard::DB_FILE_NAME = "dashboard.html"; +const QString Dashboard::SETTINGS_FILE_NAME = "settings.ini"; +const QString Dashboard::OPENED_SETTING = "opened"; +const QString Dashboard::NAME_SETTING = "name"; + +const QString Dashboard::STATE_RUNNING = "RUNNING"; +const QString Dashboard::STATE_RUNNING_WITH_PROBLEMS = "RUNNING_WITH_PROBLEMS"; +const QString Dashboard::STATE_FINISHED_WITH_PROBLEMS = "FINISHED_WITH_PROBLEMS"; +const QString Dashboard::STATE_FAILED = "FAILED"; +const QString Dashboard::STATE_SUCCESS = "SUCCESS"; +const QString Dashboard::STATE_CANCELED = "CANCELED"; /************************************************************************/ /* Dashboard */ /************************************************************************/ -const QString Dashboard::EXT_TOOLS_TAB_ID = "#ext_tools_tab"; -const QString Dashboard::OVERVIEW_TAB_ID = "#overview_tab"; -const QString Dashboard::INPUT_TAB_ID = "#input_tab"; -//const QString Dashboard::OUTPUT_TAB_ID = "#output_tab"; - -Dashboard::Dashboard(const WorkflowMonitor *monitor, const QString &_name, QWidget *parent) - : QWebView(parent), loaded(false), name(_name), opened(true), _monitor(monitor), initialized(false), workflowInProgress(true) +Dashboard::Dashboard(const WorkflowMonitor *monitor, const QString &name, QWidget *parent) + : U2WebView(parent), + loadingStarted(false), + loadUrl("qrc:///U2Designer/html/Dashboard.html"), + name(name), + opened(true), + monitor(monitor), + workflowInProgress(true), + dashboardPageController(new DashboardPageController(this)) { - etWidgetController = new ExternalToolsWidgetController; + connect(monitor, SIGNAL(si_report()), SLOT(sl_serialize())); + connect(monitor, SIGNAL(si_dirSet(const QString &)), SLOT(sl_setDirectory(const QString &))); + connect(monitor, SIGNAL(si_taskStateChanged(Monitor::TaskState)), SLOT(sl_workflowStateChanged(Monitor::TaskState))); - connect(this, SIGNAL(loadFinished(bool)), SLOT(sl_loaded(bool))); - connect(_monitor, SIGNAL(si_report()), SLOT(sl_serialize())); - connect(_monitor, SIGNAL(si_dirSet(const QString &)), SLOT(sl_setDirectory(const QString &))); - connect(_monitor, SIGNAL(si_taskStateChanged(Monitor::TaskState)), SLOT(sl_workflowStateChanged(Monitor::TaskState))); - connect(_monitor, SIGNAL(si_logChanged(U2::Workflow::Monitor::LogEntry)), - etWidgetController, SLOT(sl_onLogChanged(U2::Workflow::Monitor::LogEntry))); + connect(dashboardPageController, SIGNAL(si_pageReady()), SLOT(sl_serialize())); + connect(dashboardPageController, SIGNAL(si_pageReady()), SLOT(sl_pageReady())); setContextMenuPolicy(Qt::NoContextMenu); - loadUrl = ":U2Designer/html/Dashboard.html"; loadDocument(); setObjectName("Dashboard"); } Dashboard::Dashboard(const QString &dirPath, QWidget *parent) - : QWebView(parent), loaded(false), dir(dirPath), opened(true), _monitor(NULL), initialized(false), workflowInProgress(false) + : U2WebView(parent), + loadingStarted(false), + loadUrl(QUrl::fromLocalFile(dirPath + REPORT_SUB_DIR + DB_FILE_NAME).toString()), + dir(dirPath), + opened(true), + monitor(NULL), + workflowInProgress(false), + dashboardPageController(new DashboardPageController(this)) { - etWidgetController = new ExternalToolsWidgetController; - - connect(this, SIGNAL(loadFinished(bool)), SLOT(sl_loaded(bool))); setContextMenuPolicy(Qt::NoContextMenu); - loadUrl = dir + REPORT_SUB_DIR + DB_FILE_NAME; loadSettings(); saveSettings(); -} -Dashboard::~Dashboard() { - delete etWidgetController; + connect(dashboardPageController, SIGNAL(si_pageReady()), SLOT(sl_pageReady())); + setObjectName("Dashboard"); } void Dashboard::onShow() { - CHECK(!loaded, ); + CHECK(!loadingStarted, ); loadDocument(); } -void Dashboard::sl_setDirectory(const QString &value) { - dir = value; - U2OpStatus2Log os; - saveSettings(); -} - -void Dashboard::sl_workflowStateChanged(Monitor::TaskState state) { - workflowInProgress = (state == Monitor::RUNNING) || (state == Monitor::RUNNING_WITH_PROBLEMS); - if (!workflowInProgress) { - emit si_workflowStateChanged(workflowInProgress); - } +const QPointer<const WorkflowMonitor> &Dashboard::getMonitor() const { + return monitor; } void Dashboard::setClosed() { opened = false; - U2OpStatus2Log os; saveSettings(); + updateDashboard(); } -QString Dashboard::directory() const { +const QString &Dashboard::directory() const { return dir; } -QString Dashboard::getName() const { +const QString &Dashboard::getDashboardId() const { + return dir; +} + +const QString &Dashboard::getName() const { return name; } void Dashboard::setName(const QString &value) { name = value; saveSettings(); + updateDashboard(); } -void Dashboard::loadDocument() { - loaded = true; - QFile file(loadUrl); - bool opened = file.open(QIODevice::ReadOnly); - if (!opened) { - coreLog.error("Can not load " + loadUrl); - return; - } - - QTextStream stream(&file); - stream.setCodec("UTF-8"); - QString html = stream.readAll(); - file.close(); - - page()->mainFrame()->setHtml(html); -} - -void Dashboard::sl_loaded(bool ok) { - CHECK(!initialized, ); - SAFE_POINT(ok, "Loaded with errors", ); - initialized = true; - page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks); - page()->mainFrame()->addToJavaScriptWindowObject("agent", new JavascriptAgent(this)); - - doc = page()->mainFrame()->documentElement(); - if (NULL != monitor()) { - new OutputFilesWidget(addWidget(tr("Output Files"), OverviewDashTab, 0), this); - new ResourcesWidget(addWidget(tr("Workflow Task"), OverviewDashTab, 1), this); - new StatisticsWidget(addWidget(tr("Common Statistics"), OverviewDashTab, 1), this); - - sl_runStateChanged(false); - if (!monitor()->getNotifications().isEmpty()) { - sl_addNotificationsWidget(); - } - - new ParametersWidget(addWidget(tr("Parameters"), InputDashTab, 0), this); - - //new OutputFilesWidget(addWidget(tr("Output Files"), OutputDashTab, 0), this); - - createExternalToolTab(); - - connect(monitor(), SIGNAL(si_runStateChanged(bool)), SLOT(sl_runStateChanged(bool))); - connect(monitor(), SIGNAL(si_firstNotification()), SLOT(sl_addNotificationsWidget())); - } - - if (!WorkflowSettings::isShowLoadButtonHint()) { - page()->mainFrame()->documentElement().evaluateJavaScript("hideLoadBtnHint()"); - } -} - -void Dashboard::sl_addNotificationsWidget() { - // Will be removed by parent - new NotificationsWidget(addWidget(tr("Notifications"), OverviewDashTab), this); -} - -void Dashboard::sl_serialize() { - QCoreApplication::processEvents(); - QString reportDir = dir + REPORT_SUB_DIR; - QDir d(reportDir); - if (!d.exists(reportDir)) { - bool created = d.mkpath(reportDir); - if (!created) { - coreLog.error(tr("Can not create a folder: ") + reportDir); - return; - } - } - U2OpStatus2Log os; - serialize(os); - CHECK_OP(os, ); - saveSettings(); -} - -void Dashboard::serialize(U2OpStatus &os) { - QString fileName = dir + REPORT_SUB_DIR + DB_FILE_NAME; - QFile file(fileName); - bool opened = file.open(QIODevice::WriteOnly); - if (!opened) { - os.setError(tr("Can not open a file for writing: ") + fileName); - return; - } - QString html = page()->mainFrame()->toHtml(); - QTextStream stream(&file); - stream.setCodec("UTF-8"); - stream << html; - stream.flush(); - file.close(); -} - -void Dashboard::saveSettings() { - QSettings s(dir + REPORT_SUB_DIR + SETTINGS_FILE_NAME, QSettings::IniFormat); - s.setValue(OPENED_SETTING, opened); - s.setValue(NAME_SETTING, name); - s.sync(); -} - -void Dashboard::loadSettings() { - QSettings s(dir + REPORT_SUB_DIR + SETTINGS_FILE_NAME, QSettings::IniFormat); - opened = true; - name = s.value(NAME_SETTING).toString(); -} - -void Dashboard::createExternalToolTab() { - SAFE_POINT(etWidgetController, "External tools widget controller is NULL", ); - const WorkflowMonitor* mon = monitor(); - SAFE_POINT(mon, "Monitor is NULL", ); - - foreach (const WorkerParamsInfo& info, mon->getWorkersParameters()) { - SAFE_POINT(info.actor, "Actor is NULL", ); - const ActorPrototype* proto = info.actor->getProto(); - SAFE_POINT(proto, "Actor prototype is NULL", ); - - if (!proto->getExternalTools().isEmpty()) { - QString addTabJs = "addTab('" + EXT_TOOLS_TAB_ID + "','" + tr("External Tools") + "')"; - - QWebPage* mainPage = page(); - SAFE_POINT(mainPage, "Page is NULL", ); - QWebFrame* mainFrame = mainPage->mainFrame(); - SAFE_POINT(mainFrame, "Main frame is NULL", ); - - mainFrame->documentElement().evaluateJavaScript(addTabJs); - etWidgetController->getWidget(addWidget(tr("External Tools"), ExternalToolsTab, 0), this); - break; - } - } -} - -int Dashboard::containerSize(const QWebElement &insideElt, const QString &name) { - QWebElement cont = insideElt.findFirst(name); - SAFE_POINT(!cont.isNull(), "NULL container", 0); - QWebElementCollection children = cont.findAll(".widget"); - return children.count(); -} - -QWebElement Dashboard::addWidget(const QString &title, DashboardTab dashTab, int cntNum) { - // Find the tab - QString dashTabId; - if (OverviewDashTab == dashTab) { - dashTabId = OVERVIEW_TAB_ID; - } - else if (InputDashTab == dashTab) { - dashTabId = INPUT_TAB_ID; - } - /*else if (OutputDashTab == dashTab) { - dashTabId = OUTPUT_TAB_ID; - }*/ - else if (ExternalToolsTab == dashTab) { - dashTabId = EXT_TOOLS_TAB_ID; - } - else { - FAIL("Unexpected dashboard tab ID!", QWebElement()); - } - QWebElement tabContainer = doc.findFirst(dashTabId); - SAFE_POINT(!tabContainer.isNull(), "Can't find the tab container!", QWebElement()); - - // Specify if the tab has left/right inner containers - bool hasInnerContainers = true; - if (InputDashTab == dashTab || ExternalToolsTab == dashTab) { - hasInnerContainers = false; - } - - // Get the left or right inner container (if the tab allows), - // otherwise use the whole tab as a container - QWebElement mainContainer = tabContainer; - - if (hasInnerContainers) { - bool left = true; - if (0 == cntNum) { - left = true; - } else if (1 == cntNum) { - left = false; - } else if (containerSize(tabContainer, ".left-container") <= containerSize(tabContainer, ".right-container")) { - left = true; - } else { - left = false; - } - - mainContainer = tabContainer.findFirst(left ? ".left-container" : ".right-container"); - SAFE_POINT(!mainContainer.isNull(), "Can't find a container inside a tab!", QWebElement()); - } - - mainContainer.appendInside( - "<div class=\"widget\">" - "<div class=\"title\"><div class=\"title-content\">" + title + "</div></div>" - "<div class=\"widget-content\"></div>" - "</div>"); - - QWebElement widget = mainContainer.lastChild(); - return widget.findFirst(".widget-content"); -} - -const WorkflowMonitor * Dashboard::monitor() { - return _monitor; -} - -QWebElement Dashboard::getDocument() { - return doc; -} - -void Dashboard::sl_runStateChanged(bool paused) { - QString script = paused ? "pauseTimer()" : "startTimer()"; - page()->mainFrame()->evaluateJavaScript(script); +QString Dashboard::getPageFilePath() const { + return dir + REPORT_SUB_DIR + DB_FILE_NAME; } void Dashboard::loadSchema() { - QString url = dir + REPORT_SUB_DIR + WorkflowMonitor::WORKFLOW_FILE_NAME; + const QString url = dir + REPORT_SUB_DIR + WorkflowMonitor::WORKFLOW_FILE_NAME; emit si_loadSchema(url); } @@ -354,144 +160,90 @@ bool Dashboard::isWorkflowInProgress() { } void Dashboard::sl_hideLoadBtnHint() { - page()->mainFrame()->evaluateJavaScript("hideLoadBtnHint()"); + dashboardPageController->runJavaScript("hideLoadBtnHint()"); } -/************************************************************************/ -/* DashboardWidget */ -/************************************************************************/ -DashboardWidget::DashboardWidget(const QWebElement &_container, const QString &id, Dashboard *parent) - : QObject(parent), - dashboard(parent), - container(_container), - id(id) -{ - -} - -/************************************************************************/ -/* JavascriptAgent */ -/************************************************************************/ -JavascriptAgent::JavascriptAgent(Dashboard *_dashboard) -: QObject(_dashboard), dashboard(_dashboard) -{ - +void Dashboard::sl_runStateChanged(bool paused) { + QString script = paused ? "pauseTimer()" : "startTimer()"; + dashboardPageController->runJavaScript(script); } -void JavascriptAgent::openUrl(const QString &relative) { - QString url = absolute(relative); - QVariantMap hints; - hints[ProjectLoaderHint_OpenBySystemIfFormatDetectionFailed] = true; - Task *t = AppContext::getProjectLoader()->openWithProjectTask(url, hints); - if (t) { - AppContext::getTaskScheduler()->registerTopLevelTask(t); +void Dashboard::sl_pageReady() { + if (NULL != getMonitor()) { + connect(getMonitor(), SIGNAL(si_runStateChanged(bool)), SLOT(sl_runStateChanged(bool))); } -} -void JavascriptAgent::openByOS(const QString &relative) { - QString url = absolute(relative); - if (!QFile::exists(url)) { - QMessageBox::critical((QWidget*)AppContext::getMainWindow()->getQMainWindow(), tr("Error"), tr("The file does not exist")); - return; + if (!WorkflowSettings::isShowLoadButtonHint()) { + dashboardPageController->runJavaScript("hideLoadBtnHint()"); } - QDesktopServices::openUrl(QUrl("file:///" + url)); } -QString JavascriptAgent::absolute(const QString &url) { - if (QFileInfo(url).isAbsolute()) { - return url; +void Dashboard::sl_serialize() { + CHECK(dashboardPageController->isPageReady(), ); + QCoreApplication::processEvents(); + QString reportDir = dir + REPORT_SUB_DIR; + QDir d(reportDir); + if (!d.exists(reportDir)) { + bool created = d.mkpath(reportDir); + CHECK_EXT(created, ioLog.error(tr("Can not create a folder: ") + reportDir), ); } - return dashboard->directory() + url; -} - -void JavascriptAgent::loadSchema() { - dashboard->loadSchema(); -} - -void JavascriptAgent::hideLoadButtonHint() { - SAFE_POINT(NULL != dashboard, "NULL dashboard!", ); - dashboard->initiateHideLoadButtonHint(); -} -void JavascriptAgent::setClipboardText(const QString &text) { - QApplication::clipboard()->setText(text); + serialize(); + saveSettings(); } -/************************************************************************/ -/* LoadDashboardsTask */ -/************************************************************************/ -ScanDashboardsDirTask::ScanDashboardsDirTask() -: Task(tr("Scan dashboards folder"), TaskFlag_None) -{ - +void Dashboard::sl_setDirectory(const QString &value) { + dir = value; + saveSettings(); + reserveName(); } -void ScanDashboardsDirTask::run() { - QDir outDir(WorkflowSettings::getWorkflowOutputDirectory()); - CHECK(outDir.exists(), ); - - QFileInfoList dirs = outDir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot | QDir::NoSymLinks); - foreach (const QFileInfo &info, dirs) { - QString dirPath = info.absoluteFilePath() + "/"; - DashboardInfo dbi(dirPath); - if (isDashboardDir(dirPath, dbi)) { - result << dbi; - if (dbi.opened) { - openedDashboards << dirPath; - } - } +void Dashboard::sl_workflowStateChanged(Monitor::TaskState state) { + workflowInProgress = (state == Monitor::RUNNING) || (state == Monitor::RUNNING_WITH_PROBLEMS); + if (!workflowInProgress) { + emit si_workflowStateChanged(workflowInProgress); + registerDashboard(); + AppContext::getDashboardInfoRegistry()->releaseReservedName(getDashboardId()); } } -bool ScanDashboardsDirTask::isDashboardDir(const QString &dirPath, DashboardInfo &info) { - QDir dir(dirPath + REPORT_SUB_DIR); - CHECK(dir.exists(), false); - CHECK(dir.exists(DB_FILE_NAME), false); - CHECK(dir.exists(SETTINGS_FILE_NAME), false); - - QSettings s(dirPath + REPORT_SUB_DIR + SETTINGS_FILE_NAME, QSettings::IniFormat); - info.opened = s.value(OPENED_SETTING).toBool(); - info.name = s.value(NAME_SETTING).toString(); - return true; +void Dashboard::loadDocument() { + loadingStarted = true; + dashboardPageController->loadPage(loadUrl); } -QStringList ScanDashboardsDirTask::getOpenedDashboards() const { - return openedDashboards; +void Dashboard::serialize() { + dashboardPageController->savePage(getPageFilePath()); } -QList<DashboardInfo> ScanDashboardsDirTask::getResult() const { - return result; +void Dashboard::saveSettings() { + QSettings settings(dir + REPORT_SUB_DIR + SETTINGS_FILE_NAME, QSettings::IniFormat); + settings.setValue(OPENED_SETTING, opened); + settings.setValue(NAME_SETTING, name); + settings.sync(); } -/************************************************************************/ -/* RemoveDashboardsTask */ -/************************************************************************/ -RemoveDashboardsTask::RemoveDashboardsTask(const QList<DashboardInfo> &_dashboards) -: Task(tr("Remove dashboards"), TaskFlag_None), dashboards(_dashboards) -{ - -} -void RemoveDashboardsTask::run() { - foreach (const DashboardInfo &info, dashboards) { - U2OpStatus2Log os; - GUrlUtils::removeDir(info.path, os); - } +void Dashboard::loadSettings() { + QSettings settings(dir + REPORT_SUB_DIR + SETTINGS_FILE_NAME, QSettings::IniFormat); + opened = true; + name = settings.value(NAME_SETTING).toString(); } -/************************************************************************/ -/* DashboardInfo */ -/************************************************************************/ -DashboardInfo::DashboardInfo() { - +void Dashboard::registerDashboard() const { + DashboardInfo dashboardInfo(directory()); + dashboardInfo.name = name; + const bool registered = AppContext::getDashboardInfoRegistry()->registerEntry(dashboardInfo); + Q_ASSERT(registered); + Q_UNUSED(registered); } -DashboardInfo::DashboardInfo(const QString &dirPath, bool _opened) -: path(dirPath), opened(_opened) -{ - dirName = QDir(path).dirName(); +void Dashboard::updateDashboard() const { + DashboardInfo info(dir, opened); + info.name = name; + AppContext::getDashboardInfoRegistry()->updateDashboardInfo(info); } -bool DashboardInfo::operator==(const DashboardInfo &other) const { - return path == other.path; +void Dashboard::reserveName() const { + AppContext::getDashboardInfoRegistry()->reserveName(getDashboardId(), name); } -} // U2 +} // namespace U2 diff --git a/src/corelibs/U2Designer/src/dashboard/Dashboard.h b/src/corelibs/U2Designer/src/dashboard/Dashboard.h index 541f8844be8aa3d3938ac7ca26142e392a34ea3f..43a1cb02783a207b6365a1e54fd973b4ac70919b 100644 --- a/src/corelibs/U2Designer/src/dashboard/Dashboard.h +++ b/src/corelibs/U2Designer/src/dashboard/Dashboard.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,36 +22,37 @@ #ifndef _U2_DASHBOARD_H_ #define _U2_DASHBOARD_H_ -#include <QWebElement> -#include <QWebView> - -#include <U2Core/U2SafePoints.h> +#include <U2Gui/U2WebView.h> #include <U2Lang/WorkflowMonitor.h> namespace U2 { using namespace Workflow; +class DashboardJsAgent; +class DashboardPageController; class ExternalToolsWidgetController; -class U2DESIGNER_EXPORT Dashboard : public QWebView { +class U2DESIGNER_EXPORT Dashboard : public U2WebView { Q_OBJECT Q_DISABLE_COPY(Dashboard) public: Dashboard(const WorkflowMonitor *monitor, const QString &name, QWidget *parent); Dashboard(const QString &dirPath, QWidget *parent); - ~Dashboard(); void onShow(); - const WorkflowMonitor * monitor(); - QWebElement getDocument(); + const QPointer<const WorkflowMonitor> &getMonitor() const; + void setClosed(); - QString directory() const; + const QString &directory() const; + const QString &getDashboardId() const; - QString getName() const; + const QString &getName() const; void setName(const QString &value); + QString getPageFilePath() const; + void loadSchema(); /** Modifies the application settings and emits signal for all dashboards */ @@ -59,10 +60,24 @@ public: bool isWorkflowInProgress(); + static const QString REPORT_SUB_DIR; + static const QString DB_FILE_NAME; + static const QString SETTINGS_FILE_NAME; + static const QString OPENED_SETTING; + static const QString NAME_SETTING; + + static const QString STATE_RUNNING; + static const QString STATE_RUNNING_WITH_PROBLEMS; + static const QString STATE_FINISHED_WITH_PROBLEMS; + static const QString STATE_FAILED; + static const QString STATE_SUCCESS; + static const QString STATE_CANCELED; + signals: void si_loadSchema(const QString &url); void si_hideLoadBtnHint(); void si_workflowStateChanged(bool isRunning); + void si_serializeContent(const QString& content); public slots: /** Hides the hint on the current dashboard instance */ @@ -70,116 +85,38 @@ public slots: private slots: void sl_runStateChanged(bool paused); - void sl_loaded(bool ok); - void sl_addNotificationsWidget(); + void sl_pageReady(); void sl_serialize(); void sl_setDirectory(const QString &dir); void sl_workflowStateChanged(Monitor::TaskState state); private: - bool loaded; - QString loadUrl; - QString name; - QString dir; - bool opened; - const WorkflowMonitor *_monitor; - QWebElement doc; - bool initialized; - bool workflowInProgress; - ExternalToolsWidgetController* etWidgetController; + enum DashboardTab { + OverviewDashTab, + InputDashTab, + OutputDashTab, + ExternalToolsTab + }; - enum DashboardTab {OverviewDashTab, InputDashTab, OutputDashTab, ExternalToolsTab}; - - static const QString EXT_TOOLS_TAB_ID; - static const QString OVERVIEW_TAB_ID; - static const QString INPUT_TAB_ID; -// static const QString OUTPUT_TAB_ID; - -private: void loadDocument(); - /** Returns the content area of the widget */ - QWebElement addWidget(const QString &title, DashboardTab dashTab, int cntNum = -1); - - /** Returns size of the QWebElement "name", it is searched inside "insideElt" only*/ - int containerSize(const QWebElement &insideElt, const QString &name); - - void serialize(U2OpStatus &os); + void serialize(); void saveSettings(); void loadSettings(); - void createExternalToolTab(); -}; - -class DashboardWidget : public QObject { - Q_OBJECT -public: - DashboardWidget(const QWebElement &container, const QString &id, Dashboard *parent); - -protected: - Dashboard *dashboard; - QWebElement container; - const QString id; -}; - -class JavascriptAgent : public QObject { - Q_OBJECT -public: - JavascriptAgent(Dashboard *dashboard); - -public slots: - void openUrl(const QString &url); - void openByOS(const QString &url); - QString absolute(const QString &url); - void loadSchema(); - void hideLoadButtonHint(); - void setClipboardText(const QString &text); - -private: - Dashboard *dashboard; -}; + void registerDashboard() const; + void updateDashboard() const; + void reserveName() const; -class U2DESIGNER_EXPORT DashboardInfo { -public: - QString path; - QString dirName; + bool loadingStarted; + QString loadUrl; QString name; + QString dir; bool opened; - -public: - DashboardInfo(); - DashboardInfo(const QString &dirPath, bool opened = true); - bool operator==(const DashboardInfo &other) const; -}; - -class U2DESIGNER_EXPORT ScanDashboardsDirTask : public Task { - Q_OBJECT -public: - ScanDashboardsDirTask(); - void run(); - - QStringList getOpenedDashboards() const; - QList<DashboardInfo> getResult() const; - -private: - bool isDashboardDir(const QString &dirPath, DashboardInfo &info); - -private: - QStringList openedDashboards; - QList<DashboardInfo> result; -}; - -class U2DESIGNER_EXPORT RemoveDashboardsTask : public Task { - Q_OBJECT -public: - RemoveDashboardsTask(const QList<DashboardInfo> &dashboards); - void run(); - -private: - QList<DashboardInfo> dashboards; + const QPointer<const WorkflowMonitor> monitor; + bool workflowInProgress; + DashboardPageController *dashboardPageController; }; -} // U2 - -Q_DECLARE_METATYPE(U2::DashboardInfo); +} // namespace U2 #endif // _U2_DASHBOARD_H_ diff --git a/src/corelibs/U2Designer/src/dashboard/DashboardInfo.cpp b/src/corelibs/U2Designer/src/dashboard/DashboardInfo.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d296016b26163197edf9a99a23033b240891c13f --- /dev/null +++ b/src/corelibs/U2Designer/src/dashboard/DashboardInfo.cpp @@ -0,0 +1,49 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.unipro.ru + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QDir> + +#include "DashboardInfo.h" + +namespace U2 { + +DashboardInfo::DashboardInfo() + : opened(false) +{ + +} + +DashboardInfo::DashboardInfo(const QString &dirPath, bool opened) + : path(dirPath), + opened(opened) +{ + dirName = QDir(path).dirName(); +} + +const QString &DashboardInfo::getId() const { + return path; +} + +bool DashboardInfo::operator==(const DashboardInfo &other) const { + return path == other.path; +} + +} // namespace U2 diff --git a/src/corelibs/U2Designer/src/dashboard/DashboardInfo.h b/src/corelibs/U2Designer/src/dashboard/DashboardInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..33156c93e3c06764bff1fc1e25750894f2b8425f --- /dev/null +++ b/src/corelibs/U2Designer/src/dashboard/DashboardInfo.h @@ -0,0 +1,50 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.unipro.ru + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_DASHBOARD_INFO_H_ +#define _U2_DASHBOARD_INFO_H_ + +#include <QString> + +#include <U2Core/global.h> + +namespace U2 { + +class U2DESIGNER_EXPORT DashboardInfo { +public: + DashboardInfo(); + DashboardInfo(const QString &dirPath, bool opened = true); + + const QString &getId() const; + + bool operator==(const DashboardInfo &other) const; + + QString path; + QString dirName; + QString name; + bool opened; +}; + +} // namespace U2 + +Q_DECLARE_METATYPE(U2::DashboardInfo) + +#endif // _U2_DASHBOARD_INFO_H_ diff --git a/src/corelibs/U2Designer/src/dashboard/DashboardInfoRegistry.cpp b/src/corelibs/U2Designer/src/dashboard/DashboardInfoRegistry.cpp new file mode 100644 index 0000000000000000000000000000000000000000..62e7f5d307f3a9f0ea7f45034db38c048e921451 --- /dev/null +++ b/src/corelibs/U2Designer/src/dashboard/DashboardInfoRegistry.cpp @@ -0,0 +1,167 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QSet> + +#include <U2Core/AppContext.h> +#include <U2Core/TaskSignalMapper.h> +#include <U2Core/U2SafePoints.h> + +#include "DashboardInfoRegistry.h" +#include "RemoveDashboardsTask.h" + +namespace U2 { + +bool DashboardInfoRegistry::registerEntry(const DashboardInfo &dashboardInfo) { + if (registerEntrySilently(dashboardInfo)) { + emit si_dashboardsListChanged(QStringList(dashboardInfo.getId()), QStringList()); + return true; + } else { + return false; + } +} + +bool DashboardInfoRegistry::unregisterEntry(const QString &id) { + if (unregisterEntrySilently(id)) { + emit si_dashboardsListChanged(QStringList(), QStringList(id)); + return true; + } else { + return false; + } +} + +DashboardInfo DashboardInfoRegistry::getById(const QString &dashboardId) const { + return registry.value(dashboardId, DashboardInfo()); +} + +QStringList DashboardInfoRegistry::getAllIds() const { + return registry.keys(); +} + +QList<DashboardInfo> DashboardInfoRegistry::getAllEntries() const { + return registry.values(); +} + +bool DashboardInfoRegistry::isEmpty() const { + return registry.isEmpty(); +} + +void DashboardInfoRegistry::scanDashboardsDir() { + if (nullptr != scanTask && !scanTask->isFinished()) { + scanTask->cancel(); + } + scanTask = new ScanDashboardsDirTask(); + connect(new TaskSignalMapper(scanTask.data()), SIGNAL(si_taskSucceeded(Task *)), SLOT(sl_scanTaskFinished())); + AppContext::getTaskScheduler()->registerTopLevelTask(scanTask); + emit si_scanningStarted(); +} + +void DashboardInfoRegistry::removeDashboards(const QStringList &ids) { + QList<DashboardInfo> dashboardInfos; + foreach (const QString &id, ids) { + if (registry.contains(id)) { + dashboardInfos << registry[id]; + unregisterEntrySilently(id); + } + } + RemoveDashboardsTask *removeTask = new RemoveDashboardsTask(dashboardInfos); + AppContext::getTaskScheduler()->registerTopLevelTask(removeTask); + + emit si_dashboardsListChanged(QStringList(), ids); +} + +void DashboardInfoRegistry::updateDashboardInfo(const DashboardInfo &newDashboardInfo) { + if (updateInfo(newDashboardInfo)) { + emit si_dashboardsChanged(QStringList(newDashboardInfo.getId())); + } +} + +void DashboardInfoRegistry::updateDashboardInfos(const QList<DashboardInfo> &newDashboardInfos) { + QStringList updated; + foreach (const DashboardInfo &newDashboardInfo, newDashboardInfos) { + if (updateInfo(newDashboardInfo)) { + updated << newDashboardInfo.getId(); + } + } + emit si_dashboardsChanged(updated); +} + +void DashboardInfoRegistry::reserveName(const QString &dashboardId, const QString &name) { + reservedNames.insert(dashboardId, name); +} + +void DashboardInfoRegistry::releaseReservedName(const QString &dashboardId) { + reservedNames.remove(dashboardId); +} + +QSet<QString> DashboardInfoRegistry::getReservedNames() const { + return reservedNames.values().toSet(); +} + +void DashboardInfoRegistry::sl_scanTaskFinished() { + QStringList added; + QStringList removed; + const QList<DashboardInfo> foundInfos = scanTask->getResult(); + QList<DashboardInfo> registryValues = registry.values(); + + foreach (const DashboardInfo ®istryValue, registryValues) { + if (!foundInfos.contains(registryValue)) { + removed << registryValue.getId(); + unregisterEntrySilently(registryValue.getId()); + } + } + + registryValues = registry.values(); + foreach (const DashboardInfo &foundInfo, foundInfos) { + if (!registryValues.contains(foundInfo)) { + if (registerEntrySilently(foundInfo)) { + added << foundInfo.getId(); + } else { + coreLog.error(tr("Can't register a dashboard info: '%1'").arg(foundInfo.getId())); + } + } + } + + emit si_dashboardsListChanged(added, removed); + emit si_scanningFinished(); +} + +bool DashboardInfoRegistry::registerEntrySilently(const DashboardInfo &dashboardInfo) { + CHECK(!registry.contains(dashboardInfo.getId()), false); + registry.insert(dashboardInfo.getId(), dashboardInfo); + return true; +} + +bool DashboardInfoRegistry::unregisterEntrySilently(const QString &id) { + CHECK(registry.contains(id), false); + registry.remove(id); + return true; +} + +bool DashboardInfoRegistry::updateInfo(const DashboardInfo &newDashboardInfo) { + // DashboardInfo can be absent in the registry in case of workflow output directory changing. + // If the workflow is running during the changing, the dashboard won't be removed, but dashboardInfo will be unregistered. + CHECK(registry.contains(newDashboardInfo.getId()), false); + registry[newDashboardInfo.getId()] = newDashboardInfo; + return true; +} + +} // namespace U2 diff --git a/src/corelibs/U2Designer/src/dashboard/DashboardInfoRegistry.h b/src/corelibs/U2Designer/src/dashboard/DashboardInfoRegistry.h new file mode 100644 index 0000000000000000000000000000000000000000..dda2c1b56df5b28bce44812fd9d6c325bd37322c --- /dev/null +++ b/src/corelibs/U2Designer/src/dashboard/DashboardInfoRegistry.h @@ -0,0 +1,75 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_DASHBOARD_INFO_REGISTRY_H_ +#define _U2_DASHBOARD_INFO_REGISTRY_H_ + +#include "DashboardInfo.h" +#include "ScanDashboardsDirTask.h" + +namespace U2 { + +class U2DESIGNER_EXPORT DashboardInfoRegistry : public QObject { + Q_OBJECT +public: + bool registerEntry(const DashboardInfo &dashboardInfo); + bool unregisterEntry(const QString &id); + + DashboardInfo getById(const QString &dashboardId) const; + QStringList getAllIds() const; + QList<DashboardInfo> getAllEntries() const; + + bool isEmpty() const; + + void scanDashboardsDir(); + void removeDashboards(const QStringList &ids); + + void updateDashboardInfo(const DashboardInfo &newDashboardInfo); + void updateDashboardInfos(const QList<DashboardInfo> &newDashboardInfos); + + void reserveName(const QString &dashboardId, const QString &name); + void releaseReservedName(const QString &dashboardId); + QSet<QString> getReservedNames() const; + +private slots: + void sl_scanTaskFinished(); + +signals: + void si_scanningStarted(); + void si_scanningFinished(); + + void si_dashboardsListChanged(const QStringList &added, const QStringList &removed); + void si_dashboardsChanged(const QStringList &ids); + +private: + bool registerEntrySilently(const DashboardInfo &dashboardInfo); + bool unregisterEntrySilently(const QString &id); + bool updateInfo(const DashboardInfo &newDashboardInfo); + + QPointer<ScanDashboardsDirTask> scanTask; + + QMap<QString, DashboardInfo> registry; + QMap<QString, QString> reservedNames; // dashboards for running workflows are not registered, but they can reserve their name for the correct name rolling +}; + +} // namespace U2 + +#endif // _U2_DASHBOARD_INFO_REGISTRY_H_ diff --git a/src/corelibs/U2Designer/src/dashboard/DashboardJsAgent.cpp b/src/corelibs/U2Designer/src/dashboard/DashboardJsAgent.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c6b7320d5b7c35ef2730d4ea996d2868ec75d89a --- /dev/null +++ b/src/corelibs/U2Designer/src/dashboard/DashboardJsAgent.cpp @@ -0,0 +1,173 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.unipro.ru + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QApplication> +#include <QClipboard> +#include <QDesktopServices> +#include <QJsonArray> +#include <QJsonDocument> +#include <QJsonObject> +#include <QMessageBox> + +#include <U2Core/AppContext.h> +#include <U2Core/AppSettings.h> +#include <U2Core/ProjectModel.h> +#include <U2Core/UserApplicationsSettings.h> + +#include <U2Gui/MainWindow.h> + +#include <U2Lang/Actor.h> +#include <U2Lang/Dataset.h> +#include <U2Lang/URLContainer.h> +#include <U2Lang/WorkflowSettings.h> +#include <U2Lang/WorkflowUtils.h> + +#include "Dashboard.h" +#include "DashboardJsAgent.h" +#include "DashboardPageController.h" + +namespace U2 { + +const QString DashboardJsAgent::ID = "agent"; + +DashboardJsAgent::DashboardJsAgent(Dashboard* parent) + : JavaScriptAgent(parent), + monitor(parent->getMonitor()) +{ + fillWorkerParamsInfo(); +} + +const QString &DashboardJsAgent::getId() const { + return ID; +} + +void DashboardJsAgent::sl_onJsError(const QString& errorMessage) { + coreLog.error(errorMessage); +} + +void DashboardJsAgent::openUrl(const QString &relative) { + QString url = absolute(relative); + QVariantMap hints; + hints[ProjectLoaderHint_OpenBySystemIfFormatDetectionFailed] = true; + Task *task = AppContext::getProjectLoader()->openWithProjectTask(url, hints); + if (NULL != task) { + AppContext::getTaskScheduler()->registerTopLevelTask(task); + } +} + +void DashboardJsAgent::openByOS(const QString &relative) { + QString url = absolute(relative); + if (!QFile::exists(url)) { + QMessageBox::critical((QWidget*)AppContext::getMainWindow()->getQMainWindow(), tr("Error"), tr("The file does not exist")); + return; + } + QDesktopServices::openUrl(QUrl("file:///" + url)); +} + +QString DashboardJsAgent::absolute(const QString &url) { + if (QFileInfo(url).isAbsolute()) { + return url; + } + return qobject_cast<Dashboard*>(parent())->directory() + url; +} + +void DashboardJsAgent::loadSchema(){ + qobject_cast<Dashboard*>(parent())->loadSchema(); +} + +void DashboardJsAgent::setClipboardText(const QString &text){ + QApplication::clipboard()->setText(text); +} + +void DashboardJsAgent::hideLoadButtonHint() { + Dashboard* dashboard = qobject_cast<Dashboard*>(parent()); + SAFE_POINT(NULL != dashboard, "NULL dashboard!", ); + dashboard->initiateHideLoadButtonHint(); +} + +QString DashboardJsAgent::getLogsFolderUrl() const { + return monitor->getLogsDir(); +} + +QString DashboardJsAgent::getLogUrl(const QString &actorId, int actorRunNumber, const QString &toolName, int toolRunNumber, int contentType) const { + return monitor->getLogUrl(actorId, actorRunNumber, toolName, toolRunNumber, contentType); +} + +QString DashboardJsAgent::getWorkersParamsInfo() { + return workersParamsInfo; +} + +bool DashboardJsAgent::getShowHint() { + return WorkflowSettings::isShowLoadButtonHint(); +} + +//Worker parameters initialization +void DashboardJsAgent::fillWorkerParamsInfo() { + CHECK(monitor, ); + QJsonArray localWorkersParamsInfo; + QList<Monitor::WorkerParamsInfo> workersParamsList = monitor->getWorkersParameters(); + foreach (Monitor::WorkerParamsInfo workerInfo, workersParamsList) { + QJsonObject workerInfoJS; + workerInfoJS["workerName"] = workerInfo.workerName; + workerInfoJS["actor"] = workerInfo.actor->getLabel(); + QJsonArray parameters; + foreach (Attribute* parameter, workerInfo.parameters) { + QJsonObject parameterJS; + parameterJS["name"] = parameter->getDisplayName(); + QVariant paramValueVariant = parameter->getAttributePureValue(); + if (paramValueVariant.canConvert< QList<Dataset> >()) { + QList<Dataset> sets = paramValueVariant.value< QList<Dataset > >(); + foreach (const Dataset &set, sets) { + QString paramName = parameter->getDisplayName(); + if (sets.size() > 1) { + paramName += ": <i>" + set.getName() + "</i>"; + } + parameterJS["name"] = paramName; + QStringList urls; + foreach (URLContainer *c, set.getUrls()) { + urls << c->getUrl(); + } + parameterJS["value"] = urls.join(";"); + parameterJS["isDataset"] = true; + parameters.append(parameterJS); + } + } else { + parameterJS["value"] = WorkflowUtils::getStringForParameterDisplayRole(paramValueVariant); + UrlAttributeType type = WorkflowUtils::isUrlAttribute(parameter, workerInfo.actor); + if (type == NotAnUrl || QString::compare(paramValueVariant.toString(), "default", Qt::CaseInsensitive) == 0) { + parameterJS["isUrl"] = false; + } else { + parameterJS["isUrl"] = true; + if (type == InputDir || type == OutputDir) { + parameterJS["type"] = "Dir"; + } + } + parameters.append(parameterJS); + } + } + workerInfoJS["parameters"] = parameters; + localWorkersParamsInfo.append(workerInfoJS); + QJsonDocument doc(localWorkersParamsInfo); + workersParamsInfo = doc.toJson(QJsonDocument::Compact); + } +} + +} // namespace U2 diff --git a/src/corelibs/U2Designer/src/dashboard/DashboardJsAgent.h b/src/corelibs/U2Designer/src/dashboard/DashboardJsAgent.h new file mode 100644 index 0000000000000000000000000000000000000000..196c3fe02ddbfc7c27d49b87db0c3bbb17b2048f --- /dev/null +++ b/src/corelibs/U2Designer/src/dashboard/DashboardJsAgent.h @@ -0,0 +1,82 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.unipro.ru + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_DASHBOARD_JS_AGENT_H_ +#define _U2_DASHBOARD_JS_AGENT_H_ + +#include <QPointer> + +#include <U2Gui/JavaScriptAgent.h> + +#include <U2Lang/WorkflowMonitor.h> + +namespace U2 { + +class Dashboard; + +class DashboardJsAgent : public JavaScriptAgent { + Q_OBJECT + + Q_PROPERTY(QString workersParamsInfo READ getWorkersParamsInfo CONSTANT) + Q_PROPERTY(bool showHint READ getShowHint CONSTANT) + +public: + DashboardJsAgent(Dashboard* parent); + + const QString &getId() const; + + Q_INVOKABLE QString getWorkersParamsInfo(); + +public slots: + void sl_onJsError(const QString& errorMessage); + + void openUrl(const QString &url); + void openByOS(const QString &url); + QString absolute(const QString &url); + void loadSchema(); + void setClipboardText(const QString &text); + void hideLoadButtonHint(); + QString getLogsFolderUrl() const; + QString getLogUrl(const QString &actorId, int actorRunNumber, const QString &toolName, int toolRunNumber, int contentType) const; + +signals: + void si_progressChanged(int progress); + void si_taskStateChanged(QString state); + void si_newProblem(QString problem); //workaround for Qt5.4 and Qt5.5, sould be simple QJsonObject. More info see https://bugreports.qt.io/browse/QTBUG-48198 + void si_workerStatsInfoChanged(QString info); //workaround for Qt5.4 and Qt5.5, sould be simple QJsonObject. More info see https://bugreports.qt.io/browse/QTBUG-48198 + void si_workerStatsUpdate(QString workersStatisticsInfo); //workaround for Qt5.4, sould be simple QJsonArray. + void si_onLogChanged(QString logEntry); //workaround for Qt5.4 and Qt5.5, sould be simple QJsonObject. More info see https://bugreports.qt.io/browse/QTBUG-48198 + void si_newOutputFile(QString fileInfo); //workaround for Qt5.4 and Qt5.5, sould be simple QJsonObject. More info see https://bugreports.qt.io/browse/QTBUG-48198 + void si_createOutputWidget(); + +private: + Q_INVOKABLE bool getShowHint(); + void fillWorkerParamsInfo(); + + QString workersParamsInfo; + const QPointer<const WorkflowMonitor> monitor; + + static const QString ID; +}; + +} // namespace U2 + +#endif // _U2_DASHBOARD_JS_AGENT_H_ diff --git a/src/corelibs/U2Designer/src/dashboard/DashboardPageController.cpp b/src/corelibs/U2Designer/src/dashboard/DashboardPageController.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3f03d069a2a81402020ecf70cd2ae237e0ffd187 --- /dev/null +++ b/src/corelibs/U2Designer/src/dashboard/DashboardPageController.cpp @@ -0,0 +1,245 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QJsonArray> +#include <QJsonDocument> +#include <QJsonObject> +#include <QMetaMethod> + +#include <U2Gui/WebViewController.h> + +#include "Dashboard.h" +#include "DashboardJsAgent.h" +#include "DashboardPageController.h" + +namespace U2 { + +DashboardPageController::DashboardPageController(Dashboard *_dashboard) + : SimpleWebViewBasedWidgetController(_dashboard, new DashboardJsAgent(_dashboard)), + progress(0), + state(Dashboard::STATE_RUNNING), + dashboard(_dashboard), + monitor(_dashboard->getMonitor()) +{ + if (NULL != monitor) { + connect(monitor, SIGNAL(si_progressChanged(int)), SLOT(sl_progressChanged(int))); + connect(monitor, SIGNAL(si_taskStateChanged(Monitor::TaskState)), SLOT(sl_taskStateChanged(Monitor::TaskState))); + connect(monitor, SIGNAL(si_newNotification(WorkflowNotification, int)), SLOT(sl_newNotification(WorkflowNotification, int)), Qt::UniqueConnection); + connect(monitor, SIGNAL(si_workerInfoChanged(const QString &, const Monitor::WorkerInfo &)), + SLOT(sl_workerInfoChanged(const QString &, const Monitor::WorkerInfo &))); + connect(monitor, SIGNAL(si_updateProducers()), SLOT(sl_workerStatsUpdate())); + connect(monitor, SIGNAL(si_newOutputFile(const Monitor::FileInfo &)), + SLOT(sl_newOutputFile(const Monitor::FileInfo &))); + connect(monitor, SIGNAL(si_logChanged(Monitor::LogEntry)), SLOT(sl_onLogChanged(Monitor::LogEntry))); + + foreach (const WorkflowNotification ¬ification, monitor->getNotifications()) { + sl_newNotification(notification, 0); // TODO: fix count of notifications + } + } +} + +DashboardJsAgent *DashboardPageController::getAgent() { + return qobject_cast<DashboardJsAgent *>(agent); +} + +void DashboardPageController::sl_pageIsAboutToBeInitialized() { + if (NULL != monitor) { + runJavaScript("setNeedCreateWidgets(true);"); + } + SimpleWebViewBasedWidgetController::sl_pageIsAboutToBeInitialized(); +} + +void DashboardPageController::sl_pageInitialized() { + initData(); + SimpleWebViewBasedWidgetController::sl_pageInitialized(); +} + +void DashboardPageController::sl_progressChanged(int newProgress) { + progress = newProgress; + if (isPageReady()) { + emit getAgent()->si_progressChanged(progress); + } +} + +namespace { + +QString state2String(Monitor::TaskState state) { + switch (state) { + case Monitor::RUNNING: + return Dashboard::STATE_RUNNING; + case Monitor::RUNNING_WITH_PROBLEMS: + return Dashboard::STATE_RUNNING_WITH_PROBLEMS; + case Monitor::FINISHED_WITH_PROBLEMS: + return Dashboard::STATE_FINISHED_WITH_PROBLEMS; + case Monitor::FAILED: + return Dashboard::STATE_FAILED; + case Monitor::SUCCESS: + return Dashboard::STATE_SUCCESS; + default: + return Dashboard::STATE_CANCELED; + } +} + +} + +void DashboardPageController::sl_taskStateChanged(Monitor::TaskState newState) { + state = state2String(newState); + if (isPageReady()) { + emit getAgent()->si_taskStateChanged(state); + } +} + +void DashboardPageController::sl_newNotification(const WorkflowNotification ¬ification, int count) { + const QString serializedNotification = serializeNotification(notification, count); + if (isPageReady()) { + emit getAgent()->si_newProblem(serializedNotification); + } else { + problems << serializedNotification; + } +} + +void DashboardPageController::sl_workerInfoChanged(const QString &actorId, const Monitor::WorkerInfo &info) { + const QString serializedInfo = serializeWorkerInfo(actorId, info); + if (isPageReady()) { + emit getAgent()->si_workerStatsInfoChanged(serializedInfo); + } else { + workerInfos << serializedInfo; + } +} + +void DashboardPageController::sl_workerStatsUpdate() { + SAFE_POINT(NULL != monitor, "WorkflowMonitor is NULL", ); + const QString serializedStatistics = serializeWorkerStatistics(monitor->getWorkersInfo()); + if (isPageReady()) { + emit getAgent()->si_workerStatsUpdate(serializedStatistics); + } else { + workersStatisticsInfos << serializedStatistics; + } +} + +void DashboardPageController::sl_onLogChanged(const Monitor::LogEntry &entry) { + const QString serializedLogEntry = serializeLogEntry(entry); + if (isPageReady()) { + emit getAgent()->si_onLogChanged(serializedLogEntry); + } else { + logEntries << serializedLogEntry; + } +} + +void DashboardPageController::sl_newOutputFile(const Monitor::FileInfo &info) { + const QString serializedFileInfo = serializeFileInfo(info); + if (isPageReady()) { + emit getAgent()->si_newOutputFile(serializedFileInfo); + } else { + fileInfos << serializedFileInfo; + } +} + +void DashboardPageController::initData() { + emit getAgent()->si_progressChanged(progress); + emit getAgent()->si_taskStateChanged(state); + + foreach (const QString &problem, problems) { + emit getAgent()->si_newProblem(problem); + } + + foreach (const QString &workerInfo, workerInfos) { + emit getAgent()->si_workerStatsInfoChanged(workerInfo); + } + + foreach (const QString &workersStatisticsInfo, workersStatisticsInfos) { + emit getAgent()->si_workerStatsUpdate(workersStatisticsInfo); + } + + foreach (const QString &fileInfo, fileInfos) { + emit getAgent()->si_newOutputFile(fileInfo); + } + + foreach (const QString &entry, logEntries) { + emit getAgent()->si_onLogChanged(entry); + } +} + +QString DashboardPageController::serializeNotification(const WorkflowNotification &problem, int count) const { + SAFE_POINT(NULL != monitor, "WorkflowMonitor is NULL", ""); + QJsonObject infoJS; + infoJS["actorId"] = problem.actorId; + infoJS["actorName"] = monitor->actorName(problem.actorId); + infoJS["type"] = problem.type; + infoJS["message"] = problem.message; + infoJS["count"] = count; + const QJsonDocument doc(infoJS); + return QString(doc.toJson(QJsonDocument::Compact)); +} + +QString DashboardPageController::serializeWorkerInfo(const QString &actorId, const Monitor::WorkerInfo &info) const { + SAFE_POINT(NULL != monitor, "WorkflowMonitor is NULL", ""); + QJsonObject infoJS; + infoJS["actorId"] = actorId; + infoJS["actor"] = monitor->actorName(actorId); + infoJS["timeMks"] = info.timeMks; + infoJS["countOfProducedData"] = monitor->getDataProduced(actorId); + QJsonDocument doc(infoJS); + return QString(doc.toJson(QJsonDocument::Compact)); +} + +QString DashboardPageController::serializeWorkerStatistics(const QMap<QString, Monitor::WorkerInfo> &workersStatistics) const { + SAFE_POINT(NULL != monitor, "WorkflowMonitor is NULL", ""); + QJsonArray workersStatisticsInfo; + foreach (const QString &actorId, workersStatistics.keys()) { + Monitor::WorkerInfo info = workersStatistics[actorId]; + QJsonObject infoJS; + infoJS["actorId"] = actorId; + infoJS["actor"] = monitor->actorName(actorId); + infoJS["timeMks"] = info.timeMks; + infoJS["countOfProducedData"] = monitor->getDataProduced(actorId); + workersStatisticsInfo.append(infoJS); + } + + QJsonDocument doc(workersStatisticsInfo); + return QString(doc.toJson(QJsonDocument::Compact)); +} + +QString DashboardPageController::serializeLogEntry(const Monitor::LogEntry &entry) const { + QJsonObject entryJS; + entryJS["toolName"] = entry.toolName; + entryJS["actorId"] = entry.actorId; + entryJS["actorName"] = entry.actorName; + entryJS["actorRunNumber"] = entry.actorRunNumber; + entryJS["toolRunNumber"] = entry.toolRunNumber; + entryJS["contentType"] = entry.contentType; + entryJS["lastLine"] = entry.lastLine; + QJsonDocument doc(entryJS); + return QString(doc.toJson(QJsonDocument::Compact)); +} + +QString DashboardPageController::serializeFileInfo(const Monitor::FileInfo &info) const { + SAFE_POINT(NULL != monitor, "WorkflowMonitor is NULL", ""); + QJsonObject infoJS; + infoJS["actor"] = monitor->actorName(info.actor); + infoJS["url"] = info.url; + infoJS["openBySystem"] = info.openBySystem; + infoJS["isDir"] = info.isDir; + QJsonDocument doc(infoJS); + return QString(doc.toJson(QJsonDocument::Compact)); +} + +} // namespace U2 diff --git a/src/corelibs/U2Designer/src/dashboard/DashboardPageController.h b/src/corelibs/U2Designer/src/dashboard/DashboardPageController.h new file mode 100644 index 0000000000000000000000000000000000000000..ea879aa9541194ece66eb10ba94caea1c1845738 --- /dev/null +++ b/src/corelibs/U2Designer/src/dashboard/DashboardPageController.h @@ -0,0 +1,76 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.unipro.ru + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_DASHBOARD_PAGE_CONTROLLER_H_ +#define _U2_DASHBOARD_PAGE_CONTROLLER_H_ + +#include <U2Gui/SimpleWebViewBasedWidgetController.h> + +#include <U2Lang/WorkflowMonitor.h> + +namespace U2 { + +class Dashboard; +class DashboardJsAgent; +class WebViewController; + +class DashboardPageController : public SimpleWebViewBasedWidgetController { + Q_OBJECT +public: + DashboardPageController(Dashboard *dashboard); + + DashboardJsAgent *getAgent(); + +private slots: + void sl_pageIsAboutToBeInitialized(); + void sl_pageInitialized(); + void sl_progressChanged(int progress); + void sl_taskStateChanged(Monitor::TaskState state); + void sl_newNotification(const WorkflowNotification ¬ification, int count); + void sl_workerInfoChanged(const QString &actorId, const Monitor::WorkerInfo &info); + void sl_workerStatsUpdate(); + void sl_onLogChanged(const Monitor::LogEntry &entry); + void sl_newOutputFile(const Monitor::FileInfo &info); + +private: + void initData(); + + QString serializeNotification(const WorkflowNotification &problem, int count) const; + QString serializeWorkerInfo(const QString &actorId, const Monitor::WorkerInfo &info) const; + QString serializeWorkerStatistics(const QMap<QString, Monitor::WorkerInfo> &workersStatistics) const; + QString serializeLogEntry(const Monitor::LogEntry &entry) const; + QString serializeFileInfo(const Monitor::FileInfo &info) const; + + int progress; + QString state; + QStringList problems; + QStringList workerInfos; + QStringList workersStatisticsInfos; + QStringList logEntries; + QStringList fileInfos; + + QPointer<Dashboard> dashboard; + const QPointer<const WorkflowMonitor> monitor; +}; + +} // namespace U2 + +#endif // _U2_DASHBOARD_PAGE_CONTROLLER_H_ diff --git a/src/corelibs/U2Designer/src/dashboard/ExternalToolsWidget.cpp b/src/corelibs/U2Designer/src/dashboard/ExternalToolsWidget.cpp deleted file mode 100644 index 1cfb6dd3e517279bb641009477f7a44280447d89..0000000000000000000000000000000000000000 --- a/src/corelibs/U2Designer/src/dashboard/ExternalToolsWidget.cpp +++ /dev/null @@ -1,216 +0,0 @@ -/** - * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> - * http://ugene.net - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ - -#include "ExternalToolsWidget.h" - -#include <U2Core/U2SafePoints.h> - -#include <U2Lang/Dataset.h> -#include <U2Lang/URLAttribute.h> -#include <U2Lang/URLContainer.h> -#include <U2Lang/WorkflowUtils.h> - - -namespace U2 { - -ExternalToolsWidgetController::ExternalToolsWidgetController() : toolsWidget(NULL) { - timer = new QTimer; - timer->setInterval(1000); - timer->setSingleShot(true); - connect(timer, SIGNAL(timeout()), SLOT(sl_timerShouts())); -} - -ExternalToolsWidget* ExternalToolsWidgetController::getWidget(const QWebElement &container, Dashboard *parent) { - if(NULL == toolsWidget) { - toolsWidget = new ExternalToolsWidget(container, parent, this); - connect(this, SIGNAL(si_update()), toolsWidget, SLOT(sl_onLogUpdate())); - } - return toolsWidget; -} - -LogEntry ExternalToolsWidgetController::getEntry(int index) const { - SAFE_POINT(index >= 0 && index < log.count(), "Invalid index", LogEntry()); - return log.at(index); -} - -void ExternalToolsWidgetController::sl_onLogChanged(U2::Workflow::Monitor::LogEntry entry) { - log << entry; - if (!timer->isActive() && NULL != toolsWidget) { - timer->start(); - } -} - -void ExternalToolsWidgetController::sl_timerShouts() { - emit si_update(); -} - -const int ExternalToolsWidget::LOG_LIMIT = 100; - -const QString ExternalToolsWidget::ID = "external tools"; -const QString ExternalToolsWidget::LINE_BREAK("break_line"); -const QString ExternalToolsWidget::SINGLE_QUOTE("s_quote"); -const QString ExternalToolsWidget::BACK_SLASH("b_slash"); - -ExternalToolsWidget::ExternalToolsWidget(const QWebElement &_container, - Dashboard *parent, - const ExternalToolsWidgetController *_ctrl) : - DashboardWidget(_container, ID, parent), - ctrl(_ctrl), - isUserWarned(false) -{ - SAFE_POINT(NULL != ctrl, "Controller is NULL", ); - - const WorkflowMonitor *workflowMonitor = dashboard->monitor(); - SAFE_POINT(NULL != workflowMonitor, "NULL workflow monitor!", ); - - container.evaluateJavaScript("lwInitConteiner(this, 'params_tab_id_0')"); - - lastEntryIndex = 0; - foreach (LogEntry entry, ctrl->getLog()) { - if (lastEntryIndex >= LOG_LIMIT) { - warnUser(entry); - lastEntryIndex = ctrl->getLog().size() - 1; - break; - } - addInfoToWidget(entry); - lastEntryIndex++; - } -} - -void ExternalToolsWidget::sl_onLogUpdate() { - SAFE_POINT(sender() == ctrl, "Unexpected sender", ); - - int lastLogIndex = ctrl->getLogSize() - 1; - LogEntry entry = ctrl->getEntry(lastEntryIndex + 1); - ++lastEntryIndex; - - for (; lastEntryIndex < lastLogIndex; lastEntryIndex++) { - LogEntry curEntry = ctrl->getEntry(lastEntryIndex + 1); - if (isSameNode(curEntry, entry) && - entry.logType != ExternalToolListener::PROGRAM_PATH && - entry.logType != ExternalToolListener::ARGUMENTS) { - // accumulate - entry.lastLine += curEntry.lastLine; - } else { - // node changed, commit - if (lastEntryIndex >= LOG_LIMIT) { - warnUser(entry); - } - addInfoToWidget(entry); - entry = curEntry; - } - } - - if (lastEntryIndex >= LOG_LIMIT) { - warnUser(entry); - } - addInfoToWidget(entry); -} - -void ExternalToolsWidget::addInfoToWidget(const LogEntry &entry) { - CHECK(!isUserWarned, ); - - const QString tabId = "log_tab_id_" + entry.actorName; - const QString runId = entry.toolName + " run " + QString::number(entry.runNumber); - const QString mapId = tabId + "_" + runId; - if (!taskCount.contains(mapId)) { - taskCount[mapId] = 0; - } - - QString lastPartOfLog = entry.lastLine; - - lastPartOfLog.replace(QRegExp("\\n"), LINE_BREAK); - lastPartOfLog.replace(QRegExp("\\r"), ""); - lastPartOfLog.replace("'", SINGLE_QUOTE); - lastPartOfLog.replace('\\', BACK_SLASH); - - QString addLogFunc = "lwAddTreeNode"; - addLogFunc += "('" + runId + "', "; - addLogFunc += "'" + entry.actorName + "', "; - addLogFunc += "'" + tabId + "', "; - - switch(entry.logType) { - case ExternalToolListener::ERROR_LOG: - addLogFunc += "'" + lastPartOfLog + "', "; - addLogFunc += "'0', "; - addLogFunc += "'error')"; - container.evaluateJavaScript(addLogFunc); - break; - case ExternalToolListener::OUTPUT_LOG: - addLogFunc += "'" + lastPartOfLog + "', "; - addLogFunc += "'0', "; - addLogFunc += "'output')"; - container.evaluateJavaScript(addLogFunc); - break; - case ExternalToolListener::PROGRAM_PATH: - addLogFunc += "'" + lastPartOfLog + "', "; - addLogFunc += "'" + QString::number(++taskCount[mapId]) + "', "; - addLogFunc += "'program')"; - container.evaluateJavaScript(addLogFunc); - break; - case ExternalToolListener::ARGUMENTS: - addLogFunc += "'" + lastPartOfLog + "', "; - addLogFunc += "'" + QString::number(taskCount[mapId]) + "', "; - addLogFunc += "'arguments')"; - container.evaluateJavaScript(addLogFunc); - break; - } -} - -bool ExternalToolsWidget::isSameNode(const LogEntry& prev, const LogEntry& cur) const { - return prev.actorName == cur.actorName && - prev.logType == cur.logType && - prev.runNumber == cur.runNumber && - prev.toolName == cur.toolName; -} - -namespace { - -bool logFileContainsMessages(const QString &fileUrl) { - return QFileInfo(fileUrl).exists() && QFile(fileUrl).size() != 0; -} - -} - -void ExternalToolsWidget::warnUser(LogEntry &entry) { - CHECK(!isUserWarned, ); - - const QString logDirUrl = dashboard->monitor()->outputDir() + "logs"; - QString logFileUrl = logDirUrl + "/" + WDListener::getStandardErrorLogFileUrl(entry.actorName, entry.runNumber); - if (!logFileContainsMessages(logFileUrl)) { - logFileUrl = logDirUrl + "/" + WDListener::getStandardOutputLogFileUrl(entry.actorName, entry.runNumber); - if (!logFileContainsMessages(logFileUrl)) { - logFileUrl = ""; - } - } - - if (!logFileUrl.isEmpty()) { - entry.lastLine = tr("\n\nThe external tools output is too large and can't be visualized on the dashboard. Find full output in file \"%1\".").arg(logFileUrl); - } else { - entry.lastLine = tr("\n\nThe external tools output is too large and can't be visualized on the dashboard."); - } - - addInfoToWidget(entry); - - isUserWarned = true; -} - -} // namespace U2 diff --git a/src/corelibs/U2Designer/src/dashboard/ExternalToolsWidget.h b/src/corelibs/U2Designer/src/dashboard/ExternalToolsWidget.h deleted file mode 100644 index bd6205865f2025a7588445837aa7a1b899de683c..0000000000000000000000000000000000000000 --- a/src/corelibs/U2Designer/src/dashboard/ExternalToolsWidget.h +++ /dev/null @@ -1,90 +0,0 @@ -/** - * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> - * http://ugene.net - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ - -#ifndef _U2_LOG_WIDGET_H_ -#define _U2_LOG_WIDGET_H_ - -#include "Dashboard.h" - -namespace U2 { - -using namespace Workflow::Monitor; - -class ExternalToolsWidget; - -class ExternalToolsWidgetController : public QObject { - Q_OBJECT - Q_DISABLE_COPY(ExternalToolsWidgetController) -public: - ExternalToolsWidgetController(); - ~ExternalToolsWidgetController() { delete timer; } - - ExternalToolsWidget* getWidget(const QWebElement &container, Dashboard *parent); - LogEntry getEntry(int index) const; - QList<LogEntry> getLog() const { return log; } - int getLogSize() const { return log.count(); } - -signals: - void si_update(); - -public slots: - void sl_onLogChanged(U2::Workflow::Monitor::LogEntry entry); - -private slots: - void sl_timerShouts(); - -private: - ExternalToolsWidget* toolsWidget; - QList<LogEntry> log; - QTimer *timer; -}; - -class ExternalToolsWidget : public DashboardWidget { - Q_OBJECT -public: - ExternalToolsWidget(const QWebElement &container, Dashboard *parent, const ExternalToolsWidgetController* ctrl); - - static const QString ID; - -public slots: - void sl_onLogUpdate(); - -private: - void addInfoToWidget(const LogEntry &entry); - bool isSameNode(const LogEntry& prev, const LogEntry& cur) const; - void warnUser(LogEntry &entry); - - int lastEntryIndex; - QMap <QString, int> taskCount; - const ExternalToolsWidgetController* ctrl; - - bool isUserWarned; - - static const QString LINE_BREAK; - static const QString BACK_SLASH; - static const QString SINGLE_QUOTE; - - static const int LOG_LIMIT; // UGENE-6160: dashboard hangs if there are too many messages, limit them. -}; - -} // namespace U2 - -#endif diff --git a/src/corelibs/U2Designer/src/dashboard/NotificationsWidget.cpp b/src/corelibs/U2Designer/src/dashboard/NotificationsWidget.cpp deleted file mode 100644 index 4b83cf16358a4e574a91fb95124d2ff26e1eb863..0000000000000000000000000000000000000000 --- a/src/corelibs/U2Designer/src/dashboard/NotificationsWidget.cpp +++ /dev/null @@ -1,140 +0,0 @@ -/** - * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> - * http://ugene.net - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ - -#include <U2Core/U2SafePoints.h> - -#include "NotificationsWidget.h" - -namespace U2 { - -const QString NotificationsWidget::ID = "problems"; - -NotificationsWidget::NotificationsWidget(const QWebElement &content, Dashboard *parent) - : TableWidget(content, ID, parent) -{ - createTable(); - foreach (const WorkflowNotification &info, dashboard->monitor()->getNotifications()) { - sl_newNotification(info); - } - connect(dashboard->monitor(), SIGNAL(si_newNotification(const WorkflowNotification &)), - SLOT(sl_newNotification(const WorkflowNotification &))); -} - -void NotificationsWidget::sl_newNotification(const WorkflowNotification &info) { - const WorkflowMonitor *m = dashboard->monitor(); - CHECK(NULL != m, ); - if (rows.contains(id(info))) { - updateRow(id(info), createMultiRow(info)); - } else { - addRow(id(info), createRow(info)); - } -} - -QString NotificationsWidget::notificationImage(const WorkflowNotification &info) { - CHECK(!info.type.isEmpty(), ""); - - QString image = "qrc:U2Lang/images/"; - QString tooltip; - if (WorkflowNotification::U2_ERROR == info.type) { - image += "error.png"; - tooltip = tr("Error"); - } else if (WorkflowNotification::U2_WARNING == info.type) { - image += "warning.png"; - tooltip = tr("Warning"); - } else if (WorkflowNotification::U2_INFO == info.type) { - image = "qrc:core/images/info.png"; - tooltip = tr("Information"); - } else { - FAIL("Unknown type: " + info.type, ""); - } - return "<img src=\"" + image + "\" title=\"" + tooltip + "\" class=\"problem-icon\"/>"; -} - -QString NotificationsWidget::createRow(const QStringList &ds) { - QString row; - foreach (const QString &d, ds) { - row += "<td style=\"word-wrap: break-word\">" + d + "</td>"; - } - return row; -} - -QStringList NotificationsWidget::createRow(const WorkflowNotification &info, bool multi) const { - QStringList result; - const WorkflowMonitor *m = dashboard->monitor(); - CHECK(NULL != m, result); - - QString prefix; - if (multi) { - int count = 0; - foreach (const WorkflowNotification &p, m->getNotifications()) { - if (p == info) { - count++; - } - } - prefix = QString("(%1) ").arg(count); - } - - result << notificationImage(info); - result << wrapLongText(m->actorName(info.actor)); - result << getTextWithWordBreaks(prefix + info.message); - return result; -} - -QString NotificationsWidget::getTextWithWordBreaks(const QString& text) const { - QString textWithBreaks = text; - textWithBreaks = textWithBreaks.replace("\\", "\\<wbr>").replace("/", "/<wbr>"); - return textWithBreaks; -} - -QStringList NotificationsWidget::createMultiRow(const WorkflowNotification &info) const { - return createRow(info, true); -} - -QStringList NotificationsWidget::createRow(const WorkflowNotification &info) const { - return createRow(info, false); -} - -QList<int> NotificationsWidget::widths() { - return QList<int>() << 10 << 30 << 60; -} - -QStringList NotificationsWidget::header() { - return QStringList() << tr("Type") << tr("Element") << tr("Message"); -} - -QList<QStringList> NotificationsWidget::data() { - QList<QStringList> result; - const WorkflowMonitor *m = dashboard->monitor(); - CHECK(NULL != m, result); - foreach (const WorkflowNotification &info, m->getNotifications()) { - QStringList row; - row << id(info); - row << createRow(info); - result << row; - } - return result; -} - -QString NotificationsWidget::id(const WorkflowNotification &info) const { - return info.actor + info.message; -} - -} // U2 diff --git a/src/corelibs/U2Designer/src/dashboard/NotificationsWidget.h b/src/corelibs/U2Designer/src/dashboard/NotificationsWidget.h deleted file mode 100644 index d297be39f957fed267c5d31a9920557f682c8cb9..0000000000000000000000000000000000000000 --- a/src/corelibs/U2Designer/src/dashboard/NotificationsWidget.h +++ /dev/null @@ -1,60 +0,0 @@ -/** - * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> - * http://ugene.net - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ - -#ifndef _U2_NOTIFICATIONS_WIDGET_H_ -#define _U2_NOTIFICATIONS_WIDGET_H_ - -#include "TableWidget.h" - -namespace U2 { - -using namespace Workflow::Monitor; - -class NotificationsWidget : public TableWidget { - Q_OBJECT -public: - NotificationsWidget(const QWebElement &content, Dashboard *parent); - - virtual QList<int> widths(); - virtual QStringList header(); - virtual QList<QStringList> data(); - - static QString notificationImage(const WorkflowNotification &info); - - static const QString ID; - -private slots: - void sl_newNotification(const WorkflowNotification &info); - -protected: - QString createRow(const QStringList &d); - -private: - QStringList createRow(const WorkflowNotification &info, bool multi) const; - QStringList createRow(const WorkflowNotification &info) const; - QStringList createMultiRow(const WorkflowNotification &info) const; - QString id(const WorkflowNotification &info) const; - QString getTextWithWordBreaks(const QString &text) const; -}; - -} // U2 - -#endif // _U2_NOTIFICATIONS_WIDGET_H_ diff --git a/src/corelibs/U2Designer/src/dashboard/OutputFilesWidget.cpp b/src/corelibs/U2Designer/src/dashboard/OutputFilesWidget.cpp deleted file mode 100644 index 97e01230f6ef590e0488fb389c1084187b3a3752..0000000000000000000000000000000000000000 --- a/src/corelibs/U2Designer/src/dashboard/OutputFilesWidget.cpp +++ /dev/null @@ -1,232 +0,0 @@ -/** - * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> - * http://ugene.net - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ - -#include <QDir> -#include <QFileInfo> -#include <QTableView> -#include <QVBoxLayout> - -#include <U2Core/U2SafePoints.h> - -#include "OutputFilesWidget.h" - -namespace U2 { - -static const int MAX_FILES_COUNT = 10; -const QString OutputFilesWidget::ID = "output files"; - -OutputFilesWidget::OutputFilesWidget(const QWebElement &content, Dashboard *parent) - : TableWidget(content, ID, parent), - collapsed(false) -{ - createTable(); - - connect(dashboard->monitor(), SIGNAL(si_newOutputFile(const U2::Workflow::Monitor::FileInfo &)), - SLOT(sl_newOutputFile(const U2::Workflow::Monitor::FileInfo &))); -} - -void OutputFilesWidget::sl_newOutputFile(const U2::Workflow::Monitor::FileInfo &info) { - const WorkflowMonitor *m = dashboard->monitor(); - CHECK(NULL != m, ); - if (m->getOutputFiles().size() > MAX_FILES_COUNT && !collapsed) { - collapse(); - return; - } - if (collapsed && rows.contains(id(info))) { - addFileMenu(info); - } else { - addRow(id(info), createRowByFile(info), info.actor); - } -} - -QList<int> OutputFilesWidget::widths() { - return QList<int>() << 50 << 50; -} - -QStringList OutputFilesWidget::header() { - return QStringList() << tr("File") << tr("Producer"); -} - -QList<QStringList> OutputFilesWidget::data() { - QList<QStringList> result; - const WorkflowMonitor *m = dashboard->monitor(); - CHECK(NULL != m, result); - foreach (const Monitor::FileInfo &file, m->getOutputFiles()) { - QStringList row; - row << file.url; // id - row << createRowByFile(file); - result << row; - } - return result; -} - -QString OutputFilesWidget::createActionsSubMenu(const Monitor::FileInfo& info, bool fullWidth) const { - return QString( - "<ul class=\"dropdown-menu %1\">" - "<li><a href=\"#\" onclick=\"agent.openByOS('%2')\">%3</a></li>" - "</ul>" - ) - .arg(fullWidth ? "full-width" : "") - .arg(relative(QFileInfo(info.url).dir().absolutePath() + "/")) - .arg(tr("Open containing folder")); -} - -static const int MAX_LEN = 25; -static QString fileName(const QString &url) { - QFileInfo info(url); - QString name = info.fileName(); - if (name.length() > MAX_LEN) { - return name.left(MAX_LEN - 3) + "..."; - } - return name; -} - -QString OutputFilesWidget::createFileButton(const Monitor::FileInfo& info) const { - return QString( - "<div class=\"file-button-ctn\">" - "<div class=\"btn-group full-width file-btn-group\">" - "<button class=\"btn full-width long-text\" id=\"%1\" onclick=%2 onmouseover=\"this.title=agent.absolute('%3')\">%4</button>" - "<button class=\"btn dropdown-toggle\" data-toggle=\"dropdown\">" - "<span class=\"caret\"></span>" - "</button>" - "%5" - "</div>" - "</div>" - ) - .arg(info.actor) - .arg(onClickAction(info)) - .arg(relative(info.url)) - .arg(fileName(info.url)) - .arg(createActionsSubMenu(info, true)); -} - -QString OutputFilesWidget::createFileSubMenu(const Monitor::FileInfo& info) const { - return QString( - "<li class=\"file-sub-menu dropdown-submenu left-align\">" - "<a tabindex=\"-1\" href=\"#\" onclick=%1 title=\"%2\">%3</a>" - "%4" - "</li>" - ) - .arg(onClickAction(info)) - .arg(relative(info.url)) - .arg(fileName(info.url)) - .arg(createActionsSubMenu(info, false)); -} - -QStringList OutputFilesWidget::createRowByFile(const Monitor::FileInfo &info) const { - QStringList result; - const WorkflowMonitor *m = dashboard->monitor(); - CHECK(NULL != m, result); - - result << createFileButton(info); - result << wrapLongText(m->actorName(info.actor)); - return result; -} - -void OutputFilesWidget::createFileListButton(const QString &actorId) { - QString filesButton = QString( - "<div class=\"btn-group full-width\">" - "<button class=\"files-btn btn dropdown-toggle full-width\" data-toggle=\"dropdown\" href=\"#\">" - "%1" - "</button>" - "<ul class=\"files-menu dropdown-menu full-width\"/>" - "</div>") - .arg(buttonLabel(0)); - - updateRow(id(actorId), QStringList() << filesButton << wrapLongText(dashboard->monitor()->actorName(actorId))); -} - -void OutputFilesWidget::createFilesButton(const QString &actorId, const QList<Monitor::FileInfo> &files) { - createFileListButton(actorId); - foreach (const Monitor::FileInfo &info, files) { - addFileMenu(info); - } -} - -void OutputFilesWidget::collapse() { - collapsed = true; - createTable(); - - QStringList actors = MonitorUtils::sortedByAppearanceActorIds(dashboard->monitor()); - QMap< QString, QList<Monitor::FileInfo> > filesMap = - MonitorUtils::filesByActor(dashboard->monitor()); - foreach (const QString &actorId, actors) { - QList<Monitor::FileInfo> files = filesMap[actorId]; - if (1 == files.size()) { - addRow(id(files.first()), createRowByFile(files.first())); - } else { - createFilesButton(actorId, files); - } - } -} - -static bool isFileButton(const QWebElement &row) { - return row.findAll(".file-button-ctn").count() > 0; -} - -static int filesCount(const QWebElement &menu) { - return menu.findAll(".file-sub-menu").count(); -} - -void OutputFilesWidget::addFileMenu(const Monitor::FileInfo &info) { - SAFE_POINT(collapsed, "Not collapsed mode", ); - SAFE_POINT(rows.contains(id(info)), "The menu is not created", ); - - QWebElement row = rows[id(info)]; - if (isFileButton(row)) { - QList<Monitor::FileInfo> files = MonitorUtils::filesByActor(dashboard->monitor())[info.actor]; - createFilesButton(info.actor, files); - } else { - QWebElement button = row.findFirst(".files-btn"); - QWebElement menu = row.findFirst(".files-menu"); - int count = filesCount(menu) + 1; - button.setInnerXml(buttonLabel(count)); - menu.appendInside(createFileSubMenu(info)); - } -} - -QString OutputFilesWidget::buttonLabel(int filesCount) const { - return QString("%1 %2 %3").arg(filesCount).arg(tr("files")).arg("<span class=\"caret\"></span>"); -} - -QString OutputFilesWidget::relative(const QString &absolute) const { - if (absolute.startsWith(dashboard->directory())) { - return absolute.mid(dashboard->directory().size()); - } - return absolute; -} - -QString OutputFilesWidget::onClickAction(const Monitor::FileInfo& info) const { - return QString(info.openBySystem ? "\"agent.openByOS('%1')\"" : "\"agent.openUrl('%1')\"").arg(relative(info.url)); -} - -QString OutputFilesWidget::id(const QString &actorId) const { - return ":;" + actorId + ":;"; -} - -QString OutputFilesWidget::id(const Monitor::FileInfo &info) const { - if (collapsed) { - return id(info.actor); - } - return info.url; -} - -} // U2 diff --git a/src/corelibs/U2Designer/src/dashboard/OutputFilesWidget.h b/src/corelibs/U2Designer/src/dashboard/OutputFilesWidget.h deleted file mode 100644 index 6d4695584e72c50058368579ec502faf154abe95..0000000000000000000000000000000000000000 --- a/src/corelibs/U2Designer/src/dashboard/OutputFilesWidget.h +++ /dev/null @@ -1,66 +0,0 @@ -/** - * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> - * http://ugene.net - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ - -#ifndef _U2_OUTPUTFILESWIDGET_H_ -#define _U2_OUTPUTFILESWIDGET_H_ - -#include "TableWidget.h" - -namespace U2 { - -using namespace Workflow::Monitor; - -class OutputFilesWidget : public TableWidget { - Q_OBJECT -public: - OutputFilesWidget(const QWebElement &content, Dashboard *parent); - - virtual QList<int> widths(); - virtual QStringList header(); - virtual QList<QStringList> data(); - - static const QString ID; - -private slots: - void sl_newOutputFile(const U2::Workflow::Monitor::FileInfo &info); - -private: - QString createFileButton(const Monitor::FileInfo& info) const; - void createFileListButton(const QString &actorId); - void createFilesButton(const QString &actorId, const QList<Monitor::FileInfo> &files); - QString createFileSubMenu(const Monitor::FileInfo& info) const; - QString createActionsSubMenu(const Monitor::FileInfo& info, bool fullWidth) const; - QStringList createRowByFile(const Monitor::FileInfo &info) const; - void collapse(); - QString id(const QString &actorId) const; - QString id(const Monitor::FileInfo &info) const; - void addFileMenu(const Monitor::FileInfo &info); - QString buttonLabel(int filesCount) const; - QString relative(const QString &absolute) const; - QString onClickAction(const Monitor::FileInfo& info) const; - -private: - bool collapsed; -}; - -} // U2 - -#endif // _U2_OUTPUTFILESWIDGET_H_ diff --git a/src/corelibs/U2Designer/src/dashboard/ParametersWidget.cpp b/src/corelibs/U2Designer/src/dashboard/ParametersWidget.cpp deleted file mode 100644 index 2cd6418ffd335bc26015f354ee571346cecd6db7..0000000000000000000000000000000000000000 --- a/src/corelibs/U2Designer/src/dashboard/ParametersWidget.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/** - * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> - * http://ugene.net - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ - -#include "ParametersWidget.h" - -#include <U2Core/U2SafePoints.h> - -#include <U2Lang/Dataset.h> -#include <U2Lang/URLAttribute.h> -#include <U2Lang/URLContainer.h> -#include <U2Lang/WorkflowUtils.h> - - -namespace U2 { - -const QString ParametersWidget::ID = "parameters"; - -ParametersWidget::ParametersWidget(const QWebElement &container, Dashboard *parent) - : DashboardWidget(container, ID, parent) -{ - const WorkflowMonitor *workflowMonitor = dashboard->monitor(); - SAFE_POINT(NULL != workflowMonitor, "NULL workflow monitor!", ); - - const QList<WorkerParamsInfo> &workersParamsInfo = workflowMonitor->getWorkersParameters(); - createWidget(workersParamsInfo); -} - -void ParametersWidget::createWidget(const QList<WorkerParamsInfo> &workersParamsInfo) { - int i = 0; - foreach (const WorkerParamsInfo &info, workersParamsInfo) { - // Create the tab - QString tabId = "params_tab_id_" + QString::number(i); - QString createTabFunc; - if (0 == i) { - createTabFunc = "pwInitAndActiveTab"; - } - else { - createTabFunc = "pwAddTab"; - } - createTabFunc += "(this, '" + info.workerName + "', '" + tabId + "')"; - - container.evaluateJavaScript(createTabFunc); - - // Add the parameters - foreach (Attribute* param, info.parameters) { - SAFE_POINT(NULL != param, "NULL attribute!", ); - - QVariant paramValueVariant = param->getAttributePureValue(); - if (paramValueVariant.canConvert< QList<Dataset> >()) { - QList<Dataset> sets = paramValueVariant.value< QList<Dataset > >(); - - foreach (const Dataset &set, sets) { - QString paramName = param->getDisplayName(); - if (sets.size() > 1) { - paramName += ": <i>" + set.getName() + "</i>"; - } - QStringList urls; - foreach (URLContainer *c, set.getUrls()) { - urls << c->getUrl(); - } - QString paramValue = urls.join(";"); - - QString createParamFunc = "pwAddFilesParameter"; - createParamFunc += "('" + tabId + "', "; - createParamFunc += "'" + paramName + "', "; - createParamFunc += "'" + paramValue + "', false)"; - - container.evaluateJavaScript(createParamFunc); - } - } - else { - QString paramName = param->getDisplayName(); - QString paramValue = WorkflowUtils::getStringForParameterDisplayRole(paramValueVariant); - - QString createParamFunc; - - UrlAttributeType type = WorkflowUtils::isUrlAttribute(param, info.actor); - if (type == NotAnUrl || QString::compare(paramValueVariant.toString(), "default", Qt::CaseInsensitive) == 0) { - createParamFunc = "pwAddCommonParameter"; - } - else { - createParamFunc = "pwAddFilesParameter"; - } - - createParamFunc += "('" + tabId + "', "; - createParamFunc += "'" + paramName + "', "; - createParamFunc += "'" + paramValue + "'"; - - if (type != NotAnUrl && QString::compare(paramValueVariant.toString(), "default", Qt::CaseInsensitive) != 0) { - bool disableOpeningByUgene = false; - if (type == InputDir || type == OutputDir) { - disableOpeningByUgene = true; - } - createParamFunc += ", " + QString::number(disableOpeningByUgene); - } - - createParamFunc += ")"; - - container.evaluateJavaScript(createParamFunc); - } - } - - // Increase the iterator - i++; - } -} - - -} // namespace U2 diff --git a/src/corelibs/U2Designer/src/dashboard/RemoveDashboardsTask.cpp b/src/corelibs/U2Designer/src/dashboard/RemoveDashboardsTask.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e7d3b3d108a3c8eeb9ef5341e0b85aaab086142d --- /dev/null +++ b/src/corelibs/U2Designer/src/dashboard/RemoveDashboardsTask.cpp @@ -0,0 +1,43 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.unipro.ru + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <U2Core/GUrlUtils.h> +#include <U2Core/U2OpStatusUtils.h> +#include <U2Core/U2SafePoints.h> + +#include "RemoveDashboardsTask.h" + +namespace U2 { + +RemoveDashboardsTask::RemoveDashboardsTask(const QList<DashboardInfo> &_dashboardInfos) + : Task(tr("Remove dashboards"), TaskFlag_None), dashboardInfos(_dashboardInfos) +{ + +} + +void RemoveDashboardsTask::run() { + foreach (const DashboardInfo &info, dashboardInfos) { + U2OpStatus2Log os; + GUrlUtils::removeDir(info.path, os); + } +} + +} // namespace U2 diff --git a/src/corelibs/U2Designer/src/dashboard/RemoveDashboardsTask.h b/src/corelibs/U2Designer/src/dashboard/RemoveDashboardsTask.h new file mode 100644 index 0000000000000000000000000000000000000000..77e0fc9e1ddf979526b1fd5b1fdde92597322e66 --- /dev/null +++ b/src/corelibs/U2Designer/src/dashboard/RemoveDashboardsTask.h @@ -0,0 +1,44 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.unipro.ru + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_REMOVE_DASHBOARDS_TASK_H_ +#define _U2_REMOVE_DASHBOARDS_TASK_H_ + +#include <U2Core/Task.h> + +#include "DashboardInfo.h" + +namespace U2 { + +class U2DESIGNER_EXPORT RemoveDashboardsTask : public Task { + Q_OBJECT +public: + RemoveDashboardsTask(const QList<DashboardInfo> &dashboardInfos); + +private: + void run() override; + + const QList<DashboardInfo> dashboardInfos; +}; + +} // namespace U2 + +#endif // _U2_REMOVE_DASHBOARDS_TASK_H_ diff --git a/src/corelibs/U2Designer/src/dashboard/ResourcesWidget.cpp b/src/corelibs/U2Designer/src/dashboard/ResourcesWidget.cpp deleted file mode 100644 index c1657df574204e5773e9c2d5842b4a333556bec1..0000000000000000000000000000000000000000 --- a/src/corelibs/U2Designer/src/dashboard/ResourcesWidget.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/** - * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> - * http://ugene.net - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ - -#include <U2Lang/WorkflowSettings.h> - -#include "ResourcesWidget.h" - -namespace U2 { - -const QString ResourcesWidget::ID = "resources"; - -ResourcesWidget::ResourcesWidget(const QWebElement &container, Dashboard *parent) - : DashboardWidget(container, ID, parent) -{ - connect(parent->monitor(), SIGNAL(si_progressChanged(int)), SLOT(sl_progressChanged(int))); - connect(parent->monitor(), SIGNAL(si_taskStateChanged(Monitor::TaskState)), - SLOT(sl_taskStateChanged(Monitor::TaskState))); - - this->container.setInnerXml(QString( - "<div class=\"well well-small vlayout-item\">" - "%1: <span id=\"timer\"></span>" - "</div>" - "<div class=\"progress-wrapper vlayout-item\">" - "<div class=\"progress-container\">" - "<div id=\"progressBar\" class=\"progress small-bar\">" - "<div class=\"bar\" style=\"width: 0%;\"></div>" - "</div>" - "</div>" - "</div>" - "<div id=\"status-bar\" class=\"vlayout-item alert\">" - "<p id=\"status-message\"/>" - "</div>" - ).arg(tr("Time"))); - - sl_progressChanged(0); - running(); -} - -void ResourcesWidget::sl_progressChanged(int progress) { - QWebElement bar = container.findFirst(".bar"); - bar.setStyleProperty("width", QString::number(progress) + "%"); -} - -namespace { - bool isFinished(TaskState state) { - switch (state) { - case Monitor::RUNNING: - case Monitor::RUNNING_WITH_PROBLEMS: - return false; - case Monitor::FINISHED_WITH_PROBLEMS: - case Monitor::CANCELLED: - case Monitor::FAILED: - case Monitor::SUCCESS: - return true; - default: - FAIL("Unknown state", false); - } - } -} - -void ResourcesWidget::sl_taskStateChanged(TaskState state) { - if (Monitor::RUNNING == state) { - running(); - } else if (Monitor::RUNNING_WITH_PROBLEMS == state) { - runningWithProblems(); - } else if (Monitor::FINISHED_WITH_PROBLEMS == state) { - finishedWithProblems(); - } else if (Monitor::FAILED == state) { - failed(); - } else if (Monitor::SUCCESS == state) { - success(); - } else { - canceled(); - } - - bool showHint = WorkflowSettings::isShowLoadButtonHint(); - - if (isFinished(state)) { - dashboard->getDocument().evaluateJavaScript("showLoadButton(" + QString::number(showHint) + ")"); - } -} - -void ResourcesWidget::running() { - statusBar().addClass("alert-info"); - statusMessage().setPlainText(tr("The workflow task is in progress...")); -} - -void ResourcesWidget::runningWithProblems() { - statusBar().removeClass("alert-info"); - statusMessage().setPlainText(tr("The workflow task is in progress. There are problems...")); -} - -void ResourcesWidget::finishedWithProblems() { - statusBar().removeClass("alert-info"); - statusBar().addClass("alert-warning"); - statusMessage().setPlainText(tr("The workflow task has been finished with warnings!")); -} - -void ResourcesWidget::failed() { - statusBar().removeClass("alert-info"); - statusBar().addClass("alert-error"); - statusMessage().setPlainText(tr("The workflow task has been finished with errors!")); -} - -void ResourcesWidget::success() { - statusBar().removeClass("alert-info"); - statusBar().addClass("alert-success"); - statusMessage().setPlainText(tr("The workflow task has been finished successfully!")); -} - -void ResourcesWidget::canceled() { - statusBar().removeClass("alert-info"); - statusMessage().setPlainText(tr("The workflow task has been canceled!")); -} - -QWebElement ResourcesWidget::statusBar() { - return container.findFirst("#status-bar"); -} - -QWebElement ResourcesWidget::statusMessage() { - return container.findFirst("#status-message"); -} - -} // U2 diff --git a/src/corelibs/U2Designer/src/dashboard/ScanDashboardsDirTask.cpp b/src/corelibs/U2Designer/src/dashboard/ScanDashboardsDirTask.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b28b06109e248cc71cdfd50dbecf4215bfae5628 --- /dev/null +++ b/src/corelibs/U2Designer/src/dashboard/ScanDashboardsDirTask.cpp @@ -0,0 +1,76 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.unipro.ru + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QDir> +#include <QSettings> + +#include <U2Core/U2SafePoints.h> + +#include <U2Lang/WorkflowSettings.h> + +#include "Dashboard.h" +#include "ScanDashboardsDirTask.h" + +namespace U2 { + +ScanDashboardsDirTask::ScanDashboardsDirTask() + : Task(tr("Scan dashboards folder"), TaskFlag_None) +{ + tpm = Progress_Manual; +} + +const QList<DashboardInfo> &ScanDashboardsDirTask::getResult() const { + return dashboardInfos; +} + +void ScanDashboardsDirTask::run() { + QDir outDir(WorkflowSettings::getWorkflowOutputDirectory()); + CHECK(outDir.exists(), ); + + QFileInfoList dirs = outDir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot | QDir::NoSymLinks); + int counter = 0; + foreach (const QFileInfo &info, dirs) { + CHECK_OP(stateInfo, ); + QString dirPath = info.absoluteFilePath() + "/"; + if (isDashboardDir(dirPath)) { + dashboardInfos << readDashboardInfo(dirPath); + } + stateInfo.setProgress((100 * counter++) / dirs.count()); + } +} + +bool ScanDashboardsDirTask::isDashboardDir(const QString &dirPath) { + QDir dir(dirPath + Dashboard::REPORT_SUB_DIR); + CHECK(dir.exists(), false); + CHECK(dir.exists(Dashboard::DB_FILE_NAME), false); + CHECK(dir.exists(Dashboard::SETTINGS_FILE_NAME), false); + return true; +} + +DashboardInfo ScanDashboardsDirTask::readDashboardInfo(const QString &dirPath) { + DashboardInfo info(dirPath); + QSettings settings(dirPath + Dashboard::REPORT_SUB_DIR + Dashboard::SETTINGS_FILE_NAME, QSettings::IniFormat); + info.opened = settings.value(Dashboard::OPENED_SETTING).toBool(); + info.name = settings.value(Dashboard::NAME_SETTING).toString(); + return info; +} + +} // namespace U2 diff --git a/src/corelibs/U2Designer/src/dashboard/ScanDashboardsDirTask.h b/src/corelibs/U2Designer/src/dashboard/ScanDashboardsDirTask.h new file mode 100644 index 0000000000000000000000000000000000000000..9bd9482b0dc12197ef494df29ae9b3df37855d69 --- /dev/null +++ b/src/corelibs/U2Designer/src/dashboard/ScanDashboardsDirTask.h @@ -0,0 +1,49 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.unipro.ru + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_SCAN_DASHBOARDS_DIR_TASK_H_ +#define _U2_SCAN_DASHBOARDS_DIR_TASK_H_ + +#include <U2Core/Task.h> + +#include "DashboardInfo.h" + +namespace U2 { + +class U2DESIGNER_EXPORT ScanDashboardsDirTask : public Task { + Q_OBJECT +public: + ScanDashboardsDirTask(); + + const QList<DashboardInfo> &getResult() const; + +private: + void run() override; + + static bool isDashboardDir(const QString &dirPath); + static DashboardInfo readDashboardInfo(const QString &dirPath); + + QList<DashboardInfo> dashboardInfos; +}; + +} // namespace U2 + +#endif // _U2_SCAN_DASHBOARDS_DIR_TASK_H_ diff --git a/src/corelibs/U2Designer/src/dashboard/StatisticsWidget.cpp b/src/corelibs/U2Designer/src/dashboard/StatisticsWidget.cpp deleted file mode 100644 index 9c68728902f4c9473165d802e50a0da5cb255cc6..0000000000000000000000000000000000000000 --- a/src/corelibs/U2Designer/src/dashboard/StatisticsWidget.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/** - * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> - * http://ugene.net - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ - -#include <QTimer> - -#include "StatisticsWidget.h" - -namespace U2 { - -const QString StatisticsWidget::ID = "statistics"; - -StatisticsWidget::StatisticsWidget(const QWebElement &container, Dashboard *parent) - : TableWidget(container, ID, parent) -{ - useEmptyRows = false; - createTable(); - fillTable(); - connect(dashboard->monitor(), SIGNAL(si_workerInfoChanged(const QString &, const U2::Workflow::Monitor::WorkerInfo &)), - SLOT(sl_workerInfoChanged(const QString &, const U2::Workflow::Monitor::WorkerInfo &))); - connect(dashboard->monitor(), SIGNAL(si_updateProducers()), - SLOT(sl_update())); -} - -void StatisticsWidget::sl_workerInfoChanged(const QString &actor, - const U2::Workflow::Monitor::WorkerInfo &info) -{ - updateRow(actor, createRowByWorker(actor, info)); -} - -void StatisticsWidget::sl_update() { - const WorkflowMonitor *m = dashboard->monitor(); - CHECK(NULL != m, ); - - QMap<QString, WorkerInfo> infos = m->getWorkersInfo(); - foreach (const QString &actor, infos.keys()) { - updateRow(actor, createRowByWorker(actor, infos[actor])); - } -} - -QList<int> StatisticsWidget::widths() { - return QList<int>() << 40 << 30 << 30; -} - -QStringList StatisticsWidget::header() { - return QStringList() << tr("Element") << tr("Elapsed time") << tr("Output messages"); -} - -inline static QString timeStr(qint64 timeMks) { - return QTime::fromMSecsSinceStartOfDay(timeMks / 1000).toString("hh:mm:ss.zzz"); -} - -QList<QStringList> StatisticsWidget::data() { - QList<QStringList> result; - const WorkflowMonitor *m = dashboard->monitor(); - CHECK(NULL != m, result); - QMap<QString, WorkerInfo> infos = m->getWorkersInfo(); - foreach (const QString &actorId, infos.keys()) { - WorkerInfo &info = infos[actorId]; - QStringList row; - row << actorId; // id - row << createRowByWorker(actorId, info); - result << row; - } - return result; -} - -QStringList StatisticsWidget::createRowByWorker(const QString &actor, const WorkerInfo &info) { - QStringList result; - const WorkflowMonitor *m = dashboard->monitor(); - CHECK(NULL != m, result); - - result << wrapLongText(m->actorName(actor)); - result << timeStr(info.timeMks); - result << QString::number(m->getDataProduced(actor)); - return result; -} - -} // U2 diff --git a/src/corelibs/U2Designer/src/dashboard/TableWidget.cpp b/src/corelibs/U2Designer/src/dashboard/TableWidget.cpp deleted file mode 100644 index ec3faf791f763b69454f067c8d27c79a4e189742..0000000000000000000000000000000000000000 --- a/src/corelibs/U2Designer/src/dashboard/TableWidget.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/** - * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> - * http://ugene.net - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ - -#include "TableWidget.h" - -namespace U2 { - -static const int MIN_ROW_COUNT = 3; - -TableWidget::TableWidget(const QWebElement &container, const QString &id, Dashboard *parent) - : DashboardWidget(container, id, parent), - useEmptyRows(true) -{ - -} - -void TableWidget::createTable() { - QString table = QString("<table class=\"table table-bordered table-fixed\" id=\"%1\">").arg(id); - foreach (int w, widths()) { - table += "<col width=\"" + QString("%1").arg(w) + "%\" />"; - } - table += "<thead><tr>"; - foreach (const QString &h, header()) { - table += "<th><span class=\"text\">" + h + "</span></th>"; - } - table += "</tr></thead>"; - table += "<tbody scroll=\"yes\"/>"; - table += "</table>"; - container.setInnerXml(table); - - rows.clear(); - if (useEmptyRows) { - addEmptyRows(); - } -} - -void TableWidget::fillTable() { - rows.clear(); - foreach (const QStringList &row, data()) { - addRow(row.first(), row.mid(1)); - } -} - -void TableWidget::addEmptyRows() { - QWebElement body = container.findFirst("tbody"); - int rowIdx = rows.size(); - while (rowIdx < MIN_ROW_COUNT) { - QString row = "<tr class=\"empty-row\">"; - foreach (const QString &h, header()) { - Q_UNUSED(h); - row += "<td> </td>"; - } - row += "</tr>"; - body.appendInside(row); - rowIdx++; - } -} - -void TableWidget::addRow(const QString &dataId, const QStringList &ds, const QString &rowId) { - QString row; - row += QString("<tr class=\"filled-row\" %1>").arg(rowId.isEmpty() ? "" : "id=\"" + rowId + "\""); - row += createRow(ds); - row += "</tr>"; - - QWebElement body = container.findFirst("tbody"); - QWebElement emptyRow = body.findFirst(".empty-row"); - if (emptyRow.isNull()) { - body.appendInside(row); - rows[dataId] = body.lastChild(); - } else { - emptyRow.setOuterXml(row); - rows[dataId] = body.findAll(".filled-row").last(); - } -} - -void TableWidget::updateRow(const QString &dataId, const QStringList &d) { - if (rows.contains(dataId)) { - rows[dataId].setInnerXml(createRow(d)); - } else { - addRow(dataId, d); - } -} - -QString TableWidget::createRow(const QStringList &ds) { - QString row; - foreach (const QString &d, ds) { - row += "<td>" + d + "</td>"; - } - return row; -} - -QString TableWidget::wrapLongText(const QString &text) { - return "<div class=\"long-text\" title=\"" + text + "\">" + text + "</div>"; -} - -} // U2 diff --git a/src/corelibs/U2Designer/src/dashboard/TableWidget.h b/src/corelibs/U2Designer/src/dashboard/TableWidget.h deleted file mode 100644 index 4f0579acbd5485825b419641120e8bfa8d3de9c3..0000000000000000000000000000000000000000 --- a/src/corelibs/U2Designer/src/dashboard/TableWidget.h +++ /dev/null @@ -1,60 +0,0 @@ -/** - * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> - * http://ugene.net - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ - -#ifndef _U2_TABLEWIDGET_H_ -#define _U2_TABLEWIDGET_H_ - -#include <U2Designer/Dashboard.h> - -namespace U2 { - -class TableWidget : public DashboardWidget { - Q_OBJECT -public: - TableWidget(const QWebElement &container, const QString &id, Dashboard *parent); - - /** The list of % */ - virtual QList<int> widths() = 0; - virtual QStringList header() = 0; - /** The first item of data is the id, which has not the column */ - virtual QList<QStringList> data() = 0; - - static QString wrapLongText(const QString &text); - -protected slots: - void createTable(); - void fillTable(); - -protected: - void addRow(const QString &dataId, const QStringList &d, const QString &rowId = ""); - void updateRow(const QString &dataId, const QStringList &d); - virtual QString createRow(const QStringList &d); - - bool useEmptyRows; - QMap<QString, QWebElement> rows; - -private: - void addEmptyRows(); -}; - -} // U2 - -#endif // _U2_TABLEWIDGET_H_ diff --git a/src/corelibs/U2Designer/src/support/OutputDirectoryWidget.cpp b/src/corelibs/U2Designer/src/support/OutputDirectoryWidget.cpp index a97d3e030a559c65722b019f94cfdbfdcc2d0712..56c831ea5580407b5cfd162f1c8731b8de20ab09 100644 --- a/src/corelibs/U2Designer/src/support/OutputDirectoryWidget.cpp +++ b/src/corelibs/U2Designer/src/support/OutputDirectoryWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -36,18 +36,16 @@ namespace U2 { -const QString OutputDirectoryWidget::INFO = QObject::tr( - "The Workflow Output Folder is a common folder that is used to store all output files in the Workflow Designer." - " A separate subdirectory of the folder is created for each run of a workflow." - "\n\nSet up the folder:" - ); - OutputDirectoryWidget::OutputDirectoryWidget(QWidget *parent, bool commitOnHide) : QWidget(parent), commitOnHide(commitOnHide) { QVBoxLayout *l = new QVBoxLayout(this); l->setContentsMargins(3, 3, 3, 3); - label = new QLabel(INFO, this); + label = new QLabel(tr( + "The Workflow Output Folder is a common folder that is used to store all output files in the Workflow Designer." + " A separate subdirectory of the folder is created for each run of a workflow." + "\n\nSet up the folder:" + ), this); label->setAlignment(Qt::AlignJustify | Qt::AlignVCenter); label->setWordWrap(true); label->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); diff --git a/src/corelibs/U2Designer/src/support/OutputDirectoryWidget.h b/src/corelibs/U2Designer/src/support/OutputDirectoryWidget.h index 828290daa3e9b32012d46ae663a1f7db4c159f9f..2f1f73638fb5c0cb0e5c114e4d80f902524d5497 100644 --- a/src/corelibs/U2Designer/src/support/OutputDirectoryWidget.h +++ b/src/corelibs/U2Designer/src/support/OutputDirectoryWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -41,8 +41,6 @@ public: QString getChoosenDir(){return pathEdit->text();} void commit(); - static const QString INFO; - signals: void si_browsed(); diff --git a/src/corelibs/U2Designer/src/support/URLLineEdit.cpp b/src/corelibs/U2Designer/src/support/URLLineEdit.cpp index 9c651cecb8552929a333f685de0edb21fd0d5025..70a49f47ef31af0f02717d5538c9189a163488ac 100644 --- a/src/corelibs/U2Designer/src/support/URLLineEdit.cpp +++ b/src/corelibs/U2Designer/src/support/URLLineEdit.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/support/URLLineEdit.h b/src/corelibs/U2Designer/src/support/URLLineEdit.h index 9761410467129b1048dda2abb5a01337503bcdfe..9331b01a1e182e2a7acb931e6b3ee77ba226c8cb 100644 --- a/src/corelibs/U2Designer/src/support/URLLineEdit.h +++ b/src/corelibs/U2Designer/src/support/URLLineEdit.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/BowtieWidgetController.cpp b/src/corelibs/U2Designer/src/wizard/BowtieWidgetController.cpp index ef725bd450233d8ebc722db912843465bfbb0e6f..b7d269f95dcf90a5382029bcb362689878d7e953 100644 --- a/src/corelibs/U2Designer/src/wizard/BowtieWidgetController.cpp +++ b/src/corelibs/U2Designer/src/wizard/BowtieWidgetController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -21,8 +21,6 @@ #include <QPushButton> -#include <U2Core/U2SafePoints.h> - #include <U2Gui/LastUsedDirHelper.h> #include <U2Gui/U2FileDialog.h> diff --git a/src/corelibs/U2Designer/src/wizard/BowtieWidgetController.h b/src/corelibs/U2Designer/src/wizard/BowtieWidgetController.h index cf0fca27dc118f04ffd28e3ea4bd51045290d706..d0e3e941134e49bfc941c9b70ab5309b3ef0b18c 100644 --- a/src/corelibs/U2Designer/src/wizard/BowtieWidgetController.h +++ b/src/corelibs/U2Designer/src/wizard/BowtieWidgetController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/ElementSelectorController.cpp b/src/corelibs/U2Designer/src/wizard/ElementSelectorController.cpp index 2d928ace17a5290dbb6bb414750d37f6e95ff777..9f1f08d178c8bfef195d4f9a86f12cad08436094 100644 --- a/src/corelibs/U2Designer/src/wizard/ElementSelectorController.cpp +++ b/src/corelibs/U2Designer/src/wizard/ElementSelectorController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/ElementSelectorController.h b/src/corelibs/U2Designer/src/wizard/ElementSelectorController.h index 7cd23715adfede849711d59cb1ad1e1854c1b1e0..abd68a8aaceb015ca60560a0f0782bcf66a9f338 100644 --- a/src/corelibs/U2Designer/src/wizard/ElementSelectorController.h +++ b/src/corelibs/U2Designer/src/wizard/ElementSelectorController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/PairedDatasetsController.cpp b/src/corelibs/U2Designer/src/wizard/PairedDatasetsController.cpp index 5d5ad5003d167d53c1a5af4adcd8c8c22c6e9bb7..d04585780d527e9144a1c9368075e5f555f7dd5b 100644 --- a/src/corelibs/U2Designer/src/wizard/PairedDatasetsController.cpp +++ b/src/corelibs/U2Designer/src/wizard/PairedDatasetsController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/PairedDatasetsController.h b/src/corelibs/U2Designer/src/wizard/PairedDatasetsController.h index 7565df3031d842393ba39b3b85672e16fccc527b..f2133adb0dd634489d27e3b032c72e5553f7f7ed 100644 --- a/src/corelibs/U2Designer/src/wizard/PairedDatasetsController.h +++ b/src/corelibs/U2Designer/src/wizard/PairedDatasetsController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/PropertyWizardController.cpp b/src/corelibs/U2Designer/src/wizard/PropertyWizardController.cpp index 8854bea2fe6451323c01918e1bfedbba5e24b4a6..9e53c9ef381f6e6da9fd57d0058678cb0ef3cfae 100644 --- a/src/corelibs/U2Designer/src/wizard/PropertyWizardController.cpp +++ b/src/corelibs/U2Designer/src/wizard/PropertyWizardController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/PropertyWizardController.h b/src/corelibs/U2Designer/src/wizard/PropertyWizardController.h index 3626313afc74e15959bc90292af14479023a3b91..b4b000a8580ce9e5f12bb4f89c8638621f967cd6 100644 --- a/src/corelibs/U2Designer/src/wizard/PropertyWizardController.h +++ b/src/corelibs/U2Designer/src/wizard/PropertyWizardController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/RadioController.cpp b/src/corelibs/U2Designer/src/wizard/RadioController.cpp index 0eb3f159628e60fb73b54728fe9af78660715dd3..c8adf87dd9b105be4b1cc1a19f2bf03ceb56e7d6 100644 --- a/src/corelibs/U2Designer/src/wizard/RadioController.cpp +++ b/src/corelibs/U2Designer/src/wizard/RadioController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/RadioController.h b/src/corelibs/U2Designer/src/wizard/RadioController.h index 4ca97f26d019a409f768a630f72132d3c2aca139..9d9b4522e8050b015e3229ada485eab876ca038f 100644 --- a/src/corelibs/U2Designer/src/wizard/RadioController.h +++ b/src/corelibs/U2Designer/src/wizard/RadioController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/SelectorActors.cpp b/src/corelibs/U2Designer/src/wizard/SelectorActors.cpp index 8358ef59533f1f73b4d088962888bdcbd4c0e1bf..3cd39973f6b88e701300730c3870f15e21d5fcdc 100644 --- a/src/corelibs/U2Designer/src/wizard/SelectorActors.cpp +++ b/src/corelibs/U2Designer/src/wizard/SelectorActors.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/SelectorActors.h b/src/corelibs/U2Designer/src/wizard/SelectorActors.h index f8319cac904b6663b737731ceeb0652353422847..4208e6a5ac0a4679d6b6f26db714d5a9257fae54 100644 --- a/src/corelibs/U2Designer/src/wizard/SelectorActors.h +++ b/src/corelibs/U2Designer/src/wizard/SelectorActors.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/SettingsController.cpp b/src/corelibs/U2Designer/src/wizard/SettingsController.cpp index 10d2be88e7714700bc7ad5be9923bf05e23e525a..aeeec175899ff203d26b5696359798571e736569 100644 --- a/src/corelibs/U2Designer/src/wizard/SettingsController.cpp +++ b/src/corelibs/U2Designer/src/wizard/SettingsController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/SettingsController.h b/src/corelibs/U2Designer/src/wizard/SettingsController.h index 0d62000babeea1f01f4c945a4208821cae121d5d..ac0bf4168389ce709ca4aa818511460f0dbb8a40 100644 --- a/src/corelibs/U2Designer/src/wizard/SettingsController.h +++ b/src/corelibs/U2Designer/src/wizard/SettingsController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/TophatSamplesWidgetController.cpp b/src/corelibs/U2Designer/src/wizard/TophatSamplesWidgetController.cpp index 0415c90f3a0aa07c0a7eb6be3026604e263872e2..532189d74385808008f6aa6fadf78fa66a4c4584 100644 --- a/src/corelibs/U2Designer/src/wizard/TophatSamplesWidgetController.cpp +++ b/src/corelibs/U2Designer/src/wizard/TophatSamplesWidgetController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/TophatSamplesWidgetController.h b/src/corelibs/U2Designer/src/wizard/TophatSamplesWidgetController.h index e58dab48f8fb12268beaa4b8f3637a27a32cfbbe..0f35a6f628c8a2ac6cc91fab00a407f508720bc6 100644 --- a/src/corelibs/U2Designer/src/wizard/TophatSamplesWidgetController.h +++ b/src/corelibs/U2Designer/src/wizard/TophatSamplesWidgetController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/UrlAndDatasetWizardController.cpp b/src/corelibs/U2Designer/src/wizard/UrlAndDatasetWizardController.cpp index d8310bf0d7aa635d6f8771e03caff0e65e2a2712..95aee872da7f3586077131a7c6b983398d48eb9d 100644 --- a/src/corelibs/U2Designer/src/wizard/UrlAndDatasetWizardController.cpp +++ b/src/corelibs/U2Designer/src/wizard/UrlAndDatasetWizardController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/UrlAndDatasetWizardController.h b/src/corelibs/U2Designer/src/wizard/UrlAndDatasetWizardController.h index 12fe3ad3667a11a5489d8ec899e20199eee22079..a8f7f425ffb3c1899704e1e88b172d848475e645 100644 --- a/src/corelibs/U2Designer/src/wizard/UrlAndDatasetWizardController.h +++ b/src/corelibs/U2Designer/src/wizard/UrlAndDatasetWizardController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/WDWizardPage.cpp b/src/corelibs/U2Designer/src/wizard/WDWizardPage.cpp index 26062c17352d662e82ac753624023fae5e6c593a..cb134e0cd443df12097afbb83ef1aa191984857a 100644 --- a/src/corelibs/U2Designer/src/wizard/WDWizardPage.cpp +++ b/src/corelibs/U2Designer/src/wizard/WDWizardPage.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/WDWizardPage.h b/src/corelibs/U2Designer/src/wizard/WDWizardPage.h index fab274c6d3929da0de2aa8bba0e945b7d91b0a64..55698e69ad69c6e83eb01d05fe2a3ee10053f580 100644 --- a/src/corelibs/U2Designer/src/wizard/WDWizardPage.h +++ b/src/corelibs/U2Designer/src/wizard/WDWizardPage.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/WidgetController.cpp b/src/corelibs/U2Designer/src/wizard/WidgetController.cpp index 028f84d9c4750046f8df22c5464730a15b92bae6..5b877e8b170f2afe273aa8f1c76c9087494869fc 100644 --- a/src/corelibs/U2Designer/src/wizard/WidgetController.cpp +++ b/src/corelibs/U2Designer/src/wizard/WidgetController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/WidgetController.h b/src/corelibs/U2Designer/src/wizard/WidgetController.h index 7cc434c0c5b1a3def1cabffd35738d71168c43dc..4ec1715bf3f66a9b5daf15c0b6d76a7c2517cbbe 100644 --- a/src/corelibs/U2Designer/src/wizard/WidgetController.h +++ b/src/corelibs/U2Designer/src/wizard/WidgetController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/WizardController.cpp b/src/corelibs/U2Designer/src/wizard/WizardController.cpp index 00774571b4b72c2136607a8eea75a64dff753f36..7b6fdef10aafd72820eb502c22431f9b83801542 100644 --- a/src/corelibs/U2Designer/src/wizard/WizardController.cpp +++ b/src/corelibs/U2Designer/src/wizard/WizardController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -81,6 +81,7 @@ WizardController::~WizardController() { QWizard * WizardController::createGui() { QWizard *result = new QWizard((QWidget*)AppContext::getMainWindow()->getQMainWindow()); + result->setAttribute(Qt::WA_DeleteOnClose); setupButtons(result); int idx = 0; diff --git a/src/corelibs/U2Designer/src/wizard/WizardController.h b/src/corelibs/U2Designer/src/wizard/WizardController.h index 1dbd78d7bf3c442d3e91ccc71e00eac5cb27d573..dd5ecb98e87f53a3b9d191df80bd66dcbdc275cb 100644 --- a/src/corelibs/U2Designer/src/wizard/WizardController.h +++ b/src/corelibs/U2Designer/src/wizard/WizardController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/WizardPageController.cpp b/src/corelibs/U2Designer/src/wizard/WizardPageController.cpp index 64e88ec517b85b80af4aa75720090e8a70beb8ff..0a8f4102b2a2d5ac9f20dfe167c22022ef5338fc 100644 --- a/src/corelibs/U2Designer/src/wizard/WizardPageController.cpp +++ b/src/corelibs/U2Designer/src/wizard/WizardPageController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/src/wizard/WizardPageController.h b/src/corelibs/U2Designer/src/wizard/WizardPageController.h index 94b99c5312e8d16e469d94646330fbdb4d7ab964..00a0e930a7ac212e6e4821c6e9c17a3152cab260 100644 --- a/src/corelibs/U2Designer/src/wizard/WizardPageController.h +++ b/src/corelibs/U2Designer/src/wizard/WizardPageController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Designer/transl/russian.ts b/src/corelibs/U2Designer/transl/russian.ts index 5fd9c60587434b7d0066cb5f1948c090cd05f984..94d54f48b615858a5b3ecaa1d45116be42b87ac8 100644 --- a/src/corelibs/U2Designer/transl/russian.ts +++ b/src/corelibs/U2Designer/transl/russian.ts @@ -500,7 +500,7 @@ this merge sequence slot:</source> <translation>Выберите пример</translation> </message> <message> - <location filename="../src/WorkflowGUIUtils.cpp" line="159"/> + <location filename="../src/WorkflowGUIUtils.cpp" line="160"/> <source>Double click to load the sample</source> <translation>Двойной щелчок загрузит пример</translation> </message> @@ -525,22 +525,22 @@ this merge sequence slot:</source> <translation>UGENE обнаружил "%1" в файловой ÑиÑтеме. Хотите дабавить в качеÑтве %2 Ñ Ð¿Ð°Ñ€Ð½Ñ‹Ð¼Ð¸ ридами?</translation> </message> <message> - <location filename="../src/EstimationReporter.cpp" line="78"/> + <location filename="../src/EstimationReporter.cpp" line="35"/> <source>m</source> <translation>m</translation> </message> <message> - <location filename="../src/EstimationReporter.cpp" line="79"/> + <location filename="../src/EstimationReporter.cpp" line="36"/> <source>h</source> <translation>h</translation> </message> <message> - <location filename="../src/EstimationReporter.cpp" line="94"/> + <location filename="../src/EstimationReporter.cpp" line="51"/> <source>Workflow Estimation</source> <translation>Оценка Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñхемы</translation> </message> <message> - <location filename="../src/EstimationReporter.cpp" line="95"/> + <location filename="../src/EstimationReporter.cpp" line="52"/> <source>Approximate estimation time of the workflow run is </source> <translation>ÐŸÑ€Ð¸Ð¼ÐµÑ€Ð½Ð°Ñ Ð¾Ñ†ÐµÐ½ÐºÐ° длительноÑти Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñхемы </translation> </message> @@ -552,31 +552,31 @@ this merge sequence slot:</source> </message> <message> <location filename="../src/wizard/SelectorActors.cpp" line="43"/> - <location filename="../src/wizard/WizardController.cpp" line="425"/> + <location filename="../src/wizard/WizardController.cpp" line="426"/> <source>Unknown actor id: %1</source> <translation>ÐеизвеÑтный идентификатор: %1</translation> </message> <message> - <location filename="../src/wizard/WizardController.cpp" line="375"/> - <location filename="../src/wizard/WizardController.cpp" line="381"/> - <location filename="../src/wizard/WizardController.cpp" line="387"/> - <location filename="../src/wizard/WizardController.cpp" line="404"/> - <location filename="../src/wizard/WizardController.cpp" line="459"/> + <location filename="../src/wizard/WizardController.cpp" line="376"/> + <location filename="../src/wizard/WizardController.cpp" line="382"/> + <location filename="../src/wizard/WizardController.cpp" line="388"/> + <location filename="../src/wizard/WizardController.cpp" line="405"/> + <location filename="../src/wizard/WizardController.cpp" line="460"/> <source>Undefined variable: %1</source> <translation>ÐÐµÐ¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð½Ð°Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ: %1</translation> </message> <message> - <location filename="../src/wizard/WizardController.cpp" line="412"/> + <location filename="../src/wizard/WizardController.cpp" line="413"/> <source>Actors selector is already defined: %1</source> <translation>Actors selector is already defined: %1</translation> </message> <message> - <location filename="../src/wizard/WizardController.cpp" line="422"/> + <location filename="../src/wizard/WizardController.cpp" line="423"/> <source>Unknown actors selector: %1</source> <translation>Unknown actors selector: %1</translation> </message> <message> - <location filename="../src/wizard/WizardController.cpp" line="427"/> + <location filename="../src/wizard/WizardController.cpp" line="428"/> <source>Unknown actors selector value id: %1</source> <translation>Unknown actors selector value id: %1</translation> </message> @@ -594,11 +594,10 @@ Set up the folder:</source> УÑтановить папку:</translation> </message> <message> - <location filename="../src/support/OutputDirectoryWidget.cpp" line="39"/> <source>The Workflow Output Folder is a common folder that is used to store all output files in the Workflow Designer. A separate subdirectory of the folder is created for each run of a workflow. Set up the folder:</source> - <translation>Ð’Ñ‹Ñ…Ð¾Ð´Ð½Ð°Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð´Ð»Ñ Ñхемы Ñто Ð¾Ð±Ñ‰Ð°Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ð¸ÑпользуетÑÑ Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð²Ñех выходных файлов в дизайнере вычиÑлительных Ñхем. Ð”Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ запуÑка Ñхемы будет Ñоздана Ð¾Ñ‚Ð´ÐµÐ»ÑŒÐ½Ð°Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ. + <translation type="vanished">Ð’Ñ‹Ñ…Ð¾Ð´Ð½Ð°Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð´Ð»Ñ Ñхемы Ñто Ð¾Ð±Ñ‰Ð°Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ð¸ÑпользуетÑÑ Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð²Ñех выходных файлов в дизайнере вычиÑлительных Ñхем. Ð”Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ запуÑка Ñхемы будет Ñоздана Ð¾Ñ‚Ð´ÐµÐ»ÑŒÐ½Ð°Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ. УÑтановить директорию:</translation> </message> @@ -690,14 +689,14 @@ Set up the folder:</source> <context> <name>U2::BowtieWidgetController</name> <message> - <location filename="../src/wizard/BowtieWidgetController.cpp" line="70"/> + <location filename="../src/wizard/BowtieWidgetController.cpp" line="68"/> <source>Select bowtie index file</source> <translation>Выберите индекÑный bowtie файл</translation> </message> <message> - <location filename="../src/wizard/BowtieWidgetController.cpp" line="81"/> + <location filename="../src/wizard/BowtieWidgetController.cpp" line="79"/> <source>Select one of Bowtie index files</source> <translation>Выберите один индекÑный Bowtie файл</translation> </message> @@ -705,17 +704,17 @@ bowtie index file</source> <context> <name>U2::BreakpointHitCountDialog</name> <message> - <location filename="../src/BreakpointHitCountDialog.cpp" line="68"/> + <location filename="../src/BreakpointHitCountDialog.cpp" line="69"/> <source>Reset</source> <translation>СброÑить</translation> </message> <message> - <location filename="../src/BreakpointHitCountDialog.cpp" line="69"/> + <location filename="../src/BreakpointHitCountDialog.cpp" line="70"/> <source>OK</source> <translation>OK</translation> </message> <message> - <location filename="../src/BreakpointHitCountDialog.cpp" line="70"/> + <location filename="../src/BreakpointHitCountDialog.cpp" line="71"/> <source>Cancel</source> <translation>Отмена</translation> </message> @@ -723,12 +722,12 @@ bowtie index file</source> <context> <name>U2::ComboBoxWidget</name> <message> - <location filename="../src/PropertyWidget.cpp" line="181"/> + <location filename="../src/PropertyWidget.cpp" line="182"/> <source>False</source> <translation>Ложь</translation> </message> <message> - <location filename="../src/PropertyWidget.cpp" line="182"/> + <location filename="../src/PropertyWidget.cpp" line="183"/> <source>True</source> <translation>ИÑтина</translation> </message> @@ -736,7 +735,7 @@ bowtie index file</source> <context> <name>U2::ComboBoxWithDbUrlWidget</name> <message> - <location filename="../src/PropertyWidget.cpp" line="342"/> + <location filename="../src/PropertyWidget.cpp" line="343"/> <source>Add New Connection</source> <translation>Добавить новое Ñоединение</translation> </message> @@ -744,12 +743,12 @@ bowtie index file</source> <context> <name>U2::ComboBoxWithUrlWidget</name> <message> - <location filename="../src/PropertyWidget.cpp" line="317"/> + <location filename="../src/PropertyWidget.cpp" line="318"/> <source>Select a folder</source> <translation>Укажите папку</translation> </message> <message> - <location filename="../src/PropertyWidget.cpp" line="322"/> + <location filename="../src/PropertyWidget.cpp" line="323"/> <source>Select a file</source> <translation>Выберите файл</translation> </message> @@ -770,45 +769,58 @@ bowtie index file</source> <context> <name>U2::Dashboard</name> <message> - <location filename="../src/dashboard/Dashboard.cpp" line="165"/> <source>Output Files</source> - <translation>Выходные файлы</translation> + <translation type="vanished">Выходные файлы</translation> </message> <message> - <location filename="../src/dashboard/Dashboard.cpp" line="166"/> <source>Workflow Task</source> - <translation>Задача Ñхемы</translation> + <translation type="vanished">Задача Ñхемы</translation> </message> <message> - <location filename="../src/dashboard/Dashboard.cpp" line="167"/> <source>Common Statistics</source> - <translation>ÐžÐ±Ñ‰Ð°Ñ ÑтатиÑтика</translation> + <translation type="vanished">ÐžÐ±Ñ‰Ð°Ñ ÑтатиÑтика</translation> </message> <message> - <location filename="../src/dashboard/Dashboard.cpp" line="174"/> <source>Parameters</source> - <translation>Параметры</translation> + <translation type="vanished">Параметры</translation> </message> <message> - <location filename="../src/dashboard/Dashboard.cpp" line="251"/> - <location filename="../src/dashboard/Dashboard.cpp" line="259"/> <source>External Tools</source> - <translation>Внешние инÑтрументы</translation> + <translation type="vanished">Внешние инÑтрументы</translation> </message> <message> - <location filename="../src/dashboard/Dashboard.cpp" line="191"/> <source>Problems</source> - <translation>Проблемы</translation> + <translation type="vanished">Проблемы</translation> </message> <message> - <location filename="../src/dashboard/Dashboard.cpp" line="201"/> + <location filename="../src/dashboard/Dashboard.cpp" line="188"/> <source>Can not create a folder: </source> <translation>Ðевозможно Ñоздать папку: </translation> </message> <message> - <location filename="../src/dashboard/Dashboard.cpp" line="216"/> <source>Can not open a file for writing: </source> - <translation>Ðевозможно открыть файл Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи: </translation> + <translation type="vanished">Ðевозможно открыть файл Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи: </translation> + </message> +</context> +<context> + <name>U2::DashboardInfoRegistry</name> + <message> + <location filename="../src/dashboard/DashboardInfoRegistry.cpp" line="138"/> + <source>Can't register a dashboard info: '%1'</source> + <translation>Can't register a dashboard info: '%1'</translation> + </message> +</context> +<context> + <name>U2::DashboardJsAgent</name> + <message> + <location filename="../src/dashboard/DashboardJsAgent.cpp" line="79"/> + <source>Error</source> + <translation>Ошибка</translation> + </message> + <message> + <location filename="../src/dashboard/DashboardJsAgent.cpp" line="79"/> + <source>The file does not exist</source> + <translation>Файл не ÑущеÑтвует</translation> </message> </context> <context> @@ -832,34 +844,34 @@ bowtie index file</source> <context> <name>U2::DatasetsListWidget</name> <message> - <location filename="../src/DatasetsListWidget.cpp" line="53"/> + <location filename="../src/DatasetsListWidget.cpp" line="55"/> <source>Add dataset</source> <translation>Добавить набор данных</translation> </message> <message> - <location filename="../src/DatasetsListWidget.cpp" line="96"/> + <location filename="../src/DatasetsListWidget.cpp" line="99"/> <source>Enter Dataset Name</source> <translation>ВвеÑти Ð¸Ð¼Ñ Ð½Ð°Ð±Ð¾Ñ€Ð° данных</translation> </message> <message> - <location filename="../src/DatasetsListWidget.cpp" line="97"/> - <location filename="../src/DatasetsListWidget.cpp" line="129"/> + <location filename="../src/DatasetsListWidget.cpp" line="100"/> + <location filename="../src/DatasetsListWidget.cpp" line="132"/> <source>New dataset name:</source> <translation>Ð˜Ð¼Ñ Ð½Ð¾Ð²Ð¾Ð³Ð¾ набора данных:</translation> </message> <message> - <location filename="../src/DatasetsListWidget.cpp" line="107"/> - <location filename="../src/DatasetsListWidget.cpp" line="138"/> + <location filename="../src/DatasetsListWidget.cpp" line="110"/> + <location filename="../src/DatasetsListWidget.cpp" line="141"/> <source>Error</source> <translation>Ошибка</translation> </message> <message> - <location filename="../src/DatasetsListWidget.cpp" line="128"/> + <location filename="../src/DatasetsListWidget.cpp" line="131"/> <source>Rename Dataset</source> <translation>Переименовать набор данных</translation> </message> <message> - <location filename="../src/DatasetsListWidget.cpp" line="148"/> + <location filename="../src/DatasetsListWidget.cpp" line="151"/> <source>Rename dataset</source> <translation>Переименовать набор данных</translation> </message> @@ -992,22 +1004,22 @@ bowtie index file</source> <context> <name>U2::GroupBox</name> <message> - <location filename="../src/wizard/WizardController.cpp" line="906"/> + <location filename="../src/wizard/WizardController.cpp" line="908"/> <source>Show</source> <translation>Показать</translation> </message> <message> - <location filename="../src/wizard/WizardController.cpp" line="911"/> + <location filename="../src/wizard/WizardController.cpp" line="913"/> <source>Hide</source> <translation>Скрыть</translation> </message> <message> - <location filename="../src/wizard/WizardController.cpp" line="931"/> + <location filename="../src/wizard/WizardController.cpp" line="933"/> <source>additional</source> <translation>дополнительно</translation> </message> <message> - <location filename="../src/wizard/WizardController.cpp" line="935"/> + <location filename="../src/wizard/WizardController.cpp" line="937"/> <source> settings</source> <translation> наÑтройки</translation> </message> @@ -1055,14 +1067,12 @@ bowtie index file</source> <context> <name>U2::JavascriptAgent</name> <message> - <location filename="../src/dashboard/Dashboard.cpp" line="394"/> <source>Error</source> - <translation>Ошибка</translation> + <translation type="vanished">Ошибка</translation> </message> <message> - <location filename="../src/dashboard/Dashboard.cpp" line="394"/> <source>The file does not exist</source> - <translation>Файл не ÑущеÑтвует</translation> + <translation type="vanished">Файл не ÑущеÑтвует</translation> </message> </context> <context> @@ -1151,10 +1161,46 @@ bowtie index file</source> <translation>Ошибка</translation> </message> </context> +<context> + <name>U2::NotificationsWidget</name> + <message> + <source>Error</source> + <translation type="obsolete">Ошибка</translation> + </message> + <message> + <source>Warning</source> + <translation type="obsolete">Ожидание</translation> + </message> + <message> + <source>Information</source> + <translation type="obsolete">ИнформациÑ</translation> + </message> + <message> + <source>Type</source> + <translation type="obsolete">Тип</translation> + </message> + <message> + <source>Element</source> + <translation type="obsolete">Ðлемент</translation> + </message> + <message> + <source>Message</source> + <translation type="obsolete">Сообщение</translation> + </message> +</context> <context> <name>U2::OutputDirectoryWidget</name> <message> - <location filename="../src/support/OutputDirectoryWidget.cpp" line="71"/> + <location filename="../src/support/OutputDirectoryWidget.cpp" line="44"/> + <source>The Workflow Output Folder is a common folder that is used to store all output files in the Workflow Designer. A separate subdirectory of the folder is created for each run of a workflow. + +Set up the folder:</source> + <translation>Ð’Ñ‹Ñ…Ð¾Ð´Ð½Ð°Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð´Ð»Ñ Ñхемы Ñто Ð¾Ð±Ñ‰Ð°Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ð¸ÑпользуетÑÑ Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð²Ñех выходных файлов в дизайнере вычиÑлительных Ñхем. Ð”Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ запуÑка Ñхемы будет Ñоздана Ð¾Ñ‚Ð´ÐµÐ»ÑŒÐ½Ð°Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ. + +УÑтановить директорию:</translation> + </message> + <message> + <location filename="../src/support/OutputDirectoryWidget.cpp" line="69"/> <source>Select a folder</source> <translation>Укажите папку</translation> </message> @@ -1185,61 +1231,51 @@ bowtie index file</source> <context> <name>U2::OutputFilesWidget</name> <message> - <location filename="../src/dashboard/OutputFilesWidget.cpp" line="65"/> <source>File</source> - <translation>Файл</translation> + <translation type="vanished">Файл</translation> </message> <message> - <location filename="../src/dashboard/OutputFilesWidget.cpp" line="65"/> <source>Producer</source> - <translation>Производитель</translation> + <translation type="vanished">Производитель</translation> </message> <message> - <location filename="../src/dashboard/OutputFilesWidget.cpp" line="89"/> <source>Open containing folder</source> - <translation>Открыть Ñодержащую папку</translation> + <translation type="vanished">Открыть Ñодержащую папку</translation> </message> <message> <source>Open by operating system</source> <translation type="vanished">Открыть при помощи операционной ÑиÑтемы</translation> </message> <message> - <location filename="../src/dashboard/OutputFilesWidget.cpp" line="207"/> <source>files</source> - <translation>файлы</translation> + <translation type="vanished">файлы</translation> </message> </context> <context> <name>U2::ProblemsWidget</name> <message> - <location filename="../src/dashboard/ProblemsWidget.cpp" line="58"/> <source>Error</source> - <translation>Ошибка</translation> + <translation type="vanished">Ошибка</translation> </message> <message> - <location filename="../src/dashboard/ProblemsWidget.cpp" line="61"/> <source>Warning</source> - <translation>Ожидание</translation> + <translation type="vanished">Ожидание</translation> </message> <message> - <location filename="../src/dashboard/ProblemsWidget.cpp" line="64"/> <source>Information</source> - <translation>ИнформациÑ</translation> + <translation type="vanished">ИнформациÑ</translation> </message> <message> - <location filename="../src/dashboard/ProblemsWidget.cpp" line="120"/> <source>Element</source> - <translation>Ðлемент</translation> + <translation type="vanished">Ðлемент</translation> </message> <message> - <location filename="../src/dashboard/ProblemsWidget.cpp" line="120"/> <source>Message</source> - <translation>Сообщение</translation> + <translation type="vanished">Сообщение</translation> </message> <message> - <location filename="../src/dashboard/ProblemsWidget.cpp" line="120"/> <source>Type</source> - <translation>Тип</translation> + <translation type="vanished">Тип</translation> </message> </context> <context> @@ -1315,7 +1351,7 @@ bowtie index file</source> <context> <name>U2::RemoveDashboardsTask</name> <message> - <location filename="../src/dashboard/Dashboard.cpp" line="469"/> + <location filename="../src/dashboard/RemoveDashboardsTask.cpp" line="31"/> <source>Remove dashboards</source> <translation>Удалить панель</translation> </message> @@ -1323,45 +1359,38 @@ bowtie index file</source> <context> <name>U2::ResourcesWidget</name> <message> - <location filename="../src/dashboard/ResourcesWidget.cpp" line="51"/> <source>Time</source> - <translation>ВремÑ</translation> + <translation type="vanished">ВремÑ</translation> </message> <message> - <location filename="../src/dashboard/ResourcesWidget.cpp" line="103"/> <source>The workflow task is in progress...</source> - <translation>Задача Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñхемы в процеÑÑе...</translation> + <translation type="vanished">Задача Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñхемы в процеÑÑе...</translation> </message> <message> - <location filename="../src/dashboard/ResourcesWidget.cpp" line="108"/> <source>The workflow task is in progress. There are problems...</source> - <translation>Задача Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñхемы в процеÑÑе. ЕÑÑ‚ÑŒ проблемы...</translation> + <translation type="vanished">Задача Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñхемы в процеÑÑе. ЕÑÑ‚ÑŒ проблемы...</translation> </message> <message> - <location filename="../src/dashboard/ResourcesWidget.cpp" line="114"/> <source>The workflow task has been finished with warnings!</source> - <translation>Задача Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñхемы завершилаÑÑŒ Ñ Ð¿Ñ€ÐµÐ´ÑƒÐ¿Ñ€ÐµÐ¶Ð´ÐµÐ½Ð¸Ñми!</translation> + <translation type="vanished">Задача Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñхемы завершилаÑÑŒ Ñ Ð¿Ñ€ÐµÐ´ÑƒÐ¿Ñ€ÐµÐ¶Ð´ÐµÐ½Ð¸Ñми!</translation> </message> <message> - <location filename="../src/dashboard/ResourcesWidget.cpp" line="120"/> <source>The workflow task has been finished with errors!</source> - <translation>Задача Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñхемы завершилаÑÑŒ Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°Ð¼Ð¸!</translation> + <translation type="vanished">Задача Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñхемы завершилаÑÑŒ Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°Ð¼Ð¸!</translation> </message> <message> - <location filename="../src/dashboard/ResourcesWidget.cpp" line="126"/> <source>The workflow task has been finished successfully!</source> - <translation>Задача Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñхемы завершилаÑÑŒ без ошибок!</translation> + <translation type="vanished">Задача Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñхемы завершилаÑÑŒ без ошибок!</translation> </message> <message> - <location filename="../src/dashboard/ResourcesWidget.cpp" line="131"/> <source>The workflow task has been canceled!</source> - <translation>Задача Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñхемы была отменена!</translation> + <translation type="vanished">Задача Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñхемы была отменена!</translation> </message> </context> <context> <name>U2::ScanDashboardsDirTask</name> <message> - <location filename="../src/dashboard/Dashboard.cpp" line="423"/> + <location filename="../src/dashboard/ScanDashboardsDirTask.cpp" line="35"/> <source>Scan dashboards folder</source> <translation>Сканирование папки панели</translation> </message> @@ -1369,12 +1398,12 @@ bowtie index file</source> <context> <name>U2::SchemaRunModeDelegate</name> <message> - <location filename="../src/DelegateEditors.cpp" line="622"/> + <location filename="../src/DelegateEditors.cpp" line="624"/> <source>This computer</source> <translation>Данный компьютер</translation> </message> <message> - <location filename="../src/DelegateEditors.cpp" line="623"/> + <location filename="../src/DelegateEditors.cpp" line="625"/> <source>Remote computer</source> <translation>Удаленный компьютер</translation> </message> @@ -1395,19 +1424,16 @@ bowtie index file</source> <context> <name>U2::StatisticsWidget</name> <message> - <location filename="../src/dashboard/StatisticsWidget.cpp" line="63"/> <source>Element</source> - <translation>Ðлемент</translation> + <translation type="vanished">Ðлемент</translation> </message> <message> - <location filename="../src/dashboard/StatisticsWidget.cpp" line="63"/> <source>Elapsed time</source> - <translation>Прошедшее времÑ</translation> + <translation type="vanished">Прошедшее времÑ</translation> </message> <message> - <location filename="../src/dashboard/StatisticsWidget.cpp" line="63"/> <source>Output messages</source> - <translation>Выходные ÑообщениÑ</translation> + <translation type="vanished">Выходные ÑообщениÑ</translation> </message> </context> <context> @@ -1522,7 +1548,7 @@ bowtie index file</source> <context> <name>U2::URLWidget</name> <message> - <location filename="../src/PropertyWidget.cpp" line="505"/> + <location filename="../src/PropertyWidget.cpp" line="506"/> <source>add</source> <translation>добавить</translation> </message> @@ -1538,22 +1564,22 @@ bowtie index file</source> <context> <name>U2::WizardController</name> <message> - <location filename="../src/wizard/WizardController.cpp" line="100"/> + <location filename="../src/wizard/WizardController.cpp" line="101"/> <source>Apply</source> <translation>ПринÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/wizard/WizardController.cpp" line="122"/> + <location filename="../src/wizard/WizardController.cpp" line="123"/> <source>Defaults</source> <translation>По умолчанию</translation> </message> <message> - <location filename="../src/wizard/WizardController.cpp" line="123"/> + <location filename="../src/wizard/WizardController.cpp" line="124"/> <source>Set page values by default</source> <translation>УÑтановить Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¿Ð¾ умолчанию</translation> </message> <message> - <location filename="../src/wizard/WizardController.cpp" line="128"/> + <location filename="../src/wizard/WizardController.cpp" line="129"/> <source>Run</source> <translation>ЗапуÑтить</translation> </message> diff --git a/src/corelibs/U2Formats/U2Formats.pri b/src/corelibs/U2Formats/U2Formats.pri index 83b2d403e7b99424a8ce507146eb7c7a33677741..aeb1d07218d1f16b5de2506d4decf136a91ba9ab 100644 --- a/src/corelibs/U2Formats/U2Formats.pri +++ b/src/corelibs/U2Formats/U2Formats.pri @@ -3,28 +3,23 @@ MODULE_ID=U2Formats include( ../../ugene_lib_common.pri ) -use_bundled_zlib() { - macx: LIBS += -lzlib -} else { - macx: LIBS += -lz -} - -UGENE_RELATIVE_DESTDIR = '' +LIBS += $$add_z_lib() DEFINES += QT_FATAL_ASSERT BUILDING_U2FORMATS_DLL -LIBS += -L../../_release -lU2Core -lU2Algorithm -LIBS += -lugenedb -lsamtools +LIBS += -L../../$$out_dir() +LIBS += -lU2Core$$D -lU2Algorithm$$D +LIBS += -lsamtools$$D +LIBS += $$add_sqlite_lib() win32-msvc2013 { DEFINES += NOMINMAX _XKEYCHECK_H - LIBS += -lzlib } QT += sql widgets # Force re-linking when lib changes -unix:POST_TARGETDEPS += ../../_release/libsamtools.a +unix:POST_TARGETDEPS += ../../$$out_dir()/libsamtools$${D}.a # Same options which samtools is built with DEFINES+="_FILE_OFFSET_BITS=64" _LARGEFILE64_SOURCE _USE_KNETFILE INCLUDEPATH += ../../libs_3rdparty/samtools/src ../../libs_3rdparty/samtools/src/samtools @@ -40,36 +35,9 @@ win32 { } INCLUDEPATH += ../../libs_3rdparty/sqlite3/src - -!debug_and_release|build_pass { - - CONFIG(debug, debug|release) { - DESTDIR=../../_debug - LIBS -= -L../../_release -lU2Core -lU2Algorithm -lugenedb -lsamtools - LIBS += -L../../_debug -lU2Cored -lU2Algorithmd -lugenedbd -lsamtoolsd - - win32-msvc2013 { - LIBS -= -lzlib - LIBS += -lzlibd - } - - macx { - use_bundled_zlib() { - LIBS -= -lzlib - LIBS += -lzlibd - } - } - - unix:POST_TARGETDEPS -= ../../_release/libsamtools.a - unix:POST_TARGETDEPS += ../../_debug/libsamtoolsd.a - } - - CONFIG(release, debug|release) { - DESTDIR=../../_release - } -} +DESTDIR = ../../$$out_dir() unix { - target.path = $$UGENE_INSTALL_DIR/$$UGENE_RELATIVE_DESTDIR + target.path = $$UGENE_INSTALL_DIR/ INSTALLS += target } diff --git a/src/corelibs/U2Formats/U2Formats.pro b/src/corelibs/U2Formats/U2Formats.pro index c118bd57a27a00b9415eb009b27579d241eaf89a..48d7a03282b515200503edb7d271f58bfcdbc2e9 100644 --- a/src/corelibs/U2Formats/U2Formats.pro +++ b/src/corelibs/U2Formats/U2Formats.pro @@ -99,6 +99,7 @@ HEADERS += src/ABIFormat.h \ src/sqlite_dbi/util/SqliteUpgraderFrom_0_To_1_13.h \ src/sqlite_dbi/util/SqliteUpgraderFrom_1_13_To_1_25.h \ src/tasks/BgzipTask.h \ + src/tasks/CalculateSequencesNumberTask.h \ src/tasks/ConvertAssemblyToSamTask.h \ src/tasks/ConvertFileTask.h \ src/tasks/ConvertSnpeffVariationsToAnnotationsTask.h \ @@ -206,6 +207,7 @@ SOURCES += src/ABIFormat.cpp \ src/sqlite_dbi/util/SqliteUpgraderFrom_0_To_1_13.cpp \ src/sqlite_dbi/util/SqliteUpgraderFrom_1_13_To_1_25.cpp \ src/tasks/BgzipTask.cpp \ + src/tasks/CalculateSequencesNumberTask.cpp \ src/tasks/ConvertAssemblyToSamTask.cpp \ src/tasks/ConvertFileTask.cpp \ src/tasks/ConvertSnpeffVariationsToAnnotationsTask.cpp \ diff --git a/src/corelibs/U2Formats/src/ABIFormat.cpp b/src/corelibs/U2Formats/src/ABIFormat.cpp index 34ae40fa1e606d941e9dc51a33088c472af70400..2cac9a322377416346af74ad9885d3a415cfac17 100644 --- a/src/corelibs/U2Formats/src/ABIFormat.cpp +++ b/src/corelibs/U2Formats/src/ABIFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -47,7 +47,7 @@ namespace U2 { -ABIFormat::ABIFormat(QObject* p) : DocumentFormat(p, DocumentFormatFlag_SupportStreaming, QStringList() << "ab1" << "abi" << "abif") +ABIFormat::ABIFormat(QObject* p) : DocumentFormat(p, BaseDocumentFormats::ABIF, DocumentFormatFlag_SupportStreaming, QStringList() << "ab1" << "abi" << "abif") { formatName = tr("ABIF"); formatDescription = tr("A chromatogram file format"); diff --git a/src/corelibs/U2Formats/src/ABIFormat.h b/src/corelibs/U2Formats/src/ABIFormat.h index aff87a1609b1742aeb2d463d460ea3c3fa9b14f1..b3a80a5f02e34073b94c4b4d776b9c541c93e62a 100644 --- a/src/corelibs/U2Formats/src/ABIFormat.h +++ b/src/corelibs/U2Formats/src/ABIFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -37,10 +37,6 @@ class U2FORMATS_EXPORT ABIFormat : public DocumentFormat { public: ABIFormat(QObject* p); - virtual DocumentFormatId getFormatId() const {return BaseDocumentFormats::ABIF;} - - virtual const QString& getFormatName() const {return formatName;} - virtual FormatCheckResult checkRawData(const QByteArray& rawData, const GUrl& = GUrl()) const; protected: @@ -52,7 +48,6 @@ protected: private: Document* parseABI(const U2DbiRef& dbiRef, SeekableBuf*, IOAdapter* io, const QVariantMap& fs, U2OpStatus& os); bool loadABIObjects(SeekableBuf* fp, DNASequence& seq, DNAChromatogram& cd); - QString formatName; }; }//namespace diff --git a/src/corelibs/U2Formats/src/ASNFormat.cpp b/src/corelibs/U2Formats/src/ASNFormat.cpp index 95d98ae1a623cecd45dba8b37a9cb85a0e73ab37..dce1606d90e522425846cc2f1a2ae94bb70320d2 100644 --- a/src/corelibs/U2Formats/src/ASNFormat.cpp +++ b/src/corelibs/U2Formats/src/ASNFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -46,7 +46,7 @@ namespace U2 { -ASNFormat::ASNFormat( QObject* p ) : DocumentFormat(p, DocumentFormatFlag(0), QStringList() << "prt") { +ASNFormat::ASNFormat( QObject* p ) : DocumentFormat(p, BaseDocumentFormats::PLAIN_ASN, DocumentFormatFlag(0), QStringList() << "prt") { formatName = tr("MMDB"); formatDescription = tr("ASN is a format used my the Molecular Modeling Database (MMDB)"); supportedObjectTypes+=GObjectTypes::BIOSTRUCTURE_3D; diff --git a/src/corelibs/U2Formats/src/ASNFormat.h b/src/corelibs/U2Formats/src/ASNFormat.h index 5bf15b3939eb92faee808f2668d34ea1b8c7d33b..d5c8b2426fc5d3a21e0f32ede7a6572664317bc2 100644 --- a/src/corelibs/U2Formats/src/ASNFormat.h +++ b/src/corelibs/U2Formats/src/ASNFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -72,8 +72,6 @@ class U2FORMATS_EXPORT ASNFormat : public DocumentFormat public: ASNFormat(QObject* p); ~ASNFormat(); - virtual DocumentFormatId getFormatId() const {return BaseDocumentFormats::PLAIN_ASN;} - virtual const QString& getFormatName() const {return formatName;} virtual FormatCheckResult checkRawData(const QByteArray& data, const GUrl& = GUrl()) const; protected: @@ -137,8 +135,6 @@ public: private: - QString formatName; - struct AsnBaseException { QString msg; AsnBaseException( const QString& what ) : msg( what ){} @@ -154,7 +150,8 @@ private: }; struct AsnBioStructError : public AsnBaseException { - AsnBioStructError( const QString& what ) : AsnBaseException(QString(ASNFormat::tr("biostruct3d obj loading error: %1")).arg(what) ){} + AsnBioStructError( const QString& what ) + : AsnBaseException(ASNFormat::tr("biostruct3d obj loading error: %1").arg(what) ){} }; diff --git a/src/corelibs/U2Formats/src/AbstractVariationFormat.cpp b/src/corelibs/U2Formats/src/AbstractVariationFormat.cpp index 897a72e9ac79451ae8e1ad7d3a85e8a1e0fadff5..1227dd74bcabeefd42ca0a9df2f092f8e592556a 100644 --- a/src/corelibs/U2Formats/src/AbstractVariationFormat.cpp +++ b/src/corelibs/U2Formats/src/AbstractVariationFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -57,8 +57,8 @@ QList<U2Variant> splitVariants(const U2Variant& v, const QList<QString>& altAlle } -AbstractVariationFormat::AbstractVariationFormat(QObject *p, const QStringList &fileExts, bool _isSupportHeader) - : TextDocumentFormat(p, DocumentFormatFlags_SW, fileExts), +AbstractVariationFormat::AbstractVariationFormat(QObject *p, const DocumentFormatId& id, const QStringList &fileExts, bool _isSupportHeader) + : TextDocumentFormat(p, id, DocumentFormatFlags_SW, fileExts), isSupportHeader(_isSupportHeader), maxColumnNumber(0) { @@ -68,21 +68,20 @@ AbstractVariationFormat::AbstractVariationFormat(QObject *p, const QStringList & } namespace { - const int LOCAL_READ_BUFF_SIZE = 10 * 1024; // 10 Kb - - inline QByteArray readLine(IOAdapter *io, char *buffer, int bufferSize) { - QByteArray result; - bool terminatorFound = false; - do { - qint64 length = io->readLine(buffer, bufferSize, &terminatorFound); - CHECK(-1 != length, result); - result += QByteArray(buffer, length); - } while (!terminatorFound && !io->isEof()); - return result; - } -} +const int LOCAL_READ_BUFF_SIZE = 10 * 1024; // 10 Kb -namespace { +inline QByteArray readLine(IOAdapter *io, char *buffer, int bufferSize, U2OpStatus& os) { + QByteArray result; + bool terminatorFound = false; + do { + qint64 length = io->readLine(buffer, bufferSize, &terminatorFound); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), QByteArray()); + CHECK(-1 != length, result); + + result += QByteArray(buffer, length); + } while (!terminatorFound && !io->isEof()); + return result; +} void addStringAttribute(U2OpStatus &os, U2Dbi *dbi, const U2VariantTrack &variantTrack, const QString &name, const QString &value) { CHECK(!value.isEmpty(), ); @@ -119,7 +118,9 @@ Document *AbstractVariationFormat::loadTextDocument(IOAdapter *io, const U2DbiRe int lineNumber = 0; do { os.setProgress(io->getProgress()); - QString line = readLine(io, buff, LOCAL_READ_BUFF_SIZE); + QString line = readLine(io, buff, LOCAL_READ_BUFF_SIZE, os); + CHECK_OP(os, NULL); + lineNumber++; if (line.isEmpty()) { continue; @@ -214,6 +215,7 @@ Document *AbstractVariationFormat::loadTextDocument(IOAdapter *io, const U2DbiRe } while (!io->isEof()); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), NULL); GAutoDeleteList<GObject> objects; QSet<QString> names; diff --git a/src/corelibs/U2Formats/src/AbstractVariationFormat.h b/src/corelibs/U2Formats/src/AbstractVariationFormat.h index ee708e6965df682313052e42ff6dabf19893d7da..038402de0dcfb161203c961ee18a4bb48d3db3ac 100644 --- a/src/corelibs/U2Formats/src/AbstractVariationFormat.h +++ b/src/corelibs/U2Formats/src/AbstractVariationFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -58,15 +58,13 @@ public: NoSplit }; - AbstractVariationFormat(QObject *p, const QStringList &fileExts, bool _isSupportHeader = false); + AbstractVariationFormat(QObject *p, const DocumentFormatId& id, const QStringList &fileExts, bool _isSupportHeader = false); - virtual const QString &getFormatName() const {return formatName;} virtual void storeDocument(Document *d, IOAdapter *io, U2OpStatus &os); virtual void storeEntry(IOAdapter *io, const QMap< GObjectType, QList<GObject*> > &objectsMap, U2OpStatus &os); virtual void storeHeader(GObject *obj, IOAdapter *io, U2OpStatus &os); protected: - QString formatName; bool isSupportHeader; QMap<int,ColumnRole> columnRoles; diff --git a/src/corelibs/U2Formats/src/BAMUtils.cpp b/src/corelibs/U2Formats/src/BAMUtils.cpp index d933cdec9f0b16433cb813da784a6a01d9323f05..de310cf2f369c8fb199153e29b1bf78d6258cda9 100644 --- a/src/corelibs/U2Formats/src/BAMUtils.cpp +++ b/src/corelibs/U2Formats/src/BAMUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -787,10 +787,9 @@ FASTQIterator::~FASTQIterator(){ DNASequence FASTQIterator::next(){ if (hasNext()) { kseq_t *realSeq = static_cast<kseq_t *>(seq); - - QString name = QString::fromLatin1(realSeq->name.s); - QString comment = QString::fromLatin1(realSeq->comment.s); - QString rseq = QString::fromLatin1(realSeq->seq.s); + QString name = realSeq->name.l != 0 ? QString::fromLatin1(realSeq->name.s) : ""; + QString comment = realSeq->comment.l != 0 ? QString::fromLatin1(realSeq->comment.s) : ""; + QString rseq = realSeq->seq.l != 0 ? QString::fromLatin1(realSeq->seq.s) : ""; DNAQuality quality = (realSeq->qual.l) ? QString::fromLatin1(realSeq->qual.s).toLatin1() : QByteArray(""); DNASequence res(name, rseq.toLatin1()); diff --git a/src/corelibs/U2Formats/src/BAMUtils.h b/src/corelibs/U2Formats/src/BAMUtils.h index 18825e132deac54061e53aa27e0ec53091769c13..a445db964c1789aaf43d10bec810c9c2d6eace69 100644 --- a/src/corelibs/U2Formats/src/BAMUtils.h +++ b/src/corelibs/U2Formats/src/BAMUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/BedFormat.cpp b/src/corelibs/U2Formats/src/BedFormat.cpp index e7aa998a463c1d59a7803e99606af13669535d26..f509792d8dafb9013e873c1df2b6ae417a4596b8 100644 --- a/src/corelibs/U2Formats/src/BedFormat.cpp +++ b/src/corelibs/U2Formats/src/BedFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -81,8 +81,6 @@ FormatDetectionScore BEDLineValidateFlags::getFormatDetectionScore() //------------------------------------------------------------------- // BedFormat //------------------------------------------------------------------- -const QString BedFormat::FORMAT_NAME = QObject::tr("BED"); - //Names of supported qualifier names namespace { const QString TRACK_NAME_QUALIFIER_NAME = "track_name"; @@ -100,10 +98,11 @@ namespace { } BedFormat::BedFormat(QObject* p) - : TextDocumentFormat(p, DocumentFormatFlag_SupportWriting, QStringList("bed")) + : TextDocumentFormat(p, BaseDocumentFormats::BED, DocumentFormatFlag_SupportWriting, QStringList("bed")) { + formatName = tr("BED"); formatDescription = tr("The BED (Browser Extensible Data) format was developed by UCSC for displaying transcript structures in the genome browser."); - supportedObjectTypes+=GObjectTypes::ANNOTATION_TABLE; + supportedObjectTypes += GObjectTypes::ANNOTATION_TABLE; } @@ -1014,6 +1013,8 @@ int BedFormatParser::readLine() { curLine.clear(); do { len = io->readLine(buff.data(), BufferSize - 1); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), -1); + buff.data()[len] = '\0'; curLine.append(QString(buff.data())); } while (len == BufferSize - 1); diff --git a/src/corelibs/U2Formats/src/BedFormat.h b/src/corelibs/U2Formats/src/BedFormat.h index d7ecea977368cca8d9831105502cd674bdb117cb..73c43aab562f230370367251d3e1d3d2468d69c2 100644 --- a/src/corelibs/U2Formats/src/BedFormat.h +++ b/src/corelibs/U2Formats/src/BedFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -102,10 +102,6 @@ class U2FORMATS_EXPORT BedFormat : public TextDocumentFormat { public: BedFormat(QObject* parent); - virtual DocumentFormatId getFormatId() const {return BaseDocumentFormats::BED;} - - virtual const QString& getFormatName() const {return FORMAT_NAME;} - virtual void storeDocument(Document* doc, IOAdapter* io, U2OpStatus& os); /** Gets annotation data from a BED file, but doesn't create an annotation table */ @@ -122,8 +118,6 @@ protected: private: void load(IOAdapter* io, QList<GObject*>& objects, const U2DbiRef& dbiRef, U2OpStatus& os, const QVariantMap& fs = QVariantMap()); - - static const QString FORMAT_NAME; }; class BedFormatParser { diff --git a/src/corelibs/U2Formats/src/ClustalWAlnFormat.cpp b/src/corelibs/U2Formats/src/ClustalWAlnFormat.cpp index 290b7d2245b3c25dfe848d9bf403d6a0d756dc6c..1bb5eeb514664b58fcebd7de8509a32e3f968683 100644 --- a/src/corelibs/U2Formats/src/ClustalWAlnFormat.cpp +++ b/src/corelibs/U2Formats/src/ClustalWAlnFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -53,8 +53,13 @@ namespace U2 { /* TRANSLATOR U2::IOAdapter */ const QByteArray ClustalWAlnFormat::CLUSTAL_HEADER = "CLUSTAL"; +const int ClustalWAlnFormat::MAX_LINE_LEN = 190; +//The sequence name's length maximum is defined in the "clustalw.h" file of the "CLUSTALW" source code +const int ClustalWAlnFormat::MAX_NAME_LEN = 150; +const int ClustalWAlnFormat::MAX_SEQ_LEN = 70; +const int ClustalWAlnFormat::SEQ_ALIGNMENT = 5; -ClustalWAlnFormat::ClustalWAlnFormat(QObject* p) : TextDocumentFormat(p, DocumentFormatFlags(DocumentFormatFlag_SupportWriting) | DocumentFormatFlag_OnlyOneObject, QStringList("aln")) +ClustalWAlnFormat::ClustalWAlnFormat(QObject* p) : TextDocumentFormat(p, BaseDocumentFormats::CLUSTAL_ALN, DocumentFormatFlags(DocumentFormatFlag_SupportWriting) | DocumentFormatFlag_OnlyOneObject, QStringList("aln")) { formatName = tr("CLUSTALW"); formatDescription = tr("Clustalw is a format for storing multiple sequence alignments"); @@ -79,6 +84,8 @@ void ClustalWAlnFormat::load(IOAdapter* io, const U2DbiRef& dbiRef, QList<GObjec //1 skip first line int len = io->readUntil(buff, READ_BUFF_SIZE, LINE_BREAKS, IOAdapter::Term_Include, &lineOk); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), ); + if (!lineOk || !readBuffer.startsWith( CLUSTAL_HEADER )) { os.setError( ClustalWAlnFormat::tr("Illegal header line")); } @@ -87,6 +94,7 @@ void ClustalWAlnFormat::load(IOAdapter* io, const U2DbiRef& dbiRef, QList<GObjec while (!os.isCoR() && (len = io->readUntil(buff, READ_BUFF_SIZE, LINE_BREAKS, IOAdapter::Term_Include, &lineOk)) > 0) { if( QByteArray::fromRawData( buff, len ).startsWith( CLUSTAL_HEADER ) ) { io->skip( -len ); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), ); break; } int numNs = 0; @@ -199,10 +207,6 @@ Document* ClustalWAlnFormat::loadTextDocument(IOAdapter* io, const U2DbiRef& dbi return new Document(this, io->getFactory(), io->getURL(), dbiRef, objects, fs); } -#define MAX_LINE_LEN 80 -#define MAX_NAME_LEN 39 -#define SEQ_ALIGNMENT 5 - void ClustalWAlnFormat::storeEntry(IOAdapter *io, const QMap< GObjectType, QList<GObject*> > &objectsMap, U2OpStatus &ti) { SAFE_POINT(objectsMap.contains(GObjectTypes::MULTIPLE_SEQUENCE_ALIGNMENT), "Clustal entry storing: no alignment", ); const QList<GObject*> &als = objectsMap[GObjectTypes::MULTIPLE_SEQUENCE_ALIGNMENT]; @@ -245,6 +249,7 @@ void ClustalWAlnFormat::storeEntry(IOAdapter *io, const QMap< GObjectType, QList if (seqEnd % SEQ_ALIGNMENT != 0) { seqEnd = seqEnd - (seqEnd % SEQ_ALIGNMENT); } + seqEnd = qMin(seqEnd, seqStart + MAX_SEQ_LEN); assert(seqStart % SEQ_ALIGNMENT == 0 && seqEnd % SEQ_ALIGNMENT == 0 && seqEnd > seqStart); int seqPerPage = seqEnd - seqStart; diff --git a/src/corelibs/U2Formats/src/ClustalWAlnFormat.h b/src/corelibs/U2Formats/src/ClustalWAlnFormat.h index f31138d0242ac337ec551c8b1fd5b349f70f6f18..2e9f3af6d5e3e8e9c8f018e0326e14fecbb3db42 100644 --- a/src/corelibs/U2Formats/src/ClustalWAlnFormat.h +++ b/src/corelibs/U2Formats/src/ClustalWAlnFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -38,10 +38,6 @@ public: ClustalWAlnFormat(QObject* p); - virtual DocumentFormatId getFormatId() const {return BaseDocumentFormats::CLUSTAL_ALN;} - - virtual const QString& getFormatName() const {return formatName;} - virtual void storeDocument(Document* d, IOAdapter* io, U2OpStatus& os); virtual void storeEntry(IOAdapter *io, const QMap< GObjectType, QList<GObject*> > &objectsMap, U2OpStatus &os); @@ -54,7 +50,10 @@ protected: private: void load(IOAdapter* io, const U2DbiRef& dbiRef, QList<GObject*>& objects, const QVariantMap& fs, U2OpStatus& ti); - QString formatName; + static const int MAX_LINE_LEN; + static const int MAX_NAME_LEN; + static const int MAX_SEQ_LEN; + static const int SEQ_ALIGNMENT; }; }//namespace diff --git a/src/corelibs/U2Formats/src/ColumnDataParser.cpp b/src/corelibs/U2Formats/src/ColumnDataParser.cpp index 64050d7f31c6d0847c6dccbdfa62490793a13a7a..7ff549a3d060846640374f0c7316c800a820bda8 100644 --- a/src/corelibs/U2Formats/src/ColumnDataParser.cpp +++ b/src/corelibs/U2Formats/src/ColumnDataParser.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/ColumnDataParser.h b/src/corelibs/U2Formats/src/ColumnDataParser.h index 6e7d636a3eea09e4cfe1bc2e19bab80bdb140b55..2d23671414eb427d9ccb68462f3dd65bdc26d57c 100644 --- a/src/corelibs/U2Formats/src/ColumnDataParser.h +++ b/src/corelibs/U2Formats/src/ColumnDataParser.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/DNAQualityIOUtils.cpp b/src/corelibs/U2Formats/src/DNAQualityIOUtils.cpp index 5b49b018a19e29cff8aa8eb40ed9c989d96c67bc..bf5f1ac8705b8839fa9fce49ee26fe4f981a8a2b 100644 --- a/src/corelibs/U2Formats/src/DNAQualityIOUtils.cpp +++ b/src/corelibs/U2Formats/src/DNAQualityIOUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/DNAQualityIOUtils.h b/src/corelibs/U2Formats/src/DNAQualityIOUtils.h index 5e49579e2f7b492bb59f920d3791120597077fa2..4d98df734d75848068f9c364d2dc50dd64d2b973 100644 --- a/src/corelibs/U2Formats/src/DNAQualityIOUtils.h +++ b/src/corelibs/U2Formats/src/DNAQualityIOUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/Database.cpp b/src/corelibs/U2Formats/src/Database.cpp index d1e85c2eb271f8044303963fb6456441f970f134..d365c40247021eb9a49010c4408a5ef70a53fb9a 100644 --- a/src/corelibs/U2Formats/src/Database.cpp +++ b/src/corelibs/U2Formats/src/Database.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/Database.h b/src/corelibs/U2Formats/src/Database.h index e2f6447261328ca5354db3803841d14730a6d93f..765289adb5807aba4bd5c7953d23f631db9fb93a 100644 --- a/src/corelibs/U2Formats/src/Database.h +++ b/src/corelibs/U2Formats/src/Database.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/DatabaseConnectionFormat.cpp b/src/corelibs/U2Formats/src/DatabaseConnectionFormat.cpp index 15e8e81e18832e24c83203d5358ef5f3bfc5fef6..586bd958fe29f849c9547f99844925294f70762b 100644 --- a/src/corelibs/U2Formats/src/DatabaseConnectionFormat.cpp +++ b/src/corelibs/U2Formats/src/DatabaseConnectionFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -38,7 +38,7 @@ namespace U2 { DatabaseConnectionFormat::DatabaseConnectionFormat(QObject *p) : - DocumentFormat(p, + DocumentFormat(p, BaseDocumentFormats::DATABASE_CONNECTION, DocumentFormatFlags(DocumentFormatFlag_NoPack) | DocumentFormatFlag_NoFullMemoryLoad | DocumentFormatFlag_Hidden @@ -65,10 +65,6 @@ DatabaseConnectionFormat::DatabaseConnectionFormat(QObject *p) : << GObjectTypes::ASSEMBLY; } -DocumentFormatId DatabaseConnectionFormat::getFormatId() const { - return BaseDocumentFormats::DATABASE_CONNECTION; -} - const QString& DatabaseConnectionFormat::getFormatName() const { return formatName; } diff --git a/src/corelibs/U2Formats/src/DatabaseConnectionFormat.h b/src/corelibs/U2Formats/src/DatabaseConnectionFormat.h index 7ed4e6a56b3ba4da1ebd98bc6ca9835dcd136486..f3d8a66ada1c56c9438661126e9e416ac0b4bc7c 100644 --- a/src/corelibs/U2Formats/src/DatabaseConnectionFormat.h +++ b/src/corelibs/U2Formats/src/DatabaseConnectionFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,7 +30,6 @@ class U2FORMATS_EXPORT DatabaseConnectionFormat : public DocumentFormat { public: DatabaseConnectionFormat(QObject* p); - DocumentFormatId getFormatId() const; const QString& getFormatName() const; FormatCheckResult checkRawData(QByteArray const &, GUrl const & = GUrl()) const; diff --git a/src/corelibs/U2Formats/src/DifferentialFormat.cpp b/src/corelibs/U2Formats/src/DifferentialFormat.cpp index 7ecc8e7267737832241c4e6c66c31719b715f1de..cbb847a0703c9b89d8a2ae30357620a673800227 100644 --- a/src/corelibs/U2Formats/src/DifferentialFormat.cpp +++ b/src/corelibs/U2Formats/src/DifferentialFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -39,7 +39,7 @@ static const QString CHROMOSOME("chromosome"); static const QString UNKNOWN_CHR("unknown"); DifferentialFormat::DifferentialFormat(QObject *parent) -: TextDocumentFormat(parent, DocumentFormatFlags_W1, QStringList()<<"diff") +: TextDocumentFormat(parent, BaseDocumentFormats::DIFF, DocumentFormatFlags_W1, QStringList()<<"diff") { formatName = tr("Differential"); supportedObjectTypes += GObjectTypes::ANNOTATION_TABLE; @@ -48,14 +48,6 @@ DifferentialFormat::DifferentialFormat(QObject *parent) " splicing, promoters and cds."); } -DocumentFormatId DifferentialFormat::getFormatId() const { - return BaseDocumentFormats::DIFF; -} - -const QString & DifferentialFormat::getFormatName() const { - return formatName; -} - QList<ColumnDataParser::Column> DifferentialFormat::getColumns() const { return QList<ColumnDataParser::Column>() << ColumnDataParser::Column("test_id", ColumnDataParser::STRING, "-", true /*required*/) @@ -116,10 +108,9 @@ const int DifferentialFormat::BUFFER_SIZE = 4194304; QString DifferentialFormat::readLine(IOAdapter *io, QByteArray &buffer, U2OpStatus &os) { bool eol = false; qint64 size = io->readLine(buffer.data(), BUFFER_SIZE, &eol); - if (!eol && !io->isEof()) { - os.setError("Line line is too long"); - return ""; - } + CHECK_EXT(eol || io->isEof(), os.setError("Line is too long"), QString()); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), QString()); + return buffer.left(size).trimmed(); } diff --git a/src/corelibs/U2Formats/src/DifferentialFormat.h b/src/corelibs/U2Formats/src/DifferentialFormat.h index cb12662ea306a12ffd6aab7f06c37cb3d19ce1b4..808730309c32c1c3a0763d77688a363a74ec96a2 100644 --- a/src/corelibs/U2Formats/src/DifferentialFormat.h +++ b/src/corelibs/U2Formats/src/DifferentialFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -41,9 +41,6 @@ class U2FORMATS_EXPORT DifferentialFormat : public TextDocumentFormat { public: DifferentialFormat(QObject *parent); - DocumentFormatId getFormatId() const; - const QString & getFormatName() const; - void storeDocument(Document *d, IOAdapter *io, U2OpStatus &os); protected: @@ -64,8 +61,6 @@ private: static QString createValue(const SharedAnnotationData &data, const ColumnDataParser::Column &column, U2OpStatus &os); private: - QString formatName; - static const int BUFFER_SIZE; }; diff --git a/src/corelibs/U2Formats/src/DocumentFormatUtils.cpp b/src/corelibs/U2Formats/src/DocumentFormatUtils.cpp index 1e58c549406dba0dd8ca5762e172b9fe704e3606..f0f319d087220e8f0883db35faf7b807a1358089 100644 --- a/src/corelibs/U2Formats/src/DocumentFormatUtils.cpp +++ b/src/corelibs/U2Formats/src/DocumentFormatUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/DocumentFormatUtils.h b/src/corelibs/U2Formats/src/DocumentFormatUtils.h index 176309e3903d2136ce547a6bee421c690797fb36..37276e92c22c4e4563fafb4856e67c6ffcce39e2 100644 --- a/src/corelibs/U2Formats/src/DocumentFormatUtils.h +++ b/src/corelibs/U2Formats/src/DocumentFormatUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/EMBLGenbankAbstractDocument.cpp b/src/corelibs/U2Formats/src/EMBLGenbankAbstractDocument.cpp index f659585d1aea1e892c5d7c881ad18dcd14f57077..4a3869fe5d2fae9e54ce1ddbd633e0c773635232 100644 --- a/src/corelibs/U2Formats/src/EMBLGenbankAbstractDocument.cpp +++ b/src/corelibs/U2Formats/src/EMBLGenbankAbstractDocument.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -37,6 +37,7 @@ #include <U2Core/TextUtils.h> #include <U2Core/U1AnnotationUtils.h> #include <U2Core/U2AlphabetUtils.h> +#include <U2Core/U2Attribute.h> #include <U2Core/U2DbiUtils.h> #include <U2Core/U2ObjectDbi.h> #include <U2Core/U2OpStatus.h> @@ -59,11 +60,11 @@ const QString EMBLGenbankAbstractDocument::LOCATION_PARSING_ERROR_MESSAGE = QCor const QString EMBLGenbankAbstractDocument::SEQ_LEN_WARNING_MESSAGE = QCoreApplication::translate("EMBLGenbankAbstractDocument", "The number of valid sequence characters does not coincide with the declared size in the sequence header."); EMBLGenbankAbstractDocument::EMBLGenbankAbstractDocument(const DocumentFormatId& _id, const QString& _formatName, int mls, - DocumentFormatFlags flags, QObject* p) -: TextDocumentFormat(p, flags), id(_id), formatName(_formatName), maxAnnotationLineLen(mls), savedInUgene(false) -{ - supportedObjectTypes+=GObjectTypes::ANNOTATION_TABLE; - supportedObjectTypes+=GObjectTypes::SEQUENCE; + DocumentFormatFlags flags, QObject* p) + : TextDocumentFormat(p, _id, flags), maxAnnotationLineLen(mls), savedInUgene(false) { + formatName = _formatName; + supportedObjectTypes += GObjectTypes::ANNOTATION_TABLE; + supportedObjectTypes += GObjectTypes::SEQUENCE; } @@ -97,8 +98,8 @@ void EMBLGenbankAbstractDocument::load(const U2DbiRef& dbiRef, IOAdapter* io, QL io->setFormatMode(IOAdapter::TextMode); //get settings - int gapSize = qBound(-1, DocumentFormatUtils::getMergeGap(fs), 1000*1000); - bool merge = gapSize!=-1; + int gapSize = qBound(-1, DocumentFormatUtils::getMergeGap(fs), 1000 * 1000); + bool merge = gapSize != -1; QScopedPointer<AnnotationTableObject> mergedAnnotations(NULL); QStringList contigs; @@ -123,7 +124,7 @@ void EMBLGenbankAbstractDocument::load(const U2DbiRef& dbiRef, IOAdapter* io, QL int fullSequenceSize = 0; const int objectsCountLimit = fs.contains(DocumentReadingMode_MaxObjectsInDoc) ? fs[DocumentReadingMode_MaxObjectsInDoc].toInt() : -1; - for (int i=0; !os.isCoR(); i++, ++num_sequence) { + for (int i = 0; !os.isCoR(); i++, ++num_sequence) { if (objectsCountLimit > 0 && objects.size() >= objectsCountLimit) { os.setError(EMBLGenbankAbstractDocument::tr("File \"%1\" contains too many sequences to be displayed. " "However, you can process these data using instruments from the menu <i>Tools -> NGS data analysis</i> " @@ -136,7 +137,7 @@ void EMBLGenbankAbstractDocument::load(const U2DbiRef& dbiRef, IOAdapter* io, QL EMBLGenbankDataEntry data; st.entry = &data; - if (num_sequence == 0 || merge == false){ + if (num_sequence == 0 || merge == false) { seqImporter.startSequence(os, dbiRef, folder, "default sequence name", false); //change name and circularity after finalize method CHECK_OP(os, ); } @@ -147,28 +148,31 @@ void EMBLGenbankAbstractDocument::load(const U2DbiRef& dbiRef, IOAdapter* io, QL if (merge && num_sequence > 0) { offset = gapSize; } - if (!readEntry(&st,seqImporter,sequenceSize,fullSequenceSize,merge,offset, os)) { + if (!readEntry(&st, seqImporter, sequenceSize, fullSequenceSize, merge, offset, os)) { break; } if (merge && sequenceSize > 0 && num_sequence > 0) { - sequenceStart = fullSequenceSize - sequenceSize; - sequenceStart += gapSize; - fullSequenceSize += gapSize; + sequenceStart = fullSequenceSize - sequenceSize; + sequenceStart += gapSize; + fullSequenceSize += gapSize; } // tolerate blank lines between records char ch; bool b; - while ((b = st.io->getChar(&ch)) && (ch == '\n' || ch == '\r')){} + while ((b = st.io->getChar(&ch)) && (ch == '\n' || ch == '\r')) {} + CHECK_EXT(!st.io->hasError(), os.setError(st.io->errorString()), ); + if (b) { st.io->skip(-1); + CHECK_EXT(!st.io->hasError(), os.setError(st.io->errorString()), ); } AnnotationTableObject *annotationsObject = NULL; if (data.hasAnnotationObjectFlag) { - QString annotationName = genObjectName(usedNames, data.name, data.tags, i+1, GObjectTypes::ANNOTATION_TABLE); + QString annotationName = genObjectName(usedNames, data.name, data.tags, i + 1, GObjectTypes::ANNOTATION_TABLE); QVariantMap hints; hints.insert(DBI_FOLDER_HINT, fs.value(DBI_FOLDER_HINT, U2ObjectDbi::ROOT_FOLDER)); @@ -200,7 +204,7 @@ void EMBLGenbankAbstractDocument::load(const U2DbiRef& dbiRef, IOAdapter* io, QL } CHECK_OP(os, ); } - foreach (const QString &groupName, groupName2Annotations.keys()) { + foreach(const QString &groupName, groupName2Annotations.keys()) { annotationsObject->addAnnotations(groupName2Annotations[groupName], groupName); } @@ -209,46 +213,44 @@ void EMBLGenbankAbstractDocument::load(const U2DbiRef& dbiRef, IOAdapter* io, QL if (!merge) { objects.append(annotationsObject); } - } else{ + } else { assert(data.features.isEmpty()); } if (!os.isCoR()) { - QString sequenceName = genObjectName(usedNames, data.name, data.tags, i+1, GObjectTypes::SEQUENCE); - if (merge && sequenceSize == 0 && annotationsObject!=NULL) { + QString sequenceName = genObjectName(usedNames, data.name, data.tags, i + 1, GObjectTypes::SEQUENCE); + if (merge && sequenceSize == 0 && annotationsObject != NULL) { os.setError(tr("Merge error: found annotations without sequence")); break; - } - else if (merge) { + } else if (merge) { contigs.append(sequenceName); mergedMapping.append(U2Region(sequenceStart, sequenceSize)); - } - else { + } else { U2Sequence u2seq = seqImporter.finalizeSequence(os); - CHECK_OP(os,); + CHECK_OP(os, ); - if(sequenceSize != 0) { + if (sequenceSize != 0) { u2seq.visualName = sequenceName; u2seq.circular = data.circular; DbiConnection con(dbiRef, os); - con.dbi->getSequenceDbi()->updateSequenceObject(u2seq,os); + con.dbi->getSequenceDbi()->updateSequenceObject(u2seq, os); fullSequenceSize = 0; - U2SequenceObject* seqObj = new U2SequenceObject(sequenceName, U2EntityRef(dbiRef, u2seq.id)); + U2SequenceObject* seqObj = new U2SequenceObject(sequenceName, U2EntityRef(dbiRef, u2seq.id)); QString translation = U1AnnotationUtils::guessAminoTranslation(annotationsObject, seqObj->getAlphabet()); - if(!translation.isEmpty()){ - seqObj->setStringAttribute(translation , Translation_Table_Id_Attribute); + if (!translation.isEmpty()) { + seqObj->setStringAttribute(translation, Translation_Table_Id_Attribute); } objects << seqObj; dbiObjects.objects << u2seq.id; - SAFE_POINT(seqObj != NULL, "DocumentFormatUtils::addSequenceObject returned NULL but didn't set error",); + SAFE_POINT(seqObj != NULL, "DocumentFormatUtils::addSequenceObject returned NULL but didn't set error", ); sequenceRef.objName = seqObj->getGObjectName(); sequenceRef.entityRef = seqObj->getEntityRef(); - if (annotationsObject!=NULL) { + if (annotationsObject != NULL) { annotationsObject->addObjectRelation(GObjectRelation(sequenceRef, ObjectRole_Sequence)); } U1AnnotationUtils::addAnnotations(objects, seqImporter.getCaseAnnotations(), sequenceRef, annotationsObject, fs); @@ -264,30 +266,29 @@ void EMBLGenbankAbstractDocument::load(const U2DbiRef& dbiRef, IOAdapter* io, QL CHECK_EXT(!objects.isEmpty() || merge, os.setError(Document::tr("Document is empty.")), ); SAFE_POINT(contigs.size() == mergedMapping.size(), "contigs <-> regions mapping failed!", ); - if (merge) { - writeLockReason = DocumentFormat::MERGED_SEQ_LOCK; - } else { + if (!merge) { return; } + writeLockReason = QObject::tr("Document sequences were merged"); U2Sequence u2seq = seqImporter.finalizeSequenceAndValidate(os); dbiObjects.objects << u2seq.id; - CHECK_OP(os,); + CHECK_OP(os, ); u2seq.visualName = "Sequence"; DbiConnection con(dbiRef, os); - con.dbi->getSequenceDbi()->updateSequenceObject(u2seq,os); + con.dbi->getSequenceDbi()->updateSequenceObject(u2seq, os); sequenceRef.objName = u2seq.visualName; sequenceRef.entityRef = U2EntityRef(dbiRef, u2seq.id); - CHECK_OP(os,); + CHECK_OP(os, ); U2SequenceObject* so = new U2SequenceObject(u2seq.visualName, U2EntityRef(dbiRef, u2seq.id)); objects << so; objects << DocumentFormatUtils::addAnnotationsForMergedU2Sequence(sequenceRef, dbiRef, contigs, mergedMapping, fs); - AnnotationTableObject *mergedAnnotationsPtr = mergedAnnotations.take( ); - if ( NULL != mergedAnnotationsPtr ) { + AnnotationTableObject *mergedAnnotationsPtr = mergedAnnotations.take(); + if (NULL != mergedAnnotationsPtr) { sequenceRef.entityRef = U2EntityRef(dbiRef, u2seq.id); mergedAnnotationsPtr->addObjectRelation(GObjectRelation(sequenceRef, ObjectRole_Sequence)); objects.append(mergedAnnotationsPtr); @@ -314,16 +315,19 @@ DNASequence* EMBLGenbankAbstractDocument::loadTextSequence(IOAdapter* io, U2OpSt os.setDescription(tr("Reading entry header")); int offset = 0; bool merge = false; - if (!readEntry(&st,seqImporter,sequenceSize,fullSequenceSize,merge,offset, os)) { + if (!readEntry(&st, seqImporter, sequenceSize, fullSequenceSize, merge, offset, os)) { return NULL; } // tolerate blank lines between records char ch; bool b; - while ((b = st.io->getChar(&ch)) && (ch == '\n' || ch == '\r')){} + while ((b = st.io->getChar(&ch)) && (ch == '\n' || ch == '\r')) {} + CHECK_EXT(!st.io->hasError(), os.setError(st.io->errorString()), NULL); + if (b) { st.io->skip(-1); + CHECK_EXT(!st.io->hasError(), os.setError(st.io->errorString()), NULL); } if (os.isCoR()) { @@ -331,7 +335,7 @@ DNASequence* EMBLGenbankAbstractDocument::loadTextSequence(IOAdapter* io, U2OpSt } QString sequenceName = genObjectName(usedNames, data.name, data.tags, 1, GObjectTypes::SEQUENCE); - if (sequenceSize != 0){ + if (sequenceSize != 0) { DNASequence* seq = new DNASequence(sequenceName, sequenceData, U2AlphabetUtils::getById(seqImporter.getAlphabet())); return seq; } @@ -350,7 +354,7 @@ DNASequence* EMBLGenbankAbstractDocument::loadTextSequence(IOAdapter* io, U2OpSt static bool isNewQStart(const char* s, int l) { - if (l < A_COL + 1 || s[A_COL]!='/') { + if (l < A_COL + 1 || s[A_COL] != '/') { return false; } const QBitArray& WHITES = TextUtils::WHITES; @@ -362,7 +366,7 @@ static bool isNewQStart(const char* s, int l) { char c = s[i]; if (c == '=' && i > QN_COL) { hasEqualitySign = true; - if(WHITES [s[i+1]] ){ // there is whites between potential qual and val + if (WHITES[s[i + 1]]) { // there is whites between potential qual and val hasWhitesBeforeVal = true; } break; @@ -370,31 +374,30 @@ static bool isNewQStart(const char* s, int l) { if (WHITES[(uchar)c]) { hasWhites = true; } - if(hasWhites && !WHITES[(uchar)c]){ // there is !whites characters after qualifier without '=' char + if (hasWhites && !WHITES[(uchar)c]) { // there is !whites characters after qualifier without '=' char hasWhitesBeforeVal = true; break; } } - if(hasEqualitySign){ - if(hasWhites ){ // whites between qual and '=' char + if (hasEqualitySign) { + if (hasWhites) { // whites between qual and '=' char return false; } return true; - } - else if(hasWhitesBeforeVal){ + } else if (hasWhitesBeforeVal) { return false; } return true; // qualifier without '=' char } -static int numQuotesInLine(char* cbuff, int len){ - QString line = QString(QByteArray(cbuff,len)); +static int numQuotesInLine(char* cbuff, int len) { + QString line = QString(QByteArray(cbuff, len)); int pos = 0; int numQuotes = 0; - while((pos = line.indexOf('\"',pos+1)) != -1){ - if ( line[pos + 1] == '\"') { // skip "" + while ((pos = line.indexOf('\"', pos + 1)) != -1) { + if (line[pos + 1] == '\"') { // skip "" pos++; continue; } @@ -405,7 +408,7 @@ static int numQuotesInLine(char* cbuff, int len){ //TODO: make it IO active -> read util the end. Otherwise qualifier is limited in size by maxSize int EMBLGenbankAbstractDocument::readMultilineQualifier(IOAdapter* io, char* cbuff, int maxSize, bool _prevLineHasMaxSize, int lenFirstLine, - U2OpStatus& os) { + U2OpStatus& os) { io->setFormatMode(IOAdapter::TextMode); int len = 0; bool lineOk = true; @@ -414,7 +417,7 @@ int EMBLGenbankAbstractDocument::readMultilineQualifier(IOAdapter* io, char* cbu const QBitArray& LINE_BREAKS = TextUtils::LINE_BREAKS; int numQuotes = 0; - numQuotes += numQuotesInLine(cbuff,lenFirstLine); + numQuotes += numQuotesInLine(cbuff, lenFirstLine); cbuff += lenFirstLine; @@ -425,35 +428,35 @@ int EMBLGenbankAbstractDocument::readMultilineQualifier(IOAdapter* io, char* cbu char* skipBuff = skip.data(); do { int readLen = io->readUntil(skipBuff, MAX_LINE, TextUtils::LINE_BREAKS, IOAdapter::Term_Include, &lineOk); - if (!lineOk) { - continue;//todo: report error! - } + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), -1); + CHECK_CONTINUE(lineOk);//todo: report error! + int lineLen = readLen; - for (; A_COL < lineLen && LINE_BREAKS[(uchar)skipBuff[lineLen-1]]; lineLen--){}; //remove line breaks - if (lineLen == 0 || lineLen < A_COL || skip[0]!=fPrefix[0] || skip[1]!=fPrefix[1] - || skip[K_COL]!=' ' || (skip[A_COL]=='/' && isNewQStart(skip, lineLen) && (numQuotes%2) == 0)) - { + for (; A_COL < lineLen && LINE_BREAKS[(uchar)skipBuff[lineLen - 1]]; lineLen--) {}; //remove line breaks + if (lineLen == 0 || lineLen < A_COL || skip[0] != fPrefix[0] || skip[1] != fPrefix[1] + || skip[K_COL] != ' ' || (skip[A_COL] == '/' && isNewQStart(skip, lineLen) && (numQuotes % 2) == 0)) { io->skip(-readLen); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), -1); break; - } - else{ - numQuotes += numQuotesInLine(skipBuff,lineLen); + } else { + numQuotes += numQuotesInLine(skipBuff, lineLen); } } while (true); break; } char* lineBuf = cbuff + len; - int readLen = io->readUntil(lineBuf, maxSize-len, TextUtils::LINE_BREAKS, IOAdapter::Term_Include, &lineOk); + int readLen = io->readUntil(lineBuf, maxSize - len, TextUtils::LINE_BREAKS, IOAdapter::Term_Include, &lineOk); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), -1); + int lineLen = readLen; - for (; A_COL < lineLen && LINE_BREAKS[(uchar)lineBuf[lineLen-1]]; lineLen--){}; //remove line breaks - if (!lineOk || lineLen == 0 || lineLen < A_COL || lineBuf[0]!=fPrefix[0] - || lineBuf[1]!=fPrefix[1] || lineBuf[K_COL]!=' ' || (lineBuf[A_COL]=='/' && isNewQStart(lineBuf, lineLen) && (numQuotes%2) == 0)) - { + for (; A_COL < lineLen && LINE_BREAKS[(uchar)lineBuf[lineLen - 1]]; lineLen--) {}; //remove line breaks + if (!lineOk || lineLen == 0 || lineLen < A_COL || lineBuf[0] != fPrefix[0] + || lineBuf[1] != fPrefix[1] || lineBuf[K_COL] != ' ' || (lineBuf[A_COL] == '/' && isNewQStart(lineBuf, lineLen) && (numQuotes % 2) == 0)) { io->skip(-readLen); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), -1); break; - } - else{ - numQuotes += numQuotesInLine(lineBuf,lineLen); + } else { + numQuotes += numQuotesInLine(lineBuf, lineLen); } if (breakQualifierOnSpaceOnly(cbuff) && breakWords && lineLen - A_COL > 0) { //add space to separate words @@ -462,14 +465,14 @@ int EMBLGenbankAbstractDocument::readMultilineQualifier(IOAdapter* io, char* cbu } memmove(cbuff + len, lineBuf + A_COL, lineLen - A_COL); - len+=lineLen-A_COL; + len += lineLen - A_COL; breakWords = breakWords || lineLen < maxAnnotationLineLen; } while (true); // ignore that error if the file was saved by UGENE (version <1.14.1) if (numQuotes != 2 && numQuotes != 0 && !savedInUgene) { os.setError(tr("The file contains an incorrect data that describes a qualifier value. ") + - tr("The value cannot contain a single quote character. The qualifier is \'%1\'").arg(QByteArray(cbuff - lenFirstLine, len + lenFirstLine).data())); + tr("The value cannot contain a single quote character. The qualifier is \'%1\'").arg(QByteArray(cbuff - lenFirstLine, len + lenFirstLine).data())); return 0; } return len; @@ -494,7 +497,7 @@ QString EMBLGenbankAbstractDocument::genObjectName(QSet<QString>& usedNames, con name = DNAInfo::getPrimaryAccession(tags); int spaceIdx = name.indexOf(' '); if (spaceIdx > 0) { - name = name.left(spaceIdx-1); + name = name.left(spaceIdx - 1); } if (name.isEmpty()) { name = EMBLGenbankAbstractDocument::DEFAULT_OBJ_NAME; @@ -505,15 +508,14 @@ QString EMBLGenbankAbstractDocument::genObjectName(QSet<QString>& usedNames, con const QString featuresPostfix = "features"; const QString annotsPostfix = "annotations"; if (t == GObjectTypes::ANNOTATION_TABLE && !name.endsWith(featuresPostfix, Qt::CaseInsensitive) - && !name.endsWith(annotsPostfix, Qt::CaseInsensitive)) - { + && !name.endsWith(annotsPostfix, Qt::CaseInsensitive)) { name += " " + featuresPostfix; } //now variate name if there are duplicates int n2 = 1; QString res = name; while (usedNames.contains(res)) { - res = name + " " + QString::number(n) + (n2 == 1 ? QString("") : ("." + QString::number(n2))); + res = name + " " + QString::number(n) + (n2 == 1 ? QString("") : ("." + QString::number(n2))); ++n2; } usedNames.insert(res); @@ -522,10 +524,10 @@ QString EMBLGenbankAbstractDocument::genObjectName(QSet<QString>& usedNames, con static void checkQuotes(const char* str, int len, bool& outerQuotes, bool& doubleQuotes) { char qChar = '\"'; - assert(len>=0); - outerQuotes = str[0] == qChar && str[len-1]==qChar; - for(int i=1; i < len; i++) { - if (str[i-1]==qChar && str[i] == qChar) { + assert(len >= 0); + outerQuotes = str[0] == qChar && str[len - 1] == qChar; + for (int i = 1; i < len; i++) { + if (str[i - 1] == qChar && str[i] == qChar) { doubleQuotes = true; break; } @@ -550,7 +552,7 @@ AnnotationProcessStatus processParsingResult(const U2Location &location, Genbank case Genbank::LocationParser::Success: return ProcessAnnotation; case Genbank::LocationParser::ParsedWithWarnings: - foreach (const QString &message, parsingMessages) { + foreach(const QString &message, parsingMessages) { if (message.contains(Genbank::LocationParser::REMOTE_ENTRY_WARNING)) { addUniqueWarning(si, EMBLGenbankAbstractDocument::REMOTE_ENTRY_WARNING_MESSAGE); } else if (message.contains(Genbank::LocationParser::JOIN_COMPLEMENT_WARNING)) { @@ -572,10 +574,10 @@ AnnotationProcessStatus processParsingResult(const U2Location &location, Genbank } SharedAnnotationData EMBLGenbankAbstractDocument::readAnnotation(IOAdapter* io, char* cbuff, int len, - int READ_BUFF_SIZE, U2OpStatus& si, int offset, int seqLen) { + int READ_BUFF_SIZE, U2OpStatus& si, int offset, int seqLen) { AnnotationData* a = new AnnotationData(); SharedAnnotationData f(a); - QString key = QString::fromLatin1(cbuff+5, 15).trimmed(); + QString key = QString::fromLatin1(cbuff + 5, 15).trimmed(); if (key.isEmpty()) { si.setError(EMBLGenbankAbstractDocument::tr("Annotation name is empty")); return SharedAnnotationData(); @@ -585,6 +587,8 @@ SharedAnnotationData EMBLGenbankAbstractDocument::readAnnotation(IOAdapter* io, //qualifier starts on offset 22; int qlen = len + readMultilineQualifier(io, cbuff, READ_BUFF_SIZE - len, true, len, si); + CHECK_OP(si, SharedAnnotationData()); + if (qlen < 21) { si.setError(EMBLGenbankAbstractDocument::tr("Error parsing location")); return SharedAnnotationData(); @@ -593,11 +597,11 @@ SharedAnnotationData EMBLGenbankAbstractDocument::readAnnotation(IOAdapter* io, QStringList messages; Genbank::LocationParser::ParsingResult parsingResult = Genbank::LocationParser::parseLocation(cbuff + 21, qlen - 21, a->location, messages, seqLen); if (SkipAnnotation == processParsingResult(a->location, parsingResult, messages, si)) { - skipInvalidAnnotation(len, io, cbuff, READ_BUFF_SIZE); + skipInvalidAnnotation(si, len, io, cbuff, READ_BUFF_SIZE); return SharedAnnotationData(); } - if (offset>0) { + if (offset > 0) { U2Region::shift(offset, a->location->regions); } @@ -606,26 +610,29 @@ SharedAnnotationData EMBLGenbankAbstractDocument::readAnnotation(IOAdapter* io, //here we have valid key and location; //reading qualifiers bool lineOk = true; - while ((len = io->readUntil(cbuff, READ_BUFF_SIZE, TextUtils::LINE_BREAKS, IOAdapter::Term_Include, &lineOk) ) > 0) { - if (len == 0 || len < QN_COL+1 || cbuff[K_COL]!=' ' || cbuff[A_COL]!='/' || cbuff[0]!=fPrefix[0] || cbuff[1]!=fPrefix[1]) { + while ((len = io->readUntil(cbuff, READ_BUFF_SIZE, TextUtils::LINE_BREAKS, IOAdapter::Term_Include, &lineOk)) > 0) { + CHECK_EXT(!io->hasError(), si.setError(io->errorString()), SharedAnnotationData()); + + if (len == 0 || len < QN_COL + 1 || cbuff[K_COL] != ' ' || cbuff[A_COL] != '/' || cbuff[0] != fPrefix[0] || cbuff[1] != fPrefix[1]) { io->skip(-len); + CHECK_EXT(!io->hasError(), si.setError(io->errorString()), SharedAnnotationData()); break; } - if (!lineOk) { - si.setError(EMBLGenbankAbstractDocument::tr("Unexpected line format")); - break; - } - for (; QN_COL < len && LINE_BREAKS[(uchar)cbuff[len-1]]; len--){}; //remove line breaks + CHECK_EXT_BREAK(lineOk, si.setError(EMBLGenbankAbstractDocument::tr("Unexpected line format"))); + + for (; QN_COL < len && LINE_BREAKS[(uchar)cbuff[len - 1]]; len--) {}; //remove line breaks + + int flen = len + readMultilineQualifier(io, cbuff, READ_BUFF_SIZE - len, len >= maxAnnotationLineLen, len, si); + CHECK_OP(si, SharedAnnotationData()); - int flen = len + readMultilineQualifier(io, cbuff, READ_BUFF_SIZE-len, len >= maxAnnotationLineLen, len, si); //now the whole feature is in cbuff int valStart = A_COL + 1; - for (; valStart < flen && cbuff[valStart] != '='; valStart++){}; //find '==' and valStart + for (; valStart < flen && cbuff[valStart] != '='; valStart++) {}; //find '==' and valStart if (valStart < flen) { valStart++; //skip '=' char } const QBitArray& WHITE_SPACES = TextUtils::WHITES; - for (; valStart < flen && WHITE_SPACES[(uchar)cbuff[flen-1]]; flen--){}; //trim value + for (; valStart < flen && WHITE_SPACES[(uchar)cbuff[flen - 1]]; flen--) {}; //trim value const char* qname = cbuff + QN_COL; int qnameLen = valStart - (QN_COL + 1); @@ -642,7 +649,7 @@ SharedAnnotationData EMBLGenbankAbstractDocument::readAnnotation(IOAdapter* io, checkQuotes(qval, qvalLen, removeQuotes, containsDoubleQuotes); if (removeQuotes) { qval++; - qvalLen-=2; + qvalLen -= 2; } QString nameQStr = QString::fromLocal8Bit(qname, qnameLen); @@ -661,45 +668,35 @@ SharedAnnotationData EMBLGenbankAbstractDocument::readAnnotation(IOAdapter* io, return f; } -bool EMBLGenbankAbstractDocument::readSequence(ParserState* st, U2SequenceImporter& seqImporter, int& sequenceLen,int& fullSequenceLen,U2OpStatus& os) { +bool EMBLGenbankAbstractDocument::readSequence(ParserState* st, U2SequenceImporter& seqImporter, int& sequenceLen, int& fullSequenceLen, U2OpStatus& os) { // FIXME use ParserState instead QByteArray res; IOAdapter* io = st->io; U2OpStatus& si = st->si; si.setDescription(tr("Reading sequence %1").arg(st->entry->name)); QByteArray readBuffer(DocumentFormat::READ_BUFF_SIZE, '\0'); - char* buff = readBuffer.data(); + char* buff = readBuffer.data(); //reading sequence int len; sequenceLen = 0; fullSequenceLen = 0; while ((len = io->readLine(buff, DocumentFormat::READ_BUFF_SIZE)) > 0) { - if (si.isCoR()) { - res.clear(); - break; - } - - if (len <= 0) { - si.setError(tr("Error parsing sequence: unexpected empty line")); - break; - } - - if (buff[0] == '/') { //end of the sequence - break; - } + CHECK_EXT_BREAK(!si.isCoR(), res.clear()); + CHECK_EXT_BREAK(len > 0, si.setError(tr("Error parsing sequence: unexpected empty line"))); + CHECK_BREAK(buff[0] != '/');//end of the sequence len = TextUtils::remove(buff, len, TextUtils::WHITES | TextUtils::NUMS); seqImporter.addBlock(buff, len, os); + CHECK_OP_BREAK(os); - if(os.isCoR()){ - break; - } sequenceLen += len; fullSequenceLen += len; si.setProgress(io->getProgress()); } + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), false); + if (!si.isCoR() && buff[0] != '/') { si.setError(tr("Sequence is truncated")); } @@ -758,10 +755,12 @@ bool EMBLGenbankAbstractDocument::breakQualifierOnSpaceOnly(const QString & /*qu return true; } -void EMBLGenbankAbstractDocument::skipInvalidAnnotation(int len, IOAdapter* io, char* cbuff, int READ_BUFF_SIZE) { +void EMBLGenbankAbstractDocument::skipInvalidAnnotation(U2OpStatus& si, int len, IOAdapter* io, char* cbuff, int READ_BUFF_SIZE) { bool lineOk = true; bool isQuotesOpened = false; while ((len = io->readUntil(cbuff, READ_BUFF_SIZE, TextUtils::LINE_BREAKS, IOAdapter::Term_Include, &lineOk)) > 0) { + CHECK_EXT(!io->hasError(), si.setError(io->errorString()), ); + QByteArray line(cbuff, len); bool isOpenedOnThisLine = line.count('"') % 2 == 1; if (isQuotesOpened || isOpenedOnThisLine) { @@ -774,13 +773,18 @@ void EMBLGenbankAbstractDocument::skipInvalidAnnotation(int len, IOAdapter* io, } if (len == 0 || len < QN_COL + 1 || cbuff[K_COL] != ' ' || cbuff[A_COL] != '/' || cbuff[0] != fPrefix[0] || cbuff[1] != fPrefix[1]) { io->skip(-len); + CHECK_EXT(!io->hasError(), si.setError(io->errorString()), ); break; } } return; } -bool ParserState::hasKey( const char* key, int slen ) const { +//------------------------------------------------------------------- +// ParserState +//------------------------------------------------------------------- + +bool ParserState::hasKey(const char* key, int slen) const { assert(slen <= valOffset); if (slen <= len && TextUtils::equals(key, buff, slen)) { while (slen < qMin(valOffset, len)) { @@ -802,6 +806,8 @@ bool ParserState::readNextLine(bool emptyOK) { bool ok = false; len = io->readLine(buff, LOCAL_READ_BUFFER_SIZE, &ok); + CHECK_EXT(!io->hasError(), si.setError(io->errorString()), false); + si.setProgress(io->getProgress()); if (!ok && len == LOCAL_READ_BUFFER_SIZE) { diff --git a/src/corelibs/U2Formats/src/EMBLGenbankAbstractDocument.h b/src/corelibs/U2Formats/src/EMBLGenbankAbstractDocument.h index f32a5f354b7c5c59c6bb74bde8105e4b45cc277b..a42feb2bafb0096a19b99b29a8ece245de597724 100644 --- a/src/corelibs/U2Formats/src/EMBLGenbankAbstractDocument.h +++ b/src/corelibs/U2Formats/src/EMBLGenbankAbstractDocument.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -44,10 +44,6 @@ public: EMBLGenbankAbstractDocument(const DocumentFormatId& id, const QString& formatName, int maxLineSize, DocumentFormatFlags flags, QObject* p); - virtual DocumentFormatId getFormatId() const {return id;} - - virtual const QString& getFormatName() const {return formatName;} - static const QString UGENE_MARK; static const QString DEFAULT_OBJ_NAME; static const QString LOCUS_TAG_CIRCULAR; @@ -82,8 +78,6 @@ protected: virtual U2Qualifier createQualifier(const QString &qualifierName, const QString &qualifierValue, bool containsDoubleQuotes) const; virtual bool breakQualifierOnSpaceOnly(const QString &qualifierName) const; - DocumentFormatId id; - QString formatName; QByteArray fPrefix; QByteArray sequenceStartPrefix; int maxAnnotationLineLen; @@ -92,7 +86,7 @@ protected: private: SharedAnnotationData readAnnotation(IOAdapter* io, char* cbuff, int contentLen, int bufSize, U2OpStatus& si, int offset, int seqLen = -1); void load(const U2DbiRef& dbiRef, IOAdapter* io, QList<GObject*>& objects, QVariantMap& fs, U2OpStatus& si, QString& writeLockReason); - void skipInvalidAnnotation(int len, IOAdapter* io, char* cbuff, int READ_BUFF_SIZE); + void skipInvalidAnnotation(U2OpStatus& si, int len, IOAdapter* io, char* cbuff, int READ_BUFF_SIZE); }; ////////////////////////////////////////////////////////////////////////// @@ -131,7 +125,7 @@ public: QString value() const; QString key () const; bool hasKey(const char*, int slen) const; - bool hasKey(const char* s) const {return hasKey(s, strlen(s));} + bool hasKey(const char* s) const {return hasKey(s, (int)strlen(s));} bool hasContinuation() const { return len > valOffset && hasKey(" ");} bool hasValue() const {return len > valOffset;} bool readNextLine(bool emptyOK = false); diff --git a/src/corelibs/U2Formats/src/EMBLPlainTextFormat.cpp b/src/corelibs/U2Formats/src/EMBLPlainTextFormat.cpp index 49623d74f7e0ad35281564de22ebf357cffeda6b..b287fab9233c200bd8792a39913c00c437f7b705 100644 --- a/src/corelibs/U2Formats/src/EMBLPlainTextFormat.cpp +++ b/src/corelibs/U2Formats/src/EMBLPlainTextFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/EMBLPlainTextFormat.h b/src/corelibs/U2Formats/src/EMBLPlainTextFormat.h index e35eaa4a74971dfdee318f5fa2387ba1b6488116..07ef641ede85f77254bd8dbefca07be5b91ce189 100644 --- a/src/corelibs/U2Formats/src/EMBLPlainTextFormat.h +++ b/src/corelibs/U2Formats/src/EMBLPlainTextFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/FastaFormat.cpp b/src/corelibs/U2Formats/src/FastaFormat.cpp index ca9eccaf34dc2663fb9cb779b7553f971198801d..cc036f24d742f8f2698eb46af1a24685af578d37 100644 --- a/src/corelibs/U2Formats/src/FastaFormat.cpp +++ b/src/corelibs/U2Formats/src/FastaFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -52,7 +52,7 @@ const char FastaFormat::FASTA_HEADER_START_SYMBOL = '>'; const char FastaFormat::FASTA_COMMENT_START_SYMBOL = ';'; FastaFormat::FastaFormat(QObject* p) -: TextDocumentFormat(p, DocumentFormatFlags_SW, QStringList()<<"fa"<<"mpfa"<<"fna"<<"fsa"<<"fas"<<"fasta"<<"sef"<<"seq"<<"seqs") +: TextDocumentFormat(p, BaseDocumentFormats::FASTA, DocumentFormatFlags_SW, QStringList()<<"fa"<<"mpfa"<<"fna"<<"fsa"<<"fas"<<"fasta"<<"sef"<<"seq"<<"seqs") { formatName = tr("FASTA"); supportedObjectTypes+=GObjectTypes::SEQUENCE; @@ -153,6 +153,7 @@ static void load(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& fs, Q bool lineOk = true; static QBitArray nonWhites = ~TextUtils::WHITES; io->readUntil(buff, DocumentFormat::READ_BUFF_SIZE, nonWhites, IOAdapter::Term_Exclude, &lineOk); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), ); U2SequenceImporter seqImporter(fs, true); const QString folder = fs.value(DocumentFormat::DBI_FOLDER_HINT, U2ObjectDbi::ROOT_FOLDER).toString(); @@ -170,12 +171,14 @@ static void load(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& fs, Q if(!headerReaded){ do{ len = io->readLine(buff, DocumentFormat::READ_BUFF_SIZE); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), ); }while(buff[0] == fastaCommentStartChar && len > 0); } if (len == 0 && io->isEof()) { //end if stream break; } + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), ); CHECK_EXT_BREAK(lineOk, os.setError(FastaFormat::tr("Line is too long"))); QString headerLine = QString(QByteArray(buff+1, len-1)).trimmed(); @@ -206,13 +209,17 @@ static void load(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& fs, Q } int sequenceLen = 0; while (!os.isCoR()) { - do{ + do { len = io->readLine(buff, DocumentFormat::READ_BUFF_SIZE); - }while(len <= 0 && !io->isEof()); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), ); + } while (len <= 0 && !io->isEof()); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), ); if (len <= 0 && io->isEof()) { break; } + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), ); + buff[len] = 0; if(buff[0] != fastaCommentStartChar && buff[0] != FastaFormat::FASTA_HEADER_START_SYMBOL){ @@ -293,7 +300,7 @@ static void load(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& fs, Q objects << new U2SequenceObject(seq.visualName, U2EntityRef(dbiRef, seq.id)); objects << DocumentFormatUtils::addAnnotationsForMergedU2Sequence( sequenceRef, dbiRef, headers, mergedMapping, fs ); if (headers.size() > 1) { - writeLockReason = DocumentFormat::MERGED_SEQ_LOCK; + writeLockReason = QObject::tr("Document sequences were merged"); } } @@ -402,9 +409,11 @@ DNASequence *FastaFormat::loadTextSequence(IOAdapter* io, U2OpStatus& os) { //skip leading whites if present bool lineOk = true; io->readUntil(buff, READ_BUFF_SIZE, nonWhites, IOAdapter::Term_Exclude, &lineOk); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), NULL); //read header len = io->readUntil(buff, READ_BUFF_SIZE, TextUtils::LINE_BREAKS, IOAdapter::Term_Include, &lineOk); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), NULL); CHECK(len > 0, NULL); //end of stream CHECK_EXT(lineOk, os.setError(FastaFormat::tr("Line is too long")), NULL); QByteArray headerLine = QByteArray(buff + 1, len-1).trimmed(); @@ -420,9 +429,9 @@ DNASequence *FastaFormat::loadTextSequence(IOAdapter* io, U2OpStatus& os) { do { len = io->readUntil(buff, READ_BUFF_SIZE, fastaHeaderStart, IOAdapter::Term_Exclude); - if (len <= 0) { - break; - } + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), NULL); + CHECK_BREAK(len > 0); + len = TextUtils::remove(buff, len, TextUtils::WHITES); buff[len] = 0; diff --git a/src/corelibs/U2Formats/src/FastaFormat.h b/src/corelibs/U2Formats/src/FastaFormat.h index 8f6f1dac3c188d6511a040755035b3b8f977c72c..1179f06f60628b5da164686d1c3b4e332ef510d7 100644 --- a/src/corelibs/U2Formats/src/FastaFormat.h +++ b/src/corelibs/U2Formats/src/FastaFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -36,10 +36,6 @@ class U2FORMATS_EXPORT FastaFormat : public TextDocumentFormat { public: FastaFormat(QObject* p); - virtual DocumentFormatId getFormatId() const {return BaseDocumentFormats::FASTA;} - - virtual const QString& getFormatName() const {return formatName;} - void storeSequence(const DNASequence& sequence, IOAdapter* io, U2OpStatus& os); void storeSequence(const U2SequenceObject *sequence, IOAdapter *io, U2OpStatus &os); @@ -59,10 +55,6 @@ protected: virtual FormatCheckResult checkRawTextData(const QByteArray& rawData, const GUrl& = GUrl()) const; virtual DNASequence *loadTextSequence(IOAdapter* io, U2OpStatus& os); virtual Document* loadTextDocument(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& fs, U2OpStatus& os); - -private: - - QString formatName; }; }//namespace diff --git a/src/corelibs/U2Formats/src/FastqFormat.cpp b/src/corelibs/U2Formats/src/FastqFormat.cpp index 09d4ee926c4d357612ab7570ac89a013b2369ec1..2c10301abb6ce9f8b61a26b38315e45c19bb5993 100644 --- a/src/corelibs/U2Formats/src/FastqFormat.cpp +++ b/src/corelibs/U2Formats/src/FastqFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -48,9 +48,10 @@ namespace U2 { static const int PROGRESS_UPDATE_STEP = 1000; FastqFormat::FastqFormat(QObject* p) - : TextDocumentFormat(p, DocumentFormatFlags_SW | DocumentFormatFlag_LockedIfNotCreatedByUGENE, QStringList() << "fastq" << "fq"), fn(tr("FASTQ")) + : TextDocumentFormat(p, BaseDocumentFormats::FASTQ, DocumentFormatFlags_SW | DocumentFormatFlag_LockedIfNotCreatedByUGENE, QStringList() << "fastq" << "fq") { supportedObjectTypes+=GObjectTypes::SEQUENCE; + formatName = tr("FASTQ"); formatDescription = tr("FASTQ format is a text-based format for storing both a biological sequence (usually nucleotide sequence) " "and its corresponding quality scores. \ Both the sequence letter and quality score are encoded with a single ASCII character for brevity. \ @@ -132,7 +133,6 @@ FormatCheckResult FastqFormat::checkRawTextData(const QByteArray& rawData, const } static QString readSequenceName(U2OpStatus& os, IOAdapter *io, char beginWith = '@') { - static const QString errorMessage = U2::FastqFormat::tr("Error while trying to find sequence name start"); QByteArray buffArray(DocumentFormat::READ_BUFF_SIZE + 1, 0); { // read name string @@ -141,16 +141,18 @@ static QString readSequenceName(U2OpStatus& os, IOAdapter *io, char beginWith = int readedCount = 0; while ((readedCount == 0) && !io->isEof()) { // skip \ns readedCount = io->readLine(buff, DocumentFormat::READ_BUFF_SIZE, &sequenceNameStartFound); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), QString()); } - CHECK_EXT(io->isEof() == false,,""); - CHECK_EXT(readedCount >= 0, os.setError(errorMessage), ""); + CHECK(io->isEof() == false, QString()); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), QString()); + CHECK_EXT(readedCount >= 0, os.setError(U2::FastqFormat::tr("Error while trying to find sequence name start")), ""); buffArray.resize(readedCount); buffArray = buffArray.trimmed(); } const char *buff = buffArray.constData(); - CHECK_EXT((buffArray.size() > 0) && (buff[0] == beginWith), os.setError(errorMessage), ""); + CHECK_EXT((buffArray.size() > 0) && (buff[0] == beginWith), os.setError(U2::FastqFormat::tr("Error while trying to find sequence name start")), ""); QString sequenceName = QString::fromLatin1(buff+1, buffArray.size()-1); return sequenceName; @@ -170,6 +172,7 @@ static void readSequence(U2OpStatus& os, IOAdapter *io, QByteArray &sequence, ch while (!io->isEof()) { bool eolnFound = false; int readedCount = io->readUntil(buff, DocumentFormat::READ_BUFF_SIZE, TextUtils::LINE_BREAKS, IOAdapter::Term_Include, &eolnFound); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), ); CHECK_EXT(readedCount >= 0, os.setError(U2::FastqFormat::tr("Error while reading sequence")),); QByteArray trimmed = QByteArray(buffArray.data(), readedCount); @@ -177,12 +180,18 @@ static void readSequence(U2OpStatus& os, IOAdapter *io, QByteArray &sequence, ch if (eolnFound && checkFirstSymbol(trimmed, readUntil)) { // read quality sequence name line, reverting back io->skip(-readedCount); + if (io->hasError()) { + os.setError(io->errorString()); + } return; } sequence.append(trimmed); CHECK_OP(os,); } + if (io->hasError()) { + os.setError(io->errorString()); + } } static void readQuality(U2OpStatus& os, IOAdapter *io, QByteArray &sequence, int count) { @@ -196,6 +205,7 @@ static void readQuality(U2OpStatus& os, IOAdapter *io, QByteArray &sequence, int while (!io->isEof() && (readed < count)) { bool eolnFound = false; int readedCount = io->readUntil(buff, DocumentFormat::READ_BUFF_SIZE, TextUtils::LINE_BREAKS, IOAdapter::Term_Include, &eolnFound); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), ); CHECK_EXT(readedCount >= 0, os.setError(U2::FastqFormat::tr("Error while reading sequence")),); QByteArray trimmed = QByteArray(buffArray.data(), readedCount); @@ -204,12 +214,18 @@ static void readQuality(U2OpStatus& os, IOAdapter *io, QByteArray &sequence, int int qualitySize = sequence.size() + trimmed.size(); if (eolnFound && (qualitySize > count)) { // read quality sequence name line, reverting back io->skip(-readedCount); + if (io->hasError()) { + os.setError(io->errorString()); + } return; } sequence.append(trimmed); CHECK_OP(os,); } + if (io->hasError()) { + os.setError(io->errorString()); + } } #define SKIPPED_LINES_ERRORS_LIMIT 50 @@ -263,6 +279,9 @@ static void load(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& hints QString sequenceName = readSequenceName(warningOs, io, '@'); // check for eof while trying to read another FASTQ block if (io->isEof()) { + if (io->hasError()) { + os.setError(io->errorString()); + } break; } @@ -321,9 +340,8 @@ static void load(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& hints QString qualSequenceName = readSequenceName(warningOs, io, '+'); if (!qualSequenceName.isEmpty()) { - static const QString err = U2::FastqFormat::tr("Sequence name differs from quality scores name: %1 and %2"); if (sequenceName != qualSequenceName){ - warningOs.setError(err.arg(sequenceName).arg(qualSequenceName)); + warningOs.setError(U2::FastqFormat::tr("Sequence name differs from quality scores name: %1 and %2").arg(sequenceName).arg(qualSequenceName)); } if(errorLoggingBreak(warningOs, skippedLines, sequenceName)){ U2OpStatusImpl seqOs; @@ -341,9 +359,8 @@ static void load(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& hints continue; } - static const QString err = U2::FastqFormat::tr("Bad quality scores: inconsistent size."); if(sequence.length() != qualityScores.length()){ - warningOs.setError(err); + warningOs.setError(U2::FastqFormat::tr("Bad quality scores: inconsistent size.")); } if(errorLoggingBreak(warningOs, skippedLines, sequenceName)){ U2OpStatusImpl seqOs; @@ -402,7 +419,7 @@ static void load(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& hints objects << new U2SequenceObject(u2seq.visualName, U2EntityRef(dbiRef, u2seq.id)); objects << DocumentFormatUtils::addAnnotationsForMergedU2Sequence(sequenceRef, dbiRef, headers, mergedMapping, hints); if (headers.size() > 1) { - writeLockReason = DocumentFormat::MERGED_SEQ_LOCK; + writeLockReason = QObject::tr("Document sequences were merged"); } } @@ -534,8 +551,8 @@ void FastqFormat::storeEntry(IOAdapter *io, const QMap< GObjectType, QList<GObje } DNASequence *FastqFormat::loadTextSequence(IOAdapter* io, U2OpStatus& os) { - CHECK_EXT((io != NULL) && (io->isOpen() == true), os.setError(L10N::badArgument("IO adapter")), NULL); U2OpStatus2Log logOs; + CHECK_EXT((io != NULL) && (io->isOpen() == true), os.setError(L10N::badArgument("IO adapter")), NULL); QByteArray readBuff; QByteArray sequence; QByteArray qualityScores; @@ -547,7 +564,7 @@ DNASequence *FastqFormat::loadTextSequence(IOAdapter* io, U2OpStatus& os) { readBuff.clear(); QString sequenceName = readSequenceName(os, io, '@'); // check for eof while trying to read another FASTQ block - CHECK_EXT(!io->isEof(), , NULL); + CHECK(!io->isEof(), NULL); CHECK_OP(os, new DNASequence()); sequence.clear(); @@ -555,9 +572,9 @@ DNASequence *FastqFormat::loadTextSequence(IOAdapter* io, U2OpStatus& os) { CHECK_OP(logOs, new DNASequence()); QString qualSequenceName = readSequenceName(logOs, io, '+'); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), NULL); if (!qualSequenceName.isEmpty()) { - static const QString err = U2::FastqFormat::tr("Not a valid FASTQ file, sequence name differs from quality scores name"); - CHECK_EXT(sequenceName == qualSequenceName, logOs.setError(err), new DNASequence()); + CHECK_EXT(sequenceName == qualSequenceName, logOs.setError(U2::FastqFormat::tr("Not a valid FASTQ file, sequence name differs from quality scores name")), new DNASequence()); } // read qualities @@ -565,8 +582,7 @@ DNASequence *FastqFormat::loadTextSequence(IOAdapter* io, U2OpStatus& os) { readQuality(logOs, io, qualityScores, sequence.size()); CHECK_OP(logOs, new DNASequence()); - static const QString err = U2::FastqFormat::tr("Not a valid FASTQ file. Bad quality scores: inconsistent size."); - CHECK_EXT(sequence.length() == qualityScores.length(), logOs.setError(err), new DNASequence()); + CHECK_EXT(sequence.length() == qualityScores.length(), logOs.setError(U2::FastqFormat::tr("Not a valid FASTQ file. Bad quality scores: inconsistent size.")), new DNASequence()); DNASequence *seq = new DNASequence(sequenceName, sequence); seq->quality = DNAQuality(qualityScores); diff --git a/src/corelibs/U2Formats/src/FastqFormat.h b/src/corelibs/U2Formats/src/FastqFormat.h index 863ab7befba546b5f8f412ab0988bccabd57b957..af4a18913a451608cb2e95e81562e24c61f7f30a 100644 --- a/src/corelibs/U2Formats/src/FastqFormat.h +++ b/src/corelibs/U2Formats/src/FastqFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -39,10 +39,6 @@ class U2FORMATS_EXPORT FastqFormat : public TextDocumentFormat { public: FastqFormat(QObject* p); - virtual DocumentFormatId getFormatId() const {return BaseDocumentFormats::FASTQ;} - - virtual const QString& getFormatName() const {return fn;} - virtual void storeDocument( Document* d, IOAdapter* io, U2OpStatus& os ); virtual bool isStreamingSupport() {return true;} @@ -57,9 +53,6 @@ protected: virtual DNASequence *loadTextSequence(IOAdapter* io, U2OpStatus& os); virtual Document* loadTextDocument(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& fs, U2OpStatus& os); - -private: - QString fn; }; }//namespace diff --git a/src/corelibs/U2Formats/src/FpkmTrackingFormat.cpp b/src/corelibs/U2Formats/src/FpkmTrackingFormat.cpp index 3ab75dc77a6db38df167f4c05eb23505962cec60..af5f01d86397e192c71a48ce126c347880b8398b 100644 --- a/src/corelibs/U2Formats/src/FpkmTrackingFormat.cpp +++ b/src/corelibs/U2Formats/src/FpkmTrackingFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -73,10 +73,8 @@ FormatDetectionScore FpkmTrackingLineValidateFlags::getFormatDetectionScore() //------------------------------------------------------------------- // FPKMTrackingFormat //------------------------------------------------------------------- -const QString FpkmTrackingFormat::FORMAT_NAME = QObject::tr("FPKM Tracking Format"); const QString FpkmTrackingFormat::NO_VALUE_STR = "-"; - const QString FpkmTrackingFormat::TRACKING_ID_COLUMN = "tracking_id"; const QString FpkmTrackingFormat::CLASS_CODE_COLUMN = "class_code"; const QString FpkmTrackingFormat::NEAREST_REF_ID_COLUMN = "nearest_ref_id"; @@ -89,8 +87,9 @@ const QString FpkmTrackingFormat::COVERAGE_COLUMN = "coverage"; FpkmTrackingFormat::FpkmTrackingFormat(QObject* parent) - : TextDocumentFormat(parent, DocumentFormatFlag_SupportWriting, QStringList("fpkm_tracking")) + : TextDocumentFormat(parent, BaseDocumentFormats::FPKM_TRACKING_FORMAT, DocumentFormatFlag_SupportWriting, QStringList("fpkm_tracking")) { + formatName = tr("FPKM Tracking Format"); formatDescription = tr("The FPKM (fragments per kilobase of exon model per million mapped fragments)" " Tracking Format is a native Cufflinks format to output estimated expression values."); @@ -111,11 +110,13 @@ Document* FpkmTrackingFormat::loadTextDocument(IOAdapter* io, const U2DbiRef& d } -int readFpkmTrLine(QString &buffer, IOAdapter* io, QScopedArrayPointer<char> &charbuff) { +int readFpkmTrLine(QString &buffer, IOAdapter* io, QScopedArrayPointer<char> &charbuff, U2OpStatus& os) { int len; buffer.clear(); do { len = io->readLine(charbuff.data(), DocumentFormat::READ_BUFF_SIZE - 1); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), -1); + charbuff.data()[len] = '\0'; buffer.append(QString(charbuff.data())); } while (DocumentFormat::READ_BUFF_SIZE - 1 == len); @@ -138,10 +139,10 @@ QList<SharedAnnotationData> FpkmTrackingFormat::parseDocument(IOAdapter* io, QSt QString qstrbuf; // Validate the header - length = readFpkmTrLine(qstrbuf, io, buff); - if (0 == length) { - return result; - } + length = readFpkmTrLine(qstrbuf, io, buff, os); + CHECK_OP(os, result); + CHECK(length != 0, result); + QStringList columnsNames; parseHeader(qstrbuf, columnsNames); @@ -149,7 +150,7 @@ QList<SharedAnnotationData> FpkmTrackingFormat::parseDocument(IOAdapter* io, QSt bool fileIsValid = true; int lineNumber = 1; - while ((length = readFpkmTrLine(qstrbuf, io, buff)) > 0) { + while ((length = readFpkmTrLine(qstrbuf, io, buff, os)) > 0) { // Parse and validate the line FpkmTrackingLineValidateFlags validationStatus; FpkmTrackingLineData fpkmTrLineData = parseAndValidateLine(qstrbuf, columnsNames, validationStatus); @@ -232,8 +233,9 @@ QList<SharedAnnotationData> FpkmTrackingFormat::parseDocument(IOAdapter* io, QSt // Move to the next line lineNumber++; } + CHECK_OP(os, result); - if (false == fileIsValid) { + if (!fileIsValid) { ioLog.error("FPKM Tracking Format parsing error: one or more errors occurred while parsing the input file," " see TRACE log for details!"); } diff --git a/src/corelibs/U2Formats/src/FpkmTrackingFormat.h b/src/corelibs/U2Formats/src/FpkmTrackingFormat.h index cd4faa28808bebf10aea66c31439e180b850671b..da94a9eca407402071f1eb78e1353e3a0c8fe732 100644 --- a/src/corelibs/U2Formats/src/FpkmTrackingFormat.h +++ b/src/corelibs/U2Formats/src/FpkmTrackingFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -110,10 +110,6 @@ class U2FORMATS_EXPORT FpkmTrackingFormat : public TextDocumentFormat public: FpkmTrackingFormat(QObject* parent); - virtual DocumentFormatId getFormatId() const { return BaseDocumentFormats::FPKM_TRACKING_FORMAT; } - - virtual const QString& getFormatName() const { return FORMAT_NAME; } - virtual void storeDocument(Document* doc, IOAdapter* io, U2OpStatus& os); protected: @@ -128,10 +124,7 @@ protected: private: FpkmTrackingLineData parseAndValidateLine(QString line, QStringList columns, FpkmTrackingLineValidateFlags& status) const; - static const QString FORMAT_NAME; - static const QString NO_VALUE_STR; - static const QString TRACKING_ID_COLUMN; static const QString CLASS_CODE_COLUMN; static const QString NEAREST_REF_ID_COLUMN; diff --git a/src/corelibs/U2Formats/src/GFFFormat.cpp b/src/corelibs/U2Formats/src/GFFFormat.cpp index e3ae40fd493df4f2947b69cf5331eec236a9c8f0..45c0dba601bf83ba5bc037e414d8e75d4107b029 100644 --- a/src/corelibs/U2Formats/src/GFFFormat.cpp +++ b/src/corelibs/U2Formats/src/GFFFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -47,7 +47,7 @@ namespace U2{ const int GFFFormat::LOCAL_READ_BUFFER_SIZE = 32768; -GFFFormat::GFFFormat(QObject* p) : TextDocumentFormat(p, DocumentFormatFlag_SupportWriting, QStringList("gff")){ +GFFFormat::GFFFormat(QObject* p) : TextDocumentFormat(p, BaseDocumentFormats::GFF, DocumentFormatFlag_SupportWriting, QStringList("gff")){ formatName = tr("GFF"); formatDescription = tr("GFF is a format used for storing features and annotations"); supportedObjectTypes+=GObjectTypes::ANNOTATION_TABLE; @@ -71,14 +71,17 @@ Document* GFFFormat::loadTextDocument(IOAdapter* io, const U2DbiRef& dbiRef, con return doc; } -int readLongLine(QString &buffer, IOAdapter* io, QScopedArrayPointer<char> &charbuff, int readBufferSize) { +int readLongLine (QString &buffer, IOAdapter* io, QScopedArrayPointer<char> &charbuff, int readBufferSize, U2OpStatus& os) { int len; buffer.clear(); do { len = io->readLine(charbuff.data(), readBufferSize - 1); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), -1); + charbuff.data()[len] = '\0'; buffer.append(QString(charbuff.data())); } while (readBufferSize - 1 == len); + return buffer.length(); } @@ -229,6 +232,8 @@ void GFFFormat::load(IOAdapter* io, const U2DbiRef& dbiRef, QList<GObject*>& obj QScopedArrayPointer<char> buff(new char[LOCAL_READ_BUFFER_SIZE]); int len = io->readLine(buff.data(), LOCAL_READ_BUFFER_SIZE); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), ); + buff.data()[len] = '\0'; QString qstrbuf(buff.data()); QStringList words = qstrbuf.split(QRegExp("\\s+")); @@ -240,6 +245,8 @@ void GFFFormat::load(IOAdapter* io, const U2DbiRef& dbiRef, QList<GObject*>& obj int lineNumber = 2;//because first line checked in method validateHeader above if (!skipHeader) { io->skip(-io->bytesRead()); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), ); + lineNumber--; } @@ -247,7 +254,7 @@ void GFFFormat::load(IOAdapter* io, const U2DbiRef& dbiRef, QList<GObject*>& obj const QString folder = hints.value(DBI_FOLDER_HINT, U2ObjectDbi::ROOT_FOLDER).toString(); QMap<QString, AnnotationData *> joinedAnnotations; - QMap<AnnotationData *, QString> annotationGroups; + QMap<QString, QList<AnnotationData *> > annotationGroups; QMap<AnnotationData *, AnnotationTableObject *> annotationTables; bool fastaSectionStarts = false; bool anyNamelessSequence = false; @@ -259,7 +266,11 @@ void GFFFormat::load(IOAdapter* io, const U2DbiRef& dbiRef, QList<GObject*>& obj const int objectsCountLimit = hints.contains(DocumentReadingMode_MaxObjectsInDoc) ? hints[DocumentReadingMode_MaxObjectsInDoc].toInt() : -1; while (!io->isEof()) { - len = readLongLine(qstrbuf, io, buff, GFFFormat::LOCAL_READ_BUFFER_SIZE); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), ); + + len = readLongLine(qstrbuf, io, buff, GFFFormat::LOCAL_READ_BUFFER_SIZE, os); + CHECK_OP(os, ); + //skip empty lines if (TextUtils::remove(buff.data(), len, TextUtils::WHITES) == 0) { ioLog.info(GFFFormat::tr("Parsing error: file contains empty line %1, line skipped").arg(lineNumber)); @@ -290,7 +301,7 @@ void GFFFormat::load(IOAdapter* io, const U2DbiRef& dbiRef, QList<GObject*>& obj DNASequence sequence(objName, seq); sequence.info.insert(DNAInfo::FASTA_HDR, objName); U2SequenceObject *seqObj = importSequence(sequence, objName, objects, seqImporter, dbiRef, folder, os); - CHECK_OP(os,); + CHECK_OP(os, ); SAFE_POINT(seqObj != NULL, "DocumentFormatUtils::addSequenceObject returned NULL but didn't set error",); dbiObjects.objects << seqObj->getSequenceRef().entityId; @@ -439,8 +450,7 @@ void GFFFormat::load(IOAdapter* io, const U2DbiRef& dbiRef, QList<GObject*>& obj os.setError(tr("Parsing error: incorrect strand patameter at line %1. Strand can be '+','-' or '.'").arg(lineNumber)); return; } - - annotationGroups.insert(ad, groupName); + annotationGroups[groupName].append(ad); annotationTables.insert(ad, ato); } else { delete ad; @@ -452,9 +462,13 @@ void GFFFormat::load(IOAdapter* io, const U2DbiRef& dbiRef, QList<GObject*>& obj } // add annotation data to annotation table - foreach (AnnotationData *ann, annotationGroups.keys()) { - SAFE_POINT(annotationGroups.contains(ann) && annotationTables.contains(ann), "Unexpected annotation!", ); - annotationTables[ann]->addAnnotations(QList<SharedAnnotationData>() << SharedAnnotationData(ann), annotationGroups[ann]); + foreach(const QString& key, annotationGroups.keys()) { + QList<AnnotationData *> data = annotationGroups.value(key); + foreach(AnnotationData* ann, data) { + SAFE_POINT(data.contains(ann) && annotationTables.contains(ann), "Unexpected annotation!", ); + + annotationTables[ann]->addAnnotations(QList<SharedAnnotationData>() << SharedAnnotationData(ann), key); + } } //handling last fasta sequence diff --git a/src/corelibs/U2Formats/src/GFFFormat.h b/src/corelibs/U2Formats/src/GFFFormat.h index 483b98f9eaf2aa2554448f6bcece845abebb3112..98be8776ae47f358dc00440bf907a86642793675 100644 --- a/src/corelibs/U2Formats/src/GFFFormat.h +++ b/src/corelibs/U2Formats/src/GFFFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -36,10 +36,6 @@ class U2FORMATS_EXPORT GFFFormat : public TextDocumentFormat { public: GFFFormat(QObject* p); - virtual DocumentFormatId getFormatId() const {return BaseDocumentFormats::GFF;} - - virtual const QString& getFormatName() const {return formatName;} - virtual void storeDocument(Document* d, IOAdapter* io, U2OpStatus& os); protected: @@ -54,8 +50,6 @@ private: QStringList parseLine(const QString& line) const; - QString formatName; - static const int LOCAL_READ_BUFFER_SIZE; }; diff --git a/src/corelibs/U2Formats/src/GTFFormat.cpp b/src/corelibs/U2Formats/src/GTFFormat.cpp index 94c3ef1c387fab4e8c7ac9f43bb27bd1f60e851e..3e4c2113fc6bfa03507f439e20e3942280e703fd 100644 --- a/src/corelibs/U2Formats/src/GTFFormat.cpp +++ b/src/corelibs/U2Formats/src/GTFFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -61,11 +61,16 @@ FormatDetectionScore GTFLineValidateFlags::getFormatDetectionScore() return FormatDetection_NotMatched; } - if (noGeneIdAttribute || noTranscriptIdAttribute) { + /* + * These two attributes are required according to the '.gtf' format specification + * But, the absence of them doesn't have any influence on the file opening + * So, there is a decision was made to increase the similarity points if only one of these attributes is lost + */ + if (noGeneIdAttribute && noTranscriptIdAttribute) { return FormatDetection_VeryLowSimilarity; } - if (incorrectScore || incorrectStrand || incorrectFrame) { + if (incorrectScore || incorrectStrand || incorrectFrame || noGeneIdAttribute || noTranscriptIdAttribute) { return FormatDetection_LowSimilarity; } @@ -80,8 +85,6 @@ FormatDetectionScore GTFLineValidateFlags::getFormatDetectionScore() //------------------------------------------------------------------- // GTFFormat //------------------------------------------------------------------- -const QString GTFFormat::FORMAT_NAME = QObject::tr("GTF"); - const int GTFFormat::FIELDS_COUNT_IN_EACH_LINE = 9; const QString GTFFormat::NO_VALUE_STR = "."; @@ -96,8 +99,9 @@ const QString GTFFormat::TRANSCRIPT_ID_QUALIFIER_NAME = "transcript_id"; GTFFormat::GTFFormat(QObject* parent) - : TextDocumentFormat(parent, DocumentFormatFlag_SupportWriting, QStringList("gtf")) + : TextDocumentFormat(parent, BaseDocumentFormats::GTF, DocumentFormatFlag_SupportWriting, QStringList("gtf")) { + formatName = tr("GTF"); formatDescription = tr("The Gene transfer format (GTF) is a file format used to hold" " information about gene structure."); @@ -116,14 +120,17 @@ Document* GTFFormat::loadTextDocument(IOAdapter* io, const U2DbiRef& dbiRef, con return doc; } -int readGTFLine(QString &buffer, IOAdapter *io, QScopedArrayPointer<char> &charbuff) { +int readGTFLine(QString &buffer, IOAdapter *io, QScopedArrayPointer<char> &charbuff, U2OpStatus& os) { int len; buffer.clear(); do { len = io->readLine(charbuff.data(), DocumentFormat::READ_BUFF_SIZE - 1); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), -1); + charbuff.data()[len] = '\0'; buffer.append(QString(charbuff.data())); } while (DocumentFormat::READ_BUFF_SIZE - 1 == len); + return buffer.length(); } @@ -135,7 +142,8 @@ QMap<QString, QList<SharedAnnotationData> > GTFFormat::parseDocument(IOAdapter * bool fileIsValid = true; int lineNumber = 1; - while (readGTFLine(qstrbuf, io, buff) > 0) { + while (readGTFLine(qstrbuf, io, buff, os) > 0) { + if (qstrbuf.startsWith("track")) { //skip comments lineNumber++; continue; @@ -218,19 +226,6 @@ QMap<QString, QList<SharedAnnotationData> > GTFFormat::parseDocument(IOAdapter * " format at line %1!").arg(lineNumber)); } - - // Verify that mandatory attributes "gene_id" and "transcript_id" are present - if (validationStatus.isGeneIdAbsent()) { - ioLog.trace(tr("GTF parsing error: mandatory attribute '") + - GENE_ID_QUALIFIER_NAME + tr("' is absent at line %1!").arg(lineNumber)); - } - - if (validationStatus.isTranscriptIdAbsent()) { - ioLog.trace(tr("GTF parsing error: mandatory attribute '") + - TRANSCRIPT_ID_QUALIFIER_NAME + tr("' is absent at line %1!").arg(lineNumber)); - } - - // Verify the strand if (validationStatus.isIncorrectStrand()) { // Write the error to the log, but open the file @@ -247,6 +242,7 @@ QMap<QString, QList<SharedAnnotationData> > GTFFormat::parseDocument(IOAdapter * // Move to the next line lineNumber++; } + CHECK_OP(os, result); if (!fileIsValid) { ioLog.error("GTF parsing error: one or more errors occurred while parsing the input file, see TRACE log for details!"); @@ -541,6 +537,7 @@ void GTFFormat::storeDocument(Document *doc, IOAdapter *io, U2OpStatus &os) { } QByteArray lineData; + bool geneIdOrTranscriptIdQualNotFound = false; foreach (GObject* annotTable, annotTables) { AnnotationTableObject *annTable = qobject_cast<AnnotationTableObject *>(annotTable); @@ -608,15 +605,8 @@ void GTFFormat::storeDocument(Document *doc, IOAdapter *io, U2OpStatus &os) { } } } - if (geneIdAttributeStr.isEmpty()) { - os.setError(tr("Can't save an annotation to a GTF file" - " - the annotation doesn't have the '%1' qualifier!").arg(GENE_ID_QUALIFIER_NAME)); - return; - } - if (transcriptIdAttributeStr.isEmpty()) { - os.setError(tr("Can't save an annotation to a GTF file" - " - the annotation doesn't have the '%1' qualifier!").arg(TRANSCRIPT_ID_QUALIFIER_NAME)); - return; + if (!geneIdOrTranscriptIdQualNotFound && (geneIdAttributeStr.isEmpty() || transcriptIdAttributeStr.isEmpty())) { + geneIdOrTranscriptIdQualNotFound = true; } lineFields[GTF_ATTRIBUTES_INDEX] = geneIdAttributeStr + transcriptIdAttributeStr + @@ -631,6 +621,9 @@ void GTFFormat::storeDocument(Document *doc, IOAdapter *io, U2OpStatus &os) { } } } + if (geneIdOrTranscriptIdQualNotFound) { + ioLog.info(QString("The '%1' file GTF format is not strict - some annotations do not have \"gene_id\" and/or \"transcript_id\" qualifiers.").arg(io->getURL().getURLString())); + } } } // namespace U2 diff --git a/src/corelibs/U2Formats/src/GTFFormat.h b/src/corelibs/U2Formats/src/GTFFormat.h index 88d217b2f273caf417603bc96b5de90d14c60faa..109fdcbd2ac8d6e633493ed64d5329ab9a9ca957 100644 --- a/src/corelibs/U2Formats/src/GTFFormat.h +++ b/src/corelibs/U2Formats/src/GTFFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -56,8 +56,6 @@ public: incorrectScore || incorrectStrand || incorrectFrame || - noGeneIdAttribute || - noTranscriptIdAttribute || incorrectFormatOfAttributes; } @@ -117,10 +115,6 @@ class U2FORMATS_EXPORT GTFFormat : public TextDocumentFormat { public: GTFFormat(QObject* parent); - virtual DocumentFormatId getFormatId() const { return BaseDocumentFormats::GTF; } - - virtual const QString& getFormatName() const { return FORMAT_NAME; } - virtual void storeDocument(Document* doc, IOAdapter* io, U2OpStatus& os); protected: @@ -139,8 +133,6 @@ private: void load(IOAdapter* io, QList<GObject*>& objects, const U2DbiRef& dbiRef, const QVariantMap &hints, U2OpStatus& os); - static const QString FORMAT_NAME; - static const int FIELDS_COUNT_IN_EACH_LINE; static const QString NO_VALUE_STR; diff --git a/src/corelibs/U2Formats/src/GenbankLocationParser.cpp b/src/corelibs/U2Formats/src/GenbankLocationParser.cpp index a74abcb81aa973d0923aea7cdd31ca219f5fa9d8..10112e35e2f3f8441955dba2518292386c44d67d 100644 --- a/src/corelibs/U2Formats/src/GenbankLocationParser.cpp +++ b/src/corelibs/U2Formats/src/GenbankLocationParser.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/GenbankLocationParser.h b/src/corelibs/U2Formats/src/GenbankLocationParser.h index 00d81d658d8b01615e83807f60100c78add7154d..2ac17616532891c79ec8595cd28b468ae43870f0 100644 --- a/src/corelibs/U2Formats/src/GenbankLocationParser.h +++ b/src/corelibs/U2Formats/src/GenbankLocationParser.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/GenbankPlainTextFormat.cpp b/src/corelibs/U2Formats/src/GenbankPlainTextFormat.cpp index 77fe6e68ebddeef308c893700bed02c503943b41..76f56d5a08607355172ece01ed1cd8280604a7aa 100644 --- a/src/corelibs/U2Formats/src/GenbankPlainTextFormat.cpp +++ b/src/corelibs/U2Formats/src/GenbankPlainTextFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/GenbankPlainTextFormat.h b/src/corelibs/U2Formats/src/GenbankPlainTextFormat.h index 94be0c80a611f7592980b963a08d1cf3663b6540..4ec0c469a8b1758bf41fd7001f7d5c5d9800ac8e 100644 --- a/src/corelibs/U2Formats/src/GenbankPlainTextFormat.h +++ b/src/corelibs/U2Formats/src/GenbankPlainTextFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/IOLibUtils.h b/src/corelibs/U2Formats/src/IOLibUtils.h index 2020d32d887953f5a40edcf38471c18c8b6bde3e..de3ec4fc81e2ff4e369fb2427ef7653e9b605bad 100644 --- a/src/corelibs/U2Formats/src/IOLibUtils.h +++ b/src/corelibs/U2Formats/src/IOLibUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/MSFFormat.cpp b/src/corelibs/U2Formats/src/MSFFormat.cpp index 72c8c189ddbd657b4a204a2531b94d71c1e8e14b..e613386fed49284167b16b7bd561c2996b5f8acb 100644 --- a/src/corelibs/U2Formats/src/MSFFormat.cpp +++ b/src/corelibs/U2Formats/src/MSFFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -60,7 +60,7 @@ const int MSFFormat::CHARS_IN_WORD = 10; //TODO: recheck if it does support streaming! Fix isObjectOpSupported if not! -MSFFormat::MSFFormat(QObject* p) : TextDocumentFormat(p, DocumentFormatFlags(DocumentFormatFlag_SupportWriting) | DocumentFormatFlag_OnlyOneObject, QStringList("msf")) { +MSFFormat::MSFFormat(QObject* p) : TextDocumentFormat(p, BaseDocumentFormats::MSF, DocumentFormatFlags(DocumentFormatFlag_SupportWriting) | DocumentFormatFlag_OnlyOneObject, QStringList("msf")) { formatName = tr("MSF"); supportedObjectTypes+=GObjectTypes::MULTIPLE_SEQUENCE_ALIGNMENT; formatDescription = tr("MSF format is used to store multiple aligned sequences. Files include the sequence name and the sequence itself, which is usually aligned with other sequences in the file."); diff --git a/src/corelibs/U2Formats/src/MSFFormat.h b/src/corelibs/U2Formats/src/MSFFormat.h index f84de13f36ed71a6a8eb3a7141d5875ed64690bf..8742ff08f7a8bb7d60669003270bcbe859480662 100644 --- a/src/corelibs/U2Formats/src/MSFFormat.h +++ b/src/corelibs/U2Formats/src/MSFFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -38,10 +38,6 @@ public: MSFFormat(QObject* p); - virtual DocumentFormatId getFormatId() const { return BaseDocumentFormats::MSF; } - - virtual const QString& getFormatName() const { return formatName; } - virtual void storeDocument(Document* d, IOAdapter* io, U2OpStatus& os); virtual void storeEntry(IOAdapter *io, const QMap< GObjectType, QList<GObject*> > &objectsMap, U2OpStatus &os); @@ -55,8 +51,6 @@ private: void save(IOAdapter* io, Document* doc, U2OpStatus& ti); void load(IOAdapter* io, const U2DbiRef& dbiRef, QList<GObject*>& objects, const QVariantMap &hints, U2OpStatus& ti); - QString formatName; - static int getCheckSum(const QByteArray& seq); static const int CHECK_SUM_MOD; diff --git a/src/corelibs/U2Formats/src/MegaFormat.cpp b/src/corelibs/U2Formats/src/MegaFormat.cpp index 1918d509cfccb6d7ca226b10657ee073e40b3a6a..0773d7655fe721671e27b313c92df8050fcf416d 100644 --- a/src/corelibs/U2Formats/src/MegaFormat.cpp +++ b/src/corelibs/U2Formats/src/MegaFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -49,7 +49,7 @@ const char MegaFormat::MEGA_INDEL='-'; const char MegaFormat::MEGA_START_COMMENT='!'; const char MegaFormat::MEGA_END_COMMENT=';'; -MegaFormat::MegaFormat(QObject* p) : TextDocumentFormat(p, DocumentFormatFlags(DocumentFormatFlag_SupportWriting) | DocumentFormatFlag_OnlyOneObject, QStringList("meg")) { +MegaFormat::MegaFormat(QObject* p) : TextDocumentFormat(p, BaseDocumentFormats::MEGA, DocumentFormatFlags(DocumentFormatFlag_SupportWriting) | DocumentFormatFlag_OnlyOneObject, QStringList("meg")) { formatName = tr("Mega"); formatDescription = tr("Mega is a file format of native MEGA program"); supportedObjectTypes+=GObjectTypes::MULTIPLE_SEQUENCE_ALIGNMENT; @@ -94,7 +94,7 @@ FormatCheckResult MegaFormat::checkRawTextData(const QByteArray& rawData, const return FormatDetection_Matched; } -bool MegaFormat::getNextLine(IOAdapter* io, QByteArray& line) { +bool MegaFormat::getNextLine(IOAdapter* io, QByteArray& line, U2OpStatus &ti) { line.clear(); QByteArray readBuffer(READ_BUFF_SIZE, '\0'); char* buff = readBuffer.data(); @@ -103,6 +103,8 @@ bool MegaFormat::getNextLine(IOAdapter* io, QByteArray& line) { bool eolFound = false, eof = false; while (!eolFound) { len = io->readLine(buff, READ_BUFF_SIZE, &eolFound); + CHECK_EXT(!io->hasError(), ti.setError(io->errorString()), false); + if (len < READ_BUFF_SIZE && !eolFound) eolFound = eof = true; line += readBuffer; @@ -125,24 +127,26 @@ bool MegaFormat::checkName(QByteArray &name) { } bool MegaFormat::readName(IOAdapter* io, QByteArray &line, QByteArray &name, U2OpStatus &ti) { - bool eof=false; + bool eof = false; - line=line.mid(1); - line=line.trimmed(); - skipWhites(io, line); - if (line.isEmpty()) { - return true; - } - line=line.simplified(); + line = line.mid(1); + line = line.trimmed(); + skipWhites(io, line, ti); + CHECK_OP(ti, eof); + CHECK(!line.isEmpty(), true); + + line = line.simplified(); - int spaceIdx=line.indexOf(' '); - if (-1!=spaceIdx) { - name=line.left(spaceIdx); - line=line.mid(spaceIdx); + int spaceIdx = line.indexOf(' '); + if (-1 != spaceIdx) { + name = line.left(spaceIdx); + line = line.mid(spaceIdx); } else { - name=line; - eof=getNextLine(io, line); - line=line.simplified(); + name = line; + eof = getNextLine(io, line, ti); + CHECK_OP(ti, eof); + + line = line.simplified(); } if (!checkName(name)) { ti.setError(MegaFormat::tr("Bad name of sequence")); @@ -153,24 +157,24 @@ bool MegaFormat::readName(IOAdapter* io, QByteArray &line, QByteArray &name, U2O } bool MegaFormat::skipComments(IOAdapter *io, QByteArray &line, U2OpStatus &ti) { - int i=0; - bool eof=false; - bool hasEnd=false; + int i = 0; + bool eof = false; + bool hasEnd = false; while (1) { - while (i<line.length() && !hasEnd) { - if (MEGA_END_COMMENT==line[i]) { + while (i < line.length() && !hasEnd) { + if (MEGA_END_COMMENT == line[i]) { i++; - hasEnd=true; + hasEnd = true; break; } - if (MEGA_SEPARATOR==line[i]) { + if (MEGA_SEPARATOR == line[i]) { ti.setError(MegaFormat::tr("Unexpected # in comments")); return eof; } i++; } - if (line.length()==i) { + if (line.length() == i) { if (eof) { line.clear(); if (!hasEnd) { @@ -179,21 +183,23 @@ bool MegaFormat::skipComments(IOAdapter *io, QByteArray &line, U2OpStatus &ti) { } break; } - eof=getNextLine(io, line); - line=line.simplified(); - i=0; + eof = getNextLine(io, line, ti); + CHECK_OP(ti, eof); + + line = line.simplified(); + i = 0; if (!hasEnd) { continue; } } - hasEnd=true; - while (i<line.length()) { - if (MEGA_START_COMMENT==line[i]) { - hasEnd=false; + hasEnd = true; + while (i < line.length()) { + if (MEGA_START_COMMENT == line[i]) { + hasEnd = false; break; - } else if (MEGA_SEPARATOR==line[i]) { - line=line.mid(i); - i=-1; + } else if (MEGA_SEPARATOR == line[i]) { + line = line.mid(i); + i = -1; break; } else if (' '!=line[i]) { ti.setError(MegaFormat::tr("Unexpected symbol between comments")); @@ -204,10 +210,10 @@ bool MegaFormat::skipComments(IOAdapter *io, QByteArray &line, U2OpStatus &ti) { if (!hasEnd) { continue; } - if (line.length()!=i) { + if (line.length() != i) { break; } - if (line.length()==i && eof) { + if (line.length() == i && eof) { line.clear(); break; } @@ -234,19 +240,16 @@ void MegaFormat::workUpIndels(MultipleSequenceAlignment& al) { void MegaFormat::load(U2::IOAdapter *io, const U2DbiRef& dbiRef, QList<GObject*> &objects, const QVariantMap& fs, U2::U2OpStatus &os) { MultipleSequenceAlignment al(io->getURL().baseFileName()); QByteArray line; - bool eof=false; - bool firstBlock=true; - int sequenceIdx=0; - bool lastIteration=false; + bool eof = false; + bool firstBlock = true; + int sequenceIdx = 0; + bool lastIteration = false; readHeader(io, line, os); - if (os.hasError()) { - return; - } + CHECK_OP(os, ); + readTitle(io, line, os); - if (os.hasError()) { - return; - } + CHECK_OP(os, ); //read data QList<int> rowLens; @@ -266,19 +269,19 @@ void MegaFormat::load(U2::IOAdapter *io, const U2DbiRef& dbiRef, QList<GObject*> CHECK_OP(os, ); //read the sequence - eof=readSequence(io, line, os, value, &lastIteration); + eof = readSequence(io, line, os, value, &lastIteration); CHECK_OP(os, ); - if (0==sequenceIdx && value.contains(MEGA_IDENTICAL)) { + if ((0 == sequenceIdx) && value.contains(MEGA_IDENTICAL)) { os.setError(MegaFormat::tr("Identical symbol at the first sequence")); return; } if (firstBlock) { - for (int i=0; i<al->getNumRows(); i++) { - if (al->getMsaRow(i)->getName()==name) { - firstBlock=false; - sequenceIdx=0; + for (int i = 0; i < al->getNumRows(); i++) { + if (al->getMsaRow(i)->getName() == name) { + firstBlock = false; + sequenceIdx = 0; break; } } @@ -386,74 +389,59 @@ void MegaFormat::storeEntry(IOAdapter *io, const QMap< GObjectType, QList<GObjec } void MegaFormat::readHeader(U2::IOAdapter *io, QByteArray &line, U2::U2OpStatus &ti) { - skipWhites(io, line); - if (line.isEmpty()) { - ti.setError(MegaFormat::tr("No header")); - return; - } - - if (!line.startsWith(MEGA_SEPARATOR)) { - ti.setError(MegaFormat::tr("No # before header")); - return; - } - line=line.mid(1); - line=line.trimmed(); - skipWhites(io, line); - if (line.isEmpty()) { - ti.setError(MegaFormat::tr("No header")); - return; - } - - if (!line.startsWith(MEGA_HEADER)) { - ti.setError(MegaFormat::tr("Not MEGA-header")); - return; - } - line=line.mid(MEGA_HEADER.length()); - line=line.trimmed(); + skipWhites(io, line, ti); + CHECK_OP(ti, ); + CHECK_EXT(!line.isEmpty(), ti.setError(MegaFormat::tr("No header")), ); + CHECK_EXT(line.startsWith(MEGA_SEPARATOR), ti.setError(MegaFormat::tr("No # before header")), ); + + line = line.mid(1); + line = line.trimmed(); + skipWhites(io, line, ti); + CHECK_OP(ti, ); + CHECK_EXT(!line.isEmpty(), ti.setError(MegaFormat::tr("No header")), ); + CHECK_EXT(line.startsWith(MEGA_HEADER), ti.setError(MegaFormat::tr("Not MEGA-header")), ); + + line = line.mid(MEGA_HEADER.length()); + line = line.trimmed(); ti.setProgress(io->getProgress()); } -void MegaFormat::skipWhites(U2::IOAdapter *io, QByteArray &line) { +void MegaFormat::skipWhites(U2::IOAdapter *io, QByteArray &line, U2::U2OpStatus &ti) { while (line.isEmpty()) { - if (getNextLine(io, line)) { - if (line.isEmpty()) { - return; - } + bool nexLine = getNextLine(io, line, ti); + CHECK_OP(ti, ); + + if (nexLine) { + CHECK(!line.isEmpty(), ); } - line=line.trimmed(); + line = line.trimmed(); } } void MegaFormat::readTitle(U2::IOAdapter *io, QByteArray &line, U2::U2OpStatus &ti) { - skipWhites(io, line); - if (line.isEmpty()) { - ti.setError(MegaFormat::tr("No data in file")); - return; + skipWhites(io, line, ti); + CHECK_OP(ti, ); + CHECK_EXT(!line.isEmpty(), ti.setError(MegaFormat::tr("No data in file")), ); + + bool comment = false; + if (MEGA_START_COMMENT == line[0]) { + line = line.mid(1); + line = line.trimmed(); + comment = true; + skipWhites(io, line, ti); + CHECK_OP(ti, ); + CHECK_EXT(!line.isEmpty(), ti.setError(MegaFormat::tr("No data in file")), ); } - bool comment=false; - if (MEGA_START_COMMENT==line[0]) { - line=line.mid(1); - line=line.trimmed(); - comment=true; - skipWhites(io, line); - if (line.isEmpty()) { - ti.setError(MegaFormat::tr("No data in file")); - return; - } - } + line = line.simplified(); + QByteArray word = line.left(MEGA_TITLE.length()); + word = word.toUpper(); + CHECK_EXT(word == MEGA_TITLE, ti.setError(MegaFormat::tr("Incorrect title")), ); - line=line.simplified(); - QByteArray word=line.left(MEGA_TITLE.length()); - word=word.toUpper(); - if (MEGA_TITLE!=word) { - ti.setError(MegaFormat::tr("Incorrect title")); - return; - } - line=line.mid(MEGA_TITLE.length()); + line = line.mid(MEGA_TITLE.length()); if (!line.isEmpty() && - (TextUtils::ALPHA_NUMS[line[0]] || MEGA_IDENTICAL==line[0] || MEGA_INDEL==line[0])){ + (TextUtils::ALPHA_NUMS[line[0]] || MEGA_IDENTICAL == line[0] || MEGA_INDEL == line[0])){ ti.setError(MegaFormat::tr("Incorrect title")); return; } @@ -461,42 +449,45 @@ void MegaFormat::readTitle(U2::IOAdapter *io, QByteArray &line, U2::U2OpStatus & //read until # if (comment) { skipComments(io, line, ti); + CHECK_OP(ti, ); } else { - int sepIdx=line.indexOf(MEGA_SEPARATOR); - while (-1==sepIdx) { - if (getNextLine(io, line)) { - if (line.isEmpty()) { - ti.setError(MegaFormat::tr("No data in file")); - return; - } + int sepIdx = line.indexOf(MEGA_SEPARATOR); + while (-1 == sepIdx) { + bool nexLine = getNextLine(io, line, ti); + CHECK_OP(ti, ); + if (nexLine) { + CHECK_EXT(!line.isEmpty(), ti.setError(MegaFormat::tr("No data in file")), ); } - sepIdx=line.indexOf(MEGA_SEPARATOR); + sepIdx = line.indexOf(MEGA_SEPARATOR); } - line=line.mid(sepIdx); + line = line.mid(sepIdx); } ti.setProgress(io->getProgress()); } bool MegaFormat::readSequence(U2::IOAdapter *io, QByteArray &line, U2::U2OpStatus &ti, QByteArray &value, bool *lastIteration) { - bool hasPartOfSequence=false; - bool eof=false; + bool hasPartOfSequence = false; + bool eof = false; while (!ti.isCoR()) { //delete spaces from the sequence until # int spaceIdx=line.indexOf(' '); int separatorIdx; - while (-1!=spaceIdx) { - separatorIdx=line.indexOf(MEGA_SEPARATOR); - if (-1!=separatorIdx && separatorIdx<spaceIdx) { + while (-1 != spaceIdx) { + separatorIdx = line.indexOf(MEGA_SEPARATOR); + if (-1 != separatorIdx && separatorIdx<spaceIdx) { break; } - line=line.left(spaceIdx).append(line.mid(spaceIdx+1)); + line = line.left(spaceIdx).append(line.mid(spaceIdx+1)); spaceIdx=line.indexOf(' '); } //read another part if it is needed if (line.isEmpty()) { - if (getNextLine(io, line)) { + bool nextLine = getNextLine(io, line, ti); + CHECK_OP(ti, eof); + + if (nextLine) { if (!hasPartOfSequence) { ti.setError(MegaFormat::tr("Sequence has empty part")); return eof; @@ -506,58 +497,61 @@ bool MegaFormat::readSequence(U2::IOAdapter *io, QByteArray &line, U2::U2OpStatu } } ti.setProgress(io->getProgress()); - line=line.simplified(); + line = line.simplified(); continue; } - separatorIdx=line.indexOf(MEGA_SEPARATOR); - int commentIdx=line.indexOf(MEGA_START_COMMENT); + separatorIdx = line.indexOf(MEGA_SEPARATOR); + int commentIdx = line.indexOf(MEGA_START_COMMENT); - int sequenceEnd=(-1==separatorIdx)?line.size():separatorIdx; - sequenceEnd=(-1==commentIdx)?sequenceEnd:qMin(sequenceEnd, commentIdx); + int sequenceEnd = (-1 == separatorIdx) ? line.size() : separatorIdx; + sequenceEnd = (-1 == commentIdx) ? sequenceEnd : qMin(sequenceEnd, commentIdx); //check symbols in the sequence - for (int i=0; i<sequenceEnd; i++) { - if (!(TextUtils::ALPHAS[line[i]]) && !(line[i]==MEGA_INDEL) && !(line[i]==MEGA_IDENTICAL)) { + for (int i = 0; i < sequenceEnd; i++) { + if (!(TextUtils::ALPHAS[line[i]]) && !(line[i] == MEGA_INDEL) && !(line[i] == MEGA_IDENTICAL)) { ti.setError(MegaFormat::tr("Bad symbols in a sequence")); return eof; } } value.append(line, sequenceEnd); - hasPartOfSequence=true; + hasPartOfSequence = true; - if (-1!=commentIdx) { //skip comments untill # - if ((-1!=separatorIdx && commentIdx<separatorIdx) - || -1==separatorIdx) { - line=line.mid(commentIdx); - eof=skipComments(io, line, ti); + if (-1 != commentIdx) { //skip comments untill # + if ((-1 != separatorIdx && commentIdx < separatorIdx) + || -1 == separatorIdx) { + line = line.mid(commentIdx); + eof = skipComments(io, line, ti); if (ti.hasError()) { return eof; } - line=line.simplified(); + line = line.simplified(); if (!line.isEmpty()) { - separatorIdx=0; + separatorIdx = 0; } } } if (eof) { - (*lastIteration)=true; + (*lastIteration) = true; break; } - if (-1==separatorIdx) { - if (getNextLine(io, line)) { + if (-1 == separatorIdx) { + bool nextLine = getNextLine(io, line, ti); + CHECK_OP(ti, eof); + + if (nextLine) { if (!line.isEmpty()) { ti.setProgress(io->getProgress()); - line=line.simplified(); + line = line.simplified(); continue; } - eof=true; + eof = true; break; } ti.setProgress(io->getProgress()); - line=line.simplified(); + line = line.simplified(); continue; } else { - line=line.mid(separatorIdx); + line = line.mid(separatorIdx); break; } } diff --git a/src/corelibs/U2Formats/src/MegaFormat.h b/src/corelibs/U2Formats/src/MegaFormat.h index c192313b36ae1cb3f9dd8ddbfc7764a2624091db..4e11345fa8230d237b3b3ec863a3fc5ef23bc53b 100644 --- a/src/corelibs/U2Formats/src/MegaFormat.h +++ b/src/corelibs/U2Formats/src/MegaFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -35,8 +35,6 @@ Q_OBJECT public: MegaFormat(QObject* p); - virtual DocumentFormatId getFormatId() const { return BaseDocumentFormats::MEGA; } - virtual const QString& getFormatName() const { return formatName; } virtual void storeDocument(Document* d, IOAdapter* io, U2OpStatus& os); virtual void storeEntry(IOAdapter *io, const QMap< GObjectType, QList<GObject*> > &objectsMap, U2OpStatus &ti); protected: @@ -44,9 +42,8 @@ protected: virtual Document* loadTextDocument(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& fs, U2OpStatus& os); private: - QString formatName; void load(IOAdapter* io, const U2DbiRef& dbiRef, QList<GObject*>& objects, const QVariantMap& fs, U2OpStatus& ti); - static void skipWhites(IOAdapter *io, QByteArray &line); + static void skipWhites(IOAdapter *io, QByteArray &line, U2::U2OpStatus &ti); static void readHeader(IOAdapter* io, QByteArray &line, U2OpStatus &ti); static void readTitle(IOAdapter* io, QByteArray &line, U2OpStatus &ti); static bool readName(IOAdapter* io, QByteArray &line, QByteArray &name, U2OpStatus &ti); @@ -54,7 +51,7 @@ private: QByteArray &value, bool *lastIteration); static void workUpIndels(MultipleSequenceAlignment & al); - static bool getNextLine(IOAdapter* io, QByteArray& line); + static bool getNextLine(IOAdapter* io, QByteArray& line, U2OpStatus &ti); static bool skipComments(IOAdapter* io, QByteArray &line, U2OpStatus &ti); static bool checkName(QByteArray &name); static const QByteArray MEGA_HEADER; diff --git a/src/corelibs/U2Formats/src/NEXUSFormat.cpp b/src/corelibs/U2Formats/src/NEXUSFormat.cpp index a2a0944316cbc967966db8f55d27c0bf7150fde5..a7d6d5cd910479f7054c50e47a45527bab68f8cc 100644 --- a/src/corelibs/U2Formats/src/NEXUSFormat.cpp +++ b/src/corelibs/U2Formats/src/NEXUSFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -45,7 +45,7 @@ namespace U2 { NEXUSFormat::NEXUSFormat(QObject *p) : - TextDocumentFormat(p, DocumentFormatFlags(DocumentFormatFlag_SupportWriting) | DocumentFormatFlag_OnlyOneObject, QStringList()<<"nex"<<"nxs") // disable streaming for now + TextDocumentFormat(p, BaseDocumentFormats::NEXUS, DocumentFormatFlags(DocumentFormatFlag_SupportWriting) | DocumentFormatFlag_OnlyOneObject, QStringList()<<"nex"<<"nxs") // disable streaming for now { formatName = tr("NEXUS"); formatDescription = tr("Nexus is a multiple alignment and phylogenetic trees file format"); diff --git a/src/corelibs/U2Formats/src/NEXUSFormat.h b/src/corelibs/U2Formats/src/NEXUSFormat.h index fe734cebbf1e69462a67f4feb5fafb46cc27f875..f319b1c0b229ee2f220804b10f8796d6d021cf61 100644 --- a/src/corelibs/U2Formats/src/NEXUSFormat.h +++ b/src/corelibs/U2Formats/src/NEXUSFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -43,8 +43,6 @@ class U2FORMATS_EXPORT NEXUSFormat : public TextDocumentFormat { public: NEXUSFormat(QObject *p); - virtual DocumentFormatId getFormatId() const { return BaseDocumentFormats::NEXUS; } - virtual const QString& getFormatName() const { return formatName; } virtual void storeDocument(Document* d, IOAdapter* io, U2OpStatus& os); protected: virtual FormatCheckResult checkRawTextData(const QByteArray &rawData, const GUrl& = GUrl()) const; @@ -53,9 +51,6 @@ protected: private: QList<GObject*> loadObjects(IOAdapter *io, const U2DbiRef& dbiRef, const QVariantMap &fs, U2OpStatus &ti); void storeObjects(QList<GObject*> objects, bool simpleNames, IOAdapter *io, U2OpStatus &ti); - -private: - QString formatName; }; } // namespace U2 diff --git a/src/corelibs/U2Formats/src/NEXUSParser.h b/src/corelibs/U2Formats/src/NEXUSParser.h index 75b1cf296a6c8e427ba4a0c2d0e5862c971d6717..4499bd103c65062962d090e584996f1da7b6987e 100644 --- a/src/corelibs/U2Formats/src/NEXUSParser.h +++ b/src/corelibs/U2Formats/src/NEXUSParser.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/NewickFormat.cpp b/src/corelibs/U2Formats/src/NewickFormat.cpp index 9d35e4a2d9c69e3695d7fa680c53a9a5841c0808..c4af175571a5f95f3d3ac7f05878342b5feb4e6b 100644 --- a/src/corelibs/U2Formats/src/NewickFormat.cpp +++ b/src/corelibs/U2Formats/src/NewickFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -35,7 +35,7 @@ namespace U2 { /* TRANSLATOR U2::IOAdapter */ /* TRANSLATOR U2::NewickFormat */ -NewickFormat::NewickFormat(QObject* p) : TextDocumentFormat(p, DocumentFormatFlags_W1) { +NewickFormat::NewickFormat(QObject* p) : TextDocumentFormat(p, BaseDocumentFormats::NEWICK, DocumentFormatFlags_W1) { fileExtensions << "nwk" << "newick" << "nh" << "ph"; formatName = tr("Newick Standard"); formatDescription = tr("Newick is a simple format used to write out trees in a text file"); diff --git a/src/corelibs/U2Formats/src/NewickFormat.h b/src/corelibs/U2Formats/src/NewickFormat.h index 159d959facd33e9512a5b29562eb5086209c72db..d04359370ca8bc4cbfced2a5b7e1fbb58183a27a 100644 --- a/src/corelibs/U2Formats/src/NewickFormat.h +++ b/src/corelibs/U2Formats/src/NewickFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,19 +34,12 @@ class U2FORMATS_EXPORT NewickFormat : public TextDocumentFormat { public: NewickFormat(QObject* p); - virtual DocumentFormatId getFormatId() const {return BaseDocumentFormats::NEWICK;} - - virtual const QString& getFormatName() const {return formatName;} - virtual void storeDocument(Document* d, IOAdapter* io, U2OpStatus& os); protected: virtual FormatCheckResult checkRawTextData(const QByteArray& rawData, const GUrl& = GUrl()) const; virtual Document* loadTextDocument(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& fs, U2OpStatus& os); - -private: - QString formatName; }; }//namespace diff --git a/src/corelibs/U2Formats/src/PDBFormat.cpp b/src/corelibs/U2Formats/src/PDBFormat.cpp index be910b44e1eaae9f192d5523715e3fc858ef364f..1dbc1a9f10d2cfc4525cb3055e70b08bf3709641 100644 --- a/src/corelibs/U2Formats/src/PDBFormat.cpp +++ b/src/corelibs/U2Formats/src/PDBFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -51,7 +51,7 @@ namespace U2 { QHash<QByteArray,int> PDBFormat::atomNumMap = createAtomNumMap(); QHash<QByteArray, char> PDBFormat::acronymNameMap; -PDBFormat::PDBFormat(QObject* p) : TextDocumentFormat(p, DocumentFormatFlag(0), QStringList("pdb")) +PDBFormat::PDBFormat(QObject* p) : TextDocumentFormat(p, BaseDocumentFormats::PLAIN_PDB, DocumentFormatFlag(0), QStringList("pdb")) { formatName = tr("PDB"); formatDescription = tr("The Protein Data Bank (PDB) format provides a standard representation for macromolecular structure data derived from X-ray diffraction and NMR studies."); @@ -525,7 +525,7 @@ void PDBFormat::PDBParser::parseSequence(BioStruct3D& biostruct, U2OpStatus& ti) if (currentPDBLine.length() < 24 /* at least one residue */) { - ti.setError(U2::PDBFormat::tr("Invalid SEQRES: less then 24 charachters")); + ti.setError(U2::PDBFormat::tr("Invalid SEQRES: less then 24 characters")); return; } diff --git a/src/corelibs/U2Formats/src/PDBFormat.h b/src/corelibs/U2Formats/src/PDBFormat.h index 9802b45adc80983270c0eb89f81bcc3352600641..7fcbb08459ef222a4f633e4cc8afc803613dc11a 100644 --- a/src/corelibs/U2Formats/src/PDBFormat.h +++ b/src/corelibs/U2Formats/src/PDBFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -43,8 +43,6 @@ class U2FORMATS_EXPORT PDBFormat : public TextDocumentFormat { Q_OBJECT public: PDBFormat(QObject* p); - virtual DocumentFormatId getFormatId() const {return BaseDocumentFormats::PLAIN_PDB;} - virtual const QString& getFormatName() const {return formatName;} static int getElementNumberByName(const QByteArray& elementName); static char getAcronymByName(const QByteArray& name); @@ -57,8 +55,6 @@ protected: virtual Document* loadTextDocument(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& fs, U2OpStatus& os); private: - - QString formatName; static QHash<QByteArray,int> atomNumMap; static QHash<QByteArray, char> acronymNameMap; diff --git a/src/corelibs/U2Formats/src/PDWFormat.cpp b/src/corelibs/U2Formats/src/PDWFormat.cpp index bc0b0a978d1cb0bab97abb9decf1dc29d0452e80..acdeee427e5211c3b849bae44dff620f1b7429f8 100644 --- a/src/corelibs/U2Formats/src/PDWFormat.cpp +++ b/src/corelibs/U2Formats/src/PDWFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -52,7 +52,7 @@ namespace U2 { #define PDW_CIRCULAR_TAG "IScircular" PDWFormat::PDWFormat(QObject* p) -: TextDocumentFormat(p, DocumentFormatFlag(DocumentFormatFlag_LockedIfNotCreatedByUGENE), QStringList()<<"pdw") +: TextDocumentFormat(p, BaseDocumentFormats::PDW, DocumentFormatFlag(DocumentFormatFlag_LockedIfNotCreatedByUGENE), QStringList()<<"pdw") { formatName = tr("pDRAW"); formatDescription = tr("pDRAW is a sequence file format used by pDRAW software"); @@ -78,7 +78,7 @@ void PDWFormat::load(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& f CHECK_OP(os,); Q_UNUSED(opBlock); - QByteArray readBuff(READ_BUFF_SIZE+1, 0); + QByteArray readBuff(READ_BUFF_SIZE + 1, 0); char* buff = readBuff.data(); qint64 len = 0; @@ -93,9 +93,9 @@ void PDWFormat::load(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& f while (!os.isCoR()) { //read header len = io->readUntil(buff, READ_BUFF_SIZE, TextUtils::LINE_BREAKS, IOAdapter::Term_Include, &lineOk); - if (len == 0) { //end if stream - break; - } + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), ); + CHECK_BREAK(len != 0); + if (!lineOk) { os.setError(PDWFormat::tr("Line is too long")); } @@ -138,6 +138,8 @@ void PDWFormat::load(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& f } } else if (readBuff.startsWith(PDW_ANNOTATION_TAG)) { SharedAnnotationData a = parseAnnotation(io, os); + CHECK_OP(os, ); + annotations.append(a); } } @@ -150,7 +152,7 @@ void PDWFormat::load(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& f objects.append(annObj); } - CHECK_OP(os,); + CHECK_OP(os, ); CHECK_EXT(!objects.isEmpty(), os.setError(Document::tr("Document is empty.")),); } @@ -165,7 +167,7 @@ Document * PDWFormat::loadTextDocument(IOAdapter *io, const U2DbiRef &dbiRef, co CHECK_OP_EXT(os, qDeleteAll(objects), NULL); - QString lockReason(DocumentFormat::CREATED_NOT_BY_UGENE); + QString lockReason = QObject::tr("The document is created not by UGENE"); Document *doc = new Document(this, io->getFactory(), io->getURL(), dbiRef, objects, fs, lockReason); @@ -183,9 +185,9 @@ QByteArray PDWFormat::parseSequence(IOAdapter* io, U2OpStatus& ti) { while (!ti.isCoR()) { bool lineOk = false; qint64 len = io->readUntil(readBuff.data(), READ_BUFF_SIZE, TextUtils::LINE_BREAKS, IOAdapter::Term_Include, &lineOk); - if (len == 0) { - break; - } + CHECK_EXT(!io->hasError(), ti.setError(io->errorString()), QByteArray()); + CHECK_BREAK(len != 0);//end if stream + if (!lineOk) { ti.setError(PDWFormat::tr("Line is too long")); } @@ -226,11 +228,13 @@ SharedAnnotationData PDWFormat::parseAnnotation(IOAdapter *io, U2OpStatus &ti) { while (!ti.isCoR()) { bool lineOk = false; qint64 len = io->readUntil(readBuf.data(), READ_BUFF_SIZE, TextUtils::LINE_BREAKS, IOAdapter::Term_Include, &lineOk); + CHECK_EXT_BREAK(!io->hasError(), ti.setError(io->errorString())); if (!readBuf.startsWith(PDW_ANNOTATION_TAG)) { break; } else if (readBuf.startsWith(PDW_ANNOTATION_NUMBER)) { io->skip(-len); + CHECK_EXT_BREAK(!io->hasError(), ti.setError(io->errorString())); break; } else if (readBuf.startsWith(PDW_ANNOTATION_NAME)) { aName = readPdwValue(readBuf, PDW_ANNOTATION_NAME); @@ -245,7 +249,6 @@ SharedAnnotationData PDWFormat::parseAnnotation(IOAdapter *io, U2OpStatus &ti) { int orientVal = readPdwValue(readBuf, PDW_ANNOTATION_ORIENT).toInt(); cmpl = orientVal == 0 ? true : false; } - } SharedAnnotationData sd(new AnnotationData); diff --git a/src/corelibs/U2Formats/src/PDWFormat.h b/src/corelibs/U2Formats/src/PDWFormat.h index 89c6e75c3ea395f93db7fa79e68726c6290ae4ba..e25389be31b19d6b3cb3a97bc8c88682c8a7fe61 100644 --- a/src/corelibs/U2Formats/src/PDWFormat.h +++ b/src/corelibs/U2Formats/src/PDWFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -40,10 +40,6 @@ class U2FORMATS_EXPORT PDWFormat : public TextDocumentFormat { public: PDWFormat(QObject *p); - virtual DocumentFormatId getFormatId() const { return BaseDocumentFormats::PDW; } - - virtual const QString & getFormatName() const { return formatName; } - protected: virtual FormatCheckResult checkRawTextData(const QByteArray &rawData, const GUrl & = GUrl()) const; @@ -60,8 +56,6 @@ private: void load(IOAdapter *io, const U2DbiRef &ref, const QVariantMap &fs, const GUrl &docUrl, QList<GObject *> &objects, U2OpStatus &ti, U2SequenceObject *&dnaObj, AnnotationTableObject *&aObj); - - QString formatName; }; }//namespace diff --git a/src/corelibs/U2Formats/src/PhylipFormat.cpp b/src/corelibs/U2Formats/src/PhylipFormat.cpp index 42eb8427113c285d92aa7d608e318f5523ca699c..d012c6b8fb1261821dacd9b25f95777a764ba1d4 100644 --- a/src/corelibs/U2Formats/src/PhylipFormat.cpp +++ b/src/corelibs/U2Formats/src/PhylipFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -42,8 +42,8 @@ namespace U2 { // PhylipFormat -PhylipFormat::PhylipFormat(QObject *p) - : TextDocumentFormat(p, DocumentFormatFlags(DocumentFormatFlag_SupportWriting) | DocumentFormatFlag_OnlyOneObject, +PhylipFormat::PhylipFormat(QObject *p, const DocumentFormatId& id) + : TextDocumentFormat(p, id, DocumentFormatFlags(DocumentFormatFlag_SupportWriting) | DocumentFormatFlag_OnlyOneObject, QStringList() << "phy" << "ph"){ formatDescription = tr("PHYLIP multiple alignment format for phylogenetic applications."); supportedObjectTypes+=GObjectTypes::MULTIPLE_SEQUENCE_ALIGNMENT; @@ -116,7 +116,7 @@ const QBitArray& LINE_BREAKS = TextUtils::LINE_BREAKS; // PhylipSequentialFormat PhylipSequentialFormat::PhylipSequentialFormat(QObject *p) - : PhylipFormat(p) { + : PhylipFormat(p, BaseDocumentFormats::PHYLIP_SEQUENTIAL) { formatName = tr("PHYLIP Sequential"); } @@ -198,6 +198,7 @@ MultipleSequenceAlignment PhylipSequentialFormat::parse(IOAdapter *io, U2OpStatu // Header: "<number of species> <number of characters>" int len = io->readLine(buff, READ_BUFF_SIZE, &resOk); + CHECK_EXT(len != 0, os.setError(PhylipSequentialFormat::tr("Error parsing file")), MultipleSequenceAlignment()); CHECK_EXT(resOk, os.setError( PhylipSequentialFormat::tr("Illegal line")), MultipleSequenceAlignment()); QByteArray line = QByteArray(buff, len).trimmed(); @@ -211,13 +212,16 @@ MultipleSequenceAlignment PhylipSequentialFormat::parse(IOAdapter *io, U2OpStatu CHECK_EXT(!io->isEof(), os.setError( PhylipSequentialFormat::tr("There is not enough data")), MultipleSequenceAlignment()); // get name len = io->readBlock(buff, MAX_NAME_LEN); - QByteArray name = QByteArray(buff, len).trimmed(); - CHECK_EXT(len != 0, os.setError( PhylipSequentialFormat::tr("Error parsing file") ), MultipleSequenceAlignment()); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), MultipleSequenceAlignment()); + CHECK_EXT(len != 0, os.setError(PhylipSequentialFormat::tr("Error parsing file")), MultipleSequenceAlignment()); + QByteArray name = QByteArray(buff, len).trimmed(); // get sequence QByteArray value; while ((value.size() != numberOfCharacters) && (!io->isEof())) { len = io->readUntil(buff, READ_BUFF_SIZE, LINE_BREAKS, IOAdapter::Term_Skip, &resOk); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), MultipleSequenceAlignment()); + QByteArray line = QByteArray(buff, len); removeSpaces(line); value.append(line); @@ -234,7 +238,7 @@ MultipleSequenceAlignment PhylipSequentialFormat::parse(IOAdapter *io, U2OpStatu // PhylipInterleavedFormat PhylipInterleavedFormat::PhylipInterleavedFormat(QObject *p) - :PhylipFormat(p) { + :PhylipFormat(p, BaseDocumentFormats::PHYLIP_INTERLEAVED) { formatName = tr("PHYLIP Interleaved"); } @@ -333,7 +337,7 @@ MultipleSequenceAlignment PhylipInterleavedFormat::parse(IOAdapter *io, U2OpStat // First line: "<number of species> <number of characters>" int len = io->readLine(buff, READ_BUFF_SIZE, &resOk); - + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), MultipleSequenceAlignment()); CHECK_EXT(resOk, os.setError( PhylipInterleavedFormat::tr("Illegal line") ), MultipleSequenceAlignment()); QByteArray line = QByteArray(buff, len).trimmed(); @@ -347,6 +351,7 @@ MultipleSequenceAlignment PhylipInterleavedFormat::parse(IOAdapter *io, U2OpStat for (int i = 0; i < numberOfSpecies; i++) { CHECK_EXT(!io->isEof(), os.setError( PhylipSequentialFormat::tr("There is not enough data")), MultipleSequenceAlignment()); len = io->readBlock(buff, MAX_NAME_LEN); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), MultipleSequenceAlignment()); CHECK_EXT(len != 0, os.setError( PhylipFormat::tr("Error parsing file") ), MultipleSequenceAlignment()); QByteArray name = QByteArray(buff, len).trimmed(); @@ -354,7 +359,9 @@ MultipleSequenceAlignment PhylipInterleavedFormat::parse(IOAdapter *io, U2OpStat QByteArray value; do { len = io->readUntil(buff, READ_BUFF_SIZE, LINE_BREAKS, IOAdapter::Term_Skip, &resOk); - CHECK_EXT(len != 0, os.setError( PhylipSequentialFormat::tr("Error parsing file") ), MultipleSequenceAlignment()); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), MultipleSequenceAlignment()); + CHECK_EXT(len != 0, os.setError(PhylipSequentialFormat::tr("Error parsing file")), MultipleSequenceAlignment()); + value.append(QByteArray(buff, len)); } while (!resOk); @@ -372,6 +379,8 @@ MultipleSequenceAlignment PhylipInterleavedFormat::parse(IOAdapter *io, U2OpStat QByteArray value; do { len = io->readUntil(buff, READ_BUFF_SIZE, LINE_BREAKS, IOAdapter::Term_Skip, &resOk); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), MultipleSequenceAlignment()); + value.append(QByteArray(buff, len)); } while (!resOk && !io->isEof()); if (value.size() == 0) { @@ -394,6 +403,7 @@ MultipleSequenceAlignment PhylipInterleavedFormat::parse(IOAdapter *io, U2OpStat os.setProgress(io->getProgress()); currentLen += blockSize; } + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), MultipleSequenceAlignment()); CHECK_EXT(al->getLength() == numberOfCharacters, os.setError( PhylipInterleavedFormat::tr("Number of characters does not correspond to the stated number") ), MultipleSequenceAlignment()); return al; diff --git a/src/corelibs/U2Formats/src/PhylipFormat.h b/src/corelibs/U2Formats/src/PhylipFormat.h index 7271f841ed87d759122a29711eaba42263007a1e..ae91c26759ba418442100a2665dd71b54894dec2 100644 --- a/src/corelibs/U2Formats/src/PhylipFormat.h +++ b/src/corelibs/U2Formats/src/PhylipFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,7 +34,7 @@ namespace U2 { class U2FORMATS_EXPORT PhylipFormat : public TextDocumentFormat { Q_OBJECT public: - PhylipFormat(QObject *p); + PhylipFormat(QObject *p, const DocumentFormatId& id); virtual void storeDocument(Document* d, IOAdapter* io, U2OpStatus& os); protected: @@ -44,16 +44,12 @@ protected: virtual Document* loadTextDocument(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& fs, U2OpStatus& os); virtual MultipleSequenceAlignment parse(IOAdapter* io, U2OpStatus &os) const = 0; - - QString formatName; }; class U2FORMATS_EXPORT PhylipSequentialFormat : public PhylipFormat { Q_OBJECT public: PhylipSequentialFormat(QObject* p); - virtual DocumentFormatId getFormatId() const {return BaseDocumentFormats::PHYLIP_SEQUENTIAL;} - virtual const QString& getFormatName() const {return formatName;} virtual void storeEntry(IOAdapter *io, const QMap< GObjectType, QList<GObject*> > &objectsMap, U2OpStatus &os); protected: @@ -66,8 +62,6 @@ class U2FORMATS_EXPORT PhylipInterleavedFormat : public PhylipFormat { Q_OBJECT public: PhylipInterleavedFormat(QObject* p); - virtual DocumentFormatId getFormatId() const {return BaseDocumentFormats::PHYLIP_INTERLEAVED;} - virtual const QString& getFormatName() const {return formatName;} virtual void storeEntry(IOAdapter *io, const QMap< GObjectType, QList<GObject*> > &objectsMap, U2OpStatus &os); protected: diff --git a/src/corelibs/U2Formats/src/PlainTextFormat.cpp b/src/corelibs/U2Formats/src/PlainTextFormat.cpp index 0a7a5cb3c116a764efcf5c75e55ceb93d0bb6f9f..a1adf58847513ba1a1a5272dc8d81f226d632220 100644 --- a/src/corelibs/U2Formats/src/PlainTextFormat.cpp +++ b/src/corelibs/U2Formats/src/PlainTextFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,7 +33,7 @@ namespace U2 { /* TRANSLATOR U2::IOAdapter */ -PlainTextFormat::PlainTextFormat(QObject* p) : TextDocumentFormat(p, DocumentFormatFlags_W1, QStringList("txt")) { +PlainTextFormat::PlainTextFormat(QObject* p) : TextDocumentFormat(p, BaseDocumentFormats::PLAIN_TEXT, DocumentFormatFlags_W1, QStringList("txt")) { formatName = tr("Plain text"); supportedObjectTypes+=GObjectTypes::TEXT; formatDescription = tr("A simple plain text file."); @@ -54,16 +54,16 @@ Document* PlainTextFormat::loadTextDocument(IOAdapter* io, const U2DbiRef& dbiRe QByteArray block(BUFF_SIZE, '\0'); int blockLen = 0; while ((blockLen = io->readBlock(block.data(), BUFF_SIZE)) > 0) { + CHECK_EXT_BREAK(!io->hasError(), os.setError(io->errorString())); + int sizeBefore = text.length(); QString line = QString::fromLocal8Bit(block.data(), blockLen); text.append(line); - if (text.length() != sizeBefore + blockLen) { - os.setError(L10N::errorReadingFile(io->getURL())); - break; - } + CHECK_EXT_BREAK(text.length() == (sizeBefore + blockLen), os.setError(L10N::errorReadingFile(io->getURL()))); + os.setProgress(io->getProgress()); } - + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), NULL); CHECK_OP(os, NULL); //todo: check file-readonly status? diff --git a/src/corelibs/U2Formats/src/PlainTextFormat.h b/src/corelibs/U2Formats/src/PlainTextFormat.h index b2118d4bce730acec2658c460d089718b62a6f06..930ccc77d19a1103cc334acbcc1a97851882c586 100644 --- a/src/corelibs/U2Formats/src/PlainTextFormat.h +++ b/src/corelibs/U2Formats/src/PlainTextFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,10 +34,6 @@ class U2FORMATS_EXPORT PlainTextFormat : public TextDocumentFormat { public: PlainTextFormat(QObject* p); - virtual DocumentFormatId getFormatId() const {return BaseDocumentFormats::PLAIN_TEXT;} - - virtual const QString& getFormatName() const {return formatName;} - virtual void storeDocument(Document* d, IOAdapter* io, U2OpStatus& os); static void storeRawData(const QByteArray& data, U2OpStatus& ts, IOAdapter* io); @@ -45,9 +41,6 @@ protected: virtual FormatCheckResult checkRawTextData(const QByteArray& rawData, const GUrl& = GUrl()) const; virtual Document* loadTextDocument(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& fs, U2OpStatus& os); - -private: - QString formatName; }; }//namespace diff --git a/src/corelibs/U2Formats/src/RawDNASequenceFormat.cpp b/src/corelibs/U2Formats/src/RawDNASequenceFormat.cpp index f1406ea846d52ff4f29974ec520aa2cfecf99a5a..f451bba7c19940b538a7b31ff4bde9ddb95d9f69 100644 --- a/src/corelibs/U2Formats/src/RawDNASequenceFormat.cpp +++ b/src/corelibs/U2Formats/src/RawDNASequenceFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -41,7 +41,7 @@ namespace U2 { /* TRANSLATOR U2::RawDNASequenceFormat */ /* TRANSLATOR U2::IOAdapter */ -RawDNASequenceFormat::RawDNASequenceFormat(QObject* p) : TextDocumentFormat(p, DocumentFormatFlags_W1) { +RawDNASequenceFormat::RawDNASequenceFormat(QObject* p) : TextDocumentFormat(p, BaseDocumentFormats::RAW_DNA_SEQUENCE, DocumentFormatFlags_W1) { formatName = tr("Raw sequence"); fileExtensions << "seq" << "txt"; supportedObjectTypes+=GObjectTypes::SEQUENCE; @@ -89,46 +89,43 @@ static void load(IOAdapter* io, const U2DbiRef& dbiRef, QList<GObject*>& object while (ok && !io->isEof()) { int len = io->readLine(buff, DocumentFormat::READ_BUFF_SIZE, &terminatorFound); - if (len <= 0){ - continue; - } + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), ); + CHECK_CONTINUE(len > 0); seq.clear(); bool isSeek = writer.seek(0); - assert(isSeek); Q_UNUSED(isSeek); - if (os.isCoR()) { - break; - } + assert(isSeek); + Q_UNUSED(isSeek); + CHECK_OP_BREAK(os); - for (int i=0; i<len && ok; i++) { + for (int i = 0; i < len && ok; i++) { char c = buff[i]; if (ALPHAS[(uchar)c]) { ok = writer.putChar(c); } } - if(seq.size()>0 && isStarted == false ){ + if(seq.size() > 0 && isStarted == false ) { QString name = sequenceCounter == 0 ? seqName : seqName + QString("_%1").arg(sequenceCounter); isStarted = true; seqImporter.startSequence(os, dbiRef, folder, name, false); } - if(isStarted){ - seqImporter.addBlock(seq.data(),seq.size(),os); + if(isStarted) { + seqImporter.addBlock(seq.data(), seq.size(), os); } - if (seq.size()>0 && isStarted && terminatorFound && isSplit){ + if (seq.size()>0 && isStarted && terminatorFound && isSplit) { finishSequence(objects, io, os, dbiRef, fs, dbiObjects, seqImporter); sequenceCounter++; isStarted = false; } - if (os.isCoR()) { - break; - } + CHECK_OP_BREAK(os); + os.setProgress(io->getProgress()); } writer.close(); - CHECK_OP(os, ); + if (sequenceCounter == 0){ - CHECK_EXT(isStarted == true, os.setError(RawDNASequenceFormat::tr("Sequence is empty")), ); + CHECK_EXT(isStarted, os.setError(RawDNASequenceFormat::tr("Sequence is empty")), ); } if (isStarted){ finishSequence(objects, io, os, dbiRef, fs, dbiObjects, seqImporter); diff --git a/src/corelibs/U2Formats/src/RawDNASequenceFormat.h b/src/corelibs/U2Formats/src/RawDNASequenceFormat.h index 7ceec850c9334bc3c048d824cc42caedfea7d759..0b867fabcb642ae1f71df747eadeef052922491b 100644 --- a/src/corelibs/U2Formats/src/RawDNASequenceFormat.h +++ b/src/corelibs/U2Formats/src/RawDNASequenceFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,10 +34,6 @@ class U2FORMATS_EXPORT RawDNASequenceFormat : public TextDocumentFormat { public: RawDNASequenceFormat(QObject* p); - virtual DocumentFormatId getFormatId() const {return BaseDocumentFormats::RAW_DNA_SEQUENCE;} - - virtual const QString& getFormatName() const {return formatName;} - virtual void storeDocument(Document* d, IOAdapter* io, U2OpStatus& os); virtual bool isStreamingSupport() {return true;} @@ -48,9 +44,6 @@ protected: virtual FormatCheckResult checkRawTextData(const QByteArray& rawData, const GUrl& = GUrl()) const; virtual Document* loadTextDocument(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& fs, U2OpStatus& os); - -private: - QString formatName; }; }//namespace diff --git a/src/corelibs/U2Formats/src/SAMFormat.cpp b/src/corelibs/U2Formats/src/SAMFormat.cpp index 492b1b3aa59ab84a88d39ffaf07913a601da53d8..9efd6b651c8ceda8c4dfd808b987c6c9d5a37221 100644 --- a/src/corelibs/U2Formats/src/SAMFormat.cpp +++ b/src/corelibs/U2Formats/src/SAMFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -87,7 +87,7 @@ bool SAMFormat::validateField(int num, QByteArray &field, U2OpStatus *ti) { return true; } -SAMFormat::SAMFormat( QObject* p ): TextDocumentFormat(p, DocumentFormatFlags(DocumentFormatFlag_SupportWriting | DocumentFormatFlag_CannotBeCompressed), QStringList()<< "sam") +SAMFormat::SAMFormat( QObject* p ): TextDocumentFormat(p, BaseDocumentFormats::SAM, DocumentFormatFlags(DocumentFormatFlag_SupportWriting | DocumentFormatFlag_CannotBeCompressed), QStringList()<< "sam") { formatName = tr("SAM"); formatDescription = tr("The Sequence Alignment/Map (SAM) format is a generic alignment format for" diff --git a/src/corelibs/U2Formats/src/SAMFormat.h b/src/corelibs/U2Formats/src/SAMFormat.h index fd6e92b71458a7f4873f248a2b3e7e8e468dab7c..94f8b0483d9b732fd3a20a475235a5151a7d1f59 100644 --- a/src/corelibs/U2Formats/src/SAMFormat.h +++ b/src/corelibs/U2Formats/src/SAMFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -37,10 +37,6 @@ class U2FORMATS_EXPORT SAMFormat : public TextDocumentFormat { public: SAMFormat(QObject* p = NULL); - virtual DocumentFormatId getFormatId() const {return BaseDocumentFormats::SAM;} - - virtual const QString& getFormatName() const {return formatName;} - virtual void storeDocument(Document* d, IOAdapter* io, U2OpStatus& os); virtual void storeEntry(IOAdapter *io, const QMap< GObjectType, QList<GObject*> > &objectsMap, U2OpStatus &os); @@ -105,9 +101,7 @@ private: static const TAG_READ_GROUP_DESCRIPTION = "DS"; static const TAG_READ_GROUP_PLATFORM = "PU"; */ - - QString formatName; - bool skipDetection; +bool skipDetection; }; diff --git a/src/corelibs/U2Formats/src/SCFFormat.cpp b/src/corelibs/U2Formats/src/SCFFormat.cpp index 7faf5b91397547a694e6e6cf0e0c867480e2a986..b3278a398412f39e32e46cfc6a86c34c0ba80cf3 100644 --- a/src/corelibs/U2Formats/src/SCFFormat.cpp +++ b/src/corelibs/U2Formats/src/SCFFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -45,7 +45,7 @@ namespace U2 { -SCFFormat::SCFFormat(QObject* p) : DocumentFormat(p, DocumentFormatFlag_SupportStreaming, QStringList("scf")) { +SCFFormat::SCFFormat(QObject* p) : DocumentFormat(p, BaseDocumentFormats::SCF, DocumentFormatFlag_SupportStreaming, QStringList("scf")) { formatName = tr("SCF"); formatDescription = tr ("It is Standard Chromatogram Format"); supportedObjectTypes+=GObjectTypes::SEQUENCE; diff --git a/src/corelibs/U2Formats/src/SCFFormat.h b/src/corelibs/U2Formats/src/SCFFormat.h index 1f4460bc4198bccfb46b6fe36035493fb8198c35..714afdef4837347993c8c6514e11bb37c02e237e 100644 --- a/src/corelibs/U2Formats/src/SCFFormat.h +++ b/src/corelibs/U2Formats/src/SCFFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -38,10 +38,6 @@ class U2FORMATS_EXPORT SCFFormat : public DocumentFormat { public: SCFFormat(QObject* p); - virtual DocumentFormatId getFormatId() const {return BaseDocumentFormats::SCF;} - - virtual const QString& getFormatName() const {return formatName;} - virtual FormatCheckResult checkRawData(const QByteArray& rawData, const GUrl& = GUrl()) const; static void exportDocumentToSCF(const QString& fileName, const DNAChromatogram& cd, const QByteArray& seq, U2OpStatus& ts); @@ -55,8 +51,6 @@ private: Document* parseSCF(const U2DbiRef& dbiRef, IOAdapter* io, const QVariantMap& fs, U2OpStatus& os); bool loadSCFObjects( IOAdapter* io, DNASequence& dna, DNAChromatogram& cd, U2OpStatus& os ); - - QString formatName; }; }//namespace diff --git a/src/corelibs/U2Formats/src/SNPDatabaseUtils.cpp b/src/corelibs/U2Formats/src/SNPDatabaseUtils.cpp index e4d8d67f8731e2446bffb1794fe30d7f1aaf6a7a..18f0d28f9986dffafb03ceb1457a1f290a1ec43a 100644 --- a/src/corelibs/U2Formats/src/SNPDatabaseUtils.cpp +++ b/src/corelibs/U2Formats/src/SNPDatabaseUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/SNPDatabaseUtils.h b/src/corelibs/U2Formats/src/SNPDatabaseUtils.h index f8dd1292c445cd2495b08d2f04ac8e5c69cf5ce1..b788b7f05335ca4deb30f73494bfc394d8a08a5a 100644 --- a/src/corelibs/U2Formats/src/SNPDatabaseUtils.h +++ b/src/corelibs/U2Formats/src/SNPDatabaseUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/SimpleSNPVariationFormat.cpp b/src/corelibs/U2Formats/src/SimpleSNPVariationFormat.cpp index d5ad3de35e844d4e3a60beccd282730009817da8..61a029293d5120bf9978c22a5af2797291cba730 100644 --- a/src/corelibs/U2Formats/src/SimpleSNPVariationFormat.cpp +++ b/src/corelibs/U2Formats/src/SimpleSNPVariationFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,7 +24,7 @@ namespace U2 { SimpleSNPVariationFormat::SimpleSNPVariationFormat(QObject *p) -: AbstractVariationFormat(p, QStringList()<<"snp") +: AbstractVariationFormat(p, BaseDocumentFormats::SNP, QStringList()<<"snp") { formatName = QString("SimpleSNP"); diff --git a/src/corelibs/U2Formats/src/SimpleSNPVariationFormat.h b/src/corelibs/U2Formats/src/SimpleSNPVariationFormat.h index 41f01f700432249d60d15d64dc81ae63e5155668..94da892e6c6e9f6e3f5b4ee743cd7699875bfafb 100644 --- a/src/corelibs/U2Formats/src/SimpleSNPVariationFormat.h +++ b/src/corelibs/U2Formats/src/SimpleSNPVariationFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,8 +32,6 @@ class U2FORMATS_EXPORT SimpleSNPVariationFormat : public AbstractVariationFormat public: SimpleSNPVariationFormat(QObject *p); - virtual DocumentFormatId getFormatId() const {return BaseDocumentFormats::SNP;} - protected: virtual bool checkFormatByColumnCount(int columnCount) const; }; diff --git a/src/corelibs/U2Formats/src/StdResidueDictionary.cpp b/src/corelibs/U2Formats/src/StdResidueDictionary.cpp index c8eb0d73037b3f5a75c009424d9702e4db9b54bc..17f6ea91087ec0989d086b852dfa5de42e8bdbd3 100644 --- a/src/corelibs/U2Formats/src/StdResidueDictionary.cpp +++ b/src/corelibs/U2Formats/src/StdResidueDictionary.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/StdResidueDictionary.h b/src/corelibs/U2Formats/src/StdResidueDictionary.h index afba1df42cac3ec831181c236cb5343c38e3bfd4..ddd5af280d680ab9946737413727a71674871390 100644 --- a/src/corelibs/U2Formats/src/StdResidueDictionary.h +++ b/src/corelibs/U2Formats/src/StdResidueDictionary.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/StockholmFormat.cpp b/src/corelibs/U2Formats/src/StockholmFormat.cpp index a5e7056a7864d59f9c970f8264736732b4b0c37c..bf18f767a3bfd298904bf88a753a68f39004b94c 100644 --- a/src/corelibs/U2Formats/src/StockholmFormat.cpp +++ b/src/corelibs/U2Formats/src/StockholmFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -287,129 +287,163 @@ static bool checkHeader( const char* data, int sz ) { } //returns true if the line was skipped -static bool skipCommentOrMarkup( IOAdapter* io, AnnotationBank& ann_bank ) { - assert( NULL != io ); +static bool skipCommentOrMarkup(IOAdapter* io, U2OpStatus& os, AnnotationBank& ann_bank) { + assert(NULL != io); - QByteArray buf( BUF_SZ, TERM_SYM ); + QByteArray buf(BUF_SZ, TERM_SYM); bool term_there = false; - int ret = io->readUntil( buf.data(), BUF_SZ, TextUtils::LINE_BREAKS, IOAdapter::Term_Exclude, &term_there ); + int ret = io->readUntil(buf.data(), BUF_SZ, TextUtils::LINE_BREAKS, IOAdapter::Term_Exclude, &term_there); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), false); - checkValThrowException<int>( false, -1, ret, StockholmFormat::ReadError(io->getURL()) ); - if ( COMMENT_OR_MARKUP_LINE == buf[0] ) { + checkValThrowException<int>(false, -1, ret, StockholmFormat::ReadError(io->getURL())); + if (COMMENT_OR_MARKUP_LINE == buf[0]) { QByteArray line; - line.append( QByteArray( buf.data(), ret ) ); - while ( !term_there ) { - ret = io->readUntil( buf.data(), BUF_SZ, TextUtils::LINE_BREAKS, IOAdapter::Term_Exclude, &term_there ); + line.append(QByteArray(buf.data(), ret)); + while (!term_there) { + ret = io->readUntil(buf.data(), BUF_SZ, TextUtils::LINE_BREAKS, IOAdapter::Term_Exclude, &term_there); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), false); + checkValThrowException<int>( false, -1, ret,StockholmFormat::ReadError(io->getURL()) ); - if ( NO_BYTES == ret ) { - break; - } - line.append( QByteArray( buf.data(), ret ) ); + CHECK_BREAK(NO_BYTES != ret); + + line.append(QByteArray(buf.data(), ret)); } - ann_bank.addAnnotation( getAnnotation( line ) ); + ann_bank.addAnnotation(getAnnotation(line)); return true; } io->skip( -ret ); + if (io->hasError()) { + os.setError(io->errorString()); + } return false; } -static void skipBlankLines( IOAdapter* io, QByteArray* lines = NULL ) { - assert( NULL != io ); +static void skipBlankLines(IOAdapter* io, U2OpStatus& os, QByteArray* lines = NULL) { + assert(NULL != io); char c = 0; bool work = true; while ( work ) { int ret = io->readBlock( &c, 1 ); - checkValThrowException<int>( false, -1, ret, StockholmFormat::ReadError(io->getURL()) ); - if ( NO_BYTES == ret ) { - return; - } + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), ); + + checkValThrowException<int>(false, -1, ret, StockholmFormat::ReadError(io->getURL())); + CHECK(ret != NO_BYTES, ); + work = TextUtils::LINE_BREAKS[(uchar)c] || TextUtils::WHITES[(uchar)c]; if ( lines && TextUtils::LINE_BREAKS[(uchar)c] ) { lines->append( c ); } } - io->skip( -1 ); + io->skip(-1); + if (io->hasError()) { + os.setError(io->errorString()); + } } //skips all that it can -static void skipMany( IOAdapter* io, AnnotationBank& ann_bank ) { - assert( NULL != io ); +static void skipMany(IOAdapter* io, U2OpStatus& os, AnnotationBank& ann_bank) { + assert(NULL != io); char c = 0; while ( 1 ) { - bool ret = io->getChar( &c ); + bool ret = io->getChar(&c); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), ); + checkValThrowException<bool>( false, false, ret, StockholmFormat::ReadError(io->getURL()) ); - if ( COMMENT_OR_MARKUP_LINE == c ) { + if (COMMENT_OR_MARKUP_LINE == c) { io->skip( -1 ); - skipCommentOrMarkup( io, ann_bank ); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), ); + + skipCommentOrMarkup(io, os, ann_bank); + CHECK_OP(os, ); + continue; } - else if ( TextUtils::LINE_BREAKS[(uchar)c] || TextUtils::WHITES[(uchar)c] ) { - skipBlankLines( io ); + else if (TextUtils::LINE_BREAKS[(uchar)c] || TextUtils::WHITES[(uchar)c]) { + skipBlankLines(io, os); + CHECK_OP(os, ); + continue; } - io->skip( -1 ); + io->skip(-1); + if (io->hasError()) { + os.setError(io->errorString()); + } break; } } -static bool eofMsa( IOAdapter* io ) { - assert( NULL != io ); +static bool eofMsa(IOAdapter* io, U2OpStatus& os) { + assert(NULL != io); QByteArray buf( SMALL_BUF_SZ, TERM_SYM ); int ret = io->readUntil( buf.data(), SMALL_BUF_SZ, TextUtils::LINE_BREAKS, IOAdapter::Term_Include ); - checkValThrowException( false, -1, ret, StockholmFormat::ReadError(io->getURL()) ); - io->skip( -ret ); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), false); + + checkValThrowException(false, -1, ret, StockholmFormat::ReadError(io->getURL())); + io->skip(-ret); + if (io->hasError()) { + os.setError(io->errorString()); + } return EOF_STR == QByteArray( buf.data(), ret ).trimmed(); } -static void readEofMsa( IOAdapter* io ) { - assert( eofMsa( io ) ); +static void readEofMsa(IOAdapter* io, U2OpStatus& os) { + assert(eofMsa(io, os)); + CHECK_OP(os, ); + QByteArray buf( SMALL_BUF_SZ, TERM_SYM ); int ret = io->readUntil( buf.data(), SMALL_BUF_SZ, TextUtils::LINE_BREAKS, IOAdapter::Term_Include ); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), ); + checkValThrowException( false, -1, ret, StockholmFormat::ReadError(io->getURL()) ); } //returns end of sequence name in line -static int getLine( IOAdapter* io, QByteArray& to ) { +static int getLine( IOAdapter* io, U2OpStatus& os, QByteArray& to ) { assert( NULL != io ); QByteArray buf( BUF_SZ, TERM_SYM ); bool there = false; - while ( !there ) { + while (!there) { int ret = io->readUntil( buf.data(), BUF_SZ, TextUtils::LINE_BREAKS, IOAdapter::Term_Exclude, &there ); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), 0); + checkValThrowException<int>( false, -1, ret, StockholmFormat::ReadError(io->getURL()) ); - if( NO_BYTES == ret ) { - break; - } + CHECK_BREAK(ret != NO_BYTES); + to.append( QByteArray( buf.data(), ret ) ); } int sz = to.size(); int i = 0; for ( i = 0; i < sz; ++i ) { - if ( TextUtils::WHITES[(uchar)to[i]] ) { + if (TextUtils::WHITES[(uchar)to[i]]) { break; } } return i; } -static bool blockEnded( IOAdapter* io ) { +static bool blockEnded(IOAdapter* io, U2OpStatus& os) { assert( NULL != io ); QByteArray lines; - skipBlankLines( io, &lines ); - if ( eofMsa( io ) ) { + skipBlankLines(io, os, &lines); + CHECK_OP(os, false); + + if (eofMsa(io, os)) { + CHECK_OP(os, false); + return true; } int nl_count = 0; int lines_sz = lines.size(); - for( int i = 0; i < lines_sz; ++i ) { - nl_count = ( NEW_LINE == lines[i] )? nl_count + 1: nl_count; + for (int i = 0; i < lines_sz; ++i) { + nl_count = (NEW_LINE == lines[i]) ? nl_count + 1 : nl_count; } return 1 < nl_count; } @@ -444,8 +478,12 @@ static bool loadOneMsa( IOAdapter* io, U2OpStatus& tsi, MultipleSequenceAlignmen int ret = 0; //skip header - skipBlankLines( io ); + skipBlankLines(io, tsi); + CHECK_OP(tsi, false); + ret = io->readUntil( buf.data(), BUF_SZ, TextUtils::LINE_BREAKS, IOAdapter::Term_Exclude ); + CHECK_EXT(!io->hasError(), tsi.setError(io->errorString()), false); + checkValThrowException<int>( false, -1, ret, StockholmFormat::ReadError(io->getURL()) ); if ( !checkHeader( buf.data(), ret ) ) { throw StockholmFormat::BadFileData( StockholmFormat::tr( "invalid file: bad header line" ) ); @@ -454,35 +492,41 @@ static bool loadOneMsa( IOAdapter* io, U2OpStatus& tsi, MultipleSequenceAlignmen //read blocks bool firstBlock = true; while ( 1 ) { - if( tsi.isCoR()) { - return false; - } - skipMany( io, ann_bank ); - if ( eofMsa( io ) ) { + CHECK_OP(tsi, false); + + skipMany(io, tsi, ann_bank); + CHECK_OP(tsi, false); + + if (eofMsa(io, tsi)) { break; } + CHECK_OP(tsi, false); bool hasSeqs = true; int seq_ind = 0; int blockSize = -1; - while ( hasSeqs ) { + while (hasSeqs) { QByteArray line; - int name_end = getLine( io, line ); - QByteArray name = line.left( name_end ); - QByteArray seq = line.mid( name_end + 1 ).trimmed(); + int name_end = getLine(io, tsi, line); + CHECK_OP(tsi, false); + + QByteArray name = line.left(name_end); + QByteArray seq = line.mid(name_end + 1).trimmed(); + + if (name.startsWith(COMMENT_OR_MARKUP_LINE)) { + ann_bank.addAnnotation(getAnnotation(line)); + hasSeqs = !blockEnded(io, tsi); + CHECK_OP(tsi, false); - if ( name.startsWith( COMMENT_OR_MARKUP_LINE ) ) { - ann_bank.addAnnotation( getAnnotation( line ) ); - hasSeqs = !blockEnded( io ); tsi.setProgress(io->getProgress()); continue; } - changeGaps( seq ); - if ( firstBlock ) { - if ( EMPTY_STR == name ) { + changeGaps(seq); + if (firstBlock) { + if (EMPTY_STR == name) { throw StockholmFormat::BadFileData( StockholmFormat::tr( "invalid file: empty sequence name" ) ); } - if ( nameWasBefore( msa, QString( name.data() ) ) ) { + if (nameWasBefore(msa, QString( name.data()))) { throw StockholmFormat::BadFileData( StockholmFormat::tr( "invalid file: equal sequence names in one block" ) ); } @@ -505,14 +549,19 @@ static bool loadOneMsa( IOAdapter* io, U2OpStatus& tsi, MultipleSequenceAlignmen } } seq_ind++; - hasSeqs = !blockEnded( io ); + hasSeqs = !blockEnded(io, tsi); + CHECK_OP(tsi, false); + tsi.setProgress(io->getProgress()); } firstBlock = false; currentLen += blockSize; }// while( 1 ) - readEofMsa( io ); - skipBlankLines( io ); + readEofMsa(io, tsi); + CHECK_OP(tsi, false); + + skipBlankLines(io, tsi); + CHECK_OP(tsi, false); if ( msa->getNumRows() == 0 ) { throw StockholmFormat::BadFileData( StockholmFormat::tr( "invalid file: empty sequence alignment" ) ); @@ -524,8 +573,8 @@ static bool loadOneMsa( IOAdapter* io, U2OpStatus& tsi, MultipleSequenceAlignmen return true; } -static void setMsaInfoCutoffs( QVariantMap& info, const QString& string, MultipleAlignmentInfo::Cutoffs cof1, - MultipleAlignmentInfo::Cutoffs cof2 ) { +static void setMsaInfoCutoffs(QVariantMap& info, const QString& string, MultipleAlignmentInfo::Cutoffs cof1, + MultipleAlignmentInfo::Cutoffs cof2) { QByteArray str = string.toLatin1(); QTextStream txtStream( str ); float val1 = .0f; @@ -535,37 +584,37 @@ static void setMsaInfoCutoffs( QVariantMap& info, const QString& string, Multipl MultipleAlignmentInfo::setCutoff( info, cof2, val2 ); } -static void setMsaInfo( const QHash< QString, QString>& annMap, MultipleSequenceAlignment& ma ) { +static void setMsaInfo(const QHash< QString, QString>& annMap, MultipleSequenceAlignment& ma) { QVariantMap info = ma->getInfo(); - if (annMap.contains( StockholmFormat::FILE_ANNOTATION_AC ) ) { - MultipleAlignmentInfo::setAccession( info, annMap[StockholmFormat::FILE_ANNOTATION_AC] ); + if (annMap.contains(StockholmFormat::FILE_ANNOTATION_AC)) { + MultipleAlignmentInfo::setAccession( info, annMap[StockholmFormat::FILE_ANNOTATION_AC]); } - if (annMap.contains( StockholmFormat::FILE_ANNOTATION_DE ) ) { - MultipleAlignmentInfo::setDescription( info, annMap[StockholmFormat::FILE_ANNOTATION_DE] ); + if (annMap.contains(StockholmFormat::FILE_ANNOTATION_DE)) { + MultipleAlignmentInfo::setDescription( info, annMap[StockholmFormat::FILE_ANNOTATION_DE]); } - if (annMap.contains( StockholmFormat::COLUMN_ANNOTATION_SS_CONS ) ) { - MultipleAlignmentInfo::setSSConsensus( info, annMap[StockholmFormat::COLUMN_ANNOTATION_SS_CONS] ); + if (annMap.contains(StockholmFormat::COLUMN_ANNOTATION_SS_CONS)) { + MultipleAlignmentInfo::setSSConsensus( info, annMap[StockholmFormat::COLUMN_ANNOTATION_SS_CONS]); } - if (annMap.contains( StockholmFormat::COLUMN_ANNOTATION_RF ) ) { - MultipleAlignmentInfo::setReferenceLine( info, annMap[StockholmFormat::COLUMN_ANNOTATION_RF] ); + if (annMap.contains(StockholmFormat::COLUMN_ANNOTATION_RF)) { + MultipleAlignmentInfo::setReferenceLine( info, annMap[StockholmFormat::COLUMN_ANNOTATION_RF]); } - if (annMap.contains( StockholmFormat::FILE_ANNOTATION_GA ) ) { - setMsaInfoCutoffs( info, annMap[StockholmFormat::FILE_ANNOTATION_GA], MultipleAlignmentInfo::CUTOFF_GA1, - MultipleAlignmentInfo::CUTOFF_GA2 ); + if (annMap.contains(StockholmFormat::FILE_ANNOTATION_GA)) { + setMsaInfoCutoffs(info, annMap[StockholmFormat::FILE_ANNOTATION_GA], MultipleAlignmentInfo::CUTOFF_GA1, + MultipleAlignmentInfo::CUTOFF_GA2); } - if (annMap.contains( StockholmFormat::FILE_ANNOTATION_NC ) ) { - setMsaInfoCutoffs( info, annMap[StockholmFormat::FILE_ANNOTATION_NC], MultipleAlignmentInfo::CUTOFF_NC1, - MultipleAlignmentInfo::CUTOFF_NC2 ); + if (annMap.contains(StockholmFormat::FILE_ANNOTATION_NC)) { + setMsaInfoCutoffs(info, annMap[StockholmFormat::FILE_ANNOTATION_NC], MultipleAlignmentInfo::CUTOFF_NC1, + MultipleAlignmentInfo::CUTOFF_NC2); } - if (annMap.contains( StockholmFormat::FILE_ANNOTATION_TC ) ) { - setMsaInfoCutoffs( info, annMap[StockholmFormat::FILE_ANNOTATION_TC], MultipleAlignmentInfo::CUTOFF_TC1, - MultipleAlignmentInfo::CUTOFF_TC2 ); + if (annMap.contains(StockholmFormat::FILE_ANNOTATION_TC)) { + setMsaInfoCutoffs(info, annMap[StockholmFormat::FILE_ANNOTATION_TC], MultipleAlignmentInfo::CUTOFF_TC1, + MultipleAlignmentInfo::CUTOFF_TC2); } ma->setInfo(info); } -static void load( IOAdapter* io, const U2DbiRef& dbiRef, QList<GObject*>& l, const QVariantMap& fs, U2OpStatus& tsi, bool& uni_file) { +static void load(IOAdapter* io, const U2DbiRef& dbiRef, QList<GObject*>& l, const QVariantMap& fs, U2OpStatus& tsi, bool& uni_file) { QStringList names_list; QString filename = io->getURL().baseFileName(); while( !io->isEof() ) { @@ -576,24 +625,25 @@ static void load( IOAdapter* io, const U2DbiRef& dbiRef, QList<GObject*>& l, con QHash< QString, QString > annMap; notCanceled = loadOneMsa( io, tsi, msa, ann_bank ); - if( !notCanceled ) { - break; - } + CHECK_OP(tsi, ); + CHECK_BREAK(notCanceled); + uni_file = uni_file || isUniFile( ann_bank ); name = getMsaName( ann_bank ); - name = ( QString::null == name || names_list.contains( name ) )? - filename + "_" + QString::number( l.size() ): name; - names_list.append( name ); - msa->setName( name ); + name = (QString::null == name || names_list.contains(name))? + filename + "_" + QString::number(l.size()): name; + names_list.append(name); + msa->setName(name); - annMap = getAnnotationMap( ann_bank ); - setMsaInfo( annMap, msa ); + annMap = getAnnotationMap(ann_bank); + setMsaInfo(annMap, msa); U2OpStatus2Log os; const QString folder = fs.value(DocumentFormat::DBI_FOLDER_HINT, U2ObjectDbi::ROOT_FOLDER).toString(); MultipleSequenceAlignmentObject* obj = MultipleSequenceAlignmentImporter::createAlignment(dbiRef, folder, msa, os); CHECK_OP(os, ); + obj->setIndexInfo(annMap); l.append( obj ); } @@ -673,8 +723,8 @@ static void save( IOAdapter* io, const MultipleSequenceAlignment& msa, QString n } namespace U2 { -StockholmFormat::StockholmFormat( QObject *obj ) : TextDocumentFormat( obj , DocumentFormatFlags(DocumentFormatFlag_SupportWriting) | DocumentFormatFlag_OnlyOneObject | DocumentFormatFlag_LockedIfNotCreatedByUGENE, QStringList() << "sto") { - format_name = tr( "Stockholm" ); +StockholmFormat::StockholmFormat( QObject *obj ) : TextDocumentFormat(obj, BaseDocumentFormats::STOCKHOLM, DocumentFormatFlags(DocumentFormatFlag_SupportWriting) | DocumentFormatFlag_OnlyOneObject | DocumentFormatFlag_LockedIfNotCreatedByUGENE, QStringList() << "sto") { + formatName = tr("Stockholm"); formatDescription = tr("A multiple sequence alignments file format"); supportedObjectTypes+=GObjectTypes::MULTIPLE_SEQUENCE_ALIGNMENT; } @@ -688,7 +738,7 @@ Document* StockholmFormat::loadTextDocument(IOAdapter* io, const U2DbiRef& dbiRe QString lockReason; load( io, dbiRef, objects, fs, os, uniFile); if ( !uniFile ) { - lockReason = DocumentFormat::CREATED_NOT_BY_UGENE; + lockReason = QObject::tr("The document is created not by UGENE"); } return new Document( this, io->getFactory(), io->getURL(), dbiRef, objects, fs, lockReason ); } diff --git a/src/corelibs/U2Formats/src/StockholmFormat.h b/src/corelibs/U2Formats/src/StockholmFormat.h index 48b1f26b09b6eb0317ac10f533e7b4b466d9d58b..9ef9848bbd28cc6dea702baae616e59343439986 100644 --- a/src/corelibs/U2Formats/src/StockholmFormat.h +++ b/src/corelibs/U2Formats/src/StockholmFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -46,20 +46,9 @@ public: static const QByteArray COLUMN_ANNOTATION_RF; static const QByteArray UNI_ANNOTATION_MARK; -private: - QString format_name; - public: StockholmFormat( QObject* obj ); - virtual DocumentFormatId getFormatId() const { - return BaseDocumentFormats::STOCKHOLM; - } - - virtual const QString& getFormatName() const { - return format_name; - } - virtual void storeDocument(Document* d, IOAdapter* io, U2OpStatus& os); virtual bool isObjectOpSupported( const Document* d , DocumentFormat::DocObjectOp op, GObjectType t ) const; diff --git a/src/corelibs/U2Formats/src/StreamSequenceReader.cpp b/src/corelibs/U2Formats/src/StreamSequenceReader.cpp index 591e6d4eaf109c0c37e54d92fa6f91734fe8ff51..ceef792ab0948e6b587785a801db0a8a987968b5 100644 --- a/src/corelibs/U2Formats/src/StreamSequenceReader.cpp +++ b/src/corelibs/U2Formats/src/StreamSequenceReader.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,6 +24,7 @@ #include <U2Core/DocumentUtils.h> #include <U2Core/IOAdapter.h> #include <U2Core/IOAdapterUtils.h> +#include <U2Core/U2SafePoints.h> #include <U2Core/Timer.h> #include "StreamSequenceReader.h" @@ -40,7 +41,7 @@ DNASequence* StreamSequenceReader::getNextSequenceObject() { } StreamSequenceReader::StreamSequenceReader() -: currentReaderIndex(-1), currentSeq(NULL), errorOccured(false), lookupPerformed(false) +: currentReaderIndex(-1), currentSeq(NULL), lookupPerformed(false) { } @@ -58,6 +59,9 @@ bool StreamSequenceReader::hasNext() { while (currentReaderIndex < readers.count()) { ReaderContext ctx = readers.at(currentReaderIndex); DNASequence *newSeq = ctx.format->loadSequence(ctx.io, taskInfo); + if (taskInfo.hasError()) { + errorMessage = taskInfo.getError(); + } currentSeq.reset(newSeq); if (NULL == newSeq) { ++currentReaderIndex; @@ -159,4 +163,23 @@ StreamSequenceReader::~StreamSequenceReader() { } } +int StreamSequenceReader::getNumberOfSequences(const QString& url, U2OpStatus& os) { + int result = 0; + StreamSequenceReader streamSequenceReader; + bool wasInitialized = streamSequenceReader.init(QStringList() << url); + CHECK_EXT(wasInitialized, + os.setError(streamSequenceReader.getErrorMessage()), + -1); + + while (streamSequenceReader.hasNext()) { + streamSequenceReader.getNextSequenceObject(); + result++; + } + CHECK_EXT(!streamSequenceReader.hasError(), + os.setError(streamSequenceReader.getErrorMessage()), + -1); + + return result; +} + } //namespace diff --git a/src/corelibs/U2Formats/src/StreamSequenceReader.h b/src/corelibs/U2Formats/src/StreamSequenceReader.h index 6ea4d5eb624ce3a9a4aabec1738700e7ecbc8015..57749b2ce69b27d4eba470eff631b3ff2018438e 100644 --- a/src/corelibs/U2Formats/src/StreamSequenceReader.h +++ b/src/corelibs/U2Formats/src/StreamSequenceReader.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -56,7 +56,6 @@ class U2FORMATS_EXPORT StreamSequenceReader : public QObject { QList<ReaderContext> readers; int currentReaderIndex; QScopedPointer<DNASequence> currentSeq; - bool errorOccured; bool lookupPerformed; QString errorMessage; TaskStateInfo taskInfo; @@ -72,10 +71,12 @@ public: DocumentFormat* getFormat() const; bool hasNext(); - bool hasError() { return errorOccured; } + bool hasError() { return !errorMessage.isEmpty(); } int getProgress(); QString getErrorMessage(); DNASequence* getNextSequenceObject(); + + static int getNumberOfSequences(const QString& url, U2OpStatus& os); }; diff --git a/src/corelibs/U2Formats/src/StreamSequenceWriter.cpp b/src/corelibs/U2Formats/src/StreamSequenceWriter.cpp index a0dd2f6705dc13660f651d602732e44a71678028..255f5bb0facdc81aa1d6981adab4d7cf4a158526 100644 --- a/src/corelibs/U2Formats/src/StreamSequenceWriter.cpp +++ b/src/corelibs/U2Formats/src/StreamSequenceWriter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/StreamSequenceWriter.h b/src/corelibs/U2Formats/src/StreamSequenceWriter.h index 2a6ef7f8e9059e160cb37df8f48e2fc7fde75512..740cd56cc5792fe7de94b03a709e98b84734a4a4 100644 --- a/src/corelibs/U2Formats/src/StreamSequenceWriter.h +++ b/src/corelibs/U2Formats/src/StreamSequenceWriter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/SwissProtPlainTextFormat.cpp b/src/corelibs/U2Formats/src/SwissProtPlainTextFormat.cpp index 9201c706f206aed1647d6cd8a83c776296c730b7..fce19623cc4826d5c6172d6d92bd169bc400c669 100644 --- a/src/corelibs/U2Formats/src/SwissProtPlainTextFormat.cpp +++ b/src/corelibs/U2Formats/src/SwissProtPlainTextFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/SwissProtPlainTextFormat.h b/src/corelibs/U2Formats/src/SwissProtPlainTextFormat.h index 5917dc96bd900979b17f176329a310a692f028fc..2489da0a479266e9be8f9065ec63c59908fe6723 100644 --- a/src/corelibs/U2Formats/src/SwissProtPlainTextFormat.h +++ b/src/corelibs/U2Formats/src/SwissProtPlainTextFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/TextDocumentFormat.cpp b/src/corelibs/U2Formats/src/TextDocumentFormat.cpp index 038809c26b2185484e00c7b599aa8772200c9b11..d2a2fc36eef7e8742ae85e84d06274f486e3e363 100644 --- a/src/corelibs/U2Formats/src/TextDocumentFormat.cpp +++ b/src/corelibs/U2Formats/src/TextDocumentFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -27,7 +27,7 @@ namespace U2 { -TextDocumentFormat::TextDocumentFormat(QObject* p, DocumentFormatFlags _flags, const QStringList& fileExts) : DocumentFormat(p, _flags, fileExts) {} +TextDocumentFormat::TextDocumentFormat(QObject* p, const DocumentFormatId& id, DocumentFormatFlags _flags, const QStringList& fileExts) : DocumentFormat(p, id, _flags, fileExts) {} DNASequence* TextDocumentFormat::loadSequence(IOAdapter* io, U2OpStatus& ti) { io->setFormatMode(IOAdapter::TextMode); @@ -37,7 +37,10 @@ DNASequence* TextDocumentFormat::loadSequence(IOAdapter* io, U2OpStatus& ti) { } FormatCheckResult TextDocumentFormat::checkRawData(const QByteArray& rawData, const GUrl& url) const { - QByteArray cuttedRawData = TextUtils::cutByteOrderMarks(rawData); + QString error; + QByteArray cuttedRawData = TextUtils::cutByteOrderMarks(rawData, error); + CHECK(error.isEmpty(), FormatDetection_NotMatched); + FormatCheckResult checkResult = checkRawTextData(cuttedRawData, url); return checkResult; diff --git a/src/corelibs/U2Formats/src/TextDocumentFormat.h b/src/corelibs/U2Formats/src/TextDocumentFormat.h index f40f1c13ae97b9931bf3da1ddea852244d535fea..182e06dfa4304953118d76bbf064328d5d6cfb96 100644 --- a/src/corelibs/U2Formats/src/TextDocumentFormat.h +++ b/src/corelibs/U2Formats/src/TextDocumentFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ namespace U2 { /* Base class for all non binary document formats that can be opened in a usual text editor. */ class U2FORMATS_EXPORT TextDocumentFormat : public DocumentFormat { public: - TextDocumentFormat(QObject* p, DocumentFormatFlags _flags, const QStringList& fileExts = QStringList()); + TextDocumentFormat(QObject* p, const DocumentFormatId& id, DocumentFormatFlags _flags, const QStringList& fileExts = QStringList()); virtual FormatCheckResult checkRawData(const QByteArray& rawData, const GUrl& = GUrl()) const; protected: diff --git a/src/corelibs/U2Formats/src/VCF4VariationFormat.cpp b/src/corelibs/U2Formats/src/VCF4VariationFormat.cpp index 813b1f0bddbf6e9aec17a5b9a4c582aa9061a5b5..f7f6900921d1d8a30716e6dbad51bb627fbca123 100644 --- a/src/corelibs/U2Formats/src/VCF4VariationFormat.cpp +++ b/src/corelibs/U2Formats/src/VCF4VariationFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,7 +24,7 @@ namespace U2 { VCF4VariationFormat::VCF4VariationFormat(QObject *p) -: AbstractVariationFormat(p, QStringList()<<"vcf", true) +: AbstractVariationFormat(p, BaseDocumentFormats::VCF4, QStringList()<<"vcf", true) { formatName = QString("VCFv4"); diff --git a/src/corelibs/U2Formats/src/VCF4VariationFormat.h b/src/corelibs/U2Formats/src/VCF4VariationFormat.h index df4e3b9821ec70cc25f66ecca9c5f51b6b88b710..b7e2701e5e1207cc640aca6519c5b2084441db3c 100644 --- a/src/corelibs/U2Formats/src/VCF4VariationFormat.h +++ b/src/corelibs/U2Formats/src/VCF4VariationFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,8 +32,6 @@ class U2FORMATS_EXPORT VCF4VariationFormat : public AbstractVariationFormat { public: VCF4VariationFormat(QObject *p); - virtual DocumentFormatId getFormatId() const {return BaseDocumentFormats::VCF4;} - protected: virtual bool checkFormatByColumnCount(int columnCount) const; }; diff --git a/src/corelibs/U2Formats/src/VectorNtiSequenceFormat.cpp b/src/corelibs/U2Formats/src/VectorNtiSequenceFormat.cpp index b31fcda0209bcd6218eef9c38d7afacf3a30dc77..290c7413c554e8ce10852f4ad1620e00178bd33f 100644 --- a/src/corelibs/U2Formats/src/VectorNtiSequenceFormat.cpp +++ b/src/corelibs/U2Formats/src/VectorNtiSequenceFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/VectorNtiSequenceFormat.h b/src/corelibs/U2Formats/src/VectorNtiSequenceFormat.h index b9ec394b2f3338b7382c1497c06745cbff571d39..ecc69352782ab3404b10508c813c12d0c1cf887f 100644 --- a/src/corelibs/U2Formats/src/VectorNtiSequenceFormat.h +++ b/src/corelibs/U2Formats/src/VectorNtiSequenceFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/ace/AceFormat.cpp b/src/corelibs/U2Formats/src/ace/AceFormat.cpp index 4a11a83b47561567b3021968f3c884a670ff8504..4546bfe6fbc315a66f84afc92d3702c17abf9488 100644 --- a/src/corelibs/U2Formats/src/ace/AceFormat.cpp +++ b/src/corelibs/U2Formats/src/ace/AceFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -46,13 +46,13 @@ const QString ACEFormat::AS = "AS"; const QString ACEFormat::AF = "AF"; const QString ACEFormat::BQ = "BQ"; -ACEFormat::ACEFormat(QObject* p) : TextDocumentFormat(p, DocumentFormatFlags(0), QStringList("ace")) { +ACEFormat::ACEFormat(QObject* p) : TextDocumentFormat(p, BaseDocumentFormats::ACE, DocumentFormatFlags(0), QStringList("ace")) { formatName = tr("ACE"); formatDescription = tr("ACE is a format used for storing information about genomic confgurations"); supportedObjectTypes += GObjectTypes::MULTIPLE_SEQUENCE_ALIGNMENT; } -static int modifyLine(QString &line, int pos){ +static int modifyLine(QString &line, int pos) { int curIdx = 0; char space = ' '; @@ -82,7 +82,7 @@ static int modifyLine(QString &line, int pos){ } } -static int prepareLine(QString &line, int pos){ +static int prepareLine(QString &line, int pos) { int curIdx = 0; char space = ' '; @@ -101,19 +101,19 @@ static int prepareLine(QString &line, int pos){ } #define READS_COUNT_POS 3 -static int readsCount(const QString& cur_line){ +static int readsCount(const QString& cur_line) { QString line = cur_line; return modifyLine(line, READS_COUNT_POS); } #define CONTIG_COUNT_POS 1 -static int contigCount(const QString& cur_line){ +static int contigCount(const QString& cur_line) { QString line = cur_line; return modifyLine(line, CONTIG_COUNT_POS); } #define LAST_QA_POS 4 -static int clearRange(const QString& cur_line){ +static int clearRange(const QString& cur_line) { QString line = cur_line; modifyLine(line, LAST_QA_POS); @@ -126,7 +126,7 @@ static int clearRange(const QString& cur_line){ } } #define PADDED_START_POS 3 -static int paddedStartCons(const QString& cur_line){ +static int paddedStartCons(const QString& cur_line) { QString line = cur_line; modifyLine(line, PADDED_START_POS); @@ -140,7 +140,7 @@ static int paddedStartCons(const QString& cur_line){ } #define READS_POS 3 -static int readsPos(const QString& cur_line){ +static int readsPos(const QString& cur_line) { QString line = cur_line; prepareLine(line, READS_POS); @@ -159,7 +159,7 @@ static int readsPos(const QString& cur_line){ } } #define COMPLEMENT_POS 2 -static int readsComplement(const QString& cur_line){ +static int readsComplement(const QString& cur_line) { QString line = cur_line; prepareLine(line, COMPLEMENT_POS); @@ -172,7 +172,7 @@ static int readsComplement(const QString& cur_line){ } } -static QString getName(const QString &line){ +static QString getName(const QString &line) { int curIdx = 0; char space = ' '; @@ -195,7 +195,7 @@ static QString getName(const QString &line){ return name; } -static bool checkSeq(const QByteArray &seq){ +static bool checkSeq(const QByteArray &seq) { const DNAAlphabet* alphabet = AppContext::getDNAAlphabetRegistry()->findById(BaseDNAAlphabetIds::NUCL_DNA_EXTENDED()); for(int i = 0; i < seq.length(); i++) { if (!(alphabet->contains(seq[i]) || seq[i] == '*')) { @@ -205,99 +205,80 @@ static bool checkSeq(const QByteArray &seq){ return true; } -static inline void skipBreaks(U2::IOAdapter *io, U2OpStatus &ti, char* buff, qint64* len){ +static inline void skipBreaks(U2::IOAdapter *io, U2OpStatus &ti, char* buff, qint64* len) { bool lineOk = true; *len = io->readUntil(buff, DocumentFormat::READ_BUFF_SIZE, TextUtils::LINE_BREAKS, IOAdapter::Term_Include, &lineOk); - if (*len == 0) { //end if stream - ti.setError(ACEFormat::tr("Unexpected end of file")); - return; - } - if (!lineOk) { - ti.setError(ACEFormat::tr("Line is too long")); - return; - } + CHECK_EXT(!io->hasError(), ti.setError(io->errorString()), ); + CHECK_EXT(*len != 0, ti.setError(ACEFormat::tr("Unexpected end of file")), );//end if stream + CHECK_EXT(lineOk, ti.setError(ACEFormat::tr("Line is too long")), ); } -static inline void parseConsensus(U2::IOAdapter *io, U2OpStatus &ti, char* buff, QString& consName, QSet<QString> &names, QString& headerLine, QByteArray& consensus){ + +static inline void parseConsensus(U2::IOAdapter *io, U2OpStatus &ti, char* buff, QString& consName, QSet<QString> &names, QString& headerLine, QByteArray& consensus) { char aceBStartChar = 'B'; QBitArray aceBStart = TextUtils::createBitMap(aceBStartChar); qint64 len = 0; bool ok = true; QString line; consName = getName(headerLine); - if("" == consName){ - ti.setError(ACEFormat::tr("There is no AF note")); - return ; - } - if (names.contains(consName)) { - ti.setError(ACEFormat::tr("A name is duplicated")); - return ; - } + CHECK_EXT(!consName.isEmpty(), ti.setError(ACEFormat::tr("There is no AF note")), ); + CHECK_EXT(!names.contains(consName), ti.setError(ACEFormat::tr("A name is duplicated")), ); + names.insert(consName); consensus.clear(); do { len = io->readUntil(buff, DocumentFormat::READ_BUFF_SIZE, aceBStart, IOAdapter::Term_Exclude, &ok); - if (len <= 0) { - ti.setError(ACEFormat::tr("No consensus")); - return ; - } + CHECK_EXT(!io->hasError(), ti.setError(io->errorString()), ); + CHECK_EXT(len > 0, ti.setError(ACEFormat::tr("No consensus")), ); + len = TextUtils::remove(buff, len, TextUtils::WHITES); buff[len] = 0; consensus.append(buff); ti.setProgress(io->getProgress()); } while (!ti.isCoR() && !ok); + len = io->readUntil(buff, DocumentFormat::READ_BUFF_SIZE, TextUtils::LINE_BREAKS, IOAdapter::Term_Include, &ok); + CHECK_EXT(!io->hasError(), ti.setError(io->errorString()), ); + line = QString(QByteArray(buff, len)).trimmed(); - if(!line.startsWith("BQ")){ - ti.setError(ACEFormat::tr("BQ keyword hasn't been found")); - return ; - } - consensus=consensus.toUpper(); - if(!checkSeq(consensus)){ - ti.setError(ACEFormat::tr("Bad consensus data")); - return ; - } + CHECK_EXT(line.startsWith("BQ"), ti.setError(ACEFormat::tr("BQ keyword hasn't been found")), ); + + consensus = consensus.toUpper(); + CHECK_EXT(checkSeq(consensus), ti.setError(ACEFormat::tr("Bad consensus data")), ); + consensus.replace('*',U2Msa::GAP_CHAR); } -static inline void parseAFTag(U2::IOAdapter *io, U2OpStatus &ti, char* buff, int count, QMap< QString, int> &posMap, QMap< QString, bool> &complMap, QSet<QString> &names){ +static inline void parseAFTag(U2::IOAdapter *io, U2OpStatus &ti, char* buff, int count, QMap< QString, int> &posMap, QMap< QString, bool> &complMap, QSet<QString> &names) { int count1 = count; QString readLine; QString name; qint64 len = 0; - while (!ti.isCoR() && count1>0) { - do{ + while (!ti.isCoR() && count1 > 0) { + do { skipBreaks(io, ti, buff, &len); - if(ti.hasError()){ - return; - } + CHECK_OP(ti, ); + readLine = QString(QByteArray(buff, len)).trimmed(); - }while (!readLine.startsWith("AF")); + } while (!readLine.startsWith("AF")); name = getName(readLine); - if(!readLine.startsWith("AF") || "" == name){ + if(!readLine.startsWith("AF") || "" == name) { ti.setError(ACEFormat::tr("There is no AF note")); return ; } int readPos = readsPos(readLine); int complStrand = readsComplement(readLine); - if((INT_MAX == readPos) || (-1 == complStrand) ){ + if((INT_MAX == readPos) || (-1 == complStrand) ) { ti.setError(ACEFormat::tr("Bad AF note")); return ; } int paddedStart = paddedStartCons(readLine); - if(INT_MAX == paddedStart){ - ti.setError(ACEFormat::tr("Bad AF note")); - return ; - } + CHECK_EXT(paddedStart != INT_MAX, ti.setError(ACEFormat::tr("Bad AF note")), ); posMap.insert(name,paddedStart); - - if (names.contains(name)) { - ti.setError(ACEFormat::tr("A name is duplicated")); - return ; - } + CHECK_EXT(!names.contains(name), ti.setError(ACEFormat::tr("A name is duplicated")), ); bool cur_compl = (complStrand == 1); complMap.insert(name,cur_compl); @@ -309,58 +290,51 @@ static inline void parseAFTag(U2::IOAdapter *io, U2OpStatus &ti, char* buff, int } } -static inline void parseRDandQATag(U2::IOAdapter *io, U2OpStatus &ti, char* buff, QSet<QString> &names, QString& name, QByteArray& sequence){ +static inline void parseRDandQATag(U2::IOAdapter *io, U2OpStatus &ti, char* buff, QSet<QString> &names, QString& name, QByteArray& sequence) { QString line; qint64 len = 0; bool ok = true; char aceQStartChar = 'Q'; QBitArray aceQStart = TextUtils::createBitMap(aceQStartChar); - do{ + do { skipBreaks(io, ti, buff, &len); - if(ti.hasError()){ - return; - } + CHECK_OP(ti, ); + line = QString(QByteArray(buff, len)).trimmed(); - }while (!line.startsWith("RD")); + } while (!line.startsWith("RD")); name = getName(line); - if(!line.startsWith("RD") || "" == name){ + if (!line.startsWith("RD") || "" == name) { ti.setError(ACEFormat::tr("There is no read note")); - return ; + return; } sequence.clear(); do { len = io->readUntil(buff, DocumentFormat::READ_BUFF_SIZE, aceQStart, IOAdapter::Term_Exclude, &ok); - if (len <= 0) { - ti.setError(ACEFormat::tr("No sequence")); - return ; - } + CHECK_EXT(!io->hasError(), ti.setError(io->errorString()), ); + CHECK_EXT(len > 0, ti.setError(ACEFormat::tr("No sequence")), ); + len = TextUtils::remove(buff, len, TextUtils::WHITES); buff[len] = 0; sequence.append(buff); ti.setProgress(io->getProgress()); } while (!ti.isCoR() && !ok); + len = io->readUntil(buff, DocumentFormat::READ_BUFF_SIZE, TextUtils::LINE_BREAKS, IOAdapter::Term_Include, &ok); + CHECK_EXT(!io->hasError(), ti.setError(io->errorString()), ); + line = QString(QByteArray(buff, len)).trimmed(); - if(!line.startsWith("QA")){ - ti.setError(ACEFormat::tr("QA keyword hasn't been found")); - return ; - } + CHECK_EXT(line.startsWith("QA"), ti.setError(ACEFormat::tr("QA keyword hasn't been found")), ); + int clearRangeStart = 0; int clearRangeEnd = 0; clearRangeStart = readsCount(line); - if(-1==clearRangeStart){ - ti.setError(ACEFormat::tr("QA error no clear range")); - return ; - } + CHECK_EXT(clearRangeStart != -1, ti.setError(ACEFormat::tr("QA error no clear range")), ); clearRangeEnd = clearRange(line); - if(0==clearRangeEnd){ - ti.setError(ACEFormat::tr("QA error no clear range")); - return ; - } + CHECK_EXT(clearRangeEnd != 0, ti.setError(ACEFormat::tr("QA error no clear range")), ); len = sequence.length(); if(clearRangeStart > clearRangeEnd || clearRangeEnd > len){ @@ -368,16 +342,13 @@ static inline void parseRDandQATag(U2::IOAdapter *io, U2OpStatus &ti, char* buff return ; } - sequence=sequence.toUpper(); - if(!checkSeq(sequence)){ - ti.setError(ACEFormat::tr("Bad sequence data")); - return ; - } + sequence = sequence.toUpper(); + CHECK_EXT(checkSeq(sequence), ti.setError(ACEFormat::tr("Bad sequence data")), ); if (!names.contains(name)) { ti.setError(ACEFormat::tr("A name is not match with AF names")); - return ; - }else{ + return; + } else { names.remove(name); } @@ -411,57 +382,44 @@ void ACEFormat::load(IOAdapter *io, const U2DbiRef& dbiRef, QList<GObject*> &obj //skip leading whites if present bool lineOk = true; skipBreaks(io, os, buff, &len); - if(os.hasError()){ - return; - } + CHECK_OP(os, ); + QString headerLine = QString(QByteArray(buff, len)).trimmed(); + CHECK_EXT(headerLine.startsWith(AS), os.setError(ACEFormat::tr("First line is not an ace header")), ); - if (!headerLine.startsWith(AS)) { - os.setError(ACEFormat::tr("First line is not an ace header")); - return ; - } int contigC = contigCount(headerLine); - if(-1==contigC){ - os.setError(ACEFormat::tr("No contig count tag in the header line")); - return ; - } - for(int i =0; i < contigC; i++){ - if(i==0){ + CHECK_EXT(contigC != -1, os.setError(ACEFormat::tr("No contig count tag in the header line")), ); + + for (int i = 0; i < contigC; i++) { + if (i == 0) { QBitArray nonWhites = ~TextUtils::WHITES; io->readUntil(buff, READ_BUFF_SIZE, nonWhites, IOAdapter::Term_Exclude, &lineOk); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), ); + //read header skipBreaks(io, os, buff, &len); - if(os.hasError()){ - return; - } + CHECK_OP(os, ); + headerLine = QString(QByteArray(buff, len)).trimmed(); - if (!headerLine.startsWith(CO)) { - os.setError(ACEFormat::tr("Must be CO keyword")); - return ; - } - }else{ - do{ + CHECK_EXT(headerLine.startsWith(CO), os.setError(ACEFormat::tr("Must be CO keyword")), ); + } else { + do { skipBreaks(io, os, buff, &len); - if(os.hasError()){ - return; - } + CHECK_OP(os, ); + headerLine = QString(QByteArray(buff, len)).trimmed(); - }while (!headerLine.startsWith(CO)); + } while (!headerLine.startsWith(CO)); } int count = readsCount(headerLine); - if(-1 == count){ - os.setError(ACEFormat::tr("There is no note about reads count")); - return ; - } + CHECK_EXT(count != -1, os.setError(ACEFormat::tr("There is no note about reads count")), ); + //consensus QString name; QByteArray consensus; QString consName; parseConsensus(io, os, buff, consName, names, headerLine, consensus); - if (os.hasError()){ - return; - } + CHECK_OP(os, ); MultipleSequenceAlignment al(consName); al->addRow(consName, consensus); @@ -488,7 +446,7 @@ void ACEFormat::load(IOAdapter *io, const U2DbiRef& dbiRef, QList<GObject*> &obj pos += qAbs(smallestOffset); } QString rowName(name); - if(true == isComplement){ + if(isComplement){ rowName.append("(rev-compl)"); } diff --git a/src/corelibs/U2Formats/src/ace/AceFormat.h b/src/corelibs/U2Formats/src/ace/AceFormat.h index 5dedcfdd67d57c5fc32f898b1375c5a510ebd3bb..986e665a8c6acd572e4fed85b6b2cc3103feb36a 100644 --- a/src/corelibs/U2Formats/src/ace/AceFormat.h +++ b/src/corelibs/U2Formats/src/ace/AceFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -38,15 +38,11 @@ class U2FORMATS_EXPORT ACEFormat : public TextDocumentFormat { public: ACEFormat(QObject* p); - virtual DocumentFormatId getFormatId() const { return BaseDocumentFormats::ACE; } - virtual const QString& getFormatName() const { return formatName; } - protected: virtual FormatCheckResult checkRawTextData(const QByteArray& rawData, const GUrl& = GUrl()) const; virtual Document* loadTextDocument(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& fs, U2OpStatus& os); private: - QString formatName; void load(IOAdapter* io, const U2DbiRef& dbiRef, QList<GObject*>& objects, const QVariantMap &hints, U2OpStatus& ti); static const QString CO; diff --git a/src/corelibs/U2Formats/src/ace/AceImportUtils.cpp b/src/corelibs/U2Formats/src/ace/AceImportUtils.cpp index 1e8ced668e91c302a95ffb1e60d437c079b2b260..a4d42ccf094798c1056cdeec7ef2ad922ec4a824 100644 --- a/src/corelibs/U2Formats/src/ace/AceImportUtils.cpp +++ b/src/corelibs/U2Formats/src/ace/AceImportUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/ace/AceImportUtils.h b/src/corelibs/U2Formats/src/ace/AceImportUtils.h index 6803ae9c946b543dbbe83014fa289cb23d810ae9..35b342757332ddfc69061ae1666431286b00c1b7 100644 --- a/src/corelibs/U2Formats/src/ace/AceImportUtils.h +++ b/src/corelibs/U2Formats/src/ace/AceImportUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -91,7 +91,6 @@ private: int getClearRangeStart(const QByteArray &cur_line); int getClearRangeEnd(const QByteArray &cur_line); void formatSequence(QByteArray& data); - QString tr(const char * text) const { return QObject::tr(text); } IOAdapter *io; U2OpStatus *os; diff --git a/src/corelibs/U2Formats/src/ace/AceImporter.cpp b/src/corelibs/U2Formats/src/ace/AceImporter.cpp index 637b1664077290d9fc8ac451cef5f46a55605d0d..aaace380f5f9199291e86740aea4da1f18a4be8a 100644 --- a/src/corelibs/U2Formats/src/ace/AceImporter.cpp +++ b/src/corelibs/U2Formats/src/ace/AceImporter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/ace/AceImporter.h b/src/corelibs/U2Formats/src/ace/AceImporter.h index c79b65177140a5c83fb5b92ee3dd911c3463c5a8..5f71d27218512dde2519673be670d93f75d909ed 100644 --- a/src/corelibs/U2Formats/src/ace/AceImporter.h +++ b/src/corelibs/U2Formats/src/ace/AceImporter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/ace/CloneAssemblyWithReferenceToDbiTask.cpp b/src/corelibs/U2Formats/src/ace/CloneAssemblyWithReferenceToDbiTask.cpp index 3b1a5e38b08843ec5a1e431b831e6904f495e575..278e8ec94774a4ccb3ce063bd204bb21b03fac47 100644 --- a/src/corelibs/U2Formats/src/ace/CloneAssemblyWithReferenceToDbiTask.cpp +++ b/src/corelibs/U2Formats/src/ace/CloneAssemblyWithReferenceToDbiTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/ace/CloneAssemblyWithReferenceToDbiTask.h b/src/corelibs/U2Formats/src/ace/CloneAssemblyWithReferenceToDbiTask.h index caf51e7a6fba0fc8ddd2fec9381941eca78a0707..07f3dd49f7b53a1fe4cf61ec839212e38f1d2925 100644 --- a/src/corelibs/U2Formats/src/ace/CloneAssemblyWithReferenceToDbiTask.h +++ b/src/corelibs/U2Formats/src/ace/CloneAssemblyWithReferenceToDbiTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/ace/ConvertAceToSqliteTask.cpp b/src/corelibs/U2Formats/src/ace/ConvertAceToSqliteTask.cpp index 854c8a24584313e6ce033b6d6462a00bb44bb82a..10080653685fb564ec89ac4c0baa24e093a232cf 100644 --- a/src/corelibs/U2Formats/src/ace/ConvertAceToSqliteTask.cpp +++ b/src/corelibs/U2Formats/src/ace/ConvertAceToSqliteTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/ace/ConvertAceToSqliteTask.h b/src/corelibs/U2Formats/src/ace/ConvertAceToSqliteTask.h index f2965fac6d40cb44175b7a4f89a42820e83850bf..b992254d3ab3c629b060109c5e0b1d68a16b6d3e 100644 --- a/src/corelibs/U2Formats/src/ace/ConvertAceToSqliteTask.h +++ b/src/corelibs/U2Formats/src/ace/ConvertAceToSqliteTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/apr/AprFormat.cpp b/src/corelibs/U2Formats/src/apr/AprFormat.cpp index 2e205d098cf794e27702f406c4160762b3bef49e..ec3d98588a23a1699d52258d14567f36a5d1da39 100644 --- a/src/corelibs/U2Formats/src/apr/AprFormat.cpp +++ b/src/corelibs/U2Formats/src/apr/AprFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -56,6 +56,7 @@ static QString getLine(IOAdapter* io, char* buff, const QString& pattern, U2OpSt QString line; while (!finishedReading) { io->readLine(buff, AprFormat::READ_BUFF_SIZE, &lineOk); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), QString()); if (!lineOk) { os.setError(AprFormat::tr("Unexpected end of file")); line = QString(); @@ -94,7 +95,7 @@ static int getNumber(QString string, int startPos, U2OpStatus& os) { resultLength = currentLength; } if (resultLength == 0) { - os.setError(AprFormat::tr("Attemt to find any number in the string failed")); + os.setError(AprFormat::tr("Attempt to find any number in the string failed")); } return resultLength; } @@ -144,7 +145,7 @@ static void createRows(IOAdapter* io, char* buff, const int sequnenceNum, const } } -AprFormat::AprFormat(QObject* p) : TextDocumentFormat(p, DocumentFormatFlags(DocumentFormatFlag_CannotBeCreated), QStringList("apr")) { +AprFormat::AprFormat(QObject* p) : TextDocumentFormat(p, BaseDocumentFormats::VECTOR_NTI_ALIGNX, DocumentFormatFlags(DocumentFormatFlag_CannotBeCreated), QStringList("apr")) { formatName = tr("Vector NTI/AlignX"); formatDescription = tr("Vector NTI/AlignX is a Vector NTI format for multiple alignment"); supportedObjectTypes += GObjectTypes::MULTIPLE_SEQUENCE_ALIGNMENT; @@ -194,6 +195,8 @@ void AprFormat::load(IOAdapter* io, const U2DbiRef& dbiRef, QList<GObject*>& obj bool lineOk = false; io->readLine(buff, READ_BUFF_SIZE, &lineOk); + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), ); + QString bufferString(buff); QTextStream bufferStream(&bufferString); QString header = bufferStream.readLine(); @@ -214,10 +217,7 @@ void AprFormat::load(IOAdapter* io, const U2DbiRef& dbiRef, QList<GObject*>& obj int sequenceNum = getNumber(sequenceQuantityString, SIZE_BEFORE_NUMBER_SEQUENCE_QUANTITY, os); CHECK_OP(os, ); - if (sequenceNum == 0) { - os.setError(AprFormat::tr("Sequences not found")); - return; - } + CHECK_EXT(sequenceNum != 0, os.setError(AprFormat::tr("Sequences not found")), ); createRows(io, buff, sequenceNum, alignmentLength, al, os); CHECK_OP(os, ); diff --git a/src/corelibs/U2Formats/src/apr/AprFormat.h b/src/corelibs/U2Formats/src/apr/AprFormat.h index a29512182a882cb6d0e876b44cb218ca779070fb..8fe461e6238a9129ff795b6f7de5269076e51760 100644 --- a/src/corelibs/U2Formats/src/apr/AprFormat.h +++ b/src/corelibs/U2Formats/src/apr/AprFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -40,8 +40,6 @@ class U2FORMATS_EXPORT AprFormat : public TextDocumentFormat { public: AprFormat(QObject* p); - virtual DocumentFormatId getFormatId() const { return BaseDocumentFormats::VECTOR_NTI_ALIGNX; } - virtual const QString& getFormatName() const { return formatName; } virtual QString getRadioButtonText() const; protected: @@ -50,8 +48,6 @@ protected: private: void load(IOAdapter* io, const U2DbiRef& dbiRef, QList<GObject*>& objects, const QVariantMap &hints, U2OpStatus& ti); - - QString formatName; }; } //namespace diff --git a/src/corelibs/U2Formats/src/apr/AprImporter.cpp b/src/corelibs/U2Formats/src/apr/AprImporter.cpp index dddbc0850b1db69645066cfb4e1a45baec52abe3..758b00cf4e5fdda762556f3d4ab02c7ba6ce2bab 100644 --- a/src/corelibs/U2Formats/src/apr/AprImporter.cpp +++ b/src/corelibs/U2Formats/src/apr/AprImporter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/apr/AprImporter.h b/src/corelibs/U2Formats/src/apr/AprImporter.h index f3f6afe64e59b13c38a77ff243a8af854cbf0d6f..70e297f9fb2a62ccc93974e4ccfff7d3e1b05934 100644 --- a/src/corelibs/U2Formats/src/apr/AprImporter.h +++ b/src/corelibs/U2Formats/src/apr/AprImporter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlAssemblyDbi.cpp b/src/corelibs/U2Formats/src/mysql_dbi/MysqlAssemblyDbi.cpp index 6a569abcb06fdf51d34734c777db3f8a139cc687..b64ac39e67a76cb45b11ac547eab7b55688d0fea 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlAssemblyDbi.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlAssemblyDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlAssemblyDbi.h b/src/corelibs/U2Formats/src/mysql_dbi/MysqlAssemblyDbi.h index cf447eca1ba1625277ca769042b07d03fbddb7bc..8589bf3ef829b77b6b86b7651d9dcf081ac9f586 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlAssemblyDbi.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlAssemblyDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlAttributeDbi.cpp b/src/corelibs/U2Formats/src/mysql_dbi/MysqlAttributeDbi.cpp index cee63b438f29b1e19c9e68a2ce299424e38c3120..e9f28e32884ddafe785a530e35240c3eaf4fbbd2 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlAttributeDbi.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlAttributeDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlBlobInputStream.cpp b/src/corelibs/U2Formats/src/mysql_dbi/MysqlBlobInputStream.cpp index d5156d98f7be745c0dd3a6eeea45e762e2977b92..7c0fa2970b71c4ccfb85763170609048c1ba3d3e 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlBlobInputStream.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlBlobInputStream.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlBlobInputStream.h b/src/corelibs/U2Formats/src/mysql_dbi/MysqlBlobInputStream.h index 94588a932fcfa3097d01ae1e242b7d8010864150..42e4718ebcf61625c44edd6262df5c6d44d53076 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlBlobInputStream.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlBlobInputStream.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlBlobOutputStream.cpp b/src/corelibs/U2Formats/src/mysql_dbi/MysqlBlobOutputStream.cpp index 1128efb2eb684c2ddcd6373280305b321cba4980..2cde56a4ab21f12d645f8b7b18aade645f217142 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlBlobOutputStream.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlBlobOutputStream.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlBlobOutputStream.h b/src/corelibs/U2Formats/src/mysql_dbi/MysqlBlobOutputStream.h index ee2896ea8840eed638fdd91a7b91d96721918515..9899e247ad2820c4b1cdf95b527179e60a6f6fd8 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlBlobOutputStream.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlBlobOutputStream.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlCrossDatabaseReferenceDbi.cpp b/src/corelibs/U2Formats/src/mysql_dbi/MysqlCrossDatabaseReferenceDbi.cpp index 1853e1d40274962c1394ca376c60f142506b73d7..5d551d585ce9cea7f33c80ead8dd1292611341a2 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlCrossDatabaseReferenceDbi.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlCrossDatabaseReferenceDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlCrossDatabaseReferenceDbi.h b/src/corelibs/U2Formats/src/mysql_dbi/MysqlCrossDatabaseReferenceDbi.h index e077de463a37f739c7800293f2a47e9751893a53..3eef8451d6da095592c6851be36d99b964eb4f5a 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlCrossDatabaseReferenceDbi.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlCrossDatabaseReferenceDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlDbi.cpp b/src/corelibs/U2Formats/src/mysql_dbi/MysqlDbi.cpp index 8cd0b0b6273d8e48d0aa7c8f2a78f3ab59e75acf..e831afa46e247aa8d4761e725afaa55ce56bf584 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlDbi.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlDbi.h b/src/corelibs/U2Formats/src/mysql_dbi/MysqlDbi.h index 6b02e7b8c825de968a9a3c8f8030c5525a751eac..f98f6fdc064ba37ff727b60c505ebeae1024a6ba 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlDbi.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlFeatureDbi.cpp b/src/corelibs/U2Formats/src/mysql_dbi/MysqlFeatureDbi.cpp index 4163f144f1162cc0664c06425267161e458a7128..da19aff14b8147bc7e0633e8dba8b64b78f5ecc7 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlFeatureDbi.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlFeatureDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlFeatureDbi.h b/src/corelibs/U2Formats/src/mysql_dbi/MysqlFeatureDbi.h index 8d16097897bf5666d8844aab8dd654212011efee..f943dc051a9260c0fb2934db065e97f63c1c320c 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlFeatureDbi.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlFeatureDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlModDbi.cpp b/src/corelibs/U2Formats/src/mysql_dbi/MysqlModDbi.cpp index e1713c502e1ee000c073a741618343e634fc2ca4..15ad4b5e500de57e9f2aeef62f4b5f5255aa5f97 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlModDbi.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlModDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlModDbi.h b/src/corelibs/U2Formats/src/mysql_dbi/MysqlModDbi.h index 16a7b75c5309759337e52f9ab2dfef41e020ff4d..8f1cfdf9e8a1438911e78ffc69cfff0b12865b64 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlModDbi.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlModDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlMsaDbi.cpp b/src/corelibs/U2Formats/src/mysql_dbi/MysqlMsaDbi.cpp index 3df7bc611ed6c4fc464814dbb2aab6afe48c08fd..877dc65c41605e567a82cff6d11014e448b25749 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlMsaDbi.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlMsaDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlMsaDbi.h b/src/corelibs/U2Formats/src/mysql_dbi/MysqlMsaDbi.h index 13a49ec9a625ab35bcd27ab469126b8b8f573300..3f07c8f768dca65ab32cfefc0ba50b48f5ce6fdc 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlMsaDbi.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlMsaDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlObjectDbi.cpp b/src/corelibs/U2Formats/src/mysql_dbi/MysqlObjectDbi.cpp index 2393acfd1e23ef2ec6b93c68e9c4c8e2bef33678..0255a6bfdc61494f9e308c44df38d1e29cc1037a 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlObjectDbi.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlObjectDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlObjectDbi.h b/src/corelibs/U2Formats/src/mysql_dbi/MysqlObjectDbi.h index b8afdb70c552dc6acc056e332a03fa51ca4da9af..189b82cbba03d9fbe7027f9f3d39f693b9e43611 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlObjectDbi.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlObjectDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlObjectRelationsDbi.cpp b/src/corelibs/U2Formats/src/mysql_dbi/MysqlObjectRelationsDbi.cpp index 2912a20f730cf7deb94d3ecd580afc9c94133bbf..4b7b7c3e3fc59365e2fda144bb4dce528e640336 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlObjectRelationsDbi.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlObjectRelationsDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlObjectRelationsDbi.h b/src/corelibs/U2Formats/src/mysql_dbi/MysqlObjectRelationsDbi.h index 6a05d73e834f2a0f89951e46d1531d0a68c02bdc..b03a040a5794958364e738937de8484b65cd904d 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlObjectRelationsDbi.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlObjectRelationsDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlSequenceDbi.cpp b/src/corelibs/U2Formats/src/mysql_dbi/MysqlSequenceDbi.cpp index e179f7fbc8a7a2e8b2f9c79302ea6e59292bfd92..43b3bd4059f60fbae9e3a928d21a6c66e2c9423e 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlSequenceDbi.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlSequenceDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlSequenceDbi.h b/src/corelibs/U2Formats/src/mysql_dbi/MysqlSequenceDbi.h index 59064a6cbff9d153c8004ad224e30b6adc3fd0fb..3ce5e3e69b795ad67798b9527a996a45c0c3c0b6 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlSequenceDbi.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlSequenceDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlUdrDbi.cpp b/src/corelibs/U2Formats/src/mysql_dbi/MysqlUdrDbi.cpp index 99f4879bdb44d487d509561130b659c821680272..6c17a8da8dec87d800033ade449b4ec448ac4417 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlUdrDbi.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlUdrDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlUdrDbi.h b/src/corelibs/U2Formats/src/mysql_dbi/MysqlUdrDbi.h index c16ff2a3b5ee2363961be48040dfa3f3f99f60ee..089c9c3bfc08d3e97c0d2e75c8d3ca0401b8fff9 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlUdrDbi.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlUdrDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlVariantDbi.cpp b/src/corelibs/U2Formats/src/mysql_dbi/MysqlVariantDbi.cpp index b148f9c991c557e6500c761ac9e564f60f307fb6..0d6db9a66fcfc399ec3c48457e4d4c4bf6b67b80 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlVariantDbi.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlVariantDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/MysqlVariantDbi.h b/src/corelibs/U2Formats/src/mysql_dbi/MysqlVariantDbi.h index 24a8b1bb1e08cc05a36b8c4a14246455cac6d579..b8cf66a81e6a6369dc5ef6f7dd0c7803edd12521 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/MysqlVariantDbi.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/MysqlVariantDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlAssemblyAdapter.cpp b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlAssemblyAdapter.cpp index 937ce4fb6d405bafc89ac7d5a4a4f78b501fb2b0..8261e409c4e7d5ab8aa38327b325b1ab50fdde53 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlAssemblyAdapter.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlAssemblyAdapter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlAssemblyAdapter.h b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlAssemblyAdapter.h index 9be80e4d0f24d12efaf3378ea620b709ac03061c..6610bc2f440d4643ac35d91b5c4a9d5bd9082825 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlAssemblyAdapter.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlAssemblyAdapter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlAssemblyUtils.cpp b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlAssemblyUtils.cpp index ca8e6328570a0e219d0d7ea4ffee1ac18ea89092..75b365a3ea6247089e4eb22430f8857a8fb7aa4f 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlAssemblyUtils.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlAssemblyUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlAssemblyUtils.h b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlAssemblyUtils.h index f36414462c9c11ce5b47cf34d7cfa499bf6b70a1..d42c10be05aa752c4635143b8253279079c5d684 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlAssemblyUtils.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlAssemblyUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,6 +23,7 @@ #define _U2_MYSQL_ASSEMBLY_UTILS_H_ #include <U2Core/U2Assembly.h> +#include <U2Core/U2Region.h> namespace U2 { diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlDbiUtils.cpp b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlDbiUtils.cpp index 437a446c2199aa67b600e70a21aacce8b46126e0..e648f007cda300d014e04d86238bbc1f5dceb010 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlDbiUtils.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlDbiUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlDbiUtils.h b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlDbiUtils.h index aea061a1e83bc373d4f032a57f7a09fc24ddafb2..bbb87417dc95e4dd9fa967bf71c8b2a52e9b4919 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlDbiUtils.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlDbiUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlHelpers.cpp b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlHelpers.cpp index cc2f28be8628108c50aa35f8c7e7b1bb818fe9d3..9209c8257ab0333ddfa67afab29a552a662a9fc0 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlHelpers.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlHelpers.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlHelpers.h b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlHelpers.h index 5979ffd63a165fc5d39d5cf630d8694692c30cd1..a3c4ff035128d4d518f8f0ecda188dfe93eeda7b 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlHelpers.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlHelpers.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlModificationAction.cpp b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlModificationAction.cpp index d6fd5ae1cdd9c85804ee96b65011fb27665e6c82..e504df42a295802e6b7e414e47db878c84b6207f 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlModificationAction.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlModificationAction.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlModificationAction.h b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlModificationAction.h index 0999219ce36d7a417b23f0208799cc210febe315..5671c4919188341c83242081f5a59ea51cebfabf 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlModificationAction.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlModificationAction.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlMultiTableAssemblyAdapter.cpp b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlMultiTableAssemblyAdapter.cpp index 8dd2d635171db5ccc06fe7fd662bdb324d82bd81..965a8991e1086c1f3f5a44477234476974554d81 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlMultiTableAssemblyAdapter.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlMultiTableAssemblyAdapter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlMultiTableAssemblyAdapter.h b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlMultiTableAssemblyAdapter.h index 03b77d7687ece0eaaebad3366fcb5d992bd1be99..e4a68d80baad57d40401ccd1da036bbabae181eb 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlMultiTableAssemblyAdapter.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlMultiTableAssemblyAdapter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlSingleTableAssemblyAdapter.cpp b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlSingleTableAssemblyAdapter.cpp index 8db5b44c22034264a5d8c341f84378f8258e41d9..982c6bb59c955a1eddc10c2109f4a749dedf1c29 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlSingleTableAssemblyAdapter.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlSingleTableAssemblyAdapter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlSingleTableAssemblyAdapter.h b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlSingleTableAssemblyAdapter.h index a65e6b50886cb8b03bd1fcb580557d2d47f39be5..9877a044bb0bb14610ea6cc233658a42de1e6691 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlSingleTableAssemblyAdapter.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/MysqlSingleTableAssemblyAdapter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgrader.cpp b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgrader.cpp index 207c946d7a72bb0f53905ddab070ea5e488e3f35..ccccf0fa86af39d45abed92b34d84fe34b002ea4 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgrader.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgrader.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgrader.h b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgrader.h index f6ea7e07c908592572fc82c618a370f338ce09c7..03bedec238eeef9d9f4895b58897e61b21d80760 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgrader.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgrader.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_14_To_1_15.cpp b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_14_To_1_15.cpp index d2f6b5d6b70875b0d6582285013d918873500ee9..e1f3c00c4efbd5be1a6c0b87647fbe09c16dd933 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_14_To_1_15.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_14_To_1_15.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_14_To_1_15.h b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_14_To_1_15.h index 641124e22325e5ed85bfe4958f1bd75513a101d5..f50a8f3c402147662e96b9546c902b0c3ac2cf67 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_14_To_1_15.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_14_To_1_15.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_15_To_1_16.cpp b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_15_To_1_16.cpp index 072f4d32e0da523ec63bd9a6c72ab47d4f5642f6..48848406b44c74ad0f435220d0195f2a025c97d9 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_15_To_1_16.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_15_To_1_16.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_15_To_1_16.h b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_15_To_1_16.h index c4668f0d6ca4bbd23b35421fa00784f6d4645885..b0b5141a80223a5b23ad16a57901e239e5682252 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_15_To_1_16.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_15_To_1_16.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_16_To_1_17.cpp b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_16_To_1_17.cpp index fde513e85e3fa0d995f7c1097499d7951e67e4e7..c37afd949f38ebcc643915e8c02bb9f35bec38df 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_16_To_1_17.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_16_To_1_17.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_16_To_1_17.h b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_16_To_1_17.h index 942628c8b031c4e5c7e4a17077ab72ce99f8f740..c042b49475544fdf8147d766a539662073395cf6 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_16_To_1_17.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_16_To_1_17.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_16_To_1_24.cpp b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_16_To_1_24.cpp index 85f1a66f39326270814056c0539af1ddcc5cf4b2..7c192dedd22e8c5a4ff97273df115d52b492f9c9 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_16_To_1_24.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_16_To_1_24.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_16_To_1_24.h b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_16_To_1_24.h index 6feb7514234e090db60ecd020049eb7c866944ff..e2b9deefecfed1ad4ea5d00951db46935fb50f68 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_16_To_1_24.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_16_To_1_24.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_24_To_1_25.cpp b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_24_To_1_25.cpp index 7a700ff16bef822c80c077ba58ea2553e732b73d..6f09667bfb4c6c6bc8d1da70f2c76bf0d1023a91 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_24_To_1_25.cpp +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_24_To_1_25.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_24_To_1_25.h b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_24_To_1_25.h index ce37f1d7bef8db9c67052cf03c16227a9dec0208..a967f4d77277f0ead466c351d95ad98a9c56a28f 100644 --- a/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_24_To_1_25.h +++ b/src/corelibs/U2Formats/src/mysql_dbi/util/upgraders/MysqlUpgraderFrom_1_24_To_1_25.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteAssemblyDbi.cpp b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteAssemblyDbi.cpp index 5f6d629ee4a5698656a3ccbf48a054ddb0cb29cb..6018fc7cec761e462f3b3c8a61fab7601fc30fac 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteAssemblyDbi.cpp +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteAssemblyDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteAssemblyDbi.h b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteAssemblyDbi.h index 169335bbb2dba4bdf62a9d027bed993a3ea61225..8cdc517edd7aa364dbf91ec61e18b40d442b8d21 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteAssemblyDbi.h +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteAssemblyDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteAttributeDbi.cpp b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteAttributeDbi.cpp index 76efd4fd4aa7c4f11f5ea4638d24cdb31818aa2a..987502ef57fd4ecac35cf2f84bf2fce38912e2ea 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteAttributeDbi.cpp +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteAttributeDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteAttributeDbi.h b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteAttributeDbi.h index 6769f2aade83b9522a83c0ce975a1436c57ebffd..38d2cbd9f40e51083b812cae505541429f241bff 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteAttributeDbi.h +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteAttributeDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteBlobInputStream.cpp b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteBlobInputStream.cpp index cd3c6e031d2be9899ff5e3a77e12c13468f53164..b4ddde9776798cb4218e2b82b36d5686996cb7ef 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteBlobInputStream.cpp +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteBlobInputStream.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteBlobInputStream.h b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteBlobInputStream.h index de001ef2131bd43bd0e57707d2b7d7d42ba19de2..0225588cdd6f7d08374032280204fd1abb2cc3d6 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteBlobInputStream.h +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteBlobInputStream.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteBlobOutputStream.cpp b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteBlobOutputStream.cpp index 8131cfaf9c6cfcb57dea71a39cf3f670c0b93e2b..2ef2653705375baecf407e09d3a4dc08dd06f757 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteBlobOutputStream.cpp +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteBlobOutputStream.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteBlobOutputStream.h b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteBlobOutputStream.h index eddd02df1bcf6ee8863ad4346700969f2412983b..1b5fdc2f7d42a97272ac76aef888eb354da2a971 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteBlobOutputStream.h +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteBlobOutputStream.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteDbi.cpp b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteDbi.cpp index 959718c3c2a3e6038e65ddb6c576619b3a6c6a59..dd47ef60efbe85e40e65cbdd0d162b2397dcee5b 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteDbi.cpp +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteDbi.h b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteDbi.h index 4c62147177038a107070f67dd0c1a6f9ff558290..dd38b64b57f64309e041805a4fef63dc3169a904 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteDbi.h +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteFeatureDbi.cpp b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteFeatureDbi.cpp index 3a3166e54cf90575e700759ac0a08de30f9ceca6..e33c21e1f4b73560d8da701879703abd86e9fe2f 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteFeatureDbi.cpp +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteFeatureDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteFeatureDbi.h b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteFeatureDbi.h index 4a97132263dbe7007655dcfb38a8d4b76b8261a3..e8049a1ca057f5a294768d0bf6acdaff1101d22b 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteFeatureDbi.h +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteFeatureDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteModDbi.cpp b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteModDbi.cpp index 26d9158c2f18bd28543b9e945a70ac1dc3d02b91..49b8b8ac9061c0be4672efc2b55627556ea86b2c 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteModDbi.cpp +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteModDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteModDbi.h b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteModDbi.h index 963aec8364da66b4a471c231213643580a6621b8..d4a009af25efe650aea8b827e021d80d2acf0614 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteModDbi.h +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteModDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteMsaDbi.cpp b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteMsaDbi.cpp index 81f3d8c448d17f69734027798775194b7074a9b3..08a18493baa33e0807488a9ae7d37e25f021f70f 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteMsaDbi.cpp +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteMsaDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteMsaDbi.h b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteMsaDbi.h index 6652932694faa3b33c5950f8929f6afa59d25843..0d562e15e7860cce4a6b5b6202768a06e08467f7 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteMsaDbi.h +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteMsaDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteObjectDbi.cpp b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteObjectDbi.cpp index fe739c4bd0ec2eef20238459dd18146cf85036eb..8d44068d9cf924c5d17b64cc0be6775784ab949d 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteObjectDbi.cpp +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteObjectDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteObjectDbi.h b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteObjectDbi.h index 4fdbb56ffca3e9756123be74476b5f9f476da324..180b792adee1d9e685903a4eeb9b9359ee78f4c7 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteObjectDbi.h +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteObjectDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteObjectRelationsDbi.cpp b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteObjectRelationsDbi.cpp index 6f0aeb3476996c4dfe8ab45d8b979a09de50cc83..d4296052298775237d8524ed555c93c36a0c4c8b 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteObjectRelationsDbi.cpp +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteObjectRelationsDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteObjectRelationsDbi.h b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteObjectRelationsDbi.h index 301367479fbd4ac1883ac0986933f3e35b0f2f7e..4a6f92d02f85842ccb5c8667dbcd4593d35c1b39 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteObjectRelationsDbi.h +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteObjectRelationsDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteSequenceDbi.cpp b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteSequenceDbi.cpp index f765fa3e599cf3c18593fe6ce97a1f1e05570ba3..8b79c9f07ab0e33b5af38c561d7fbc3c6064a441 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteSequenceDbi.cpp +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteSequenceDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteSequenceDbi.h b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteSequenceDbi.h index e7622002b7da6d4e73215d9312d2093c32ee8313..7d8d87d97b89090596460628c22873b466c988d4 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteSequenceDbi.h +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteSequenceDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteUdrDbi.cpp b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteUdrDbi.cpp index b0d02861b039e830960fb2b02ad019017b39f173..b11290cebbecd7720ba543b038b82a2433891de8 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteUdrDbi.cpp +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteUdrDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteUdrDbi.h b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteUdrDbi.h index 7d4ecce5b853b4151fb16ff2077ba49f7f4a955d..835de423987bdbaffdd53d1a6a9b35a942258e39 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteUdrDbi.h +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteUdrDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteVariantDbi.cpp b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteVariantDbi.cpp index 2acba25c1c0c1ab7da2902099751f4b286d66709..4b619f24f24605b0d230daacfd72adc345d029c7 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteVariantDbi.cpp +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteVariantDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteVariantDbi.h b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteVariantDbi.h index 537a8a6df1ee0b6858b1319614db565fc04dc4c9..bc9e13ce787f72c3f71d062d05b50562442d2d01 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteVariantDbi.h +++ b/src/corelibs/U2Formats/src/sqlite_dbi/SQLiteVariantDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/assembly/MultiTableAssemblyAdapter.cpp b/src/corelibs/U2Formats/src/sqlite_dbi/assembly/MultiTableAssemblyAdapter.cpp index 48c86287430be1cf34356c66acf1bea886f73672..cf54b9845872cd3e2c8dcf7aaa0aa7542a92f8b5 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/assembly/MultiTableAssemblyAdapter.cpp +++ b/src/corelibs/U2Formats/src/sqlite_dbi/assembly/MultiTableAssemblyAdapter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -679,7 +679,9 @@ void MultiTablePackAlgorithmAdapter::migrate(MTASingleTableAdapter* newA, const insertIds.reset(false); insertIds.bindInt64(1, d.readId); insertIds.bindInt32(2, d.newProw); +#ifdef _DEBUG assert(newProwRegion.contains(d.newProw)); +#endif insertIds.execute(); if (os.hasError()) { break; diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/assembly/MultiTableAssemblyAdapter.h b/src/corelibs/U2Formats/src/sqlite_dbi/assembly/MultiTableAssemblyAdapter.h index a26b13cd4149fc622cb4f9ad7da6af35ef0425f7..f2be681acaace1c7f5229d6fbf705bda57d856a3 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/assembly/MultiTableAssemblyAdapter.h +++ b/src/corelibs/U2Formats/src/sqlite_dbi/assembly/MultiTableAssemblyAdapter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/assembly/RTreeAssemblyAdapter.cpp b/src/corelibs/U2Formats/src/sqlite_dbi/assembly/RTreeAssemblyAdapter.cpp index 4300caeee3e7721697c3978d61f943cbb2d9b43e..3a39372ba344c7a9a5d27cc79d9253e7643351b3 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/assembly/RTreeAssemblyAdapter.cpp +++ b/src/corelibs/U2Formats/src/sqlite_dbi/assembly/RTreeAssemblyAdapter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/assembly/RTreeAssemblyAdapter.h b/src/corelibs/U2Formats/src/sqlite_dbi/assembly/RTreeAssemblyAdapter.h index 11ac8deece67b6982aa1568da704339d94aa7112..1d280cdc33ed3599158b6d61d2427ce3a7ca53d0 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/assembly/RTreeAssemblyAdapter.h +++ b/src/corelibs/U2Formats/src/sqlite_dbi/assembly/RTreeAssemblyAdapter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/assembly/SingleTableAssemblyAdapter.cpp b/src/corelibs/U2Formats/src/sqlite_dbi/assembly/SingleTableAssemblyAdapter.cpp index 2d3150dbd86b027d5d1bf6c1b9181e9d1891e86e..d509d6371453628e4202efd6320343379e3c15ce 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/assembly/SingleTableAssemblyAdapter.cpp +++ b/src/corelibs/U2Formats/src/sqlite_dbi/assembly/SingleTableAssemblyAdapter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/assembly/SingleTableAssemblyAdapter.h b/src/corelibs/U2Formats/src/sqlite_dbi/assembly/SingleTableAssemblyAdapter.h index cc262ecd0b7a115d65a8f93c30c634716b225474..714da6a73ceebbbb542d77ffcdef3baa7170fc3f 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/assembly/SingleTableAssemblyAdapter.h +++ b/src/corelibs/U2Formats/src/sqlite_dbi/assembly/SingleTableAssemblyAdapter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgrader.cpp b/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgrader.cpp index ce5563fb0f42b774307e3362032930763ec5fd8c..f16efbd32b841770d4b67a3d4acc8211c54dd78a 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgrader.cpp +++ b/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgrader.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgrader.h b/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgrader.h index c3c260239d4ae0edd6f88b04ca9f53a651a91199..f8dd2e366570cec61cff2fd7df7b8e91d5eeff64 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgrader.h +++ b/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgrader.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgraderFrom_0_To_1_13.cpp b/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgraderFrom_0_To_1_13.cpp index ea9be3fda23c0ae24d395c144c7adcf14957dc76..c25c1f9acd0276679bbbb82e89b4c584435d5223 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgraderFrom_0_To_1_13.cpp +++ b/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgraderFrom_0_To_1_13.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgraderFrom_0_To_1_13.h b/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgraderFrom_0_To_1_13.h index 20815b866d3522c5a0fe9429b925f5f2f785179e..f24aeecdee6146c0e12969b1ed8d43fe71319ea3 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgraderFrom_0_To_1_13.h +++ b/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgraderFrom_0_To_1_13.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgraderFrom_1_13_To_1_25.cpp b/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgraderFrom_1_13_To_1_25.cpp index aaeacebb8058d1dc94a8d9672840dc9f7777f551..e063b60935210e3bc854624293326587e7db6b5d 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgraderFrom_1_13_To_1_25.cpp +++ b/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgraderFrom_1_13_To_1_25.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgraderFrom_1_13_To_1_25.h b/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgraderFrom_1_13_To_1_25.h index 10ce419ae837daec8626d6788674774b5349d886..7f37283e7e011418d23f2bc9238cc49568d49fbc 100644 --- a/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgraderFrom_1_13_To_1_25.h +++ b/src/corelibs/U2Formats/src/sqlite_dbi/util/SqliteUpgraderFrom_1_13_To_1_25.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/tasks/BgzipTask.cpp b/src/corelibs/U2Formats/src/tasks/BgzipTask.cpp index 7504797fa52e2e8dee34b82592d6dd66cbac80ca..2f71e5dfd43b90581230619b10bf1da2b1fe600b 100644 --- a/src/corelibs/U2Formats/src/tasks/BgzipTask.cpp +++ b/src/corelibs/U2Formats/src/tasks/BgzipTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/tasks/BgzipTask.h b/src/corelibs/U2Formats/src/tasks/BgzipTask.h index b5bba93bfacbfd3534e91a170e667610bb96470e..f84e807ebe78875376c038c83be639553bd21c04 100644 --- a/src/corelibs/U2Formats/src/tasks/BgzipTask.h +++ b/src/corelibs/U2Formats/src/tasks/BgzipTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/EstimationDialog.cpp b/src/corelibs/U2Formats/src/tasks/CalculateSequencesNumberTask.cpp similarity index 51% rename from src/plugins/workflow_designer/src/EstimationDialog.cpp rename to src/corelibs/U2Formats/src/tasks/CalculateSequencesNumberTask.cpp index ea1701f04596288798846e646ef20a29d7373148..14fabc7fba6761dbe82604835dd303909d64f9f3 100644 --- a/src/plugins/workflow_designer/src/EstimationDialog.cpp +++ b/src/corelibs/U2Formats/src/tasks/CalculateSequencesNumberTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,31 +19,23 @@ * MA 02110-1301, USA. */ -#include <QDialogButtonBox> -#include <QHBoxLayout> -#include <QPushButton> -#include <QVBoxLayout> +#include "CalculateSequencesNumberTask.h" -#include <U2Designer/EstimationReporter.h> - -#include "EstimationDialog.h" +#include <U2Formats/StreamSequenceReader.h> namespace U2 { -EstimationDialog::EstimationDialog(const Workflow::EstimationResult &er, QWidget *parent) -: QDialog(parent) -{ - QVBoxLayout *vl = new QVBoxLayout(this); - vl->setContentsMargins(0, 0, 0, 0); - vl->addWidget(EstimationReporter::generateReport(er)); - - /*QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Close); - vl->addWidget(buttons); +CalculateSequencesNumberTask::CalculateSequencesNumberTask(const QString& url) : Task(tr("Calculate sequences number"), + TaskFlag_None), + sequenceUrl(url), + sequencesNumber(0) {} - connect(buttons->button(QDialogButtonBox::Close), SIGNAL(clicked()), SLOT(accept()));*/ +int CalculateSequencesNumberTask::getSequencesNumber() const { + return sequencesNumber; +} - setWindowTitle(tr("Workflow Estimation")); - setFixedSize(600, 250); +void CalculateSequencesNumberTask::run() { + sequencesNumber = StreamSequenceReader::getNumberOfSequences(sequenceUrl, stateInfo); } -} // U2 +} \ No newline at end of file diff --git a/src/corelibs/U2Formats/src/tasks/CalculateSequencesNumberTask.h b/src/corelibs/U2Formats/src/tasks/CalculateSequencesNumberTask.h new file mode 100644 index 0000000000000000000000000000000000000000..61ab510c8d87823506db5d225e04fb66708cb57a --- /dev/null +++ b/src/corelibs/U2Formats/src/tasks/CalculateSequencesNumberTask.h @@ -0,0 +1,44 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_CALCULATE_SEQUENCES_NUMBER_TASK_H_ +#define _U2_CALCULATE_SEQUENCES_NUMBER_TASK_H_ + +#include <U2Core/global.h> +#include <U2Core/Task.h> + +namespace U2 { + +class U2FORMATS_EXPORT CalculateSequencesNumberTask : public Task { +public: + CalculateSequencesNumberTask(const QString& url); + + int getSequencesNumber() const; + +private: + void run() override; + + QString sequenceUrl; + int sequencesNumber; +}; + +} +#endif diff --git a/src/corelibs/U2Formats/src/tasks/ConvertAssemblyToSamTask.cpp b/src/corelibs/U2Formats/src/tasks/ConvertAssemblyToSamTask.cpp index f70fdf66ef4516dff51f90db2ea90a06f09cc130..fc14f1484f7dc6671ce8ab476fa4279b0d0e8cef 100644 --- a/src/corelibs/U2Formats/src/tasks/ConvertAssemblyToSamTask.cpp +++ b/src/corelibs/U2Formats/src/tasks/ConvertAssemblyToSamTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/tasks/ConvertAssemblyToSamTask.h b/src/corelibs/U2Formats/src/tasks/ConvertAssemblyToSamTask.h index 19d5fe10b354b6a8c91f79f0124ebd3e06342a36..676034f62dcb3045375086c6270f1663cf185276 100644 --- a/src/corelibs/U2Formats/src/tasks/ConvertAssemblyToSamTask.h +++ b/src/corelibs/U2Formats/src/tasks/ConvertAssemblyToSamTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/tasks/ConvertFileTask.cpp b/src/corelibs/U2Formats/src/tasks/ConvertFileTask.cpp index ef7e8505219dcbdab2f863a7a7c62191587b3904..a04db7ec64968b9fe8bc7f9afd403b3fa92ce4f2 100644 --- a/src/corelibs/U2Formats/src/tasks/ConvertFileTask.cpp +++ b/src/corelibs/U2Formats/src/tasks/ConvertFileTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/tasks/ConvertFileTask.h b/src/corelibs/U2Formats/src/tasks/ConvertFileTask.h index 0759a1fc3e95a9b3adc3030f0efb4ad07d0c534e..32fb217f5b0cb2d1069b8f90fade06cf4f4ea7db 100644 --- a/src/corelibs/U2Formats/src/tasks/ConvertFileTask.h +++ b/src/corelibs/U2Formats/src/tasks/ConvertFileTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/tasks/ConvertSnpeffVariationsToAnnotationsTask.cpp b/src/corelibs/U2Formats/src/tasks/ConvertSnpeffVariationsToAnnotationsTask.cpp index 0fefc5bcf58efb0e112ecb6185b455c52b58bc63..44e56fa7bf2db4af80a04aaa826f64334806493b 100644 --- a/src/corelibs/U2Formats/src/tasks/ConvertSnpeffVariationsToAnnotationsTask.cpp +++ b/src/corelibs/U2Formats/src/tasks/ConvertSnpeffVariationsToAnnotationsTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/tasks/ConvertSnpeffVariationsToAnnotationsTask.h b/src/corelibs/U2Formats/src/tasks/ConvertSnpeffVariationsToAnnotationsTask.h index 0b359280a02eb1b4e0fa5925526bcca4c8639edf..855b832fe1ad1cdfd92d9ad66eaba3e8936262ac 100644 --- a/src/corelibs/U2Formats/src/tasks/ConvertSnpeffVariationsToAnnotationsTask.h +++ b/src/corelibs/U2Formats/src/tasks/ConvertSnpeffVariationsToAnnotationsTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/tasks/MergeBamTask.cpp b/src/corelibs/U2Formats/src/tasks/MergeBamTask.cpp index 798fe364e1003f578512391fa7d6a807de33ccad..c39496552033caafa3abbd37250f0c7cba749e7c 100644 --- a/src/corelibs/U2Formats/src/tasks/MergeBamTask.cpp +++ b/src/corelibs/U2Formats/src/tasks/MergeBamTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/tasks/MergeBamTask.h b/src/corelibs/U2Formats/src/tasks/MergeBamTask.h index acfc754f444fa81f031c402cc3ad59fda5546603..25c6d6002ed54a87bef57387243edfef0c7ab4ab 100644 --- a/src/corelibs/U2Formats/src/tasks/MergeBamTask.h +++ b/src/corelibs/U2Formats/src/tasks/MergeBamTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/tasks/MysqlUpgradeTask.cpp b/src/corelibs/U2Formats/src/tasks/MysqlUpgradeTask.cpp index 18aa3dbb349cac129f8fefffba0ddc27786ace65..b32ad12aac9759d0964882760459b14882fc4f45 100644 --- a/src/corelibs/U2Formats/src/tasks/MysqlUpgradeTask.cpp +++ b/src/corelibs/U2Formats/src/tasks/MysqlUpgradeTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/tasks/MysqlUpgradeTask.h b/src/corelibs/U2Formats/src/tasks/MysqlUpgradeTask.h index 398de246833d216cf19e47ef72e1972148042b13..0fac73752ca131b1261c8b3f36b4d545fd2c9b21 100644 --- a/src/corelibs/U2Formats/src/tasks/MysqlUpgradeTask.h +++ b/src/corelibs/U2Formats/src/tasks/MysqlUpgradeTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/util/AssemblyAdapter.h b/src/corelibs/U2Formats/src/util/AssemblyAdapter.h index 18dcb45e47fdbec76bafe7472358fcd15a8f40ad..1d925878efd524f3761804318a7d951e1effc51a 100644 --- a/src/corelibs/U2Formats/src/util/AssemblyAdapter.h +++ b/src/corelibs/U2Formats/src/util/AssemblyAdapter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,6 +23,7 @@ #define _U2_ASSEMBLY_ADAPTER_H_ #include <U2Core/U2Assembly.h> +#include <U2Core/U2Region.h> namespace U2 { @@ -30,8 +31,7 @@ class U2AssemblyReadsImportInfo; class U2OpStatus; // reserved for future use; -class AssemblyCompressor { -}; +class AssemblyCompressor {}; class AssemblyAdapter { public: @@ -39,9 +39,9 @@ public: assemblyId(assemblyId), compressor(compressor) {} virtual ~AssemblyAdapter() {} - virtual void createReadsTables(U2OpStatus& ) {} - virtual void createReadsIndexes(U2OpStatus& ) {} - virtual void shutdown(U2OpStatus& ) {} + virtual void createReadsTables(U2OpStatus&) {} + virtual void createReadsIndexes(U2OpStatus&) {} + virtual void shutdown(U2OpStatus&) {} virtual qint64 countReads(const U2Region& r, U2OpStatus& os) = 0; diff --git a/src/corelibs/U2Formats/src/util/AssemblyPackAlgorithm.cpp b/src/corelibs/U2Formats/src/util/AssemblyPackAlgorithm.cpp index 204abab4bacacceccd0f233a407bf2e8c956aef0..dfd0f5b205aac4c5fc51af0c84f041b0bc9eb6c4 100644 --- a/src/corelibs/U2Formats/src/util/AssemblyPackAlgorithm.cpp +++ b/src/corelibs/U2Formats/src/util/AssemblyPackAlgorithm.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,10 +25,11 @@ #include <U2Core/GAutoDeleteList.h> #include <U2Core/Log.h> #include <U2Core/U2Assembly.h> +#include <U2Core/U2Region.h> namespace U2 { -static qint64 selectProw(qint64* tails, qint64 start, qint64 end ){ +static qint64 selectProw(qint64* tails, qint64 start, qint64 end) { for (int i = 0; i < PACK_TAIL_SIZE; i++) { if (tails[i] <= start) { tails[i] = end; @@ -39,8 +40,8 @@ static qint64 selectProw(qint64* tails, qint64 start, qint64 end ){ } PackAlgorithmContext::PackAlgorithmContext() { - maxProw = 0; - nReads = 0; + maxProw = 0; + nReads = 0; peakEnd = -1; peakRow = PACK_TAIL_SIZE; tails.resize(PACK_TAIL_SIZE); @@ -71,16 +72,16 @@ void AssemblyPackAlgorithm::pack(PackAlgorithmAdapter& adapter, U2AssemblyPackSt stat.maxProw = ctx.maxProw; if ((++nPacked % PACK_TRACE_CHECKPOINT) == 0) { - perfLog.trace(QString("Assembly: number packed reads so far: %1 of %2 (%3%)").arg(nPacked).arg(stat.readsCount).arg(100*nPacked/stat.readsCount)); + perfLog.trace(QString("Assembly: number packed reads so far: %1 of %2 (%3%)").arg(nPacked).arg(stat.readsCount).arg(100 * nPacked / stat.readsCount)); } } assert(stat.readsCount == nPacked); t1.stop(); - perfLog.trace(QString("Assembly: algorithm pack time: %1 seconds").arg((GTimer::currentTimeMicros() - t0) / float(1000*1000))); + perfLog.trace(QString("Assembly: algorithm pack time: %1 seconds").arg((GTimer::currentTimeMicros() - t0) / float(1000 * 1000))); } -int AssemblyPackAlgorithm::packRead(const U2Region& reg, PackAlgorithmContext& ctx, U2OpStatus& ) { +int AssemblyPackAlgorithm::packRead(const U2Region& reg, PackAlgorithmContext& ctx, U2OpStatus&) { int prow = selectProw(ctx.tails.data(), reg.startPos, reg.endPos()); if (prow == -1) { if (reg.startPos > ctx.peakEnd) { diff --git a/src/corelibs/U2Formats/src/util/AssemblyPackAlgorithm.h b/src/corelibs/U2Formats/src/util/AssemblyPackAlgorithm.h index 42adb520499c9d18673f5e4aa3b1de9c0aff2764..92ed14cdca3ce4afdba75390ec8ebc7e5ffb5148 100644 --- a/src/corelibs/U2Formats/src/util/AssemblyPackAlgorithm.h +++ b/src/corelibs/U2Formats/src/util/AssemblyPackAlgorithm.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/util/PairedFastqComparator.cpp b/src/corelibs/U2Formats/src/util/PairedFastqComparator.cpp index 1119b67d9da31b4a6094c260bc3e183a685d2795..31c5a53970e854294c872ca2e118edb23bf1c08d 100644 --- a/src/corelibs/U2Formats/src/util/PairedFastqComparator.cpp +++ b/src/corelibs/U2Formats/src/util/PairedFastqComparator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/util/PairedFastqComparator.h b/src/corelibs/U2Formats/src/util/PairedFastqComparator.h index b0b4fba53ec67deaa68b355bd016d218474ee36f..129ea0505160ec94d502b252c5c518955b9b326b 100644 --- a/src/corelibs/U2Formats/src/util/PairedFastqComparator.h +++ b/src/corelibs/U2Formats/src/util/PairedFastqComparator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/util/SnpeffInfoParser.cpp b/src/corelibs/U2Formats/src/util/SnpeffInfoParser.cpp index b97250c617db798d099b5c56b8201d52446d7b32..b05d0075207fa734b265dc27a9165a23db4d01f5 100644 --- a/src/corelibs/U2Formats/src/util/SnpeffInfoParser.cpp +++ b/src/corelibs/U2Formats/src/util/SnpeffInfoParser.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/util/SnpeffInfoParser.h b/src/corelibs/U2Formats/src/util/SnpeffInfoParser.h index c83edbf7e5438418dcd4985f272a1aa533dc59d2..2946154974c9f2529de7b22325aec6c74b61fedb 100644 --- a/src/corelibs/U2Formats/src/util/SnpeffInfoParser.h +++ b/src/corelibs/U2Formats/src/util/SnpeffInfoParser.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/util/TabulatedFormatReader.cpp b/src/corelibs/U2Formats/src/util/TabulatedFormatReader.cpp index 29f6aeb6bf348dd3df36887a4afd31fcc4813145..9b0fcb1192b9848b77ed800cc9c1e257f2aa7933 100644 --- a/src/corelibs/U2Formats/src/util/TabulatedFormatReader.cpp +++ b/src/corelibs/U2Formats/src/util/TabulatedFormatReader.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/src/util/TabulatedFormatReader.h b/src/corelibs/U2Formats/src/util/TabulatedFormatReader.h index 70317c84981d24dbf5b8d15a708f09185046757d..27b4b13b51364a848784710619206c16a90de499 100644 --- a/src/corelibs/U2Formats/src/util/TabulatedFormatReader.h +++ b/src/corelibs/U2Formats/src/util/TabulatedFormatReader.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Formats/transl/russian.ts b/src/corelibs/U2Formats/transl/russian.ts index 752061d613fc580cbda7d0d7fcd255f2f8abe7d5..d4a80419727f0b6b19ec92df8d636053370b0b26 100644 --- a/src/corelibs/U2Formats/transl/russian.ts +++ b/src/corelibs/U2Formats/transl/russian.ts @@ -4,22 +4,22 @@ <context> <name>EMBLGenbankAbstractDocument</name> <message> - <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="56"/> + <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="57"/> <source>The file contains features of another remote GenBank file. These features have been skipped.</source> <translation>Файл Ñодержит аннотации другого GenBank файла. Ðти аннотации проигнорированы.</translation> </message> <message> - <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="57"/> + <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="58"/> <source>The file contains joined annotations with regions, located on different strands. All such joined parts will be stored on the same strand.</source> <translation>Файл Ñодержит аннотации приÑоединенные к регионам, раÑположенным на другой цепи. Ð’Ñе такие аннотации будут Ñохранены на одной цепи.</translation> </message> <message> - <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="58"/> + <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="59"/> <source>Location parsing error.</source> <translation>Location parsing error.</translation> </message> <message> - <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="59"/> + <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="60"/> <source>The number of valid sequence characters does not coincide with the declared size in the sequence header.</source> <translation>ЧиÑло допуÑтимых Ñимволов поÑледовательноÑти не Ñовпадает Ñ Ð·Ð°Ñвленным размером в заголовке поÑледовательноÑти.</translation> </message> @@ -85,25 +85,35 @@ <translation>Ðевозможно запиÑать данные. База данных закрыта или данные были изменены.</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="84"/> <source>BED</source> - <translation>BED</translation> + <translation type="vanished">BED</translation> </message> <message> - <location filename="../src/FpkmTrackingFormat.cpp" line="76"/> <source>FPKM Tracking Format</source> - <translation>FPKM Tracking Format</translation> + <translation type="vanished">FPKM Tracking Format</translation> </message> <message> - <location filename="../src/GTFFormat.cpp" line="84"/> <source>GTF</source> - <translation>GTF</translation> + <translation type="vanished">GTF</translation> </message> <message> <location filename="../src/mysql_dbi/MysqlObjectDbi.cpp" line="773"/> <source>Unexpected number of modified objects. Expected: 1, actual: %1</source> <translation>Unexpected number of modified objects. Expected: 1, actual: %1</translation> </message> + <message> + <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="272"/> + <location filename="../src/FastaFormat.cpp" line="303"/> + <location filename="../src/FastqFormat.cpp" line="422"/> + <source>Document sequences were merged</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/PDWFormat.cpp" line="170"/> + <location filename="../src/StockholmFormat.cpp" line="741"/> + <source>The document is created not by UGENE</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>U2::ABIFormat</name> @@ -141,27 +151,27 @@ <translation>ACE</translation> </message> <message> - <location filename="../src/ace/AceFormat.cpp" line="216"/> + <location filename="../src/ace/AceFormat.cpp" line="213"/> <source>Line is too long</source> <translation>Строка Ñлишком длиннаÑ</translation> </message> <message> - <location filename="../src/ace/AceFormat.cpp" line="378"/> + <location filename="../src/ace/AceFormat.cpp" line="349"/> <source>A name is not match with AF names</source> <translation>Ð˜Ð¼Ñ Ð½Ðµ Ñовпадает Ñ Ð¸Ð¼ÐµÐ½Ð°Ð¼Ð¸ AF</translation> </message> <message> - <location filename="../src/ace/AceFormat.cpp" line="420"/> + <location filename="../src/ace/AceFormat.cpp" line="388"/> <source>First line is not an ace header</source> <translation>ÐŸÐµÑ€Ð²Ð°Ñ Ñтрока не ÑвлÑетÑÑ Ð·Ð°Ð³Ð¾Ð»Ð¾Ð²ÐºÐ¾Ð¼ ACE</translation> </message> <message> - <location filename="../src/ace/AceFormat.cpp" line="425"/> + <location filename="../src/ace/AceFormat.cpp" line="391"/> <source>No contig count tag in the header line</source> <translation>ОтÑутÑтвует тег чиÑла контигов в Ñтроке заголовка</translation> </message> <message> - <location filename="../src/ace/AceFormat.cpp" line="439"/> + <location filename="../src/ace/AceFormat.cpp" line="404"/> <source>Must be CO keyword</source> <translation>ОжидаетÑÑ ÐºÐ»ÑŽÑ‡ÐµÐ²Ð¾Ðµ Ñлово CO</translation> </message> @@ -171,13 +181,13 @@ <translation>Ðеожиданный конец файла</translation> </message> <message> - <location filename="../src/ace/AceFormat.cpp" line="453"/> + <location filename="../src/ace/AceFormat.cpp" line="414"/> <source>There is no note about reads count</source> <translation>ОтÑуÑтвтует Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ чиÑле Ñчитываний</translation> </message> <message> - <location filename="../src/ace/AceFormat.cpp" line="228"/> - <location filename="../src/ace/AceFormat.cpp" line="278"/> + <location filename="../src/ace/AceFormat.cpp" line="223"/> + <location filename="../src/ace/AceFormat.cpp" line="266"/> <source>There is no AF note</source> <translation>ОтÑутÑтвует</translation> </message> @@ -187,70 +197,70 @@ <translation>ACE Ñто формат иÑпользуемый Ð´Ð»Ñ Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ð¸ о геномных конфигурациÑÑ…</translation> </message> <message> - <location filename="../src/ace/AceFormat.cpp" line="232"/> - <location filename="../src/ace/AceFormat.cpp" line="298"/> + <location filename="../src/ace/AceFormat.cpp" line="224"/> + <location filename="../src/ace/AceFormat.cpp" line="281"/> <source>A name is duplicated</source> <translation>Повторные Ð²Ñ…Ð¾Ð¶Ð´ÐµÐ½Ð¸Ñ Ð¸Ð¼ÐµÐ½Ð¸</translation> </message> <message> - <location filename="../src/ace/AceFormat.cpp" line="240"/> + <location filename="../src/ace/AceFormat.cpp" line="231"/> <source>No consensus</source> <translation>ОтÑутÑтвует конÑенÑуÑ</translation> </message> <message> - <location filename="../src/ace/AceFormat.cpp" line="251"/> + <location filename="../src/ace/AceFormat.cpp" line="243"/> <source>BQ keyword hasn't been found</source> <translation>Ðе найдено ключевое Ñлово BQ</translation> </message> <message> - <location filename="../src/ace/AceFormat.cpp" line="256"/> + <location filename="../src/ace/AceFormat.cpp" line="246"/> <source>Bad consensus data</source> <translation>Плохие данные в конÑенÑуÑе</translation> </message> <message> - <location filename="../src/ace/AceFormat.cpp" line="285"/> - <location filename="../src/ace/AceFormat.cpp" line="291"/> + <location filename="../src/ace/AceFormat.cpp" line="273"/> + <location filename="../src/ace/AceFormat.cpp" line="278"/> <source>Bad AF note</source> <translation>Плохое примечание AF</translation> </message> <message> - <location filename="../src/ace/AceFormat.cpp" line="328"/> + <location filename="../src/ace/AceFormat.cpp" line="308"/> <source>There is no read note</source> <translation>ОтÑутÑтвует</translation> </message> <message> - <location filename="../src/ace/AceFormat.cpp" line="336"/> + <location filename="../src/ace/AceFormat.cpp" line="316"/> <source>No sequence</source> <translation>Ðет поÑледовательноÑти</translation> </message> <message> - <location filename="../src/ace/AceFormat.cpp" line="347"/> + <location filename="../src/ace/AceFormat.cpp" line="328"/> <source>QA keyword hasn't been found</source> <translation>Ключевое Ñлово QA не было найдено</translation> </message> <message> - <location filename="../src/ace/AceFormat.cpp" line="355"/> - <location filename="../src/ace/AceFormat.cpp" line="361"/> + <location filename="../src/ace/AceFormat.cpp" line="334"/> + <location filename="../src/ace/AceFormat.cpp" line="337"/> <source>QA error no clear range</source> <translation>Ошибка QA нет четкого региона</translation> </message> <message> - <location filename="../src/ace/AceFormat.cpp" line="367"/> + <location filename="../src/ace/AceFormat.cpp" line="341"/> <source>QA error bad range</source> <translation>Ошибка QA: плохой регион</translation> </message> <message> - <location filename="../src/ace/AceFormat.cpp" line="373"/> + <location filename="../src/ace/AceFormat.cpp" line="346"/> <source>Bad sequence data</source> <translation>Ðекорректные данные в поÑледовательноÑти</translation> </message> <message> - <location filename="../src/ace/AceFormat.cpp" line="504"/> + <location filename="../src/ace/AceFormat.cpp" line="462"/> <source>Alphabet unknown</source> <translation>ÐеизвеÑтный алфавит</translation> </message> <message> - <location filename="../src/ace/AceFormat.cpp" line="530"/> + <location filename="../src/ace/AceFormat.cpp" line="488"/> <source>File doesn't contain any msa objects</source> <translation>Файл не Ñодержит msa объектов</translation> </message> @@ -263,12 +273,12 @@ <translation>MMDB</translation> </message> <message> - <location filename="../src/ASNFormat.h" line="149"/> + <location filename="../src/ASNFormat.h" line="145"/> <source>read error occurred</source> <translation>Ошибка чтениÑ</translation> </message> <message> - <location filename="../src/ASNFormat.h" line="157"/> + <location filename="../src/ASNFormat.h" line="154"/> <source>biostruct3d obj loading error: %1</source> <translation>Ошибка загрузки трехмерной Ñтруктуры: %1</translation> </message> @@ -312,7 +322,7 @@ <translation>SNP форматы иÑпользуютÑÑ Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð»Ð¸Ð¼Ð¾Ñ€Ñ„Ð¸Ð·Ð¼Ð° однонуклеотидных данных</translation> </message> <message> - <location filename="../src/AbstractVariationFormat.cpp" line="141"/> + <location filename="../src/AbstractVariationFormat.cpp" line="142"/> <source>Line %1: There are too few columns in this line. The line was skipped.</source> <translation>Строка %1: Слишком мало Ñтолбцов в Ñтой Ñтроке. Строка была проигнорирована.</translation> </message> @@ -356,47 +366,47 @@ <context> <name>U2::AprFormat</name> <message> - <location filename="../src/apr/AprFormat.cpp" line="60"/> + <location filename="../src/apr/AprFormat.cpp" line="61"/> <source>Unexpected end of file</source> <translation>Ðеожиданный конец файла</translation> </message> <message> - <location filename="../src/apr/AprFormat.cpp" line="70"/> + <location filename="../src/apr/AprFormat.cpp" line="71"/> <source>There is no sequences in alignment</source> <translation>Выравнивание не Ñодержит поÑледовательноÑтей</translation> </message> <message> - <location filename="../src/apr/AprFormat.cpp" line="97"/> - <source>Attemt to find any number in the string failed</source> - <translation>Attemt to find any number in the string failed</translation> + <location filename="../src/apr/AprFormat.cpp" line="98"/> + <source>Attempt to find any number in the string failed</source> + <translation>Attempt to find any number in the string failed</translation> </message> <message> - <location filename="../src/apr/AprFormat.cpp" line="148"/> + <location filename="../src/apr/AprFormat.cpp" line="149"/> <source>Vector NTI/AlignX</source> <translation>Vector NTI/AlignX</translation> </message> <message> - <location filename="../src/apr/AprFormat.cpp" line="149"/> + <location filename="../src/apr/AprFormat.cpp" line="150"/> <source>Vector NTI/AlignX is a Vector NTI format for multiple alignment</source> <translation>Vector NTI/AlignX Ñто Vector NTI формат Ð´Ð»Ñ Ð¼Ð½Ð¾Ð¶ÐµÑтвенных выравниваний</translation> </message> <message> - <location filename="../src/apr/AprFormat.cpp" line="170"/> + <location filename="../src/apr/AprFormat.cpp" line="171"/> <source>Open in read-only mode</source> <translation>Открыть только Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ</translation> </message> <message> - <location filename="../src/apr/AprFormat.cpp" line="180"/> + <location filename="../src/apr/AprFormat.cpp" line="181"/> <source>File doesn't contain any msa objects</source> <translation>Файл не Ñодержит msa объектов</translation> </message> <message> - <location filename="../src/apr/AprFormat.cpp" line="202"/> + <location filename="../src/apr/AprFormat.cpp" line="205"/> <source>Illegal header line</source> <translation>ÐÐµÐ¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ð°Ñ Ñтрока заголовка</translation> </message> <message> - <location filename="../src/apr/AprFormat.cpp" line="218"/> + <location filename="../src/apr/AprFormat.cpp" line="220"/> <source>Sequences not found</source> <translation>ПоÑледовательноÑти не найдены</translation> </message> @@ -479,117 +489,122 @@ <context> <name>U2::BedFormat</name> <message> - <location filename="../src/BedFormat.cpp" line="105"/> + <location filename="../src/BedFormat.cpp" line="104"/> <source>The BED (Browser Extensible Data) format was developed by UCSC for displaying transcript structures in the genome browser.</source> <translation>BED (Browser Extensible Data) формат был разработан UCSC Ð´Ð»Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ñ‚Ñ€Ð°Ð½Ñкриптных Ñтруктур в геномном браузере.</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="143"/> + <location filename="../src/BedFormat.cpp" line="142"/> <source>File "%1" contains too many annotation tables to be displayed. However, you can process these data using pipelines built with Workflow Designer.</source> <translation>File "%1" contains too many annotation tables to be displayed. However, you can process these data using pipelines built with Workflow Designer.</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="900"/> + <location filename="../src/BedFormat.cpp" line="899"/> <source>BED parsing error: incorrect format of the 'track' header line!</source> <translation>BED parsing error: incorrect format of the 'track' header line!</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="685"/> + <location filename="../src/BedFormat.cpp" line="684"/> <source>BED parsing error: unexpected number of fields in the first annotations line!</source> <translation>BED parsing error: unexpected number of fields in the first annotations line!</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="727"/> + <location filename="../src/BedFormat.cpp" line="103"/> + <source>BED</source> + <translation type="unfinished">BED</translation> + </message> + <message> + <location filename="../src/BedFormat.cpp" line="726"/> <source>The file does not contain valid annotations!</source> <translation>Файл не Ñодержит корректных аннотаций!</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="974"/> + <location filename="../src/BedFormat.cpp" line="973"/> <source>BED parsing error: incorrect number of fields at line %1!</source> <translation>BED parsing error: incorrect number of fields at line %1!</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="978"/> + <location filename="../src/BedFormat.cpp" line="977"/> <source>BED parsing error: a field at line %1 is empty!</source> <translation>BED parsing error: a field at line %1 is empty!</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="982"/> + <location filename="../src/BedFormat.cpp" line="981"/> <source>BED parsing error: incorrect coordinates at line %1!</source> <translation>BED parsing error: incorrect coordinates at line %1!</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="986"/> + <location filename="../src/BedFormat.cpp" line="985"/> <source>BED parsing error: incorrect score value '%1' at line %2!</source> <translation>BED parsing error: incorrect score value '%1' at line %2!</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="991"/> + <location filename="../src/BedFormat.cpp" line="990"/> <source>BED parsing error: incorrect strand value '%1' at line %2!</source> <translation>BED parsing error: incorrect strand value '%1' at line %2!</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="996"/> + <location filename="../src/BedFormat.cpp" line="995"/> <source>BED parsing error: incorrect thick coordinates at line %1!</source> <translation>BED parsing error: incorrect thick coordinates at line %1!</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="1000"/> + <location filename="../src/BedFormat.cpp" line="999"/> <source>BED parsing error: incorrect itemRgb value '%1' at line %2!</source> <translation>BED parsing error: incorrect itemRgb value '%1' at line %2!</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="1005"/> + <location filename="../src/BedFormat.cpp" line="1004"/> <source>BED parsing error: incorrect value of the block parameters at line %1!</source> <translation>BED parsing error: incorrect value of the block parameters at line %1!</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="425"/> + <location filename="../src/BedFormat.cpp" line="424"/> <source>Starting BED saving: '%1'</source> <translation>Сохранение BED: '%1'</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="436"/> + <location filename="../src/BedFormat.cpp" line="435"/> <source>Can not convert GObject to AnnotationTableObject</source> <translation>Can not convert GObject to AnnotationTableObject</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="450"/> + <location filename="../src/BedFormat.cpp" line="449"/> <source>Can not detect chromosome name. 'Chr' name will be used.</source> <translation>Can not detect chromosome name. 'Chr' name will be used.</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="467"/> + <location filename="../src/BedFormat.cpp" line="466"/> <source>You are trying to save joined annotation to BED format! The joining will be lost</source> <translation>Ð’Ñ‹ пытаетеÑÑŒ Ñохранить ÑвÑзанные аннотации в BED формат! Ð¡Ð¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ð±ÑƒÐ´ÑƒÑ‚ потерÑны</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="531"/> + <location filename="../src/BedFormat.cpp" line="530"/> <source>BED saving error: incorrect thick coordinates in the first annotation!</source> <translation>BED saving error: incorrect thick coordinates in the first annotation!</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="545"/> + <location filename="../src/BedFormat.cpp" line="544"/> <source>BED saving error: incorrect block fields in the first annotation!</source> <translation>BED saving error: incorrect block fields in the first annotation!</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="554"/> + <location filename="../src/BedFormat.cpp" line="553"/> <source>BED saving: detected %1 fields per line for file '%2'</source> <translation>BED saving: detected %1 fields per line for file '%2'</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="561"/> + <location filename="../src/BedFormat.cpp" line="560"/> <source>BED saving error: an annotation is expected to have '%1' qualifier, but it is absent! Skipping the annotation.</source> <translation>BED saving error: an annotation is expected to have '%1' qualifier, but it is absent! Skipping the annotation.</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="621"/> + <location filename="../src/BedFormat.cpp" line="620"/> <source>BED saving error: an annotation is expected to have the block qualifiers! Skipping the annotation.</source> <translation>BED saving error: an annotation is expected to have the block qualifiers! Skipping the annotation.</translation> </message> <message> - <location filename="../src/BedFormat.cpp" line="644"/> + <location filename="../src/BedFormat.cpp" line="643"/> <source>Finished BED saving: '%1'</source> <translation>Сохранение BED закончено: '%1'</translation> </message> @@ -657,6 +672,14 @@ <translation>Сжатие bgzip завершено. Ðовый bgzf файл: <a href="%1">%2</a></translation> </message> </context> +<context> + <name>U2::CalculateSequencesNumberTask</name> + <message> + <location filename="../src/tasks/CalculateSequencesNumberTask.cpp" line="28"/> + <source>Calculate sequences number</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>U2::CloneAssemblyWithReferenceToDbiTask</name> <message> @@ -700,42 +723,42 @@ <context> <name>U2::ClustalWAlnFormat</name> <message> - <location filename="../src/ClustalWAlnFormat.cpp" line="60"/> + <location filename="../src/ClustalWAlnFormat.cpp" line="65"/> <source>Clustalw is a format for storing multiple sequence alignments</source> <translation>Clustalw Ñто формат Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð¼Ð½Ð¾Ð¶ÐµÑтвенных выравниваний</translation> </message> <message> - <location filename="../src/ClustalWAlnFormat.cpp" line="83"/> + <location filename="../src/ClustalWAlnFormat.cpp" line="90"/> <source>Illegal header line</source> <translation>ÐÐµÐ¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ð°Ñ Ñтрока заголовка</translation> </message> <message> - <location filename="../src/ClustalWAlnFormat.cpp" line="103"/> + <location filename="../src/ClustalWAlnFormat.cpp" line="111"/> <source>Error parsing file</source> <translation>Ошибка разбора файла</translation> </message> <message> - <location filename="../src/ClustalWAlnFormat.cpp" line="115"/> + <location filename="../src/ClustalWAlnFormat.cpp" line="123"/> <source>Invalid alignment format</source> <translation>Ðеверный формат выравниваниÑ</translation> </message> <message> - <location filename="../src/ClustalWAlnFormat.cpp" line="156"/> + <location filename="../src/ClustalWAlnFormat.cpp" line="164"/> <source>Incorrect number of sequences in block</source> <translation>Ðеверное количеÑтво поÑледовательноÑтей в блоке</translation> </message> <message> - <location filename="../src/ClustalWAlnFormat.cpp" line="162"/> + <location filename="../src/ClustalWAlnFormat.cpp" line="170"/> <source>Sequence names are not matched</source> <translation>Ð’ÑтретилоÑÑŒ непарное Ð¸Ð¼Ñ Ð¿Ð¾ÑледовательноÑти</translation> </message> <message> - <location filename="../src/ClustalWAlnFormat.cpp" line="186"/> + <location filename="../src/ClustalWAlnFormat.cpp" line="194"/> <source>Alphabet is unknown</source> <translation>ÐеизвеÑтный алфавит</translation> </message> <message> - <location filename="../src/ClustalWAlnFormat.cpp" line="59"/> + <location filename="../src/ClustalWAlnFormat.cpp" line="64"/> <source>CLUSTALW</source> <translation>CLUSTALW</translation> </message> @@ -867,7 +890,7 @@ <translation>Дифференциальный формат Ñто текÑтовый формат Ð´Ð»Ñ Ð¿Ñ€ÐµÐ´ÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ñ‹Ñ… файлов Cuffdiff.</translation> </message> <message> - <location filename="../src/DifferentialFormat.cpp" line="289"/> + <location filename="../src/DifferentialFormat.cpp" line="280"/> <source>Required column is missed: %1</source> <translation>Пропущен необходимый Ñтолбец: %1</translation> </message> @@ -875,10 +898,10 @@ <context> <name>U2::Document</name> <message> - <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="264"/> - <location filename="../src/FastaFormat.cpp" line="272"/> - <location filename="../src/FastqFormat.cpp" line="391"/> - <location filename="../src/PDWFormat.cpp" line="154"/> + <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="266"/> + <location filename="../src/FastaFormat.cpp" line="279"/> + <location filename="../src/FastqFormat.cpp" line="408"/> + <location filename="../src/PDWFormat.cpp" line="156"/> <source>Document is empty.</source> <translation>Документ не Ñодержит данных.</translation> </message> @@ -896,12 +919,12 @@ <translation>Ðеверный формат, который был добавлен в процеÑÑе реализации Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ðº базе данных в рамках ÑущеÑтвующей модели документа.</translation> </message> <message> - <location filename="../src/DatabaseConnectionFormat.cpp" line="90"/> + <location filename="../src/DatabaseConnectionFormat.cpp" line="86"/> <source>You have no permissions to modify the content of this database</source> <translation>У Ð²Ð°Ñ Ð½ÐµÐ´Ð¾Ñтаточно прав чтобы изменÑÑ‚ÑŒ Ñодержимое Ñтой базы данных</translation> </message> <message> - <location filename="../src/DatabaseConnectionFormat.cpp" line="110"/> + <location filename="../src/DatabaseConnectionFormat.cpp" line="106"/> <source>Empty object name</source> <translation>Ð˜Ð¼Ñ Ð¾Ð±ÑŠÐµÐºÑ‚Ð° пуÑто</translation> </message> @@ -1085,80 +1108,80 @@ <context> <name>U2::EMBLGenbankAbstractDocument</name> <message> - <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="580"/> + <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="582"/> <location filename="../src/SwissProtPlainTextFormat.cpp" line="318"/> <source>Annotation name is empty</source> <translation>Ðе указано Ð¸Ð¼Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ð¸</translation> </message> <message> - <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="589"/> + <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="593"/> <source>Error parsing location</source> <translation>Ðе указан регион аннотации</translation> </message> <message> - <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="684"/> + <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="686"/> <source>Error parsing sequence: unexpected empty line</source> <translation>Ошибка Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð¿Ð¾ÑледовательноÑти: пуÑÑ‚Ð°Ñ Ñтрока</translation> </message> <message> - <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="615"/> + <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="621"/> <location filename="../src/SwissProtPlainTextFormat.cpp" line="372"/> <source>Unexpected line format</source> <translation>Слишком Ð´Ð»Ð¸Ð½Ð½Ð°Ñ Ñтрока или неожиданный конец файла</translation> </message> <message> - <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="128"/> + <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="129"/> <source>File "%1" contains too many sequences to be displayed. However, you can process these data using instruments from the menu <i>Tools -> NGS data analysis</i> or pipelines built with Workflow Designer.</source> <translation>File "%1" contains too many sequences to be displayed. However, you can process these data using instruments from the menu <i>Tools -> NGS data analysis</i> or pipelines built with Workflow Designer.</translation> </message> <message> - <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="145"/> - <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="314"/> + <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="146"/> + <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="315"/> <source>Reading entry header</source> <translation>Чтение заголовка</translation> </message> <message> - <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="219"/> + <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="223"/> <source>Merge error: found annotations without sequence</source> <translation>Ошибка ÑлиÑниÑ: обнаружена таблица аннотаций без Ñоотв поÑледовательноÑти</translation> </message> <message> - <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="471"/> + <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="474"/> <source>The file contains an incorrect data that describes a qualifier value. </source> <translation>Файл Ñодержит некорректные данные, которые опиÑываютÑÑ value. </translation> </message> <message> - <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="472"/> + <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="475"/> <source>The value cannot contain a single quote character. The qualifier is '%1'</source> <translation>Значение не может Ñодержать одиночные кавычки. Квалификатор '%1'</translation> </message> <message> - <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="669"/> + <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="676"/> <source>Reading sequence %1</source> <translation>Чтение поÑледовательноÑти: %1</translation> </message> <message> - <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="704"/> + <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="701"/> <source>Sequence is truncated</source> <translation>ПоÑледовательноÑÑ‚ÑŒ повреждена</translation> </message> <message> - <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="710"/> + <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="707"/> <source>Reading annotations %1</source> <translation>Чтение аннотаций: %1</translation> </message> <message> - <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="720"/> + <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="717"/> <source>Invalid format of feature table</source> <translation>Таблица аннотаций повреждена</translation> </message> <message> - <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="808"/> + <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="814"/> <source>Line is too long.</source> <translation>Слишком Ð´Ð»Ð¸Ð½Ð½Ð°Ñ Ñтрока.</translation> </message> <message> - <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="810"/> + <location filename="../src/EMBLGenbankAbstractDocument.cpp" line="816"/> <source>IO error.</source> <translation>Ошибка чтениÑ.</translation> </message> @@ -1211,45 +1234,45 @@ <translation>Формат FASTA ÑвлÑетÑÑ Ñ‚ÐµÐºÑтовым форматом Ð´Ð»Ñ Ð¿Ñ€ÐµÐ´ÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð½ÑƒÐºÐ»ÐµÐ¾Ñ‚Ð¸Ð´Ð½Ñ‹Ñ… или пептидных поÑледовательноÑтей, в котором пары оÑнований или аминокиÑлоты предÑтавлены Ñ Ð¸Ñпользованием одно-буквенных кодов. Формат также позволÑет задавать имена и комментарии к поÑледовательноÑÑ‚Ñм.</translation> </message> <message> - <location filename="../src/FastaFormat.cpp" line="179"/> - <location filename="../src/FastaFormat.cpp" line="409"/> + <location filename="../src/FastaFormat.cpp" line="182"/> + <location filename="../src/FastaFormat.cpp" line="418"/> <source>Line is too long</source> <translation>Слишком Ð´Ð»Ð¸Ð½Ð½Ð°Ñ Ñтрока</translation> </message> <message> - <location filename="../src/FastaFormat.cpp" line="182"/> - <location filename="../src/FastaFormat.cpp" line="411"/> + <location filename="../src/FastaFormat.cpp" line="185"/> + <location filename="../src/FastaFormat.cpp" line="420"/> <source>First line is not a FASTA header</source> <translation>Ðеправильный заголовок FASTA</translation> </message> <message> - <location filename="../src/FastaFormat.cpp" line="240"/> + <location filename="../src/FastaFormat.cpp" line="247"/> <source>File "%1" contains too many sequences to be displayed. However, you can process these data using instruments from the menu <i>Tools -> NGS data analysis</i> or pipelines built with Workflow Designer.</source> <translation>File "%1" contains too many sequences to be displayed. However, you can process these data using instruments from the menu <i>Tools -> NGS data analysis</i> or pipelines built with Workflow Designer.</translation> </message> <message> - <location filename="../src/FastaFormat.cpp" line="278"/> + <location filename="../src/FastaFormat.cpp" line="285"/> <source>Loaded sequences: %1. </source> <translation>Loaded sequences: %1. </translation> </message> <message> - <location filename="../src/FastaFormat.cpp" line="279"/> + <location filename="../src/FastaFormat.cpp" line="286"/> <source>Skipped sequences: %1. </source> <translation>Пропущены поÑледовательноÑти: %1. </translation> </message> <message> - <location filename="../src/FastaFormat.cpp" line="280"/> + <location filename="../src/FastaFormat.cpp" line="287"/> <source>The following sequences are empty: %1</source> <translation>Следующие поÑледовательноÑти пуÑÑ‚Ñ‹: %1</translation> </message> <message> - <location filename="../src/FastaFormat.cpp" line="477"/> + <location filename="../src/FastaFormat.cpp" line="486"/> <source>Unreferenced sequence in the beginning of patterns: %1</source> <translation>ÐеиÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÐµÐ¼Ð°Ñ Ð¿Ð¾ÑледовательноÑÑ‚ÑŒ в начале образцов: %1</translation> </message> @@ -1262,48 +1285,49 @@ <context> <name>U2::FastqFormat</name> <message> - <location filename="../src/FastqFormat.cpp" line="51"/> + <location filename="../src/FastqFormat.cpp" line="54"/> <source>FASTQ</source> <translation>FASTQ</translation> </message> <message> - <location filename="../src/FastqFormat.cpp" line="54"/> + <location filename="../src/FastqFormat.cpp" line="55"/> <source>FASTQ format is a text-based format for storing both a biological sequence (usually nucleotide sequence) and its corresponding quality scores. Both the sequence letter and quality score are encoded with a single ASCII character for brevity. It was originally developed at the Wellcome Trust Sanger Institute to bundle a FASTA sequence and its quality data, but has recently become the de facto standard for storing the output of high throughput sequencing instruments.</source> <translation>Формат FASTQ ÑвлÑетÑÑ Ñ‚ÐµÐºÑтовым форматом Ð´Ð»Ñ Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð±Ð¸Ð¾Ð»Ð¾Ð³Ð¸Ñ‡ÐµÑких поÑледовательноÑтей (обычно нуклеотидных) и ÑоответÑтвующих им показателей качеÑтва. ПоÑледовательноÑÑ‚ÑŒ и показатель качеÑтва кодируютÑÑ Ð¿Ñ€Ð¸ помощи одного Ñимвола ASCII Ð´Ð»Ñ ÐºÑ€Ð°Ñ‚ÐºÐ¾Ñти. Изначально он был разработан в Wellcome Trust Sanger Institute Ð´Ð»Ñ ÑвÑзи поÑледовательноÑти в формате FASTA и их данных качеÑтва, но в поÑледнее Ð²Ñ€ÐµÐ¼Ñ Ñтал Ñтандартом Ð´Ð»Ñ Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ñ‹Ñ… данных инÑтрументов ÑеквенированиÑ.</translation> </message> <message> - <location filename="../src/FastqFormat.cpp" line="135"/> + <location filename="../src/FastqFormat.cpp" line="148"/> + <location filename="../src/FastqFormat.cpp" line="155"/> <source>Error while trying to find sequence name start</source> <translation>Ðе удалоÑÑŒ найти начало имени поÑледовательноÑти</translation> </message> <message> - <location filename="../src/FastqFormat.cpp" line="173"/> - <location filename="../src/FastqFormat.cpp" line="199"/> + <location filename="../src/FastqFormat.cpp" line="176"/> + <location filename="../src/FastqFormat.cpp" line="209"/> <source>Error while reading sequence</source> <translation>Ошибка Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð¿Ð¾ÑледовательноÑти</translation> </message> <message> - <location filename="../src/FastqFormat.cpp" line="324"/> + <location filename="../src/FastqFormat.cpp" line="344"/> <source>Sequence name differs from quality scores name: %1 and %2</source> <translation>Sequence name differs from quality scores name: %1 and %2</translation> </message> <message> - <location filename="../src/FastqFormat.cpp" line="344"/> + <location filename="../src/FastqFormat.cpp" line="363"/> <source>Bad quality scores: inconsistent size.</source> <translation>Bad quality scores: inconsistent size.</translation> </message> <message> - <location filename="../src/FastqFormat.cpp" line="363"/> + <location filename="../src/FastqFormat.cpp" line="380"/> <source>File "%1" contains too many sequences to be displayed. However, you can process these data using instruments from the menu <i>Tools -> NGS data analysis</i> or pipelines built with Workflow Designer.</source> <translation>File "%1" contains too many sequences to be displayed. However, you can process these data using instruments from the menu <i>Tools -> NGS data analysis</i> or pipelines built with Workflow Designer.</translation> </message> <message> - <location filename="../src/FastqFormat.cpp" line="559"/> + <location filename="../src/FastqFormat.cpp" line="577"/> <source>Not a valid FASTQ file, sequence name differs from quality scores name</source> <translation>Ðекорректный FASTQ файл, Ð¸Ð¼Ñ Ð¿Ð¾ÑледовательноÑти отличаетÑÑ Ð¾Ñ‚ имени показателей качеÑтва</translation> </message> <message> - <location filename="../src/FastqFormat.cpp" line="568"/> + <location filename="../src/FastqFormat.cpp" line="585"/> <source>Not a valid FASTQ file. Bad quality scores: inconsistent size.</source> <translation>Ðекорректный FASTQ файл. Плохие показатели качеÑтва: неÑовмеÑтимый размер.</translation> </message> @@ -1311,72 +1335,77 @@ <context> <name>U2::FpkmTrackingFormat</name> <message> - <location filename="../src/FpkmTrackingFormat.cpp" line="94"/> + <location filename="../src/FpkmTrackingFormat.cpp" line="92"/> + <source>FPKM Tracking Format</source> + <translation type="unfinished">FPKM Tracking Format</translation> + </message> + <message> + <location filename="../src/FpkmTrackingFormat.cpp" line="93"/> <source>The FPKM (fragments per kilobase of exon model per million mapped fragments) Tracking Format is a native Cufflinks format to output estimated expression values.</source> <translation>FPKM (fragments per kilobase of exon model per million mapped fragments) Tracking Format Ñто внутренний Cufflinks формат Ð´Ð»Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ñ‹Ñ… значений оценки выражений.</translation> </message> <message> - <location filename="../src/FpkmTrackingFormat.cpp" line="128"/> + <location filename="../src/FpkmTrackingFormat.cpp" line="129"/> <source>Internal error: qualifier with name '%1' and '%2' can't be added</source> <translation>Internal error: qualifier with name '%1' and '%2' can't be added</translation> </message> <message> - <location filename="../src/FpkmTrackingFormat.cpp" line="159"/> + <location filename="../src/FpkmTrackingFormat.cpp" line="160"/> <source>FPKM Tracking Format parsing error: incorrect number of fields at line %1!</source> <translation>FPKM Tracking Format parsing error: incorrect number of fields at line %1!</translation> </message> <message> - <location filename="../src/FpkmTrackingFormat.cpp" line="164"/> + <location filename="../src/FpkmTrackingFormat.cpp" line="165"/> <source>FPKM Tracking Format parsing error: a field at line %1 is empty!</source> <translation>FPKM Tracking Format parsing error: a field at line %1 is empty!</translation> </message> <message> - <location filename="../src/FpkmTrackingFormat.cpp" line="169"/> + <location filename="../src/FpkmTrackingFormat.cpp" line="170"/> <source>FPKM Tracking Format parsing error: incorrect coordinates at line %1!</source> <translation>FPKM Tracking Format parsing error: incorrect coordinates at line %1!</translation> </message> <message> - <location filename="../src/FpkmTrackingFormat.cpp" line="181"/> + <location filename="../src/FpkmTrackingFormat.cpp" line="182"/> <source>FPKM Tracking Format parsing error: different sequence names were detected in an input file. Sequence name '%1' is used.</source> <translation>FPKM Tracking Format parsing error: different sequence names were detected in an input file. Sequence name '%1' is used.</translation> </message> <message> - <location filename="../src/FpkmTrackingFormat.cpp" line="197"/> + <location filename="../src/FpkmTrackingFormat.cpp" line="198"/> <source>FPKM Tracking Format parsing error: tracking ID value is empty at line %1!</source> <translation>FPKM Tracking Format parsing error: tracking ID value is empty at line %1!</translation> </message> <message> - <location filename="../src/FpkmTrackingFormat.cpp" line="220"/> + <location filename="../src/FpkmTrackingFormat.cpp" line="221"/> <source>FPKM Tracking Format parsing error: incorrect length value at line %1!</source> <translation>FPKM Tracking Format parsing error: incorrect length value at line %1!</translation> </message> <message> - <location filename="../src/FpkmTrackingFormat.cpp" line="225"/> + <location filename="../src/FpkmTrackingFormat.cpp" line="226"/> <source>FPKM Tracking Format parsing error: incorrect coverage value at line %1!</source> <translation>FPKM Tracking Format parsing error: incorrect coverage value at line %1!</translation> </message> <message> - <location filename="../src/FpkmTrackingFormat.cpp" line="515"/> + <location filename="../src/FpkmTrackingFormat.cpp" line="517"/> <source>Skipped qualifier '%1' while saving a FPKM header.</source> <translation>Skipped qualifier '%1' while saving a FPKM header.</translation> </message> <message> - <location filename="../src/FpkmTrackingFormat.cpp" line="585"/> + <location filename="../src/FpkmTrackingFormat.cpp" line="587"/> <source>FPKM Tracking Format saving error: tracking ID shouldn't be empty!</source> <translation>FPKM Tracking Format saving error: tracking ID shouldn't be empty!</translation> </message> <message> - <location filename="../src/FpkmTrackingFormat.cpp" line="610"/> + <location filename="../src/FpkmTrackingFormat.cpp" line="612"/> <source>FPKM Tracking Format saving error: failed to parse locus qualifier '%1', writing it to the output file anyway!</source> <translation>FPKM Tracking Format saving error: failed to parse locus qualifier '%1', writing it to the output file anyway!</translation> </message> <message> - <location filename="../src/FpkmTrackingFormat.cpp" line="617"/> + <location filename="../src/FpkmTrackingFormat.cpp" line="619"/> <source>FPKM Tracking Format saving error: an annotation region (%1, %2) differs from the information stored in the 'locus' qualifier (%3, %4). Writing the 'locus' qualifier to output!</source> <translation>FPKM Tracking Format saving error: an annotation region (%1, %2) differs from the information stored in the 'locus' qualifier (%3, %4). Writing the 'locus' qualifier to output!</translation> </message> <message> - <location filename="../src/FpkmTrackingFormat.cpp" line="651"/> + <location filename="../src/FpkmTrackingFormat.cpp" line="653"/> <source>FPKM Tracking Format saving error: one or more errors occurred while saving a file, see TRACE log for details!</source> <translation>FPKM Tracking Format saving error: one or more errors occurred while saving a file, see TRACE log for details!</translation> </message> @@ -1394,92 +1423,92 @@ <translation>GFF Ñто формат иÑпользуемый Ð´Ð»Ñ Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ð¹</translation> </message> <message> - <location filename="../src/GFFFormat.cpp" line="91"/> + <location filename="../src/GFFFormat.cpp" line="94"/> <source>Parsing error: invalid header</source> <translation>Parsing error: invalid header</translation> </message> <message> - <location filename="../src/GFFFormat.cpp" line="95"/> + <location filename="../src/GFFFormat.cpp" line="98"/> <source>Parsing error: file does not contain version header</source> <translation>Parsing error: file does not contain version header</translation> </message> <message> - <location filename="../src/GFFFormat.cpp" line="99"/> + <location filename="../src/GFFFormat.cpp" line="102"/> <source>Parsing error: format version is not an integer</source> <translation>Parsing error: format version is not an integer</translation> </message> <message> - <location filename="../src/GFFFormat.cpp" line="103"/> + <location filename="../src/GFFFormat.cpp" line="106"/> <source>Parsing error: GFF version %1 is not supported</source> <translation>Parsing error: GFF version %1 is not supported</translation> </message> <message> - <location filename="../src/GFFFormat.cpp" line="219"/> + <location filename="../src/GFFFormat.cpp" line="222"/> <source>File "%1" contains too many sequences to be displayed. However, you can process these data using instruments from the menu <i>Tools -> NGS data analysis</i> or pipelines built with Workflow Designer.</source> <translation>File "%1" contains too many sequences to be displayed. However, you can process these data using instruments from the menu <i>Tools -> NGS data analysis</i> or pipelines built with Workflow Designer.</translation> </message> <message> - <location filename="../src/GFFFormat.cpp" line="265"/> + <location filename="../src/GFFFormat.cpp" line="276"/> <source>Parsing error: file contains empty line %1, line skipped</source> <translation>Parsing error: file contains empty line %1, line skipped</translation> </message> <message> - <location filename="../src/GFFFormat.cpp" line="305"/> + <location filename="../src/GFFFormat.cpp" line="316"/> <source>Parsing error: sequence in FASTA sequence has whitespaces at line %1</source> <translation>Parsing error: sequence in FASTA sequence has whitespaces at line %1</translation> </message> <message> - <location filename="../src/GFFFormat.cpp" line="312"/> + <location filename="../src/GFFFormat.cpp" line="323"/> <source>Parsing error: too few fields at line %1</source> <translation>Parsing error: too few fields at line %1</translation> </message> <message> - <location filename="../src/GFFFormat.cpp" line="318"/> + <location filename="../src/GFFFormat.cpp" line="329"/> <source>Parsing error: start position at line %1 is not integer</source> <translation>Parsing error: start position at line %1 is not integer</translation> </message> <message> - <location filename="../src/GFFFormat.cpp" line="324"/> + <location filename="../src/GFFFormat.cpp" line="335"/> <source>Parsing error: end position at line %1 is not integer</source> <translation>Parsing error: end position at line %1 is not integer</translation> </message> <message> - <location filename="../src/GFFFormat.cpp" line="329"/> + <location filename="../src/GFFFormat.cpp" line="340"/> <source>Parsing error: incorrect annotation region at line %1</source> <translation>Parsing error: incorrect annotation region at line %1</translation> </message> <message> - <location filename="../src/GFFFormat.cpp" line="380"/> + <location filename="../src/GFFFormat.cpp" line="391"/> <source>Parsing error: incorrect attributes field %1 at line %2</source> <translation>Parsing error: incorrect attributes field %1 at line %2</translation> </message> <message> - <location filename="../src/GFFFormat.cpp" line="419"/> + <location filename="../src/GFFFormat.cpp" line="430"/> <source>Parsing error: incorrect score parameter at line %1. Score can be a float number or '.' symbol</source> <translation>Parsing error: incorrect score parameter at line %1. Score can be a float number or '.' symbol</translation> </message> <message> - <location filename="../src/GFFFormat.cpp" line="429"/> + <location filename="../src/GFFFormat.cpp" line="440"/> <source>Parsing error: incorrect frame parameter at line %1. Frame can be a number between 0-2 or '.' symbol</source> <translation>Parsing error: incorrect frame parameter at line %1. Frame can be a number between 0-2 or '.' symbol</translation> </message> <message> - <location filename="../src/GFFFormat.cpp" line="439"/> + <location filename="../src/GFFFormat.cpp" line="450"/> <source>Parsing error: incorrect strand patameter at line %1. Strand can be '+','-' or '.'</source> <translation>Parsing error: incorrect strand patameter at line %1. Strand can be '+','-' or '.'</translation> </message> <message> - <location filename="../src/GFFFormat.cpp" line="494"/> + <location filename="../src/GFFFormat.cpp" line="508"/> <source>One or more sequences in this file don't have names. Their names are generated automatically.</source> <translation>One or more sequences in this file don't have names. Their names are generated automatically.</translation> </message> <message> - <location filename="../src/GFFFormat.cpp" line="613"/> + <location filename="../src/GFFFormat.cpp" line="627"/> <source>Can not detect chromosome name. 'Chr' name will be used.</source> <translation>Can not detect chromosome name. 'Chr' name will be used.</translation> </message> <message> - <location filename="../src/GFFFormat.cpp" line="370"/> + <location filename="../src/GFFFormat.cpp" line="381"/> <source>Wrong location for joined annotation at line %1. Line was skipped.</source> <translation>Wrong location for joined annotation at line %1. Line was skipped.</translation> </message> @@ -1487,72 +1516,70 @@ <context> <name>U2::GTFFormat</name> <message> - <location filename="../src/GTFFormat.cpp" line="102"/> + <location filename="../src/GTFFormat.cpp" line="104"/> + <source>GTF</source> + <translation type="unfinished">GTF</translation> + </message> + <message> + <location filename="../src/GTFFormat.cpp" line="105"/> <source>The Gene transfer format (GTF) is a file format used to hold information about gene structure.</source> <translation>The Gene transfer format (GTF) Ñто формат иÑпользуемый Ð´Ð»Ñ Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ð¸ о Ñтруктуре гена.</translation> </message> <message> - <location filename="../src/GTFFormat.cpp" line="158"/> + <location filename="../src/GTFFormat.cpp" line="161"/> <source>GTF parsing error: incorrect number of fields at line %1!</source> <translation>GTF parsing error: incorrect number of fields at line %1!</translation> </message> <message> - <location filename="../src/GTFFormat.cpp" line="163"/> + <location filename="../src/GTFFormat.cpp" line="166"/> <source>GTF parsing error: a field at line %1 is empty!</source> <translation>GTF parsing error: a field at line %1 is empty!</translation> </message> <message> - <location filename="../src/GTFFormat.cpp" line="168"/> + <location filename="../src/GTFFormat.cpp" line="171"/> <source>GTF parsing error: incorrect coordinates at line %1!</source> <translation>GTF parsing error: incorrect coordinates at line %1!</translation> </message> <message> - <location filename="../src/GTFFormat.cpp" line="180"/> <source>GTF parsing error: unexpected value of the "feature" value "%1" at line %2!</source> - <translation>GTF parsing error: unexpected value of the "feature" value "%1" at line %2!</translation> + <translation type="vanished">GTF parsing error: unexpected value of the "feature" value "%1" at line %2!</translation> </message> <message> - <location filename="../src/GTFFormat.cpp" line="198"/> + <location filename="../src/GTFFormat.cpp" line="196"/> <source>GTF parsing error: incorrect score value "%1" at line %2!</source> <translation>GTF parsing error: incorrect score value "%1" at line %2!</translation> </message> <message> - <location filename="../src/GTFFormat.cpp" line="206"/> + <location filename="../src/GTFFormat.cpp" line="204"/> <source>GTF parsing error: incorrect frame value "%1" at line %2!</source> <translation>GTF parsing error: incorrect frame value "%1" at line %2!</translation> </message> <message> - <location filename="../src/GTFFormat.cpp" line="227"/> + <location filename="../src/GTFFormat.cpp" line="225"/> <source>GTF parsing error: invalid attributes format at line %1!</source> <translation>GTF parsing error: invalid attributes format at line %1!</translation> </message> <message> - <location filename="../src/GTFFormat.cpp" line="234"/> - <location filename="../src/GTFFormat.cpp" line="239"/> <source>GTF parsing error: mandatory attribute '</source> - <translation>GTF parsing error: mandatory attribute '</translation> + <translation type="vanished">GTF parsing error: mandatory attribute '</translation> </message> <message> - <location filename="../src/GTFFormat.cpp" line="235"/> - <location filename="../src/GTFFormat.cpp" line="240"/> <source>' is absent at line %1!</source> - <translation>' is absent at line %1!</translation> + <translation type="vanished">' is absent at line %1!</translation> </message> <message> - <location filename="../src/GTFFormat.cpp" line="247"/> + <location filename="../src/GTFFormat.cpp" line="232"/> <source>GTF parsing error: incorrect strand value "%1" at line %2!</source> <translation>GTF parsing error: incorrect strand value "%1" at line %2!</translation> </message> <message> - <location filename="../src/GTFFormat.cpp" line="294"/> + <location filename="../src/GTFFormat.cpp" line="280"/> <source>File "%1" contains too many annotation tables to be displayed. However, you can process these data using pipelines built with Workflow Designer.</source> <translation>File "%1" contains too many annotation tables to be displayed. However, you can process these data using pipelines built with Workflow Designer.</translation> </message> <message> - <location filename="../src/GTFFormat.cpp" line="628"/> - <location filename="../src/GTFFormat.cpp" line="633"/> <source>Can't save an annotation to a GTF file - the annotation doesn't have the '%1' qualifier!</source> - <translation>Can't save an annotation to a GTF file - the annotation doesn't have the '%1' qualifier!</translation> + <translation type="vanished">Can't save an annotation to a GTF file - the annotation doesn't have the '%1' qualifier!</translation> </message> <message> <source>GTF saving error: one or more errors occurred while saving a file, see TRACE log for details!</source> @@ -1857,91 +1884,91 @@ <translation>Mega Ñто формат файла программы MEGA</translation> </message> <message> - <location filename="../src/MegaFormat.cpp" line="312"/> + <location filename="../src/MegaFormat.cpp" line="315"/> <source>Found sequences of different sizes</source> <translation>Обнаружены поÑледовательноÑти разной длины</translation> </message> <message> - <location filename="../src/MegaFormat.cpp" line="148"/> + <location filename="../src/MegaFormat.cpp" line="152"/> <source>Bad name of sequence</source> <translation>Ðеверное Ð¸Ð¼Ñ Ð¿Ð¾ÑледовательноÑти</translation> </message> <message> - <location filename="../src/MegaFormat.cpp" line="168"/> + <location filename="../src/MegaFormat.cpp" line="172"/> <source>Unexpected # in comments</source> <translation>Ðеожиданный Ñимвол "#" в комментариÑÑ…</translation> </message> <message> - <location filename="../src/MegaFormat.cpp" line="177"/> + <location filename="../src/MegaFormat.cpp" line="181"/> <source>A comment has not end</source> <translation>У ÐºÐ¾Ð¼Ð¼ÐµÐ½Ñ‚Ð°Ñ€Ð¸Ñ Ð¾Ñ‚ÑутÑтвует окончание</translation> </message> <message> - <location filename="../src/MegaFormat.cpp" line="199"/> + <location filename="../src/MegaFormat.cpp" line="205"/> <source>Unexpected symbol between comments</source> <translation>Ðеоижданные Ñимволы между комментариÑми</translation> </message> <message> - <location filename="../src/MegaFormat.cpp" line="260"/> + <location filename="../src/MegaFormat.cpp" line="263"/> <source>Incorrect format</source> <translation>Ðеверный формат</translation> </message> <message> - <location filename="../src/MegaFormat.cpp" line="273"/> + <location filename="../src/MegaFormat.cpp" line="276"/> <source>Identical symbol at the first sequence</source> <translation>Идентичный Ñимвол в первой поÑледовательноÑти</translation> </message> <message> - <location filename="../src/MegaFormat.cpp" line="294"/> + <location filename="../src/MegaFormat.cpp" line="297"/> <source>Incorrect order of sequences' names</source> <translation>Ðеправильный порÑдок имён поÑледовательноÑтей</translation> </message> <message> - <location filename="../src/MegaFormat.cpp" line="300"/> + <location filename="../src/MegaFormat.cpp" line="303"/> <source>Incorrect sequence</source> <translation>Incorrect sequence</translation> </message> <message> - <location filename="../src/MegaFormat.cpp" line="320"/> + <location filename="../src/MegaFormat.cpp" line="323"/> <source>Alphabet is unknown</source> <translation>ÐеизвеÑтный алфавит</translation> </message> <message> - <location filename="../src/MegaFormat.cpp" line="391"/> - <location filename="../src/MegaFormat.cpp" line="403"/> + <location filename="../src/MegaFormat.cpp" line="394"/> + <location filename="../src/MegaFormat.cpp" line="401"/> <source>No header</source> <translation>ОтÑутÑтвует заголовок</translation> </message> <message> - <location filename="../src/MegaFormat.cpp" line="396"/> + <location filename="../src/MegaFormat.cpp" line="395"/> <source>No # before header</source> <translation>ОтÑутÑтвует Ñимвол "#" перед заголовком</translation> </message> <message> - <location filename="../src/MegaFormat.cpp" line="408"/> + <location filename="../src/MegaFormat.cpp" line="402"/> <source>Not MEGA-header</source> <translation>Ðе ÑвлÑетÑÑ Ð·Ð°Ð³Ð¾Ð»Ð¾Ð²ÐºÐ¾Ð¼ MEGA</translation> </message> <message> - <location filename="../src/MegaFormat.cpp" line="431"/> - <location filename="../src/MegaFormat.cpp" line="442"/> - <location filename="../src/MegaFormat.cpp" line="469"/> + <location filename="../src/MegaFormat.cpp" line="425"/> + <location filename="../src/MegaFormat.cpp" line="434"/> + <location filename="../src/MegaFormat.cpp" line="459"/> <source>No data in file</source> <translation>ОтÑутÑтвуют данные в файле</translation> </message> <message> - <location filename="../src/MegaFormat.cpp" line="451"/> - <location filename="../src/MegaFormat.cpp" line="457"/> + <location filename="../src/MegaFormat.cpp" line="440"/> + <location filename="../src/MegaFormat.cpp" line="445"/> <source>Incorrect title</source> <translation>Ðеправильный заголовок</translation> </message> <message> - <location filename="../src/MegaFormat.cpp" line="501"/> + <location filename="../src/MegaFormat.cpp" line="492"/> <source>Sequence has empty part</source> <translation>ЧаÑÑ‚ÑŒ поÑледовательноÑти пуÑтаÑ</translation> </message> <message> - <location filename="../src/MegaFormat.cpp" line="521"/> + <location filename="../src/MegaFormat.cpp" line="512"/> <source>Bad symbols in a sequence</source> <translation>Ðекорректные Ñимволы в поÑледовательноÑти</translation> </message> @@ -2014,7 +2041,7 @@ </message> <message> <location filename="../src/PDBFormat.cpp" line="528"/> - <source>Invalid SEQRES: less then 24 charachters</source> + <source>Invalid SEQRES: less then 24 characters</source> <translation>Ðеверный SEQRES: меньше чем 24 Ñимвола</translation> </message> <message> @@ -2037,7 +2064,7 @@ </message> <message> <location filename="../src/PDWFormat.cpp" line="100"/> - <location filename="../src/PDWFormat.cpp" line="190"/> + <location filename="../src/PDWFormat.cpp" line="192"/> <source>Line is too long</source> <translation>Слишком Ð´Ð»Ð¸Ð½Ð½Ð°Ñ Ñтрока</translation> </message> @@ -2045,14 +2072,18 @@ <context> <name>U2::PairedFastqComparator</name> <message> - <location filename="../src/util/PairedFastqComparator.cpp" line="77"/> <source>Too much reads without a pair (>%1). Check the input data is set correctly.</source> - <translation>Too much reads without a pair (>%1). Check the input data is set correctly.</translation> + <translation type="vanished">Too much reads without a pair (>%1). Check the input data is set correctly.</translation> </message> <message> <source>The list doesn't contains the item</source> <translation type="vanished">The list doesn't contains the item</translation> </message> + <message> + <location filename="../src/util/PairedFastqComparator.cpp" line="77"/> + <source>Too much reads without a pair (>%1). Check the input data are set correctly.</source> + <translation type="unfinished"></translation> + </message> <message> <location filename="../src/util/PairedFastqComparator.cpp" line="172"/> <source>Invalid sequence info</source> @@ -2072,7 +2103,7 @@ <translation>ÐеизвеÑтный алфавит</translation> </message> <message> - <location filename="../src/PhylipFormat.cpp" line="350"/> + <location filename="../src/PhylipFormat.cpp" line="355"/> <source>Error parsing file</source> <translation>Ошибка разбора формата</translation> </message> @@ -2080,32 +2111,32 @@ <context> <name>U2::PhylipInterleavedFormat</name> <message> - <location filename="../src/PhylipFormat.cpp" line="238"/> + <location filename="../src/PhylipFormat.cpp" line="242"/> <source>PHYLIP Interleaved</source> <translation>PHYLIP Interleaved</translation> </message> <message> - <location filename="../src/PhylipFormat.cpp" line="337"/> + <location filename="../src/PhylipFormat.cpp" line="341"/> <source>Illegal line</source> <translation>ÐÐµÐ¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ð°Ñ Ñтрока</translation> </message> <message> - <location filename="../src/PhylipFormat.cpp" line="344"/> + <location filename="../src/PhylipFormat.cpp" line="348"/> <source>Wrong header</source> <translation>Ðеверный заголовок</translation> </message> <message> - <location filename="../src/PhylipFormat.cpp" line="379"/> + <location filename="../src/PhylipFormat.cpp" line="388"/> <source>Block is incomplete</source> <translation>Block is incomplete</translation> </message> <message> - <location filename="../src/PhylipFormat.cpp" line="390"/> + <location filename="../src/PhylipFormat.cpp" line="399"/> <source>Block is incomlete</source> <translation>Block is incomlete</translation> </message> <message> - <location filename="../src/PhylipFormat.cpp" line="397"/> + <location filename="../src/PhylipFormat.cpp" line="407"/> <source>Number of characters does not correspond to the stated number</source> <translation>ЧиÑло Ñимволов не ÑоответÑтвует уÑтановленному чиÑлу</translation> </message> @@ -2118,29 +2149,30 @@ <translation>PHYLIP Sequential</translation> </message> <message> - <location filename="../src/PhylipFormat.cpp" line="201"/> + <location filename="../src/PhylipFormat.cpp" line="202"/> <source>Illegal line</source> <translation>ÐÐµÐ¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ð°Ñ Ñтрока</translation> </message> <message> - <location filename="../src/PhylipFormat.cpp" line="208"/> + <location filename="../src/PhylipFormat.cpp" line="209"/> <source>Wrong header</source> <translation>Ðеверный заголовок</translation> </message> <message> - <location filename="../src/PhylipFormat.cpp" line="211"/> - <location filename="../src/PhylipFormat.cpp" line="348"/> + <location filename="../src/PhylipFormat.cpp" line="212"/> + <location filename="../src/PhylipFormat.cpp" line="352"/> <source>There is not enough data</source> <translation>ÐедоÑтаточно данных</translation> </message> <message> - <location filename="../src/PhylipFormat.cpp" line="215"/> - <location filename="../src/PhylipFormat.cpp" line="357"/> + <location filename="../src/PhylipFormat.cpp" line="201"/> + <location filename="../src/PhylipFormat.cpp" line="216"/> + <location filename="../src/PhylipFormat.cpp" line="363"/> <source>Error parsing file</source> <translation>Ошибка разбора формата</translation> </message> <message> - <location filename="../src/PhylipFormat.cpp" line="229"/> + <location filename="../src/PhylipFormat.cpp" line="233"/> <source>Number of characters does not correspond to the stated number</source> <translation>ЧиÑло Ñимволов не ÑоответÑтвует уÑтановленному чиÑлу</translation> </message> @@ -2171,7 +2203,7 @@ <translation>Сырой файл поÑледовательноÑти - вÑе Ñодержимое файла раÑÑматриваетÑÑ ÐºÐ°Ðº один нуклеотид или Ð¿ÐµÐ¿Ñ‚Ð¸Ð´Ð½Ð°Ñ Ð¿Ð¾ÑледовательноÑÑ‚ÑŒ. UGENE удалит вÑе Ñимволы не принадлежащие алфавиту из результирующей поÑледовательноÑти.</translation> </message> <message> - <location filename="../src/RawDNASequenceFormat.cpp" line="131"/> + <location filename="../src/RawDNASequenceFormat.cpp" line="128"/> <source>Sequence is empty</source> <translation>ПоÑледовательноÑÑ‚ÑŒ пуÑта</translation> </message> @@ -2228,54 +2260,54 @@ <context> <name>U2::StockholmFormat</name> <message> - <location filename="../src/StockholmFormat.cpp" line="677"/> + <location filename="../src/StockholmFormat.cpp" line="727"/> <source>Stockholm</source> <translation>Stockholm</translation> </message> <message> - <location filename="../src/StockholmFormat.cpp" line="678"/> + <location filename="../src/StockholmFormat.cpp" line="728"/> <source>A multiple sequence alignments file format</source> <translation>Формат файла Ð´Ð»Ñ Ð¼Ð½Ð¾Ð¶ÐµÑтвенных выравниваний</translation> </message> <message> - <location filename="../src/StockholmFormat.cpp" line="699"/> - <location filename="../src/StockholmFormat.cpp" line="716"/> + <location filename="../src/StockholmFormat.cpp" line="749"/> + <location filename="../src/StockholmFormat.cpp" line="766"/> <source>unknown error occurred</source> <translation>Ошибка</translation> </message> <message> - <location filename="../src/StockholmFormat.cpp" line="451"/> + <location filename="../src/StockholmFormat.cpp" line="489"/> <source>invalid file: bad header line</source> <translation>Ðеверный заголовок</translation> </message> <message> - <location filename="../src/StockholmFormat.cpp" line="483"/> + <location filename="../src/StockholmFormat.cpp" line="527"/> <source>invalid file: empty sequence name</source> <translation>Ðе указано Ð¸Ð¼Ñ Ð¿Ð¾ÑледовательноÑти</translation> </message> <message> - <location filename="../src/StockholmFormat.cpp" line="486"/> + <location filename="../src/StockholmFormat.cpp" line="530"/> <source>invalid file: equal sequence names in one block</source> <translation>одинаковые имена поÑледовательноÑтей в блоке</translation> </message> <message> - <location filename="../src/StockholmFormat.cpp" line="498"/> + <location filename="../src/StockholmFormat.cpp" line="542"/> <source>invalid file: sequence names are not equal in blocks</source> <translation>Ðепарное Ð¸Ð¼Ñ Ð¿Ð¾ÑледовательноÑти в блоке</translation> </message> <message> - <location filename="../src/StockholmFormat.cpp" line="493"/> - <location filename="../src/StockholmFormat.cpp" line="504"/> + <location filename="../src/StockholmFormat.cpp" line="537"/> + <location filename="../src/StockholmFormat.cpp" line="548"/> <source>invalid file: sequences in block are not of equal size</source> <translation>Блок Ñодержит поÑледовательноÑти разной длины</translation> </message> <message> - <location filename="../src/StockholmFormat.cpp" line="518"/> + <location filename="../src/StockholmFormat.cpp" line="567"/> <source>invalid file: empty sequence alignment</source> <translation>Выравнивание не Ñодержит поÑледовательноÑтей</translation> </message> <message> - <location filename="../src/StockholmFormat.cpp" line="522"/> + <location filename="../src/StockholmFormat.cpp" line="571"/> <source>invalid file: unknown alphabet</source> <translation>Ðе удалоÑÑŒ уÑтановить алфавит</translation> </message> @@ -2283,12 +2315,12 @@ <context> <name>U2::StreamSequenceReader</name> <message> - <location filename="../src/StreamSequenceReader.cpp" line="91"/> + <location filename="../src/StreamSequenceReader.cpp" line="95"/> <source>File %1 unsupported format.</source> <translation>File %1 unsupported format.</translation> </message> <message> - <location filename="../src/StreamSequenceReader.cpp" line="109"/> + <location filename="../src/StreamSequenceReader.cpp" line="113"/> <source>Unsupported file format or short reads list is empty</source> <translation>Unsupported file format or short reads list is empty</translation> </message> @@ -2659,9 +2691,13 @@ <translation>New variant track ID is empty</translation> </message> <message> - <location filename="../src/mysql_dbi/util/MysqlAssemblyUtils.cpp" line="124"/> <source>Packed data is empty</source> - <translation>Packed data is empty</translation> + <translation type="vanished">Packed data is empty</translation> + </message> + <message> + <location filename="../src/mysql_dbi/util/MysqlAssemblyUtils.cpp" line="124"/> + <source>Packed data are empty</source> + <translation type="unfinished"></translation> </message> <message> <location filename="../src/mysql_dbi/util/MysqlAssemblyUtils.cpp" line="131"/> @@ -2672,26 +2708,42 @@ <message> <location filename="../src/mysql_dbi/util/MysqlAssemblyUtils.cpp" line="139"/> <location filename="../src/sqlite_dbi/SQLiteAssemblyDbi.cpp" line="476"/> - <source>Data is corrupted, no name end marker found: %1</source> - <translation>Data is corrupted, no name end marker found: %1</translation> + <source>Data are corrupted, no name end marker found: %1</source> + <translation type="unfinished"></translation> </message> <message> <location filename="../src/mysql_dbi/util/MysqlAssemblyUtils.cpp" line="148"/> <location filename="../src/sqlite_dbi/SQLiteAssemblyDbi.cpp" line="485"/> - <source>Data is corrupted, no sequence end marker found: %1</source> - <translation>Data is corrupted, no sequence end marker found: %1</translation> + <source>Data are corrupted, no sequence end marker found: %1</source> + <translation type="unfinished"></translation> </message> <message> <location filename="../src/mysql_dbi/util/MysqlAssemblyUtils.cpp" line="157"/> <location filename="../src/sqlite_dbi/SQLiteAssemblyDbi.cpp" line="494"/> - <source>Data is corrupted, no CIGAR end marker found: %1</source> - <translation>Data is corrupted, no CIGAR end marker found: %1</translation> + <source>Data are corrupted, no CIGAR end marker found: %1</source> + <translation type="unfinished"></translation> </message> <message> <location filename="../src/mysql_dbi/util/MysqlAssemblyUtils.cpp" line="176"/> <location filename="../src/sqlite_dbi/SQLiteAssemblyDbi.cpp" line="513"/> + <source>Data are corrupted, no rnext end marker found: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Data is corrupted, no name end marker found: %1</source> + <translation type="vanished">Data is corrupted, no name end marker found: %1</translation> + </message> + <message> + <source>Data is corrupted, no sequence end marker found: %1</source> + <translation type="vanished">Data is corrupted, no sequence end marker found: %1</translation> + </message> + <message> + <source>Data is corrupted, no CIGAR end marker found: %1</source> + <translation type="vanished">Data is corrupted, no CIGAR end marker found: %1</translation> + </message> + <message> <source>Data is corrupted, no rnext end marker found: %1</source> - <translation>Data is corrupted, no rnext end marker found: %1</translation> + <translation type="vanished">Data is corrupted, no rnext end marker found: %1</translation> </message> <message> <location filename="../src/mysql_dbi/util/MysqlAssemblyUtils.cpp" line="191"/> @@ -2742,8 +2794,12 @@ </message> <message> <location filename="../src/sqlite_dbi/SQLiteAssemblyDbi.cpp" line="461"/> + <source>Packed data are empty!</source> + <translation type="unfinished"></translation> + </message> + <message> <source>Packed data is empty!</source> - <translation>Packed data is empty!</translation> + <translation type="vanished">Packed data is empty!</translation> </message> <message> <location filename="../src/sqlite_dbi/SQLiteDbi.cpp" line="224"/> diff --git a/src/corelibs/U2Gui/U2Gui.pri b/src/corelibs/U2Gui/U2Gui.pri index 2aa04daf5a12edb7e719d361f7a8ceca0bf03022..15ce836b1fa54eea2b5af343bddb7c770845a25c 100644 --- a/src/corelibs/U2Gui/U2Gui.pri +++ b/src/corelibs/U2Gui/U2Gui.pri @@ -3,29 +3,21 @@ MODULE_ID=U2Gui include( ../../ugene_lib_common.pri ) -UGENE_RELATIVE_DESTDIR = '' - QT += network xml svg sql widgets printsupport DEFINES+= QT_FATAL_ASSERT BUILDING_U2GUI_DLL INCLUDEPATH += ../U2Private/src -LIBS += -L../../_release -lU2Core -lU2Formats -lU2Private - -!debug_and_release|build_pass { - - CONFIG(debug, debug|release) { - DESTDIR=../../_debug - LIBS -= -L../../_release -lU2Core -lU2Formats -lU2Private - LIBS += -L../../_debug -lU2Cored -lU2Formatsd -lU2Privated - } - - CONFIG(release, debug|release) { - DESTDIR=../../_release - } +useWebKit() { + QT += webkitwidgets +} else { + QT += webenginewidgets websockets webchannel } +LIBS += -L../../$$out_dir() +LIBS += -lU2Core$$D -lU2Formats$$D -lU2Private$$D + +DESTDIR = ../../$$out_dir() -unix { - target.path = $$UGENE_INSTALL_DIR/$$UGENE_RELATIVE_DESTDIR + unix { + target.path = $$UGENE_INSTALL_DIR/ INSTALLS += target } - diff --git a/src/corelibs/U2Gui/U2Gui.pro b/src/corelibs/U2Gui/U2Gui.pro index ddd3330df3aec7dadf15bbb3f177be35ccdf5955..fa3ee84e1d8e08ee990c609f9715be505dbc0d60 100644 --- a/src/corelibs/U2Gui/U2Gui.pro +++ b/src/corelibs/U2Gui/U2Gui.pro @@ -13,6 +13,7 @@ HEADERS += src/AppSettingsGUI.h \ src/PluginViewer.h \ src/ProjectParsing.h \ src/ProjectView.h \ + src/ReloadDocumentsTask.h \ src/ToolsMenu.h \ src/U2SavableWidget.h \ src/U2WidgetStateStorage.h \ @@ -126,7 +127,21 @@ HEADERS += src/AppSettingsGUI.h \ src/util/shared_db/ImportOptionsWidget.h \ src/util/shared_db/ImportToDatabaseDialog.h \ src/util/shared_db/ItemToImportEditDialog.h \ - src/util/shared_db/SharedConnectionsDialog.h + src/util/shared_db/SharedConnectionsDialog.h \ + src/util/webview/JavaScriptAgent.h \ + src/util/webview/SimpleWebViewBasedWidgetController.h \ + src/util/webview/U2WebView.h \ + src/util/webview/WebViewController.h \ + src/util/webview/WebViewControllerPrivate.h + +useWebKit() { + HEADERS += src/util/webview/webkit/WebViewWebKitControllerPrivate.h +} else { + HEADERS += src/util/webview/qtwebengine/WebViewQtWebEngineControllerPrivate.h \ + src/util/webview/qtwebengine/webchannel/U2WebChannel.h \ + src/util/webview/qtwebengine/webchannel/WebSocketClientWrapper.h \ + src/util/webview/qtwebengine/webchannel/WebSocketTransport.h +} FORMS += src/util/AddNewDocumentDialog.ui \ src/util/AuthenticationDialog.ui \ @@ -171,6 +186,7 @@ SOURCES += src/MainWindow.cpp \ src/OpenViewTask.cpp \ src/PasteController.cpp \ src/ProjectParsing.cpp \ + src/ReloadDocumentsTask.cpp \ src/ToolsMenu.cpp \ src/UnloadDocumentTask.cpp \ src/U2SavableWidget.cpp \ @@ -281,6 +297,21 @@ SOURCES += src/MainWindow.cpp \ src/util/shared_db/ImportOptionsWidget.cpp \ src/util/shared_db/ImportToDatabaseDialog.cpp \ src/util/shared_db/ItemToImportEditDialog.cpp \ - src/util/shared_db/SharedConnectionsDialog.cpp + src/util/shared_db/SharedConnectionsDialog.cpp \ + src/util/webview/JavaScriptAgent.cpp \ + src/util/webview/SimpleWebViewBasedWidgetController.cpp \ + src/util/webview/WebViewController.cpp \ + src/util/webview/WebViewControllerPrivate.cpp + +useWebKit() { + SOURCES += src/util/webview/webkit/WebViewWebKitControllerPrivate.cpp +} else { + SOURCES += src/util/webview/qtwebengine/WebViewQtWebEngineControllerPrivate.cpp \ + src/util/webview/qtwebengine/webchannel/U2WebChannel.cpp \ + src/util/webview/qtwebengine/webchannel/WebSocketClientWrapper.cpp \ + src/util/webview/qtwebengine/webchannel/WebSocketTransport.cpp + +} + RESOURCES += U2Gui.qrc TRANSLATIONS += transl/russian.ts diff --git a/src/corelibs/U2Gui/U2Gui.qrc b/src/corelibs/U2Gui/U2Gui.qrc index 0d8edf309ddd63a4def5ca4af89635705d29ce34..aec4973311b941ce962365655ce6ea64290e43a1 100644 --- a/src/corelibs/U2Gui/U2Gui.qrc +++ b/src/corelibs/U2Gui/U2Gui.qrc @@ -113,7 +113,6 @@ <file>images/ruler_coverage.png</file> <file>images/tooltip.png</file> <file>images/settings.png</file> - <file>images/close_tab.png</file> <file>images/add_sequence.png</file> <file>images/todo.png</file> <file>images/add_tree.png</file> @@ -184,5 +183,7 @@ <file>images/mismatch-backward.png</file> <file>images/mismatch-forward.png</file> <file>images/edit.png</file> + <file>javascript/WebPageInitialize.js</file> + <file>images/copy_qualifier.png</file> </qresource> </RCC> diff --git a/src/corelibs/U2Gui/images/copy_qualifier.png b/src/corelibs/U2Gui/images/copy_qualifier.png new file mode 100644 index 0000000000000000000000000000000000000000..af6866969bb81f25caa68b556a328e4240d79f66 Binary files /dev/null and b/src/corelibs/U2Gui/images/copy_qualifier.png differ diff --git a/src/corelibs/U2Gui/javascript/WebPageInitialize.js b/src/corelibs/U2Gui/javascript/WebPageInitialize.js new file mode 100644 index 0000000000000000000000000000000000000000..26c6540ea7e3c8e9be06161d9881128215992199 --- /dev/null +++ b/src/corelibs/U2Gui/javascript/WebPageInitialize.js @@ -0,0 +1,86 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +function showOnlyLang(lang) { + var elements = document.getElementsByClassName("translatable"); + for (i = 0; i < elements.length; i++){ + attr = elements[i].getAttribute("lang"); + if (attr != lang){ + elements[i].style.display = "none"; + } + } +} + +function loadScript(url, callback) { + // Adding the script tag to the head as suggested before + var head = document.getElementsByTagName('head')[0]; + var script = document.createElement('script'); + script.type = 'text/javascript'; + script.src = url; + + // Then bind the event to the callback function. + // There are several events for cross browser compatibility. + script.onreadystatechange = callback; + script.onload = callback; + + // Fire the loading + head.appendChild(script); +} + +function initializeWebkitPage() { + //document.getElementById("log_messages").innerHTML += "initializeWebkitPage! <br/>"; // sample of debug message + showOnlyLang(ugene.lang); + ugene.sl_pageInitialized(); +} + +var createAgent = function(channel) { + window.ugene = channel.objects.ugene; + + showOnlyLang(ugene.lang); + ugene.sl_pageInitialized(); +} + +function installWebChannel(onSockets, port) { + if (onSockets) { + var baseUrl = "ws://127.0.0.1:" + port; + var socket = new WebSocket(baseUrl); + + socket.onclose = function() { + console.error("web channel closed"); + }; + + socket.onerror = function(error) { + console.error("web channel error: " + error); + }; + + socket.onopen = function() { + loadScript("qrc:///qtwebchannel/qwebchannel.js", + function() { + new QWebChannel(socket, createAgent); + }); + } + } else { + loadScript("qrc:///qtwebchannel/qwebchannel.js", + function() { + new QWebChannel(qt.webChannelTransport, createAgent); + }); + } +} diff --git a/src/corelibs/U2Gui/src/AppSettingsGUI.h b/src/corelibs/U2Gui/src/AppSettingsGUI.h index c3acc89c7a04b89c46ba8b059c02f44097fb93b6..8071c2b3ed9a5c9388154a0dd983180576dd7304 100644 --- a/src/corelibs/U2Gui/src/AppSettingsGUI.h +++ b/src/corelibs/U2Gui/src/AppSettingsGUI.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,6 +24,7 @@ #include <U2Core/global.h> +#include <QDialogButtonBox> #include <QWidget> namespace U2 { @@ -34,8 +35,8 @@ class AppSettingsGUIPageController; class U2GUI_EXPORT AppSettingsGUI : public QObject { Q_OBJECT public: - AppSettingsGUI(QObject* p = NULL) : QObject(p){}; - + AppSettingsGUI(QObject* p = nullptr) : QObject(p) {}; + virtual bool registerPage(AppSettingsGUIPageController* page, const QString& beforePage = QString()) = 0; virtual bool unregisterPage(AppSettingsGUIPageController* page) = 0; @@ -47,17 +48,17 @@ public: /** Data stored on the page */ -class U2GUI_EXPORT AppSettingsGUIPageState: public QObject { +class U2GUI_EXPORT AppSettingsGUIPageState : public QObject { Q_OBJECT public: - AppSettingsGUIPageState(QObject* p = NULL) : QObject(p) {} + AppSettingsGUIPageState(QObject* p = nullptr) : QObject(p) {} }; /** Page widget */ -class U2GUI_EXPORT AppSettingsGUIPageWidget: public QWidget { +class U2GUI_EXPORT AppSettingsGUIPageWidget : public QWidget { Q_OBJECT public: - AppSettingsGUIPageWidget(QWidget* w = NULL) : QWidget(w){} + AppSettingsGUIPageWidget(QWidget* w = nullptr) : QWidget(w) {} //reads data from 'state' and initializes the widget state virtual void setState(AppSettingsGUIPageState* state) = 0; @@ -65,17 +66,20 @@ public: //returns 'state' of the widget or error if state is not complete // the result structure is automatically deleted by controller virtual AppSettingsGUIPageState* getState(QString& errMsg) const = 0; + +signals: + void si_setLockState(bool); }; /** Page factory/controller */ -class U2GUI_EXPORT AppSettingsGUIPageController: public QObject { +class U2GUI_EXPORT AppSettingsGUIPageController : public QObject { Q_OBJECT public: - AppSettingsGUIPageController(const QString& s, const QString& _id, QObject* p = NULL) : QObject(p), name(s), id(_id) {} + AppSettingsGUIPageController(const QString& s, const QString& _id, QObject* p = nullptr) : QObject(p), name(s), id(_id) {} - const QString& getPageName() const {return name;} + const QString& getPageName() const { return name; } - const QString& getPageId() const {return id;} + const QString& getPageId() const { return id; } //should be pure virtual, because every page should have own help page index virtual const QString& getHelpPageId() const = 0; diff --git a/src/corelibs/U2Gui/src/MainWindow.cpp b/src/corelibs/U2Gui/src/MainWindow.cpp index c648cd04f9f6990c5f84acf9d49f46f8407a3087..8c9e5729496a0ddb6d0a7cba6ff07ab9947095d0 100644 --- a/src/corelibs/U2Gui/src/MainWindow.cpp +++ b/src/corelibs/U2Gui/src/MainWindow.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/MainWindow.h b/src/corelibs/U2Gui/src/MainWindow.h index feeeffc06e9582479f05f69128e490cabd1c2e82..24eebf207964dc5cca79ff31837d6c96c0450217 100644 --- a/src/corelibs/U2Gui/src/MainWindow.h +++ b/src/corelibs/U2Gui/src/MainWindow.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/Notification.cpp b/src/corelibs/U2Gui/src/Notification.cpp index cf1487347c2ac6e1a7c5205c28ab059e79b70a1d..48dbe5c67588fbe347d0696d661a4432ada44371 100644 --- a/src/corelibs/U2Gui/src/Notification.cpp +++ b/src/corelibs/U2Gui/src/Notification.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,6 +19,7 @@ * MA 02110-1301, USA. */ +#include <QApplication> #include <QStatusBar> #include <QTextBrowser> #include <QTime> @@ -248,7 +249,7 @@ void Notification::sl_timeout() { } } else { move(rect.topLeft().x(), rect.topLeft().y() - 10); - resize(TT_WIDTH, rect.height() + 10); + resize(TT_WIDTH, rect.height() + 10 > TT_HEIGHT ? TT_HEIGHT : rect.height() + 10); } } @@ -308,15 +309,16 @@ void NotificationStack::addNotification(Notification *t) { } } + bool isModalWidgetActive = nullptr != QApplication::activeModalWidget() && QApplication::activeModalWidget()->isActiveWindow(); bool onScreen = AppContext::getMainWindow()->getQMainWindow()->isActiveWindow(); notifications.append(t); - if (onScreen) { + if (onScreen || isModalWidgetActive) { notificationsOnScreen.append(t); } emit si_changed(); connect(t, SIGNAL(si_delete()), this, SLOT(sl_delete()), Qt::DirectConnection); - if (onScreen) { + if (onScreen || isModalWidgetActive) { QPoint pos = getBottomRightOfMainWindow(); t->showNotification(pos.x() - TT_WIDTH, pos.y() - 50 - notificationPosition); notificationNumber++; diff --git a/src/corelibs/U2Gui/src/Notification.h b/src/corelibs/U2Gui/src/Notification.h index 8bc3fba4fd0be0092b3ec72138386421ad2d7b43..5f05cfe4790704f18eeba62ee82a98e4c9450381 100644 --- a/src/corelibs/U2Gui/src/Notification.h +++ b/src/corelibs/U2Gui/src/Notification.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/NotificationWidget.cpp b/src/corelibs/U2Gui/src/NotificationWidget.cpp index 0637034aeec72a237a4de586f9d651865292617f..a1929b5fb15d27cade5402208efb9e67075b3244 100644 --- a/src/corelibs/U2Gui/src/NotificationWidget.cpp +++ b/src/corelibs/U2Gui/src/NotificationWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/NotificationWidget.h b/src/corelibs/U2Gui/src/NotificationWidget.h index 4f11fec9aae84992d4577654121cc31ae22e70aa..6e5d497b4eb803ecaa2f90bc91e656a3515f3465 100644 --- a/src/corelibs/U2Gui/src/NotificationWidget.h +++ b/src/corelibs/U2Gui/src/NotificationWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/NotificationsTypes.h b/src/corelibs/U2Gui/src/NotificationsTypes.h index 26a6ba9f17307676fab0314edf032cfe03e028cc..0b3f82b49ad34309d30f0026431d6c834f3eaa13 100644 --- a/src/corelibs/U2Gui/src/NotificationsTypes.h +++ b/src/corelibs/U2Gui/src/NotificationsTypes.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/ObjectViewModel.cpp b/src/corelibs/U2Gui/src/ObjectViewModel.cpp index a9f004a4c8ca8e2efba733d4409afa8f61940928..2e43720a88c241f5e842365c592663f82479b53b 100644 --- a/src/corelibs/U2Gui/src/ObjectViewModel.cpp +++ b/src/corelibs/U2Gui/src/ObjectViewModel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -300,6 +300,7 @@ GObjectViewWindow::GObjectViewWindow(GObjectView* v, const QString& _viewName, b } else { OptionsPanelWidget *optionsPanelWidget = optionsPanel->getMainWidget(); QSplitter *splitter = new QSplitter(); + splitter->setObjectName("OPTIONS_PANEL_SPLITTER"); splitter->setOrientation(Qt::Horizontal); splitter->setChildrenCollapsible(false); splitter->addWidget(objectWidget); diff --git a/src/corelibs/U2Gui/src/ObjectViewModel.h b/src/corelibs/U2Gui/src/ObjectViewModel.h index 7d44e162398a3a7308ce6bdee4034add26321466..72bea440d562beff837231be85405c0364870301 100644 --- a/src/corelibs/U2Gui/src/ObjectViewModel.h +++ b/src/corelibs/U2Gui/src/ObjectViewModel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/ObjectViewTasks.cpp b/src/corelibs/U2Gui/src/ObjectViewTasks.cpp index 2c81c57edc5ad5de7b9e51cad443400503888c64..01cc668afc9b89d51aef8fc2404932e4581345b3 100644 --- a/src/corelibs/U2Gui/src/ObjectViewTasks.cpp +++ b/src/corelibs/U2Gui/src/ObjectViewTasks.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/ObjectViewTasks.h b/src/corelibs/U2Gui/src/ObjectViewTasks.h index 1eb23b943fdd41d9356ef25ddfab90c6c0779ad3..a45f3e792e7c7d34f89a6ebf7e59d697856677f1 100644 --- a/src/corelibs/U2Gui/src/ObjectViewTasks.h +++ b/src/corelibs/U2Gui/src/ObjectViewTasks.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/OpenViewTask.cpp b/src/corelibs/U2Gui/src/OpenViewTask.cpp index 1185e9d4620e6523b2fe7a827510f5d6b500f7f1..7438e35bcd683dcfbeaad2afd75b7274bf5f4d93 100644 --- a/src/corelibs/U2Gui/src/OpenViewTask.cpp +++ b/src/corelibs/U2Gui/src/OpenViewTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/OpenViewTask.h b/src/corelibs/U2Gui/src/OpenViewTask.h index 9241834df3f8b9a67fbdb65a7a9a68a30010c1dc..5288fa6cbbafc0da7511d97f4433ecfa13cc330d 100644 --- a/src/corelibs/U2Gui/src/OpenViewTask.h +++ b/src/corelibs/U2Gui/src/OpenViewTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/PasteController.cpp b/src/corelibs/U2Gui/src/PasteController.cpp index 08889c816fc68624d359f25d0a69582c9fdfd966..6c9918cffcfe6c5431cdd1fdfaac5c9d8ddd8be6 100644 --- a/src/corelibs/U2Gui/src/PasteController.cpp +++ b/src/corelibs/U2Gui/src/PasteController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/PasteController.h b/src/corelibs/U2Gui/src/PasteController.h index 83fa5cb9992e0c3dd4f75383261bb34b4d95a084..f17e3df79334a3760be00e0523d33f84a95cc068 100644 --- a/src/corelibs/U2Gui/src/PasteController.h +++ b/src/corelibs/U2Gui/src/PasteController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/PluginViewer.h b/src/corelibs/U2Gui/src/PluginViewer.h index 717cea0c1997c379cb37b0c38fa9c11dcc15c55a..5ff48fd638d21b86cb4b585441a5c7ef144c67b5 100644 --- a/src/corelibs/U2Gui/src/PluginViewer.h +++ b/src/corelibs/U2Gui/src/PluginViewer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/ProjectParsing.cpp b/src/corelibs/U2Gui/src/ProjectParsing.cpp index 95dcfd7eedec9fbf482026eef2cf33da46dc87cb..3809032da931acc4e26d972f3205c16b737de77b 100644 --- a/src/corelibs/U2Gui/src/ProjectParsing.cpp +++ b/src/corelibs/U2Gui/src/ProjectParsing.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/ProjectParsing.h b/src/corelibs/U2Gui/src/ProjectParsing.h index a9aef0e746e4f93849cf1771485edbd0ab09ebe0..101bc88619c75ab449ecb99544a2fe5219a68b61 100644 --- a/src/corelibs/U2Gui/src/ProjectParsing.h +++ b/src/corelibs/U2Gui/src/ProjectParsing.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/ProjectView.h b/src/corelibs/U2Gui/src/ProjectView.h index 6cf164a0bcfaae71a188369c390725c54075cad0..290f175d9a5f7584b8b087d2aab6525c4bda5515 100644 --- a/src/corelibs/U2Gui/src/ProjectView.h +++ b/src/corelibs/U2Gui/src/ProjectView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/ReloadDocumentsTask.cpp b/src/corelibs/U2Gui/src/ReloadDocumentsTask.cpp new file mode 100644 index 0000000000000000000000000000000000000000..88821efe9c6ff7cb99c59924697ff03c0b3fc150 --- /dev/null +++ b/src/corelibs/U2Gui/src/ReloadDocumentsTask.cpp @@ -0,0 +1,91 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QApplication> +#include <QMessageBox> + +#include "ReloadDocumentsTask.h" + +#include <U2Core/Counter.h> +#include <U2Core/U2SafePoints.h> + +#include <U2Gui/ObjectViewModel.h> +#include <U2Gui/UnloadDocumentTask.h> + +namespace U2 { + +ReloadDocumentsTask::ReloadDocumentsTask(const QList<Document*>& _docs2Reload) + : Task(tr("Reload documents task"), TaskFlag_NoRun | + TaskFlag_MinimizeSubtaskErrorText), + docs2Reload(_docs2Reload) { + GCOUNTER(cvar, tvar, "ReloadDocumentsTask"); + + foreach(Document* doc, docs2Reload) { + QString unloadErr = UnloadDocumentTask::checkSafeUnload(doc); + if (!unloadErr.isEmpty()) { + QMessageBox::warning(QApplication::activeWindow(), + U2_APP_TITLE, + tr("Document '%1' can't be unloaded. '%2'") + .arg(doc->getName(), unloadErr)); + doc->setLastUpdateTime(); + continue; + } + } +} + +void ReloadDocumentsTask::prepare() { + foreach(Document* doc, docs2Reload) { + addSubTask(new ReloadDocumentTask(doc)); + } +} + +Task::ReportResult ReloadDocumentsTask::report() { + CHECK(!subTaskStateInfoErrors.isEmpty(), ReportResult_Finished); + + setConcatenateChildrenErrors(true); + setReportingSupported(true); + stateInfo.setError(tr("Document(s) reloading failed.")); + + return ReportResult_Finished; +} + +QString ReloadDocumentsTask::generateReport() const { + QString report; + report += tr("The following errors occurred during the document(s) reloading: <ul>"); + for (int i = 0; i < subTaskStateInfoErrors.size(); i++) { + report += QString("<li>'%1': %2</li>") + .arg(i + 1) + .arg(subTaskStateInfoErrors[i]); + } + report += "</ul>"; + + return report; +} + +QList<Task*> ReloadDocumentsTask::onSubTaskFinished(Task* subTask) { + if (subTask->hasError()) { + subTaskStateInfoErrors << subTask->getError(); + } + + return QList<Task*>(); +} + +}// namespace U2 diff --git a/src/corelibs/U2Gui/src/ReloadDocumentsTask.h b/src/corelibs/U2Gui/src/ReloadDocumentsTask.h new file mode 100644 index 0000000000000000000000000000000000000000..41dd8009b81c6b11c0276cd2d4e02110264cdf77 --- /dev/null +++ b/src/corelibs/U2Gui/src/ReloadDocumentsTask.h @@ -0,0 +1,48 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_RELOAD_DOCUMENTS_TASK_ +#define _U2_RELOAD_DOCUMENTS_TASK_ + +#include <QCoreApplication> + +#include <U2Core/Task.h> +#include <U2Core/DocumentModel.h> + +namespace U2 { + +class U2GUI_EXPORT ReloadDocumentsTask : public Task { + Q_OBJECT +public: + ReloadDocumentsTask(const QList<Document*>& docs2Reload); + +private: + void prepare() override; + ReportResult report() override; + QString generateReport() const override; + QList<Task *> onSubTaskFinished(Task* subTask) override; + + QList<Document*> docs2Reload; + QStringList subTaskStateInfoErrors; +}; + +}// namespace U2 +#endif diff --git a/src/corelibs/U2Gui/src/ToolsMenu.cpp b/src/corelibs/U2Gui/src/ToolsMenu.cpp index c0cca12af7a46e09c0b5f3917a12140d2f486407..31687cfb480774984996d8b9705944ea81166015 100644 --- a/src/corelibs/U2Gui/src/ToolsMenu.cpp +++ b/src/corelibs/U2Gui/src/ToolsMenu.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/ToolsMenu.h b/src/corelibs/U2Gui/src/ToolsMenu.h index e5aafda233c39e974c355518331e31a079cedc17..478b9ee6010cf522dc64e4f2db22f812b210768b 100644 --- a/src/corelibs/U2Gui/src/ToolsMenu.h +++ b/src/corelibs/U2Gui/src/ToolsMenu.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/U2SavableWidget.cpp b/src/corelibs/U2Gui/src/U2SavableWidget.cpp index 87fbbd81ddac54f79f01a39d2c3bfb3f8fb1b400..3adf738100fc4df99387ea892eae89d388c56231 100644 --- a/src/corelibs/U2Gui/src/U2SavableWidget.cpp +++ b/src/corelibs/U2Gui/src/U2SavableWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/U2SavableWidget.h b/src/corelibs/U2Gui/src/U2SavableWidget.h index 1fec70c4a8312fb6da69ec12c0b68b71dd1392a8..74d315389d734db3e1b7224e320cb447361781e2 100644 --- a/src/corelibs/U2Gui/src/U2SavableWidget.h +++ b/src/corelibs/U2Gui/src/U2SavableWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/U2WidgetStateStorage.cpp b/src/corelibs/U2Gui/src/U2WidgetStateStorage.cpp index aba3d08a5db1fe757b3294341e22e1f5b99e52d3..8ea7af0a9e3d38b13a49750fdf1138c7db36bfc5 100644 --- a/src/corelibs/U2Gui/src/U2WidgetStateStorage.cpp +++ b/src/corelibs/U2Gui/src/U2WidgetStateStorage.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/U2WidgetStateStorage.h b/src/corelibs/U2Gui/src/U2WidgetStateStorage.h index e7588e6b92e0dfa252d506135b051ac19113543f..3571f61818ef879b58d04e19c1904e5b2492c26b 100644 --- a/src/corelibs/U2Gui/src/U2WidgetStateStorage.h +++ b/src/corelibs/U2Gui/src/U2WidgetStateStorage.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/UnloadDocumentTask.cpp b/src/corelibs/U2Gui/src/UnloadDocumentTask.cpp index 9fcdfc99ac1cef06919c901a9dc5d8dd93dff86f..8c50c7aa46efc70215177ab483cbb3be974f6e47 100644 --- a/src/corelibs/U2Gui/src/UnloadDocumentTask.cpp +++ b/src/corelibs/U2Gui/src/UnloadDocumentTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -46,6 +46,9 @@ namespace U2 { ////////////////////////////////////////////////////////////////////////// // unload document + +const QString UnloadDocumentTask::ACTIVE_VIEW_ERROR = QCoreApplication::translate("UnloadDocumentTask", "There is an active view with the document content."); + UnloadDocumentTask::UnloadDocumentTask(Document* _doc, bool save) : Task(tr("Unload document task: %1").arg(_doc->getURLString()), TaskFlag_NoRun), doc(_doc), @@ -106,7 +109,7 @@ QList<Task *> UnloadDocumentTask::runUnloadTaskHelper(const QList<Document*>& do foreach(Document* doc, docs) { QString err = checkSafeUnload(doc); - if(err == tr("There is an active view with document content")){ + if (err == ACTIVE_VIEW_ERROR){ QMessageBox::StandardButtons buttons = QMessageBox::StandardButtons(QMessageBox::Yes) | QMessageBox::No; QMessageBox::StandardButton res = QMessageBox::question(NULL, tr("Question?"), tr("Close views for document: %1").arg(doc->getURLString()), @@ -168,7 +171,7 @@ QList<Task *> UnloadDocumentTask::runUnloadTaskHelper(const QList<Document*>& do QString UnloadDocumentTask::checkSafeUnload(Document* doc) { bool hasViews = !GObjectViewUtils::findViewsWithAnyOfObjects(doc->getObjects()).isEmpty(); if (hasViews) { - return tr("There is an active view with document content"); + return ACTIVE_VIEW_ERROR; } QList<StateLock*> locks = doc->findLocks(StateLockableTreeFlags_ItemAndChildren, StateLockFlag_LiveLock); @@ -177,7 +180,7 @@ QString UnloadDocumentTask::checkSafeUnload(Document* doc) { liveLocked = (locks.first()->getUserDesc() != Document::UNLOAD_LOCK_NAME); } if (liveLocked) { - return tr("Document is locked by some algorithm and cannot be unloaded"); + return tr("The document is locked by some algorithm."); } return QString(); diff --git a/src/corelibs/U2Gui/src/UnloadDocumentTask.h b/src/corelibs/U2Gui/src/UnloadDocumentTask.h index 02c7cf1bcaa1cc0a7e361cb582ba9b4b8760e1cd..d7beee3cdd47da94422a5fc3f72f2559e6f6e834 100644 --- a/src/corelibs/U2Gui/src/UnloadDocumentTask.h +++ b/src/corelibs/U2Gui/src/UnloadDocumentTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -53,6 +53,7 @@ private: QPointer<Document> doc; SaveDocumentTask* saveTask; StateLock* lock; + static const QString ACTIVE_VIEW_ERROR; }; class U2GUI_EXPORT ReloadDocumentTask : public Task{ diff --git a/src/corelibs/U2Gui/src/WelcomePageAction.cpp b/src/corelibs/U2Gui/src/WelcomePageAction.cpp index 81aa05fb2b3a05c8e28ca04035a91ab505f60c58..41211aea1633e63ea98458fa6ac4dfa2c3422c16 100644 --- a/src/corelibs/U2Gui/src/WelcomePageAction.cpp +++ b/src/corelibs/U2Gui/src/WelcomePageAction.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/WelcomePageAction.h b/src/corelibs/U2Gui/src/WelcomePageAction.h index 9db33f3daf1566ed1fef2c3e0020b8e0efbe14aa..170b5a4f11a04ec29708bf5ac37697b689dee623 100644 --- a/src/corelibs/U2Gui/src/WelcomePageAction.h +++ b/src/corelibs/U2Gui/src/WelcomePageAction.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/options_panel/GroupHeaderImageWidget.cpp b/src/corelibs/U2Gui/src/options_panel/GroupHeaderImageWidget.cpp index 12cc4b4c936adb6913a8b1796c91f0fa5cd28b31..7e94b31111197571df78f7701509039d9a94c443 100644 --- a/src/corelibs/U2Gui/src/options_panel/GroupHeaderImageWidget.cpp +++ b/src/corelibs/U2Gui/src/options_panel/GroupHeaderImageWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/options_panel/GroupHeaderImageWidget.h b/src/corelibs/U2Gui/src/options_panel/GroupHeaderImageWidget.h index 25a27cd9a59d80314286610b1fc993417f4f89d8..836dae324162a7778728a5b318e7ec234a473b6c 100644 --- a/src/corelibs/U2Gui/src/options_panel/GroupHeaderImageWidget.h +++ b/src/corelibs/U2Gui/src/options_panel/GroupHeaderImageWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/options_panel/GroupOptionsWidget.cpp b/src/corelibs/U2Gui/src/options_panel/GroupOptionsWidget.cpp index d02003f8f3bceaf5b4d5798e8db2933e48ef95f0..301b21d1d0bf932f0dd352aa43f3b41b35a8c6a4 100644 --- a/src/corelibs/U2Gui/src/options_panel/GroupOptionsWidget.cpp +++ b/src/corelibs/U2Gui/src/options_panel/GroupOptionsWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/options_panel/GroupOptionsWidget.h b/src/corelibs/U2Gui/src/options_panel/GroupOptionsWidget.h index f248169846a333efae49f1c1749500139df15228..712cdeae498311489c1feb7fb2e8835cfac74222 100644 --- a/src/corelibs/U2Gui/src/options_panel/GroupOptionsWidget.h +++ b/src/corelibs/U2Gui/src/options_panel/GroupOptionsWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/options_panel/OPWidgetFactory.cpp b/src/corelibs/U2Gui/src/options_panel/OPWidgetFactory.cpp index d3ccd74d28e6e62c4d4614b5103d4c1ae0f19230..2318a7b74469ef7aa18b3f65283b30f87cd3c975 100644 --- a/src/corelibs/U2Gui/src/options_panel/OPWidgetFactory.cpp +++ b/src/corelibs/U2Gui/src/options_panel/OPWidgetFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/options_panel/OPWidgetFactory.h b/src/corelibs/U2Gui/src/options_panel/OPWidgetFactory.h index f79b7e216bbc99942dbcdbe8a6f19da892e45ae1..c703844728f082628fd29a206243bf43bdeb424a 100644 --- a/src/corelibs/U2Gui/src/options_panel/OPWidgetFactory.h +++ b/src/corelibs/U2Gui/src/options_panel/OPWidgetFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/options_panel/OPWidgetFactoryRegistry.cpp b/src/corelibs/U2Gui/src/options_panel/OPWidgetFactoryRegistry.cpp index fd32fcf3acc70e6cbacb22368bf6a212e644aaf1..dc1fe88dba41e75a43e911b8b64fbb19b716bad8 100644 --- a/src/corelibs/U2Gui/src/options_panel/OPWidgetFactoryRegistry.cpp +++ b/src/corelibs/U2Gui/src/options_panel/OPWidgetFactoryRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/options_panel/OPWidgetFactoryRegistry.h b/src/corelibs/U2Gui/src/options_panel/OPWidgetFactoryRegistry.h index 633e8b4f2e5a8c10a773568d2db7388a46ec1ce3..643843e846a3840353c55f06e9510b5084fdd9e4 100644 --- a/src/corelibs/U2Gui/src/options_panel/OPWidgetFactoryRegistry.h +++ b/src/corelibs/U2Gui/src/options_panel/OPWidgetFactoryRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/options_panel/OptionsPanel.cpp b/src/corelibs/U2Gui/src/options_panel/OptionsPanel.cpp index e62a52bc5d11dc137dc4dfb760a73214ee7172a3..4d74bf0ec782b0782b999f991e7cb15a884eb3e2 100644 --- a/src/corelibs/U2Gui/src/options_panel/OptionsPanel.cpp +++ b/src/corelibs/U2Gui/src/options_panel/OptionsPanel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/options_panel/OptionsPanel.h b/src/corelibs/U2Gui/src/options_panel/OptionsPanel.h index a0aa76385671964bc4a49fce1866be9f02aa9670..b5b75f50c1acd3f3a5c5e00e47abc0b694e2ff5d 100644 --- a/src/corelibs/U2Gui/src/options_panel/OptionsPanel.h +++ b/src/corelibs/U2Gui/src/options_panel/OptionsPanel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/options_panel/OptionsPanelGroup.cpp b/src/corelibs/U2Gui/src/options_panel/OptionsPanelGroup.cpp index 2d24cff0467351e4034929f1f1c60c17447a7dee..7c05bee1398fab45a5035432bed769f82ec4ad83 100644 --- a/src/corelibs/U2Gui/src/options_panel/OptionsPanelGroup.cpp +++ b/src/corelibs/U2Gui/src/options_panel/OptionsPanelGroup.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/options_panel/OptionsPanelGroup.h b/src/corelibs/U2Gui/src/options_panel/OptionsPanelGroup.h index 53455711c1ecaaa8c7ea53d30b51e1e70553815c..1f278f17cbb8b0918474fa9bd1a5315859406ecf 100644 --- a/src/corelibs/U2Gui/src/options_panel/OptionsPanelGroup.h +++ b/src/corelibs/U2Gui/src/options_panel/OptionsPanelGroup.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/options_panel/OptionsPanelWidget.cpp b/src/corelibs/U2Gui/src/options_panel/OptionsPanelWidget.cpp index 9b77912eb34c682a162b62cce51fc43219fd19a5..0f214bb827dae5ee655f157bd04e21bc9e5d829f 100644 --- a/src/corelibs/U2Gui/src/options_panel/OptionsPanelWidget.cpp +++ b/src/corelibs/U2Gui/src/options_panel/OptionsPanelWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/options_panel/OptionsPanelWidget.h b/src/corelibs/U2Gui/src/options_panel/OptionsPanelWidget.h index 4ffb5ec2b83267c482382a853b50e3eb931e4e00..907372e0f6bb2689dbeccd10dfc534baed983c6c 100644 --- a/src/corelibs/U2Gui/src/options_panel/OptionsPanelWidget.h +++ b/src/corelibs/U2Gui/src/options_panel/OptionsPanelWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/options_panel/ShowHideSubgroupWidget.cpp b/src/corelibs/U2Gui/src/options_panel/ShowHideSubgroupWidget.cpp index 4b1e313dcb4eb833a12b347afd5c1f4a1cb47c8d..c0574fab145e6f662611f6f90dc26da00b59d017 100644 --- a/src/corelibs/U2Gui/src/options_panel/ShowHideSubgroupWidget.cpp +++ b/src/corelibs/U2Gui/src/options_panel/ShowHideSubgroupWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/options_panel/ShowHideSubgroupWidget.h b/src/corelibs/U2Gui/src/options_panel/ShowHideSubgroupWidget.h index 403e992d50cfa907bb706009c803d5b8f3245ee9..fbd811b1d289bf9eae6df2c35db9c6e7a5f1882c 100644 --- a/src/corelibs/U2Gui/src/options_panel/ShowHideSubgroupWidget.h +++ b/src/corelibs/U2Gui/src/options_panel/ShowHideSubgroupWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/AddNewDocumentDialogController.h b/src/corelibs/U2Gui/src/util/AddNewDocumentDialogController.h index 45e21dafc0c30ee29d13fec78ce43a2c884524d5..c350047185093c86ee95e2767d79af62975a463a 100644 --- a/src/corelibs/U2Gui/src/util/AddNewDocumentDialogController.h +++ b/src/corelibs/U2Gui/src/util/AddNewDocumentDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/AddNewDocumentDialogImpl.cpp b/src/corelibs/U2Gui/src/util/AddNewDocumentDialogImpl.cpp index 4aba46b3356d2d2d23939433a03dcd0e1a707aa0..9ace31ab52a5d46bdde376924536f358ded086a5 100644 --- a/src/corelibs/U2Gui/src/util/AddNewDocumentDialogImpl.cpp +++ b/src/corelibs/U2Gui/src/util/AddNewDocumentDialogImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -50,7 +50,7 @@ AddNewDocumentDialogImpl::AddNewDocumentDialogImpl(QWidget* p, AddNewDocumentDia model(m) { setupUi(this); - new HelpButton(this, buttonBox, "22055887"); + new HelpButton(this, buttonBox, "24742422"); if (model.format.isEmpty()) { model.format = AppContext::getSettings()->getValue(SETTINGS_LASTFORMAT, QString("")).toString(); } diff --git a/src/corelibs/U2Gui/src/util/AddNewDocumentDialogImpl.h b/src/corelibs/U2Gui/src/util/AddNewDocumentDialogImpl.h index c7728a9f6cab097b064566d4684df49e19c702c5..7ab40d65c781e2b56c32e3b7b9828a1b8f9248ab 100644 --- a/src/corelibs/U2Gui/src/util/AddNewDocumentDialogImpl.h +++ b/src/corelibs/U2Gui/src/util/AddNewDocumentDialogImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/AuthenticationDialog.cpp b/src/corelibs/U2Gui/src/util/AuthenticationDialog.cpp index 590dbfd363441d1b5ed1a6cb611ac47acf42c56d..65705a3e5acffc44084471ce0655a6b51c215840 100644 --- a/src/corelibs/U2Gui/src/util/AuthenticationDialog.cpp +++ b/src/corelibs/U2Gui/src/util/AuthenticationDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,7 +34,7 @@ AuthenticationDialog::AuthenticationDialog(const QString &text, QWidget* parent) authenticationWidget(new AuthenticationWidget) { ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22056157"); + new HelpButton(this, ui->buttonBox, "24742692"); ui->mainLayout->insertWidget(1, authenticationWidget); if (text.isEmpty()) { diff --git a/src/corelibs/U2Gui/src/util/AuthenticationDialog.h b/src/corelibs/U2Gui/src/util/AuthenticationDialog.h index 8d8a2526c13961bdbe566befca53f4247f181278..0a4046cb60513cf3b7d1fd6187f554b807524018 100644 --- a/src/corelibs/U2Gui/src/util/AuthenticationDialog.h +++ b/src/corelibs/U2Gui/src/util/AuthenticationDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/AuthenticationWidget.cpp b/src/corelibs/U2Gui/src/util/AuthenticationWidget.cpp index 3d4b9dee3537d9149511a590fdf77d82c61dc40b..3e1f04dc9955108d7497af5c9993efa1f069b80c 100644 --- a/src/corelibs/U2Gui/src/util/AuthenticationWidget.cpp +++ b/src/corelibs/U2Gui/src/util/AuthenticationWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/AuthenticationWidget.h b/src/corelibs/U2Gui/src/util/AuthenticationWidget.h index dc11c17a2a47d21f8a8addbae049894250f312df..a69baec14465ca8970dc2aeabadef2a609a9a628 100644 --- a/src/corelibs/U2Gui/src/util/AuthenticationWidget.h +++ b/src/corelibs/U2Gui/src/util/AuthenticationWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/BreakpointConditionEditDialog.cpp b/src/corelibs/U2Gui/src/util/BreakpointConditionEditDialog.cpp index fcdec3dafe5107cb758d4e20a3d261f44e5935bd..df172bac2efeb42d74a76bd2d108c4a02fd7b4d7 100644 --- a/src/corelibs/U2Gui/src/util/BreakpointConditionEditDialog.cpp +++ b/src/corelibs/U2Gui/src/util/BreakpointConditionEditDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -35,7 +35,7 @@ BreakpointConditionEditDialog::BreakpointConditionEditDialog(QWidget *parent, { ui = new Ui_BreakpointConditionEditDialog(); ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22056453"); + new HelpButton(this, ui->buttonBox, "24740355"); ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2Gui/src/util/BreakpointConditionEditDialog.h b/src/corelibs/U2Gui/src/util/BreakpointConditionEditDialog.h index b32ca3907485d1b075f74f30807a7e8cefe5aa2c..e6022a180c246c4366c49c2acdd3d11a4de099f0 100644 --- a/src/corelibs/U2Gui/src/util/BreakpointConditionEditDialog.h +++ b/src/corelibs/U2Gui/src/util/BreakpointConditionEditDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/CreateAnnotationDialog.cpp b/src/corelibs/U2Gui/src/util/CreateAnnotationDialog.cpp index 677ef68d94b5edf4ca72b06ba0999e651c04a42a..48ff6ec418d872d5ba4d34abcb80b413391d1716 100644 --- a/src/corelibs/U2Gui/src/util/CreateAnnotationDialog.cpp +++ b/src/corelibs/U2Gui/src/util/CreateAnnotationDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -46,7 +46,7 @@ CreateAnnotationDialog::CreateAnnotationDialog(QWidget* p, CreateAnnotationModel ui->setupUi(this); annWidgetController = new CreateAnnotationWidgetController(m, this, CreateAnnotationWidgetController::Full); - helpButton = new HelpButton(this, ui->buttonBox, "22055854"); + helpButton = new HelpButton(this, ui->buttonBox, "24742389"); ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Create")); ui->mainLayout->insertWidget(0, annWidgetController->getWidget()); diff --git a/src/corelibs/U2Gui/src/util/CreateAnnotationDialog.h b/src/corelibs/U2Gui/src/util/CreateAnnotationDialog.h index b32ae77182b83ca12870b4cd6be47fbe23393a33..99e6e5b9b613519cdbf85ed2fd4c47f9a433d524 100644 --- a/src/corelibs/U2Gui/src/util/CreateAnnotationDialog.h +++ b/src/corelibs/U2Gui/src/util/CreateAnnotationDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/CreateAnnotationFullWidget.cpp b/src/corelibs/U2Gui/src/util/CreateAnnotationFullWidget.cpp index 4247771e18cb8830cc54ea5455f6e7bcffdfd6ff..0707d604ab03f4ac926570e572a82caa8ff5198a 100644 --- a/src/corelibs/U2Gui/src/util/CreateAnnotationFullWidget.cpp +++ b/src/corelibs/U2Gui/src/util/CreateAnnotationFullWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -40,6 +40,7 @@ CreateAnnotationFullWidget::CreateAnnotationFullWidget(QWidget *parent) : setupUi(this); initLayout(); init(); + initOsDependingLayoutSettings(); connectSignals(); } @@ -55,53 +56,6 @@ void CreateAnnotationFullWidget::setGroupNameVisible(bool visible) { void CreateAnnotationFullWidget::setLocationVisible(bool visible) { gbLocation->setVisible(visible); - - if (visible) { - mainLayout->addWidget(gbSaveAnnotationsInnerWidget); - - saveAnnotationsLayout->removeWidget(rbExistingTable); - saveAnnotationsLayout->removeWidget(cbExistingTable); - saveAnnotationsLayout->removeWidget(tbBrowseExistingTable); - - saveAnnotationsLayout->removeWidget(rbCreateNewTable); - saveAnnotationsLayout->removeWidget(leNewTablePath); - saveAnnotationsLayout->removeWidget(tbBrowseNewTable); - - saveAnnotationsLayout->removeWidget(rbUseAutoTable); - - saveAnnotationsLayout->addWidget(rbExistingTable, 0, 0); - saveAnnotationsLayout->addWidget(cbExistingTable, 0, 1); - saveAnnotationsLayout->addWidget(tbBrowseExistingTable, 0, 2); - - saveAnnotationsLayout->addWidget(rbCreateNewTable, 1, 0); - saveAnnotationsLayout->addWidget(leNewTablePath, 1, 1); - saveAnnotationsLayout->addWidget(tbBrowseNewTable, 1, 2); - - saveAnnotationsLayout->addWidget(rbUseAutoTable, 2, 0); - } else { - parametersLayout->addWidget(gbSaveAnnotationsInnerWidget); - - saveAnnotationsLayout->removeWidget(rbExistingTable); - saveAnnotationsLayout->removeWidget(cbExistingTable); - saveAnnotationsLayout->removeWidget(tbBrowseExistingTable); - - saveAnnotationsLayout->removeWidget(rbCreateNewTable); - saveAnnotationsLayout->removeWidget(leNewTablePath); - saveAnnotationsLayout->removeWidget(tbBrowseNewTable); - - saveAnnotationsLayout->removeWidget(rbUseAutoTable); - - saveAnnotationsLayout->addWidget(rbExistingTable, 0, 0, 1, 2); - saveAnnotationsLayout->addWidget(cbExistingTable, 1, 0); - saveAnnotationsLayout->addWidget(tbBrowseExistingTable, 1, 1); - - saveAnnotationsLayout->addWidget(rbCreateNewTable, 2, 0, 1, 2); - saveAnnotationsLayout->addWidget(leNewTablePath, 3, 0); - saveAnnotationsLayout->addWidget(tbBrowseNewTable, 3, 1); - - saveAnnotationsLayout->addWidget(rbUseAutoTable, 4, 0, 1, 2); - parametersLayout->addStretch(); - } } void CreateAnnotationFullWidget::setAnnotationParametersVisible(bool /*visible*/) { @@ -132,7 +86,7 @@ void CreateAnnotationFullWidget::setUsePatternNamesVisible(bool visible) { } void CreateAnnotationFullWidget::setAnnotationTableOptionVisible(bool visible) { - saveAnnotationsInnerWidget->setVisible(visible); + gbSaveAnnotationsInnerWidget->setVisible(visible); } void CreateAnnotationFullWidget::setAnnotationNameEnabled(bool enable) { @@ -313,6 +267,22 @@ void CreateAnnotationFullWidget::init() { useAminoAnnotationTypes(false); } +void CreateAnnotationFullWidget::initOsDependingLayoutSettings() { +//macOS as default +#ifdef Q_OS_WIN + verticalLayout_6->setSpacing(6); + horizontalLayout_10->setSpacing(2); + gbSaveAnnotationsInnerWidget->layout()->setContentsMargins(9, 0, 9, 6); +#elif !defined(Q_OS_OSX) + verticalLayout_6->setSpacing(6); + this->layout()->setSpacing(10); + gbSaveAnnotationsInnerWidget->layout()->setContentsMargins(9, 6, 9, 6); + horizontalLayout_8->setSpacing(5); + horizontalLayout_9->setSpacing(8); + horizontalLayout_10->setSpacing(8); +#endif +} + void CreateAnnotationFullWidget::connectSignals() { connect(tbBrowseExistingTable, SIGNAL(clicked()), SLOT(sl_selectExistingTableRequest())); connect(leGroupName, SIGNAL(textEdited(const QString &)), SLOT(sl_groupNameEdited())); diff --git a/src/corelibs/U2Gui/src/util/CreateAnnotationFullWidget.h b/src/corelibs/U2Gui/src/util/CreateAnnotationFullWidget.h index 7deef058e5f4d2085e0b2a578f4ca8ed681e864e..298167ca9825eefe206a1489fee17ad51ae66eef 100644 --- a/src/corelibs/U2Gui/src/util/CreateAnnotationFullWidget.h +++ b/src/corelibs/U2Gui/src/util/CreateAnnotationFullWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -95,6 +95,7 @@ private: void initLayout(); void init(); + void initOsDependingLayoutSettings(); void connectSignals(); FormatType formatType; diff --git a/src/corelibs/U2Gui/src/util/CreateAnnotationFullWidget.ui b/src/corelibs/U2Gui/src/util/CreateAnnotationFullWidget.ui index db31e441514fec9c81a24d5dbe99ca185707c6f7..bf9bbfdb1807fafd984d4be6b4dc125b041bafa1 100644 --- a/src/corelibs/U2Gui/src/util/CreateAnnotationFullWidget.ui +++ b/src/corelibs/U2Gui/src/util/CreateAnnotationFullWidget.ui @@ -7,11 +7,11 @@ <x>0</x> <y>0</y> <width>614</width> - <height>496</height> + <height>499</height> </rect> </property> <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> @@ -20,6 +20,9 @@ <string>Create Annotations</string> </property> <layout class="QVBoxLayout" name="mainLayout"> + <property name="spacing"> + <number>25</number> + </property> <property name="sizeConstraint"> <enum>QLayout::SetMinAndMaxSize</enum> </property> @@ -37,14 +40,23 @@ </property> <item> <layout class="QHBoxLayout" name="annotationParametersLayout" stretch="0,0"> + <property name="spacing"> + <number>5</number> + </property> <property name="sizeConstraint"> <enum>QLayout::SetMinAndMaxSize</enum> </property> <item> <layout class="QVBoxLayout" name="verticalLayout" stretch="0,1"> + <property name="spacing"> + <number>5</number> + </property> <property name="sizeConstraint"> <enum>QLayout::SetMinAndMaxSize</enum> </property> + <property name="rightMargin"> + <number>8</number> + </property> <item> <widget class="QLabel" name="lblAnnotationType"> <property name="text"> @@ -72,6 +84,9 @@ <property name="sizeConstraint"> <enum>QLayout::SetMinAndMaxSize</enum> </property> + <property name="leftMargin"> + <number>2</number> + </property> <property name="bottomMargin"> <number>0</number> </property> @@ -94,9 +109,18 @@ <property name="sizeConstraint"> <enum>QLayout::SetMinAndMaxSize</enum> </property> - <property name="spacing"> + <property name="topMargin"> + <number>14</number> + </property> + <property name="bottomMargin"> + <number>12</number> + </property> + <property name="horizontalSpacing"> <number>11</number> </property> + <property name="verticalSpacing"> + <number>10</number> + </property> <item row="1" column="0"> <widget class="QLabel" name="lblAnnotationName"> <property name="text"> @@ -106,12 +130,18 @@ </item> <item row="3" column="0" colspan="3"> <widget class="QCheckBox" name="chbUsePatternNames"> + <property name="enabled"> + <bool>true</bool> + </property> <property name="toolTip"> <string>Use names of patterns as annotations names. In case the patterns are in FASTA format</string> </property> <property name="text"> <string>Use pattern names</string> </property> + <property name="checked"> + <bool>false</bool> + </property> </widget> </item> <item row="0" column="0"> @@ -179,6 +209,12 @@ <property name="sizeConstraint"> <enum>QLayout::SetMinAndMaxSize</enum> </property> + <property name="topMargin"> + <number>6</number> + </property> + <property name="bottomMargin"> + <number>4</number> + </property> <item> <layout class="QVBoxLayout" name="verticalLayout_4"> <property name="spacing"> @@ -186,6 +222,9 @@ </property> <item> <layout class="QHBoxLayout" name="horizontalLayout_5"> + <property name="bottomMargin"> + <number>6</number> + </property> <item> <spacer name="horizontalSpacer_2"> <property name="orientation"> @@ -259,6 +298,9 @@ </property> <item> <layout class="QHBoxLayout" name="horizontalLayout_3"> + <property name="bottomMargin"> + <number>6</number> + </property> <item> <spacer name="horizontalSpacer"> <property name="orientation"> @@ -343,98 +385,222 @@ </item> <item> <widget class="QGroupBox" name="gbSaveAnnotationsInnerWidget"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="title"> <string>Save annotation(s) to</string> </property> - <layout class="QVBoxLayout" name="verticalLayout_6"> + <layout class="QVBoxLayout" name="verticalLayout_7"> + <property name="spacing"> + <number>4</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> <item> - <widget class="QWidget" name="saveAnnotationsInnerWidget" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> + <layout class="QVBoxLayout" name="verticalLayout_6"> + <property name="spacing"> + <number>0</number> </property> - <property name="toolTip"> - <string>Choose a file to store the annotations</string> - </property> - <layout class="QGridLayout" name="saveAnnotationsLayout"> - <property name="sizeConstraint"> - <enum>QLayout::SetMinAndMaxSize</enum> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>5</number> - </property> - <item row="1" column="0"> - <widget class="QRadioButton" name="rbExistingTable"> - <property name="text"> - <string>Existing document</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="2" column="2"> - <widget class="QToolButton" name="tbBrowseNewTable"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string>...</string> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="QLineEdit" name="leNewTablePath"> - <property name="enabled"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="QRadioButton" name="rbCreateNewTable"> - <property name="text"> - <string>New document</string> - </property> - </widget> - </item> - <item row="3" column="0"> - <widget class="QRadioButton" name="rbUseAutoTable"> - <property name="text"> - <string>Use auto-annotations table</string> - </property> - </widget> - </item> - <item row="1" column="2"> - <widget class="QToolButton" name="tbBrowseExistingTable"> - <property name="text"> - <string>...</string> - </property> - <property name="icon"> - <iconset resource="../../U2Gui.qrc"> - <normaloff>:/core/images/load_selected_documents.png</normaloff>:/core/images/load_selected_documents.png</iconset> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QComboBox" name="cbExistingTable"> - <property name="sizeAdjustPolicy"> - <enum>QComboBox::AdjustToContentsOnFirstShow</enum> - </property> - </widget> - </item> - </layout> - </widget> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_9"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_8"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QRadioButton" name="rbExistingTable"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>22</height> + </size> + </property> + <property name="text"> + <string>Existing document</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Preferred</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>45</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <widget class="QComboBox" name="cbExistingTable"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>22</height> + </size> + </property> + <property name="sizeAdjustPolicy"> + <enum>QComboBox::AdjustToContentsOnFirstShow</enum> + </property> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QToolButton" name="tbBrowseExistingTable"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>22</height> + </size> + </property> + <property name="text"> + <string>...</string> + </property> + <property name="icon"> + <iconset resource="../../U2Gui.qrc"> + <normaloff>:/core/images/load_selected_documents.png</normaloff>:/core/images/load_selected_documents.png</iconset> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_11"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_10"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_6"> + <item> + <widget class="QRadioButton" name="rbCreateNewTable"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>22</height> + </size> + </property> + <property name="text"> + <string>New document</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_4"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Preferred</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>65</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <widget class="QLineEdit" name="leNewTablePath"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>22</height> + </size> + </property> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QToolButton" name="tbBrowseNewTable"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>22</height> + </size> + </property> + <property name="text"> + <string>...</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_7"> + <item> + <widget class="QRadioButton" name="rbUseAutoTable"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>25</height> + </size> + </property> + <property name="toolTipDuration"> + <number>3</number> + </property> + <property name="text"> + <string>Use auto-annotations table</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> </item> </layout> </widget> @@ -455,47 +621,40 @@ <tabstop>rbGenbankFormat</tabstop> <tabstop>leLocation</tabstop> <tabstop>tbDoComplement</tabstop> - <tabstop>rbExistingTable</tabstop> - <tabstop>cbExistingTable</tabstop> - <tabstop>tbBrowseExistingTable</tabstop> - <tabstop>rbCreateNewTable</tabstop> - <tabstop>leNewTablePath</tabstop> - <tabstop>tbBrowseNewTable</tabstop> - <tabstop>rbUseAutoTable</tabstop> </tabstops> <resources> <include location="../../U2Gui.qrc"/> </resources> <connections> <connection> - <sender>rbExistingTable</sender> + <sender>rbSimpleFormat</sender> <signal>toggled(bool)</signal> - <receiver>cbExistingTable</receiver> + <receiver>gbSimpleFormat</receiver> <slot>setEnabled(bool)</slot> <hints> <hint type="sourcelabel"> - <x>98</x> - <y>387</y> + <x>450</x> + <y>162</y> </hint> <hint type="destinationlabel"> - <x>484</x> - <y>384</y> + <x>440</x> + <y>211</y> </hint> </hints> </connection> <connection> - <sender>rbExistingTable</sender> + <sender>rbGenbankFormat</sender> <signal>toggled(bool)</signal> - <receiver>tbBrowseExistingTable</receiver> + <receiver>gbGenbankFormat</receiver> <slot>setEnabled(bool)</slot> <hints> <hint type="sourcelabel"> - <x>98</x> - <y>387</y> + <x>450</x> + <y>271</y> </hint> <hint type="destinationlabel"> - <x>793</x> - <y>382</y> + <x>440</x> + <y>310</y> </hint> </hints> </connection> @@ -506,12 +665,12 @@ <slot>setEnabled(bool)</slot> <hints> <hint type="sourcelabel"> - <x>98</x> - <y>425</y> + <x>60</x> + <y>451</y> </hint> <hint type="destinationlabel"> - <x>487</x> - <y>425</y> + <x>377</x> + <y>451</y> </hint> </hints> </connection> @@ -522,44 +681,44 @@ <slot>setEnabled(bool)</slot> <hints> <hint type="sourcelabel"> - <x>98</x> - <y>425</y> + <x>60</x> + <y>451</y> </hint> <hint type="destinationlabel"> - <x>794</x> - <y>426</y> + <x>589</x> + <y>451</y> </hint> </hints> </connection> <connection> - <sender>rbSimpleFormat</sender> + <sender>rbExistingTable</sender> <signal>toggled(bool)</signal> - <receiver>gbSimpleFormat</receiver> + <receiver>cbExistingTable</receiver> <slot>setEnabled(bool)</slot> <hints> <hint type="sourcelabel"> - <x>450</x> - <y>162</y> + <x>68</x> + <y>423</y> </hint> <hint type="destinationlabel"> - <x>440</x> - <y>211</y> + <x>376</x> + <y>423</y> </hint> </hints> </connection> <connection> - <sender>rbGenbankFormat</sender> + <sender>rbExistingTable</sender> <signal>toggled(bool)</signal> - <receiver>gbGenbankFormat</receiver> + <receiver>tbBrowseExistingTable</receiver> <slot>setEnabled(bool)</slot> <hints> <hint type="sourcelabel"> - <x>450</x> - <y>271</y> + <x>68</x> + <y>423</y> </hint> <hint type="destinationlabel"> - <x>440</x> - <y>310</y> + <x>590</x> + <y>423</y> </hint> </hints> </connection> diff --git a/src/corelibs/U2Gui/src/util/CreateAnnotationNormalWidget.cpp b/src/corelibs/U2Gui/src/util/CreateAnnotationNormalWidget.cpp index 651a0144fe62a9decb52b73378680499d9af2408..215745518e569b84e9254e002be4610efc929847 100644 --- a/src/corelibs/U2Gui/src/util/CreateAnnotationNormalWidget.cpp +++ b/src/corelibs/U2Gui/src/util/CreateAnnotationNormalWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/CreateAnnotationNormalWidget.h b/src/corelibs/U2Gui/src/util/CreateAnnotationNormalWidget.h index 5679c72e6ec7f61528cec6707a9635254fa96539..0dfcd964e5347db4159db4b8955bf19b96ac10f9 100644 --- a/src/corelibs/U2Gui/src/util/CreateAnnotationNormalWidget.h +++ b/src/corelibs/U2Gui/src/util/CreateAnnotationNormalWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/CreateAnnotationOptionsPanelWidget.cpp b/src/corelibs/U2Gui/src/util/CreateAnnotationOptionsPanelWidget.cpp index e6f57476b2f26a638cba0faa7e6d61ba89ad0836..67657c3a85bb7f6536fc0c99d9f106d316f2ac12 100644 --- a/src/corelibs/U2Gui/src/util/CreateAnnotationOptionsPanelWidget.cpp +++ b/src/corelibs/U2Gui/src/util/CreateAnnotationOptionsPanelWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/CreateAnnotationOptionsPanelWidget.h b/src/corelibs/U2Gui/src/util/CreateAnnotationOptionsPanelWidget.h index 13fc4e24542645c29492087d0c192c78c8717fd2..032db82e357e0bf5e1ac6958f1b7bc42c81f7a33 100644 --- a/src/corelibs/U2Gui/src/util/CreateAnnotationOptionsPanelWidget.h +++ b/src/corelibs/U2Gui/src/util/CreateAnnotationOptionsPanelWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/CreateAnnotationWidget.cpp b/src/corelibs/U2Gui/src/util/CreateAnnotationWidget.cpp index a0a5d0fed94fc79a7593415dc970d2f7fae73f2c..c891b52e577ad4297404b78cb63c7e202bcddb84 100644 --- a/src/corelibs/U2Gui/src/util/CreateAnnotationWidget.cpp +++ b/src/corelibs/U2Gui/src/util/CreateAnnotationWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/CreateAnnotationWidget.h b/src/corelibs/U2Gui/src/util/CreateAnnotationWidget.h index fb6b3cd508b2e0551a952d723d09909c328830ef..ffaff47df90e2c8227de8694e684299a8b997b05 100644 --- a/src/corelibs/U2Gui/src/util/CreateAnnotationWidget.h +++ b/src/corelibs/U2Gui/src/util/CreateAnnotationWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/CreateAnnotationWidgetController.cpp b/src/corelibs/U2Gui/src/util/CreateAnnotationWidgetController.cpp index 01ad5a9bf43b6562a0cbfe8cacfcc1d3f16dd4ef..968226e8d1ae9069c6290a5c1ac3103f1034d3f8 100644 --- a/src/corelibs/U2Gui/src/util/CreateAnnotationWidgetController.cpp +++ b/src/corelibs/U2Gui/src/util/CreateAnnotationWidgetController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -94,7 +94,6 @@ AnnotationTableObject * CreateAnnotationModel::getAnnotationObject() const { return aobj; } -const QString CreateAnnotationWidgetController::GROUP_NAME_AUTO = QObject::tr("<auto>"); const QString CreateAnnotationWidgetController::DESCRIPTION_QUALIFIER_KEY = "note"; const QString CreateAnnotationWidgetController::SETTINGS_LASTDIR = "create_annotation/last_dir"; @@ -105,6 +104,8 @@ CreateAnnotationWidgetController::CreateAnnotationWidgetController(const CreateA model(m), saveController(NULL) { + GROUP_NAME_AUTO = tr("<auto>"); + this->setObjectName("CreateAnnotationWidgetController"); assert(AppContext::getProject()!=NULL); assert(model.sequenceObjectRef.isValid()); diff --git a/src/corelibs/U2Gui/src/util/CreateAnnotationWidgetController.h b/src/corelibs/U2Gui/src/util/CreateAnnotationWidgetController.h index 6fccf6a650b698923f36729cecd9282e2975cb9b..815267c02e6fac658ce0f810a39282ac7753339e 100644 --- a/src/corelibs/U2Gui/src/util/CreateAnnotationWidgetController.h +++ b/src/corelibs/U2Gui/src/util/CreateAnnotationWidgetController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -150,7 +150,7 @@ private: CreateAnnotationWidget * w; SaveDocumentController * saveController; - static const QString GROUP_NAME_AUTO; + QString GROUP_NAME_AUTO; static const QString DESCRIPTION_QUALIFIER_KEY; static const QString SETTINGS_LASTDIR; }; diff --git a/src/corelibs/U2Gui/src/util/CreateDocumentFromTextDialogController.cpp b/src/corelibs/U2Gui/src/util/CreateDocumentFromTextDialogController.cpp index f8b8da660c4c50848096825a4650f9f723a4ae5c..29a4785681cf5f73d84040ba9342a35eee5dbbd1 100644 --- a/src/corelibs/U2Gui/src/util/CreateDocumentFromTextDialogController.cpp +++ b/src/corelibs/U2Gui/src/util/CreateDocumentFromTextDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -49,7 +49,7 @@ CreateDocumentFromTextDialogController::CreateDocumentFromTextDialogController(Q saveController(NULL) { ui = new Ui_CreateDocumentFromTextDialog(); ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22055790"); + new HelpButton(this, ui->buttonBox, "24742325"); initSaveController(); diff --git a/src/corelibs/U2Gui/src/util/CreateDocumentFromTextDialogController.h b/src/corelibs/U2Gui/src/util/CreateDocumentFromTextDialogController.h index 64f783d68f06b40edd87a728bfe55914c08592c7..e35123b2b63d941e81040aafe154ae0003c38fe4 100644 --- a/src/corelibs/U2Gui/src/util/CreateDocumentFromTextDialogController.h +++ b/src/corelibs/U2Gui/src/util/CreateDocumentFromTextDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/CreateObjectRelationDialogController.cpp b/src/corelibs/U2Gui/src/util/CreateObjectRelationDialogController.cpp index 93f4dfdaa5c7211473a3e6edb4f9d332bca2a227..37b5e94232b437b4bc91e9bca8d654efedfa0320 100644 --- a/src/corelibs/U2Gui/src/util/CreateObjectRelationDialogController.cpp +++ b/src/corelibs/U2Gui/src/util/CreateObjectRelationDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/CreateObjectRelationDialogController.h b/src/corelibs/U2Gui/src/util/CreateObjectRelationDialogController.h index fa5d1545a0a7e8a2f5748429cfc8301fba2ceb9b..1820d1043dbc46bcab7ec6e8e89cb5ac75cb58e8 100644 --- a/src/corelibs/U2Gui/src/util/CreateObjectRelationDialogController.h +++ b/src/corelibs/U2Gui/src/util/CreateObjectRelationDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/CreateSequenceFromTextAndOpenViewTask.cpp b/src/corelibs/U2Gui/src/util/CreateSequenceFromTextAndOpenViewTask.cpp index 81a4f8054fe4246c4c07af89b36592aeb355c03b..a992506e0c5f3a2b0006fb8cc132d0995675d66b 100644 --- a/src/corelibs/U2Gui/src/util/CreateSequenceFromTextAndOpenViewTask.cpp +++ b/src/corelibs/U2Gui/src/util/CreateSequenceFromTextAndOpenViewTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/CreateSequenceFromTextAndOpenViewTask.h b/src/corelibs/U2Gui/src/util/CreateSequenceFromTextAndOpenViewTask.h index 849d5b3299b3854df6df7647e8deb88741aac4b0..4c070e13e5a06ea8758aff6181cd129e6494d650 100644 --- a/src/corelibs/U2Gui/src/util/CreateSequenceFromTextAndOpenViewTask.h +++ b/src/corelibs/U2Gui/src/util/CreateSequenceFromTextAndOpenViewTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/CredentialsAskerGui.cpp b/src/corelibs/U2Gui/src/util/CredentialsAskerGui.cpp index e556b52b0142cb2d9f1d3f6c7943986869934c22..74372bb1882e62b00e412ff4f86fec71ded42fad 100644 --- a/src/corelibs/U2Gui/src/util/CredentialsAskerGui.cpp +++ b/src/corelibs/U2Gui/src/util/CredentialsAskerGui.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/CredentialsAskerGui.h b/src/corelibs/U2Gui/src/util/CredentialsAskerGui.h index 1d8d48834015429a676261b6dbb98a762f72dd7a..bf2c65ec69aa0f2ce501fe7381a5adaf58e60bf4 100644 --- a/src/corelibs/U2Gui/src/util/CredentialsAskerGui.h +++ b/src/corelibs/U2Gui/src/util/CredentialsAskerGui.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/DialogUtils.cpp b/src/corelibs/U2Gui/src/util/DialogUtils.cpp index d4d7ce070d436dd44378bf1397b24362311078b8..2837e85f17006b1403a9bf0cebb40ebe2c423617 100644 --- a/src/corelibs/U2Gui/src/util/DialogUtils.cpp +++ b/src/corelibs/U2Gui/src/util/DialogUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -62,14 +62,15 @@ QString DialogUtils::prepareDocumentsFileFilterByObjType(const GObjectType& t, b return FormatUtils::prepareDocumentsFileFilterByObjType(t, any); } -void DialogUtils::setWizardMinimumSize(QWizard *wizard) { - QSize bestSize; +void DialogUtils::setWizardMinimumSize(QWizard *wizard, const QSize &minimumSize) { + QSize bestSize = minimumSize; foreach (int pageId, wizard->pageIds()) { QWizardPage *page = wizard->page(pageId); page->adjustSize(); bestSize = bestSize.expandedTo(page->size()); } wizard->setMinimumSize(bestSize); + wizard->adjustSize(); } diff --git a/src/corelibs/U2Gui/src/util/DialogUtils.h b/src/corelibs/U2Gui/src/util/DialogUtils.h index 044a10ab2cb190f63f0cebff55cfba5ec2e998b0..0111546e11be8ad4c6ee6d41ef03c672a2ddcd50 100644 --- a/src/corelibs/U2Gui/src/util/DialogUtils.h +++ b/src/corelibs/U2Gui/src/util/DialogUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -51,7 +51,7 @@ public: static QString prepareDocumentsFileFilterByObjType(const GObjectType& t, bool any); - static void setWizardMinimumSize(QWizard *wizard); + static void setWizardMinimumSize(QWizard *wizard, const QSize &minimumSize = QSize()); }; class U2GUI_EXPORT FileLineEdit : public QLineEdit { diff --git a/src/corelibs/U2Gui/src/util/DocumentFormatComboboxController.cpp b/src/corelibs/U2Gui/src/util/DocumentFormatComboboxController.cpp index 86a0a0c831dd2d4d35d7ad2f0dbd75a2d2081382..d6538d1308dc509b7481453ba9b9be600ed1197c 100644 --- a/src/corelibs/U2Gui/src/util/DocumentFormatComboboxController.cpp +++ b/src/corelibs/U2Gui/src/util/DocumentFormatComboboxController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/DocumentFormatComboboxController.h b/src/corelibs/U2Gui/src/util/DocumentFormatComboboxController.h index a38204df9951bde18df7174b6f738bb62037abe6..81986ad654e68778b8fdc8d1ef470e05a9639150 100644 --- a/src/corelibs/U2Gui/src/util/DocumentFormatComboboxController.h +++ b/src/corelibs/U2Gui/src/util/DocumentFormatComboboxController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/DownloadRemoteFileDialog.cpp b/src/corelibs/U2Gui/src/util/DownloadRemoteFileDialog.cpp index e952c2347b65239b7ef449bcc477fff56d755c04..195486c8f14f507ac76f04e866dff76816da26fb 100644 --- a/src/corelibs/U2Gui/src/util/DownloadRemoteFileDialog.cpp +++ b/src/corelibs/U2Gui/src/util/DownloadRemoteFileDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -56,7 +56,7 @@ QString DownloadRemoteFileDialog::defaultDB(""); DownloadRemoteFileDialog::DownloadRemoteFileDialog(QWidget *p):QDialog(p), isQueryDB(false) { ui = new Ui_DownloadRemoteFileDialog; ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22055804"); + new HelpButton(this, ui->buttonBox, "24742339"); ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -93,7 +93,7 @@ DownloadRemoteFileDialog::DownloadRemoteFileDialog( const QString& id, const QSt { ui = new Ui_DownloadRemoteFileDialog; ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22055816"); + new HelpButton(this, ui->buttonBox, "24742351"); ui->formatBox->addItem(GENBANK_FORMAT); ui->formatBox->addItem(FASTA_FORMAT); diff --git a/src/corelibs/U2Gui/src/util/DownloadRemoteFileDialog.h b/src/corelibs/U2Gui/src/util/DownloadRemoteFileDialog.h index 7fa37c695efb996f5fc38ed4ad4f192b14681a9b..17bc2935e44b730c0b5d4cba50832b4e6cd5338f 100644 --- a/src/corelibs/U2Gui/src/util/DownloadRemoteFileDialog.h +++ b/src/corelibs/U2Gui/src/util/DownloadRemoteFileDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/EditQualifierDialog.cpp b/src/corelibs/U2Gui/src/util/EditQualifierDialog.cpp index 5bc2b2e72cad173d167bc19fb0fe070ed47cf707..4420d784d56fe777ad140cfe84062f081bf9ebfb 100644 --- a/src/corelibs/U2Gui/src/util/EditQualifierDialog.cpp +++ b/src/corelibs/U2Gui/src/util/EditQualifierDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ EditQualifierDialog::EditQualifierDialog(QWidget* p, const U2Qualifier& q, bool { ui = new Ui_EditQualifierDialog; ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22055861"); + new HelpButton(this, ui->buttonBox, "24742396"); ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2Gui/src/util/EditQualifierDialog.h b/src/corelibs/U2Gui/src/util/EditQualifierDialog.h index e33f7e9a59629b176421079e025d04dba79384f8..bbaf5ba40fbba7af9aff91bedc71cafa31c889fd 100644 --- a/src/corelibs/U2Gui/src/util/EditQualifierDialog.h +++ b/src/corelibs/U2Gui/src/util/EditQualifierDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/EditSequenceDialogController.cpp b/src/corelibs/U2Gui/src/util/EditSequenceDialogController.cpp index a95c6a0c02a749f4d921013ff2d26f0fd442214d..511cc8b8ec291a9d90bb639f8a201a11683dec17 100644 --- a/src/corelibs/U2Gui/src/util/EditSequenceDialogController.cpp +++ b/src/corelibs/U2Gui/src/util/EditSequenceDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -69,7 +69,7 @@ EditSequenceDialogController::EditSequenceDialogController(const EditSequencDial { ui = new Ui_EditSequenceDialog; ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22055843"); + new HelpButton(this, ui->buttonBox, "24742378"); ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2Gui/src/util/EditSequenceDialogController.h b/src/corelibs/U2Gui/src/util/EditSequenceDialogController.h index dc6d7bc4940bfb804f54ce3a9954402766d9be58..3a89e3d65ab9ca53c5e424a8e05cde790cc8848b 100644 --- a/src/corelibs/U2Gui/src/util/EditSequenceDialogController.h +++ b/src/corelibs/U2Gui/src/util/EditSequenceDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/EditSettingsDialog.cpp b/src/corelibs/U2Gui/src/util/EditSettingsDialog.cpp index 0228d905ba7bdd7aafe425580ea3d0efdac3a2dc..2a8aac3cc5595778519c95c931ae8409c025de86 100644 --- a/src/corelibs/U2Gui/src/util/EditSettingsDialog.cpp +++ b/src/corelibs/U2Gui/src/util/EditSettingsDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ EditSettingsDialog::EditSettingsDialog(const EditSettings& settings, QWidget* pa : QDialog(parent) { ui = new Ui_EditSettingDialogForm; ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22055843"); + new HelpButton(this, ui->buttonBox, "24742378"); ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2Gui/src/util/EditSettingsDialog.h b/src/corelibs/U2Gui/src/util/EditSettingsDialog.h index 1a285128833f1dee754c49bb2ba4a2c8d757aeb8..ab24f0a3ddb8a26e461c903592d01948e55ab32e 100644 --- a/src/corelibs/U2Gui/src/util/EditSettingsDialog.h +++ b/src/corelibs/U2Gui/src/util/EditSettingsDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ExportAnnotations2CSVTask.cpp b/src/corelibs/U2Gui/src/util/ExportAnnotations2CSVTask.cpp index 92c7c06efafbb29be03dd71cee5e47c4e1053732..ff0438a5b3ffbea58866d4b9e469453eddfa48af 100644 --- a/src/corelibs/U2Gui/src/util/ExportAnnotations2CSVTask.cpp +++ b/src/corelibs/U2Gui/src/util/ExportAnnotations2CSVTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ExportAnnotations2CSVTask.h b/src/corelibs/U2Gui/src/util/ExportAnnotations2CSVTask.h index 5b5fe3e20f2930586c91f0cb2c3bb287af79f27e..96fd0036b281fd66f39ea1d3f390fb0ca25b9a10 100644 --- a/src/corelibs/U2Gui/src/util/ExportAnnotations2CSVTask.h +++ b/src/corelibs/U2Gui/src/util/ExportAnnotations2CSVTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ExportAnnotationsDialog.cpp b/src/corelibs/U2Gui/src/util/ExportAnnotationsDialog.cpp index 8cc0de9035ae994cce0fc28a6b4d1813edd1b5df..2a244511abb72420571269bef4e16ce95e235a5d 100644 --- a/src/corelibs/U2Gui/src/util/ExportAnnotationsDialog.cpp +++ b/src/corelibs/U2Gui/src/util/ExportAnnotationsDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -44,7 +44,7 @@ ExportAnnotationsDialog::ExportAnnotationsDialog( const QString &filename, QWidg { ui->setupUi( this ); lastAddToProjectState = ui->addToProjectCheck->isChecked(); - new HelpButton(this, ui->buttonBox, "22055866"); + new HelpButton(this, ui->buttonBox, "24742401"); ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2Gui/src/util/ExportAnnotationsDialog.h b/src/corelibs/U2Gui/src/util/ExportAnnotationsDialog.h index 09c263ca555f5259c5e38934607cae2a2725a21c..10066506043e866a4d50c91d0b3e2bdde764f5fc 100644 --- a/src/corelibs/U2Gui/src/util/ExportAnnotationsDialog.h +++ b/src/corelibs/U2Gui/src/util/ExportAnnotationsDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ExportDocumentDialogController.cpp b/src/corelibs/U2Gui/src/util/ExportDocumentDialogController.cpp index 00944afc8e655aa1eba2bba4f7136cc0e5cff79f..94b7c8a4b77aa2ab845db4ac03965f7312025b3b 100644 --- a/src/corelibs/U2Gui/src/util/ExportDocumentDialogController.cpp +++ b/src/corelibs/U2Gui/src/util/ExportDocumentDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -44,7 +44,7 @@ ExportDocumentDialogController::ExportDocumentDialogController(Document* d, QWid { ui = new Ui_ExportDocumentDialog(); ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22055791"); + new HelpButton(this, ui->buttonBox, "24742326"); ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Export")); ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -62,7 +62,7 @@ ExportDocumentDialogController::ExportDocumentDialogController(GObject *object, QList<GObject *> objectList = QList<GObject *>() << sourceObject; initSaveController(objectList, initUrl); - new HelpButton(this, ui->buttonBox, "22055791"); + new HelpButton(this, ui->buttonBox, "24742326"); ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Export")); ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); } diff --git a/src/corelibs/U2Gui/src/util/ExportDocumentDialogController.h b/src/corelibs/U2Gui/src/util/ExportDocumentDialogController.h index 56a4294509dd4651c76ddbcac325f96e73de0065..1c6444ee0cf710b3cb4b262ecef36a1376e0436a 100644 --- a/src/corelibs/U2Gui/src/util/ExportDocumentDialogController.h +++ b/src/corelibs/U2Gui/src/util/ExportDocumentDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ExportImageDialog.cpp b/src/corelibs/U2Gui/src/util/ExportImageDialog.cpp index a2b4246aa3254d18efe98270dcf147c44d91e235..80e8504fc973510786eca3007e41d2f1537bbae1 100644 --- a/src/corelibs/U2Gui/src/util/ExportImageDialog.cpp +++ b/src/corelibs/U2Gui/src/util/ExportImageDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -150,28 +150,28 @@ void ExportImageDialog::init() { switch (source) { case WD: - new HelpButton(this, ui->buttonBox, "22056223"); + new HelpButton(this, ui->buttonBox, "24740110"); break; case CircularView: - new HelpButton(this, ui->buttonBox, "22055870"); + new HelpButton(this, ui->buttonBox, "24742405"); break; case MSA: - new HelpButton(this, ui->buttonBox, "22055943"); + new HelpButton(this, ui->buttonBox, "24742478"); break; case SequenceView: - new HelpButton(this, ui->buttonBox, "22055831"); + new HelpButton(this, ui->buttonBox, "24742366"); break; case AssemblyView: - new HelpButton(this, ui->buttonBox, "22055980"); + new HelpButton(this, ui->buttonBox, "24742515"); break; case PHYTreeView: - new HelpButton(this, ui->buttonBox, "22056008"); + new HelpButton(this, ui->buttonBox, "24742543"); break; case DotPlot: - new HelpButton(this, ui->buttonBox, "22055901"); + new HelpButton(this, ui->buttonBox, "24742436"); break; case MolView: - new HelpButton(this, ui->buttonBox, "22055884"); + new HelpButton(this, ui->buttonBox, "24742419"); break; default: FAIL("Can't find help Id",); diff --git a/src/corelibs/U2Gui/src/util/ExportImageDialog.h b/src/corelibs/U2Gui/src/util/ExportImageDialog.h index be3a504dc0d7425ecae99b4fa46c53fee920cdb5..e9ba82db5733a9965b06429b9b470a05c4fd5a03 100644 --- a/src/corelibs/U2Gui/src/util/ExportImageDialog.h +++ b/src/corelibs/U2Gui/src/util/ExportImageDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ExportObjectUtils.cpp b/src/corelibs/U2Gui/src/util/ExportObjectUtils.cpp index 2e852d71b01b7c438aa781b84f74314878aa9bea..efd63d59eff3127c17e19c7b85e7329b17898a15 100644 --- a/src/corelibs/U2Gui/src/util/ExportObjectUtils.cpp +++ b/src/corelibs/U2Gui/src/util/ExportObjectUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ExportObjectUtils.h b/src/corelibs/U2Gui/src/util/ExportObjectUtils.h index 7ac27d2a8ebcca846ddd72a1f9aac7c4c60224e7..7b0841bbdf153e7cec7e00ca74b569173cdfb167 100644 --- a/src/corelibs/U2Gui/src/util/ExportObjectUtils.h +++ b/src/corelibs/U2Gui/src/util/ExportObjectUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/GObjectComboBoxController.cpp b/src/corelibs/U2Gui/src/util/GObjectComboBoxController.cpp index 92b91133099cfd6c9431e0a739d01e6090fe93e5..0d1f967347c7d9bfe008c37bb49d1fef5f71043d 100644 --- a/src/corelibs/U2Gui/src/util/GObjectComboBoxController.cpp +++ b/src/corelibs/U2Gui/src/util/GObjectComboBoxController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/GObjectComboBoxController.h b/src/corelibs/U2Gui/src/util/GObjectComboBoxController.h index 6f84edde29017b291dc2365414f39f070fd09082..d80d8128a724169f4351e56583fd2efbd913c7f9 100644 --- a/src/corelibs/U2Gui/src/util/GObjectComboBoxController.h +++ b/src/corelibs/U2Gui/src/util/GObjectComboBoxController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/GScrollBar.cpp b/src/corelibs/U2Gui/src/util/GScrollBar.cpp index 22b1df574430cd72732392934c2329993cbf22ae..b395c2e26f8881ddd10d1b32da42b1978301a62d 100644 --- a/src/corelibs/U2Gui/src/util/GScrollBar.cpp +++ b/src/corelibs/U2Gui/src/util/GScrollBar.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/GScrollBar.h b/src/corelibs/U2Gui/src/util/GScrollBar.h index eb5b1a4f604902383b36718469c97373e494fcdc..0fe063dd1abd4d0f5c094af879188e0256480baa 100644 --- a/src/corelibs/U2Gui/src/util/GScrollBar.h +++ b/src/corelibs/U2Gui/src/util/GScrollBar.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/GUIUtils.cpp b/src/corelibs/U2Gui/src/util/GUIUtils.cpp index d4eacd44ecc239a79b11cff89571a376a782326d..89b801cf35bb708caf4c09874881eae36dd14d83 100644 --- a/src/corelibs/U2Gui/src/util/GUIUtils.cpp +++ b/src/corelibs/U2Gui/src/util/GUIUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/GUIUtils.h b/src/corelibs/U2Gui/src/util/GUIUtils.h index 2a86bcbaf387f7597f69dbd03406c9ade27fb5e8..22a2a8f62d26c9951ec364273ce89c71b58f0548 100644 --- a/src/corelibs/U2Gui/src/util/GUIUtils.h +++ b/src/corelibs/U2Gui/src/util/GUIUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/GenbankLocationValidator.cpp b/src/corelibs/U2Gui/src/util/GenbankLocationValidator.cpp index 203fdad24329915a6ef834f3668da5ca4f38d306..d5b89bf96a765e17288519204d0055502deb9b93 100644 --- a/src/corelibs/U2Gui/src/util/GenbankLocationValidator.cpp +++ b/src/corelibs/U2Gui/src/util/GenbankLocationValidator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/GenbankLocationValidator.h b/src/corelibs/U2Gui/src/util/GenbankLocationValidator.h index fe329479227a756c7990d1b87e44aaa23db09d1f..742d1841dd3ae3690e2835b41007004c58e0b0b0 100644 --- a/src/corelibs/U2Gui/src/util/GenbankLocationValidator.h +++ b/src/corelibs/U2Gui/src/util/GenbankLocationValidator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/GlassView.cpp b/src/corelibs/U2Gui/src/util/GlassView.cpp index 92ccc8597922822fa95331a5ec06152242b04392..318dfa71154532d3b1136e10915f57920f75b3ae 100644 --- a/src/corelibs/U2Gui/src/util/GlassView.cpp +++ b/src/corelibs/U2Gui/src/util/GlassView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/GlassView.h b/src/corelibs/U2Gui/src/util/GlassView.h index 3433e1b8781afde64e49d4f981f56cd7f11f976a..12904f30d9dbc9afded87e1949f1dd7b99308d80 100644 --- a/src/corelibs/U2Gui/src/util/GlassView.h +++ b/src/corelibs/U2Gui/src/util/GlassView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/GraphUtils.cpp b/src/corelibs/U2Gui/src/util/GraphUtils.cpp index 804688ba05bd8d6d2241c6b0d34c66c04b2c24b4..25e82e113187f838041297a6e48cd4a3c50b38f2 100644 --- a/src/corelibs/U2Gui/src/util/GraphUtils.cpp +++ b/src/corelibs/U2Gui/src/util/GraphUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/GraphUtils.h b/src/corelibs/U2Gui/src/util/GraphUtils.h index 3c6ed40dddcfa91bcb1fca6ab973066f07c14e01..98d65ef47cab7402be67cae0f947e67ed7365410 100644 --- a/src/corelibs/U2Gui/src/util/GraphUtils.h +++ b/src/corelibs/U2Gui/src/util/GraphUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/GroupedComboBoxDelegate.cpp b/src/corelibs/U2Gui/src/util/GroupedComboBoxDelegate.cpp index 6dfbcbbb170e1843c2592af5c52e62e6b9c9aae4..ae06aebede1242266b3df1a619fc2ef7347e5299 100644 --- a/src/corelibs/U2Gui/src/util/GroupedComboBoxDelegate.cpp +++ b/src/corelibs/U2Gui/src/util/GroupedComboBoxDelegate.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -54,13 +54,13 @@ QSize GroupedComboBoxDelegate::sizeHint(const QStyleOptionViewItem &option, cons return QItemDelegate::sizeHint( option, index ); } -void GroupedComboBoxDelegate::addParentItem(QStandardItemModel * model, const QString& text) { +void GroupedComboBoxDelegate::addParentItem(QStandardItemModel * model, const QString& text, bool setItalic, bool setBold) { QStandardItem* item = new QStandardItem(text); - item->setFlags(item->flags() & ~(Qt::ItemIsEnabled | Qt::ItemIsSelectable)); item->setData("parent", Qt::AccessibleDescriptionRole); + item->setFlags(item->flags() & ~(Qt::ItemIsEnabled | Qt::ItemIsSelectable)); QFont font = item->font(); - font.setBold( true ); - font.setItalic(true); + font.setItalic(setItalic); + font.setBold(setBold); item->setFont(font); model->appendRow(item); } @@ -72,4 +72,11 @@ void GroupedComboBoxDelegate::addChildItem(QStandardItemModel * model, const QSt model->appendRow(item); } +void GroupedComboBoxDelegate::addUngroupedItem(QStandardItemModel* model, const QString& text, const QVariant& data) { + QStandardItem* item = new QStandardItem(text); + item->setData(data, Qt::UserRole); + item->setData("ungrouped", Qt::AccessibleDescriptionRole); + model->appendRow(item); +} + } diff --git a/src/corelibs/U2Gui/src/util/GroupedComboBoxDelegate.h b/src/corelibs/U2Gui/src/util/GroupedComboBoxDelegate.h index 2fe68363cb8ec903f3cfd8e21a146ad0d84c51f9..da6497977d464e17f6c05f38108dbee797f77bc4 100644 --- a/src/corelibs/U2Gui/src/util/GroupedComboBoxDelegate.h +++ b/src/corelibs/U2Gui/src/util/GroupedComboBoxDelegate.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ - + #ifndef _U2_GROUPED_COMBOBOX_DELEGATE_H_ #define _U2_GROUPED_COMBOBOX_DELEGATE_H_ @@ -36,13 +36,14 @@ class U2GUI_EXPORT GroupedComboBoxDelegate : public QItemDelegate { public: explicit GroupedComboBoxDelegate(QObject *parent = 0); - static void addParentItem(QStandardItemModel * model, const QString& text); + static void addParentItem(QStandardItemModel * model, const QString& text, bool setItalic = true, bool setBold = true); static void addChildItem(QStandardItemModel * model, const QString& text, const QVariant& data); + static void addUngroupedItem(QStandardItemModel* model, const QString& text, const QVariant& data); protected: void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const; }; - + } #endif // _U2_GROUPED_COMBOBOX_DELEGATE_H_ diff --git a/src/corelibs/U2Gui/src/util/HelpButton.cpp b/src/corelibs/U2Gui/src/util/HelpButton.cpp index 7329875301850fe6dd17fbc6933f26385ad80c15..9122a3cdcfabbfd0f6c97b5cd0a433e7831acc6a 100644 --- a/src/corelibs/U2Gui/src/util/HelpButton.cpp +++ b/src/corelibs/U2Gui/src/util/HelpButton.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/HelpButton.h b/src/corelibs/U2Gui/src/util/HelpButton.h index 455b0f74a45399c0ff75bf6720a6bf2710a93cfd..e1abe40fa8f7b43e9e2251339433029d175cc266 100644 --- a/src/corelibs/U2Gui/src/util/HelpButton.h +++ b/src/corelibs/U2Gui/src/util/HelpButton.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ImportSequenceFromRawDataTask.cpp b/src/corelibs/U2Gui/src/util/ImportSequenceFromRawDataTask.cpp index 7fef730ee41b11f457e5c435ee7fd936a6e61059..7a0264dcb3c5d5a44489d275a3a2985debede809 100644 --- a/src/corelibs/U2Gui/src/util/ImportSequenceFromRawDataTask.cpp +++ b/src/corelibs/U2Gui/src/util/ImportSequenceFromRawDataTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ImportSequenceFromRawDataTask.h b/src/corelibs/U2Gui/src/util/ImportSequenceFromRawDataTask.h index c2058a582924c6b7fbf64eb002c48aa37288238f..f2371d378015f38395575c2b1af68e6c1038d5ac 100644 --- a/src/corelibs/U2Gui/src/util/ImportSequenceFromRawDataTask.h +++ b/src/corelibs/U2Gui/src/util/ImportSequenceFromRawDataTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ImportWidgets/AceImportWidget.cpp b/src/corelibs/U2Gui/src/util/ImportWidgets/AceImportWidget.cpp index a51ed337c4f9095a5970fd2c147e2c38b2aa291d..f1b28cfb89f3e03af2ff9a87ad40b164804901db 100644 --- a/src/corelibs/U2Gui/src/util/ImportWidgets/AceImportWidget.cpp +++ b/src/corelibs/U2Gui/src/util/ImportWidgets/AceImportWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ImportWidgets/AceImportWidget.h b/src/corelibs/U2Gui/src/util/ImportWidgets/AceImportWidget.h index 4dff001ac214a64ac6d9cdc667c30ff91f57329f..726e6479c0bff2da81b9ddaa3b94e6d0ba67d553 100644 --- a/src/corelibs/U2Gui/src/util/ImportWidgets/AceImportWidget.h +++ b/src/corelibs/U2Gui/src/util/ImportWidgets/AceImportWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ImportWidgets/AprImportWidget.cpp b/src/corelibs/U2Gui/src/util/ImportWidgets/AprImportWidget.cpp index dd810a027acf7dc21429fb9b76b6dbf2a1f18d97..4a8365b803bec80b7f6e2e85dd11f5948e9cf9cf 100644 --- a/src/corelibs/U2Gui/src/util/ImportWidgets/AprImportWidget.cpp +++ b/src/corelibs/U2Gui/src/util/ImportWidgets/AprImportWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ImportWidgets/AprImportWidget.h b/src/corelibs/U2Gui/src/util/ImportWidgets/AprImportWidget.h index 9af8a215832eeb1277f13861ba8a7aaeaf4b0dfa..9d564e96795b1fce25d7adcbb30f857158ce7148 100644 --- a/src/corelibs/U2Gui/src/util/ImportWidgets/AprImportWidget.h +++ b/src/corelibs/U2Gui/src/util/ImportWidgets/AprImportWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ImportWidgets/ImportWidget.cpp b/src/corelibs/U2Gui/src/util/ImportWidgets/ImportWidget.cpp index 1b2d4946c3ec342345ea64f9a315ed6d626c0f61..55b4fab7c0120d9c9340f37c33ba232e24a64569 100644 --- a/src/corelibs/U2Gui/src/util/ImportWidgets/ImportWidget.cpp +++ b/src/corelibs/U2Gui/src/util/ImportWidgets/ImportWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ImportWidgets/ImportWidget.h b/src/corelibs/U2Gui/src/util/ImportWidgets/ImportWidget.h index a1868428c654be037de3996447a4adaadae41afd..6853f9f169af9683f86f3505650c90595f1d31a4 100644 --- a/src/corelibs/U2Gui/src/util/ImportWidgets/ImportWidget.h +++ b/src/corelibs/U2Gui/src/util/ImportWidgets/ImportWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ImportWidgetsFactories.cpp b/src/corelibs/U2Gui/src/util/ImportWidgetsFactories.cpp index e4e4a5cf7d0b0f795b7cdb3b97ac44182959bc6f..76dc24521ded840a5b5613f99b0c7e7d9a3d4a7e 100644 --- a/src/corelibs/U2Gui/src/util/ImportWidgetsFactories.cpp +++ b/src/corelibs/U2Gui/src/util/ImportWidgetsFactories.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ImportWidgetsFactories.h b/src/corelibs/U2Gui/src/util/ImportWidgetsFactories.h index 420ec4018937b5c1b1a0021d4533bf12433afdf1..d2719ce8263242ef83b80b117c021047a38daef8 100644 --- a/src/corelibs/U2Gui/src/util/ImportWidgetsFactories.h +++ b/src/corelibs/U2Gui/src/util/ImportWidgetsFactories.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/InputWidgetsControllers.cpp b/src/corelibs/U2Gui/src/util/InputWidgetsControllers.cpp index c71c0d6c5afb8c0f31d810ddf405f45e1bf34f7a..b62deac06464a3770bda3916f3f239cd8ad3f350 100644 --- a/src/corelibs/U2Gui/src/util/InputWidgetsControllers.cpp +++ b/src/corelibs/U2Gui/src/util/InputWidgetsControllers.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/InputWidgetsControllers.h b/src/corelibs/U2Gui/src/util/InputWidgetsControllers.h index d0d70782a88f7ef239b5e9942499629f440081b0..875d6810d2ec43abcbd7431a447b54fec94a3d9b 100644 --- a/src/corelibs/U2Gui/src/util/InputWidgetsControllers.h +++ b/src/corelibs/U2Gui/src/util/InputWidgetsControllers.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/LabelClickTransmitter.cpp b/src/corelibs/U2Gui/src/util/LabelClickTransmitter.cpp index 08c9f7f8fbad799d39c8057a36e8788f2ba01fcf..0611e2484aed067e10fb283b88f61afd5154a946 100644 --- a/src/corelibs/U2Gui/src/util/LabelClickTransmitter.cpp +++ b/src/corelibs/U2Gui/src/util/LabelClickTransmitter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/LabelClickTransmitter.h b/src/corelibs/U2Gui/src/util/LabelClickTransmitter.h index 1e44ff729c112c9095b95ba3795a8d22eaa915d7..c0f72d8a358efb23382a294e139e79577d5e85bb 100644 --- a/src/corelibs/U2Gui/src/util/LabelClickTransmitter.h +++ b/src/corelibs/U2Gui/src/util/LabelClickTransmitter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/LastUsedDirHelper.cpp b/src/corelibs/U2Gui/src/util/LastUsedDirHelper.cpp index 743c1e83e515c508f43e8fc4bd889f2d2e5dcce5..10a64f9a0885826d69220c425f70d45d8746f5a9 100644 --- a/src/corelibs/U2Gui/src/util/LastUsedDirHelper.cpp +++ b/src/corelibs/U2Gui/src/util/LastUsedDirHelper.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -39,7 +39,12 @@ LastUsedDirHelper::~LastUsedDirHelper() { void LastUsedDirHelper::saveLastUsedDir() { if (!url.isEmpty()) { - dir = QFileInfo(url).absoluteDir().absolutePath(); + QFileInfo fi(url); + if (fi.isDir()) { // sometimes 'url' points to a dir, not a file. + dir = fi.absoluteFilePath(); + } else { + dir = fi.absoluteDir().absolutePath(); + } } if (!dir.isEmpty()) { setLastUsedDir(dir, domain); diff --git a/src/corelibs/U2Gui/src/util/LastUsedDirHelper.h b/src/corelibs/U2Gui/src/util/LastUsedDirHelper.h index 7f259a6ed2d1a29279bdf03708297ba6a9bc476f..eddb63213523e003e71f7c5c62471fbd912e744f 100644 --- a/src/corelibs/U2Gui/src/util/LastUsedDirHelper.h +++ b/src/corelibs/U2Gui/src/util/LastUsedDirHelper.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/LocalToolbar.cpp b/src/corelibs/U2Gui/src/util/LocalToolbar.cpp index 488daf2d08a72668749bcca7638dabdde4a1e3e8..1dc03c6d900fc23a12917edf59c41a166f56b0ad 100644 --- a/src/corelibs/U2Gui/src/util/LocalToolbar.cpp +++ b/src/corelibs/U2Gui/src/util/LocalToolbar.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/LocalToolbar.h b/src/corelibs/U2Gui/src/util/LocalToolbar.h index 88f170e7d065fedf85201f456342953f6c257f3b..a43340dad47984cbe98301f9b90331618080c47b 100644 --- a/src/corelibs/U2Gui/src/util/LocalToolbar.h +++ b/src/corelibs/U2Gui/src/util/LocalToolbar.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/MultiClickMenu.cpp b/src/corelibs/U2Gui/src/util/MultiClickMenu.cpp index 37c28da5df14a1017ba2a1d70abcbba70bf364de..f9e3fe9eca880e4b59d1061bb04d2ebf24d9ff8d 100644 --- a/src/corelibs/U2Gui/src/util/MultiClickMenu.cpp +++ b/src/corelibs/U2Gui/src/util/MultiClickMenu.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/MultiClickMenu.h b/src/corelibs/U2Gui/src/util/MultiClickMenu.h index ace2940ffa4d80c9aafbe41feffd2c15cbc91a72..fa0e4d484f4ee7ec9fb7535eb0c3d71ce3074c69 100644 --- a/src/corelibs/U2Gui/src/util/MultiClickMenu.h +++ b/src/corelibs/U2Gui/src/util/MultiClickMenu.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ObjectViewTreeController.cpp b/src/corelibs/U2Gui/src/util/ObjectViewTreeController.cpp index 995fdd89c3f84475e4985d69e3116b89479731f7..5398c9557736eef307a8a57d3ac607bd2ec38aa3 100644 --- a/src/corelibs/U2Gui/src/util/ObjectViewTreeController.cpp +++ b/src/corelibs/U2Gui/src/util/ObjectViewTreeController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ObjectViewTreeController.h b/src/corelibs/U2Gui/src/util/ObjectViewTreeController.h index 3b3f6db8dd3e1f830884c94c90b1e58df58db2d5..4ce6bdb6b32d0c2d05568fd3dbfbcdccf1692a84 100644 --- a/src/corelibs/U2Gui/src/util/ObjectViewTreeController.h +++ b/src/corelibs/U2Gui/src/util/ObjectViewTreeController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/OrderedToolbar.cpp b/src/corelibs/U2Gui/src/util/OrderedToolbar.cpp index 2095d4f3f55c7477ae6a39f9402073967e72b88c..5d34ecd37be05d7efb149b8467fc17a827c6d4b7 100644 --- a/src/corelibs/U2Gui/src/util/OrderedToolbar.cpp +++ b/src/corelibs/U2Gui/src/util/OrderedToolbar.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/OrderedToolbar.h b/src/corelibs/U2Gui/src/util/OrderedToolbar.h index 7ca454a39b54445d2f26909f7df408db66a22bc3..7eea78528760c3a1779d76dad35bf683fd73d257 100644 --- a/src/corelibs/U2Gui/src/util/OrderedToolbar.h +++ b/src/corelibs/U2Gui/src/util/OrderedToolbar.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/PositionSelector.cpp b/src/corelibs/U2Gui/src/util/PositionSelector.cpp index b019b766b8fc054e186318a3906602ed046608d6..29517557cc403c79b8cf52af3d58ead755cfd68d 100644 --- a/src/corelibs/U2Gui/src/util/PositionSelector.cpp +++ b/src/corelibs/U2Gui/src/util/PositionSelector.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/PositionSelector.h b/src/corelibs/U2Gui/src/util/PositionSelector.h index 07eef5f1b58d7fc1e1c5a2150700b1bb3515d1f3..54c5909d3523ae9599624a1cdacb17c251cf676c 100644 --- a/src/corelibs/U2Gui/src/util/PositionSelector.h +++ b/src/corelibs/U2Gui/src/util/PositionSelector.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ProjectDocumentComboBoxController.cpp b/src/corelibs/U2Gui/src/util/ProjectDocumentComboBoxController.cpp index ac3c18338341b707475c35975193f2cb6f2963ef..450de9817feae2826c6ba1320f8355c67910b14f 100644 --- a/src/corelibs/U2Gui/src/util/ProjectDocumentComboBoxController.cpp +++ b/src/corelibs/U2Gui/src/util/ProjectDocumentComboBoxController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ProjectDocumentComboBoxController.h b/src/corelibs/U2Gui/src/util/ProjectDocumentComboBoxController.h index 404755065649f8de44e31da893764f169755a51f..71f7d4319e80b5c0f2ba067d5b8b5bad1cc1b61f 100644 --- a/src/corelibs/U2Gui/src/util/ProjectDocumentComboBoxController.h +++ b/src/corelibs/U2Gui/src/util/ProjectDocumentComboBoxController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ProjectTreeItemSelectorDialog.cpp b/src/corelibs/U2Gui/src/util/ProjectTreeItemSelectorDialog.cpp index 62479a6d94c411c4e62ca3235f7be5c0fa38e177..a8dbcf6fb41e0fc612bc84755fe7cbc6cc857a58 100644 --- a/src/corelibs/U2Gui/src/util/ProjectTreeItemSelectorDialog.cpp +++ b/src/corelibs/U2Gui/src/util/ProjectTreeItemSelectorDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ProjectTreeItemSelectorDialog.h b/src/corelibs/U2Gui/src/util/ProjectTreeItemSelectorDialog.h index d4de9f2d8d0ffd9e56eaecfee856597231795646..fef3d84ca436a25e15d2c25285a682a3cf1c5af0 100644 --- a/src/corelibs/U2Gui/src/util/ProjectTreeItemSelectorDialog.h +++ b/src/corelibs/U2Gui/src/util/ProjectTreeItemSelectorDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ProjectTreeItemSelectorDialogImpl.h b/src/corelibs/U2Gui/src/util/ProjectTreeItemSelectorDialogImpl.h index db8f7633a02026a709972f4960a978e372c3da90..eb2b6eefa261b7cb2d9b02b01dcba2d53072a363 100644 --- a/src/corelibs/U2Gui/src/util/ProjectTreeItemSelectorDialogImpl.h +++ b/src/corelibs/U2Gui/src/util/ProjectTreeItemSelectorDialogImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/RangeSelector.cpp b/src/corelibs/U2Gui/src/util/RangeSelector.cpp index 6c79488557e592937cf98778b6e3dbd2bf3cf9d2..d0ef0f22b5c2b915d4d378ca70023c511d9e8ade 100644 --- a/src/corelibs/U2Gui/src/util/RangeSelector.cpp +++ b/src/corelibs/U2Gui/src/util/RangeSelector.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -237,7 +237,7 @@ MultipleRangeSelector::MultipleRangeSelector(QWidget* _parent, const QVector<U2R ui = new Ui_RangeSelectionDialog; ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22055835"); + new HelpButton(this, ui->buttonBox, "24742370"); ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Go")); ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2Gui/src/util/RangeSelector.h b/src/corelibs/U2Gui/src/util/RangeSelector.h index df3ca7d3408b5166337b0fc0c7f8638bc684762f..28d2493cf852e86cba59a098fbc20e81e6d92b3f 100644 --- a/src/corelibs/U2Gui/src/util/RangeSelector.h +++ b/src/corelibs/U2Gui/src/util/RangeSelector.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/RegionSelector.cpp b/src/corelibs/U2Gui/src/util/RegionSelector.cpp index 7a0f9e6c2422a2f5e67ea66b0d9ee65c3eced28d..18d82a5309c355810ba7fe3cfda787cdf758b974 100644 --- a/src/corelibs/U2Gui/src/util/RegionSelector.cpp +++ b/src/corelibs/U2Gui/src/util/RegionSelector.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/RegionSelector.h b/src/corelibs/U2Gui/src/util/RegionSelector.h index c277c17387f5a3ef55b7386cfbe628ad44825d81..fa077d70b05a1ed037a7536a3af3b12bcf606a2d 100644 --- a/src/corelibs/U2Gui/src/util/RegionSelector.h +++ b/src/corelibs/U2Gui/src/util/RegionSelector.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/RegionSelectorController.cpp b/src/corelibs/U2Gui/src/util/RegionSelectorController.cpp index 62b185b3ee108ebe3d034c0d957550525f70fb24..064d47ff3fc89305cf06993470fe638a1b25ac16 100644 --- a/src/corelibs/U2Gui/src/util/RegionSelectorController.cpp +++ b/src/corelibs/U2Gui/src/util/RegionSelectorController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/RegionSelectorController.h b/src/corelibs/U2Gui/src/util/RegionSelectorController.h index 6579bea50e62d5e6885cf0c13122b1569981cc0f..51b0fbfe1e55b686ec4b5cd48a1acd0ad4111e7b 100644 --- a/src/corelibs/U2Gui/src/util/RegionSelectorController.h +++ b/src/corelibs/U2Gui/src/util/RegionSelectorController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/RegionSelectorWithExcludedRegion.cpp b/src/corelibs/U2Gui/src/util/RegionSelectorWithExcludedRegion.cpp index 8a559da760b9ff909105c0823535617e2ca70515..661087eac6ae1953ef98f4c65cc2936adfd17bb8 100644 --- a/src/corelibs/U2Gui/src/util/RegionSelectorWithExcludedRegion.cpp +++ b/src/corelibs/U2Gui/src/util/RegionSelectorWithExcludedRegion.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/RegionSelectorWithExcludedRegion.h b/src/corelibs/U2Gui/src/util/RegionSelectorWithExcludedRegion.h index e1223ab22466a4420c6d6e9a7859bd13ad27d615..4ab0aa8f8eb148f3a9930f38ba9641f8eb4c75b7 100644 --- a/src/corelibs/U2Gui/src/util/RegionSelectorWithExcludedRegion.h +++ b/src/corelibs/U2Gui/src/util/RegionSelectorWithExcludedRegion.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/RemovePartFromSequenceDialogController.cpp b/src/corelibs/U2Gui/src/util/RemovePartFromSequenceDialogController.cpp index 793629befd4acff6b5b4f10be69eb877fc92c33a..37acb2bcc83d5a17c03126753c751a3b5831c2a8 100644 --- a/src/corelibs/U2Gui/src/util/RemovePartFromSequenceDialogController.cpp +++ b/src/corelibs/U2Gui/src/util/RemovePartFromSequenceDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -55,7 +55,7 @@ RemovePartFromSequenceDialogController::RemovePartFromSequenceDialogController(U saveController(NULL) { ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22055843"); + new HelpButton(this, ui->buttonBox, "24742378"); ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Remove")); ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2Gui/src/util/RemovePartFromSequenceDialogController.h b/src/corelibs/U2Gui/src/util/RemovePartFromSequenceDialogController.h index ea4c60b0356a0e7bbe544f52f464d00104958490..a93dca978c9ceed4cdcbad12b9abc48ddf22303f 100644 --- a/src/corelibs/U2Gui/src/util/RemovePartFromSequenceDialogController.h +++ b/src/corelibs/U2Gui/src/util/RemovePartFromSequenceDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/SaveDocumentController.cpp b/src/corelibs/U2Gui/src/util/SaveDocumentController.cpp index 528b0dae5a151385dee8a5b9a1c0e1c5ff0b9ed8..5120db4580c463ecfdedf96ba33af1833900eee5 100644 --- a/src/corelibs/U2Gui/src/util/SaveDocumentController.cpp +++ b/src/corelibs/U2Gui/src/util/SaveDocumentController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -84,6 +84,10 @@ QString SaveDocumentController::SimpleFormatsInfo::getIdByName(const QString &na return names.key(name); } +void SaveDocumentController::forceRoll(const QSet<QString>& excludeList) { + setPath(getSaveFileName(), excludeList); +} + QStringList SaveDocumentController::SimpleFormatsInfo::getExtensionsByName(const QString &formatName) const { CHECK(names.values().contains(formatName), QStringList()); return extensions.value(names.key(formatName)); @@ -328,13 +332,13 @@ QString SaveDocumentController::prepareFileFilter() const { return FormatUtils::prepareFileFilter(formatsWithExtensions, false, extraExtensions); } -void SaveDocumentController::setPath(const QString &path) { - QSet<QString> excludeList; +void SaveDocumentController::setPath(const QString &path, const QSet<QString>& excludeList) { + QSet<QString> currentExcludeList = excludeList; if (conf.rollOutProjectUrls) { - excludeList += DocumentUtils::getNewDocFileNameExcludesHint(); + currentExcludeList += DocumentUtils::getNewDocFileNameExcludesHint(); } - const QString newPath = (conf.rollFileName && !overwritingConfirmed) ? GUrlUtils::rollFileName(path, conf.rollSuffix, excludeList) : path; + const QString newPath = (conf.rollFileName && !overwritingConfirmed) ? GUrlUtils::rollFileName(path, conf.rollSuffix, currentExcludeList) : path; conf.fileNameEdit->setText(QDir::toNativeSeparators(newPath)); overwritingConfirmed = false; emit si_pathChanged(newPath); diff --git a/src/corelibs/U2Gui/src/util/SaveDocumentController.h b/src/corelibs/U2Gui/src/util/SaveDocumentController.h index 8ab95a86e9b519fccedef24c283cd14f0fbca8ee..ad749445b8e4b3e9232858c1bb2ec887c3f0389d 100644 --- a/src/corelibs/U2Gui/src/util/SaveDocumentController.h +++ b/src/corelibs/U2Gui/src/util/SaveDocumentController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -87,12 +87,14 @@ public: void addFormat(const QString &id, const QString &name, const QStringList &extenstions); - void setPath(const QString &path); + void setPath(const QString &path, const QSet<QString>& excludeList = QSet<QString>()); void setFormat(const QString &formatId); QString getSaveFileName() const; DocumentFormatId getFormatIdToSave() const; + void forceRoll(const QSet<QString>& excludeList = QSet<QString>()); + signals: void si_formatChanged(const QString &newFormatId); void si_pathChanged(const QString newPath); diff --git a/src/corelibs/U2Gui/src/util/ScaleBar.cpp b/src/corelibs/U2Gui/src/util/ScaleBar.cpp index 83fe5e3ac983c2dd7b881e2814e3c148b517218c..615415b7b2dfd0c26ded1bc88e8cba1de02280f1 100644 --- a/src/corelibs/U2Gui/src/util/ScaleBar.cpp +++ b/src/corelibs/U2Gui/src/util/ScaleBar.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ScaleBar.h b/src/corelibs/U2Gui/src/util/ScaleBar.h index 78fe24bd199df047b2d0d0ff86bcea374e38402d..c03d2a43214a543edeaa0ffd12e0c2ac0830711f 100644 --- a/src/corelibs/U2Gui/src/util/ScaleBar.h +++ b/src/corelibs/U2Gui/src/util/ScaleBar.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ScriptEditorDelegate.cpp b/src/corelibs/U2Gui/src/util/ScriptEditorDelegate.cpp index 201e45d4105dd976e96b4f9fea412baa456bd950..2fa53310ddd881ddd4ae6af3fc18f74bc03b0d81 100644 --- a/src/corelibs/U2Gui/src/util/ScriptEditorDelegate.cpp +++ b/src/corelibs/U2Gui/src/util/ScriptEditorDelegate.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ScriptEditorDelegate.h b/src/corelibs/U2Gui/src/util/ScriptEditorDelegate.h index 16b09d69a1cfaab5ec03e07d090be90b64b06ecf..627a5edcb92cf7b7eec7ecf83bb4d5220a0a909b 100644 --- a/src/corelibs/U2Gui/src/util/ScriptEditorDelegate.h +++ b/src/corelibs/U2Gui/src/util/ScriptEditorDelegate.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ScriptEditorDialog.cpp b/src/corelibs/U2Gui/src/util/ScriptEditorDialog.cpp index 1b064c1940f62ccb6dec61ab869011b9c0c1503c..40ac1c5c592ed41d94441dd75775422883f0a626 100644 --- a/src/corelibs/U2Gui/src/util/ScriptEditorDialog.cpp +++ b/src/corelibs/U2Gui/src/util/ScriptEditorDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -41,7 +41,7 @@ ScriptEditorDialog::ScriptEditorDialog(QWidget* w, const QString& roHeaderText, : QDialog(w), ui(new Ui_ScriptEditorDialog()) { ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22056231"); + new HelpButton(this, ui->buttonBox, "24740118"); ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Done")); ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2Gui/src/util/ScriptEditorDialog.h b/src/corelibs/U2Gui/src/util/ScriptEditorDialog.h index 0734bd8d95b69aa598eb39994b210a872ea58dee..1877f6742a7c793d509bda1828c404ad5c43dc37 100644 --- a/src/corelibs/U2Gui/src/util/ScriptEditorDialog.h +++ b/src/corelibs/U2Gui/src/util/ScriptEditorDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ScriptEditorWidget.cpp b/src/corelibs/U2Gui/src/util/ScriptEditorWidget.cpp index cc36c0a235e5c231620cacef9ca355a8cc425db7..c4e003997c01a042099cec4efb82d99aa7b6b8c5 100644 --- a/src/corelibs/U2Gui/src/util/ScriptEditorWidget.cpp +++ b/src/corelibs/U2Gui/src/util/ScriptEditorWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ScriptEditorWidget.h b/src/corelibs/U2Gui/src/util/ScriptEditorWidget.h index 0f621685668c74533057ba3be4d87add55d95f9a..ec0c7fe173b3ef33bd8fc5a5dce1dbbed8a5111e 100644 --- a/src/corelibs/U2Gui/src/util/ScriptEditorWidget.h +++ b/src/corelibs/U2Gui/src/util/ScriptEditorWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ScriptHighlighter.cpp b/src/corelibs/U2Gui/src/util/ScriptHighlighter.cpp index 2db5bc13882d5bda96911c4bc427f419319d3d1d..cccbdf260c5930cb702d17b683edf02fe7d3edc7 100644 --- a/src/corelibs/U2Gui/src/util/ScriptHighlighter.cpp +++ b/src/corelibs/U2Gui/src/util/ScriptHighlighter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/ScriptHighlighter.h b/src/corelibs/U2Gui/src/util/ScriptHighlighter.h index 36403e6e4f928f78fb8ab6ed93dddf257b365e06..2e99f9a60ad5d139646d08fbc5111534f1b19281 100644 --- a/src/corelibs/U2Gui/src/util/ScriptHighlighter.h +++ b/src/corelibs/U2Gui/src/util/ScriptHighlighter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/SearchBox.cpp b/src/corelibs/U2Gui/src/util/SearchBox.cpp index ba3f49d300e356d638166113692d50719fd466e8..c55f21400665b59d30f68e31ea6b5a99d15d7ad9 100644 --- a/src/corelibs/U2Gui/src/util/SearchBox.cpp +++ b/src/corelibs/U2Gui/src/util/SearchBox.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/SearchBox.h b/src/corelibs/U2Gui/src/util/SearchBox.h index 2e49b0754f9aac073eac8adb4fa35f109b312bc8..759ae029d97d7588d9f2528f366dc61acb86d232 100644 --- a/src/corelibs/U2Gui/src/util/SearchBox.h +++ b/src/corelibs/U2Gui/src/util/SearchBox.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/SearchGenbankSequenceDialogController.cpp b/src/corelibs/U2Gui/src/util/SearchGenbankSequenceDialogController.cpp index 2af6c9e612487d61284ad37f32c6dfe310f5bc2b..885f57261bf426f413ebe08fe8493acd39cad346 100644 --- a/src/corelibs/U2Gui/src/util/SearchGenbankSequenceDialogController.cpp +++ b/src/corelibs/U2Gui/src/util/SearchGenbankSequenceDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -44,7 +44,7 @@ SearchGenbankSequenceDialogController::SearchGenbankSequenceDialogController(QWi { ui = new Ui_SearchGenbankSequenceDialog(); ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22055816"); + new HelpButton(this, ui->buttonBox, "24742351"); ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Download")); ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Close")); @@ -147,8 +147,8 @@ QList<EntrezSummary> SearchGenbankSequenceDialogController::getSummaryResults() SAFE_POINT(NULL != summaryResultHandler, L10N::nullPointerError("summary results handler"), results); results << summaryResultHandler->getResults(); } else if (NULL != multiTask) { - foreach (Task *subtask, multiTask->getSubtasks()) { - EntrezQueryTask *summarySubtask = qobject_cast<EntrezQueryTask *>(subtask); + foreach (const QPointer<Task> &subtask, multiTask->getSubtasks()) { + EntrezQueryTask *summarySubtask = qobject_cast<EntrezQueryTask *>(subtask.data()); SAFE_POINT(NULL != summarySubtask, L10N::internalError(tr("an unexpected subtask")), results); const ESummaryResultHandler *resultHandler = dynamic_cast<const ESummaryResultHandler *>(summarySubtask->getResultHandler()); SAFE_POINT(NULL != resultHandler, L10N::nullPointerError("ESummaryResultHandler"), results); diff --git a/src/corelibs/U2Gui/src/util/SearchGenbankSequenceDialogController.h b/src/corelibs/U2Gui/src/util/SearchGenbankSequenceDialogController.h index adb7296ec91a9cb33c99e03d408ee7b4aa9cfa5f..2b302cc8d01dc63ac780ef66b35417d9b9c4011c 100644 --- a/src/corelibs/U2Gui/src/util/SearchGenbankSequenceDialogController.h +++ b/src/corelibs/U2Gui/src/util/SearchGenbankSequenceDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/SelectionModificationHelper.cpp b/src/corelibs/U2Gui/src/util/SelectionModificationHelper.cpp index e47d96e5a75c2743b304142d66514c7723a22a47..fef06716cd85c841b267ee7ccd2c9aa95d48bc09 100644 --- a/src/corelibs/U2Gui/src/util/SelectionModificationHelper.cpp +++ b/src/corelibs/U2Gui/src/util/SelectionModificationHelper.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/SelectionModificationHelper.h b/src/corelibs/U2Gui/src/util/SelectionModificationHelper.h index 272fae25d82ab0f92226a0d3390b9ce4fa70c41d..21f4f98b937baca6930e87a35524cbf62262fc2a 100644 --- a/src/corelibs/U2Gui/src/util/SelectionModificationHelper.h +++ b/src/corelibs/U2Gui/src/util/SelectionModificationHelper.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/SeqPasterWidgetController.cpp b/src/corelibs/U2Gui/src/util/SeqPasterWidgetController.cpp index b5dd9e31fd74de77f110693894b0f9bbbca73e45..53c48ffa7be75b0c8ce4a9973c158875b27dbf2d 100644 --- a/src/corelibs/U2Gui/src/util/SeqPasterWidgetController.cpp +++ b/src/corelibs/U2Gui/src/util/SeqPasterWidgetController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/SeqPasterWidgetController.h b/src/corelibs/U2Gui/src/util/SeqPasterWidgetController.h index 6db1a72673455cf00222d7ddf0e7844c960b644a..e95c1c64ed354967b4e603b26a8d89089243bae4 100644 --- a/src/corelibs/U2Gui/src/util/SeqPasterWidgetController.h +++ b/src/corelibs/U2Gui/src/util/SeqPasterWidgetController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/SequenceTextEdit.cpp b/src/corelibs/U2Gui/src/util/SequenceTextEdit.cpp index 83937846d782f83d3b35064b0cc9208916b53551..96babc807ac29bcda2f2c37a7aa6ea92bcf87416 100644 --- a/src/corelibs/U2Gui/src/util/SequenceTextEdit.cpp +++ b/src/corelibs/U2Gui/src/util/SequenceTextEdit.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/SequenceTextEdit.h b/src/corelibs/U2Gui/src/util/SequenceTextEdit.h index 00a381a49392d69ab48bf611707526b40a53880a..5cdea4466791005a54dcdf116f8c4a2c53a3df87 100644 --- a/src/corelibs/U2Gui/src/util/SequenceTextEdit.h +++ b/src/corelibs/U2Gui/src/util/SequenceTextEdit.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/SuggestCompleter.cpp b/src/corelibs/U2Gui/src/util/SuggestCompleter.cpp index eb4736aa2a9fcc62b774ae950d4ba03905ed4ef0..a7aa8e7dfec4773c57abe63a215a68650bfa7fe5 100644 --- a/src/corelibs/U2Gui/src/util/SuggestCompleter.cpp +++ b/src/corelibs/U2Gui/src/util/SuggestCompleter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/SuggestCompleter.h b/src/corelibs/U2Gui/src/util/SuggestCompleter.h index 3c63df25dc5dc339f92012138c945475d5d20be7..393a2df85e2014c6c322bbb2d1b7c19098aafa2d 100644 --- a/src/corelibs/U2Gui/src/util/SuggestCompleter.h +++ b/src/corelibs/U2Gui/src/util/SuggestCompleter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/TreeWidgetUtils.cpp b/src/corelibs/U2Gui/src/util/TreeWidgetUtils.cpp index 62c1ab5cdd7bf4a75a408e9b693d8b78a31575a4..b87fde993bf2a565cbd68cfe89ae81e8d42e98f0 100644 --- a/src/corelibs/U2Gui/src/util/TreeWidgetUtils.cpp +++ b/src/corelibs/U2Gui/src/util/TreeWidgetUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/TreeWidgetUtils.h b/src/corelibs/U2Gui/src/util/TreeWidgetUtils.h index 624b81b88f7b85e91a8d139f9b6e213e392c7ed1..b0b037d3881c0764393059463832c7b5b171c426 100644 --- a/src/corelibs/U2Gui/src/util/TreeWidgetUtils.h +++ b/src/corelibs/U2Gui/src/util/TreeWidgetUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/U2FileDialog.cpp b/src/corelibs/U2Gui/src/util/U2FileDialog.cpp index 7fae89d57875f3aafaf5d6c982c9306b5c0dbce3..5154c0ec122632e47c525ccc173e1d7b70385292 100644 --- a/src/corelibs/U2Gui/src/util/U2FileDialog.cpp +++ b/src/corelibs/U2Gui/src/util/U2FileDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/U2FileDialog.h b/src/corelibs/U2Gui/src/util/U2FileDialog.h index 01544ae72a4fc5236be2de4d1e571b735c611b7d..6c6ed4af96cb68abc70486fb2f1cb6b2767820f3 100644 --- a/src/corelibs/U2Gui/src/util/U2FileDialog.h +++ b/src/corelibs/U2Gui/src/util/U2FileDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/U2LongLongValidator.cpp b/src/corelibs/U2Gui/src/util/U2LongLongValidator.cpp index c1bb279ec7e4dab7fdd12684469f9bdb90381c5f..acff1792e453a33fe0f29683402026eae02b5175 100644 --- a/src/corelibs/U2Gui/src/util/U2LongLongValidator.cpp +++ b/src/corelibs/U2Gui/src/util/U2LongLongValidator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/U2LongLongValidator.h b/src/corelibs/U2Gui/src/util/U2LongLongValidator.h index 8c40bd2054479d5855cde743bde914b1e994381b..08d17b37ca285d6de96ed41086c9519ee047f000 100644 --- a/src/corelibs/U2Gui/src/util/U2LongLongValidator.h +++ b/src/corelibs/U2Gui/src/util/U2LongLongValidator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/WidgetWithLocalToolbar.cpp b/src/corelibs/U2Gui/src/util/WidgetWithLocalToolbar.cpp index 0c3afc13d1113c4d5b5052d3c68606a2b288c295..3c577c75ad7e30d41a04565d0e0d52541111a9f9 100644 --- a/src/corelibs/U2Gui/src/util/WidgetWithLocalToolbar.cpp +++ b/src/corelibs/U2Gui/src/util/WidgetWithLocalToolbar.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/WidgetWithLocalToolbar.h b/src/corelibs/U2Gui/src/util/WidgetWithLocalToolbar.h index 72ea09d1831b4af29332a6d01cace050189d4cb7..55c6b99cc48e050afa889c678a665511bc9f7879 100644 --- a/src/corelibs/U2Gui/src/util/WidgetWithLocalToolbar.h +++ b/src/corelibs/U2Gui/src/util/WidgetWithLocalToolbar.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/imageExport/ImageExportTask.cpp b/src/corelibs/U2Gui/src/util/imageExport/ImageExportTask.cpp index 3ee29ac789ba7155badc6800eb4ddfb2a38745a0..6dba3515a5b02be6ddb9b9bb6522d2defa168548 100644 --- a/src/corelibs/U2Gui/src/util/imageExport/ImageExportTask.cpp +++ b/src/corelibs/U2Gui/src/util/imageExport/ImageExportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -56,8 +56,11 @@ bool ImageExportTaskSettings::isPDFFormat() const { return (PS_FORMAT == format || PDF_FORMAT == format); } -const QString ImageExportTask::WRONG_FORMAT_MESSAGE = QObject::tr("Format %1 is not supported by %2."); -const QString ImageExportTask::EXPORT_FAIL_MESSAGE = QObject::tr("Failed to export image to %1."); +ImageExportTask::ImageExportTask(const ImageExportTaskSettings &settings) + : Task(tr("Image export task"), TaskFlag_RunInMainThread), settings(settings) { + WRONG_FORMAT_MESSAGE = tr("Format %1 is not supported by %2."); + EXPORT_FAIL_MESSAGE = tr("Failed to export image to %1."); +} Task::ReportResult ImageExportTask::report() { ioLog.info(tr("Done!")); diff --git a/src/corelibs/U2Gui/src/util/imageExport/ImageExportTask.h b/src/corelibs/U2Gui/src/util/imageExport/ImageExportTask.h index 716227948c0a84c260b56829b4ea1d85b97c9d32..136a775797ed2c803a7649c32e289e56b0d8d57b 100644 --- a/src/corelibs/U2Gui/src/util/imageExport/ImageExportTask.h +++ b/src/corelibs/U2Gui/src/util/imageExport/ImageExportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -58,15 +58,13 @@ public: class U2GUI_EXPORT ImageExportTask : public Task { Q_OBJECT public: - ImageExportTask(const ImageExportTaskSettings &settings) - : Task(tr("Image export task"), TaskFlag_RunInMainThread), - settings(settings) {} + ImageExportTask(const ImageExportTaskSettings &settings); virtual void run() = 0; ReportResult report(); protected: ImageExportTaskSettings settings; - static const QString WRONG_FORMAT_MESSAGE; - static const QString EXPORT_FAIL_MESSAGE; + QString WRONG_FORMAT_MESSAGE; + QString EXPORT_FAIL_MESSAGE; }; enum ExportImageFormatFlag { diff --git a/src/corelibs/U2Gui/src/util/imageExport/WidgetScreenshotExportTask.cpp b/src/corelibs/U2Gui/src/util/imageExport/WidgetScreenshotExportTask.cpp index 6e252c4337edd08f6145ed16cfe9f689d20f5936..91e3a8594c627a82d19750161c630e55048c1b98 100644 --- a/src/corelibs/U2Gui/src/util/imageExport/WidgetScreenshotExportTask.cpp +++ b/src/corelibs/U2Gui/src/util/imageExport/WidgetScreenshotExportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,7 +32,6 @@ namespace U2 { - void WidgetScreenshotExportToSvgTask::run() { SAFE_POINT_EXT(settings.isSVGFormat(), setError(WRONG_FORMAT_MESSAGE.arg(settings.format).arg("WidgetScreenshotExportToSVGTask")), ); @@ -40,6 +39,7 @@ void WidgetScreenshotExportToSvgTask::run() { bool result=false; QPainter painter; QSvgGenerator generator; + generator.setResolution(settings.imageDpi); generator.setFileName(settings.fileName); generator.setSize(widget->rect().size()); diff --git a/src/corelibs/U2Gui/src/util/imageExport/WidgetScreenshotExportTask.h b/src/corelibs/U2Gui/src/util/imageExport/WidgetScreenshotExportTask.h index bb2d8bff6b37f0b874f636cd1d5555cdfc93306a..692ae7c38273f211eebe001ddfd2ddcb8fb48f84 100644 --- a/src/corelibs/U2Gui/src/util/imageExport/WidgetScreenshotExportTask.h +++ b/src/corelibs/U2Gui/src/util/imageExport/WidgetScreenshotExportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/logview/LogView.cpp b/src/corelibs/U2Gui/src/util/logview/LogView.cpp index 667109efdc391322a2b433d7ca86baab74d3c0b6..60f5a2f30341b6e41e04278ef72d0e048e316569 100644 --- a/src/corelibs/U2Gui/src/util/logview/LogView.cpp +++ b/src/corelibs/U2Gui/src/util/logview/LogView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/logview/LogView.h b/src/corelibs/U2Gui/src/util/logview/LogView.h index 98fd41c4b84cc7a5087bb9668fab128b4f9c6f25..20bfbd6bbe3fc49368b6017940d2f02134358a17 100644 --- a/src/corelibs/U2Gui/src/util/logview/LogView.h +++ b/src/corelibs/U2Gui/src/util/logview/LogView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/ConnectionHelper.cpp b/src/corelibs/U2Gui/src/util/project/ConnectionHelper.cpp index c343242430510de36323b322fd8988821489acee..b28555e7ba66f50518aab5c607451f71acb9f139 100644 --- a/src/corelibs/U2Gui/src/util/project/ConnectionHelper.cpp +++ b/src/corelibs/U2Gui/src/util/project/ConnectionHelper.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/ConnectionHelper.h b/src/corelibs/U2Gui/src/util/project/ConnectionHelper.h index 4a61f65cb8cda8e166ecdf6685bde3adfe463af9..70479782cb4bbe7e6e58ba968f36d27775ccf1d7 100644 --- a/src/corelibs/U2Gui/src/util/project/ConnectionHelper.h +++ b/src/corelibs/U2Gui/src/util/project/ConnectionHelper.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/DocumentFolders.cpp b/src/corelibs/U2Gui/src/util/project/DocumentFolders.cpp index 4e530dc633b55f41644687a61e8f84bb2091f08f..134ed7f5422f7ef82dadc4392983d6408e6c4d92 100644 --- a/src/corelibs/U2Gui/src/util/project/DocumentFolders.cpp +++ b/src/corelibs/U2Gui/src/util/project/DocumentFolders.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/DocumentFolders.h b/src/corelibs/U2Gui/src/util/project/DocumentFolders.h index d2b9e449c90395410d55bcbe3ab87848594e94a8..741eed49971663ccecbe6d4a8d2625999fba66db 100644 --- a/src/corelibs/U2Gui/src/util/project/DocumentFolders.h +++ b/src/corelibs/U2Gui/src/util/project/DocumentFolders.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/EditableTreeView.cpp b/src/corelibs/U2Gui/src/util/project/EditableTreeView.cpp index 5ef141867c2cb6fc564d863b1ce143f3636ec84d..9a2b885b99f5857b8a0d4f808510e9f36233485c 100644 --- a/src/corelibs/U2Gui/src/util/project/EditableTreeView.cpp +++ b/src/corelibs/U2Gui/src/util/project/EditableTreeView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/EditableTreeView.h b/src/corelibs/U2Gui/src/util/project/EditableTreeView.h index 16e46e45c478d05f6aeee8893a2e1b04291d0409..35a23da005ed4fe5c7f0a3e47d0ed12b6771a156 100644 --- a/src/corelibs/U2Gui/src/util/project/EditableTreeView.h +++ b/src/corelibs/U2Gui/src/util/project/EditableTreeView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/FilteredProjectGroup.cpp b/src/corelibs/U2Gui/src/util/project/FilteredProjectGroup.cpp index fd51cce4287249d058fb875e2c49d8e1fdbb7dc2..8222f39ac594bda067c3d70b80a5ac066b8fbcd8 100644 --- a/src/corelibs/U2Gui/src/util/project/FilteredProjectGroup.cpp +++ b/src/corelibs/U2Gui/src/util/project/FilteredProjectGroup.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/FilteredProjectGroup.h b/src/corelibs/U2Gui/src/util/project/FilteredProjectGroup.h index 4f522cb8d29444a8fedffbe042a609cdcc7ec854..d31d5c55bcaac36998d4cba0884c9a659f88f1ba 100644 --- a/src/corelibs/U2Gui/src/util/project/FilteredProjectGroup.h +++ b/src/corelibs/U2Gui/src/util/project/FilteredProjectGroup.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/FilteredProjectItemDelegate.cpp b/src/corelibs/U2Gui/src/util/project/FilteredProjectItemDelegate.cpp index 5eeb612f185b4278c60790d85b6c966d5f13380d..a768f54fbe67cead4b8a7fce10306085a11c2e34 100644 --- a/src/corelibs/U2Gui/src/util/project/FilteredProjectItemDelegate.cpp +++ b/src/corelibs/U2Gui/src/util/project/FilteredProjectItemDelegate.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/FilteredProjectItemDelegate.h b/src/corelibs/U2Gui/src/util/project/FilteredProjectItemDelegate.h index da922d49b138451899e418a7012ee7a34616470a..6740de103c38611d115a8f4a93a1a0f555566f06 100644 --- a/src/corelibs/U2Gui/src/util/project/FilteredProjectItemDelegate.h +++ b/src/corelibs/U2Gui/src/util/project/FilteredProjectItemDelegate.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/FolderNameDialog.cpp b/src/corelibs/U2Gui/src/util/project/FolderNameDialog.cpp index 2569c204f14a07d586f8173730c443c1d3a7e8a6..b343daf5e4d3a6b56105c2ad04c8b84522be3004 100644 --- a/src/corelibs/U2Gui/src/util/project/FolderNameDialog.cpp +++ b/src/corelibs/U2Gui/src/util/project/FolderNameDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/FolderNameDialog.h b/src/corelibs/U2Gui/src/util/project/FolderNameDialog.h index 3f4f3aa93f79560423431032e1af492517f555e4..4c57ac3ba01772727ad011d525bb848b7466b0fc 100644 --- a/src/corelibs/U2Gui/src/util/project/FolderNameDialog.h +++ b/src/corelibs/U2Gui/src/util/project/FolderNameDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/LoadDocumentTaskProvider.h b/src/corelibs/U2Gui/src/util/project/LoadDocumentTaskProvider.h index 8a0e4c34ba6f79504782be193a58c4030b1371b5..47b3636dfc4d29e78267a239394be7f7225f4ed2 100644 --- a/src/corelibs/U2Gui/src/util/project/LoadDocumentTaskProvider.h +++ b/src/corelibs/U2Gui/src/util/project/LoadDocumentTaskProvider.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/ProjectFilterNames.cpp b/src/corelibs/U2Gui/src/util/project/ProjectFilterNames.cpp index b2f6b709b3215f51b53c1d54dbc1dfa85c7f013b..166706065ebf54739d648385bcb69dd79970b17c 100644 --- a/src/corelibs/U2Gui/src/util/project/ProjectFilterNames.cpp +++ b/src/corelibs/U2Gui/src/util/project/ProjectFilterNames.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/ProjectFilterNames.h b/src/corelibs/U2Gui/src/util/project/ProjectFilterNames.h index cc62137635788deea89f1a797bb49c09a2feddd0..52cc35a38177f3812597f7157fa35533181a74d3 100644 --- a/src/corelibs/U2Gui/src/util/project/ProjectFilterNames.h +++ b/src/corelibs/U2Gui/src/util/project/ProjectFilterNames.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/ProjectFilterProxyModel.cpp b/src/corelibs/U2Gui/src/util/project/ProjectFilterProxyModel.cpp index fc423a4c1b2697c62dfe889e6bb2eacd5f152aa0..df0da531192adce9b4e0eb26d58721368647e835 100644 --- a/src/corelibs/U2Gui/src/util/project/ProjectFilterProxyModel.cpp +++ b/src/corelibs/U2Gui/src/util/project/ProjectFilterProxyModel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/ProjectFilterProxyModel.h b/src/corelibs/U2Gui/src/util/project/ProjectFilterProxyModel.h index 663f0254878be51d4a6027778b13c73c3382ac09..6dd69dbb973ebdecae3f0d4dde8bffab7b4b8dbf 100644 --- a/src/corelibs/U2Gui/src/util/project/ProjectFilterProxyModel.h +++ b/src/corelibs/U2Gui/src/util/project/ProjectFilterProxyModel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/ProjectFilteringController.cpp b/src/corelibs/U2Gui/src/util/project/ProjectFilteringController.cpp index 3eeb5fcb1ac8f8a63c9445b92140d0534f64bb38..3e2b2454020ed4eee5952f99e00c06b4ef7bd3f3 100644 --- a/src/corelibs/U2Gui/src/util/project/ProjectFilteringController.cpp +++ b/src/corelibs/U2Gui/src/util/project/ProjectFilteringController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/ProjectFilteringController.h b/src/corelibs/U2Gui/src/util/project/ProjectFilteringController.h index 545b1c1ac93d2406467aafdf6ec5fdee09099b14..f8ec2dc3e38726f138f44a9a7207fc78988df50d 100644 --- a/src/corelibs/U2Gui/src/util/project/ProjectFilteringController.h +++ b/src/corelibs/U2Gui/src/util/project/ProjectFilteringController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/ProjectTreeController.cpp b/src/corelibs/U2Gui/src/util/project/ProjectTreeController.cpp index 08ce89880354f7f72acc0fc43ad49c74619b34cc..9a97ee784fedefcb5612f200cfa63ca26d1c6dd8 100644 --- a/src/corelibs/U2Gui/src/util/project/ProjectTreeController.cpp +++ b/src/corelibs/U2Gui/src/util/project/ProjectTreeController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/ProjectTreeController.h b/src/corelibs/U2Gui/src/util/project/ProjectTreeController.h index ac5e8c8f0c7f85801507cba8e4a77c360ff6bda5..2e8875d9ff62ff9fbe2732d347fc8f47fe7eaecb 100644 --- a/src/corelibs/U2Gui/src/util/project/ProjectTreeController.h +++ b/src/corelibs/U2Gui/src/util/project/ProjectTreeController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/ProjectUpdater.cpp b/src/corelibs/U2Gui/src/util/project/ProjectUpdater.cpp index 3caa87b9a2ae2016423295dbeaf0c02f9016e735..2ba5bb8c96f9846cf898b79394978cdfa71ae988 100644 --- a/src/corelibs/U2Gui/src/util/project/ProjectUpdater.cpp +++ b/src/corelibs/U2Gui/src/util/project/ProjectUpdater.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/ProjectUpdater.h b/src/corelibs/U2Gui/src/util/project/ProjectUpdater.h index ef14abffbd3d11f2a05183e90a57878009f95f7f..7d10ea894dc201b564766aef7559c9686daf8a84 100644 --- a/src/corelibs/U2Gui/src/util/project/ProjectUpdater.h +++ b/src/corelibs/U2Gui/src/util/project/ProjectUpdater.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/ProjectUtils.cpp b/src/corelibs/U2Gui/src/util/project/ProjectUtils.cpp index d514e6ac9416283369befd5028762dd4c2e4fecd..b42f190fbbce02f6f6fb87ab8fb25b903a09f9f2 100644 --- a/src/corelibs/U2Gui/src/util/project/ProjectUtils.cpp +++ b/src/corelibs/U2Gui/src/util/project/ProjectUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/ProjectUtils.h b/src/corelibs/U2Gui/src/util/project/ProjectUtils.h index e55a3ae9ccfb26d2de7f6787315883295bcc90f0..c83989a6dd814e0c72cbc1c7c64b78f3838bc1f6 100644 --- a/src/corelibs/U2Gui/src/util/project/ProjectUtils.h +++ b/src/corelibs/U2Gui/src/util/project/ProjectUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/ProjectViewFilterModel.cpp b/src/corelibs/U2Gui/src/util/project/ProjectViewFilterModel.cpp index c1a1c888b6836e11c515315fbfefab9c87262aca..7a7bae9b734b24af62d6a4f97eb96efc53e39f99 100644 --- a/src/corelibs/U2Gui/src/util/project/ProjectViewFilterModel.cpp +++ b/src/corelibs/U2Gui/src/util/project/ProjectViewFilterModel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/ProjectViewFilterModel.h b/src/corelibs/U2Gui/src/util/project/ProjectViewFilterModel.h index 3d1d110c89348eeadfd0afddb718d6ce680bfbc7..19839f7e7fa3ee329c3618b79cf56121ee4405d3 100644 --- a/src/corelibs/U2Gui/src/util/project/ProjectViewFilterModel.h +++ b/src/corelibs/U2Gui/src/util/project/ProjectViewFilterModel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/ProjectViewModel.cpp b/src/corelibs/U2Gui/src/util/project/ProjectViewModel.cpp index 568af48a4aa549908c999217d912397f37abbd13..f2782a47560afceee8bb7caca4bd307ef8defcfe 100644 --- a/src/corelibs/U2Gui/src/util/project/ProjectViewModel.cpp +++ b/src/corelibs/U2Gui/src/util/project/ProjectViewModel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/ProjectViewModel.h b/src/corelibs/U2Gui/src/util/project/ProjectViewModel.h index e49a9cb646e2f1388fa5329bbea8bc1c08176a8c..33612309d693e2d882ce0bdd1fa52cacb644bdfa 100644 --- a/src/corelibs/U2Gui/src/util/project/ProjectViewModel.h +++ b/src/corelibs/U2Gui/src/util/project/ProjectViewModel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/filter_tasks/FeatureKeyFilterTask.cpp b/src/corelibs/U2Gui/src/util/project/filter_tasks/FeatureKeyFilterTask.cpp index 4f28e544940ef959fd95dd29b9f65c9e1d624da6..e5b267422bfc1fdf506b007692fd1d1f5f5891af 100644 --- a/src/corelibs/U2Gui/src/util/project/filter_tasks/FeatureKeyFilterTask.cpp +++ b/src/corelibs/U2Gui/src/util/project/filter_tasks/FeatureKeyFilterTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/filter_tasks/FeatureKeyFilterTask.h b/src/corelibs/U2Gui/src/util/project/filter_tasks/FeatureKeyFilterTask.h index 2d55e8c2bf06eef23ea82cfb9cbc70cb5ada00df..94ef7eb9c2fef79b36ee05a8b9745477d4b3ef85 100644 --- a/src/corelibs/U2Gui/src/util/project/filter_tasks/FeatureKeyFilterTask.h +++ b/src/corelibs/U2Gui/src/util/project/filter_tasks/FeatureKeyFilterTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/filter_tasks/MaContentFilterTask.cpp b/src/corelibs/U2Gui/src/util/project/filter_tasks/MaContentFilterTask.cpp index 2e5314978fa0988e7cce401f6d1da808040544f7..1d87cab6ab65ae3bea08172ea19ac6ba487adc4f 100644 --- a/src/corelibs/U2Gui/src/util/project/filter_tasks/MaContentFilterTask.cpp +++ b/src/corelibs/U2Gui/src/util/project/filter_tasks/MaContentFilterTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/filter_tasks/MaContentFilterTask.h b/src/corelibs/U2Gui/src/util/project/filter_tasks/MaContentFilterTask.h index 545af1f8a1f30bbb9c2fdaaedb4ceaa86e811581..3951a4757b1ff16b52647dddc13942e0b7e4b15d 100644 --- a/src/corelibs/U2Gui/src/util/project/filter_tasks/MaContentFilterTask.h +++ b/src/corelibs/U2Gui/src/util/project/filter_tasks/MaContentFilterTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/filter_tasks/MaSeqNameFilterTask.cpp b/src/corelibs/U2Gui/src/util/project/filter_tasks/MaSeqNameFilterTask.cpp index c4a6bbfff92f9482f11f27c6303b60f2e5cfb22f..a2bef226dcd7734043cacd6ead4dff6b349e5aec 100644 --- a/src/corelibs/U2Gui/src/util/project/filter_tasks/MaSeqNameFilterTask.cpp +++ b/src/corelibs/U2Gui/src/util/project/filter_tasks/MaSeqNameFilterTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/filter_tasks/MaSeqNameFilterTask.h b/src/corelibs/U2Gui/src/util/project/filter_tasks/MaSeqNameFilterTask.h index b9f8fd0cd63ec8b383a811790119bd06547f8f06..78ea6e29ef5cb098ca81270898fa0f6a58b306e3 100644 --- a/src/corelibs/U2Gui/src/util/project/filter_tasks/MaSeqNameFilterTask.h +++ b/src/corelibs/U2Gui/src/util/project/filter_tasks/MaSeqNameFilterTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/filter_tasks/ObjectNameFilterTask.cpp b/src/corelibs/U2Gui/src/util/project/filter_tasks/ObjectNameFilterTask.cpp index 6994051792d2bb129510e4aba47d875d05fc7e33..f8bd546c1fa168446d418fd5fac2cd056ec4f48a 100644 --- a/src/corelibs/U2Gui/src/util/project/filter_tasks/ObjectNameFilterTask.cpp +++ b/src/corelibs/U2Gui/src/util/project/filter_tasks/ObjectNameFilterTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/filter_tasks/ObjectNameFilterTask.h b/src/corelibs/U2Gui/src/util/project/filter_tasks/ObjectNameFilterTask.h index 5d144843b8e94c87bff3b68c891a3b3aa7eddad8..1db929701f4d3813cd712b8483dee789f3393460 100644 --- a/src/corelibs/U2Gui/src/util/project/filter_tasks/ObjectNameFilterTask.h +++ b/src/corelibs/U2Gui/src/util/project/filter_tasks/ObjectNameFilterTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/filter_tasks/SequenceAccFilterTask.cpp b/src/corelibs/U2Gui/src/util/project/filter_tasks/SequenceAccFilterTask.cpp index 03886bf9d5f31ec5402905bf0aec0f5819710f3d..d92b87b0988232dea917486ba023e072cf51e209 100644 --- a/src/corelibs/U2Gui/src/util/project/filter_tasks/SequenceAccFilterTask.cpp +++ b/src/corelibs/U2Gui/src/util/project/filter_tasks/SequenceAccFilterTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/filter_tasks/SequenceAccFilterTask.h b/src/corelibs/U2Gui/src/util/project/filter_tasks/SequenceAccFilterTask.h index ced3ca21cd60a529e1540cf8a5d2c8e4504cdc2c..c7fcda9fc1347af5fcbf515ee63305906779ad16 100644 --- a/src/corelibs/U2Gui/src/util/project/filter_tasks/SequenceAccFilterTask.h +++ b/src/corelibs/U2Gui/src/util/project/filter_tasks/SequenceAccFilterTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/filter_tasks/TextContentFilterTask.cpp b/src/corelibs/U2Gui/src/util/project/filter_tasks/TextContentFilterTask.cpp index 484eb47792e413f8e2de93e1b69ee2efae576358..af24c80cd559e46128b3ba2962b0356dee4a7f95 100644 --- a/src/corelibs/U2Gui/src/util/project/filter_tasks/TextContentFilterTask.cpp +++ b/src/corelibs/U2Gui/src/util/project/filter_tasks/TextContentFilterTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/project/filter_tasks/TextContentFilterTask.h b/src/corelibs/U2Gui/src/util/project/filter_tasks/TextContentFilterTask.h index 39ce1363e942d91b1c932eea30634dbe562ec0fa..1e30959734862f9d0e2ef5b1706cda104c76f124 100644 --- a/src/corelibs/U2Gui/src/util/project/filter_tasks/TextContentFilterTask.h +++ b/src/corelibs/U2Gui/src/util/project/filter_tasks/TextContentFilterTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/shared_db/CommonImportOptionsDialog.cpp b/src/corelibs/U2Gui/src/util/shared_db/CommonImportOptionsDialog.cpp index 416b5d491110b4379a2af83f8bc76cca9fa605bc..59aa60adf63227d7b9df52c2fe239818edc727e5 100644 --- a/src/corelibs/U2Gui/src/util/shared_db/CommonImportOptionsDialog.cpp +++ b/src/corelibs/U2Gui/src/util/shared_db/CommonImportOptionsDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ CommonImportOptionsDialog::CommonImportOptionsDialog(const QString& baseFolder, QDialog(parent) { setupUi(this); - new HelpButton(this, buttonBox, "22056159"); + new HelpButton(this, buttonBox, "24742694"); init(baseFolder, options); } diff --git a/src/corelibs/U2Gui/src/util/shared_db/CommonImportOptionsDialog.h b/src/corelibs/U2Gui/src/util/shared_db/CommonImportOptionsDialog.h index ff9e5c43b03f4a01447ba580cf1f734498cf2f39..541d6aa1ee3d7101ed73a6c767caaca3c5a8ee54 100644 --- a/src/corelibs/U2Gui/src/util/shared_db/CommonImportOptionsDialog.h +++ b/src/corelibs/U2Gui/src/util/shared_db/CommonImportOptionsDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/shared_db/EditConnectionDialog.cpp b/src/corelibs/U2Gui/src/util/shared_db/EditConnectionDialog.cpp index 328a759a9fc231b5d7e9b5fd9280683cc0827d0e..bbecb156b301bb542af9b81ccb3f424d83e73c97 100644 --- a/src/corelibs/U2Gui/src/util/shared_db/EditConnectionDialog.cpp +++ b/src/corelibs/U2Gui/src/util/shared_db/EditConnectionDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -40,7 +40,7 @@ EditConnectionDialog::EditConnectionDialog(QWidget *parent, const QString &dbiUr ui(new Ui_EditConnectionDialog) { ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22056157"); + new HelpButton(this, ui->buttonBox, "24742692"); adjustSize(); init(dbiUrl, connectionName, userName); } diff --git a/src/corelibs/U2Gui/src/util/shared_db/EditConnectionDialog.h b/src/corelibs/U2Gui/src/util/shared_db/EditConnectionDialog.h index 33bed11f0a521331ca2b6ae31e012f780c47d8e2..823c8231ae1aa6555d8fcc4304dfaa6b5120d525 100644 --- a/src/corelibs/U2Gui/src/util/shared_db/EditConnectionDialog.h +++ b/src/corelibs/U2Gui/src/util/shared_db/EditConnectionDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/shared_db/ImportOptionsWidget.cpp b/src/corelibs/U2Gui/src/util/shared_db/ImportOptionsWidget.cpp index 8c73234f1deb388dede336c22316f1a7784b2d25..108f6522bc3cebbb9272e40571260decfb03beee 100644 --- a/src/corelibs/U2Gui/src/util/shared_db/ImportOptionsWidget.cpp +++ b/src/corelibs/U2Gui/src/util/shared_db/ImportOptionsWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/shared_db/ImportOptionsWidget.h b/src/corelibs/U2Gui/src/util/shared_db/ImportOptionsWidget.h index 6570962f7ce38b237b3d2d69bf5889ae0a95f9a6..85587c5e31be5fb57be4248c8e492852e413ad86 100644 --- a/src/corelibs/U2Gui/src/util/shared_db/ImportOptionsWidget.h +++ b/src/corelibs/U2Gui/src/util/shared_db/ImportOptionsWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/shared_db/ImportToDatabaseDialog.cpp b/src/corelibs/U2Gui/src/util/shared_db/ImportToDatabaseDialog.cpp index e70cba54c12e611d92bfe8e021432f3f03d505bd..53b58d28c73f09923e1a46fe52d91d3f15140029 100644 --- a/src/corelibs/U2Gui/src/util/shared_db/ImportToDatabaseDialog.cpp +++ b/src/corelibs/U2Gui/src/util/shared_db/ImportToDatabaseDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -50,9 +50,6 @@ namespace U2 { -const QString ImportToDatabaseDialog::DIR_HELPER_NAME = "import_to_database"; -const QString ImportToDatabaseDialog::FILES_AND_FOLDERS = QObject::tr("Files and folders"); -const QString ImportToDatabaseDialog::OBJECTS_AND_DOCUMENTS = QObject::tr("Documents and objects"); ImportToDatabaseDialog::ImportToDatabaseDialog(Document *dbConnection, const QString &defaultFolder, QWidget *parent) : QDialog(parent), @@ -61,7 +58,11 @@ ImportToDatabaseDialog::ImportToDatabaseDialog(Document *dbConnection, const QSt baseFolder(U2DbiUtils::makeFolderCanonical(defaultFolder)) { ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22056159"); + DIR_HELPER_NAME = "import_to_database"; + FILES_AND_FOLDERS = tr("Files and folders"); + OBJECTS_AND_DOCUMENTS = tr("Documents and objects"); + + new HelpButton(this, ui->buttonBox, "24742694"); init(); connectSignals(); updateState(); diff --git a/src/corelibs/U2Gui/src/util/shared_db/ImportToDatabaseDialog.h b/src/corelibs/U2Gui/src/util/shared_db/ImportToDatabaseDialog.h index e0de8f172f6415e9e74df3aea991af6060636b10..e82ac2e49a360eb7fffa6003000f0e946092ac89 100644 --- a/src/corelibs/U2Gui/src/util/shared_db/ImportToDatabaseDialog.h +++ b/src/corelibs/U2Gui/src/util/shared_db/ImportToDatabaseDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -115,9 +115,9 @@ private: QMap<QTreeWidgetItem*, Document*> treeItem2Document; QMap<QTreeWidgetItem*, GObject*> treeItem2Object; - static const QString DIR_HELPER_NAME; - static const QString FILES_AND_FOLDERS; - static const QString OBJECTS_AND_DOCUMENTS; + QString DIR_HELPER_NAME; + QString FILES_AND_FOLDERS; + QString OBJECTS_AND_DOCUMENTS; static const int COLUMN_ITEM_TEXT = 0; static const int COLUMN_FOLDER = 1; diff --git a/src/corelibs/U2Gui/src/util/shared_db/ItemToImportEditDialog.cpp b/src/corelibs/U2Gui/src/util/shared_db/ItemToImportEditDialog.cpp index 11e528253b06267f5e46eab6f2e10e825bb7c905..25ea9aabba194da30e94996f2fabaf0bd772dfda 100644 --- a/src/corelibs/U2Gui/src/util/shared_db/ItemToImportEditDialog.cpp +++ b/src/corelibs/U2Gui/src/util/shared_db/ItemToImportEditDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,7 +32,7 @@ ItemToImportEditDialog::ItemToImportEditDialog(const QString &item, const QStrin ui(new Ui_ItemToImportEditDialog) { ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22056159"); + new HelpButton(this, ui->buttonBox, "24742694"); init(item, folder, options); } diff --git a/src/corelibs/U2Gui/src/util/shared_db/ItemToImportEditDialog.h b/src/corelibs/U2Gui/src/util/shared_db/ItemToImportEditDialog.h index f80c8c46a1806b200dcb2e0f613d99ae25f9e4c9..748228e93075a2bc8c019f46fcded9b5d05eacbc 100644 --- a/src/corelibs/U2Gui/src/util/shared_db/ItemToImportEditDialog.h +++ b/src/corelibs/U2Gui/src/util/shared_db/ItemToImportEditDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/shared_db/SharedConnectionsDialog.cpp b/src/corelibs/U2Gui/src/util/shared_db/SharedConnectionsDialog.cpp index 684c2113e53543fb38775b9353cd441ba888759e..65e31f3a06c4ebb9ac6ec3d5db74b5b5f2eccfdd 100644 --- a/src/corelibs/U2Gui/src/util/shared_db/SharedConnectionsDialog.cpp +++ b/src/corelibs/U2Gui/src/util/shared_db/SharedConnectionsDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -84,7 +84,7 @@ SharedConnectionsDialog::SharedConnectionsDialog(QWidget *parent) : ui(new Ui_SharedConnectionsDialog) { ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22056157"); + new HelpButton(this, ui->buttonBox, "24742692"); init(); connectSignals(); @@ -506,7 +506,7 @@ bool SharedConnectionsDialog::checkDbShouldBeUpgraded(const U2DbiRef &ref) { if (upgradeDatabase) { QObjectScopedPointer<QMessageBox> question = new QMessageBox(QMessageBox::Question, tr(DATABASE_UPGRADE_TITLE), tr(DATABASE_UPGRADE_TEXT), QMessageBox::Ok | QMessageBox::Cancel| QMessageBox::Help, this); question->button(QMessageBox::Ok)->setText(tr("Upgrade")); - HelpButton(question.data(), question->button(QMessageBox::Help), "22056157"); + HelpButton(question.data(), question->button(QMessageBox::Help), "24742692"); question->setDefaultButton(QMessageBox::Cancel); const int dialogResult = question->exec(); CHECK(!question.isNull(), true); diff --git a/src/corelibs/U2Gui/src/util/shared_db/SharedConnectionsDialog.h b/src/corelibs/U2Gui/src/util/shared_db/SharedConnectionsDialog.h index 39c47fe5583e46db121e411e62f21d0d43e4d35f..3fb5604fdc0a4e528497ec4b3605bb7532c99804 100644 --- a/src/corelibs/U2Gui/src/util/shared_db/SharedConnectionsDialog.h +++ b/src/corelibs/U2Gui/src/util/shared_db/SharedConnectionsDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Gui/src/util/webview/JavaScriptAgent.cpp b/src/corelibs/U2Gui/src/util/webview/JavaScriptAgent.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1057d01442a904bd1e7de8e9ab4ee35a17768369 --- /dev/null +++ b/src/corelibs/U2Gui/src/util/webview/JavaScriptAgent.cpp @@ -0,0 +1,50 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <U2Core/AppContext.h> +#include <U2Core/Log.h> +#include <U2Core/Settings.h> +#include <U2Core/U2SafePoints.h> + +#include "JavaScriptAgent.h" + +namespace U2 { + +const QString JavaScriptAgent::ID = "ugene"; + +JavaScriptAgent::JavaScriptAgent(QObject *_parent) + : QObject(_parent), + needAdditionalInitialization(false) +{ + Settings *settings = AppContext::getSettings(); + SAFE_POINT(settings != NULL, "AppContext settings is NULL", ); + lang = settings->getValue("UGENE_CURR_TRANSL", "en").toString(); +} + +const QString &JavaScriptAgent::getId() const { + return ID; +} + +void JavaScriptAgent::sl_pageInitialized() { + emit si_pageInitialized(); +} + +} // namespace U2 diff --git a/src/corelibs/U2Designer/src/dashboard/ResourcesWidget.h b/src/corelibs/U2Gui/src/util/webview/JavaScriptAgent.h similarity index 57% rename from src/corelibs/U2Designer/src/dashboard/ResourcesWidget.h rename to src/corelibs/U2Gui/src/util/webview/JavaScriptAgent.h index d8485e29a8ba358bd0dfc7ce79f2b34eabfc7543..7f181693192367579335be5d2b43de29a43101ec 100644 --- a/src/corelibs/U2Designer/src/dashboard/ResourcesWidget.h +++ b/src/corelibs/U2Gui/src/util/webview/JavaScriptAgent.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,38 +19,39 @@ * MA 02110-1301, USA. */ -#ifndef _U2_RESOURCESWIDGET_H_ -#define _U2_RESOURCESWIDGET_H_ +#ifndef _U2_JAVA_SCRIPT_AGENT_H_ +#define _U2_JAVA_SCRIPT_AGENT_H_ -#include <U2Designer/Dashboard.h> +#include <QObject> -namespace U2 { +#include <U2Core/global.h> -using namespace Workflow::Monitor; +namespace U2 { -class ResourcesWidget : public DashboardWidget { +class U2GUI_EXPORT JavaScriptAgent : public QObject { Q_OBJECT + + Q_PROPERTY(QString lang MEMBER lang CONSTANT) + Q_PROPERTY(bool needAdditionalInitialization MEMBER needAdditionalInitialization CONSTANT) + public: - ResourcesWidget(const QWebElement &container, Dashboard *parent); + JavaScriptAgent(QObject* parent); - static const QString ID; + virtual const QString &getId() const; + +signals: + void si_pageInitialized(); -private slots: - void sl_progressChanged(int progress); - void sl_taskStateChanged(Monitor::TaskState state); +public slots: + void sl_pageInitialized(); private: - void running(); - void runningWithProblems(); - void finishedWithProblems(); - void failed(); - void success(); - void canceled(); - - QWebElement statusBar(); - QWebElement statusMessage(); + QString lang; + bool needAdditionalInitialization; + + static const QString ID; }; -} // U2 +} // namespace U2 -#endif // _U2_RESOURCESWIDGET_H_ +#endif // _U2_JAVA_SCRIPT_AGENT_H_ diff --git a/src/corelibs/U2Gui/src/util/webview/SimpleWebViewBasedWidgetController.cpp b/src/corelibs/U2Gui/src/util/webview/SimpleWebViewBasedWidgetController.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dfe069d594b7ff9151ec1ac4dba0cfe474a5c871 --- /dev/null +++ b/src/corelibs/U2Gui/src/util/webview/SimpleWebViewBasedWidgetController.cpp @@ -0,0 +1,71 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <U2Core/AppContext.h> +#include <U2Core/Settings.h> +#include <U2Core/U2SafePoints.h> + +#include <U2Gui/WebViewController.h> + +#include "SimpleWebViewBasedWidgetController.h" + +namespace U2 { + +SimpleWebViewBasedWidgetController::SimpleWebViewBasedWidgetController(U2WebView *webView, JavaScriptAgent *_agent) + : QObject(webView), + agent(_agent), + webViewController(new WebViewController(webView, agent)), + pageReady(false) +{ + connect(webViewController, SIGNAL(si_pageIsAboutToBeInitialized()), SLOT(sl_pageIsAboutToBeInitialized())); + connect(webViewController, SIGNAL(si_pageReady()), SLOT(sl_pageInitialized())); +} + +void SimpleWebViewBasedWidgetController::loadPage(const QString &pageUrl) { + webViewController->loadPage(pageUrl); +} + +void SimpleWebViewBasedWidgetController::savePage(const QString &pageUrl) { + webViewController->savePage(pageUrl); +} + +bool SimpleWebViewBasedWidgetController::isPageReady() const { + return pageReady; +} + +void SimpleWebViewBasedWidgetController::runJavaScript(const QString &script) { + webViewController->runJavaScript(script); +} + +void SimpleWebViewBasedWidgetController::runJavaScript(const QString &script, WebViewCallback callback) { + webViewController->runJavaScript(script, callback); +} + +void SimpleWebViewBasedWidgetController::sl_pageIsAboutToBeInitialized() { + // Do nothing by default +} + +void SimpleWebViewBasedWidgetController::sl_pageInitialized() { + pageReady = true; + emit si_pageReady(); +} + +} // namespace U2 diff --git a/src/corelibs/U2Gui/src/util/webview/SimpleWebViewBasedWidgetController.h b/src/corelibs/U2Gui/src/util/webview/SimpleWebViewBasedWidgetController.h new file mode 100644 index 0000000000000000000000000000000000000000..885fe94dded5e770fd4559dd3ab49c3d54d9a702 --- /dev/null +++ b/src/corelibs/U2Gui/src/util/webview/SimpleWebViewBasedWidgetController.h @@ -0,0 +1,61 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_SIMPLE_WEB_VIEW_BASED_WIDGET_CONTROLLER_H_ +#define _U2_SIMPLE_WEB_VIEW_BASED_WIDGET_CONTROLLER_H_ + +#include "U2WebView.h" + +namespace U2 { + +class JavaScriptAgent; +class WebViewController; + +class U2GUI_EXPORT SimpleWebViewBasedWidgetController : public QObject { + Q_OBJECT +public: + SimpleWebViewBasedWidgetController(U2WebView *webView, JavaScriptAgent *agent = Q_NULLPTR); + + void loadPage(const QString &pageUrl); + void savePage(const QString &pageUrl); + bool isPageReady() const; + + void runJavaScript(const QString &script); + void runJavaScript(const QString &script, WebViewCallback callback); + +signals: + void si_pageReady(); + +protected slots: + virtual void sl_pageIsAboutToBeInitialized(); + virtual void sl_pageInitialized(); + +protected: + JavaScriptAgent *agent; + WebViewController *webViewController; + +private: + bool pageReady; +}; + +} // namespace U2 + +#endif // _U2_SIMPLE_WEB_VIEW_BASED_WIDGET_CONTROLLER_H_ diff --git a/src/corelibs/U2Gui/src/util/webview/U2WebView.h b/src/corelibs/U2Gui/src/util/webview/U2WebView.h new file mode 100644 index 0000000000000000000000000000000000000000..2235bd949bb9de66720add390829f2a13c455601 --- /dev/null +++ b/src/corelibs/U2Gui/src/util/webview/U2WebView.h @@ -0,0 +1,76 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_WEB_VIEW_H_ +#define _U2_WEB_VIEW_H_ + +#include <functional> + +#if UGENE_WEB_KIT +#include <QWebView> +#else +#include <QWebEngineView> +#endif + +#include <U2Core/global.h> + +namespace U2 { + +typedef std::function<void(const QVariant &)> WebViewCallback; + +#if UGENE_WEB_KIT +typedef class QWebView U2WebView; +typedef class QWebPage U2WebPage; +#else + +class U2GUI_EXPORT U2WebPage : public QWebEnginePage { + Q_OBJECT +public: + U2WebPage(QObject *parent = Q_NULLPTR) : QWebEnginePage(parent) { + + } + +signals: + void si_linkClicked(const QUrl &url); + +private: +#if (QT_VERSION >= 0x050500) + bool acceptNavigationRequest(const QUrl &url, NavigationType type, bool /*isMainFrame*/) { + if (type == NavigationTypeLinkClicked) { + emit si_linkClicked(url); + return false; + } + return true; + } +#else + bool javaScriptConfirm(const QUrl & /*securityOrigin*/, const QString &msg) { // hack for Qt5.4 only + emit si_linkClicked(msg); + return false; + } +#endif +}; + +typedef class QWebEngineView U2WebView; +#endif + +} // namespace U2 + +#endif // _U2_WEB_VIEW_H_ diff --git a/src/corelibs/U2Gui/src/util/webview/WebViewController.cpp b/src/corelibs/U2Gui/src/util/webview/WebViewController.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d7c8379a10efc0a32cbc8b6ed05738f3badbda8d --- /dev/null +++ b/src/corelibs/U2Gui/src/util/webview/WebViewController.cpp @@ -0,0 +1,96 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <U2Core/U2SafePoints.h> + +#include "WebViewController.h" +#include "WebViewControllerPrivate.h" + +#ifdef UGENE_WEB_KIT +#include "webkit/WebViewWebKitControllerPrivate.h" +# else +#include "qtwebengine/WebViewQtWebEngineControllerPrivate.h" +#endif + +namespace U2 { + +WebViewController::WebViewController(U2WebView *_webView, JavaScriptAgent *_agent) + : QObject(_webView), + agent(_agent), + pageLoaded(false), + pageInitialized(false) +{ +#ifdef UGENE_WEB_KIT + controllerPrivate = new WebViewWebKitControllerPrivate(_webView); +# else + controllerPrivate = new WebViewQtWebEngineControllerPrivate(_webView); +#endif + connect(_webView, SIGNAL(loadFinished(bool)), SLOT(sl_pageLoaded(bool))); + + if (Q_NULLPTR == agent) { + agent = new JavaScriptAgent(this); + } + connect(agent, SIGNAL(si_pageInitialized()), SLOT(sl_pageInitialized())); +} + +WebViewController::~WebViewController() { + delete controllerPrivate; +} + +void WebViewController::loadPage(const QString &_pageUrl) { + pageUrl = _pageUrl; + controllerPrivate->loadPage(pageUrl); + controllerPrivate->registerJavaScriptAgent(agent); +} + +void WebViewController::savePage(const QString &_pageUrl) { + pageUrl = _pageUrl; + controllerPrivate->savePage(pageUrl); +} + +void WebViewController::setPageUrl(const QString &newPageUrl) { + pageUrl = newPageUrl; +} + +void WebViewController::runJavaScript(const QString &script) { + controllerPrivate->runJavaScript(script); +} + +void WebViewController::runJavaScript(const QString &script, WebViewCallback callback) { + controllerPrivate->runJavaScript(script, callback); +} + +void WebViewController::sl_pageLoaded(bool ok) { + SAFE_POINT(!pageLoaded, "Page was loaded twice", ); + disconnect(parent(), NULL, this, SLOT(sl_pageLoaded(bool))); + CHECK(ok, ); + pageLoaded = true; + SAFE_POINT(!pageInitialized, "Page was initialized before it was loaded", ); + emit si_pageIsAboutToBeInitialized(); + controllerPrivate->init(); +} + +void WebViewController::sl_pageInitialized() { + pageInitialized = true; + emit si_pageReady(); +} + +} // namespace U2 diff --git a/src/corelibs/U2Gui/src/util/webview/WebViewController.h b/src/corelibs/U2Gui/src/util/webview/WebViewController.h new file mode 100644 index 0000000000000000000000000000000000000000..4a9cdf4f0b6c258545a12273853bb580396744b3 --- /dev/null +++ b/src/corelibs/U2Gui/src/util/webview/WebViewController.h @@ -0,0 +1,67 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_WEB_PAGE_CONTROLLER_H_ +#define _U2_WEB_PAGE_CONTROLLER_H_ + +#include "JavaScriptAgent.h" +#include "U2WebView.h" + +namespace U2 { + +class WebViewControllerPrivate; + +class U2GUI_EXPORT WebViewController : public QObject { + Q_OBJECT +public: + WebViewController(U2WebView *webView, JavaScriptAgent *agent = Q_NULLPTR); + ~WebViewController(); + + void loadPage(const QString &pageUrl); + void savePage(const QString &_pageUrl); + + void setPageUrl(const QString &pageUrl); + + void runJavaScript(const QString &script); + void runJavaScript(const QString &script, WebViewCallback callback); + +signals: + void si_pageIsAboutToBeInitialized(); + void si_pageReady(); + +private slots: + void sl_pageLoaded(bool ok); + void sl_pageInitialized(); + +protected: + JavaScriptAgent *agent; + + QString pageUrl; + + bool pageLoaded; + bool pageInitialized; + + WebViewControllerPrivate *controllerPrivate; +}; + +} // namespace U2 + +#endif // _U2_WEB_PAGE_CONTROLLER_H_ diff --git a/src/corelibs/U2Gui/src/util/webview/WebViewControllerPrivate.cpp b/src/corelibs/U2Gui/src/util/webview/WebViewControllerPrivate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..596b0ba22f0ba50d7065287d6e8e5aef28526d33 --- /dev/null +++ b/src/corelibs/U2Gui/src/util/webview/WebViewControllerPrivate.cpp @@ -0,0 +1,56 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QDesktopServices> +#include <QFile> + +#include <U2Core/U2SafePoints.h> + +#include "WebViewControllerPrivate.h" + +namespace U2 { + +WebViewControllerPrivate::WebViewControllerPrivate(U2WebView *_webView) + : webView(_webView) +{ + +} + +void WebViewControllerPrivate::saveContent(const QString &url, const QString &data) { + CHECK(!data.isEmpty(), ); + QFile file(url); + const bool opened = file.open(QIODevice::WriteOnly); + if (!opened) { + ioLog.error(tr("Can not open a file for writing: ") + url); + return; + } + QTextStream stream(&file); + stream.setCodec("UTF-8"); + stream << data; + stream.flush(); + file.close(); +} + +void WebViewControllerPrivate::sl_linkClicked(const QUrl &url) { + QDesktopServices::openUrl(url); +} + +} // namespace U2 diff --git a/src/corelibs/U2Gui/src/util/webview/WebViewControllerPrivate.h b/src/corelibs/U2Gui/src/util/webview/WebViewControllerPrivate.h new file mode 100644 index 0000000000000000000000000000000000000000..5fcf32a21f30cb362ac494e6df6152761348fe39 --- /dev/null +++ b/src/corelibs/U2Gui/src/util/webview/WebViewControllerPrivate.h @@ -0,0 +1,58 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_WEB_VIEW_CONTROLLER_PRIVATE_H_ +#define _U2_WEB_VIEW_CONTROLLER_PRIVATE_H_ + +#include <QPointer> + +#include "util/webview/U2WebView.h" + +namespace U2 { + +class JavaScriptAgent; + +class WebViewControllerPrivate : public QObject { + Q_OBJECT +public: + WebViewControllerPrivate(U2WebView *webView); + + virtual void init() = 0; + + virtual void loadPage(const QString &pageUrl) = 0; + virtual void savePage(const QString &pageUrl) = 0; + + virtual void registerJavaScriptAgent(JavaScriptAgent *agent) = 0; + virtual void runJavaScript(const QString &script) = 0; + virtual void runJavaScript(const QString &script, WebViewCallback callback) = 0; + + static void saveContent(const QString &url, const QString &data); + +private slots: + void sl_linkClicked(const QUrl &url); + +protected: + QPointer<U2WebView> webView; +}; + +} // namespace U2 + +#endif // _U2_WEB_VIEW_CONTROLLER_PRIVATE_H_ diff --git a/src/corelibs/U2Gui/src/util/webview/qtwebengine/WebViewQtWebEngineControllerPrivate.cpp b/src/corelibs/U2Gui/src/util/webview/qtwebengine/WebViewQtWebEngineControllerPrivate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c4c8523f068b59cf5ec668d83160a9d5320a67be --- /dev/null +++ b/src/corelibs/U2Gui/src/util/webview/qtwebengine/WebViewQtWebEngineControllerPrivate.cpp @@ -0,0 +1,84 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <U2Core/U2SafePoints.h> + +#include "WebViewQtWebEngineControllerPrivate.h" +#include "util/webview/JavaScriptAgent.h" +#include "util/webview/qtwebengine/webchannel/U2WebChannel.h" + +namespace U2 { + +WebViewWriter::WebViewWriter(const QString &_pageUrl) + : pageUrl(_pageUrl) +{ + +} + +void WebViewWriter::write(const QString &data) { + CHECK(!data.isEmpty(), ); + WebViewControllerPrivate::saveContent(pageUrl, data); + deleteLater(); +} + +WebViewQtWebEngineControllerPrivate::WebViewQtWebEngineControllerPrivate(U2WebView *webView) + : WebViewControllerPrivate(webView), + channel(NULL) +{ + +} + +void WebViewQtWebEngineControllerPrivate::loadPage(const QString &pageUrl) { + U2WebPage *page = new U2WebPage(webView.data()); + connect(page, SIGNAL(si_linkClicked(const QUrl &)), SLOT(sl_linkClicked(const QUrl &))); + webView->setPage(page); + page->load(pageUrl); + + channel = new U2WebChannel(page); +} + +void WebViewQtWebEngineControllerPrivate::savePage(const QString &pageUrl) { + WebViewWriter *writer = new WebViewWriter(pageUrl); + webView->page()->toHtml([writer](const QString &result) mutable {writer->write(result);}); +} + +void WebViewQtWebEngineControllerPrivate::registerJavaScriptAgent(JavaScriptAgent *agent) { + channel->registerObject(agent->getId(), agent); +} + +void WebViewQtWebEngineControllerPrivate::runJavaScript(const QString &script) { + webView->page()->runJavaScript(script); +} + +void WebViewQtWebEngineControllerPrivate::runJavaScript(const QString &script, WebViewCallback callback) { + webView->page()->runJavaScript(script, callback); +} + +void WebViewQtWebEngineControllerPrivate::init() { + SAFE_POINT(NULL != channel, "U2WebChannel is NULL", ); + const int port = channel->getPort(); + const QString onSocketsArgument = (U2WebChannel::INVALID_PORT == port ? "false" : "true"); + const QString portArgument = (U2WebChannel::INVALID_PORT == port ? "" : "," + QString::number(port)); + runJavaScript("installWebChannel(" + onSocketsArgument + portArgument + ")"); + webView->setContextMenuPolicy(Qt::NoContextMenu); +} + +} // namespace U2 diff --git a/src/corelibs/U2Gui/src/util/webview/qtwebengine/WebViewQtWebEngineControllerPrivate.h b/src/corelibs/U2Gui/src/util/webview/qtwebengine/WebViewQtWebEngineControllerPrivate.h new file mode 100644 index 0000000000000000000000000000000000000000..20ec5ef7b26f36ee3bfefe480f2c9156f2f10b90 --- /dev/null +++ b/src/corelibs/U2Gui/src/util/webview/qtwebengine/WebViewQtWebEngineControllerPrivate.h @@ -0,0 +1,63 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_WEB_VIEW_QT_WEB_ENGINE_CONTROLLER_PRIVATE_H_ +#define _U2_WEB_VIEW_QT_WEB_ENGINE_CONTROLLER_PRIVATE_H_ + +#include "util/webview/WebViewControllerPrivate.h" + +namespace U2 { + +class JavaScriptAgent; +class U2WebChannel; + +class WebViewWriter : public QObject { + Q_OBJECT +public: + WebViewWriter(const QString &pageUrl); + + void write(const QString &data); + +private: + const QString pageUrl; +}; + +class WebViewQtWebEngineControllerPrivate : public WebViewControllerPrivate { + Q_OBJECT +public: + WebViewQtWebEngineControllerPrivate(U2WebView *webView); + + void loadPage(const QString &pageUrl); + void savePage(const QString &pageUrl); + + void registerJavaScriptAgent(JavaScriptAgent *agent); + void runJavaScript(const QString &script); + void runJavaScript(const QString &script, WebViewCallback callback); + +private: + void init(); + + U2WebChannel *channel; +}; + +} // namespace U2 + +#endif // _U2_WEB_VIEW_QT_WEB_ENGINE_CONTROLLER_PRIVATE_H_ diff --git a/src/corelibs/U2Gui/src/util/webview/qtwebengine/webchannel/U2WebChannel.cpp b/src/corelibs/U2Gui/src/util/webview/qtwebengine/webchannel/U2WebChannel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..60d735e3645afebf5c345c9144e04fb71ddced3e --- /dev/null +++ b/src/corelibs/U2Gui/src/util/webview/qtwebengine/webchannel/U2WebChannel.cpp @@ -0,0 +1,65 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#if (QT_VERSION < 0x050500) +#include <QWebChannelAbstractTransport> +#include <QWebSocketServer> + +#include <U2Gui/WebSocketClientWrapper.h> +#include <U2Gui/WebSocketTransport.h> +#endif + +#include <QWebEnginePage> + +#include "U2WebChannel.h" + +namespace U2 { + +const int U2WebChannel::INVALID_PORT = -1; + +U2WebChannel::U2WebChannel(QWebEnginePage *page) + : QObject(page), + channel(new QWebChannel(this)), + port(INVALID_PORT) +{ +#if (QT_VERSION < 0x050500) + QWebSocketServer *server = new QWebSocketServer(QStringLiteral("UGENE Standalone Server"), QWebSocketServer::NonSecureMode, this); + port = 12346; + while (!server->listen(QHostAddress::LocalHost, port)) { //TODO: need more useful solution + port++; + } + + WebSocketClientWrapper *clientWrapper = new WebSocketClientWrapper(server, this); + connect(clientWrapper, &WebSocketClientWrapper::clientConnected, channel, &QWebChannel::connectTo); +#else + page->setWebChannel(channel); +#endif +} + +void U2WebChannel::registerObject(const QString &id, QObject *object) { + channel->registerObject(id, object); +} + +int U2WebChannel::getPort() const { + return port; +} + +} // namespace U2 diff --git a/src/corelibs/U2Gui/src/util/webview/qtwebengine/webchannel/U2WebChannel.h b/src/corelibs/U2Gui/src/util/webview/qtwebengine/webchannel/U2WebChannel.h new file mode 100644 index 0000000000000000000000000000000000000000..4d8573a2d77aca26f5c6e0c2aecdab058c352631 --- /dev/null +++ b/src/corelibs/U2Gui/src/util/webview/qtwebengine/webchannel/U2WebChannel.h @@ -0,0 +1,49 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_WEB_CHANNEL_H_ +#define _U2_WEB_CHANNEL_H_ + +#include <QWebChannel> + +class QWebEnginePage; + +namespace U2 { + +class U2WebChannel : public QObject { + Q_OBJECT +public: + U2WebChannel(QWebEnginePage *page); + + void registerObject(const QString &id, QObject *object); + + int getPort() const; + + static const int INVALID_PORT; + +private: + QWebChannel *channel; + int port; +}; + +} // namespace U2 + +#endif // _U2_WEB_CHANNEL_H_ diff --git a/src/corelibs/U2Gui/src/util/webview/qtwebengine/webchannel/WebSocketClientWrapper.cpp b/src/corelibs/U2Gui/src/util/webview/qtwebengine/webchannel/WebSocketClientWrapper.cpp new file mode 100644 index 0000000000000000000000000000000000000000..96480531460720b0376da051b77603f98fac2501 --- /dev/null +++ b/src/corelibs/U2Gui/src/util/webview/qtwebengine/webchannel/WebSocketClientWrapper.cpp @@ -0,0 +1,86 @@ +/**************************************************************************** +** +** Copyright (C) 2016 KlarГ¤lvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Milian Wolff <milian.wolff@kdab.com> +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtWebChannel module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "WebSocketClientWrapper.h" +#include "WebSocketTransport.h" + +#include <QtWebSockets/QWebSocketServer> + +/*! +\brief Wrapps connected QWebSockets clients in WebSocketTransport objects. + +This code is all that is required to connect incoming WebSockets to the WebChannel. Any kind +of remote JavaScript client that supports WebSockets can thus receive messages and access the +published objects. +*/ + +namespace U2 { + +/*! +Construct the client wrapper with the given parent. + +All clients connecting to the QWebSocketServer will be automatically wrapped +in WebSocketTransport objects. +*/ +WebSocketClientWrapper::WebSocketClientWrapper(QWebSocketServer *server, QObject *parent) +: QObject(parent) +, m_server(server) { + connect(server, &QWebSocketServer::newConnection, + this, &WebSocketClientWrapper::handleNewConnection); +} + +/*! +Wrap an incoming WebSocket connection in a WebSocketTransport object. +*/ +void WebSocketClientWrapper::handleNewConnection() { + emit clientConnected(new WebSocketTransport(m_server->nextPendingConnection())); +} + +} diff --git a/src/corelibs/U2Gui/src/util/webview/qtwebengine/webchannel/WebSocketClientWrapper.h b/src/corelibs/U2Gui/src/util/webview/qtwebengine/webchannel/WebSocketClientWrapper.h new file mode 100644 index 0000000000000000000000000000000000000000..78d2b99a2e74595d2c3d1ef3ea7090b997fc8393 --- /dev/null +++ b/src/corelibs/U2Gui/src/util/webview/qtwebengine/webchannel/WebSocketClientWrapper.h @@ -0,0 +1,82 @@ +/**************************************************************************** +** +** Copyright (C) 2016 KlarГ¤lvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Milian Wolff <milian.wolff@kdab.com> +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtWebChannel module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef _U2_WEBSOCKETTRANSPORTSERVER_H +#define _U2_WEBSOCKETTRANSPORTSERVER_H + +#include <QObject> + +#include <U2Core/global.h> + +class QWebSocketServer; + +namespace U2 { + +class WebSocketTransport; + +class U2GUI_EXPORT WebSocketClientWrapper : public QObject { + Q_OBJECT + +public: + WebSocketClientWrapper(QWebSocketServer *server, QObject *parent = 0); + +Q_SIGNALS: + void clientConnected(WebSocketTransport* client); + + private Q_SLOTS: + void handleNewConnection(); + +private: + QWebSocketServer *m_server; +}; + +} + +#endif // WEBSOCKETTRANSPORTSERVER_H diff --git a/src/corelibs/U2Gui/src/util/webview/qtwebengine/webchannel/WebSocketTransport.cpp b/src/corelibs/U2Gui/src/util/webview/qtwebengine/webchannel/WebSocketTransport.cpp new file mode 100644 index 0000000000000000000000000000000000000000..53d01340dd4c5a527c6648c8d9c8918c4bc56b7f --- /dev/null +++ b/src/corelibs/U2Gui/src/util/webview/qtwebengine/webchannel/WebSocketTransport.cpp @@ -0,0 +1,115 @@ +/**************************************************************************** +** +** Copyright (C) 2016 KlarГ¤lvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Milian Wolff <milian.wolff@kdab.com> +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtWebChannel module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "WebSocketTransport.h" + +#include <QJsonDocument> +#include <QJsonObject> +#include <QDebug> + +#include <QtWebSockets/QWebSocket> + +/*! +\brief QWebChannelAbstractSocket implementation that uses a QWebSocket internally. + +The transport delegates all messages received over the QWebSocket over its +textMessageReceived signal. Analogously, all calls to sendTextMessage will +be send over the QWebSocket to the remote client. +*/ + +namespace U2 { + +/*! +Construct the transport object and wrap the given socket. + +The socket is also set as the parent of the transport object. +*/ +WebSocketTransport::WebSocketTransport(QWebSocket *socket) +: QWebChannelAbstractTransport(socket) +, m_socket(socket) { + connect(socket, &QWebSocket::textMessageReceived, + this, &WebSocketTransport::textMessageReceived); + connect(socket, &QWebSocket::disconnected, + this, &WebSocketTransport::deleteLater); +} + +/*! +Destroys the WebSocketTransport. +*/ +WebSocketTransport::~WebSocketTransport() { + m_socket->deleteLater(); +} + +/*! +Serialize the JSON message and send it as a text message via the WebSocket to the client. +*/ +void WebSocketTransport::sendMessage(const QJsonObject &message) { + QJsonDocument doc(message); + m_socket->sendTextMessage(QString::fromUtf8(doc.toJson(QJsonDocument::Compact))); +} + +/*! +Deserialize the stringified JSON messageData and emit messageReceived. +*/ +void WebSocketTransport::textMessageReceived(const QString &messageData) { + QJsonParseError error; + QJsonDocument message = QJsonDocument::fromJson(messageData.toUtf8(), &error); + if (error.error) { + qWarning() << "Failed to parse text message as JSON object:" << messageData + << "Error is:" << error.errorString(); + return; + } else if (!message.isObject()) { + qWarning() << "Received JSON message that is not an object: " << messageData; + return; + } + emit messageReceived(message.object(), this); +} + +} diff --git a/src/corelibs/U2Gui/src/util/webview/qtwebengine/webchannel/WebSocketTransport.h b/src/corelibs/U2Gui/src/util/webview/qtwebengine/webchannel/WebSocketTransport.h new file mode 100644 index 0000000000000000000000000000000000000000..bc1ef257974993158ccf39010891c559592b7445 --- /dev/null +++ b/src/corelibs/U2Gui/src/util/webview/qtwebengine/webchannel/WebSocketTransport.h @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Milian Wolff <milian.wolff@kdab.com> +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtWebChannel module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef _U2_WEBSOCKETTRANSPORT_H +#define _U2_WEBSOCKETTRANSPORT_H + +#include <QtWebChannel/QWebChannelAbstractTransport> + +#include <U2Core/global.h> + +class QWebSocket; +namespace U2 { +class U2GUI_EXPORT WebSocketTransport : public QWebChannelAbstractTransport { + Q_OBJECT +public: + explicit WebSocketTransport(QWebSocket *socket); + virtual ~WebSocketTransport(); + + void sendMessage(const QJsonObject &message) Q_DECL_OVERRIDE; + + private Q_SLOTS: + void textMessageReceived(const QString &message); + +private: + QWebSocket *m_socket; +}; + +} + +#endif // WEBSOCKETTRANSPORT_H diff --git a/src/corelibs/U2Gui/src/util/webview/webkit/WebViewWebKitControllerPrivate.cpp b/src/corelibs/U2Gui/src/util/webview/webkit/WebViewWebKitControllerPrivate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c46f39dc2411d55dca5e7a70e91a7f076387ec8d --- /dev/null +++ b/src/corelibs/U2Gui/src/util/webview/webkit/WebViewWebKitControllerPrivate.cpp @@ -0,0 +1,63 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QWebFrame> + +#include "WebViewWebKitControllerPrivate.h" +#include "util/webview/JavaScriptAgent.h" + +namespace U2 { + +WebViewWebKitControllerPrivate::WebViewWebKitControllerPrivate(U2WebView *webView) + : WebViewControllerPrivate(webView) +{ + +} + +void WebViewWebKitControllerPrivate::loadPage(const QString &pageUrl) { + webView->load(pageUrl); +} + +void WebViewWebKitControllerPrivate::savePage(const QString &pageUrl) { + saveContent(pageUrl, webView->page()->mainFrame()->toHtml()); +} + +void WebViewWebKitControllerPrivate::registerJavaScriptAgent(JavaScriptAgent *agent) { + webView->page()->mainFrame()->addToJavaScriptWindowObject(agent->getId(), agent); +} + +void WebViewWebKitControllerPrivate::runJavaScript(const QString &script) { + webView->page()->mainFrame()->evaluateJavaScript(script); +} + +void WebViewWebKitControllerPrivate::runJavaScript(const QString &script, WebViewCallback callback) { + const QVariant result = webView->page()->mainFrame()->evaluateJavaScript(script); + callback(result); +} + +void WebViewWebKitControllerPrivate::init() { + webView->page()->setLinkDelegationPolicy(QWebPage::DelegateExternalLinks); + connect(webView->page(), SIGNAL(linkClicked(const QUrl &)), SLOT(sl_linkClicked(const QUrl &))); + runJavaScript("initializeWebkitPage();"); + webView->setContextMenuPolicy(Qt::NoContextMenu); +} + +} // namespace U2 diff --git a/src/corelibs/U2Designer/src/dashboard/StatisticsWidget.h b/src/corelibs/U2Gui/src/util/webview/webkit/WebViewWebKitControllerPrivate.h similarity index 54% rename from src/corelibs/U2Designer/src/dashboard/StatisticsWidget.h rename to src/corelibs/U2Gui/src/util/webview/webkit/WebViewWebKitControllerPrivate.h index e7559ffe8e08fe09fe742583a02d984cafd81084..aad2fad9770852bf3a2d36a7dea519063bad6232 100644 --- a/src/corelibs/U2Designer/src/dashboard/StatisticsWidget.h +++ b/src/corelibs/U2Gui/src/util/webview/webkit/WebViewWebKitControllerPrivate.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,34 +19,29 @@ * MA 02110-1301, USA. */ -#ifndef _U2_STATISTICSWIDGET_H_ -#define _U2_STATISTICSWIDGET_H_ +#ifndef _U2_WEB_VIEW_WEB_KIT_CONTROLLER_PRIVATE_H_ +#define _U2_WEB_VIEW_WEB_KIT_CONTROLLER_PRIVATE_H_ -#include "TableWidget.h" +#include "util/webview/WebViewControllerPrivate.h" namespace U2 { -using namespace Workflow::Monitor; - -class StatisticsWidget : public TableWidget { +class WebViewWebKitControllerPrivate : public WebViewControllerPrivate { Q_OBJECT public: - StatisticsWidget(const QWebElement &container, Dashboard *parent); - - virtual QList<int> widths(); - virtual QStringList header(); - virtual QList<QStringList> data(); + WebViewWebKitControllerPrivate(U2WebView *webView); - static const QString ID; + void loadPage(const QString &pageUrl); + void savePage(const QString &pageUrl); -private slots: - void sl_workerInfoChanged(const QString &actor, const U2::Workflow::Monitor::WorkerInfo &info); - void sl_update(); + void registerJavaScriptAgent(JavaScriptAgent *agent); + void runJavaScript(const QString &script); + void runJavaScript(const QString &script, WebViewCallback callback); private: - QStringList createRowByWorker(const QString &actor, const Monitor::WorkerInfo &info); + void init(); }; -} // U2 +} // namespace U2 -#endif // _U2_STATISTICSWIDGET_H_ +#endif // _U2_WEB_VIEW_WEB_KIT_CONTROLLER_PRIVATE_H_ diff --git a/src/corelibs/U2Gui/transl/russian.ts b/src/corelibs/U2Gui/transl/russian.ts index d95e9ea4e13d7d0871af74e7269ece875006269c..2a649bc870b8498355d903957875e7f29df5300a 100644 --- a/src/corelibs/U2Gui/transl/russian.ts +++ b/src/corelibs/U2Gui/transl/russian.ts @@ -225,115 +225,114 @@ <translation>Создание аннотации</translation> </message> <message> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="51"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="63"/> <source>Annotation type:</source> <translation>Тип аннотации:</translation> </message> <message> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="103"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="127"/> <source>Annotation name</source> <translation>Ð˜Ð¼Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ð¸</translation> </message> <message> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="110"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="137"/> <source>Use names of patterns as annotations names. In case the patterns are in FASTA format</source> <translation>ИÑпользовать имена паттернов в качеÑтве имен Ð´Ð»Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ð¹. Ð”Ð»Ñ ÑÐ»ÑƒÑ‡Ð°Ñ ÐµÑли паттерны заданы в формате FASTA</translation> </message> <message> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="113"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="140"/> <source>Use pattern names</source> <translation>ИÑпользовать имена паттернов</translation> </message> <message> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="120"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="150"/> <source>Group name</source> <translation>Ð˜Ð¼Ñ Ð³Ñ€ÑƒÐ¿Ð¿Ñ‹</translation> </message> <message> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="127"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="157"/> <source>Predefined group names</source> <translation>Стандартные имена групп</translation> </message> <message> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="130"/> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="309"/> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="393"/> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="421"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="160"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="351"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="491"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="565"/> <source>...</source> <translation>...</translation> </message> <message> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="144"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="174"/> <source>by type</source> <translation>по типу</translation> </message> <message> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="154"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="184"/> <source>Description</source> <translation>ОпиÑание</translation> </message> <message> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="161"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="191"/> <source>auto</source> <translation>авто</translation> </message> <message> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="176"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="206"/> <source>Location</source> <translation>ПозициÑ</translation> </message> <message> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="208"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="247"/> <source>Simple format</source> <translation>ПроÑтой формат</translation> </message> <message> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="234"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="273"/> <source>-</source> <translation>-</translation> </message> <message> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="246"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="285"/> <source>Complement</source> <translation>КомплементарнаÑ</translation> </message> <message> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="281"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="323"/> <source>GenBank/EMBL format</source> <translation>Формат GenBank/EMBL</translation> </message> <message> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="299"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="341"/> <source>Annotation location in GenBank format</source> <translation>МеÑтоположение аннотации (в формате GenBank)</translation> </message> <message> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="306"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="348"/> <source>Add/remove complement flag</source> <translation>Добавить/ÑнÑÑ‚ÑŒ флаг комплементарноÑти</translation> </message> <message> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="347"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="395"/> <source>Save annotation(s) to</source> <translation>Сохранить результат(Ñ‹) в</translation> </message> <message> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="359"/> <source>Choose a file to store the annotations</source> - <translation>Выбрать файл Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ð¹</translation> + <translation type="vanished">Выбрать файл Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ð¹</translation> </message> <message> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="380"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="436"/> <source>Existing document</source> <translation>СущеÑтвующий документ</translation> </message> <message> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="407"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="516"/> <source>New document</source> <translation>Ðовый документ</translation> </message> <message> - <location filename="../src/util/CreateAnnotationFullWidget.ui" line="414"/> + <location filename="../src/util/CreateAnnotationFullWidget.ui" line="596"/> <source>Use auto-annotations table</source> <translation>ИÑпользовать таблицу автоаннотаций</translation> </message> @@ -1038,27 +1037,27 @@ p, li { white-space: pre-wrap; } <translation>ЧиÑло неизвеÑтных Ñимволов (N - Ð´Ð»Ñ Ð½ÑƒÐºÐ»ÐµÐ¾Ñ‚Ð¸Ð´Ð½Ñ‹Ñ… или X - Ð´Ð»Ñ Ð°Ð¼Ð¸Ð½Ð¾) между чаÑÑ‚Ñми:</translation> </message> <message> - <location filename="../src/util/shared_db/ImportOptionsWidget.ui" line="193"/> + <location filename="../src/util/shared_db/ImportOptionsWidget.ui" line="192"/> <source>Import ACE files as</source> <translation>Импортировать ACE файлы как</translation> </message> <message> - <location filename="../src/util/shared_db/ImportOptionsWidget.ui" line="199"/> + <location filename="../src/util/shared_db/ImportOptionsWidget.ui" line="198"/> <source>Multiple sequence alignment</source> <translation>МножеÑтвенное выравнивание</translation> </message> <message> - <location filename="../src/util/shared_db/ImportOptionsWidget.ui" line="212"/> + <location filename="../src/util/shared_db/ImportOptionsWidget.ui" line="211"/> <source>Short reads assembly</source> <translation>Сборка коротких ридов</translation> </message> <message> - <location filename="../src/util/shared_db/ImportOptionsWidget.ui" line="228"/> + <location filename="../src/util/shared_db/ImportOptionsWidget.ui" line="227"/> <source>Documents and objects options</source> <translation>ÐаÑтройки документов и объектов</translation> </message> <message> - <location filename="../src/util/shared_db/ImportOptionsWidget.ui" line="234"/> + <location filename="../src/util/shared_db/ImportOptionsWidget.ui" line="233"/> <source>Create a subfolder for each document</source> <translation>Создать подпапку Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ документа</translation> </message> @@ -1225,29 +1224,24 @@ The items cannot be recovered once deleted.</source> <translation>Ðекоторые из выбранных объектов иÑпользуютÑÑ Ð´Ñ€ÑƒÐ³Ð¸Ð¼Ð¸ пользователÑми базы данных. Попробуйте удалить их позже.</translation> </message> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="54"/> <source>Files and folders</source> - <translation>Файлы и папки</translation> + <translation type="vanished">Файлы и папки</translation> </message> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="55"/> <source>Documents and objects</source> - <translation>Документы и объекты</translation> + <translation type="vanished">Документы и объекты</translation> </message> <message> - <location filename="../src/util/CreateAnnotationWidgetController.cpp" line="97"/> <source><auto></source> - <translation><авто></translation> + <translation type="vanished"><авто></translation> </message> <message> - <location filename="../src/util/imageExport/ImageExportTask.cpp" line="59"/> <source>Format %1 is not supported by %2.</source> - <translation>Формат %1 не поддерживаетÑÑ %2.</translation> + <translation type="vanished">Формат %1 не поддерживаетÑÑ %2.</translation> </message> <message> - <location filename="../src/util/imageExport/ImageExportTask.cpp" line="60"/> <source>Failed to export image to %1.</source> - <translation>Ðевозможно ÑкÑпортировать изображение %1.</translation> + <translation type="vanished">Ðевозможно ÑкÑпортировать изображение %1.</translation> </message> <message> <source>Author</source> @@ -1671,7 +1665,7 @@ To append data to existing file press 'Append'.</source> <context> <name>U2::AceImportWidget</name> <message> - <location filename="../src/util/ImportWidgets/AceImportWidget.cpp" line="60"/> + <location filename="../src/util/ImportWidgets/AceImportWidget.cpp" line="58"/> <source>Destination UGENEDB file</source> <translation>МеÑто Ð½Ð°Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ UGENEDB файла</translation> </message> @@ -1836,33 +1830,38 @@ To append data to existing file press 'Append'.</source> <context> <name>U2::CreateAnnotationWidgetController</name> <message> - <location filename="../src/util/CreateAnnotationWidgetController.cpp" line="240"/> + <location filename="../src/util/CreateAnnotationWidgetController.cpp" line="107"/> + <source><auto></source> + <translation type="unfinished"><авто></translation> + </message> + <message> + <location filename="../src/util/CreateAnnotationWidgetController.cpp" line="241"/> <source>Select annotation saving parameters</source> <translation>Выберите параметры ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ð¸</translation> </message> <message> - <location filename="../src/util/CreateAnnotationWidgetController.cpp" line="243"/> + <location filename="../src/util/CreateAnnotationWidgetController.cpp" line="244"/> <source>Document is already added to the project: '%1'</source> <translation>Документ уже ÑущеÑтвует: %1</translation> </message> <message> - <location filename="../src/util/CreateAnnotationWidgetController.cpp" line="248"/> + <location filename="../src/util/CreateAnnotationWidgetController.cpp" line="249"/> <source>Illegal folder: %1</source> <translation>Ðе найден путь: %1</translation> </message> <message> - <location filename="../src/util/CreateAnnotationWidgetController.cpp" line="253"/> + <location filename="../src/util/CreateAnnotationWidgetController.cpp" line="254"/> <source>Illegal annotation name! </source> <translation>Ðелегальные Ñимволы в имени аннотации. ДопуÑтимы только цифры, буквы и подчёркиваниÑ! </translation> </message> <message> - <location filename="../src/util/CreateAnnotationWidgetController.cpp" line="258"/> + <location filename="../src/util/CreateAnnotationWidgetController.cpp" line="259"/> <source>Illegal group name</source> <translation>Ðелегальные Ñимволы в имени группы</translation> </message> <message> - <location filename="../src/util/CreateAnnotationWidgetController.cpp" line="263"/> - <location filename="../src/util/CreateAnnotationWidgetController.cpp" line="268"/> + <location filename="../src/util/CreateAnnotationWidgetController.cpp" line="264"/> + <location filename="../src/util/CreateAnnotationWidgetController.cpp" line="269"/> <source>Invalid location! Location must be in GenBank format. Simple examples: 1..10 @@ -1875,7 +1874,7 @@ join(1..10,15..45) complement(5..15)</translation> </message> <message> - <location filename="../src/util/CreateAnnotationWidgetController.cpp" line="353"/> + <location filename="../src/util/CreateAnnotationWidgetController.cpp" line="354"/> <source>Save File</source> <translation>Сохранить файл</translation> </message> @@ -2285,37 +2284,37 @@ Are you sure you want to open all of them?</source> <context> <name>U2::ExportImageDialog</name> <message> - <location filename="../src/util/ExportImageDialog.cpp" line="71"/> + <location filename="../src/util/ExportImageDialog.cpp" line="72"/> <source>Image export task factory is NULL</source> <translation>Image export task factory is NULL</translation> </message> <message> - <location filename="../src/util/ExportImageDialog.cpp" line="98"/> + <location filename="../src/util/ExportImageDialog.cpp" line="99"/> <source>The image file path is empty.</source> <translation>Путь до Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð¿ÑƒÑÑ‚.</translation> </message> <message> - <location filename="../src/util/ExportImageDialog.cpp" line="103"/> + <location filename="../src/util/ExportImageDialog.cpp" line="106"/> <source>The image file cannot be created. No write permissions.</source> <translation>Файл не может быть Ñоздан. ÐедоÑтаточно прав.</translation> </message> <message> - <location filename="../src/util/ExportImageDialog.cpp" line="111"/> + <location filename="../src/util/ExportImageDialog.cpp" line="114"/> <source>Saving image to '%1'...</source> <translation>Сохранение Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð² '%1'...</translation> </message> <message> - <location filename="../src/util/ExportImageDialog.cpp" line="149"/> + <location filename="../src/util/ExportImageDialog.cpp" line="152"/> <source>Cancel</source> <translation>Отмена</translation> </message> <message> - <location filename="../src/util/ExportImageDialog.cpp" line="229"/> + <location filename="../src/util/ExportImageDialog.cpp" line="234"/> <source>Save Image As</source> <translation>Сохранить изображение как</translation> </message> <message> - <location filename="../src/util/ExportImageDialog.cpp" line="148"/> + <location filename="../src/util/ExportImageDialog.cpp" line="151"/> <source>Export</source> <translation>ÐкÑпорт</translation> </message> @@ -2331,8 +2330,8 @@ Are you sure you want to open all of them?</source> <context> <name>U2::FileLineEdit</name> <message> - <location filename="../src/util/DialogUtils.cpp" line="89"/> - <location filename="../src/util/DialogUtils.cpp" line="95"/> + <location filename="../src/util/DialogUtils.cpp" line="90"/> + <location filename="../src/util/DialogUtils.cpp" line="96"/> <source>Select file(s)</source> <translation>Выберите файл(Ñ‹)</translation> </message> @@ -2428,17 +2427,17 @@ Are you sure you want to open all of them?</source> <context> <name>U2::ImageExportController</name> <message> - <location filename="../src/util/imageExport/ImageExportTask.cpp" line="76"/> + <location filename="../src/util/imageExport/ImageExportTask.cpp" line="79"/> <source>SVG format is not supported</source> <translation>SVG format is not supported</translation> </message> <message> - <location filename="../src/util/imageExport/ImageExportTask.cpp" line="80"/> + <location filename="../src/util/imageExport/ImageExportTask.cpp" line="83"/> <source>PS/PDF format is not supported</source> <translation>PS/PDF format is not supported</translation> </message> <message> - <location filename="../src/util/imageExport/ImageExportTask.cpp" line="83"/> + <location filename="../src/util/imageExport/ImageExportTask.cpp" line="86"/> <source>Raster formats are disabled</source> <translation>Raster formats are disabled</translation> </message> @@ -2446,12 +2445,22 @@ Are you sure you want to open all of them?</source> <context> <name>U2::ImageExportTask</name> <message> - <location filename="../src/util/imageExport/ImageExportTask.cpp" line="63"/> + <location filename="../src/util/imageExport/ImageExportTask.cpp" line="61"/> + <source>Format %1 is not supported by %2.</source> + <translation type="unfinished">Формат %1 не поддерживаетÑÑ %2.</translation> + </message> + <message> + <location filename="../src/util/imageExport/ImageExportTask.cpp" line="62"/> + <source>Failed to export image to %1.</source> + <translation type="unfinished">Ðевозможно ÑкÑпортировать изображение %1.</translation> + </message> + <message> + <location filename="../src/util/imageExport/ImageExportTask.cpp" line="66"/> <source>Done!</source> <translation>Готово!</translation> </message> <message> - <location filename="../src/util/imageExport/ImageExportTask.h" line="62"/> + <location filename="../src/util/imageExport/ImageExportTask.cpp" line="60"/> <source>Image export task</source> <translation>Задача ÑкÑпорта изображениÑ</translation> </message> @@ -2467,32 +2476,42 @@ Are you sure you want to open all of them?</source> <context> <name>U2::ImportToDatabaseDialog</name> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="98"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="62"/> + <source>Files and folders</source> + <translation type="unfinished">Файлы и папки</translation> + </message> + <message> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="63"/> + <source>Documents and objects</source> + <translation type="unfinished">Документы и объекты</translation> + </message> + <message> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="99"/> <source>Override options</source> <translation>ÐаÑтройки замещениÑ</translation> </message> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="102"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="103"/> <source>Reset to general options</source> <translation>Ð¡Ð±Ñ€Ð¾Ñ Ð½Ð° общие наÑтройки</translation> </message> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="205"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="206"/> <source>Import</source> <translation>Импорт</translation> </message> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="291"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="292"/> <source>Select files to import</source> <translation>Выберите файлы Ð´Ð»Ñ Ð¸Ð¼Ð¿Ð¾Ñ€Ñ‚Ð°</translation> </message> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="314"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="315"/> <source>Select a folder to import</source> <translation>Выберите папку Ð´Ð»Ñ Ð¸Ð¼Ð¿Ð¾Ñ€Ñ‚Ð°</translation> </message> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="549"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="550"/> <source>This file will be imported with its own options. </source> @@ -2501,59 +2520,59 @@ Are you sure you want to open all of them?</source> </translation> </message> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="552"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="553"/> <source>File: </source> <translation>Файл: </translation> </message> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="555"/> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="594"/> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="640"/> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="657"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="556"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="595"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="641"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="658"/> <source>Import to: </source> <translation>Импортировать в: </translation> </message> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="559"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="560"/> <source>A folder for file objects will be created</source> <translation>Будет Ñоздана папка Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ñ‹Ñ… объектов</translation> </message> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="563"/> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="607"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="564"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="608"/> <source>If file is not recognized, it will be imported as binary data</source> <translation>ЕÑли файл не будет раÑпознан, он будет импортирован в виде бинарных данных</translation> </message> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="568"/> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="612"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="569"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="613"/> <source>If file contains more than one sequence, they will imported as separate objects</source> <translation>ЕÑли файл Ñодержит больше чем одну поÑледовательноÑÑ‚ÑŒ, то они будут импортированы как отдельные объекты</translation> </message> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="571"/> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="615"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="572"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="616"/> <source>If file contains more than one sequence, they will imported as single sequence with several 'Unknown' bases as separator</source> <translation>ЕÑли файл Ñодержит больше чем одну поÑледовательноÑÑ‚ÑŒ они будут импортированы в одну поÑледовательноÑÑ‚ÑŒ Ñ Ð½ÐµÑколькими 'Unknown' Ñимволами в качеÑтве разделителей</translation> </message> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="572"/> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="616"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="573"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="617"/> <source>Size of separator: %1</source> <translation>Размер разделителÑ: %1</translation> </message> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="575"/> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="619"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="576"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="620"/> <source>If file contains more than one sequence, they will be joined into the multiple alignment</source> <translation>ЕÑли файл Ñодержит больше чем одну поÑледовательноÑÑ‚ÑŒ они будут Ñоединены в выравнивание</translation> </message> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="588"/> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="632"/> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="651"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="589"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="633"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="652"/> <source>This folder will be imported with its own options. </source> @@ -2562,34 +2581,34 @@ Are you sure you want to open all of them?</source> </translation> </message> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="591"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="592"/> <source>Folder: </source> <translation>Папка: </translation> </message> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="599"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="600"/> <source>The folder will be processed recursively</source> <translation>Ðта папка будет будет обработана рекурÑивно</translation> </message> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="603"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="604"/> <source>A folder for each file will be created</source> <translation>Будет Ñоздана папка Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ файла</translation> </message> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="635"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="636"/> <source>The </source> <translation></translation> </message> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="635"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="636"/> <source> from document </source> <translation> из документа </translation> </message> <message> - <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="654"/> + <location filename="../src/util/shared_db/ImportToDatabaseDialog.cpp" line="655"/> <source>Document: </source> <translation>Документ: @@ -3124,6 +3143,29 @@ Are you sure you want to open all of them?</source> <translation>'Exclude' region contains 'Search In' region. Search region is empty.</translation> </message> </context> +<context> + <name>U2::ReloadDocumentsTask</name> + <message> + <location filename="../src/ReloadDocumentsTask.cpp" line="36"/> + <source>Reload documents task</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/ReloadDocumentsTask.cpp" line="46"/> + <source>Document '%1' can't be unloaded. '%2'</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/ReloadDocumentsTask.cpp" line="65"/> + <source>Document(s) reloading failed.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/ReloadDocumentsTask.cpp" line="72"/> + <source>The following errors occurred during the document(s) reloading: <ul></source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>U2::RemovePartFromSequenceDialogController</name> <message> @@ -3380,42 +3422,42 @@ check connection settings</translation> <context> <name>U2::ToolsMenu</name> <message> - <location filename="../src/ToolsMenu.cpp" line="109"/> + <location filename="../src/ToolsMenu.cpp" line="108"/> <source>Sanger data analysis</source> <translation>Ðнализ данных ÑÐµÐºÐ²ÐµÐ½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¿Ð¾ СÑнгеру</translation> </message> <message> - <location filename="../src/ToolsMenu.cpp" line="119"/> + <location filename="../src/ToolsMenu.cpp" line="118"/> <source>NGS data analysis</source> <translation>Ðнализ данных NGS</translation> </message> <message> - <location filename="../src/ToolsMenu.cpp" line="149"/> + <location filename="../src/ToolsMenu.cpp" line="148"/> <source>BLAST</source> <translation>BLAST</translation> </message> <message> - <location filename="../src/ToolsMenu.cpp" line="163"/> + <location filename="../src/ToolsMenu.cpp" line="162"/> <source>Multiple sequence alignment</source> <translation>МножеÑтвенное выравнивание</translation> </message> <message> - <location filename="../src/ToolsMenu.cpp" line="175"/> + <location filename="../src/ToolsMenu.cpp" line="174"/> <source>Cloning</source> <translation>Клонирование</translation> </message> <message> - <location filename="../src/ToolsMenu.cpp" line="183"/> + <location filename="../src/ToolsMenu.cpp" line="182"/> <source>Primer</source> <translation>Олигонуклеотиды</translation> </message> <message> - <location filename="../src/ToolsMenu.cpp" line="189"/> + <location filename="../src/ToolsMenu.cpp" line="188"/> <source>Search for TFBS</source> <translation>ПоиÑк Ñайтов ÑвÑÐ·Ñ‹Ð²Ð°Ð½Ð¸Ñ Ñ‚Ñ€Ð°Ð½Ñкрипционных факторов (TFBS)</translation> </message> <message> - <location filename="../src/ToolsMenu.cpp" line="198"/> + <location filename="../src/ToolsMenu.cpp" line="197"/> <source>HMMER tools</source> <translation>ИнÑтрументы HMMER</translation> </message> @@ -3423,68 +3465,78 @@ check connection settings</translation> <context> <name>U2::UnloadDocumentTask</name> <message> - <location filename="../src/UnloadDocumentTask.cpp" line="50"/> + <location filename="../src/UnloadDocumentTask.cpp" line="53"/> <source>Unload document task: %1</source> <translation>Выгрузка документа: %1</translation> </message> <message> - <location filename="../src/UnloadDocumentTask.cpp" line="76"/> + <location filename="../src/UnloadDocumentTask.cpp" line="79"/> <source>Document '%1' can't be unloaded: </source> <translation>Документ '%1' не может быть выгружен: </translation> </message> <message> - <location filename="../src/UnloadDocumentTask.cpp" line="79"/> + <location filename="../src/UnloadDocumentTask.cpp" line="82"/> <source>save failed!</source> <translation>Ошибка ÑохранениÑ!</translation> </message> <message> - <location filename="../src/UnloadDocumentTask.cpp" line="91"/> + <location filename="../src/UnloadDocumentTask.cpp" line="94"/> <source>unexpected error</source> <translation>неизвеÑÑ‚Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°</translation> </message> <message> - <location filename="../src/UnloadDocumentTask.cpp" line="112"/> - <location filename="../src/UnloadDocumentTask.cpp" line="135"/> + <location filename="../src/UnloadDocumentTask.cpp" line="115"/> + <location filename="../src/UnloadDocumentTask.cpp" line="138"/> <source>Question?</source> <translation>ВопроÑ?</translation> </message> <message> - <location filename="../src/UnloadDocumentTask.cpp" line="112"/> + <location filename="../src/UnloadDocumentTask.cpp" line="115"/> <source>Close views for document: %1</source> <translation>Закрыть показ Ð´Ð»Ñ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð°: %1</translation> </message> <message> - <location filename="../src/UnloadDocumentTask.cpp" line="135"/> + <location filename="../src/UnloadDocumentTask.cpp" line="138"/> <source>Save document: %1</source> <translation>Сохранить документ:%1</translation> </message> <message> - <location filename="../src/UnloadDocumentTask.cpp" line="154"/> + <location filename="../src/UnloadDocumentTask.cpp" line="157"/> <source>Failed to unload document</source> <translation>Ðе удалоÑÑŒ выгрузить документ</translation> </message> <message> - <location filename="../src/UnloadDocumentTask.cpp" line="158"/> + <location filename="../src/UnloadDocumentTask.cpp" line="161"/> <source>Failed to unload document: %1, error: %2</source> <translation>Ðевозможно выгрузить документ: %1, ошибка: %2</translation> </message> <message> - <location filename="../src/UnloadDocumentTask.cpp" line="109"/> - <location filename="../src/UnloadDocumentTask.cpp" line="171"/> + <location filename="../src/UnloadDocumentTask.cpp" line="183"/> + <source>The document is locked by some algorithm.</source> + <translation type="unfinished"></translation> + </message> + <message> <source>There is an active view with document content</source> - <translation>Документ иÑпользуетÑÑ Ð² открытых окнах</translation> + <translation type="vanished">Документ иÑпользуетÑÑ Ð² открытых окнах</translation> </message> <message> - <location filename="../src/UnloadDocumentTask.cpp" line="180"/> <source>Document is locked by some algorithm and cannot be unloaded</source> - <translation>Документ был заблокирован одним из алгоритмов и не может быть выгружен</translation> + <translation type="vanished">Документ был заблокирован одним из алгоритмов и не может быть выгружен</translation> </message> <message> - <location filename="../src/UnloadDocumentTask.cpp" line="160"/> + <location filename="../src/UnloadDocumentTask.cpp" line="163"/> <source>Warning</source> <translation>Предупреждение</translation> </message> </context> +<context> + <name>U2::WebViewControllerPrivate</name> + <message> + <location filename="../src/util/webview/WebViewControllerPrivate.cpp" line="42"/> + <source>Can not open a file for writing: </source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>U2::WidgetScreenshotExportToSvgTask</name> <message> @@ -3507,4 +3559,12 @@ check connection settings</translation> <translation>Скриншот</translation> </message> </context> +<context> + <name>UnloadDocumentTask</name> + <message> + <location filename="../src/UnloadDocumentTask.cpp" line="50"/> + <source>There is an active view with the document content.</source> + <translation type="unfinished"></translation> + </message> +</context> </TS> diff --git a/src/corelibs/U2Lang/U2Lang.pri b/src/corelibs/U2Lang/U2Lang.pri index 0d21fc481135869221b601a9d8ef6cb5004510b8..8a5c8724159882046ebcf6d809d49a17dbf4151e 100644 --- a/src/corelibs/U2Lang/U2Lang.pri +++ b/src/corelibs/U2Lang/U2Lang.pri @@ -2,27 +2,15 @@ MODULE_ID=U2Lang include( ../../ugene_lib_common.pri ) -UGENE_RELATIVE_DESTDIR = '' QT += xml widgets DEFINES+= QT_FATAL_ASSERT BUILDING_U2LANG_DLL -LIBS += -L../../_release -lU2Core - -!debug_and_release|build_pass { - - CONFIG(debug, debug|release) { - DESTDIR=../../_debug - LIBS += -L../../_debug -lU2Cored - LIBS -= -L../../_release -lU2Core - } - - CONFIG(release, debug|release) { - DESTDIR=../../_release - } -} +LIBS += -L../../$$out_dir() +LIBS += -lU2Core$$D +DESTDIR = ../../$$out_dir() unix { - target.path = $$UGENE_INSTALL_DIR/$$UGENE_RELATIVE_DESTDIR + target.path = $$UGENE_INSTALL_DIR/ INSTALLS += target } diff --git a/src/corelibs/U2Lang/src/library/BaseActorCategories.cpp b/src/corelibs/U2Lang/src/library/BaseActorCategories.cpp index 91918480b296e95281d22ac78540a7e6855a15ac..b1e1b42bcbec29c6a6d82956e2ac251e4464c00f 100644 --- a/src/corelibs/U2Lang/src/library/BaseActorCategories.cpp +++ b/src/corelibs/U2Lang/src/library/BaseActorCategories.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -80,7 +80,7 @@ const Descriptor BaseActorCategories::CATEGORY_SCRIPT() { } const Descriptor BaseActorCategories::CATEGORY_EXTERNAL() { - return Descriptor("ex", tr("Custom Elements with CMD Tools"),""); + return Descriptor("ex", tr("Custom Elements with External Tools"),""); } const Descriptor BaseActorCategories::CATEGORY_DATAFLOW() { diff --git a/src/corelibs/U2Lang/src/library/BaseActorCategories.h b/src/corelibs/U2Lang/src/library/BaseActorCategories.h index 1ec525efd63710decd8ccff3981601a608547a6f..4cbb94309e3f32d73f99536bb64d45e5f1a56017 100644 --- a/src/corelibs/U2Lang/src/library/BaseActorCategories.h +++ b/src/corelibs/U2Lang/src/library/BaseActorCategories.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/BaseAttributes.cpp b/src/corelibs/U2Lang/src/library/BaseAttributes.cpp index 374845c89afe5f65ee90e5cbd6f74fc4700feace..d35dda4ddfe383c89563c75b9f585ea387d65f68 100644 --- a/src/corelibs/U2Lang/src/library/BaseAttributes.cpp +++ b/src/corelibs/U2Lang/src/library/BaseAttributes.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/BaseAttributes.h b/src/corelibs/U2Lang/src/library/BaseAttributes.h index 2e1d14fd3b5ac7adc72c42c2c15b927cdcc0d028..084ec8ca3198e2607c9d916debc89c196779789b 100644 --- a/src/corelibs/U2Lang/src/library/BaseAttributes.h +++ b/src/corelibs/U2Lang/src/library/BaseAttributes.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/BaseDatasetWorker.cpp b/src/corelibs/U2Lang/src/library/BaseDatasetWorker.cpp index f19518ea1855235b16fd4fb54e8309d3dded6d86..76670061ea3847476648930daa3cd1a876f5e0b6 100644 --- a/src/corelibs/U2Lang/src/library/BaseDatasetWorker.cpp +++ b/src/corelibs/U2Lang/src/library/BaseDatasetWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/BaseDatasetWorker.h b/src/corelibs/U2Lang/src/library/BaseDatasetWorker.h index f449fe223ab64686a046ffd8f6f92f0deec3dee9..54f3da63369210d6d2c348657e6e5d7e1b78d955 100644 --- a/src/corelibs/U2Lang/src/library/BaseDatasetWorker.h +++ b/src/corelibs/U2Lang/src/library/BaseDatasetWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -37,9 +37,9 @@ public: protected: // BaseOneOneWorker - Task * processNextInputMessage(); - Task * onInputEnded(); - QList<Message> fetchResult(Task *task, U2OpStatus &os); + Task * processNextInputMessage() override; + Task * onInputEnded() override; + QList<Message> fetchResult(Task *task, U2OpStatus &os) override; virtual Task * createTask(const QList<Message> &messages) const = 0; virtual QVariantMap getResult(Task *task, U2OpStatus &os) const = 0; diff --git a/src/corelibs/U2Lang/src/library/BaseOneOneWorker.cpp b/src/corelibs/U2Lang/src/library/BaseOneOneWorker.cpp index 6d4eda2be4e11042137fbe5f740baed1d9184488..f005cd465514c3fbca01d81e6f5cae4af7a5ca3f 100644 --- a/src/corelibs/U2Lang/src/library/BaseOneOneWorker.cpp +++ b/src/corelibs/U2Lang/src/library/BaseOneOneWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -95,7 +95,13 @@ void BaseOneOneWorker::sl_taskFinished() { void BaseOneOneWorker::sl_prepared() { Task *task = dynamic_cast<Task*>(sender()); CHECK(NULL != task, ); - CHECK(task->isFinished() && !task->isCanceled() && !task->hasError(), ); + CHECK(task->isFinished(), ); + if (task->isCanceled() || task->hasError()) { + output->setEnded(); + setDone(); + return; + } + U2OpStatusImpl os; onPrepared(task, os); if (os.hasError()) { diff --git a/src/corelibs/U2Lang/src/library/BaseOneOneWorker.h b/src/corelibs/U2Lang/src/library/BaseOneOneWorker.h index 21c18ea4f3b1c0137278786be692f4d2ecc68b40..722ce38589e6a9c0c25c701e56379e2527338c31 100644 --- a/src/corelibs/U2Lang/src/library/BaseOneOneWorker.h +++ b/src/corelibs/U2Lang/src/library/BaseOneOneWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/BasePorts.cpp b/src/corelibs/U2Lang/src/library/BasePorts.cpp index 80e2c69937be7f6c31639bb7fe40fafb38930623..c2a1b29b59a8bc4c41dca8f9dbc43a95a7016af3 100644 --- a/src/corelibs/U2Lang/src/library/BasePorts.cpp +++ b/src/corelibs/U2Lang/src/library/BasePorts.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/BasePorts.h b/src/corelibs/U2Lang/src/library/BasePorts.h index 1bd400936d004eb014542d26f7c74fa2174fe5b5..29f633d4fdbc0c417d4a0e9ee324543ea9fe322d 100644 --- a/src/corelibs/U2Lang/src/library/BasePorts.h +++ b/src/corelibs/U2Lang/src/library/BasePorts.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/BaseSlots.cpp b/src/corelibs/U2Lang/src/library/BaseSlots.cpp index 00ec5e0ca41f70fbf0335b0c8bd92505b37a6b4a..7029b6bbfc23916a56b11aa6fd1a90427623588b 100644 --- a/src/corelibs/U2Lang/src/library/BaseSlots.cpp +++ b/src/corelibs/U2Lang/src/library/BaseSlots.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/BaseSlots.h b/src/corelibs/U2Lang/src/library/BaseSlots.h index c00f128b1e0860da4f7990c3cdc64000a79c6bec..3cd3222161aadc5299627909829fd1cf65226113 100644 --- a/src/corelibs/U2Lang/src/library/BaseSlots.h +++ b/src/corelibs/U2Lang/src/library/BaseSlots.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/BaseThroughWorker.cpp b/src/corelibs/U2Lang/src/library/BaseThroughWorker.cpp index c3d07413c118199995f4a7275352c33aef237055..94bcf33d1d5dcd2dbad4dac9622b835b7bec1ebb 100644 --- a/src/corelibs/U2Lang/src/library/BaseThroughWorker.cpp +++ b/src/corelibs/U2Lang/src/library/BaseThroughWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/BaseThroughWorker.h b/src/corelibs/U2Lang/src/library/BaseThroughWorker.h index 91e47f9f4c129159f0468c51f64b6666204f1154..53b10b48188063d9a6c97a50193596af3b5624ce 100644 --- a/src/corelibs/U2Lang/src/library/BaseThroughWorker.h +++ b/src/corelibs/U2Lang/src/library/BaseThroughWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/BaseTypes.cpp b/src/corelibs/U2Lang/src/library/BaseTypes.cpp index 9f162943e5ce5d2e28682740b7e07e9a0eff7d56..08f195f9cacb2b60a4baf67ed2a0c45c462c8097 100644 --- a/src/corelibs/U2Lang/src/library/BaseTypes.cpp +++ b/src/corelibs/U2Lang/src/library/BaseTypes.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/BaseTypes.h b/src/corelibs/U2Lang/src/library/BaseTypes.h index 5387e994021ed5392648eaffa6d312940e138edf..0f336061f0fd859bd31c59072000ceeff7b5b147 100644 --- a/src/corelibs/U2Lang/src/library/BaseTypes.h +++ b/src/corelibs/U2Lang/src/library/BaseTypes.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/LastReadyScheduler.cpp b/src/corelibs/U2Lang/src/library/LastReadyScheduler.cpp index d8a540ccb1ffd19afbb8914ea397a5f68f83a9a5..28c869f89e683bd2a57a5a8997b73cb2999b864a 100644 --- a/src/corelibs/U2Lang/src/library/LastReadyScheduler.cpp +++ b/src/corelibs/U2Lang/src/library/LastReadyScheduler.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/LastReadyScheduler.h b/src/corelibs/U2Lang/src/library/LastReadyScheduler.h index 1f53fcea9321883ac2ea1770d3a87fa59f5f035f..3e2f8ccc505f7cb894c4eb7d26e1a7dacd06503a 100644 --- a/src/corelibs/U2Lang/src/library/LastReadyScheduler.h +++ b/src/corelibs/U2Lang/src/library/LastReadyScheduler.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/LocalDomain.cpp b/src/corelibs/U2Lang/src/library/LocalDomain.cpp index 887793a8531d090a47267987513cb6a4b1d6888b..f64ba9090ab0040a9977959c5ffc31442e9b3f1d 100644 --- a/src/corelibs/U2Lang/src/library/LocalDomain.cpp +++ b/src/corelibs/U2Lang/src/library/LocalDomain.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -226,8 +226,8 @@ void BaseWorker::restoreActualChannelsState() { } } -QList<ExternalToolListener*> BaseWorker::createLogListeners(int listenersNumber) { - return context->getMonitor()->createWorkflowListeners(actor->getLabel(), listenersNumber); +QList<ExternalToolListener*> BaseWorker::createLogListeners(int listenersNumber) const { + return context->getMonitor()->createWorkflowListeners(actor->getId(), actor->getLabel(), listenersNumber); } void BaseWorker::addMessagesFromBackupToAppropriratePort(CommunicationChannel *channel) { diff --git a/src/corelibs/U2Lang/src/library/LocalDomain.h b/src/corelibs/U2Lang/src/library/LocalDomain.h index afb5aaab81cec643b42e81046d44c55490a72501..161339b453817469542eee666983c4b0c9dec684 100644 --- a/src/corelibs/U2Lang/src/library/LocalDomain.h +++ b/src/corelibs/U2Lang/src/library/LocalDomain.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -82,7 +82,7 @@ public: // in case of the schema's pause Task *tick(bool &canResultBeCanceled); - QList<ExternalToolListener*> createLogListeners(int listenersNumber = 1); + QList<ExternalToolListener*> createLogListeners(int listenersNumber = 1) const; private: // bind values from input ports to script vars. // This function is called before 'get' data from channel -> to set up parameters for scripting diff --git a/src/corelibs/U2Lang/src/library/script/ActorContext.cpp b/src/corelibs/U2Lang/src/library/script/ActorContext.cpp index e9dc77114546dd3ef37dd46fac089f825cfe46f4..f989614d2af827280dda957fe8e713c8b92dfad6 100644 --- a/src/corelibs/U2Lang/src/library/script/ActorContext.cpp +++ b/src/corelibs/U2Lang/src/library/script/ActorContext.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/script/ActorContext.h b/src/corelibs/U2Lang/src/library/script/ActorContext.h index 8ea6c454e59985c7ca8d6a25146b24d4e79934b8..ad1df3512c90aebfc8ee698d7534100fab205810 100644 --- a/src/corelibs/U2Lang/src/library/script/ActorContext.h +++ b/src/corelibs/U2Lang/src/library/script/ActorContext.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/script/DbiClassPrototype.cpp b/src/corelibs/U2Lang/src/library/script/DbiClassPrototype.cpp index 5f4ec9dd427730fafd5b8262e61dc8995c1219ee..07921aec63a96aca69fe0f0f2786409213a33ec8 100644 --- a/src/corelibs/U2Lang/src/library/script/DbiClassPrototype.cpp +++ b/src/corelibs/U2Lang/src/library/script/DbiClassPrototype.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/script/DbiClassPrototype.h b/src/corelibs/U2Lang/src/library/script/DbiClassPrototype.h index afcc06f98b4d26add098b9d50892a0c2dde98fbe..d1d886695e2a2169fefb98e3aff557ec3f964fee 100644 --- a/src/corelibs/U2Lang/src/library/script/DbiClassPrototype.h +++ b/src/corelibs/U2Lang/src/library/script/DbiClassPrototype.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/script/ScriptEngineUtils.cpp b/src/corelibs/U2Lang/src/library/script/ScriptEngineUtils.cpp index 61051004934bb8cf9bf7159281616526a57baa5d..906db4f6691b48d678abb28e8dcf0ef37a795115 100644 --- a/src/corelibs/U2Lang/src/library/script/ScriptEngineUtils.cpp +++ b/src/corelibs/U2Lang/src/library/script/ScriptEngineUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/script/ScriptEngineUtils.h b/src/corelibs/U2Lang/src/library/script/ScriptEngineUtils.h index 9f7402b0e32d1353746fcb8b5ae6878ebea431f2..b15593c86b585199541b77d7b8ef47b8980b1488 100644 --- a/src/corelibs/U2Lang/src/library/script/ScriptEngineUtils.h +++ b/src/corelibs/U2Lang/src/library/script/ScriptEngineUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/script/ScriptLibrary.cpp b/src/corelibs/U2Lang/src/library/script/ScriptLibrary.cpp index 9e5c4b0219efebeaeed49de9ee3fe934e3446158..dfa3dd9e1ecf65b74d1ef21e59540f8d9b147f37 100644 --- a/src/corelibs/U2Lang/src/library/script/ScriptLibrary.cpp +++ b/src/corelibs/U2Lang/src/library/script/ScriptLibrary.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/script/ScriptLibrary.h b/src/corelibs/U2Lang/src/library/script/ScriptLibrary.h index f83ebbfb5aa86274ed5e8012796fe82a2b189748..084db5a0fcd068d23130b3a78bca0827dbe81bce 100644 --- a/src/corelibs/U2Lang/src/library/script/ScriptLibrary.h +++ b/src/corelibs/U2Lang/src/library/script/ScriptLibrary.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/script/SequencePrototype.cpp b/src/corelibs/U2Lang/src/library/script/SequencePrototype.cpp index a7232abd5b835434d50225f3de58e3fbaa1d4c35..66527e19df113d335737f9abbaf3f24ce249d3f5 100644 --- a/src/corelibs/U2Lang/src/library/script/SequencePrototype.cpp +++ b/src/corelibs/U2Lang/src/library/script/SequencePrototype.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/library/script/SequencePrototype.h b/src/corelibs/U2Lang/src/library/script/SequencePrototype.h index 5c20a4c50a90457c8c4cd49c93747d5b6d32ff21..e3545e564caefeb2085bf43261e2a09f9800f325 100644 --- a/src/corelibs/U2Lang/src/library/script/SequencePrototype.h +++ b/src/corelibs/U2Lang/src/library/script/SequencePrototype.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/ActorPrototypeRegistry.cpp b/src/corelibs/U2Lang/src/model/ActorPrototypeRegistry.cpp index 60180f07fee342d42faaab119c47e10825a8af5c..383b3ec3cf211a4394c472ddf0051a7c91db5ef2 100644 --- a/src/corelibs/U2Lang/src/model/ActorPrototypeRegistry.cpp +++ b/src/corelibs/U2Lang/src/model/ActorPrototypeRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -20,16 +20,26 @@ */ #include <U2Lang/ActorPrototypeRegistry.h> +#include <U2Lang/WorkflowUtils.h> namespace U2 { namespace Workflow { -void ActorPrototypeRegistry::registerProto(const Descriptor& group, ActorPrototype* proto) { +bool ActorPrototypeRegistry::registerProto(const Descriptor& group, ActorPrototype* proto) { // debug check for proto name - QString id = proto->getId(); Q_UNUSED(id); - assert(!id.contains(".")); + const QString id = proto->getId(); + assert(WorkflowEntityValidator::ACCEPTABLE_ID.match(id).isValid()); + ActorPrototype *existingProto = getProto(id); + if (nullptr != existingProto) { + coreLog.error(tr("Can't register element config with ID '%1'%2. There is already registered element with this ID%3.") + .arg(id) + .arg(proto->getFilePath().isEmpty() ? QString() : " (" + proto->getFilePath() + ")") + .arg(existingProto->getFilePath().isEmpty() ? QString() : " (" + existingProto->getFilePath() + ")")); + return false; + } groups[group].append(proto); emit si_registryModified(); + return true; } ActorPrototype * ActorPrototypeRegistry::unregisterProto(const QString &id) { diff --git a/src/corelibs/U2Lang/src/model/ActorPrototypeRegistry.h b/src/corelibs/U2Lang/src/model/ActorPrototypeRegistry.h index e8b2907bcdb536f1e4ad92865e1f1393d26ff6f7..b61533fe32aec630a9218c2bc91a3bd2821757b1 100644 --- a/src/corelibs/U2Lang/src/model/ActorPrototypeRegistry.h +++ b/src/corelibs/U2Lang/src/model/ActorPrototypeRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -39,7 +39,7 @@ public: virtual ~ActorPrototypeRegistry(); // standard registry - void registerProto(const Descriptor& group, ActorPrototype* proto); + bool registerProto(const Descriptor& group, ActorPrototype* proto); ActorPrototype* unregisterProto(const QString& id); const QMap<Descriptor, QList<ActorPrototype*> >& getProtos() const {return groups;} ActorPrototype* getProto(const QString& id) const; diff --git a/src/corelibs/U2Lang/src/model/Aliasing.cpp b/src/corelibs/U2Lang/src/model/Aliasing.cpp index 09a1be291dd1fffaf796a64acd8a67d1e5c8df36..e08d4eb94d00e25219413053360d31579f402fff 100644 --- a/src/corelibs/U2Lang/src/model/Aliasing.cpp +++ b/src/corelibs/U2Lang/src/model/Aliasing.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/Aliasing.h b/src/corelibs/U2Lang/src/model/Aliasing.h index a5f334ca1ff0dd4602bcac7814c215c2198d5c99..67bb60fba81f0f13248cda37327f3105ffd099f0 100644 --- a/src/corelibs/U2Lang/src/model/Aliasing.h +++ b/src/corelibs/U2Lang/src/model/Aliasing.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/Attribute.cpp b/src/corelibs/U2Lang/src/model/Attribute.cpp index d352fcaf307d55b29137399fdc5298d7594ed36c..46a1becb37fd659e3cd59d3a6dd69d220077f3b5 100644 --- a/src/corelibs/U2Lang/src/model/Attribute.cpp +++ b/src/corelibs/U2Lang/src/model/Attribute.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/Attribute.h b/src/corelibs/U2Lang/src/model/Attribute.h index 2dbf50b6bc6a81718ef868b5450bdc51057d596d..e790f86bf24254f2ce482df5a6bb79aaae595727 100644 --- a/src/corelibs/U2Lang/src/model/Attribute.h +++ b/src/corelibs/U2Lang/src/model/Attribute.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/AttributeRelation.cpp b/src/corelibs/U2Lang/src/model/AttributeRelation.cpp index 8b27a08644b53a8d227c217a312971159283ea81..33166dba806c81df14743d91d4dbe60fc181e002 100644 --- a/src/corelibs/U2Lang/src/model/AttributeRelation.cpp +++ b/src/corelibs/U2Lang/src/model/AttributeRelation.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/AttributeRelation.h b/src/corelibs/U2Lang/src/model/AttributeRelation.h index c541644b202db2f8e5bf8245c2d30c82aec22b4e..52cbe2ec6f2e4509bde2980c4279445db1daeb56 100644 --- a/src/corelibs/U2Lang/src/model/AttributeRelation.h +++ b/src/corelibs/U2Lang/src/model/AttributeRelation.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/Configuration.cpp b/src/corelibs/U2Lang/src/model/Configuration.cpp index aa02a59abbd2dd2c0250b92f2ae8ec6ef072a077..8860e14ff0f03bbb6316b48a7ff636280e7a6d1e 100644 --- a/src/corelibs/U2Lang/src/model/Configuration.cpp +++ b/src/corelibs/U2Lang/src/model/Configuration.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/Configuration.h b/src/corelibs/U2Lang/src/model/Configuration.h index adaa9bfa44057a081d271441f6c15120ed335b42..bb49a9197aee7d4b126b3d8e4a922ba233fcd21f 100644 --- a/src/corelibs/U2Lang/src/model/Configuration.h +++ b/src/corelibs/U2Lang/src/model/Configuration.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/ConfigurationEditor.cpp b/src/corelibs/U2Lang/src/model/ConfigurationEditor.cpp index 84f4bf91136f74d57eed5de03acb507e08765a3a..84c911b539e85084abe3a122d353212543774878 100644 --- a/src/corelibs/U2Lang/src/model/ConfigurationEditor.cpp +++ b/src/corelibs/U2Lang/src/model/ConfigurationEditor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/ConfigurationEditor.h b/src/corelibs/U2Lang/src/model/ConfigurationEditor.h index facab6b4f95a86c57349019f011002d90756d459..fce441091fabfc21fea18ea4f90492840f7f65a8 100644 --- a/src/corelibs/U2Lang/src/model/ConfigurationEditor.h +++ b/src/corelibs/U2Lang/src/model/ConfigurationEditor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/ConfigurationValidator.h b/src/corelibs/U2Lang/src/model/ConfigurationValidator.h index b164c3bdd216aa03707f786856418357c797d363..1413b585d7f05bb75e19142ff2796c384bf8b568 100644 --- a/src/corelibs/U2Lang/src/model/ConfigurationValidator.h +++ b/src/corelibs/U2Lang/src/model/ConfigurationValidator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/Datatype.cpp b/src/corelibs/U2Lang/src/model/Datatype.cpp index bf454c3eeb69023bced794140fd597296f6258bc..80507d7df539d48f4ce91f345c8aefafdd2da6d1 100644 --- a/src/corelibs/U2Lang/src/model/Datatype.cpp +++ b/src/corelibs/U2Lang/src/model/Datatype.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/Datatype.h b/src/corelibs/U2Lang/src/model/Datatype.h index 21db1258952120ea97db55c7ca525114cb9e0e4d..dbd6daff629bbfd6d2772bc96d3afadb030c9b91 100644 --- a/src/corelibs/U2Lang/src/model/Datatype.h +++ b/src/corelibs/U2Lang/src/model/Datatype.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/DatatypeConversion.h b/src/corelibs/U2Lang/src/model/DatatypeConversion.h index 479f653cf3a49695917cab5a8fa7b58e1786fd17..550b6fa1c8c24fdeea38f25afdc3d5222e99574e 100644 --- a/src/corelibs/U2Lang/src/model/DatatypeConversion.h +++ b/src/corelibs/U2Lang/src/model/DatatypeConversion.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/DbiDataHandler.cpp b/src/corelibs/U2Lang/src/model/DbiDataHandler.cpp index 732409808d03c77c50a3e263c5a537de22c398d3..300c6704ade2ae606da082a4a6193bd39d8d6b0e 100644 --- a/src/corelibs/U2Lang/src/model/DbiDataHandler.cpp +++ b/src/corelibs/U2Lang/src/model/DbiDataHandler.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/DbiDataHandler.h b/src/corelibs/U2Lang/src/model/DbiDataHandler.h index 8f218cebe33897296cae9bc4020c60e719dace7e..b84418e169d854217317c50aff14d30c2d3ebd83 100644 --- a/src/corelibs/U2Lang/src/model/DbiDataHandler.h +++ b/src/corelibs/U2Lang/src/model/DbiDataHandler.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/DbiDataStorage.cpp b/src/corelibs/U2Lang/src/model/DbiDataStorage.cpp index b433f4724c8ca9848a46d42785652b18df61f699..3cdb635c983209d8d2bfd34ed12ee92097755f1e 100644 --- a/src/corelibs/U2Lang/src/model/DbiDataStorage.cpp +++ b/src/corelibs/U2Lang/src/model/DbiDataStorage.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/DbiDataStorage.h b/src/corelibs/U2Lang/src/model/DbiDataStorage.h index cdb9e18e218c16d210e5b53e5c2cc45f2144a152..4c44c27eda97e5a06a3c09129086ce0e2ef458fb 100644 --- a/src/corelibs/U2Lang/src/model/DbiDataStorage.h +++ b/src/corelibs/U2Lang/src/model/DbiDataStorage.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/Descriptor.cpp b/src/corelibs/U2Lang/src/model/Descriptor.cpp index 9d764da1d471049a224c17f84fe747453169ad12..0db0420d9f7101073641a3f85a4daef9bfa0f4ff 100644 --- a/src/corelibs/U2Lang/src/model/Descriptor.cpp +++ b/src/corelibs/U2Lang/src/model/Descriptor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/Descriptor.h b/src/corelibs/U2Lang/src/model/Descriptor.h index c00faef9d51ac5004aa12cc272cd35a04620bbb9..112a38453fdeed86ca049f32d24ecef8908b4c44 100644 --- a/src/corelibs/U2Lang/src/model/Descriptor.h +++ b/src/corelibs/U2Lang/src/model/Descriptor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -48,8 +48,8 @@ public: QString getDisplayName() const; QString getDocumentation() const; void setId(const QString& i); - void setDisplayName(const QString& n); - void setDocumentation(const QString& d); + virtual void setDisplayName(const QString& n); + virtual void setDocumentation(const QString& d); // descriptors with equal id's are equal inline bool operator==(const Descriptor& d) const { return id == d.id; } diff --git a/src/corelibs/U2Lang/src/model/ExternalToolCfg.cpp b/src/corelibs/U2Lang/src/model/ExternalToolCfg.cpp index 5d9d3dc7602515e9cc24f627840f80f691169cf5..49d749c19cf50f2eeaf81f8b735681661d51d3f4 100644 --- a/src/corelibs/U2Lang/src/model/ExternalToolCfg.cpp +++ b/src/corelibs/U2Lang/src/model/ExternalToolCfg.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,15 +26,15 @@ namespace U2 { -DocumentFormatId DataConfig::StringValue = DocumentFormatId("string-value"); -DocumentFormatId DataConfig::OutputFileUrl = DocumentFormatId("output-file-url"); +const DocumentFormatId DataConfig::STRING_VALUE = DocumentFormatId("string-value"); +const DocumentFormatId DataConfig::OUTPUT_FILE_URL = DocumentFormatId("output-file-url"); bool DataConfig::isStringValue() const { - return (BaseTypes::STRING_TYPE()->getId() == type) && (StringValue == format); + return (BaseTypes::STRING_TYPE()->getId() == type) && (STRING_VALUE == format); } bool DataConfig::isFileUrl() const { - return (OutputFileUrl == format); + return (OUTPUT_FILE_URL == format); } bool DataConfig::isSequence() const { @@ -58,16 +58,64 @@ bool DataConfig::isText() const { } bool DataConfig::operator ==(const DataConfig &other) const { - return attrName == other.attrName - && type == other.type - && format == other.format - && description == other.description; + return attributeId == other.attributeId + && attrName == other.attrName + && type == other.type + && format == other.format + && description == other.description; +} + +const QString AttributeConfig::NUMBER_DEPRECATED_TYPE = "Number"; +const QString AttributeConfig::URL_DEPRECATED_TYPE = "URL"; + +const QString AttributeConfig::BOOLEAN_TYPE = "Boolean"; +const QString AttributeConfig::STRING_TYPE = "String"; +const QString AttributeConfig::INTEGER_TYPE = "Integer"; +const QString AttributeConfig::DOUBLE_TYPE = "Double"; +const QString AttributeConfig::INPUT_FILE_URL_TYPE = "Input_file_URL"; +const QString AttributeConfig::OUTPUT_FILE_URL_TYPE = "Output_file_URL"; +const QString AttributeConfig::INPUT_FOLDER_URL_TYPE = "Input_dir_URL"; +const QString AttributeConfig::OUTPUT_FOLDER_URL_TYPE = "Output_dir_URL"; + +AttributeConfig::AttributeConfig() + : flags(None) +{ + +} + +void AttributeConfig::fixTypes() { + if (type == URL_DEPRECATED_TYPE) { + type = INPUT_FILE_URL_TYPE; + } else if (type == NUMBER_DEPRECATED_TYPE) { + type = STRING_TYPE; + } +} + +bool AttributeConfig::isOutputUrl() const { + return type == OUTPUT_FILE_URL_TYPE || type == OUTPUT_FOLDER_URL_TYPE; +} + +bool AttributeConfig::isFile() const { + return type == INPUT_FILE_URL_TYPE || type == OUTPUT_FILE_URL_TYPE; +} + +bool AttributeConfig::isFolder() const { + return type == INPUT_FOLDER_URL_TYPE || type == OUTPUT_FOLDER_URL_TYPE; } bool AttributeConfig::operator ==(const AttributeConfig &other) const { - return attrName == other.attrName - && type == other.type - && description == other.description; + return attributeId == other.attributeId + && attrName == other.attrName + && type == other.type + && defaultValue == other.defaultValue + && description == other.description + && flags == other.flags; +} + +ExternalProcessConfig::ExternalProcessConfig() + : useIntegratedTool(false) +{ + } #define CHECK_EQ(expr1, expr2) \ @@ -79,8 +127,14 @@ bool ExternalProcessConfig::operator ==(const ExternalProcessConfig &other) cons CHECK_EQ(inputs.size(), other.inputs.size()); CHECK_EQ(outputs.size(), other.outputs.size()); CHECK_EQ(attrs.size(), other.attrs.size()); + CHECK_EQ(cmdLine, other.cmdLine); + CHECK_EQ(id, other.id); CHECK_EQ(name, other.name); CHECK_EQ(description, other.description); + CHECK_EQ(templateDescription, other.templateDescription); + CHECK_EQ(useIntegratedTool, other.useIntegratedTool); + CHECK_EQ(customToolPath, other.customToolPath); + CHECK_EQ(integratedToolId, other.integratedToolId); foreach (const DataConfig &in, inputs) { CHECK_EQ(other.inputs.contains(in), true); @@ -95,4 +149,36 @@ bool ExternalProcessConfig::operator ==(const ExternalProcessConfig &other) cons return true; } +bool ExternalProcessConfig::operator !=(const ExternalProcessConfig &other) const { + return !operator==(other); +} + +ExternalToolCfgRegistry::ExternalToolCfgRegistry(QObject *_parent) + : QObject(_parent) +{ + +} + +bool ExternalToolCfgRegistry::registerExternalTool(ExternalProcessConfig *cfg) { + if (configs.contains(cfg->id)) { + return false; + } else { + configs.insert(cfg->id, cfg); + return true; + } +} + +void ExternalToolCfgRegistry::unregisterConfig(const QString &id) { + // TODO: UTI-294 + configs.remove(id); +} + +ExternalProcessConfig *ExternalToolCfgRegistry::getConfigById(const QString &id) const { + return configs.value(id, nullptr); +} + +QList<ExternalProcessConfig *> ExternalToolCfgRegistry::getConfigs() const { + return configs.values(); +} + } // U2 diff --git a/src/corelibs/U2Lang/src/model/ExternalToolCfg.h b/src/corelibs/U2Lang/src/model/ExternalToolCfg.h index 553e7d5631cd0245f2ac67cb685352959fbb7a37..ffbf96968b8dc31d7d44eaee9213ff7286b64cea 100644 --- a/src/corelibs/U2Lang/src/model/ExternalToolCfg.h +++ b/src/corelibs/U2Lang/src/model/ExternalToolCfg.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,10 +19,9 @@ * MA 02110-1301, USA. */ -#ifndef ExternalToolCfg_h__ -#define ExternalToolCfg_h__ +#ifndef _U2_EXTERNAL_TOOL_CONFIG_H_ +#define _U2_EXTERNAL_TOOL_CONFIG_H_ -#include <U2Lang/Datatype.h> #include <U2Lang/ConfigurationEditor.h> #include <QString> @@ -35,6 +34,7 @@ namespace U2 { class U2LANG_EXPORT DataConfig { public: + QString attributeId; QString attrName; QString type; QString format; @@ -50,66 +50,87 @@ public: bool operator ==(const DataConfig &other) const; - static DocumentFormatId StringValue; - static DocumentFormatId OutputFileUrl; + static const DocumentFormatId STRING_VALUE; + static const DocumentFormatId OUTPUT_FILE_URL; }; class U2LANG_EXPORT AttributeConfig { public: + enum Flag { + None, + AddToDashboard, // only for output URLs + OpenWithUgene // only for file URLs that are added to a dashboard + }; + Q_DECLARE_FLAGS(Flags, Flag) + + AttributeConfig(); + + QString attributeId; QString attrName; QString type; + QString defaultValue; QString description; - //PropertyDelegate *delegate; - + Flags flags; + + static const QString NUMBER_DEPRECATED_TYPE; + static const QString URL_DEPRECATED_TYPE; + + static const QString BOOLEAN_TYPE; + static const QString STRING_TYPE; + static const QString INTEGER_TYPE; + static const QString DOUBLE_TYPE; + static const QString INPUT_FILE_URL_TYPE; + static const QString OUTPUT_FILE_URL_TYPE; + static const QString INPUT_FOLDER_URL_TYPE; + static const QString OUTPUT_FOLDER_URL_TYPE; + + void fixTypes(); + bool isOutputUrl() const; + bool isFile() const; + bool isFolder() const; bool operator ==(const AttributeConfig &other) const; }; class U2LANG_EXPORT ExternalProcessConfig { public: + ExternalProcessConfig(); + QList<DataConfig> inputs; QList<DataConfig> outputs; QList<AttributeConfig> attrs; QString cmdLine; + QString id; QString name; QString description; QString templateDescription; QString filePath; + bool useIntegratedTool; + QString customToolPath; + QString integratedToolId; bool operator ==(const ExternalProcessConfig &other) const; + bool operator !=(const ExternalProcessConfig &other) const; }; - class U2LANG_EXPORT ExternalToolCfgRegistry: public QObject { Q_OBJECT public: - ExternalToolCfgRegistry(QObject *p = NULL): QObject(p) {} - bool registerExternalTool(ExternalProcessConfig *cfg) { - if(configs.contains(cfg->name)) { - return false; - } else { - configs.insert(cfg->name, cfg); - return true; - } - } - ExternalProcessConfig *getConfigByName(const QString& name) const { - if(configs.contains(name)) { - return configs.value(name); - } else { - return NULL; - } - } - void unregisterConfig(const QString &name) { - configs.remove(name); - } - QList<ExternalProcessConfig*> getConfigs() const { - return configs.values(); - } + ExternalToolCfgRegistry(QObject *parent = nullptr); -private: - QMap<QString, ExternalProcessConfig*> configs; + bool registerExternalTool(ExternalProcessConfig *cfg); + void unregisterConfig(const QString &id); + + ExternalProcessConfig *getConfigById(const QString& id) const; + QList<ExternalProcessConfig *> getConfigs() const; +private: + QMap<QString, ExternalProcessConfig *> configs; }; } -#endif // ExternalToolCfg_h__ +Q_DECLARE_METATYPE(U2::AttributeConfig) +Q_DECLARE_METATYPE(U2::DataConfig) +Q_DECLARE_OPERATORS_FOR_FLAGS(U2::AttributeConfig::Flags) + +#endif // _U2_EXTERNAL_TOOL_CONFIG_H_ diff --git a/src/corelibs/U2Lang/src/model/GrouperOutSlot.cpp b/src/corelibs/U2Lang/src/model/GrouperOutSlot.cpp index 16d1a3bb85006291e47fc5a8356701cdd453be97..50f138851cd6cec820c2dbf49b8bc7a58ee06581 100644 --- a/src/corelibs/U2Lang/src/model/GrouperOutSlot.cpp +++ b/src/corelibs/U2Lang/src/model/GrouperOutSlot.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/GrouperOutSlot.h b/src/corelibs/U2Lang/src/model/GrouperOutSlot.h index eaffa2fcc7053439a053f43fc530d9e12cb990ce..37705df2c2521c667c8398f99882634fa1611b33 100644 --- a/src/corelibs/U2Lang/src/model/GrouperOutSlot.h +++ b/src/corelibs/U2Lang/src/model/GrouperOutSlot.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/GrouperSlotAttribute.cpp b/src/corelibs/U2Lang/src/model/GrouperSlotAttribute.cpp index 09877240e713c64d889cbde4e58bb83812526e71..77ba66653b578e83e388f7a6dca4b5595384be95 100644 --- a/src/corelibs/U2Lang/src/model/GrouperSlotAttribute.cpp +++ b/src/corelibs/U2Lang/src/model/GrouperSlotAttribute.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/GrouperSlotAttribute.h b/src/corelibs/U2Lang/src/model/GrouperSlotAttribute.h index f0bf80df4c48c68fa50b4339425317a34ee8d6e7..64982c1fed01415b6d56fea7aa6a2e95e1984f19 100644 --- a/src/corelibs/U2Lang/src/model/GrouperSlotAttribute.h +++ b/src/corelibs/U2Lang/src/model/GrouperSlotAttribute.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/IncludedProtoFactory.cpp b/src/corelibs/U2Lang/src/model/IncludedProtoFactory.cpp index 411bbcab0cacb9c1c207de7c5a48cad05a00d8ad..1701284241357a0afb195fee21e503706903293b 100644 --- a/src/corelibs/U2Lang/src/model/IncludedProtoFactory.cpp +++ b/src/corelibs/U2Lang/src/model/IncludedProtoFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -58,11 +58,11 @@ ActorPrototype *IncludedProtoFactory::getSchemaActorProto(Schema *schema, const } } -void IncludedProtoFactory::registerExternalToolWorker(ExternalProcessConfig *cfg) { +bool IncludedProtoFactory::registerExternalToolWorker(ExternalProcessConfig *cfg) { if (NULL != instance) { return instance->_registerExternalToolWorker(cfg); } else { - return; + return false; } } @@ -74,6 +74,22 @@ void IncludedProtoFactory::registerScriptWorker(const QString &actorName) { } } +ExternalProcessConfig* IncludedProtoFactory::getExternalToolWorker(const QString& id) { + if (nullptr != instance) { + return instance->_getExternalToolWorker(id); + } else { + return nullptr; + } +} + +ExternalProcessConfig *IncludedProtoFactory::unregisterExternalToolWorker(const QString &id) { + if (nullptr != instance) { + return instance->_unregisterExternalToolWorker(id); + } else { + return nullptr; + } +} + bool IncludedProtoFactory::isRegistered(const QString &actorName) { ActorPrototype *proto = WorkflowEnv::getProtoRegistry()->getProto(actorName); @@ -84,8 +100,8 @@ bool IncludedProtoFactory::isRegistered(const QString &actorName) { } } -bool IncludedProtoFactory::isRegisteredTheSameProto(const QString &actorName, ActorPrototype *proto) { - ActorPrototype *regProto = WorkflowEnv::getProtoRegistry()->getProto(actorName); +bool IncludedProtoFactory::isRegisteredTheSameProto(const QString &actorId, ActorPrototype *proto) { + ActorPrototype *regProto = WorkflowEnv::getProtoRegistry()->getProto(actorId); assert(NULL != proto); // compare simple proto parameters diff --git a/src/corelibs/U2Lang/src/model/IncludedProtoFactory.h b/src/corelibs/U2Lang/src/model/IncludedProtoFactory.h index 6cfe95a84a595af77fec762ae3c0c638c93f642e..72635356827209a5f3c15325939519951eab4c09 100644 --- a/src/corelibs/U2Lang/src/model/IncludedProtoFactory.h +++ b/src/corelibs/U2Lang/src/model/IncludedProtoFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -35,13 +35,17 @@ namespace Workflow { class U2LANG_EXPORT IncludedProtoFactory { public: + virtual ~IncludedProtoFactory() = default; + static void init(IncludedProtoFactory *protoMaker); static ActorPrototype *getScriptProto(QList<DataTypePtr > input, QList<DataTypePtr > output, QList<Attribute*> attrs, const QString &name, const QString &description, const QString &actorFilePath, bool isAliasName = false); static ActorPrototype *getExternalToolProto(ExternalProcessConfig *cfg); static ActorPrototype *getSchemaActorProto(Schema *schema, const QString &name, const QString &actorFilePath); - static void registerExternalToolWorker(ExternalProcessConfig *cfg); + static bool registerExternalToolWorker(ExternalProcessConfig *cfg); static void registerScriptWorker(const QString &actorName); + static ExternalProcessConfig* getExternalToolWorker(const QString& id); + static ExternalProcessConfig *unregisterExternalToolWorker(const QString &id); static bool isRegistered(const QString &actorName); static bool isRegisteredTheSameProto(const QString &actorName, ActorPrototype *proto); @@ -51,8 +55,10 @@ protected: const QString &name,const QString &description, const QString &actorFilePath, bool isAliasName) = 0; virtual ActorPrototype *_getExternalToolProto(ExternalProcessConfig *cfg) = 0; virtual ActorPrototype *_getSchemaActorProto(Schema *schema, const QString &name, const QString &actorFilePath) = 0; - virtual void _registerExternalToolWorker(ExternalProcessConfig *cfg) = 0; + virtual bool _registerExternalToolWorker(ExternalProcessConfig *cfg) = 0; virtual void _registerScriptWorker(const QString &actorName) = 0; + virtual ExternalProcessConfig* _getExternalToolWorker(const QString& id) = 0; + virtual ExternalProcessConfig *_unregisterExternalToolWorker(const QString &id) = 0; private: static IncludedProtoFactory *instance; diff --git a/src/corelibs/U2Lang/src/model/IntegralBus.cpp b/src/corelibs/U2Lang/src/model/IntegralBus.cpp index 10611f9856498a5bb77826f8bc6cb349c596e475..20f33c0244ba8ce09dd625d6e2bddf5f1d66a75d 100644 --- a/src/corelibs/U2Lang/src/model/IntegralBus.cpp +++ b/src/corelibs/U2Lang/src/model/IntegralBus.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/IntegralBus.h b/src/corelibs/U2Lang/src/model/IntegralBus.h index e58541fe40c77c951b0bd81dbe5349709946471f..b8c0ad200e568dde609a44762b64cbe8a1d8fdaa 100644 --- a/src/corelibs/U2Lang/src/model/IntegralBus.h +++ b/src/corelibs/U2Lang/src/model/IntegralBus.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/IntegralBusModel.cpp b/src/corelibs/U2Lang/src/model/IntegralBusModel.cpp index f6bfbb870ff59b828ffe5c81c5c0e8e20c0f3663..e1ef2ac916b224881e29fba12e5d0b53ec0f2691 100644 --- a/src/corelibs/U2Lang/src/model/IntegralBusModel.cpp +++ b/src/corelibs/U2Lang/src/model/IntegralBusModel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/IntegralBusModel.h b/src/corelibs/U2Lang/src/model/IntegralBusModel.h index 9ba7ed74f8045d86c25f2845b2a91363cb8bcc71..e8b1342bf44cc85bbeee370ac7217859bb53d416 100644 --- a/src/corelibs/U2Lang/src/model/IntegralBusModel.h +++ b/src/corelibs/U2Lang/src/model/IntegralBusModel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/IntegralBusType.cpp b/src/corelibs/U2Lang/src/model/IntegralBusType.cpp index 9d21c8aee8161393884dc7fda6fa1ea23f40d96d..abf1d1d2c71157c2b76cc690a26390c074cf1d1f 100644 --- a/src/corelibs/U2Lang/src/model/IntegralBusType.cpp +++ b/src/corelibs/U2Lang/src/model/IntegralBusType.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/IntegralBusType.h b/src/corelibs/U2Lang/src/model/IntegralBusType.h index debb2ae6dab039966f702fcb41053360819bbf1f..94ebbf0247c5b04b42ca7172e8c091cc19420524 100644 --- a/src/corelibs/U2Lang/src/model/IntegralBusType.h +++ b/src/corelibs/U2Lang/src/model/IntegralBusType.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/Marker.cpp b/src/corelibs/U2Lang/src/model/Marker.cpp index dcea7bac71c3de3d7c940a986331eccd5eb404be..6a285cc75a9071b88455a4ddc7d225f4fc4c2d90 100644 --- a/src/corelibs/U2Lang/src/model/Marker.cpp +++ b/src/corelibs/U2Lang/src/model/Marker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/Marker.h b/src/corelibs/U2Lang/src/model/Marker.h index b565a854960cad76632d5a89bfcac884df3206b3..08b7193a8eb61fd58188333ff295673d294a126c 100644 --- a/src/corelibs/U2Lang/src/model/Marker.h +++ b/src/corelibs/U2Lang/src/model/Marker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/MarkerAttribute.cpp b/src/corelibs/U2Lang/src/model/MarkerAttribute.cpp index fefe14ed61a402f7f422154703047aeae37dc09e..9b2a2198684e0bea71eb64df58db43ac727f08c5 100644 --- a/src/corelibs/U2Lang/src/model/MarkerAttribute.cpp +++ b/src/corelibs/U2Lang/src/model/MarkerAttribute.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/MarkerAttribute.h b/src/corelibs/U2Lang/src/model/MarkerAttribute.h index d84886f4d7971473eeb0c8f1057e8971aa4bb7ed..d068861cb0268fe4ac1dee386ab92250e705db96 100644 --- a/src/corelibs/U2Lang/src/model/MarkerAttribute.h +++ b/src/corelibs/U2Lang/src/model/MarkerAttribute.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/MessageMetadata.cpp b/src/corelibs/U2Lang/src/model/MessageMetadata.cpp index 90ad78d3f6222fd1ec0f09dff30b59b4edbcbe6e..0bd795b021d40cea4bf48122bef0f4b70f6211c2 100644 --- a/src/corelibs/U2Lang/src/model/MessageMetadata.cpp +++ b/src/corelibs/U2Lang/src/model/MessageMetadata.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/MessageMetadata.h b/src/corelibs/U2Lang/src/model/MessageMetadata.h index b6dcf4e94ddcb6aa06501804b63fae01588185d9..220036283f7e56e0843f0578ec72af7128d8285b 100644 --- a/src/corelibs/U2Lang/src/model/MessageMetadata.h +++ b/src/corelibs/U2Lang/src/model/MessageMetadata.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/PairedReadsPortValidator.cpp b/src/corelibs/U2Lang/src/model/PairedReadsPortValidator.cpp index ee91ac6122b05b65b975a4549770a7f862ce0b41..99dbeef03de745777bdb7b60191b4891fc96f49e 100644 --- a/src/corelibs/U2Lang/src/model/PairedReadsPortValidator.cpp +++ b/src/corelibs/U2Lang/src/model/PairedReadsPortValidator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/PairedReadsPortValidator.h b/src/corelibs/U2Lang/src/model/PairedReadsPortValidator.h index 2d588af249cd60ec438d583f1ad5f3a9ee691136..1f571c6649361237a00761f273153dcbbc306e8c 100644 --- a/src/corelibs/U2Lang/src/model/PairedReadsPortValidator.h +++ b/src/corelibs/U2Lang/src/model/PairedReadsPortValidator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/Peer.h b/src/corelibs/U2Lang/src/model/Peer.h index fe755db1fab599ad4501d8093ff0c175fe0fb281..e706d43b95f18d7377bff5ca6239be89600897a7 100644 --- a/src/corelibs/U2Lang/src/model/Peer.h +++ b/src/corelibs/U2Lang/src/model/Peer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/Port.cpp b/src/corelibs/U2Lang/src/model/Port.cpp index 6d457cc366a963969455b0eac42c7c9dc6cd4783..db82a25dd90ba6d429b971ed3897ddcca2f49725 100644 --- a/src/corelibs/U2Lang/src/model/Port.cpp +++ b/src/corelibs/U2Lang/src/model/Port.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/Port.h b/src/corelibs/U2Lang/src/model/Port.h index a4b92b40ba4ac17c06a9c72e5e88919520db748c..d3a4d59ece397de0e242585f9101115eff03f500 100644 --- a/src/corelibs/U2Lang/src/model/Port.h +++ b/src/corelibs/U2Lang/src/model/Port.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/PortRelation.cpp b/src/corelibs/U2Lang/src/model/PortRelation.cpp index 1a8e59aad358b354b7d0a67d1544afd3dac9714d..908eebb3be0a40054db5938ef7c877766798c19d 100644 --- a/src/corelibs/U2Lang/src/model/PortRelation.cpp +++ b/src/corelibs/U2Lang/src/model/PortRelation.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/PortRelation.h b/src/corelibs/U2Lang/src/model/PortRelation.h index 467c3128d316226db6ebbe83d5e1c8cb99d2c7bf..9c7bba6e7f28a48d945d13db2d3a941ecdf5a376 100644 --- a/src/corelibs/U2Lang/src/model/PortRelation.h +++ b/src/corelibs/U2Lang/src/model/PortRelation.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/QDConstraint.cpp b/src/corelibs/U2Lang/src/model/QDConstraint.cpp index ea4bfea51847f50157192a1bcf97519e241d9c02..3f8207237c177a9af2110ae16c16a39542b7b1d0 100644 --- a/src/corelibs/U2Lang/src/model/QDConstraint.cpp +++ b/src/corelibs/U2Lang/src/model/QDConstraint.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/QDConstraint.h b/src/corelibs/U2Lang/src/model/QDConstraint.h index b1ba6f6801b4e19c0628c9707a3bccb26932603c..dff777fc1a86a6a6a51c6dd970c6dacbed994875 100644 --- a/src/corelibs/U2Lang/src/model/QDConstraint.h +++ b/src/corelibs/U2Lang/src/model/QDConstraint.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/QDScheme.cpp b/src/corelibs/U2Lang/src/model/QDScheme.cpp index d7e3c6320db03a800b0a8450e2966c5a5facf389..f11cda5d03a69f8999c564dea631d708c3d429ab 100644 --- a/src/corelibs/U2Lang/src/model/QDScheme.cpp +++ b/src/corelibs/U2Lang/src/model/QDScheme.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/QDScheme.h b/src/corelibs/U2Lang/src/model/QDScheme.h index 7d9bd7c13522f8694309012fabf0495b0662a8fe..9ad423fd373d82c4f98763f9eaadc3904a1f1a6e 100644 --- a/src/corelibs/U2Lang/src/model/QDScheme.h +++ b/src/corelibs/U2Lang/src/model/QDScheme.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/QueryDesignerRegistry.cpp b/src/corelibs/U2Lang/src/model/QueryDesignerRegistry.cpp index 58e499e2f431da0429159a8aae5adde835299c7b..8d0a4d74eed7001a68652a94c314a1e1a366bb7c 100644 --- a/src/corelibs/U2Lang/src/model/QueryDesignerRegistry.cpp +++ b/src/corelibs/U2Lang/src/model/QueryDesignerRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/QueryDesignerRegistry.h b/src/corelibs/U2Lang/src/model/QueryDesignerRegistry.h index e29157db99fec9a7c6dccf910d873b570f368fbd..e0cddebc2bffd8b250c22947a73eeceb31936d9d 100644 --- a/src/corelibs/U2Lang/src/model/QueryDesignerRegistry.h +++ b/src/corelibs/U2Lang/src/model/QueryDesignerRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/ReadDbObjActorPrototype.cpp b/src/corelibs/U2Lang/src/model/ReadDbObjActorPrototype.cpp index 3154e14c9fbdda8a2d2b404681f84043385f82a7..9229d381de4230a0defa3eb52226313bc3e901d1 100644 --- a/src/corelibs/U2Lang/src/model/ReadDbObjActorPrototype.cpp +++ b/src/corelibs/U2Lang/src/model/ReadDbObjActorPrototype.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/ReadDbObjActorPrototype.h b/src/corelibs/U2Lang/src/model/ReadDbObjActorPrototype.h index a4f3f90b7a9a501e75ee9ddaa08c121dec111542..c694d2e5a1e9d88e2a450bf74304a885cf7fbca0 100644 --- a/src/corelibs/U2Lang/src/model/ReadDbObjActorPrototype.h +++ b/src/corelibs/U2Lang/src/model/ReadDbObjActorPrototype.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/RunFileSystem.cpp b/src/corelibs/U2Lang/src/model/RunFileSystem.cpp index 0c9e23e0d630954c05c2316cf1650739520ef8ec..ea12e8472e7e113d37ba4c5972b694ba477c4475 100644 --- a/src/corelibs/U2Lang/src/model/RunFileSystem.cpp +++ b/src/corelibs/U2Lang/src/model/RunFileSystem.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/RunFileSystem.h b/src/corelibs/U2Lang/src/model/RunFileSystem.h index 0109eb9f39be13aa057bc520b5b38ccb50a0acc8..9e788b03467dc22024e6ee0d62193b3aa66da2e4 100644 --- a/src/corelibs/U2Lang/src/model/RunFileSystem.h +++ b/src/corelibs/U2Lang/src/model/RunFileSystem.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/Schema.cpp b/src/corelibs/U2Lang/src/model/Schema.cpp index 03587927cb10d1989e546cb8e862b860cfcf6dd0..19f8501393b831ed10ee8774faaee14e98520cdd 100644 --- a/src/corelibs/U2Lang/src/model/Schema.cpp +++ b/src/corelibs/U2Lang/src/model/Schema.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/Schema.h b/src/corelibs/U2Lang/src/model/Schema.h index 14e6731391c04e036f5c40124e8e5c48720fdab0..1d346b9b5e7f5e7ce2f72966704bd8e4a8815a29 100644 --- a/src/corelibs/U2Lang/src/model/Schema.h +++ b/src/corelibs/U2Lang/src/model/Schema.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/SchemaActorsRegistry.cpp b/src/corelibs/U2Lang/src/model/SchemaActorsRegistry.cpp index 40f83122014d75efeafe83c2a6cc89ae9ce97599..3480e43c0ae82998e95d06e107f9fdb1b815bd22 100644 --- a/src/corelibs/U2Lang/src/model/SchemaActorsRegistry.cpp +++ b/src/corelibs/U2Lang/src/model/SchemaActorsRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/SchemaActorsRegistry.h b/src/corelibs/U2Lang/src/model/SchemaActorsRegistry.h index d316d8df3e64df4130f1de076a2d297505caa396..f5b34f02a0453be13cf4cdf89303580d4325f59f 100644 --- a/src/corelibs/U2Lang/src/model/SchemaActorsRegistry.h +++ b/src/corelibs/U2Lang/src/model/SchemaActorsRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/SchemaConfig.h b/src/corelibs/U2Lang/src/model/SchemaConfig.h index e6caa249409151b7603e2aa91ba8e3dd1f08a98a..de88031f22fa9f927a04e3be6956b93d3bc9d7cd 100644 --- a/src/corelibs/U2Lang/src/model/SchemaConfig.h +++ b/src/corelibs/U2Lang/src/model/SchemaConfig.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/SlotRelation.h b/src/corelibs/U2Lang/src/model/SlotRelation.h index 1df496b7651ba1eab9f6aaca81de4e2143b457d7..df8de22e0fec94fdd85ced4325a0a143c1c97667 100644 --- a/src/corelibs/U2Lang/src/model/SlotRelation.h +++ b/src/corelibs/U2Lang/src/model/SlotRelation.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/WorkflowContext.cpp b/src/corelibs/U2Lang/src/model/WorkflowContext.cpp index 8db562c50418183d23b7c8d1d2c5d89bab1292c0..7e8663bf2d1175462543af86188ba775ed85356a 100644 --- a/src/corelibs/U2Lang/src/model/WorkflowContext.cpp +++ b/src/corelibs/U2Lang/src/model/WorkflowContext.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -194,7 +194,7 @@ QString WorkflowContextCMDLine::getOutputDirectory(U2OpStatus &os) { if (useOutputDir()) { root = WorkflowSettings::getWorkflowOutputDirectory(); } else { - root = QDir::currentPath(); + root = QProcess().workingDirectory(); } // 2. Create folder if it does not exist diff --git a/src/corelibs/U2Lang/src/model/WorkflowContext.h b/src/corelibs/U2Lang/src/model/WorkflowContext.h index 63897d8cce5fafcd72efb5678ed8e2bd42807a28..14f2d1535d8b50934c5e9e8928c39485565f46dc 100644 --- a/src/corelibs/U2Lang/src/model/WorkflowContext.h +++ b/src/corelibs/U2Lang/src/model/WorkflowContext.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/WorkflowEnv.cpp b/src/corelibs/U2Lang/src/model/WorkflowEnv.cpp index ed3951254ae7ebf2dc29558f190432e217e94259..352032ee8cd4269cd06afa99af6aa7829dad014d 100644 --- a/src/corelibs/U2Lang/src/model/WorkflowEnv.cpp +++ b/src/corelibs/U2Lang/src/model/WorkflowEnv.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/WorkflowEnv.h b/src/corelibs/U2Lang/src/model/WorkflowEnv.h index 71b1961fbb41342b98a80a2f55adc787993d449f..8f31cbbcb7c7911c16c2a22ff5b1a5da2a946182 100644 --- a/src/corelibs/U2Lang/src/model/WorkflowEnv.h +++ b/src/corelibs/U2Lang/src/model/WorkflowEnv.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/WorkflowManager.h b/src/corelibs/U2Lang/src/model/WorkflowManager.h index 8d9ab0e090a88cae837e2306bccd4c2435122510..f69b488c600666984d96c28e7334d54c54500a3c 100644 --- a/src/corelibs/U2Lang/src/model/WorkflowManager.h +++ b/src/corelibs/U2Lang/src/model/WorkflowManager.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/WorkflowScriptEngine.cpp b/src/corelibs/U2Lang/src/model/WorkflowScriptEngine.cpp index 4c02ec7d3b636f2a5584771c4e17121cbee2f2e8..d2f3dcc4101024ae12cc595d4f33e367f58cb462 100644 --- a/src/corelibs/U2Lang/src/model/WorkflowScriptEngine.cpp +++ b/src/corelibs/U2Lang/src/model/WorkflowScriptEngine.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/WorkflowScriptEngine.h b/src/corelibs/U2Lang/src/model/WorkflowScriptEngine.h index 4a108851c56d26396ba0fdaed3b61c7d97bd1393..63195a8514dca8b56013a5d7f57a7fe78ba385bf 100644 --- a/src/corelibs/U2Lang/src/model/WorkflowScriptEngine.h +++ b/src/corelibs/U2Lang/src/model/WorkflowScriptEngine.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/WorkflowTransport.cpp b/src/corelibs/U2Lang/src/model/WorkflowTransport.cpp index 971f521c4fe5b1c355a76947a5532bf45b50b612..7941c6b6943de14f78e99a938fc2759c4ba382f3 100644 --- a/src/corelibs/U2Lang/src/model/WorkflowTransport.cpp +++ b/src/corelibs/U2Lang/src/model/WorkflowTransport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/WorkflowTransport.h b/src/corelibs/U2Lang/src/model/WorkflowTransport.h index 5913dbf508914f95d0f5844ec3f093ec35470ecd..53ea1fe634792552fa5ecbffdb1b92f0d637911d 100644 --- a/src/corelibs/U2Lang/src/model/WorkflowTransport.h +++ b/src/corelibs/U2Lang/src/model/WorkflowTransport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/actor/Actor.cpp b/src/corelibs/U2Lang/src/model/actor/Actor.cpp index fe54f0a0c3831a842fbdb526d88bbedccb6202c2..8e2181e52536bb8513cfa1ba784f5509d90a0754 100644 --- a/src/corelibs/U2Lang/src/model/actor/Actor.cpp +++ b/src/corelibs/U2Lang/src/model/actor/Actor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -56,6 +56,9 @@ Actor::Actor(const ActorId &actorId, ActorPrototype* proto, AttributeScript * _s } setupVariablesForPort(condition, true); setupVariablesForAttribute(condition); + + connect(proto, SIGNAL(si_nameChanged()), SLOT(sl_labelChanged())); + connect(proto, SIGNAL(si_descriptionChanged()), SIGNAL(si_descriptionChanged())); } Actor::Actor(const Actor&) : QObject(), Configuration(), Peer() { @@ -69,6 +72,10 @@ Actor::~Actor() { delete condition; } +void Actor::sl_labelChanged() { + setLabel(proto->getDisplayName()); +} + void Actor::setupVariablesForPort(AttributeScript *_script, bool inputOnly) { foreach(const PortDescriptor *descr, proto->getPortDesciptors()) { QString prefix; diff --git a/src/corelibs/U2Lang/src/model/actor/Actor.h b/src/corelibs/U2Lang/src/model/actor/Actor.h index 5b83691b5dd6afbdc5591e8db008fa6f87c92581..6de7b6a513100f5a53aec809c5fece4a11fba94b 100644 --- a/src/corelibs/U2Lang/src/model/actor/Actor.h +++ b/src/corelibs/U2Lang/src/model/actor/Actor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -116,6 +116,7 @@ public: signals: void si_labelChanged(); void si_modified(); + void si_descriptionChanged(); protected: friend class ActorPrototype; @@ -150,6 +151,9 @@ protected: ActorId owner; QList<ValidatorDesc> customValidators; +private slots: + void sl_labelChanged(); + private: // setups variables for script void setupVariablesForPort(AttributeScript *_script, bool inputOnly = false); diff --git a/src/corelibs/U2Lang/src/model/actor/ActorConfigurationEditor.cpp b/src/corelibs/U2Lang/src/model/actor/ActorConfigurationEditor.cpp index 4a1802b49a78dc2e58824b1ec35fad50408ca35f..b9c48200ff4378dc093c5333501c70cafde53726 100644 --- a/src/corelibs/U2Lang/src/model/actor/ActorConfigurationEditor.cpp +++ b/src/corelibs/U2Lang/src/model/actor/ActorConfigurationEditor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/actor/ActorConfigurationEditor.h b/src/corelibs/U2Lang/src/model/actor/ActorConfigurationEditor.h index 8b3a7c7a2eb4e24055f452986a6a472c13367113..7a9f979b4f1faa674bb9f402b379ad572563c14e 100644 --- a/src/corelibs/U2Lang/src/model/actor/ActorConfigurationEditor.h +++ b/src/corelibs/U2Lang/src/model/actor/ActorConfigurationEditor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/actor/ActorDocument.h b/src/corelibs/U2Lang/src/model/actor/ActorDocument.h index 9873a9477e04e876cdbcd0b5123b21cebcd62275..0b59ea9951e558fa90c77cea1644f24450bb7db3 100644 --- a/src/corelibs/U2Lang/src/model/actor/ActorDocument.h +++ b/src/corelibs/U2Lang/src/model/actor/ActorDocument.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/actor/ActorPrototype.cpp b/src/corelibs/U2Lang/src/model/actor/ActorPrototype.cpp index 11838c86962c6f664727467726170afa5d2f96ad..10cd7ee467173644e05fb6ef85a11074d35de21f 100644 --- a/src/corelibs/U2Lang/src/model/actor/ActorPrototype.cpp +++ b/src/corelibs/U2Lang/src/model/actor/ActorPrototype.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -120,9 +120,21 @@ Actor* ActorPrototype::createInstance(const ActorId &actorId, AttributeScript *s } proc->updateItemsAvailability(); + usageCounter++; + connect(proc, SIGNAL(destroyed()), SLOT(sl_onActorDestruction())); + return proc; } +void ActorPrototype::setDisplayName(const QString& n) { + VisualDescriptor::setDisplayName(n); + emit si_nameChanged(); +} + +void ActorPrototype::setDocumentation(const QString& d) { + VisualDescriptor::setDocumentation(d); + emit si_descriptionChanged(); +} Attribute * ActorPrototype::getAttribute( const QString & id ) const { Attribute * res = NULL; @@ -158,15 +170,18 @@ const StrStrMap & ActorPrototype::getExternalTools() const { return externalTools; } +void ActorPrototype::clearExternalTools() { + externalTools.clear(); +} + ActorPrototype::ActorPrototype(const Descriptor& d, const QList<PortDescriptor*>& ports, const QList<Attribute*>& attrs) -: VisualDescriptor(d), attrs(attrs), ports(ports), ed(NULL), val(NULL), prompter(NULL), -isScript(false), isStandard(true), isSchema(false), allowsEmptyPorts(false), influenceOnPathFlag(false) { +: VisualDescriptor(d), QObject(nullptr), attrs(attrs), ports(ports), ed(NULL), val(NULL), prompter(NULL), +isScript(false), isStandard(true), isSchema(false), allowsEmptyPorts(false), influenceOnPathFlag(false), usageCounter(0) { } -ActorPrototype::~ActorPrototype() -{ +ActorPrototype::~ActorPrototype() { qDeleteAll(attrs); qDeleteAll(ports); delete ed; @@ -175,5 +190,13 @@ ActorPrototype::~ActorPrototype() qDeleteAll(portValidators); } +void ActorPrototype::sl_onActorDestruction() { + usageCounter--; +} + +int ActorPrototype::getUsageCounter() const { + return usageCounter; +} + } // Workflow } // U2 diff --git a/src/corelibs/U2Lang/src/model/actor/ActorPrototype.h b/src/corelibs/U2Lang/src/model/actor/ActorPrototype.h index 9e10b0bcd5c9613dedd82cbbe1225ba8aac76a20..beb8cd4f93b8d6dc674c15f08601273d4a04c7b5 100644 --- a/src/corelibs/U2Lang/src/model/actor/ActorPrototype.h +++ b/src/corelibs/U2Lang/src/model/actor/ActorPrototype.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,6 +26,7 @@ #include <U2Lang/Port.h> #include <QMimeData> +#include <QObject> namespace U2 { class Attribute; @@ -41,7 +42,8 @@ class Prompter; * and can be configured via set of template-specific parameters * ActorPrototype is such a template */ -class U2LANG_EXPORT ActorPrototype : public VisualDescriptor { +class U2LANG_EXPORT ActorPrototype : public QObject, public VisualDescriptor { + Q_OBJECT public: ActorPrototype(const Descriptor& desc, const QList<PortDescriptor*>& ports = QList<PortDescriptor*>(), @@ -74,9 +76,12 @@ public: virtual Actor* createInstance(const ActorId &actorId, AttributeScript *script = NULL, const QVariantMap& params = QVariantMap()); + void setDisplayName(const QString& n) override; + + void setDocumentation(const QString& d) override; + void setScriptFlag(bool flag = true); bool isScriptFlagSet() {return isScript;} - void setSchema(const QString &path); void setNonStandard(const QString &path); bool isStandardFlagSet() {return isStandard;} @@ -92,6 +97,13 @@ public: void addExternalTool(const QString &toolId, const QString ¶mId = ""); const StrStrMap & getExternalTools() const; + void clearExternalTools(); + int getUsageCounter() const; + +signals: + void si_nameChanged(); + void si_descriptionChanged(); + protected: // create port and sets p as owner of new port // caller should add created port to actor's ports see createInstance @@ -132,6 +144,11 @@ protected: // Also the path to a tool can be set in a parameter. In this case the value of map is the parameter's id; // otherwise the value is empty string. StrStrMap externalTools; + +private slots: + void sl_onActorDestruction(); +private: + int usageCounter; }; // ActorPrototype } // Workflow diff --git a/src/corelibs/U2Lang/src/model/actor/ActorScriptValidator.cpp b/src/corelibs/U2Lang/src/model/actor/ActorScriptValidator.cpp index 1bcc5ebb1327e50a9406df80402a594ea1f54560..3e9f68c618426bc7f24848bc25acac5ec8ecd238 100644 --- a/src/corelibs/U2Lang/src/model/actor/ActorScriptValidator.cpp +++ b/src/corelibs/U2Lang/src/model/actor/ActorScriptValidator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/actor/ActorScriptValidator.h b/src/corelibs/U2Lang/src/model/actor/ActorScriptValidator.h index 4525a79777ca14182b0d2fdfa56705fd0445569d..b1cc010a76379be68339f28918e999c1d1201409 100644 --- a/src/corelibs/U2Lang/src/model/actor/ActorScriptValidator.h +++ b/src/corelibs/U2Lang/src/model/actor/ActorScriptValidator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/actor/ActorValidator.cpp b/src/corelibs/U2Lang/src/model/actor/ActorValidator.cpp index c85546cb8d78d84d3fc1b8be2243ad622c53f266..49409029eb9c790952c3f71495d3d74f7382c739 100644 --- a/src/corelibs/U2Lang/src/model/actor/ActorValidator.cpp +++ b/src/corelibs/U2Lang/src/model/actor/ActorValidator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/actor/ActorValidator.h b/src/corelibs/U2Lang/src/model/actor/ActorValidator.h index dae96a4851e4e50a01b9aa260e32a406b5d80573..bb5ffe704e4b785529ed1f3122882141bcb5af8c 100644 --- a/src/corelibs/U2Lang/src/model/actor/ActorValidator.h +++ b/src/corelibs/U2Lang/src/model/actor/ActorValidator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/url_attribute/Dataset.cpp b/src/corelibs/U2Lang/src/model/url_attribute/Dataset.cpp index bf030befa1a4416b2a15d2ee5c7bcca29bbded4e..08c763acf1f2af5b3edcf11ec8528fdcbc74d069 100644 --- a/src/corelibs/U2Lang/src/model/url_attribute/Dataset.cpp +++ b/src/corelibs/U2Lang/src/model/url_attribute/Dataset.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/url_attribute/Dataset.h b/src/corelibs/U2Lang/src/model/url_attribute/Dataset.h index d40200dc35a42f66d83081a0f43c4c898820280d..019cf2ff857a8e471cb62076fd4c7856ffe68c95 100644 --- a/src/corelibs/U2Lang/src/model/url_attribute/Dataset.h +++ b/src/corelibs/U2Lang/src/model/url_attribute/Dataset.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/url_attribute/DbFolderScanner.cpp b/src/corelibs/U2Lang/src/model/url_attribute/DbFolderScanner.cpp index c030de82d28752510646b000b5a89746810cef6e..92cf3ba3ebd874fbeed3fa0eabe18c57c7fc7c34 100644 --- a/src/corelibs/U2Lang/src/model/url_attribute/DbFolderScanner.cpp +++ b/src/corelibs/U2Lang/src/model/url_attribute/DbFolderScanner.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/url_attribute/DbFolderScanner.h b/src/corelibs/U2Lang/src/model/url_attribute/DbFolderScanner.h index dd9639fd16dd52ae7e1f32543ff4a1670bf55e33..dcc73848c26f95ef4c12bc8724458419d9635fa6 100644 --- a/src/corelibs/U2Lang/src/model/url_attribute/DbFolderScanner.h +++ b/src/corelibs/U2Lang/src/model/url_attribute/DbFolderScanner.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/url_attribute/SharedDbUrlUtils.cpp b/src/corelibs/U2Lang/src/model/url_attribute/SharedDbUrlUtils.cpp index 04c097642c2a9d03ebdf0c8e6341e890eb6046e6..311fb70d23113de0b0bf1097c38977e60727ac62 100644 --- a/src/corelibs/U2Lang/src/model/url_attribute/SharedDbUrlUtils.cpp +++ b/src/corelibs/U2Lang/src/model/url_attribute/SharedDbUrlUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/url_attribute/SharedDbUrlUtils.h b/src/corelibs/U2Lang/src/model/url_attribute/SharedDbUrlUtils.h index 95320dc7c1d60bac87c365babd4cc289f90f78bf..f2fad02eabb4961c29923c7a9302a2e81e79073d 100644 --- a/src/corelibs/U2Lang/src/model/url_attribute/SharedDbUrlUtils.h +++ b/src/corelibs/U2Lang/src/model/url_attribute/SharedDbUrlUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/url_attribute/URLAttribute.cpp b/src/corelibs/U2Lang/src/model/url_attribute/URLAttribute.cpp index 10138fb0be6bec51a79af50d9de225f8aa42da2c..4d60eba3b3ad2a6b26b2dec0de4e8e3670cc1df5 100644 --- a/src/corelibs/U2Lang/src/model/url_attribute/URLAttribute.cpp +++ b/src/corelibs/U2Lang/src/model/url_attribute/URLAttribute.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/url_attribute/URLAttribute.h b/src/corelibs/U2Lang/src/model/url_attribute/URLAttribute.h index a7ca11c67107660daeb0c3747642bbbe3ca02d02..055d8f4ed1ffb3fcff3832006d7734b41e794ab3 100644 --- a/src/corelibs/U2Lang/src/model/url_attribute/URLAttribute.h +++ b/src/corelibs/U2Lang/src/model/url_attribute/URLAttribute.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/url_attribute/URLContainer.cpp b/src/corelibs/U2Lang/src/model/url_attribute/URLContainer.cpp index f30331f8dfe0beb95f7c9b3dca0479455d33cc2d..b2fa1398e44db64587945887142165fc07807fd0 100644 --- a/src/corelibs/U2Lang/src/model/url_attribute/URLContainer.cpp +++ b/src/corelibs/U2Lang/src/model/url_attribute/URLContainer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -252,4 +252,8 @@ void DbFolderUrlContainer::setRecursive(bool value) { recursive = value; } +URLContainerVisitor::~URLContainerVisitor() { + // do nothing +} + } // U2 diff --git a/src/corelibs/U2Lang/src/model/url_attribute/URLContainer.h b/src/corelibs/U2Lang/src/model/url_attribute/URLContainer.h index d66ea7b78e41464ba9d4bbc3630213015997f9ab..0452de004377e77694c4aab85c9f4f179f4691f8 100644 --- a/src/corelibs/U2Lang/src/model/url_attribute/URLContainer.h +++ b/src/corelibs/U2Lang/src/model/url_attribute/URLContainer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -138,6 +138,8 @@ private: //////////////////////////////////////////////////////////////////////////////// class U2LANG_EXPORT URLContainerVisitor { public: + virtual ~URLContainerVisitor(); + virtual void visit(FileUrlContainer *) = 0; virtual void visit(DirUrlContainer *) = 0; virtual void visit(DbObjUrlContainer *) = 0; diff --git a/src/corelibs/U2Lang/src/model/wizard/ElementSelectorWidget.cpp b/src/corelibs/U2Lang/src/model/wizard/ElementSelectorWidget.cpp index d5f9151829b6193aaad73c4b03cfb61b7238f483..f705aacc1d90d4ab871a32e9e940e78cf9f75503 100644 --- a/src/corelibs/U2Lang/src/model/wizard/ElementSelectorWidget.cpp +++ b/src/corelibs/U2Lang/src/model/wizard/ElementSelectorWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/wizard/ElementSelectorWidget.h b/src/corelibs/U2Lang/src/model/wizard/ElementSelectorWidget.h index ff92d72098f0733bd3b864ae5820f3d5dd919a54..d4e288dfa90373e6d0a7c14f8866733d1e139d38 100644 --- a/src/corelibs/U2Lang/src/model/wizard/ElementSelectorWidget.h +++ b/src/corelibs/U2Lang/src/model/wizard/ElementSelectorWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/wizard/IdMapping.cpp b/src/corelibs/U2Lang/src/model/wizard/IdMapping.cpp index 899a703f340a4b14695e708561e2d6811d365f77..c129aca5478afdb5e11d1936cfe2262b9e0f7363 100644 --- a/src/corelibs/U2Lang/src/model/wizard/IdMapping.cpp +++ b/src/corelibs/U2Lang/src/model/wizard/IdMapping.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/wizard/IdMapping.h b/src/corelibs/U2Lang/src/model/wizard/IdMapping.h index 684f4d5cdffb8b5e448ee972f6bedf00a8844553..9967243e462406b4b93337151bcab5924f82e4c4 100644 --- a/src/corelibs/U2Lang/src/model/wizard/IdMapping.h +++ b/src/corelibs/U2Lang/src/model/wizard/IdMapping.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/wizard/PortMapping.cpp b/src/corelibs/U2Lang/src/model/wizard/PortMapping.cpp index f47832a3c4181fad2a51355a95a35b6322d2f817..6ce4adb4204be1795672393d8e40a3d6b9b8d941 100644 --- a/src/corelibs/U2Lang/src/model/wizard/PortMapping.cpp +++ b/src/corelibs/U2Lang/src/model/wizard/PortMapping.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/wizard/PortMapping.h b/src/corelibs/U2Lang/src/model/wizard/PortMapping.h index 402fdf9cae5a8c56f6606bb99e2f0cf23d88e548..f01cd3c0f59314db477cec1b87adb159678b36a2 100644 --- a/src/corelibs/U2Lang/src/model/wizard/PortMapping.h +++ b/src/corelibs/U2Lang/src/model/wizard/PortMapping.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/wizard/SelectorValue.cpp b/src/corelibs/U2Lang/src/model/wizard/SelectorValue.cpp index 3c0d9ffb73d4d8a78ec4e75e46bd8d8d8caf3011..95f3e38508abb0ac1be1f9003c018b01fa637c28 100644 --- a/src/corelibs/U2Lang/src/model/wizard/SelectorValue.cpp +++ b/src/corelibs/U2Lang/src/model/wizard/SelectorValue.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/wizard/SelectorValue.h b/src/corelibs/U2Lang/src/model/wizard/SelectorValue.h index 3bc8a824d1a050fdebce002ead7535f9c3c0e0a3..29af35675432090d80c16a0bb75e8e0c3327ae45 100644 --- a/src/corelibs/U2Lang/src/model/wizard/SelectorValue.h +++ b/src/corelibs/U2Lang/src/model/wizard/SelectorValue.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/wizard/SlotMapping.cpp b/src/corelibs/U2Lang/src/model/wizard/SlotMapping.cpp index 5511e0caa421453f7fd29b05a3b57e50ed0f6979..8db9775b396e3ba1e5aa58ea61baec9f64788166 100644 --- a/src/corelibs/U2Lang/src/model/wizard/SlotMapping.cpp +++ b/src/corelibs/U2Lang/src/model/wizard/SlotMapping.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/wizard/SlotMapping.h b/src/corelibs/U2Lang/src/model/wizard/SlotMapping.h index 0f0cbbd7bf7ab94fff96e2b34bdc60b0b5a605db..af6365d2d67d642aa54b5aef021a4ee5cbbdc245 100644 --- a/src/corelibs/U2Lang/src/model/wizard/SlotMapping.h +++ b/src/corelibs/U2Lang/src/model/wizard/SlotMapping.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/wizard/Variable.cpp b/src/corelibs/U2Lang/src/model/wizard/Variable.cpp index f8a3cf704197e25776ead732e90ac5b158daf1b4..7a67d1e448a85ba31d5a14432de2f3d90ea96685 100644 --- a/src/corelibs/U2Lang/src/model/wizard/Variable.cpp +++ b/src/corelibs/U2Lang/src/model/wizard/Variable.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/wizard/Variable.h b/src/corelibs/U2Lang/src/model/wizard/Variable.h index f3497b44318d4688645e215ce64e7387d61d6f69..851c41c81e7166c35c2f97405080b88df0dc9328 100644 --- a/src/corelibs/U2Lang/src/model/wizard/Variable.h +++ b/src/corelibs/U2Lang/src/model/wizard/Variable.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/wizard/Wizard.cpp b/src/corelibs/U2Lang/src/model/wizard/Wizard.cpp index f3903c58dfb372b17690ed172a4fd0721f203f24..0cd8d6f4702c0a55e775853b4123b35e0838dabf 100644 --- a/src/corelibs/U2Lang/src/model/wizard/Wizard.cpp +++ b/src/corelibs/U2Lang/src/model/wizard/Wizard.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/wizard/Wizard.h b/src/corelibs/U2Lang/src/model/wizard/Wizard.h index f3bd45e941d814e8ef606d55fa1470b55e2fd02d..ca39b3adfa96df70a0d5e9bef65f4251f75d88e9 100644 --- a/src/corelibs/U2Lang/src/model/wizard/Wizard.h +++ b/src/corelibs/U2Lang/src/model/wizard/Wizard.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/wizard/WizardPage.cpp b/src/corelibs/U2Lang/src/model/wizard/WizardPage.cpp index dfed3591ab9be91672d072cbae28e0022d0a1051..53fa17519cb52afa6b14aaa640c84dd1ca248ee8 100644 --- a/src/corelibs/U2Lang/src/model/wizard/WizardPage.cpp +++ b/src/corelibs/U2Lang/src/model/wizard/WizardPage.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/wizard/WizardPage.h b/src/corelibs/U2Lang/src/model/wizard/WizardPage.h index 854421148025e15c7255a5f1fe7f3e2763458541..a58325fa5cda0294d86f85b7f4cff0df869ba091 100644 --- a/src/corelibs/U2Lang/src/model/wizard/WizardPage.h +++ b/src/corelibs/U2Lang/src/model/wizard/WizardPage.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/wizard/WizardWidget.cpp b/src/corelibs/U2Lang/src/model/wizard/WizardWidget.cpp index c38cdc35e011d59e372f6be20cc3ea1c7658dcb4..62308e827a89c3a6f088c6513f60574f344228cf 100644 --- a/src/corelibs/U2Lang/src/model/wizard/WizardWidget.cpp +++ b/src/corelibs/U2Lang/src/model/wizard/WizardWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/wizard/WizardWidget.h b/src/corelibs/U2Lang/src/model/wizard/WizardWidget.h index b1d899030843dea913f46695e23511f66816088c..203bb72ba6139630a8b5d3b8a51724047f3bb9f7 100644 --- a/src/corelibs/U2Lang/src/model/wizard/WizardWidget.h +++ b/src/corelibs/U2Lang/src/model/wizard/WizardWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/model/wizard/WizardWidgetVisitor.h b/src/corelibs/U2Lang/src/model/wizard/WizardWidgetVisitor.h index 09816bb232bf8703723981319e388b29f22f4f1b..a785e4bdecaec569cb20e9ef03f3d77856a66a0e 100644 --- a/src/corelibs/U2Lang/src/model/wizard/WizardWidgetVisitor.h +++ b/src/corelibs/U2Lang/src/model/wizard/WizardWidgetVisitor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/run/WorkflowMonitor.cpp b/src/corelibs/U2Lang/src/run/WorkflowMonitor.cpp index f4bc69d2bf423194a69e069c863346bc82e12df8..20ccfde1f39fbdb93e12f168eaae313326fe602c 100644 --- a/src/corelibs/U2Lang/src/run/WorkflowMonitor.cpp +++ b/src/corelibs/U2Lang/src/run/WorkflowMonitor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -36,21 +36,14 @@ namespace U2 { namespace Workflow { using namespace Monitor; -WorkerLogInfo::~WorkerLogInfo() { - foreach(ExternalToolListener* listener, logs) { - if(NULL != listener) { - delete listener; - } - } -} - const QString WorkflowMonitor::WORKFLOW_FILE_NAME("workflow.uwl"); WorkflowMonitor::WorkflowMonitor(WorkflowAbstractIterationRunner *_task, Schema *_schema) -: QObject(), schema(_schema), task(_task), saveSchema(false), started(false) + : QObject(), schema(_schema), task(_task), saveSchema(false), started(false), externalTools(false) { foreach (Actor *p, schema->getProcesses()) { procMap[p->getId()] = p; + processNames[p->getId()] = p->getLabel(); addTime(0, p->getId()); } @@ -68,6 +61,9 @@ WorkflowMonitor::WorkflowMonitor(WorkflowAbstractIterationRunner *_task, Schema info.parameters << attr; } workersParamsInfo << info; + if (p->getProto()->isExternalTool()) { + externalTools = true; + } } connect(task.data(), SIGNAL(si_updateProducers()), SIGNAL(si_updateProducers())); @@ -100,8 +96,8 @@ const QMap<QString, QMultiMap<QString, QString> > &WorkflowMonitor::getWorkersRe } QString WorkflowMonitor::actorName(const QString &id) const { - SAFE_POINT(procMap.contains(id), QString("Unknown actor id %1").arg(id), ""); - return procMap[id]->getLabel(); + SAFE_POINT(processNames.contains(id), QString("Unknown actor id: '%1'").arg(id), ""); + return processNames[id]; } void WorkflowMonitor::addOutputFile(const QString &url, const QString &producer, bool openBySystem) { @@ -114,6 +110,10 @@ void WorkflowMonitor::addOutputFile(const QString &url, const QString &producer, emit si_newOutputFile(info); } +void WorkflowMonitor::addOutputFolder(const QString &url, const QString &producer) { + addOutputFile(url, producer, true); +} + void WorkflowMonitor::addInfo(const QString &message, const QString &actor, const QString &type) { addNotification(WorkflowNotification(message, actor, type)); } @@ -170,6 +170,10 @@ void WorkflowMonitor::resume() { setRunState(false); } +bool WorkflowMonitor::isExternalToolScheme() const { + return externalTools; +} + void WorkflowMonitor::registerTask(Task *task, const QString &actor) { SAFE_POINT(procMap.contains(actor), "Unknown actor id", ); taskMap[task] = procMap[actor]; @@ -191,6 +195,22 @@ QString WorkflowMonitor::outputDir() const { return _outputDir; } +QString WorkflowMonitor::getLogsDir() const { + return outputDir() + "logs"; +} + +QString WorkflowMonitor::getLogUrl(const QString &actorId, int actorRunNumber, const QString &toolName, int toolRunNumber, int contentType) const { + WDListener *listener = getListener(actorId, actorRunNumber, toolName, toolRunNumber); + switch (contentType) { + case ExternalToolListener::OUTPUT_LOG: + return listener->getStdoutLogFileUrl(); + case ExternalToolListener::ERROR_LOG: + return listener->getStderrLogFileUrl(); + default: + FAIL(QString("An unexpected contentType: %1").arg(contentType), QString()); + } +} + void WorkflowMonitor::sl_progressChanged() { CHECK(!task.isNull(), ); emit si_progressChanged(task->getProgress()); @@ -255,14 +275,25 @@ bool WorkflowMonitor::containsOutputFile(const QString &url) const { } void WorkflowMonitor::addNotification(const WorkflowNotification ¬ification) { - const bool firstProblem = notifications.isEmpty(); + const bool firstNotification = notifications.isEmpty(); notifications << notification; - if (firstProblem) { + if (firstNotification) { emit si_firstNotification(); - emit si_taskStateChanged(RUNNING_WITH_PROBLEMS); } - emit si_newNotification(notification); + foreach(const WorkflowNotification& notification, notifications) { + if (WorkflowNotification::U2_ERROR == notification.type || WorkflowNotification::U2_WARNING == notification.type) { + emit si_taskStateChanged(RUNNING_WITH_PROBLEMS); + break; + } + } + int count = 0; + foreach (const WorkflowNotification &info, notifications) { + if (notification == info) { + count++; + } + } + emit si_newNotification(notification, count); } bool WorkflowMonitor::hasWarnings() const { @@ -284,23 +315,52 @@ void WorkflowMonitor::setSaveSchema(const Metadata &_meta) { saveSchema = true; } -QList<ExternalToolListener*> WorkflowMonitor::createWorkflowListeners(const QString& workerName, int listenersNumber) { +QList<ExternalToolListener*> WorkflowMonitor::createWorkflowListeners(const QString &workerId, const QString &workerName, int listenersNumber) { QList<ExternalToolListener*> listeners; - WorkerLogInfo& logInfo = workersLog[workerName]; - logInfo.runNumber++; + WorkerLogInfo& logInfo = workersLog[workerId]; + logInfo.workerRunNumber++; for(int i = 0; i < listenersNumber; i++) { - WDListener* newListener = new WDListener(this, workerName, logInfo.runNumber); + WDListener* newListener = new WDListener(this, workerId, workerName, logInfo.workerRunNumber); listeners.append(newListener); } logInfo.logs.append(listeners); return listeners; } + +WDListener *WorkflowMonitor::getListener(const QString &actorId, int actorRunNumber, const QString &toolName, int toolRunNumber) const { + foreach (ExternalToolListener *listener, workersLog[actorId].logs) { + WDListener *wdListener = dynamic_cast<WDListener *>(listener); + SAFE_POINT(nullptr != wdListener, "Can't cast ExternalToolListener to WDListener", nullptr); + if (actorRunNumber == wdListener->getActorRunNumber() && + actorId == wdListener->getActorId() && + toolName == wdListener->getToolName() && + toolRunNumber == wdListener->getToolRunNumber()) { + return wdListener; + } + } + return nullptr; +} + +int WorkflowMonitor::getNewToolRunNumber(const QString &actorId, int actorRunNumber, const QString &toolName) { + int toolRunNumber = 1; + foreach (ExternalToolListener *listener, workersLog[actorId].logs) { + WDListener *wdListener = dynamic_cast<WDListener *>(listener); + SAFE_POINT(nullptr != wdListener, "Can't cast ExternalToolListener to WDListener", 0); + if (toolName == wdListener->getToolName() && actorRunNumber == wdListener->getActorRunNumber()) { + toolRunNumber++; + } + } + return toolRunNumber; +} + void WorkflowMonitor::onLogChanged(const WDListener* listener, int messageType, const QString& message) { U2::Workflow::Monitor::LogEntry entry; entry.toolName = listener->getToolName(); + entry.actorId = listener->getActorId(); entry.actorName = listener->getActorName(); - entry.runNumber = listener->getRunNumber(); - entry.logType = messageType; + entry.actorRunNumber = listener->getActorRunNumber(); + entry.toolRunNumber = listener->getToolRunNumber(); + entry.contentType = messageType; entry.lastLine = message; emit si_logChanged(entry); } @@ -309,15 +369,23 @@ void WorkflowMonitor::onLogChanged(const WDListener* listener, int messageType, /* FileInfo */ /************************************************************************/ FileInfo::FileInfo( ) - : url( ), actor( ), openBySystem(false) + : url( ), actor( ), openBySystem(false), isDir(false) { } FileInfo::FileInfo(const QString &_url, const QString &_producer, bool _openBySystem) -: url(_url), actor(_producer), openBySystem(_openBySystem) + : url(_url), + actor(_producer), + openBySystem(_openBySystem), + isDir(QFileInfo(url).isDir()) { - + if (isDir) { + openBySystem = true; + if (url.endsWith("/")) { + url.chop(1); + } + } } bool FileInfo::operator== (const FileInfo &other) const { @@ -387,23 +455,16 @@ const bool Registrator::isMetaRegistered = registerMeta(); /************************************************************************/ /* WDListener */ /************************************************************************/ -WDListener::WDListener(WorkflowMonitor *_monitor, const QString &_actorName, int _runNumber) +WDListener::WDListener(WorkflowMonitor *_monitor, const QString &_actorId, const QString &_actorName, int _actorRunNumber) : monitor(_monitor), + actorId(_actorId), actorName(_actorName), - runNumber(_runNumber), + actorRunNumber(_actorRunNumber), + toolRunNumber(0), outputHasMessages(false), errorHasMessages(false) { - const QString logsDir = monitor->outputDir() + "logs"; - FileAndDirectoryUtils::createWorkingDir("", FileAndDirectoryUtils::CUSTOM, logsDir, ""); - - outputLogFile.setFileName(GUrlUtils::rollFileName(logsDir + "/" + getStandardOutputLogFileUrl(actorName, runNumber), "_")); - outputLogFile.open(QIODevice::WriteOnly); - outputLogStream.setDevice(&outputLogFile); - - errorLogFile.setFileName(GUrlUtils::rollFileName(logsDir + "/" + getStandardErrorLogFileUrl(actorName, runNumber), "_")); - errorLogFile.open(QIODevice::WriteOnly); - errorLogStream.setDevice(&errorLogFile); + FileAndDirectoryUtils::createWorkingDir("", FileAndDirectoryUtils::CUSTOM, monitor->getLogsDir(), ""); } void WDListener::addNewLogMessage(const QString& message, int messageType) { @@ -414,17 +475,63 @@ void WDListener::addNewLogMessage(const QString& message, int messageType) { monitor->onLogChanged(this, messageType, message); } -QString WDListener::getStandardOutputLogFileUrl(const QString &actorName, int runNumber) { - return actorName + "_" + QString::number(runNumber) + "_standard_output_log.txt"; +void WDListener::setToolName(const QString &toolName) { + toolRunNumber = monitor->getNewToolRunNumber(actorId, actorRunNumber, toolName); + ExternalToolListener::setToolName(toolName); +} + +QString WDListener::getStdoutLogFileUrl() { + if (!outputLogFile.isOpen()) { + initLogFile(OUTPUT_LOG); + } + return outputLogFile.fileName(); +} + +QString WDListener::getStderrLogFileUrl() { + if (!errorLogFile.isOpen()) { + initLogFile(ERROR_LOG); + } + return errorLogFile.fileName(); } -QString WDListener::getStandardErrorLogFileUrl(const QString &actorName, int runNumber) { - return actorName + "_" + QString::number(runNumber) + "_error_output_log.txt"; +QString WDListener::getStdoutLogFileUrl(const QString &actorId, int runNumber, const QString &toolName, int toolRunNumber) { + return actorId + "_run_" + QString::number(runNumber) + "_" + + toolName + "_run_" + QString::number(toolRunNumber) + + "_stdout_log.txt"; +} + +QString WDListener::getStderrLogFileUrl(const QString &actorId, int runNumber, const QString &toolName, int toolRunNumber) { + return actorId + "_run_" + QString::number(runNumber) + "_" + + toolName + "_run_" + QString::number(toolRunNumber) + + "_stderr_log.txt"; +} + +void WDListener::initLogFile(int contentType) { + const QString logsDir = monitor->getLogsDir(); + switch (contentType) { + case OUTPUT_LOG: + CHECK(!outputLogFile.isOpen(), ); + outputLogFile.setFileName(GUrlUtils::rollFileName(logsDir + "/" + getStdoutLogFileUrl(actorName, actorRunNumber, getToolName(), toolRunNumber), "_")); + outputLogFile.open(QIODevice::WriteOnly); + outputLogStream.setDevice(&outputLogFile); + break; + case ERROR_LOG: + CHECK(!errorLogFile.isOpen(), ); + errorLogFile.setFileName(GUrlUtils::rollFileName(logsDir + "/" + getStderrLogFileUrl(actorName, actorRunNumber, getToolName(), toolRunNumber), "_")); + errorLogFile.open(QIODevice::WriteOnly); + errorLogStream.setDevice(&errorLogFile); + break; + default: + FAIL(QString("An unexpected contentType: %1").arg(contentType), ); + } } void WDListener::writeToFile(int messageType, const QString &message) { switch (messageType) { case OUTPUT_LOG: + if (!outputLogFile.isOpen()) { + initLogFile(OUTPUT_LOG); + } writeToFile(outputLogStream, message); if (!outputHasMessages) { outputLogStream.flush(); @@ -432,6 +539,9 @@ void WDListener::writeToFile(int messageType, const QString &message) { } break; case ERROR_LOG: + if (!errorLogFile.isOpen()) { + initLogFile(ERROR_LOG); + } writeToFile(errorLogStream, message); if (!errorHasMessages) { errorLogStream.flush(); diff --git a/src/corelibs/U2Lang/src/run/WorkflowMonitor.h b/src/corelibs/U2Lang/src/run/WorkflowMonitor.h index 5c49b5124f79d6f1bbf555b5f71509210cf5188e..1da971a7a7ea2d5de50af7264bb9d61615d5193b 100644 --- a/src/corelibs/U2Lang/src/run/WorkflowMonitor.h +++ b/src/corelibs/U2Lang/src/run/WorkflowMonitor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -42,12 +42,15 @@ namespace Monitor { public: FileInfo( ); FileInfo(const QString &url, const QString &producer, bool openBySystem = false); + QString url; QString actor; bool openBySystem; + bool isDir; bool operator== (const FileInfo &other) const; }; + class U2LANG_EXPORT WorkerInfo { public: WorkerInfo(); @@ -63,21 +66,23 @@ namespace Monitor { }; class U2LANG_EXPORT WorkerLogInfo { public: - WorkerLogInfo(): runNumber(0){} - ~WorkerLogInfo(); - int runNumber; + WorkerLogInfo(): workerRunNumber(0){} + int workerRunNumber; QList<ExternalToolListener*> logs; }; class U2LANG_EXPORT LogEntry { public: LogEntry() : - runNumber(0), - logType(0) {} + actorRunNumber(0), + toolRunNumber(0), + contentType(0) {} QString toolName; + QString actorId; QString actorName; - int runNumber; - int logType; + int actorRunNumber; + int toolRunNumber; + int contentType; QString lastLine; }; @@ -107,6 +112,7 @@ public: bool containsOutputFile(const QString &url) const; void addOutputFile(const QString &url, const QString &producer, bool openBySystem = false); + void addOutputFolder(const QString &url, const QString &producer); void addInfo(const QString &message, const QString &actor, const QString &type = WorkflowNotification::U2_INFO); void addError(const QString &message, const QString &actor, const QString &type = WorkflowNotification::U2_ERROR); /** Can be called only one time for the task */ @@ -118,15 +124,20 @@ public: void start(); void pause(); void resume(); + bool isExternalToolScheme() const; void registerTask(Task *task, const QString &actor); void setOutputDir(const QString &dir); QString outputDir() const; + QString getLogsDir() const; + QString getLogUrl(const QString &actorId, int actorRunNumber, const QString &toolName, int toolRunNumber, int contentType) const; void setSaveSchema(const Metadata &meta); - QList<ExternalToolListener*> createWorkflowListeners(const QString& workerName, int listenersNumber = 1); + QList<ExternalToolListener*> createWorkflowListeners(const QString &workerId, const QString& workerName, int listenersNumber = 1); + WDListener *getListener(const QString &actorId, int actorRunNumber, const QString &toolName, int toolRunNumber) const; + int getNewToolRunNumber(const QString &actorId, int actorRunNumber, const QString &toolName); void onLogChanged(const WDListener* listener, int messageType, const QString& message); @@ -139,33 +150,35 @@ public slots: signals: void si_firstNotification(); - void si_newOutputFile(const U2::Workflow::Monitor::FileInfo &info); - void si_newNotification(const WorkflowNotification &info); - void si_workerInfoChanged(const QString &actor, const U2::Workflow::Monitor::WorkerInfo &info); + void si_newOutputFile(const Monitor::FileInfo &info); + void si_newNotification(const WorkflowNotification &info, int count); + void si_workerInfoChanged(const QString &actor, const Monitor::WorkerInfo &info); void si_progressChanged(int progress); void si_runStateChanged(bool paused); void si_taskStateChanged(Monitor::TaskState state); void si_updateProducers(); void si_report(); void si_dirSet(const QString &dir); - void si_logChanged(U2::Workflow::Monitor::LogEntry entry); + void si_logChanged(Monitor::LogEntry entry); private: - Schema *schema; - QScopedPointer<Metadata> meta; - QPointer<WorkflowAbstractIterationRunner> task; - QMap<QString, Actor*> procMap; - QMap<Task*, Actor*> taskMap; - QList<Task*> errorTasks; - QList<Monitor::FileInfo> outputFiles; - NotificationsList notifications; - QMap<QString, Monitor::WorkerInfo> workers; - QList<Monitor::WorkerParamsInfo> workersParamsInfo; - QMap<QString, Monitor::WorkerLogInfo> workersLog; + Schema *schema; + QScopedPointer<Metadata> meta; + QPointer<WorkflowAbstractIterationRunner> task; + QMap<QString, QPointer<Actor> > procMap; + StrStrMap processNames; + QMap<Task*, Actor*> taskMap; + QList<Task*> errorTasks; + QList<Monitor::FileInfo> outputFiles; + NotificationsList notifications; + QMap<QString, Monitor::WorkerInfo> workers; + QList<Monitor::WorkerParamsInfo> workersParamsInfo; + QMap<QString, Monitor::WorkerLogInfo> workersLog; QMap<QString, QMultiMap<QString, QString> > workersReports; // workerId<taskName, taskReport> > - QString _outputDir; + QString _outputDir; bool saveSchema; bool started; + bool externalTools; protected: void setWorkerInfo(const QString &actorId, const Monitor::WorkerInfo &info); @@ -182,26 +195,37 @@ public: static QString toSlashedUrl(const QString &url); }; -class U2LANG_EXPORT WDListener: public ExternalToolListener{ +class U2LANG_EXPORT WDListener: public ExternalToolListener { public: - WDListener(WorkflowMonitor* _monitor, const QString& _actorName, int _runNumber); + WDListener(WorkflowMonitor *monitor, const QString& actorId, const QString &actorName, int actorRunNumber); + + void addNewLogMessage(const QString& message, int messageType) override; - void addNewLogMessage(const QString& message, int messageType); + void setToolName(const QString& toolName) override; + const QString& getActorId() const {return actorId;} const QString& getActorName() const {return actorName;} - int getRunNumber() const {return runNumber;} + int getActorRunNumber() const {return actorRunNumber;} + int getToolRunNumber() const {return toolRunNumber;} - static QString getStandardOutputLogFileUrl(const QString &actorName, int runNumber); - static QString getStandardErrorLogFileUrl(const QString &actorName, int runNumber); + QString getStdoutLogFileUrl(); + QString getStderrLogFileUrl(); private: + static QString getStdoutLogFileUrl(const QString &actorName, int actorRunNumber, const QString &toolName, int toolRunNumber); + static QString getStderrLogFileUrl(const QString &actorName, int actorRunNumber, const QString &toolName, int toolRunNumber); + + void initLogFile(int contentType); + void writeToFile(int messageType, const QString& message); static void writeToFile(QTextStream &logStream, const QString& message); WorkflowMonitor* monitor; + QString actorId; QString actorName; - int runNumber; + int actorRunNumber; + int toolRunNumber; QFile outputLogFile; QFile errorLogFile; @@ -218,5 +242,6 @@ Q_DECLARE_METATYPE( U2::Workflow::Monitor::TaskState ) Q_DECLARE_METATYPE( U2::Workflow::Monitor::FileInfo ) Q_DECLARE_METATYPE( U2::Workflow::Monitor::WorkerInfo ) Q_DECLARE_METATYPE( U2::Workflow::Monitor::LogEntry ) +Q_DECLARE_METATYPE( U2::Workflow::Monitor::WorkerParamsInfo ) #endif // _U2_WORKFLOWMONITOR_H_ diff --git a/src/corelibs/U2Lang/src/support/AttributeInfo.cpp b/src/corelibs/U2Lang/src/support/AttributeInfo.cpp index 8758cb842d6a1699959aada229ed27f54bcfb3aa..4feca89f495e76a14270fb2df31717ec9f9fea71 100644 --- a/src/corelibs/U2Lang/src/support/AttributeInfo.cpp +++ b/src/corelibs/U2Lang/src/support/AttributeInfo.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/AttributeInfo.h b/src/corelibs/U2Lang/src/support/AttributeInfo.h index 7036ec7914e27c41c28639cbcd54c90e921360b1..7348ea78a4aa99bbcc8e9a42579065dc7bbda730 100644 --- a/src/corelibs/U2Lang/src/support/AttributeInfo.h +++ b/src/corelibs/U2Lang/src/support/AttributeInfo.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/BaseBreakpointHitCounter.cpp b/src/corelibs/U2Lang/src/support/BaseBreakpointHitCounter.cpp index ede9a236453b70c3b8bb5c0b62fdd91f610dbe13..60112790020812cbadf4beef79f023239b0a90b7 100644 --- a/src/corelibs/U2Lang/src/support/BaseBreakpointHitCounter.cpp +++ b/src/corelibs/U2Lang/src/support/BaseBreakpointHitCounter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/BaseBreakpointHitCounter.h b/src/corelibs/U2Lang/src/support/BaseBreakpointHitCounter.h index 92c3e0cb4c0a92bc377f79695aec370847a17201..53f358f82770fa8c8ca4a1fab668a65435ca7cf9 100644 --- a/src/corelibs/U2Lang/src/support/BaseBreakpointHitCounter.h +++ b/src/corelibs/U2Lang/src/support/BaseBreakpointHitCounter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/BaseNGSWorker.cpp b/src/corelibs/U2Lang/src/support/BaseNGSWorker.cpp index dba7931da86c4b87a3bd0c65a6cee4156a838c1f..3cb83df4ffdfbad74c5f40327fd78ba6b6a4b13e 100644 --- a/src/corelibs/U2Lang/src/support/BaseNGSWorker.cpp +++ b/src/corelibs/U2Lang/src/support/BaseNGSWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -223,15 +223,15 @@ void BaseNGSTask::run(){ finishStep(); } -ExternalToolRunTask *BaseNGSTask::getExternalToolTask(const QString &toolName, ExternalToolLogParser *customParser) { +ExternalToolRunTask *BaseNGSTask::getExternalToolTask(const QString &toolId, ExternalToolLogParser *customParser) { const QStringList args = getParameters(stateInfo); CHECK_OP(stateInfo, NULL); ExternalToolRunTask* etTask = NULL; if (customParser == NULL) { - etTask = new ExternalToolRunTask(toolName, args, new BaseNGSParser(), settings.outDir); + etTask = new ExternalToolRunTask(toolId, args, new BaseNGSParser(), settings.outDir); } else { - etTask = new ExternalToolRunTask(toolName, args, customParser, settings.outDir); + etTask = new ExternalToolRunTask(toolId, args, customParser, settings.outDir); } etTask->setStandartOutputFile(settings.outDir + settings.outName); diff --git a/src/corelibs/U2Lang/src/support/BaseNGSWorker.h b/src/corelibs/U2Lang/src/support/BaseNGSWorker.h index 0ee9120cfe65c96e7c2cb82819daa011062b6292..cb9c876d9e67a1be8f9b7ab8b6b39b089682f942 100644 --- a/src/corelibs/U2Lang/src/support/BaseNGSWorker.h +++ b/src/corelibs/U2Lang/src/support/BaseNGSWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -104,7 +104,7 @@ protected: /** * Don't delete customParser, it will be deleted automatically. */ - virtual ExternalToolRunTask* getExternalToolTask (const QString& toolName, ExternalToolLogParser *customParser = NULL); + virtual ExternalToolRunTask* getExternalToolTask (const QString& toolId, ExternalToolLogParser *customParser = NULL); virtual QStringList getParameters(U2OpStatus& os) = 0; protected: diff --git a/src/corelibs/U2Lang/src/support/BreakpointConditionChecker.cpp b/src/corelibs/U2Lang/src/support/BreakpointConditionChecker.cpp index 735c949eedd074e7452af4ebd63eee4a36ff2542..c7c0988c300cc72436f1978a1c0ddbb47b9bda29 100644 --- a/src/corelibs/U2Lang/src/support/BreakpointConditionChecker.cpp +++ b/src/corelibs/U2Lang/src/support/BreakpointConditionChecker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/BreakpointConditionChecker.h b/src/corelibs/U2Lang/src/support/BreakpointConditionChecker.h index 9baa1fcc28aae6568eb4878959ae7ff0c41828ad..f08d4c87c68346b3a9f43ae0d8de40aa8ecc8124 100644 --- a/src/corelibs/U2Lang/src/support/BreakpointConditionChecker.h +++ b/src/corelibs/U2Lang/src/support/BreakpointConditionChecker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/BreakpointEqualHitCounter.cpp b/src/corelibs/U2Lang/src/support/BreakpointEqualHitCounter.cpp index eb285f426f563333229f0e73828e277474b97194..563df4146cb718c99bb42e5124f71049f97618e2 100644 --- a/src/corelibs/U2Lang/src/support/BreakpointEqualHitCounter.cpp +++ b/src/corelibs/U2Lang/src/support/BreakpointEqualHitCounter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/BreakpointEqualHitCounter.h b/src/corelibs/U2Lang/src/support/BreakpointEqualHitCounter.h index 79d8d995eb30c1cfa777885c5b1585d01ef59b1b..a716ffbec884e0f9e0db5be9b680cc180e3f62f8 100644 --- a/src/corelibs/U2Lang/src/support/BreakpointEqualHitCounter.h +++ b/src/corelibs/U2Lang/src/support/BreakpointEqualHitCounter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/BreakpointGreaterOrEqualHitCounter.cpp b/src/corelibs/U2Lang/src/support/BreakpointGreaterOrEqualHitCounter.cpp index 79ae637fd807c9dfc1ebf9b5e0959a06fae67605..e9f43d3c4cd96261d5cc845a11e520d8e9c6680d 100644 --- a/src/corelibs/U2Lang/src/support/BreakpointGreaterOrEqualHitCounter.cpp +++ b/src/corelibs/U2Lang/src/support/BreakpointGreaterOrEqualHitCounter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/BreakpointGreaterOrEqualHitCounter.h b/src/corelibs/U2Lang/src/support/BreakpointGreaterOrEqualHitCounter.h index 86a6200f28e412359deb8344d5f6fb92ebc84ea7..bbccec17d5f28636c38f12180279cdfbdb228ef4 100644 --- a/src/corelibs/U2Lang/src/support/BreakpointGreaterOrEqualHitCounter.h +++ b/src/corelibs/U2Lang/src/support/BreakpointGreaterOrEqualHitCounter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/BreakpointMultipleHitCounter.cpp b/src/corelibs/U2Lang/src/support/BreakpointMultipleHitCounter.cpp index 0a0a15ab59d0838f1defd5a4edbfdc3a5d8309ea..12d69b0386c46b1aa566641372604459039e731b 100644 --- a/src/corelibs/U2Lang/src/support/BreakpointMultipleHitCounter.cpp +++ b/src/corelibs/U2Lang/src/support/BreakpointMultipleHitCounter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/BreakpointMultipleHitCounter.h b/src/corelibs/U2Lang/src/support/BreakpointMultipleHitCounter.h index 9e7be18b4822ed81317473f431e5979133084612..901d1fc827abd81bb02131901b4827f40cc7f930 100644 --- a/src/corelibs/U2Lang/src/support/BreakpointMultipleHitCounter.h +++ b/src/corelibs/U2Lang/src/support/BreakpointMultipleHitCounter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/CoreLibConstants.cpp b/src/corelibs/U2Lang/src/support/CoreLibConstants.cpp index 5dff872d1fbd5b0461fffbcac2a89d8ee1173910..86768c89a2825f1e0270f53572005b7114b50ece 100644 --- a/src/corelibs/U2Lang/src/support/CoreLibConstants.cpp +++ b/src/corelibs/U2Lang/src/support/CoreLibConstants.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/CoreLibConstants.h b/src/corelibs/U2Lang/src/support/CoreLibConstants.h index 9a113b8a51d01856490a5bb1cc8d5ba8a9438c2f..dce677d5625cebaf65d2e5faca8ac18c5dad7842 100644 --- a/src/corelibs/U2Lang/src/support/CoreLibConstants.h +++ b/src/corelibs/U2Lang/src/support/CoreLibConstants.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/DatasetFetcher.cpp b/src/corelibs/U2Lang/src/support/DatasetFetcher.cpp index 36496f385a715acd4fb5fdf3c02b7dd97bb74265..d4d78b6008987b6d40b484831153f1a0b364485f 100644 --- a/src/corelibs/U2Lang/src/support/DatasetFetcher.cpp +++ b/src/corelibs/U2Lang/src/support/DatasetFetcher.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/DatasetFetcher.h b/src/corelibs/U2Lang/src/support/DatasetFetcher.h index bcebe28f595b1b694b1e3aa992fd6d30ec622d00..2f62a8fdaf264fede36a142fea1aeac716f7ca79 100644 --- a/src/corelibs/U2Lang/src/support/DatasetFetcher.h +++ b/src/corelibs/U2Lang/src/support/DatasetFetcher.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/ElapsedTimeUpdater.cpp b/src/corelibs/U2Lang/src/support/ElapsedTimeUpdater.cpp index 1b4ae24ea4045c8b741a16a3d807ea7ab3fb2e25..d7b8dbdc6d2986ea594928d30bce0b14fd494ff4 100644 --- a/src/corelibs/U2Lang/src/support/ElapsedTimeUpdater.cpp +++ b/src/corelibs/U2Lang/src/support/ElapsedTimeUpdater.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/ElapsedTimeUpdater.h b/src/corelibs/U2Lang/src/support/ElapsedTimeUpdater.h index 471525dddbe19a1f0d795f280b6f1626499769dd..3e90bf95ebc3e7b90c889a46c5464887c27f787a 100644 --- a/src/corelibs/U2Lang/src/support/ElapsedTimeUpdater.h +++ b/src/corelibs/U2Lang/src/support/ElapsedTimeUpdater.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/IntegralBusUtils.cpp b/src/corelibs/U2Lang/src/support/IntegralBusUtils.cpp index 66c62c0335145a423c243b7be3efcdb202137e8e..34426d20ca09d42313781cd1e927e8b82a1ccc1a 100644 --- a/src/corelibs/U2Lang/src/support/IntegralBusUtils.cpp +++ b/src/corelibs/U2Lang/src/support/IntegralBusUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/IntegralBusUtils.h b/src/corelibs/U2Lang/src/support/IntegralBusUtils.h index c4b7bd690698e42908f0a66375b38a8090002df7..c3904478546eec84ecca439a8f243c969b7a8adb 100644 --- a/src/corelibs/U2Lang/src/support/IntegralBusUtils.h +++ b/src/corelibs/U2Lang/src/support/IntegralBusUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/MapDatatypeEditor.cpp b/src/corelibs/U2Lang/src/support/MapDatatypeEditor.cpp index 69116faf02ee7e3d27447fbc421eb9e35ea0ed1e..83c6a68dda403624c2bc606e4807d1d1739c43e1 100644 --- a/src/corelibs/U2Lang/src/support/MapDatatypeEditor.cpp +++ b/src/corelibs/U2Lang/src/support/MapDatatypeEditor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -345,6 +345,7 @@ QWidget *DescriptorListEditorDelegate::createEditor(QWidget *parent, { QComboBox* editor = new QComboBox(parent); editor->setSizeAdjustPolicy(QComboBox::AdjustToContentsOnFirstShow); + connect(editor, SIGNAL(currentIndexChanged(int)), SLOT(sl_commitData())); return editor; } @@ -453,6 +454,10 @@ void DescriptorListEditorDelegate::setModelData(QWidget *editor, QAbstractItemMo model->setData(index, value.value<Descriptor>().getDisplayName(), Qt::DisplayRole); } +void DescriptorListEditorDelegate::sl_commitData() { + commitData(qobject_cast<QWidget*>(sender())); +} + /************************************************************************/ /* ItemDelegateForHeaders */ /************************************************************************/ diff --git a/src/corelibs/U2Lang/src/support/MapDatatypeEditor.h b/src/corelibs/U2Lang/src/support/MapDatatypeEditor.h index d44d530f1d503f30e543d56dd3db28dd0788b0d9..2ebb4416675f3dd5e825de1e5a7a31a293d1d1a6 100644 --- a/src/corelibs/U2Lang/src/support/MapDatatypeEditor.h +++ b/src/corelibs/U2Lang/src/support/MapDatatypeEditor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -108,9 +108,8 @@ public: virtual void setEditorData(QWidget *editor, const QModelIndex &index) const; virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const; - //void updateEditorGeometry(QWidget *editor, - // const QStyleOptionViewItem &option, const QModelIndex &index) const; - +private slots: + void sl_commitData(); }; // DescriptorListEditorDelegate class ItemDelegateForHeaders : public QItemDelegate { diff --git a/src/corelibs/U2Lang/src/support/MarkerUtils.cpp b/src/corelibs/U2Lang/src/support/MarkerUtils.cpp index 7c2de40b78f47d06e50f74ed913a2189b8435df7..076af0eff15ad31d5e021bba3d56ff4485eed621 100644 --- a/src/corelibs/U2Lang/src/support/MarkerUtils.cpp +++ b/src/corelibs/U2Lang/src/support/MarkerUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/MarkerUtils.h b/src/corelibs/U2Lang/src/support/MarkerUtils.h index ae161df8a964b86f772dcae7f15c328b70ccb510..bde91cffb5e0ec82505a69aecf278b70dcb0c55d 100644 --- a/src/corelibs/U2Lang/src/support/MarkerUtils.h +++ b/src/corelibs/U2Lang/src/support/MarkerUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/NoFailTaskWrapper.cpp b/src/corelibs/U2Lang/src/support/NoFailTaskWrapper.cpp index 2969a56ddfbf55aff99ba16d74f8bd191fda05a6..2aec35f280fe7277ef103103012db98cf5f93e61 100644 --- a/src/corelibs/U2Lang/src/support/NoFailTaskWrapper.cpp +++ b/src/corelibs/U2Lang/src/support/NoFailTaskWrapper.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/NoFailTaskWrapper.h b/src/corelibs/U2Lang/src/support/NoFailTaskWrapper.h index af79a32a902d9ea58ee0661ee0ace47f31601afe..7cb8133160f9f6c3cfaeee43cfb3abc5453851df 100644 --- a/src/corelibs/U2Lang/src/support/NoFailTaskWrapper.h +++ b/src/corelibs/U2Lang/src/support/NoFailTaskWrapper.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/SchemaSerializer.cpp b/src/corelibs/U2Lang/src/support/SchemaSerializer.cpp index 3341d99443e32e5ae410b3c192378b52e9e28e65..a4d9171a6cf00f635ad0c36c9de096eebbd76b4e 100644 --- a/src/corelibs/U2Lang/src/support/SchemaSerializer.cpp +++ b/src/corelibs/U2Lang/src/support/SchemaSerializer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/SchemaSerializer.h b/src/corelibs/U2Lang/src/support/SchemaSerializer.h index cbea6f9fd1948964b5e037b817766bd839bd7d6a..bf238ffeaee7c03df1382e86f8708c35c43499bc 100644 --- a/src/corelibs/U2Lang/src/support/SchemaSerializer.h +++ b/src/corelibs/U2Lang/src/support/SchemaSerializer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/ScriptWorkerSerializer.cpp b/src/corelibs/U2Lang/src/support/ScriptWorkerSerializer.cpp index a674a5c6349d4605707e20110c7c81f7d0a8cd5b..521c5c0d5dd24b2966b888746cb5ed3ffed0f910 100644 --- a/src/corelibs/U2Lang/src/support/ScriptWorkerSerializer.cpp +++ b/src/corelibs/U2Lang/src/support/ScriptWorkerSerializer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/ScriptWorkerSerializer.h b/src/corelibs/U2Lang/src/support/ScriptWorkerSerializer.h index a81554fa542f4d38c9ae690e9129f731a108af77..a292bfb6eef77cb74f6042cc6aaa1afe5ba69436 100644 --- a/src/corelibs/U2Lang/src/support/ScriptWorkerSerializer.h +++ b/src/corelibs/U2Lang/src/support/ScriptWorkerSerializer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/SimpleWorkflowTask.cpp b/src/corelibs/U2Lang/src/support/SimpleWorkflowTask.cpp index ef8cd080e0162df0b32491ec601a5157ea808e9e..2ecb3185d7b582936a7625069ed6699d989d5681 100644 --- a/src/corelibs/U2Lang/src/support/SimpleWorkflowTask.cpp +++ b/src/corelibs/U2Lang/src/support/SimpleWorkflowTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/SimpleWorkflowTask.h b/src/corelibs/U2Lang/src/support/SimpleWorkflowTask.h index 6d628cd868a4ec77b314d611db131a37b1c1e92b..f61d40d23fb9c0f69cbe4db4976765d52c3b697b 100644 --- a/src/corelibs/U2Lang/src/support/SimpleWorkflowTask.h +++ b/src/corelibs/U2Lang/src/support/SimpleWorkflowTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/SupportClass.cpp b/src/corelibs/U2Lang/src/support/SupportClass.cpp index e80729e44454c634599fed8a99da9541cf15b9e0..5294e824e4ea4cdceb91626a6506534b538703e3 100644 --- a/src/corelibs/U2Lang/src/support/SupportClass.cpp +++ b/src/corelibs/U2Lang/src/support/SupportClass.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,14 +30,14 @@ const QString WorkflowNotification::U2_ERROR = "error"; const QString WorkflowNotification::U2_WARNING = "warning"; const QString WorkflowNotification::U2_INFO = "info"; -WorkflowNotification::WorkflowNotification(const QString &_message, const QString &_actor, const QString& _type) +WorkflowNotification::WorkflowNotification(const QString &_message, const QString &_actorId, const QString& _type) : message(_message), - actor(_actor), + actorId(_actorId), type(_type) { } bool WorkflowNotification::operator== (const WorkflowNotification &other) const { - return (actor == other.actor) && + return (actorId == other.actorId) && (message == other.message) && (type == other.type); } diff --git a/src/corelibs/U2Lang/src/support/SupportClass.h b/src/corelibs/U2Lang/src/support/SupportClass.h index b7609ea2de0d5c05e7350832354f0444de49d3cf..49e618a67ed9971f0aeb75fb751c162c4e5f762e 100644 --- a/src/corelibs/U2Lang/src/support/SupportClass.h +++ b/src/corelibs/U2Lang/src/support/SupportClass.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,16 +32,17 @@ namespace U2 { class WorkflowNotification; typedef QList<WorkflowNotification> NotificationsList; -#define ACTOR_REF (Qt::UserRole) +#define ACTOR_ID_REF (Qt::UserRole) #define PORT_REF (Qt::UserRole + 1) #define TEXT_REF (Qt::UserRole + 3) #define TYPE_REF (Qt::UserRole + 4) +#define ACTOR_NAME_REF (Qt::UserRole + 5) class U2LANG_EXPORT WorkflowNotification { public: - WorkflowNotification(const QString &message = "", const QString &actor = "", const QString &_type = U2_ERROR); + WorkflowNotification(const QString &message = "", const QString &actorId = "", const QString &type = U2_ERROR); QString message; - QString actor; + QString actorId; QString type; QString port; diff --git a/src/corelibs/U2Lang/src/support/SupportStructures.cpp b/src/corelibs/U2Lang/src/support/SupportStructures.cpp index e39bfdcc882635dd2df9058042bc46f8864b6cff..3e71a9343ce14d7cdd0ca47973413915cdab682a 100644 --- a/src/corelibs/U2Lang/src/support/SupportStructures.cpp +++ b/src/corelibs/U2Lang/src/support/SupportStructures.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/SupportStructures.h b/src/corelibs/U2Lang/src/support/SupportStructures.h index 17851c6247930eafd8555e081c27ace25554776b..16e59a836c166789162a943d2e7aff2d0fe7c33a 100644 --- a/src/corelibs/U2Lang/src/support/SupportStructures.h +++ b/src/corelibs/U2Lang/src/support/SupportStructures.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/WorkflowBreakpoint.cpp b/src/corelibs/U2Lang/src/support/WorkflowBreakpoint.cpp index 12e72921a560c847368c973a2d02d1528861470d..8b1332d77d0e1047d63d4d8c384b2501549dc4bc 100644 --- a/src/corelibs/U2Lang/src/support/WorkflowBreakpoint.cpp +++ b/src/corelibs/U2Lang/src/support/WorkflowBreakpoint.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/WorkflowBreakpoint.h b/src/corelibs/U2Lang/src/support/WorkflowBreakpoint.h index 77cdc09ee97ec51c5804745e93da986e91548fbb..b386f657474342a6862c8500d0cdee1df34ba13f 100644 --- a/src/corelibs/U2Lang/src/support/WorkflowBreakpoint.h +++ b/src/corelibs/U2Lang/src/support/WorkflowBreakpoint.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/WorkflowBreakpointSharedInfo.cpp b/src/corelibs/U2Lang/src/support/WorkflowBreakpointSharedInfo.cpp index 725df653c062f0c5266c0aa653caca9e4d37102f..0482b3b5e8116fe4f1f86cd4a178be8a5b132bf0 100644 --- a/src/corelibs/U2Lang/src/support/WorkflowBreakpointSharedInfo.cpp +++ b/src/corelibs/U2Lang/src/support/WorkflowBreakpointSharedInfo.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/WorkflowBreakpointSharedInfo.h b/src/corelibs/U2Lang/src/support/WorkflowBreakpointSharedInfo.h index 8048ac5a65b691a758305b5b3e0b495b463778a4..d31d54c4bdda181e860c23092d3e96b7360272af 100644 --- a/src/corelibs/U2Lang/src/support/WorkflowBreakpointSharedInfo.h +++ b/src/corelibs/U2Lang/src/support/WorkflowBreakpointSharedInfo.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/WorkflowDebugMessageParser.cpp b/src/corelibs/U2Lang/src/support/WorkflowDebugMessageParser.cpp index a75fa3b95180a14200a38c2f58c01973738e02a5..964a2d85618040ae32a8d175050f7f4f8770a12a 100644 --- a/src/corelibs/U2Lang/src/support/WorkflowDebugMessageParser.cpp +++ b/src/corelibs/U2Lang/src/support/WorkflowDebugMessageParser.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/WorkflowDebugMessageParser.h b/src/corelibs/U2Lang/src/support/WorkflowDebugMessageParser.h index 9d21138aa4a7875c996021db1c32c5efdadf08fe..ab47d60ffe3878b37531cba2323e906328fd7cf5 100644 --- a/src/corelibs/U2Lang/src/support/WorkflowDebugMessageParser.h +++ b/src/corelibs/U2Lang/src/support/WorkflowDebugMessageParser.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/WorkflowDebugStatus.cpp b/src/corelibs/U2Lang/src/support/WorkflowDebugStatus.cpp index f59b9b3c09dff4516ef56ba697db8fddf8d34d9e..e70a9c5a04b765d48a81572d79ce6f98677e1959 100644 --- a/src/corelibs/U2Lang/src/support/WorkflowDebugStatus.cpp +++ b/src/corelibs/U2Lang/src/support/WorkflowDebugStatus.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/WorkflowDebugStatus.h b/src/corelibs/U2Lang/src/support/WorkflowDebugStatus.h index 5838d7446b1627c3e78ae37c9999e2c46e5682eb..1e34968eeff9f824207b9b529489d7be13ce9381 100644 --- a/src/corelibs/U2Lang/src/support/WorkflowDebugStatus.h +++ b/src/corelibs/U2Lang/src/support/WorkflowDebugStatus.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/WorkflowEnvImpl.cpp b/src/corelibs/U2Lang/src/support/WorkflowEnvImpl.cpp index b703e510329c1ee95166aa02b26e579c31215a5c..96f71d169b2ede7ed1945c8f8fd474d75ad7799c 100644 --- a/src/corelibs/U2Lang/src/support/WorkflowEnvImpl.cpp +++ b/src/corelibs/U2Lang/src/support/WorkflowEnvImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -39,11 +39,11 @@ DataTypeRegistry * WorkflowEnvImpl::initDataRegistry() { qRegisterMetaTypeStreamOperators<StrStrMap>("StrStrMap"); qRegisterMetaTypeStreamOperators<CfgMap>("CfgMap"); qRegisterMetaTypeStreamOperators<IterationCfg>("IterationCfg"); - qRegisterMetaType<U2::Workflow::Monitor::FileInfo>( "U2::Workflow::Monitor::FileInfo" ); - qRegisterMetaType<WorkflowNotification>( "WorkflowNotification" ); - qRegisterMetaType<U2::Workflow::Monitor::WorkerInfo>( "U2::Workflow::Monitor::WorkerInfo" ); - qRegisterMetaType<U2::Workflow::Monitor::LogEntry>( "U2::Workflow::Monitor::LogEntry" ); - qRegisterMetaType<U2::ActorId>( "U2::ActorId" ); + qRegisterMetaType<Monitor::FileInfo>("Monitor::FileInfo"); + qRegisterMetaType<WorkflowNotification>("WorkflowNotification"); + qRegisterMetaType<Monitor::WorkerInfo>("Monitor::WorkerInfo"); + qRegisterMetaType<Monitor::LogEntry>("Monitor::LogEntry"); + qRegisterMetaType<ActorId>("ActorId"); DataTypeRegistry *r = new DataTypeRegistry(); diff --git a/src/corelibs/U2Lang/src/support/WorkflowEnvImpl.h b/src/corelibs/U2Lang/src/support/WorkflowEnvImpl.h index 8077416f89d8a892e653e146fc8e24b19aa78ab2..94f1d3fd578774eb20f3325b5d0c068770f87276 100644 --- a/src/corelibs/U2Lang/src/support/WorkflowEnvImpl.h +++ b/src/corelibs/U2Lang/src/support/WorkflowEnvImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/WorkflowIOTasks.cpp b/src/corelibs/U2Lang/src/support/WorkflowIOTasks.cpp index 0200d2974b848200450da4bec8d3cf95cee791ec..ac9d7fa6554ba575fa7362d5f11e4a082b9eb780 100644 --- a/src/corelibs/U2Lang/src/support/WorkflowIOTasks.cpp +++ b/src/corelibs/U2Lang/src/support/WorkflowIOTasks.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/WorkflowIOTasks.h b/src/corelibs/U2Lang/src/support/WorkflowIOTasks.h index 4de22524af626e8e4f345a567688b4f890408f3d..34d30a0ec72a939c1df5a5be3b43f617534bd035 100644 --- a/src/corelibs/U2Lang/src/support/WorkflowIOTasks.h +++ b/src/corelibs/U2Lang/src/support/WorkflowIOTasks.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/WorkflowInvestigationData.h b/src/corelibs/U2Lang/src/support/WorkflowInvestigationData.h index 2de69a511a9369856f94203bc74af25ddd60cd88..9c867c12d70e6a065d906960014bcad097d82dff 100644 --- a/src/corelibs/U2Lang/src/support/WorkflowInvestigationData.h +++ b/src/corelibs/U2Lang/src/support/WorkflowInvestigationData.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/WorkflowRunTask.cpp b/src/corelibs/U2Lang/src/support/WorkflowRunTask.cpp index e808acad8b1869bd3632ac1ce08a32bd8c049f92..303162f3edd467991e1a260abec9193a283c6809 100644 --- a/src/corelibs/U2Lang/src/support/WorkflowRunTask.cpp +++ b/src/corelibs/U2Lang/src/support/WorkflowRunTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -92,8 +92,8 @@ inline bool isValidFile(const QString &link, const qint64 &processStartTime) { QList<WorkerState> WorkflowRunTask::getState( Actor* actor) { QList<WorkerState> ret; - foreach(Task* t, getSubtasks()) { - WorkflowIterationRunTask* rt = qobject_cast<WorkflowIterationRunTask*>(t); + foreach(const QPointer<Task> &t, getSubtasks()) { + WorkflowIterationRunTask* rt = qobject_cast<WorkflowIterationRunTask*>(t.data()); ret << rt->getState(actor->getId()); } return ret; @@ -101,8 +101,8 @@ QList<WorkerState> WorkflowRunTask::getState( Actor* actor) { int WorkflowRunTask::getMsgNum(const Link* l) { int ret = 0; - foreach(Task* t, getSubtasks()) { - WorkflowIterationRunTask* rt = qobject_cast<WorkflowIterationRunTask*>(t); + foreach(const QPointer<Task> &t, getSubtasks()) { + WorkflowIterationRunTask* rt = qobject_cast<WorkflowIterationRunTask*>(t.data()); ret += rt->getMsgNum(l); } return ret; @@ -110,8 +110,8 @@ int WorkflowRunTask::getMsgNum(const Link* l) { int WorkflowRunTask::getMsgPassed(const Link* l) { int ret = 0; - foreach(Task* t, getSubtasks()) { - ret += qobject_cast<WorkflowIterationRunTask*>(t)->getMsgPassed(l); + foreach(const QPointer<Task> &t, getSubtasks()) { + ret += qobject_cast<WorkflowIterationRunTask*>(t.data())->getMsgPassed(l); } return ret; } @@ -163,7 +163,7 @@ WorkflowIterationRunTask::WorkflowIterationRunTask(const Schema& sh, : WorkflowAbstractIterationRunner(tr("Workflow run"), (getAdditionalFlags() | TaskFlag_CancelOnSubtaskCancel | TaskFlag_FailOnSubtaskError)), context(NULL), schema(new Schema()), scheduler(NULL), debugInfo(initDebugInfo), - isNextTickRestoring(false) + nextTickRestoring(false), contextInitialized(false) { rmap = HRSchemaSerializer::deepCopy(sh, schema, stateInfo); @@ -253,7 +253,8 @@ void WorkflowIterationRunTask::prepare() { lmap.insert(key, cc); } - if (!context->init()) { + contextInitialized = context->init(); + if (!contextInitialized) { stateInfo.setError(tr("Failed to create a workflow context")); return; } @@ -282,9 +283,9 @@ QList<Task*> WorkflowIterationRunTask::onSubTaskFinished(Task* subTask) { while(debugInfo->isPaused() && !isCanceled()) { QCoreApplication::processEvents(); } - if(scheduler->isReady() && isNextTickRestoring) { + if(scheduler->isReady() && nextTickRestoring) { Task *replayingTask = scheduler->replayLastWorkerTick(); - isNextTickRestoring = false; + nextTickRestoring = false; if(NULL != replayingTask) { tasks << replayingTask; emit si_ticked(); @@ -311,6 +312,9 @@ QList<Task*> WorkflowIterationRunTask::onSubTaskFinished(Task* subTask) { } Task::ReportResult WorkflowIterationRunTask::report() { + if (!contextInitialized) { + return ReportResult_Finished; + } context->getMonitor()->pause(); if (scheduler) { scheduler->cleanup(); @@ -410,7 +414,7 @@ int WorkflowIterationRunTask::getDataProduced(const ActorId &actor) { void WorkflowIterationRunTask::sl_pauseStateChanged(bool isPaused) { if (isPaused) { if (!debugInfo->isCurrentStepIsolated()) { - isNextTickRestoring = scheduler->cancelCurrentTaskIfAllowed(); + nextTickRestoring = scheduler->cancelCurrentTaskIfAllowed(); } if (AppContext::isGUIMode()) { AppContext::getTaskScheduler()->pauseThreadWithTask(this); diff --git a/src/corelibs/U2Lang/src/support/WorkflowRunTask.h b/src/corelibs/U2Lang/src/support/WorkflowRunTask.h index d549fbf93bc8fd9e087287ffa05ef36b24700e7e..e586c6c600560f65afbc68c3652c0118a06775f4 100644 --- a/src/corelibs/U2Lang/src/support/WorkflowRunTask.h +++ b/src/corelibs/U2Lang/src/support/WorkflowRunTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -130,7 +130,8 @@ private: QMap<QString, CommunicationChannel*> lmap; WorkflowDebugStatus *debugInfo; - bool isNextTickRestoring; + bool nextTickRestoring; + bool contextInitialized; }; } //namespace U2 diff --git a/src/corelibs/U2Lang/src/support/WorkflowSettings.cpp b/src/corelibs/U2Lang/src/support/WorkflowSettings.cpp index e07698fa2bd827693056a4ff24f9e11b284278ca..144c95c7226c6ac30e835129e3c3a0ef6ede8f5a 100644 --- a/src/corelibs/U2Lang/src/support/WorkflowSettings.cpp +++ b/src/corelibs/U2Lang/src/support/WorkflowSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/WorkflowSettings.h b/src/corelibs/U2Lang/src/support/WorkflowSettings.h index 6987837b05d3d688dee8149146fc3bf3918d59f5..bc4559d4273b47353a55b36fe96cf6b4cf374aaf 100644 --- a/src/corelibs/U2Lang/src/support/WorkflowSettings.h +++ b/src/corelibs/U2Lang/src/support/WorkflowSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/WorkflowUtils.cpp b/src/corelibs/U2Lang/src/support/WorkflowUtils.cpp index 874dca0a2f5668e11e88c7dc2d821f6e101808f9..54cb4c30a63b4427ddc7bc385c05a900aa3e1da0 100644 --- a/src/corelibs/U2Lang/src/support/WorkflowUtils.cpp +++ b/src/corelibs/U2Lang/src/support/WorkflowUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,16 +19,9 @@ * MA 02110-1301, USA. */ -#include <QScopedPointer> -#include <QDir> -#include <QUrl> #include <QListWidgetItem> -#include <U2Lang/BaseTypes.h> #include <U2Lang/CoreLibConstants.h> -#include <U2Lang/Dataset.h> -#include <U2Lang/Datatype.h> -#include <U2Lang/Descriptor.h> #include <U2Lang/IntegralBusModel.h> #include <U2Lang/IntegralBusType.h> #include <U2Lang/HRSchemaSerializer.h> @@ -44,19 +37,14 @@ #include <U2Core/AppContext.h> #include <U2Core/BaseDocumentFormats.h> #include <U2Core/CredentialsAsker.h> -#include <U2Core/DocumentModel.h> #include <U2Core/DocumentUtils.h> #include <U2Core/ExternalToolRegistry.h> #include <U2Core/ExternalToolRunTask.h> #include <U2Core/Folder.h> #include <U2Core/GObject.h> -#include <U2Core/IOAdapter.h> #include <U2Core/L10n.h> -#include <U2Core/MultipleSequenceAlignment.h> -#include <U2Core/MultipleSequenceAlignmentImporter.h> #include <U2Core/MultipleSequenceAlignmentObject.h> #include <U2Core/PasswordStorage.h> -#include <U2Core/QVariantUtils.h> #include <U2Core/Settings.h> #include <U2Core/StringAdapter.h> #include <U2Core/U2OpStatusUtils.h> @@ -79,19 +67,20 @@ QStringList WorkflowUtils::initExtensions() { } QString WorkflowUtils::getRichDoc(const Descriptor& d) { + QString result = QString(); if(d.getDisplayName().isEmpty()) { - if(d.getDocumentation().isEmpty()) { - return QString(); - } else { - return QString("%1").arg(d.getDocumentation()); + if(!d.getDocumentation().isEmpty()) { + result = QString("%1").arg(d.getDocumentation()); } } else { if(d.getDocumentation().isEmpty()) { - return QString("<b>%1</b>").arg(d.getDisplayName()); + result = QString("<b>%1</b>").arg(d.getDisplayName()); } else { - return QString("<b>%1</b>: %2").arg(d.getDisplayName()).arg(d.getDocumentation()); + result = QString("<b>%1</b>: %2").arg(d.getDisplayName()).arg(d.getDocumentation()); } } + result.replace("\n", "<br>"); + return result; } QString WorkflowUtils::getDropUrl(QList<DocumentFormat*>& fs, const QMimeData* md) { @@ -168,7 +157,7 @@ bool validateParameters(const Schema &schema, NotificationsList &infoList) { const int notificationCountBefore = infoList.size(); good &= a->validate(infoList); for (int i = notificationCountBefore; i < infoList.size(); ++i) { - infoList[i].actor = a->getId(); + infoList[i].actorId = a->getId(); } } return good; @@ -179,8 +168,14 @@ bool validateExternalTools(Actor *a, NotificationsList &infoList) { StrStrMap tools = a->getProto()->getExternalTools(); foreach (const QString &toolId, tools.keys()) { Attribute *attr = a->getParameter(tools[toolId]); - ExternalTool *tool = AppContext::getExternalToolRegistry()->getByName(toolId); - SAFE_POINT(NULL != tool, "NULL tool", false); + ExternalTool *tool = AppContext::getExternalToolRegistry()->getById(toolId); + if (nullptr == tool) { + good = false; + infoList << WorkflowNotification(WorkflowUtils::externalToolIsAbsentError(toolId), + a->getId(), + WorkflowNotification::U2_ERROR); + continue; + } bool fromAttr = (NULL != attr) && !attr->isDefaultValue(); bool valid = fromAttr ? !attr->isEmpty() : !tool->getPath().isEmpty(); @@ -190,9 +185,16 @@ bool validateExternalTools(Actor *a, NotificationsList &infoList) { a->getId(), WorkflowNotification::U2_ERROR); } else if (!fromAttr && !tool->isValid()) { - infoList << WorkflowNotification(WorkflowUtils::externalToolInvalidError(tool->getName()), - a->getId(), - WorkflowNotification::U2_WARNING); + if (tool->isCustom()) { + infoList << WorkflowNotification(WorkflowUtils::customExternalToolInvalidError(tool->getName(), a->getLabel()), + a->getProto()->getId(), + WorkflowNotification::U2_ERROR); + good = false; + } else { + infoList << WorkflowNotification(WorkflowUtils::externalToolInvalidError(tool->getName()), + a->getProto()->getId(), + WorkflowNotification::U2_WARNING); + } } } return good; @@ -208,7 +210,7 @@ bool validatePorts(Actor *a, NotificationsList &infoList) { WorkflowNotification item; item.message = notification.message; item.port = p->getId(); - item.actor = a->getId(); + item.actorId = a->getId(); item.type = notification.type; infoList << item; } @@ -263,7 +265,7 @@ bool validateScript(Actor *a, NotificationsList &infoList) { notification.message = QObject::tr("Script syntax check failed! Line: %1, error: %2") .arg(syntaxResult.errorLineNumber()) .arg(syntaxResult.errorMessage()); - notification.actor = a->getId(); + notification.actorId = a->getId(); notification.type = WorkflowNotification::U2_ERROR; infoList << notification; return false; @@ -274,7 +276,7 @@ bool validateScript(Actor *a, NotificationsList &infoList) { } bool WorkflowUtils::validate(const Schema &schema, NotificationsList ¬ificationList) { - bool good = true; + bool good = validateOutputDir(WorkflowSettings::getWorkflowOutputDirectory(), notificationList); foreach (Actor *a, schema.getProcesses()) { good &= validatePorts(a, notificationList); if (a->getProto()->isScriptFlagSet()) { @@ -298,23 +300,23 @@ bool WorkflowUtils::validate(const Schema &schema, QList<QListWidgetItem*> &info bool good = validate(schema, notifications); foreach (const WorkflowNotification ¬ification, notifications) { - QListWidgetItem *item = NULL; - if (notification.actor.isEmpty()) { - item = new QListWidgetItem(notification.type + ": " + notification.message); + QListWidgetItem *item = nullptr; + Actor *a = nullptr; + if (notification.actorId.isEmpty()) { + item = new QListWidgetItem(notification.message); } else { - Actor *a = schema.actorById(notification.actor); + a = schema.actorById(notification.actorId); item = new QListWidgetItem(QString("%1: %2").arg(a->getLabel()).arg(notification.message)); - - if (notification.type == WorkflowNotification::U2_ERROR) { - item->setIcon(QIcon(":U2Lang/images/error.png")); - } else if (notification.type == WorkflowNotification::U2_WARNING) { - item->setIcon(QIcon(":U2Lang/images/warning.png")); - } else { - item->setIcon(a->getProto()->getIcon()); - } + } + if (notification.type == WorkflowNotification::U2_ERROR) { + item->setIcon(QIcon(":U2Lang/images/error.png")); + } else if (notification.type == WorkflowNotification::U2_WARNING) { + item->setIcon(QIcon(":U2Lang/images/warning.png")); + } else if (a != nullptr){ + item->setIcon(a->getProto()->getIcon()); } - item->setData(ACTOR_REF, notification.actor); + item->setData(ACTOR_ID_REF, notification.actorId); item->setData(PORT_REF, notification.port); item->setData(TEXT_REF, notification.message); item->setData(TYPE_REF, notification.type); @@ -332,10 +334,10 @@ bool WorkflowUtils::validate(const Workflow::Schema &schema, QStringList &errs) foreach (const WorkflowNotification ¬ification, notifications) { QString res = QString(); - if (notification.actor.isEmpty()) { + if (notification.actorId.isEmpty()) { res = notification.message; } else { - Actor *a = schema.actorById(notification.actor); + Actor *a = schema.actorById(notification.actorId); QString message = notification.message; res = QString("%1: %2").arg(a->getLabel()).arg(message); @@ -378,14 +380,16 @@ QStringList WorkflowUtils::findMatchingTypesAsStringList(DataTypePtr set, DataTy return candidatesAsStringList(descList); } -const Descriptor EMPTY_VALUES_DESC("", QObject::tr("<empty>"), QObject::tr("Default value")); +Descriptor newEmptyValuesDesc() { + return Descriptor("", QObject::tr("<empty>"), QObject::tr("Default value")); +} QList<Descriptor> WorkflowUtils::findMatchingCandidates(DataTypePtr from, DataTypePtr elementDatatype) { QList<Descriptor> candidates = findMatchingTypes(from, elementDatatype); if (elementDatatype->isList()) { candidates += findMatchingTypes(from, elementDatatype->getDatatypeByDescriptor()); } else { - candidates.append(EMPTY_VALUES_DESC); + candidates.append(newEmptyValuesDesc()); } return candidates; } @@ -402,11 +406,11 @@ Descriptor WorkflowUtils::getCurrentMatchingDescriptor(const QList<Descriptor> & if (!currentVal.isEmpty()) { return Descriptor(currentVal, tr("<List of values>"), tr("List of values")); } else { - return EMPTY_VALUES_DESC; + return newEmptyValuesDesc(); } } else { int idx = bindings.contains(key.getId()) ? candidates.indexOf(bindings.value(key.getId())) : 0; - return idx >= 0 ? candidates.at(idx) : EMPTY_VALUES_DESC; + return idx >= 0 ? candidates.at(idx) : newEmptyValuesDesc(); } } @@ -585,6 +589,12 @@ QString WorkflowUtils::getParamIdFromHref(const QString& href) { return id; } +QString WorkflowUtils::generateIdFromName(const QString &name) { + QString id = name; + id.replace(QRegularExpression("\\s"), "-").replace(WorkflowEntityValidator::INACCEPTABLE_SYMBOLS_IN_ID, "_"); + return id; +} + static void data2text(WorkflowContext *context, DocumentFormatId formatId, GObject *obj, QString &text) { QList<GObject*> objList; objList << obj; @@ -866,11 +876,11 @@ QString WorkflowUtils::createUniqueString(const QString &str, const QString &sep return result; } -QString WorkflowUtils::updateExternalToolPath(const QString &toolName, const QString &path) { +QString WorkflowUtils::updateExternalToolPath(const QString &id, const QString &path) { ExternalToolRegistry *registry = AppContext::getExternalToolRegistry(); SAFE_POINT(NULL != registry, "NULL external tool registry", ""); - ExternalTool *tool = registry->getByName(toolName); - SAFE_POINT(NULL != tool, QString("Unknown tool: %1").arg(toolName), ""); + ExternalTool *tool = registry->getById(id); + SAFE_POINT(NULL != tool, QString("Unknown tool: %1").arg(id), ""); if (QString::compare(path, "default", Qt::CaseInsensitive) != 0) { tool->setPath(path); @@ -878,6 +888,20 @@ QString WorkflowUtils::updateExternalToolPath(const QString &toolName, const QSt return tool->getPath(); } +QString WorkflowUtils::getExternalToolPath(const QString &toolId) { + ExternalToolRegistry *registry = AppContext::getExternalToolRegistry(); + SAFE_POINT(NULL != registry, "NULL external tool registry", ""); + + ExternalTool *tool = registry->getById(toolId); + SAFE_POINT(NULL != tool, QString("Unknown tool (id): %1").arg(toolId), ""); + + return tool->getPath(); +} + +QString WorkflowUtils::externalToolIsAbsentError(const QString& toolName) { + return tr("Specified variable \"%%1%\" does not exist, please check the command again.").arg(toolName); +} + QString WorkflowUtils::externalToolError(const QString &toolName) { return tr("External tool \"%1\" is not set. You can set it in Settings -> Preferences -> External Tools").arg(toolName); } @@ -886,6 +910,10 @@ QString WorkflowUtils::externalToolInvalidError(const QString &toolName) { return tr("External tool \"%1\" is invalid. UGENE may not support this version of the tool or a wrong path to the tools is selected").arg(toolName); } +QString WorkflowUtils::customExternalToolInvalidError(const QString& toolName, const QString& elementName) { + return tr("Custom tool \"%1\", specified for the \"%2\" element, didn't pass validation.").arg(toolName).arg(elementName); +} + void WorkflowUtils::schemaFromFile(const QString &url, Schema *schema, Metadata *meta, U2OpStatus &os) { QFile file(url); if(!file.open(QIODevice::ReadOnly)) { @@ -1215,9 +1243,9 @@ bool WorkflowUtils::validateOutputDir(const QString &url, NotificationsList ¬ if (canWriteToPath(fi.absoluteFilePath())) { return true; - } - else { - notificationList << WorkflowNotification(tr("Can't output folder path: '%1', check permissions").arg(url)); + } else { + notificationList << WorkflowNotification(tr("Workflow output folder '%1' can't be accessed. Check that the folder exists and you have" + " enough permissions to write to it, or choose another folder in the UGENE Application Settings.").arg(url), "", WorkflowNotification::U2_ERROR); return false; } } @@ -1316,6 +1344,14 @@ QList<TophatSample> WorkflowUtils::unpackSamples(const QString &samplesStr, U2Op return result; } +const QString WorkflowEntityValidator::NAME_INACCEPTABLE_SYMBOLS_TEMPLATE = "=\\\""; +const QString WorkflowEntityValidator::ID_ACCEPTABLE_SYMBOLS_TEMPLATE = "a-zA-Z0-9\\-_"; + +const QRegularExpression WorkflowEntityValidator::ACCEPTABLE_NAME("[^" + NAME_INACCEPTABLE_SYMBOLS_TEMPLATE + "]*"); +const QRegularExpression WorkflowEntityValidator::INACCEPTABLE_SYMBOL_IN_NAME("[" + NAME_INACCEPTABLE_SYMBOLS_TEMPLATE + "]"); +const QRegularExpression WorkflowEntityValidator::ACCEPTABLE_ID("[" + ID_ACCEPTABLE_SYMBOLS_TEMPLATE + "]*"); +const QRegularExpression WorkflowEntityValidator::INACCEPTABLE_SYMBOLS_IN_ID("[^" + ID_ACCEPTABLE_SYMBOLS_TEMPLATE + "]"); + /***************************** * PrompterBaseImpl *****************************/ @@ -1327,7 +1363,7 @@ QVariant PrompterBaseImpl::getParameter(const QString& id) { } } -QString PrompterBaseImpl::getURL(const QString& id, bool * empty, const QString &onEmpty) { +QString PrompterBaseImpl::getURL(const QString& id, bool * empty, const QString &onEmpty, const QString &defaultValue) { QVariant urlVar = getParameter(id); QString url; if (urlVar.canConvert< QList<Dataset> >()) { @@ -1343,7 +1379,11 @@ QString PrompterBaseImpl::getURL(const QString& id, bool * empty, const QString if (!onEmpty.isEmpty()) { return onEmpty; } - url = "<font color='red'>"+tr("unset")+"</font>"; + if (!defaultValue.isEmpty()) { + url = defaultValue; + } else { + url = "<font color='red'>" + tr("unset") + "</font>"; + } if(empty != NULL) { *empty = true; } } else if (url.indexOf(";") != -1) { url = tr("the list of files"); diff --git a/src/corelibs/U2Lang/src/support/WorkflowUtils.h b/src/corelibs/U2Lang/src/support/WorkflowUtils.h index 4b0f8a0dcf8c626064a450e73da680fe67e2974e..489264921bf2e2bab98873e920f21709e5853bbb 100644 --- a/src/corelibs/U2Lang/src/support/WorkflowUtils.h +++ b/src/corelibs/U2Lang/src/support/WorkflowUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -89,6 +89,8 @@ public: static QString getParamIdFromHref(const QString& href); + static QString generateIdFromName(const QString &name); + static void print(const QString &slotString, const QVariant &data, DataTypePtr type, WorkflowContext *context); static bool validateSchemaForIncluding(const Schema &s, QString &error); @@ -116,10 +118,13 @@ public: static QString createUniqueString(const QString &str, const QString &sep, const QStringList &uniqueStrs); /** if path == "default" then nothing is changed. Returns the new path */ - static QString updateExternalToolPath(const QString &toolName, const QString &path); + static QString updateExternalToolPath(const QString &id, const QString &path); + static QString getExternalToolPath(const QString &toolId); + static QString externalToolIsAbsentError(const QString& toolName); static QString externalToolError(const QString &toolName); static QString externalToolInvalidError(const QString &toolName); + static QString customExternalToolInvalidError(const QString &toolName, const QString& elementName); static void schemaFromFile(const QString &url, Schema *schema, Metadata *meta, U2OpStatus &os); @@ -171,9 +176,19 @@ public: private: static QStringList initExtensions(); static bool validate(const Workflow::Schema &s, NotificationsList ¬ificationList); - }; // WorkflowUtils +class U2LANG_EXPORT WorkflowEntityValidator { +public: + static const QString NAME_INACCEPTABLE_SYMBOLS_TEMPLATE; + static const QString ID_ACCEPTABLE_SYMBOLS_TEMPLATE; + + static const QRegularExpression ACCEPTABLE_NAME; + static const QRegularExpression INACCEPTABLE_SYMBOL_IN_NAME; + static const QRegularExpression ACCEPTABLE_ID; + static const QRegularExpression INACCEPTABLE_SYMBOLS_IN_ID; +}; + /** * provides utility functions for ActorDocument purposes */ @@ -186,7 +201,7 @@ public: virtual ActorDocument * createDescription(Actor*) = 0; - QString getURL(const QString& id, bool * empty = NULL, const QString &onEmpty = ""); + QString getURL(const QString& id, bool * empty = NULL, const QString &onEmpty = "", const QString &defaultValue = ""); QString getScreenedURL(IntegralBusPort* input, const QString& id, const QString& slot, const QString &onEmpty = ""); QString getRequiredParam(const QString& id); QVariant getParameter(const QString& id); @@ -218,6 +233,7 @@ template <typename T> class PrompterBase : public PrompterBaseImpl { public: PrompterBase(Actor* p = 0, bool listenInputs = true) : PrompterBaseImpl(p), listenInputs(listenInputs) {} + virtual ~PrompterBase() = default; virtual ActorDocument* createDescription(Actor* a) { T* doc = new T(a); doc->connect(a, SIGNAL(si_labelChanged()), SLOT(sl_actorModified())); diff --git a/src/corelibs/U2Lang/src/support/external_script/ScriptContext.cpp b/src/corelibs/U2Lang/src/support/external_script/ScriptContext.cpp index 03c7e34a713378c7cc9f0eade6b72a30866bd659..020d532b2efa74ecc7c8644561121d9dfe0b70d9 100644 --- a/src/corelibs/U2Lang/src/support/external_script/ScriptContext.cpp +++ b/src/corelibs/U2Lang/src/support/external_script/ScriptContext.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/external_script/ScriptContext.h b/src/corelibs/U2Lang/src/support/external_script/ScriptContext.h index f22a63da70c4179528f5687060412b8e75a48814..fea92395e378afe2b4ddc593b59ae779852eb62a 100644 --- a/src/corelibs/U2Lang/src/support/external_script/ScriptContext.h +++ b/src/corelibs/U2Lang/src/support/external_script/ScriptContext.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/external_script/ScriptableScheduler.cpp b/src/corelibs/U2Lang/src/support/external_script/ScriptableScheduler.cpp index 4a78e3b6118836ec7646a47ab53a0891011d8699..7df48e6b04172ff9011c9b7de8008985798299a7 100644 --- a/src/corelibs/U2Lang/src/support/external_script/ScriptableScheduler.cpp +++ b/src/corelibs/U2Lang/src/support/external_script/ScriptableScheduler.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/external_script/ScriptableScheduler.h b/src/corelibs/U2Lang/src/support/external_script/ScriptableScheduler.h index 36684ce13fdfed0975759cbb6fa33f4bdb78d076..31f4cc24f40aee2b4174a7a4a1595ac494a4cb29 100644 --- a/src/corelibs/U2Lang/src/support/external_script/ScriptableScheduler.h +++ b/src/corelibs/U2Lang/src/support/external_script/ScriptableScheduler.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/external_script/WorkflowRunSerializedSchemeTask.cpp b/src/corelibs/U2Lang/src/support/external_script/WorkflowRunSerializedSchemeTask.cpp index d7db67a048d8af7685d3cc400f9d8d50ca4b4d34..aba55350b967beda50d84c074195b7129f0e38a7 100644 --- a/src/corelibs/U2Lang/src/support/external_script/WorkflowRunSerializedSchemeTask.cpp +++ b/src/corelibs/U2Lang/src/support/external_script/WorkflowRunSerializedSchemeTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/external_script/WorkflowRunSerializedSchemeTask.h b/src/corelibs/U2Lang/src/support/external_script/WorkflowRunSerializedSchemeTask.h index 406892175038b02498f3a759dbf3e9524c47d732..2f06efe83f80bc0257901f826f3c8202449798cc 100644 --- a/src/corelibs/U2Lang/src/support/external_script/WorkflowRunSerializedSchemeTask.h +++ b/src/corelibs/U2Lang/src/support/external_script/WorkflowRunSerializedSchemeTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/serialize/Constants.cpp b/src/corelibs/U2Lang/src/support/serialize/Constants.cpp index 4729806bdf6d7932109e5f9b8be84f6deb27ecaa..39419850a4f7431aa6797c7de0f0f1898aabcd35 100644 --- a/src/corelibs/U2Lang/src/support/serialize/Constants.cpp +++ b/src/corelibs/U2Lang/src/support/serialize/Constants.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -56,6 +56,8 @@ const QString Constants::ITERATION_ID = "id"; const QString Constants::PARAM_ALIASES_START = "parameter-aliases"; const QString Constants::PORT_ALIASES_START = "port-aliases"; const QString Constants::PATH_THROUGH = "path-through"; +const QString Constants::TRUE = "true"; +const QString Constants::FALSE = "false"; // -------------- backward compatibility -------------- const QString Constants::ALIASES_HELP_START = "help"; @@ -74,6 +76,7 @@ const QString Constants::ATTRIBUTES_START = ".attributes"; const QString Constants::TYPE_PORT = "type"; const QString Constants::FORMAT_PORT = "format"; const QString Constants::CMDLINE = "cmdline"; +const QString Constants::DEFAULT_VALUE = "default-value"; const QString Constants::DESCRIPTION = "description"; const QString Constants::PROMPTER = "templatedescription"; const QString Constants::COMMA = ","; @@ -104,6 +107,11 @@ const QString Constants::ESTIMATIONS = "estimations"; const QString Constants::VALIDATOR = ".validator"; const QString Constants::V_TYPE = "type"; const QString Constants::V_SCRIPT = "script"; +const QString Constants::USE_INTEGRATED_TOOL = "use-integrated-tool"; +const QString Constants::CUSTOM_TOOL_PATH = "custom-tool-path"; +const QString Constants::INTEGRATED_TOOL_ID = "integrated-tool-id"; +const QString Constants::ADD_TO_DASHBOARD = "add-to-dashboard"; +const QString Constants::OPEN_WITH_UGENE = "open-with-ugene"; } // WorkflowSerialize } // U2 diff --git a/src/corelibs/U2Lang/src/support/serialize/Constants.h b/src/corelibs/U2Lang/src/support/serialize/Constants.h index 50f4e4d9bfc863a5225c14e394c40d936ebd0a2a..7d27f6fdf7f44cd28ba2d4cf6cd673df8e0a0e68 100644 --- a/src/corelibs/U2Lang/src/support/serialize/Constants.h +++ b/src/corelibs/U2Lang/src/support/serialize/Constants.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -61,6 +61,8 @@ public: static const QString PARAM_ALIASES_START; static const QString PORT_ALIASES_START; static const QString PATH_THROUGH; + static const QString TRUE; + static const QString FALSE; // -------------- backward compatibility -------------- static const QString ALIASES_HELP_START; @@ -79,6 +81,7 @@ public: static const QString TYPE_PORT; static const QString FORMAT_PORT; static const QString CMDLINE; + static const QString DEFAULT_VALUE; static const QString DESCRIPTION; static const QString PROMPTER; static const QString COMMA; @@ -109,6 +112,11 @@ public: static const QString VALIDATOR; static const QString V_TYPE; static const QString V_SCRIPT; + static const QString USE_INTEGRATED_TOOL; + static const QString CUSTOM_TOOL_PATH; + static const QString INTEGRATED_TOOL_ID; + static const QString ADD_TO_DASHBOARD; + static const QString OPEN_WITH_UGENE; }; } // WorkflowSerialize diff --git a/src/corelibs/U2Lang/src/support/serialize/HRSchemaSerializer.cpp b/src/corelibs/U2Lang/src/support/serialize/HRSchemaSerializer.cpp index f0b5a3f0fbdc05083ffe92eb80e27ca91feac937..f14656153f3fbbcee312f58730ed6652a0a8083b 100644 --- a/src/corelibs/U2Lang/src/support/serialize/HRSchemaSerializer.cpp +++ b/src/corelibs/U2Lang/src/support/serialize/HRSchemaSerializer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -199,13 +199,13 @@ static bool getAbsoluteIncludePath(QString &path) { void HRSchemaSerializer::parseIncludes(Tokenizer &tokenizer, QList<QString> includedUrls) { tokenizer.assertToken(Constants::INCLUDE); QString path = tokenizer.take(); - QString actorName; + QString actorId; bool includeAs = false; QString tok = tokenizer.look(); if (Constants::INCLUDE_AS == tok) { tokenizer.assertToken(Constants::INCLUDE_AS); includeAs = true; - actorName = tokenizer.take(); + actorId = tokenizer.take(); } if (!getAbsoluteIncludePath(path)) { @@ -241,9 +241,9 @@ void HRSchemaSerializer::parseIncludes(Tokenizer &tokenizer, QList<QString> incl throw ReadFailed(tr("File '%1' contains mistakes").arg(path)); } if (includeAs) { - cfg->name = actorName; + cfg->id = actorId; } else { - actorName = cfg->name; + actorId = cfg->id; } cfg->filePath = path; proto = IncludedProtoFactory::getExternalToolProto(cfg); @@ -260,18 +260,18 @@ void HRSchemaSerializer::parseIncludes(Tokenizer &tokenizer, QList<QString> incl error = string2Schema(rawData, schema, NULL, &procMap, newUrlList); if (NULL != schema && error.isEmpty()) { if (includeAs) { - schema->setTypeName(actorName); + schema->setTypeName(actorId); } else { - actorName = schema->getTypeName(); + actorId = schema->getTypeName(); } - proto = IncludedProtoFactory::getSchemaActorProto(schema, actorName, path); + proto = IncludedProtoFactory::getSchemaActorProto(schema, actorId, path); } } } else if(rawData.startsWith(Constants::OLD_XML_HEADER)) { includeType = SCRIPT; - proto = ScriptWorkerSerializer::string2actor(rawData, actorName, error, path); + proto = ScriptWorkerSerializer::string2actor(rawData, actorId, error, path); if (!includeAs && NULL != proto) { - actorName = proto->getDisplayName(); + actorId = proto->getDisplayName(); } } else { throw ReadFailed(tr("Unknown file format: '%1'").arg(path)); @@ -281,20 +281,19 @@ void HRSchemaSerializer::parseIncludes(Tokenizer &tokenizer, QList<QString> incl } // register the new proto - if (IncludedProtoFactory::isRegistered(actorName)) { - bool isEqualProtos = IncludedProtoFactory::isRegisteredTheSameProto(actorName, proto); + if (IncludedProtoFactory::isRegistered(actorId)) { + bool isEqualProtos = IncludedProtoFactory::isRegisteredTheSameProto(actorId, proto); if (!isEqualProtos) { - throw ReadFailed( QString("Another worker with this name is already registered: %1").arg(actorName) ); + throw ReadFailed( QString("Another worker with ID '%1' is already registered: %1").arg(actorId) ); } } else { WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_INCLUDES(), proto); if (EXTERNAL_TOOL == includeType) { - WorkflowEnv::getExternalCfgRegistry()->registerExternalTool(cfg); IncludedProtoFactory::registerExternalToolWorker(cfg); } else if (SCRIPT == includeType) { - IncludedProtoFactory::registerScriptWorker(actorName); + IncludedProtoFactory::registerScriptWorker(actorId); } else if (SCHEMA == includeType) { - WorkflowEnv::getSchemaActorsRegistry()->registerSchema(actorName, schema); + WorkflowEnv::getSchemaActorsRegistry()->registerSchema(actorId, schema); } } } @@ -1303,13 +1302,19 @@ void HRSchemaSerializer::postProcessing(Schema *schema) { void HRSchemaSerializer::parsePorts(Tokenizer & tokenizer, QList<DataConfig>& ports) { while(tokenizer.look() != Constants::BLOCK_END) { DataConfig cfg; - cfg.attrName = tokenizer.take(); + cfg.attributeId = tokenizer.take(); tokenizer.assertToken(Constants::BLOCK_START); ParsedPairs pairs(tokenizer); + cfg.attrName = pairs.equalPairs.take(Constants::NAME_ATTR); cfg.type = pairs.equalPairs.take(Constants::TYPE_PORT); cfg.format = pairs.equalPairs.take(Constants::FORMAT_PORT); cfg.description = pairs.equalPairs.take(Constants::DESCRIPTION); tokenizer.assertToken(Constants::BLOCK_END); + + if (cfg.attrName.isEmpty()) { + cfg.attrName = cfg.attributeId; + } + ports << cfg; } } @@ -1317,19 +1322,31 @@ void HRSchemaSerializer::parsePorts(Tokenizer & tokenizer, QList<DataConfig>& po void HRSchemaSerializer::parseAttributes(Tokenizer & tokenizer, QList<AttributeConfig>& attrs) { while(tokenizer.look() != Constants::BLOCK_END) { AttributeConfig cfg; - cfg.attrName = tokenizer.take(); + cfg.attributeId = tokenizer.take(); tokenizer.assertToken(Constants::BLOCK_START); ParsedPairs pairs(tokenizer); + cfg.attrName = pairs.equalPairs.take(Constants::NAME_ATTR); cfg.type = pairs.equalPairs.take(Constants::TYPE_PORT); + cfg.defaultValue = pairs.equalPairs.take(Constants::DEFAULT_VALUE); cfg.description = pairs.equalPairs.take(Constants::DESCRIPTION); + if (0 == QString::compare(pairs.equalPairs.take(Constants::ADD_TO_DASHBOARD), Constants::TRUE)) { + cfg.flags |= AttributeConfig::AddToDashboard; + } + if (0 == QString::compare(pairs.equalPairs.take(Constants::OPEN_WITH_UGENE), Constants::TRUE)) { + cfg.flags |= AttributeConfig::OpenWithUgene; + } tokenizer.assertToken(Constants::BLOCK_END); + if (cfg.attrName.isEmpty()) { + cfg.attrName = cfg.attributeId; + } + cfg.fixTypes(); attrs << cfg; } } ExternalProcessConfig* HRSchemaSerializer::parseActorBody(Tokenizer & tokenizer) { ExternalProcessConfig *cfg = new ExternalProcessConfig(); - cfg->name = tokenizer.take(); + cfg->id = tokenizer.take(); while(tokenizer.notEmpty() && tokenizer.look() != Constants::BLOCK_END) { QString tok = tokenizer.take(); QString next = tokenizer.look(); @@ -1350,6 +1367,18 @@ ExternalProcessConfig* HRSchemaSerializer::parseActorBody(Tokenizer & tokenizer /*Actor * proc = HRSchemaSerializer::parseElementsDefinition(tokenizer, tok, data.actorMap, data.idMap); data.schema->addProcess(proc); tokenizer.assertToken(HRSchemaSerializer::BLOCK_END);*/ + } else if(tok == Constants::NAME_ATTR) { + tokenizer.assertToken(Constants::COLON); + cfg->name = tokenizer.take(); + } else if(tok == Constants::USE_INTEGRATED_TOOL) { + tokenizer.assertToken(Constants::COLON); + cfg->useIntegratedTool = (0 != QString::compare(tokenizer.take(), Constants::FALSE, Qt::CaseInsensitive)); + } else if(tok == Constants::CUSTOM_TOOL_PATH) { + tokenizer.assertToken(Constants::COLON); + cfg->customToolPath = tokenizer.take(); + } else if(tok == Constants::INTEGRATED_TOOL_ID) { + tokenizer.assertToken(Constants::COLON); + cfg->integratedToolId = tokenizer.take(); } else if(tok == Constants::CMDLINE) { tokenizer.assertToken(Constants::COLON); cfg->cmdLine = tokenizer.take(); @@ -1363,6 +1392,12 @@ ExternalProcessConfig* HRSchemaSerializer::parseActorBody(Tokenizer & tokenizer throw ReadFailed(Constants::UNDEFINED_CONSTRUCT.arg(tok).arg(next)); } } + + if (cfg->name.isEmpty()) { + // Name is absent in old config files, ID was used as worker name. + cfg->name = cfg->id; + } + return cfg; } @@ -1968,7 +2003,8 @@ QMap<ActorId, ActorId> HRSchemaSerializer::deepCopy(const Schema& from, Schema* static QString inputsDefenition(const QList<DataConfig> &inputs) { QString res = Constants::TAB + Constants::INPUT_START + " {\n"; foreach(const DataConfig& cfg, inputs) { - res += Constants::TAB + Constants::TAB + cfg.attrName + " {\n"; + res += Constants::TAB + Constants::TAB + cfg.attributeId + " {\n"; + res += Constants::TAB + Constants::TAB + Constants::TAB + "name:\"" + cfg.attrName + "\";\n"; res += Constants::TAB + Constants::TAB + Constants::TAB + "type:" + cfg.type + ";\n"; res += Constants::TAB + Constants::TAB + Constants::TAB + "format:" + cfg.format + ";\n"; if(!cfg.description.isEmpty()) { @@ -1983,7 +2019,8 @@ static QString inputsDefenition(const QList<DataConfig> &inputs) { static QString outputsDefenition(const QList<DataConfig> &inputs) { QString res = Constants::TAB + Constants::OUTPUT_START + " {\n"; foreach(const DataConfig& cfg, inputs) { - res += Constants::TAB + Constants::TAB + cfg.attrName + " {\n"; + res += Constants::TAB + Constants::TAB + cfg.attributeId + " {\n"; + res += Constants::TAB + Constants::TAB + Constants::TAB + "name:\"" + cfg.attrName + "\";\n"; res += Constants::TAB + Constants::TAB + Constants::TAB + "type:" + cfg.type + ";\n"; res += Constants::TAB + Constants::TAB + Constants::TAB + "format:" + cfg.format + ";\n"; if(!cfg.description.isEmpty()) { @@ -1995,13 +2032,31 @@ static QString outputsDefenition(const QList<DataConfig> &inputs) { return res; } +namespace { + +QString bool2String(bool value) { + return value ? Constants::TRUE : Constants::FALSE; +} + +} + static QString attributesDefinition(const QList<AttributeConfig> &attrs) { QString res = Constants::TAB + Constants::ATTRIBUTES_START + " {\n"; foreach(const AttributeConfig &cfg, attrs) { - res += Constants::TAB + Constants::TAB + cfg.attrName + " {\n"; + res += Constants::TAB + Constants::TAB + cfg.attributeId + " {\n"; + res += Constants::TAB + Constants::TAB + Constants::TAB + "name:\"" + cfg.attrName + "\";\n"; res += Constants::TAB + Constants::TAB + Constants::TAB + "type:" + cfg.type + ";\n"; - if(!cfg.description.isEmpty()) { - res += Constants::TAB + Constants::TAB + Constants::TAB + "description:\"" + cfg.description + "\";\n"; + if (!cfg.defaultValue.isEmpty()) { + res += Constants::TAB + Constants::TAB + Constants::TAB + Constants::DEFAULT_VALUE + ":\"" + cfg.defaultValue + "\";\n"; + } + if (!cfg.description.isEmpty()) { + res += Constants::TAB + Constants::TAB + Constants::TAB + Constants::DESCRIPTION + Constants::COLON + Constants::QUOTE + cfg.description + Constants::QUOTE + Constants::SEMICOLON + Constants::NEW_LINE; + } + if (cfg.isOutputUrl()) { + res += Constants::TAB + Constants::TAB + Constants::TAB + Constants::ADD_TO_DASHBOARD + Constants::COLON + bool2String(cfg.flags.testFlag(AttributeConfig::AddToDashboard)) + Constants::SEMICOLON + Constants::NEW_LINE; + if (cfg.isFile()) { + res += Constants::TAB + Constants::TAB + Constants::TAB + Constants::OPEN_WITH_UGENE + Constants::COLON + bool2String(cfg.flags.testFlag(AttributeConfig::OpenWithUgene)) + Constants::SEMICOLON + Constants::NEW_LINE; + } } res += Constants::TAB + Constants::TAB + "}\n"; } @@ -2011,10 +2066,18 @@ static QString attributesDefinition(const QList<AttributeConfig> &attrs) { QString HRSchemaSerializer::actor2String(ExternalProcessConfig *cfg ) { QString res = Constants::HEADER_LINE + "\n"; - res += "\"" + cfg->name + "\" {\n"; + res += "\"" + cfg->id + "\" {\n"; res += inputsDefenition(cfg->inputs); res += outputsDefenition(cfg->outputs); res += attributesDefinition(cfg->attrs); + res += Constants::TAB + Constants::NAME_ATTR + ":\"" + cfg->name + "\";\n"; + res += Constants::TAB + Constants::USE_INTEGRATED_TOOL + ":" + (cfg->useIntegratedTool ? Constants::TRUE : Constants::FALSE) + ";\n"; + if (!cfg->customToolPath.isEmpty()) { + res += Constants::TAB + Constants::CUSTOM_TOOL_PATH + ":\"" + cfg->customToolPath + "\";\n"; // TODO: it should be escaped (UGENE-6437) + } + if (!cfg->integratedToolId.isEmpty()) { + res += Constants::TAB + Constants::INTEGRATED_TOOL_ID + ":\"" + cfg->integratedToolId + "\";\n"; // TODO: it also should be escaped (UGENE-6437) + } res += Constants::TAB + Constants::CMDLINE + ":\"" + cfg->cmdLine + "\";\n"; if(!cfg->description.isEmpty()) { res += Constants::TAB + Constants::DESCRIPTION + ":\"" + cfg->description + "\";\n"; diff --git a/src/corelibs/U2Lang/src/support/serialize/HRSchemaSerializer.h b/src/corelibs/U2Lang/src/support/serialize/HRSchemaSerializer.h index 4a8275975bc2507eb64e084d8d6ca2d93e4a9272..cd045e3228ea9e0faabd2e3b51e1272ac87debb7 100644 --- a/src/corelibs/U2Lang/src/support/serialize/HRSchemaSerializer.h +++ b/src/corelibs/U2Lang/src/support/serialize/HRSchemaSerializer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/serialize/HRVisualSerializer.cpp b/src/corelibs/U2Lang/src/support/serialize/HRVisualSerializer.cpp index 44eedc3f3df6c9f664afc55fa6b7a04dad66c4b0..284f74eaada1cb3398cca180a1a5bbeda98d15a0 100644 --- a/src/corelibs/U2Lang/src/support/serialize/HRVisualSerializer.cpp +++ b/src/corelibs/U2Lang/src/support/serialize/HRVisualSerializer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/serialize/HRVisualSerializer.h b/src/corelibs/U2Lang/src/support/serialize/HRVisualSerializer.h index 4a6c234f94007bf522f58f63fe431149288faf47..feaf1424cf75708e053738f86d104133f8ee0b75 100644 --- a/src/corelibs/U2Lang/src/support/serialize/HRVisualSerializer.h +++ b/src/corelibs/U2Lang/src/support/serialize/HRVisualSerializer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/serialize/HRWizardSerializer.cpp b/src/corelibs/U2Lang/src/support/serialize/HRWizardSerializer.cpp index 6412afb7ff80b682c32f47cb30484cdde9de390f..a12bb214bda6c30110572a9e8d0174a6be989322 100644 --- a/src/corelibs/U2Lang/src/support/serialize/HRWizardSerializer.cpp +++ b/src/corelibs/U2Lang/src/support/serialize/HRWizardSerializer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/serialize/HRWizardSerializer.h b/src/corelibs/U2Lang/src/support/serialize/HRWizardSerializer.h index 3718fa1173a6857499634bae40c8b7ba606af9ca..b471c9e2e1ab58820733c7699dd5dedb0cbfc44e 100644 --- a/src/corelibs/U2Lang/src/support/serialize/HRWizardSerializer.h +++ b/src/corelibs/U2Lang/src/support/serialize/HRWizardSerializer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/serialize/OldUWL.cpp b/src/corelibs/U2Lang/src/support/serialize/OldUWL.cpp index c68835e1c49ca9bedf0337afeb64a72e246a2b65..8b4be1debe113b5814a0be65529b22fc510437ff 100644 --- a/src/corelibs/U2Lang/src/support/serialize/OldUWL.cpp +++ b/src/corelibs/U2Lang/src/support/serialize/OldUWL.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/serialize/OldUWL.h b/src/corelibs/U2Lang/src/support/serialize/OldUWL.h index 74ca4cc6f104d742b47450f4c801d194033a3ccd..bbc247479b0fbdad71ea586ff330696e5602bc55 100644 --- a/src/corelibs/U2Lang/src/support/serialize/OldUWL.h +++ b/src/corelibs/U2Lang/src/support/serialize/OldUWL.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/serialize/Tokenizer.cpp b/src/corelibs/U2Lang/src/support/serialize/Tokenizer.cpp index 0b45c5eb1b8e81a9536454b6c90fb55cd4b870a2..8b6856f1ecb584f94972463a33279bd632ac87a7 100644 --- a/src/corelibs/U2Lang/src/support/serialize/Tokenizer.cpp +++ b/src/corelibs/U2Lang/src/support/serialize/Tokenizer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -262,10 +262,22 @@ void Tokenizer::tokenizeLine(const QString & l, QTextStream & s) { QString curToken; bool finishAtQuote = false; while(!stream.atEnd()) { - QChar ch; stream >> ch; + QChar ch; + stream >> ch; if( stream.atEnd() && finishAtQuote && ch != Constants::QUOTE.at(0) ) { - line = s.readLine(); - stream.setString(&line); + do { + curToken.append(ch); + if (stream.atEnd() && finishAtQuote) { + curToken.append('\n'); + } + line = s.readLine(); + if (line.isEmpty()) { + ch = '\n'; + } else { + stream.setString(&line); + } + } while (line.isEmpty() && !s.atEnd()); + stream >> ch; } if(ch.isSpace() || ch == Constants::SEMICOLON.at(0)) { if(!finishAtQuote) { diff --git a/src/corelibs/U2Lang/src/support/serialize/Tokenizer.h b/src/corelibs/U2Lang/src/support/serialize/Tokenizer.h index fb43d11f525f02a3e2ebc00108abe9f5c98447ec..ba6b96b9869b25a6a80a2fd65d7a220142db70b0 100644 --- a/src/corelibs/U2Lang/src/support/serialize/Tokenizer.h +++ b/src/corelibs/U2Lang/src/support/serialize/Tokenizer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/serialize/Utils.cpp b/src/corelibs/U2Lang/src/support/serialize/Utils.cpp index 741adbc55865b0694e93fa7cd1bedf0e9c71e31c..22a3c3a6efed4b62422e536e31d1ee895279a1eb 100644 --- a/src/corelibs/U2Lang/src/support/serialize/Utils.cpp +++ b/src/corelibs/U2Lang/src/support/serialize/Utils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/support/serialize/Utils.h b/src/corelibs/U2Lang/src/support/serialize/Utils.h index c05318936c7a1952e4ed6159c557f7f8f67811ce..69fe0196492a44d3a94f34fa7cd329b2c9de866a 100644 --- a/src/corelibs/U2Lang/src/support/serialize/Utils.h +++ b/src/corelibs/U2Lang/src/support/serialize/Utils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/tasks/ReadDocumentTaskFactory.cpp b/src/corelibs/U2Lang/src/tasks/ReadDocumentTaskFactory.cpp index 4f941638782601d082e1c8ff3e29d9f9dd8a4ced..54c29e45b080296c70fb0c281fffe5d8c6a2ff56 100644 --- a/src/corelibs/U2Lang/src/tasks/ReadDocumentTaskFactory.cpp +++ b/src/corelibs/U2Lang/src/tasks/ReadDocumentTaskFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/tasks/ReadDocumentTaskFactory.h b/src/corelibs/U2Lang/src/tasks/ReadDocumentTaskFactory.h index 388df6ad537624dfc882c18d433195b324cdd636..fbfcd4d1dce602167b143e768122930b209a93fa 100644 --- a/src/corelibs/U2Lang/src/tasks/ReadDocumentTaskFactory.h +++ b/src/corelibs/U2Lang/src/tasks/ReadDocumentTaskFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/tasks/SchemaEstimationTask.cpp b/src/corelibs/U2Lang/src/tasks/SchemaEstimationTask.cpp index 59837eed52e3ff6b49ea74083e01a8737ced8208..4e7e718f6d22500ba031f3ccffa2e602dfd91bc0 100644 --- a/src/corelibs/U2Lang/src/tasks/SchemaEstimationTask.cpp +++ b/src/corelibs/U2Lang/src/tasks/SchemaEstimationTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/tasks/SchemaEstimationTask.h b/src/corelibs/U2Lang/src/tasks/SchemaEstimationTask.h index 15e53661ffd595bbf08d791e5e82f968f65bd42e..7cdd30745bef98e93528489f36f727a5be125ce8 100644 --- a/src/corelibs/U2Lang/src/tasks/SchemaEstimationTask.h +++ b/src/corelibs/U2Lang/src/tasks/SchemaEstimationTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/tasks/WorkflowTasksRegistry.cpp b/src/corelibs/U2Lang/src/tasks/WorkflowTasksRegistry.cpp index ab1a0d3a82faf79e3eaf9158df15ebd737508c7e..32bee57febee190cb6a712e1cf15d86569cbff9c 100644 --- a/src/corelibs/U2Lang/src/tasks/WorkflowTasksRegistry.cpp +++ b/src/corelibs/U2Lang/src/tasks/WorkflowTasksRegistry.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/src/tasks/WorkflowTasksRegistry.h b/src/corelibs/U2Lang/src/tasks/WorkflowTasksRegistry.h index a54bb66e6fa4a88c8d3887924e1559fd35f6ccee..dfb6e11a50d4daecb7e7cac960683518565f5363 100644 --- a/src/corelibs/U2Lang/src/tasks/WorkflowTasksRegistry.h +++ b/src/corelibs/U2Lang/src/tasks/WorkflowTasksRegistry.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Lang/transl/russian.ts b/src/corelibs/U2Lang/transl/russian.ts index 6126aaa9bddcc84a0e39cc20d9e288804a9b80c2..da4f29f7acf3560d4a284598dcb203d0a504a459 100644 --- a/src/corelibs/U2Lang/transl/russian.ts +++ b/src/corelibs/U2Lang/transl/russian.ts @@ -424,7 +424,7 @@ <translation>Actor '%1' does not have this parameter: %2</translation> </message> <message> - <location filename="../src/support/MapDatatypeEditor.cpp" line="341"/> + <location filename="../src/support/MapDatatypeEditor.cpp" line="385"/> <source>Additional</source> <translation>Additional</translation> </message> @@ -444,27 +444,27 @@ <translation>The variable is already defined: %1</translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="255"/> + <location filename="../src/support/WorkflowUtils.cpp" line="244"/> <source>Empty script text</source> <translation>Скрипт пуÑÑ‚</translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="263"/> + <location filename="../src/support/WorkflowUtils.cpp" line="252"/> <source>Script syntax check failed! Line: %1, error: %2</source> <translation>Обнаружена ошибка в Ñкрипте! Строка: %1, ошибка: %2</translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="287"/> + <location filename="../src/support/WorkflowUtils.cpp" line="276"/> <source>The workflow contains a cycle</source> <translation>Схема Ñодержит цикл</translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="381"/> + <location filename="../src/support/WorkflowUtils.cpp" line="371"/> <source><empty></source> <translation><пуÑтой></translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="381"/> + <location filename="../src/support/WorkflowUtils.cpp" line="371"/> <source>Default value</source> <translation>Значение по умолчанию</translation> </message> @@ -494,17 +494,17 @@ <translation>Unknown actor ID: </translation> </message> <message> - <location filename="../src/support/serialize/Constants.cpp" line="34"/> + <location filename="../src/support/serialize/Constants.cpp" line="35"/> <source>Error: unknown exception caught</source> <translation>Error: unknown exception caught</translation> </message> <message> - <location filename="../src/support/serialize/Constants.cpp" line="47"/> + <location filename="../src/support/serialize/Constants.cpp" line="48"/> <source>Undefined construct at '%1 %2'</source> <translation>Undefined construct at '%1 %2'</translation> </message> <message> - <location filename="../src/support/serialize/Constants.cpp" line="65"/> + <location filename="../src/support/serialize/Constants.cpp" line="68"/> <source>Undefined block in .meta: '%1'</source> <translation>Undefined block in .meta: '%1'</translation> </message> @@ -545,12 +545,12 @@ <translation>Expected '%1', near '%2'</translation> </message> <message> - <location filename="../src/support/serialize/Tokenizer.cpp" line="338"/> + <location filename="../src/support/serialize/Tokenizer.cpp" line="350"/> <source>Expected %3 or %1 after %2</source> <translation>Expected %3 or %1 after %2</translation> </message> <message> - <location filename="../src/support/serialize/Tokenizer.cpp" line="347"/> + <location filename="../src/support/serialize/Tokenizer.cpp" line="359"/> <source>%2 expected after %1</source> <translation>%2 expected after %1</translation> </message> @@ -579,107 +579,107 @@ <context> <name>U2::BaseTypes</name> <message> - <location filename="../src/library/BaseTypes.cpp" line="51"/> + <location filename="../src/library/BaseTypes.cpp" line="52"/> <source>Sequence</source> <translation>ПоÑледовательноÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/library/BaseTypes.cpp" line="51"/> + <location filename="../src/library/BaseTypes.cpp" line="52"/> <source>A sequence</source> <translation>БиологичеÑки-Ð·Ð½Ð°Ñ‡Ð¸Ð¼Ð°Ñ Ð¿Ð¾ÑледовательноÑÑ‚ÑŒ (ДÐК, Ð ÐК, протеины)</translation> </message> <message> - <location filename="../src/library/BaseTypes.cpp" line="62"/> + <location filename="../src/library/BaseTypes.cpp" line="63"/> <source>Set of annotations</source> <translation>Ðабор аннотаций</translation> </message> <message> - <location filename="../src/library/BaseTypes.cpp" line="62"/> + <location filename="../src/library/BaseTypes.cpp" line="63"/> <source>A set of annotated features in a sequence</source> <translation>Ðабор (ÑпиÑок) аннотированных регионов поÑледовательноÑти</translation> </message> <message> - <location filename="../src/library/BaseTypes.cpp" line="74"/> + <location filename="../src/library/BaseTypes.cpp" line="75"/> <source>List of annotations</source> <translation>Ðабор аннотаций</translation> </message> <message> - <location filename="../src/library/BaseTypes.cpp" line="74"/> + <location filename="../src/library/BaseTypes.cpp" line="75"/> <source>A list of sequence annotations</source> <translation>Ðабор аннотаций</translation> </message> <message> - <location filename="../src/library/BaseTypes.cpp" line="86"/> + <location filename="../src/library/BaseTypes.cpp" line="87"/> <source>Set of aligned sequences</source> <translation>МножеÑтвенное выравнивание</translation> </message> <message> - <location filename="../src/library/BaseTypes.cpp" line="86"/> + <location filename="../src/library/BaseTypes.cpp" line="87"/> <source>Multiple alignment</source> <translation>МножеÑтвенное выравнивание</translation> </message> <message> - <location filename="../src/library/BaseTypes.cpp" line="97"/> + <location filename="../src/library/BaseTypes.cpp" line="98"/> <source>Variation track</source> <translation>Путь вариации</translation> </message> <message> - <location filename="../src/library/BaseTypes.cpp" line="97"/> + <location filename="../src/library/BaseTypes.cpp" line="98"/> <source>Set of variations</source> <translation>Ðабор вариаций</translation> </message> <message> - <location filename="../src/library/BaseTypes.cpp" line="108"/> + <location filename="../src/library/BaseTypes.cpp" line="109"/> <source>Assembly data</source> <translation>Данные Ñборки</translation> </message> <message> - <location filename="../src/library/BaseTypes.cpp" line="120"/> + <location filename="../src/library/BaseTypes.cpp" line="121"/> <source>String</source> <translation>Строка</translation> </message> <message> - <location filename="../src/library/BaseTypes.cpp" line="120"/> + <location filename="../src/library/BaseTypes.cpp" line="121"/> <source>A string of characters</source> <translation>Строка Ñимволов</translation> </message> <message> - <location filename="../src/library/BaseTypes.cpp" line="144"/> + <location filename="../src/library/BaseTypes.cpp" line="145"/> <source>Boolean</source> <translation>ЛогичеÑкий тип</translation> </message> <message> - <location filename="../src/library/BaseTypes.cpp" line="144"/> + <location filename="../src/library/BaseTypes.cpp" line="145"/> <source>A boolean value (true/false)</source> <translation>Значение бинарной логики (иÑтина/ложь)</translation> </message> <message> - <location filename="../src/library/BaseTypes.cpp" line="156"/> + <location filename="../src/library/BaseTypes.cpp" line="170"/> <source>Number</source> <translation>ЧиÑловой тип</translation> </message> <message> - <location filename="../src/library/BaseTypes.cpp" line="156"/> + <location filename="../src/library/BaseTypes.cpp" line="170"/> <source>A number</source> <translation>ЧиÑло</translation> </message> <message> - <location filename="../src/library/BaseTypes.cpp" line="168"/> + <location filename="../src/library/BaseTypes.cpp" line="182"/> <source>Undefined</source> <translation>Ðеопределённый тип</translation> </message> <message> - <location filename="../src/library/BaseTypes.cpp" line="168"/> + <location filename="../src/library/BaseTypes.cpp" line="182"/> <source>A void type</source> <translation>ПуÑтое значение</translation> </message> <message> - <location filename="../src/library/BaseTypes.cpp" line="180"/> + <location filename="../src/library/BaseTypes.cpp" line="194"/> <source>Url datasets</source> <translation>ÐÐ´Ñ€ÐµÑ Ð½Ð°Ð±Ð¾Ñ€Ð¾Ð² данных</translation> </message> <message> - <location filename="../src/library/BaseTypes.cpp" line="180"/> + <location filename="../src/library/BaseTypes.cpp" line="194"/> <source>A list of urls grouped into datasets</source> <translation>СпиÑок адреÑов, Ñгруппированных в наборы данных</translation> </message> @@ -687,22 +687,22 @@ <context> <name>U2::DescriptorListEditorDelegate</name> <message> - <location filename="../src/support/MapDatatypeEditor.cpp" line="400"/> + <location filename="../src/support/MapDatatypeEditor.cpp" line="444"/> <source><empty></source> <translation><пуÑтой></translation> </message> <message> - <location filename="../src/support/MapDatatypeEditor.cpp" line="400"/> + <location filename="../src/support/MapDatatypeEditor.cpp" line="444"/> <source>Default value</source> <translation>Значение по умолчанию</translation> </message> <message> - <location filename="../src/support/MapDatatypeEditor.cpp" line="404"/> + <location filename="../src/support/MapDatatypeEditor.cpp" line="448"/> <source><List of values></source> <translation><СпиÑок значений></translation> </message> <message> - <location filename="../src/support/MapDatatypeEditor.cpp" line="404"/> + <location filename="../src/support/MapDatatypeEditor.cpp" line="448"/> <source>List of values</source> <translation>СпиÑок значений</translation> </message> @@ -726,316 +726,316 @@ </message> <message> <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="158"/> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="305"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="304"/> <source>Bad header: expected '%1', got '%2'</source> <translation>Bad header: expected '%1', got '%2'</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="383"/> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="385"/> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="387"/> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="399"/> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="401"/> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="445"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="382"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="384"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="386"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="398"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="400"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="444"/> <source>Database select definition: '%1' expected but not found</source> <translation>Database select definition: '%1' expected but not found</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="391"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="390"/> <source>Database select definition: invalid DB object URL</source> <translation>Database select definition: invalid DB object URL</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="406"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="405"/> <source>Database select definition: invalid DB folder URL</source> <translation>Database select definition: invalid DB folder URL</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="447"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="446"/> <source>Database select definition: expected either object or folder definition but both found</source> <translation>Database select definition: expected either object or folder definition but both found</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="458"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="457"/> <source>Database select definition: '%1' or '%2' expected but neither found</source> <translation>Database select definition: '%1' or '%2' expected but neither found</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="461"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="460"/> <source>Database select definition: '%1' is expected, '%2' is found</source> <translation>Database select definition: '%1' is expected, '%2' is found</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="486"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="485"/> <source>folder url definition: '%1' or '%2' are expected, '%3' is found</source> <translation>назначение папки: ожидаетÑÑ '%1' или '%2', найдено '%3'</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="494"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="493"/> <source>Element name cannot contain whitespaces: '%1'</source> <translation>Ð˜Ð¼Ñ Ñлемента не может Ñодержать пробелы: '%1'</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="497"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="496"/> <source>Element name cannot contain dots: '%1'</source> <translation>Ð˜Ð¼Ñ Ñлемента не может Ñодержать точки: '%1'</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="500"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="499"/> <source>Element '%1' already defined</source> <translation>Element '%1' already defined</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="506"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="505"/> <source>Type attribute not set for %1 element</source> <translation>Type attribute not set for %1 element</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="514"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="513"/> <source>Unknown type of %1 element: %2</source> <translation>Unknown type of %1 element: %2</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="523"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="522"/> <source>Name attribute not set for %1 element</source> <translation>Name attribute not set for %1 element</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="566"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="565"/> <source>Unexpected actor attribute: %1</source> <translation>Unexpected actor attribute: %1</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="589"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="588"/> <source>No validator type</source> <translation>No validator type</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="597"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="596"/> <source>Script validator has not a script</source> <translation>Script validator has not a script</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="603"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="602"/> <source>Too many blocks in validator definition</source> <translation>Too many blocks in validator definition</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="618"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="617"/> <source>Grouper out slot action: empty type</source> <translation>Grouper out slot action: empty type</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="620"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="619"/> <source>Grouper out slot action: invalid type: %1</source> <translation>Grouper out slot action: invalid type: %1</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="629"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="628"/> <source>Grouper out slot action: invalid parameter: %1</source> <translation>Grouper out slot action: invalid parameter: %1</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="641"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="640"/> <source>Grouper out slot action: bad int '%1' at parameter %2</source> <translation>Grouper out slot action: bad int '%1' at parameter %2</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="652"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="651"/> <source>Grouper out slot action: bad bool '%1' at parameter %2</source> <translation>Grouper out slot action: bad bool '%1' at parameter %2</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="687"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="686"/> <source>Grouper out slot: duplicated slot name: %1</source> <translation>Grouper out slot: duplicated slot name: %1</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="693"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="692"/> <source>Grouper out slot: unknown attribute: %1</source> <translation>Grouper out slot: unknown attribute: %1</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="697"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="696"/> <source>Grouper out slot: unknown block definition: '%1'. %2 expected</source> <translation>Grouper out slot: unknown block definition: '%1'. %2 expected</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="701"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="700"/> <source>Grouper out slot: unknown token: '%1'. %2 or %3 expected</source> <translation>Grouper out slot: unknown token: '%1'. %2 or %3 expected</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="706"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="705"/> <source>Grouper out slot: empty slot name</source> <translation>Grouper out slot: empty slot name</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="709"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="708"/> <source>Grouper out slot: empty in-slot</source> <translation>Grouper out slot: empty in-slot</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="1687"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="1735"/> <source>Error: element name in the workflow file contains spaces</source> <translation>Error: element name in the workflow file contains spaces</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="2049"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="2125"/> <source>%1 actor has not marker attribute</source> <translation>%1 actor has not marker attribute</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="2073"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="2149"/> <source>Name attribute is not set for the marker</source> <translation>Name attribute is not set for the marker</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="2076"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="2152"/> <source>Type attribute is not set for %1 marker</source> <translation>Type attribute is not set for %1 marker</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="2085"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="2161"/> <source>Qualifier name attribute is not set for %1 marker</source> <translation>Qualifier name attribute is not set for %1 marker</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="813"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="812"/> <source>Links list is not empty. Maybe .meta is defined earlier than actor-bindings</source> <translation>Links list is not empty. Maybe .meta is defined earlier than actor-bindings</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="859"/> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="956"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="858"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="955"/> <source>%1 element is undefined: at "%2" in aliases block</source> <translation>%1 element is undefined: at "%2" in aliases block</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="866"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="865"/> <source>%1 parameter is undefined: at "%2" in aliases block</source> <translation>%1 parameter is undefined: at "%2" in aliases block</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="878"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="877"/> <source>Duplicate parameter alias "%1"</source> <translation>Duplicate parameter alias "%1"</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="888"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="887"/> <source>Empty parameter alias block: "%1"</source> <translation>Empty parameter alias block: "%1"</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="897"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="896"/> <source>Duplicate parameter alias name "%1" at "%2"</source> <translation>Duplicate parameter alias name "%1" at "%2"</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="915"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="914"/> <source>No other blocks allowed in alias block</source> <translation>No other blocks allowed in alias block</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="1095"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="1094"/> <source>Undefined actor id '%1' at '%2'</source> <translation>Undefined actor id '%1' at '%2'</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="849"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="848"/> <source>Validating actor bindings graph failed: '%1'</source> <translation>Validating actor bindings graph failed: '%1'</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="756"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="755"/> <source>%1 definition expected at .iterations block</source> <translation>%1 definition expected at .iterations block</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="763"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="762"/> <source>Cannot parse integer from '%1': iteration id</source> <translation>Cannot parse integer from '%1': iteration id</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="770"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="769"/> <source>Element id '%1' undefined in .iteration block</source> <translation>Element id '%1' undefined in .iteration block</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="921"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="920"/> <source>%1 element undefined in aliases block</source> <translation>%1 element undefined in aliases block</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="925"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="924"/> <source>%1 has no parameter %2: in aliases block</source> <translation>%1 has no parameter %2: in aliases block</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="934"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="933"/> <source>No other blocks allowed in help block</source> <translation>No other blocks allowed in help block</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="941"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="940"/> <source>Undefined parameter alias used in help block: '%1'</source> <translation>Undefined parameter alias used in help block: '%1'</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="963"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="962"/> <source>%1 port is undefined: at "%2" in aliases block</source> <translation>%1 port is undefined: at "%2" in aliases block</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="976"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="975"/> <source>%1 slot is undefined: at "%2" in aliases block'</source> <translation>%1 slot is undefined: at "%2" in aliases block'</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="987"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="986"/> <source>Duplicate port alias "%1"</source> <translation>Duplicate port alias "%1"</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="998"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="997"/> <source>Empty port aliases are not allowed: %1</source> <translation>Empty port aliases are not allowed: %1</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="1007"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="1006"/> <source>Duplicate port alias name "%1" at "%2"</source> <translation>Duplicate port alias name "%1" at "%2"</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="1027"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="1026"/> <source>Duplicate slot alias "%1" at port alias"%2"</source> <translation>Duplicate slot alias "%1" at port alias"%2"</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="1039"/> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="1062"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="1038"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="1061"/> <source>Undefined element id '%1' at '%2'</source> <translation>Undefined element id '%1' at '%2'</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="1053"/> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="1076"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="1052"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="1075"/> <source>Undefined slot id '%1' at '%2'</source> <translation>Undefined slot id '%1' at '%2'</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="1067"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="1066"/> <source>Undefined port id '%1' at '%2'</source> <translation>Undefined port id '%1' at '%2'</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="1070"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="1069"/> <source>Destination port should be input: %1</source> <translation>Destination port should be input: %1</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="821"/> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="834"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="820"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="833"/> <source>Undefined element id: '%1'</source> <translation>Undefined element id: '%1'</translation> </message> @@ -1070,12 +1070,12 @@ <translation>Unknown file format: '%1'</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="310"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="309"/> <source>Workflow name not specified</source> <translation>Workflow name not specified</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="363"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="362"/> <source>Url definition does not contain dataset name</source> <translation>Url definition does not contain dataset name</translation> </message> @@ -1084,13 +1084,13 @@ <translation type="vanished">Folder url definition: '%1' or '%2' are expected, '%3' is found</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="826"/> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="839"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="825"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="838"/> <source>Cannot find '%1' port at '%2'</source> <translation>Cannot find '%1' port at '%2'</translation> </message> <message> - <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="803"/> + <location filename="../src/support/serialize/HRSchemaSerializer.cpp" line="802"/> <source>Cannot bind %1:%2 to %3:%4</source> <translation>Cannot bind %1:%2 to %3:%4</translation> </message> @@ -1205,17 +1205,17 @@ <context> <name>U2::MapDatatypeEditor</name> <message> - <location filename="../src/support/MapDatatypeEditor.cpp" line="87"/> + <location filename="../src/support/MapDatatypeEditor.cpp" line="116"/> <source>Slots</source> <translation>Слоты</translation> </message> <message> - <location filename="../src/support/MapDatatypeEditor.cpp" line="87"/> + <location filename="../src/support/MapDatatypeEditor.cpp" line="116"/> <source>Data source</source> <translation>ИÑточник данных</translation> </message> <message> - <location filename="../src/support/MapDatatypeEditor.cpp" line="180"/> + <location filename="../src/support/MapDatatypeEditor.cpp" line="214"/> <source>The input slot <b>%1</b><br>is bound to<br>the bus slot <b>%2</b></source> <translation>Входной Ñлот <b>%1</b><br>привÑзан к<br>Ñлоту шины <b>%2</b></translation> </message> @@ -1371,19 +1371,19 @@ <context> <name>U2::PrompterBaseImpl</name> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="1346"/> - <location filename="../src/support/WorkflowUtils.cpp" line="1366"/> - <location filename="../src/support/WorkflowUtils.cpp" line="1403"/> + <location filename="../src/support/WorkflowUtils.cpp" line="1364"/> + <location filename="../src/support/WorkflowUtils.cpp" line="1385"/> + <location filename="../src/support/WorkflowUtils.cpp" line="1422"/> <source>unset</source> <translation>не указан</translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="1381"/> + <location filename="../src/support/WorkflowUtils.cpp" line="1400"/> <source>file(s) alongside of input sources of <u>%1</u></source> <translation>файл(Ñ‹) Ñ€Ñдом Ñ Ð¸Ñходным(и) <u>%1</u></translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="1349"/> + <location filename="../src/support/WorkflowUtils.cpp" line="1368"/> <source>the list of files</source> <translation>ÑпиÑок файлов</translation> </message> @@ -1470,6 +1470,14 @@ <translation>Result document contains no MSA! %1</translation> </message> </context> +<context> + <name>U2::Workflow::ActorPrototypeRegistry</name> + <message> + <location filename="../src/model/ActorPrototypeRegistry.cpp" line="33"/> + <source>Can't register element config with ID '%1'%2. There is already registered element with this ID%3.</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>U2::Workflow::BaseActorCategories</name> <message> @@ -1914,17 +1922,17 @@ <translation>Ðе удалоÑÑŒ Ñоздать Ñоединение процеÑÑов %1 %2 Ð´Ð»Ñ Ñреды иÑÐ¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ %3</translation> </message> <message> - <location filename="../src/support/WorkflowRunTask.cpp" line="257"/> + <location filename="../src/support/WorkflowRunTask.cpp" line="258"/> <source>Failed to create a workflow context</source> <translation>Ðевозможно Ñоздать контекÑÑ‚ Ñхемы</translation> </message> <message> - <location filename="../src/support/WorkflowRunTask.cpp" line="319"/> + <location filename="../src/support/WorkflowRunTask.cpp" line="323"/> <source>No workers are ready, while not all workers are done. Workflow is broken?</source> <translation>Ð’Ñе процеÑÑÑ‹ находÑÑ‚ÑÑ Ð² ÑоÑтоÑнии "не готовы" (обработали входные данные), но не вÑе процеÑÑÑ‹ находÑÑ‚ÑÑ Ð² ÑоÑтоÑнии "завершил иÑполнение". ПожалуйÑта, проверьте Ñхему?</translation> </message> <message> - <location filename="../src/support/WorkflowRunTask.cpp" line="263"/> + <location filename="../src/support/WorkflowRunTask.cpp" line="264"/> <source>Failed to create scheduler in domain %1</source> <translation>Ðе удалоÑÑŒ Ñоздать планировщик Ð´Ð»Ñ Ñреды иÑÐ¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ %1</translation> </message> @@ -2045,7 +2053,7 @@ <context> <name>U2::WorkflowUtils</name> <message> - <location filename="../src/model/Attribute.cpp" line="234"/> + <location filename="../src/model/Attribute.cpp" line="242"/> <source>Required parameter is not set: %1</source> <translation>Ðе указан обÑзательный параметр "%1"</translation> </message> @@ -2055,87 +2063,91 @@ <translation>Ðеобходимо указать значение Ð´Ð»Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° "%1" либо ÑвÑзать входной Ñлот "%2"</translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="349"/> + <location filename="../src/support/WorkflowUtils.cpp" line="338"/> <source> (use --%1 option)</source> <translation> (иÑпользуйте --%1 опцию)</translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="403"/> + <location filename="../src/support/WorkflowUtils.cpp" line="394"/> <source><List of values></source> <translation><СпиÑок значений></translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="403"/> + <location filename="../src/support/WorkflowUtils.cpp" line="394"/> <source>List of values</source> <translation>СпиÑок значений</translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="566"/> + <location filename="../src/support/WorkflowUtils.cpp" line="557"/> <source>%1 actors in workflow have '%2' alias</source> <translation>%1 actors in workflow have '%2' alias</translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="637"/> + <location filename="../src/support/WorkflowUtils.cpp" line="634"/> <source>The %1 element is a %2. Sorry, but current version of UGENE doesn't support of filters and groupers in the includes.</source> <translation>%1 Ñлемент %2. Ð¢ÐµÐºÑƒÑ‰Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ UGENE не поддерживает фильтрацию и группировку.</translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="645"/> + <location filename="../src/support/WorkflowUtils.cpp" line="642"/> <source>filter</source> <translation>filter</translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="647"/> + <location filename="../src/support/WorkflowUtils.cpp" line="644"/> <source>grouper</source> <translation>grouper</translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="655"/> + <location filename="../src/support/WorkflowUtils.cpp" line="652"/> <source>The workflow has not any aliased ports</source> <translation>The workflow has not any aliased ports</translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="672"/> + <location filename="../src/support/WorkflowUtils.cpp" line="669"/> <source>The aliased port %1.%2 has no aliased slots</source> <translation>The aliased port %1.%2 has no aliased slots</translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="681"/> + <location filename="../src/support/WorkflowUtils.cpp" line="678"/> <source>The free port %1.%2 is not aliased</source> <translation>The free port %1.%2 is not aliased</translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="694"/> + <location filename="../src/support/WorkflowUtils.cpp" line="691"/> <source>The required parameter %1.%2 is empty and not aliased</source> <translation>The required parameter %1.%2 is empty and not aliased</translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="882"/> + <location filename="../src/support/WorkflowUtils.cpp" line="889"/> <source>External tool "%1" is not set. You can set it in Settings -> Preferences -> External Tools</source> <translation>External tool "%1" is not set. You can set it in Settings -> Preferences -> External Tools</translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="886"/> + <location filename="../src/support/WorkflowUtils.cpp" line="893"/> <source>External tool "%1" is invalid. UGENE may not support this version of the tool or a wrong path to the tools is selected</source> <translation>External tool "%1" is invalid. UGENE may not support this version of the tool or a wrong path to the tools is selected</translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="1201"/> + <location filename="../src/support/WorkflowUtils.cpp" line="1208"/> <source>Can't access output file path: '%1'</source> <translation>Can't access output file path: '%1'</translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="1220"/> + <location filename="../src/support/WorkflowUtils.cpp" line="1226"/> + <source>Workflow output folder '%1' can't be accessed. Check that the folder exists and you have enough permissions to write to it, or choose another folder in the UGENE Application Settings.</source> + <translation type="unfinished"></translation> + </message> + <message> <source>Can't output folder path: '%1', check permissions</source> - <translation>Can't output folder path: '%1', check permissions</translation> + <translation type="vanished">Can't output folder path: '%1', check permissions</translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="1239"/> + <location filename="../src/support/WorkflowUtils.cpp" line="1246"/> <source>Empty shared database URL specified</source> <translation>Empty shared database URL specified</translation> </message> <message> - <location filename="../src/support/WorkflowUtils.cpp" line="1311"/> + <location filename="../src/support/WorkflowUtils.cpp" line="1318"/> <source>Wrong samples map string</source> <translation>Wrong samples map string</translation> </message> diff --git a/src/corelibs/U2Private/U2Private.pri b/src/corelibs/U2Private/U2Private.pri index 2cdd231977a5d8856f02707fedf08ba4f5795a72..a7ca2b88b6d92bdf65c0754f65bca4676c6fb314 100644 --- a/src/corelibs/U2Private/U2Private.pri +++ b/src/corelibs/U2Private/U2Private.pri @@ -1,28 +1,17 @@ # include (U2Private.pri) -UGENE_RELATIVE_DESTDIR = '' MODULE_ID=U2Private include( ../../ugene_lib_common.pri ) QT += xml widgets network DEFINES += QT_FATAL_ASSERT BUILDING_U2PRIVATE_DLL -LIBS += -L../../_release -lU2Core -lU2Formats -lbreakpad +LIBS += -L../../$$out_dir() +LIBS += -lU2Core$$D -lU2Formats$$D -lbreakpad$$D INCLUDEPATH += ../../libs_3rdparty/breakpad/src - -!debug_and_release|build_pass { - CONFIG(debug, debug|release) { - DESTDIR = ../../_debug - LIBS -= -L../../_release -lU2Core -lU2Formats -lbreakpad - LIBS += -L../../_debug -lU2Cored -lU2Formatsd -lbreakpadd - } - - CONFIG(release, debug|release) { - DESTDIR = ../../_release - } -} +DESTDIR = ../../$$out_dir() unix { - target.path = $$UGENE_INSTALL_DIR/$$UGENE_RELATIVE_DESTDIR + target.path = $$UGENE_INSTALL_DIR/ INSTALLS += target } diff --git a/src/corelibs/U2Private/src/AppContextImpl.cpp b/src/corelibs/U2Private/src/AppContextImpl.cpp index be1d8c54e36b9aaf6e81abacc8a75d41bf5bc2c3..ae1920d408ff6861d8ff3cfa2c6c9bec4d49a38f 100644 --- a/src/corelibs/U2Private/src/AppContextImpl.cpp +++ b/src/corelibs/U2Private/src/AppContextImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/AppContextImpl.h b/src/corelibs/U2Private/src/AppContextImpl.h index 3490e6f5dd1b839dc4248247122e92c6c52f3842..ac8c6321758b8647c48750895ef15e417918fe7d 100644 --- a/src/corelibs/U2Private/src/AppContextImpl.h +++ b/src/corelibs/U2Private/src/AppContextImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -31,298 +31,303 @@ class U2PRIVATE_EXPORT AppContextImpl : public AppContext { Q_OBJECT public: AppContextImpl() { - ps = NULL; - sr = NULL; - pl = NULL; - prj = NULL; - prs = NULL; - mw = NULL; - pv = NULL; - plv = NULL; - ss = NULL; - gs = NULL; - dfr = NULL; - io = NULL; - dtr = NULL; - dal = NULL; - ovfr = NULL; - ts = NULL; - rt = NULL; - asr = NULL; - as = NULL; - tf = NULL; - dbxr = NULL; - swmarntr = NULL; - asg = NULL; - smr = NULL; - swar = NULL; - msfr = NULL; - swrfr = NULL; - mcsr = NULL; - mhsr = NULL; - secStructPredictRegistry = NULL; - cgr = NULL; - oclgr = NULL; - rdc = NULL; - protocolInfoRegistry = NULL; - remoteMachineMonitor = NULL; - treeGeneratorRegistry = NULL; - cmdLineRegistry = NULL; instance = this; - msaConsensusAlgoRegistry = NULL; - msaDistanceAlgoRegistry = NULL; - assemblyConsensusAlgoRegistry = NULL; - pwmConversionAlgoRegistry = NULL; - dnaAssemblyAlgRegistry = NULL; - genomeAssemblyAlgRegistry = NULL; - virtualFileSystemRegistry = NULL; - dataBaseRegistry = NULL; - externalToolRegistry = NULL; - splicedAlignmentTaskRegistry = NULL; - opCommonWidgetFactoryRegistry = NULL; - opWidgetFactoryRegistry = NULL; - workflowScriptRegistry = NULL; - appFileStorage = NULL; - aaSupport = NULL; - dbiRegistry = NULL; - udrSchemaRegistry = NULL; - rfr = NULL; - qdafr = NULL; - cdsfr = NULL; - saar = NULL; + + aaSupport = nullptr; + alignmentAlgorithmsRegistry = nullptr; + appFileStorage = nullptr; + as = nullptr; + asg = nullptr; + asr = nullptr; + assemblyConsensusAlgoRegistry = nullptr; + cdsfr = nullptr; + cfr = nullptr; + cgr = nullptr; + cmdLineRegistry = nullptr; + credentialsAsker = nullptr; + dal = nullptr; + dashboardInfoRegistry = nullptr; + dataBaseRegistry = nullptr; + dbiRegistry = nullptr; + dbxr = nullptr; + dfr = nullptr; + dnaAssemblyAlgRegistry = nullptr; + dpr = nullptr; + dtr = nullptr; + externalToolRegistry = nullptr; + genomeAssemblyAlgRegistry = nullptr; + gs = nullptr; + io = nullptr; + mcsr = nullptr; + mhsr = nullptr; + msaConsensusAlgoRegistry = nullptr; + msaDistanceAlgoRegistry = nullptr; + msfr = nullptr; + mw = nullptr; + oclgr = nullptr; + opCommonWidgetFactoryRegistry = nullptr; + opWidgetFactoryRegistry = nullptr; + ovfr = nullptr; + passwordStorage = nullptr; + pf = nullptr; + pl = nullptr; + plv = nullptr; + prj = nullptr; + projectFilterTaskRegistry = nullptr; + protocolInfoRegistry = nullptr; + prs = nullptr; + ps = nullptr; + pv = nullptr; + pwmConversionAlgoRegistry = nullptr; + qdafr = nullptr; + rdc = nullptr; + remoteMachineMonitor = nullptr; + rfr = nullptr; + rt = nullptr; + saar = nullptr; + secStructPredictRegistry = nullptr; + smr = nullptr; + splicedAlignmentTaskRegistry = nullptr; + sr = nullptr; + ss = nullptr; + str = nullptr; + swar = nullptr; + swmarntr = nullptr; + swrfr = nullptr; + tb = nullptr; + tf = nullptr; + treeGeneratorRegistry = nullptr; + ts = nullptr; + udrSchemaRegistry = nullptr; + virtualFileSystemRegistry = nullptr; + welcomePageActionRegistry = nullptr; + workflowScriptRegistry = nullptr; + guiMode = false; activeWindow = ""; - tb = NULL; - alignmentAlgorithmsRegistry = NULL; - dpr = NULL; workingDirectoryPath = ""; - str = NULL; - credentialsAsker = NULL; - passwordStorage = NULL; - cfr = NULL; - welcomePageActionRegistry = NULL; - projectFilterTaskRegistry = NULL; - pf = NULL; } ~AppContextImpl(); - void setPluginSupport(PluginSupport* _ps) {assert(ps == NULL || _ps == NULL); ps = _ps;} + void setPluginSupport(PluginSupport* _ps) {assert(ps == nullptr || _ps == nullptr); ps = _ps;} - void setServiceRegistry(ServiceRegistry* _sr) {assert(sr == NULL || _sr == NULL); sr = _sr;} + void setServiceRegistry(ServiceRegistry* _sr) {assert(sr == nullptr || _sr == nullptr); sr = _sr;} - void setProjectLoader(ProjectLoader* _pl) {assert(pl == NULL || _pl == NULL); pl = _pl;} + void setProjectLoader(ProjectLoader* _pl) {assert(pl == nullptr || _pl == nullptr); pl = _pl;} - void setProject(Project* _prj) {assert(prj == NULL || _prj == NULL); prj = _prj;} + void setProject(Project* _prj) {assert(prj == nullptr || _prj == nullptr); prj = _prj;} - void setProjectService(ProjectService* _prs) {assert(prs == NULL || _prs == NULL); prs = _prs;} + void setProjectService(ProjectService* _prs) {assert(prs == nullptr || _prs == nullptr); prs = _prs;} - void setMainWindow(MainWindow* _mw) {assert(mw == NULL || _mw == NULL); mw = _mw;} + void setMainWindow(MainWindow* _mw) {assert(mw == nullptr || _mw == nullptr); mw = _mw;} - void setProjectView(ProjectView* _pv) {assert(pv == NULL || _pv == NULL); pv = _pv;} + void setProjectView(ProjectView* _pv) {assert(pv == nullptr || _pv == nullptr); pv = _pv;} - void setPluginViewer(PluginViewer* _plv) {assert(plv == NULL || _plv == NULL); plv = _plv;} + void setPluginViewer(PluginViewer* _plv) {assert(plv == nullptr || _plv == nullptr); plv = _plv;} - void setSettings(Settings* _ss) {assert(ss == NULL || _ss == NULL); ss= _ss;} + void setSettings(Settings* _ss) {assert(ss == nullptr || _ss == nullptr); ss= _ss;} - void setGlobalSettings(Settings* _gs) {assert(gs == NULL || _gs == NULL); gs= _gs;} + void setGlobalSettings(Settings* _gs) {assert(gs == nullptr || _gs == nullptr); gs= _gs;} void setAppSettings( AppSettings* _as) { assert( as|| _as); as= _as; } - void setAppSettingsGUI( AppSettingsGUI* _asg) { assert( asg == NULL || _asg == NULL ); asg= _asg; } + void setAppSettingsGUI( AppSettingsGUI* _asg) { assert( asg == nullptr || _asg == nullptr ); asg= _asg; } - void setDocumentFormatRegistry(DocumentFormatRegistry* _dfr) {assert(dfr == NULL || _dfr == NULL); dfr = _dfr;} + void setDocumentFormatRegistry(DocumentFormatRegistry* _dfr) {assert(dfr == nullptr || _dfr == nullptr); dfr = _dfr;} - void setIOAdapterRegistry(IOAdapterRegistry* _io) {assert(io == NULL || _io == NULL); io = _io;} + void setIOAdapterRegistry(IOAdapterRegistry* _io) {assert(io == nullptr || _io == nullptr); io = _io;} - void setDNATranslationRegistry(DNATranslationRegistry* _dtr) {assert(dtr == NULL || _dtr == NULL);dtr = _dtr;} + void setDNATranslationRegistry(DNATranslationRegistry* _dtr) {assert(dtr == nullptr || _dtr == nullptr);dtr = _dtr;} - void setDNAAlphabetRegistry(DNAAlphabetRegistry* _dal) {assert(dal == NULL || _dal == NULL);dal = _dal;} + void setDNAAlphabetRegistry(DNAAlphabetRegistry* _dal) {assert(dal == nullptr || _dal == nullptr);dal = _dal;} - void setObjectViewFactoryRegistry(GObjectViewFactoryRegistry* _ovfr) {assert(ovfr == NULL || _ovfr == NULL); ovfr = _ovfr;} + void setObjectViewFactoryRegistry(GObjectViewFactoryRegistry* _ovfr) {assert(ovfr == nullptr || _ovfr == nullptr); ovfr = _ovfr;} - void setTaskScheduler(TaskScheduler* _ts) {assert(ts == NULL || _ts == NULL); ts = _ts;} + void setTaskScheduler(TaskScheduler* _ts) {assert(ts == nullptr || _ts == nullptr); ts = _ts;} - void setResourceTracker(ResourceTracker* _rt) {assert(rt == NULL || _rt == NULL); rt = _rt;} + void setResourceTracker(ResourceTracker* _rt) {assert(rt == nullptr || _rt == nullptr); rt = _rt;} - void setAnnotationSettingsRegistry(AnnotationSettingsRegistry* _asr) {assert(asr == NULL || _asr == NULL); asr = _asr;} + void setAnnotationSettingsRegistry(AnnotationSettingsRegistry* _asr) {assert(asr == nullptr || _asr == nullptr); asr = _asr;} void setTestFramework( TestFramework* _tf) { assert( tf || _tf ); tf = _tf; } - void setDBXRefRegistry( DBXRefRegistry* _dbxr) { assert( dbxr == NULL || _dbxr == NULL ); dbxr = _dbxr; } + void setDBXRefRegistry( DBXRefRegistry* _dbxr) { assert( dbxr == nullptr || _dbxr == nullptr ); dbxr = _dbxr; } - void setSubstMatrixRegistry(SubstMatrixRegistry* _smr) { assert( smr == NULL || _smr == NULL ); smr = _smr; } + void setSubstMatrixRegistry(SubstMatrixRegistry* _smr) { assert( smr == nullptr || _smr == nullptr ); smr = _smr; } - void setSmithWatermanTaskFactoryRegistry (SmithWatermanTaskFactoryRegistry* _swar) { assert( swar == NULL || _swar == NULL ); swar = _swar; } + void setSmithWatermanTaskFactoryRegistry (SmithWatermanTaskFactoryRegistry* _swar) { assert( swar == nullptr || _swar == nullptr ); swar = _swar; } - void setMolecularSurfaceFactoryRegistry (MolecularSurfaceFactoryRegistry* _msfr) { assert( msfr == NULL || _msfr == NULL ); msfr = _msfr; } + void setMolecularSurfaceFactoryRegistry (MolecularSurfaceFactoryRegistry* _msfr) { assert( msfr == nullptr || _msfr == nullptr ); msfr = _msfr; } - void setSWResultFilterRegistry (SWResultFilterRegistry* _swrfr) { assert( swrfr == NULL || _swrfr == NULL ); swrfr = _swrfr; } + void setSWResultFilterRegistry (SWResultFilterRegistry* _swrfr) { assert( swrfr == nullptr || _swrfr == nullptr ); swrfr = _swrfr; } - void setSWMulAlignResultNamesTagsRegistry (SWMulAlignResultNamesTagsRegistry * _swmarntr) { assert( swmarntr == NULL || _swmarntr == NULL ); swmarntr = _swmarntr; } + void setSWMulAlignResultNamesTagsRegistry (SWMulAlignResultNamesTagsRegistry * _swmarntr) { assert( swmarntr == nullptr || _swmarntr == nullptr ); swmarntr = _swmarntr; } - void setMsaColorSchemeRegistry(MsaColorSchemeRegistry* _mcsr) {assert( mcsr == NULL || _mcsr == NULL ); mcsr = _mcsr;} + void setMsaColorSchemeRegistry(MsaColorSchemeRegistry* _mcsr) {assert( mcsr == nullptr || _mcsr == nullptr ); mcsr = _mcsr;} - void setMsaHighlightingSchemeRegistry(MsaHighlightingSchemeRegistry* _mhsr) {assert( mhsr == NULL || _mhsr == NULL ); mhsr = _mhsr;} + void setMsaHighlightingSchemeRegistry(MsaHighlightingSchemeRegistry* _mhsr) {assert( mhsr == nullptr || _mhsr == nullptr ); mhsr = _mhsr;} - void setSecStructPedictAlgRegistry(SecStructPredictAlgRegistry* _sspar) {assert( secStructPredictRegistry == NULL || _sspar == NULL ); secStructPredictRegistry = _sspar;} + void setSecStructPedictAlgRegistry(SecStructPredictAlgRegistry* _sspar) {assert( secStructPredictRegistry == nullptr || _sspar == nullptr ); secStructPredictRegistry = _sspar;} - void setCudaGpuRegistry( CudaGpuRegistry * _cgr ) { assert( cgr == NULL || _cgr == NULL ); cgr = _cgr; } + void setCudaGpuRegistry( CudaGpuRegistry * _cgr ) { assert( cgr == nullptr || _cgr == nullptr ); cgr = _cgr; } - void setOpenCLGpuRegistry( OpenCLGpuRegistry* _oclgr ) { assert( oclgr == NULL || _oclgr == NULL ); oclgr = _oclgr; } + void setOpenCLGpuRegistry( OpenCLGpuRegistry* _oclgr ) { assert( oclgr == nullptr || _oclgr == nullptr ); oclgr = _oclgr; } - void setRecentlyDownloadedCache( RecentlyDownloadedCache* _rdc) { assert( rdc == NULL || _rdc == NULL ); rdc = _rdc;} + void setRecentlyDownloadedCache( RecentlyDownloadedCache* _rdc) { assert( rdc == nullptr || _rdc == nullptr ); rdc = _rdc;} - void setDataPathRegistry( U2DataPathRegistry* _dpr) { assert( dpr == NULL || _dpr == NULL ); dpr = _dpr;} + void setDataPathRegistry( U2DataPathRegistry* _dpr) { assert( dpr == nullptr || _dpr == nullptr ); dpr = _dpr;} - void setScriptingToolRegistry( ScriptingToolRegistry* _str) { assert( str == NULL || _str == NULL ); str = _str;} + void setScriptingToolRegistry( ScriptingToolRegistry* _str) { assert( str == nullptr || _str == nullptr ); str = _str;} - void setPasteFactory( PasteFactory* _pf) { assert( pf == NULL || _pf == NULL ); pf = _pf;} + void setPasteFactory( PasteFactory* _pf) { assert( pf == nullptr || _pf == nullptr ); pf = _pf;} - void setProtocolInfoRegistry( ProtocolInfoRegistry * pr ) { assert( NULL == protocolInfoRegistry || NULL == pr ); + void setDashboardInfoRegistry(DashboardInfoRegistry *_dashboardInfoRegistry) { assert(dashboardInfoRegistry == nullptr || _dashboardInfoRegistry == nullptr); dashboardInfoRegistry = _dashboardInfoRegistry; } + + void setProtocolInfoRegistry( ProtocolInfoRegistry * pr ) { assert( nullptr == protocolInfoRegistry || nullptr == pr ); protocolInfoRegistry = pr; } - void setRemoteMachineMonitor( RemoteMachineMonitor * rm ) { assert( NULL == remoteMachineMonitor || NULL == rm ); + void setRemoteMachineMonitor( RemoteMachineMonitor * rm ) { assert( nullptr == remoteMachineMonitor || nullptr == rm ); remoteMachineMonitor = rm; } void setPhyTreeGeneratorRegistry(PhyTreeGeneratorRegistry* genRegistry) { - assert(NULL == treeGeneratorRegistry || NULL == genRegistry); + assert(nullptr == treeGeneratorRegistry || nullptr == genRegistry); treeGeneratorRegistry = genRegistry; } void setMSAConsensusAlgorithmRegistry(MSAConsensusAlgorithmRegistry* reg) { - assert(reg == NULL || msaConsensusAlgoRegistry == NULL); + assert(reg == nullptr || msaConsensusAlgoRegistry == nullptr); msaConsensusAlgoRegistry = reg; } void setMSADistanceAlgorithmRegistry(MSADistanceAlgorithmRegistry* reg) { - assert(reg == NULL || msaDistanceAlgoRegistry == NULL); + assert(reg == nullptr || msaDistanceAlgoRegistry == nullptr); msaDistanceAlgoRegistry = reg; } void setAssemblyConsensusAlgorithmRegistry(AssemblyConsensusAlgorithmRegistry* reg) { - assert(reg == NULL || assemblyConsensusAlgoRegistry == NULL); + assert(reg == nullptr || assemblyConsensusAlgoRegistry == nullptr); assemblyConsensusAlgoRegistry = reg; } void setPWMConversionAlgorithmRegistry(PWMConversionAlgorithmRegistry* reg) { - assert(reg == NULL || pwmConversionAlgoRegistry == NULL); + assert(reg == nullptr || pwmConversionAlgoRegistry == nullptr); pwmConversionAlgoRegistry = reg; } - void setCMDLineRegistry(CMDLineRegistry* r) { assert(cmdLineRegistry == NULL || r == NULL); cmdLineRegistry = r; } + void setCMDLineRegistry(CMDLineRegistry* r) { assert(cmdLineRegistry == nullptr || r == nullptr); cmdLineRegistry = r; } void setVirtualFileSystemRegistry( VirtualFileSystemRegistry * r ) { - assert( virtualFileSystemRegistry == NULL || r == NULL ); + assert( virtualFileSystemRegistry == nullptr || r == nullptr ); virtualFileSystemRegistry = r; } void setDnaAssemblyAlgRegistry( DnaAssemblyAlgRegistry * r ) { - assert( dnaAssemblyAlgRegistry == NULL || r == NULL ); + assert( dnaAssemblyAlgRegistry == nullptr || r == nullptr ); dnaAssemblyAlgRegistry = r; } void setGenomeAssemblyAlgRegistry( GenomeAssemblyAlgRegistry * r ) { - assert( genomeAssemblyAlgRegistry == NULL || r == NULL ); + assert( genomeAssemblyAlgRegistry == nullptr || r == nullptr ); genomeAssemblyAlgRegistry = r; } void setDataBaseRegistry( DataBaseRegistry *dbr) { - assert (dataBaseRegistry == NULL || dbr == NULL ); + assert (dataBaseRegistry == nullptr || dbr == nullptr ); dataBaseRegistry = dbr; } void setExternalToolRegistry( ExternalToolRegistry * _etr) { - assert( externalToolRegistry == NULL || _etr == NULL ); + assert( externalToolRegistry == nullptr || _etr == nullptr ); externalToolRegistry = _etr; } void setRepeatFinderTaskFactoryRegistry (RepeatFinderTaskFactoryRegistry* _rfr) { - assert( rfr == NULL || _rfr == NULL ); rfr = _rfr; + assert( rfr == nullptr || _rfr == nullptr ); rfr = _rfr; } void setQDActorFactoryRegistry(QDActorPrototypeRegistry* _queryfactoryRegistry) { - assert( qdafr == NULL || _queryfactoryRegistry == NULL ); + assert( qdafr == nullptr || _queryfactoryRegistry == nullptr ); qdafr = _queryfactoryRegistry; } void setAutoAnnotationsSupport(AutoAnnotationsSupport* _aaSupport) { - assert( aaSupport == NULL || _aaSupport == NULL ); + assert( aaSupport == nullptr || _aaSupport == nullptr ); aaSupport = _aaSupport; } void setDbiRegistry(U2DbiRegistry *_dbiRegistry) { - assert((NULL == dbiRegistry) || (NULL == _dbiRegistry)); + assert((nullptr == dbiRegistry) || (nullptr == _dbiRegistry)); dbiRegistry = _dbiRegistry; } void setUdrSchemaRegistry(UdrSchemaRegistry *_udrSchemaRegistry) { - assert((NULL == udrSchemaRegistry) || (NULL == _udrSchemaRegistry)); + assert((nullptr == udrSchemaRegistry) || (nullptr == _udrSchemaRegistry)); udrSchemaRegistry = _udrSchemaRegistry; } void setCDSearchFactoryRegistry(CDSearchFactoryRegistry* _cdsfr) { - assert((NULL == cdsfr) || (NULL == _cdsfr)); + assert((nullptr == cdsfr) || (nullptr == _cdsfr)); cdsfr= _cdsfr; } void setSplicedAlignmentTaskRegistry(SplicedAlignmentTaskRegistry* tr) { - assert((NULL == splicedAlignmentTaskRegistry) || (NULL == tr)); + assert((nullptr == splicedAlignmentTaskRegistry) || (nullptr == tr)); splicedAlignmentTaskRegistry = tr; } void setOPCommonWidgetFactoryRegistry(OPCommonWidgetFactoryRegistry *_opCommonWidgetFactoryRegistry) { - assert((NULL == opCommonWidgetFactoryRegistry) || (NULL == _opCommonWidgetFactoryRegistry)); + assert((nullptr == opCommonWidgetFactoryRegistry) || (nullptr == _opCommonWidgetFactoryRegistry)); opCommonWidgetFactoryRegistry = _opCommonWidgetFactoryRegistry; } void setOPWidgetFactoryRegistry(OPWidgetFactoryRegistry* _opWidgetFactoryRegistry) { - assert((NULL == opWidgetFactoryRegistry) || (NULL == _opWidgetFactoryRegistry)); + assert((nullptr == opWidgetFactoryRegistry) || (nullptr == _opWidgetFactoryRegistry)); opWidgetFactoryRegistry = _opWidgetFactoryRegistry; } void setStructuralAlignmentAlgorithmRegistry(StructuralAlignmentAlgorithmRegistry *_saar) { - assert(saar == NULL || _saar == NULL); + assert(saar == nullptr || _saar == nullptr); saar = _saar; } void setWorkflowScriptRegistry(WorkflowScriptRegistry *_wsr) { - assert(workflowScriptRegistry == NULL || _wsr == NULL); + assert(workflowScriptRegistry == nullptr || _wsr == nullptr); workflowScriptRegistry = _wsr; } void setCredentialsAsker(CredentialsAsker* _credentialsAsker) { - assert(credentialsAsker == NULL || _credentialsAsker == NULL); + assert(credentialsAsker == nullptr || _credentialsAsker == nullptr); credentialsAsker = _credentialsAsker; } void setPasswordStorage(PasswordStorage *_passwordStorage) { - assert(passwordStorage == NULL || _passwordStorage == NULL); + assert(passwordStorage == nullptr || _passwordStorage == nullptr); passwordStorage = _passwordStorage; } void setAppFileStorage(AppFileStorage *afs) { - assert(appFileStorage == NULL || afs == NULL); + assert(appFileStorage == nullptr || afs == nullptr); appFileStorage = afs; } void setAlignmentAlgorithmsRegistry(AlignmentAlgorithmsRegistry* _alignmentAlgorithmsRegistry) { - assert(alignmentAlgorithmsRegistry == NULL || _alignmentAlgorithmsRegistry == NULL); + assert(alignmentAlgorithmsRegistry == nullptr || _alignmentAlgorithmsRegistry == nullptr); alignmentAlgorithmsRegistry = _alignmentAlgorithmsRegistry; } void setConvertFactoryRegistry(ConvertFactoryRegistry* _cfr) { - assert(cfr == NULL || _cfr == NULL); + assert(cfr == nullptr || _cfr == nullptr); cfr = _cfr; } void setWelcomePageActionRegistry(IdRegistry<WelcomePageAction> *value) { - assert(welcomePageActionRegistry == NULL || value == NULL); + assert(welcomePageActionRegistry == nullptr || value == nullptr); welcomePageActionRegistry = value; } void setProjectFilterTaskRegistry(ProjectFilterTaskRegistry *value) { - assert(projectFilterTaskRegistry == NULL || value == NULL); + assert(projectFilterTaskRegistry == nullptr || value == nullptr); projectFilterTaskRegistry = value; } @@ -339,7 +344,7 @@ public: workingDirectoryPath = path; } - void setGUITestBase(UGUITestBase *_tb) {assert(tb == NULL || _tb == NULL); tb = _tb;} + void setGUITestBase(UGUITestBase *_tb) {assert(tb == nullptr || _tb == nullptr); tb = _tb;} static AppContextImpl* getApplicationContext(); @@ -414,6 +419,7 @@ protected: virtual IdRegistry<WelcomePageAction>* _getWelcomePageActionRegistry() const { return welcomePageActionRegistry; } virtual ProjectFilterTaskRegistry * _getProjectFilterTaskRegistry() const { return projectFilterTaskRegistry; } virtual PasteFactory * _getPasteFactory() const { return pf; } + virtual DashboardInfoRegistry * _getDashboardInfoRegistry() const { return dashboardInfoRegistry; } virtual void _registerGlobalObject(AppGlobalObject* go); virtual void _unregisterGlobalObject(const QString& id); @@ -423,74 +429,76 @@ protected: virtual QString _getWorkingDirectoryPath() const { return workingDirectoryPath; } private: - PluginSupport* ps; - ServiceRegistry* sr; - ProjectLoader* pl; - Project* prj; - ProjectService* prs; - MainWindow* mw; - ProjectView* pv; - PluginViewer* plv; - Settings* ss; - Settings* gs; - DocumentFormatRegistry* dfr; - IOAdapterRegistry* io; - DNATranslationRegistry* dtr; - DNAAlphabetRegistry* dal; - GObjectViewFactoryRegistry* ovfr; - TaskScheduler* ts; - ResourceTracker* rt; + AlignmentAlgorithmsRegistry* alignmentAlgorithmsRegistry; AnnotationSettingsRegistry* asr; + AppFileStorage *appFileStorage; AppSettings * as; - TestFramework* tf; + AppSettingsGUI* asg; + AssemblyConsensusAlgorithmRegistry* assemblyConsensusAlgoRegistry; + AutoAnnotationsSupport* aaSupport; + CDSearchFactoryRegistry* cdsfr; + CMDLineRegistry* cmdLineRegistry; + ConvertFactoryRegistry *cfr; + CredentialsAsker* credentialsAsker; + CudaGpuRegistry * cgr; DBXRefRegistry* dbxr; - SubstMatrixRegistry* smr; - SmithWatermanTaskFactoryRegistry* swar; + DNAAlphabetRegistry* dal; + DNATranslationRegistry* dtr; + DashboardInfoRegistry *dashboardInfoRegistry; + DataBaseRegistry* dataBaseRegistry; + DnaAssemblyAlgRegistry* dnaAssemblyAlgRegistry; + DocumentFormatRegistry* dfr; + ExternalToolRegistry * externalToolRegistry; + GObjectViewFactoryRegistry* ovfr; + GenomeAssemblyAlgRegistry* genomeAssemblyAlgRegistry; + IOAdapterRegistry* io; + IdRegistry<WelcomePageAction> *welcomePageActionRegistry; + MSAConsensusAlgorithmRegistry* msaConsensusAlgoRegistry; + MSADistanceAlgorithmRegistry* msaDistanceAlgoRegistry; + MainWindow* mw; MolecularSurfaceFactoryRegistry* msfr; - SWResultFilterRegistry* swrfr; - SWMulAlignResultNamesTagsRegistry * swmarntr; - AppSettingsGUI* asg; MsaColorSchemeRegistry* mcsr; MsaHighlightingSchemeRegistry *mhsr; - SecStructPredictAlgRegistry* secStructPredictRegistry; - CudaGpuRegistry * cgr; + OPCommonWidgetFactoryRegistry* opCommonWidgetFactoryRegistry; + OPWidgetFactoryRegistry* opWidgetFactoryRegistry; OpenCLGpuRegistry * oclgr; - RecentlyDownloadedCache* rdc; - ProtocolInfoRegistry * protocolInfoRegistry; - RemoteMachineMonitor * remoteMachineMonitor; - PhyTreeGeneratorRegistry *treeGeneratorRegistry; - CMDLineRegistry* cmdLineRegistry; - MSAConsensusAlgorithmRegistry* msaConsensusAlgoRegistry; - MSADistanceAlgorithmRegistry* msaDistanceAlgoRegistry; - AssemblyConsensusAlgorithmRegistry* assemblyConsensusAlgoRegistry; PWMConversionAlgorithmRegistry* pwmConversionAlgoRegistry; - VirtualFileSystemRegistry * virtualFileSystemRegistry; - DnaAssemblyAlgRegistry* dnaAssemblyAlgRegistry; - GenomeAssemblyAlgRegistry* genomeAssemblyAlgRegistry; - DataBaseRegistry* dataBaseRegistry; - ExternalToolRegistry * externalToolRegistry; - RepeatFinderTaskFactoryRegistry* rfr; + PasswordStorage* passwordStorage; PasteFactory* pf; + PhyTreeGeneratorRegistry *treeGeneratorRegistry; + PluginSupport* ps; + PluginViewer* plv; + Project* prj; + ProjectFilterTaskRegistry *projectFilterTaskRegistry; + ProjectLoader* pl; + ProjectService* prs; + ProjectView* pv; + ProtocolInfoRegistry * protocolInfoRegistry; QDActorPrototypeRegistry* qdafr; - CDSearchFactoryRegistry* cdsfr; + RecentlyDownloadedCache* rdc; + RemoteMachineMonitor * remoteMachineMonitor; + RepeatFinderTaskFactoryRegistry* rfr; + ResourceTracker* rt; + SWMulAlignResultNamesTagsRegistry * swmarntr; + SWResultFilterRegistry* swrfr; + ScriptingToolRegistry *str; + SecStructPredictAlgRegistry* secStructPredictRegistry; + ServiceRegistry* sr; + Settings* gs; + Settings* ss; + SmithWatermanTaskFactoryRegistry* swar; + SplicedAlignmentTaskRegistry* splicedAlignmentTaskRegistry; StructuralAlignmentAlgorithmRegistry* saar; - AutoAnnotationsSupport* aaSupport; + SubstMatrixRegistry* smr; + TaskScheduler* ts; + TestFramework* tf; + U2DataPathRegistry *dpr; U2DbiRegistry *dbiRegistry; - UdrSchemaRegistry *udrSchemaRegistry; UGUITestBase *tb; - SplicedAlignmentTaskRegistry* splicedAlignmentTaskRegistry; - OPCommonWidgetFactoryRegistry* opCommonWidgetFactoryRegistry; - OPWidgetFactoryRegistry* opWidgetFactoryRegistry; + UdrSchemaRegistry *udrSchemaRegistry; + VirtualFileSystemRegistry * virtualFileSystemRegistry; WorkflowScriptRegistry* workflowScriptRegistry; - AppFileStorage *appFileStorage; - AlignmentAlgorithmsRegistry* alignmentAlgorithmsRegistry; - U2DataPathRegistry *dpr; - ScriptingToolRegistry *str; - CredentialsAsker* credentialsAsker; - PasswordStorage* passwordStorage; - ConvertFactoryRegistry *cfr; - IdRegistry<WelcomePageAction> *welcomePageActionRegistry; - ProjectFilterTaskRegistry *projectFilterTaskRegistry; + bool guiMode; QString activeWindow; QString workingDirectoryPath; diff --git a/src/corelibs/U2Private/src/AppSettingsImpl.cpp b/src/corelibs/U2Private/src/AppSettingsImpl.cpp index 505b437dd32bc4d0b96765eae81543356db599f2..54dc91db142227ec97196ad361d524fb880e842e 100644 --- a/src/corelibs/U2Private/src/AppSettingsImpl.cpp +++ b/src/corelibs/U2Private/src/AppSettingsImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/AppSettingsImpl.h b/src/corelibs/U2Private/src/AppSettingsImpl.h index 892f24f677e59e87fafa43f584cd3257294b4a57..8d9e726e334da3a65cc1a5527d9dc4d6cec2b243 100644 --- a/src/corelibs/U2Private/src/AppSettingsImpl.h +++ b/src/corelibs/U2Private/src/AppSettingsImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/ConsoleLogDriver.cpp b/src/corelibs/U2Private/src/ConsoleLogDriver.cpp index ff55b9258d1f275fd5c8db864f40d3a58017f7c8..21c9a0af02d28b0d84d133afd5a49782bfbcba95 100644 --- a/src/corelibs/U2Private/src/ConsoleLogDriver.cpp +++ b/src/corelibs/U2Private/src/ConsoleLogDriver.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/ConsoleLogDriver.h b/src/corelibs/U2Private/src/ConsoleLogDriver.h index 0f3ced3c1fb7980bceb15bdbdd719d6136c4c8be..3ef724e194f3993d420b55b6a1c2efc4ac8c9d0b 100644 --- a/src/corelibs/U2Private/src/ConsoleLogDriver.h +++ b/src/corelibs/U2Private/src/ConsoleLogDriver.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/CredentialsAskerCli.cpp b/src/corelibs/U2Private/src/CredentialsAskerCli.cpp index 40c5997c2e91c7b3d49ede13d42386b1ff5282f3..a3b39a43d82bf495eabdda9efeddaf866c23e733 100644 --- a/src/corelibs/U2Private/src/CredentialsAskerCli.cpp +++ b/src/corelibs/U2Private/src/CredentialsAskerCli.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -41,7 +41,7 @@ static struct termios oldTerm, newTerm; /* Initialize new terminal i/o settings */ -void initTermios(int echo) { +static void initTermios(int echo) { tcgetattr(0, &oldTerm); /* grab old terminal i/o settings */ newTerm = oldTerm; /* make new settings same as old settings */ newTerm.c_lflag &= ~ICANON; /* disable buffered i/o */ @@ -84,34 +84,26 @@ static const QString ASTERISC_STR = "*"; static const QString YES_STR = "Y"; static const QString NO_STR = "N"; -static const QString ENTER_PWD_STR = QObject::tr("Enter password: "); -static const QString ENTER_LOGIN_STR = QObject::tr("Enter user name: "); - -static const QString REMEMBER_PWD_QUESTION = QObject::tr("Would you like UGENE to remember the password?"); -static const QString CONNECTION_START_STR = QObject::tr("Connect to the '%1' ...\n"); -static const QString LOGIN_NOTIFICATION_STR = QObject::tr("You are going to log in as '%1'.\n"); -static const QString USE_ANOTHER_LOGIN_QUESTION = QObject::tr("Would you like to log in as another user?"); - namespace U2 { namespace { -void printString(const QString &str) { +static void printString(const QString &str) { std::cout << str.toLocal8Bit().constData(); } -QString getChar() { +static QString getChar() { const char c = _getch(); return QString::fromLocal8Bit(QByteArray(1, c)); } -QString getLine() { +static QString getLine() { std::string result; getline(std::cin, result); return QString::fromStdString(result); } -bool askYesNoQuestion(const QString &question) { +static bool askYesNoQuestion(const QString &question) { QString readKey; int yes = -1; int no = -1; @@ -126,12 +118,12 @@ bool askYesNoQuestion(const QString &question) { return 0 == yes; } -bool inputFinish(const QString &key) { +static bool inputFinish(const QString &key) { return (NEW_LINE_STR == key) || (RETURN_STR == key) || (RETURN_STR + NEW_LINE_STR == key); } -QString askPwd() { - printString(ENTER_PWD_STR); +static QString askPwd() { + printString(QObject::tr("Enter password: ")); QString pwd; @@ -159,13 +151,13 @@ bool CredentialsAskerCli::askWithFixedLogin(const QString &resourceUrl) const { SAFE_POINT(!AppContext::isGUIMode(), "Unexpected application run mode", false); QString userName; - const QString shortDbiUrl = U2DbiUtils::full2shortDbiUrl(resourceUrl, userName); + QString shortDbiUrl = U2DbiUtils::full2shortDbiUrl(resourceUrl, userName); - printString(CONNECTION_START_STR.arg(shortDbiUrl)); - printString(LOGIN_NOTIFICATION_STR.arg(userName)); + printString(QObject::tr("Connect to the '%1' ...\n").arg(shortDbiUrl)); + printString(QObject::tr("You are going to log in as '%1'.\n").arg(userName)); - const QString pwd = askPwd(); - const bool isRemembered = askYesNoQuestion(REMEMBER_PWD_QUESTION); + QString pwd = askPwd(); + bool isRemembered = askYesNoQuestion(QObject::tr("Would you like UGENE to remember the password?")); saveCredentials(resourceUrl, pwd, isRemembered); return true; @@ -175,22 +167,22 @@ bool CredentialsAskerCli::askWithModifiableLogin(QString &resourceUrl) const { SAFE_POINT(!AppContext::isGUIMode(), "Unexpected application run mode", false); QString userName; - const QString shortDbiUrl = U2DbiUtils::full2shortDbiUrl(resourceUrl, userName); + QString shortDbiUrl = U2DbiUtils::full2shortDbiUrl(resourceUrl, userName); - printString(CONNECTION_START_STR.arg(shortDbiUrl)); - printString(LOGIN_NOTIFICATION_STR.arg(userName)); - const bool logAsAnotherUser = askYesNoQuestion(USE_ANOTHER_LOGIN_QUESTION); + printString(QObject::tr("Connect to the '%1' ...\n").arg(shortDbiUrl)); + printString(QObject::tr("You are going to log in as '%1'.\n").arg(userName)); + bool logAsAnotherUser = askYesNoQuestion(QObject::tr("Would you like to log in as another user?")); if (logAsAnotherUser) { do { - printString(ENTER_LOGIN_STR); + printString(QObject::tr("Enter user name: ")); userName = getLine(); } while (!userName.isEmpty()); printString(NEW_LINE_STR); } - const QString pwd = askPwd(); - const bool isRemembered = askYesNoQuestion(REMEMBER_PWD_QUESTION); + QString pwd = askPwd(); + bool isRemembered = askYesNoQuestion(QObject::tr("Would you like UGENE to remember the password?")); resourceUrl = U2DbiUtils::createFullDbiUrl(userName, shortDbiUrl); saveCredentials(resourceUrl, pwd, isRemembered); diff --git a/src/corelibs/U2Private/src/CredentialsAskerCli.h b/src/corelibs/U2Private/src/CredentialsAskerCli.h index 042f6d79bdb27cd24557de905dcdaf57a9fe834b..877721b0b15efc0e6e9f77f3c11220a80df3372d 100644 --- a/src/corelibs/U2Private/src/CredentialsAskerCli.h +++ b/src/corelibs/U2Private/src/CredentialsAskerCli.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/DocumentFormatRegistryImpl.cpp b/src/corelibs/U2Private/src/DocumentFormatRegistryImpl.cpp index 15a5fe7d44e90620c23287e42de93baae0926f58..51255bba60ccfa55e0faa6f732652f65a9fa3853 100644 --- a/src/corelibs/U2Private/src/DocumentFormatRegistryImpl.cpp +++ b/src/corelibs/U2Private/src/DocumentFormatRegistryImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/DocumentFormatRegistryImpl.h b/src/corelibs/U2Private/src/DocumentFormatRegistryImpl.h index 3f376544b4c8dca45500f418e8e5209a224c8456..0c107356173a80f7f9224576f684663fad592b89 100644 --- a/src/corelibs/U2Private/src/DocumentFormatRegistryImpl.h +++ b/src/corelibs/U2Private/src/DocumentFormatRegistryImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/IOAdapterRegistryImpl.cpp b/src/corelibs/U2Private/src/IOAdapterRegistryImpl.cpp index 3937f4947b817b91ea0265b76fa2759f2dce2212..f12107a6357e44b84672800ffe54f3a96ad4d4a6 100644 --- a/src/corelibs/U2Private/src/IOAdapterRegistryImpl.cpp +++ b/src/corelibs/U2Private/src/IOAdapterRegistryImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/IOAdapterRegistryImpl.h b/src/corelibs/U2Private/src/IOAdapterRegistryImpl.h index f47b5761087ea679442caa7235a532f0a5a75df7..f068fa5a8f33185434af695a37090bac8e4fd0c7 100644 --- a/src/corelibs/U2Private/src/IOAdapterRegistryImpl.h +++ b/src/corelibs/U2Private/src/IOAdapterRegistryImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/LogSettings.cpp b/src/corelibs/U2Private/src/LogSettings.cpp index 00d05069459f196864ed36f4b53ad88e4242c414..a3633aaaf363ebebfd6e76a9ca89097af2b0ca5b 100644 --- a/src/corelibs/U2Private/src/LogSettings.cpp +++ b/src/corelibs/U2Private/src/LogSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/LogSettings.h b/src/corelibs/U2Private/src/LogSettings.h index 4abcbacd99547de934a5a7e6634eef9b19436354..ad999d66ee85f33a1b3dedf44feff3a57ca69fba 100644 --- a/src/corelibs/U2Private/src/LogSettings.h +++ b/src/corelibs/U2Private/src/LogSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/PluginDescriptor.cpp b/src/corelibs/U2Private/src/PluginDescriptor.cpp index 247082dd1b1f793ef2fba142509a453142d2f43c..9936354b085e81a526ca1fbc14f97f1b3646d291 100644 --- a/src/corelibs/U2Private/src/PluginDescriptor.cpp +++ b/src/corelibs/U2Private/src/PluginDescriptor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/PluginDescriptor.h b/src/corelibs/U2Private/src/PluginDescriptor.h index 0848bc06ec4e877ee995d718334500b2a3c567af..07a36e97f86457aabb9dea6fe075d280fdc5a0a5 100644 --- a/src/corelibs/U2Private/src/PluginDescriptor.h +++ b/src/corelibs/U2Private/src/PluginDescriptor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/PluginSupportImpl.cpp b/src/corelibs/U2Private/src/PluginSupportImpl.cpp index 12c2883c19df1e771a1e97722d54ae85c46962bf..9540ff8e63362289a5f7537bca7adfa7f82191f3 100644 --- a/src/corelibs/U2Private/src/PluginSupportImpl.cpp +++ b/src/corelibs/U2Private/src/PluginSupportImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -47,7 +47,6 @@ namespace U2 { /* TRANSLATOR U2::PluginSupportImpl */ -#define PLUGINS_LIST_SETTINGS QString("plugin_support/list/") #define SKIP_LIST_SETTINGS QString("plugin_support/skip_list/") #define PLUGINS_ACCEPTED_LICENSE_LIST QString("plugin_support/accepted_list/") #define PLUGIN_VERIFICATION QString("plugin_support/verification/") @@ -63,7 +62,7 @@ PluginRef::PluginRef(Plugin* _plugin, QLibrary* _library, const PluginDesc& desc PluginSupportImpl::PluginSupportImpl(): allLoaded(false) { connect(this, SIGNAL(si_allStartUpPluginsLoaded()), SLOT(sl_registerServices())); - Task* loadStartUpPlugins = new LoadAllPluginsTask(this, getPluginPaths().toList()); + Task* loadStartUpPlugins = new LoadAllPluginsTask(this, findAllPluginsInDefaultPluginsDir()); AppContext::getTaskScheduler()->registerTopLevelTask(loadStartUpPlugins); } @@ -257,7 +256,6 @@ void PluginSupportImpl::registerPlugin(PluginRef* ref) { plugRefs.push_back(ref); plugins.push_back(ref->plugin); updateSavedState(ref); - emit si_pluginAdded(ref->plugin); } @@ -276,17 +274,6 @@ QString PluginSupportImpl::getPluginFileURL(Plugin* p) const { return QString::null; } - -Task* PluginSupportImpl::addPluginTask(const QString& pathToPlugin) { - QString err; - PluginDesc desc = PluginDescriptorHelper::readPluginDescriptor(pathToPlugin, err); - Task* res = new AddPluginTask(this, desc, true); - if (!err.isEmpty()) { - res->setError(err); - } - return res; -} - PluginRef* PluginSupportImpl::findRef(Plugin* p) const { foreach(PluginRef* r, plugRefs) { if (r->plugin == p) { @@ -305,23 +292,6 @@ PluginRef* PluginSupportImpl::findRefById(const QString& pluginId) const { return NULL; } - -//plugin will not be removed from the plugin list during the next app run -void PluginSupportImpl::setRemoveFlag(Plugin* p, bool v) { - PluginRef* r = findRef(p); - assert(r!=NULL); - if (r->removeFlag == v) { - return; - } - r->removeFlag = v; - updateSavedState(r); - emit si_pluginRemoveFlagChanged(p); -} - -bool PluginSupportImpl::getRemoveFlag(Plugin* p) const { - PluginRef* r = findRef(p); - return r->removeFlag; -} void PluginSupportImpl::setLicenseAccepted(Plugin *p){ p->acceptLicense(); PluginRef* r = findRef(p); @@ -334,14 +304,11 @@ void PluginSupportImpl::updateSavedState(PluginRef* ref) { return; } Settings* settings = AppContext::getSettings(); - QString pluginListSettingsDir = settings->toVersionKey(PLUGINS_LIST_SETTINGS); QString skipListSettingsDir = settings->toVersionKey(SKIP_LIST_SETTINGS); QString pluginAcceptedLicenseSettingsDir = settings->toVersionKey(PLUGINS_ACCEPTED_LICENSE_LIST); QString descUrl = ref->pluginDesc.descriptorUrl.getURLString(); QString pluginId = ref->pluginDesc.id; if (ref->removeFlag) { - settings->remove(pluginListSettingsDir + pluginId); - //add to skip-list if auto-loaded if (isDefaultPluginsDir(descUrl)) { QStringList skipFiles = settings->getValue(skipListSettingsDir, QStringList()).toStringList(); @@ -351,8 +318,6 @@ void PluginSupportImpl::updateSavedState(PluginRef* ref) { } } } else { - settings->setValue(pluginListSettingsDir + pluginId, descUrl); - //remove from skip-list if present if (isDefaultPluginsDir(descUrl)) { QStringList skipFiles = settings->getValue(skipListSettingsDir, QStringList()).toStringList(); @@ -377,31 +342,6 @@ bool PluginSupportImpl::isDefaultPluginsDir(const QString& url) { return urlAbsDir == plugsDir; } -QSet<QString> PluginSupportImpl::getPluginPaths(){ - Settings* settings = AppContext::getSettings(); - QString pluginListSettingsDir = settings->toVersionKey(PLUGINS_LIST_SETTINGS); - - QStringList pluginsIds; - if (AppContext::getCMDLineRegistry()->hasParameter(CMDLineRegistry::PLUGINS_ARG)) { - pluginsIds = getCmdlinePlugins(); - } else { - pluginsIds = settings->getAllKeys(pluginListSettingsDir); - } - - QSet<QString> pluginFiles; - foreach (const QString& pluginId, pluginsIds) { - QString file = settings->getValue(pluginListSettingsDir + pluginId).toString(); - if(!file.isEmpty()) { - pluginFiles.insert(file); - } - } - //read all plugins from the current folder and from ./plugins folder - pluginFiles.unite(findAllPluginsInDefaultPluginsDir().toSet()); - - return pluginFiles; -} - - ////////////////////////////////////////////////////////////////////////// /// Tasks AddPluginTask:: AddPluginTask(PluginSupportImpl* _ps, const PluginDesc& _desc, bool forceVerification) @@ -582,7 +522,7 @@ void VerifyPluginTask::run() { int elapsedTime = 0; while(!proc->waitForFinished(1000) && elapsedTime < timeOut) { if(isCanceled()) { - proc->kill(); + CmdlineTaskRunner::killProcessTree(proc); } elapsedTime += 1000; } diff --git a/src/corelibs/U2Private/src/PluginSupportImpl.h b/src/corelibs/U2Private/src/PluginSupportImpl.h index 3f82862f78510f7efc631f0739575a968c7fed5b..6972c33dc66562f626b26315aacc2ca44e7d94a8 100644 --- a/src/corelibs/U2Private/src/PluginSupportImpl.h +++ b/src/corelibs/U2Private/src/PluginSupportImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -61,12 +61,6 @@ public: virtual const QList<Plugin*>& getPlugins() {return plugins;} - virtual Task* addPluginTask(const QString& pathToPlugin); - - //plugin will not be removed from the plugin list during the next app run - virtual void setRemoveFlag(Plugin* p, bool v); - virtual bool getRemoveFlag(Plugin* p) const; - virtual void setLicenseAccepted(Plugin* p); @@ -88,7 +82,6 @@ protected: QString getPluginFileURL(Plugin* p) const; void updateSavedState(PluginRef* ref); - static QSet<QString> getPluginPaths(); private: QList<PluginRef*> plugRefs; diff --git a/src/corelibs/U2Private/src/ServiceRegistryImpl.cpp b/src/corelibs/U2Private/src/ServiceRegistryImpl.cpp index aeebcb76b58d975a936949b9645c8ca673057fb7..9ddd77bbd2610412d6b1cb58baac09fe4a03e88f 100644 --- a/src/corelibs/U2Private/src/ServiceRegistryImpl.cpp +++ b/src/corelibs/U2Private/src/ServiceRegistryImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -166,7 +166,6 @@ void RegisterServiceTask::prepare() { } sr->services.append(s); - emit sr->si_serviceRegistered(s); addSubTask(new EnableServiceTask(sr, s, false)); } diff --git a/src/corelibs/U2Private/src/ServiceRegistryImpl.h b/src/corelibs/U2Private/src/ServiceRegistryImpl.h index 73eeb406059427260e904d8f0c648694251cc5b7..213f20c95cb50cb6f60b0730729e0716427b8a94 100644 --- a/src/corelibs/U2Private/src/ServiceRegistryImpl.h +++ b/src/corelibs/U2Private/src/ServiceRegistryImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/SettingsImpl.cpp b/src/corelibs/U2Private/src/SettingsImpl.cpp index fcc38baf29da361abc34ccad70647167111eb888..43291bbfcefa1b9072df68454420c3365893cfe7 100644 --- a/src/corelibs/U2Private/src/SettingsImpl.cpp +++ b/src/corelibs/U2Private/src/SettingsImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/SettingsImpl.h b/src/corelibs/U2Private/src/SettingsImpl.h index f7e10dfe77dabdc286001c44d1b5786f9f6cb5ff..7af49645f32e0ba757d4c4de82fbfc3dfb15f734 100644 --- a/src/corelibs/U2Private/src/SettingsImpl.h +++ b/src/corelibs/U2Private/src/SettingsImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/SleepPreventerMac.cpp b/src/corelibs/U2Private/src/SleepPreventerMac.cpp index 55a78278bf34b0e96f1dc51e7daaacfafe1c5dde..1dc99ef5cdbf06453090564da70550d24121a1ff 100644 --- a/src/corelibs/U2Private/src/SleepPreventerMac.cpp +++ b/src/corelibs/U2Private/src/SleepPreventerMac.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/SleepPreventerMac.h b/src/corelibs/U2Private/src/SleepPreventerMac.h index 550bfb30fd403f27fd31a823fd80bf425f210482..6c2a9fe3117b543338b5897e956286b52d9103ce 100644 --- a/src/corelibs/U2Private/src/SleepPreventerMac.h +++ b/src/corelibs/U2Private/src/SleepPreventerMac.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/TaskSchedulerImpl.cpp b/src/corelibs/U2Private/src/TaskSchedulerImpl.cpp index 183a357ee393587f271ac448ec29126dfe05b93c..0993f02cae41c07aed4ee036777d393975c99669 100644 --- a/src/corelibs/U2Private/src/TaskSchedulerImpl.cpp +++ b/src/corelibs/U2Private/src/TaskSchedulerImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -101,8 +101,8 @@ void TaskSchedulerImpl::cancelTask(Task* task) { taskLog.info(tr("Canceling task: %1").arg(task->getTaskName())); getTaskStateInfo(task).cancelFlag = true; resumeThreadWithTask(task); // for the case when task's thread is paused. it should be resumed and terminated - foreach(Task* t, task->getSubtasks()) { - cancelTask(t); + foreach(const QPointer<Task> &t, task->getSubtasks()) { + cancelTask(t.data()); } } } @@ -134,7 +134,7 @@ void TaskSchedulerImpl::propagateStateToParent(Task* task) { cancelTask(parentTask); } else if (task->hasError() && parentTask->getFlags().testFlag(TaskFlag_FailOnSubtaskError)) { TaskStateInfo& tsi = getTaskStateInfo(parentTask); - if (parentTask->getFlags().testFlag(TaskFlag_MinimizeSubtaskErrorText)) { + if (parentTask->isMinimizeSubtaskErrorText()) { tsi.setError(task->getError()); } else { tsi.setError( tr("Subtask {%1} is failed: %2").arg(task->getTaskName()).arg(task->getError())); @@ -171,8 +171,8 @@ bool TaskSchedulerImpl::processFinishedTasks() { //if the task was canceled -> cancel subtasks too if (ti->task->isCanceled() && !ti->subtasksWereCanceled) { ti->subtasksWereCanceled = true; - foreach(Task* t, ti->task->getSubtasks()) { - cancelTask(t); + foreach(const QPointer<Task> &t, ti->task->getSubtasks()) { + cancelTask(t.data()); } } @@ -347,6 +347,7 @@ void TaskSchedulerImpl::runReady() { } else { runThread(ti); } + connect(ti->thread, SIGNAL(si_processMySubtasks()), SLOT(sl_processSubtasks()), Qt::BlockingQueuedConnection); } } @@ -583,11 +584,11 @@ bool TaskSchedulerImpl::addToPriorityQueue(Task* task, TaskInfo* pti) { promoteTask(ti, Task::State_Prepared); int nParallel = task->getNumParallelSubtasks(); - const QList<Task*>& subtasks = task->getSubtasks(); + const QList<QPointer<Task> > &subtasks = task->getSubtasks(); for (int i = 0, n = subtasks.size(); i < n; i++) { - Task* sub = subtasks[i]; + Task* sub = subtasks[i].data(); bool ok = i < nParallel && addToPriorityQueue(sub, ti); - if (!ok && !sub->hasError()) { //if task got err on resource allocation -> its not new now, but failed + if (!ok && (!sub->hasError() || sub->getTaskResources().count() == 0)) { //if task got err on resource allocation -> its not new now, but failed ti->newSubtasks.append(sub); if( !tasksWithNewSubtasks.contains(ti) ){ tasksWithNewSubtasks.append(ti); @@ -615,8 +616,8 @@ void TaskSchedulerImpl::unregisterTopLevelTask(Task* task) { } void TaskSchedulerImpl::stopTask(Task* task) { - foreach(Task* sub, task->getSubtasks()) { - stopTask(sub); + foreach(const QPointer<Task> &sub, task->getSubtasks()) { + stopTask(sub.data()); } foreach(TaskInfo* ti, priorityQueue) { //stop task if its running @@ -646,7 +647,7 @@ bool TaskSchedulerImpl::readyToFinish(TaskInfo* ti) { return false; } #ifdef _DEBUG - foreach(Task* sub, ti->task->getSubtasks()) { //must be true because of 'numFinishedSubtasks' check above + foreach(const QPointer<Task> &sub, ti->task->getSubtasks()) { //must be true because of 'numFinishedSubtasks' check above assert(sub->getState() == Task::State_Finished); } assert(ti->newSubtasks.isEmpty()); @@ -699,14 +700,14 @@ void TaskSchedulerImpl::checkSerialPromotion(TaskInfo* pti, Task* subtask) { int nParallel = task->getNumParallelSubtasks(); bool before = true; int numActive = 0; - const QList<Task*>& subs = task->getSubtasks(); + const QList<QPointer<Task> > &subs = task->getSubtasks(); for (int i=0, n = subs.size(); i < n; i++) { - Task* sub = subs[i]; + const QPointer<Task> &sub = subs[i]; if (!sub->isNew() && !sub->isFinished()) { numActive++; assert(numActive <= nParallel); } - if (sub == subtask) { + if (sub.data() == subtask) { before = false; } else if (before) { Task::State subState = sub->getState(); @@ -714,7 +715,7 @@ void TaskSchedulerImpl::checkSerialPromotion(TaskInfo* pti, Task* subtask) { // the current task (that is not "locked"). In this case their // state would be "New" if (sub->getTaskResources().size() == 0) { - assert(subState!=Task::State_New); + assert(subState != Task::State_New || sub->hasError()); } } } @@ -734,7 +735,7 @@ void TaskSchedulerImpl::createSleepPreventer() { static void checkFinishedState(TaskInfo* ti) { #ifdef _DEBUG - foreach(Task* sub, ti->task->getSubtasks()) { + foreach(const QPointer<Task> &sub, ti->task->getSubtasks()) { assert(sub->getState() == Task::State_Finished); } assert(ti->newSubtasks.empty()); @@ -818,7 +819,7 @@ void TaskSchedulerImpl::promoteTask(TaskInfo* ti, Task::State newState) { if (parentTask!=NULL){ int localPreparedSubs, localRunningSubs, localFinishedSubs, localNewSubs, localTotalSubs; localTotalSubs = localNewSubs = localPreparedSubs = localRunningSubs = localFinishedSubs = 0; - foreach (Task* sub, parentTask->getSubtasks()){ + foreach (const QPointer<Task> &sub, parentTask->getSubtasks()){ switch (sub->getState()){ case Task::State_New: localNewSubs++; @@ -853,9 +854,9 @@ void TaskSchedulerImpl::updateTaskProgressAndDesc(TaskInfo* ti) { //update desc if (ti->task->useDescriptionFromSubtask()) { - const QList<Task*>& subs = task->getSubtasks(); + const QList<QPointer<Task> >& subs = task->getSubtasks(); if (!subs.isEmpty()) { - Task* sub = subs.last(); + const QPointer<Task> &sub = subs.last(); tsi.setDescription(sub->getStateInfo().getDescription()); } } @@ -879,12 +880,12 @@ void TaskSchedulerImpl::updateTaskProgressAndDesc(TaskInfo* ti) { } } else { assert(task->getProgressManagementType() == Task::Progress_SubTasksBased); - const QList<Task*>& subs = task->getSubtasks(); + const QList<QPointer<Task> > &subs = task->getSubtasks(); int nsubs = subs.size(); if (nsubs > 0) { float sum = 0; float maxSum = 0.001F; - foreach(Task* sub, subs) { + foreach(const QPointer<Task> &sub, subs) { float w = sub->getSubtaskProgressWeight(); sum += sub->getProgress() * w; maxSum += w; @@ -906,17 +907,17 @@ void TaskSchedulerImpl::updateTaskProgressAndDesc(TaskInfo* ti) { void TaskSchedulerImpl::deleteTask(Task* task) { SAFE_POINT(task != NULL, "Trying to delete NULL task",); - foreach(Task* sub, task->getSubtasks()) { + foreach(const QPointer<Task> &sub, task->getSubtasks()) { //todo: check subtask autodelete ?? - deleteTask(sub); + deleteTask(sub.data()); } taskLog.trace(tr("Deleting task: %1").arg(task->getTaskName())); task->deleteLater(); } void TaskSchedulerImpl::finishSubtasks(TaskInfo *pti) { - foreach (Task *sub, pti->task->getSubtasks()) { - TaskInfo ti(sub, pti); + foreach (const QPointer<Task> &sub, pti->task->getSubtasks()) { + TaskInfo ti(sub.data(), pti); finishSubtasks(&ti); promoteTask(&ti, Task::State_Finished); } @@ -962,7 +963,18 @@ void TaskSchedulerImpl::sl_threadFinished() { timer.setInterval(0); } -Task * TaskSchedulerImpl::getTopLevelTaskById( qint64 id ) const { +void TaskSchedulerImpl::sl_processSubtasks() { + TaskThread *taskThread = qobject_cast<TaskThread*>(sender()); + foreach(const QPointer<Task> &subtask, taskThread->ti->task->getSubtasks()) { + if (subtask->isFinished() && !taskThread->getProcessedSubtasks().contains(subtask)) { + onSubTaskFinished(taskThread, subtask.data()); + taskThread->appendProcessedSubtask(subtask.data()); + break; + } + } +} + +Task * TaskSchedulerImpl::getTopLevelTaskById(qint64 id) const { Task * ret = NULL; foreach( Task * task, topLevelTasks ) { assert( NULL != task ); @@ -1088,15 +1100,7 @@ bool TaskThread::event(QEvent *event) { void TaskThread::getNewSubtasks() { if(ti->task->hasFlags(TaskFlag_RunMessageLoopOnly) && !newSubtasksObtained) { - TaskSchedulerImpl *scheduler = dynamic_cast<TaskSchedulerImpl *>(AppContext::getTaskScheduler()); - assert(NULL != scheduler); - foreach (Task *subtask, ti->task->getSubtasks()) { - if (subtask->isFinished() && !processedSubtasks.contains(subtask)) { - scheduler->onSubTaskFinished(this, subtask); - processedSubtasks << subtask; - break; - } - } + emit si_processMySubtasks(); } } @@ -1124,6 +1128,14 @@ void TaskThread::resume() { } } +QList<Task*> TaskThread::getProcessedSubtasks() const { + return processedSubtasks; +} + +void TaskThread::appendProcessedSubtask(Task *subtask) { + processedSubtasks << subtask; +} + TaskInfo::~TaskInfo() { if (thread!=NULL) { if (!thread->isFinished()) { diff --git a/src/corelibs/U2Private/src/TaskSchedulerImpl.h b/src/corelibs/U2Private/src/TaskSchedulerImpl.h index f2c00b029813338b0d5e007dbae5d74644efe08f..d26c7b3ede9b73c50d4c1ee3ac6989676aa99795 100644 --- a/src/corelibs/U2Private/src/TaskSchedulerImpl.h +++ b/src/corelibs/U2Private/src/TaskSchedulerImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -49,10 +49,13 @@ public: }; class TaskThread : public QThread { + Q_OBJECT public: TaskThread(TaskInfo* _ti); void run(); void resume(); + QList<Task*> getProcessedSubtasks() const; + void appendProcessedSubtask(Task *); TaskInfo* ti; QObject* finishEventListener; @@ -63,6 +66,8 @@ public: QWaitCondition pauser; volatile bool isPaused; QMutex pauseLocker; +signals: + void si_processMySubtasks(); protected: bool event(QEvent *event); @@ -148,6 +153,7 @@ public: private slots: void update(); void sl_threadFinished(); + void sl_processSubtasks(); private: bool processFinishedTasks(); diff --git a/src/corelibs/U2Private/src/crash_handler/CrashHandler.cpp b/src/corelibs/U2Private/src/crash_handler/CrashHandler.cpp index c0efe8af64864c58d7c228ef0f7b387f44026d3a..3bda5e967ab5739fd73cd9dc6cb1f50bd5c5282c 100644 --- a/src/corelibs/U2Private/src/crash_handler/CrashHandler.cpp +++ b/src/corelibs/U2Private/src/crash_handler/CrashHandler.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -192,8 +192,8 @@ QString CrashHandler::generateReport(const QString &exceptionType, int maxReport } QString progress = QString::number(t->getStateInfo().progress); taskList.append(t->getTaskName() + "\t" + state + "\t" + progress + "\n"); - foreach(Task *tt, t->getSubtasks()) { - getSubTasks(tt, taskList, 1); + foreach(const QPointer<Task> &tt, t->getSubtasks()) { + getSubTasks(tt.data(), taskList, 1); } } } @@ -245,8 +245,8 @@ void CrashHandler::getSubTasks(Task *t, QString& list, int lvl) { } QString progress = QString::number(t->getStateInfo().progress); list.append(prefix + t->getTaskName() + "\t" + state + "\t" + progress + "\n"); - foreach(Task *tt, t->getSubtasks()) { - getSubTasks(tt, list, lvl + 1); + foreach(const QPointer<Task> &tt, t->getSubtasks()) { + getSubTasks(tt.data(), list, lvl + 1); } } } diff --git a/src/corelibs/U2Private/src/crash_handler/CrashHandler.h b/src/corelibs/U2Private/src/crash_handler/CrashHandler.h index ed37b86bd31859b19273cdda1fe784184b8ca2af..e047b89421fd6e980e33425276ea47cc0b18ea9e 100644 --- a/src/corelibs/U2Private/src/crash_handler/CrashHandler.h +++ b/src/corelibs/U2Private/src/crash_handler/CrashHandler.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/crash_handler/CrashHandlerArgsHelper.cpp b/src/corelibs/U2Private/src/crash_handler/CrashHandlerArgsHelper.cpp index 758c513352b24efa970e9db02ef7564c213e5231..57d4039fc792ca4d3c4d2fd2bce7755cdc52f741 100644 --- a/src/corelibs/U2Private/src/crash_handler/CrashHandlerArgsHelper.cpp +++ b/src/corelibs/U2Private/src/crash_handler/CrashHandlerArgsHelper.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/crash_handler/CrashHandlerArgsHelper.h b/src/corelibs/U2Private/src/crash_handler/CrashHandlerArgsHelper.h index 41b873baddd890297937466fbbf42eddd583d650..56c18104b60c8938d00b3950da2f90214191c40b 100644 --- a/src/corelibs/U2Private/src/crash_handler/CrashHandlerArgsHelper.h +++ b/src/corelibs/U2Private/src/crash_handler/CrashHandlerArgsHelper.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivate.cpp b/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivate.cpp index e96ae20a97f7276b26e91477da94a451549f3036..1ac80f15f5f1d112c178caa0333afed059367970 100644 --- a/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivate.cpp +++ b/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivate.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivate.h b/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivate.h index 71c55f9b3b026647fed54bc8ea244835cb3d2d14..4dbac49e20bb77c83e3b3577ffe68a653639c51f 100644 --- a/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivate.h +++ b/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivate.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateMac.cpp b/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateMac.cpp index 29eb270eb72f6470004f0fc7a404b03d88d734a0..f21f07a841eef3940e2d379e0774758e47b701e0 100644 --- a/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateMac.cpp +++ b/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateMac.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateMac.h b/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateMac.h index f1d4ca5fc86be10ac67aeb050875bbde3441261d..bce3a3673c971f558e3b61b98ed33972e445f7ce 100644 --- a/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateMac.h +++ b/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateMac.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateUnixNotMac.cpp b/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateUnixNotMac.cpp index 634503635d5793b5f2ebd9c576091f4fc21145b0..48130e22db8e534aefdeb6cca7c2681c99368ed1 100644 --- a/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateUnixNotMac.cpp +++ b/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateUnixNotMac.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateUnixNotMac.h b/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateUnixNotMac.h index c34fd0af3ae1c1fe0ebca993d7fe1832aa6b4e55..07c0241b8028da984d1011a65b7a5e533e42cbc6 100644 --- a/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateUnixNotMac.h +++ b/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateUnixNotMac.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateWin.cpp b/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateWin.cpp index dff2d61af34075aee655180b9607089158a781b2..025f695bd91bb171036fffc218dc11a512618b90 100644 --- a/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateWin.cpp +++ b/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateWin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateWin.h b/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateWin.h index 020f10079caef4bde167d5984f5c95fa345ad517..ec4c5b5a42bc4b011fffc05ae1487c7c450025cf 100644 --- a/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateWin.h +++ b/src/corelibs/U2Private/src/crash_handler/CrashHandlerPrivateWin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/crash_handler/CrashLogCache.cpp b/src/corelibs/U2Private/src/crash_handler/CrashLogCache.cpp index eaa170993cbca62c3831610c1d5e2375f9884aeb..7dc8a3c650a158f37e243ff411a53cae0e3ed20b 100644 --- a/src/corelibs/U2Private/src/crash_handler/CrashLogCache.cpp +++ b/src/corelibs/U2Private/src/crash_handler/CrashLogCache.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/crash_handler/CrashLogCache.h b/src/corelibs/U2Private/src/crash_handler/CrashLogCache.h index 0398513f7aed1a02a04d20744bbe03380e65fa81..3a331ddce5530e7d5af58304e4d368a07a20f389 100644 --- a/src/corelibs/U2Private/src/crash_handler/CrashLogCache.h +++ b/src/corelibs/U2Private/src/crash_handler/CrashLogCache.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/crash_handler/StackWalker.cpp b/src/corelibs/U2Private/src/crash_handler/StackWalker.cpp index 8cffa3d58f7d10c589671d7faa6249961af15187..5d8538919b1f153954d40294673f2fadbb9fef53 100644 --- a/src/corelibs/U2Private/src/crash_handler/StackWalker.cpp +++ b/src/corelibs/U2Private/src/crash_handler/StackWalker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/src/crash_handler/StackWalker.h b/src/corelibs/U2Private/src/crash_handler/StackWalker.h index d9241b156adac0097cd094772062e8a1904a06b4..67dcf3886f1592f3adb30f18cfafccb82f750f9e 100644 --- a/src/corelibs/U2Private/src/crash_handler/StackWalker.h +++ b/src/corelibs/U2Private/src/crash_handler/StackWalker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Private/transl/russian.ts b/src/corelibs/U2Private/transl/russian.ts index a7894e631e209433388dfbedf11d6c761c3caff7..19e58666b402c928f795c28e047f726795062d3e 100644 --- a/src/corelibs/U2Private/transl/russian.ts +++ b/src/corelibs/U2Private/transl/russian.ts @@ -4,36 +4,39 @@ <context> <name>QObject</name> <message> - <location filename="../src/CredentialsAskerCli.cpp" line="87"/> + <location filename="../src/CredentialsAskerCli.cpp" line="126"/> <source>Enter password: </source> <translation>Пароль: </translation> </message> <message> - <location filename="../src/CredentialsAskerCli.cpp" line="88"/> + <location filename="../src/CredentialsAskerCli.cpp" line="178"/> <source>Enter user name: </source> <translation>Ð˜Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ: </translation> </message> <message> - <location filename="../src/CredentialsAskerCli.cpp" line="90"/> + <location filename="../src/CredentialsAskerCli.cpp" line="160"/> + <location filename="../src/CredentialsAskerCli.cpp" line="185"/> <source>Would you like UGENE to remember the password?</source> <translation>Запомнить пароль?</translation> </message> <message> - <location filename="../src/CredentialsAskerCli.cpp" line="91"/> + <location filename="../src/CredentialsAskerCli.cpp" line="156"/> + <location filename="../src/CredentialsAskerCli.cpp" line="172"/> <source>Connect to the '%1' ... </source> <translation>Подключение к '%1' ... </translation> </message> <message> - <location filename="../src/CredentialsAskerCli.cpp" line="92"/> + <location filename="../src/CredentialsAskerCli.cpp" line="157"/> + <location filename="../src/CredentialsAskerCli.cpp" line="173"/> <source>You are going to log in as '%1'. </source> <translation>Ð’Ñ‹ ÑобираетеÑÑŒ войти как '%1'. </translation> </message> <message> - <location filename="../src/CredentialsAskerCli.cpp" line="93"/> + <location filename="../src/CredentialsAskerCli.cpp" line="174"/> <source>Would you like to log in as another user?</source> <translation>Хотите войти под другим пользователем?</translation> </message> @@ -41,47 +44,47 @@ <context> <name>U2::AddPluginTask</name> <message> - <location filename="../src/PluginSupportImpl.cpp" line="408"/> + <location filename="../src/PluginSupportImpl.cpp" line="348"/> <source>Add plugin task: %1</source> <translation>Загрузка внешнего модулÑ: %1</translation> </message> <message> - <location filename="../src/PluginSupportImpl.cpp" line="423"/> + <location filename="../src/PluginSupportImpl.cpp" line="363"/> <source>Plugin is already loaded: %1</source> <translation>Модуль уже загружен: %1</translation> </message> <message> - <location filename="../src/PluginSupportImpl.cpp" line="431"/> + <location filename="../src/PluginSupportImpl.cpp" line="371"/> <source>Plugin %1 depends on %2 which is not loaded</source> <translation>Модуль %1 завиÑит от Ð¼Ð¾Ð´ÑƒÐ»Ñ %2, который не был загружен</translation> </message> <message> - <location filename="../src/PluginSupportImpl.cpp" line="435"/> + <location filename="../src/PluginSupportImpl.cpp" line="375"/> <source>Plugin %1 depends on %2 which is available, but the version is too old</source> <translation>Модуль %1 завиÑит от Ð¼Ð¾Ð´ÑƒÐ»Ñ %2, который доÑтупен, но верÑÐ¸Ñ ÐºÐ¾Ñ‚Ð¾Ñ€Ð¾Ð³Ð¾ уÑтарела</translation> </message> <message> - <location filename="../src/PluginSupportImpl.cpp" line="446"/> + <location filename="../src/PluginSupportImpl.cpp" line="386"/> <source>Plugin loading error: %1, Error string %2</source> <translation>Ошибка загрузки модулÑ: %1, Ñтрока %2</translation> </message> <message> - <location filename="../src/PluginSupportImpl.cpp" line="452"/> + <location filename="../src/PluginSupportImpl.cpp" line="392"/> <source>Settings is NULL</source> <translation>Settings is NULL</translation> </message> <message> - <location filename="../src/PluginSupportImpl.cpp" line="507"/> + <location filename="../src/PluginSupportImpl.cpp" line="447"/> <source>Plugin loading error: %1. Verification failed.</source> <translation>Plugin loading error: %1. Verification failed.</translation> </message> <message> - <location filename="../src/PluginSupportImpl.cpp" line="527"/> + <location filename="../src/PluginSupportImpl.cpp" line="467"/> <source>Plugin initialization routine was not found: %1</source> <translation>Ðе найдена Ð²Ñ…Ð¾Ð´Ð½Ð°Ñ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÐºÐ¸ модулÑ: %1</translation> </message> <message> - <location filename="../src/PluginSupportImpl.cpp" line="533"/> + <location filename="../src/PluginSupportImpl.cpp" line="473"/> <source>Plugin initialization failed: %1</source> <translation>Ошибка инициализации модулÑ: %1</translation> </message> @@ -149,27 +152,27 @@ By default, loglevel="ERROR".</source> <context> <name>U2::DisableServiceTask</name> <message> - <location filename="../src/ServiceRegistryImpl.cpp" line="287"/> + <location filename="../src/ServiceRegistryImpl.cpp" line="286"/> <source>Disable '%1' service</source> <translation>ОÑтановка ÑервиÑа: %1</translation> </message> <message> - <location filename="../src/ServiceRegistryImpl.cpp" line="301"/> + <location filename="../src/ServiceRegistryImpl.cpp" line="300"/> <source>Service is not registered</source> <translation>Ð¡ÐµÑ€Ð²Ð¸Ñ Ð½Ðµ зарегиÑтрирован</translation> </message> <message> - <location filename="../src/ServiceRegistryImpl.cpp" line="302"/> + <location filename="../src/ServiceRegistryImpl.cpp" line="301"/> <source>Service is not enabled</source> <translation>Ð¡ÐµÑ€Ð²Ð¸Ñ Ð½ÐµÐ´Ð¾Ñтупен</translation> </message> <message> - <location filename="../src/ServiceRegistryImpl.cpp" line="308"/> + <location filename="../src/ServiceRegistryImpl.cpp" line="307"/> <source>Active top-level task name: %1</source> <translation>ÐÐºÑ‚Ð¸Ð²Ð½Ð°Ñ Ð·Ð°Ð´Ð°Ñ‡Ð°: %1</translation> </message> <message> - <location filename="../src/ServiceRegistryImpl.cpp" line="310"/> + <location filename="../src/ServiceRegistryImpl.cpp" line="309"/> <source>Active task was found</source> <translation>ИмеютÑÑ Ð½ÐµÐ¾ÐºÐ¾Ð½Ñ‡ÐµÐ½Ð½Ñ‹Ðµ задачи</translation> </message> @@ -185,27 +188,27 @@ By default, loglevel="ERROR".</source> <context> <name>U2::EnableServiceTask</name> <message> - <location filename="../src/ServiceRegistryImpl.cpp" line="191"/> + <location filename="../src/ServiceRegistryImpl.cpp" line="190"/> <source>Service is enabled</source> <translation>Ð¡ÐµÑ€Ð²Ð¸Ñ Ð´Ð¾Ñтупен</translation> </message> <message> - <location filename="../src/ServiceRegistryImpl.cpp" line="192"/> + <location filename="../src/ServiceRegistryImpl.cpp" line="191"/> <source>Service is not registered</source> <translation>Ð¡ÐµÑ€Ð²Ð¸Ñ Ð½Ðµ зарегиÑтрирован</translation> </message> <message> - <location filename="../src/ServiceRegistryImpl.cpp" line="197"/> + <location filename="../src/ServiceRegistryImpl.cpp" line="196"/> <source>Circular service dependency: %1</source> <translation>ЦиркулÑÑ€Ð½Ð°Ñ Ð·Ð°Ð²Ð¸ÑимоÑÑ‚ÑŒ модулÑ: %1</translation> </message> <message> - <location filename="../src/ServiceRegistryImpl.cpp" line="203"/> + <location filename="../src/ServiceRegistryImpl.cpp" line="202"/> <source>Required service is not enabled: %1</source> <translation>Ðе запущен обеÑпечивающий завиÑимоÑÑ‚ÑŒ ÑервиÑ: %1</translation> </message> <message> - <location filename="../src/ServiceRegistryImpl.cpp" line="181"/> + <location filename="../src/ServiceRegistryImpl.cpp" line="180"/> <source>Enable '%1' service</source> <translation>ЗапуÑк ÑервиÑа: %1</translation> </message> @@ -213,7 +216,7 @@ By default, loglevel="ERROR".</source> <context> <name>U2::LoadAllPluginsTask</name> <message> - <location filename="../src/PluginSupportImpl.cpp" line="82"/> + <location filename="../src/PluginSupportImpl.cpp" line="81"/> <source>Loading start up plugins</source> <translation>Загрузка подключаемых модулей</translation> </message> @@ -222,12 +225,12 @@ By default, loglevel="ERROR".</source> <translation type="vanished">Problem occurred loading the OpenCL driver. Please try to update drivers if you're going to make calculations on your video card. For details see this page: <a href="%1">%1</a></translation> </message> <message> - <location filename="../src/PluginSupportImpl.cpp" line="114"/> + <location filename="../src/PluginSupportImpl.cpp" line="113"/> <source>File not found: %1</source> <translation>Ðе найден внешний модуль: %1</translation> </message> <message> - <location filename="../src/PluginSupportImpl.cpp" line="119"/> + <location filename="../src/PluginSupportImpl.cpp" line="118"/> <source>Invalid file format: %1</source> <translation>Ðекорректный файл библиотеки: %1</translation> </message> @@ -330,25 +333,25 @@ By default, loglevel="ERROR".</source> <name>U2::TaskSchedulerImpl</name> <message> <location filename="../src/TaskSchedulerImpl.cpp" line="82"/> - <location filename="../src/TaskSchedulerImpl.cpp" line="680"/> + <location filename="../src/TaskSchedulerImpl.cpp" line="681"/> <source>New</source> <translation>ÐоваÑ</translation> </message> <message> <location filename="../src/TaskSchedulerImpl.cpp" line="82"/> - <location filename="../src/TaskSchedulerImpl.cpp" line="682"/> + <location filename="../src/TaskSchedulerImpl.cpp" line="683"/> <source>Prepared</source> <translation>Инициализирована</translation> </message> <message> <location filename="../src/TaskSchedulerImpl.cpp" line="82"/> - <location filename="../src/TaskSchedulerImpl.cpp" line="684"/> + <location filename="../src/TaskSchedulerImpl.cpp" line="685"/> <source>Running</source> <translation>ВыполнÑетÑÑ</translation> </message> <message> <location filename="../src/TaskSchedulerImpl.cpp" line="82"/> - <location filename="../src/TaskSchedulerImpl.cpp" line="686"/> + <location filename="../src/TaskSchedulerImpl.cpp" line="687"/> <source>Finished</source> <translation>Завершена</translation> </message> @@ -368,37 +371,37 @@ By default, loglevel="ERROR".</source> <translation>Подзадача {%1} завершена Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ¾Ð¹: %2</translation> </message> <message> - <location filename="../src/TaskSchedulerImpl.cpp" line="378"/> + <location filename="../src/TaskSchedulerImpl.cpp" line="379"/> <source>Waiting for resource '%1', count: %2</source> <translation>Ожидание реÑурÑа "%1", требуетÑÑ: %2</translation> </message> <message> - <location filename="../src/TaskSchedulerImpl.cpp" line="401"/> + <location filename="../src/TaskSchedulerImpl.cpp" line="402"/> <source>Not enough resources for the task, resource name: '%1' max: %2%3 requested: %4%5</source> <translation>Ðе доÑтаточно реÑурÑов Ð´Ð»Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ð·Ð°Ð´Ð°Ñ‡Ð¸: '%1' макÑ: %2%3 запрошено: %4%5</translation> </message> <message> - <location filename="../src/TaskSchedulerImpl.cpp" line="409"/> + <location filename="../src/TaskSchedulerImpl.cpp" line="410"/> <source>Waiting for resource '%1', count: %2%3</source> <translation>Ожидание реÑурÑа "%1", требуетÑÑ: %2%3</translation> </message> <message> - <location filename="../src/TaskSchedulerImpl.cpp" line="542"/> + <location filename="../src/TaskSchedulerImpl.cpp" line="543"/> <source>Registering new task: %1</source> <translation>Добавлена задача "%1"</translation> </message> <message> - <location filename="../src/TaskSchedulerImpl.cpp" line="689"/> + <location filename="../src/TaskSchedulerImpl.cpp" line="690"/> <source>Invalid name</source> <translation>ÐеизвеÑтное ÑоÑтоÑние</translation> </message> <message> - <location filename="../src/TaskSchedulerImpl.cpp" line="913"/> + <location filename="../src/TaskSchedulerImpl.cpp" line="914"/> <source>Deleting task: %1</source> <translation>УдалÑетÑÑ Ð·Ð°Ð´Ð°Ñ‡Ð° "%1"</translation> </message> <message> - <location filename="../src/TaskSchedulerImpl.cpp" line="763"/> + <location filename="../src/TaskSchedulerImpl.cpp" line="764"/> <source>Promoting task {%1} to '%2'</source> <translation>Задача {%1} %2</translation> </message> @@ -408,42 +411,42 @@ By default, loglevel="ERROR".</source> <translation>Подзадача {%1} отменена %2</translation> </message> <message> - <location filename="../src/TaskSchedulerImpl.cpp" line="393"/> + <location filename="../src/TaskSchedulerImpl.cpp" line="394"/> <source>No required resources for the task, resource id: '%1'</source> <translation>No required resources for the task, resource id: '%1'</translation> </message> <message> - <location filename="../src/TaskSchedulerImpl.cpp" line="394"/> + <location filename="../src/TaskSchedulerImpl.cpp" line="395"/> <source>Unable to run test because required resource not found</source> <translation>Unable to run test because required resource not found</translation> </message> <message> - <location filename="../src/TaskSchedulerImpl.cpp" line="604"/> + <location filename="../src/TaskSchedulerImpl.cpp" line="605"/> <source>Unregistering task: %1</source> <translation>ÐезарегиÑÑ‚Ñ€Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð½Ð°Ñ Ð·Ð°Ð´Ð°Ñ‡Ð°: %1</translation> </message> <message> - <location filename="../src/TaskSchedulerImpl.cpp" line="765"/> + <location filename="../src/TaskSchedulerImpl.cpp" line="766"/> <source>Promoting task {%1} to '%2', error '%3'</source> <translation>Задача {%1} %2; ошибка: %3</translation> </message> <message> - <location filename="../src/TaskSchedulerImpl.cpp" line="775"/> + <location filename="../src/TaskSchedulerImpl.cpp" line="776"/> <source>Starting {%1} task</source> <translation>Старт задачи {%1}</translation> </message> <message> - <location filename="../src/TaskSchedulerImpl.cpp" line="803"/> + <location filename="../src/TaskSchedulerImpl.cpp" line="804"/> <source>Task {%1} finished with error: %2</source> <translation>Задача {%1} завершена Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ¾Ð¹: %2</translation> </message> <message> - <location filename="../src/TaskSchedulerImpl.cpp" line="807"/> + <location filename="../src/TaskSchedulerImpl.cpp" line="808"/> <source>Task {%1} canceled</source> <translation>ОтменÑетÑÑ Ð·Ð°Ð´Ð°Ñ‡Ð° {%1}</translation> </message> <message> - <location filename="../src/TaskSchedulerImpl.cpp" line="810"/> + <location filename="../src/TaskSchedulerImpl.cpp" line="811"/> <source>Task {%1} finished</source> <translation>Задача {%1} завершена</translation> </message> @@ -451,12 +454,12 @@ By default, loglevel="ERROR".</source> <context> <name>U2::UnregisterServiceTask</name> <message> - <location filename="../src/ServiceRegistryImpl.cpp" line="260"/> + <location filename="../src/ServiceRegistryImpl.cpp" line="259"/> <source>Unregister '%1' service</source> <translation>ДерегиÑÑ‚Ñ€Ð°Ñ†Ð¸Ñ ÑервиÑа "%1"</translation> </message> <message> - <location filename="../src/ServiceRegistryImpl.cpp" line="266"/> + <location filename="../src/ServiceRegistryImpl.cpp" line="265"/> <source>Service is not registered</source> <translation>Ð¡ÐµÑ€Ð²Ð¸Ñ Ð½Ðµ зарегиÑтрирован</translation> </message> @@ -464,7 +467,7 @@ By default, loglevel="ERROR".</source> <context> <name>U2::VerifyPluginTask</name> <message> - <location filename="../src/PluginSupportImpl.cpp" line="560"/> + <location filename="../src/PluginSupportImpl.cpp" line="500"/> <source>Verify plugin task: %1</source> <translation>Задача верификации модулÑ: %1</translation> </message> diff --git a/src/corelibs/U2Script/U2Script.pri b/src/corelibs/U2Script/U2Script.pri index 55fd6baaf69377142ecfa1c95ad17be8156017da..0ceabc37c5d170e49e4d1ab4c032fe5174e73d58 100644 --- a/src/corelibs/U2Script/U2Script.pri +++ b/src/corelibs/U2Script/U2Script.pri @@ -4,8 +4,6 @@ MODULE_ID=U2Script include( ../../ugene_lib_common.pri ) -UGENE_RELATIVE_DESTDIR = '' - DEFINES += QT_FATAL_ASSERT BUILDING_U2SCRIPT_DLL QT += network xml widgets @@ -21,31 +19,13 @@ INCLUDEPATH += ../../include \ # $${UGENE_NODE_DIR}/deps/uv/include #} -LIBS += -L../../_release -lU2Core -lU2Algorithm -lU2Formats -lU2Lang -lU2Private -lugenedb -lU2Gui -lU2Test - -!debug_and_release|build_pass { - - CONFIG( debug, debug|release ) { - DESTDIR = ../../_debug +LIBS += -L../../$$out_dir() +LIBS += -lU2Core$$D -lU2Algorithm$$D -lU2Formats$$D -lU2Lang$$D -lU2Private$$D -lU2Gui$$D -lU2Test$$D +LIBS += $$add_sqlite_lib() - LIBS -= -L../../_release -lU2Core -lU2Algorithm -lU2Formats -lU2Lang -lU2Private -lugenedb -lU2Gui -lU2Test - LIBS += -L../../_debug -lU2Cored -lU2Algorithmd -lU2Formatsd -lU2Langd -lU2Privated -lugenedbd -lU2Guid -lU2Testd - -# count( UGENE_NODE_DIR, 1 ) { -# LIBS += -l$${UGENE_NODE_DIR}/Debug/node -# } - } - - CONFIG( release, debug|release ) { - DESTDIR = ../../_release - -# count( UGENE_NODE_DIR, 1 ) { -# LIBS += -l$${UGENE_NODE_DIR}/Release/node -# } - } -} +DESTDIR = ../../$$out_dir() unix { - target.path = $$UGENE_INSTALL_DIR/$$UGENE_RELATIVE_DESTDIR + target.path = $$UGENE_INSTALL_DIR/ INSTALLS += target } diff --git a/src/corelibs/U2Script/src/CommonDbi.cpp b/src/corelibs/U2Script/src/CommonDbi.cpp index e0bf6eee9c9c9854421641cad2fe4fa78677462b..da81ccd7fcf6854c7237c06d19e3d4c4406b9df1 100644 --- a/src/corelibs/U2Script/src/CommonDbi.cpp +++ b/src/corelibs/U2Script/src/CommonDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/CommonDbi.h b/src/corelibs/U2Script/src/CommonDbi.h index 7094a0c4d0364ff94554ecdeeaac8cfb8ec7a4fe..8f05ff5c20956dddda6f5d5aded94e9caf70198a 100644 --- a/src/corelibs/U2Script/src/CommonDbi.h +++ b/src/corelibs/U2Script/src/CommonDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/FormatDetection.cpp b/src/corelibs/U2Script/src/FormatDetection.cpp index 0a6aec02b33fe9ad60fee64b5415844c2db465c4..7ec0ce9714474a23676918a4b386bb845a24c751 100644 --- a/src/corelibs/U2Script/src/FormatDetection.cpp +++ b/src/corelibs/U2Script/src/FormatDetection.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/FormatDetection.h b/src/corelibs/U2Script/src/FormatDetection.h index b49fbe7f5aa566ea365a02216c9a5f3e74d2f46f..1645884d69702df4c9a1ff9c61982a98683dd283 100644 --- a/src/corelibs/U2Script/src/FormatDetection.h +++ b/src/corelibs/U2Script/src/FormatDetection.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/SchemeHandle.cpp b/src/corelibs/U2Script/src/SchemeHandle.cpp index a436ce6e8223a754ff8f06ec6b2a0315c0c4bee6..f5a66f988805e9d65b2b3b4fb99674d963b10b35 100644 --- a/src/corelibs/U2Script/src/SchemeHandle.cpp +++ b/src/corelibs/U2Script/src/SchemeHandle.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/SchemeHandle.h b/src/corelibs/U2Script/src/SchemeHandle.h index 69d1941c7caf5144870101db09f6d67c5ae6100c..fc11af0a5c409f6a4376f7d8a3b145b0d1776ba4 100644 --- a/src/corelibs/U2Script/src/SchemeHandle.h +++ b/src/corelibs/U2Script/src/SchemeHandle.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/SchemeWrapper.cpp b/src/corelibs/U2Script/src/SchemeWrapper.cpp index ca159702279e46df84aac28e6a4cbfbf90a89bce..4811fb319bad965870c1b74706331f85fa2dbfbb 100644 --- a/src/corelibs/U2Script/src/SchemeWrapper.cpp +++ b/src/corelibs/U2Script/src/SchemeWrapper.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/SchemeWrapper.h b/src/corelibs/U2Script/src/SchemeWrapper.h index 1e9897e4b20973973686440f0112d348df9ff55b..b37b22407d0fbe1a207a96ff41699fc18db566cc 100644 --- a/src/corelibs/U2Script/src/SchemeWrapper.h +++ b/src/corelibs/U2Script/src/SchemeWrapper.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/TextConversionUtils.cpp b/src/corelibs/U2Script/src/TextConversionUtils.cpp index 22cdfe318962b084949d99df45ef61ec5b4aff30..cd8974765041f71a931348479a6a92ad34f42449 100644 --- a/src/corelibs/U2Script/src/TextConversionUtils.cpp +++ b/src/corelibs/U2Script/src/TextConversionUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/TextConversionUtils.h b/src/corelibs/U2Script/src/TextConversionUtils.h index eba773dfa226ac0ea114ea440861af9ba697fe03..addccaa87b0f40b3f0330e58bf1c21e0c9ee534a 100644 --- a/src/corelibs/U2Script/src/TextConversionUtils.h +++ b/src/corelibs/U2Script/src/TextConversionUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/U2Script.cpp b/src/corelibs/U2Script/src/U2Script.cpp index e8dc3e3991833ba70c10463247cb9d5a8090bcea..56e2b822c2c8c552674520c335690abc67871300 100644 --- a/src/corelibs/U2Script/src/U2Script.cpp +++ b/src/corelibs/U2Script/src/U2Script.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/U2Script.h b/src/corelibs/U2Script/src/U2Script.h index 90f6ee1e2eb5981d4f182d3cbe04b99cb1b271b4..100ab92d149e1814a1b9f25933d9f8f968b6a3c7 100644 --- a/src/corelibs/U2Script/src/U2Script.h +++ b/src/corelibs/U2Script/src/U2Script.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/UgeneContextWrapper.cpp b/src/corelibs/U2Script/src/UgeneContextWrapper.cpp index 09904780b8d9f2ad5e6e3796e27f426740dbd391..a51ccb294bcc89a4596eec6cde97dd35c74b79ef 100644 --- a/src/corelibs/U2Script/src/UgeneContextWrapper.cpp +++ b/src/corelibs/U2Script/src/UgeneContextWrapper.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/UgeneContextWrapper.h b/src/corelibs/U2Script/src/UgeneContextWrapper.h index 5f5bdac1097af94862b794ea555f80e7468b6ae4..34e4e6336a9d04e5e37a5fc9b53262415818c1f5 100644 --- a/src/corelibs/U2Script/src/UgeneContextWrapper.h +++ b/src/corelibs/U2Script/src/UgeneContextWrapper.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/WorkflowElementFacade.cpp b/src/corelibs/U2Script/src/WorkflowElementFacade.cpp index 3afa9d0cf538c745444e0e22ae793494dd471df7..5b53faf8ec922bb854fca7b5f80b29ab5e0a815c 100644 --- a/src/corelibs/U2Script/src/WorkflowElementFacade.cpp +++ b/src/corelibs/U2Script/src/WorkflowElementFacade.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/WorkflowElementFacade.h b/src/corelibs/U2Script/src/WorkflowElementFacade.h index ea7f328ed42b128ad109b41679de8afd7f87feaf..daee3dcab702d595ebbb19192ffb005f30330f2c 100644 --- a/src/corelibs/U2Script/src/WorkflowElementFacade.h +++ b/src/corelibs/U2Script/src/WorkflowElementFacade.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/globals.cpp b/src/corelibs/U2Script/src/globals.cpp index b7588cd0d4c73fddc4df3789381e0b66b40470bb..0f7f3c6548172fdde3dabe87a8899e10c00b1bbc 100644 --- a/src/corelibs/U2Script/src/globals.cpp +++ b/src/corelibs/U2Script/src/globals.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/globals.h b/src/corelibs/U2Script/src/globals.h index 01017c349b1ebb295af0bd7c0e2edd600c386ee2..1c0da164679fd31192ae788039e1101546766292 100644 --- a/src/corelibs/U2Script/src/globals.h +++ b/src/corelibs/U2Script/src/globals.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/js/ActorWrap.cpp b/src/corelibs/U2Script/src/js/ActorWrap.cpp index 73f4190faf4a156412bf76093d5f97d2d1f6042e..8225ab916a54f0a0f8144321f5b5a59c8673565c 100644 --- a/src/corelibs/U2Script/src/js/ActorWrap.cpp +++ b/src/corelibs/U2Script/src/js/ActorWrap.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/js/ActorWrap.h b/src/corelibs/U2Script/src/js/ActorWrap.h index f3fc0a7b2716cc55298038dec393b225710fc1cb..4f57fd64853b10692f37096456f7117880cb0e45 100644 --- a/src/corelibs/U2Script/src/js/ActorWrap.h +++ b/src/corelibs/U2Script/src/js/ActorWrap.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/js/DebugStatusWrap.cpp b/src/corelibs/U2Script/src/js/DebugStatusWrap.cpp index 5ecc851240684390018c506b3057eda2f2170fda..8cf8c4eebf2285247b5eba40caedf6fc307ecf38 100644 --- a/src/corelibs/U2Script/src/js/DebugStatusWrap.cpp +++ b/src/corelibs/U2Script/src/js/DebugStatusWrap.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/js/DebugStatusWrap.h b/src/corelibs/U2Script/src/js/DebugStatusWrap.h index f896e48b639d0182f01a62854aed85803acb5c7d..d313c6148d940a6b5a292be0b00b654b299d0c05 100644 --- a/src/corelibs/U2Script/src/js/DebugStatusWrap.h +++ b/src/corelibs/U2Script/src/js/DebugStatusWrap.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/js/JsContext.cpp b/src/corelibs/U2Script/src/js/JsContext.cpp index 6d8c12f3ad4bc726c5084f6960c7c4d2e72e7d05..ba184a8ab9d5c777a5c1da3e4fde790cadebb065 100644 --- a/src/corelibs/U2Script/src/js/JsContext.cpp +++ b/src/corelibs/U2Script/src/js/JsContext.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/js/JsContext.h b/src/corelibs/U2Script/src/js/JsContext.h index 385c4c250f92c67dcec943ffeec7c7e68b861c9e..ae06e6a6c37f46084780b3568fb0afe43429416b 100644 --- a/src/corelibs/U2Script/src/js/JsContext.h +++ b/src/corelibs/U2Script/src/js/JsContext.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/js/JsScheduler.cpp b/src/corelibs/U2Script/src/js/JsScheduler.cpp index b76d826282537e2670d25958a27bdfc3ae465c86..7f156ab8a04208e3e748cf01815556e9defc79d5 100644 --- a/src/corelibs/U2Script/src/js/JsScheduler.cpp +++ b/src/corelibs/U2Script/src/js/JsScheduler.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/js/JsScheduler.h b/src/corelibs/U2Script/src/js/JsScheduler.h index 7cc73de2bfedd6d808d4e60fd9a0da0d86d3f21e..8d1789b09b78189194eb37da1ffe15b30c0d750b 100644 --- a/src/corelibs/U2Script/src/js/JsScheduler.h +++ b/src/corelibs/U2Script/src/js/JsScheduler.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/js/NodeApiUtils.cpp b/src/corelibs/U2Script/src/js/NodeApiUtils.cpp index bb77d4a82bc975d32cac067a7417d76146dc1add..489912c840421681f3a4382fc4f60541a8c856f3 100644 --- a/src/corelibs/U2Script/src/js/NodeApiUtils.cpp +++ b/src/corelibs/U2Script/src/js/NodeApiUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Script/src/js/NodeApiUtils.h b/src/corelibs/U2Script/src/js/NodeApiUtils.h index 5eedd2c71181c4ed877a675eff48a09dde8fbf7b..07a4e99488600f75bdb08cbc639554c21e94c8c1 100644 --- a/src/corelibs/U2Script/src/js/NodeApiUtils.h +++ b/src/corelibs/U2Script/src/js/NodeApiUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Test/U2Test.pri b/src/corelibs/U2Test/U2Test.pri index 98512a7d62da0371f8eec51efade9c14ba1d4f1e..4e79c29dd1a66e74e16790ba137f6988188c32cb 100644 --- a/src/corelibs/U2Test/U2Test.pri +++ b/src/corelibs/U2Test/U2Test.pri @@ -1,36 +1,23 @@ # include (U2Test.pri) -UGENE_RELATIVE_DESTDIR = '' MODULE_ID=U2Test include( ../../ugene_lib_common.pri ) QT += xml gui widgets DEFINES+= QT_FATAL_ASSERT BUILDING_U2TEST_DLL -LIBS += -L../../_release -lU2Core -lQSpec + +LIBS += -L../../$$out_dir() +LIBS += -lU2Core$$D -lQSpec$$D INCLUDEPATH += ../../libs_3rdparty/QSpec/src -if(exclude_list_enabled()|!exists( ../../libs_3rdparty/QSpec/QSpec.pro )) { - LIBS -= -lQSpec +if (contains(DEFINES, HI_EXCLUDED)) { + LIBS -= -lQSpec$$D } -!debug_and_release|build_pass { - - CONFIG(debug, debug|release) { - DESTDIR=../../_debug - LIBS -= -L../../_release -lU2Core -lQSpec - LIBS += -L../../_debug -lU2Cored -lQSpecd - if(exclude_list_enabled()|!exists( ../../libs_3rdparty/QSpec/QSpec.pro )) { - LIBS -= -lQSpecd - } - } - - CONFIG(release, debug|release) { - DESTDIR=../../_release - } -} +DESTDIR = ../../$$out_dir() unix { - target.path = $$UGENE_INSTALL_DIR/$$UGENE_RELATIVE_DESTDIR + target.path = $$UGENE_INSTALL_DIR/ INSTALLS += target } diff --git a/src/corelibs/U2Test/U2Test.pro b/src/corelibs/U2Test/U2Test.pro index 3140fd41eb9485696a76913f5a3973159cb51bb2..06669ad8c1e51e835ab48d12260e4adf0170018a 100644 --- a/src/corelibs/U2Test/U2Test.pro +++ b/src/corelibs/U2Test/U2Test.pro @@ -32,7 +32,7 @@ TRANSLATIONS += transl/russian.ts FORMS += src/gui_tests/GUITestingWindow.ui -if(exclude_list_enabled()|!exists( ../../libs_3rdparty/QSpec/QSpec.pro )) { +if (contains(DEFINES, HI_EXCLUDED)) { HEADERS -= src/gui_tests/UGUITest.h \ src/gui_tests/UGUITestBase.h \ diff --git a/src/corelibs/U2Test/src/GTest.cpp b/src/corelibs/U2Test/src/GTest.cpp index 2c2c9620794b2317577f59c0fd6fd9830b69aaca..9cd4f7016466b89ec4c361c08cf947099e5a0a57 100644 --- a/src/corelibs/U2Test/src/GTest.cpp +++ b/src/corelibs/U2Test/src/GTest.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -67,10 +67,24 @@ void GTest::removeContext(const QString& name) { contextProvider->subtestsContext.remove(name); } +void GTest::removeTempDir() { + QDir tempDir(env->getVar("TEMP_DATA_DIR")); + taskLog.trace(QString("Removing test temporary dir: %1").arg(tempDir.path())); + tempDir.removeRecursively(); +} + void GTest::failMissingValue( const QString& name) { stateInfo.setError(QString("Mandatory attribute not set: %1").arg(name)); } +void GTest::wrongValue(const QString& name) { + stateInfo.setError(QString("Wrong value for attribute: %1").arg(name)); +} + +void GTest::emptyValue(const QString &name) { + stateInfo.setError(QString("Empty value for attribute: %1").arg(name)); +} + ////////////////////////////////////////////////////////////////////////// // GTestSuite diff --git a/src/corelibs/U2Test/src/GTest.h b/src/corelibs/U2Test/src/GTest.h index 293d8c3b693d3d702cd3369a085d793fc8e4dfc9..d64f6ba675e04c7beba7dcf6bff847cafac225d3 100644 --- a/src/corelibs/U2Test/src/GTest.h +++ b/src/corelibs/U2Test/src/GTest.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -71,12 +71,16 @@ public: return res; } -const GTestEnvironment* getEnv() const {return env;} + const GTestEnvironment* getEnv() const {return env;} + + void removeTempDir(); protected: GTest* getContextProvider() const {return contextProvider;} - void failMissingValue(const QString&); + void failMissingValue(const QString &attribute); + void wrongValue(const QString &attribute); + void emptyValue(const QString &attribute); GTest* contextProvider; const GTestEnvironment* env; diff --git a/src/corelibs/U2Test/src/GTestFrameworkComponents.cpp b/src/corelibs/U2Test/src/GTestFrameworkComponents.cpp index 3ec83c158ff8ecd490b86377eadf9f8ec246255c..3c9b554df8996da59e8653e1221ed0739e076417 100644 --- a/src/corelibs/U2Test/src/GTestFrameworkComponents.cpp +++ b/src/corelibs/U2Test/src/GTestFrameworkComponents.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Test/src/GTestFrameworkComponents.h b/src/corelibs/U2Test/src/GTestFrameworkComponents.h index a3caa943faa980e51dded9faa4e51c10e62a4297..d67847609cebaa90f8855017d99cb90214b105f1 100644 --- a/src/corelibs/U2Test/src/GTestFrameworkComponents.h +++ b/src/corelibs/U2Test/src/GTestFrameworkComponents.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Test/src/TestRunnerSettings.h b/src/corelibs/U2Test/src/TestRunnerSettings.h index 8c5814fb3c6941bedbece9870c98763629551e83..8b5cdea9553093312f7ac6c5fdff82890fe54b6d 100644 --- a/src/corelibs/U2Test/src/TestRunnerSettings.h +++ b/src/corelibs/U2Test/src/TestRunnerSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Test/src/TestRunnerTask.cpp b/src/corelibs/U2Test/src/TestRunnerTask.cpp index 746a13ea915b7c130e83d9ec4742d970107b720b..79ffc91a4db7d422586b6343cac254e7b9f1f127 100644 --- a/src/corelibs/U2Test/src/TestRunnerTask.cpp +++ b/src/corelibs/U2Test/src/TestRunnerTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,6 +23,7 @@ #include <QFileInfo> #include <U2Core/AppContext.h> +#include <U2Core/GUrlUtils.h> #include <U2Core/Log.h> #include <U2Core/Timer.h> @@ -71,6 +72,9 @@ QList<Task*> TestRunnerTask::onSubTaskFinished(Task* subTask) { GTest* test = qobject_cast<GTest*>(subTask); assert(test); test->cleanup(); + if (!test->hasError()) { + test->removeTempDir(); + } GTestState* testState = stateByTest.value(test); assert(testState!=NULL); assert(testState->isNew()); @@ -129,12 +133,26 @@ QList<Task*> TestRunnerTask::onSubTaskFinished(Task* subTask) { } if (newEnv->getVars().contains("TEMP_DATA_DIR")) { - newEnv->setVar("TEMP_DATA_DIR", suiteDir + newEnv->getVar("TEMP_DATA_DIR")); + const QString suiteName = testState->getTestRef()->getSuite()->getName(); + const QString testName = testState->getTestRef()->getShortName(); + const QString tempDir = suiteDir + + newEnv->getVar("TEMP_DATA_DIR") + "/" + + GUrlUtils::fixFileName(suiteName) + "/" + + GUrlUtils::fixFileName(testName); + newEnv->setVar("TEMP_DATA_DIR", tempDir); + } + + if (!newEnv->getVars().contains("WORKFLOW_OUTPUT_DIR") || newEnv->getVar("WORKFLOW_OUTPUT_DIR").isEmpty()) { + newEnv->setVar("WORKFLOW_OUTPUT_DIR", newEnv->getVar("TEMP_DATA_DIR")); + } else { + newEnv->setVar("WORKFLOW_OUTPUT_DIR", suiteDir + "/" + newEnv->getVar("WORKFLOW_OUTPUT_DIR")); } QDir tmpDir(newEnv->getVar("TEMP_DATA_DIR")); if (!tmpDir.exists()) { tmpDir.mkpath(tmpDir.absolutePath()); + } else { + taskLog.info(QString("Warning: the test temp dir already exists: %1").arg(tmpDir.path())); } QString workflowSamplePath = QDir::searchPaths(PATH_PREFIX_DATA).first() + "/workflow_samples/"; diff --git a/src/corelibs/U2Test/src/TestRunnerTask.h b/src/corelibs/U2Test/src/TestRunnerTask.h index 3fd1644444d26c6a6eea23e9dc11d7def89ac60a..377fc529b9824d2a33c956289a04e115f5fdf4e7 100644 --- a/src/corelibs/U2Test/src/TestRunnerTask.h +++ b/src/corelibs/U2Test/src/TestRunnerTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Test/src/gui_tests/GUITestLauncher.cpp b/src/corelibs/U2Test/src/gui_tests/GUITestLauncher.cpp index 9c5d05c30b68e2871267d650942639e5408fa958..8e812bd7e8a9f478f9cb8c2f35a9bf33ef495687 100644 --- a/src/corelibs/U2Test/src/gui_tests/GUITestLauncher.cpp +++ b/src/corelibs/U2Test/src/gui_tests/GUITestLauncher.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -27,6 +27,7 @@ #include <U2Core/AppContext.h> #include <U2Core/CMDLineCoreOptions.h> +#include <U2Core/CmdlineTaskRunner.h> #include <U2Core/ExternalToolRegistry.h> #include <U2Core/Timer.h> #include <U2Core/U2SafePoints.h> @@ -52,9 +53,9 @@ namespace U2 { -GUITestLauncher::GUITestLauncher(int _suiteNumber, bool _noIgnored) +GUITestLauncher::GUITestLauncher(int _suiteNumber, bool _noIgnored, QString _iniFileTemplate) : Task("gui_test_launcher", TaskFlags(TaskFlag_ReportingIsSupported) | TaskFlag_ReportingIsEnabled), - suiteNumber(_suiteNumber), noIgnored(_noIgnored), pathToSuite("") { + suiteNumber(_suiteNumber), noIgnored(_noIgnored), pathToSuite(""), iniFileTemplate(_iniFileTemplate) { tpm = Task::Progress_Manual; testOutDir = getTestOutDir(); @@ -65,9 +66,9 @@ GUITestLauncher::GUITestLauncher(int _suiteNumber, bool _noIgnored) } } -GUITestLauncher::GUITestLauncher(QString _pathToSuite, bool _noIgnored) +GUITestLauncher::GUITestLauncher(QString _pathToSuite, bool _noIgnored, QString _iniFileTemplate) : Task("gui_test_launcher", TaskFlags(TaskFlag_ReportingIsSupported) | TaskFlag_ReportingIsEnabled), - suiteNumber(0), noIgnored(_noIgnored), pathToSuite(_pathToSuite) { + suiteNumber(0), noIgnored(_noIgnored), pathToSuite(_pathToSuite), iniFileTemplate(_iniFileTemplate) { tpm = Task::Progress_Manual; testOutDir = getTestOutDir(); @@ -224,7 +225,12 @@ QProcessEnvironment GUITestLauncher::getProcessEnvironment(QString testName) { env.insert(ENV_GUI_TEST, "1"); env.insert(ENV_USE_NATIVE_DIALOGS, "0"); env.insert(U2_PRINT_TO_FILE, testOutDir + "/logs/" + testOutFile(testName)); - env.insert(U2_USER_INI, testOutDir + "/inis/" + testName.replace(':', '_') + "_UGENE.ini"); + + QString iniFileName = testOutDir + "/inis/" + testName.replace(':', '_') + "_UGENE.ini"; + if (!iniFileTemplate.isEmpty() && QFile::exists(iniFileTemplate)) { + QFile::copy(iniFileTemplate, iniFileName); + } + env.insert(U2_USER_INI, iniFileName); return env; } @@ -232,11 +238,14 @@ QProcessEnvironment GUITestLauncher::getProcessEnvironment(QString testName) { QString GUITestLauncher::performTest(const QString& testName) { QString path = QCoreApplication::applicationFilePath(); + QProcessEnvironment environment = getProcessEnvironment(testName); + QStringList arguments = getTestProcessArguments(testName); // ~QProcess is killing the process, will not return until the process is terminated. QProcess process; - process.setProcessEnvironment(getProcessEnvironment(testName)); - process.start(path, getTestProcessArguments(testName)); + process.setProcessEnvironment(environment); + process.start(path, arguments); + qint64 processId = process.processId(); QProcess screenRecorder; if(qgetenv("UGENE_SKIP_TEST_RECORDING").toInt() != 1){ @@ -251,6 +260,10 @@ QString GUITestLauncher::performTest(const QString& testName) { finished = process.waitForFinished(TIMEOUT); QProcess::ExitStatus exitStatus = process.exitStatus(); + if (!finished || exitStatus != QProcess::NormalExit) { + CmdlineTaskRunner::killChildrenProcesses(processId); + } + #ifdef Q_OS_WIN QProcess::execute("closeErrorReport.exe"); //this exe file, compiled Autoit script #endif @@ -269,7 +282,7 @@ QString GUITestLauncher::performTest(const QString& testName) { return testResult; } #ifdef Q_OS_WIN - process.kill(); + CmdlineTaskRunner::killProcessTree(process.processId()); #endif if (finished) { return tr("An error occurred while finishing UGENE: ") + process.errorString() + '\n' + testResult; @@ -343,5 +356,4 @@ QString GUITestLauncher::getVideoPath(const QString &testName){ QString result = QDir::currentPath() + "/videos/" + testName + ".avi"; return result; } - } diff --git a/src/corelibs/U2Test/src/gui_tests/GUITestLauncher.h b/src/corelibs/U2Test/src/gui_tests/GUITestLauncher.h index 8ee26469281f971fe4d9b743c20cfc374ed41e2e..f0fc8f48d6e6a7126e3616833d2e179a45ec5187 100644 --- a/src/corelibs/U2Test/src/gui_tests/GUITestLauncher.h +++ b/src/corelibs/U2Test/src/gui_tests/GUITestLauncher.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,8 +34,8 @@ namespace U2 { class GUITestLauncher: public Task { Q_OBJECT public: - GUITestLauncher(int _suiteNumber, bool _noIgnored = false); - GUITestLauncher(QString _pathToSuite = "", bool _noIgnored = false); + GUITestLauncher(int _suiteNumber, bool _noIgnored = false, QString _iniFileTemplate = ""); + GUITestLauncher(QString _pathToSuite = "", bool _noIgnored = false, QString _iniFileTemplate = ""); virtual void run(); virtual QString generateReport() const; @@ -47,6 +47,7 @@ private: bool noIgnored; QString pathToSuite; QString testOutDir; + QString iniFileTemplate; static QStringList getTestProcessArguments(const QString &testName); QProcessEnvironment getProcessEnvironment(QString testName); diff --git a/src/corelibs/U2Test/src/gui_tests/GUITestService.cpp b/src/corelibs/U2Test/src/gui_tests/GUITestService.cpp index 5f083581bcd138d587bbdc9ed2528e3aedfd9584..a1137fe36e2980da97e444c2973cef7b44ec0ce1 100644 --- a/src/corelibs/U2Test/src/gui_tests/GUITestService.cpp +++ b/src/corelibs/U2Test/src/gui_tests/GUITestService.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,6 +30,7 @@ #include <U2Core/ExternalToolRegistry.h> #include <U2Core/GObject.h> #include <U2Core/Log.h> +#include <U2Core/Settings.h> #include <U2Core/TaskSignalMapper.h> #include <U2Core/TaskStarter.h> #include <U2Core/Timer.h> @@ -189,14 +190,31 @@ Task* GUITestService::createTestSuiteLauncherTask() const { bool ok; int suiteNumber = cmdLine->getParameterValue(CMDLineCoreOptions::LAUNCH_GUI_TEST_SUITE).toInt(&ok); + bool useSameIni = cmdLine->hasParameter(CMDLineCoreOptions::USE_SAME_INI_FOR_TESTS); + QString iniTemplate; + + if (useSameIni) { + QString settingsFile = AppContext::getSettings()->fileName(); + QFileInfo iniFile(settingsFile); + // check if file exists and if yes: Is it really a file and no directory? + if (iniFile.exists() && iniFile.isFile()) { + iniTemplate = settingsFile; + } else { + useSameIni = false; + } + } if(!ok){ QString pathToSuite = cmdLine->getParameterValue(CMDLineCoreOptions::LAUNCH_GUI_TEST_SUITE); - Task *task = new GUITestLauncher(pathToSuite); + Task *task = !useSameIni ? + new GUITestLauncher(pathToSuite) : + new GUITestLauncher(pathToSuite, false, iniTemplate); Q_ASSERT(task); return task; } - Task *task = new GUITestLauncher(suiteNumber); + Task *task = !useSameIni ? + new GUITestLauncher(suiteNumber) : + new GUITestLauncher(suiteNumber, false, iniTemplate); Q_ASSERT(task); return task; diff --git a/src/corelibs/U2Test/src/gui_tests/GUITestService.h b/src/corelibs/U2Test/src/gui_tests/GUITestService.h index bb018ff35f26ca236b1620204b93607ed18bd4f6..4db8473f8ace538b89976d87a01ca6906e2ba406 100644 --- a/src/corelibs/U2Test/src/gui_tests/GUITestService.h +++ b/src/corelibs/U2Test/src/gui_tests/GUITestService.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Test/src/gui_tests/GUITestTeamcityLogger.cpp b/src/corelibs/U2Test/src/gui_tests/GUITestTeamcityLogger.cpp index 147733b9c4be3a4e39e7c199b644fc1907eee2a4..b4bca70beb52ce51778b4d0d10bac55253264166 100644 --- a/src/corelibs/U2Test/src/gui_tests/GUITestTeamcityLogger.cpp +++ b/src/corelibs/U2Test/src/gui_tests/GUITestTeamcityLogger.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Test/src/gui_tests/GUITestTeamcityLogger.h b/src/corelibs/U2Test/src/gui_tests/GUITestTeamcityLogger.h index 2d8edff0e23031caa431d59509de02ca4ac26419..6cbb66455680eae40d3fc175ea71e31fe03e84c1 100644 --- a/src/corelibs/U2Test/src/gui_tests/GUITestTeamcityLogger.h +++ b/src/corelibs/U2Test/src/gui_tests/GUITestTeamcityLogger.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Test/src/gui_tests/GUITestThread.cpp b/src/corelibs/U2Test/src/gui_tests/GUITestThread.cpp index 16d95cb2dc0a36029e5aee5bfc6095dc38850e7a..71dfe7b00600a13e0cced12caf023f8e7de8bd25 100644 --- a/src/corelibs/U2Test/src/gui_tests/GUITestThread.cpp +++ b/src/corelibs/U2Test/src/gui_tests/GUITestThread.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Test/src/gui_tests/GUITestThread.h b/src/corelibs/U2Test/src/gui_tests/GUITestThread.h index fe660fa59e2b861435279e7818f1b51b883e229f..023415da5e59c75222f2df9c69debd5f7f1443ca 100644 --- a/src/corelibs/U2Test/src/gui_tests/GUITestThread.h +++ b/src/corelibs/U2Test/src/gui_tests/GUITestThread.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Test/src/gui_tests/GUITestWindow.cpp b/src/corelibs/U2Test/src/gui_tests/GUITestWindow.cpp index 1b14853ea4b6bfecbb1120ee04f4558a724f8b64..4289567031691e8ae89fb5ba8fd2404fd39168ac 100644 --- a/src/corelibs/U2Test/src/gui_tests/GUITestWindow.cpp +++ b/src/corelibs/U2Test/src/gui_tests/GUITestWindow.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Test/src/gui_tests/GUITestWindow.h b/src/corelibs/U2Test/src/gui_tests/GUITestWindow.h index ce34a08e6f0430377096df94c1f014f9527e20f7..52705dabdcf362ec8ae7e1b14ac2459a43f5db9c 100644 --- a/src/corelibs/U2Test/src/gui_tests/GUITestWindow.h +++ b/src/corelibs/U2Test/src/gui_tests/GUITestWindow.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Test/src/gui_tests/UGUITest.cpp b/src/corelibs/U2Test/src/gui_tests/UGUITest.cpp index 7d3723cbd93af4cb5008fc86852f3a8bc480e543..92b8bfdc1d0e09f07a594460ec14e9490cad8695 100644 --- a/src/corelibs/U2Test/src/gui_tests/UGUITest.cpp +++ b/src/corelibs/U2Test/src/gui_tests/UGUITest.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Test/src/gui_tests/UGUITest.h b/src/corelibs/U2Test/src/gui_tests/UGUITest.h index 72f53ce81a54ddd18fb0d8d7a51a559d32d32795..3b018f3fd9a8fc8c70a29d6b9bd084f7e2c39a10 100644 --- a/src/corelibs/U2Test/src/gui_tests/UGUITest.h +++ b/src/corelibs/U2Test/src/gui_tests/UGUITest.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Test/src/gui_tests/UGUITestBase.cpp b/src/corelibs/U2Test/src/gui_tests/UGUITestBase.cpp index 72869a814cd74cd01fb9e4b75ee8b6eb405045df..c485be671567562af7b304d3ac22305ca84730ef 100644 --- a/src/corelibs/U2Test/src/gui_tests/UGUITestBase.cpp +++ b/src/corelibs/U2Test/src/gui_tests/UGUITestBase.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Test/src/gui_tests/UGUITestBase.h b/src/corelibs/U2Test/src/gui_tests/UGUITestBase.h index f7b3b80123cfe603945d6a83702db9b1bcb56d85..2e12f457bff631305af850c331983aabec2c6bff 100644 --- a/src/corelibs/U2Test/src/gui_tests/UGUITestBase.h +++ b/src/corelibs/U2Test/src/gui_tests/UGUITestBase.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Test/src/xmltest/XMLTestFormat.cpp b/src/corelibs/U2Test/src/xmltest/XMLTestFormat.cpp index 5812c17880ffa3d685cb572568096dd6e7acc150..404729770be0a6df8ebb383795acb43d43226298 100644 --- a/src/corelibs/U2Test/src/xmltest/XMLTestFormat.cpp +++ b/src/corelibs/U2Test/src/xmltest/XMLTestFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Test/src/xmltest/XMLTestFormat.h b/src/corelibs/U2Test/src/xmltest/XMLTestFormat.h index 252dd862ae177f8c5d3412763de2c42a2f9b1750..0e8ae6fd08289b9d4b993f49ba92802874f2828f 100644 --- a/src/corelibs/U2Test/src/xmltest/XMLTestFormat.h +++ b/src/corelibs/U2Test/src/xmltest/XMLTestFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2Test/src/xmltest/XMLTestUtils.cpp b/src/corelibs/U2Test/src/xmltest/XMLTestUtils.cpp index 9233eb0d352174f36afdff32f83b40105e3ed7ea..973590e902fa61ce957e5c80e1e9f92d64816445 100644 --- a/src/corelibs/U2Test/src/xmltest/XMLTestUtils.cpp +++ b/src/corelibs/U2Test/src/xmltest/XMLTestUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -31,6 +31,43 @@ namespace U2 { +const QString XmlTest::TRUE_VALUE = "true"; +const QString XmlTest::FALSE_VALUE = "false"; + +XmlTest::XmlTest(const QString &taskName, GTest *cp, const GTestEnvironment *env, TaskFlags flags, const QList<GTest *> &subtasks) + : GTest(taskName, cp, env, flags, subtasks) +{ + +} + +void XmlTest::checkNecessaryAttributeExistence(const QDomElement &element, const QString &attribute) { + CHECK_EXT(element.hasAttribute(attribute), failMissingValue(attribute), ); +} + +void XmlTest::checkAttribute(const QDomElement &element, const QString &attribute, const QStringList &acceptableValues, bool isNecessary) { + if (isNecessary) { + checkNecessaryAttributeExistence(element, attribute); + CHECK_OP(stateInfo, ); + } + + CHECK_EXT(!element.hasAttribute(attribute) || acceptableValues.contains(element.attribute(attribute)), + setError(QString("Attribute '%1' has inacceptable value. Acceptable values are: %2") + .arg(attribute).arg(acceptableValues.join(", "))), ); +} + +void XmlTest::checkBooleanAttribute(const QDomElement &element, const QString &attribute, bool isNecessary) { + checkAttribute(element, attribute, { TRUE_VALUE, FALSE_VALUE }, isNecessary); +} + +const QString XMLTestUtils::TMP_DATA_DIR_PREFIX = "!tmp_data_dir!"; +const QString XMLTestUtils::COMMON_DATA_DIR_PREFIX = "!common_data_dir!"; +const QString XMLTestUtils::LOCAL_DATA_DIR_PREFIX = "!input!"; +const QString XMLTestUtils::WORKFLOW_SAMPLES_DIR_PREFIX = "!workflow_samples!"; +const QString XMLTestUtils::WORKFLOW_OUTPUT_DIR_PREFIX = "!workflow_output!"; +const QString XMLTestUtils::EXPECTED_OUTPUT_DIR_PREFIX = "!expected!"; + +const QString XMLTestUtils::CONFIG_FILE_PATH = "!config_file_path!"; + QList<XMLTestFactory*> XMLTestUtils::createTestFactories() { QList<XMLTestFactory*> res; @@ -45,10 +82,6 @@ QList<XMLTestFactory*> XMLTestUtils::createTestFactories() { void XMLTestUtils::replacePrefix(const GTestEnvironment *env, QString &path){ QString result; - const QString EXPECTED_OUTPUT_DIR_PREFIX = "!expected!"; - const QString TMP_DATA_DIR_PREFIX = "!tmp_data_dir!"; - const QString COMMON_DATA_DIR_PREFIX = "!common_data_dir!"; - // Determine which environment variable is required QString envVarName; QString prefix; @@ -64,8 +97,13 @@ void XMLTestUtils::replacePrefix(const GTestEnvironment *env, QString &path){ envVarName = "COMMON_DATA_DIR"; prefix = COMMON_DATA_DIR_PREFIX; } + else if (path.startsWith(WORKFLOW_OUTPUT_DIR_PREFIX)) { + envVarName = "WORKFLOW_OUTPUT_DIR"; + prefix = WORKFLOW_OUTPUT_DIR_PREFIX; + } else { - FAIL(QString("Unexpected 'prefix' value in the path: '%1'!").arg(path), ); + algoLog.details(QString("There are no known prefixes in the path: '%1', the path was not modified").arg(path)); + return; } // Replace with the correct value @@ -84,16 +122,42 @@ void XMLTestUtils::replacePrefix(const GTestEnvironment *env, QString &path){ path = result.mid(0, result.size() - 1); // without the last ';' } +bool XMLTestUtils::parentTasksHaveError(Task* t) { + Task* parentTask = t->getParentTask(); + CHECK(nullptr != parentTask, false); + + bool result = false; + if (parentTask->hasError()) { + result = true; + } else { + result = parentTasksHaveError(parentTask); + } + return result; +} + +const QString XMLMultiTest::FAIL_ON_SUBTEST_FAIL = "fail-on-subtest-fail"; +const QString XMLMultiTest::LOCK_FOR_LOG_LISTENING = "lockForLogListening"; + void XMLMultiTest::init(XMLTestFormat *tf, const QDomElement& el) { // This attribute is used to avoid mixing log messages between different tests // Each test that listens to log should set this attribute to "true" // See also: GTestLogHelper + checkAttribute(el, LOCK_FOR_LOG_LISTENING, { "true", "false" }, false); + CHECK_OP(stateInfo, ); + bool lockForLogListening = false; - if ("true" == el.attribute("lockForLogListening")) { + if ("true" == el.attribute(LOCK_FOR_LOG_LISTENING)) { lockForLogListening = true; } + checkAttribute(el, FAIL_ON_SUBTEST_FAIL, { "true", "false" }, false); + CHECK_OP(stateInfo, ); + + if ("false" == el.attribute(FAIL_ON_SUBTEST_FAIL, "true")) { + setFlag(TaskFlag_FailOnSubtaskError, false); + } + QDomNodeList subtaskNodes = el.childNodes(); QList<Task*> subs; for(int i=0;i<subtaskNodes.size(); i++) { @@ -157,9 +221,7 @@ void GTest_DeleteTmpFile::init(XMLTestFormat*, const QDomElement& el) { } Task::ReportResult GTest_DeleteTmpFile::report() { - if (!QFile::exists(url)) { - stateInfo.setError(QString("TMP file not found: %1").arg(url)); - } else if(!QFileInfo(url).isDir()) { + if (!QFileInfo(url).isDir()) { QFile::remove(url); } else{ GUrlUtils::removeDir(url, stateInfo); @@ -187,6 +249,4 @@ Task::ReportResult GTest_CreateTmpFolder::report() { return ReportResult_Finished; } - }//namespace - diff --git a/src/corelibs/U2Test/src/xmltest/XMLTestUtils.h b/src/corelibs/U2Test/src/xmltest/XMLTestUtils.h index 2443286f21d2c43c5548dba09b105be038ad67b6..0c0c8886e0808fa85424466052c606f573db8cc3 100644 --- a/src/corelibs/U2Test/src/xmltest/XMLTestUtils.h +++ b/src/corelibs/U2Test/src/xmltest/XMLTestUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -31,7 +31,7 @@ namespace U2 { #define SIMPLE_XML_TEST_CONSTRUCT(ClassName, TFlags) \ ClassName(XMLTestFormat* _tf, const QString& _name, GTest* _cp, \ const GTestEnvironment* _env, const QList<GTest*>& _contexts, const QDomElement& _el) \ - : GTest(_name, _cp, _env, TFlags, _contexts){init(_tf, _el);} \ + : XmlTest(_name, _cp, _env, TFlags, _contexts){init(_tf, _el);} \ #define SIMPLE_XML_TEST_BODY(ClassName, TFlags) \ @@ -60,46 +60,73 @@ public:\ SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(TestClass, TagName, TaskFlags_NR_FOSCOE) \ +class U2TEST_EXPORT XmlTest : public GTest { +public: + XmlTest(const QString &taskName, + GTest *cp, + const GTestEnvironment *env, + TaskFlags flags, const QList<GTest *> &subtasks = QList<GTest*>()); + + void checkNecessaryAttributeExistence(const QDomElement &element, const QString &attribute); + void checkAttribute(const QDomElement &element, const QString &attribute, const QStringList &acceptableValues, bool isNecessary); + void checkBooleanAttribute(const QDomElement &element, const QString &attribute, bool isNecessary); + + static const QString TRUE_VALUE; + static const QString FALSE_VALUE; +}; class U2TEST_EXPORT XMLTestUtils { public: static QList<XMLTestFactory*> createTestFactories(); static void replacePrefix(const GTestEnvironment* env, QString &path); + static bool parentTasksHaveError(Task* t); + + static const QString TMP_DATA_DIR_PREFIX; + static const QString COMMON_DATA_DIR_PREFIX; + static const QString LOCAL_DATA_DIR_PREFIX; + static const QString WORKFLOW_SAMPLES_DIR_PREFIX; + static const QString WORKFLOW_OUTPUT_DIR_PREFIX; + static const QString EXPECTED_OUTPUT_DIR_PREFIX; + + static const QString CONFIG_FILE_PATH; }; ////////////////////////////////////////////////////////////////////////// // utility tasks -class XMLMultiTest : public GTest { +class XMLMultiTest : public XmlTest { Q_OBJECT public: - SIMPLE_XML_TEST_BODY_WITH_FACTORY(XMLMultiTest, "multi-test"); + SIMPLE_XML_TEST_BODY_WITH_FACTORY(XMLMultiTest, "multi-test") ReportResult report(); + + static const QString FAIL_ON_SUBTEST_FAIL; // it defines whether the test should stop execution after the first error; is "true" by default + static const QString LOCK_FOR_LOG_LISTENING; // This attribute is used to avoid mixing log messages between different tests. Each test that listens to log should set this attribute to "true" }; -class GTest_Fail : public GTest { +class GTest_Fail : public XmlTest { Q_OBJECT public: - SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_Fail, "fail", TaskFlag_NoRun); + SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_Fail, "fail", TaskFlag_NoRun) ReportResult report(); private: QString msg; }; -class GTest_DeleteTmpFile : public GTest { +class GTest_DeleteTmpFile : public XmlTest { Q_OBJECT public: - SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_DeleteTmpFile, "delete", TaskFlag_NoRun); + SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_DeleteTmpFile, "delete", TaskFlag_NoRun) ReportResult report(); private: QString url; }; -class GTest_CreateTmpFolder: public GTest { +class GTest_CreateTmpFolder: public XmlTest { Q_OBJECT public: - SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_CreateTmpFolder, "create-folder", TaskFlag_NoRun); + SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_CreateTmpFolder, "create-folder", TaskFlag_NoRun) ReportResult report(); private: QString url; diff --git a/src/corelibs/U2Test/transl/russian.ts b/src/corelibs/U2Test/transl/russian.ts index f984ca89a373b790a706a18846af93def03ac60c..6c66398958d5508574df37eb3322f799525f6b8b 100644 --- a/src/corelibs/U2Test/transl/russian.ts +++ b/src/corelibs/U2Test/transl/russian.ts @@ -86,12 +86,12 @@ <context> <name>U2::GTestSuite</name> <message> - <location filename="../src/GTest.cpp" line="324"/> + <location filename="../src/GTest.cpp" line="338"/> <source>Can't load suite list %1</source> <translation>Can't load suite list %1</translation> </message> <message> - <location filename="../src/GTest.cpp" line="325"/> + <location filename="../src/GTest.cpp" line="339"/> <source>Can't open suite list %1</source> <translation>Can't open suite list %1</translation> </message> @@ -99,37 +99,37 @@ <context> <name>U2::GUITestLauncher</name> <message> - <location filename="../src/gui_tests/GUITestLauncher.cpp" line="138"/> + <location filename="../src/gui_tests/GUITestLauncher.cpp" line="139"/> <source>No tests to run</source> <translation>No tests to run</translation> </message> <message> - <location filename="../src/gui_tests/GUITestLauncher.cpp" line="148"/> + <location filename="../src/gui_tests/GUITestLauncher.cpp" line="149"/> <source>Invalid suite number: %1. There are %2 suites</source> <translation>Invalid suite number: %1. There are %2 suites</translation> </message> <message> - <location filename="../src/gui_tests/GUITestLauncher.cpp" line="248"/> + <location filename="../src/gui_tests/GUITestLauncher.cpp" line="257"/> <source>An error occurred while starting UGENE: </source> <translation>An error occurred while starting UGENE: </translation> </message> <message> - <location filename="../src/gui_tests/GUITestLauncher.cpp" line="275"/> + <location filename="../src/gui_tests/GUITestLauncher.cpp" line="288"/> <source>An error occurred while finishing UGENE: </source> <translation>An error occurred while finishing UGENE: </translation> </message> <message> - <location filename="../src/gui_tests/GUITestLauncher.cpp" line="277"/> + <location filename="../src/gui_tests/GUITestLauncher.cpp" line="290"/> <source>Test fails because of timeout.</source> <translation>Test fails because of timeout.</translation> </message> <message> - <location filename="../src/gui_tests/GUITestLauncher.cpp" line="309"/> + <location filename="../src/gui_tests/GUITestLauncher.cpp" line="322"/> <source>Test name</source> <translation>Test name</translation> </message> <message> - <location filename="../src/gui_tests/GUITestLauncher.cpp" line="309"/> + <location filename="../src/gui_tests/GUITestLauncher.cpp" line="322"/> <source>Status</source> <translation>Status</translation> </message> @@ -137,17 +137,17 @@ <context> <name>U2::GUITestService</name> <message> - <location filename="../src/gui_tests/GUITestService.cpp" line="55"/> + <location filename="../src/gui_tests/GUITestService.cpp" line="56"/> <source>GUI test viewer</source> <translation>GUI test viewer</translation> </message> <message> - <location filename="../src/gui_tests/GUITestService.cpp" line="55"/> + <location filename="../src/gui_tests/GUITestService.cpp" line="56"/> <source>Service to support UGENE GUI testing</source> <translation>Service to support UGENE GUI testing</translation> </message> <message> - <location filename="../src/gui_tests/GUITestService.cpp" line="240"/> + <location filename="../src/gui_tests/GUITestService.cpp" line="258"/> <source>Can't connect external tool manager signal</source> <translation>Can't connect external tool manager signal</translation> </message> @@ -159,12 +159,12 @@ <context> <name>U2::LoadTestTask</name> <message> - <location filename="../src/TestRunnerTask.cpp" line="179"/> + <location filename="../src/TestRunnerTask.cpp" line="197"/> <source>TestLoader for %1</source> <translation>TestLoader for %1</translation> </message> <message> - <location filename="../src/TestRunnerTask.cpp" line="187"/> + <location filename="../src/TestRunnerTask.cpp" line="205"/> <source>Cannot open file: %1</source> <translation>Ðе могу открыть файл: "%1"</translation> </message> @@ -172,12 +172,12 @@ <context> <name>U2::TestRunnerTask</name> <message> - <location filename="../src/TestRunnerTask.cpp" line="39"/> + <location filename="../src/TestRunnerTask.cpp" line="40"/> <source>Test runner</source> <translation>ИÑполнение теÑтов</translation> </message> <message> - <location filename="../src/TestRunnerTask.cpp" line="103"/> + <location filename="../src/TestRunnerTask.cpp" line="107"/> <source>Test format not supported: %1</source> <translation>Формат теÑта не поддерживаетÑÑ: %1</translation> </message> diff --git a/src/corelibs/U2View/U2View.pri b/src/corelibs/U2View/U2View.pri index b985e3077c77d43f4dd244fe265aa058b93e7dc9..bec83045b277613ca0245b2e61c3f87eaa27cfee 100644 --- a/src/corelibs/U2View/U2View.pri +++ b/src/corelibs/U2View/U2View.pri @@ -1,30 +1,26 @@ # include (U2View.pri) -UGENE_RELATIVE_DESTDIR = '' MODULE_ID=U2View include( ../../ugene_lib_common.pri ) -QT += xml svg widgets webkitwidgets printsupport -DEFINES+= QT_FATAL_ASSERT BUILDING_U2VIEW_DLL -LIBS += -L../../_release -lU2Core -lU2Algorithm -lU2Formats -lU2Lang -lU2Gui +QT += xml svg widgets printsupport -unix: QMAKE_CXXFLAGS += -Wno-char-subscripts +useWebKit() { + QT += webkitwidgets +} else { + QT += webengine webenginewidgets +} -!debug_and_release|build_pass { +DEFINES+= QT_FATAL_ASSERT BUILDING_U2VIEW_DLL +LIBS += -L../../$$out_dir() +LIBS += -lU2Core$$D -lU2Algorithm$$D -lU2Formats$$D -lU2Lang$$D -lU2Gui$$D - CONFIG(debug, debug|release) { - DESTDIR=../../_debug - LIBS -= -L../../_release -lU2Core -lU2Algorithm -lU2Formats -lU2Lang -lU2Gui - LIBS += -L../../_debug -lU2Cored -lU2Algorithmd -lU2Formatsd -lU2Langd -lU2Guid - } +unix: QMAKE_CXXFLAGS += -Wno-char-subscripts - CONFIG(release, debug|release) { - DESTDIR=../../_release - } -} +DESTDIR = ../../$$out_dir() unix { - target.path = $$UGENE_INSTALL_DIR/$$UGENE_RELATIVE_DESTDIR + target.path = $$UGENE_INSTALL_DIR/ INSTALLS += target } diff --git a/src/corelibs/U2View/src/LicenseDialog.cpp b/src/corelibs/U2View/src/LicenseDialog.cpp index b1fb3b61f7835cdff4e78f006c63faf11e88225e..720f81102469501aefde7f34b97c765d35e44852 100644 --- a/src/corelibs/U2View/src/LicenseDialog.cpp +++ b/src/corelibs/U2View/src/LicenseDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/LicenseDialog.h b/src/corelibs/U2View/src/LicenseDialog.h index 0134530c25f49db5e2b26b295479601d44a738e1..11b01cb67d37cb18241e7b6f3943f79fd0db3afb 100644 --- a/src/corelibs/U2View/src/LicenseDialog.h +++ b/src/corelibs/U2View/src/LicenseDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/UndoRedoFramework.cpp b/src/corelibs/U2View/src/UndoRedoFramework.cpp index 9db1ac1d131306c96cf229c2c0998a1d60ede671..b77220d8732672cd86c82c815a170671515fc65a 100644 --- a/src/corelibs/U2View/src/UndoRedoFramework.cpp +++ b/src/corelibs/U2View/src/UndoRedoFramework.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/UndoRedoFramework.h b/src/corelibs/U2View/src/UndoRedoFramework.h index 3bb5f10de76b81a7db64e8a910571ed42ff09ed4..5d7ce97f23accf03b5e91c2467912cceab86c37e 100644 --- a/src/corelibs/U2View/src/UndoRedoFramework.h +++ b/src/corelibs/U2View/src/UndoRedoFramework.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/WebWindow.cpp b/src/corelibs/U2View/src/WebWindow.cpp index e114a511d4cfbbd0ee1e46014a3a421da0850fa5..aaefb7c7a4958aac224853ca2a502d87477d4e4e 100644 --- a/src/corelibs/U2View/src/WebWindow.cpp +++ b/src/corelibs/U2View/src/WebWindow.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,10 +19,11 @@ * MA 02110-1301, USA. */ -#include "WebWindow.h" - #include <QVBoxLayout> -#include <QWebView> + +#include <U2Gui/U2WebView.h> + +#include "WebWindow.h" namespace U2 { @@ -33,7 +34,7 @@ WebWindow::WebWindow(const QString& title, const QString& content) l->setMargin(0); setLayout(l); - QWebView* textEdit = new QWebView(this); + U2WebView *textEdit = new U2WebView(this); textEdit->setContextMenuPolicy(Qt::NoContextMenu); textEdit->setHtml(content); diff --git a/src/corelibs/U2View/src/WebWindow.h b/src/corelibs/U2View/src/WebWindow.h index b072198950e782e6005f03dbb66ac0fc1e71da33..1c5099fb91e31a594abc28b946e06b965ebddef9 100644 --- a/src/corelibs/U2View/src/WebWindow.h +++ b/src/corelibs/U2View/src/WebWindow.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AddReadsToDocumentTask.cpp b/src/corelibs/U2View/src/ov_assembly/AddReadsToDocumentTask.cpp index a91419a96bb7eb3f6fd59bfab1f8b6e17536ed8b..37b786ded324df2f4ec643225bbfac4eea9341fe 100644 --- a/src/corelibs/U2View/src/ov_assembly/AddReadsToDocumentTask.cpp +++ b/src/corelibs/U2View/src/ov_assembly/AddReadsToDocumentTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AddReadsToDocumentTask.h b/src/corelibs/U2View/src/ov_assembly/AddReadsToDocumentTask.h index b6cc04922fbd82d75197df86d19c2cdcaa06f609..9fe69784f42e9c21b3f6b353a00ae0a00e7ab0a7 100644 --- a/src/corelibs/U2View/src/ov_assembly/AddReadsToDocumentTask.h +++ b/src/corelibs/U2View/src/ov_assembly/AddReadsToDocumentTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyAnnotationsArea.cpp b/src/corelibs/U2View/src/ov_assembly/AssemblyAnnotationsArea.cpp index 7b1e083dbd6c83bc92280bb6bc6c78acaf05bdab..49ba2dece70db71db6f2918667bcc9bdf4cbb995 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyAnnotationsArea.cpp +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyAnnotationsArea.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyAnnotationsArea.h b/src/corelibs/U2View/src/ov_assembly/AssemblyAnnotationsArea.h index 546f20bbe6bc9d09e152419c77d0e3c3e04e6383..10f526cfeeea3eccf8611084ba2cb10783c5127f 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyAnnotationsArea.h +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyAnnotationsArea.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyBrowser.cpp b/src/corelibs/U2View/src/ov_assembly/AssemblyBrowser.cpp index 383a63594c94d7baca0318fc42a59ceaceeba23f..25483f218e1507d41fbac3de71704c84e92c6ea4 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyBrowser.cpp +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyBrowser.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,6 +33,7 @@ #include <QVBoxLayout> #include <U2Core/AppContext.h> +#include <U2Core/DNAAlphabet.h> #include <U2Core/DNASequenceObject.h> #include <U2Core/DocumentModel.h> #include <U2Core/FormatUtils.h> @@ -219,50 +220,29 @@ QString AssemblyBrowser::tryAddObject(GObject * obj) { Document * objDoc = obj->getDocument(); SAFE_POINT(NULL != objDoc, "", tr("Internal error: only object with document can be added to browser")); + static const QString unacceptableObjectError = tr("Only a nucleotide sequence or a variant track objects can be added to the Assembly Browser."); + if (GObjectTypes::SEQUENCE == obj->getGObjectType()) { U2SequenceObject * seqObj = qobject_cast<U2SequenceObject*>(obj); CHECK(NULL != seqObj, tr("Internal error: broken sequence object")); SAFE_POINT(NULL != objDoc->getDocumentFormat(), "", tr("Internal error: empty document format")); - U2OpStatus2Log os; - qint64 seqLen = seqObj->getSequenceLength(); - QStringList errs; - qint64 modelLen = model->getModelLength(os); - if (seqLen != modelLen) { - errs << tr("The lengths of the sequence and assembly are different."); - } - if (seqObj->getGObjectName() != gobject->getGObjectName()) { - errs << tr("The sequence and assembly names are different."); - } - - // commented: waiting for fix - //QByteArray refMd5 = model->getReferenceMd5(); - //if(!refMd5.isEmpty()) { - // //QByteArray data = QString(seqObj->getSequence()).remove("-").toUpper().toUtf8(); - // QByteArray data = QString(seqObj->getSequence()).toUpper().toUtf8(); - // QByteArray seqObjMd5 = QCryptographicHash::hash(data, QCryptographicHash::Md5).toHex(); - // if(seqObjMd5 != refMd5) { - // errs << tr("- Reference MD5 not match with MD5 written in assembly"); - // } - //} - bool setRef = !isAssemblyObjectLocked(true) && !model->isLoadingReference(); setRef &= model->checkPermissions(QFile::WriteUser, setRef); - if(!errs.isEmpty() && setRef) { - const NotificationStack *notificationStack = AppContext::getMainWindow()->getNotificationStack(); - const QString message = tr("It seems that sequence \"%1\", set as reference to assembly \"%2\", does not match it.").arg(seqObj->getGObjectName()).arg(gobject->getGObjectName()) - + "\n- " + errs.join("\n- "); - notificationStack->addNotification(message, Warning_Not); - } - if(setRef) { + if (setRef) { + const DNAAlphabet* alphabet = seqObj->getAlphabet(); + if (!alphabet->isNucleic()) { + return unacceptableObjectError; + } if(model->isDbLocked(100)){ - return tr("Internal error: database is busy"); + return tr("Internal error: database is locked"); } model->setReference(seqObj); U2Assembly assembly = model->getAssembly(); U2DataId refId; QString folder; + U2OpStatus2Log os; const QStringList folders = model->getDbiConnection().dbi->getObjectDbi()->getObjectFolders(assembly.id, os); if (folders.isEmpty() || os.isCoR()) { folder = U2ObjectDbi::ROOT_FOLDER; @@ -297,7 +277,7 @@ QString AssemblyBrowser::tryAddObject(GObject * obj) { addObjectToView(obj); connect(model.data(), SIGNAL(si_trackRemoved(VariantTrackObject *)), SLOT(sl_trackRemoved(VariantTrackObject *))); } else { - return tr("Only sequence or variant track objects can be added to assembly browser"); + return unacceptableObjectError; } return ""; diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyBrowser.h b/src/corelibs/U2View/src/ov_assembly/AssemblyBrowser.h index 42a145e68239e414ba4dd1f6bace1556ab171342..8c0bc386d10e00ed4f6282d3062d5ccc53e92983 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyBrowser.h +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyBrowser.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserFactory.cpp b/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserFactory.cpp index 6a86cb00f442aade3f7a30c4d4daf6ddf0bddc29..8728530dd12b8478046e7fc1e6db5c30867420ef 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserFactory.cpp +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserFactory.h b/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserFactory.h index 5b1c3f9b23453fb9be5300ffc39ef1acb7296c00..6297e7835ad0f02f7ac5094d19931e9b88e5bac8 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserFactory.h +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserSettings.cpp b/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserSettings.cpp index fb3c79568ef9c24450d7f050510f1ac0b4c91b3a..a9dc537cc5621d20b14bb1cf16c2b526f11744dd 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserSettings.cpp +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserSettings.h b/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserSettings.h index 08bebaad608c44f52317c45922809f6999faed08..f2f0ae4f955d93b10cd3165ab2caf66ef64e953e 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserSettings.h +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserState.cpp b/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserState.cpp index cc1165c11356f174492e5d9bf3c85fcc7ed0876a..ef1671cd3558110d444e7f815a9260ef5107603e 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserState.cpp +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserState.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserState.h b/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserState.h index d9110f24f3a5cc7f1333ecfb2f0b2dfe4d4fbfb4..c560d5d0d84d579d5e49a0cefc056c63ce21b481 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserState.h +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserState.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserTasks.cpp b/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserTasks.cpp index 42feb3f4ccbe91c587483b436c53f1365da6cbb0..df0571326d8c6cb0ea5bf88b9b5d9129d39206bf 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserTasks.cpp +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserTasks.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserTasks.h b/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserTasks.h index 594f0f78e248bcfd9e24325391ed62c54e794088..0296601c1e178502ed73024cc7dfe09e1ee5da23 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserTasks.h +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyBrowserTasks.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyCellRenderer.cpp b/src/corelibs/U2View/src/ov_assembly/AssemblyCellRenderer.cpp index 03893faa06f51fc26048fd2e51fca22163e7a208..b09073ccefe54073dc0679b92327d4e2d542134c 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyCellRenderer.cpp +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyCellRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyCellRenderer.h b/src/corelibs/U2View/src/ov_assembly/AssemblyCellRenderer.h index 81fdbfeca6b8302105aaab658fc1593f65d14975..c9946c4ccf1e6ee41eb982d5dad9c5fa00e05a23 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyCellRenderer.h +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyCellRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyConsensusArea.cpp b/src/corelibs/U2View/src/ov_assembly/AssemblyConsensusArea.cpp index eb41bd0eba0d8f15892ad69605cb37b71a48e09e..f2664a71ee4a748db45fe028cb7f33108d3a30ba 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyConsensusArea.cpp +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyConsensusArea.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyConsensusArea.h b/src/corelibs/U2View/src/ov_assembly/AssemblyConsensusArea.h index 2cebbeee0269359f47d64f6337ea6e50aa4a85d4..0c2b1a6a96136c5e2cbe61c662100e9f8bec92f0 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyConsensusArea.h +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyConsensusArea.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyConsensusTask.cpp b/src/corelibs/U2View/src/ov_assembly/AssemblyConsensusTask.cpp index 373e8e8885bb215e8d0eedba5c436824f50d096a..b0167a8dcd9a970948efb19d45da2e861bd22764 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyConsensusTask.cpp +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyConsensusTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyConsensusTask.h b/src/corelibs/U2View/src/ov_assembly/AssemblyConsensusTask.h index dec826673858c66fc8ee776a648310f4aca5e4c8..210ec0cd549189bede467695a72691b6cf95313d 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyConsensusTask.h +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyConsensusTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyCoverageGraph.cpp b/src/corelibs/U2View/src/ov_assembly/AssemblyCoverageGraph.cpp index 516ad109017e7e4d5e482f6e56229dd82befd86b..598fa3b898948ea3b74a1f8dd751dac751e55e54 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyCoverageGraph.cpp +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyCoverageGraph.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyCoverageGraph.h b/src/corelibs/U2View/src/ov_assembly/AssemblyCoverageGraph.h index fe8737ee863c1b9cec08d818815934ecf2367ace..321c29d237f34ed40408e07591da5c9eafab59c0 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyCoverageGraph.h +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyCoverageGraph.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyInfoWidget.cpp b/src/corelibs/U2View/src/ov_assembly/AssemblyInfoWidget.cpp index 969ba0f1c48de51ecbb31c0a560f3816ff235160..a14ff15e427dd6200adb8be1d9a8efdad05b0df6 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyInfoWidget.cpp +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyInfoWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -122,7 +122,7 @@ AssemblyInfoWidget::AssemblyInfoWidget(AssemblyBrowser *browser, QWidget *p) //////////////////////////////////// const QString AssemblyInfoWidgetFactory::GROUP_ID = "OP_ASS_INFO"; const QString AssemblyInfoWidgetFactory::GROUP_ICON_STR = ":core/images/chart_bar.png"; -const QString AssemblyInfoWidgetFactory::GROUP_DOC_PAGE = "22055987"; +const QString AssemblyInfoWidgetFactory::GROUP_DOC_PAGE = "24742522"; AssemblyInfoWidgetFactory::AssemblyInfoWidgetFactory() diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyInfoWidget.h b/src/corelibs/U2View/src/ov_assembly/AssemblyInfoWidget.h index 3959ed3fcb6af1b347e79ed8c8e7d596ad86df75..9e075d97d54dfd5d26cc6a1bb6f3c57d0a7235bc 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyInfoWidget.h +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyInfoWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyModel.cpp b/src/corelibs/U2View/src/ov_assembly/AssemblyModel.cpp index 047e745f8daf75732b7b8c6afedcaa0fc96e1a7a..f4fb975a35282182d894d1297e5fd0e5a07d7f30 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyModel.cpp +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyModel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -329,7 +329,7 @@ void AssemblyModel::setAssembly(U2AssemblyDbi * dbi, const U2Assembly & assm) { default: { dissociateReference(); - FAIL(tr("Unexected object is set as reference"), ); + FAIL(tr("Unexpected object is set as reference"), ); } } } diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyModel.h b/src/corelibs/U2View/src/ov_assembly/AssemblyModel.h index 326a1b1bcd1c2eeec095a32274b2dddde8370700..f7258bffba9506aa4bc8ffea200bb7bc9796633d 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyModel.h +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyModel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyNavigationWidget.cpp b/src/corelibs/U2View/src/ov_assembly/AssemblyNavigationWidget.cpp index 8d8acbab25c346a518a614086ccef6b69a8598ea..eee1e47c2d7d9f93ab58f965dc8b44c033f79f32 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyNavigationWidget.cpp +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyNavigationWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -131,7 +131,7 @@ void CoveredRegionsLabel::sl_updateContent() { //////////////////////////////////// const QString AssemblyNavigationWidgetFactory::GROUP_ID = "OP_ASS_NAVIGATION"; const QString AssemblyNavigationWidgetFactory::GROUP_ICON_STR = ":core/images/goto.png"; -const QString AssemblyNavigationWidgetFactory::GROUP_DOC_PAGE = "22055985"; +const QString AssemblyNavigationWidgetFactory::GROUP_DOC_PAGE = "24742520"; AssemblyNavigationWidgetFactory::AssemblyNavigationWidgetFactory() { objectViewOfWidget = ObjViewType_AssemblyBrowser; diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyNavigationWidget.h b/src/corelibs/U2View/src/ov_assembly/AssemblyNavigationWidget.h index f68941936a1ef579e5e8c9ce1286a6b341e19d4a..ecbb67212a0c220f34723f61e8a3a64a8bb9687c 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyNavigationWidget.h +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyNavigationWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyReadsArea.cpp b/src/corelibs/U2View/src/ov_assembly/AssemblyReadsArea.cpp index f11ac4be83752ea12e4f4ce7334a439ad6714e8d..adb7947b0882a668c8694bf05f8b1c8dbfc971c6 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyReadsArea.cpp +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyReadsArea.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyReadsArea.h b/src/corelibs/U2View/src/ov_assembly/AssemblyReadsArea.h index 49b32ff3b542130f168897752637d4b0f85df749..6acba8fcb4fed4877e6a2d4d09d1089cf1d554f1 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyReadsArea.h +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyReadsArea.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyReadsAreaHint.cpp b/src/corelibs/U2View/src/ov_assembly/AssemblyReadsAreaHint.cpp index f82c0117328bcd9c63a26cbe5c04e10572c143f6..3ee6bec6928322e3d0e10bacb3db19085b3ae7bd 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyReadsAreaHint.cpp +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyReadsAreaHint.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyReadsAreaHint.h b/src/corelibs/U2View/src/ov_assembly/AssemblyReadsAreaHint.h index da4d02e9a23e69a6b7fd4160582d3b0051b59b72..0b3a6c800a6290d78d7aa50e344bfac0de799b5c 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyReadsAreaHint.h +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyReadsAreaHint.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyReferenceArea.cpp b/src/corelibs/U2View/src/ov_assembly/AssemblyReferenceArea.cpp index 2f4370b7e8d9103d9e5ea61284b0736c77e2c13a..c7abe66240a811d306d1aa0c035fe76f71e381ad 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyReferenceArea.cpp +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyReferenceArea.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyReferenceArea.h b/src/corelibs/U2View/src/ov_assembly/AssemblyReferenceArea.h index 382a8e5a77f2f00eb93fa5f70956e414919694ed..23ffadb74ea4f153af28a99e1d3a7fa94ac33c30 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyReferenceArea.h +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyReferenceArea.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyRuler.cpp b/src/corelibs/U2View/src/ov_assembly/AssemblyRuler.cpp index 3a4ade1e665f00bdbb1bd07599220ca85ae05059..452d5846a1374043a841407ab5da5715527f3cfe 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyRuler.cpp +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyRuler.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyRuler.h b/src/corelibs/U2View/src/ov_assembly/AssemblyRuler.h index 9b1e10725f1c4e1fe8d9bb545e32551fc60027dc..5ee43ae93145aa1cea013f67326fcaa043857d7c 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyRuler.h +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyRuler.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblySettingsWidget.cpp b/src/corelibs/U2View/src/ov_assembly/AssemblySettingsWidget.cpp index 436e5d5b73e6a84bb535dbca097af2d4af2ef039..ddbf166a100f2e84859496ece1b310a54f3c760e 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblySettingsWidget.cpp +++ b/src/corelibs/U2View/src/ov_assembly/AssemblySettingsWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -189,7 +189,7 @@ QWidget * AssemblySettingsWidget::createConsensusSettings() { void AssemblySettingsWidget::sl_consensusAlgorithmChanged() { QAction * action = qobject_cast<QAction*>(sender()); int index = ui->getConsensusArea()->getAlgorithmActions().indexOf(action); - SAFE_POINT(index >= 0, "consensus algoritm action not found",); + SAFE_POINT(index >= 0, "consensus algorithm action not found",); algorithmCombo->setCurrentIndex(index); } @@ -230,7 +230,7 @@ QWidget * AssemblySettingsWidget::createRulerSettings() { //////////////////////////////////// const QString AssemblySettingsWidgetFactory::GROUP_ID = "OP_ASS_SETTINGS"; const QString AssemblySettingsWidgetFactory::GROUP_ICON_STR = ":core/images/settings2.png"; -const QString AssemblySettingsWidgetFactory::GROUP_DOC_PAGE = "22055986"; +const QString AssemblySettingsWidgetFactory::GROUP_DOC_PAGE = "24742521"; AssemblySettingsWidgetFactory::AssemblySettingsWidgetFactory() diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblySettingsWidget.h b/src/corelibs/U2View/src/ov_assembly/AssemblySettingsWidget.h index fee6323eb7fb77d49074b3aa3073c533bf764622..ee1689aa54dd7f21bdd3be9c3091d4c1b5f91dff 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblySettingsWidget.h +++ b/src/corelibs/U2View/src/ov_assembly/AssemblySettingsWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyVariantHint.cpp b/src/corelibs/U2View/src/ov_assembly/AssemblyVariantHint.cpp index 9dd12ee328cf115627ecd42c48bf3a0ab983c9da..d0eadc007e306fdf434c31927aef202fa4e7684b 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyVariantHint.cpp +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyVariantHint.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyVariantHint.h b/src/corelibs/U2View/src/ov_assembly/AssemblyVariantHint.h index 5ec6e42afac95a72fb6097c8c25cfa3cde1506a5..4458256de350f27f2db75c7bf366a04be23f57c6 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyVariantHint.h +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyVariantHint.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyVariantRow.cpp b/src/corelibs/U2View/src/ov_assembly/AssemblyVariantRow.cpp index ffd13d07f3f7d738a107cfc0ded886baa03e54ad..155086aaec655fffbbbe4f4d098812e060ddde34 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyVariantRow.cpp +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyVariantRow.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/AssemblyVariantRow.h b/src/corelibs/U2View/src/ov_assembly/AssemblyVariantRow.h index d56be36267189cb026b4ed7902cf9d3b28271662..694e81823a15cb387faba707cb49eb7627985528 100644 --- a/src/corelibs/U2View/src/ov_assembly/AssemblyVariantRow.h +++ b/src/corelibs/U2View/src/ov_assembly/AssemblyVariantRow.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/CalculateCoveragePerBaseTask.cpp b/src/corelibs/U2View/src/ov_assembly/CalculateCoveragePerBaseTask.cpp index a77b3865f856c3b626757075f8192c43aeaaf67f..0492792bc2a494d4b4d0b40c4cc3461a46ea653c 100644 --- a/src/corelibs/U2View/src/ov_assembly/CalculateCoveragePerBaseTask.cpp +++ b/src/corelibs/U2View/src/ov_assembly/CalculateCoveragePerBaseTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/CalculateCoveragePerBaseTask.h b/src/corelibs/U2View/src/ov_assembly/CalculateCoveragePerBaseTask.h index 05da1c6c371d3204d266263bb92797a5d925a3fe..756952c753a1016595972a62e1b5a09ae762704e 100644 --- a/src/corelibs/U2View/src/ov_assembly/CalculateCoveragePerBaseTask.h +++ b/src/corelibs/U2View/src/ov_assembly/CalculateCoveragePerBaseTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,6 +26,7 @@ #include <U2Core/U2Assembly.h> #include <U2Core/Task.h> +#include <U2Core/U2Region.h> #include <U2Core/U2Type.h> namespace U2 { @@ -41,8 +42,8 @@ public: class GetAssemblyLengthTask : public Task { Q_OBJECT public: - GetAssemblyLengthTask(const U2DbiRef &dbiRef, const U2DataId &assemblyId): - Task(tr("Get length of Assembly"), TaskFlag_None), dbiRef(dbiRef), assemblyId(assemblyId) { } + GetAssemblyLengthTask(const U2DbiRef &dbiRef, const U2DataId &assemblyId) : + Task(tr("Get length of Assembly"), TaskFlag_None), dbiRef(dbiRef), assemblyId(assemblyId) {} void run(); @@ -90,7 +91,7 @@ public: signals: void si_regionIsProcessed(qint64 startPos); -private slots: + private slots: private: const U2DbiRef dbiRef; diff --git a/src/corelibs/U2View/src/ov_assembly/CoverageInfo.cpp b/src/corelibs/U2View/src/ov_assembly/CoverageInfo.cpp index 03df38eeb724ac955d6d8e315c4c973b58909629..d13b44fb9f70e73b8ac7a39a5d01d463e76f38ed 100644 --- a/src/corelibs/U2View/src/ov_assembly/CoverageInfo.cpp +++ b/src/corelibs/U2View/src/ov_assembly/CoverageInfo.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/CoverageInfo.h b/src/corelibs/U2View/src/ov_assembly/CoverageInfo.h index bc76f6994fdf3b99f9dc9df4d8bc7dd9c6b50aff..abda23cc5e82a3de1da75640b53c716b1845bd36 100644 --- a/src/corelibs/U2View/src/ov_assembly/CoverageInfo.h +++ b/src/corelibs/U2View/src/ov_assembly/CoverageInfo.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/CoveredRegionsManager.cpp b/src/corelibs/U2View/src/ov_assembly/CoveredRegionsManager.cpp index 03d60fcb13ae96240a2acdaee597c689a359470f..2641c9975dbaa27cef755e46f79813bca81339a4 100644 --- a/src/corelibs/U2View/src/ov_assembly/CoveredRegionsManager.cpp +++ b/src/corelibs/U2View/src/ov_assembly/CoveredRegionsManager.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/CoveredRegionsManager.h b/src/corelibs/U2View/src/ov_assembly/CoveredRegionsManager.h index e3f603f51f3d48989ebd8e9920c22b0e302f6257..6dff777b1392386bfda3f651310eb244f3249d70 100644 --- a/src/corelibs/U2View/src/ov_assembly/CoveredRegionsManager.h +++ b/src/corelibs/U2View/src/ov_assembly/CoveredRegionsManager.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/ExportConsensusDialog.cpp b/src/corelibs/U2View/src/ov_assembly/ExportConsensusDialog.cpp index d2e2ca126599e7af074e6058ddf3b5b13384effd..300410274c6a951ed2b6ae56f883831dd8730cda 100644 --- a/src/corelibs/U2View/src/ov_assembly/ExportConsensusDialog.cpp +++ b/src/corelibs/U2View/src/ov_assembly/ExportConsensusDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -42,7 +42,7 @@ ExportConsensusDialog::ExportConsensusDialog(QWidget *p, const ExportConsensusTa saveController(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22055979"); + new HelpButton(this, buttonBox, "24742514"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Export")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); //hide for this dialog diff --git a/src/corelibs/U2View/src/ov_assembly/ExportConsensusDialog.h b/src/corelibs/U2View/src/ov_assembly/ExportConsensusDialog.h index 224a03e3935deadb13ae7314292be57d13d4dc05..af0774432270e77c6a001c92cbbc2dc86ea2321d 100644 --- a/src/corelibs/U2View/src/ov_assembly/ExportConsensusDialog.h +++ b/src/corelibs/U2View/src/ov_assembly/ExportConsensusDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/ExportConsensusTask.cpp b/src/corelibs/U2View/src/ov_assembly/ExportConsensusTask.cpp index ca67670921654dd750e268ac7af3a0e26a106b3f..528261751355c35fe452bb3cb1ce84e15df21c08 100644 --- a/src/corelibs/U2View/src/ov_assembly/ExportConsensusTask.cpp +++ b/src/corelibs/U2View/src/ov_assembly/ExportConsensusTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/ExportConsensusTask.h b/src/corelibs/U2View/src/ov_assembly/ExportConsensusTask.h index c76aa2b38257bb5d689b2880afdbd206cd359f01..9fb2102251927647668c28dbb54f64feb0fc8711 100644 --- a/src/corelibs/U2View/src/ov_assembly/ExportConsensusTask.h +++ b/src/corelibs/U2View/src/ov_assembly/ExportConsensusTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/ExportConsensusVariationsDialog.cpp b/src/corelibs/U2View/src/ov_assembly/ExportConsensusVariationsDialog.cpp index 65be5ea0da82e1bdfe76f310f187df6d85ddc0b4..12cd6e158642ad44db20d14400c0d5938e865c55 100644 --- a/src/corelibs/U2View/src/ov_assembly/ExportConsensusVariationsDialog.cpp +++ b/src/corelibs/U2View/src/ov_assembly/ExportConsensusVariationsDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -41,7 +41,7 @@ ExportConsensusVariationsDialog::ExportConsensusVariationsDialog(QWidget *p, con { setupUi(this); setWindowTitle(tr("Export Consensus Variations")); - new HelpButton(this, buttonBox, "22055981"); + new HelpButton(this, buttonBox, "24742516"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Export")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); //hide for this dialog diff --git a/src/corelibs/U2View/src/ov_assembly/ExportConsensusVariationsDialog.h b/src/corelibs/U2View/src/ov_assembly/ExportConsensusVariationsDialog.h index aaf8a4bf7aac2c115550491a97b9a79068b22834..f7f51d97cf2a3810f1ef54a9a4492c3da57184cf 100644 --- a/src/corelibs/U2View/src/ov_assembly/ExportConsensusVariationsDialog.h +++ b/src/corelibs/U2View/src/ov_assembly/ExportConsensusVariationsDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/ExportConsensusVariationsTask.cpp b/src/corelibs/U2View/src/ov_assembly/ExportConsensusVariationsTask.cpp index 6253f1804f657d381641ac5d5d8a712b1e3f3460..a7e3817a81b7fa358dbfb8657db3bcee02807795 100644 --- a/src/corelibs/U2View/src/ov_assembly/ExportConsensusVariationsTask.cpp +++ b/src/corelibs/U2View/src/ov_assembly/ExportConsensusVariationsTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/ExportConsensusVariationsTask.h b/src/corelibs/U2View/src/ov_assembly/ExportConsensusVariationsTask.h index 10742abc9fea42c7b6a195465fa10d447588f896..674d499d7e11ff46ea34f33d00e385b1439b2dca 100644 --- a/src/corelibs/U2View/src/ov_assembly/ExportConsensusVariationsTask.h +++ b/src/corelibs/U2View/src/ov_assembly/ExportConsensusVariationsTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/ExportCoverageDialog.cpp b/src/corelibs/U2View/src/ov_assembly/ExportCoverageDialog.cpp index 41cdfa090c795fac2b89bb487500408c33a5a8fc..35ae47a553fb67a1c26ab0548b5249e0d1cf97c9 100644 --- a/src/corelibs/U2View/src/ov_assembly/ExportCoverageDialog.cpp +++ b/src/corelibs/U2View/src/ov_assembly/ExportCoverageDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -97,7 +97,7 @@ void ExportCoverageDialog::sl_formatChanged(const QString &format) { void ExportCoverageDialog::initLayout() { buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Export")); - new HelpButton(this, buttonBox, "22055982"); + new HelpButton(this, buttonBox, "24742517"); gbAdditionalOptions->hide(); setMaximumHeight(layout()->minimumSize().height()); adjustSize(); diff --git a/src/corelibs/U2View/src/ov_assembly/ExportCoverageDialog.h b/src/corelibs/U2View/src/ov_assembly/ExportCoverageDialog.h index 3592f32d78a926d8a1f6d9bfc3f082fa4401d47e..ec0e5bd7d4b98d70794788a1a03f09ea1b5205cf 100644 --- a/src/corelibs/U2View/src/ov_assembly/ExportCoverageDialog.h +++ b/src/corelibs/U2View/src/ov_assembly/ExportCoverageDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/ExportCoverageTask.cpp b/src/corelibs/U2View/src/ov_assembly/ExportCoverageTask.cpp index 6f01fe5b7cf025b91e796fac9a69148e82d1c4cc..7e903dbefb788b43765f4748db757ff4ddda05aa 100644 --- a/src/corelibs/U2View/src/ov_assembly/ExportCoverageTask.cpp +++ b/src/corelibs/U2View/src/ov_assembly/ExportCoverageTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/ExportCoverageTask.h b/src/corelibs/U2View/src/ov_assembly/ExportCoverageTask.h index fee3b8df268ca6e5fa9be0ca9b1196e8b542f704..0d51527123a4024fbdd4811fd5e604bb62015cac 100644 --- a/src/corelibs/U2View/src/ov_assembly/ExportCoverageTask.h +++ b/src/corelibs/U2View/src/ov_assembly/ExportCoverageTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/ExportReadsDialog.cpp b/src/corelibs/U2View/src/ov_assembly/ExportReadsDialog.cpp index fcf9a2cca70449d167fa8272d596cb6baa8cce5f..1fd17d7cd4486a54feac12e6741a7df4b97bbd7f 100644 --- a/src/corelibs/U2View/src/ov_assembly/ExportReadsDialog.cpp +++ b/src/corelibs/U2View/src/ov_assembly/ExportReadsDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -40,7 +40,7 @@ namespace U2 { ExportReadsDialog::ExportReadsDialog(QWidget * p, const QList<DocumentFormatId> & formats) : QDialog(p) { setupUi(this); - new HelpButton(this, buttonBox, "22055977"); + new HelpButton(this, buttonBox, "24742512"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Export")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2View/src/ov_assembly/ExportReadsDialog.h b/src/corelibs/U2View/src/ov_assembly/ExportReadsDialog.h index e295936253a4df42cb6f02fa387a93724474a062..0f807045d1f822653b55c5b9fbe14da744f119dc 100644 --- a/src/corelibs/U2View/src/ov_assembly/ExportReadsDialog.h +++ b/src/corelibs/U2View/src/ov_assembly/ExportReadsDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/ExtractAssemblyRegionDialog.cpp b/src/corelibs/U2View/src/ov_assembly/ExtractAssemblyRegionDialog.cpp index 8ffca2266c99483962774fca81461a45fbac8fa5..55d0c8b8f253182694116d87b15471e0b35f5760 100644 --- a/src/corelibs/U2View/src/ov_assembly/ExtractAssemblyRegionDialog.cpp +++ b/src/corelibs/U2View/src/ov_assembly/ExtractAssemblyRegionDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -42,7 +42,7 @@ ExtractAssemblyRegionDialog::ExtractAssemblyRegionDialog(QWidget * p, ExtractAss , settings(settings) { setupUi(this); - new HelpButton(this, buttonBox, "22055983"); + new HelpButton(this, buttonBox, "24742518"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Export")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2View/src/ov_assembly/ExtractAssemblyRegionDialog.h b/src/corelibs/U2View/src/ov_assembly/ExtractAssemblyRegionDialog.h index 7e2909ce827e495121a7e68f2894f8b34acf95a9..0cfc67479f463f24acfc5dae17dac57edba27511 100644 --- a/src/corelibs/U2View/src/ov_assembly/ExtractAssemblyRegionDialog.h +++ b/src/corelibs/U2View/src/ov_assembly/ExtractAssemblyRegionDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/ExtractAssemblyRegionTask.cpp b/src/corelibs/U2View/src/ov_assembly/ExtractAssemblyRegionTask.cpp index 0774e42ac16f0a7454b99a62db75f59c13355af9..7310f744d4170c20d97fc14711e6fc64ed630257 100644 --- a/src/corelibs/U2View/src/ov_assembly/ExtractAssemblyRegionTask.cpp +++ b/src/corelibs/U2View/src/ov_assembly/ExtractAssemblyRegionTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/ExtractAssemblyRegionTask.h b/src/corelibs/U2View/src/ov_assembly/ExtractAssemblyRegionTask.h index 513afdcea7b69781058f90b634b1ed049578d510..cccaeeb319fa4cf94bb091a9856fdc8b1eddc1cc 100644 --- a/src/corelibs/U2View/src/ov_assembly/ExtractAssemblyRegionTask.h +++ b/src/corelibs/U2View/src/ov_assembly/ExtractAssemblyRegionTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/ZoomableAssemblyOverview.cpp b/src/corelibs/U2View/src/ov_assembly/ZoomableAssemblyOverview.cpp index 5dfdd63febfbf86f6f9405dc7e9dfce0d5bceaa6..67301b2a5e28cbfbdb475bd04e9471ffc427a3f2 100644 --- a/src/corelibs/U2View/src/ov_assembly/ZoomableAssemblyOverview.cpp +++ b/src/corelibs/U2View/src/ov_assembly/ZoomableAssemblyOverview.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_assembly/ZoomableAssemblyOverview.h b/src/corelibs/U2View/src/ov_assembly/ZoomableAssemblyOverview.h index 96de848443e99c991cdfb58ed2394bc19b5f236a..791e190a4941234097b58a1c419da0647d30bb94 100644 --- a/src/corelibs/U2View/src/ov_assembly/ZoomableAssemblyOverview.h +++ b/src/corelibs/U2View/src/ov_assembly/ZoomableAssemblyOverview.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/AlignSequencesToAlignment/AlignSequencesToAlignmentTask.cpp b/src/corelibs/U2View/src/ov_msa/AlignSequencesToAlignment/AlignSequencesToAlignmentTask.cpp index 31227c3089ae1bdc59eb62b50c0e5fc59a351f1f..11d18e8b40c06b32b464751059eefbef016742b5 100644 --- a/src/corelibs/U2View/src/ov_msa/AlignSequencesToAlignment/AlignSequencesToAlignmentTask.cpp +++ b/src/corelibs/U2View/src/ov_msa/AlignSequencesToAlignment/AlignSequencesToAlignmentTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/AlignSequencesToAlignment/AlignSequencesToAlignmentTask.h b/src/corelibs/U2View/src/ov_msa/AlignSequencesToAlignment/AlignSequencesToAlignmentTask.h index 79f44175993984d87ab8126dfe525a37b679b57e..b2cec133c06f482083d3539080b0c37a35f65670 100644 --- a/src/corelibs/U2View/src/ov_msa/AlignSequencesToAlignment/AlignSequencesToAlignmentTask.h +++ b/src/corelibs/U2View/src/ov_msa/AlignSequencesToAlignment/AlignSequencesToAlignmentTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/AlignmentLogo.cpp b/src/corelibs/U2View/src/ov_msa/AlignmentLogo.cpp index 55d5f4d6194c1a0a2b23532ec99626029cbf9e2d..d7a8224c101ef82ec2cbc00df30a85a791f71c88 100644 --- a/src/corelibs/U2View/src/ov_msa/AlignmentLogo.cpp +++ b/src/corelibs/U2View/src/ov_msa/AlignmentLogo.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/AlignmentLogo.h b/src/corelibs/U2View/src/ov_msa/AlignmentLogo.h index 36bc5c838a1329e26121534f7d39518e206ed0d5..e9cdc657e379bfc3f83b6e31eb45d5430c46d90a 100644 --- a/src/corelibs/U2View/src/ov_msa/AlignmentLogo.h +++ b/src/corelibs/U2View/src/ov_msa/AlignmentLogo.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Clipboard/SubalignmentToClipboardTask.cpp b/src/corelibs/U2View/src/ov_msa/Clipboard/SubalignmentToClipboardTask.cpp index a698eb582aa72d6fd364278e03b57492b895d147..db8e0e0565b307f2e34a91ad01cb2f139d5ff21b 100644 --- a/src/corelibs/U2View/src/ov_msa/Clipboard/SubalignmentToClipboardTask.cpp +++ b/src/corelibs/U2View/src/ov_msa/Clipboard/SubalignmentToClipboardTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -208,7 +208,7 @@ void RichTextMsaClipboardTask::run(){ for (int pos = window.startPos; pos < window.endPos(); pos++){ char c = row->charAt(pos); bool highlight = false; - QColor color = colorScheme->getColor(seq, pos, c); + QColor color = colorScheme->getBackgroundColor(seq, pos, c); if (isGapsScheme || highlightingScheme->getFactory()->isRefFree()) { //schemes which applied without reference const char refChar = '\n'; highlightingScheme->process(refChar, c, color, highlight, pos, seq); diff --git a/src/corelibs/U2View/src/ov_msa/Clipboard/SubalignmentToClipboardTask.h b/src/corelibs/U2View/src/ov_msa/Clipboard/SubalignmentToClipboardTask.h index 9613b1b06453a916e742f7b0ebf015b5583c556e..0b272027bc8468a4a16ecaa4cb0d2ec032c3e40e 100644 --- a/src/corelibs/U2View/src/ov_msa/Clipboard/SubalignmentToClipboardTask.h +++ b/src/corelibs/U2View/src/ov_msa/Clipboard/SubalignmentToClipboardTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/ColorSchemaDialogController.cpp b/src/corelibs/U2View/src/ov_msa/ColorSchemaDialogController.cpp index 6103bca92e1c50d74d5dd3e6c377cceac192f621..203a31976fe428822f03b75fb61126820746fe7b 100644 --- a/src/corelibs/U2View/src/ov_msa/ColorSchemaDialogController.cpp +++ b/src/corelibs/U2View/src/ov_msa/ColorSchemaDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -21,7 +21,6 @@ #include <QColorDialog> #include <QPainter> -#include <QPushButton> #include <U2Algorithm/ColorSchemeUtils.h> @@ -48,7 +47,7 @@ ColorSchemaDialogController::ColorSchemaDialogController(QMap<char, QColor>& col int ColorSchemaDialogController::adjustAlphabetColors(){ setupUi(this); - new HelpButton(this, buttonBox, "22055912"); + new HelpButton(this, buttonBox, "24742447"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); alphabetColorsView = new QPixmap(alphabetColorsFrame->size()); @@ -178,7 +177,7 @@ void ColorSchemaDialogController::mouseReleaseEvent(QMouseEvent * event){ CreateColorSchemaDialog::CreateColorSchemaDialog(ColorSchemeData* _newSchema, QStringList _usedNames) : usedNames(_usedNames), newSchema(_newSchema) { setupUi(this); - new HelpButton(this, buttonBox, "22055912"); + new HelpButton(this, buttonBox, "24742447"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Create")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2View/src/ov_msa/ColorSchemaDialogController.h b/src/corelibs/U2View/src/ov_msa/ColorSchemaDialogController.h index caefaaf685ff6dcc61dd7d7c1615ddff92b62172..840f39601c0e404c32c9288918861b970f2b684f 100644 --- a/src/corelibs/U2View/src/ov_msa/ColorSchemaDialogController.h +++ b/src/corelibs/U2View/src/ov_msa/ColorSchemaDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/ColorSchemaSettingsController.cpp b/src/corelibs/U2View/src/ov_msa/ColorSchemaSettingsController.cpp index ad6fd8102080a9f351ef6041c076240ca47c31ea..6e702086b966fc72f2e95a7a3fcc5c912c4b40f4 100644 --- a/src/corelibs/U2View/src/ov_msa/ColorSchemaSettingsController.cpp +++ b/src/corelibs/U2View/src/ov_msa/ColorSchemaSettingsController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -92,7 +92,7 @@ static void setSchemaColors(const ColorSchemeData& customSchema){ } -const QString ColorSchemaSettingsPageController::helpPageId = QString("22055814"); +const QString ColorSchemaSettingsPageController::helpPageId = QString("24742349"); ColorSchemaSettingsPageController::ColorSchemaSettingsPageController(MsaColorSchemeRegistry* mcsr, QObject* p) : AppSettingsGUIPageController(tr("Alignment Color Scheme"), ColorSchemaSettingsPageId, p) { diff --git a/src/corelibs/U2View/src/ov_msa/ColorSchemaSettingsController.h b/src/corelibs/U2View/src/ov_msa/ColorSchemaSettingsController.h index d509b9c6594ee4ca81ab23375ba2a010fe78c5f7..3348feac0eac798b7ce04d15653ff1bf874228b0 100644 --- a/src/corelibs/U2View/src/ov_msa/ColorSchemaSettingsController.h +++ b/src/corelibs/U2View/src/ov_msa/ColorSchemaSettingsController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,7 +34,7 @@ const QString ColorSchemaSettingsPageId = "ColorSchemaSettings"; class U2VIEW_EXPORT ColorSchemaSettingsPageController : public AppSettingsGUIPageController { Q_OBJECT public: - ColorSchemaSettingsPageController(MsaColorSchemeRegistry* mcsr, QObject* p = NULL); + ColorSchemaSettingsPageController(MsaColorSchemeRegistry* mcsr, QObject* p = nullptr); virtual AppSettingsGUIPageState* getSavedState(); @@ -42,7 +42,7 @@ public: virtual AppSettingsGUIPageWidget* createWidget(AppSettingsGUIPageState* data); - const QString& getHelpPageId() const {return helpPageId;}; + const QString& getHelpPageId() const { return helpPageId; }; signals: void si_customSettingsChanged(); diff --git a/src/corelibs/U2View/src/ov_msa/Common/RefSeqCommonWidget.cpp b/src/corelibs/U2View/src/ov_msa/Common/RefSeqCommonWidget.cpp index d2a0dedd5bd2a13f3158363e354254ca54b94551..9aec36591576ec80303053190eb2ff8ce3691236 100644 --- a/src/corelibs/U2View/src/ov_msa/Common/RefSeqCommonWidget.cpp +++ b/src/corelibs/U2View/src/ov_msa/Common/RefSeqCommonWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Common/RefSeqCommonWidget.h b/src/corelibs/U2View/src/ov_msa/Common/RefSeqCommonWidget.h index c20bff68136d54b6d9140aba62b512fc4c2c2f3e..19612a4ae9a0d94027ae4d6c76560cbd6630bbbb 100644 --- a/src/corelibs/U2View/src/ov_msa/Common/RefSeqCommonWidget.h +++ b/src/corelibs/U2View/src/ov_msa/Common/RefSeqCommonWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/CreateSubalignmentDialogController.cpp b/src/corelibs/U2View/src/ov_msa/CreateSubalignmentDialogController.cpp index a372db9c31010ff722c432bab30e7df4dbc549ef..b6af3f926e35f548622f1a9f71de553072ffd693 100644 --- a/src/corelibs/U2View/src/ov_msa/CreateSubalignmentDialogController.cpp +++ b/src/corelibs/U2View/src/ov_msa/CreateSubalignmentDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -46,10 +46,12 @@ namespace U2{ +#define ROW_ID_PROPERTY "row-id" + CreateSubalignmentDialogController::CreateSubalignmentDialogController(MultipleSequenceAlignmentObject *_mobj, const QRect& selection, QWidget *p) : QDialog(p), mobj(_mobj), saveController(NULL){ setupUi(this); - new HelpButton(this, buttonBox, "22055942"); + new HelpButton(this, buttonBox, "24742477"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Extract")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -96,7 +98,9 @@ CreateSubalignmentDialogController::CreateSubalignmentDialogController(MultipleS endLineEdit->setText(QString::number(endPos)); for (int i=0; i<rowNumber; i++) { - QCheckBox *cb = new QCheckBox(mobj->getMsa()->getMsaRow(i)->getName(), this); + MultipleSequenceAlignmentRow row = mobj->getMsa()->getMsaRow(i); + QCheckBox *cb = new QCheckBox(row->getName(), this); + cb->setProperty(ROW_ID_PROPERTY, row.data()->getRowId()); cb->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); if ( (i >= startSeq) && (i <= endSeq)) { cb->setChecked(true); @@ -124,10 +128,6 @@ U2Region CreateSubalignmentDialogController::getRegion() { return window; } -QStringList CreateSubalignmentDialogController::getSelectedSeqNames() { - return selectedNames; -} - void CreateSubalignmentDialogController::sl_allButtonClicked(){ for (int i=0; i<sequencesTableWidget->rowCount(); i++) { QCheckBox *cb = qobject_cast<QCheckBox*>(sequencesTableWidget->cellWidget(i, 0)); @@ -226,9 +226,9 @@ void CreateSubalignmentDialogController::accept(){ return; } - selectSeqNames(); + updateSelectedRowIds(); - if(selectedNames.size() == 0){ + if (selectedRowIds.empty()) { QMessageBox::critical(this, this->windowTitle(), tr("You must select at least one sequence")); return; } @@ -243,15 +243,15 @@ bool CreateSubalignmentDialogController::getAddToProjFlag() { return addToProjBox->isChecked(); } -void CreateSubalignmentDialogController::selectSeqNames(){ - QStringList names; +void CreateSubalignmentDialogController::updateSelectedRowIds() { + selectedRowIds.clear(); for (int i=0; i<sequencesTableWidget->rowCount(); i++) { QCheckBox *cb = qobject_cast<QCheckBox*>(sequencesTableWidget->cellWidget(i, 0)); if(cb->isChecked()){ - names.append(cb->text()); + qint64 rowId = (qint64) cb->property(ROW_ID_PROPERTY).toLongLong(); + selectedRowIds << rowId; } } - selectedNames = names; } diff --git a/src/corelibs/U2View/src/ov_msa/CreateSubalignmentDialogController.h b/src/corelibs/U2View/src/ov_msa/CreateSubalignmentDialogController.h index c90606a682857c4c82e6d8fdafc01824fe823de2..789f2b29dfb249dd49466f2ac9d19559cab7ea59 100644 --- a/src/corelibs/U2View/src/ov_msa/CreateSubalignmentDialogController.h +++ b/src/corelibs/U2View/src/ov_msa/CreateSubalignmentDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -43,7 +43,7 @@ public: QString getSavePath(); DocumentFormatId getFormatId(); U2Region getRegion(); - QStringList getSelectedSeqNames(); + const QList<qint64>& getSelectedRowIds() const { return selectedRowIds;} private slots: @@ -54,11 +54,11 @@ private slots: private: void initSaveController(); - void selectSeqNames(); + void updateSelectedRowIds(); MultipleSequenceAlignmentObject *mobj; U2Region window; - QStringList selectedNames; + QList<qint64> selectedRowIds; SaveDocumentController* saveController; }; diff --git a/src/corelibs/U2View/src/ov_msa/DeleteGapsDialog.cpp b/src/corelibs/U2View/src/ov_msa/DeleteGapsDialog.cpp index ec1da774aeb49fd900f428f319522ff6ea180b8a..efa7747085110d72db2a05a8098ed96c0a461fe6 100644 --- a/src/corelibs/U2View/src/ov_msa/DeleteGapsDialog.cpp +++ b/src/corelibs/U2View/src/ov_msa/DeleteGapsDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ namespace U2 { DeleteGapsDialog::DeleteGapsDialog(QWidget* parent, int rowNum): QDialog(parent), ui(new Ui_DeleteGapsDialog()) { ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22055925"); + new HelpButton(this, ui->buttonBox, "24742460"); ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Remove")); ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2View/src/ov_msa/DeleteGapsDialog.h b/src/corelibs/U2View/src/ov_msa/DeleteGapsDialog.h index cf3e544d57767f315a152ba899d892d5cbc2531c..8a563b2dfc02ef0c89d53cf3f034f606efe92b29 100644 --- a/src/corelibs/U2View/src/ov_msa/DeleteGapsDialog.h +++ b/src/corelibs/U2View/src/ov_msa/DeleteGapsDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Export/MSAImageExportTask.cpp b/src/corelibs/U2View/src/ov_msa/Export/MSAImageExportTask.cpp index 22eeb329f6d5549a4646027d496df52bdaa8a190..af55453fc433058ca50306c60ce0c688d6e057a9 100644 --- a/src/corelibs/U2View/src/ov_msa/Export/MSAImageExportTask.cpp +++ b/src/corelibs/U2View/src/ov_msa/Export/MSAImageExportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Export/MSAImageExportTask.h b/src/corelibs/U2View/src/ov_msa/Export/MSAImageExportTask.h index 2629f77df3032fe731bb5fad5d3bb540b9746a7c..49b48430268374edfe40c83682dc63d8099989e4 100644 --- a/src/corelibs/U2View/src/ov_msa/Export/MSAImageExportTask.h +++ b/src/corelibs/U2View/src/ov_msa/Export/MSAImageExportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/ExportConsensus/MaExportConsensusTabFactory.cpp b/src/corelibs/U2View/src/ov_msa/ExportConsensus/MaExportConsensusTabFactory.cpp index d8a2c164d4b10ed0c38aea7c807e94a91b6215f0..92bcbd242f592ef44d87f517642b4d119f102753 100644 --- a/src/corelibs/U2View/src/ov_msa/ExportConsensus/MaExportConsensusTabFactory.cpp +++ b/src/corelibs/U2View/src/ov_msa/ExportConsensus/MaExportConsensusTabFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/ExportConsensus/MaExportConsensusTabFactory.h b/src/corelibs/U2View/src/ov_msa/ExportConsensus/MaExportConsensusTabFactory.h index 3bf393a9ac86fc3d6df8d0f0c8327f36f347a6b0..c1af160826ada0b339e490db585693d02e52aa4c 100644 --- a/src/corelibs/U2View/src/ov_msa/ExportConsensus/MaExportConsensusTabFactory.h +++ b/src/corelibs/U2View/src/ov_msa/ExportConsensus/MaExportConsensusTabFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/ExportConsensus/MaExportConsensusWidget.cpp b/src/corelibs/U2View/src/ov_msa/ExportConsensus/MaExportConsensusWidget.cpp index cc3a405b08d5fc2ea41960c22836c18c5d5ea1bb..5c670421b24c8ba39353740de5686f56143b04bd 100644 --- a/src/corelibs/U2View/src/ov_msa/ExportConsensus/MaExportConsensusWidget.cpp +++ b/src/corelibs/U2View/src/ov_msa/ExportConsensus/MaExportConsensusWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -69,8 +69,8 @@ MaExportConsensusWidget::MaExportConsensusWidget(MaEditor* ma_, QWidget *parent) connect(exportBtn, SIGNAL(clicked()), SLOT(sl_exportClicked())); connect(consensusArea, SIGNAL(si_consensusAlgorithmChanged(const QString &)), SLOT(sl_consensusChanged(const QString &))); - U2WidgetStateStorage::restoreWidgetState(savableWidget); + sl_consensusChanged(consensusArea->getConsensusAlgorithm()->getId()); } @@ -88,9 +88,12 @@ void MaExportConsensusWidget::sl_exportClicked(){ settings.url = saveController->getSaveFileName(); settings.algorithm = ma->getUI()->getConsensusArea()->getConsensusAlgorithm()->clone(); - Task *t = new ExportMaConsensusTask(settings); - TaskWatchdog::trackResourceExistence(ma->getMaObject(), t, tr("A problem occurred during export consensus. The multiple alignment is no more available.")); - AppContext::getTaskScheduler()->registerTopLevelTask(t); + ExportMaConsensusTask* exportTask = new ExportMaConsensusTask(settings); + connect(exportTask, SIGNAL(si_stateChanged()), this, SLOT(sl_exportTaskStateChanged())); + exportTaskUrls << exportTask->getConsensusUrl(); + TaskWatchdog::trackResourceExistence(ma->getMaObject(), exportTask, tr("A problem occurred during export consensus. The multiple alignment is no more available.")); + AppContext::getTaskScheduler()->registerTopLevelTask(exportTask); + saveController->forceRoll(exportTaskUrls); } void MaExportConsensusWidget::showHint( bool showHint ){ @@ -128,6 +131,15 @@ void MaExportConsensusWidget::sl_consensusChanged(const QString& algoId) { } } +void MaExportConsensusWidget::sl_exportTaskStateChanged() { + ExportMaConsensusTask* exportTask = qobject_cast<ExportMaConsensusTask*>(sender()); + SAFE_POINT(exportTask != NULL, "ExportMaConsensusTask object is unexpectedly NULL", ); + + if (exportTask->getState() == Task::State_Finished) { + exportTaskUrls.remove(exportTask->getConsensusUrl()); + } +} + void MaExportConsensusWidget::initSaveController() { SaveDocumentControllerConfig config; config.defaultFileName = getDefaultFilePath(); @@ -149,4 +161,5 @@ QString MaExportConsensusWidget::getDefaultFilePath() const { return GUrlUtils::getDefaultDataPath() + "/" + ma->getMaObject()->getGObjectName() + "_consensus.txt"; } + } diff --git a/src/corelibs/U2View/src/ov_msa/ExportConsensus/MaExportConsensusWidget.h b/src/corelibs/U2View/src/ov_msa/ExportConsensus/MaExportConsensusWidget.h index 3f63b63e6876bf30a48adb82983a70f78f588374..0bfb4e079bdb5acc326bd7b88f7d067df749150e 100644 --- a/src/corelibs/U2View/src/ov_msa/ExportConsensus/MaExportConsensusWidget.h +++ b/src/corelibs/U2View/src/ov_msa/ExportConsensus/MaExportConsensusWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,6 +30,7 @@ namespace U2 { class MaEditor; class SaveDocumentController; +class ExportMaConsensusTask; class MaExportConsensusWidget : public QWidget, private Ui_ExportConsensusWidget { Q_OBJECT @@ -41,6 +42,7 @@ public: private slots: void sl_exportClicked(); void sl_consensusChanged(const QString& algoId); + void sl_exportTaskStateChanged(); private: void initSaveController(); @@ -49,6 +51,7 @@ private: MaEditor *ma; U2SavableWidget savableWidget; SaveDocumentController *saveController; + QSet<QString> exportTaskUrls; }; } // namespace diff --git a/src/corelibs/U2View/src/ov_msa/ExportHighlightedDialogController.cpp b/src/corelibs/U2View/src/ov_msa/ExportHighlightedDialogController.cpp index 87e82723d0abf8f7f7302b64f54375b36ddd90a3..6c78933724f801a3ea3ce47667d08568e99b14d2 100644 --- a/src/corelibs/U2View/src/ov_msa/ExportHighlightedDialogController.cpp +++ b/src/corelibs/U2View/src/ov_msa/ExportHighlightedDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -45,7 +45,7 @@ ExportHighligtingDialogController::ExportHighligtingDialogController(MaEditorWgt ui(new Ui_ExportHighlightedDialog()) { ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22055917"); + new HelpButton(this, ui->buttonBox, "24742452"); ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Export")); ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2View/src/ov_msa/ExportHighlightedDialogController.h b/src/corelibs/U2View/src/ov_msa/ExportHighlightedDialogController.h index 65eb5bbe50613320c12826e23a92fc4862e018c1..90f6dcaf20d5cab838c2e6177842be5b1dc55272 100644 --- a/src/corelibs/U2View/src/ov_msa/ExportHighlightedDialogController.h +++ b/src/corelibs/U2View/src/ov_msa/ExportHighlightedDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/ExportSequencesTask.cpp b/src/corelibs/U2View/src/ov_msa/ExportSequencesTask.cpp index ca7504fd8ec7e57763f6e16fd2befe43988f5dde..2335dbf1a241106cb9abac747f166e1b9ce891f4 100644 --- a/src/corelibs/U2View/src/ov_msa/ExportSequencesTask.cpp +++ b/src/corelibs/U2View/src/ov_msa/ExportSequencesTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -43,41 +43,27 @@ namespace U2 { -PrepareSequenceObjectsTask::PrepareSequenceObjectsTask(const MultipleSequenceAlignment& msa, const QStringList& seqNames, bool trimGaps) : Task(tr("Prepare sequences"), TaskFlag_None), +PrepareSequenceObjectsTask::PrepareSequenceObjectsTask(const MultipleSequenceAlignment& msa, const QSet<qint64>& rowIds, bool trimGaps) + : Task(tr("Prepare sequences"), TaskFlag_None), msa(msa), - seqNames(seqNames), + rowIds(rowIds), trimGaps(trimGaps) {} void PrepareSequenceObjectsTask::run() { - foreach(const DNASequence &s, MSAUtils::ma2seq(msa,trimGaps)) { - if (!seqNames.contains(s.getName())) { - continue; - } - CHECK_OP(stateInfo, ); - sequences.append(s); - } -} - -QList<DNASequence> PrepareSequenceObjectsTask::getSequences() const { - return sequences; + sequences = MSAUtils::ma2seq(msa, trimGaps, rowIds); } -ExportSequencesTask::ExportSequencesTask(const MultipleSequenceAlignment& msa, const QStringList& seqNames, bool trimGaps, bool addToProjectFlag, +ExportSequencesTask::ExportSequencesTask(const MultipleSequenceAlignment& msa, const QSet<qint64>& rowIds, bool trimGaps, bool addToProjectFlag, const QString& dirUrl, const DocumentFormatId& format, const QString& extension, const QString& customFileName) : Task(tr("Export selected sequences from alignment"), TaskFlags_NR_FOSE_COSC), - msa(msa), - seqNames(seqNames), - trimGaps(trimGaps), addToProjectFlag(addToProjectFlag), dirUrl(dirUrl), format(format), extension(extension), customFileName(customFileName), prepareObjectsTask(NULL) -{} - -void ExportSequencesTask::prepare() { - prepareObjectsTask = new PrepareSequenceObjectsTask(msa, seqNames, trimGaps); +{ + prepareObjectsTask = new PrepareSequenceObjectsTask(msa, rowIds, trimGaps); addSubTask(prepareObjectsTask); } @@ -88,7 +74,7 @@ QList<Task*> ExportSequencesTask::onSubTaskFinished(Task* subTask) { if (subTask == prepareObjectsTask) { QList<Task*> tasks; QSet<QString> existingFilenames; - foreach(DNASequence s, prepareObjectsTask->getSequences()) { + foreach(const DNASequence& s, prepareObjectsTask->getSequences()) { CHECK_OP(stateInfo, res); QString filename; if (customFileName.isEmpty()) { diff --git a/src/corelibs/U2View/src/ov_msa/ExportSequencesTask.h b/src/corelibs/U2View/src/ov_msa/ExportSequencesTask.h index 7186ceab50cfe55c09574ddf239fa46a6e12f7a5..112d34a3cf8031b0f309944fdd742068993a14bf 100644 --- a/src/corelibs/U2View/src/ov_msa/ExportSequencesTask.h +++ b/src/corelibs/U2View/src/ov_msa/ExportSequencesTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,6 +22,7 @@ #ifndef _U2_EXPORT_SEQUENCES_TASK #define _U2_EXPORT_SEQUENCES_TASK +#include <QSet> #include <U2Core/DNASequence.h> #include <U2Core/MultipleSequenceAlignment.h> #include <U2Core/Task.h> @@ -30,30 +31,28 @@ namespace U2 { class PrepareSequenceObjectsTask : public Task { public: - PrepareSequenceObjectsTask(const MultipleSequenceAlignment& msa, const QStringList& seqNames, bool trimGaps); + PrepareSequenceObjectsTask(const MultipleSequenceAlignment& msa, const QSet<qint64>& rowIds, bool trimGaps); void run(); - QList<DNASequence> getSequences() const; + const QList<DNASequence>& getSequences() const {return sequences;} private: - const MultipleSequenceAlignment msa; - QStringList seqNames; + MultipleSequenceAlignment msa; + QSet<qint64> rowIds; bool trimGaps; QList<DNASequence> sequences; }; class ExportSequencesTask : public Task { public: - ExportSequencesTask(const MultipleSequenceAlignment& msa, const QStringList& seqNames, bool trimGaps, bool addToProjectFlag, + ExportSequencesTask(const MultipleSequenceAlignment& msa, const QSet<qint64>& rowIds, bool trimGaps, bool addToProjectFlag, const QString& dirUrl, const DocumentFormatId& format, const QString& extension, const QString& customFileName = QString()); - void prepare(); protected: QList<Task*> onSubTaskFinished(Task* subTask); private: - const MultipleSequenceAlignment msa; - QStringList seqNames; - bool trimGaps; + MultipleSequenceAlignment msa; + QList<qint64> rowIds; bool addToProjectFlag; QString dirUrl; DocumentFormatId format; diff --git a/src/corelibs/U2View/src/ov_msa/General/MSAGeneralTab.cpp b/src/corelibs/U2View/src/ov_msa/General/MSAGeneralTab.cpp index bc3aa5b92492e4ceb9e91cf93f296eefb87aa3de..eb843677f00d14662380a5a9c27ab11ccb175510 100644 --- a/src/corelibs/U2View/src/ov_msa/General/MSAGeneralTab.cpp +++ b/src/corelibs/U2View/src/ov_msa/General/MSAGeneralTab.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/General/MSAGeneralTab.h b/src/corelibs/U2View/src/ov_msa/General/MSAGeneralTab.h index 2ce83e35674c460dbb366ff8f08670f07df574d9..205f1ce219569970360a263f32a599a1682d2185 100644 --- a/src/corelibs/U2View/src/ov_msa/General/MSAGeneralTab.h +++ b/src/corelibs/U2View/src/ov_msa/General/MSAGeneralTab.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/General/MSAGeneralTabFactory.cpp b/src/corelibs/U2View/src/ov_msa/General/MSAGeneralTabFactory.cpp index 1801d65bfbfab1e2e8f9acc86718a7ab2aa09e24..568d09a2b48ca7e6a84307088351198da1e99136 100644 --- a/src/corelibs/U2View/src/ov_msa/General/MSAGeneralTabFactory.cpp +++ b/src/corelibs/U2View/src/ov_msa/General/MSAGeneralTabFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,7 +33,7 @@ namespace U2 { const QString MSAGeneralTabFactory::GROUP_ID = "OP_MSA_GENERAL"; const QString MSAGeneralTabFactory::GROUP_ICON_STR = ":core/images/settings2.png"; -const QString MSAGeneralTabFactory::GROUP_DOC_PAGE = "22055915"; +const QString MSAGeneralTabFactory::GROUP_DOC_PAGE = "24742450"; MSAGeneralTabFactory::MSAGeneralTabFactory() { objectViewOfWidget = ObjViewType_AlignmentEditor; diff --git a/src/corelibs/U2View/src/ov_msa/General/MSAGeneralTabFactory.h b/src/corelibs/U2View/src/ov_msa/General/MSAGeneralTabFactory.h index 006d97eaf543d41cbc407df1ffd68216e0546afa..ee17fd686928bdd41e4d89a1e57739d11831e602 100644 --- a/src/corelibs/U2View/src/ov_msa/General/MSAGeneralTabFactory.h +++ b/src/corelibs/U2View/src/ov_msa/General/MSAGeneralTabFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/General/MaConsensusModeWidget.cpp b/src/corelibs/U2View/src/ov_msa/General/MaConsensusModeWidget.cpp index 1a6bb12b69ef74eeedff3b3a8f9960ec184b0860..e4bb6dd9692fe0ca6bcb850b5890d9528b427c7e 100644 --- a/src/corelibs/U2View/src/ov_msa/General/MaConsensusModeWidget.cpp +++ b/src/corelibs/U2View/src/ov_msa/General/MaConsensusModeWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/General/MaConsensusModeWidget.h b/src/corelibs/U2View/src/ov_msa/General/MaConsensusModeWidget.h index 761c34f9e22a74533c9c3a559f2b8e29e6d792b6..89f9674ef27efa85a1c0f3f54e17697c3ae0c3b9 100644 --- a/src/corelibs/U2View/src/ov_msa/General/MaConsensusModeWidget.h +++ b/src/corelibs/U2View/src/ov_msa/General/MaConsensusModeWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/General/McaGeneralTab.cpp b/src/corelibs/U2View/src/ov_msa/General/McaGeneralTab.cpp index cd85a4b82efd49ca532f0a71d87e655b8b71aa8f..e1fe6e10c0e86d57e2af7945af716b70827b3ac3 100644 --- a/src/corelibs/U2View/src/ov_msa/General/McaGeneralTab.cpp +++ b/src/corelibs/U2View/src/ov_msa/General/McaGeneralTab.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/General/McaGeneralTab.h b/src/corelibs/U2View/src/ov_msa/General/McaGeneralTab.h index cd79fdbcef2764a52ec6d97e6ef08a5e636bcb8d..0b6c99200af829eba6c52daa8066d9e1d613427d 100644 --- a/src/corelibs/U2View/src/ov_msa/General/McaGeneralTab.h +++ b/src/corelibs/U2View/src/ov_msa/General/McaGeneralTab.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/General/McaGeneralTabFactory.cpp b/src/corelibs/U2View/src/ov_msa/General/McaGeneralTabFactory.cpp index 267e2740a117be8ae4c843ee251690d5cf6f4654..3f92b25b34510faa49770324095796bdf7f69dae 100644 --- a/src/corelibs/U2View/src/ov_msa/General/McaGeneralTabFactory.cpp +++ b/src/corelibs/U2View/src/ov_msa/General/McaGeneralTabFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ namespace U2 { const QString McaGeneralTabFactory::GROUP_ID = "OP_MCA_GENERAL"; const QString McaGeneralTabFactory::GROUP_ICON_STR = ":core/images/settings2.png"; -const QString McaGeneralTabFactory::GROUP_DOC_PAGE = "22056169"; +const QString McaGeneralTabFactory::GROUP_DOC_PAGE = "24742704"; McaGeneralTabFactory::McaGeneralTabFactory() { objectViewOfWidget = ObjViewType_ChromAlignmentEditor; diff --git a/src/corelibs/U2View/src/ov_msa/General/McaGeneralTabFactory.h b/src/corelibs/U2View/src/ov_msa/General/McaGeneralTabFactory.h index 9c7219e58fe0afbd05dcc918d316f2173416c5dc..7b167291c2c4e8b4cb345510d16c5a218d36ebf1 100644 --- a/src/corelibs/U2View/src/ov_msa/General/McaGeneralTabFactory.h +++ b/src/corelibs/U2View/src/ov_msa/General/McaGeneralTabFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Highlighting/MSAHighlightingTab.cpp b/src/corelibs/U2View/src/ov_msa/Highlighting/MSAHighlightingTab.cpp index 115141240d63738e240acbe316456e55eaba159b..0a59a55eb45114f72f272fa8c47cacaea6cf1cbb 100644 --- a/src/corelibs/U2View/src/ov_msa/Highlighting/MSAHighlightingTab.cpp +++ b/src/corelibs/U2View/src/ov_msa/Highlighting/MSAHighlightingTab.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -21,6 +21,7 @@ #include <QCheckBox> #include <QComboBox> +#include <QDoubleSpinBox> #include <QLabel> #include <QRadioButton> #include <QStandardItemModel> @@ -73,8 +74,33 @@ QWidget* MSAHighlightingTab::createColorGroup() { colorSchemeController->getComboBox()->setObjectName("colorScheme"); colorSchemeController->getComboBox()->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength); - layout->addSpacing(TITLE_SPACING); + colorThresholdLabel = new QLabel(tr("Threshold")); + + colorThresholdSlider = new QSlider(Qt::Horizontal, this); + colorThresholdSlider->setMinimum(1); + colorThresholdSlider->setMaximum(999); + colorThresholdSlider->setValue(500); + colorThresholdSlider->setObjectName("colorThresholdSlider"); + + colorSpinBox = new QDoubleSpinBox(); + colorSpinBox->setMinimum(0.1); + colorSpinBox->setMaximum(99.9); + colorSpinBox->setSingleStep(0.1); + colorSpinBox->setValue(50.0); + colorSpinBox->setDecimals(1); + colorSpinBox->setObjectName("colorSpinBox"); + + QHBoxLayout* horizontalLayout = new QHBoxLayout(); + horizontalLayout->addWidget(colorThresholdSlider); + horizontalLayout->addWidget(colorSpinBox); + horizontalLayout->setSpacing(10); + layout->addWidget(colorSchemeController->getComboBox()); + layout->addSpacing(TITLE_SPACING); + layout->addSpacing(TITLE_SPACING); + layout->addWidget(colorThresholdLabel); + layout->addLayout(horizontalLayout); + layout->addSpacing(ITEMS_SPACING); return group; @@ -113,20 +139,20 @@ QWidget* MSAHighlightingTab::createHighlightingGroup() { thresholdMoreRb->setObjectName("thresholdMoreRb"); thresholdLessRb->setObjectName("thresholdLessRb"); - thresholdSlider = new QSlider(Qt::Horizontal, this); - thresholdSlider->setMinimum(0); - thresholdSlider->setMaximum(100); - thresholdSlider->setValue(50); - thresholdSlider->setTickPosition(QSlider::TicksRight); - thresholdSlider->setObjectName("thresholdSlider"); + highlightingThresholdSlider = new QSlider(Qt::Horizontal, this); + highlightingThresholdSlider->setMinimum(0); + highlightingThresholdSlider->setMaximum(100); + highlightingThresholdSlider->setValue(50); + highlightingThresholdSlider->setTickPosition(QSlider::TicksRight); + highlightingThresholdSlider->setObjectName("thresholdSlider"); - thresholdLabel = new QLabel(tr("Threshold: %1%").arg(thresholdSlider->value()), this); + thresholdLabel = new QLabel(tr("Threshold: %1%").arg(highlightingThresholdSlider->value()), this); layout->setSpacing(ITEMS_SPACING); layout->addSpacing(TITLE_SPACING); layout->addWidget(highlightingSchemeController->getComboBox()); layout->addWidget(thresholdLabel); - layout->addWidget(thresholdSlider); + layout->addWidget(highlightingThresholdSlider); layout->addWidget(lessMoreLabel); layout->addWidget(thresholdLessRb); layout->addWidget(thresholdMoreRb); @@ -157,9 +183,11 @@ MSAHighlightingTab::MSAHighlightingTab(MSAEditor* m) seqArea = msa->getUI()->getSequenceArea(); savableTab.disableSavingForWidgets(QStringList() - << thresholdSlider->objectName() + << highlightingThresholdSlider->objectName() << highlightingSchemeController->getComboBox()->objectName() - << colorSchemeController->getComboBox()->objectName()); + << colorSchemeController->getComboBox()->objectName() + << colorThresholdSlider->objectName() + << colorSpinBox->objectName()); U2WidgetStateStorage::restoreWidgetState(savableTab); sl_sync(); @@ -177,8 +205,14 @@ MSAHighlightingTab::MSAHighlightingTab(MSAEditor* m) connect(m->getMaObject(), SIGNAL(si_alphabetChanged(MaModificationInfo, const DNAAlphabet *)), SLOT(sl_refreshSchemes())); connect(highlightingSchemeController->getComboBox(), SIGNAL(currentIndexChanged(const QString &)), SLOT(sl_updateHint())); + connect(colorSchemeController->getComboBox(), SIGNAL(currentIndexChanged(const QString&)), SLOT(sl_updateColorSchemeWidgets())); connect(exportHighlightning, SIGNAL(clicked()), SLOT(sl_exportHighlightningClicked())); - connect(thresholdSlider, SIGNAL(valueChanged(int)), SLOT(sl_highlightingParametersChanged())); + + connect(colorThresholdSlider, SIGNAL(valueChanged(int)), SLOT(sl_colorParametersChanged())); + connect(colorSpinBox, SIGNAL(valueChanged(double)), SLOT(sl_colorParametersChanged())); + connect(this, SIGNAL(si_colorSchemeChanged()), seqArea, SLOT(sl_completeRedraw())); + + connect(highlightingThresholdSlider, SIGNAL(valueChanged(int)), SLOT(sl_highlightingParametersChanged())); connect(thresholdMoreRb, SIGNAL(toggled(bool)), SLOT(sl_highlightingParametersChanged())); connect(thresholdLessRb, SIGNAL(toggled(bool)), SLOT(sl_highlightingParametersChanged())); @@ -208,6 +242,7 @@ void MSAHighlightingTab::sl_sync() { useDots->blockSignals(false); sl_updateHint(); + sl_updateColorSchemeWidgets(); } void MSAHighlightingTab::sl_updateHint() { @@ -217,14 +252,14 @@ void MSAHighlightingTab::sl_updateHint() { QVariantMap highlightingSettings; if(s->getFactory()->isNeedThreshold()){ thresholdLabel->show(); - thresholdSlider->show(); + highlightingThresholdSlider->show(); thresholdLessRb->show(); thresholdMoreRb->show(); lessMoreLabel->show(); bool ok = false; int thresholdValue = s->getSettings().value(MsaHighlightingScheme::THRESHOLD_PARAMETER_NAME).toInt(&ok); assert(ok); - thresholdSlider->setValue(thresholdValue); + highlightingThresholdSlider->setValue(thresholdValue); bool lessThenThreshold = s->getSettings().value(MsaHighlightingScheme::LESS_THAN_THRESHOLD_PARAMETER_NAME, thresholdLessRb->isChecked()).toBool(); thresholdLessRb->setChecked(lessThenThreshold); thresholdMoreRb->setChecked(!lessThenThreshold); @@ -232,7 +267,7 @@ void MSAHighlightingTab::sl_updateHint() { highlightingSettings.insert(MsaHighlightingScheme::LESS_THAN_THRESHOLD_PARAMETER_NAME, lessThenThreshold); }else{ thresholdLabel->hide(); - thresholdSlider->hide(); + highlightingThresholdSlider->hide(); thresholdLessRb->hide(); thresholdMoreRb->hide(); lessMoreLabel->hide(); @@ -260,15 +295,57 @@ void MSAHighlightingTab::sl_updateHint() { s->applySettings(highlightingSettings); } +void MSAHighlightingTab::sl_updateColorSchemeWidgets() { + MsaColorScheme* currentColorScheme = seqArea->getCurrentColorScheme(); + SAFE_POINT(currentColorScheme != NULL, "Current Color Scheme is NULL!", ); + + const MsaColorSchemeFactory* factory = currentColorScheme->getFactory(); + SAFE_POINT(factory != NULL, "Current Color Scheme factory is NULL!", ); + + if (factory->isThresholdNeeded()) { + colorThresholdLabel->show(); + colorThresholdSlider->show(); + colorSpinBox->show(); + } else { + colorThresholdLabel->hide(); + colorThresholdSlider->hide(); + colorSpinBox->hide(); + } +} + void MSAHighlightingTab::sl_exportHighlightningClicked(){ msa->exportHighlighted(); } +void MSAHighlightingTab::sl_colorParametersChanged() { + QSignalBlocker thresholdBlocker(colorThresholdSlider); + Q_UNUSED(thresholdBlocker); + QSignalBlocker spinBoxBlocker(colorSpinBox); + Q_UNUSED(spinBoxBlocker); + + double thresholdValue = colorSpinBox->value(); + if (sender() == colorThresholdSlider) { + int sliderValue = colorThresholdSlider->value(); + thresholdValue = double(sliderValue) / 10; + colorSpinBox->setValue(thresholdValue); + } else if (sender() == colorSpinBox) { + int sliderNewValue = int(thresholdValue * 10); + colorThresholdSlider->setValue(sliderNewValue); + } + MsaColorScheme* currentColorScheme = seqArea->getCurrentColorScheme(); + SAFE_POINT(currentColorScheme != NULL, "Current Color Scheme is NULL!", ); + + QVariantMap settings; + settings.insert(MsaColorScheme::THRESHOLD_PARAMETER_NAME, thresholdValue); + currentColorScheme->applySettings(settings); + emit si_colorSchemeChanged(); +} + void MSAHighlightingTab::sl_highlightingParametersChanged() { QVariantMap highlightingSettings; - thresholdLabel->setText(tr("Threshold: %1%").arg(thresholdSlider->value())); + thresholdLabel->setText(tr("Threshold: %1%").arg(highlightingThresholdSlider->value())); MsaHighlightingScheme *s = seqArea->getCurrentHighlightingScheme(); - highlightingSettings.insert(MsaHighlightingScheme::THRESHOLD_PARAMETER_NAME, thresholdSlider->value()); + highlightingSettings.insert(MsaHighlightingScheme::THRESHOLD_PARAMETER_NAME, highlightingThresholdSlider->value()); highlightingSettings.insert(MsaHighlightingScheme::LESS_THAN_THRESHOLD_PARAMETER_NAME, thresholdLessRb->isChecked()); s->applySettings(highlightingSettings); seqArea->sl_changeColorSchemeOutside(colorSchemeController->getComboBox()->currentData().toString()); diff --git a/src/corelibs/U2View/src/ov_msa/Highlighting/MSAHighlightingTab.h b/src/corelibs/U2View/src/ov_msa/Highlighting/MSAHighlightingTab.h index 88b70c1b5c6b0e2b8b0881b6bc48d0cc4f9123dd..83590f2af03a227b5fd276c556824f4c33cc8160 100644 --- a/src/corelibs/U2View/src/ov_msa/Highlighting/MSAHighlightingTab.h +++ b/src/corelibs/U2View/src/ov_msa/Highlighting/MSAHighlightingTab.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -31,6 +31,7 @@ class QCheckBox; class QComboBox; +class QDoubleSpinBox; class QGroupBox; class QLabel; class QRadioButton; @@ -52,11 +53,16 @@ class U2VIEW_EXPORT MSAHighlightingTab : public QWidget public: MSAHighlightingTab(MSAEditor* msa); +signals: + void si_colorSchemeChanged(); + private slots: void sl_sync(); void sl_updateHint(); + void sl_updateColorSchemeWidgets(); void sl_exportHighlightningClicked(); + void sl_colorParametersChanged(); void sl_highlightingParametersChanged(); void sl_refreshSchemes(); @@ -71,8 +77,13 @@ private: QLabel *hint; QCheckBox *useDots; QToolButton *exportHighlightning; + + QLabel* colorThresholdLabel; + QSlider* colorThresholdSlider; + QDoubleSpinBox* colorSpinBox; + QLabel *thresholdLabel; - QSlider *thresholdSlider; + QSlider *highlightingThresholdSlider; QLabel *lessMoreLabel; QRadioButton *thresholdLessRb; QRadioButton *thresholdMoreRb; diff --git a/src/corelibs/U2View/src/ov_msa/Highlighting/MSAHighlightingTabFactory.cpp b/src/corelibs/U2View/src/ov_msa/Highlighting/MSAHighlightingTabFactory.cpp index 313ff82d2f57e394fc2f5445c0a383096ea817b0..9a5b46691fc11b6fd22e6093b32d75aff0dc725b 100644 --- a/src/corelibs/U2View/src/ov_msa/Highlighting/MSAHighlightingTabFactory.cpp +++ b/src/corelibs/U2View/src/ov_msa/Highlighting/MSAHighlightingTabFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -31,7 +31,7 @@ namespace U2 { const QString MSAHighlightingFactory::GROUP_ID = "OP_MSA_HIGHLIGHTING"; const QString MSAHighlightingFactory::GROUP_ICON_STR = ":core/images/highlight.png"; -const QString MSAHighlightingFactory::GROUP_DOC_PAGE = "22055917"; +const QString MSAHighlightingFactory::GROUP_DOC_PAGE = "24742452"; MSAHighlightingFactory::MSAHighlightingFactory() { objectViewOfWidget = ObjViewType_AlignmentEditor; diff --git a/src/corelibs/U2View/src/ov_msa/Highlighting/MSAHighlightingTabFactory.h b/src/corelibs/U2View/src/ov_msa/Highlighting/MSAHighlightingTabFactory.h index 1bca61eb3e8a8eccd0ef64fb4b36f6a86eee2f88..2f91023012b013ff65e1d584900aee7fb4f569a2 100644 --- a/src/corelibs/U2View/src/ov_msa/Highlighting/MSAHighlightingTabFactory.h +++ b/src/corelibs/U2View/src/ov_msa/Highlighting/MSAHighlightingTabFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Highlighting/MsaHighlightingSavableTab.cpp b/src/corelibs/U2View/src/ov_msa/Highlighting/MsaHighlightingSavableTab.cpp index 66b6424e6599bbe0f1fbb37658479f0062021f1a..2d954f292b5ec0a61170a9136610ef2abee4fdee 100644 --- a/src/corelibs/U2View/src/ov_msa/Highlighting/MsaHighlightingSavableTab.cpp +++ b/src/corelibs/U2View/src/ov_msa/Highlighting/MsaHighlightingSavableTab.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Highlighting/MsaHighlightingSavableTab.h b/src/corelibs/U2View/src/ov_msa/Highlighting/MsaHighlightingSavableTab.h index d4bad83949498db1f8093df45c15adc56b822ef3..5b6f95c28ec0a129c8e648d48ab88156ed9994da 100644 --- a/src/corelibs/U2View/src/ov_msa/Highlighting/MsaHighlightingSavableTab.h +++ b/src/corelibs/U2View/src/ov_msa/Highlighting/MsaHighlightingSavableTab.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Highlighting/MsaSchemeComboBoxController.h b/src/corelibs/U2View/src/ov_msa/Highlighting/MsaSchemeComboBoxController.h index b5fa4ea76a1ec353315551278787aa20d92bebb1..b0b84f86d15768190729e39ad677942132ea8bfc 100644 --- a/src/corelibs/U2View/src/ov_msa/Highlighting/MsaSchemeComboBoxController.h +++ b/src/corelibs/U2View/src/ov_msa/Highlighting/MsaSchemeComboBoxController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Highlighting/MsaSchemesMenuBuilder.cpp b/src/corelibs/U2View/src/ov_msa/Highlighting/MsaSchemesMenuBuilder.cpp index 62703f6fb5aa099f15eaa5d8ffdd7011660dd7df..75fcb798a17fb396005e6165e656a8e669cebc3d 100644 --- a/src/corelibs/U2View/src/ov_msa/Highlighting/MsaSchemesMenuBuilder.cpp +++ b/src/corelibs/U2View/src/ov_msa/Highlighting/MsaSchemesMenuBuilder.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Highlighting/MsaSchemesMenuBuilder.h b/src/corelibs/U2View/src/ov_msa/Highlighting/MsaSchemesMenuBuilder.h index e5a59a3a8f5963230ad70dad7364a7f67283211f..a685439fff6ce805acf0a635442976649533dd13 100644 --- a/src/corelibs/U2View/src/ov_msa/Highlighting/MsaSchemesMenuBuilder.h +++ b/src/corelibs/U2View/src/ov_msa/Highlighting/MsaSchemesMenuBuilder.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MSACollapsibleModel.cpp b/src/corelibs/U2View/src/ov_msa/MSACollapsibleModel.cpp index 7dece5071caa085811acf4e64316d831dd52a969..2d8b5d5d770e222b3a2a4af039a2c12de4e949a5 100644 --- a/src/corelibs/U2View/src/ov_msa/MSACollapsibleModel.cpp +++ b/src/corelibs/U2View/src/ov_msa/MSACollapsibleModel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MSACollapsibleModel.h b/src/corelibs/U2View/src/ov_msa/MSACollapsibleModel.h index 513c18a0986ec6e61d3c9389fd71438005cb78f3..295f03594dbd0c27c4dfcd35b3ca4ed15dfa4e3b 100644 --- a/src/corelibs/U2View/src/ov_msa/MSACollapsibleModel.h +++ b/src/corelibs/U2View/src/ov_msa/MSACollapsibleModel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MSAEditor.cpp b/src/corelibs/U2View/src/ov_msa/MSAEditor.cpp index 5a24ff6852d3be5faf60db22f9b1e69c5a2e22bc..38b3d0cf7ed7af5b9d032b7111c92c3b4a5680a1 100644 --- a/src/corelibs/U2View/src/ov_msa/MSAEditor.cpp +++ b/src/corelibs/U2View/src/ov_msa/MSAEditor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -197,8 +197,8 @@ QWidget* MSAEditor::createWidget() { alignAction->setObjectName("Align"); connect(alignAction, SIGNAL(triggered()), this, SLOT(sl_align())); - alignSequencesToAlignmentAction = new QAction(QIcon(":/core/images/add_to_alignment.png"), tr("Align sequence to this alignment"), this); - alignSequencesToAlignmentAction->setObjectName("Align sequence to this alignment"); + alignSequencesToAlignmentAction = new QAction(QIcon(":/core/images/add_to_alignment.png"), tr("Align sequence(s) to this alignment"), this); + alignSequencesToAlignmentAction->setObjectName("Align sequence(s) to this alignment"); connect(alignSequencesToAlignmentAction, SIGNAL(triggered()), this, SLOT(sl_addToAlignment())); setAsReferenceSequenceAction = new QAction(tr("Set this sequence as reference"), this); diff --git a/src/corelibs/U2View/src/ov_msa/MSAEditor.h b/src/corelibs/U2View/src/ov_msa/MSAEditor.h index bd9135353c7cdf3fd69bfbdc456870f99ab5555b..aa9ae9e0db4e2e55546171e4724f1aae187bf13c 100644 --- a/src/corelibs/U2View/src/ov_msa/MSAEditor.h +++ b/src/corelibs/U2View/src/ov_msa/MSAEditor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MSAEditorConsensusArea.cpp b/src/corelibs/U2View/src/ov_msa/MSAEditorConsensusArea.cpp index 0dda8f9b680d86044f9b0411a16cd6c0cdc891fe..771438b2386584a316b23964e99391928f611016 100644 --- a/src/corelibs/U2View/src/ov_msa/MSAEditorConsensusArea.cpp +++ b/src/corelibs/U2View/src/ov_msa/MSAEditorConsensusArea.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MSAEditorConsensusArea.h b/src/corelibs/U2View/src/ov_msa/MSAEditorConsensusArea.h index 89c86b678a468ffce93f53c8ec81dd5db41eba2a..3da32e2450918e04dc6c5324d9e104884bb2ffff 100644 --- a/src/corelibs/U2View/src/ov_msa/MSAEditorConsensusArea.h +++ b/src/corelibs/U2View/src/ov_msa/MSAEditorConsensusArea.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MSAEditorConsensusCache.cpp b/src/corelibs/U2View/src/ov_msa/MSAEditorConsensusCache.cpp index 9f7f52c5075fac8c5312b39238d344f34fc8cbd5..20a07d3272aa8fd46e71f4500281fd3cfbafa7e0 100644 --- a/src/corelibs/U2View/src/ov_msa/MSAEditorConsensusCache.cpp +++ b/src/corelibs/U2View/src/ov_msa/MSAEditorConsensusCache.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MSAEditorConsensusCache.h b/src/corelibs/U2View/src/ov_msa/MSAEditorConsensusCache.h index f5201da670a952689fa623b1a147a7a65594ee9f..64495f2aab9d4e85a703d6cb8a139626d2361421 100644 --- a/src/corelibs/U2View/src/ov_msa/MSAEditorConsensusCache.h +++ b/src/corelibs/U2View/src/ov_msa/MSAEditorConsensusCache.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MSAEditorOffsetsView.cpp b/src/corelibs/U2View/src/ov_msa/MSAEditorOffsetsView.cpp index 97cea24bb96dd08dc8bbcbb42ea4744d703f388c..b7b3a1f6282af17fb887a137075397833368c741 100644 --- a/src/corelibs/U2View/src/ov_msa/MSAEditorOffsetsView.cpp +++ b/src/corelibs/U2View/src/ov_msa/MSAEditorOffsetsView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MSAEditorOffsetsView.h b/src/corelibs/U2View/src/ov_msa/MSAEditorOffsetsView.h index 588d4f3bb2160aae5459ee558af8960bf21d9697..eac30e285e04fb2609587e6dca70033a9f3c7178 100644 --- a/src/corelibs/U2View/src/ov_msa/MSAEditorOffsetsView.h +++ b/src/corelibs/U2View/src/ov_msa/MSAEditorOffsetsView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MSAEditorOverviewArea.cpp b/src/corelibs/U2View/src/ov_msa/MSAEditorOverviewArea.cpp index a410b259f90b75dc149480d61b638be989f8de71..0ddd7b5e2c37f3b01305fa55b13102fa24e86e95 100644 --- a/src/corelibs/U2View/src/ov_msa/MSAEditorOverviewArea.cpp +++ b/src/corelibs/U2View/src/ov_msa/MSAEditorOverviewArea.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MSAEditorOverviewArea.h b/src/corelibs/U2View/src/ov_msa/MSAEditorOverviewArea.h index 1dedb785c1d67c5698ed6bf88d910cddd18b18ab..8b963820359bd1df11002e4ca6402736e34ab89e 100644 --- a/src/corelibs/U2View/src/ov_msa/MSAEditorOverviewArea.h +++ b/src/corelibs/U2View/src/ov_msa/MSAEditorOverviewArea.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MSAEditorSequenceArea.cpp b/src/corelibs/U2View/src/ov_msa/MSAEditorSequenceArea.cpp index e1d8ab27fdf5bb3407ba5faebceb45135c83768c..e0c68af4b05b301f5ed06bd6ea7d2a82c0c4e7d5 100644 --- a/src/corelibs/U2View/src/ov_msa/MSAEditorSequenceArea.cpp +++ b/src/corelibs/U2View/src/ov_msa/MSAEditorSequenceArea.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -283,7 +283,7 @@ void MSAEditorSequenceArea::updateCollapsedGroups(const MaModificationInfo& modI void MSAEditorSequenceArea::sl_buildStaticToolbar(GObjectView* v, QToolBar* t) { Q_UNUSED(v); - + t->addAction(ui->getUndoAction()); t->addAction(ui->getRedoAction()); t->addAction(gotoAction); @@ -570,27 +570,19 @@ void MSAEditorSequenceArea::sl_createSubaligniment(){ U2Region window = dialog->getRegion(); bool addToProject = dialog->getAddToProjFlag(); QString path = dialog->getSavePath(); - QStringList seqNames = dialog->getSelectedSeqNames(); + QList<qint64> rowIds = dialog->getSelectedRowIds(); Task* csTask = new CreateSubalignmentAndOpenViewTask(getEditor()->getMaObject(), - CreateSubalignmentSettings(window, seqNames, path, true, addToProject, dialog->getFormatId())); + CreateSubalignmentSettings(window, rowIds, path, true, addToProject, dialog->getFormatId())); AppContext::getTaskScheduler()->registerTopLevelTask(csTask); } } void MSAEditorSequenceArea::sl_saveSequence(){ CHECK(getEditor() != NULL, ); - QStringList seqNames; - MultipleAlignment ma = editor->getMaObject()->getMultipleAlignment(); - QRect selection = editor->getCurrentSelection(); - int startSeq = selection.y(); - int endSeq = selection.y() + selection.height() - 1; - MSACollapsibleItemModel *model = editor->getUI()->getCollapseModel(); - for (int i = startSeq; i <= endSeq; i++) { - seqNames.append(ma->getRow(model->mapToRow(i))->getName()); - } - QObjectScopedPointer<SaveSelectedSequenceFromMSADialogController> d = new SaveSelectedSequenceFromMSADialogController(editor->getMaObject()->getDocument()->getURL().dirPath(), - (QWidget*)AppContext::getMainWindow()->getQMainWindow(), seqNames, editor->getMaObject()->getGObjectName() + "_sequence"); + QWidget* parentWidget = (QWidget*)AppContext::getMainWindow()->getQMainWindow(); + QString suggestedFileName = editor->getMaObject()->getGObjectName() + "_sequence"; + QObjectScopedPointer<SaveSelectedSequenceFromMSADialogController> d = new SaveSelectedSequenceFromMSADialogController(parentWidget, suggestedFileName); const int rc = d->exec(); CHECK(!d.isNull(), ); @@ -601,7 +593,19 @@ void MSAEditorSequenceArea::sl_saveSequence(){ SAFE_POINT(df != NULL, "Unknown document format", ); QString extension = df->getSupportedDocumentFileExtensions().first(); - AppContext::getTaskScheduler()->registerTopLevelTask(new ExportSequencesTask(getEditor()->getMaObject()->getMsa(), seqNames, d->getTrimGapsFlag(), d->getAddToProjectFlag(), d->getUrl(), d->getFormat(), extension, d->getCustomFileName())); + const QRect& selection = editor->getCurrentSelection(); + int startSeq = selection.y(); + int endSeq = selection.y() + selection.height() - 1; + MSACollapsibleItemModel *model = editor->getUI()->getCollapseModel(); + const MultipleAlignment& ma = editor->getMaObject()->getMultipleAlignment(); + QSet<qint64> seqIds; + for (int i = startSeq; i <= endSeq; i++) { + seqIds.insert(ma->getRow(model->mapToRow(i))->getRowId()); + } + ExportSequencesTask* exportTask = new ExportSequencesTask(getEditor()->getMaObject()->getMsa(), seqIds, d->getTrimGapsFlag(), + d->getAddToProjectFlag(), d->getUrl(), d->getFormat(), extension, + d->getCustomFileName()); + AppContext::getTaskScheduler()->registerTopLevelTask(exportTask); } void MSAEditorSequenceArea::sl_modelChanged() { diff --git a/src/corelibs/U2View/src/ov_msa/MSAEditorSequenceArea.h b/src/corelibs/U2View/src/ov_msa/MSAEditorSequenceArea.h index 6a1e410dfc4e944aff061c1ba0c0afe3f1eedcc9..d93b5a0aa752eb4a8ac82730a800324ce38ab356 100644 --- a/src/corelibs/U2View/src/ov_msa/MSAEditorSequenceArea.h +++ b/src/corelibs/U2View/src/ov_msa/MSAEditorSequenceArea.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MSASelectSubalignmentDialog.cpp b/src/corelibs/U2View/src/ov_msa/MSASelectSubalignmentDialog.cpp index d1bb54cb8775b3a61f936f8354e6cb1a51874f37..5cc49f592a1f286f621897fb69926d7e9422ddd8 100644 --- a/src/corelibs/U2View/src/ov_msa/MSASelectSubalignmentDialog.cpp +++ b/src/corelibs/U2View/src/ov_msa/MSASelectSubalignmentDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -119,7 +119,7 @@ void SelectSubalignmentDialog::init() { SAFE_POINT(editor != NULL, tr("Ma Editor is NULL"), ); setupUi(this); - new HelpButton(this, buttonBox, "22055943"); + new HelpButton(this, buttonBox, "24742478"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Select")); connect(allButton, SIGNAL(clicked()), SLOT(sl_allButtonClicked())); diff --git a/src/corelibs/U2View/src/ov_msa/MSASelectSubalignmentDialog.h b/src/corelibs/U2View/src/ov_msa/MSASelectSubalignmentDialog.h index 2157c952a0fdfd201d02876fd5583c217c176671..527050dcfb075ba719f2d80bfc8bc3470611848d 100644 --- a/src/corelibs/U2View/src/ov_msa/MSASelectSubalignmentDialog.h +++ b/src/corelibs/U2View/src/ov_msa/MSASelectSubalignmentDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MaConsensusMismatchController.cpp b/src/corelibs/U2View/src/ov_msa/MaConsensusMismatchController.cpp index 9f6225235aef0c873131d58dcd4ca42aca89c3c7..856868a0a7cf41d9a9849756906efd827b02024f 100644 --- a/src/corelibs/U2View/src/ov_msa/MaConsensusMismatchController.cpp +++ b/src/corelibs/U2View/src/ov_msa/MaConsensusMismatchController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MaConsensusMismatchController.h b/src/corelibs/U2View/src/ov_msa/MaConsensusMismatchController.h index d7f248d56099f5937dc7b508b6eb8d03a9cae9cc..ae703aef5f922e35e7f3fb433e365237e2c732e4 100644 --- a/src/corelibs/U2View/src/ov_msa/MaConsensusMismatchController.h +++ b/src/corelibs/U2View/src/ov_msa/MaConsensusMismatchController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MaEditor.cpp b/src/corelibs/U2View/src/ov_msa/MaEditor.cpp index 9d5c553beb04f10ade9d2f9360b951ef9ddc3fb8..121f2bcb464ca642797a0ca31bcf1cdd7d8e023e 100644 --- a/src/corelibs/U2View/src/ov_msa/MaEditor.cpp +++ b/src/corelibs/U2View/src/ov_msa/MaEditor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MaEditor.h b/src/corelibs/U2View/src/ov_msa/MaEditor.h index b3ef50b61d808bcdbba4432b96abb3298959453a..ac7ca7edae2b6ddbe901d1666a137b57e04d98cd 100644 --- a/src/corelibs/U2View/src/ov_msa/MaEditor.h +++ b/src/corelibs/U2View/src/ov_msa/MaEditor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MaEditorConsensusAreaSettings.cpp b/src/corelibs/U2View/src/ov_msa/MaEditorConsensusAreaSettings.cpp index 813dfb9c427268a221558913c99544746a22092a..92270e9095ef21912766dac7a188342c26c1daf2 100644 --- a/src/corelibs/U2View/src/ov_msa/MaEditorConsensusAreaSettings.cpp +++ b/src/corelibs/U2View/src/ov_msa/MaEditorConsensusAreaSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MaEditorConsensusAreaSettings.h b/src/corelibs/U2View/src/ov_msa/MaEditorConsensusAreaSettings.h index f0e29f3023b25ef346cb5b2a57fd3234d5d4801c..e903afc5ab0025d902d28f1bfd283994c1b8e751 100644 --- a/src/corelibs/U2View/src/ov_msa/MaEditorConsensusAreaSettings.h +++ b/src/corelibs/U2View/src/ov_msa/MaEditorConsensusAreaSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MaEditorFactory.cpp b/src/corelibs/U2View/src/ov_msa/MaEditorFactory.cpp index e466abc22ccd012d2cc44d144ce98978d00292b8..aed8d74b4c1f4afe9419ac28bc1b981ee33585af 100644 --- a/src/corelibs/U2View/src/ov_msa/MaEditorFactory.cpp +++ b/src/corelibs/U2View/src/ov_msa/MaEditorFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MaEditorFactory.h b/src/corelibs/U2View/src/ov_msa/MaEditorFactory.h index 8c81be2107c902a5ae2a617af294ce1ba62013e1..6592536ed0d15afda9aa089231f6029ca3dc57a6 100644 --- a/src/corelibs/U2View/src/ov_msa/MaEditorFactory.h +++ b/src/corelibs/U2View/src/ov_msa/MaEditorFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MaEditorNameList.cpp b/src/corelibs/U2View/src/ov_msa/MaEditorNameList.cpp index d01e747e622955343e873022f76fa938588c81a6..18574636d781e98d8bdb9321cae94b837c04fdec 100644 --- a/src/corelibs/U2View/src/ov_msa/MaEditorNameList.cpp +++ b/src/corelibs/U2View/src/ov_msa/MaEditorNameList.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MaEditorNameList.h b/src/corelibs/U2View/src/ov_msa/MaEditorNameList.h index ab0d83b33a441ef0ff33ca437e75c64915fdc0fe..e881ffa14c9fad8f27cbd53b2b60c9fccd11c629 100644 --- a/src/corelibs/U2View/src/ov_msa/MaEditorNameList.h +++ b/src/corelibs/U2View/src/ov_msa/MaEditorNameList.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MaEditorState.cpp b/src/corelibs/U2View/src/ov_msa/MaEditorState.cpp index 44832538a582c3e3698ed83118397caeec5f044c..071d4f360e7ff14d48b4fe6413941d985f4d5d4f 100644 --- a/src/corelibs/U2View/src/ov_msa/MaEditorState.cpp +++ b/src/corelibs/U2View/src/ov_msa/MaEditorState.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MaEditorState.h b/src/corelibs/U2View/src/ov_msa/MaEditorState.h index 953cfabf308ca504dbb621120756e35b71651358..acc54761683d0cf9a4f2e31c4830045827fcace1 100644 --- a/src/corelibs/U2View/src/ov_msa/MaEditorState.h +++ b/src/corelibs/U2View/src/ov_msa/MaEditorState.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MaEditorStatusBar.cpp b/src/corelibs/U2View/src/ov_msa/MaEditorStatusBar.cpp index 0f6708f823f927854d4e872fe9ebf82383474edf..b690bd28bfb614928a5cfc2e6a6fa3b7806f4536 100644 --- a/src/corelibs/U2View/src/ov_msa/MaEditorStatusBar.cpp +++ b/src/corelibs/U2View/src/ov_msa/MaEditorStatusBar.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -108,8 +108,6 @@ void MaEditorStatusBar::sl_lockStateChanged() { updateLock(); } -static const QString NONE_SELECTION = QObject::tr("none"); - QPair<QString, QString> MaEditorStatusBar::getGappedPositionInfo(const QPoint& pos) const{ if (pos.isNull()) { return QPair<QString, QString>(NONE_MARK, NONE_MARK); @@ -161,13 +159,13 @@ void MaEditorStatusBar::updateSelectionLabel() { MaEditorSelection selection = seqArea->getSelection(); QString selSize; if (selection.isEmpty()) { - selSize = NONE_SELECTION; + selSize = QObject::tr("none"); } else { selSize = QString::number(selection.width()) + "x" + QString::number(selection.height()); } QFontMetrics fm(lineLabel->font(),this); int maxSelLength = fm.width(selectionPattern.arg(QString::number(aliObj->getLength()) + "x" + QString::number( aliObj->getNumRows()))); - int nonSelLength = fm.width(selectionPattern.arg(NONE_SELECTION)); + int nonSelLength = fm.width(selectionPattern.arg(QObject::tr("none"))); selectionLabel->update(selSize, 10 + qMax(maxSelLength, nonSelLength)); } diff --git a/src/corelibs/U2View/src/ov_msa/MaEditorStatusBar.h b/src/corelibs/U2View/src/ov_msa/MaEditorStatusBar.h index f0945c99181bb7911cedcb228ff0c749dcf9ee58..5eddfb4ec456ac6ea140b870d73114c1021f2de5 100644 --- a/src/corelibs/U2View/src/ov_msa/MaEditorStatusBar.h +++ b/src/corelibs/U2View/src/ov_msa/MaEditorStatusBar.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MaEditorTasks.cpp b/src/corelibs/U2View/src/ov_msa/MaEditorTasks.cpp index 87c0428c2bdb3adedbabb244b218294895a91065..196ee76087b116c07da3b7d20484db4538b18831 100644 --- a/src/corelibs/U2View/src/ov_msa/MaEditorTasks.cpp +++ b/src/corelibs/U2View/src/ov_msa/MaEditorTasks.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -286,6 +286,10 @@ void ExportMaConsensusTask::prepare(){ addSubTask(extractConsensus); } +const QString& ExportMaConsensusTask::getConsensusUrl() const { + return settings.url; +} + QList<Task*> ExportMaConsensusTask::onSubTaskFinished( Task* subTask ){ QList<Task*> result; if(subTask == extractConsensus && !isCanceled() && !hasError()) { diff --git a/src/corelibs/U2View/src/ov_msa/MaEditorTasks.h b/src/corelibs/U2View/src/ov_msa/MaEditorTasks.h index 1c081569c48d68d70896839c21919abbd67b1d31..4b61e4afbe55a1a64b4992821e932c735c8e38fd 100644 --- a/src/corelibs/U2View/src/ov_msa/MaEditorTasks.h +++ b/src/corelibs/U2View/src/ov_msa/MaEditorTasks.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -135,8 +135,11 @@ public: ExportMaConsensusTask(const ExportMaConsensusTaskSettings& s); void prepare(); + const QString& getConsensusUrl() const; + protected: QList<Task*> onSubTaskFinished(Task* subTask); + private: Document* createDocument(); diff --git a/src/corelibs/U2View/src/ov_msa/McaEditor.cpp b/src/corelibs/U2View/src/ov_msa/McaEditor.cpp index a3b5c2f1e66745db441c78be69e22146788f6c01..3685f89f19d3f19428012ecce2e074b3d43b35a2 100644 --- a/src/corelibs/U2View/src/ov_msa/McaEditor.cpp +++ b/src/corelibs/U2View/src/ov_msa/McaEditor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/McaEditor.h b/src/corelibs/U2View/src/ov_msa/McaEditor.h index 93e25cf2f2bdbc28b9241dcad3cc6669ef0b0721..408fee1e01c656dbf6248b286e450fd863ac6dcc 100644 --- a/src/corelibs/U2View/src/ov_msa/McaEditor.h +++ b/src/corelibs/U2View/src/ov_msa/McaEditor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/McaEditorConsensusArea.cpp b/src/corelibs/U2View/src/ov_msa/McaEditorConsensusArea.cpp index 94cead1efb0f796112ce43021bfef51d3d878cf7..0ba7e530c7b335b3373871419ffcd040bdad6b19 100644 --- a/src/corelibs/U2View/src/ov_msa/McaEditorConsensusArea.cpp +++ b/src/corelibs/U2View/src/ov_msa/McaEditorConsensusArea.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/McaEditorConsensusArea.h b/src/corelibs/U2View/src/ov_msa/McaEditorConsensusArea.h index 2174e6d31b0b112fbe397400053827373970918a..7ca75adebd8863d12cd4b6e81154a3166bdc7b98 100644 --- a/src/corelibs/U2View/src/ov_msa/McaEditorConsensusArea.h +++ b/src/corelibs/U2View/src/ov_msa/McaEditorConsensusArea.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/McaEditorNameList.cpp b/src/corelibs/U2View/src/ov_msa/McaEditorNameList.cpp index 4ec3006f6b5f6d6cbb47ef7e846a07ccdadb24a6..1d2c891cb9972cb55815080f098d5b4ca1918423 100644 --- a/src/corelibs/U2View/src/ov_msa/McaEditorNameList.cpp +++ b/src/corelibs/U2View/src/ov_msa/McaEditorNameList.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/McaEditorNameList.h b/src/corelibs/U2View/src/ov_msa/McaEditorNameList.h index 3fe336c5e705c2aebdf681ba74914a9303b48759..2d0d3eb3fc581a74481bc6854973eeb7809c3171 100644 --- a/src/corelibs/U2View/src/ov_msa/McaEditorNameList.h +++ b/src/corelibs/U2View/src/ov_msa/McaEditorNameList.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/McaEditorOverviewArea.cpp b/src/corelibs/U2View/src/ov_msa/McaEditorOverviewArea.cpp index 3190acef28875476e80a5a115fdbe5ac9bac676d..77c50a9cdf0021bc95cf239bb24edf0a28ab9085 100644 --- a/src/corelibs/U2View/src/ov_msa/McaEditorOverviewArea.cpp +++ b/src/corelibs/U2View/src/ov_msa/McaEditorOverviewArea.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/McaEditorOverviewArea.h b/src/corelibs/U2View/src/ov_msa/McaEditorOverviewArea.h index 87685045e74c14db3bce00a14bc07562ffcd5352..1eada1563185cb7b8b1a0bec7c39cafb6fb46c3d 100644 --- a/src/corelibs/U2View/src/ov_msa/McaEditorOverviewArea.h +++ b/src/corelibs/U2View/src/ov_msa/McaEditorOverviewArea.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/McaEditorReferenceArea.cpp b/src/corelibs/U2View/src/ov_msa/McaEditorReferenceArea.cpp index 5622e5acf4e163222a57065afe27b588463f9f3d..bb78d28227ca3c5331a3d255002f96b22432172c 100644 --- a/src/corelibs/U2View/src/ov_msa/McaEditorReferenceArea.cpp +++ b/src/corelibs/U2View/src/ov_msa/McaEditorReferenceArea.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/McaEditorReferenceArea.h b/src/corelibs/U2View/src/ov_msa/McaEditorReferenceArea.h index 50ff8ef6bc43cc8048ff0c16275fa64f7ab6f831..c597457c7347a3d49fa6f647c9448784b476059b 100644 --- a/src/corelibs/U2View/src/ov_msa/McaEditorReferenceArea.h +++ b/src/corelibs/U2View/src/ov_msa/McaEditorReferenceArea.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/McaEditorSequenceArea.cpp b/src/corelibs/U2View/src/ov_msa/McaEditorSequenceArea.cpp index a9b91f246f870f9dcdff9f0142f19501450e8d40..6d671d7a7f3f054d58b9ba697ceff069c4b13582 100644 --- a/src/corelibs/U2View/src/ov_msa/McaEditorSequenceArea.cpp +++ b/src/corelibs/U2View/src/ov_msa/McaEditorSequenceArea.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/McaEditorSequenceArea.h b/src/corelibs/U2View/src/ov_msa/McaEditorSequenceArea.h index f901fa33301bd2685217a70210eb09fc432ef357..e637cf907fbe23ea75467e1a0812c5c784a9cde4 100644 --- a/src/corelibs/U2View/src/ov_msa/McaEditorSequenceArea.h +++ b/src/corelibs/U2View/src/ov_msa/McaEditorSequenceArea.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/McaEditorStatusBar.cpp b/src/corelibs/U2View/src/ov_msa/McaEditorStatusBar.cpp index efd9fd55c464b0adb4b7086429289b1b78f72007..86883fb1b7c7066f8235dc5d63f6cd8bf4f1389c 100644 --- a/src/corelibs/U2View/src/ov_msa/McaEditorStatusBar.cpp +++ b/src/corelibs/U2View/src/ov_msa/McaEditorStatusBar.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/McaEditorStatusBar.h b/src/corelibs/U2View/src/ov_msa/McaEditorStatusBar.h index 3a9c4409f863265f4fc40be881bac0f5110a5e9b..bf58b0dd4f4ee305f8bef79deb7363d02e9dc27b 100644 --- a/src/corelibs/U2View/src/ov_msa/McaEditorStatusBar.h +++ b/src/corelibs/U2View/src/ov_msa/McaEditorStatusBar.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/McaEditorWgt.cpp b/src/corelibs/U2View/src/ov_msa/McaEditorWgt.cpp index bd74c783d0c5e5f5362a185561d2f8b3e3fd3d4d..3e2010a5f20aa0ddf03e3515f2d139b0b0eb0704 100644 --- a/src/corelibs/U2View/src/ov_msa/McaEditorWgt.cpp +++ b/src/corelibs/U2View/src/ov_msa/McaEditorWgt.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/McaEditorWgt.h b/src/corelibs/U2View/src/ov_msa/McaEditorWgt.h index d3933ca8cb9e0e0c45c40eaa5c2fa82a1b40df93..a30761be0565c44928f8738f31835bc07104193b 100644 --- a/src/corelibs/U2View/src/ov_msa/McaEditorWgt.h +++ b/src/corelibs/U2View/src/ov_msa/McaEditorWgt.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/McaReferenceCharController.cpp b/src/corelibs/U2View/src/ov_msa/McaReferenceCharController.cpp index 4efbf370c9a69e2c166b8e653d6e4465fa5163c9..9a6443d0d45fdbc685dacc6317251bbfe0a61551 100644 --- a/src/corelibs/U2View/src/ov_msa/McaReferenceCharController.cpp +++ b/src/corelibs/U2View/src/ov_msa/McaReferenceCharController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/McaReferenceCharController.h b/src/corelibs/U2View/src/ov_msa/McaReferenceCharController.h index 817130d78fd2162a05a722833901bc9988743910..7817151101c06f1337f93108ebf8aed8e0398266 100644 --- a/src/corelibs/U2View/src/ov_msa/McaReferenceCharController.h +++ b/src/corelibs/U2View/src/ov_msa/McaReferenceCharController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MsaEditorNameList.cpp b/src/corelibs/U2View/src/ov_msa/MsaEditorNameList.cpp index ccc28fac4846051d0c881612ab1b96bf23bbff49..ba6876d9d05040deea70e67d6d8d5997755ae6ad 100644 --- a/src/corelibs/U2View/src/ov_msa/MsaEditorNameList.cpp +++ b/src/corelibs/U2View/src/ov_msa/MsaEditorNameList.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MsaEditorNameList.h b/src/corelibs/U2View/src/ov_msa/MsaEditorNameList.h index 9dcd10e68f765b16a7c48a1125618eb8347911fa..5afc61a4ac10f0a61957c3334e2b0fc6ad96ad08 100644 --- a/src/corelibs/U2View/src/ov_msa/MsaEditorNameList.h +++ b/src/corelibs/U2View/src/ov_msa/MsaEditorNameList.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MsaEditorSimilarityColumn.cpp b/src/corelibs/U2View/src/ov_msa/MsaEditorSimilarityColumn.cpp index 463bb00d869cbcfb31c452e034a311d2b6666628..4da17d64b866db59dce49e7dde13632af4b5fa19 100644 --- a/src/corelibs/U2View/src/ov_msa/MsaEditorSimilarityColumn.cpp +++ b/src/corelibs/U2View/src/ov_msa/MsaEditorSimilarityColumn.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -39,10 +39,6 @@ namespace U2 { -const QString MsaEditorAlignmentDependentWidget::DataIsOutdatedMessage(QString("<FONT COLOR=#FF0000>%1</FONT>").arg(QObject::tr("Data are outdated"))); -const QString MsaEditorAlignmentDependentWidget::DataIsValidMessage(QString("<FONT COLOR=#00FF00>%1</FONT>").arg(QObject::tr("Data are valid"))); -const QString MsaEditorAlignmentDependentWidget::DataIsBeingUpdatedMessage(QString("<FONT COLOR=#0000FF>%1</FONT>").arg(QObject::tr("Data are being updated"))); - MsaEditorSimilarityColumn::MsaEditorSimilarityColumn(MsaEditorWgt* ui, QScrollBar* nhBar, const SimilarityStatisticsSettings* _settings) : MaEditorNameList(ui, nhBar), matrix(NULL), @@ -198,10 +194,16 @@ QList<Task*> CreateDistanceMatrixTask::onSubTaskFinished(Task* subTask){ resMatrix = new MSADistanceMatrix(algo->getMatrix()); return res; } + MsaEditorAlignmentDependentWidget::MsaEditorAlignmentDependentWidget(UpdatedWidgetInterface* _contentWidget) : contentWidget(_contentWidget), automaticUpdating(true){ SAFE_POINT(NULL != _contentWidget, QString("Argument is NULL in constructor MsaEditorAlignmentDependentWidget()"),); + DataIsOutdatedMessage = QString("<FONT COLOR=#FF0000>%1</FONT>").arg(tr("Data are outdated")); + DataIsValidMessage = QString("<FONT COLOR=#00FF00>%1</FONT>").arg(tr("Data are valid")); + DataIsBeingUpdatedMessage = QString("<FONT COLOR=#0000FF>%1</FONT>").arg(tr("Data are being updated")); + + settings = &contentWidget->getSettings(); connect(settings->ma, SIGNAL(si_alignmentChanged(const MultipleAlignment&, const MaModificationInfo&)), this, SLOT(sl_onAlignmentChanged(const MultipleAlignment&, const MaModificationInfo&))); diff --git a/src/corelibs/U2View/src/ov_msa/MsaEditorSimilarityColumn.h b/src/corelibs/U2View/src/ov_msa/MsaEditorSimilarityColumn.h index edd07fca91eb4495f07ecb4218e90cbfd1964c2a..6f84f065b5d26302488ba4ca42c3ac36a1e1c6e0 100644 --- a/src/corelibs/U2View/src/ov_msa/MsaEditorSimilarityColumn.h +++ b/src/corelibs/U2View/src/ov_msa/MsaEditorSimilarityColumn.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -139,9 +139,9 @@ private: bool automaticUpdating; - static const QString DataIsOutdatedMessage; - static const QString DataIsValidMessage; - static const QString DataIsBeingUpdatedMessage; + QString DataIsOutdatedMessage; + QString DataIsValidMessage; + QString DataIsBeingUpdatedMessage; }; } //namespace diff --git a/src/corelibs/U2View/src/ov_msa/MsaEditorStatusBar.cpp b/src/corelibs/U2View/src/ov_msa/MsaEditorStatusBar.cpp index c9d94d00bd9e7d1d325a5a3b174c6eecb96f442c..c4cff19ded72346995eac9fe77c5ddc5b6386e32 100644 --- a/src/corelibs/U2View/src/ov_msa/MsaEditorStatusBar.cpp +++ b/src/corelibs/U2View/src/ov_msa/MsaEditorStatusBar.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MsaEditorStatusBar.h b/src/corelibs/U2View/src/ov_msa/MsaEditorStatusBar.h index 91ed5968244b8d19a688a27cccc9c4a5d541099a..d0e2b7a57fd3b302728d8d719ba5911b4f8ac761 100644 --- a/src/corelibs/U2View/src/ov_msa/MsaEditorStatusBar.h +++ b/src/corelibs/U2View/src/ov_msa/MsaEditorStatusBar.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MsaEditorUserModStepController.cpp b/src/corelibs/U2View/src/ov_msa/MsaEditorUserModStepController.cpp index 609d8717176eacaedfcd23592fd181a2d1c66929..a238605ff877963b49cb54349c62237836c032a3 100644 --- a/src/corelibs/U2View/src/ov_msa/MsaEditorUserModStepController.cpp +++ b/src/corelibs/U2View/src/ov_msa/MsaEditorUserModStepController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MsaEditorUserModStepController.h b/src/corelibs/U2View/src/ov_msa/MsaEditorUserModStepController.h index b007b60df97c3a48c18f79108c50552d98e76dfc..7a9e6096e084dfc72388427e3fa5a1add669d283 100644 --- a/src/corelibs/U2View/src/ov_msa/MsaEditorUserModStepController.h +++ b/src/corelibs/U2View/src/ov_msa/MsaEditorUserModStepController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MsaEditorWgt.cpp b/src/corelibs/U2View/src/ov_msa/MsaEditorWgt.cpp index 5c1570157bf89129890745477a03cc64c07bb65f..b7050c6e5def6e549322a6c712985c7d5a44abad 100644 --- a/src/corelibs/U2View/src/ov_msa/MsaEditorWgt.cpp +++ b/src/corelibs/U2View/src/ov_msa/MsaEditorWgt.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MsaEditorWgt.h b/src/corelibs/U2View/src/ov_msa/MsaEditorWgt.h index ed2624afbf49080d6422c65e1695662fbe5d9016..17ecd34c8e2d6dfa75c2c2773b4c6d1d79d3373e 100644 --- a/src/corelibs/U2View/src/ov_msa/MsaEditorWgt.h +++ b/src/corelibs/U2View/src/ov_msa/MsaEditorWgt.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MsaOpSavableTab.cpp b/src/corelibs/U2View/src/ov_msa/MsaOpSavableTab.cpp index 77210e4654235ea3ded300f4cc9d7e11f29f6328..9bc8d673c75630ada70eb9728babb2185ddd3def 100644 --- a/src/corelibs/U2View/src/ov_msa/MsaOpSavableTab.cpp +++ b/src/corelibs/U2View/src/ov_msa/MsaOpSavableTab.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MsaOpSavableTab.h b/src/corelibs/U2View/src/ov_msa/MsaOpSavableTab.h index 5e5a46ef9fca74b346d1a7a401056bcbf8ae7d58..9e7cf6806c011b8a82b7b28277a96be971d0cd16 100644 --- a/src/corelibs/U2View/src/ov_msa/MsaOpSavableTab.h +++ b/src/corelibs/U2View/src/ov_msa/MsaOpSavableTab.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/MsaUpdatedWidgetInterface.h b/src/corelibs/U2View/src/ov_msa/MsaUpdatedWidgetInterface.h index 8e428a8d959d78196a497e9fd72bb43c9eae2cc9..d88761946dc7a4ddd4c6898ebd5e1454cac59dd6 100644 --- a/src/corelibs/U2View/src/ov_msa/MsaUpdatedWidgetInterface.h +++ b/src/corelibs/U2View/src/ov_msa/MsaUpdatedWidgetInterface.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Overview/MaEditorOverviewArea.cpp b/src/corelibs/U2View/src/ov_msa/Overview/MaEditorOverviewArea.cpp index b3c37f9035ad6b229e0f6575cd746cb2447001e4..589ff1ba9fb056f2d0bddaec6d5921d75f10d972 100644 --- a/src/corelibs/U2View/src/ov_msa/Overview/MaEditorOverviewArea.cpp +++ b/src/corelibs/U2View/src/ov_msa/Overview/MaEditorOverviewArea.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Overview/MaEditorOverviewArea.h b/src/corelibs/U2View/src/ov_msa/Overview/MaEditorOverviewArea.h index aa05636f9ea3bc382a191cf8a1ca79e0068857e4..37507c2977d4ae939217151dc1c4973719bc57b8 100644 --- a/src/corelibs/U2View/src/ov_msa/Overview/MaEditorOverviewArea.h +++ b/src/corelibs/U2View/src/ov_msa/Overview/MaEditorOverviewArea.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Overview/MaGraphCalculationTask.cpp b/src/corelibs/U2View/src/ov_msa/Overview/MaGraphCalculationTask.cpp index 36b7b8cb0e9c41aba71ae30f6a2a44a4d6fbf314..65290601b354cde42f1c83f632ab1f882ac874f0 100644 --- a/src/corelibs/U2View/src/ov_msa/Overview/MaGraphCalculationTask.cpp +++ b/src/corelibs/U2View/src/ov_msa/Overview/MaGraphCalculationTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -225,7 +225,7 @@ bool MaHighlightingOverviewCalculationTask::isCellHighlighted(const MultipleAlig if (seq == refSeq || isEmptyScheme(schemeId) || ((refSeq == U2MsaRow::INVALID_ROW_ID) && !isGapScheme(schemeId) && !highlightingScheme->getFactory()->isRefFree())) { - if (colorScheme->getColor(seq, pos, ma->charAt(seq, pos)) != QColor()) { + if (colorScheme->getBackgroundColor(seq, pos, ma->charAt(seq, pos)) != QColor()) { return true; } } diff --git a/src/corelibs/U2View/src/ov_msa/Overview/MaGraphCalculationTask.h b/src/corelibs/U2View/src/ov_msa/Overview/MaGraphCalculationTask.h index 57f0368be330eea93a1a6e35141cb27c24bc5ed3..b0380eff83a5203a048159a7e04b0d6087f9dcdf 100644 --- a/src/corelibs/U2View/src/ov_msa/Overview/MaGraphCalculationTask.h +++ b/src/corelibs/U2View/src/ov_msa/Overview/MaGraphCalculationTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Overview/MaGraphOverview.cpp b/src/corelibs/U2View/src/ov_msa/Overview/MaGraphOverview.cpp index 5925408bd10ba255470cb2164df216ca616d5baa..b0593340cc56cc4a4ed745550f3cf75630e706d8 100644 --- a/src/corelibs/U2View/src/ov_msa/Overview/MaGraphOverview.cpp +++ b/src/corelibs/U2View/src/ov_msa/Overview/MaGraphOverview.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Overview/MaGraphOverview.h b/src/corelibs/U2View/src/ov_msa/Overview/MaGraphOverview.h index df8da66e48765a42cdf162b3b6ad6dce5cc29fec..4890e7e2197223e6d8c1234f53798fc825fa7d45 100644 --- a/src/corelibs/U2View/src/ov_msa/Overview/MaGraphOverview.h +++ b/src/corelibs/U2View/src/ov_msa/Overview/MaGraphOverview.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Overview/MaOverview.cpp b/src/corelibs/U2View/src/ov_msa/Overview/MaOverview.cpp index fe96853927b994d2dfd98e013ccd1f0b9bc75054..bebf636992dc77f21972d54baddc911582b281f0 100644 --- a/src/corelibs/U2View/src/ov_msa/Overview/MaOverview.cpp +++ b/src/corelibs/U2View/src/ov_msa/Overview/MaOverview.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Overview/MaOverview.h b/src/corelibs/U2View/src/ov_msa/Overview/MaOverview.h index 7d619ca4a278b84723ce81cd14a54b5308f7656e..bb0d765e4dafc5346ee130bc2c2edfd6717daec1 100644 --- a/src/corelibs/U2View/src/ov_msa/Overview/MaOverview.h +++ b/src/corelibs/U2View/src/ov_msa/Overview/MaOverview.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Overview/MaOverviewContextMenu.cpp b/src/corelibs/U2View/src/ov_msa/Overview/MaOverviewContextMenu.cpp index 7593115373cc409a438d9bb5cadcf4070cb4de96..0a0d046e37b5d211b8b81fd24d7fc9110d48d597 100644 --- a/src/corelibs/U2View/src/ov_msa/Overview/MaOverviewContextMenu.cpp +++ b/src/corelibs/U2View/src/ov_msa/Overview/MaOverviewContextMenu.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Overview/MaOverviewContextMenu.h b/src/corelibs/U2View/src/ov_msa/Overview/MaOverviewContextMenu.h index 5a4532994659437bf332c43aaa6024855f58be56..0da66b0eceea9d22de38191c427233175f17b008 100644 --- a/src/corelibs/U2View/src/ov_msa/Overview/MaOverviewContextMenu.h +++ b/src/corelibs/U2View/src/ov_msa/Overview/MaOverviewContextMenu.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Overview/MaOverviewImageExportTask.cpp b/src/corelibs/U2View/src/ov_msa/Overview/MaOverviewImageExportTask.cpp index 2b5472974cf7ad51c931e79ac68386077320eac3..5d1b509bb9de279be2e282a11ca9db6c68ac4dca 100644 --- a/src/corelibs/U2View/src/ov_msa/Overview/MaOverviewImageExportTask.cpp +++ b/src/corelibs/U2View/src/ov_msa/Overview/MaOverviewImageExportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Overview/MaOverviewImageExportTask.h b/src/corelibs/U2View/src/ov_msa/Overview/MaOverviewImageExportTask.h index 22fe401275059c46b562ea79ba7aa4aea098e9b3..a4c998897acff2d5730c7445a4f4719c237f0347 100644 --- a/src/corelibs/U2View/src/ov_msa/Overview/MaOverviewImageExportTask.h +++ b/src/corelibs/U2View/src/ov_msa/Overview/MaOverviewImageExportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Overview/MaSangerOverview.cpp b/src/corelibs/U2View/src/ov_msa/Overview/MaSangerOverview.cpp index 2d5e90fca5da85a2ec0ff2157dba58bab59ad1fd..100d3bc27cacd143c4abb461894e58a477735a3d 100644 --- a/src/corelibs/U2View/src/ov_msa/Overview/MaSangerOverview.cpp +++ b/src/corelibs/U2View/src/ov_msa/Overview/MaSangerOverview.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Overview/MaSangerOverview.h b/src/corelibs/U2View/src/ov_msa/Overview/MaSangerOverview.h index 9b457286fad03dd2b65984989376e08b494d57ac..20d06186cda8c51a1a04ccd6ab6cacf724d2783f 100644 --- a/src/corelibs/U2View/src/ov_msa/Overview/MaSangerOverview.h +++ b/src/corelibs/U2View/src/ov_msa/Overview/MaSangerOverview.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/Overview/MaSimpleOverview.cpp b/src/corelibs/U2View/src/ov_msa/Overview/MaSimpleOverview.cpp index 179b54986d4e839720a346a5991fbadce8bbea51..2d1df3d94f6a809177d7a3491223d95b2e089526 100644 --- a/src/corelibs/U2View/src/ov_msa/Overview/MaSimpleOverview.cpp +++ b/src/corelibs/U2View/src/ov_msa/Overview/MaSimpleOverview.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -160,7 +160,7 @@ void MaSimpleOverview::drawOverview(QPainter &p) { rect.setWidth(qRound(xRange.length / stepX)); rect.setHeight(qRound(yRange.length / stepY)); - QColor color = sequenceArea->getCurrentColorScheme()->getColor(seq, pos, mAlignmentObj->charAt(seq, pos)); + QColor color = sequenceArea->getCurrentColorScheme()->getBackgroundColor(seq, pos, mAlignmentObj->charAt(seq, pos)); if (MaHighlightingOverviewCalculationTask::isGapScheme(highlightingSchemeId)) { color = Qt::gray; } diff --git a/src/corelibs/U2View/src/ov_msa/Overview/MaSimpleOverview.h b/src/corelibs/U2View/src/ov_msa/Overview/MaSimpleOverview.h index 8b32ee319af7861bc74fce7720e5f262d7574d21..f30037a0c77f0b86ea3c9c97881f7e40af61d184 100644 --- a/src/corelibs/U2View/src/ov_msa/Overview/MaSimpleOverview.h +++ b/src/corelibs/U2View/src/ov_msa/Overview/MaSimpleOverview.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/PairAlign/PairAlign.cpp b/src/corelibs/U2View/src/ov_msa/PairAlign/PairAlign.cpp index f467ced1a614fe918f33e376680612193f373780..058cf8be34041936faf06572ebd9e92ba0da1dbf 100644 --- a/src/corelibs/U2View/src/ov_msa/PairAlign/PairAlign.cpp +++ b/src/corelibs/U2View/src/ov_msa/PairAlign/PairAlign.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -371,7 +371,7 @@ void PairAlign::sl_alignButtonPressed() { firstSequenceSelectionOn = false; secondSequenceSelectionOn = false; checkState(); - SAFE_POINT(true == canDoAlign, "Invalide state of PairAlign options panel widget. startAlignButton is not disabled.", ); + SAFE_POINT(true == canDoAlign, "Invalid state of PairAlign options panel widget. startAlignButton is not disabled.", ); U2OpStatus2Log os; U2EntityRef msaRef = msa->getMaObject()->getEntityRef(); diff --git a/src/corelibs/U2View/src/ov_msa/PairAlign/PairAlign.h b/src/corelibs/U2View/src/ov_msa/PairAlign/PairAlign.h index a9173604670cfb3c1e472723894f45dc95af9858..0a1b50fab47b00f19992fb5fe63b2b1a3b2e4d66 100644 --- a/src/corelibs/U2View/src/ov_msa/PairAlign/PairAlign.h +++ b/src/corelibs/U2View/src/ov_msa/PairAlign/PairAlign.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/PairAlign/PairAlignFactory.cpp b/src/corelibs/U2View/src/ov_msa/PairAlign/PairAlignFactory.cpp index b215c16a0751c2a7c7d3869bc904fc1c019e10a5..a1e79c9e58810d8115370cab5b3367901c6c5548 100644 --- a/src/corelibs/U2View/src/ov_msa/PairAlign/PairAlignFactory.cpp +++ b/src/corelibs/U2View/src/ov_msa/PairAlign/PairAlignFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ namespace U2 { const QString PairAlignFactory::GROUP_ID = "OP_PAIRALIGN"; const QString PairAlignFactory::GROUP_ICON_STR = ":core/images/pairwise.png"; -const QString PairAlignFactory::GROUP_DOC_PAGE = "22055946"; +const QString PairAlignFactory::GROUP_DOC_PAGE = "24742481"; PairAlignFactory::PairAlignFactory() { diff --git a/src/corelibs/U2View/src/ov_msa/PairAlign/PairAlignFactory.h b/src/corelibs/U2View/src/ov_msa/PairAlign/PairAlignFactory.h index 165d98726dce7b6f746dc175a9d0df2698672cf0..c56dde9707943cfd1e2b8370a6fa80e38afe6003 100644 --- a/src/corelibs/U2View/src/ov_msa/PairAlign/PairAlignFactory.h +++ b/src/corelibs/U2View/src/ov_msa/PairAlign/PairAlignFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorMultiTreeViewer.cpp b/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorMultiTreeViewer.cpp index 5fc3aace8011fe239d016b8f960fd806dd93b275..5da3992eb462f15db18fffcca605785fdc4d2ca9 100644 --- a/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorMultiTreeViewer.cpp +++ b/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorMultiTreeViewer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorMultiTreeViewer.h b/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorMultiTreeViewer.h index f82ef282d5c1fc51114b4dc06a48ec70d5b1bc21..cbebbce1a222baeb149cc72c370f2a72a891d5a7 100644 --- a/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorMultiTreeViewer.h +++ b/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorMultiTreeViewer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorTreeManager.cpp b/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorTreeManager.cpp index 1fce1c15b8bf1a945936a0154eb9435dba067f36..93d1a3e4009510399995a0dfbb94813169f75658 100644 --- a/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorTreeManager.cpp +++ b/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorTreeManager.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorTreeManager.h b/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorTreeManager.h index 16d8e38a76e7ee8a778b665d0cf1d461baf54bc5..c79a674128e5acf5f337a5f40b3431e547b44a5a 100644 --- a/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorTreeManager.h +++ b/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorTreeManager.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorTreeViewer.cpp b/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorTreeViewer.cpp index ddaf86a9110f15a1f7e2c1fb6aae1d579e8cf19f..0cb33eb802250672191f87d559ac3d6602e2a3a3 100644 --- a/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorTreeViewer.cpp +++ b/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorTreeViewer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorTreeViewer.h b/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorTreeViewer.h index 27d0f1254cbff8a53b921428236acdc81b278063..260183aadf23335a3f92545a769829b014356842 100644 --- a/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorTreeViewer.h +++ b/src/corelibs/U2View/src/ov_msa/PhyTrees/MSAEditorTreeViewer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/PhyTrees/MsaEditorTreeTabArea.cpp b/src/corelibs/U2View/src/ov_msa/PhyTrees/MsaEditorTreeTabArea.cpp index dc5eb06ebfe88e01ece33e99105ddf791da2b0cf..009f1fe6aa4423b80f959be19cfc24e9391df5b4 100644 --- a/src/corelibs/U2View/src/ov_msa/PhyTrees/MsaEditorTreeTabArea.cpp +++ b/src/corelibs/U2View/src/ov_msa/PhyTrees/MsaEditorTreeTabArea.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/PhyTrees/MsaEditorTreeTabArea.h b/src/corelibs/U2View/src/ov_msa/PhyTrees/MsaEditorTreeTabArea.h index 0b8ef71a98f4eab47ae0aee13f6764f772ec00d9..dfc03a00528618d2454f4e49b8d99feea7b90c01 100644 --- a/src/corelibs/U2View/src/ov_msa/PhyTrees/MsaEditorTreeTabArea.h +++ b/src/corelibs/U2View/src/ov_msa/PhyTrees/MsaEditorTreeTabArea.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/SaveSelectedSequenceFromMSADialogController.cpp b/src/corelibs/U2View/src/ov_msa/SaveSelectedSequenceFromMSADialogController.cpp index c60042c3c6e17c63256687d73eec4b26e930b239..ce6f587e9e0bef3e901e3f132e5e53f5a6e910e8 100644 --- a/src/corelibs/U2View/src/ov_msa/SaveSelectedSequenceFromMSADialogController.cpp +++ b/src/corelibs/U2View/src/ov_msa/SaveSelectedSequenceFromMSADialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -47,15 +47,13 @@ const QString SaveDocumentInFolderController::HOME_DIR_IDENTIFIER = "~/"; const QString SaveDocumentInFolderController::HOME_DIR_IDENTIFIER = "%UserProfile%/"; #endif -SaveSelectedSequenceFromMSADialogController::SaveSelectedSequenceFromMSADialogController(const QString &defaultDir, QWidget* p, const QStringList& _seqNames, const QString& defaultCustomFilename) +SaveSelectedSequenceFromMSADialogController::SaveSelectedSequenceFromMSADialogController(QWidget* p, const QString& defaultCustomFilename) : QDialog(p), - defaultDir(defaultDir), - seqNames(_seqNames), saveController(NULL), ui(new Ui_SaveSelectedSequenceFromMSADialog()) { ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22055944"); + new HelpButton(this, ui->buttonBox, "24742479"); ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Export")); ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -77,17 +75,7 @@ void SaveSelectedSequenceFromMSADialogController::accept() { DocumentFormat *df = AppContext::getDocumentFormatRegistry()->getFormatById(formatId); CHECK(df != NULL, ) QString extension = df->getSupportedDocumentFileExtensions().first(); - if (!ui->customFileNameEdit->isEnabled()) { - foreach(const QString& filename, seqNames) { - QString filePath = url + QDir::separator() + filename + "." + extension; - filePath = GUrlUtils::fixFileName(filePath); - QFile fileToSave(filePath); - if (fileToSave.exists()) { - QMessageBox::critical(this, L10N::errorTitle(), tr("File \"%1\" is already exists, choose custom filename or select another directory for save!").arg(filename + "." + extension)); - return; - } - } - } else { + if (ui->customFileNameEdit->isEnabled()) { QString filePath = url + QDir::separator() + ui->customFileNameEdit->text() + "." + extension; filePath = GUrlUtils::fixFileName(filePath); QFile fileToSave(filePath); @@ -133,7 +121,7 @@ void SaveSelectedSequenceFromMSADialogController::initSaveController() { config.folderLineEdit = ui->folderNameEdit; config.formatCombo = ui->formatCombo; config.parentWidget = this; - config.defaultFileName = defaultDir + "/"; + config.defaultFileName = LastUsedDirHelper(config.defaultDomain).dir + "/"; DocumentFormatConstraints formatConstraints; formatConstraints.supportedObjectTypes << GObjectTypes::SEQUENCE; @@ -201,13 +189,13 @@ void SaveDocumentInFolderController::initFormatComboBox() { } void SaveDocumentInFolderController::sl_fileDialogButtonClicked() { - QString defaultUrl = getSaveDirName(); - LastUsedDirHelper lod(conf.defaultDomain, defaultUrl); - if (defaultUrl.isEmpty()) { - defaultUrl = lod; + QString defaultDir = getSaveDirName(); + LastUsedDirHelper lod(conf.defaultDomain, defaultDir); + if (defaultDir.isEmpty()) { + defaultDir = lod; } - lod.url = U2FileDialog::getExistingDirectory(conf.parentWidget, conf.saveTitle, defaultUrl); + lod.url = U2FileDialog::getExistingDirectory(conf.parentWidget, conf.saveTitle, defaultDir); if (lod.url.isEmpty()) { return; } diff --git a/src/corelibs/U2View/src/ov_msa/SaveSelectedSequenceFromMSADialogController.h b/src/corelibs/U2View/src/ov_msa/SaveSelectedSequenceFromMSADialogController.h index 3fb400ee3eb80f247fee3d87a2794e38ee80eb00..f8b7be13fce12a1ecd0689e324ee8b27d7b2fa8e 100644 --- a/src/corelibs/U2View/src/ov_msa/SaveSelectedSequenceFromMSADialogController.h +++ b/src/corelibs/U2View/src/ov_msa/SaveSelectedSequenceFromMSADialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -37,7 +37,7 @@ class SaveDocumentInFolderController; class SaveSelectedSequenceFromMSADialogController : public QDialog { Q_OBJECT public: - SaveSelectedSequenceFromMSADialogController(const QString& defaultDir, QWidget* p, const QStringList& seqNames, const QString& defaultCustomFilename); + SaveSelectedSequenceFromMSADialogController(QWidget* p, const QString& defaultCustomFilename); ~SaveSelectedSequenceFromMSADialogController(); virtual void accept(); @@ -53,7 +53,6 @@ private: QString url; QString defaultDir; DocumentFormatId formatId; - QStringList seqNames; QString customFileName; bool trimGapsFlag; bool addToProjectFlag; diff --git a/src/corelibs/U2View/src/ov_msa/SeqStatistics/SeqStatisticsWidget.cpp b/src/corelibs/U2View/src/ov_msa/SeqStatistics/SeqStatisticsWidget.cpp index c5c961254566a7e888a10ad14bd7bb6c5e5743b1..390d69045a9a2191746bbe4e8cb98b70d89280b6 100644 --- a/src/corelibs/U2View/src/ov_msa/SeqStatistics/SeqStatisticsWidget.cpp +++ b/src/corelibs/U2View/src/ov_msa/SeqStatistics/SeqStatisticsWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/SeqStatistics/SeqStatisticsWidget.h b/src/corelibs/U2View/src/ov_msa/SeqStatistics/SeqStatisticsWidget.h index aaac0d793bab5f6c79225b12dfdbd78d0972d6c2..c3b9df19d850d8b89b0ca1f113759cfdbb510ede 100644 --- a/src/corelibs/U2View/src/ov_msa/SeqStatistics/SeqStatisticsWidget.h +++ b/src/corelibs/U2View/src/ov_msa/SeqStatistics/SeqStatisticsWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/SeqStatistics/SeqStatisticsWidgetFactory.cpp b/src/corelibs/U2View/src/ov_msa/SeqStatistics/SeqStatisticsWidgetFactory.cpp index 7827ace1accca04e3143035324021b28f74aaf52..eceabe3903753c6fe6ce6bac27b0e534701cfb39 100644 --- a/src/corelibs/U2View/src/ov_msa/SeqStatistics/SeqStatisticsWidgetFactory.cpp +++ b/src/corelibs/U2View/src/ov_msa/SeqStatistics/SeqStatisticsWidgetFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,7 +33,7 @@ namespace U2 { const QString SeqStatisticsWidgetFactory::GROUP_ID = "OP_SEQ_STATISTICS_WIDGET"; const QString SeqStatisticsWidgetFactory::GROUP_ICON_STR = ":core/images/chart_bar.png"; -const QString SeqStatisticsWidgetFactory::GROUP_DOC_PAGE = "22055956"; +const QString SeqStatisticsWidgetFactory::GROUP_DOC_PAGE = "24742491"; SeqStatisticsWidgetFactory::SeqStatisticsWidgetFactory() { diff --git a/src/corelibs/U2View/src/ov_msa/SeqStatistics/SeqStatisticsWidgetFactory.h b/src/corelibs/U2View/src/ov_msa/SeqStatistics/SeqStatisticsWidgetFactory.h index 8d595be9c370aaf5fb04f17661c234ea6191a71a..5796990e976e6e2a264ac724278dff1d726dda76 100644 --- a/src/corelibs/U2View/src/ov_msa/SeqStatistics/SeqStatisticsWidgetFactory.h +++ b/src/corelibs/U2View/src/ov_msa/SeqStatistics/SeqStatisticsWidgetFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/SequenceSelectorWidgetController.cpp b/src/corelibs/U2View/src/ov_msa/SequenceSelectorWidgetController.cpp index 95085469c590d24019234f5eb62cc0421b64146c..93c3b9291cd314b65413543d7b10f6825dd390fe 100644 --- a/src/corelibs/U2View/src/ov_msa/SequenceSelectorWidgetController.cpp +++ b/src/corelibs/U2View/src/ov_msa/SequenceSelectorWidgetController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/SequenceSelectorWidgetController.h b/src/corelibs/U2View/src/ov_msa/SequenceSelectorWidgetController.h index 7ecf88a84e1c054be7b1a989afa3ccd7ef829462..1333f4488eef7d656cda4f9b1dc52f2e1dab2249 100644 --- a/src/corelibs/U2View/src/ov_msa/SequenceSelectorWidgetController.h +++ b/src/corelibs/U2View/src/ov_msa/SequenceSelectorWidgetController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/TreeOptions/TreeOptionsWidget.cpp b/src/corelibs/U2View/src/ov_msa/TreeOptions/TreeOptionsWidget.cpp index f2c27353795b5816feedcf632c26d3e5dc23f534..fbf833f0cf767c5c64f3b6ab0b930481d70ee561 100644 --- a/src/corelibs/U2View/src/ov_msa/TreeOptions/TreeOptionsWidget.cpp +++ b/src/corelibs/U2View/src/ov_msa/TreeOptions/TreeOptionsWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/TreeOptions/TreeOptionsWidget.h b/src/corelibs/U2View/src/ov_msa/TreeOptions/TreeOptionsWidget.h index b5860189265412abbca7044864fe9e30ba0ef045..1ce3533e0edf8e127ea96f9f8e1cc5f28281e51a 100644 --- a/src/corelibs/U2View/src/ov_msa/TreeOptions/TreeOptionsWidget.h +++ b/src/corelibs/U2View/src/ov_msa/TreeOptions/TreeOptionsWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/TreeOptions/TreeOptionsWidgetFactory.cpp b/src/corelibs/U2View/src/ov_msa/TreeOptions/TreeOptionsWidgetFactory.cpp index 2223b682eb63f30f3396f8462a350242f365b129..b9342975551f5a0c7032c14c8afceb5ef60f78d4 100644 --- a/src/corelibs/U2View/src/ov_msa/TreeOptions/TreeOptionsWidgetFactory.cpp +++ b/src/corelibs/U2View/src/ov_msa/TreeOptions/TreeOptionsWidgetFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,7 +33,7 @@ namespace U2 { const QString MSATreeOptionsWidgetFactory::GROUP_ID = "OP_MSA_TREES_WIDGET"; const QString MSATreeOptionsWidgetFactory::GROUP_ICON_STR = ":core/images/tree.png"; -const QString MSATreeOptionsWidgetFactory::GROUP_DOC_PAGE = "22055993"; +const QString MSATreeOptionsWidgetFactory::GROUP_DOC_PAGE = "24742528"; MSATreeOptionsWidgetFactory::MSATreeOptionsWidgetFactory() @@ -73,7 +73,7 @@ void MSATreeOptionsWidgetFactory::sl_onWidgetViewSaved(const TreeOpWidgetViewSet const QString TreeOptionsWidgetFactory::GROUP_ID = "OP_TREES_WIDGET"; const QString TreeOptionsWidgetFactory::GROUP_ICON_STR = ":core/images/tree.png"; -const QString TreeOptionsWidgetFactory::GROUP_DOC_PAGE = "22055993"; +const QString TreeOptionsWidgetFactory::GROUP_DOC_PAGE = "24742528"; TreeOptionsWidgetFactory::TreeOptionsWidgetFactory() : viewSettings(new TreeOpWidgetViewSettings) @@ -114,7 +114,7 @@ void TreeOptionsWidgetFactory::sl_onWidgetViewSaved(const TreeOpWidgetViewSettin const QString AddTreeWidgetFactory::GROUP_ID = "OP_MSA_ADD_TREE_WIDGET"; const QString AddTreeWidgetFactory::GROUP_ICON_STR = ":core/images/tree.png"; -const QString AddTreeWidgetFactory::GROUP_DOC_PAGE = "22055993"; +const QString AddTreeWidgetFactory::GROUP_DOC_PAGE = "24742528"; AddTreeWidgetFactory::AddTreeWidgetFactory() { objectViewOfWidget = ObjViewType_AlignmentEditor; diff --git a/src/corelibs/U2View/src/ov_msa/TreeOptions/TreeOptionsWidgetFactory.h b/src/corelibs/U2View/src/ov_msa/TreeOptions/TreeOptionsWidgetFactory.h index 8f766a0f610d00e0ecc3dced74bf843a13571cfd..ed7ef93c1dbea82bd45b22c76176f571ebeda5bc 100644 --- a/src/corelibs/U2View/src/ov_msa/TreeOptions/TreeOptionsWidgetFactory.h +++ b/src/corelibs/U2View/src/ov_msa/TreeOptions/TreeOptionsWidgetFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/helpers/BaseWidthController.cpp b/src/corelibs/U2View/src/ov_msa/helpers/BaseWidthController.cpp index d385c590ce16c6239f0e766ba99de3ebef8e8e8b..8205b3a7986b1656585d267dae015269c5eeaf57 100644 --- a/src/corelibs/U2View/src/ov_msa/helpers/BaseWidthController.cpp +++ b/src/corelibs/U2View/src/ov_msa/helpers/BaseWidthController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/helpers/BaseWidthController.h b/src/corelibs/U2View/src/ov_msa/helpers/BaseWidthController.h index 8d7dafb34563a7cf50c3b0c137270876e26a30aa..2d3343ca458c4978b98d00ec2745bedc2a10d572 100644 --- a/src/corelibs/U2View/src/ov_msa/helpers/BaseWidthController.h +++ b/src/corelibs/U2View/src/ov_msa/helpers/BaseWidthController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/helpers/DrawHelper.cpp b/src/corelibs/U2View/src/ov_msa/helpers/DrawHelper.cpp index 478829c5b0227cec2038f5b325cefbefe24ef299..238f652179e4202abfea9d0ba61e514dc4a748da 100644 --- a/src/corelibs/U2View/src/ov_msa/helpers/DrawHelper.cpp +++ b/src/corelibs/U2View/src/ov_msa/helpers/DrawHelper.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/helpers/DrawHelper.h b/src/corelibs/U2View/src/ov_msa/helpers/DrawHelper.h index f879e35da428c685f84dc77e6e80ea6b35d77820..44f144b8bc362db1e5f4e2f518839ecd05794351 100644 --- a/src/corelibs/U2View/src/ov_msa/helpers/DrawHelper.h +++ b/src/corelibs/U2View/src/ov_msa/helpers/DrawHelper.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/helpers/MaAmbiguousCharactersController.cpp b/src/corelibs/U2View/src/ov_msa/helpers/MaAmbiguousCharactersController.cpp index e38d34b9700c5d8913cd1da6e64911a6f8c3fdec..7274956c6b0792d699037d360ac9091184e83c5f 100644 --- a/src/corelibs/U2View/src/ov_msa/helpers/MaAmbiguousCharactersController.cpp +++ b/src/corelibs/U2View/src/ov_msa/helpers/MaAmbiguousCharactersController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/helpers/MaAmbiguousCharactersController.h b/src/corelibs/U2View/src/ov_msa/helpers/MaAmbiguousCharactersController.h index b5b7be7350a4da05472358269a26ab82433e24c1..9912f4ec1b4dbd8c8ac8805b193b8a1cdf9ea137 100644 --- a/src/corelibs/U2View/src/ov_msa/helpers/MaAmbiguousCharactersController.h +++ b/src/corelibs/U2View/src/ov_msa/helpers/MaAmbiguousCharactersController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/helpers/McaRowHeightController.cpp b/src/corelibs/U2View/src/ov_msa/helpers/McaRowHeightController.cpp index c3aafe1ef43ffc438bf443e0ee4ad4f0918f54e7..2f6ed69b2a5301f696794c6ea4c1c4171bef6f76 100644 --- a/src/corelibs/U2View/src/ov_msa/helpers/McaRowHeightController.cpp +++ b/src/corelibs/U2View/src/ov_msa/helpers/McaRowHeightController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/helpers/McaRowHeightController.h b/src/corelibs/U2View/src/ov_msa/helpers/McaRowHeightController.h index ea859b1c5a6f2d466f86f46048c588fbb17f58cd..9f88b42d1a1f50d4584325e3eb35416219855da1 100644 --- a/src/corelibs/U2View/src/ov_msa/helpers/McaRowHeightController.h +++ b/src/corelibs/U2View/src/ov_msa/helpers/McaRowHeightController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/helpers/MsaRowHeightController.cpp b/src/corelibs/U2View/src/ov_msa/helpers/MsaRowHeightController.cpp index c12f6df3b85ae3c706bdc0c5eb9d0761b99fa424..c046dc36daf6bff20160c81dd85f78d192c04682 100644 --- a/src/corelibs/U2View/src/ov_msa/helpers/MsaRowHeightController.cpp +++ b/src/corelibs/U2View/src/ov_msa/helpers/MsaRowHeightController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/helpers/MsaRowHeightController.h b/src/corelibs/U2View/src/ov_msa/helpers/MsaRowHeightController.h index 9e93fd8aa945f982e250d2136bf47ba6f217e863..22a112d91eb7c0753cc4b5bbafd67c0a32ef1320 100644 --- a/src/corelibs/U2View/src/ov_msa/helpers/MsaRowHeightController.h +++ b/src/corelibs/U2View/src/ov_msa/helpers/MsaRowHeightController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/helpers/RowHeightController.cpp b/src/corelibs/U2View/src/ov_msa/helpers/RowHeightController.cpp index 2873242ff5bd433aea8ec842fe9143e626e96659..e9c1c77f569a295ad1a3dd26b375808b635418c2 100644 --- a/src/corelibs/U2View/src/ov_msa/helpers/RowHeightController.cpp +++ b/src/corelibs/U2View/src/ov_msa/helpers/RowHeightController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/helpers/RowHeightController.h b/src/corelibs/U2View/src/ov_msa/helpers/RowHeightController.h index 27bb185c7197a18b0b38e392c2ae4caffe3f6bb1..15afb1363f2bec3413b2592945cf9f3b974b9242 100644 --- a/src/corelibs/U2View/src/ov_msa/helpers/RowHeightController.h +++ b/src/corelibs/U2View/src/ov_msa/helpers/RowHeightController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/helpers/ScrollController.cpp b/src/corelibs/U2View/src/ov_msa/helpers/ScrollController.cpp index 89c1fe46a83415b9476010c32a48a9fcd5006f2e..8fd09abd8c9357c21f242af6f648168f78c03bfd 100644 --- a/src/corelibs/U2View/src/ov_msa/helpers/ScrollController.cpp +++ b/src/corelibs/U2View/src/ov_msa/helpers/ScrollController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/helpers/ScrollController.h b/src/corelibs/U2View/src/ov_msa/helpers/ScrollController.h index e3279c26f77386aae646a598ca80ff00790cdd77..317887d56990964c9d6e7ee4c17f2ab71a4d9354 100644 --- a/src/corelibs/U2View/src/ov_msa/helpers/ScrollController.h +++ b/src/corelibs/U2View/src/ov_msa/helpers/ScrollController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/view_rendering/MaConsensusAreaRenderer.cpp b/src/corelibs/U2View/src/ov_msa/view_rendering/MaConsensusAreaRenderer.cpp index be394f1caef25c7cf67f3e7efed27732ac5d3952..f40d1bbcd6c8d9e8dc7cfa7b230bd77f7222b243 100644 --- a/src/corelibs/U2View/src/ov_msa/view_rendering/MaConsensusAreaRenderer.cpp +++ b/src/corelibs/U2View/src/ov_msa/view_rendering/MaConsensusAreaRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -233,7 +233,7 @@ void MaConsensusAreaRenderer::drawConsensusChar(QPainter &painter, const Consens } if (settings.highlightMismatches && charData.isMismatch) { - color = settings.colorScheme->getColor(0, 0, charData.consensusChar); + color = settings.colorScheme->getBackgroundColor(0, 0, charData.consensusChar); if (!color.isValid()) { color = DEFAULT_MISMATCH_COLOR; } diff --git a/src/corelibs/U2View/src/ov_msa/view_rendering/MaConsensusAreaRenderer.h b/src/corelibs/U2View/src/ov_msa/view_rendering/MaConsensusAreaRenderer.h index b2cbfc12175874340d8789501e0eee6e073ef9d4..f3ada2ac79a20a3f5e1a54c8408c53f17ecc7236 100644 --- a/src/corelibs/U2View/src/ov_msa/view_rendering/MaConsensusAreaRenderer.h +++ b/src/corelibs/U2View/src/ov_msa/view_rendering/MaConsensusAreaRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorConsensusArea.cpp b/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorConsensusArea.cpp index 81bc203ed5a138c617a6bf35d258f7413165c2de..5fbe6702ed17a580958d519f067a3d9e5f4c1aad 100644 --- a/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorConsensusArea.cpp +++ b/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorConsensusArea.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorConsensusArea.h b/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorConsensusArea.h index 53dd71e2c0ca71933600abe23c6b0e2f7f8cfebe..28921447dd18aa5aeb3bcbe38d350ce9abf4f7f6 100644 --- a/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorConsensusArea.h +++ b/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorConsensusArea.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorSelection.cpp b/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorSelection.cpp index 9928bc911e218d7b30823464721e87549b157980..e364aad5faa938ce02fe28bb69e10ab50073bf97 100644 --- a/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorSelection.cpp +++ b/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorSelection.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorSelection.h b/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorSelection.h index 095c76dc83742585a414f4428051a71d2d4e02d5..ef4f86c9e06fdc534798135476f813a76e81d694 100644 --- a/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorSelection.h +++ b/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorSelection.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorSequenceArea.cpp b/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorSequenceArea.cpp index 3ae17f0904e6035b9b1bd914f11b692bdb8d7c09..947baa5590aa7954d1a71693fce5cc20ed049106 100644 --- a/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorSequenceArea.cpp +++ b/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorSequenceArea.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -613,7 +613,7 @@ void MaEditorSequenceArea::onVisibleRangeChanged() { const QList<int> visibleRows = ui->getDrawHelper()->getVisibleRowsIndexes(height()); foreach (const int rowIndex, visibleRows) { - SAFE_POINT(rowIndex < rowsNames.size(), QString("Row index is out of rowsNames boudaries: index is %1, size is %2").arg(rowIndex).arg(rowsNames.size()), ); + SAFE_POINT(rowIndex < rowsNames.size(), QString("Row index is out of rowsNames boundaries: index is %1, size is %2").arg(rowIndex).arg(rowsNames.size()), ); visibleRowsNames << rowsNames[rowIndex]; } diff --git a/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorSequenceArea.h b/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorSequenceArea.h index 962911280feb534945635613ff85e669c6b8e5f7..afcc8532d4df17a4cd4da081fd51dd261d833326 100644 --- a/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorSequenceArea.h +++ b/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorSequenceArea.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorUtils.cpp b/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorUtils.cpp index 9f432f9d9c23cf1685732ed02ce2a1cc7fc1728e..f7ea0af8175acc6c8335ee5232d94405b1ed49f3 100644 --- a/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorUtils.cpp +++ b/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorUtils.h b/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorUtils.h index 19032d4b90e9b99441bccd182577537b59613813..c19b7c20ff9835fea2ceac103107f3fd7cdbb0ab 100644 --- a/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorUtils.h +++ b/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorWgt.cpp b/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorWgt.cpp index f6d3b320ffe520bb0b815ea9e9f4fbefa9034884..cd12e54a966490e1b2957825a2071bb053a2cc46 100644 --- a/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorWgt.cpp +++ b/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorWgt.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorWgt.h b/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorWgt.h index ea6c1f778707c370448a77c1d9e67ae3a0e4aecc..232c0ef0071ca16d3c61c3431dada1d085ee7e11 100644 --- a/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorWgt.h +++ b/src/corelibs/U2View/src/ov_msa/view_rendering/MaEditorWgt.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/view_rendering/McaConsensusAreaRenderer.cpp b/src/corelibs/U2View/src/ov_msa/view_rendering/McaConsensusAreaRenderer.cpp index 7e752d209ad7c8a7feddecd3005f8b21836b63cf..8dfcb5fa7cb1ba74441007d2e74d6abf35bfba4a 100644 --- a/src/corelibs/U2View/src/ov_msa/view_rendering/McaConsensusAreaRenderer.cpp +++ b/src/corelibs/U2View/src/ov_msa/view_rendering/McaConsensusAreaRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/view_rendering/McaConsensusAreaRenderer.h b/src/corelibs/U2View/src/ov_msa/view_rendering/McaConsensusAreaRenderer.h index 1184055de4c4f2f9e072051783cf83faa9a64bf2..48967d3d4b681de7214d042cff94f1f8138bfafb 100644 --- a/src/corelibs/U2View/src/ov_msa/view_rendering/McaConsensusAreaRenderer.h +++ b/src/corelibs/U2View/src/ov_msa/view_rendering/McaConsensusAreaRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/view_rendering/McaReferenceAreaRenderer.cpp b/src/corelibs/U2View/src/ov_msa/view_rendering/McaReferenceAreaRenderer.cpp index 97c01135748946ea17517d054b320188bdb0bc0b..a52c454a9bf97ee51b3d03b4ebdb26a966587313 100644 --- a/src/corelibs/U2View/src/ov_msa/view_rendering/McaReferenceAreaRenderer.cpp +++ b/src/corelibs/U2View/src/ov_msa/view_rendering/McaReferenceAreaRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -83,7 +83,7 @@ void McaReferenceAreaRenderer::drawSequence(QPainter &p, const QSize &/*canvasSi const char c = sequenceRegion[(int)(position - region.startPos)]; QRect charRect(baseXRange.startPos, 0, baseXRange.length + 1, commonMetrics.lineHeight); - const QColor color = scheme->getColor(0, 0, c); + const QColor color = scheme->getBackgroundColor(0, 0, c); if (color.isValid()) { p.fillRect(charRect, color); } diff --git a/src/corelibs/U2View/src/ov_msa/view_rendering/McaReferenceAreaRenderer.h b/src/corelibs/U2View/src/ov_msa/view_rendering/McaReferenceAreaRenderer.h index d803a58148961d54ad8528c037998ee7f871c8c9..e5533c0bf9ebc500b1e235bfcbd5cd672062616c 100644 --- a/src/corelibs/U2View/src/ov_msa/view_rendering/McaReferenceAreaRenderer.h +++ b/src/corelibs/U2View/src/ov_msa/view_rendering/McaReferenceAreaRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/view_rendering/SequenceAreaRenderer.cpp b/src/corelibs/U2View/src/ov_msa/view_rendering/SequenceAreaRenderer.cpp index d889468a91ccfe961796843431a08e9f35551ec0..18d260a7abc7573b4f6ca120046ab7f827f351b4 100644 --- a/src/corelibs/U2View/src/ov_msa/view_rendering/SequenceAreaRenderer.cpp +++ b/src/corelibs/U2View/src/ov_msa/view_rendering/SequenceAreaRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -117,6 +117,7 @@ int SequenceAreaRenderer::drawRow(QPainter &painter, const MultipleAlignment &ma MultipleAlignmentRow row = ma->getRow(rowIndex); const int rowHeight = ui->getRowHeightController()->getSequenceHeight(); const int baseWidth = ui->getBaseWidthController()->getBaseWidth(); + const QPen backupPen = painter.pen(); for (int pos = region.startPos; pos <= regionEnd; pos++) { if (!drawLeadingAndTrailingGaps && (pos < row->getCoreStart() || pos > row->getCoreStart() + row->getCoreLength() - 1)) { @@ -128,26 +129,29 @@ int SequenceAreaRenderer::drawRow(QPainter &painter, const MultipleAlignment &ma char c = ma->charAt(rowIndex, pos); bool highlight = false; - QColor color = seqAreaWgt->getCurrentColorScheme()->getColor(rowIndex, pos, c); //! SANGER_TODO: add NULL checks or do smt with the infrastructure + QColor backgroundColor = seqAreaWgt->getCurrentColorScheme()->getBackgroundColor(rowIndex, pos, c); //! SANGER_TODO: add NULL checks or do smt with the infrastructure + QColor fontColor = seqAreaWgt->getCurrentColorScheme()->getFontColor(rowIndex, pos, c); //! SANGER_TODO: add NULL checks or do smt with the infrastructure if (isGapsScheme || highlightingScheme->getFactory()->isRefFree()) { //schemes which applied without reference const char refChar = '\n'; - highlightingScheme->process(refChar, c, color, highlight, pos, rowIndex); + highlightingScheme->process(refChar, c, backgroundColor, highlight, pos, rowIndex); } else if (rowIndex == refSeq || refSeqName.isEmpty()) { highlight = true; } else { const char refChar = editor->getReferenceCharAt(pos); - highlightingScheme->process(refChar, c, color, highlight, pos, rowIndex); + highlightingScheme->process(refChar, c, backgroundColor, highlight, pos, rowIndex); } - if (color.isValid() && highlight) { - painter.fillRect(charRect, color); + if (backgroundColor.isValid() && highlight) { + painter.fillRect(charRect, backgroundColor); } if (isResizeMode) { + painter.setPen(fontColor); painter.drawText(charRect, Qt::AlignCenter, QString(c)); } xStart += baseWidth; } + painter.setPen(backupPen); return rowHeight; } diff --git a/src/corelibs/U2View/src/ov_msa/view_rendering/SequenceAreaRenderer.h b/src/corelibs/U2View/src/ov_msa/view_rendering/SequenceAreaRenderer.h index 80d2f440c1fd3e0da8a585075e52f3273eff34e2..5bebb8c2a8efb12f78f3a8f95fbd2a5efea923c7 100644 --- a/src/corelibs/U2View/src/ov_msa/view_rendering/SequenceAreaRenderer.h +++ b/src/corelibs/U2View/src/ov_msa/view_rendering/SequenceAreaRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/view_rendering/SequenceWithChromatogramAreaRenderer.cpp b/src/corelibs/U2View/src/ov_msa/view_rendering/SequenceWithChromatogramAreaRenderer.cpp index 5adfc388261cf3af80635d3f22b22cc5fd52f304..58656eebb30e3ef222dc11f9e41ff41e79e54516 100644 --- a/src/corelibs/U2View/src/ov_msa/view_rendering/SequenceWithChromatogramAreaRenderer.cpp +++ b/src/corelibs/U2View/src/ov_msa/view_rendering/SequenceWithChromatogramAreaRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_msa/view_rendering/SequenceWithChromatogramAreaRenderer.h b/src/corelibs/U2View/src/ov_msa/view_rendering/SequenceWithChromatogramAreaRenderer.h index 899a3fafb0d9316193b46bd7b8f89199beb295ca..f55440ae62b0db65bbde07cff906df5dc968f000 100644 --- a/src/corelibs/U2View/src/ov_msa/view_rendering/SequenceWithChromatogramAreaRenderer.h +++ b/src/corelibs/U2View/src/ov_msa/view_rendering/SequenceWithChromatogramAreaRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/CreateBranchesTask.h b/src/corelibs/U2View/src/ov_phyltree/CreateBranchesTask.h index a49a4427e791df7a1b55493b5f37739e2b0e8f3e..2b0389918932bddf1ccedfdb4e4594e6449a665a 100644 --- a/src/corelibs/U2View/src/ov_phyltree/CreateBranchesTask.h +++ b/src/corelibs/U2View/src/ov_phyltree/CreateBranchesTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/CreateCircularBranchesTask.cpp b/src/corelibs/U2View/src/ov_phyltree/CreateCircularBranchesTask.cpp index 701a41f245bfc73d965b8d32447c936b1d5afd0d..240cafd9373818328d8cb3dc1a1c1f27e17d89c0 100644 --- a/src/corelibs/U2View/src/ov_phyltree/CreateCircularBranchesTask.cpp +++ b/src/corelibs/U2View/src/ov_phyltree/CreateCircularBranchesTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/CreateCircularBranchesTask.h b/src/corelibs/U2View/src/ov_phyltree/CreateCircularBranchesTask.h index 048fb38ef155ccea1c06d01c45d831a219a96d66..c219a42105d4b7ebe9dbac04b7570221926c5442 100644 --- a/src/corelibs/U2View/src/ov_phyltree/CreateCircularBranchesTask.h +++ b/src/corelibs/U2View/src/ov_phyltree/CreateCircularBranchesTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/CreateRectangularBranchesTask.cpp b/src/corelibs/U2View/src/ov_phyltree/CreateRectangularBranchesTask.cpp index 553206279b68b9a548e3b713475eb4f8cdbb267d..77c7714c6c1e34ae4f220fe097622f1df6f1cf9d 100644 --- a/src/corelibs/U2View/src/ov_phyltree/CreateRectangularBranchesTask.cpp +++ b/src/corelibs/U2View/src/ov_phyltree/CreateRectangularBranchesTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/CreateRectangularBranchesTask.h b/src/corelibs/U2View/src/ov_phyltree/CreateRectangularBranchesTask.h index b7d96ecad3ccae87a4f9aab456508543aa9623c3..a8841a69d8b6a0c3e1732b352bc0172436060e61 100644 --- a/src/corelibs/U2View/src/ov_phyltree/CreateRectangularBranchesTask.h +++ b/src/corelibs/U2View/src/ov_phyltree/CreateRectangularBranchesTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/CreateUnrootedBranchesTask.cpp b/src/corelibs/U2View/src/ov_phyltree/CreateUnrootedBranchesTask.cpp index e5003f7eee3e64940385f037c4c5ab1c2792dea5..6abf7e27d2142081e469c9d5faa77b403aa85b9a 100644 --- a/src/corelibs/U2View/src/ov_phyltree/CreateUnrootedBranchesTask.cpp +++ b/src/corelibs/U2View/src/ov_phyltree/CreateUnrootedBranchesTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/CreateUnrootedBranchesTask.h b/src/corelibs/U2View/src/ov_phyltree/CreateUnrootedBranchesTask.h index e75dffd49e0735d79c3e30c99114b8ba580eb640..93c209650f21979a93d0073db75db04602a60620 100644 --- a/src/corelibs/U2View/src/ov_phyltree/CreateUnrootedBranchesTask.h +++ b/src/corelibs/U2View/src/ov_phyltree/CreateUnrootedBranchesTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/GraphicsBranchItem.cpp b/src/corelibs/U2View/src/ov_phyltree/GraphicsBranchItem.cpp index 8acc1a666b2e0b80c7759ad07f915935865fa9b2..644194fd5aac59c5c3c3d626ca39489f0baa10b1 100644 --- a/src/corelibs/U2View/src/ov_phyltree/GraphicsBranchItem.cpp +++ b/src/corelibs/U2View/src/ov_phyltree/GraphicsBranchItem.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/GraphicsBranchItem.h b/src/corelibs/U2View/src/ov_phyltree/GraphicsBranchItem.h index 40697edcf59e2652d260dfb2ed96585fc0d5ea2a..9b4047f41a91b88dbc228328681ba7125a96c604 100644 --- a/src/corelibs/U2View/src/ov_phyltree/GraphicsBranchItem.h +++ b/src/corelibs/U2View/src/ov_phyltree/GraphicsBranchItem.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/GraphicsButtonItem.cpp b/src/corelibs/U2View/src/ov_phyltree/GraphicsButtonItem.cpp index 09b5903734270603caa332bfaebfb391b4a97802..6622379b4aadfcefa53d8f9741525feac3dac090 100644 --- a/src/corelibs/U2View/src/ov_phyltree/GraphicsButtonItem.cpp +++ b/src/corelibs/U2View/src/ov_phyltree/GraphicsButtonItem.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/GraphicsButtonItem.h b/src/corelibs/U2View/src/ov_phyltree/GraphicsButtonItem.h index 4bf816807cba0096f967b73d3c59051889e6ddd8..6dfbf5fcc99df36d1a825a0cccfe94c01e6fae4c 100644 --- a/src/corelibs/U2View/src/ov_phyltree/GraphicsButtonItem.h +++ b/src/corelibs/U2View/src/ov_phyltree/GraphicsButtonItem.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/GraphicsCircularBranchItem.cpp b/src/corelibs/U2View/src/ov_phyltree/GraphicsCircularBranchItem.cpp index 988b629e8eb43d7348ca89aac0007e4b5e87f7aa..cfe92cf0585e205f4758b8edaf08bc0d52f2fdf1 100644 --- a/src/corelibs/U2View/src/ov_phyltree/GraphicsCircularBranchItem.cpp +++ b/src/corelibs/U2View/src/ov_phyltree/GraphicsCircularBranchItem.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/GraphicsCircularBranchItem.h b/src/corelibs/U2View/src/ov_phyltree/GraphicsCircularBranchItem.h index 9f1e5530b4e302ddd3881c6b5a30e639b4158163..47f763c0dee5923dde5fb25878ca6951c07eb787 100644 --- a/src/corelibs/U2View/src/ov_phyltree/GraphicsCircularBranchItem.h +++ b/src/corelibs/U2View/src/ov_phyltree/GraphicsCircularBranchItem.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/GraphicsRectangularBranchItem.cpp b/src/corelibs/U2View/src/ov_phyltree/GraphicsRectangularBranchItem.cpp index a7d05b16e9668bce503689a0bae215fbe36ef20a..4e03cf73be090bbb836be41a18bd8f03eccba602 100644 --- a/src/corelibs/U2View/src/ov_phyltree/GraphicsRectangularBranchItem.cpp +++ b/src/corelibs/U2View/src/ov_phyltree/GraphicsRectangularBranchItem.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/GraphicsRectangularBranchItem.h b/src/corelibs/U2View/src/ov_phyltree/GraphicsRectangularBranchItem.h index 77835fdef5a0b27f0112628dffd4646fdc93004f..6399bcf6d17f270fbf2527473b7b29509cf88930 100644 --- a/src/corelibs/U2View/src/ov_phyltree/GraphicsRectangularBranchItem.h +++ b/src/corelibs/U2View/src/ov_phyltree/GraphicsRectangularBranchItem.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/GraphicsUnrootedBranchItem.cpp b/src/corelibs/U2View/src/ov_phyltree/GraphicsUnrootedBranchItem.cpp index a359e8df85e54cf0a77ecfe65640cc4fe034442a..4fd0b13364a7906bbfd974f9a2bcd2b76939b3d3 100644 --- a/src/corelibs/U2View/src/ov_phyltree/GraphicsUnrootedBranchItem.cpp +++ b/src/corelibs/U2View/src/ov_phyltree/GraphicsUnrootedBranchItem.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/GraphicsUnrootedBranchItem.h b/src/corelibs/U2View/src/ov_phyltree/GraphicsUnrootedBranchItem.h index 821b991c25e4934cfa8a9c159088ebec3437544b..dabc9c1eb68618468824194f1cc0c2c909969648 100644 --- a/src/corelibs/U2View/src/ov_phyltree/GraphicsUnrootedBranchItem.h +++ b/src/corelibs/U2View/src/ov_phyltree/GraphicsUnrootedBranchItem.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/TreeSettings.h b/src/corelibs/U2View/src/ov_phyltree/TreeSettings.h index 5c5e68721099ecef5d3bce3bbda57a449884610e..fb8f37efb2fc295cee8b54a80a87e7c71b205031 100644 --- a/src/corelibs/U2View/src/ov_phyltree/TreeSettings.h +++ b/src/corelibs/U2View/src/ov_phyltree/TreeSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/TreeViewer.cpp b/src/corelibs/U2View/src/ov_phyltree/TreeViewer.cpp index e3df71955b43488a10df860ef26c305126c49d95..642a1b6a1f2e0f6a212ee237125956bc93a088e4 100644 --- a/src/corelibs/U2View/src/ov_phyltree/TreeViewer.cpp +++ b/src/corelibs/U2View/src/ov_phyltree/TreeViewer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/TreeViewer.h b/src/corelibs/U2View/src/ov_phyltree/TreeViewer.h index cf87ac348f1dda7add6df242f030c780b4fcccfc..29f0a967d59eb05d5a875ed4b84dd95ff3dfb01f 100644 --- a/src/corelibs/U2View/src/ov_phyltree/TreeViewer.h +++ b/src/corelibs/U2View/src/ov_phyltree/TreeViewer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/TreeViewerFactory.cpp b/src/corelibs/U2View/src/ov_phyltree/TreeViewerFactory.cpp index 819253eb8159f429c41bb242f962a36326a3130f..e14ebf270b5ee89cef24ab884da23cdde236bb74 100644 --- a/src/corelibs/U2View/src/ov_phyltree/TreeViewerFactory.cpp +++ b/src/corelibs/U2View/src/ov_phyltree/TreeViewerFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/TreeViewerFactory.h b/src/corelibs/U2View/src/ov_phyltree/TreeViewerFactory.h index 10b911021e5d6756007f9e962c63827a8a0a9a95..d3bc8bf1973fcdd5850299d8118c46a97a97b961 100644 --- a/src/corelibs/U2View/src/ov_phyltree/TreeViewerFactory.h +++ b/src/corelibs/U2View/src/ov_phyltree/TreeViewerFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/TreeViewerState.cpp b/src/corelibs/U2View/src/ov_phyltree/TreeViewerState.cpp index 869d2c77d6c0ffb681982062a7d7b3b7a0112b70..700bba3f4929b8897a6a6b0d98a9a6b628cb2dd2 100644 --- a/src/corelibs/U2View/src/ov_phyltree/TreeViewerState.cpp +++ b/src/corelibs/U2View/src/ov_phyltree/TreeViewerState.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/TreeViewerState.h b/src/corelibs/U2View/src/ov_phyltree/TreeViewerState.h index ae565d5e4a4d8ff4d736b0c9653e463d32e7fa66..b736e47897d3470a7d2cd9b32c3728bf9219b7e5 100644 --- a/src/corelibs/U2View/src/ov_phyltree/TreeViewerState.h +++ b/src/corelibs/U2View/src/ov_phyltree/TreeViewerState.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/TreeViewerTasks.cpp b/src/corelibs/U2View/src/ov_phyltree/TreeViewerTasks.cpp index e251cd0814b1623c9b6dbde8d5f7163b5c3a4eab..31becdd5446c0c0ef45c248467d82af4dcdfcd81 100644 --- a/src/corelibs/U2View/src/ov_phyltree/TreeViewerTasks.cpp +++ b/src/corelibs/U2View/src/ov_phyltree/TreeViewerTasks.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/TreeViewerTasks.h b/src/corelibs/U2View/src/ov_phyltree/TreeViewerTasks.h index e3048ae16521881dea86521da43630f8da76eee4..0dae089a8d33e2f02a5953c668176578c602919a 100644 --- a/src/corelibs/U2View/src/ov_phyltree/TreeViewerTasks.h +++ b/src/corelibs/U2View/src/ov_phyltree/TreeViewerTasks.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/TreeViewerUtils.cpp b/src/corelibs/U2View/src/ov_phyltree/TreeViewerUtils.cpp index 7df1319dd1fa03b969e518e68c0be672ec2cf186..9ead9ab3a79031be6e21cb73194339232bc9fa24 100644 --- a/src/corelibs/U2View/src/ov_phyltree/TreeViewerUtils.cpp +++ b/src/corelibs/U2View/src/ov_phyltree/TreeViewerUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_phyltree/TreeViewerUtils.h b/src/corelibs/U2View/src/ov_phyltree/TreeViewerUtils.h index c9b76384fb44226d226c56e9122bfb6a72a88dd9..7eeb31ad5da88550090373e62c337771bb3c78c8 100644 --- a/src/corelibs/U2View/src/ov_phyltree/TreeViewerUtils.h +++ b/src/corelibs/U2View/src/ov_phyltree/TreeViewerUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/ADVAnnotationCreation.cpp b/src/corelibs/U2View/src/ov_sequence/ADVAnnotationCreation.cpp index 6b56abd12ab95a3b9dc813ccf04144751bec1d1f..ae4b7a882075492f62dc03e2d904825181a850a5 100644 --- a/src/corelibs/U2View/src/ov_sequence/ADVAnnotationCreation.cpp +++ b/src/corelibs/U2View/src/ov_sequence/ADVAnnotationCreation.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/ADVAnnotationCreation.h b/src/corelibs/U2View/src/ov_sequence/ADVAnnotationCreation.h index 063d3686398cd1ce10e77e92847395e654ba94c7..b8ca4254066af44eff476974c8fcd69ee06605e4 100644 --- a/src/corelibs/U2View/src/ov_sequence/ADVAnnotationCreation.h +++ b/src/corelibs/U2View/src/ov_sequence/ADVAnnotationCreation.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/ADVClipboard.cpp b/src/corelibs/U2View/src/ov_sequence/ADVClipboard.cpp index 0a970e3bd4875fd77998f5fd98582385947f5dfa..1138d4c449967415895565917188dc6e72801d2b 100644 --- a/src/corelibs/U2View/src/ov_sequence/ADVClipboard.cpp +++ b/src/corelibs/U2View/src/ov_sequence/ADVClipboard.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/ADVClipboard.h b/src/corelibs/U2View/src/ov_sequence/ADVClipboard.h index 80b869b7d81d079dbb14630cbd74241f37878e08..97eaed55c88b1df9be1eb5ecb5493bb32f2ac0e6 100644 --- a/src/corelibs/U2View/src/ov_sequence/ADVClipboard.h +++ b/src/corelibs/U2View/src/ov_sequence/ADVClipboard.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/ADVConstants.h b/src/corelibs/U2View/src/ov_sequence/ADVConstants.h index 07a75496b7fcf221141707ad09437cda05bcdbda..dacdb7028108de73faca7e3617da1d8e77282959 100644 --- a/src/corelibs/U2View/src/ov_sequence/ADVConstants.h +++ b/src/corelibs/U2View/src/ov_sequence/ADVConstants.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/ADVGraphModel.cpp b/src/corelibs/U2View/src/ov_sequence/ADVGraphModel.cpp index 6e4a22effe8609cc2b4ac8de79669ebcd3cae9e0..46fbff59e2b7f621fa6c633f565c543313af186a 100644 --- a/src/corelibs/U2View/src/ov_sequence/ADVGraphModel.cpp +++ b/src/corelibs/U2View/src/ov_sequence/ADVGraphModel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -168,20 +168,21 @@ void GSequenceGraphUtils::fitToScreen(const QVector<float>& data, int dataStartB int GSequenceGraphUtils::getNumSteps(const U2Region& range, int w, int s) { if(range.length < w) return 1; - int steps = (range.length - w) / s + 1; - return steps; + qint64 steps = (range.length - w) / s + 1; + return (int) steps; } ////////////////////////////////////////////////////////////////////////// //drawer -const QString GSequenceGraphDrawer::DEFAULT_COLOR(QObject::tr("Default color")); -const int GSequenceGraphDrawer::UNKNOWN_VAL = -1; +const float GSequenceGraphDrawer::UNKNOWN_VAL = -1000; // todo: use numeric limits and test all platforms GSequenceGraphDrawer::GSequenceGraphDrawer(GSequenceGraphView* v, const GSequenceGraphWindowData& wd, QMap<QString,QColor> colors) : QObject(v), view(v), lineColors(colors), globalMin(0), globalMax(0), wdata(wd) { + DEFAULT_COLOR = tr("Default color"); + connect(v, SIGNAL(si_labelAdded(const QSharedPointer<GSequenceGraphData>&, GraphLabel*, const QRect&)), this, SLOT(sl_labelAdded(const QSharedPointer<GSequenceGraphData>&, GraphLabel*, const QRect&))); connect(v, SIGNAL(si_labelMoved(const QSharedPointer<GSequenceGraphData>&, GraphLabel*, const QRect&)), @@ -652,19 +653,36 @@ bool GSequenceGraphDrawer::calculateLabelData(const QRect &rect, const PairVecto return true; } +QPair<float, float> GSequenceGraphDrawer::getMinAndMaxInRange(const PairVector& points, const U2Region& region) { + QPair<float, float> result(UNKNOWN_VAL, UNKNOWN_VAL); + for (qint64 x = region.startPos, n = region.endPos(); x < n; x++) { + float value = calculatePointValue(points, x); + if (isUnknownValue(value)) { + continue; + } + result.first = qFuzzyCompare(result.first, UNKNOWN_VAL) ? value : qMin(value, result.first) ; + result.second = qFuzzyCompare(result.second, UNKNOWN_VAL) ? value : qMax(value, result.second) ; + } + return result; +} + + + float GSequenceGraphDrawer::calculateLabelValue(int nPoints, const PairVector &points, GraphLabel *label, int xcoordInRect) { float value = calculatePointValue(points, xcoordInRect); if (value == UNKNOWN_VAL) { return 2 * globalMax; } - const int comparisonWindowSize = 50; - - int startPos = qMax(xcoordInRect, 0); - startPos = qMin(startPos, nPoints - comparisonWindowSize/2 - 1); - U2Region comparisonWindow(startPos, comparisonWindowSize/2); - bool isExtremum = isExtremumPoint(nPoints, points, value, comparisonWindow); - if(true == isExtremum) { + int rangeToCheck = 50; + int startPos = qBound(0, xcoordInRect - rangeToCheck/2, nPoints); + int endPos = qBound(startPos, xcoordInRect + rangeToCheck/2, nPoints); + QPair<float, float> minAndMax = getMinAndMaxInRange(points, U2Region(startPos, endPos - startPos)); + bool flat = qFuzzyCompare(minAndMax.first, minAndMax.second); + bool isMin = qFuzzyCompare(value, minAndMax.first); + bool isMax = qFuzzyCompare(value, minAndMax.second); + bool isExtremum = !flat && (isMin || isMax); + if (isExtremum) { label->mark(); } else { label->unmark(); @@ -706,64 +724,6 @@ float GSequenceGraphDrawer::calculatePointValue(const PairVector &points, int xc return value; } -bool GSequenceGraphDrawer::isExtremumPoint(int npoints, const PairVector& points, float value, U2Region& comparisonWindow) -{ - int compareRes = -2; - int length = comparisonWindow.length; - int counter = 0; - const QVector<float> &firstPoints = points.firstPoints; - for(int x = comparisonWindow.startPos; counter <= length; x++) - { - if (x >= npoints - 2) { - break; - } - if (isUnknownValue(firstPoints.at(x))) { - continue; - } - counter++; - float comparedValue = firstPoints.at(x); - if(true == qFuzzyCompare(value, comparedValue)) { - if(0 == compareRes) { - return false; - } - compareRes = 0; - } else { - bool condition = value > comparedValue; - if((true == condition && compareRes == -1) || (false == condition && compareRes == 1)) { - return false; - } - compareRes = condition ? 1 : -1; - } - } - counter = 0; - for(int x = comparisonWindow.startPos; counter <= length; x--) { - if (x <= 0) { - break; - } - if (isUnknownValue(firstPoints.at(x))) { - continue; - } - counter++; - float comparedValue = firstPoints.at(x); - if (qFuzzyCompare(value, comparedValue)) { - if (compareRes == 0) { - return false; - } - compareRes = 0; - } else { - bool condition = value > comparedValue; - if ((condition && compareRes == -1) || (!condition && compareRes == 1)) { - return false; - } - compareRes = condition ? 1 : -1; - } - } - if (compareRes == 0|| compareRes == -2) { - return false; - } - return true; -} - static void align(int start, int end, int win, int step, int seqLen, int& alignedFirst, int& alignedLast) { int win2 = (win + 1) / 2; int notAlignedFirst = start - win2; diff --git a/src/corelibs/U2View/src/ov_sequence/ADVGraphModel.h b/src/corelibs/U2View/src/ov_sequence/ADVGraphModel.h index af37e3a9f59fb4c8145cb7b33e47fe805208b4e3..0297fb84aae14486b9fe25f71d63ceb431a267c5 100644 --- a/src/corelibs/U2View/src/ov_sequence/ADVGraphModel.h +++ b/src/corelibs/U2View/src/ov_sequence/ADVGraphModel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -118,8 +118,7 @@ public: static bool isUnknownValue(float value) {return qFuzzyCompare(value, UNKNOWN_VAL);} - static const QString DEFAULT_COLOR; - static const int UNKNOWN_VAL; + static const float UNKNOWN_VAL; signals: void si_graphDataUpdated(); @@ -137,7 +136,7 @@ protected: bool updateStaticLabels(const QSharedPointer<GSequenceGraphData>& graph, GraphLabel* label, const QRect& rect); void updateMovingLabels(const QSharedPointer<GSequenceGraphData>& graph, GraphLabel* label, const QRect& rect); void updateStaticLabels(MultiLabel& multiLabel, const QRect& rect); - bool isExtremumPoint(int npoints, const PairVector& points, float value, U2Region& comparisonWindow); + QPair<float, float> getMinAndMaxInRange(const PairVector& points, const U2Region& region); protected slots: void sl_labelAdded(const QSharedPointer<GSequenceGraphData>&, GraphLabel*, const QRect&); @@ -154,6 +153,9 @@ protected: GSequenceGraphWindowData wdata; GSequenceGraphMinMaxCutOffData commdata; BackgroundTaskRunner<PairVector> calculationTaskRunner; + +private: + QString DEFAULT_COLOR; }; diff --git a/src/corelibs/U2View/src/ov_sequence/ADVSequenceObjectContext.cpp b/src/corelibs/U2View/src/ov_sequence/ADVSequenceObjectContext.cpp index f72efa2bba7bb78e1f8b22cc6d7af8f0649ce751..d7fd069b6abb244beb75ed6e8fa44979b7545324 100644 --- a/src/corelibs/U2View/src/ov_sequence/ADVSequenceObjectContext.cpp +++ b/src/corelibs/U2View/src/ov_sequence/ADVSequenceObjectContext.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/ADVSequenceObjectContext.h b/src/corelibs/U2View/src/ov_sequence/ADVSequenceObjectContext.h index 7483546638699d6f18c176cffc255a5b373dcd96..deed47cdbb8ae3e007acb81911ba9ebb2d89a9df 100644 --- a/src/corelibs/U2View/src/ov_sequence/ADVSequenceObjectContext.h +++ b/src/corelibs/U2View/src/ov_sequence/ADVSequenceObjectContext.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/ADVSequenceWidget.cpp b/src/corelibs/U2View/src/ov_sequence/ADVSequenceWidget.cpp index 3f008b53ecd04694149b0f607c5258605ff47c13..0329cb6b18bba6fb49ba8001b665c0e00ff32461 100644 --- a/src/corelibs/U2View/src/ov_sequence/ADVSequenceWidget.cpp +++ b/src/corelibs/U2View/src/ov_sequence/ADVSequenceWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/ADVSequenceWidget.h b/src/corelibs/U2View/src/ov_sequence/ADVSequenceWidget.h index 997325cfc18d486e48f918a628d986e67e8daabc..0e94b157f185b7724fff3bf66d5d8fac69614502 100644 --- a/src/corelibs/U2View/src/ov_sequence/ADVSequenceWidget.h +++ b/src/corelibs/U2View/src/ov_sequence/ADVSequenceWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/ADVSingleSequenceWidget.cpp b/src/corelibs/U2View/src/ov_sequence/ADVSingleSequenceWidget.cpp index 3263c7355932116a79766cf83cae2172e98ffd50..dd4981862e3cb45f6cae6e7d0f429046de75ab7f 100644 --- a/src/corelibs/U2View/src/ov_sequence/ADVSingleSequenceWidget.cpp +++ b/src/corelibs/U2View/src/ov_sequence/ADVSingleSequenceWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -159,12 +159,13 @@ ADVSingleSequenceWidget::ADVSingleSequenceWidget(ADVSequenceObjectContext* seqCt void ADVSingleSequenceWidget::init() { ADVSequenceObjectContext* seqCtx = getSequenceContext(); detView = new DetView(this, seqCtx); - detView->setObjectName("det_view_" + getSequenceObject()->getGObjectName()); + const QString objName = getSequenceObject()->getGObjectName(); + detView->setObjectName("det_view_" + objName); detView->setMouseTracking(true); detView->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); panView = new PanView(this, seqCtx); - panView->setObjectName("pan_view_" + getSequenceObject()->getGObjectName()); + panView->setObjectName("pan_view_" + objName); panView->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); connect(panView, SIGNAL(si_centerPosition(qint64)), SLOT(sl_onLocalCenteringRequest(qint64))); @@ -176,7 +177,7 @@ void ADVSingleSequenceWidget::init() { panView->setFrameView(detView); overview = new Overview(this, seqCtx); - overview->setObjectName("overview_" + getSequenceObject()->getGObjectName()); + overview->setObjectName("overview_" + objName); overview->setMouseTracking(true); overview->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); lineViews.append(overview); diff --git a/src/corelibs/U2View/src/ov_sequence/ADVSingleSequenceWidget.h b/src/corelibs/U2View/src/ov_sequence/ADVSingleSequenceWidget.h index 972e5bac481acc59a912f0d1424cdb2e3a7f1a52..a74fea7f50892ccecfec3ede61a3951a7fff2f30 100644 --- a/src/corelibs/U2View/src/ov_sequence/ADVSingleSequenceWidget.h +++ b/src/corelibs/U2View/src/ov_sequence/ADVSingleSequenceWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/ADVSplitWidget.h b/src/corelibs/U2View/src/ov_sequence/ADVSplitWidget.h index d608c8567ea80c66536efb890f371fdaba3e7e15..6854324e817625493c46eeee1145f601c273f3a3 100644 --- a/src/corelibs/U2View/src/ov_sequence/ADVSplitWidget.h +++ b/src/corelibs/U2View/src/ov_sequence/ADVSplitWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/ADVSyncViewManager.cpp b/src/corelibs/U2View/src/ov_sequence/ADVSyncViewManager.cpp index 0e0a2067390866ba62b440f4358ca8675193aaac..1da3bb851e9d7ce21cae2083cf092c5f360f0ca0 100644 --- a/src/corelibs/U2View/src/ov_sequence/ADVSyncViewManager.cpp +++ b/src/corelibs/U2View/src/ov_sequence/ADVSyncViewManager.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/ADVSyncViewManager.h b/src/corelibs/U2View/src/ov_sequence/ADVSyncViewManager.h index 38142f37964515320185b086473f58bd7bb6ae6e..15a83c1b671648ea42b9c99c368b7f6804b36fd9 100644 --- a/src/corelibs/U2View/src/ov_sequence/ADVSyncViewManager.h +++ b/src/corelibs/U2View/src/ov_sequence/ADVSyncViewManager.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/ADVUtils.cpp b/src/corelibs/U2View/src/ov_sequence/ADVUtils.cpp index f5e4fe09150144f8ca5b73346c4ccd0aebf25f99..6132a8f64b805d67a40c84c63c37df0e3e5d2900 100644 --- a/src/corelibs/U2View/src/ov_sequence/ADVUtils.cpp +++ b/src/corelibs/U2View/src/ov_sequence/ADVUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/ADVUtils.h b/src/corelibs/U2View/src/ov_sequence/ADVUtils.h index b77d273fcaacdeade296b2cd87b36c1f998c61c9..6c563e2fc148e0cf1e0669dbb72fd7cf55126752 100644 --- a/src/corelibs/U2View/src/ov_sequence/ADVUtils.h +++ b/src/corelibs/U2View/src/ov_sequence/ADVUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAView.cpp b/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAView.cpp index c40b32889c910dc22b8c9d4225e59872945601b5..2b8f3bca62870e3e06400faf18266e0086a91b54 100644 --- a/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAView.cpp +++ b/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -212,6 +212,11 @@ QWidget* AnnotatedDNAView::createWidget() { scrolledWidget->installEventFilter(this); scrolledWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum); + clipb = new ADVClipboard(this); + QAction* pasteAction = clipb->getPasteSequenceAction(); + pasteAction->setEnabled(false); + connect(pasteAction, SIGNAL(triggered()), this, SLOT(sl_paste())); + annotationsView = new AnnotationsTreeView(this); annotationsView->setParent(mainSplitter); annotationsView->setObjectName("annotations_tree_view"); @@ -234,11 +239,6 @@ QWidget* AnnotatedDNAView::createWidget() { //TODO: scroll area does not restore focus for last active child widget after Alt-Tab... scrollArea->setWidget(scrolledWidget); - clipb = new ADVClipboard(this); - QAction* pasteAction = clipb->getPasteSequenceAction(); - pasteAction->setEnabled(false); - connect(pasteAction, SIGNAL(triggered()), this, SLOT(sl_paste())); - mainSplitter->installEventFilter(this); mainSplitter->setAcceptDrops(true); @@ -1035,8 +1035,8 @@ void AnnotatedDNAView::cancelAutoAnnotationUpdates(AutoAnnotationObject* aa, boo aaUpdateTask->cancel(); if(removeTaskExist){ *removeTaskExist = false; - foreach(Task* subTask, aaUpdateTask->getSubtasks()){ - RemoveAnnotationsTask* rTask = qobject_cast<RemoveAnnotationsTask*> (subTask); + foreach(const QPointer<Task> &subTask, aaUpdateTask->getSubtasks()){ + RemoveAnnotationsTask* rTask = qobject_cast<RemoveAnnotationsTask*> (subTask.data()); if(rTask && !rTask->isFinished()){*removeTaskExist = true;} } } diff --git a/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAView.h b/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAView.h index 57478f003549f5f88bba198d8a298fccd30658bf..079e128c7a42d9d47bb68fecb79045656edb51b2 100644 --- a/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAView.h +++ b/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewFactory.cpp b/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewFactory.cpp index dd0009d1e795e4be0310e2eca2124cf184f05f3f..ecf0a41cd7a33983df14c6ae30522d3f9852f16d 100644 --- a/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewFactory.cpp +++ b/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewFactory.h b/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewFactory.h index 8af2cc3b65ae5a17c2f68dcef3eb8b94697fd7ae..6bc7490463d6b8ac5b6ae1b44988892ae07ccb70 100644 --- a/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewFactory.h +++ b/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewState.cpp b/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewState.cpp index 1e1709488715c23d05593cd193037493c03b593e..abff5d5c62ed72eb76eb3e589dbba0f6ea40b233 100644 --- a/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewState.cpp +++ b/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewState.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewState.h b/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewState.h index 97375326b758baeb0c10ed91065084ebacf0712b..d575241c29a413d827ec8fc4e4724bed34ff919c 100644 --- a/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewState.h +++ b/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewState.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewTasks.cpp b/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewTasks.cpp index f4e8f603592ca0756f4927ece1301702d8786aff..3469e4a9dbb72d568e1938af77bd38b00e3c16e9 100644 --- a/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewTasks.cpp +++ b/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewTasks.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewTasks.h b/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewTasks.h index 404916b32d3f1a4b437e06f08c4f22aa476c0949..ded7d0470a5c7d7eed1444cd750dae28a342d4b6 100644 --- a/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewTasks.h +++ b/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAViewTasks.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/AnnotationsTreeView.cpp b/src/corelibs/U2View/src/ov_sequence/AnnotationsTreeView.cpp index 885ab12614565cd02624f4cc282f5ea08910741f..2d9f78992a3e8eeface79611e96dacb7c1dcc1c3 100644 --- a/src/corelibs/U2View/src/ov_sequence/AnnotationsTreeView.cpp +++ b/src/corelibs/U2View/src/ov_sequence/AnnotationsTreeView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -199,7 +199,7 @@ AnnotationsTreeView::AnnotationsTreeView(AnnotatedDNAView* _ctx) : ctx(_ctx), dn connect(removeAnnsAndQsAction, SIGNAL(triggered()), SLOT(sl_removeAnnsAndQs())); tree->addAction(removeAnnsAndQsAction); - copyQualifierAction = new QAction(tr("Copy qualifier text"), this); + copyQualifierAction = new QAction(QIcon(":/core/images/copy_qualifier.png"), tr("Copy qualifier text"), this); connect(copyQualifierAction, SIGNAL(triggered()), SLOT(sl_onCopyQualifierValue())); copyQualifierURLAction = new QAction(tr("Copy qualifier URL"), this); @@ -458,7 +458,7 @@ void AnnotationsTreeView::sl_onItemSelectionChanged() { void AnnotationsTreeView::sl_onAnnotationSelectionChanged(AnnotationSelection *, const QList<Annotation *> &added, const QList<Annotation *> &removed) { tree->disconnect(this, SIGNAL(sl_onItemSelectionChanged())); - + clearSelectedNotAnnotations(); foreach (Annotation *a, removed) { AnnotationGroup *g = a->getGroup(); AVAnnotationItem *item = findAnnotationItem(g, a); @@ -968,14 +968,18 @@ void AnnotationsTreeView::sl_onBuildPopupMenu(GObjectView*, QMenu* m) { void AnnotationsTreeView::adjustMenu(QMenu* m) const { QMenu* addMenu = GUIUtils::findSubMenu(m, ADV_MENU_ADD); - SAFE_POINT(addMenu != NULL, "addMenu",); + SAFE_POINT(addMenu != NULL, "addMenu", ); addMenu->addAction(addAnnotationObjectAction); addMenu->addAction(addQualifierAction); QMenu* removeMenu = GUIUtils::findSubMenu(m, ADV_MENU_REMOVE); - SAFE_POINT(removeMenu != NULL, "removeMenu",); + SAFE_POINT(removeMenu != NULL, "removeMenu", ); removeMenu->addAction(removeObjectsFromViewAction); removeMenu->addAction(removeAnnsAndQsAction); + + QMenu* copyMenu = GUIUtils::findSubMenu(m, ADV_MENU_COPY); + SAFE_POINT(removeMenu != NULL, "copyMenu", ); + copyMenu->addAction(copyQualifierAction); } void AnnotationsTreeView::sl_paste(){ @@ -1625,9 +1629,7 @@ void AnnotationsTreeView::sl_itemDoubleClicked(QTreeWidgetItem *i, int) { QVector<U2Region> annotationRegions = ai->annotation->getRegions(); SAFE_POINT(!annotationRegions.isEmpty(), "Annotation regions are empty", ); - foreach(const U2Region& region, annotationRegions) { - annotationDoubleClicked(ai, region); - } + annotationDoubleClicked(ai, annotationRegions.toList()); } if (item->type == AVItemType_Qualifier) { @@ -1675,6 +1677,8 @@ void AnnotationsTreeView::sl_itemExpanded(QTreeWidgetItem *qi) { } } +//TODO: refactor this method +//UTI-155 void AnnotationsTreeView::sl_annotationClicked(AnnotationSelectionData* asd) { AnnotationSelection* annotationSelection = ctx->getAnnotationsSelection(); @@ -1682,24 +1686,24 @@ void AnnotationsTreeView::sl_annotationClicked(AnnotationSelectionData* asd) { CHECK(annotationItems.size() == 1, ); AVAnnotationItem* item = annotationItems.first(); - const QVector<U2Region> selectedRegions = asd->getSelectedRegions(); - CHECK(selectedRegions.size() == 1, ); - const U2Region selectedRegion = selectedRegions.first(); + const qint64 seqLength = ctx->getSequenceContext(asd->annotation->getGObject())->getSequenceLength(); + SAFE_POINT(asd->locationIdxList.size() == 1 || U1AnnotationUtils::isAnnotationAroundJunctionPoint(asd, seqLength), tr("Wrong annotation selection"), ); bool setSelected = true; - const ADVSequenceObjectContext* advctx = qobject_cast<ADVSequenceObjectContext*>(sender()); SAFE_POINT(advctx != NULL, "Incorrect sender", ); QList<AnnotationTableObject*> annotationObjects = advctx->getAnnotationObjects().toList(); - QMap<AVAnnotationItem*, QList<U2Region> > sortedAnnotationSelections = sortAnnotationSelection(annotationObjects); + const QVector<U2Region> selectedRegions = asd->getSelectedRegions(); //In case of joined annotation, we need to check "Did we click to this region of annotation already?" //If yes - remove this selected region //If no - we have no need to do smth, because if this click continue as double-click, we will expand selected regions of this annotation for current region too //Check "selectedAnnotation.value(item).size() == 1" here because we need to know - if we want to remove the last selected region of current annotation, we need also to remove annotation selection too - const bool removeLastRegion = (sortedAnnotationSelections.value(item).size() == 1) && sortedAnnotationSelections.value(item).contains(selectedRegion); + const bool removeLastRegion = (sortedAnnotationSelections.value(item).size() == 1) && + (sortedAnnotationSelections.value(item).contains(selectedRegions.first())) && + (sortedAnnotationSelections.value(item).contains(selectedRegions.last())); if (removeLastRegion) { foreach(int loc, asd->locationIdxList) { @@ -1711,13 +1715,13 @@ void AnnotationsTreeView::sl_annotationClicked(AnnotationSelectionData* asd) { } expandItemRecursevly(item->parent()); - { - SignalBlocker blocker(tree); - item->setSelected(setSelected); - } - SAFE_POINT(asd->locationIdxList.size() == 1, "Incorrect size", ); + SAFE_POINT(asd->locationIdxList.size() == 1 || U1AnnotationUtils::isAnnotationAroundJunctionPoint(asd, seqLength), tr("Wrong annotation selection"), ); + annotationSelection->addToSelection(item->annotation, asd->locationIdxList.first()); - annotationClicked(item, sortedAnnotationSelections, selectedRegion); + if (2 == asd->locationIdxList.size()) { + annotationSelection->addToSelection(item->annotation, asd->locationIdxList.last()); + } + annotationClicked(item, sortedAnnotationSelections, selectedRegions.toList()); } //TODO: refactor this method @@ -1729,8 +1733,6 @@ void AnnotationsTreeView::sl_annotationDoubleClicked(AnnotationSelectionData* as ctx->getAnnotationsSelection()->addToSelection(asd->annotation, loc); } } - - const U2Region regionToSelect = asd->getSelectedRegions().first(); QList<AVAnnotationItem*> annotationItems = findAnnotationItems(asd->annotation); foreach(AVAnnotationItem* item, annotationItems) { expandItemRecursevly(item->parent()); @@ -1738,8 +1740,7 @@ void AnnotationsTreeView::sl_annotationDoubleClicked(AnnotationSelectionData* as SignalBlocker blocker(tree); item->setSelected(true); } - SAFE_POINT(asd->locationIdxList.size() == 1, "Incorrect size", ); - annotationDoubleClicked(item, regionToSelect, asd->locationIdxList.first()); + annotationDoubleClicked(item, asd->getSelectedRegions().toList(), asd->locationIdxList.first()); } } @@ -1790,7 +1791,7 @@ void AnnotationsTreeView::sl_sequenceRemoved(ADVSequenceObjectContext* advContex //TODO: refactoring of annotationClicked and annotationDoubleClicked methods. //It's too difficult to understand what's going on in this methods //UTI-155 -void AnnotationsTreeView::annotationClicked(AVAnnotationItem* item, QMap<AVAnnotationItem*, QList<U2Region> > selectedAnnotations, const U2Region selectedRegion) { +void AnnotationsTreeView::annotationClicked(AVAnnotationItem* item, QMap<AVAnnotationItem*, QList<U2Region> > selectedAnnotations, const QList<U2Region>& selectedRegions) { ADVSequenceObjectContext* seqObjCtx = ctx->getSequenceContext(item->getAnnotationTableObject()); SAFE_POINT(seqObjCtx != NULL, "ADVSequenceObjectContext is NULL", ); @@ -1806,9 +1807,16 @@ void AnnotationsTreeView::annotationClicked(AVAnnotationItem* item, QMap<AVAnnot } } else { QVector<U2Region> toSelect; - if (!selectedRegion.isEmpty() && selectedAnnotations.value(item).contains(selectedRegion)) { - selectedAnnotation[item].removeOne(selectedRegion); - selectedAnnotations[item].removeOne(selectedRegion); + if (!selectedRegions.isEmpty() && + selectedAnnotations.value(item).contains(selectedRegions.first()) && + selectedAnnotations.value(item).contains(selectedRegions.last())) { + + selectedAnnotation[item].removeOne(selectedRegions.first()); + selectedAnnotations[item].removeOne(selectedRegions.first()); + if (selectedRegions.size() == 2) { + selectedAnnotation[item].removeOne(selectedRegions.last()); + selectedAnnotations[item].removeOne(selectedRegions.last()); + } if (selectedAnnotation[item].isEmpty()) { selectedAnnotation.remove(item); } @@ -1829,8 +1837,8 @@ void AnnotationsTreeView::annotationClicked(AVAnnotationItem* item, QMap<AVAnnot } } -void AnnotationsTreeView::annotationDoubleClicked(AVAnnotationItem* item, const U2Region& selectedRegion, const int numOfClickedRegion) { - selectedAnnotation[item] << selectedRegion; +void AnnotationsTreeView::annotationDoubleClicked(AVAnnotationItem* item, const QList<U2Region>& selectedRegions, const int numOfClickedRegion) { + selectedAnnotation[item] << selectedRegions; ADVSequenceObjectContext* seqObjCtx = ctx->getSequenceContext(item->getAnnotationTableObject()); SAFE_POINT(seqObjCtx != NULL, "ADVSequenceObjectContext is NULL", ); @@ -1843,16 +1851,29 @@ void AnnotationsTreeView::annotationDoubleClicked(AVAnnotationItem* item, const annotationSelection->addToSelection(item->annotation, numOfClickedRegion); - U2Region regionToSelect = selectedRegion; - + QList<U2Region> regionsToSelect = selectedRegions; const QVector<U2Region> regions = sequenceSelection->getSelectedRegions(); foreach(const U2Region& reg, regions) { - if (reg.intersects(regionToSelect)) { - sequenceSelection->removeRegion(reg); - regionToSelect = U2Region::containingRegion(reg, regionToSelect); + foreach(const U2Region& selectedRegion, selectedRegions) { + if (reg.intersects(selectedRegion)) { + sequenceSelection->removeRegion(reg); + regionsToSelect.removeOne(selectedRegion); + regionsToSelect << U2Region::containingRegion(reg, selectedRegion); + } + } + } + foreach(const U2Region& reg, regionsToSelect) { + sequenceSelection->addRegion(reg); + } +} + +void AnnotationsTreeView::clearSelectedNotAnnotations() { + foreach(QTreeWidgetItem *item, tree->selectedItems()) { + AVItem *aVItem = static_cast<AVItem *>(item); + if (aVItem != nullptr && aVItem->type != AVItemType_Annotation) { + item->setSelected(false); } } - sequenceSelection->addRegion(regionToSelect); } void AnnotationsTreeView::sl_onCopyQualifierValue() { diff --git a/src/corelibs/U2View/src/ov_sequence/AnnotationsTreeView.h b/src/corelibs/U2View/src/ov_sequence/AnnotationsTreeView.h index 0d56ccd3e2d8be770db3de9653e7174954b63169..8db06744cbd71212e28ea4d521771d5e0e5d6954 100644 --- a/src/corelibs/U2View/src/ov_sequence/AnnotationsTreeView.h +++ b/src/corelibs/U2View/src/ov_sequence/AnnotationsTreeView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -191,8 +191,9 @@ private: bool initiateDragAndDrop(QMouseEvent* me); void finishDragAndDrop(Qt::DropAction dndAction); - void annotationClicked(AVAnnotationItem* item, QMap<AVAnnotationItem*, QList<U2Region> > selectedAnnotations, const U2Region selectedRegion = U2Region()); - void annotationDoubleClicked(AVAnnotationItem* item, const U2Region& selectedRegion, const int numOfClickedRegion = -1); + void annotationClicked(AVAnnotationItem* item, QMap<AVAnnotationItem*, QList<U2Region> > selectedAnnotations, const QList<U2Region>& selectedRegions = QList<U2Region>()); + void annotationDoubleClicked(AVAnnotationItem* item, const QList<U2Region>& selectedRegions, const int numOfClickedRegion = -1); + void clearSelectedNotAnnotations(); AnnotationsTreeWidget* tree; diff --git a/src/corelibs/U2View/src/ov_sequence/AutoAnnotationUtils.cpp b/src/corelibs/U2View/src/ov_sequence/AutoAnnotationUtils.cpp index a2d51f650ea337a212496c5b50e764b040d68e45..10a8115e2063a89608217c9cceed73777710caed 100644 --- a/src/corelibs/U2View/src/ov_sequence/AutoAnnotationUtils.cpp +++ b/src/corelibs/U2View/src/ov_sequence/AutoAnnotationUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/AutoAnnotationUtils.h b/src/corelibs/U2View/src/ov_sequence/AutoAnnotationUtils.h index 86c0cdeab49265e2804e8f4d3be39b2b2c01443e..db3ab1fa8ea1b6f733992f7bb2456e59e489cd54 100644 --- a/src/corelibs/U2View/src/ov_sequence/AutoAnnotationUtils.h +++ b/src/corelibs/U2View/src/ov_sequence/AutoAnnotationUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/CreateRulerDialogController.cpp b/src/corelibs/U2View/src/ov_sequence/CreateRulerDialogController.cpp index 41954251b790dd31727ec950f11bde6b82464083..41aff8981c48ec6fef8ab05f85d6bec426ac2d93 100644 --- a/src/corelibs/U2View/src/ov_sequence/CreateRulerDialogController.cpp +++ b/src/corelibs/U2View/src/ov_sequence/CreateRulerDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,7 +34,7 @@ CreateRulerDialogController::CreateRulerDialogController(const QSet<QString>& na : QDialog(p) { setupUi(this); - new HelpButton(this, buttonBox, "22055833"); + new HelpButton(this, buttonBox, "24742368"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Create")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2View/src/ov_sequence/CreateRulerDialogController.h b/src/corelibs/U2View/src/ov_sequence/CreateRulerDialogController.h index 3ccd5fbf99deada4f76c4a3a5441f13cbfbf4376..e7109683922a7f6f1294fe391de059fe1ef69efc 100644 --- a/src/corelibs/U2View/src/ov_sequence/CreateRulerDialogController.h +++ b/src/corelibs/U2View/src/ov_sequence/CreateRulerDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/DetView.cpp b/src/corelibs/U2View/src/ov_sequence/DetView.cpp index a238511c0e6d0a249b0b2c38d4890a7a04739b29..46655a700f462abe0b2c0f8220582f546410c078 100644 --- a/src/corelibs/U2View/src/ov_sequence/DetView.cpp +++ b/src/corelibs/U2View/src/ov_sequence/DetView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/DetView.h b/src/corelibs/U2View/src/ov_sequence/DetView.h index 6face183cd203ca84633266f68f3beb7d03ea7ac..d0047624f302003da2af09ed2a6d60b505729728 100644 --- a/src/corelibs/U2View/src/ov_sequence/DetView.h +++ b/src/corelibs/U2View/src/ov_sequence/DetView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/DetViewSequenceEditor.cpp b/src/corelibs/U2View/src/ov_sequence/DetViewSequenceEditor.cpp index d7b73d6cbe17f25aa0d5f36b024996f5649ccff9..4ee2c3645039e75f50cecdf54af3e92b79295010 100644 --- a/src/corelibs/U2View/src/ov_sequence/DetViewSequenceEditor.cpp +++ b/src/corelibs/U2View/src/ov_sequence/DetViewSequenceEditor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/DetViewSequenceEditor.h b/src/corelibs/U2View/src/ov_sequence/DetViewSequenceEditor.h index 40b642551a0a7ff3bdd7d194fbb8e195c19858f6..513ff47b355522a8c2b6bc7ffe6663e1e7cee05d 100644 --- a/src/corelibs/U2View/src/ov_sequence/DetViewSequenceEditor.h +++ b/src/corelibs/U2View/src/ov_sequence/DetViewSequenceEditor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/GSequenceGraphView.cpp b/src/corelibs/U2View/src/ov_sequence/GSequenceGraphView.cpp index ddf10432efa80362b1358a972396e79147c1b24a..938461d77227045b0be9a893cfde55c9dd34c52b 100644 --- a/src/corelibs/U2View/src/ov_sequence/GSequenceGraphView.cpp +++ b/src/corelibs/U2View/src/ov_sequence/GSequenceGraphView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -102,7 +102,7 @@ void GSequenceGraphView::setGraphDrawer(GSequenceGraphDrawer* gd) { void GSequenceGraphView::mousePressEvent(QMouseEvent *me) { setFocus(); - if(Qt::ShiftModifier == me->modifiers()) { + if(me->modifiers() == Qt::ShiftModifier && me->button() == Qt::LeftButton) { float pos = toRenderAreaPoint(me->pos()).x() / renderArea->getCurrentScale() + getVisibleRange().startPos; addLabel(pos); } @@ -297,9 +297,12 @@ void GSequenceGraphView::onVisibleRangeChanged(bool signal) { if(signal) { foreach (const QSharedPointer<GSequenceGraphData> graph, graphs) { emit si_frameRangeChanged(graph, static_cast<GSequenceGraphViewRA*>(renderArea)->getGraphRect()); - float pos = static_cast<double>(graph->graphLabels.getMovingLabel().getCoord().x()) / renderArea->getCurrentScale() + getVisibleRange().startPos; - graph->graphLabels.getMovingLabel().setPosition(pos); - emit si_labelMoved(graph, &(graph->graphLabels.getMovingLabel()), static_cast<GSequenceGraphViewRA*>(renderArea)->getGraphRect()); + GraphLabel& cursorLabel = graph->graphLabels.getMovingLabel(); + if (!cursorLabel.isHidden()) { // do not move cursor label if it was hidden for some reason (widget is not focused, etc...) + float pos = static_cast<double>(cursorLabel.getCoord().x()) / renderArea->getCurrentScale() + getVisibleRange().startPos; + cursorLabel.setPosition(pos); + emit si_labelMoved(graph, &cursorLabel, static_cast<GSequenceGraphViewRA*>(renderArea)->getGraphRect()); + } } } GSequenceLineView::onVisibleRangeChanged(signal); diff --git a/src/corelibs/U2View/src/ov_sequence/GSequenceGraphView.h b/src/corelibs/U2View/src/ov_sequence/GSequenceGraphView.h index 8e5cf128ce8594101a2ab6e4e1e1e523650e60d1..81b5da73b90cccfb4ec731d06566ecc85665c9da 100644 --- a/src/corelibs/U2View/src/ov_sequence/GSequenceGraphView.h +++ b/src/corelibs/U2View/src/ov_sequence/GSequenceGraphView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/GSequenceGraphViewWithFactory.cpp b/src/corelibs/U2View/src/ov_sequence/GSequenceGraphViewWithFactory.cpp index 2b64841f631f6f51b3516e05931b4ffa818ba276..a46c156b63969699f89e909ddcc072ba63d92f89 100644 --- a/src/corelibs/U2View/src/ov_sequence/GSequenceGraphViewWithFactory.cpp +++ b/src/corelibs/U2View/src/ov_sequence/GSequenceGraphViewWithFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/GSequenceGraphViewWithFactory.h b/src/corelibs/U2View/src/ov_sequence/GSequenceGraphViewWithFactory.h index d1b9fd3223c6df2ec71c04a9ab01e78ec29eb3c6..f7ea72a2fb70683f087499841ade8480cfa9a174 100644 --- a/src/corelibs/U2View/src/ov_sequence/GSequenceGraphViewWithFactory.h +++ b/src/corelibs/U2View/src/ov_sequence/GSequenceGraphViewWithFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/GSequenceLineView.cpp b/src/corelibs/U2View/src/ov_sequence/GSequenceLineView.cpp index f2675501eb4dc7bc2f3bfdbb644454b8d2fffce8..0b14c1503e9f0aa1ed47bb3d8d11345aaaf2f145 100644 --- a/src/corelibs/U2View/src/ov_sequence/GSequenceLineView.cpp +++ b/src/corelibs/U2View/src/ov_sequence/GSequenceLineView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -178,8 +178,7 @@ void GSequenceLineView::mousePressEvent(QMouseEvent* me) { } lastPressPos = renderArea->coordToPos(renderAreaPos); - - SAFE_POINT(lastPressPos >= visibleRange.startPos && lastPressPos <= visibleRange.endPos(), "Last mouse press position is out of visible range!",); + SAFE_POINT(lastPressPos >= visibleRange.startPos && lastPressPos <= visibleRange.endPos(), "Last mouse press position is out of visible range!", ); if (me->button() == Qt::RightButton) { QWidget::mousePressEvent(me); @@ -348,7 +347,7 @@ void GSequenceLineView::onVisibleRangeChanged(bool signal) { } -QPoint GSequenceLineView::toRenderAreaPoint(const QPoint& p) { +QPoint GSequenceLineView::toRenderAreaPoint(const QPoint& p) const { assert(contentWidget); return p - contentWidget->pos(); } diff --git a/src/corelibs/U2View/src/ov_sequence/GSequenceLineView.h b/src/corelibs/U2View/src/ov_sequence/GSequenceLineView.h index 9673141cc166d19d81c313bcbaaf94cd243ba065..717382640e1ddef2ebddfbf9d451a94a25744d39 100644 --- a/src/corelibs/U2View/src/ov_sequence/GSequenceLineView.h +++ b/src/corelibs/U2View/src/ov_sequence/GSequenceLineView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -134,7 +134,6 @@ protected: void focusInEvent(QFocusEvent* fe); void focusOutEvent(QFocusEvent* fe); void keyPressEvent(QKeyEvent *e); - virtual void onVisibleRangeChanged(bool signal = true); public slots: @@ -150,7 +149,7 @@ protected slots: void completeUpdate(); protected: - QPoint toRenderAreaPoint(const QPoint& p); + QPoint toRenderAreaPoint(const QPoint& p) const; virtual void updateScrollBar(); void setSelection(const U2Region& r); void addSelection(const U2Region& r); diff --git a/src/corelibs/U2View/src/ov_sequence/GSequenceLineViewAnnotated.cpp b/src/corelibs/U2View/src/ov_sequence/GSequenceLineViewAnnotated.cpp index a5f163fa5602011971192355eb2ad014c2c292d2..9fc2b4401799d4c60ede944c05b30ed0176e5d5a 100644 --- a/src/corelibs/U2View/src/ov_sequence/GSequenceLineViewAnnotated.cpp +++ b/src/corelibs/U2View/src/ov_sequence/GSequenceLineViewAnnotated.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -273,13 +273,20 @@ void GSequenceLineViewAnnotated::mouseDoubleClickEvent(QMouseEvent* me) { CHECK(asd != NULL, ); const QVector<U2Region> selRegions = asd->getSelectedRegions(); - CHECK(selRegions.size() == 1, ); + CHECK(selRegions.size() == 1 || U1AnnotationUtils::isAnnotationAroundJunctionPoint(asd, seqLen), ); - const U2Region regionToSelect = selRegions.first(); const qint64 currentPos = renderArea->coordToPos(toRenderAreaPoint(me->pos())); - if (regionToSelect.contains(currentPos)) { + bool containsCurrentPoint = false; + foreach(const U2Region& reg, selRegions) { + CHECK_CONTINUE(reg.contains(currentPos)); + + containsCurrentPoint = true; + break; + } + if (containsCurrentPoint) { ctx->emitAnnotationSequenceSelection(asd); } + lastPressPos = currentPos; } else { GSequenceLineView::mouseDoubleClickEvent(me); } diff --git a/src/corelibs/U2View/src/ov_sequence/GSequenceLineViewAnnotated.h b/src/corelibs/U2View/src/ov_sequence/GSequenceLineViewAnnotated.h index 9f5e3549f47fa810d99f311855bb78ae98c79ee5..e7648e2874f9497510183aaca78d262b5577303f 100644 --- a/src/corelibs/U2View/src/ov_sequence/GSequenceLineViewAnnotated.h +++ b/src/corelibs/U2View/src/ov_sequence/GSequenceLineViewAnnotated.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/GraphLabelModel.cpp b/src/corelibs/U2View/src/ov_sequence/GraphLabelModel.cpp index 2c42a7ce47669b9bb1288f646585d8b31d54450f..a191ebca288efc1944aa16fd62fbd6421eb18566 100644 --- a/src/corelibs/U2View/src/ov_sequence/GraphLabelModel.cpp +++ b/src/corelibs/U2View/src/ov_sequence/GraphLabelModel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -143,6 +143,11 @@ void GraphLabel::hide() { text->hide(); text->setMouseTracking(false); } + +bool GraphLabel::isHidden() const { + return text->isHidden(); +} + void GraphLabel::raise() { text->raise(); } diff --git a/src/corelibs/U2View/src/ov_sequence/GraphLabelModel.h b/src/corelibs/U2View/src/ov_sequence/GraphLabelModel.h index 58e6f531a734ba32c11361250df155a684732414..72fa1aec00a98b312540ef5aae0906e3c0f8709e 100644 --- a/src/corelibs/U2View/src/ov_sequence/GraphLabelModel.h +++ b/src/corelibs/U2View/src/ov_sequence/GraphLabelModel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -84,6 +84,7 @@ public: bool select(float _position); bool isSelected() const; + bool isHidden() const; void setCoord(const QPoint &_coord); QPoint getCoord() const {return coord;} diff --git a/src/corelibs/U2View/src/ov_sequence/GraphLabelsSelectDialog.cpp b/src/corelibs/U2View/src/ov_sequence/GraphLabelsSelectDialog.cpp index 4da929cb6685ff542727deb935d7f205eaf3ffe2..487b6e65adad51c6827c189b8821d16e8e704ca0 100644 --- a/src/corelibs/U2View/src/ov_sequence/GraphLabelsSelectDialog.cpp +++ b/src/corelibs/U2View/src/ov_sequence/GraphLabelsSelectDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -61,7 +61,7 @@ GraphLabelsSelectDialog::GraphLabelsSelectDialog(int maxWindowSize, QWidget* par QPushButton* okButton = buttonBox->button(QDialogButtonBox::Ok); QPushButton* cancelButton = buttonBox->button(QDialogButtonBox::Cancel); - new HelpButton(this, buttonBox, "22055890"); + new HelpButton(this, buttonBox, "24742425"); mainLayout->addLayout(spinLayout); mainLayout->addWidget(usedIntervalsCheck); diff --git a/src/corelibs/U2View/src/ov_sequence/GraphLabelsSelectDialog.h b/src/corelibs/U2View/src/ov_sequence/GraphLabelsSelectDialog.h index c7f3c095fa93fb9c7ce9b59f6a47bcb6e3b1db69..65e9d467596db9a853fd7f40b2a02001ddbd41fb 100644 --- a/src/corelibs/U2View/src/ov_sequence/GraphLabelsSelectDialog.h +++ b/src/corelibs/U2View/src/ov_sequence/GraphLabelsSelectDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/GraphMenu.cpp b/src/corelibs/U2View/src/ov_sequence/GraphMenu.cpp index 59ade1c7cd0efedaae9431c6f327a207909075c8..c3a6d519884ba5bc2e58f06800ac5200d6d45ce0 100644 --- a/src/corelibs/U2View/src/ov_sequence/GraphMenu.cpp +++ b/src/corelibs/U2View/src/ov_sequence/GraphMenu.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -53,19 +53,28 @@ GraphAction::GraphAction(GSequenceGraphFactory* _factory) connect(this, SIGNAL(triggered()), SLOT(sl_handleGraphAction())); } +// This is maximum sequence size we allow to create graphs: 300Mb. +// To calculate graphs for larger sequences we must optimize graph algorithms first. +// Otherwise UGENE may consume all RAM, make the whole system unstable and crash. +#define MAX_SEQUENCE_LENGTH_TO_ALLOW_GRAPHS (300 * 1000 * 1000) + /** * Shows/hides a graph depending on its state: checked/unchecked */ void GraphAction::sl_handleGraphAction() { if (isChecked()) { SAFE_POINT(view == NULL, "Graph view is checked, but not available!",); - // Getting the menu action GraphMenuAction* menuAction = qobject_cast<GraphMenuAction*>(parent()); SAFE_POINT(menuAction!=NULL, "GraphMenuAction is not available (while handling an action)!",); // Creating graphs ADVSingleSequenceWidget* sequenceWidget = qobject_cast<ADVSingleSequenceWidget*>(menuAction->seqWidget); + if (sequenceWidget->getSequenceLength() > MAX_SEQUENCE_LENGTH_TO_ALLOW_GRAPHS) { + QMessageBox::warning(sequenceWidget->window(), L10N::warningTitle(), tr("Sequence size is too large to calculate graphs!")); + this->setChecked(false); + return; + } view = new GSequenceGraphViewWithFactory(sequenceWidget, factory); GSequenceGraphDrawer *graphDrawer = factory->getDrawer(view); connect(graphDrawer, SIGNAL(si_graphRenderError()), SLOT(sl_renderError())); diff --git a/src/corelibs/U2View/src/ov_sequence/GraphMenu.h b/src/corelibs/U2View/src/ov_sequence/GraphMenu.h index 0f2e3303aafd44930d3a0417bc22e9d7f2c7d0bf..6cbe060105cdcfddb8b117d128ec22eebdf7b3e9 100644 --- a/src/corelibs/U2View/src/ov_sequence/GraphMenu.h +++ b/src/corelibs/U2View/src/ov_sequence/GraphMenu.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/GraphSettingsDialog.cpp b/src/corelibs/U2View/src/ov_sequence/GraphSettingsDialog.cpp index 0486fd7d0b4722853dc8335539574a9c5fae53a2..82f145be5fe001ab48a5fe4c83709abb12bae459 100644 --- a/src/corelibs/U2View/src/ov_sequence/GraphSettingsDialog.cpp +++ b/src/corelibs/U2View/src/ov_sequence/GraphSettingsDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -94,7 +94,7 @@ GraphSettingsDialog::GraphSettingsDialog( GSequenceGraphDrawer* d, const U2Regio QPushButton* okButton = buttonBox->button(QDialogButtonBox::Ok); QPushButton* cancelButton = buttonBox->button(QDialogButtonBox::Cancel); - new HelpButton(this, buttonBox, "22055892"); + new HelpButton(this, buttonBox, "24742427"); connect(cancelButton, SIGNAL(clicked()), SLOT(sl_onCancelClicked())); connect(okButton, SIGNAL(clicked()), SLOT(sl_onOkClicked())); diff --git a/src/corelibs/U2View/src/ov_sequence/GraphSettingsDialog.h b/src/corelibs/U2View/src/ov_sequence/GraphSettingsDialog.h index 901516d29ef0695c1c579c9f134e6429c3cb5162..c5b651a29a1596235fb991df5b12a0020e499f6f 100644 --- a/src/corelibs/U2View/src/ov_sequence/GraphSettingsDialog.h +++ b/src/corelibs/U2View/src/ov_sequence/GraphSettingsDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/Overview.cpp b/src/corelibs/U2View/src/ov_sequence/Overview.cpp index c0bc141b18fe117e49d524b9c829037ee53298ca..6024313491d14e7b6d54f32ed388fa6d342bf23f 100644 --- a/src/corelibs/U2View/src/ov_sequence/Overview.cpp +++ b/src/corelibs/U2View/src/ov_sequence/Overview.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/Overview.h b/src/corelibs/U2View/src/ov_sequence/Overview.h index f44cd1627c05d9cdd453d061490cd0bb68647d50..0c50c6d8d297244f2542d1fabd985625d0834499 100644 --- a/src/corelibs/U2View/src/ov_sequence/Overview.h +++ b/src/corelibs/U2View/src/ov_sequence/Overview.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/PanView.cpp b/src/corelibs/U2View/src/ov_sequence/PanView.cpp index 0e3b5511130f1c29a034b81cd79af04dca05a380..4cef8741b52f742558befcef7de87d32f8f50cc9 100644 --- a/src/corelibs/U2View/src/ov_sequence/PanView.cpp +++ b/src/corelibs/U2View/src/ov_sequence/PanView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/PanView.h b/src/corelibs/U2View/src/ov_sequence/PanView.h index ac9de74c87cbfe6de2ec8cd11de637ed3a0384fe..62be0b2d65a50dee7953709f5ab1a5965e193fcc 100644 --- a/src/corelibs/U2View/src/ov_sequence/PanView.h +++ b/src/corelibs/U2View/src/ov_sequence/PanView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/PanViewRows.cpp b/src/corelibs/U2View/src/ov_sequence/PanViewRows.cpp index 7422ff1c2c50f7019a2223b662ee729c55d61623..f198c4df5f101df05921d0008591d1afef744480 100644 --- a/src/corelibs/U2View/src/ov_sequence/PanViewRows.cpp +++ b/src/corelibs/U2View/src/ov_sequence/PanViewRows.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/PanViewRows.h b/src/corelibs/U2View/src/ov_sequence/PanViewRows.h index f015e2e3ae993a337533e4a52cbb3760f69dcba0..c82d610eb921ff1c1283146745529d3fefc0f0a7 100644 --- a/src/corelibs/U2View/src/ov_sequence/PanViewRows.h +++ b/src/corelibs/U2View/src/ov_sequence/PanViewRows.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/SaveGraphCutoffsDialogController.cpp b/src/corelibs/U2View/src/ov_sequence/SaveGraphCutoffsDialogController.cpp index a1675f63e9c44fc5dff32154a164740edb0b8880..bbb6c90167cc0f5c7a59eb6c4088ddb41c09c9f3 100644 --- a/src/corelibs/U2View/src/ov_sequence/SaveGraphCutoffsDialogController.cpp +++ b/src/corelibs/U2View/src/ov_sequence/SaveGraphCutoffsDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -48,7 +48,7 @@ SaveGraphCutoffsDialogController::SaveGraphCutoffsDialogController(GSequenceGrap gd(_gd) { setupUi(this); - new HelpButton(this, buttonBox, "22055893"); + new HelpButton(this, buttonBox, "24742428"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Save")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2View/src/ov_sequence/SaveGraphCutoffsDialogController.h b/src/corelibs/U2View/src/ov_sequence/SaveGraphCutoffsDialogController.h index befc7a8f99ca4be05f9cdbbae7e8bda697c03eaa..b65049d4a5627c4785dc823f44c81b59a7e22393 100644 --- a/src/corelibs/U2View/src/ov_sequence/SaveGraphCutoffsDialogController.h +++ b/src/corelibs/U2View/src/ov_sequence/SaveGraphCutoffsDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/SaveGraphCutoffsTask.cpp b/src/corelibs/U2View/src/ov_sequence/SaveGraphCutoffsTask.cpp index 8ace8066797f77e9658429043b556c06c7767d6e..1016a56d57fab71e9b541b1ff505a731438c3111 100644 --- a/src/corelibs/U2View/src/ov_sequence/SaveGraphCutoffsTask.cpp +++ b/src/corelibs/U2View/src/ov_sequence/SaveGraphCutoffsTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/SaveGraphCutoffsTask.h b/src/corelibs/U2View/src/ov_sequence/SaveGraphCutoffsTask.h index 8093094b8a3fb9587aeb1091c1b6bbccccc81ddf..fb0d435b8af1af1d694fdb898112fe0d692321d6 100644 --- a/src/corelibs/U2View/src/ov_sequence/SaveGraphCutoffsTask.h +++ b/src/corelibs/U2View/src/ov_sequence/SaveGraphCutoffsTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/SearchQualifierDialog.cpp b/src/corelibs/U2View/src/ov_sequence/SearchQualifierDialog.cpp index 1b1fded05f73b5b616e152bcb7cd917852c478f2..6ecf6f06f33e905d4c207b7600194ab3ec718eca 100644 --- a/src/corelibs/U2View/src/ov_sequence/SearchQualifierDialog.cpp +++ b/src/corelibs/U2View/src/ov_sequence/SearchQualifierDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -44,7 +44,7 @@ SearchQualifierDialog::SearchQualifierDialog(QWidget* p, AnnotationsTreeView *tr indexOfPrevResult(-1) { ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22055867"); + new HelpButton(this, ui->buttonBox, "24742402"); ui->buttonBox->button(QDialogButtonBox::Yes)->setText(tr("Select all")); ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Next")); ui->buttonBox->button(QDialogButtonBox::Close)->setText(tr("Close")); diff --git a/src/corelibs/U2View/src/ov_sequence/SearchQualifierDialog.h b/src/corelibs/U2View/src/ov_sequence/SearchQualifierDialog.h index f72711f3b67d22d250c4fcdaedf8bb936ab60593..5fe4ada115ae523e039734cad4ceeaf7ca8e7815 100644 --- a/src/corelibs/U2View/src/ov_sequence/SearchQualifierDialog.h +++ b/src/corelibs/U2View/src/ov_sequence/SearchQualifierDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/SequenceObjectContext.cpp b/src/corelibs/U2View/src/ov_sequence/SequenceObjectContext.cpp index b5549d6d5c59291e2e2afa1ba2d893ae366a6cd3..134c08363151a12b76db5bc5b889baa94c169ff1 100644 --- a/src/corelibs/U2View/src/ov_sequence/SequenceObjectContext.cpp +++ b/src/corelibs/U2View/src/ov_sequence/SequenceObjectContext.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/SequenceObjectContext.h b/src/corelibs/U2View/src/ov_sequence/SequenceObjectContext.h index 22b7a9542e32d4bfe9a0afc0e13b00fcf301b95c..887f88962029ad66ce856e45bd282acea470a23a 100644 --- a/src/corelibs/U2View/src/ov_sequence/SequenceObjectContext.h +++ b/src/corelibs/U2View/src/ov_sequence/SequenceObjectContext.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/WindowStepSelectorWidget.cpp b/src/corelibs/U2View/src/ov_sequence/WindowStepSelectorWidget.cpp index d320d1beed15ae0891b75d6329e7f6ddeb925ce4..6c80a23f8ec6445c68a53cd7021c8d75f234d4c8 100644 --- a/src/corelibs/U2View/src/ov_sequence/WindowStepSelectorWidget.cpp +++ b/src/corelibs/U2View/src/ov_sequence/WindowStepSelectorWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/WindowStepSelectorWidget.h b/src/corelibs/U2View/src/ov_sequence/WindowStepSelectorWidget.h index f5944ce5071b70531337850858496f982fc64ff4..28cdd5b5007950caccea9ec92018bbf6285a7af8 100644 --- a/src/corelibs/U2View/src/ov_sequence/WindowStepSelectorWidget.h +++ b/src/corelibs/U2View/src/ov_sequence/WindowStepSelectorWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightSettings.cpp b/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightSettings.cpp index 120d74a2902f976f59a50c3d43467bb627aa199f..d657b1d2975b5bcb777fc00fdf5b9e4fbb997fda 100644 --- a/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightSettings.cpp +++ b/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightSettings.h b/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightSettings.h index 714e91e2f906d523adf0da2fe7986f187a02a3a2..7ddc8b92916e36462ac0113ed3a4b3598189dca8 100644 --- a/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightSettings.h +++ b/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightTree.cpp b/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightTree.cpp index f1780ef8357cf2ea88c8111b45f0a26e4a06034c..b5807ac3994a6879b623c312371fc605cd811293 100644 --- a/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightTree.cpp +++ b/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightTree.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,8 +33,7 @@ namespace U2 { const int AnnotHighlightTree::COL_NUM_ANNOT_NAME = 0; const int AnnotHighlightTree::COL_NUM_COLOR = 1; -const int AnnotHighlightTree::ANNOT_COLUMN_WIDTH = 140; -const int AnnotHighlightTree::COLOR_COLUMN_WIDTH = 10; +const int AnnotHighlightTree::COLOR_COLUMN_WIDTH = 60; const int AnnotHighlightTree::INITIAL_TREE_HEIGHT = 25; @@ -53,10 +52,10 @@ AnnotHighlightTree::AnnotHighlightTree() headerLabels << QObject::tr("Annotation") << QObject::tr("Color"); setHeaderLabels(headerLabels); - header()->resizeSection(COL_NUM_ANNOT_NAME, ANNOT_COLUMN_WIDTH); - header()->resizeSection(COL_NUM_COLOR, COLOR_COLUMN_WIDTH); + header()->setSectionResizeMode(COL_NUM_ANNOT_NAME, QHeaderView::Stretch); + header()->setSectionResizeMode(COL_NUM_COLOR, QHeaderView::Fixed); header()->setStretchLastSection(false); - header()->setSectionResizeMode(0, QHeaderView::Stretch); + header()->resizeSection(COL_NUM_COLOR, COLOR_COLUMN_WIDTH); setStyleSheet("QTreeWidget#OP_ANNOT_HIGHLIGHT_TREE { " "border-style: solid;" @@ -76,13 +75,6 @@ AnnotHighlightTree::AnnotHighlightTree() SLOT(sl_onItemClicked(QTreeWidgetItem*, int))); } - -QSize AnnotHighlightTree::sizeHint() const -{ - return QSize(ANNOT_COLUMN_WIDTH + COLOR_COLUMN_WIDTH, annotTreeHeight); -} - - void AnnotHighlightTree::addItem(QString annotName, QColor annotColor) { // Create and initialize the tree item @@ -141,8 +133,6 @@ void AnnotHighlightTree::setItemSelectedWithAnnotName(QString annotName) setCurrentItem(items[0]); } - - void AnnotHighlightTree::sl_onCurrentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem* /* previous */ ) { if (0 != current) { diff --git a/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightTree.h b/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightTree.h index 6d65507a0f796337ce73912855ce894af62e1244..c0a907f0b2854f872c16f25014bb5921054d28c9 100644 --- a/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightTree.h +++ b/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightTree.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,7 +33,6 @@ class AnnotHighlightTree : public QTreeWidget Q_OBJECT public: AnnotHighlightTree(); - virtual QSize sizeHint() const; virtual void addItem(QString annotName, QColor annotColor); virtual void clear(); @@ -81,7 +80,6 @@ private: virtual void insertTopLevelItems(int index, const QList<QTreeWidgetItem *>& items) { QTreeWidget::insertTopLevelItems(index, items); } /** Size of the tree elements */ - static const int ANNOT_COLUMN_WIDTH; static const int COLOR_COLUMN_WIDTH; static const int INITIAL_TREE_HEIGHT; diff --git a/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightTreeItem.cpp b/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightTreeItem.cpp index c2ea6cbdbeaa28361b94371313d93c1b6390bd2d..fc112bc5e5742aa953e1d67c8984fb405510e33f 100644 --- a/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightTreeItem.cpp +++ b/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightTreeItem.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -29,6 +29,7 @@ namespace U2 { const int AnnotHighlightTreeItem::ROW_HEIGHT = 22; +const int AnnotHighlightTreeItem::COLOR_ICON_SIZE = 14; AnnotHighlightTreeItem::AnnotHighlightTreeItem(const QString& _annotName, const QColor& _annotColor) : annotName(_annotName), annotColor(_annotColor) @@ -41,7 +42,7 @@ AnnotHighlightTreeItem::AnnotHighlightTreeItem(const QString& _annotName, const void AnnotHighlightTreeItem::drawColorCell() { - QIcon icon = GUIUtils::createSquareIcon(annotColor, 14); + QIcon icon = GUIUtils::createSquareIcon(annotColor, COLOR_ICON_SIZE); setIcon(AnnotHighlightTree::COL_NUM_COLOR, icon); } diff --git a/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightTreeItem.h b/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightTreeItem.h index 2b4ffc33d5f3fd9282965d700625fec7bf56f941..e56beaaf880afe1bf19a4222fa84f13021f57a4e 100644 --- a/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightTreeItem.h +++ b/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightTreeItem.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -39,6 +39,7 @@ public: void setColor(const QColor& _annotColor); static const int ROW_HEIGHT; + static const int COLOR_ICON_SIZE; private: void drawColorCell(); diff --git a/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightWidget.cpp b/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightWidget.cpp index 662930bb8459f2639fceebb0b8ebf0ad4790e539..0e54ab46079e3ccd855753e7696d514e1e9d82cf 100644 --- a/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightWidget.cpp +++ b/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightWidget.h b/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightWidget.h index 2a2d472f9de32eb3a426447b4af0c7942a0195d1..8728aaac84534be358222e163a07d2f32467768f 100644 --- a/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightWidget.h +++ b/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightWidgetFactory.cpp b/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightWidgetFactory.cpp index 06514a5f7928f08ee5c1e03e5ccf535ebb6e9d2b..c449f3bcf27063e942dde0fcfdcc42e5af36e6ef 100644 --- a/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightWidgetFactory.cpp +++ b/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightWidgetFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,7 +33,7 @@ namespace U2 { const QString AnnotHighlightWidgetFactory::GROUP_ID = "OP_ANNOT_HIGHLIGHT"; const QString AnnotHighlightWidgetFactory::GROUP_ICON_STR = ":core/images/annotation_settings.png"; -const QString AnnotHighlightWidgetFactory::GROUP_DOC_PAGE = "22055856"; +const QString AnnotHighlightWidgetFactory::GROUP_DOC_PAGE = "24742391"; AnnotHighlightWidgetFactory::AnnotHighlightWidgetFactory() { objectViewOfWidget = ObjViewType_SequenceView; diff --git a/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightWidgetFactory.h b/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightWidgetFactory.h index 6762eb16bd49be153d08ea56eee48d6d74072af2..f34a81f4109754e08e53b1b42c94235a6a6ef6b2 100644 --- a/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightWidgetFactory.h +++ b/src/corelibs/U2View/src/ov_sequence/annot_highlight/AnnotHighlightWidgetFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/codon_table/CodonTable.cpp b/src/corelibs/U2View/src/ov_sequence/codon_table/CodonTable.cpp index e4314147d8018af15a7e7eeeb48f3d6c9dd57920..98e0b39795e033245823de2727dade5fb1761a8a 100644 --- a/src/corelibs/U2View/src/ov_sequence/codon_table/CodonTable.cpp +++ b/src/corelibs/U2View/src/ov_sequence/codon_table/CodonTable.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -144,7 +144,7 @@ void CodonTableView::setAminoTranslation(const QString& trId) { DNAAlphabetRegistry* alphReg = AppContext::getDNAAlphabetRegistry(); SAFE_POINT(alphReg != NULL, "DNAAlphabetRegistry is NULL!", ); const DNAAlphabet* alph = alphReg->findById(BaseDNAAlphabetIds::NUCL_RNA_DEFAULT()); - SAFE_POINT(alph != NULL, "Standart RNA alphabet not found!", ); + SAFE_POINT(alph != NULL, "Standard RNA alphabet not found!", ); DNATranslation* tr = trReg->lookupTranslation(alph, trId); SAFE_POINT(tr != NULL, "No translation found!", ); diff --git a/src/corelibs/U2View/src/ov_sequence/codon_table/CodonTable.h b/src/corelibs/U2View/src/ov_sequence/codon_table/CodonTable.h index d0a49ab04f13e1830b21713610874c3068957eb4..c0d59b26d5b478e9f528f3ee3095bb2ae38b54d9 100644 --- a/src/corelibs/U2View/src/ov_sequence/codon_table/CodonTable.h +++ b/src/corelibs/U2View/src/ov_sequence/codon_table/CodonTable.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternTask.cpp b/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternTask.cpp index 142a49fef40d0e95a7d5ea5dd210eced65277b7b..2f2161893f182c3378519dbce098ea48b18cce8e 100644 --- a/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternTask.cpp +++ b/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternTask.h b/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternTask.h index 1ce32c2adcea07e3b9589d4fbcec3fed44bf7034..9a750f2dde8caf7125c23f4ac4a5da66bc7b242f 100644 --- a/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternTask.h +++ b/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidget.cpp b/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidget.cpp index bdd9aceb0435e6af03174e0c246bbe287d595d1b..0e78c549b20f41fa5d9de80fb7d9763681d501e7 100644 --- a/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidget.cpp +++ b/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidget.h b/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidget.h index 67a7d9aeaeedf0e28c8a4f70eedf41b548de6802..3d387cb173cc2a2a4d221acce55f525d63d94017 100644 --- a/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidget.h +++ b/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidgetFactory.cpp b/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidgetFactory.cpp index 7068ce931a908398a16e6e6e5f09a8e5fc324216..2d5a082f964d29cea54ed352cbbdf51a75ef4cb2 100644 --- a/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidgetFactory.cpp +++ b/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidgetFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,7 +33,7 @@ namespace U2 { const QString FindPatternWidgetFactory::GROUP_ID = "OP_FIND_PATTERN"; const QString FindPatternWidgetFactory::GROUP_ICON_STR = ":core/images/find_dialog.png"; -const QString FindPatternWidgetFactory::GROUP_DOC_PAGE = "22055837"; +const QString FindPatternWidgetFactory::GROUP_DOC_PAGE = "24742372"; FindPatternWidgetFactory::FindPatternWidgetFactory() { objectViewOfWidget = ObjViewType_SequenceView; diff --git a/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidgetFactory.h b/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidgetFactory.h index c38a9ecf004792e8616e2328a6e8f88d20a930f8..e37d3d825b617d70d0462b87131ab00f28f75043 100644 --- a/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidgetFactory.h +++ b/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidgetFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidgetSavableTab.cpp b/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidgetSavableTab.cpp index 41d1a048d07d049d0f7f68a55ca73928f5869397..4d36e1a1c807b8245ef9b422b27b40de1558301a 100644 --- a/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidgetSavableTab.cpp +++ b/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidgetSavableTab.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidgetSavableTab.h b/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidgetSavableTab.h index e80c85452fbed9295ded7dc58940ccc77b91bffe..893594cacb378b9ecf342c70dff81b23637fc745 100644 --- a/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidgetSavableTab.h +++ b/src/corelibs/U2View/src/ov_sequence/find_pattern/FindPatternWidgetSavableTab.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/image_export/ExportImagePainter.h b/src/corelibs/U2View/src/ov_sequence/image_export/ExportImagePainter.h index 2ca81fb55a17745b6e9164cc25cf3b9e94dd81b5..ec59d489715495ae8490c74bef08912472404e74 100644 --- a/src/corelibs/U2View/src/ov_sequence/image_export/ExportImagePainter.h +++ b/src/corelibs/U2View/src/ov_sequence/image_export/ExportImagePainter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/image_export/SequenceExportSettingsWidget.cpp b/src/corelibs/U2View/src/ov_sequence/image_export/SequenceExportSettingsWidget.cpp index d8c26793e8a6b430b8d8af5b766884e2fd7c66c9..e6b1948a0ddf9909cff381f66b994c219ee22fc2 100644 --- a/src/corelibs/U2View/src/ov_sequence/image_export/SequenceExportSettingsWidget.cpp +++ b/src/corelibs/U2View/src/ov_sequence/image_export/SequenceExportSettingsWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/image_export/SequenceExportSettingsWidget.h b/src/corelibs/U2View/src/ov_sequence/image_export/SequenceExportSettingsWidget.h index 80c74ecf0e7cbb3437e5e7e81ae1ff4ef599937a..19be6942b5a1e05aaf366318a5f0e89677191212 100644 --- a/src/corelibs/U2View/src/ov_sequence/image_export/SequenceExportSettingsWidget.h +++ b/src/corelibs/U2View/src/ov_sequence/image_export/SequenceExportSettingsWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/image_export/SequencePainter.cpp b/src/corelibs/U2View/src/ov_sequence/image_export/SequencePainter.cpp index 57abb7f58cedbdf70f1bacf1f0efa1922034e2b4..b5dbfdfb5154b9ea7586ecf3a6c5aa35e0364fb0 100644 --- a/src/corelibs/U2View/src/ov_sequence/image_export/SequencePainter.cpp +++ b/src/corelibs/U2View/src/ov_sequence/image_export/SequencePainter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/image_export/SequencePainter.h b/src/corelibs/U2View/src/ov_sequence/image_export/SequencePainter.h index 748b6a6fe88e6bf0c6daf242a238a75b0d64e0ab..fc8c25dc48691f09b07e2c206d58d819acc9c0dd 100644 --- a/src/corelibs/U2View/src/ov_sequence/image_export/SequencePainter.h +++ b/src/corelibs/U2View/src/ov_sequence/image_export/SequencePainter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/image_export/SingleSequenceImageExportController.cpp b/src/corelibs/U2View/src/ov_sequence/image_export/SingleSequenceImageExportController.cpp index 2c4a0bdcbda112fb256b45183606b696ffcd612e..9527475aaff42ab9adb129f9c2d76e4b20246f2e 100644 --- a/src/corelibs/U2View/src/ov_sequence/image_export/SingleSequenceImageExportController.cpp +++ b/src/corelibs/U2View/src/ov_sequence/image_export/SingleSequenceImageExportController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/image_export/SingleSequenceImageExportController.h b/src/corelibs/U2View/src/ov_sequence/image_export/SingleSequenceImageExportController.h index ebe686e51d307d49877764cbb60c0eee021eb02d..df30cab3aeee5f2c467ce56e0b3f06996c485948 100644 --- a/src/corelibs/U2View/src/ov_sequence/image_export/SingleSequenceImageExportController.h +++ b/src/corelibs/U2View/src/ov_sequence/image_export/SingleSequenceImageExportController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/image_export/SingleSequenceImageExportTask.cpp b/src/corelibs/U2View/src/ov_sequence/image_export/SingleSequenceImageExportTask.cpp index 36d017b88f228426bf7d8e51c70a01df592445cb..a8592def8da9d687b3597eb60dbf694d5802a320 100644 --- a/src/corelibs/U2View/src/ov_sequence/image_export/SingleSequenceImageExportTask.cpp +++ b/src/corelibs/U2View/src/ov_sequence/image_export/SingleSequenceImageExportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/image_export/SingleSequenceImageExportTask.h b/src/corelibs/U2View/src/ov_sequence/image_export/SingleSequenceImageExportTask.h index d0e523a19848c6a7ae0599b8897d42dc96111ad4..bb348a03d626dc2c13434020b02c2970cf5f4120 100644 --- a/src/corelibs/U2View/src/ov_sequence/image_export/SingleSequenceImageExportTask.h +++ b/src/corelibs/U2View/src/ov_sequence/image_export/SingleSequenceImageExportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/sequence_info/CharOccurTask.cpp b/src/corelibs/U2View/src/ov_sequence/sequence_info/CharOccurTask.cpp index 823289232d19f827201fd580c93e4fae47074675..ba67d72adb9354a9546c4f153eb9ddf7b6824d04 100644 --- a/src/corelibs/U2View/src/ov_sequence/sequence_info/CharOccurTask.cpp +++ b/src/corelibs/U2View/src/ov_sequence/sequence_info/CharOccurTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/sequence_info/CharOccurTask.h b/src/corelibs/U2View/src/ov_sequence/sequence_info/CharOccurTask.h index b21dc9993db8fe9953ad90f2818653ec2e353f5d..f60094ca06b94a2aa4570c4cd8f6b9aab3c683a7 100644 --- a/src/corelibs/U2View/src/ov_sequence/sequence_info/CharOccurTask.h +++ b/src/corelibs/U2View/src/ov_sequence/sequence_info/CharOccurTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/sequence_info/DNAStatisticsTask.cpp b/src/corelibs/U2View/src/ov_sequence/sequence_info/DNAStatisticsTask.cpp index 2929ae6677bebcfc5cf414fe03b45142ce06ad2a..844c023390e7de27e82aa24c6de119a36f090a5e 100644 --- a/src/corelibs/U2View/src/ov_sequence/sequence_info/DNAStatisticsTask.cpp +++ b/src/corelibs/U2View/src/ov_sequence/sequence_info/DNAStatisticsTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/sequence_info/DNAStatisticsTask.h b/src/corelibs/U2View/src/ov_sequence/sequence_info/DNAStatisticsTask.h index 3048f32acc76787deb76a0005f3f16d17224c24c..f64da2e3a091b879695a9bd1333dd0ec75195617 100644 --- a/src/corelibs/U2View/src/ov_sequence/sequence_info/DNAStatisticsTask.h +++ b/src/corelibs/U2View/src/ov_sequence/sequence_info/DNAStatisticsTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/sequence_info/DinuclOccurTask.cpp b/src/corelibs/U2View/src/ov_sequence/sequence_info/DinuclOccurTask.cpp index eb51cd8244830c963f757b8ba33e190dca237f52..79d4cd33678ecb5e8d7d39edc18cac11e675be09 100644 --- a/src/corelibs/U2View/src/ov_sequence/sequence_info/DinuclOccurTask.cpp +++ b/src/corelibs/U2View/src/ov_sequence/sequence_info/DinuclOccurTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/sequence_info/DinuclOccurTask.h b/src/corelibs/U2View/src/ov_sequence/sequence_info/DinuclOccurTask.h index a15ca7cd6aa988b5053f1ff620c48c6425891425..f8ddde9371ed38794e8c42e7d15dd02bb9a1be12 100644 --- a/src/corelibs/U2View/src/ov_sequence/sequence_info/DinuclOccurTask.h +++ b/src/corelibs/U2View/src/ov_sequence/sequence_info/DinuclOccurTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/sequence_info/SequenceInfo.cpp b/src/corelibs/U2View/src/ov_sequence/sequence_info/SequenceInfo.cpp index 02d9781a7d32e24816ab4ae9c906247c028d00e6..e933b9eca3c2bed4161a5ea71463b1fe6bbdd00d 100644 --- a/src/corelibs/U2View/src/ov_sequence/sequence_info/SequenceInfo.cpp +++ b/src/corelibs/U2View/src/ov_sequence/sequence_info/SequenceInfo.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/sequence_info/SequenceInfo.h b/src/corelibs/U2View/src/ov_sequence/sequence_info/SequenceInfo.h index e3fa5166ba51ec594dea8a0ee5b948cbdda88e4b..c2b2157c196b6594ed440992e9532a61c7beaed3 100644 --- a/src/corelibs/U2View/src/ov_sequence/sequence_info/SequenceInfo.h +++ b/src/corelibs/U2View/src/ov_sequence/sequence_info/SequenceInfo.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/sequence_info/SequenceInfoFactory.cpp b/src/corelibs/U2View/src/ov_sequence/sequence_info/SequenceInfoFactory.cpp index 15f21c5123be20b37fb20a9b1ab084fa097c37d3..f270cd0ea663c6ae15cfed72b2fe8b0f40261b45 100644 --- a/src/corelibs/U2View/src/ov_sequence/sequence_info/SequenceInfoFactory.cpp +++ b/src/corelibs/U2View/src/ov_sequence/sequence_info/SequenceInfoFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,7 +33,7 @@ namespace U2 { const QString SequenceInfoFactory::GROUP_ID = "OP_SEQ_INFO"; const QString SequenceInfoFactory::GROUP_ICON_STR = ":core/images/chart_bar.png"; -const QString SequenceInfoFactory::GROUP_DOC_PAGE = "22055827"; +const QString SequenceInfoFactory::GROUP_DOC_PAGE = "24742362"; SequenceInfoFactory::SequenceInfoFactory() { objectViewOfWidget = ObjViewType_SequenceView; diff --git a/src/corelibs/U2View/src/ov_sequence/sequence_info/SequenceInfoFactory.h b/src/corelibs/U2View/src/ov_sequence/sequence_info/SequenceInfoFactory.h index 5b96df7c11864092f847e099d72412715c41f257..b39be83f79f6fd85f8affa84d654e519be1db981 100644 --- a/src/corelibs/U2View/src/ov_sequence/sequence_info/SequenceInfoFactory.h +++ b/src/corelibs/U2View/src/ov_sequence/sequence_info/SequenceInfoFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/sequence_info/StatisticsCache.h b/src/corelibs/U2View/src/ov_sequence/sequence_info/StatisticsCache.h index 670128e701df461c848e8dfd01eb9f7d855497fc..1fda8075d071de65e6c897f1a570165c6a29bba6 100644 --- a/src/corelibs/U2View/src/ov_sequence/sequence_info/StatisticsCache.h +++ b/src/corelibs/U2View/src/ov_sequence/sequence_info/StatisticsCache.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewMultiLineRenderer.cpp b/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewMultiLineRenderer.cpp index db5c6906fbc4be85080e82445792e4f2f75a58fe..813f54f5a7e3797810e73bc0e6989b50137c3024 100644 --- a/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewMultiLineRenderer.cpp +++ b/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewMultiLineRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewMultiLineRenderer.h b/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewMultiLineRenderer.h index 158d48d3e3ee40974f6de4cf5525a3b6b7c9f6d6..65d67aff4639646975542abf33ffde736a4e4caa 100644 --- a/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewMultiLineRenderer.h +++ b/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewMultiLineRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewRenderer.cpp b/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewRenderer.cpp index 020e7fc1c8d94d563a582c84d3f908f2fe6f5180..9282aa60b570580670e56a0b4f17dcf05eb3e662 100644 --- a/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewRenderer.cpp +++ b/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewRenderer.h b/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewRenderer.h index b97088512646e500f6dbec1115271e097dbc9d4c..0e8373d2fc547837d01203779f0da804ebc23396 100644 --- a/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewRenderer.h +++ b/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewSingleLineRenderer.cpp b/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewSingleLineRenderer.cpp index de3c84fd620a0da23415de19cdddfea6503bb09b..ae0558d14d40289765a752f36158bceb083454a9 100644 --- a/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewSingleLineRenderer.cpp +++ b/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewSingleLineRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewSingleLineRenderer.h b/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewSingleLineRenderer.h index ac1fe3d7f1c92e72dbae2fa8677cc3e1c58a196e..45eb9f264fd1197db4f3747a166a630a9543e8c4 100644 --- a/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewSingleLineRenderer.h +++ b/src/corelibs/U2View/src/ov_sequence/view_rendering/DetViewSingleLineRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/view_rendering/PanViewRenderer.cpp b/src/corelibs/U2View/src/ov_sequence/view_rendering/PanViewRenderer.cpp index 06e36999a0bca6e4ead0d56c971ea0efd0b125c7..7cd453d6a8727e7f541979043c4a608b846fbb57 100644 --- a/src/corelibs/U2View/src/ov_sequence/view_rendering/PanViewRenderer.cpp +++ b/src/corelibs/U2View/src/ov_sequence/view_rendering/PanViewRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -268,6 +268,7 @@ void PanViewRenderer::drawSequenceSelection(QPainter& p, const QSize &canvasSize } int x1 = qMax(0, posToXCoord(r.startPos, canvasSize, visibleRange)); int x2 = qMin(canvasSize.width(), posToXCoord(r.endPos(), canvasSize, visibleRange)); + x2 = x2 < 0 ? canvasSize.width() : x2; p.setPen(pen1); if (visibleRange.contains(r.startPos) && s->numLines > 1) { diff --git a/src/corelibs/U2View/src/ov_sequence/view_rendering/PanViewRenderer.h b/src/corelibs/U2View/src/ov_sequence/view_rendering/PanViewRenderer.h index f581179ed0bb98d7fc4bd7bc4b40524039d9e062..c96c6a58382489fc3760fd3de3acbb40bc44d91a 100644 --- a/src/corelibs/U2View/src/ov_sequence/view_rendering/PanViewRenderer.h +++ b/src/corelibs/U2View/src/ov_sequence/view_rendering/PanViewRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/view_rendering/SequenceViewAnnotatedRenderer.cpp b/src/corelibs/U2View/src/ov_sequence/view_rendering/SequenceViewAnnotatedRenderer.cpp index 6bb00ae3e86fa3b277adedd4b88c083edc12f55a..770e3d81fefec8734f109e3f4ff40e1f8dd83e72 100644 --- a/src/corelibs/U2View/src/ov_sequence/view_rendering/SequenceViewAnnotatedRenderer.cpp +++ b/src/corelibs/U2View/src/ov_sequence/view_rendering/SequenceViewAnnotatedRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -21,14 +21,16 @@ #include "SequenceViewAnnotatedRenderer.h" -#include <U2Core/AnnotationTableObject.h> #include <U2Core/AnnotationSettings.h> +#include <U2Core/AnnotationTableObject.h> #include <U2Core/AppContext.h> +#include <U2Core/DNASequenceObject.h> #include <U2Core/GenbankFeatures.h> #include <U2Core/U1AnnotationUtils.h> #include <U2Core/U2SafePoints.h> #include <U2View/ADVSequenceObjectContext.h> +#include <U2View/SequenceObjectContext.h> namespace U2 { @@ -86,7 +88,13 @@ SequenceViewAnnotatedRenderer::SequenceViewAnnotatedRenderer(SequenceObjectConte void SequenceViewAnnotatedRenderer::drawAnnotations(QPainter &p, const QSize &canvasSize, const U2Region &visibleRange, const AnnotationDisplaySettings& displaySettings) { foreach (const AnnotationTableObject *ao, ctx->getAnnotationObjects(true)) { - foreach (Annotation *a, ao->getAnnotationsByRegion(visibleRange)) { + QList<Annotation *> annotations = ao->getAnnotationsByRegion(visibleRange); + QList<Annotation *> restrictionSites = ao->getAnnotationsByType(U2FeatureTypes::RestrictionSite); + foreach(Annotation *a, restrictionSites) { + CHECK_CONTINUE(!annotations.contains(a)); + annotations.append(a); + } + foreach(Annotation *a, annotations) { drawAnnotation(p, canvasSize, visibleRange, a, displaySettings); } } @@ -117,59 +125,64 @@ void SequenceViewAnnotatedRenderer::drawAnnotation(QPainter &p, const QSize& can QPen borderPen(Qt::SolidLine); borderPen.setWidth(selected ? 2 : 1); + const bool isRestrictionSite = a->getType() == U2FeatureTypes::RestrictionSite; QVector<U2Region> location = aData->getRegions(); bool simple = location.size() == 1; for (int ri = 0, ln = location.size(); ri < ln; ri++) { const U2Region &r = location.at(ri); - if (!r.intersects(visibleRange)) { - continue; - } - const U2Region visibleLocation = r.intersect(visibleRange); - const U2Region y = predefinedY.isEmpty() ? getAnnotationYRange(a, ri, as, canvasSize, visibleRange) : predefinedY; - if (y.startPos < 0) { - continue; - } + if (r.intersects(visibleRange)) { + const U2Region visibleLocation = r.intersect(visibleRange); + const U2Region y = predefinedY.isEmpty() ? getAnnotationYRange(a, ri, as, canvasSize, visibleRange) : predefinedY; + if (y.startPos < 0) { + continue; + } - const int x1 = posToXCoord(visibleLocation.startPos, canvasSize, visibleRange); - const int x2 = posToXCoord(visibleLocation.endPos(), canvasSize, visibleRange); - - const int rw = qMax(selected ? MIN_SELECTED_ANNOTATION_WIDTH : MIN_ANNOTATION_WIDTH, x2 - x1); - SAFE_POINT(rw > 0, "Negative length of annotationYRange", ); - - // annotation rect setting - const QRect annotationRect(x1, y.startPos, rw, y.length); - QPainterPath rectPath; - rectPath.addRect(x1, y.startPos, rw, y.length); - // find out if the arrow is needed - const bool leftTrim = visibleLocation.startPos != r.startPos; - const bool rightTrim = visibleLocation.endPos() != r.endPos(); - const bool drawArrow = aData->getStrand().isCompementary() ? !leftTrim : !rightTrim; - if (displaySettings.displayAnnotationArrows && drawArrow) { - bool isLeft = false; - if (1 == ri && aData->findFirstQualifierValue("rpt_type") == "inverted") { //temporary solution for drawing inverted repeats correct - isLeft = true; - } else { - isLeft = aData->getStrand().isCompementary(); + const int x1 = posToXCoord(visibleLocation.startPos, canvasSize, visibleRange); + const int x2 = posToXCoord(visibleLocation.endPos(), canvasSize, visibleRange); + + const int rw = qMax(selected ? MIN_SELECTED_ANNOTATION_WIDTH : MIN_ANNOTATION_WIDTH, x2 - x1); + SAFE_POINT(rw > 0, "Negative length of annotationYRange", ); + + // annotation rect setting + const QRect annotationRect(x1, y.startPos, rw, y.length); + QPainterPath rectPath; + rectPath.addRect(x1, y.startPos, rw, y.length); + // find out if the arrow is needed + const bool leftTrim = visibleLocation.startPos != r.startPos; + const bool rightTrim = visibleLocation.endPos() != r.endPos(); + const bool drawArrow = aData->getStrand().isCompementary() ? !leftTrim : !rightTrim; + if (displaySettings.displayAnnotationArrows && drawArrow) { + bool isLeft = false; + if (1 == ri && aData->findFirstQualifierValue("rpt_type") == "inverted") { //temporary solution for drawing inverted repeats correct + isLeft = true; + } else { + isLeft = aData->getStrand().isCompementary(); + } + addArrowPath(rectPath, annotationRect, isLeft); } - addArrowPath(rectPath, annotationRect, isLeft); - } - rectPath.setFillRule(Qt::WindingFill); - p.fillPath(rectPath, as->color); - p.fillPath(rectPath, annMetrics.gradientMaskBrush); + rectPath.setFillRule(Qt::WindingFill); + p.fillPath(rectPath, as->color); + p.fillPath(rectPath, annMetrics.gradientMaskBrush); - p.setPen(borderPen); - if (rw > MIN_ANNOTATION_WIDTH) { - p.drawPath(rectPath); - if (displaySettings.displayAnnotationNames && annotationRect.width() >= MIN_ANNOTATION_TEXT_WIDTH) { - const QString aText = prepareAnnotationText(aData, as); - drawBoundedText(p, annotationRect, aText); - } - if (simple && annotationRect.width() > MIN_WIDTH_TO_DRAW_EXTRA_FEATURES && displaySettings.displayCutSites) { - drawCutSite(p, aData, r, annotationRect, as->color, canvasSize, visibleRange); + p.setPen(borderPen); + if (rw > MIN_ANNOTATION_WIDTH) { + p.drawPath(rectPath); + if (displaySettings.displayAnnotationNames && annotationRect.width() >= MIN_ANNOTATION_TEXT_WIDTH) { + const QString aText = prepareAnnotationText(aData, as); + drawBoundedText(p, annotationRect, aText); + } + if (simple && + annotationRect.width() > MIN_WIDTH_TO_DRAW_EXTRA_FEATURES && + displaySettings.displayCutSites) { + drawCutSite(p, aData, r, annotationRect, as->color, canvasSize, visibleRange); + } } + drawAnnotationConnections(p, a, as, displaySettings, canvasSize, visibleRange); + } else if (isRestrictionSite && simple && displaySettings.displayCutSites) { + p.setPen(borderPen); + drawCutSite(p, aData, r, QRect(), as->color, canvasSize, visibleRange); } - drawAnnotationConnections(p, a, as, displaySettings, canvasSize, visibleRange); } } @@ -280,8 +293,9 @@ void SequenceViewAnnotatedRenderer::drawCutSite(QPainter &p, const SharedAnnotat } } - U2Region cutSiteY = aData->getStrand().isDirect() ? getMirroredYRange(U2Strand(U2Strand::Complementary)) - : getMirroredYRange(U2Strand(U2Strand::Direct)); + bool isDirectStrand = aData->getStrand().isDirect(); + U2Region cutSiteY = isDirectStrand ? getMirroredYRange(U2Strand(U2Strand::Complementary)) + : getMirroredYRange(U2Strand(U2Strand::Direct)); QRect mirroredAnnotationRect = annotationRect; mirroredAnnotationRect.setY(cutSiteY.startPos); mirroredAnnotationRect.setHeight(cutSiteY.length); @@ -290,15 +304,14 @@ void SequenceViewAnnotatedRenderer::drawCutSite(QPainter &p, const SharedAnnotat toInsert.color = color; if (hasD) { toInsert.direct = true; - toInsert.pos = aData->getStrand().isDirect() ? r.startPos + cutD - : r.startPos + cutC; - aData->getStrand().isDirect() ? toInsert.r = annotationRect : toInsert.r = mirroredAnnotationRect; + toInsert.pos = correctCutPos(isDirectStrand ? r.startPos + cutD : r.startPos + cutC); + toInsert.r = isDirectStrand ? annotationRect : mirroredAnnotationRect; drawCutSite(p, toInsert, canvasSize, visibleRange); } if (hasC) { toInsert.direct = false; - toInsert.pos = aData->getStrand().isDirect() ? r.endPos() - cutC : r.endPos() - cutD; - aData->getStrand().isCompementary() ? toInsert.r = annotationRect : toInsert.r = mirroredAnnotationRect; + toInsert.pos = correctCutPos(isDirectStrand ? r.endPos() - cutC : r.endPos() - cutD); + toInsert.r = !isDirectStrand ? annotationRect : mirroredAnnotationRect; drawCutSite(p, toInsert, canvasSize, visibleRange); } @@ -306,6 +319,7 @@ void SequenceViewAnnotatedRenderer::drawCutSite(QPainter &p, const SharedAnnotat void SequenceViewAnnotatedRenderer::drawCutSite(QPainter& p, const CutSiteDrawData& cData, const QSize& canvasSize, const U2Region& visibleRange) { int xCenter = posToXCoord(cData.pos, canvasSize, visibleRange); + CHECK(xCenter != -1, ); int xLeft = xCenter - CUT_SITE_HALF_WIDTH; int xRight= xCenter + CUT_SITE_HALF_WIDTH; @@ -360,4 +374,21 @@ void SequenceViewAnnotatedRenderer::addArrowPath(QPainterPath& path, const QRect path = path.united(arrowPath); } +qint64 SequenceViewAnnotatedRenderer::correctCutPos(const qint64 pos) const { + const bool isCircular = ctx->getSequenceObject()->isCircular(); + const qint64 sequenceLength = ctx->getSequenceLength(); + qint64 result = pos; + if (isCircular) { + if (result < 0) { + result = sequenceLength + result; + } else if (result > sequenceLength) { + result = result - sequenceLength; + } + } else { + result = qBound((qint64)0, result, sequenceLength); + } + + return result; +} + } // namespace diff --git a/src/corelibs/U2View/src/ov_sequence/view_rendering/SequenceViewAnnotatedRenderer.h b/src/corelibs/U2View/src/ov_sequence/view_rendering/SequenceViewAnnotatedRenderer.h index ed0828a1d1432ff2030746ca3ad26c1c2eb52abb..2a986430edd9fa46d25c05d1a7a0e7c1b7587545 100644 --- a/src/corelibs/U2View/src/ov_sequence/view_rendering/SequenceViewAnnotatedRenderer.h +++ b/src/corelibs/U2View/src/ov_sequence/view_rendering/SequenceViewAnnotatedRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -111,6 +111,8 @@ protected: void addArrowPath(QPainterPath& path, const QRect& rect, bool leftArrow) const; + qint64 correctCutPos(const qint64 pos) const; + AnnotationViewMetrics annMetrics; static const int MIN_ANNOTATION_WIDTH; diff --git a/src/corelibs/U2View/src/ov_sequence/view_rendering/SequenceViewRenderer.cpp b/src/corelibs/U2View/src/ov_sequence/view_rendering/SequenceViewRenderer.cpp index 7fe071bba4e4b6f95858f28df48a69921204afac..9ddee4ccf9f3972bb46b0186f4ad5f3cd3cc565b 100644 --- a/src/corelibs/U2View/src/ov_sequence/view_rendering/SequenceViewRenderer.cpp +++ b/src/corelibs/U2View/src/ov_sequence/view_rendering/SequenceViewRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_sequence/view_rendering/SequenceViewRenderer.h b/src/corelibs/U2View/src/ov_sequence/view_rendering/SequenceViewRenderer.h index a1d44392331625308d39f5eed40ade899e9d2cd6..b8de2eec41d912ac7bb662563fa521ad82edc7cc 100644 --- a/src/corelibs/U2View/src/ov_sequence/view_rendering/SequenceViewRenderer.h +++ b/src/corelibs/U2View/src/ov_sequence/view_rendering/SequenceViewRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_text/SimpleTextObjectView.cpp b/src/corelibs/U2View/src/ov_text/SimpleTextObjectView.cpp index 1c9c0827e991975c33f1ba912964fdea7f6c3260..06a06eb303b2e17d55f9cc164f523d7c18dc2c93 100644 --- a/src/corelibs/U2View/src/ov_text/SimpleTextObjectView.cpp +++ b/src/corelibs/U2View/src/ov_text/SimpleTextObjectView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_text/SimpleTextObjectView.h b/src/corelibs/U2View/src/ov_text/SimpleTextObjectView.h index 11318999575c201aa72bf438f0c7b5836c2c2828..a777a3cedc1f3865523cd5645d503955ccd2401e 100644 --- a/src/corelibs/U2View/src/ov_text/SimpleTextObjectView.h +++ b/src/corelibs/U2View/src/ov_text/SimpleTextObjectView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_text/SimpleTextObjectViewTasks.cpp b/src/corelibs/U2View/src/ov_text/SimpleTextObjectViewTasks.cpp index 148adbb572c0f54a8bd831f8412765fba416c063..96551fce7c94b16695caaab0787c6499eddbddff 100644 --- a/src/corelibs/U2View/src/ov_text/SimpleTextObjectViewTasks.cpp +++ b/src/corelibs/U2View/src/ov_text/SimpleTextObjectViewTasks.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/ov_text/SimpleTextObjectViewTasks.h b/src/corelibs/U2View/src/ov_text/SimpleTextObjectViewTasks.h index e766a6470986cce38138e03b6728e7705fb8e726..47c94ff3287d9ecb8ca9f63ced47a662d3d03f44 100644 --- a/src/corelibs/U2View/src/ov_text/SimpleTextObjectViewTasks.h +++ b/src/corelibs/U2View/src/ov_text/SimpleTextObjectViewTasks.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/phyltree/BaseSettingsDialog.cpp b/src/corelibs/U2View/src/phyltree/BaseSettingsDialog.cpp index 0376779bce3bab5d8e880890e2b599c68dee2a70..d4894ac6921c15b641c19ce854d56e5aa6b26c60 100644 --- a/src/corelibs/U2View/src/phyltree/BaseSettingsDialog.cpp +++ b/src/corelibs/U2View/src/phyltree/BaseSettingsDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/phyltree/BaseSettingsDialog.h b/src/corelibs/U2View/src/phyltree/BaseSettingsDialog.h index 7b5af657d928ef60d3b6fe8400059fcee21bb0f6..e77c755c769ae83764061af7ecf96580f536a5df 100644 --- a/src/corelibs/U2View/src/phyltree/BaseSettingsDialog.h +++ b/src/corelibs/U2View/src/phyltree/BaseSettingsDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/phyltree/BranchSettingsDialog.cpp b/src/corelibs/U2View/src/phyltree/BranchSettingsDialog.cpp index 75cd348975b34d5506a3cb2d9eb5adf1dbfeaa55..dcf598d5868aca50bf29d5b12dd7286f35bbd731 100644 --- a/src/corelibs/U2View/src/phyltree/BranchSettingsDialog.cpp +++ b/src/corelibs/U2View/src/phyltree/BranchSettingsDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -35,7 +35,7 @@ BranchSettingsDialog::BranchSettingsDialog(QWidget *parent, const OptionsMap& se changedSettings[BRANCH_COLOR] = settings[BRANCH_COLOR]; changedSettings[BRANCH_THICKNESS] = settings[BRANCH_THICKNESS]; setupUi(this); - new HelpButton(this, buttonBox, "22055994"); + new HelpButton(this, buttonBox, "24742529"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2View/src/phyltree/BranchSettingsDialog.h b/src/corelibs/U2View/src/phyltree/BranchSettingsDialog.h index 311bde3ffeaac3c7e7713f30d2f05c5a24379905..39436da5abca826806c1ea9ce5fe2e49a769e86f 100644 --- a/src/corelibs/U2View/src/phyltree/BranchSettingsDialog.h +++ b/src/corelibs/U2View/src/phyltree/BranchSettingsDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/phyltree/CreatePhyTreeDialogController.cpp b/src/corelibs/U2View/src/phyltree/CreatePhyTreeDialogController.cpp index b74f84b57bc0fe386b1fea4e1692b6c3bbceb7b4..bad300e155d452e3739ade2e563aa0add61c6f0e 100644 --- a/src/corelibs/U2View/src/phyltree/CreatePhyTreeDialogController.cpp +++ b/src/corelibs/U2View/src/phyltree/CreatePhyTreeDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -62,9 +62,9 @@ CreatePhyTreeDialogController::CreatePhyTreeDialogController(QWidget* parent, co ui->setupUi(this); QMap<QString, QString> helpPagesMap; - helpPagesMap.insert("PHYLIP Neighbor Joining","22055953"); - helpPagesMap.insert("MrBayes","22055954"); - helpPagesMap.insert("PhyML Maximum Likelihood","22055952"); + helpPagesMap.insert("PHYLIP Neighbor Joining","24742488"); + helpPagesMap.insert("MrBayes","24742489"); + helpPagesMap.insert("PhyML Maximum Likelihood","24742487"); new ComboboxDependentHelpButton(this, ui->buttonBox, ui->algorithmBox, helpPagesMap); ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Build")); @@ -89,7 +89,7 @@ CreatePhyTreeDialogController::CreatePhyTreeDialogController(QWidget* parent, co } void CreatePhyTreeDialogController::accept() { - settings.algorithmId = ui->algorithmBox->currentText(); + settings.algorithm = ui->algorithmBox->currentText(); CHECK(checkFileName(), ); SAFE_POINT(NULL != settingsWidget, "Settings widget is NULL", ); diff --git a/src/corelibs/U2View/src/phyltree/CreatePhyTreeDialogController.h b/src/corelibs/U2View/src/phyltree/CreatePhyTreeDialogController.h index 8321b05c2551b1e317e17c6575cc8835d3eae711..0f9ac802e518e0b9653848d68ef41b1ff248d565 100644 --- a/src/corelibs/U2View/src/phyltree/CreatePhyTreeDialogController.h +++ b/src/corelibs/U2View/src/phyltree/CreatePhyTreeDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/phyltree/CreatePhyTreeWidget.cpp b/src/corelibs/U2View/src/phyltree/CreatePhyTreeWidget.cpp index b149eb4550a7d8a6b4009d39b7f61f45e903fd0b..a54ce405767bb20f6733a81d5acaa838d9cfd578 100644 --- a/src/corelibs/U2View/src/phyltree/CreatePhyTreeWidget.cpp +++ b/src/corelibs/U2View/src/phyltree/CreatePhyTreeWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/phyltree/CreatePhyTreeWidget.h b/src/corelibs/U2View/src/phyltree/CreatePhyTreeWidget.h index e0865adf354e9dfc0a0bb9978d8fc9d5a1d3e84b..3ed3f4f0a0b95c611d999092b65073720ae09927 100644 --- a/src/corelibs/U2View/src/phyltree/CreatePhyTreeWidget.h +++ b/src/corelibs/U2View/src/phyltree/CreatePhyTreeWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/phyltree/PhyTreeDisplayOptionsWidget.cpp b/src/corelibs/U2View/src/phyltree/PhyTreeDisplayOptionsWidget.cpp index 991d6b481d66fdae37b7c57b0fbe2be0a32180f5..9a1e675509563300a6aacf4f89f5ecedb6a8a94a 100644 --- a/src/corelibs/U2View/src/phyltree/PhyTreeDisplayOptionsWidget.cpp +++ b/src/corelibs/U2View/src/phyltree/PhyTreeDisplayOptionsWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/phyltree/PhyTreeDisplayOptionsWidget.h b/src/corelibs/U2View/src/phyltree/PhyTreeDisplayOptionsWidget.h index 8117a0f06252278474dfb72b12cf6569f6c8900a..447d010f4d9eb37b503a0700af962dad0f3aa42d 100644 --- a/src/corelibs/U2View/src/phyltree/PhyTreeDisplayOptionsWidget.h +++ b/src/corelibs/U2View/src/phyltree/PhyTreeDisplayOptionsWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/phyltree/TextSettingsDialog.cpp b/src/corelibs/U2View/src/phyltree/TextSettingsDialog.cpp index 4c59c3bad5c37ddfd2db3c0b59c9496f2abb78dd..32935d64623334d3f7773e1fb1f73db58486de6a 100644 --- a/src/corelibs/U2View/src/phyltree/TextSettingsDialog.cpp +++ b/src/corelibs/U2View/src/phyltree/TextSettingsDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,7 +33,7 @@ TextSettingsDialog::TextSettingsDialog(QWidget *parent, const OptionsMap& settin : BaseSettingsDialog(parent) { setupUi(this); - new HelpButton(this, buttonBox, "22055999"); + new HelpButton(this, buttonBox, "24742534"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2View/src/phyltree/TextSettingsDialog.h b/src/corelibs/U2View/src/phyltree/TextSettingsDialog.h index 8d4131c89c2f633e2d8a3e86e54ccec5e8afe6ac..c11abc6c5eb1a199226b1e674e782cd747ac9be2 100644 --- a/src/corelibs/U2View/src/phyltree/TextSettingsDialog.h +++ b/src/corelibs/U2View/src/phyltree/TextSettingsDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/phyltree/TreeSettingsDialog.cpp b/src/corelibs/U2View/src/phyltree/TreeSettingsDialog.cpp index c04cd177bd806f9c6f90c73ec9f7e29a8ba1fff7..2cbc3b9739b0169f8b174affe731ae0ff3005510 100644 --- a/src/corelibs/U2View/src/phyltree/TreeSettingsDialog.cpp +++ b/src/corelibs/U2View/src/phyltree/TreeSettingsDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -31,7 +31,7 @@ namespace U2 { TreeSettingsDialog::TreeSettingsDialog(QWidget *parent, const OptionsMap &settings, bool isRectLayout) : BaseSettingsDialog(parent) { setupUi(this); - new HelpButton(this, buttonBox, "22055993"); + new HelpButton(this, buttonBox, "24742528"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2View/src/phyltree/TreeSettingsDialog.h b/src/corelibs/U2View/src/phyltree/TreeSettingsDialog.h index 640999b2aa78f72b1100a7e9c3aba9a35251ba20..1d2efa91b79c0bce2e201e54b047e23bde5e5abd 100644 --- a/src/corelibs/U2View/src/phyltree/TreeSettingsDialog.h +++ b/src/corelibs/U2View/src/phyltree/TreeSettingsDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/util_dna_assembly/BuildIndexDialog.cpp b/src/corelibs/U2View/src/util_dna_assembly/BuildIndexDialog.cpp index 7d1e1fbcb2421922456dc8401afb5bc801e5b431..8dfb57e8dfa8dd964d68abdf05e0784ad570ed04 100644 --- a/src/corelibs/U2View/src/util_dna_assembly/BuildIndexDialog.cpp +++ b/src/corelibs/U2View/src/util_dna_assembly/BuildIndexDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -48,12 +48,12 @@ BuildIndexDialog::BuildIndexDialog(const DnaAssemblyAlgRegistry* registry, QWidg { setupUi(this); QMap<QString,QString> helpPagesMap; - helpPagesMap.insert("BWA","22056070"); - helpPagesMap.insert("BWA-MEM","22056104"); - helpPagesMap.insert("BWA-SW","22056098"); - helpPagesMap.insert("Bowtie","22056067"); - helpPagesMap.insert("Bowtie2","22056095"); - helpPagesMap.insert("UGENE Genome Aligner","22056073"); + helpPagesMap.insert("BWA","24742605"); + helpPagesMap.insert("BWA-MEM","24742639"); + helpPagesMap.insert("BWA-SW","24742633"); + helpPagesMap.insert("Bowtie","24742602"); + helpPagesMap.insert("Bowtie2","24742630"); + helpPagesMap.insert("UGENE Genome Aligner","24742608"); new ComboboxDependentHelpButton(this, buttonBox, methodNamesBox, helpPagesMap); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Start")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -174,24 +174,24 @@ void BuildIndexDialog::accept() { if ((getAlgorithmName() == "Bowtie") || (getAlgorithmName() == "Bowtie2") || (getAlgorithmName() == "BWA") || (getAlgorithmName() == "BWA-MEM") || (getAlgorithmName() == "BWA-SW")) { - QString externalToolName; + QString externalToolId; if (getAlgorithmName() == "Bowtie2") { - externalToolName = "Bowtie 2 build indexer"; + externalToolId = "USUPP_BOWTIE2_BUILD"; } if (getAlgorithmName() == "Bowtie"){ - externalToolName = "Bowtie build indexer"; + externalToolId = "USUPP_BOWTIE_BUILD"; } if ((getAlgorithmName() == "BWA") || (getAlgorithmName() == "BWA-MEM") || (getAlgorithmName() == "BWA-SW")){ - externalToolName = "BWA"; + externalToolId = "USUPP_BWA"; } - if(AppContext::getExternalToolRegistry()->getByName(externalToolName)->getPath().isEmpty()) { + if(AppContext::getExternalToolRegistry()->getById(externalToolId)->getPath().isEmpty()) { QObjectScopedPointer<QMessageBox> msgBox = new QMessageBox(this); msgBox->setWindowTitle(tr("DNA Assembly")); msgBox->setInformativeText(tr("Do you want to select it now?")); msgBox->setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox->setDefaultButton(QMessageBox::Yes); - msgBox->setText(tr(QString("Path for <i>" + externalToolName + "</i> tool is not selected.").toLatin1().data())); + msgBox->setText(tr(QString("Path for <i>" + AppContext::getExternalToolRegistry()->getToolNameById(externalToolId) + "</i> tool is not selected.").toLatin1().data())); const int ret = msgBox->exec(); CHECK(!msgBox.isNull(), ); @@ -206,7 +206,7 @@ void BuildIndexDialog::accept() assert(false); break; } - if(AppContext::getExternalToolRegistry()->getByName(externalToolName)->getPath().isEmpty()) { + if(AppContext::getExternalToolRegistry()->getById(externalToolId)->getPath().isEmpty()) { return; } } diff --git a/src/corelibs/U2View/src/util_dna_assembly/BuildIndexDialog.h b/src/corelibs/U2View/src/util_dna_assembly/BuildIndexDialog.h index 55ab6f4e9282e7507d13174cdd87e0e0d2166d5c..c94adc72c8e71834bc6e87fd63f6474f3d2eaec5 100644 --- a/src/corelibs/U2View/src/util_dna_assembly/BuildIndexDialog.h +++ b/src/corelibs/U2View/src/util_dna_assembly/BuildIndexDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/util_dna_assembly/BuildIndexFromRefDialog.ui b/src/corelibs/U2View/src/util_dna_assembly/BuildIndexFromRefDialog.ui index 8a3e5a0f1165fef40aec4b17b80179492970f34f..c43c774b75018691021aabc69163bb57d5e2bf51 100644 --- a/src/corelibs/U2View/src/util_dna_assembly/BuildIndexFromRefDialog.ui +++ b/src/corelibs/U2View/src/util_dna_assembly/BuildIndexFromRefDialog.ui @@ -7,7 +7,7 @@ <x>0</x> <y>0</y> <width>435</width> - <height>181</height> + <height>184</height> </rect> </property> <property name="sizePolicy"> @@ -39,7 +39,7 @@ <string>Select a method that would be used to align short reads.</string> </property> <property name="text"> - <string>Align short reads method</string> + <string>Map short reads method</string> </property> </widget> </item> diff --git a/src/corelibs/U2View/src/util_dna_assembly/ConvertAssemblyToSamDialog.cpp b/src/corelibs/U2View/src/util_dna_assembly/ConvertAssemblyToSamDialog.cpp index b17d23cbad85f71ed376c1b9e825f03959abd98e..dd838969b6c4174ee383dcb76ee7b2d8010ca13d 100644 --- a/src/corelibs/U2View/src/util_dna_assembly/ConvertAssemblyToSamDialog.cpp +++ b/src/corelibs/U2View/src/util_dna_assembly/ConvertAssemblyToSamDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -44,7 +44,7 @@ ConvertAssemblyToSamDialog::ConvertAssemblyToSamDialog(QWidget* parent, QString saveController(NULL) { ui->setupUi(this); - new HelpButton(this, ui->buttonBox, "22056074"); + new HelpButton(this, ui->buttonBox, "24742609"); ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Convert")); ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2View/src/util_dna_assembly/ConvertAssemblyToSamDialog.h b/src/corelibs/U2View/src/util_dna_assembly/ConvertAssemblyToSamDialog.h index 4452fb91d09e90236208a546e574bf5a70bc09f4..4194278fa975eaf635b500b525f1b763bc481c15 100644 --- a/src/corelibs/U2View/src/util_dna_assembly/ConvertAssemblyToSamDialog.h +++ b/src/corelibs/U2View/src/util_dna_assembly/ConvertAssemblyToSamDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyDialog.cpp b/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyDialog.cpp index 399aac495d9d2275cbae07946fa1ff534b8a0428..35faa44edad1fc21833b28edcd63ca0eebbc9ef7 100644 --- a/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyDialog.cpp +++ b/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -67,12 +67,12 @@ DnaAssemblyDialog::DnaAssemblyDialog(QWidget* p, const QStringList& shortReadsUr { setupUi(this); QMap<QString,QString> helpPagesMap; - helpPagesMap.insert("BWA","22056069"); - helpPagesMap.insert("BWA-MEM","22056103"); - helpPagesMap.insert("BWA-SW","22056097"); - helpPagesMap.insert("Bowtie","22056066"); - helpPagesMap.insert("Bowtie2","22056094"); - helpPagesMap.insert("UGENE Genome Aligner","22056072"); + helpPagesMap.insert("BWA","24742604"); + helpPagesMap.insert("BWA-MEM","24742638"); + helpPagesMap.insert("BWA-SW","24742632"); + helpPagesMap.insert("Bowtie","24742601"); + helpPagesMap.insert("Bowtie2","24742629"); + helpPagesMap.insert("UGENE Genome Aligner","24742607"); new ComboboxDependentHelpButton(this, buttonBox, methodNamesBox, helpPagesMap); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Start")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyDialog.h b/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyDialog.h index d417510261cac7a7cb1b297b373fe9c63542488a..ae4b357f4bf63fafc13ccc2d14d32790287e449b 100644 --- a/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyDialog.h +++ b/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyGUIExtension.cpp b/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyGUIExtension.cpp index 85283c14b17562d747a2413d8199594e6da0d476..4f950e40ab816b0890059b59bcaba964a792482a 100644 --- a/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyGUIExtension.cpp +++ b/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyGUIExtension.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -80,10 +80,10 @@ bool DnaAssemblyAlgorithmMainWidget::requiredToolsAreOk() const { QStringList missedExtTools; ExternalToolRegistry *extToolRegistry = AppContext::getExternalToolRegistry(); SAFE_POINT(NULL != extToolRegistry, L10N::nullPointerError("External tool subsystem"), false); - foreach (const QString &toolName, requiredExtToolNames) { - ExternalTool *tool = extToolRegistry->getByName(toolName); + foreach (const QString &toolId, requiredExtToolIds) { + ExternalTool *tool = extToolRegistry->getById(toolId); if (NULL == tool || tool->getPath().isEmpty()) { - missedExtTools.append(toolName); + missedExtTools.append(extToolRegistry->getToolNameById(toolId)); } } diff --git a/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyGUIExtension.h b/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyGUIExtension.h index c926156adc3a843c32557a78bdbac8756d3d6b63..e4b5c4b93c3d49f5d6f1a3c815945db8153f30ec 100644 --- a/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyGUIExtension.h +++ b/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyGUIExtension.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -58,7 +58,7 @@ protected: bool requiredToolsAreOk() const; QStringList indexSuffixes; - QStringList requiredExtToolNames; + QStringList requiredExtToolIds; }; class U2VIEW_EXPORT DnaAssemblyAlgorithmBuildIndexWidget : public DnaAssemblyAlgorithmBaseWidget { diff --git a/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyUtils.cpp b/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyUtils.cpp index 175397062ee0b9244cd078b756c0ef68b20830f7..45941ab3db15fb917aa16f8b0634da789ee2abc4 100644 --- a/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyUtils.cpp +++ b/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyUtils.h b/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyUtils.h index 10eb667032265ce0b1552ded9f460e2264d65e55..d54a54e3340d911a925cf678cb7eeed5ce0c2187 100644 --- a/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyUtils.h +++ b/src/corelibs/U2View/src/util_dna_assembly/DnaAssemblyUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/util_dna_assembly/GenomeAssemblyDialog.cpp b/src/corelibs/U2View/src/util_dna_assembly/GenomeAssemblyDialog.cpp index 753d11e2cf56b095f4c1675f108b4a44d7b344ac..c619e7e77c1f430b9b02b4bc6afd9c08c68fc58f 100644 --- a/src/corelibs/U2View/src/util_dna_assembly/GenomeAssemblyDialog.cpp +++ b/src/corelibs/U2View/src/util_dna_assembly/GenomeAssemblyDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -56,7 +56,7 @@ GenomeAssemblyDialog::GenomeAssemblyDialog(QWidget* p) setupUi(this); QMap<QString,QString> helpPagesMap; - helpPagesMap.insert("SPAdes","22056105"); + helpPagesMap.insert("SPAdes","24742640"); new ComboboxDependentHelpButton(this, buttonBox, methodNamesBox, helpPagesMap); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Start")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2View/src/util_dna_assembly/GenomeAssemblyDialog.h b/src/corelibs/U2View/src/util_dna_assembly/GenomeAssemblyDialog.h index b71f333de0a1ff6fa47b2d17d970bf5275cf136a..862aab729afb24b200a2ab6891b381669ab3b3e4 100644 --- a/src/corelibs/U2View/src/util_dna_assembly/GenomeAssemblyDialog.h +++ b/src/corelibs/U2View/src/util_dna_assembly/GenomeAssemblyDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/util_msa_align/AlignmentAlgorithmGUIExtension.cpp b/src/corelibs/U2View/src/util_msa_align/AlignmentAlgorithmGUIExtension.cpp index 2e7a05ace28229729331d1231c187c19af1f1926..37cdd52b5fd2a31bae91c2c5509026743df0a28c 100644 --- a/src/corelibs/U2View/src/util_msa_align/AlignmentAlgorithmGUIExtension.cpp +++ b/src/corelibs/U2View/src/util_msa_align/AlignmentAlgorithmGUIExtension.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/util_msa_align/AlignmentAlgorithmGUIExtension.h b/src/corelibs/U2View/src/util_msa_align/AlignmentAlgorithmGUIExtension.h index 1f5e681e85affc5d70f3fdb3cebe722994f7aada..f9e283c88b92790aed731d9b684492aac231eabb 100644 --- a/src/corelibs/U2View/src/util_msa_align/AlignmentAlgorithmGUIExtension.h +++ b/src/corelibs/U2View/src/util_msa_align/AlignmentAlgorithmGUIExtension.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/util_sec_struct_predict/SecStructDialog.cpp b/src/corelibs/U2View/src/util_sec_struct_predict/SecStructDialog.cpp index 8eb8b696734fbe2e48347f0905b77753352f91e3..a9320ce04c3826c3a19cc975d04b21ad105022c7 100644 --- a/src/corelibs/U2View/src/util_sec_struct_predict/SecStructDialog.cpp +++ b/src/corelibs/U2View/src/util_sec_struct_predict/SecStructDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -55,7 +55,7 @@ namespace U2 { SecStructDialog::SecStructDialog( ADVSequenceObjectContext* _ctx, QWidget *p ) : QDialog(p), ctx(_ctx), task(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22056045"); + new HelpButton(this, buttonBox, "24742580"); sspr = AppContext::getSecStructPredictAlgRegistry(); algorithmComboBox->addItems(sspr->getAlgNameList()); diff --git a/src/corelibs/U2View/src/util_sec_struct_predict/SecStructDialog.h b/src/corelibs/U2View/src/util_sec_struct_predict/SecStructDialog.h index fa39143f47712b9a3a34976e8630088a7ff0fd6e..ea9a63fd1028f8733cacf3cf0ca3f17b5a2630b7 100644 --- a/src/corelibs/U2View/src/util_sec_struct_predict/SecStructDialog.h +++ b/src/corelibs/U2View/src/util_sec_struct_predict/SecStructDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/util_sec_struct_predict/SecStructPredictUtils.cpp b/src/corelibs/U2View/src/util_sec_struct_predict/SecStructPredictUtils.cpp index e45db9391ce4dd4022d6fc1367b66764706ffb40..baae05951ac5dc4ea10f2b43314cd19d731c5714 100644 --- a/src/corelibs/U2View/src/util_sec_struct_predict/SecStructPredictUtils.cpp +++ b/src/corelibs/U2View/src/util_sec_struct_predict/SecStructPredictUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/util_sec_struct_predict/SecStructPredictUtils.h b/src/corelibs/U2View/src/util_sec_struct_predict/SecStructPredictUtils.h index 84ac2997e1660af7ec7109d8fc18d44b9f643856..3a734088d09bd9bc339ef8a3df7c521c0d664cc1 100644 --- a/src/corelibs/U2View/src/util_sec_struct_predict/SecStructPredictUtils.h +++ b/src/corelibs/U2View/src/util_sec_struct_predict/SecStructPredictUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/util_smith_waterman/SmithWatermanDialog.cpp b/src/corelibs/U2View/src/util_smith_waterman/SmithWatermanDialog.cpp index 27e8f68e2e1e6e82e17fd334da112fdca1614c3b..b69fda55b0314806f9aded0072aa7a40699fb063 100644 --- a/src/corelibs/U2View/src/util_smith_waterman/SmithWatermanDialog.cpp +++ b/src/corelibs/U2View/src/util_smith_waterman/SmithWatermanDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -73,7 +73,7 @@ SmithWatermanDialog::SmithWatermanDialog(QWidget* w, ADVSequenceObjectContext* c dialogConfig = _dialogConfig; setupUi(this); - new HelpButton(this, buttonBox, "22056052"); + new HelpButton(this, buttonBox, "24742587"); buttonBox->button(QDialogButtonBox::Yes)->setText(tr("Remote run")); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Search")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/corelibs/U2View/src/util_smith_waterman/SmithWatermanDialog.h b/src/corelibs/U2View/src/util_smith_waterman/SmithWatermanDialog.h index 2e7487e1c23c806405015d87debeaa0cdbfcaec5..c97be2b63544050afdbc88bb00ea51b25e16ba1d 100644 --- a/src/corelibs/U2View/src/util_smith_waterman/SmithWatermanDialog.h +++ b/src/corelibs/U2View/src/util_smith_waterman/SmithWatermanDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/util_smith_waterman/SmithWatermanDialogImpl.h b/src/corelibs/U2View/src/util_smith_waterman/SmithWatermanDialogImpl.h index 2df74c0a9c93be48d4fa21442d91d54e75090dad..67a89ac05534a473c756eeb4274adaa9e30f5aab 100644 --- a/src/corelibs/U2View/src/util_smith_waterman/SmithWatermanDialogImpl.h +++ b/src/corelibs/U2View/src/util_smith_waterman/SmithWatermanDialogImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/util_smith_waterman/SubstMatrixDialog.cpp b/src/corelibs/U2View/src/util_smith_waterman/SubstMatrixDialog.cpp index cf15e7a8bd5842530c58cfcd140afe28bd8fc5bf..1d5998c60e4369c953388466af5a13672bba37ca 100644 --- a/src/corelibs/U2View/src/util_smith_waterman/SubstMatrixDialog.cpp +++ b/src/corelibs/U2View/src/util_smith_waterman/SubstMatrixDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/src/util_smith_waterman/SubstMatrixDialog.h b/src/corelibs/U2View/src/util_smith_waterman/SubstMatrixDialog.h index b0893a18a19d5a95f741cb2e7abbde2f673c2932..e208fe7ba3f8e21fa5658c155e7f34a7ed5b644e 100644 --- a/src/corelibs/U2View/src/util_smith_waterman/SubstMatrixDialog.h +++ b/src/corelibs/U2View/src/util_smith_waterman/SubstMatrixDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/corelibs/U2View/transl/russian.ts b/src/corelibs/U2View/transl/russian.ts index 6c9487a6e29befee1efb246cb487e1d11ef435ed..b1e24a4bc394bf9a5c2779e730ab2193c2257fbe 100644 --- a/src/corelibs/U2View/transl/russian.ts +++ b/src/corelibs/U2View/transl/russian.ts @@ -4,12 +4,17 @@ <context> <name>ADVClipboard</name> <message> - <location filename="../src/ov_sequence/ADVClipboard.cpp" line="54"/> <source>Cannot put sequence data into the clipboard buffer. Probably the data is too big.</source> - <translation>Ðевозможно Ñкопировать данные в буфер обмена. + <translation type="vanished">Ðевозможно Ñкопировать данные в буфер обмена. Возможно данные Ñлишком большие.</translation> </message> + <message> + <location filename="../src/ov_sequence/ADVClipboard.cpp" line="54"/> + <source>Cannot put sequence data into the clipboard buffer. +Probably, the data are too big.</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>AssemblyToRefDialog</name> @@ -179,9 +184,13 @@ Probably the data is too big.</source> <translation>Выберите метод выравниваниÑ.</translation> </message> <message> - <location filename="../src/util_dna_assembly/BuildIndexFromRefDialog.ui" line="42"/> <source>Align short reads method</source> - <translation>Метод выравниваниÑ</translation> + <translation type="vanished">Метод выравниваниÑ</translation> + </message> + <message> + <location filename="../src/util_dna_assembly/BuildIndexFromRefDialog.ui" line="42"/> + <source>Map short reads method</source> + <translation type="unfinished"></translation> </message> <message> <location filename="../src/util_dna_assembly/BuildIndexFromRefDialog.ui" line="76"/> @@ -1472,19 +1481,16 @@ Double-click to collapse the branch</source> <translation>Выделение</translation> </message> <message> - <location filename="../src/ov_msa/MsaEditorSimilarityColumn.cpp" line="42"/> <source>Data is outdated</source> - <translation>Данные уÑтарели</translation> + <translation type="vanished">Данные уÑтарели</translation> </message> <message> - <location filename="../src/ov_msa/MsaEditorSimilarityColumn.cpp" line="43"/> <source>Data is valid</source> - <translation>Данные корректны</translation> + <translation type="vanished">Данные корректны</translation> </message> <message> - <location filename="../src/ov_msa/MsaEditorSimilarityColumn.cpp" line="44"/> <source>Data is being updated</source> - <translation>Данные обновлÑÑŽÑ‚ÑÑ</translation> + <translation type="vanished">Данные обновлÑÑŽÑ‚ÑÑ</translation> </message> <message> <location filename="../src/ov_msa/PairAlign/PairAlignFactory.cpp" line="57"/> @@ -1505,17 +1511,16 @@ Double-click to collapse the branch</source> <translation>ÐаÑтройки дерева</translation> </message> <message> - <location filename="../src/ov_sequence/ADVGraphModel.cpp" line="178"/> <source>Default color</source> - <translation>Цвет по умолчанию</translation> + <translation type="vanished">Цвет по умолчанию</translation> </message> <message> - <location filename="../src/ov_sequence/annot_highlight/AnnotHighlightTree.cpp" line="53"/> + <location filename="../src/ov_sequence/annot_highlight/AnnotHighlightTree.cpp" line="52"/> <source>Annotation</source> <translation>ÐннотациÑ</translation> </message> <message> - <location filename="../src/ov_sequence/annot_highlight/AnnotHighlightTree.cpp" line="53"/> + <location filename="../src/ov_sequence/annot_highlight/AnnotHighlightTree.cpp" line="52"/> <source>Color</source> <translation>Цвет</translation> </message> @@ -1576,7 +1581,8 @@ Double-click to collapse the branch</source> <translation>Сайт реÑтрикции</translation> </message> <message> - <location filename="../src/ov_msa/MaEditorStatusBar.cpp" line="111"/> + <location filename="../src/ov_msa/MaEditorStatusBar.cpp" line="162"/> + <location filename="../src/ov_msa/MaEditorStatusBar.cpp" line="168"/> <source>none</source> <translation>нет</translation> </message> @@ -2149,6 +2155,21 @@ Double-click to collapse the branch</source> <translation>Диапазон шкалы</translation> </message> </context> +<context> + <name>U2</name> + <message> + <source>All alphabets</source> + <translation type="obsolete">Ð’Ñе алфавиты</translation> + </message> + <message> + <source>Amino acid alphabet</source> + <translation type="obsolete">ÐминокиÑлотный алфавит</translation> + </message> + <message> + <source>Nucleotide alphabet</source> + <translation type="obsolete">Ðуклеотидный алфавит</translation> + </message> +</context> <context> <name>U2::ADVAnnotationCreation</name> <message> @@ -2224,52 +2245,52 @@ Double-click to collapse the branch</source> <context> <name>U2::ADVSingleSequenceHeaderWidget</name> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="942"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="935"/> <source>Alphabet: <b>%1</b></source> <translation>Ðлфавит: <b>%1</b></translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="943"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="936"/> <source> Sequence size: <b>%1</b></source> <translation> Размер поÑледовательноÑти: <b>%1</b></translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="944"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="937"/> <source> File:&nbsp;<b>%1</b></source> <translation> Файл:&nbsp;<b>%1</b></translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="1027"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="1020"/> <source>raw</source> <translation>raw</translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="1031"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="1024"/> <source>amino ext</source> <translation>amino ext</translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="1033"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="1026"/> <source>amino</source> <translation>амино</translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="1038"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="1031"/> <source>dna</source> <translation>днк</translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="1040"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="1033"/> <source>dna ext</source> <translation>dna ext</translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="1044"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="1037"/> <source>rna ext</source> <translation>rna ext</translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="1042"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="1035"/> <source>rna</source> <translation>rna</translation> </message> @@ -2277,12 +2298,12 @@ Double-click to collapse the branch</source> <context> <name>U2::ADVSingleSequenceWidget</name> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="431"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="428"/> <source>Zoom</source> <translation>МаÑштаб</translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="685"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="682"/> <source>Zoom to range</source> <translation>Выбор маÑштаба</translation> </message> @@ -2292,12 +2313,12 @@ Double-click to collapse the branch</source> <translation>Создать новую шкалу...</translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="523"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="520"/> <source>Rulers...</source> <translation>Шкала обзора...</translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="534"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="531"/> <source>Remove '%1'</source> <translation>Удалить "%1"</translation> </message> @@ -2327,63 +2348,63 @@ Double-click to collapse the branch</source> <translation>Выбрать маÑштаб...</translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="198"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="199"/> <source>Export image</source> <translation>ÐкÑпорт изображениÑ</translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="214"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="215"/> <source>Remove sequence</source> <translation>Удалить поÑледовательноÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="508"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="505"/> <source>Select</source> <translation>Выделить</translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="300"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="293"/> <source>Show all views</source> <translation>Показать вÑÑ‘</translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="300"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="293"/> <source>Hide all views</source> <translation>Скрыть вÑÑ‘</translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="232"/> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="896"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="233"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="303"/> <source>Show zoom view</source> <translation>Показать маÑштабируемое предÑтавление</translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="232"/> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="896"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="233"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="303"/> <source>Hide zoom view</source> <translation>Скрыть маÑштабируемое предÑтавление</translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="233"/> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="901"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="234"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="323"/> <source>Show details view</source> <translation>Показать детали</translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="233"/> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="901"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="234"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="323"/> <source>Hide details view</source> <translation>Скрыть детали</translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="234"/> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="906"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="235"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="334"/> <source>Show overview</source> <translation>Показать панораму</translation> </message> <message> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="234"/> - <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="906"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="235"/> + <location filename="../src/ov_sequence/ADVSingleSequenceWidget.cpp" line="334"/> <source>Hide overview</source> <translation>Скрыть панораму</translation> </message> @@ -2576,12 +2597,12 @@ Double-click to collapse the branch</source> <context> <name>U2::AnnotatedDNAView</name> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="134"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="133"/> <source>Find pattern...</source> <translation>ПоиÑк подÑтроки...</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="115"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="114"/> <source>Go to position...</source> <translation>Перейти...</translation> </message> @@ -2590,72 +2611,72 @@ Double-click to collapse the branch</source> <translation type="vanished">Изменение аннотаций при редактировании поÑледовательноÑти</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="143"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="142"/> <source>Insert subsequence...</source> <translation>Ð’Ñтавить подпоÑледовательноÑÑ‚ÑŒ...</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="148"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="147"/> <source>Remove subsequence...</source> <translation>Удалить подпоÑледовательноÑÑ‚ÑŒ...</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="152"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="151"/> <source>Replace subsequence...</source> <translation>Заменить подпоÑледовательноÑÑ‚ÑŒ...</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="157"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="156"/> <source>Selected sequence from view</source> <translation>Удалить выделенную поÑледовательноÑÑ‚ÑŒ из отображениÑ</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="161"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="160"/> <source>Reverse-complement sequence</source> <translation>Заменить на обратно-комплементарную поÑледовательноÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="170"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="169"/> <source>Complement sequence</source> <translation>Заменить на комплементарную поÑледовательноÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="364"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="360"/> <source>Error!</source> <translation>Ошибка!</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="546"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="564"/> <source>Analyze</source> <translation>Ðнализ</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="556"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="574"/> <source>Add</source> <translation>ÐннотациÑ</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="562"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="580"/> <source>Export</source> <translation>ÐкÑпорт</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="568"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="586"/> <source>Align</source> <translation>Выравнивание</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="574"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="592"/> <source>Remove</source> <translation>Удаление</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="587"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="605"/> <source>Edit</source> <translation>Редактирование</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="1120"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="1138"/> <source>Show codon table</source> <translation>Показать таблицу кодонов</translation> </message> @@ -2664,37 +2685,37 @@ Double-click to collapse the branch</source> <translation type="vanished">No sequence in focus</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="166"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="165"/> <source>Reverse sequence</source> <translation>Заменить на обратную поÑледовательноÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="840"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="858"/> <source>Select sequence to associate annotations with:</source> <translation>УÑтановить ÑвÑзь аннотаций Ñ Ð¿Ð¾ÑледовательноÑтью:</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="858"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="876"/> <source>No sequence object found for annotations</source> <translation>Ðе найдена ÑвÑÐ·Ð°Ð½Ð½Ð°Ñ Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ñми поÑледовательноÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="788"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="806"/> <source>Disable '%1' highlighting</source> <translation>Ðе иÑпользовать подÑветку Ð´Ð»Ñ '%1'</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="139"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="138"/> <source>Annotations settings on sequence editing...</source> <translation>ÐаÑтройка аннотаций при редактировании поÑледовательноÑти...</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="790"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="808"/> <source>Enable '%1' highlighting</source> <translation>ЗадейÑтвовать подÑветку Ð´Ð»Ñ '%1'</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="928"/> + <location filename="../src/ov_sequence/AnnotatedDNAView.cpp" line="946"/> <source>Go To</source> <translation>Выбор позиции</translation> </message> @@ -2726,19 +2747,19 @@ Double-click to collapse the branch</source> </message> <message> <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="202"/> - <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="1190"/> + <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="1194"/> <source>Copy qualifier text</source> <translation>Копировать значение квалификатора</translation> </message> <message> <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="205"/> - <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="1194"/> + <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="1198"/> <source>Copy qualifier URL</source> <translation>Копировать ÑÑылку</translation> </message> <message> <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="208"/> - <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="1199"/> + <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="1203"/> <source>Toggle column</source> <translation>Переключить Ñтолбец</translation> </message> @@ -2777,17 +2798,17 @@ Double-click to collapse the branch</source> <translation>ÐннотациÑ</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="2035"/> + <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="2027"/> <source>Edit Group</source> <translation>Редактировать группу</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="2082"/> + <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="2074"/> <source>Edit Annotation</source> <translation>Редактирование аннотации</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="2082"/> + <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="2074"/> <source>Edit</source> <translation>Редактирование</translation> </message> @@ -2848,27 +2869,27 @@ Double-click to collapse the branch</source> </message> <message> <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="895"/> - <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="1200"/> + <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="1204"/> <source>Hide '%1' column</source> <translation>Скрыть Ñтолбец "%1"</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="1190"/> + <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="1194"/> <source>Copy qualifier '%1' value</source> <translation>Копировать значение "%1"</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="1194"/> + <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="1198"/> <source>Copy qualifier '%1' URL</source> <translation>Копировать ÑÑылку "%1"</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="1200"/> + <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="1204"/> <source>Add '%1' column</source> <translation>Добавить Ñтолбец "%1"</translation> </message> <message> - <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="2232"/> + <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="2224"/> <source>Create Permanent Annotation</source> <translation>Создать поÑтоÑнную аннотацию</translation> </message> @@ -2876,152 +2897,157 @@ Double-click to collapse the branch</source> <context> <name>U2::AssemblyBrowser</name> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="209"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="210"/> <source>Error!</source> <translation>Ошибка!</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="153"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="154"/> <source>Failed to open assembly browser for %1, assembly %2: model length should be > 0</source> <translation>Failed to open assembly browser for %1, assembly %2: model length should be > 0</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="143"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="144"/> <source>Error opening open assembly browser for %1, assembly %2</source> <translation>Error opening open assembly browser for %1, assembly %2</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="220"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="221"/> <source>Internal error: only object with document can be added to browser</source> <translation>Internal error: only object with document can be added to browser</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="224"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="223"/> + <source>Only a nucleotide sequence or a variant track objects can be added to the Assembly Browser.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="227"/> <source>Internal error: broken sequence object</source> <translation>Internal error: broken sequence object</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="225"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="228"/> <source>Internal error: empty document format</source> <translation>Internal error: empty document format</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="232"/> <source>The lengths of the sequence and assembly are different.</source> - <translation>Длины поÑледовательноÑи и Ñборки не Ñовпадают.</translation> + <translation type="vanished">Длины поÑледовательноÑи и Ñборки не Ñовпадают.</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="235"/> <source>The sequence and assembly names are different.</source> - <translation>Имена поÑледовательноÑти и Ñборки не Ñовпадают.</translation> + <translation type="vanished">Имена поÑледовательноÑти и Ñборки не Ñовпадают.</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="253"/> <source>It seems that sequence "%1", set as reference to assembly "%2", does not match it.</source> - <translation>ПоÑледовательноÑÑ‚ÑŒ "%1", уÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ð°Ñ Ð² качеÑтве референÑной Ð´Ð»Ñ Ñборки "%2", не ÑоответÑтвует ей.</translation> + <translation type="vanished">ПоÑледовательноÑÑ‚ÑŒ "%1", уÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ð°Ñ Ð² качеÑтве референÑной Ð´Ð»Ñ Ñборки "%2", не ÑоответÑтвует ей.</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="259"/> <source>Internal error: database is busy</source> - <translation>Internal error: database is busy</translation> + <translation type="vanished">Internal error: database is busy</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="294"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="274"/> <source>Internal error: broken variant track object</source> <translation>Internal error: broken variant track object</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="300"/> <source>Only sequence or variant track objects can be added to assembly browser</source> - <translation>Только поÑледовательноÑти или вариации могут быть добавлены в браузер Ñборок</translation> + <translation type="vanished">Только поÑледовательноÑти или вариации могут быть добавлены в браузер Ñборок</translation> + </message> + <message> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="238"/> + <source>Internal error: database is locked</source> + <translation type="unfinished"></translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="309"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="289"/> <source>Warning</source> <translation>Внимание</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="310"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="290"/> <source>This action requires changing the assembly object that is locked for editing</source> <translation>Ðто дейÑтвие требует Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¾Ð±ÑŠÐµÐºÑ‚Ð° Ñборки, который заблокирован Ð´Ð»Ñ Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="657"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="637"/> <source>Zoom in</source> <translation>Приблизить</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="660"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="640"/> <source>Zoom out</source> <translation>Отдалить</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="663"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="643"/> <source>Linear</source> <translation>ЛинейнаÑ</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="665"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="645"/> <source>Logarithmic</source> <translation>ЛогарифмичеÑкаÑ</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="671"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="651"/> <source>Show coordinates on ruler</source> <translation>Показывать координаты на шкале</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="675"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="655"/> <source>Show coverage under ruler cursor</source> <translation>Показывать покрытие под шкалой курÑора</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="679"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="659"/> <source>Show information about read under cursor in pop-up hint</source> <translation>Показывать информацию о риде в Ñплывающей подÑказке под курÑором</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="684"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="664"/> <source>Export as image</source> <translation>ÐкÑпорт изображениÑ</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="687"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="667"/> <source>Export assembly to SAM format</source> <translation>ÐкÑпортировать Ñборку в формат SAM</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="690"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="670"/> <source>Set reference</source> <translation>Выбрать референÑную поÑледовательноÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="694"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="674"/> <source>Export assembly region</source> <translation>ÐкÑпорт региона Ñборки</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="1011"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="991"/> <source>Open file with a sequence</source> <translation>Открыть файл Ñ Ð¿Ð¾ÑледовательноÑтью</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="1022"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="1002"/> <source>An error occurred while setting reference to "%1" assembly. The selected file "%2" does not contain sequences.</source> <translation>Возникла ошибка при попытке уÑтановить референÑную поÑледовтельноÑÑ‚ÑŒ Ð´Ð»Ñ Ñборки "%1". Выбранный файл "%2" не Ñодержит поÑледовательноÑтей.</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="1024"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="1004"/> <source>An error occurred while setting reference to "%1" assembly. There are more than one sequence in file "%2". Please select the required sequence object in the Project View and click "Set reference" again.</source> <translation>Возникла ошибка при попытке уÑтановить референÑную поÑледовтельноÑÑ‚ÑŒ Ð´Ð»Ñ Ñборки "%1". Ð’ файле "%2" ÑодержитÑÑ Ð±Ð¾Ð»ÐµÐµ одной поÑледовательноÑти.</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="1085"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="1065"/> <source>An error occurred while setting reference to "%1". You have more than one sequence object selected in the Project View. Please select only one object and try again.</source> <translation>Возникла ошибка при попытке уÑтановить референÑную поÑледовтельноÑÑ‚ÑŒ Ð´Ð»Ñ Ñборки "%1". Ð’ проекте выделено более одной поÑледовательноÑти.</translation> </message> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="1084"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="1064"/> <source>Choose Reference Sequence</source> <translation>Выбрать референÑную поÑледовательноÑÑ‚ÑŒ</translation> </message> @@ -3042,7 +3068,7 @@ Double-click to collapse the branch</source> <context> <name>U2::AssemblyBrowserUi</name> <message> - <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="1205"/> + <location filename="../src/ov_assembly/AssemblyBrowser.cpp" line="1185"/> <source>Assembly has no mapped reads. Nothing to visualize.</source> <translation>Сборка не имеет ридов.</translation> </message> @@ -3224,8 +3250,8 @@ Try to open another file with a reference sequence and associate it with the ass </message> <message> <location filename="../src/ov_assembly/AssemblyModel.cpp" line="332"/> - <source>Unexected object is set as reference</source> - <translation>Unexected object is set as reference</translation> + <source>Unexpected object is set as reference</source> + <translation>Unexpected object is set as reference</translation> </message> <message> <location filename="../src/ov_assembly/AssemblyModel.cpp" line="367"/> @@ -3631,7 +3657,7 @@ You don't have enough rights to change file</source> <context> <name>U2::CalculatePointsTask</name> <message> - <location filename="../src/ov_sequence/ADVGraphModel.cpp" line="898"/> + <location filename="../src/ov_sequence/ADVGraphModel.cpp" line="858"/> <source>Calculate graph points</source> <translation>Calculate graph points</translation> </message> @@ -3657,12 +3683,12 @@ You don't have enough rights to change file</source> <context> <name>U2::ColorSchemaDialogController</name> <message> - <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="52"/> + <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="51"/> <source>OK</source> <translation>OK</translation> </message> <message> - <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="53"/> + <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="52"/> <source>Cancel</source> <translation>Отмена</translation> </message> @@ -3678,7 +3704,7 @@ You don't have enough rights to change file</source> <context> <name>U2::ColorSchemaSettingsPageWidget</name> <message> - <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="370"/> + <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="369"/> <source>Choose Folder</source> <translation>Выбрать папку</translation> </message> @@ -3743,53 +3769,53 @@ You don't have enough rights to change file</source> <context> <name>U2::CreateColorSchemaDialog</name> <message> - <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="182"/> + <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="181"/> <source>Create</source> <translation>Создать</translation> </message> <message> - <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="183"/> - <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="197"/> + <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="182"/> + <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="196"/> <source>Cancel</source> <translation>Отмена</translation> </message> <message> - <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="185"/> + <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="184"/> <source>Amino acid</source> <translation>ÐминокиÑлота</translation> </message> <message> - <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="186"/> + <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="185"/> <source>Nucleotide</source> <translation>Ðуклеотиды</translation> </message> <message> - <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="196"/> + <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="195"/> <source>OK</source> <translation>OK</translation> </message> <message> - <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="223"/> + <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="222"/> <source>Name of scheme is empty.</source> <translation>Ð˜Ð¼Ñ Ñхемы путо.</translation> </message> <message> - <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="233"/> + <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="232"/> <source>Name can't contain only spaces.</source> <translation>Ð˜Ð¼Ñ Ð½Ðµ может Ñодержать только пробелы.</translation> </message> <message> - <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="238"/> + <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="237"/> <source>Name has to consist of letters, digits, spaces</source> <translation>Ð˜Ð¼Ñ Ð¼Ð¾Ð¶ÐµÑ‚ ÑоÑтоÑÑ‚ÑŒ только из букв, цифр, пробелов</translation> </message> <message> - <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="239"/> + <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="238"/> <source>or underscore symbols only.</source> <translation>или Ñимволов подчеркиваниÑ.</translation> </message> <message> - <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="244"/> + <location filename="../src/ov_msa/ColorSchemaDialogController.cpp" line="243"/> <source>Color scheme with the same name already exists.</source> <translation>Ð¦Ð²ÐµÑ‚Ð¾Ð²Ð°Ñ Ñхема Ñ Ñ‚Ð°ÐºÐ¸Ð¼ именем уже ÑущеÑтвует.</translation> </message> @@ -3797,7 +3823,7 @@ You don't have enough rights to change file</source> <context> <name>U2::CreateDistanceMatrixTask</name> <message> - <location filename="../src/ov_msa/MsaEditorSimilarityColumn.cpp" line="170"/> + <location filename="../src/ov_msa/MsaEditorSimilarityColumn.cpp" line="166"/> <source>Generate distance matrix</source> <translation>РаÑÑчитать матрицу раÑÑтоÑний</translation> </message> @@ -3895,12 +3921,12 @@ You don't have enough rights to change file</source> <context> <name>U2::CreateSubalignmentDialogController</name> <message> - <location filename="../src/ov_msa/CreateSubalignmentDialogController.cpp" line="53"/> + <location filename="../src/ov_msa/CreateSubalignmentDialogController.cpp" line="55"/> <source>Extract</source> <translation>Сохранить</translation> </message> <message> - <location filename="../src/ov_msa/CreateSubalignmentDialogController.cpp" line="54"/> + <location filename="../src/ov_msa/CreateSubalignmentDialogController.cpp" line="56"/> <source>Cancel</source> <translation>Отмена</translation> </message> @@ -4191,40 +4217,39 @@ Do you want to convert the files and run the aligner?</source> <translation type="vanished">Сборка генома de novo...</translation> </message> <message> - <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="73"/> <source>Reads de novo assembly (with SPAdes)...</source> - <translation>Сборка ридов de novo (при помощи SPAdes)...</translation> + <translation type="vanished">Сборка ридов de novo (при помощи SPAdes)...</translation> </message> <message> - <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="79"/> + <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="73"/> <source>Map reads to reference...</source> <translation>Выравнивание прочтений на референÑную поÑледовательноÑÑ‚ÑŒ...</translation> </message> <message> - <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="85"/> + <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="79"/> <source>Build index for reads mapping...</source> <translation>ПоÑтроение индекÑа Ð´Ð»Ñ Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ ÐºÐ¾Ñ€Ð¾Ñ‚ÐºÐ¸Ñ… прочтений...</translation> </message> <message> - <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="95"/> - <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="148"/> + <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="89"/> + <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="142"/> <source>DNA Assembly</source> <translation>Сборка контигов</translation> </message> <message> - <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="96"/> - <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="149"/> + <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="90"/> + <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="143"/> <source>There are no algorithms for DNA assembly available. Please, check your plugin list.</source> <translation>Ðет доÑтупных алгоритмов Ð´Ð»Ñ Ñборки контигов. Проверьте ÑпиÑок подключенных модулей.</translation> </message> <message> - <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="123"/> + <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="117"/> <source>Genome Assembly</source> <translation>Ð“ÐµÐ½Ð¾Ð¼Ð½Ð°Ñ Ñборка</translation> </message> <message> - <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="124"/> + <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="118"/> <source>There are no algorithms for genome assembly available. Please, check external tools in the settings.</source> <translation>Ðет доÑтупных алгоритмов Ð´Ð»Ñ Ñборки контигов. Проверьте ÑпиÑок подключенных модулей в наÑтройках.</translation> @@ -4233,7 +4258,7 @@ Please, check external tools in the settings.</source> <context> <name>U2::DnaAssemblyTaskWithConversions</name> <message> - <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="414"/> + <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="408"/> <source>Cannot remove temporary file %1</source> <translation>Cannot remove temporary file %1</translation> </message> @@ -4504,17 +4529,17 @@ Please, check external tools in the settings.</source> <context> <name>U2::ExportHighligtningTask</name> <message> - <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="991"/> + <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="997"/> <source>Export highlighting</source> <translation>ÐкÑпорт подÑвеченного</translation> </message> <message> - <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="1019"/> + <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="1025"/> <source>Export highligtning finished successfully</source> <translation>Export highligtning finished successfully</translation> </message> <message> - <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="1019"/> + <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="1025"/> <source>Result file:</source> <translation>Выходной файл:</translation> </message> @@ -4565,7 +4590,7 @@ Please, check external tools in the settings.</source> <context> <name>U2::ExportSequencesTask</name> <message> - <location filename="../src/ov_msa/ExportSequencesTask.cpp" line="67"/> + <location filename="../src/ov_msa/ExportSequencesTask.cpp" line="58"/> <source>Export selected sequences from alignment</source> <translation>Export selected sequences from alignment</translation> </message> @@ -4632,12 +4657,12 @@ Please, check external tools in the settings.</source> <translation type="vanished">ÐкÑпортировать конÑенÑÑƒÑ Ð² MSA</translation> </message> <message> - <location filename="../src/ov_msa/MaEditorTasks.cpp" line="335"/> + <location filename="../src/ov_msa/MaEditorTasks.cpp" line="339"/> <source>Extract consensus</source> <translation>Извлечь конÑенÑуÑ</translation> </message> <message> - <location filename="../src/ov_msa/MaEditorTasks.cpp" line="359"/> + <location filename="../src/ov_msa/MaEditorTasks.cpp" line="363"/> <source>No sequences in alignment</source> <translation>No sequences in alignment</translation> </message> @@ -4645,22 +4670,22 @@ Please, check external tools in the settings.</source> <context> <name>U2::FilterUnpairedReadsTask</name> <message> - <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="272"/> + <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="266"/> <source>Filter unpaired reads task</source> <translation>Filter unpaired reads task</translation> </message> <message> - <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="281"/> + <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="275"/> <source>Filtering unpaired reads is launched on not-paired data</source> <translation>Filtering unpaired reads is launched on not-paired data</translation> </message> <message> - <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="292"/> + <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="286"/> <source>The count of upstream files is not equal to the count of downstream files</source> <translation>The count of upstream files is not equal to the count of downstream files</translation> </message> <message> - <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="326"/> + <location filename="../src/util_dna_assembly/DnaAssemblyUtils.cpp" line="320"/> <source>%1 read pairs were mapped, %2 reads without a pair from files "%3" and "%4" were skipped.</source> <translation>%1 read pairs were mapped, %2 reads without a pair from files "%3" and "%4" were skipped.</translation> </message> @@ -4903,7 +4928,7 @@ Please, check external tools in the settings.</source> <context> <name>U2::FindQualifierTask</name> <message> - <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="2593"/> + <location filename="../src/ov_sequence/AnnotationsTreeView.cpp" line="2585"/> <source>Searching for a qualifier</source> <translation>ПоиÑк квалификатора</translation> </message> @@ -4934,12 +4959,17 @@ Please, check external tools in the settings.</source> <context> <name>U2::GSequenceGraphDrawer</name> <message> - <location filename="../src/ov_sequence/ADVGraphModel.cpp" line="448"/> + <location filename="../src/ov_sequence/ADVGraphModel.cpp" line="184"/> + <source>Default color</source> + <translation type="unfinished">Цвет по умолчанию</translation> + </message> + <message> + <location filename="../src/ov_sequence/ADVGraphModel.cpp" line="449"/> <source>Graph is rendering...</source> <translation>График раÑÑчитываетÑÑ...</translation> </message> <message> - <location filename="../src/ov_sequence/ADVGraphModel.cpp" line="450"/> + <location filename="../src/ov_sequence/ADVGraphModel.cpp" line="451"/> <source>Graph is not available. Try to change calculation settings.</source> <translation>График недоÑтупен. Измените наÑтройки вычиÑлениÑ.</translation> </message> @@ -4972,17 +5002,17 @@ Please, check external tools in the settings.</source> <translation>График</translation> </message> <message> - <location filename="../src/ov_sequence/GSequenceGraphView.cpp" line="359"/> + <location filename="../src/ov_sequence/GSequenceGraphView.cpp" line="362"/> <source>%1 [%2, %3], Window: %4, Step %5</source> <translation>%1 [%2, %3], окно: %4, шаг: %5</translation> </message> <message> - <location filename="../src/ov_sequence/ADVGraphModel.cpp" line="631"/> + <location filename="../src/ov_sequence/ADVGraphModel.cpp" line="632"/> <source>[%2, max:%3, min:%4]</source> <translation>[%2, макÑ:%3, мин:%4]</translation> </message> <message> - <location filename="../src/ov_sequence/ADVGraphModel.cpp" line="625"/> + <location filename="../src/ov_sequence/ADVGraphModel.cpp" line="626"/> <source>[%2, %3]</source> <translation>[%2, %3]</translation> </message> @@ -4990,7 +5020,7 @@ Please, check external tools in the settings.</source> <context> <name>U2::GSequenceLineViewAnnotated</name> <message> - <location filename="../src/ov_sequence/GSequenceLineViewAnnotated.cpp" line="433"/> + <location filename="../src/ov_sequence/GSequenceLineViewAnnotated.cpp" line="437"/> <source>etc ...</source> <translation>Прочие ...</translation> </message> @@ -5016,9 +5046,6 @@ Please, check external tools in the settings.</source> <message> <location filename="../src/util_dna_assembly/GenomeAssemblyDialog.cpp" line="196"/> <location filename="../src/util_dna_assembly/GenomeAssemblyDialog.cpp" line="203"/> - <location filename="../src/util_dna_assembly/GenomeAssemblyDialog.cpp" line="209"/> - <location filename="../src/util_dna_assembly/GenomeAssemblyDialog.cpp" line="215"/> - <location filename="../src/util_dna_assembly/GenomeAssemblyDialog.cpp" line="222"/> <location filename="../src/util_dna_assembly/GenomeAssemblyDialog.cpp" line="251"/> <location filename="../src/util_dna_assembly/GenomeAssemblyDialog.cpp" line="257"/> <location filename="../src/util_dna_assembly/GenomeAssemblyDialog.cpp" line="266"/> @@ -5031,15 +5058,12 @@ Please, check external tools in the settings.</source> <translation>Папка Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð½Ðµ указана!</translation> </message> <message> - <location filename="../src/util_dna_assembly/GenomeAssemblyDialog.cpp" line="210"/> - <location filename="../src/util_dna_assembly/GenomeAssemblyDialog.cpp" line="223"/> <source>No reads. Please, add file(s) with short reads.</source> - <translation>Ðет ридов. Добавьте файл(Ñ‹) Ñ ÐºÐ¾Ñ€Ð¾Ñ‚ÐºÐ¸Ð¼Ð¸ ридами.</translation> + <translation type="vanished">Ðет ридов. Добавьте файл(Ñ‹) Ñ ÐºÐ¾Ñ€Ð¾Ñ‚ÐºÐ¸Ð¼Ð¸ ридами.</translation> </message> <message> - <location filename="../src/util_dna_assembly/GenomeAssemblyDialog.cpp" line="216"/> <source>In the paired-end mode a number of lift and right reads must be equal.</source> - <translation>Ð’ paired-end моде чиÑло левых и правых ридов должно Ñовпадать.</translation> + <translation type="vanished">Ð’ paired-end моде чиÑло левых и правых ридов должно Ñовпадать.</translation> </message> <message> <location filename="../src/util_dna_assembly/GenomeAssemblyDialog.cpp" line="252"/> @@ -5053,10 +5077,9 @@ Please, check external tools in the settings.</source> </message> <message> <location filename="../src/util_dna_assembly/GenomeAssemblyDialog.cpp" line="267"/> - <source>Unable to create output folder for result assembly. + <source>Unable to create output folder for result assembly. Directory Path: %1</source> - <translation>Ðевозможно Ñоздать выходную папку. -Путь до папки: %1</translation> + <translation type="unfinished"></translation> </message> <message> <location filename="../src/util_dna_assembly/GenomeAssemblyDialog.cpp" line="332"/> @@ -5082,7 +5105,7 @@ Directory Path: %1</source> <translation>Assembly has zero length</translation> </message> <message> - <location filename="../src/ov_assembly/CalculateCoveragePerBaseTask.h" line="45"/> + <location filename="../src/ov_assembly/CalculateCoveragePerBaseTask.h" line="46"/> <source>Get length of Assembly</source> <translation>Get length of Assembly</translation> </message> @@ -5100,10 +5123,18 @@ Directory Path: %1</source> <translation>Get visible name of Assembly</translation> </message> </context> +<context> + <name>U2::GraphAction</name> + <message> + <location filename="../src/ov_sequence/GraphMenu.cpp" line="74"/> + <source>Sequence size is too large to calculate graphs!</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>U2::GraphLabel</name> <message> - <location filename="../src/ov_sequence/GraphLabelModel.cpp" line="156"/> + <location filename="../src/ov_sequence/GraphLabelModel.cpp" line="161"/> <source>QLabel {color : %1; }</source> <translation>QLabel {color : %1; }</translation> </message> @@ -5129,12 +5160,12 @@ Directory Path: %1</source> <context> <name>U2::GraphMenuAction</name> <message> - <location filename="../src/ov_sequence/GraphMenu.cpp" line="117"/> + <location filename="../src/ov_sequence/GraphMenu.cpp" line="126"/> <source>Graphs</source> <translation>Графики</translation> </message> <message> - <location filename="../src/ov_sequence/GraphMenu.cpp" line="125"/> + <location filename="../src/ov_sequence/GraphMenu.cpp" line="134"/> <source>Close all graphs</source> <translation>Закрыть вÑе графики</translation> </message> @@ -5348,7 +5379,7 @@ Directory Path: %1</source> <translation>DNAAlphabet is null in MSAEditorSequenceArea::hasAminoAlphabet()</translation> </message> <message> - <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="697"/> + <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="703"/> <source>No new rows were inserted: selection contains no valid sequences.</source> <translation>Ðовые Ñ€Ñды не добавлены: выделение не Ñодержит корректных поÑледовательноÑтей.</translation> </message> @@ -5358,34 +5389,34 @@ Directory Path: %1</source> <translation>MultipleAlignmentObject is null in MSAEditorSequenceArea::hasAminoAlphabet()</translation> </message> <message> - <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="378"/> + <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="380"/> <source>Custom schemes</source> <translation>ПользовательÑкие Ñхемы</translation> </message> <message> - <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="389"/> + <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="391"/> <source>Create new color scheme</source> <translation>Создать новую цветовую Ñхему</translation> </message> <message> - <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="397"/> + <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="399"/> <source>Highlighting</source> <translation>Выделение</translation> </message> <message> - <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="420"/> + <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="422"/> <source>The alignment has been modified, so that its alphabet has been switched from "%1" to "%2". Use "Undo", if you'd like to restore the original alignment.</source> <translation>Выравнивание было изменено. Ðлфавит переключен Ñ "%1" на "%2". ИÑпользуйте опцию "Ðазад" еÑли хотите вернутьÑÑ Ðº иÑходному выравниванию.</translation> </message> <message> - <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="468"/> - <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="532"/> - <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="796"/> + <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="470"/> + <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="534"/> + <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="802"/> <source>NULL collapsible model!</source> <translation>NULL collapsible model!</translation> </message> <message> - <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="528"/> + <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="530"/> <source>NULL msa object!</source> <translation>NULL msa object!</translation> </message> @@ -5410,33 +5441,33 @@ Directory Path: %1</source> <translation type="vanished">Сохранить поÑледовательноÑти из выравниваниÑ</translation> </message> <message> - <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="715"/> - <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="718"/> + <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="721"/> + <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="724"/> <source>Open file with sequences</source> <translation>Открыть</translation> </message> <message> - <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="724"/> + <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="730"/> <source>A problem occurred during adding sequences. The multiple alignment is no more available.</source> <translation>A problem occurred during adding sequences. The multiple alignment is no more available.</translation> </message> <message> - <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="810"/> + <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="816"/> <source>NULL Msa Object!</source> <translation>NULL Msa Object!</translation> </message> <message> - <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="815"/> + <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="821"/> <source>NULL document!</source> <translation>NULL document!</translation> </message> <message> - <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="951"/> + <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="957"/> <source>Incorrect pointer to MSACollapsibleItemModel</source> <translation>Incorrect pointer to MSACollapsibleItemModel</translation> </message> <message> - <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="510"/> + <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="512"/> <source>Go To</source> <translation>Выбор позиции</translation> </message> @@ -5460,7 +5491,7 @@ Directory Path: %1</source> <translation>Обновить Ñхлопнутые группы</translation> </message> <message> - <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="370"/> + <location filename="../src/ov_msa/MSAEditorSequenceArea.cpp" line="372"/> <source>Colors</source> <translation>РаÑкраÑка</translation> </message> @@ -5632,49 +5663,54 @@ All phylogenetic tree(s), opened in the same view, will be no more synchronized <context> <name>U2::MSAHighlightingTab</name> <message> - <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="94"/> + <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="77"/> + <source>Threshold</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="120"/> <source>Use dots</source> <translation>ИÑпользовать точки</translation> </message> <message> - <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="98"/> + <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="124"/> <source>Export</source> <translation>ÐкÑпорт</translation> </message> <message> - <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="108"/> + <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="134"/> <source>Highlight characters with conservation level:</source> <translation>ПодÑветить Ñимволы Ñ ÑƒÑ€Ð¾Ð²Ð½ÐµÐ¼ ÑохранениÑ:</translation> </message> <message> - <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="111"/> - <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="112"/> + <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="137"/> + <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="138"/> <source> threshold</source> <translation> порог</translation> </message> <message> - <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="123"/> - <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="269"/> + <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="149"/> + <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="346"/> <source>Threshold: %1%</source> <translation>Порог: %1%</translation> </message> <message> - <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="151"/> + <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="177"/> <source>Color</source> <translation>Цвет</translation> </message> <message> - <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="154"/> + <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="180"/> <source>Highlighting</source> <translation>Выделение</translation> </message> <message> - <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="243"/> + <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="278"/> <source>Info: set a reference sequence.</source> <translation>Инфо: укажите референÑную поÑледовательноÑÑ‚ÑŒ.</translation> </message> <message> - <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="252"/> + <location filename="../src/ov_msa/Highlighting/MSAHighlightingTab.cpp" line="287"/> <source>Info: export is not available for the selected highlighting.</source> <translation>Инфо: ÑкÑпорт невозможен Ð´Ð»Ñ Ð²Ñ‹Ð±Ñ€Ð°Ð½Ð½Ð¾Ð³Ð¾ режима подÑветки.</translation> </message> @@ -6177,12 +6213,12 @@ All phylogenetic tree(s), opened in the same view, will be no more synchronized <translation>Размеры Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð¸Ñ %1</translation> </message> <message> - <location filename="../src/ov_msa/MaEditorStatusBar.cpp" line="134"/> + <location filename="../src/ov_msa/MaEditorStatusBar.cpp" line="132"/> <source>Alignment object is locked</source> <translation>Объект Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ Ð·Ð°Ð±Ð»Ð¾ÐºÐ¸Ñ€Ð¾Ð²Ð°Ð½</translation> </message> <message> - <location filename="../src/ov_msa/MaEditorStatusBar.cpp" line="134"/> + <location filename="../src/ov_msa/MaEditorStatusBar.cpp" line="132"/> <source>Alignment object is not locked</source> <translation>Объект Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ Ñ€Ð°Ð·Ð±Ð»Ð¾ÐºÐ¸Ñ€Ð¾Ð²Ð°Ð½</translation> </message> @@ -6232,12 +6268,12 @@ All phylogenetic tree(s), opened in the same view, will be no more synchronized <context> <name>U2::MaExportConsensusWidget</name> <message> - <location filename="../src/ov_msa/ExportConsensus/MaExportConsensusWidget.cpp" line="92"/> + <location filename="../src/ov_msa/ExportConsensus/MaExportConsensusWidget.cpp" line="94"/> <source>A problem occurred during export consensus. The multiple alignment is no more available.</source> <translation>A problem occurred during export consensus. The multiple alignment is no more available.</translation> </message> <message> - <location filename="../src/ov_msa/ExportConsensus/MaExportConsensusWidget.cpp" line="139"/> + <location filename="../src/ov_msa/ExportConsensus/MaExportConsensusWidget.cpp" line="151"/> <source>Save file</source> <translation>Сохранить файл</translation> </message> @@ -6692,17 +6728,35 @@ Simple overview is unavailable.</source> <translation type="vanished">Ðекорректный диапазон: мин больше макÑ</translation> </message> </context> +<context> + <name>U2::MsaEditorAlignmentDependentWidget</name> + <message> + <location filename="../src/ov_msa/MsaEditorSimilarityColumn.cpp" line="202"/> + <source>Data are outdated</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/ov_msa/MsaEditorSimilarityColumn.cpp" line="203"/> + <source>Data are valid</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/ov_msa/MsaEditorSimilarityColumn.cpp" line="204"/> + <source>Data are being updated</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>U2::MsaEditorSimilarityColumn</name> <message> - <location filename="../src/ov_msa/MsaEditorSimilarityColumn.cpp" line="64"/> - <location filename="../src/ov_msa/MsaEditorSimilarityColumn.cpp" line="70"/> - <location filename="../src/ov_msa/MsaEditorSimilarityColumn.cpp" line="78"/> + <location filename="../src/ov_msa/MsaEditorSimilarityColumn.cpp" line="60"/> + <location filename="../src/ov_msa/MsaEditorSimilarityColumn.cpp" line="66"/> + <location filename="../src/ov_msa/MsaEditorSimilarityColumn.cpp" line="74"/> <source>-</source> <translation>-</translation> </message> <message> - <location filename="../src/ov_msa/MsaEditorSimilarityColumn.cpp" line="123"/> + <location filename="../src/ov_msa/MsaEditorSimilarityColumn.cpp" line="119"/> <source>score</source> <translation>Ñчет</translation> </message> @@ -7078,7 +7132,7 @@ Simple overview is unavailable.</source> <translation>Изменён видимый диапазон: [%1, %2]</translation> </message> <message> - <location filename="../src/ov_sequence/view_rendering/PanViewRenderer.cpp" line="421"/> + <location filename="../src/ov_sequence/view_rendering/PanViewRenderer.cpp" line="422"/> <source>empty</source> <translation><пуÑто></translation> </message> @@ -7102,7 +7156,7 @@ Simple overview is unavailable.</source> <context> <name>U2::PrepareSequenceObjectsTask</name> <message> - <location filename="../src/ov_msa/ExportSequencesTask.cpp" line="46"/> + <location filename="../src/ov_msa/ExportSequencesTask.cpp" line="47"/> <source>Prepare sequences</source> <translation>Подготовка поÑледовательноÑтей</translation> </message> @@ -7231,12 +7285,12 @@ Simple overview is unavailable.</source> <context> <name>U2::SaveSelectedSequenceFromMSADialogController</name> <message> - <location filename="../src/ov_msa/SaveSelectedSequenceFromMSADialogController.cpp" line="59"/> + <location filename="../src/ov_msa/SaveSelectedSequenceFromMSADialogController.cpp" line="57"/> <source>Export</source> <translation>ÐкÑпорт</translation> </message> <message> - <location filename="../src/ov_msa/SaveSelectedSequenceFromMSADialogController.cpp" line="60"/> + <location filename="../src/ov_msa/SaveSelectedSequenceFromMSADialogController.cpp" line="58"/> <source>Cancel</source> <translation>Отмена</translation> </message> @@ -7249,12 +7303,11 @@ Simple overview is unavailable.</source> <translation type="vanished">Другое</translation> </message> <message> - <location filename="../src/ov_msa/SaveSelectedSequenceFromMSADialogController.cpp" line="86"/> <source>File "%1" is already exists, choose custom filename or select another directory for save!</source> - <translation>File "%1" is already exists, choose custom filename or select another directory for save!</translation> + <translation type="vanished">File "%1" is already exists, choose custom filename or select another directory for save!</translation> </message> <message> - <location filename="../src/ov_msa/SaveSelectedSequenceFromMSADialogController.cpp" line="95"/> + <location filename="../src/ov_msa/SaveSelectedSequenceFromMSADialogController.cpp" line="83"/> <source>File "%1" is already exists, choose another filename or select another directory for save!</source> <translation>File "%1" is already exists, choose another filename or select another directory for save!</translation> </message> diff --git a/src/include/3rdparty/sqlite3/sqlite3.h b/src/include/3rdparty/sqlite3/sqlite3.h index 9e7d13b65628819ab9983af55d715428263420a0..9f81cb62729ba495215cbc144995ac3026ba5d49 100644 --- a/src/include/3rdparty/sqlite3/sqlite3.h +++ b/src/include/3rdparty/sqlite3/sqlite3.h @@ -1 +1,5 @@ -#include "../../../libs_3rdparty/sqlite3/src/sqlite3.h" \ No newline at end of file +#ifdef UGENE_USE_BUNDLED_SQLITE +#include "../../../libs_3rdparty/sqlite3/src/sqlite3.h" +#else +#include <sqlite3.h> +#endif diff --git a/src/include/U2Core/CustomExternalTool.h b/src/include/U2Core/CustomExternalTool.h new file mode 100644 index 0000000000000000000000000000000000000000..697dd089daf50106751cb880f90c8770ca9329ce --- /dev/null +++ b/src/include/U2Core/CustomExternalTool.h @@ -0,0 +1 @@ +#include "../../corelibs/U2Core/src/globals/CustomExternalTool.h" diff --git a/src/include/U2Designer/DashboardInfo.h b/src/include/U2Designer/DashboardInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..69ed8b41d86514b0e6e2438ad11df31c3a97a049 --- /dev/null +++ b/src/include/U2Designer/DashboardInfo.h @@ -0,0 +1 @@ +#include "../../corelibs/U2Designer/src/dashboard/DashboardInfo.h" diff --git a/src/include/U2Designer/DashboardInfoRegistry.h b/src/include/U2Designer/DashboardInfoRegistry.h new file mode 100644 index 0000000000000000000000000000000000000000..f30c2b0736270e910ac170c169ffbf73ec535aeb --- /dev/null +++ b/src/include/U2Designer/DashboardInfoRegistry.h @@ -0,0 +1 @@ +#include "../../corelibs/U2Designer/src/dashboard/DashboardInfoRegistry.h" diff --git a/src/include/U2Designer/RemoveDashboardsTask.h b/src/include/U2Designer/RemoveDashboardsTask.h new file mode 100644 index 0000000000000000000000000000000000000000..a80472225e28717c54cfab748269150b05f32e37 --- /dev/null +++ b/src/include/U2Designer/RemoveDashboardsTask.h @@ -0,0 +1 @@ +#include "../../corelibs/U2Designer/src/dashboard/RemoveDashboardsTask.h" diff --git a/src/include/U2Designer/ScanDashboardsDirTask.h b/src/include/U2Designer/ScanDashboardsDirTask.h new file mode 100644 index 0000000000000000000000000000000000000000..d76a0c99868d62febb91aa903d801a5b3a42c3f4 --- /dev/null +++ b/src/include/U2Designer/ScanDashboardsDirTask.h @@ -0,0 +1 @@ +#include "../../corelibs/U2Designer/src/dashboard/ScanDashboardsDirTask.h" diff --git a/src/include/U2Formats/CalculateSequencesNumberTask.h b/src/include/U2Formats/CalculateSequencesNumberTask.h new file mode 100644 index 0000000000000000000000000000000000000000..5a1b1b1cb175e7b15b0f52de26faf59e18627ba0 --- /dev/null +++ b/src/include/U2Formats/CalculateSequencesNumberTask.h @@ -0,0 +1 @@ +#include "../../corelibs/U2Formats/src/tasks/CalculateSequencesNumberTask.h" diff --git a/src/include/U2Gui/JavaScriptAgent.h b/src/include/U2Gui/JavaScriptAgent.h new file mode 100644 index 0000000000000000000000000000000000000000..f076a512d5ce5324dfba3026fab2dac04ba6629c --- /dev/null +++ b/src/include/U2Gui/JavaScriptAgent.h @@ -0,0 +1 @@ +#include "../../corelibs/U2Gui/src/util/webview/JavaScriptAgent.h" diff --git a/src/include/U2Gui/ReloadDocumentsTask.h b/src/include/U2Gui/ReloadDocumentsTask.h new file mode 100644 index 0000000000000000000000000000000000000000..7d76e9b6dbbf7a072ad7c8356552e854d949f40c --- /dev/null +++ b/src/include/U2Gui/ReloadDocumentsTask.h @@ -0,0 +1 @@ +#include "../../corelibs/U2Gui/src/ReloadDocumentsTask.h" diff --git a/src/include/U2Gui/SimpleWebViewBasedWidgetController.h b/src/include/U2Gui/SimpleWebViewBasedWidgetController.h new file mode 100644 index 0000000000000000000000000000000000000000..7c048cf5b01a9033e8b3adaf4ae5ef6e207734df --- /dev/null +++ b/src/include/U2Gui/SimpleWebViewBasedWidgetController.h @@ -0,0 +1 @@ +#include "../../corelibs/U2Gui/src/util/webview/SimpleWebViewBasedWidgetController.h" diff --git a/src/include/U2Gui/U2WebChannel.h b/src/include/U2Gui/U2WebChannel.h new file mode 100644 index 0000000000000000000000000000000000000000..cbd922c696afdafaa4da99118f2ec7b560c75a57 --- /dev/null +++ b/src/include/U2Gui/U2WebChannel.h @@ -0,0 +1 @@ +#include "../../corelibs/U2Gui/src/util/webchannel/U2WebChannel.h" diff --git a/src/include/U2Gui/U2WebView.h b/src/include/U2Gui/U2WebView.h new file mode 100644 index 0000000000000000000000000000000000000000..7fb96f9fa8c2786f8df2fb73e07d9a897ce515cc --- /dev/null +++ b/src/include/U2Gui/U2WebView.h @@ -0,0 +1 @@ +#include "../../corelibs/U2Gui/src/util/webview/U2WebView.h" diff --git a/src/include/U2Gui/WebSocketClientWrapper.h b/src/include/U2Gui/WebSocketClientWrapper.h new file mode 100644 index 0000000000000000000000000000000000000000..3e1611f82ae69652eafa65b11145589f4ff6cdf0 --- /dev/null +++ b/src/include/U2Gui/WebSocketClientWrapper.h @@ -0,0 +1 @@ +#include "../../corelibs/U2Gui/src/util/webview/qtwebengine/webchannel/WebSocketClientWrapper.h" diff --git a/src/include/U2Gui/WebSocketTransport.h b/src/include/U2Gui/WebSocketTransport.h new file mode 100644 index 0000000000000000000000000000000000000000..3acb055efde7aaaf366e49854192f6e750434f8b --- /dev/null +++ b/src/include/U2Gui/WebSocketTransport.h @@ -0,0 +1 @@ +#include "../../corelibs/U2Gui/src/util/webview/qtwebengine/webchannel/WebSocketTransport.h" diff --git a/src/include/U2Gui/WebViewController.h b/src/include/U2Gui/WebViewController.h new file mode 100644 index 0000000000000000000000000000000000000000..6d283ddd43390ce42e6b50ef4a046cd91649428d --- /dev/null +++ b/src/include/U2Gui/WebViewController.h @@ -0,0 +1 @@ +#include "../../corelibs/U2Gui/src/util/webview/WebViewController.h" diff --git a/src/libs_3rdparty/QSpec/Doxyfile b/src/libs_3rdparty/QSpec/Doxyfile new file mode 100644 index 0000000000000000000000000000000000000000..7b4848736303a52abb737a2b42f2ba8505706a68 --- /dev/null +++ b/src/libs_3rdparty/QSpec/Doxyfile @@ -0,0 +1,2384 @@ +# Doxyfile 1.8.10 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "HumImit" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO, these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES, upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if <section_label> ... \endif and \cond <section_label> +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = ./src + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, +# *.vhdl, *.ucf, *.qsf, *.as and *.js. + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# <filter> <input-file> +# +# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = NO + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = YES + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = humimit.qhp + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use <access key> + S +# (what the <access key> is depends on the OS and browser, but it is typically +# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down +# key> to jump into the search results window, the results can be navigated +# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel +# the search. The filter options can be selected when the cursor is inside the +# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys> +# to select a filter and <Enter> or <escape> to activate or cancel the filter +# option. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a web server instead of a web client using Javascript. There +# are two flavors of web server based searching depending on the EXTERNAL_SEARCH +# setting. When disabled, doxygen will generate a PHP script for searching and +# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing +# and searching needs to be provided by external tools. See the section +# "External Indexing and Searching" for details. +# The default value is: NO. +# This tag requires that the tag SEARCHENGINE is set to YES. + +SERVER_BASED_SEARCH = NO + +# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP +# script for searching. Instead the search results are written to an XML file +# which needs to be processed by an external indexer. Doxygen will invoke an +# external search engine pointed to by the SEARCHENGINE_URL option to obtain the +# search results. +# +# Doxygen ships with an example indexer (doxyindexer) and search engine +# (doxysearch.cgi) which are based on the open source search engine library +# Xapian (see: http://xapian.org/). +# +# See the section "External Indexing and Searching" for details. +# The default value is: NO. +# This tag requires that the tag SEARCHENGINE is set to YES. + +EXTERNAL_SEARCH = NO + +# The SEARCHENGINE_URL should point to a search engine hosted by a web server +# which will return the search results when EXTERNAL_SEARCH is enabled. +# +# Doxygen ships with an example indexer (doxyindexer) and search engine +# (doxysearch.cgi) which are based on the open source search engine library +# Xapian (see: http://xapian.org/). See the section "External Indexing and +# Searching" for details. +# This tag requires that the tag SEARCHENGINE is set to YES. + +SEARCHENGINE_URL = + +# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed +# search data is written to a file for indexing by an external tool. With the +# SEARCHDATA_FILE tag the name of this file can be specified. +# The default file is: searchdata.xml. +# This tag requires that the tag SEARCHENGINE is set to YES. + +SEARCHDATA_FILE = searchdata.xml + +# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the +# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is +# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple +# projects and redirect the results back to the right project. +# This tag requires that the tag SEARCHENGINE is set to YES. + +EXTERNAL_SEARCH_ID = + +# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen +# projects other than the one defined by this configuration file, but that are +# all added to the same external search index. Each project needs to have a +# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of +# to a relative location where the documentation can be found. The format is: +# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... +# This tag requires that the tag SEARCHENGINE is set to YES. + +EXTRA_SEARCH_MAPPINGS = + +#--------------------------------------------------------------------------- +# Configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. +# The default value is: YES. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: latex. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. +# +# Note that when enabling USE_PDFLATEX this option is only used for generating +# bitmaps for formulas in the HTML output, but not in the Makefile that is +# written to the output directory. +# The default file is: latex. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate +# index for LaTeX. +# The default file is: makeindex. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX +# documents. This may be useful for small projects and may help to save some +# trees in general. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used by the +# printer. +# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x +# 14 inches) and executive (7.25 x 10.5 inches). +# The default value is: a4. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +PAPER_TYPE = a4 + +# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names +# that should be included in the LaTeX output. The package can be specified just +# by its name or with the correct syntax as to be used with the LaTeX +# \usepackage command. To get the times font for instance you can specify : +# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times} +# To use the option intlimits with the amsmath package you can specify: +# EXTRA_PACKAGES=[intlimits]{amsmath} +# If left blank no extra packages will be included. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the +# generated LaTeX document. The header should contain everything until the first +# chapter. If it is left blank doxygen will generate a standard header. See +# section "Doxygen usage" for information on how to let doxygen write the +# default header to a separate file. +# +# Note: Only use a user-defined header if you know what you are doing! The +# following commands have a special meaning inside the header: $title, +# $datetime, $date, $doxygenversion, $projectname, $projectnumber, +# $projectbrief, $projectlogo. Doxygen will replace $title with the empty +# string, for the replacement values of the other commands the user is referred +# to HTML_HEADER. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_HEADER = + +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the +# generated LaTeX document. The footer should contain everything after the last +# chapter. If it is left blank doxygen will generate a standard footer. See +# LATEX_HEADER for more information on how to generate a default footer and what +# special commands can be used inside the footer. +# +# Note: Only use a user-defined footer if you know what you are doing! +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_FOOTER = + +# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# LaTeX style sheets that are included after the standard style sheets created +# by doxygen. Using this option one can overrule certain style aspects. Doxygen +# will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EXTRA_STYLESHEET = + +# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the LATEX_OUTPUT output +# directory. Note that the files will be copied as-is; there are no commands or +# markers available. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EXTRA_FILES = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is +# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will +# contain links (just like the HTML output) instead of page references. This +# makes the output suitable for online browsing using a PDF viewer. +# The default value is: YES. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate +# the PDF file directly from the LaTeX files. Set this option to YES, to get a +# higher quality PDF documentation. +# The default value is: YES. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode +# command to the generated LaTeX files. This will instruct LaTeX to keep running +# if errors occur, instead of asking the user for help. This option is also used +# when generating formulas in HTML. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_BATCHMODE = NO + +# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the +# index chapters (such as File Index, Compound Index, etc.) in the output. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_HIDE_INDICES = NO + +# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source +# code with syntax highlighting in the LaTeX output. +# +# Note that which sources are shown also depends on other settings such as +# SOURCE_BROWSER. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_SOURCE_CODE = NO + +# The LATEX_BIB_STYLE tag can be used to specify the style to use for the +# bibliography, e.g. plainnat, or ieeetr. See +# http://en.wikipedia.org/wiki/BibTeX and \cite for more info. +# The default value is: plain. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_BIB_STYLE = plain + +#--------------------------------------------------------------------------- +# Configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The +# RTF output is optimized for Word 97 and may not look too pretty with other RTF +# readers/editors. +# The default value is: NO. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: rtf. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF +# documents. This may be useful for small projects and may help to save some +# trees in general. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will +# contain hyperlink fields. The RTF file will contain links (just like the HTML +# output) instead of page references. This makes the output suitable for online +# browsing using Word or some other Word compatible readers that support those +# fields. +# +# Note: WordPad (write) and others do not support links. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's config +# file, i.e. a series of assignments. You only have to provide replacements, +# missing definitions are set to their default value. +# +# See also section "Doxygen usage" for information on how to generate the +# default style sheet that doxygen normally uses. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an RTF document. Syntax is +# similar to doxygen's config file. A template extensions file can be generated +# using doxygen -e rtf extensionFile. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_EXTENSIONS_FILE = + +# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code +# with syntax highlighting in the RTF output. +# +# Note that which sources are shown also depends on other settings such as +# SOURCE_BROWSER. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for +# classes and files. +# The default value is: NO. + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. A directory man3 will be created inside the directory specified by +# MAN_OUTPUT. +# The default directory is: man. +# This tag requires that the tag GENERATE_MAN is set to YES. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to the generated +# man pages. In case the manual section does not start with a number, the number +# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is +# optional. +# The default value is: .3. +# This tag requires that the tag GENERATE_MAN is set to YES. + +MAN_EXTENSION = .3 + +# The MAN_SUBDIR tag determines the name of the directory created within +# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by +# MAN_EXTENSION with the initial . removed. +# This tag requires that the tag GENERATE_MAN is set to YES. + +MAN_SUBDIR = + +# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it +# will generate one additional man file for each entity documented in the real +# man page(s). These additional files only source the real man page, but without +# them the man command would be unable to find the correct page. +# The default value is: NO. +# This tag requires that the tag GENERATE_MAN is set to YES. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that +# captures the structure of the code including all documentation. +# The default value is: NO. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: xml. +# This tag requires that the tag GENERATE_XML is set to YES. + +XML_OUTPUT = xml + +# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program +# listings (including syntax highlighting and cross-referencing information) to +# the XML output. Note that enabling this will significantly increase the size +# of the XML output. +# The default value is: YES. +# This tag requires that the tag GENERATE_XML is set to YES. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the DOCBOOK output +#--------------------------------------------------------------------------- + +# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files +# that can be used to generate PDF. +# The default value is: NO. + +GENERATE_DOCBOOK = NO + +# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in +# front of it. +# The default directory is: docbook. +# This tag requires that the tag GENERATE_DOCBOOK is set to YES. + +DOCBOOK_OUTPUT = docbook + +# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the +# program listings (including syntax highlighting and cross-referencing +# information) to the DOCBOOK output. Note that enabling this will significantly +# increase the size of the DOCBOOK output. +# The default value is: NO. +# This tag requires that the tag GENERATE_DOCBOOK is set to YES. + +DOCBOOK_PROGRAMLISTING = NO + +#--------------------------------------------------------------------------- +# Configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an +# AutoGen Definitions (see http://autogen.sf.net) file that captures the +# structure of the code including all documentation. Note that this feature is +# still experimental and incomplete at the moment. +# The default value is: NO. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module +# file that captures the structure of the code including all documentation. +# +# Note that this feature is still experimental and incomplete at the moment. +# The default value is: NO. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary +# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI +# output from the Perl module output. +# The default value is: NO. +# This tag requires that the tag GENERATE_PERLMOD is set to YES. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely +# formatted so it can be parsed by a human reader. This is useful if you want to +# understand what is going on. On the other hand, if this tag is set to NO, the +# size of the Perl module output will be much smaller and Perl will parse it +# just the same. +# The default value is: YES. +# This tag requires that the tag GENERATE_PERLMOD is set to YES. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file are +# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful +# so different doxyrules.make files included by the same Makefile don't +# overwrite each other's variables. +# This tag requires that the tag GENERATE_PERLMOD is set to YES. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all +# C-preprocessor directives found in the sources and include files. +# The default value is: YES. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names +# in the source code. If set to NO, only conditional compilation will be +# performed. Macro expansion can be done in a controlled way by setting +# EXPAND_ONLY_PREDEF to YES. +# The default value is: NO. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then +# the macro expansion is limited to the macros specified with the PREDEFINED and +# EXPAND_AS_DEFINED tags. +# The default value is: NO. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES, the include files in the +# INCLUDE_PATH will be searched if a #include is found. +# The default value is: YES. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by the +# preprocessor. +# This tag requires that the tag SEARCH_INCLUDES is set to YES. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will be +# used. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that are +# defined before the preprocessor is started (similar to the -D option of e.g. +# gcc). The argument of the tag is a list of macros of the form: name or +# name=definition (no spaces). If the definition and the "=" are omitted, "=1" +# is assumed. To prevent a macro definition from being undefined via #undef or +# recursively expanded use the := operator instead of the = operator. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this +# tag can be used to specify a list of macro names that should be expanded. The +# macro definition that is found in the sources will be used. Use the PREDEFINED +# tag if you want to use a different macro definition that overrules the +# definition found in the source code. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will +# remove all references to function-like macros that are alone on a line, have +# an all uppercase name, and do not end with a semicolon. Such function macros +# are typically used for boiler-plate code, and will confuse the parser if not +# removed. +# The default value is: YES. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES tag can be used to specify one or more tag files. For each tag +# file the location of the external documentation should be added. The format of +# a tag file without this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where loc1 and loc2 can be relative or absolute paths or URLs. See the +# section "Linking to external documentation" for more information about the use +# of tag files. +# Note: Each tag file must have a unique name (where the name does NOT include +# the path). If a tag file is not located in the directory in which doxygen is +# run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create a +# tag file that is based on the input files it reads. See section "Linking to +# external documentation" for more information about the usage of tag files. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES, all external class will be listed in +# the class index. If set to NO, only the inherited external classes will be +# listed. +# The default value is: NO. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will be +# listed. +# The default value is: YES. + +EXTERNAL_GROUPS = YES + +# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in +# the related pages index. If set to NO, only the current project's pages will +# be listed. +# The default value is: YES. + +EXTERNAL_PAGES = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of 'which perl'). +# The default file (with absolute path) is: /usr/bin/perl. + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram +# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to +# NO turns the diagrams off. Note that this option also works with HAVE_DOT +# disabled, but it is recommended to install and use dot, since it yields more +# powerful graphs. +# The default value is: YES. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see: +# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# You can include diagrams made with dia in doxygen documentation. Doxygen will +# then run dia to produce the diagram and insert it in the documentation. The +# DIA_PATH tag allows you to specify the directory where the dia binary resides. +# If left empty dia is assumed to be found in the default search path. + +DIA_PATH = + +# If set to YES the inheritance and collaboration graphs will hide inheritance +# and usage relations if the target is undocumented or is not a class. +# The default value is: YES. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz (see: +# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent +# Bell Labs. The other options in this section have no effect if this option is +# set to NO +# The default value is: NO. + +HAVE_DOT = NO + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed +# to run in parallel. When set to 0 doxygen will base this on the number of +# processors available in the system. You can set it explicitly to a value +# larger than 0 to get control over the balance between CPU load and processing +# speed. +# Minimum value: 0, maximum value: 32, default value: 0. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_NUM_THREADS = 0 + +# When you want a differently looking font in the dot files that doxygen +# generates you can specify the font name using DOT_FONTNAME. You need to make +# sure dot is able to find the font, which can be done by putting it in a +# standard location or by setting the DOTFONTPATH environment variable or by +# setting DOT_FONTPATH to the directory containing the font. +# The default value is: Helvetica. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of +# dot graphs. +# Minimum value: 4, maximum value: 24, default value: 10. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the default font as specified with +# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set +# the path where dot can find it using this tag. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_FONTPATH = + +# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for +# each documented class showing the direct and indirect inheritance relations. +# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a +# graph for each documented class showing the direct and indirect implementation +# dependencies (inheritance, containment, and class references variables) of the +# class with other documented classes. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for +# groups, showing the direct groups dependencies. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +UML_LOOK = NO + +# If the UML_LOOK tag is enabled, the fields and methods are shown inside the +# class node. If there are many fields or methods and many nodes the graph may +# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the +# number of items for each type to make the size more manageable. Set this to 0 +# for no limit. Note that the threshold may be exceeded by 50% before the limit +# is enforced. So when you set the threshold to 10, up to 15 fields may appear, +# but if the number exceeds 15, the total amount of fields shown is limited to +# 10. +# Minimum value: 0, maximum value: 100, default value: 10. +# This tag requires that the tag HAVE_DOT is set to YES. + +UML_LIMIT_NUM_FIELDS = 10 + +# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and +# collaboration graphs will show the relations between templates and their +# instances. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +TEMPLATE_RELATIONS = NO + +# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to +# YES then doxygen will generate a graph for each documented file showing the +# direct and indirect include dependencies of the file with other documented +# files. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +INCLUDE_GRAPH = YES + +# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are +# set to YES then doxygen will generate a graph for each documented file showing +# the direct and indirect include dependencies of the file with other documented +# files. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH tag is set to YES then doxygen will generate a call +# dependency graph for every global function or class method. +# +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. Disabling a call graph can be +# accomplished by means of the command \hidecallgraph. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller +# dependency graph for every global function or class method. +# +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable caller graphs for selected +# functions only using the \callergraph command. Disabling a caller graph can be +# accomplished by means of the command \hidecallergraph. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical +# hierarchy of all classes instead of a textual one. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the +# dependencies a directory has on other directories in a graphical way. The +# dependency relations are determined by the #include relations between the +# files in the directories. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. For an explanation of the image formats see the section +# output formats in the documentation of the dot tool (Graphviz (see: +# http://www.graphviz.org/)). +# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order +# to make the SVG files visible in IE 9+ (other browsers do not have this +# requirement). +# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo, +# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and +# png:gdiplus:gdiplus. +# The default value is: png. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_IMAGE_FORMAT = png + +# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to +# enable generation of interactive SVG images that allow zooming and panning. +# +# Note that this requires a modern browser other than Internet Explorer. Tested +# and working are Firefox, Chrome, Safari, and Opera. +# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make +# the SVG files visible. Older versions of IE do not have SVG support. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +INTERACTIVE_SVG = NO + +# The DOT_PATH tag can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the \dotfile +# command). +# This tag requires that the tag HAVE_DOT is set to YES. + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the \mscfile +# command). + +MSCFILE_DIRS = + +# The DIAFILE_DIRS tag can be used to specify one or more directories that +# contain dia files that are included in the documentation (see the \diafile +# command). + +DIAFILE_DIRS = + +# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the +# path where java can find the plantuml.jar file. If left blank, it is assumed +# PlantUML is not used or called during a preprocessing step. Doxygen will +# generate a warning when it encounters a \startuml command in this case and +# will not generate output for the diagram. + +PLANTUML_JAR_PATH = + +# When using plantuml, the specified paths are searched for files specified by +# the !include statement in a plantuml block. + +PLANTUML_INCLUDE_PATH = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes +# that will be shown in the graph. If the number of nodes in a graph becomes +# larger than this value, doxygen will truncate the graph, which is visualized +# by representing a node as a red box. Note that doxygen if the number of direct +# children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that +# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. +# Minimum value: 0, maximum value: 10000, default value: 50. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs +# generated by dot. A depth value of 3 means that only nodes reachable from the +# root by following a path via at most 3 edges will be shown. Nodes that lay +# further from the root node will be omitted. Note that setting this option to 1 +# or 2 may greatly reduce the computation time needed for large code bases. Also +# note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. +# Minimum value: 0, maximum value: 1000, default value: 0. +# This tag requires that the tag HAVE_DOT is set to YES. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not seem +# to support this out of the box. +# +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# read). +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) support +# this, this feature is disabled by default. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page +# explaining the meaning of the various boxes and arrows in the dot generated +# graphs. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot +# files that are used to generate the various graphs. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_CLEANUP = YES diff --git a/src/libs_3rdparty/QSpec/LICENSE b/src/libs_3rdparty/QSpec/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..23cb790338e191e29205d6f4123882c0583ef8eb --- /dev/null +++ b/src/libs_3rdparty/QSpec/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/> + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {description} + Copyright (C) {year} {fullname} + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + {signature of Ty Coon}, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/installer/_common_data/QSpec_custom.pri b/src/libs_3rdparty/QSpec/QSpec.pri similarity index 87% rename from installer/_common_data/QSpec_custom.pri rename to src/libs_3rdparty/QSpec/QSpec.pri index f873da995b2a25a52875031cf2cdd0387f0567f5..d0806a91001473d1a9e209176fd42135cda5c411 100644 --- a/installer/_common_data/QSpec_custom.pri +++ b/src/libs_3rdparty/QSpec/QSpec.pri @@ -1,7 +1,6 @@ # include (QSpec.pri) include( ../../ugene_globals.pri ) -UGENE_RELATIVE_DESTDIR = '' TARGET = QSpec TEMPLATE = lib @@ -12,20 +11,22 @@ QT += testlib webkitwidgets DEFINES += BUILDING_QSPEC_DLL DEFINES += QT_DLL +DESTDIR = ../../$$out_dir() + !debug_and_release|build_pass { CONFIG(debug, debug|release) { TARGET = QSpecd DEFINES += _DEBUG CONFIG +=console - DESTDIR=../../_debug/ + MOC_DIR=_tmp/moc/debug OBJECTS_DIR=_tmp/obj/debug } CONFIG(release, debug|release) { TARGET = QSpec DEFINES+=NDEBUG - DESTDIR=../../_release/ + MOC_DIR=_tmp/moc/release OBJECTS_DIR=_tmp/obj/release } } @@ -41,7 +42,7 @@ unix { QMAKE_RPATHDIR += @executable_path QMAKE_LFLAGS_SONAME = -Wl,-dylib_install_name,@rpath/ } - target.path = $$UGENE_INSTALL_DIR/$$UGENE_RELATIVE_DESTDIR + target.path = $$UGENE_INSTALL_DIR/ INSTALLS += target } diff --git a/src/libs_3rdparty/QSpec/QSpec.pro b/src/libs_3rdparty/QSpec/QSpec.pro new file mode 100644 index 0000000000000000000000000000000000000000..a90f8bdf307f6827c3e05d143937a5e6eddcc211 --- /dev/null +++ b/src/libs_3rdparty/QSpec/QSpec.pro @@ -0,0 +1,126 @@ +include (QSpec.pri) + +# Check the Qt version. If QT_VERSION is not set, it is probably Qt 3. +isEmpty(QT_VERSION) { + error("QT_VERSION not defined. QScore does not work with Qt 3.") +} + +!minQtVersion(5, 0, 0) { + message("Cannot build QScore with Qt version $${QT_VERSION}") + error("Use at least Qt 5.0.0.") +} + +# Input +HEADERS += \ + src/GTGlobals.h \ + src/base_dialogs/ColorDialogFiller.h \ + src/base_dialogs/DefaultDialogFiller.h \ + src/base_dialogs/FontDialogFiller.h \ + src/base_dialogs/GTFileDialog.h \ + src/base_dialogs/MessageBoxFiller.h \ + src/drivers/GTKeyboardDriver.h \ + src/drivers/GTMouseDriver.h \ + src/primitives/GTAction.h \ + src/primitives/GTCheckBox.h \ + src/primitives/GTComboBox.h \ + src/primitives/GTDoubleSpinBox.h \ + src/primitives/GTGroupBox.h \ + src/primitives/GTLineEdit.h \ + src/primitives/GTListWidget.h \ + src/primitives/GTMainWindow.h \ + src/primitives/GTMenu.h \ + src/primitives/GTMenuBar.h \ + src/primitives/GTPlainTextEdit.h \ + src/primitives/GTRadioButton.h \ + src/primitives/GTScrollBar.h \ + src/primitives/GTSlider.h \ + src/primitives/GTSpinBox.h \ + src/primitives/GTTabBar.h \ + src/primitives/GTTableView.h \ + src/primitives/GTTabWidget.h \ + src/primitives/GTTextEdit.h \ + src/primitives/GTToolbar.h \ + src/primitives/GTTreeView.h \ + src/primitives/GTTreeWidget.h \ + src/primitives/GTWebView.h \ + src/primitives/GTWidget.h \ + src/primitives/PopupChooser.h \ + src/primitives/private/GTMenuPrivate.h \ + src/system/GTClipboard.h \ + src/system/GTFile.h \ + src/utils/GTKeyboardUtils.h \ + src/utils/GTThread.h \ + src/utils/GTUtilsApp.h \ + src/utils/GTUtilsDialog.h \ + src/utils/GTUtilsToolTip.h \ + src/utils/GTMouseUtils.h \ + src/core/GUITestOpStatus.h \ + src/core/global.h \ + src/core/CustomScenario.h \ + src/core/GUITest.h \ + src/core/MainThreadRunnable.h \ + src/core/MainThreadTimer.h \ + src/core/GUITestBase.h \ + src/core/TestThread.h \ + src/core/GUITestsLauncher.h +SOURCES += \ + src/GTGlobals.cpp \ + src/base_dialogs/ColorDialogFiller.cpp \ + src/base_dialogs/DefaultDialogFiller.cpp \ + src/base_dialogs/FontDialogFiller.cpp \ + src/base_dialogs/GTFileDialog.cpp \ + src/base_dialogs/MessageBoxFiller.cpp \ + src/drivers/GTKeyboardDriver.cpp \ + src/drivers/GTKeyboardDriverLinux.cpp \ + src/drivers/GTKeyboardDriverMac.cpp \ + src/drivers/GTKeyboardDriverWindows.cpp \ + src/drivers/GTMouseDriver.cpp \ + src/drivers/GTMouseDriverLinux.cpp \ + src/drivers/GTMouseDriverMac.cpp \ + src/drivers/GTMouseDriverWindows.cpp \ + src/primitives/GTAction.cpp \ + src/primitives/GTCheckBox.cpp \ + src/primitives/GTComboBox.cpp \ + src/primitives/GTDoubleSpinBox.cpp \ + src/primitives/GTGroupBox.cpp \ + src/primitives/GTLineEdit.cpp \ + src/primitives/GTListWidget.cpp \ + src/primitives/GTMainWindow.cpp \ + src/primitives/GTMenu.cpp \ + src/primitives/GTMenuBar.cpp \ + src/primitives/GTPlainTextEdit.cpp \ + src/primitives/GTRadioButton.cpp \ + src/primitives/GTScrollBar.cpp \ + src/primitives/GTSlider.cpp \ + src/primitives/GTSpinBox.cpp \ + src/primitives/GTTabBar.cpp \ + src/primitives/GTTableView.cpp \ + src/primitives/GTTabWidget.cpp \ + src/primitives/GTTextEdit.cpp \ + src/primitives/GTToolbar.cpp \ + src/primitives/GTTreeView.cpp \ + src/primitives/GTTreeWidget.cpp \ + src/primitives/GTWebView.cpp \ + src/primitives/GTWidget.cpp \ + src/primitives/PopupChooser.cpp \ + src/primitives/private/GTMenuPrivate.cpp \ + src/system/GTClipboard.cpp \ + src/system/GTFile.cpp \ + src/utils/GTKeyboardUtils.cpp \ + src/utils/GTThread.cpp \ + src/utils/GTUtilsApp.cpp \ + src/utils/GTUtilsDialog.cpp \ + src/utils/GTUtilsToolTip.cpp \ + src/utils/GTMouseUtils.cpp \ + src/core/CustomScenario.cpp \ + src/core/GUITest.cpp \ + src/core/MainThreadRunnable.cpp \ + src/core/MainThreadTimer.cpp \ + src/core/GUITestBase.cpp \ + src/core/TestThread.cpp \ + src/core/GUITestsLauncher.cpp + +macx { +OBJECTIVE_HEADERS += src/primitives/private/GTMenuPrivateMac.h +OBJECTIVE_SOURCES += src/primitives/private/GTMenuPrivateMac.mm +} diff --git a/src/libs_3rdparty/QSpec/README.md b/src/libs_3rdparty/QSpec/README.md new file mode 100644 index 0000000000000000000000000000000000000000..84c8109274ce77f025d05624ea8e807472338b57 --- /dev/null +++ b/src/libs_3rdparty/QSpec/README.md @@ -0,0 +1,81 @@ +#QSpec [![Build Status](https://travis-ci.org/ugeneunipro/QSpec.svg?branch=master)] (https://travis-ci.org/ugeneunipro/QSpec) + +## Introduction +`QSpec` is a GUI testing library for Qt desktop applications. + +## Writing Tests +You need to create declarations for your tests like the following: +```cpp +#include <core/GUITest.h> +using namespace HI; +#define GUI_TEST_SUITE "My_base_tests" + TEST_CLASS_DECLARATION(Test1) + TEST_CLASS_DECLARATION(Test2) +#undef GUI_TEST_SUITE +``` +Also you need to create definitions of the tests: +```cpp +TEST_CLASS_DEFINITION(Test1){ + //body of test +} + +TEST_CLASS_DEFINITION(Test2){ + //body of test +} +``` +After this you need to implement `GUITestsLauncher` interface: +```cpp +#include <core/GUITestsLauncher.h> +using namespace HI; +class MyGUITestsLauncher: public GUITestsLauncher +{ +public: + MyGUITestsLauncher(); +}; +``` +```cpp +MyGUITestsLauncher::MyGUITestsLauncher(): GUITestsLauncher() +{ + guiTestBase.registerTest(new Test1()); + guiTestBase.registerTest(new Test2()); +} +``` +In the main function of your application you need to add something like this: +```cpp + QString runGuiTest = qgetenv("HI_GUI_TEST"); + if (!runGuiTest.isEmpty()) { + MyGUITestsLauncher* tests = new MyGUITestsLauncher(); + tests->connect(&myMainWindow,SIGNAL(si_applicationStarted()),tests,SLOT(sl_runTest())); + } +``` + +## Running Tests +A single test can be run just using 'HI_GUI_TEST' environment variable. + +First set the variable. + +For Unix systems: +```bash +export HI_GUI_TEST=<suite_name>:<test_name> +``` + +For Windows systems: +```bat +set HI_GUI_TEST=<suite_name>:<test_name> +``` +Then run the application. + +## Requirements + +Qt5 + +* Linux: + * X11 Record extension library (sudo apt-get install libxtst-dev) + +## Development and contributions + +See more info [here](https://github.com/ugeneunipro/QSpec/wiki). + +## License + +This project is available under GNU GPL V2 license. diff --git a/src/libs_3rdparty/QSpec/examples/calculator/README.md b/src/libs_3rdparty/QSpec/examples/calculator/README.md new file mode 100644 index 0000000000000000000000000000000000000000..85ef904f90602abb716b109a64a90805fc4d34ef --- /dev/null +++ b/src/libs_3rdparty/QSpec/examples/calculator/README.md @@ -0,0 +1,20 @@ +## Build + +For Unix systems: +```bash +qmake +make +``` +## Running Tests +A single test can be run just using environment variable 'HI_GUI_TEST'. +For Unix systems: +```bash +export LD_LIBRARY_PATH=../../_build/release/:../../_build/debug/ +export HI_GUI_TEST=Calc_base_tests:Test1 +./calculator +``` +or for Windows systems: +```bat +set HI_GUI_TEST=Calc_base_tests:Test1 +calculator.exe +``` diff --git a/src/libs_3rdparty/QSpec/examples/calculator/button.cpp b/src/libs_3rdparty/QSpec/examples/calculator/button.cpp new file mode 100644 index 0000000000000000000000000000000000000000..395f685751111cc4545412d6091b50eed0a19081 --- /dev/null +++ b/src/libs_3rdparty/QSpec/examples/calculator/button.cpp @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtWidgets> + +#include "button.h" + +//! [0] +Button::Button(const QString &text, QWidget *parent) + : QToolButton(parent) +{ + setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + setText(text); +} +//! [0] + +//! [1] +QSize Button::sizeHint() const +//! [1] //! [2] +{ + QSize size = QToolButton::sizeHint(); + size.rheight() += 20; + size.rwidth() = qMax(size.width(), size.height()); + return size; +} +//! [2] diff --git a/src/libs_3rdparty/QSpec/examples/calculator/button.h b/src/libs_3rdparty/QSpec/examples/calculator/button.h new file mode 100644 index 0000000000000000000000000000000000000000..7cc28b079c335c9a4c763cbee1cbecddf343f85c --- /dev/null +++ b/src/libs_3rdparty/QSpec/examples/calculator/button.h @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef BUTTON_H +#define BUTTON_H + +#include <QToolButton> + +//! [0] +class Button : public QToolButton +{ + Q_OBJECT + +public: + explicit Button(const QString &text, QWidget *parent = 0); + + QSize sizeHint() const Q_DECL_OVERRIDE; +}; +//! [0] + +#endif diff --git a/src/libs_3rdparty/QSpec/examples/calculator/calcguitests.cpp b/src/libs_3rdparty/QSpec/examples/calculator/calcguitests.cpp new file mode 100644 index 0000000000000000000000000000000000000000..558f6cf00380730655bc943ccd08ee94ae7d958e --- /dev/null +++ b/src/libs_3rdparty/QSpec/examples/calculator/calcguitests.cpp @@ -0,0 +1,55 @@ +#include "calcguitests.h" + +#include <primitives/GTAction.h> +#include <primitives/GTWidget.h> +#include <drivers/GTMouseDriver.h> + +#include <QToolButton> +#include <QLineEdit> +#include <QApplication> + +CalcGUITestsLauncher::CalcGUITestsLauncher(): GUITestsLauncher() +{ + guiTestBase.registerTest(new Test1()); + guiTestBase.registerTest(new Test2()); +} + +TEST_CLASS_DEFINITION(Test1){ + GTGlobals::sleep(); + + QToolButton* button_2 = qobject_cast<QToolButton*>(GTWidget::findButtonByText(os,"2")); + + QToolButton* button_plus = qobject_cast<QToolButton*>(GTWidget::findWidget(os,"plus")); + + QToolButton* button_equal = qobject_cast<QToolButton*>(GTWidget::findButtonByText(os,"=")); + + GTWidget::click(os,button_2); + //GTButton::click(os,"2"); + + GTWidget::click(os,button_plus); + + GTWidget::click(os,button_2); + + GTWidget::click(os,button_equal); + + QLineEdit* display = qobject_cast<QLineEdit*>(GTWidget::findWidget(os,"display")); + + CHECK_SET_ERR(display->text() == "4", "result is not equal 4"); +} + + +TEST_CLASS_DEFINITION(Test2){ + GTGlobals::sleep(); + + GTWidget::click(os, GTWidget::findButtonByText(os,"2")); + + GTWidget::click(os, GTWidget::findWidget(os,"plus")); + + GTWidget::click(os, GTWidget::findButtonByText(os,"3")); + + GTWidget::click(os, GTWidget::findButtonByText(os,"=")); + + QLineEdit* display = qobject_cast<QLineEdit*>(GTWidget::findWidget(os,"display")); + + CHECK_SET_ERR(display->text() == "5", "result is not equal 5"); +} diff --git a/src/libs_3rdparty/QSpec/examples/calculator/calcguitests.h b/src/libs_3rdparty/QSpec/examples/calculator/calcguitests.h new file mode 100644 index 0000000000000000000000000000000000000000..0e32adff29164a20716b6cacc074ece19ff09fa4 --- /dev/null +++ b/src/libs_3rdparty/QSpec/examples/calculator/calcguitests.h @@ -0,0 +1,24 @@ +#ifndef CALCGUITESTS_H +#define CALCGUITESTS_H + +#include <core/GUITest.h> +#include <core/GUITestBase.h> +#include <core/GUITestsLauncher.h> +#include <GTGlobals.h> +#include "calculator.h" + +#include <QThread> + +using namespace HI; +class CalcGUITestsLauncher: public GUITestsLauncher +{ +public: + CalcGUITestsLauncher(); +}; + +#define GUI_TEST_SUITE "Calc_base_tests" + TEST_CLASS_DECLARATION(Test1) + TEST_CLASS_DECLARATION(Test2) +#undef GUI_TEST_SUITE + +#endif // CALCGUITESTS_H diff --git a/src/libs_3rdparty/QSpec/examples/calculator/calculator.cpp b/src/libs_3rdparty/QSpec/examples/calculator/calculator.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a190845b987597f2e351ab569c612fa480cd6f27 --- /dev/null +++ b/src/libs_3rdparty/QSpec/examples/calculator/calculator.cpp @@ -0,0 +1,404 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtWidgets> + +#include <math.h> + +#include "button.h" +#include "calculator.h" + +//! [0] +Calculator::Calculator(QWidget *parent) + : QWidget(parent) +{ + sumInMemory = 0.0; + sumSoFar = 0.0; + factorSoFar = 0.0; + waitingForOperand = true; +//! [0] + +//! [1] + display = new QLineEdit("0"); + display->setObjectName("display"); +//! [1] //! [2] + display->setReadOnly(true); + display->setAlignment(Qt::AlignRight); + display->setMaxLength(15); + + QFont font = display->font(); + font.setPointSize(font.pointSize() + 8); + display->setFont(font); +//! [2] + +//! [4] + for (int i = 0; i < NumDigitButtons; ++i) { + digitButtons[i] = createButton(QString::number(i), SLOT(digitClicked())); + } + + Button *pointButton = createButton(tr("."), SLOT(pointClicked())); + Button *changeSignButton = createButton(tr("\302\261"), SLOT(changeSignClicked())); + + Button *backspaceButton = createButton(tr("Backspace"), SLOT(backspaceClicked())); + Button *clearButton = createButton(tr("Clear"), SLOT(clear())); + Button *clearAllButton = createButton(tr("Clear All"), SLOT(clearAll())); + + Button *clearMemoryButton = createButton(tr("MC"), SLOT(clearMemory())); + Button *readMemoryButton = createButton(tr("MR"), SLOT(readMemory())); + Button *setMemoryButton = createButton(tr("MS"), SLOT(setMemory())); + Button *addToMemoryButton = createButton(tr("M+"), SLOT(addToMemory())); + + Button *divisionButton = createButton(tr("\303\267"), SLOT(multiplicativeOperatorClicked())); + Button *timesButton = createButton(tr("\303\227"), SLOT(multiplicativeOperatorClicked())); + Button *minusButton = createButton(tr("-"), SLOT(additiveOperatorClicked())); + Button *plusButton = createButton(tr("+"), SLOT(additiveOperatorClicked())); + plusButton->setObjectName("plus"); + + Button *squareRootButton = createButton(tr("Sqrt"), SLOT(unaryOperatorClicked())); + Button *powerButton = createButton(tr("x\302\262"), SLOT(unaryOperatorClicked())); + Button *reciprocalButton = createButton(tr("1/x"), SLOT(unaryOperatorClicked())); + Button *equalButton = createButton(tr("="), SLOT(equalClicked())); + equalButton->setObjectName("equal"); +//! [4] + +//! [5] + QGridLayout *mainLayout = new QGridLayout; +//! [5] //! [6] + mainLayout->setSizeConstraint(QLayout::SetFixedSize); + mainLayout->addWidget(display, 0, 0, 1, 6); + mainLayout->addWidget(backspaceButton, 1, 0, 1, 2); + mainLayout->addWidget(clearButton, 1, 2, 1, 2); + mainLayout->addWidget(clearAllButton, 1, 4, 1, 2); + + mainLayout->addWidget(clearMemoryButton, 2, 0); + mainLayout->addWidget(readMemoryButton, 3, 0); + mainLayout->addWidget(setMemoryButton, 4, 0); + mainLayout->addWidget(addToMemoryButton, 5, 0); + + for (int i = 1; i < NumDigitButtons; ++i) { + int row = ((9 - i) / 3) + 2; + int column = ((i - 1) % 3) + 1; + mainLayout->addWidget(digitButtons[i], row, column); + } + + mainLayout->addWidget(digitButtons[0], 5, 1); + mainLayout->addWidget(pointButton, 5, 2); + mainLayout->addWidget(changeSignButton, 5, 3); + + mainLayout->addWidget(divisionButton, 2, 4); + mainLayout->addWidget(timesButton, 3, 4); + mainLayout->addWidget(minusButton, 4, 4); + mainLayout->addWidget(plusButton, 5, 4); + + mainLayout->addWidget(squareRootButton, 2, 5); + mainLayout->addWidget(powerButton, 3, 5); + mainLayout->addWidget(reciprocalButton, 4, 5); + mainLayout->addWidget(equalButton, 5, 5); + setLayout(mainLayout); + + setWindowTitle(tr("Calculator")); +} +//! [6] + +//! [7] +void Calculator::digitClicked() +{ + Button *clickedButton = qobject_cast<Button *>(sender()); + int digitValue = clickedButton->text().toInt(); + if (display->text() == "0" && digitValue == 0.0) + return; + + if (waitingForOperand) { + display->clear(); + waitingForOperand = false; + } + display->setText(display->text() + QString::number(digitValue)); +} +//! [7] + +//! [8] +void Calculator::unaryOperatorClicked() +//! [8] //! [9] +{ + Button *clickedButton = qobject_cast<Button *>(sender()); + QString clickedOperator = clickedButton->text(); + double operand = display->text().toDouble(); + double result = 0.0; + + if (clickedOperator == tr("Sqrt")) { + if (operand < 0.0) { + abortOperation(); + return; + } + result = sqrt(operand); + } else if (clickedOperator == tr("x\302\262")) { + result = pow(operand, 2.0); + } else if (clickedOperator == tr("1/x")) { + if (operand == 0.0) { + abortOperation(); + return; + } + result = 1.0 / operand; + } + display->setText(QString::number(result)); + waitingForOperand = true; +} +//! [9] + +//! [10] +void Calculator::additiveOperatorClicked() +//! [10] //! [11] +{ + Button *clickedButton = qobject_cast<Button *>(sender()); + QString clickedOperator = clickedButton->text(); + double operand = display->text().toDouble(); + +//! [11] //! [12] + if (!pendingMultiplicativeOperator.isEmpty()) { +//! [12] //! [13] + if (!calculate(operand, pendingMultiplicativeOperator)) { + abortOperation(); + return; + } + display->setText(QString::number(factorSoFar)); + operand = factorSoFar; + factorSoFar = 0.0; + pendingMultiplicativeOperator.clear(); + } + +//! [13] //! [14] + if (!pendingAdditiveOperator.isEmpty()) { +//! [14] //! [15] + if (!calculate(operand, pendingAdditiveOperator)) { + abortOperation(); + return; + } + display->setText(QString::number(sumSoFar)); + } else { + sumSoFar = operand; + } + +//! [15] //! [16] + pendingAdditiveOperator = clickedOperator; +//! [16] //! [17] + waitingForOperand = true; +} +//! [17] + +//! [18] +void Calculator::multiplicativeOperatorClicked() +{ + Button *clickedButton = qobject_cast<Button *>(sender()); + QString clickedOperator = clickedButton->text(); + double operand = display->text().toDouble(); + + if (!pendingMultiplicativeOperator.isEmpty()) { + if (!calculate(operand, pendingMultiplicativeOperator)) { + abortOperation(); + return; + } + display->setText(QString::number(factorSoFar)); + } else { + factorSoFar = operand; + } + + pendingMultiplicativeOperator = clickedOperator; + waitingForOperand = true; +} +//! [18] + +//! [20] +void Calculator::equalClicked() +{ + double operand = display->text().toDouble(); + + if (!pendingMultiplicativeOperator.isEmpty()) { + if (!calculate(operand, pendingMultiplicativeOperator)) { + abortOperation(); + return; + } + operand = factorSoFar; + factorSoFar = 0.0; + pendingMultiplicativeOperator.clear(); + } + if (!pendingAdditiveOperator.isEmpty()) { + if (!calculate(operand, pendingAdditiveOperator)) { + abortOperation(); + return; + } + pendingAdditiveOperator.clear(); + } else { + sumSoFar = operand; + } + + display->setText(QString::number(sumSoFar)); + sumSoFar = 0.0; + waitingForOperand = true; +} +//! [20] + +//! [22] +void Calculator::pointClicked() +{ + if (waitingForOperand) + display->setText("0"); + if (!display->text().contains(".")) + display->setText(display->text() + tr(".")); + waitingForOperand = false; +} +//! [22] + +//! [24] +void Calculator::changeSignClicked() +{ + QString text = display->text(); + double value = text.toDouble(); + + if (value > 0.0) { + text.prepend(tr("-")); + } else if (value < 0.0) { + text.remove(0, 1); + } + display->setText(text); +} +//! [24] + +//! [26] +void Calculator::backspaceClicked() +{ + if (waitingForOperand) + return; + + QString text = display->text(); + text.chop(1); + if (text.isEmpty()) { + text = "0"; + waitingForOperand = true; + } + display->setText(text); +} +//! [26] + +//! [28] +void Calculator::clear() +{ + if (waitingForOperand) + return; + + display->setText("0"); + waitingForOperand = true; +} +//! [28] + +//! [30] +void Calculator::clearAll() +{ + sumSoFar = 0.0; + factorSoFar = 0.0; + pendingAdditiveOperator.clear(); + pendingMultiplicativeOperator.clear(); + display->setText("0"); + waitingForOperand = true; +} +//! [30] + +//! [32] +void Calculator::clearMemory() +{ + sumInMemory = 0.0; +} + +void Calculator::readMemory() +{ + display->setText(QString::number(sumInMemory)); + waitingForOperand = true; +} + +void Calculator::setMemory() +{ + equalClicked(); + sumInMemory = display->text().toDouble(); +} + +void Calculator::addToMemory() +{ + equalClicked(); + sumInMemory += display->text().toDouble(); +} +//! [32] +//! [34] +Button *Calculator::createButton(const QString &text, const char *member) +{ + Button *button = new Button(text); + connect(button, SIGNAL(clicked()), this, member); + return button; +} +//! [34] + +//! [36] +void Calculator::abortOperation() +{ + clearAll(); + display->setText(tr("####")); +} +//! [36] + +//! [38] +bool Calculator::calculate(double rightOperand, const QString &pendingOperator) +{ + if (pendingOperator == tr("+")) { + sumSoFar += rightOperand; + } else if (pendingOperator == tr("-")) { + sumSoFar -= rightOperand; + } else if (pendingOperator == tr("\303\227")) { + factorSoFar *= rightOperand; + } else if (pendingOperator == tr("\303\267")) { + if (rightOperand == 0.0) + return false; + factorSoFar /= rightOperand; + } + return true; +} +//! [38] + +void Calculator::showEvent(QShowEvent *) +{ + emit si_calculatorShowed(); +} diff --git a/src/libs_3rdparty/QSpec/examples/calculator/calculator.h b/src/libs_3rdparty/QSpec/examples/calculator/calculator.h new file mode 100644 index 0000000000000000000000000000000000000000..56c7fde98d1f3b8d5e358ec619100a9cb13530e0 --- /dev/null +++ b/src/libs_3rdparty/QSpec/examples/calculator/calculator.h @@ -0,0 +1,111 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef CALCULATOR_H +#define CALCULATOR_H + +#include <QWidget> + +QT_BEGIN_NAMESPACE +class QLineEdit; +QT_END_NAMESPACE +class Button; + +//! [0] +class Calculator : public QWidget +{ + Q_OBJECT + +public: + Calculator(QWidget *parent = 0); +signals: + void si_calculatorShowed(); + +private slots: + void digitClicked(); + void unaryOperatorClicked(); + void additiveOperatorClicked(); + void multiplicativeOperatorClicked(); + void equalClicked(); + void pointClicked(); + void changeSignClicked(); + void backspaceClicked(); + void clear(); + void clearAll(); + void clearMemory(); + void readMemory(); + void setMemory(); + void addToMemory(); +//! [0] + +//! [1] +private: +//! [1] //! [2] + Button *createButton(const QString &text, const char *member); + void abortOperation(); + bool calculate(double rightOperand, const QString &pendingOperator); +//! [2] + +//! [3] + double sumInMemory; +//! [3] //! [4] + double sumSoFar; +//! [4] //! [5] + double factorSoFar; +//! [5] //! [6] + QString pendingAdditiveOperator; +//! [6] //! [7] + QString pendingMultiplicativeOperator; +//! [7] //! [8] + bool waitingForOperand; +//! [8] + +//! [9] + QLineEdit *display; +//! [9] //! [10] + + enum { NumDigitButtons = 10 }; + Button *digitButtons[NumDigitButtons]; + + virtual void showEvent(QShowEvent *); +}; +//! [10] + +#endif diff --git a/src/libs_3rdparty/QSpec/examples/calculator/calculator.pro b/src/libs_3rdparty/QSpec/examples/calculator/calculator.pro new file mode 100644 index 0000000000000000000000000000000000000000..a3c90b65d55a813d2f0434c3396c3f33926f889c --- /dev/null +++ b/src/libs_3rdparty/QSpec/examples/calculator/calculator.pro @@ -0,0 +1,24 @@ +QT += widgets + +HEADERS = button.h \ + calculator.h \ + calcguitests.h +SOURCES = button.cpp \ + calculator.cpp \ + calcguitests.cpp \ + main.cpp + +# install +target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/calculator +INSTALLS += target + +INCLUDEPATH +=../../src/ + +CONFIG(debug, debug|release) { + LIBS += -L../../_build/debug -lqspecd +} + +CONFIG(release, debug|release) { + LIBS += -L../../_build/release -lqspec +} + diff --git a/src/libs_3rdparty/QSpec/examples/calculator/main.cpp b/src/libs_3rdparty/QSpec/examples/calculator/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3976060f896cb3a3a61d992b0705915f085cf1d4 --- /dev/null +++ b/src/libs_3rdparty/QSpec/examples/calculator/main.cpp @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QApplication> + +#include "calculator.h" +#include "calcguitests.h" + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + Calculator calc; + + QString runGuiTest = qgetenv("HI_GUI_TEST"); + if (!runGuiTest.isEmpty()) { + CalcGUITestsLauncher* tests = new CalcGUITestsLauncher(); + tests->connect(&calc,SIGNAL(si_calculatorShowed()),tests,SLOT(sl_runTest())); + } + calc.show(); + + return app.exec(); +} diff --git a/src/libs_3rdparty/QSpec/src/GTGlobals.cpp b/src/libs_3rdparty/QSpec/src/GTGlobals.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ad5662475444bd5fa8a73fa444269d05076b781e --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/GTGlobals.cpp @@ -0,0 +1,87 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QtCore/QEventLoop> +#include <QtCore/QTimer> +#include <QtTest/QSpontaneKeyEvent> +#include <QtTest> +#if (QT_VERSION < 0x050000) //Qt 5 +#include <QtGui/QApplication> +#include <QtGui/QDesktopWidget> +#include <QtGui/QPixmap> +#else +#include <QtWidgets/QApplication> +#include <QtWidgets/QDesktopWidget> +#include <QtGui/QScreen> +#endif + +#include "GTGlobals.h" + +#ifdef Q_OS_WIN +#include <windows.h> +#else +#include <unistd.h> +#endif + +namespace HI { +namespace { + void sysSleep(int sec) { +#ifdef Q_OS_WIN + Sleep(1000*sec); +#else + sleep(sec); +#endif + } +} + +void GTGlobals::sleep(int msec) { + QTest::qWait((msec)); +} + +void GTGlobals::systemSleep(int sec) { + sysSleep(sec); +} + + +void GTGlobals::sendEvent(QObject *obj, QEvent *e) { + QSpontaneKeyEvent::setSpontaneous(e); + qApp->notify(obj, e); +} + +void GTGlobals::takeScreenShot(QString path) { + QPixmap originalPixmap = QGuiApplication::primaryScreen()->grabWindow(QApplication::desktop()->winId()); + originalPixmap.save(path); +} + +GTGlobals::FindOptions::FindOptions(bool _failIfNotFound, Qt::MatchFlags _matchPolicy, int _depth, bool _searchInHidden) : + failIfNotFound(_failIfNotFound), + matchPolicy(_matchPolicy), + depth(_depth), + searchInHidden(_searchInHidden) +{ +} + +void GTGlobals::GUITestFail(){ + qCritical("\nGT_DEBUG_MESSAGE !!!FIRST FAIL"); +} + +} //namespace + diff --git a/src/libs_3rdparty/QSpec/src/GTGlobals.h b/src/libs_3rdparty/QSpec/src/GTGlobals.h new file mode 100644 index 0000000000000000000000000000000000000000..f8e146c62be4733b827525897cc4f70783af7c77 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/GTGlobals.h @@ -0,0 +1,139 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GT_GLOBALS_H_ +#define _HI_GT_GLOBALS_H_ + +#include <core/global.h> +#include <core/GUITestOpStatus.h> +#include <QMessageLogger> + +#include <QAction> + +namespace HI { +/*! + * \brief The class contains the most commonly used methods + */ +class HI_EXPORT GTGlobals { +public: + enum UseMethod {UseMouse, UseKey, UseKeyBoard}; + enum WindowAction {Minimize, Maximize, Close, WindowActionCount}; + + // if failIfNull is set to true, fails if object wasn't found + class HI_EXPORT FindOptions { + public: + FindOptions(bool failIfNotFound = true, Qt::MatchFlags matchPolicy = Qt::MatchExactly, int depth = INFINITE_DEPTH, bool searchInHidden = false); + + bool failIfNotFound; + Qt::MatchFlags matchPolicy; + int depth; + bool searchInHidden; + + static const int INFINITE_DEPTH = 0; + static const bool FAIL_IF_NOT_FOUND = true; + }; + + static void sleep(int msec = 2000); + static void systemSleep(int sec = 2); + static void sendEvent(QObject *obj, QEvent *e); + static void takeScreenShot(QString path); + static void GUITestFail(); +}; + +#define GT_DEBUG_MESSAGE(condition, errorMessage, result) \ +{ \ + QString cond = #condition;\ + if (condition) { \ + qDebug("GT_DEBUG_MESSAGE Checking condition (%s). Result: OK", cond.toLocal8Bit().constData()); \ + } \ + else { \ + qWarning("\n------------"); \ + qWarning("GT_DEBUG_MESSAGE Checking condition (%s). Result: FAILED", cond.toLocal8Bit().constData()); \ + qWarning("GT_DEBUG_MESSAGE errorMessage '%s'", QString(errorMessage).toLocal8Bit().constData()); \ + qWarning("------------\n"); \ + } \ + if (os.hasError()) { \ + qCritical("GT_DEBUG_MESSAGE OpStatus already has error"); \ + qCritical("GT_DEBUG_MESSAGE OpStatus error '%s'",os.getError().toLocal8Bit().constData()); \ + } \ +} + +/** + Checks condition is false and returns the result if it is. + Before the result is returned the 'extraOp' operation is performed (for example logging) + + Code style hint: use CHECK macro only to make error processing more compact but not all if {return;} patterns ! +*/ +#define CHECK_EXT(condition, extraOp, result) \ + if (!(condition)) { \ + extraOp; \ + return result; \ + } + +/** Used in tests */ +#define CHECK_SET_ERR(condition, errorMessage) \ + CHECK_SET_ERR_RESULT(condition, errorMessage, ) + +#define CHECK_SET_ERR_NO_MESSAGE(condition, errorMessage) \ + if(!condition){ \ + CHECK_SET_ERR(condition, errorMessage) \ +} + +#define CHECK_OP_SET_ERR(os, errorMessage) \ + CHECK_SET_ERR(!os.isCoR(), errorMessage) + +#define CHECK_SET_ERR_RESULT(condition, errorMessage, result) \ +{ \ + GT_DEBUG_MESSAGE(condition, errorMessage, result); \ + if (os.hasError()) { HI::GTGlobals::GUITestFail(); os.setError(os.getError()); return result; } \ + CHECK_EXT(condition, if (!os.hasError()) { HI::GTGlobals::GUITestFail(); os.setError(errorMessage);}, result) \ +} + +#define CHECK_OP_SET_ERR_RESULT(os, errorMessage, result) \ + CHECK_SET_ERR_RESULT(!os.isCoR(), errorMessage, result) + +/** Used in util methods */ +#define GT_CHECK(condition, errorMessage) \ + GT_CHECK_RESULT(condition, errorMessage, ) + +#define GT_CHECK_NO_MESSAGE(condition, errorMessage) \ + if (!(condition)) { \ + GT_CHECK(condition, errorMessage) \ +} + +#define GT_CHECK_RESULT(condition, errorMessage, result) \ + CHECK_SET_ERR_RESULT(condition, GT_CLASS_NAME " __ " GT_METHOD_NAME " _ " + QString(errorMessage), result) + +#define GT_CHECK_OP(os, errorMessage) \ + GT_CHECK(!os.isCoR(), errorMessage) + +#define GT_CHECK_OP_RESULT(os, errorMessage, result) \ + GT_CHECK_RESULT(!os.isCoR(), errorMessage, result) + +#define DRIVER_CHECK(condition, errorMessage) \ + if(!condition){ \ + qCritical("Driver error: '%s'",QString(errorMessage).toLocal8Bit().constData()); \ + return false; \ + } \ + +} //namespace + +#endif diff --git a/src/libs_3rdparty/QSpec/src/base_dialogs/ColorDialogFiller.cpp b/src/libs_3rdparty/QSpec/src/base_dialogs/ColorDialogFiller.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0a1498f83185aa9a04b2972e57b3b4987f05cc76 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/base_dialogs/ColorDialogFiller.cpp @@ -0,0 +1,82 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "base_dialogs/ColorDialogFiller.h" +#include <drivers/GTKeyboardDriver.h> +#include <primitives/GTSpinBox.h> +#include <primitives/GTWidget.h> +#include <utils/GTThread.h> + +#include <QApplication> +#include <QColor> +#include <QColorDialog> +#include <QSpinBox> +#include <QWidget> + +namespace HI{ + +#define GT_CLASS_NAME "GTUtilsDialog::ColorDialog filler" +#define GT_METHOD_NAME "commonScenario" +void ColorDialogFiller::commonScenario() { + GTGlobals::sleep(); +#ifdef Q_OS_LINUX + setWithQt = true; +#endif + QWidget* dialog = QApplication::activeModalWidget(); + GT_CHECK(dialog!=NULL, "dialog is NULL"); + + if(setWithQt){ + class Scenario : public CustomScenario { + public: + Scenario(QColorDialog* _d, QColor _c): d(_d), c(_c) {} + void run(GUITestOpStatus &os) { + Q_UNUSED(os); + d->setCurrentColor(c); + GTGlobals::sleep(); + d->accept(); + } + private: + QColorDialog* d; + QColor c; + }; + + QColorDialog* d = qobject_cast<QColorDialog*>(dialog); + GTThread::runInMainThread(os, new Scenario(d, QColor(r, g, b))); + GTThread::waitForMainThread(); + GTGlobals::sleep(500); + return; + } + + QList<QSpinBox*> spinList = dialog->findChildren<QSpinBox*>(); + GTSpinBox::setValue(os,spinList.at(3),r,GTGlobals::UseKeyBoard); + GTSpinBox::setValue(os,spinList.at(4),g,GTGlobals::UseKeyBoard); + GTSpinBox::setValue(os,spinList.at(5),b,GTGlobals::UseKeyBoard); + + GTGlobals::sleep(); +#ifdef Q_OS_MAC + GTWidget::click(os, GTWidget::findButtonByText(os, "OK",dialog)); +#else + GTKeyboardDriver::keyClick( Qt::Key_Enter); +#endif +} +#undef GT_METHOD_NAME +#undef GT_CLASS_NAME +} diff --git a/src/libs_3rdparty/QSpec/src/base_dialogs/ColorDialogFiller.h b/src/libs_3rdparty/QSpec/src/base_dialogs/ColorDialogFiller.h new file mode 100644 index 0000000000000000000000000000000000000000..df72130d7a8f4980ab4ab12f1d946a8d1a952b8a --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/base_dialogs/ColorDialogFiller.h @@ -0,0 +1,40 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef COLORDIALOGFILLER_H +#define COLORDIALOGFILLER_H + +#include "utils/GTUtilsDialog.h" +namespace HI{ + +class HI_EXPORT ColorDialogFiller : public Filler +{ +public: + ColorDialogFiller(GUITestOpStatus &os,int _r, int _g, int _b, bool _setWithQt = false) : Filler(os, ""), + r(_r),g(_g),b(_b),setWithQt(_setWithQt){} + void commonScenario(); +private: + int r,g,b; + bool setWithQt; +}; + +} +#endif // COLORDIALOGFILLER_H diff --git a/src/libs_3rdparty/QSpec/src/base_dialogs/DefaultDialogFiller.cpp b/src/libs_3rdparty/QSpec/src/base_dialogs/DefaultDialogFiller.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7d850c326b5ce85df3b3941076f4ad347637d2b8 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/base_dialogs/DefaultDialogFiller.cpp @@ -0,0 +1,32 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + + +#include "DefaultDialogFiller.h" + +namespace HI { + +DefaultDialogFiller::DefaultDialogFiller(GUITestOpStatus &os, const QString &name, QDialogButtonBox::StandardButton _b, CustomScenario *scenario): + Filler(os, name, scenario),b(_b) {} +void DefaultDialogFiller::commonScenario(){ + GTUtilsDialog::clickButtonBox(os, b); +} +} diff --git a/src/libs_3rdparty/QSpec/src/base_dialogs/DefaultDialogFiller.h b/src/libs_3rdparty/QSpec/src/base_dialogs/DefaultDialogFiller.h new file mode 100644 index 0000000000000000000000000000000000000000..6b9618ca48d6a8831c395733f760567a1fa33bbf --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/base_dialogs/DefaultDialogFiller.h @@ -0,0 +1,41 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_DEFAULT_DIALOG_FILLER_H_ +#define _HI_DEFAULT_DIALOG_FILLER_H_ + +#include "utils/GTUtilsDialog.h" + +namespace HI { + +class HI_EXPORT DefaultDialogFiller: public Filler +{ +public: + DefaultDialogFiller(GUITestOpStatus &os, const QString &name = "", QDialogButtonBox::StandardButton _b = + QDialogButtonBox::Ok, CustomScenario *scenario = NULL); + void commonScenario(); +private: + QDialogButtonBox::StandardButton b; +}; + +} + +#endif // _HI_DEFAULT_DIALOG_FILLER_H_ diff --git a/src/libs_3rdparty/QSpec/src/base_dialogs/FontDialogFiller.cpp b/src/libs_3rdparty/QSpec/src/base_dialogs/FontDialogFiller.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2184e36af6ef7ef999b02e754e19c27860fd2b87 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/base_dialogs/FontDialogFiller.cpp @@ -0,0 +1,42 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "FontDialogFiller.h" +#include <primitives/GTWidget.h> +#include <drivers/GTKeyboardDriver.h> + +#include <QApplication> +#include <QAbstractButton> + +namespace HI { + +#define GT_CLASS_NAME "GTUtilsDialog::FontDialogFiller" +#define GT_METHOD_NAME "commonScenario" +void FontDialogFiller::commonScenario() { + QWidget* dialog = QApplication::activeModalWidget(); + GT_CHECK(dialog != NULL, "dialog is NULL"); + GTGlobals::sleep(); + + GTKeyboardDriver::keyClick( Qt::Key_Enter); +} +#undef GT_METHOD_NAME +#undef GT_CLASS_NAME +} diff --git a/src/libs_3rdparty/QSpec/src/base_dialogs/FontDialogFiller.h b/src/libs_3rdparty/QSpec/src/base_dialogs/FontDialogFiller.h new file mode 100644 index 0000000000000000000000000000000000000000..3f292e56ade462e20a707d9ef95d97acc0724eeb --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/base_dialogs/FontDialogFiller.h @@ -0,0 +1,36 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GT_FONT_DIALOG_FILLER_H_ +#define _HI_GT_FONT_DIALOG_FILLER_H_ + +#include "utils/GTUtilsDialog.h" + +namespace HI { + +class HI_EXPORT FontDialogFiller : public Filler { + public: + FontDialogFiller(GUITestOpStatus &_os) + :Filler(_os, ""){} + void commonScenario(); + }; +} +#endif //_HI_GT_FONT_DIALOG_FILLER_H_ diff --git a/src/libs_3rdparty/QSpec/src/base_dialogs/GTFileDialog.cpp b/src/libs_3rdparty/QSpec/src/base_dialogs/GTFileDialog.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e12320d3b6a8201ab42d2e1707f0a4be34b7c620 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/base_dialogs/GTFileDialog.cpp @@ -0,0 +1,382 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "base_dialogs/GTFileDialog.h" +#include <drivers/GTKeyboardDriver.h> +#include <drivers/GTMouseDriver.h> +#include "GTGlobals.h" +#include <primitives/GTComboBox.h> +#include <primitives/GTLineEdit.h> +#include "primitives/GTMenu.h" +#include <primitives/GTWidget.h> +#include <utils/GTThread.h> + +#include <QApplication> +#include <QComboBox> +#include <QFileSystemModel> +#include <QHeaderView> +#include <QLineEdit> +#include <QPushButton> +#include <QTreeView> + +#define FILE_NAME_LINE_EDIT "fileNameEdit" +#define CURRENT_FODLER_COMBO_BOX "lookInCombo" + +namespace HI { +#define GT_CLASS_NAME "GTFileDialogUtils" + +GTFileDialogUtils::GTFileDialogUtils(GUITestOpStatus &_os, const QString &_path, const QString &_fileName, + Button _button, GTGlobals::UseMethod _method, TextInput textInput) : + Filler(_os, "QFileDialog"), + fileName(_fileName), + button(_button), + method(_method), + textInput(textInput) +{ + init(_path + "/" + fileName); +} + +GTFileDialogUtils::GTFileDialogUtils(GUITestOpStatus &os, const QString &filePath, GTGlobals::UseMethod method, Button b, TextInput textInput) : + Filler(os, "QFileDialog"), + button(b), + method(method), + textInput(textInput) +{ + init(filePath); +} + +GTFileDialogUtils::GTFileDialogUtils(GUITestOpStatus &os, CustomScenario *customScenario) + : Filler(os, "QFileDialog", customScenario), + fileDialog(NULL), + button(Open), + method(GTGlobals::UseMouse), + textInput(Typing) +{ + +} + +#define GT_METHOD_NAME "commonScenario" +void GTFileDialogUtils::commonScenario() +{ + QWidget *dialog = QApplication::activeModalWidget(); + GT_CHECK(dialog != NULL && QString(dialog->metaObject()->className()) == "QFileDialog", + "file dialog not found"); + + fileDialog = dialog; + GTGlobals::sleep(300); + const bool dirWasChanged = setPath(); + GTGlobals::sleep(300); + if(button == Choose){ + clickButton(button); + return; + } + + if (dirWasChanged) { + clickButton(Open); + GTGlobals::sleep(300); + } + + if(button == Save){//saving file + setName(); + clickButton(button); + return; + } + + //opening file or getting size + GTGlobals::sleep(300); + setViewMode(Detail); + GTGlobals::sleep(300); + selectFile(); + GTGlobals::sleep(300); + if(method == GTGlobals::UseKey){ + GTKeyboardDriver::keyClick( Qt::Key_Enter); + + }else{ + clickButton(button); + } + GTGlobals::sleep(500); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "init" +void GTFileDialogUtils::init(const QString &filePath) { + const QFileInfo fileInfo(filePath); + path = fileInfo.absoluteDir().absolutePath(); + fileName = fileInfo.fileName(); + if (!path.endsWith('/')) { + path += '/'; + } +} +#undef GT_METHOD_NAME + +GTFileDialogUtils_list::GTFileDialogUtils_list(GUITestOpStatus &_os, const QString &_path, const QStringList &fileNames) : + GTFileDialogUtils(_os,_path, "", Open, GTGlobals::UseMouse), + fileNamesList(fileNames) +{ +// path = QDir::cleanPath(QDir::currentPath() + "/" + _path); +// if (path.at(path.count() - 1) != '/') { +// path += '/'; +// } + foreach (const QString &name, fileNames) { + filePaths << _path + "/" + name; + } +} + +GTFileDialogUtils_list::GTFileDialogUtils_list(GUITestOpStatus &os, const QStringList &filePaths) : + GTFileDialogUtils(os, "", "", Open, GTGlobals::UseMouse), + filePaths(filePaths) +{ + +} + +#define GT_METHOD_NAME "commonScenario" +void GTFileDialogUtils_list::commonScenario() { + QWidget *dialog = QApplication::activeModalWidget(); + GT_CHECK(NULL != dialog && QString(dialog->metaObject()->className()) == "QFileDialog", "file dialog not found"); + + setNameList(os, filePaths, dialog); + GTGlobals::sleep(200); + + GTKeyboardDriver::keyClick(Qt::Key_Enter); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setNameList" +void GTFileDialogUtils_list::setNameList(GUITestOpStatus &os, const QStringList &nameList, QWidget *parent) { + QString str; + foreach (QString name, nameList){ + if (QFileInfo(name).isRelative()) { + name = QApplication::applicationDirPath() + "/" + name; + } + str.append('\"' + name + "\" "); + } + + QLineEdit* fileEdit = GTWidget::findExactWidget<QLineEdit *>(os, FILE_NAME_LINE_EDIT, parent); + GTLineEdit::setText(os, fileEdit, str, false, true); +} +#undef GT_METHOD_NAME + +void GTFileDialogUtils_list::selectFile(){ + GTKeyboardDriver::keyPress(Qt::Key_Control); + foreach(QString name, fileNamesList){ + GTFileDialogUtils::fileName = name; + GTFileDialogUtils::selectFile(); + } + GTKeyboardDriver::keyRelease(Qt::Key_Control); +} + +void GTFileDialogUtils::openFileDialog() { + switch(method) { + case GTGlobals::UseMouse: + GTMenu::clickMainMenuItem(os, QStringList() << "File" << "Open..."); + break; + case GTGlobals::UseKey: + GTKeyboardDriver::keyClick( 'O', Qt::ControlModifier); + break; + default: + break; + } + GTGlobals::sleep(500); +} + +#define GT_METHOD_NAME "setPath" +bool GTFileDialogUtils::setPath() +{ + QComboBox* comboBox = fileDialog->findChild<QComboBox*>(CURRENT_FODLER_COMBO_BOX); + if (NULL != comboBox && QDir::toNativeSeparators(comboBox->currentText()) + QDir::separator() == QDir::toNativeSeparators(path)) { + // already there + return false; + } + + QLineEdit* lineEdit = fileDialog->findChild<QLineEdit*>(FILE_NAME_LINE_EDIT); + GT_CHECK_RESULT(lineEdit != 0, QString("line edit \"%1\" not found").arg(FILE_NAME_LINE_EDIT), false); + lineEdit->setCompleter(NULL); + GTLineEdit::setText(os, lineEdit, path, false, textInput == CopyPaste); + + GT_CHECK_RESULT(lineEdit->text() == path, "Can't open file \"" + lineEdit->text() + "\"", false); + return true; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setName" +void GTFileDialogUtils::setName() +{ + QLineEdit* lineEdit = fileDialog->findChild<QLineEdit*>(FILE_NAME_LINE_EDIT); + GT_CHECK(lineEdit != 0, QString("line edit \"%1\" not found").arg(FILE_NAME_LINE_EDIT)); + lineEdit->setCompleter(NULL); + + GTLineEdit::setText(os, lineEdit, fileName, false, textInput == CopyPaste); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "selectFile" +void GTFileDialogUtils::selectFile() +{ + QTreeView *w = fileDialog->findChild<QTreeView*>("treeView"); + GT_CHECK(w != NULL, "widget, which contains list of file, not found"); + + QFileSystemModel *model = qobject_cast<QFileSystemModel*>(w->model()); + QModelIndex index = model->index(path + fileName); + GT_CHECK(index.isValid(), "File <" + path + fileName + "> not found"); + + QPoint indexCenter; + + switch(method) { + case GTGlobals::UseKey:{ + QLineEdit* lineEdit = fileDialog->findChild<QLineEdit*>(FILE_NAME_LINE_EDIT); + GT_CHECK(lineEdit != 0, QString("line edit \"1\" not found").arg(FILE_NAME_LINE_EDIT)); + GTLineEdit::setText(os,lineEdit,fileName, false, textInput == CopyPaste); + + GTWidget::click(os,lineEdit); + break; + } + + case GTGlobals::UseMouse: + w->scrollTo(index); + indexCenter = w->visualRect(index).center(); + indexCenter.setY(indexCenter.y() + w->header()->rect().height()); + indexCenter.setX(indexCenter.x()+1); + GTMouseDriver::moveTo(w->mapToGlobal(indexCenter)); + GTMouseDriver::click(); + break; + default: + break; + } + + GTGlobals::sleep(100); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "clickButton" +void GTFileDialogUtils::clickButton(Button btn) +{ + QMap<Button, QString> button; + button[Open] = "Open"; + button[Cancel] = "Cancel"; + button[Save] = "Save"; + button[Choose] = "Choose"; + + QAbstractButton *button_to_click = GTWidget::findButtonByText(os, button[btn],fileDialog); + GT_CHECK(button_to_click != NULL, "button not found"); + + while (! button_to_click->isEnabled()) { + GTGlobals::sleep(100); + } + + GTGlobals::sleep(500); + + switch(method) { + case GTGlobals::UseKey: + while (! button_to_click->hasFocus()) { + GTKeyboardDriver::keyClick( Qt::Key_Tab); + GTGlobals::sleep(100); + } + GTKeyboardDriver::keyClick( Qt::Key_Enter); + break; + + case GTGlobals::UseMouse: + GTGlobals::sleep(100); + GTWidget::click(os, button_to_click); + break; + default: + break; + } +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setViewMode" +void GTFileDialogUtils::setViewMode(ViewMode v) +{ + QMap<ViewMode, QString> button; + button[List] = "listModeButton"; + button[Detail] = "detailModeButton"; + QAbstractButton *w = qobject_cast<QAbstractButton *>(fileDialog->findChild<QWidget*>(button[v])); + + GT_CHECK(w != NULL, "view mode button not found"); + GT_CHECK(!w->isChecked(), ); + + switch(method) { + case GTGlobals::UseMouse: + GTWidget::click(os, w); + break; + + case GTGlobals::UseKey: + while (! w->hasFocus()) { + GTKeyboardDriver::keyClick( Qt::Key_Tab); + GTGlobals::sleep(100); + } + GTKeyboardDriver::keyClick( Qt::Key_Space); + break; + + default: + break; + } + + GTGlobals::sleep(100); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "openFile" +void GTFileDialog::openFile(GUITestOpStatus &os, const QString &path, const QString &fileName, + Button button, GTGlobals::UseMethod m) +{ + GTFileDialogUtils *ob = new GTFileDialogUtils(os, path, fileName, (GTFileDialogUtils::Button)button, m); + GTUtilsDialog::waitForDialog(os, ob); + + ob->openFileDialog(); + GTThread::waitForMainThread(); + GTGlobals::sleep(100); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "openFile" +void GTFileDialog::openFile(GUITestOpStatus &os, const QString &filePath, Button button, GTGlobals::UseMethod m){ + int num = filePath.lastIndexOf('/'); + if (num == -1){ + num = filePath.lastIndexOf('\\'); + GT_CHECK(num != -1, QString("String %1 does not look like file path").arg(filePath)); + } + QString path = filePath.left(num); + QString name = filePath.right(filePath.length() - num - 1); + + openFile(os, path, name, button, m); +} +#undef GT_METHOD_NAME + +void GTFileDialog::openFileList(GUITestOpStatus &os, const QString &path, const QStringList &fileNameList) +{ + GTFileDialogUtils_list *ob = new GTFileDialogUtils_list(os, path, fileNameList); + GTUtilsDialog::waitForDialog(os, ob); + + ob->openFileDialog(); + + GTGlobals::sleep(); +} + +void GTFileDialog::openFileList(GUITestOpStatus &os, const QStringList &filePaths) { + GTFileDialogUtils_list *openFileDialogFiller = new GTFileDialogUtils_list(os, filePaths); + GTUtilsDialog::waitForDialog(os, openFileDialogFiller); + openFileDialogFiller->openFileDialog(); +} + +#undef GT_CLASS_NAME + +} // namespace diff --git a/src/libs_3rdparty/QSpec/src/base_dialogs/GTFileDialog.h b/src/libs_3rdparty/QSpec/src/base_dialogs/GTFileDialog.h new file mode 100644 index 0000000000000000000000000000000000000000..9d7c1e2a54e2f14d9652bcb1b002772d75650238 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/base_dialogs/GTFileDialog.h @@ -0,0 +1,93 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef GTFILE_DIALOG_H +#define GTFILE_DIALOG_H + +#include "GTGlobals.h" +#include "utils/GTUtilsDialog.h" + +namespace HI { + +class HI_EXPORT GTFileDialogUtils : public Filler { +friend class GTFileDialogUtils_list; +public: + enum Button {Open, Cancel, Save, Choose}; + enum ViewMode {List, Detail}; + enum TextInput { Typing, CopyPaste }; + +#ifdef Q_OS_MAC + GTFileDialogUtils(GUITestOpStatus &os, const QString &folderPath, const QString &fileName, Button b = Open, GTGlobals::UseMethod = GTGlobals::UseMouse, TextInput = CopyPaste); + GTFileDialogUtils(GUITestOpStatus &os, const QString &filePath, GTGlobals::UseMethod method = GTGlobals::UseMouse, Button b = Open, TextInput = CopyPaste); +#else + GTFileDialogUtils(GUITestOpStatus &os, const QString &folderPath, const QString &fileName, Button b = Open, GTGlobals::UseMethod = GTGlobals::UseMouse, TextInput = Typing); + GTFileDialogUtils(GUITestOpStatus &os, const QString &filePath, GTGlobals::UseMethod method = GTGlobals::UseMouse, Button b = Open, TextInput = Typing); +#endif + + GTFileDialogUtils(GUITestOpStatus &os, CustomScenario *customScenario); + void openFileDialog(); + void commonScenario(); + +protected: + void init(const QString &filePath); + + bool setPath(); + void setName(); + void selectFile(); + void clickButton(Button); + void setViewMode(ViewMode); + + QWidget *fileDialog; + QString path, fileName; + Button button; + GTGlobals::UseMethod method; + TextInput textInput; +}; + +class HI_EXPORT GTFileDialogUtils_list : public GTFileDialogUtils{ +public: + GTFileDialogUtils_list(GUITestOpStatus &os, const QString &folderPath, const QStringList &fileNames); + GTFileDialogUtils_list(GUITestOpStatus &os, const QStringList &filePaths); + + void setNameList(GUITestOpStatus &os, const QStringList &filePaths, QWidget *parent); + void commonScenario(); + +private: + void selectFile(); + + QString path; + QStringList fileNamesList; + QStringList filePaths; +}; + +class HI_EXPORT GTFileDialog { +public: + enum Button {Open, Cancel}; + static void openFile(GUITestOpStatus &os, const QString &path, const QString &fileName, Button button = Open, GTGlobals::UseMethod m = GTGlobals::UseMouse); + static void openFile(GUITestOpStatus &os, const QString &filePath, Button button = Open, GTGlobals::UseMethod m = GTGlobals::UseMouse); + + static void openFileList(GUITestOpStatus &, const QString &, const QStringList &); + static void openFileList(GUITestOpStatus &os, const QStringList &filePaths); +}; + +} // namespace + +#endif // GTFILE_DIALOG_H diff --git a/src/libs_3rdparty/QSpec/src/base_dialogs/MessageBoxFiller.cpp b/src/libs_3rdparty/QSpec/src/base_dialogs/MessageBoxFiller.cpp new file mode 100644 index 0000000000000000000000000000000000000000..012ce3649199fb8224f50eb7791e869c25f6fe83 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/base_dialogs/MessageBoxFiller.cpp @@ -0,0 +1,191 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + + +#include "base_dialogs/MessageBoxFiller.h" +#include "drivers/GTKeyboardDriver.h" +#include "primitives/GTSpinBox.h" +#include "primitives/GTWidget.h" + +#include <QAbstractButton> +#include <QApplication> + +namespace HI { + +#define GT_CLASS_NAME "GTUtilsDialog::MessageBoxDialogFiller" + +MessageBoxDialogFiller::MessageBoxDialogFiller(GUITestOpStatus &os, QMessageBox::StandardButton b, const QString &message, const QString &objectName) : + Filler(os, objectName), + b(b), + message(message) +{ + +} + +MessageBoxDialogFiller::MessageBoxDialogFiller(GUITestOpStatus &os, const QString &buttonText, const QString &message) : + Filler(os, ""), + b(QMessageBox::NoButton), + buttonText(buttonText), + message(message) +{ + +} + +#define GT_METHOD_NAME "commonScenario" +void MessageBoxDialogFiller::commonScenario() { + QWidget* activeModal = QApplication::activeModalWidget(); + QMessageBox *messageBox = qobject_cast<QMessageBox*>(activeModal); + GT_CHECK(messageBox != NULL, "messageBox is NULL"); + + if(message!=""){ + QString actualText = messageBox->text(); + GT_CHECK(messageBox->text().contains(message,Qt::CaseInsensitive), + QString("Expected: %1, found: %2").arg(message).arg(actualText)); + } + + if (buttonText!="") { + QList<QAbstractButton*> list = messageBox->buttons(); + foreach(QAbstractButton* but, list){ + QString s = but->text(); + if(but->text().contains(buttonText,Qt::CaseInsensitive)){ + GTWidget::click(os, but); + return; + } + } + } + + QAbstractButton* button = messageBox->button(b); + GT_CHECK(button != NULL, "There is no such button in messagebox"); + + GTWidget::click(os, button); +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +#define GT_CLASS_NAME "GTUtilsDialog::AppCloseMessageBoxDialogFiller" + +AppCloseMessageBoxDialogFiller::AppCloseMessageBoxDialogFiller(GUITestOpStatus &os) : + Filler(os, "") +{ + +} + +#define GT_METHOD_NAME "commonScenario" +void AppCloseMessageBoxDialogFiller::commonScenario() { + QWidget* activeModal = QApplication::activeModalWidget(); + QMessageBox *messageBox = qobject_cast<QMessageBox*>(activeModal); + GT_CHECK(messageBox != NULL, "messageBox is NULL"); + + QAbstractButton* noButton = messageBox->button(QMessageBox::No); + QAbstractButton* noToAllButton = messageBox->button(QMessageBox::NoToAll); + + if (NULL != noToAllButton) { + GTWidget::click(os, noToAllButton); + } else if (NULL != noButton) { + GTWidget::click(os, noButton); + } else { + GT_CHECK(false, "There are neither \"No\" or \"No to all\" buttons in the message box"); + } +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +#define GT_CLASS_NAME "GTUtilsDialog::MessageBoxNoToAllOrNo" + +MessageBoxNoToAllOrNo::MessageBoxNoToAllOrNo(GUITestOpStatus &os) : + Filler(os, "") +{ + +} + +#define GT_METHOD_NAME "commonScenario" +void MessageBoxNoToAllOrNo::commonScenario() { + QWidget* activeModal = QApplication::activeModalWidget(); + QMessageBox *messageBox = qobject_cast<QMessageBox*>(activeModal); + GT_CHECK(messageBox != NULL, "messageBox is NULL"); + + QAbstractButton* button = messageBox->button(QMessageBox::NoToAll); + if (!button) { + button = messageBox->button(QMessageBox::No); + } + GT_CHECK(button != NULL, "There are no No buttons in messagebox"); + + GTWidget::click(os, button); +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +#define GT_CLASS_NAME "MessageBoxOpenAnotherProject" + +MessageBoxOpenAnotherProject::MessageBoxOpenAnotherProject(GUITestOpStatus &os) : + Filler(os, "") +{ + +} + +#define GT_METHOD_NAME "commonScenario" +void MessageBoxOpenAnotherProject::commonScenario() { + QWidget* activeModal = QApplication::activeModalWidget(); + QMessageBox *messageBox = qobject_cast<QMessageBox*>(activeModal); + GT_CHECK(messageBox != NULL, "messageBox is NULL"); + + QAbstractButton* button = messageBox->findChild<QAbstractButton*>("New Window"); + GT_CHECK(button != NULL, "There are no New Window buttons in messagebox"); + + button = messageBox->findChild<QAbstractButton*>("This Window"); + GT_CHECK(button != NULL, "There are no This Window buttons in messagebox"); + + button = messageBox->button(QMessageBox::Abort); + GT_CHECK(button != NULL, "There are no Abort buttons in messagebox"); + + GTWidget::click(os, button); +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +#define GT_CLASS_NAME "MessageBoxOpenAnotherProject" + +InputIntFiller::InputIntFiller(GUITestOpStatus &os, int value) : + Filler(os, ""), + value(value) +{ + +} + +#define GT_METHOD_NAME "commonScenario" +void InputIntFiller::commonScenario() { + QWidget *dialog = QApplication::activeModalWidget(); + QSpinBox *spinBox = dialog->findChild<QSpinBox*>(); + GT_CHECK(NULL != spinBox, "NULL spinBox"); + + GTSpinBox::setValue(os, spinBox, value); + + GTWidget::click(os, GTWidget::findButtonByText(os, "OK", dialog)); +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +} // namespace diff --git a/src/libs_3rdparty/QSpec/src/base_dialogs/MessageBoxFiller.h b/src/libs_3rdparty/QSpec/src/base_dialogs/MessageBoxFiller.h new file mode 100644 index 0000000000000000000000000000000000000000..b0ef957cd2c881059d65b57a91f2825de96a0a37 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/base_dialogs/MessageBoxFiller.h @@ -0,0 +1,71 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GT_RUNNABLES_MESSAGE_BOX_FILLER_H_ +#define _HI_GT_RUNNABLES_MESSAGE_BOX_FILLER_H_ + +#include "utils/GTUtilsDialog.h" +#include <QMessageBox> + +namespace HI { + +class HI_EXPORT MessageBoxDialogFiller : public Filler { +public: + MessageBoxDialogFiller(GUITestOpStatus &os, QMessageBox::StandardButton b, const QString &message = "", const QString &objectName = ""); + MessageBoxDialogFiller(GUITestOpStatus &os, const QString &buttonText, const QString &message = ""); + + virtual void commonScenario(); + +protected: + QMessageBox::StandardButton b; + QString buttonText; + QString message; +}; + +class HI_EXPORT AppCloseMessageBoxDialogFiller : public Filler { +public: + AppCloseMessageBoxDialogFiller(GUITestOpStatus &os); + void commonScenario(); +}; + +class HI_EXPORT MessageBoxNoToAllOrNo : public Filler { +public: + MessageBoxNoToAllOrNo(GUITestOpStatus &os); + void commonScenario(); +}; + +class HI_EXPORT MessageBoxOpenAnotherProject : public Filler { +public: + MessageBoxOpenAnotherProject(GUITestOpStatus &os); + void commonScenario(); +}; + +class HI_EXPORT InputIntFiller : public Filler { +public: + InputIntFiller(GUITestOpStatus &os, int value); + void commonScenario(); +private: + int value; +}; + +} // namespace + +#endif diff --git a/src/corelibs/U2Designer/html/EstimationReport.css b/src/libs_3rdparty/QSpec/src/core/CustomScenario.cpp similarity index 74% rename from src/corelibs/U2Designer/html/EstimationReport.css rename to src/libs_3rdparty/QSpec/src/core/CustomScenario.cpp index 42e117b9134a029374e1fbae46efbffcd2d25ae0..2258a425964ab51b6066eac83316178396c569cb 100644 --- a/src/corelibs/U2Designer/html/EstimationReport.css +++ b/src/libs_3rdparty/QSpec/src/core/CustomScenario.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,17 +19,12 @@ * MA 02110-1301, USA. */ -body { - -webkit-user-select: none; - background: url("qrc:U2Designer/images/background.png") repeat scroll 0% 0% transparent; - padding: 10px; -} +#include "CustomScenario.h" -.report-area { - margin-bottom: 0px; -} +namespace HI { + +CustomScenario::~CustomScenario() { -.blue-text { - color: #0088cc; } +} // namespace diff --git a/src/libs_3rdparty/QSpec/src/core/CustomScenario.h b/src/libs_3rdparty/QSpec/src/core/CustomScenario.h new file mode 100644 index 0000000000000000000000000000000000000000..b4cae8743413376d7ab531117759a272bd55f720 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/core/CustomScenario.h @@ -0,0 +1,39 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_CUSTOM_SCENARIO_H_ +#define _HI_CUSTOM_SCENARIO_H_ + +#include <core/global.h> +#include <core/GUITestOpStatus.h> + +namespace HI { + + +class HI_EXPORT CustomScenario { +public: + virtual ~CustomScenario(); + virtual void run(HI::GUITestOpStatus &os) = 0; +}; + +} // namespace + +#endif // _HI_CUSTOM_SCENARIO_H_ diff --git a/src/libs_3rdparty/QSpec/src/core/GUITest.cpp b/src/libs_3rdparty/QSpec/src/core/GUITest.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6ca5268f174fb01df0b556e610471692639db482 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/core/GUITest.cpp @@ -0,0 +1,46 @@ +#include "GUITest.h" +#include "core/GUITestOpStatus.h" + +#include <QApplication> +#include <QDate> +#include <QDesktopWidget> +#include <QDir> +#include <QScreen> + +namespace HI { + +QString getScreenshotDir(){ //TODO:rewrite to use working directory /screenshots + QString result; +#ifdef Q_OS_MAC + result = "../../../../../../screenshotFol/"; +#else + QString guiTestOutputDirectory = qgetenv("GUI_TESTING_OUTPUT"); + if(guiTestOutputDirectory.isEmpty()){ + result = QDir::homePath() + "/gui_testing_output/" + + QDate::currentDate().toString("dd.MM.yyyy") + "/screenshots/"; + }else{ + result = guiTestOutputDirectory + "/gui_testing_output/" + + QDate::currentDate().toString("dd.MM.yyyy") + "/screenshots/"; + } +#endif + return result; +} + +const QString GUITest::screenshotDir = getScreenshotDir(); + +void GUITest::sl_fail(){ +#if (QT_VERSION < 0x050000) // deprecated method + QPixmap originalPixmap = QPixmap::grabWindow(QApplication::desktop()->winId()); +#else + QPixmap originalPixmap = QGuiApplication::primaryScreen()->grabWindow(QApplication::desktop()->winId()); +#endif + originalPixmap.save(GUITest::screenshotDir + name + ".jpg"); + qCritical("GUItest timed out"); + qCritical("\nGT_DEBUG_MESSAGE !!!FIRST FAIL"); + GUITestOpStatus os;// = new GUITestOpStatus(); + os.setError("time out"); +} + + + +} // namespace diff --git a/src/libs_3rdparty/QSpec/src/core/GUITest.h b/src/libs_3rdparty/QSpec/src/core/GUITest.h new file mode 100644 index 0000000000000000000000000000000000000000..852f80b5d37f29f1c87cb44b4206f08036710615 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/core/GUITest.h @@ -0,0 +1,111 @@ +#ifndef _HI_GUI_TEST_H_ +#define _HI_GUI_TEST_H_ + +#include <QTimer> + +#include "GTGlobals.h" +#include "core/GUITestOpStatus.h" + +namespace HI { + +class GUITestIgnorable { +public: + // not ignored test, ignored by all, ignored on windows platforms, ignored on linux platforms + enum IgnoreStatus {NotIgnored=0x0, Ignored=0x1, IgnoredWindows=0x2, IgnoredLinux=0x4, IgnoredMac=0x8}; + enum IgnoreReason {Bug, System}; + + GUITestIgnorable() : ignoreStatus(NotIgnored), ignoreMessage(""), ignoreReason(Bug) {} + + void setIgnored(int status, const QString& message = "") { ignoreStatus = status; ignoreMessage = message; ignoreReason = Bug;} + void setReason(IgnoreReason _reason){ ignoreReason = _reason; } + int getIgnoreStatus() const {return ignoreStatus; } + QString getIgnoreMessage() const {return ignoreMessage; } + + bool isIgnored() const { + bool ignored = ignoreStatus & Ignored; + bool platformIgnore = false; + +#ifdef _WIN32 + platformIgnore = (ignoreStatus & IgnoredWindows); +#endif + +#ifdef __linux__ + platformIgnore = (ignoreStatus & IgnoredLinux); +#endif + +#ifdef Q_OS_MAC + platformIgnore = (ignoreStatus & IgnoredMac); +#endif + + return ignored || platformIgnore; + } + IgnoreReason getReason(){return ignoreReason;} + +private: + int ignoreStatus; + QString ignoreMessage; + IgnoreReason ignoreReason; +}; + +class HI_EXPORT GUITest: public QObject, public GUITestIgnorable { + Q_OBJECT +public: + GUITest(const QString &_name = "", const QString &_suite = "", int _timeout=240000, QString _label=""): + name(_name), suite(_suite), timeout(_timeout), label(_label) {} + virtual ~GUITest(){} + + QString getName() const { return name; } + QString getSuite() const { return suite; } + QString getFullName() const { return suite + ":" + name; } + QString getLabel() const {return label;} + int getTimeout() const { return timeout; } + void setName(const QString &n) { name = n; } + void setTimeout(int _timeout) { timeout = _timeout; } + void setLabel(QString _label) { label = _label; } + + static const QString screenshotDir; + + virtual void run(GUITestOpStatus &os) = 0; + virtual void cleanup() {} + +private slots: + void sl_fail(); + +private: + GUITest(const GUITest&); + GUITest& operator=(const GUITest&); + + QString name; + QString suite; + int timeout; + QString label; +}; + +typedef QList<GUITest*> GUITests; + +#define TESTNAME(className) #className +#define SUITENAME(className) QString(GUI_TEST_SUITE) + +#define TEST_CLASS_DECLARATION(className) \ + class className : public HI::GUITest { \ + public: \ + className () : HI::GUITest(TESTNAME(className), SUITENAME(className)){} \ + protected: \ + virtual void run(HI::GUITestOpStatus &os); \ + }; + +#define TEST_CLASS_DECLARATION_SET_TIMEOUT(className, timeout) \ + class className : public HI::GUITest { \ + public: \ + className () : HI::GUITest(TESTNAME(className), SUITENAME(className), timeout){} \ + protected: \ + virtual void run(HI::GUITestOpStatus &os); \ + }; + +#define TEST_CLASS_DEFINITION(className) \ + void className::run(HI::GUITestOpStatus &os) + + +} //HI + +#endif diff --git a/src/libs_3rdparty/QSpec/src/core/GUITestBase.cpp b/src/libs_3rdparty/QSpec/src/core/GUITestBase.cpp new file mode 100644 index 0000000000000000000000000000000000000000..12db98dc6c34d5f055da9e0afeb348c16bb20502 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/core/GUITestBase.cpp @@ -0,0 +1,92 @@ +#include "GUITestBase.h" + +namespace HI { + +const QString GUITestBase::unnamedTestsPrefix = "test"; + +GUITestBase::~GUITestBase() { + + qDeleteAll(tests); +} + +bool GUITestBase::registerTest(GUITest *test) { + + Q_ASSERT(test); + + test->setName(nameUnnamedTest(test)); + + if (isNewTest(test)) { + addTest(test); + return true; + } + + return false; +} + +QString GUITestBase::nameUnnamedTest(GUITest* test) { + + Q_ASSERT(test); + if (!test) { + return ""; + } + + QString testName = test->getName(); + if (testName.isEmpty()) { + testName = getNextTestName(); + } + + return testName; +} + +bool GUITestBase::isNewTest(GUITest *test) { + + return test && !findTest(test->getFullName()); +} + +void GUITestBase::addTest(GUITest *test) { + + if (test) { + tests.insert(test->getFullName(), test); + } +} + +QString GUITestBase::getNextTestName() { + + int testsCount = tests.size(); + return unnamedTestsPrefix + QString::number(testsCount); +} + +GUITest *GUITestBase::findTest(const QString &name) { + return tests.value(name); +} +bool GUITestBase::containsTest(const QString &name) { + return tests.contains(name); +} + +GUITest *GUITestBase::getTest(const QString &suite, const QString &name) { + + return tests.value(suite + ":" + name); +} + +GUITest *GUITestBase::takeTest(const QString &suite, const QString &name) { + + return tests.take(suite + ":" + name); +} + +GUITests GUITestBase::getTests() { + + GUITests testList = tests.values(); + + return testList; +} + +GUITests GUITestBase::takeTests() { + + GUITests testList = tests.values(); + tests.clear(); + + return testList; +} + + +} // namespace diff --git a/src/libs_3rdparty/QSpec/src/core/GUITestBase.h b/src/libs_3rdparty/QSpec/src/core/GUITestBase.h new file mode 100644 index 0000000000000000000000000000000000000000..c125b57f87f29a9f2adbb6d8ffb8ab4e385e6c51 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/core/GUITestBase.h @@ -0,0 +1,40 @@ +#ifndef _HI_GUI_TEST_BASE_H_ +#define _HI_GUI_TEST_BASE_H_ + +#include <QtGui> +#include "core/GUITest.h" + +namespace HI { + +typedef QMap<QString, HI::GUITest*> GUITestMap; + +class HI_EXPORT GUITestBase { +public: + + virtual ~GUITestBase(); + + bool registerTest(GUITest *test); + GUITest *getTest(const QString &suite, const QString &name); + GUITest *takeTest(const QString &suite, const QString &name); // removes item from GUITestBase + + GUITests getTests(); + GUITests takeTests(); // removes items from GUITestBase + + GUITest *findTest(const QString &name); + bool containsTest(const QString &name); + + static const QString unnamedTestsPrefix; + +private: + GUITestMap tests; + + bool isNewTest(GUITest *test); + void addTest(GUITest *test); + + QString getNextTestName(); + QString nameUnnamedTest(GUITest* test); +}; + +} + +#endif diff --git a/src/libs_3rdparty/QSpec/src/core/GUITestOpStatus.h b/src/libs_3rdparty/QSpec/src/core/GUITestOpStatus.h new file mode 100644 index 0000000000000000000000000000000000000000..67c7a178f57f3dc47482f883cd7713c949015f34 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/core/GUITestOpStatus.h @@ -0,0 +1,49 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + + +#ifndef _HI_GUI_TEST_OP_STATUS_H_ +#define _HI_GUI_TEST_OP_STATUS_H_ + +#include "core/global.h" + +#include <QString> + +namespace HI { + +class HI_EXPORT GUITestOpStatus +{ +public: + GUITestOpStatus(){} + + virtual void setError(const QString & err){error = err; throw this;} + virtual QString getError() const {return error;} + virtual bool hasError() const {return !error.isEmpty();} + + //TODO:Remove this methods + virtual bool isCanceled() const {return false;} + virtual bool isCoR() const {return isCanceled() || hasError();} + +private: + QString error; +}; +} +#endif // GUITESTOPSTATUS_H diff --git a/src/libs_3rdparty/QSpec/src/core/GUITestsLauncher.cpp b/src/libs_3rdparty/QSpec/src/core/GUITestsLauncher.cpp new file mode 100644 index 0000000000000000000000000000000000000000..12d4ccafc7d8b86225c05f547f1b8aaca72287e8 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/core/GUITestsLauncher.cpp @@ -0,0 +1,33 @@ +#include "GUITestsLauncher.h" + +#include "core/TestThread.h" + +namespace HI { + +void GUITestsLauncher::sl_runTest(){ + QString guiTestName = qgetenv("HI_GUI_TEST");// Format is "Suite_name:Test_name" + + if(!guiTestBase.containsTest(guiTestName)){ + qCritical("Test not found: %s", guiTestName.toLocal8Bit().constData()); + qApp->exit(1); + } + + TestThread* testThread = new TestThread(guiTestBase.findTest(guiTestName),os); + connect(testThread, SIGNAL(finished()), this, SLOT(sl_onTestFinished())); + + testThread->start(); +} +void GUITestsLauncher::sl_onTestFinished(){ + sender()->deleteLater(); + + if (os.hasError()){ + qCritical("Test failed: %s", os.getError().toLocal8Bit().constData()); + qApp->exit(1); + }else { + qDebug("Success"); + qApp->exit(0); + } +} + + +} diff --git a/src/libs_3rdparty/QSpec/src/core/GUITestsLauncher.h b/src/libs_3rdparty/QSpec/src/core/GUITestsLauncher.h new file mode 100644 index 0000000000000000000000000000000000000000..8f64dfe8e92f9033f97db7b09e726f026c58c006 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/core/GUITestsLauncher.h @@ -0,0 +1,27 @@ +#ifndef GUITESTSLAUNCHER_H +#define GUITESTSLAUNCHER_H + +#include <core/GUITest.h> +#include <core/GUITestBase.h> +#include <GTGlobals.h> + +namespace HI { +class HI_EXPORT GUITestsLauncher: public QObject +{ + Q_OBJECT +public: + GUITestsLauncher() {} + +public slots: + virtual void sl_runTest(); + virtual void sl_onTestFinished(); +protected: + GUITestBase guiTestBase; +private: + GUITestOpStatus os; + +}; + +} + +#endif // GUITESTSLAUNCHER_H diff --git a/src/libs_3rdparty/QSpec/src/core/MainThreadRunnable.cpp b/src/libs_3rdparty/QSpec/src/core/MainThreadRunnable.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8ede83e45ddad7f36c6d76c9d59d75f415d3c3b7 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/core/MainThreadRunnable.cpp @@ -0,0 +1,91 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QApplication> +#include <QThread> + +#include "MainThreadRunnable.h" + +namespace HI { + +MainThreadRunnable::MainThreadRunnable(GUITestOpStatus &os, CustomScenario *scenario) : + QObject(NULL), + os(os), + scenario(scenario) +{ + if (Q_UNLIKELY(NULL == scenario)) { + os.setError("Scenario is NULL"); + return; + } +} + +MainThreadRunnable::~MainThreadRunnable() { + delete scenario; +} + +void MainThreadRunnable::doRequest() { + if (QThread::currentThread() == QApplication::instance()->thread()) { + run(); + return; + } + + MainThreadRunnableObject obj; + + obj.moveToThread(QApplication::instance()->thread()); + + QMetaObject::Connection connection = connect(this, + SIGNAL(si_request(MainThreadRunnable *)), + &obj, + SLOT(sl_requestAsked(MainThreadRunnable *)), + Qt::BlockingQueuedConnection); + + emit si_request(this); + disconnect(connection); + +} + +void MainThreadRunnable::run() { + if (Q_UNLIKELY(NULL == scenario)) { + os.setError("Scenario is NULL"); + return; + } + scenario->run(os); +} + +void MainThreadRunnable::runInMainThread(GUITestOpStatus &os, CustomScenario *scenario) { + if (Q_UNLIKELY(NULL == scenario)) { + os.setError("Custom scenario is NULL"); + return; + } + MainThreadRunnable mainThreadRunnable(os, scenario); + mainThreadRunnable.doRequest(); +} + +MainThreadRunnableObject::MainThreadRunnableObject() : + QObject(NULL) +{ +} + +void MainThreadRunnableObject::sl_requestAsked(MainThreadRunnable *runnable){ + runnable->run(); +} + +} // namespace diff --git a/src/plugins/dna_stat/src/DNAStatsWindow.h b/src/libs_3rdparty/QSpec/src/core/MainThreadRunnable.h similarity index 50% rename from src/plugins/dna_stat/src/DNAStatsWindow.h rename to src/libs_3rdparty/QSpec/src/core/MainThreadRunnable.h index 89c16b12bbddad27e92f18b1de35a6897a6da0e3..de986cbd2827fe19682cc32ac948a0f3a9826300 100644 --- a/src/plugins/dna_stat/src/DNAStatsWindow.h +++ b/src/libs_3rdparty/QSpec/src/core/MainThreadRunnable.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,45 +19,48 @@ * MA 02110-1301, USA. */ -#ifndef _U2_DNA_STATS_WINDOW_H_ -#define _U2_DNA_STATS_WINDOW_H_ +#ifndef _HI_MAIN_THREAD_RUNNABLE_H_ +#define _HI_MAIN_THREAD_RUNNABLE_H_ -#include <QWebView> +#include "GTGlobals.h" -#include <U2Core/global.h> -#include <U2Gui/MainWindow.h> +#include <core/CustomScenario.h> -namespace U2 { +namespace HI { -class ADVSequenceObjectContext; -class DNAStatProfileTask; -class DNAStatsWindow; - -class DNAStatsWebView : public QWebView { +/** + * Class takes ownership over the scenario. + */ +class HI_EXPORT MainThreadRunnable : public QObject { Q_OBJECT public: - DNAStatsWebView(DNAStatsWindow* parent) : statsWindow(parent) {} -protected: - virtual void contextMenuEvent(QContextMenuEvent*); + MainThreadRunnable(GUITestOpStatus &os, CustomScenario *scenario); + ~MainThreadRunnable(); + + void doRequest(); + void run(); + + static void runInMainThread(GUITestOpStatus &os, CustomScenario *scenario); + +signals: + void si_request(MainThreadRunnable *mainThreadRunnable); + private: - DNAStatsWindow* statsWindow; + GUITestOpStatus &os; + CustomScenario *scenario; }; - -class DNAStatsWindow: public MWMDIWindow { +class MainThreadRunnableObject : public QObject { Q_OBJECT public: - DNAStatsWindow(ADVSequenceObjectContext* ctx); -private slots: - void sl_onTaskStateChanged(Task* task); -private: - void update(); - DNAStatsWebView* webView; - ADVSequenceObjectContext* ctx; - DNAStatProfileTask* updateTask; + MainThreadRunnableObject(); +public slots: + void sl_requestAsked(MainThreadRunnable *mainThreadRunnable); }; -}//namespace -#endif //_U2_DNA_STATS_WINDOW_H_ + +} // namespace + +#endif diff --git a/src/libs_3rdparty/QSpec/src/core/MainThreadTimer.cpp b/src/libs_3rdparty/QSpec/src/core/MainThreadTimer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..edf1db0ebe7bfd3c53ad402ae61e837a331a54bf --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/core/MainThreadTimer.cpp @@ -0,0 +1,49 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "MainThreadTimer.h" +#include <QApplication> + +namespace HI { + +MainThreadTimer::MainThreadTimer(int interval) : + QObject(NULL), + counter(0) +{ + timer.setInterval(interval); + connect(&timer, SIGNAL(timeout()), SLOT(sl_timerTick())); + timer.start(); + moveToThread(QApplication::instance()->thread()); +} + +qint64 MainThreadTimer::getCounter() const { + QMutexLocker locker(&guard); + Q_UNUSED(locker); + return counter; +} + +void MainThreadTimer::sl_timerTick() { + QMutexLocker locker(&guard); + Q_UNUSED(locker); + counter++; +} + +} // namespace diff --git a/src/libs_3rdparty/QSpec/src/core/MainThreadTimer.h b/src/libs_3rdparty/QSpec/src/core/MainThreadTimer.h new file mode 100644 index 0000000000000000000000000000000000000000..b20446540d2f92813e50295ea5a6fbd873413374 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/core/MainThreadTimer.h @@ -0,0 +1,48 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_MAIN_THREAD_TIMER_H_ +#define _HI_MAIN_THREAD_TIMER_H_ + +#include <QTimer> +#include <QMutex> + +namespace HI { + +class MainThreadTimer : public QObject { + Q_OBJECT +public: + MainThreadTimer(int interval); + + qint64 getCounter() const; + +private slots: + void sl_timerTick(); + +private: + QTimer timer; + mutable QMutex guard; + qint64 counter; +}; + +} // namespace + +#endif diff --git a/src/libs_3rdparty/QSpec/src/core/TestThread.cpp b/src/libs_3rdparty/QSpec/src/core/TestThread.cpp new file mode 100644 index 0000000000000000000000000000000000000000..14fd29a73455e66f8a0418caa3b8a668bf32a363 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/core/TestThread.cpp @@ -0,0 +1,14 @@ +#include "TestThread.h" + +namespace HI { + +void TestThread::run() +{ + try { + test->run(os); + } catch (GUITestOpStatus *) { + + } +} + +} diff --git a/src/libs_3rdparty/QSpec/src/core/TestThread.h b/src/libs_3rdparty/QSpec/src/core/TestThread.h new file mode 100644 index 0000000000000000000000000000000000000000..ab3fd6346295c945763818478b29676520691f27 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/core/TestThread.h @@ -0,0 +1,24 @@ +#ifndef TESTTHREAD_H +#define TESTTHREAD_H + +#include "core/GUITest.h" +#include "core/GUITestOpStatus.h" + +#include <QThread> + +namespace HI { + +class HI_EXPORT TestThread: public QThread { +public: + TestThread(GUITest* test, GUITestOpStatus &os): test(test), os(os) {} +public: + virtual void run(); + +private: + GUITest* test; + GUITestOpStatus os; +}; + +} + +#endif // TESTTHREAD_H diff --git a/src/libs_3rdparty/QSpec/src/core/global.h b/src/libs_3rdparty/QSpec/src/core/global.h new file mode 100644 index 0000000000000000000000000000000000000000..2882ba7f2313d1f4f50c9b8c5bd5335952dc07c1 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/core/global.h @@ -0,0 +1,14 @@ +#ifndef GLOBAL_H +#define GLOBAL_H + +#include <qglobal.h> + +#ifdef BUILDING_QSPEC_DLL +# define HI_EXPORT Q_DECL_EXPORT +#else +# define HI_EXPORT Q_DECL_IMPORT +#endif + + +#endif // GLOBAL_H + diff --git a/src/libs_3rdparty/QSpec/src/drivers/GTKeyboardDriver.cpp b/src/libs_3rdparty/QSpec/src/drivers/GTKeyboardDriver.cpp new file mode 100644 index 0000000000000000000000000000000000000000..511f7103086383e9e043d42ab32809624768826d --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/drivers/GTKeyboardDriver.cpp @@ -0,0 +1,92 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <cctype> +#include "GTKeyboardDriver.h" +#include <utils/GTThread.h> + +namespace HI { + +#define GT_CLASS_NAME "GTKeyboardDriver" + +#define GT_METHOD_NAME "keyClick" + +QList<Qt::Key> GTKeyboardDriver::modifiersToKeys(Qt::KeyboardModifiers mod){ + QList<Qt::Key> result; + if(mod.testFlag(Qt::ShiftModifier)){result.append(Qt::Key_Shift);} + if(mod.testFlag(Qt::AltModifier)){result.append(Qt::Key_Alt);} + if(mod.testFlag(Qt::ControlModifier)){result.append(Qt::Key_Control);} + if(mod.testFlag(Qt::MetaModifier)){result.append(Qt::Key_Meta);} + return result; +} + +bool GTKeyboardDriver::keyClick(char key, Qt::KeyboardModifiers modifiers) +{ + DRIVER_CHECK(key != 0, "key = 0"); + DRIVER_CHECK(keyPress(key, modifiers), "key could not be pressed"); + DRIVER_CHECK(keyRelease(key, modifiers), "key could not be released"); + return true; +} + +bool GTKeyboardDriver::keyClick(Qt::Key key, Qt::KeyboardModifiers modifiers) +{ + DRIVER_CHECK(key != 0, "key = 0"); + DRIVER_CHECK(keyPress(key, modifiers), "key could not be pressed"); + DRIVER_CHECK(keyRelease(key, modifiers), "key could not be released"); + return true; +} +#undef GT_METHOD_NAME + +bool GTKeyboardDriver::keySequence(const QString &str, Qt::KeyboardModifiers modifiers) +{ + QList<Qt::Key> modifierKeys = modifiersToKeys(modifiers); + foreach (Qt::Key mod, modifierKeys) { + DRIVER_CHECK(keyPress(mod), "modifier could not be pressed"); + } + + foreach(QChar ch, str) { + char asciiChar = ch.toLatin1(); + if(isalpha(asciiChar) && !islower(asciiChar)) { + DRIVER_CHECK(keyClick( asciiChar, Qt::ShiftModifier), QString("%1 char could not be clicked with shift modifier").arg(asciiChar)); + } else { + DRIVER_CHECK(keyClick( asciiChar), QString("%1 char could not be clicked").arg(asciiChar)); + } + GTGlobals::sleep(10); + } + + foreach (Qt::Key mod, modifierKeys) { + DRIVER_CHECK(keyRelease(mod), "modifier could not be released"); + } + GTThread::waitForMainThread(); + return true; +} + +/******************************************************************************/ +int GTKeyboardDriver::keys::operator [] (const Qt::Key &key) const +{ + return value(key); +} + +GTKeyboardDriver::keys GTKeyboardDriver::key; + +#undef GT_CLASS_NAME + +} //namespace diff --git a/src/libs_3rdparty/QSpec/src/drivers/GTKeyboardDriver.h b/src/libs_3rdparty/QSpec/src/drivers/GTKeyboardDriver.h new file mode 100644 index 0000000000000000000000000000000000000000..c99d05bebf608a6d8f15746efbd01178d0078c7b --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/drivers/GTKeyboardDriver.h @@ -0,0 +1,81 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GUI_GTKEYBOARDDRIVER_H_ +#define _HI_GUI_GTKEYBOARDDRIVER_H_ + +#include <QMap> +#include "GTGlobals.h" + +#ifdef _WIN32 +#include <windows.h> +#endif + +#define ADD_KEY(name, code) insert(name, code) + +namespace HI { +/*! + * \brief The base class for keyboard's actions imitation + * + * Example: + * \code {.cpp} + * GTKeyboardDriver::keyClick( 'A'); // print 'a' + * GTKeyboardDriver::keyClick( 'a'); // print 'a' + * + * GTKeyboardDriver::keyClick( 'a', GTKeyboardDriver::key[Qt::Key_Shift]); // print 'A' + * GTKeyboardDriver::keyClick( 'a', GTKeyboardDriver::key[Qt::Key_Shift]); // print 'A' + * //case in ["..."] does not matter + * + * GTKeyboardDriver::keySequence("ThIs Is a TeSt StRiNg"); // print "ThIs Is a TeSt StRiNg" + * //i.e. case sensitive + * \endcode + */ +class HI_EXPORT GTKeyboardDriver { +public: + // + // fails if key == 0 + // Linux: fails if there is an opening X display error + + static bool keyClick(char key, Qt::KeyboardModifiers = Qt::NoModifier); + static bool keyClick(Qt::Key, Qt::KeyboardModifiers = Qt::NoModifier); + static bool keySequence(const QString &str, Qt::KeyboardModifiers = Qt::NoModifier); + + static bool keyPress(char key, Qt::KeyboardModifiers = Qt::NoModifier); + static bool keyRelease(char key, Qt::KeyboardModifiers = Qt::NoModifier); + static bool keyPress(Qt::Key, Qt::KeyboardModifiers = Qt::NoModifier); + static bool keyRelease(Qt::Key, Qt::KeyboardModifiers = Qt::NoModifier); + + class HI_EXPORT keys : private QMap<Qt::Key, int> { + public: + keys(); + int operator [] (const Qt::Key &key) const; + }; + + static keys key; + +private: + static QList<Qt::Key> modifiersToKeys(Qt::KeyboardModifiers m); + +}; + +} //namespace + +#endif diff --git a/src/libs_3rdparty/QSpec/src/drivers/GTKeyboardDriverLinux.cpp b/src/libs_3rdparty/QSpec/src/drivers/GTKeyboardDriverLinux.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ded83a72533b403ae97dded12793c1f7087dfd30 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/drivers/GTKeyboardDriverLinux.cpp @@ -0,0 +1,372 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <cctype> +#include "GTKeyboardDriver.h" + +#if defined __linux__ + #define XK_LATIN1 // for latin symbol + #define XK_MISCELLANY // for action keys + #include <X11/keysymdef.h> + #include <X11/extensions/XTest.h> +#endif + +namespace HI { + +#if defined __linux__ + +#define GT_CLASS_NAME "GTKeyboardDriverLinux" + +#define GT_METHOD_NAME "keyPress" +bool GTKeyboardDriver::keyPress(char key, Qt::KeyboardModifiers modifiers) +{ + DRIVER_CHECK(key != 0, "key = 0"); + + QByteArray display_name = qgetenv("DISPLAY"); + DRIVER_CHECK(!display_name.isEmpty(), "Environment variable \"DISPLAY\" not found"); + + Display *display = XOpenDisplay(display_name.constData()); + DRIVER_CHECK(display != 0, "display is NULL"); + + QList<Qt::Key> modifierKeys = modifiersToKeys(modifiers); + foreach (Qt::Key mod, modifierKeys) { + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[mod]), 1, 0); + } + + switch(key) { + case '\n': + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Enter]), 1, 0); + break; + case '_': + key = '-'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 1, 0); + break; + case '~': + key = '`'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 1, 0); + break; + case '<': + key = ','; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 1, 0); + break; + case '>': + key = '.'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 1, 0); + break; + case '(': + key = '9'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 1, 0); + break; + case '$': + key = '4'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 1, 0); + break; + case '#': + key = '3'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 1, 0); + break; + case ')': + key = '0'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 1, 0); + break; + case ':': + key = ';'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 1, 0); + break; + case '*': + key = '8'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 1, 0); + break; + case '\"': + key = '\''; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 1, 0); + break; + case '@': + key = '2'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 1, 0); + break; + case '%': + key = '5'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 1, 0); + break; + case '^': + key = '6'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 1, 0); + break; + case '&': + key = '7'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 1, 0); + break; + case '+': + key = '='; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 1, 0); + break; + case '{': + key = '['; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 1, 0); + break; + case '}': + key = ']'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 1, 0); + break; + case '|': + key = '\\'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 1, 0); + break; + case '!': + key = '1'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 1, 0); + break; + } + + XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), 1, 0); + XFlush(display); + + XCloseDisplay(display); + + return true; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "keyRelease" +bool GTKeyboardDriver::keyRelease(char key, Qt::KeyboardModifiers modifiers) +{ + DRIVER_CHECK(key != 0, "key = "); + + QByteArray display_name = qgetenv("DISPLAY"); + DRIVER_CHECK(!display_name.isEmpty(), "Environment variable \"DISPLAY\" not found"); + + Display *display = XOpenDisplay(display_name.constData()); + DRIVER_CHECK(display != 0, "display is NULL"); + + switch(key) { + case '\n': + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Enter]), 0, 0); + break; + case '_': + key = '-'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), 0, 0); + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 0, 0); + break; + + case '~': + key = '`'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), 0, 0); + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 0, 0); + break; + + case '<': + key = ','; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), 0, 0); + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 0, 0); + break; + + case '>': + key = '.'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), 0, 0); + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 0, 0); + break; + + case '(': + key = '9'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), 0, 0); + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 0, 0); + break; + + case '$': + key = '4'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), 0, 0); + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 0, 0); + break; + + case '#': + key = '3'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), 0, 0); + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 0, 0); + break; + + case ')': + key = '0'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), 0, 0); + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 0, 0); + break; + + case ':': + key = ';'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), 0, 0); + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 0, 0); + break; + + case '*': + key = '8'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), 0, 0); + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 0, 0); + break; + + case '\"': + key = '\''; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), 0, 0); + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 0, 0); + break; + case '@': + key = '2'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), 0, 0); + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 0, 0); + break; + case '%': + key = '5'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), 0, 0); + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 0, 0); + break; + case '^': + key = '6'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), 0, 0); + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 0, 0); + break; + case '&': + key = '7'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), 0, 0); + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 0, 0); + break; + case '+': + key = '='; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), 0, 0); + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 0, 0); + break; + case '{': + key = '['; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), 0, 0); + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 0, 0); + break; + case '}': + key = ']'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), 0, 0); + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 0, 0); + break; + case '|': + key = '\\'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), 0, 0); + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 0, 0); + break; + case '!': + key = '1'; + XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), 0, 0); + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[Qt::Key_Shift]), 0, 0); + break; + + default: + XTestFakeKeyEvent(display, XKeysymToKeycode(display, key), 0, 0); + } + + QList<Qt::Key> modifierKeys = modifiersToKeys(modifiers); + foreach (Qt::Key mod, modifierKeys) { + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[mod]), 0, 0); + } + XFlush(display); + + XCloseDisplay(display); + + return true; +} +#undef GT_METHOD_NAME + +bool GTKeyboardDriver::keyPress(Qt::Key key, Qt::KeyboardModifiers modifiers){ + modifiersToKeys(modifiers); + QByteArray display_name = qgetenv("DISPLAY"); + DRIVER_CHECK(!display_name.isEmpty(), "Environment variable \"DISPLAY\" not found"); + + Display *display = XOpenDisplay(display_name.constData()); + DRIVER_CHECK(display != 0, "display is NULL"); + + QList<Qt::Key> modifierKeys = modifiersToKeys(modifiers); + foreach (Qt::Key mod, modifierKeys) { + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[mod]), 1, 0); + } + + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[key]), 1, 0); + XFlush(display); + + XCloseDisplay(display); + + return true; +} + +bool GTKeyboardDriver::keyRelease(Qt::Key key, Qt::KeyboardModifiers modifiers){ + QByteArray display_name = qgetenv("DISPLAY"); + DRIVER_CHECK(!display_name.isEmpty(), "Environment variable \"DISPLAY\" not found"); + + Display *display = XOpenDisplay(display_name.constData()); + DRIVER_CHECK(display != 0, "display is NULL"); + + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[key]), 0, 0); + QList<Qt::Key> modifierKeys = modifiersToKeys(modifiers); + foreach (Qt::Key mod, modifierKeys) { + XTestFakeKeyEvent(display, XKeysymToKeycode(display, GTKeyboardDriver::key[mod]), 0, 0); + } + XFlush(display); + + XCloseDisplay(display); + + return true; +} + +GTKeyboardDriver::keys::keys() +{ + ADD_KEY(Qt::Key_Backspace, XK_BackSpace); + ADD_KEY(Qt::Key_Tab, XK_Tab); + ADD_KEY(Qt::Key_Enter, XK_Return); + ADD_KEY(Qt::Key_Shift, XK_Shift_L); + ADD_KEY(Qt::Key_Control, XK_Control_L); + ADD_KEY(Qt::Key_Alt, XK_Alt_L); + ADD_KEY(Qt::Key_Escape, XK_Escape); + ADD_KEY(Qt::Key_Space, XK_space); + ADD_KEY(Qt::Key_Left, XK_Left); + ADD_KEY(Qt::Key_Up, XK_Up); + ADD_KEY(Qt::Key_Right, XK_Right); + ADD_KEY(Qt::Key_Down, XK_Down); + ADD_KEY(Qt::Key_Insert, XK_Insert); + ADD_KEY(Qt::Key_Delete, XK_Delete); + ADD_KEY(Qt::Key_Home, XK_Home); + ADD_KEY(Qt::Key_End, XK_End); + ADD_KEY(Qt::Key_PageUp, XK_Page_Up); + ADD_KEY(Qt::Key_PageDown, XK_Page_Down); + ADD_KEY(Qt::Key_F1, XK_F1); + ADD_KEY(Qt::Key_F2, XK_F2); + ADD_KEY(Qt::Key_F3, XK_F3); + ADD_KEY(Qt::Key_F4, XK_F4); + ADD_KEY(Qt::Key_F5, XK_F5); + ADD_KEY(Qt::Key_F6, XK_F6); + ADD_KEY(Qt::Key_F7, XK_F7); + ADD_KEY(Qt::Key_F8, XK_F8); + ADD_KEY(Qt::Key_F9, XK_F9); + ADD_KEY(Qt::Key_F10, XK_F10); + ADD_KEY(Qt::Key_F11, XK_F11); + ADD_KEY(Qt::Key_F12, XK_F12); + +// feel free to add other keys +// macro XK_* defined in X11/keysymdef.h +} + +#undef GT_CLASS_NAME + +#endif + +} //namespace diff --git a/src/libs_3rdparty/QSpec/src/drivers/GTKeyboardDriverMac.cpp b/src/libs_3rdparty/QSpec/src/drivers/GTKeyboardDriverMac.cpp new file mode 100644 index 0000000000000000000000000000000000000000..113cf6adbaa76c71c3219411c14cd02833e47198 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/drivers/GTKeyboardDriverMac.cpp @@ -0,0 +1,389 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "GTKeyboardDriver.h" +#include "GTGlobals.h" + +#ifdef Q_OS_MAC +#include <ApplicationServices/ApplicationServices.h> +#include <Carbon/Carbon.h> +#endif + +namespace HI { + +#ifdef Q_OS_MAC + +int asciiToVirtual(int); +bool extractShiftModifier(char &key); +bool keyPressMac(int key); +bool keyReleaseMac(int key); + +#define GT_CLASS_NAME "GTKeyboardDriverMac" +#define GT_METHOD_NAME "keyPress_char" +bool GTKeyboardDriver::keyPress(char key, Qt::KeyboardModifiers modifiers) { + DRIVER_CHECK(key != 0, "key = 0"); + + const bool isChanged = extractShiftModifier(key); + if (isChanged) { + keyPressMac(GTKeyboardDriver::key[Qt::Key_Shift]); + } else { + key = asciiToVirtual(key); + } + + GTGlobals::sleep(1); + QList<Qt::Key> modKeys = modifiersToKeys(modifiers); + foreach (Qt::Key mod, modKeys) { + keyPressMac(GTKeyboardDriver::key[mod]); + } + + return keyPressMac((int)key); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "keyRelease_char" +bool GTKeyboardDriver::keyRelease(char key, Qt::KeyboardModifiers modifiers) { + DRIVER_CHECK(key != 0, "key = 0"); + + const bool isChanged = extractShiftModifier(key); + if (!isChanged) { + key = asciiToVirtual(key); + } else { + keyReleaseMac(GTKeyboardDriver::key[Qt::Key_Shift]); + } + + GTGlobals::sleep(1); + keyReleaseMac((int)key); + GTGlobals::sleep(1); + + QList<Qt::Key> modKeys = modifiersToKeys(modifiers); + foreach (Qt::Key mod, modKeys) { + keyReleaseMac(GTKeyboardDriver::key[mod]); + } + GTGlobals::sleep(1); + + return true; +} +#undef GT_METHOD_NAME + +bool GTKeyboardDriver::keyPress(Qt::Key key, Qt::KeyboardModifiers modifiers){ + QList<Qt::Key> modKeys = modifiersToKeys(modifiers); + foreach (Qt::Key mod, modKeys) { + keyPressMac(GTKeyboardDriver::key[mod]); + } + return keyPressMac(GTKeyboardDriver::key[key]); +} + +bool GTKeyboardDriver::keyRelease(Qt::Key key, Qt::KeyboardModifiers modifiers){ + keyReleaseMac(GTKeyboardDriver::key[key]); + + QList<Qt::Key> modKeys = modifiersToKeys(modifiers); + foreach (Qt::Key mod, modKeys) { + keyReleaseMac(GTKeyboardDriver::key[mod]); + } + + return true; +} + +GTKeyboardDriver::keys::keys() +{ + ADD_KEY(Qt::Key_Control, kVK_Command); + ADD_KEY(Qt::Key_Tab, kVK_Tab); + ADD_KEY(Qt::Key_Enter, kVK_Return); + ADD_KEY(Qt::Key_Shift, kVK_Shift); + ADD_KEY(Qt::Key_Meta, kVK_Control); + ADD_KEY(Qt::Key_Alt, kVK_Option); + ADD_KEY(Qt::Key_Escape, kVK_Escape); + ADD_KEY(Qt::Key_Space, kVK_Space); + ADD_KEY(Qt::Key_Left, kVK_LeftArrow); + ADD_KEY(Qt::Key_Up, kVK_UpArrow); + ADD_KEY(Qt::Key_Right, kVK_RightArrow); + ADD_KEY(Qt::Key_Down, kVK_DownArrow); + ADD_KEY(Qt::Key_Delete, kVK_ForwardDelete); + ADD_KEY(Qt::Key_Backspace, kVK_Delete); + ADD_KEY(Qt::Key_Help, kVK_Help); + ADD_KEY(Qt::Key_F1, kVK_F1); + ADD_KEY(Qt::Key_F2, kVK_F2); + ADD_KEY(Qt::Key_F3, kVK_F3); + ADD_KEY(Qt::Key_F4, kVK_F4); + ADD_KEY(Qt::Key_F5, kVK_F5); + ADD_KEY(Qt::Key_F6, kVK_F6); + ADD_KEY(Qt::Key_F7, kVK_F7); + ADD_KEY(Qt::Key_F8, kVK_F8); + ADD_KEY(Qt::Key_F9, kVK_F9); + ADD_KEY(Qt::Key_F10, kVK_F10); + ADD_KEY(Qt::Key_F12, kVK_F12); + ADD_KEY(Qt::Key_Home, kVK_Home); + ADD_KEY(Qt::Key_End, kVK_End); + ADD_KEY(Qt::Key_PageUp, kVK_PageUp); + ADD_KEY(Qt::Key_PageDown, kVK_PageDown); + +// feel free to add other keys +// macro kVK_* defined in Carbon.framework/Frameworks/HIToolbox.framework/Headers/Events.h +} + +#undef GT_CLASS_NAME + +int asciiToVirtual(int key) +{ + if (isalpha(key)) { + key = tolower(key); + } + + switch(key) { + case ' ': + key = kVK_Space; + break; + case '0': + key = kVK_ANSI_0; + break; + case '1': + key = kVK_ANSI_1; + break; + case '2': + key = kVK_ANSI_2; + break; + case '3': + key = kVK_ANSI_3; + break; + case '4': + key = kVK_ANSI_4; + break; + case '5': + key = kVK_ANSI_5; + break; + case '6': + key = kVK_ANSI_6; + break; + case '7': + key = kVK_ANSI_7; + break; + case '8': + key = kVK_ANSI_8; + break; + case '9': + key = kVK_ANSI_9; + break; + case 'a': + key = kVK_ANSI_A; + break; + case 'b': + key = kVK_ANSI_B; + break; + case 'c': + key = kVK_ANSI_C; + break; + case 'd': + key = kVK_ANSI_D; + break; + case 'e': + key = kVK_ANSI_E; + break; + case 'f': + key = kVK_ANSI_F; + break; + case 'g': + key = kVK_ANSI_G; + break; + case 'h': + key = kVK_ANSI_H; + break; + case 'i': + key = kVK_ANSI_I; + break; + case 'j': + key = kVK_ANSI_J; + break; + case 'k': + key = kVK_ANSI_K; + break; + case 'l': + key = kVK_ANSI_L; + break; + case 'm': + key = kVK_ANSI_M; + break; + case 'n': + key = kVK_ANSI_N; + break; + case 'o': + key = kVK_ANSI_O; + break; + case 'p': + key = kVK_ANSI_P; + break; + case 'q': + key = kVK_ANSI_Q; + break; + case 'r': + key = kVK_ANSI_R; + break; + case 's': + key = kVK_ANSI_S; + break; + case 't': + key = kVK_ANSI_T; + break; + case 'u': + key = kVK_ANSI_U; + break; + case 'v': + key = kVK_ANSI_V; + break; + case 'w': + key = kVK_ANSI_W; + break; + case 'x': + key = kVK_ANSI_X; + break; + case 'y': + key = kVK_ANSI_Y; + break; + case 'z': + key = kVK_ANSI_Z; + break; + case '=': + key = kVK_ANSI_Equal; + break; + case '-': + key = kVK_ANSI_Minus; + break; + case ']': + key = kVK_ANSI_RightBracket; + break; + case '[': + key = kVK_ANSI_LeftBracket; + break; + case '\'': + key = kVK_ANSI_Quote; + break; + case ';': + key = kVK_ANSI_Semicolon; + break; + case '\\': + key = kVK_ANSI_Backslash; + break; + case ',': + key = kVK_ANSI_Comma; + break; + case '/': + key = kVK_ANSI_Slash; + break; + case '.': + key = kVK_ANSI_Period; + break; + case '\n': + key = kVK_Return; + break; + } + + return key; +} + +bool extractShiftModifier(char &key) { + switch(key) { + case '_': + key = asciiToVirtual('-'); + return true; + case '+': + key = asciiToVirtual('='); + return true; + case '<': + key = asciiToVirtual(','); + return true; + case '>': + key = asciiToVirtual('.'); + return true; + case ')': + key = asciiToVirtual('0'); + return true; + case '!': + key = asciiToVirtual('1'); + return true; + case '@': + key = asciiToVirtual('2'); + return true; + case '#': + key = asciiToVirtual('3'); + return true; + case '$': + key = asciiToVirtual('4'); + return true; + case '%': + key = asciiToVirtual('5'); + return true; + case '^': + key = asciiToVirtual('6'); + return true; + case '&': + key = asciiToVirtual('7'); + return true; + case '*': + key = asciiToVirtual('8'); + return true; + case '(': + key = asciiToVirtual('9'); + return true; + case '\"': + key = asciiToVirtual('\''); + return true; + case '|': + key = asciiToVirtual('\\'); + return true; + case ':': + key = asciiToVirtual(';'); + return true; + case '{': + key = asciiToVirtual('['); + return true; + case '}': + key = asciiToVirtual(']'); + return true; + } + + return false; +} + +bool keyPressMac(int key){ + CGEventRef event = CGEventCreateKeyboardEvent(NULL, key, true); + DRIVER_CHECK(event != NULL, "Can't create event"); + CGEventSetFlags(event, CGEventGetFlags(event) & ~kCGEventFlagMaskNumericPad); + + CGEventPost(kCGSessionEventTap, event); + CFRelease(event); + GTGlobals::sleep(1); + + return true; +} + +bool keyReleaseMac(int key){ + CGEventRef event = CGEventCreateKeyboardEvent(NULL, key, false); + DRIVER_CHECK(event != NULL, "Can't create event"); + CGEventSetFlags(event, CGEventGetFlags(event) & ~kCGEventFlagMaskNumericPad); + + CGEventPost(kCGSessionEventTap, event); + CFRelease(event); + GTGlobals::sleep(1); + + return true; +} + +#endif +} //namespace diff --git a/src/libs_3rdparty/QSpec/src/drivers/GTKeyboardDriverWindows.cpp b/src/libs_3rdparty/QSpec/src/drivers/GTKeyboardDriverWindows.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b46b126c8c2800f7873706964f264137737ee8a4 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/drivers/GTKeyboardDriverWindows.cpp @@ -0,0 +1,412 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <cctype> +#include "GTKeyboardDriver.h" +#include <QtGui/QClipboard> + +#ifdef _WIN32 + #include <windows.h> + #define VIRTUAL_TO_SCAN_CODE 0 +#endif +#define GT_METHOD_NAME "keyPress" + +namespace HI { + +#ifdef _WIN32 + +#define GT_CLASS_NAME "GTKeyboardDriver Windows" + +namespace{ + +namespace { + +QList<int> initExtendedKeys() { + // The list is taken from here: https://msdn.microsoft.com/en-us/library/windows/desktop/ms646267(v=vs.85).aspx#_win32_Keystroke_Message_Flags + // There also sohuld be the numpad enter key in the list, but I don't know its code + return QList<int>() << VK_RCONTROL + << VK_RMENU + << VK_INSERT + << VK_DELETE + << VK_HOME + << VK_END + << VK_PRIOR + << VK_NEXT + << VK_UP + << VK_DOWN + << VK_RIGHT + << VK_LEFT + << VK_NUMLOCK + << VK_CANCEL + << VK_SNAPSHOT + << VK_DIVIDE; +} + +bool isExtended(int key) { + static const QList<int> extendedKeys = initExtendedKeys(); + return extendedKeys.contains(key); +} + +bool isExtended(Qt::Key key) { + return isExtended(GTKeyboardDriver::key[key]); +} + +} + +INPUT getKeyEvent(int key, bool keyUp = false, bool extended = false) { + INPUT event; + event.type = INPUT_KEYBOARD; + event.ki.wVk = key; + event.ki.wScan = MapVirtualKey(key, VIRTUAL_TO_SCAN_CODE); + event.ki.dwFlags = keyUp ? KEYEVENTF_KEYUP : 0; + event.ki.time = 0; + event.ki.dwExtraInfo = 0; + if (extended){ + event.ki.dwFlags |= KEYEVENTF_EXTENDEDKEY; + } + + return event; +} + +bool keyPressWindows(int key, int modifiers = 0, bool extended = false) { + DRIVER_CHECK(key != 0, " Error: key = 0 in GTKeyboardDriver::keyPress()"); + + if (modifiers) { + INPUT input = getKeyEvent(modifiers); + SendInput(1, &input, sizeof(input)); + } + + INPUT input = getKeyEvent(key, false, extended); + SendInput(1, &input, sizeof(input)); + + return true; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "keyRelease" +bool keyReleaseWindows(int key, int modifiers = 0, bool extended = false) +{ + DRIVER_CHECK(key != 0, " Error: key = 0 in GTKeyboardDriver::keyRelease()"); + + if (modifiers) { + INPUT input = getKeyEvent(modifiers, true); + SendInput(1, &input, sizeof(input)); + } + + INPUT input = getKeyEvent(key, true, extended); + SendInput(1, &input, sizeof(input)); + + return true; +} +#undef GT_METHOD_NAME +} + +bool GTKeyboardDriver::keyPress(char key, Qt::KeyboardModifiers modifiers) +{ + if (isalpha(key)) { + key = toupper(key); + } + + QList<Qt::Key> modKeys = modifiersToKeys(modifiers); + foreach(Qt::Key mod, modKeys){ + keyPressWindows(GTKeyboardDriver::key[mod]); + } + + switch (key) { + case '-': + keyPressWindows(VK_OEM_MINUS); + break; + case '_': + keyPressWindows(VK_OEM_MINUS, GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '=': + keyPressWindows(VK_OEM_PLUS); + break; + case '.': + keyPressWindows(VK_DECIMAL); + break; + case ',': + keyPressWindows(VK_OEM_COMMA); + break; + case ']': + keyPressWindows(VK_OEM_6); + break; + case '\\': + keyPressWindows(VK_OEM_5); + break; + case '[': + keyPressWindows(VK_OEM_4); + break; + case '/': + keyPressWindows(VK_DIVIDE, 0, true); + break; + case '\n': + keyPressWindows(GTKeyboardDriver::key[Qt::Key_Enter]); + break; + case ':': + keyPressWindows(VK_OEM_1, GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case ';': + keyPressWindows(VK_OEM_1); + break; + case '<': + keyPressWindows(VK_OEM_COMMA, GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '>': + keyPressWindows(VK_OEM_PERIOD, GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '(': + keyPressWindows('9', GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case ')': + keyPressWindows('0', GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '"': + keyPressWindows(VK_OEM_7, GTKeyboardDriver::key[Qt::Key_Shift]); + case '\'': + keyPressWindows(VK_OEM_7); + break; + case '!': + keyPressWindows('1', GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '@': + keyPressWindows('2', GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '#': + keyPressWindows('3', GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '$': + keyPressWindows('4', GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '%': + keyPressWindows('5', GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '^': + keyPressWindows('6', GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '&': + keyPressWindows('7', GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '*': + keyPressWindows('8', GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '+': + keyPressWindows(VK_OEM_PLUS, GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '?': + keyPressWindows(VK_OEM_2, GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '{': + keyPressWindows(VK_OEM_4, GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '}': + keyPressWindows(VK_OEM_6, GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '|': + keyPressWindows(VK_OEM_5, GTKeyboardDriver::key[Qt::Key_Shift]); + break; + default: + keyPressWindows((int)key); + break; + } + + return true; +} + +bool GTKeyboardDriver::keyRelease(char key, Qt::KeyboardModifiers modifiers) +{ + if (isalpha(key)) { + key = toupper(key); + } + + switch (key) { + case '_': + keyReleaseWindows(VK_OEM_MINUS, GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '=': + keyReleaseWindows(VK_OEM_PLUS); + break; + case '.': + keyReleaseWindows(VK_DECIMAL); + break; + case ',': + keyReleaseWindows(VK_OEM_COMMA); + break; + case ']': + keyReleaseWindows(VK_OEM_6); + break; + case '\\': + keyReleaseWindows(VK_OEM_5); + break; + case '[': + keyReleaseWindows(VK_OEM_4); + break; + case '/': + keyReleaseWindows(VK_DIVIDE, 0, true); + break; + case '\n': + keyReleaseWindows(GTKeyboardDriver::key[Qt::Key_Enter]); + break; + case ':': + keyReleaseWindows(VK_OEM_1, GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case ';': + keyReleaseWindows(VK_OEM_1); + break; + case '<': + keyReleaseWindows(VK_OEM_COMMA, GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '>': + keyReleaseWindows(VK_OEM_PERIOD, GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '(': + keyReleaseWindows('9', GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case ')': + keyReleaseWindows('0', GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '"': + keyReleaseWindows(VK_OEM_7, GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '\'': + keyReleaseWindows(VK_OEM_7); + break; + case '!': + keyReleaseWindows('1', GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '@': + keyReleaseWindows('2', GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '#': + keyReleaseWindows('3', GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '$': + keyReleaseWindows('4', GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '%': + keyReleaseWindows('5', GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '^': + keyReleaseWindows('6', GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '&': + keyReleaseWindows('7', GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '*': + keyReleaseWindows('8', GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '+': + keyReleaseWindows(VK_OEM_PLUS, GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '?': + keyReleaseWindows(VK_OEM_2, GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '{': + keyReleaseWindows(VK_OEM_4, GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '}': + keyReleaseWindows(VK_OEM_6, GTKeyboardDriver::key[Qt::Key_Shift]); + break; + case '|': + keyReleaseWindows(VK_OEM_5, GTKeyboardDriver::key[Qt::Key_Shift]); + break; + default: + keyReleaseWindows((int)key); + break; + } + + QList<Qt::Key> modKeys = modifiersToKeys(modifiers); + foreach(Qt::Key mod, modKeys){ + keyReleaseWindows(GTKeyboardDriver::key[mod]); + } + + return true; +} + +bool GTKeyboardDriver::keyPress(Qt::Key key, Qt::KeyboardModifiers modifiers){ + QList<Qt::Key> modKeys = modifiersToKeys(modifiers); + foreach(Qt::Key mod, modKeys){ + keyPressWindows(GTKeyboardDriver::key[mod], 0, isExtended(key)); + } + keyPressWindows(GTKeyboardDriver::key[key], 0, isExtended(key)); + + return true; +} + +bool GTKeyboardDriver::keyRelease(Qt::Key key, Qt::KeyboardModifiers modifiers){ + keyReleaseWindows(GTKeyboardDriver::key[key], 0, isExtended(key)); + QList<Qt::Key> modKeys = modifiersToKeys(modifiers); + foreach(Qt::Key mod, modKeys){ + keyReleaseWindows(GTKeyboardDriver::key[mod], 0, isExtended(key)); + } + + return true; +} + +GTKeyboardDriver::keys::keys() +{ + //ADD_KEY("context_menu", VK_APPS); + ADD_KEY(Qt::Key_Backspace, VK_BACK); + ADD_KEY(Qt::Key_Tab, VK_TAB); + //ADD_KEY("clear", VK_CLEAR); + ADD_KEY(Qt::Key_Enter, VK_RETURN); + ADD_KEY(Qt::Key_Shift, VK_SHIFT); + //ADD_KEY(Qt::Key_Shift, VK_RSHIFT); + //ADD_KEY("lshift", VK_LSHIFT); + ADD_KEY(Qt::Key_Control, VK_LCONTROL); + //ADD_KEY("rctrl", VK_RCONTROL); + //ADD_KEY("lctrl", VK_LCONTROL); + ADD_KEY(Qt::Key_Alt, VK_MENU); + //ADD_KEY("pause", VK_PAUSE); + ADD_KEY(Qt::Key_Escape, VK_ESCAPE); + ADD_KEY(Qt::Key_Space, VK_SPACE); + ADD_KEY(Qt::Key_Left, VK_LEFT); + ADD_KEY(Qt::Key_Up, VK_UP); + ADD_KEY(Qt::Key_Right, VK_RIGHT); + ADD_KEY(Qt::Key_Down, VK_DOWN); + ADD_KEY(Qt::Key_Insert, VK_INSERT); + ADD_KEY(Qt::Key_Delete, VK_DELETE); + ADD_KEY(Qt::Key_PageUp, VK_PRIOR); + ADD_KEY(Qt::Key_PageDown, VK_NEXT); + //ADD_KEY("help", VK_HELP); + ADD_KEY(Qt::Key_F1, VK_F1); + ADD_KEY(Qt::Key_F2, VK_F2); + ADD_KEY(Qt::Key_F3, VK_F3); + ADD_KEY(Qt::Key_F4, VK_F4); + ADD_KEY(Qt::Key_F5, VK_F5); + ADD_KEY(Qt::Key_F6, VK_F6); + ADD_KEY(Qt::Key_F7, VK_F7); + ADD_KEY(Qt::Key_F8, VK_F8); + ADD_KEY(Qt::Key_F9, VK_F9); + ADD_KEY(Qt::Key_F10, VK_F10); + ADD_KEY(Qt::Key_F12, VK_F12); + ADD_KEY(Qt::Key_Home, VK_HOME); + ADD_KEY(Qt::Key_End, VK_END); + +// feel free to add other keys +// macro VK_* defined in WinUser.h +} + +#undef GT_CLASS_NAME + +#endif + +} //namespace diff --git a/src/libs_3rdparty/QSpec/src/drivers/GTMouseDriver.cpp b/src/libs_3rdparty/QSpec/src/drivers/GTMouseDriver.cpp new file mode 100644 index 0000000000000000000000000000000000000000..16f0dad86fa3420bdf3160ff2674c1a113d16c65 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/drivers/GTMouseDriver.cpp @@ -0,0 +1,85 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QApplication> +#include <utils/GTThread.h> + +#include "GTMouseDriver.h" + +namespace HI { + +bool GTMouseDriver::click(Qt::MouseButton button) +{ + DRIVER_CHECK(press(button), "Button could not be pressed"); + DRIVER_CHECK(release(button), "Button could not be released"); + GTGlobals::sleep(500); + return true; +} + +namespace { + +bool isFarEnoughToStartDnd(const QPoint &start, const QPoint &end) { + return (end - start).manhattanLength() > 2 * QApplication::startDragDistance(); +} + +} + +bool GTMouseDriver::dragAndDrop(const QPoint& start, const QPoint& end) { + DRIVER_CHECK(moveTo(start), QString("Mouse could not be moved to point (%1, %2)").arg(start.x()).arg(start.y())); + + DRIVER_CHECK(press(), "Left button could not be pressed"); + + const QPoint farPoint = (isFarEnoughToStartDnd(start, (end + start) / 2) ? + (end + start) / 2 : + QPoint(0, 0)); + DRIVER_CHECK(moveTo(farPoint), QString("Mouse could not be moved to point (%1, %2)").arg(farPoint.x()).arg(farPoint.y())); + + DRIVER_CHECK(moveTo(end), QString("Mouse could not be moved to point (%1, %2)").arg(end.x()).arg(end.y()));; + DRIVER_CHECK(release(), "Button could not be released"); + + GTThread::waitForMainThread(); + return true; +} + +bool GTMouseDriver::selectArea(const QPoint &start, const QPoint &end){ + DRIVER_CHECK(dragAndDrop(start, end), "Drag and drop failed"); + return true; +} + +#ifndef Q_OS_MAC +bool GTMouseDriver::doubleClick() +{ + DRIVER_CHECK(press(Qt::LeftButton), "Left button could not be pressed on first click"); + DRIVER_CHECK(release(Qt::LeftButton), "Left button could not be released on first click");; + GTGlobals::sleep(100); + + DRIVER_CHECK(press(Qt::LeftButton), "Left button could not be pressed on second click"); + DRIVER_CHECK(release(Qt::LeftButton), "Left button could not be released on second click"); + GTGlobals::sleep(250); + return true; +} +#endif + +QPoint GTMouseDriver::getMousePosition(){ + return QCursor::pos(); +} + +} //namespace diff --git a/src/libs_3rdparty/QSpec/src/drivers/GTMouseDriver.h b/src/libs_3rdparty/QSpec/src/drivers/GTMouseDriver.h new file mode 100644 index 0000000000000000000000000000000000000000..19606d79613d17255800b859494619c81e868cc6 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/drivers/GTMouseDriver.h @@ -0,0 +1,62 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GUI_GTMOUSEDRIVER_H_ +#define _HI_GUI_GTMOUSEDRIVER_H_ + +#include "GTGlobals.h" +#include <QtCore/QPoint> + +namespace HI { +/*! + * \brief The base class for mouse's actions imitation + */ +class HI_EXPORT GTMouseDriver { +public: + // fails if given coordinates are not in the screen's rect + // Linux: fails if there is an opening X display error + static bool moveTo(const QPoint& p); + + // fails if press or release fails + // Linux: fails if there is an opening X display error + static bool click(Qt::MouseButton = Qt::LeftButton); //all click methods work with the current position of the cursor + static bool doubleClick(); + + // fails if the given button is not Qt::LeftButton, Qt::RightButton or Qt::MiddleButton + // Linux: fails if there is an opening X display error + static bool press(Qt::MouseButton = Qt::LeftButton); + static bool release(Qt::MouseButton = Qt::LeftButton); //release method should check if this key has been already pressed. Do nothing otherwise + + static bool dragAndDrop(const QPoint& start, const QPoint& end); + static bool selectArea(const QPoint& start, const QPoint& end); + + // Linux: fails if there is an opening X display error + static bool scroll(int value); //positive values for scrolling up, negative for scrolling down + + static QPoint getMousePosition(); +private: + static QPoint mousePos; + static Qt::MouseButtons bp; +}; + +} //namespace + +#endif diff --git a/src/libs_3rdparty/QSpec/src/drivers/GTMouseDriverLinux.cpp b/src/libs_3rdparty/QSpec/src/drivers/GTMouseDriverLinux.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ccd41a7af33a260cb6cc1f86a64aa952115edc91 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/drivers/GTMouseDriverLinux.cpp @@ -0,0 +1,195 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "GTMouseDriver.h" +#include <QByteArray> + +#ifdef __linux__ + #include <X11/extensions/XTest.h> +#endif + +namespace HI { + +#ifdef __linux__ + +#define GT_CLASS_NAME "GTMouseDriver Linux" +QPoint GTMouseDriver::mousePos = QPoint(-1, -1); + +#define GT_METHOD_NAME "moveTo" +bool GTMouseDriver::moveTo(const QPoint& p) +{ + //mousePos = p; + int x = p.x(); + int y = p.y(); + QByteArray display_name = qgetenv("DISPLAY"); + DRIVER_CHECK(!display_name.isEmpty(), "Environment variable \"DISPLAY\" not found"); + + Display *display = XOpenDisplay(display_name.constData()); + DRIVER_CHECK(display != 0, "display is NULL"); + + int horres = XDisplayWidth(display, 0); + int vertres = XDisplayHeight(display, 0); + + QRect screen(0, 0, horres-1, vertres-1); + DRIVER_CHECK(screen.contains(QPoint(x, y)), "Invalid coordinates"); + + Window root, child; + int root_x, root_y, pos_x, pos_y; + unsigned mask; + XQueryPointer(display, RootWindow(display, DefaultScreen(display)), + &root, &child, &root_x, &root_y, + &pos_x, &pos_y, &mask); + + const int delay = 0;// msec + int x0 = pos_x; + int y0 = pos_y; + int x1 = x; + int y1 = y; + + if (x0 == x1) { + while(y0 != y1) { + if (y0 < y1) { + ++y0; + } else { + --y0; + } + + XTestFakeMotionEvent(display, -1, x1, y0, delay); + XFlush(display); + } + } else if (y0 == y1) { + while(x0 != x1) { + if (x0 < x1) { + ++x0; + } else { + --x0; + } + XTestFakeMotionEvent(display, -1, x0, y1, delay); + XFlush(display); + } + } else { + // moved by the shortest way + // equation of the line by two points y = (-(x0 * y1 - x1 * y0) - x*(y0 - y1)) / (x1 - x0) + int diff_x = x1 - x0; + int diff_y = y0 - y1; + int diff_xy = -(x0 * y1 - x1 * y0); + int current_x = x0, current_y; + + while (current_x != x1) { + if (x1 > x0) { + ++current_x; + } else { + -- current_x; + } + + current_y = (diff_xy - current_x * diff_y) / diff_x; + XTestFakeMotionEvent(display, -1, current_x, current_y, delay); + XFlush(display); + } + } + + XCloseDisplay(display); +#ifdef _DEBUG + GTGlobals::sleep(500); +#else + GTGlobals::sleep(100); //May be not needed +#endif + return true; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "press" +bool GTMouseDriver::press(Qt::MouseButton button) +{ + QByteArray display_name = qgetenv("DISPLAY"); + DRIVER_CHECK(!display_name.isEmpty(), "Environment variable \"DISPLAY\" not found"); + + Display *display = XOpenDisplay(display_name.constData()); + DRIVER_CHECK(display != 0, "display is NULL"); + + //1 = Left, 2 = Middle, 3 = Right + unsigned int btn = button == Qt::LeftButton ? 1 : + button == Qt::RightButton ? 3 : + button == Qt::MidButton ? 2 : 0; + DRIVER_CHECK(btn != 0, "button is 0"); + + XTestFakeButtonEvent(display, btn, True, 0); + XFlush(display); + + XCloseDisplay(display); + + return true; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "release" +bool GTMouseDriver::release(Qt::MouseButton button) +{ + // TODO: check if this key has been already pressed + QByteArray display_name = qgetenv("DISPLAY"); + DRIVER_CHECK(!display_name.isEmpty(), "Environment variable \"DISPLAY\" not found"); + + Display *display = XOpenDisplay(display_name.constData()); + DRIVER_CHECK(display != 0, "display is NULL"); + + unsigned int btn = button == Qt::LeftButton ? 1 : + button == Qt::RightButton ? 3 : + button == Qt::MidButton ? 2 : 0; + DRIVER_CHECK(btn != 0, "button is 0"); + + XTestFakeButtonEvent(display, btn, False, 0); + XFlush(display); + + XCloseDisplay(display); + + return true; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "scroll" +bool GTMouseDriver::scroll(int value) +{ + QByteArray display_name = qgetenv("DISPLAY"); + DRIVER_CHECK(!display_name.isEmpty(), "Environment variable \"DISPLAY\" not found"); + + Display *display = XOpenDisplay(display_name.constData()); + DRIVER_CHECK(display != 0, "display is NULL"); + + unsigned button = value > 0 ? Button4 : Button5; //Button4 - scroll up, Button5 - scroll down + value = value > 0 ? value : -value; + + for (int i = 0; i < value; i++) { + XTestFakeButtonEvent(display, button, True, 0); + XTestFakeButtonEvent(display, button, False, 0); + } + + XFlush(display); + XCloseDisplay(display); + + return true; +} +#undef GT_METHOD_NAME + + +#undef GT_CLASS_NAME + +#endif +} // namespace diff --git a/src/libs_3rdparty/QSpec/src/drivers/GTMouseDriverMac.cpp b/src/libs_3rdparty/QSpec/src/drivers/GTMouseDriverMac.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e40cb34a882312c378c26a51dfe5f0dbd2d2d9c2 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/drivers/GTMouseDriverMac.cpp @@ -0,0 +1,185 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "GTMouseDriver.h" + +#include <QCursor> + +#ifdef Q_OS_MAC +#include <ApplicationServices/ApplicationServices.h> +#endif + +namespace HI { + +#ifdef Q_OS_MAC +#define GT_CLASS_NAME "GTMouseDriverMac" +QPoint GTMouseDriver::mousePos = QPoint(-1, -1); +Qt::MouseButtons GTMouseDriver::bp = Qt::NoButton; + +namespace { + +bool isPointInsideScreen(const QPoint &point) { + const CGDirectDisplayID displayID = CGMainDisplayID(); + const size_t horres = CGDisplayPixelsWide(displayID); + const size_t vertres = CGDisplayPixelsHigh(displayID); + + const QRect screen(0, 0, horres, vertres); + return screen.contains(point); +} + +bool isPointInsideScreen(int x, int y) { + return isPointInsideScreen(QPoint(x, y)); +} + +#define GT_METHOD_NAME "selectAreaMac" +bool selectAreaMac(const int x, const int y) { + DRIVER_CHECK(isPointInsideScreen(x, y), "Invalid coordinates"); + + CGEventRef event = CGEventCreateMouseEvent(NULL, kCGEventLeftMouseDragged, CGPointMake(x, y), kCGMouseButtonLeft /*ignored*/); + DRIVER_CHECK(event != NULL, "Can't create event"); + + CGEventPost(kCGSessionEventTap, event); + CFRelease(event); + GTGlobals::sleep(100); + + return true; +} +#undef GT_METHOD_NAME + +} + +#define GT_METHOD_NAME "moveToP" +bool GTMouseDriver::moveTo(const QPoint& p) +{ + int x = p.x(); + int y = p.y(); + if (bp.testFlag(Qt::LeftButton)) { + return selectAreaMac(x, y); + } + + DRIVER_CHECK(isPointInsideScreen(x, y), "Invalid coordinates"); + + CGEventRef event = CGEventCreateMouseEvent(NULL, kCGEventMouseMoved, CGPointMake(x, y), kCGMouseButtonLeft /*ignored*/); + DRIVER_CHECK(event != NULL, "Can't create event"); + + CGEventPost(kCGSessionEventTap, event); + CFRelease(event); + GTGlobals::sleep(100); + + return true; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "press" +bool GTMouseDriver::press(Qt::MouseButton button) +{ + bp |= button; + QPoint mousePos = QCursor::pos(); + CGEventType eventType = button == Qt::LeftButton ? kCGEventLeftMouseDown : + button == Qt::RightButton ? kCGEventRightMouseDown: + button == Qt::MidButton ? kCGEventOtherMouseDown : kCGEventNull; + CGEventRef event = CGEventCreateMouseEvent(NULL, eventType, CGPointMake(mousePos.x(), mousePos.y()), kCGMouseButtonLeft /*ignored*/); + DRIVER_CHECK(event != NULL, "Can't create event"); + + CGEventPost(kCGSessionEventTap, event); + GTGlobals::sleep(0); // don't touch, it's Mac's magic + CFRelease(event); + + return true; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "release" +bool GTMouseDriver::release(Qt::MouseButton button) +{ + bp &= (Qt::MouseButtonMask^button); + QPoint mousePos = QCursor::pos(); + CGEventType eventType = button == Qt::LeftButton ? kCGEventLeftMouseUp : + button == Qt::RightButton ? kCGEventRightMouseUp: + button == Qt::MidButton ? kCGEventOtherMouseUp : kCGEventNull; + CGEventRef event = CGEventCreateMouseEvent(NULL, eventType, CGPointMake(mousePos.x(), mousePos.y()), kCGMouseButtonLeft /*ignored*/); + DRIVER_CHECK(event != NULL, "Can't create event"); + + CGEventPost(kCGSessionEventTap, event); + GTGlobals::sleep(0); // don't touch, it's Mac's magic + CFRelease(event); + + return true; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "doubleClick" +bool GTMouseDriver::doubleClick() { + + QPoint mousePos = QCursor::pos(); + CGEventType eventTypeMouseDown = kCGEventLeftMouseDown ; + CGEventRef eventPress = CGEventCreateMouseEvent(NULL, eventTypeMouseDown, CGPointMake(mousePos.x(), mousePos.y()), kCGMouseButtonLeft /*ignored*/); + DRIVER_CHECK(eventPress != NULL, "Can't create event"); + + CGEventType eventTypeMouseUp = kCGEventLeftMouseUp ; + CGEventRef eventRelease = CGEventCreateMouseEvent(NULL, eventTypeMouseUp, CGPointMake(mousePos.x(), mousePos.y()), kCGMouseButtonLeft /*ignored*/); + DRIVER_CHECK(eventRelease != NULL, "Can't create event"); + + CGEventPost(kCGSessionEventTap, eventPress); + GTGlobals::sleep(0); // don't touch, it's Mac's magic + CGEventPost(kCGSessionEventTap, eventRelease); + GTGlobals::sleep(0); + + CGEventSetDoubleValueField(eventPress, kCGMouseEventClickState, 2); + CGEventSetDoubleValueField(eventRelease, kCGMouseEventClickState, 2); + + CGEventPost(kCGSessionEventTap, eventPress); + GTGlobals::sleep(0); // don't touch, it's Mac's magic + CGEventPost(kCGSessionEventTap, eventRelease); + GTGlobals::sleep(0); + + GTGlobals::sleep(100); + + CFRelease(eventPress); + CFRelease(eventRelease); + + return true; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "scroll" +bool GTMouseDriver::scroll(int value) +{ + CGEventRef event = CGEventCreateScrollWheelEvent(NULL, kCGScrollEventUnitPixel, 1, value > 0 ? 10 : -10); + DRIVER_CHECK(event != NULL, "Can't create event"); + // Scrolling movement is generally represented by small signed integer values, typically in a range from -10 to +10. + // Large values may have unexpected results, depending on the application that processes the event. + value = value > 0 ? value : -value; + for (int i = 0; i < value; i += 10) { + CGEventPost(kCGSessionEventTap, event); + GTGlobals::sleep(0); // don't touch, it's Mac's magic + } + + CFRelease(event); + + return true; +} +#undef GT_METHOD_NAME +#undef GT_CLASS_NAME + +#endif // Q_OS_MAC +} //namespace + diff --git a/src/libs_3rdparty/QSpec/src/drivers/GTMouseDriverWindows.cpp b/src/libs_3rdparty/QSpec/src/drivers/GTMouseDriverWindows.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9f70ff9271621f8604665d5048120960cd3802b7 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/drivers/GTMouseDriverWindows.cpp @@ -0,0 +1,191 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "GTMouseDriver.h" + +#ifdef _WIN32 + #include <windows.h> +#endif + +namespace HI { + +#ifdef _WIN32 + +#define GT_CLASS_NAME "GTMouseDriver Windows" +QPoint GTMouseDriver::mousePos = QPoint(-1, -1); + +#define GT_METHOD_NAME "moveToP" +bool GTMouseDriver::moveTo(const QPoint& p) +{ + int x = p.x(); + int y = p.y(); + // get screen resolution + HDC hDCScreen = GetDC(NULL); + int horres = GetDeviceCaps(hDCScreen, HORZRES); + int vertres = GetDeviceCaps(hDCScreen, VERTRES); + ReleaseDC(NULL, hDCScreen); + + QRect screen(0, 0, horres-1, vertres-1); + DRIVER_CHECK(screen.contains(QPoint(x, y)), "Invalid coordinates"); + + const int points_in_line = 65535; + const double points_in_x_pixel = points_in_line / static_cast<double>(horres); + const double points_in_y_pixel = points_in_line / static_cast<double>(vertres); + + POINT pos; + GetCursorPos(&pos); + + int x0 = pos.x; + int y0 = pos.y; + int x1 = x; + int y1 = y; + + INPUT event; + event.type = INPUT_MOUSE; + event.mi.dx = 0; + event.mi.dy = 0; + event.mi.mouseData = 0; + event.mi.dwFlags = MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE; + event.mi.time = 0; + event.mi.dwExtraInfo = 0; + + if (x0 == x1) { + event.mi.dx = x0 * points_in_x_pixel + 0.5; + while(y0 != y1) { + if (y0 < y1) { + ++y0; + } else { + --y0; + } + event.mi.dy = y0 * points_in_y_pixel + 0.5; + SendInput(1, &event, sizeof(event)); + } + } else if (y0 == y1) { + event.mi.dy = y0 * points_in_y_pixel + 0.5; + while(x0 != x1) { + if (x0 < x1) { + ++x0; + } else { + --x0; + } + event.mi.dx = x0 * points_in_x_pixel + 0.5; + SendInput(1, &event, sizeof(event)); + } + } else { + // moved by the shortest way + // equation of the line by two points y = (-(x0 * y1 - x1 * y0) - x*(y0 - y1)) / (x1 - x0) + int diff_x = x1 - x0; + int diff_y = y0 - y1; + int diff_xy = -(x0 * y1 - x1 * y0); + int current_x = x0, current_y; + + while (current_x != x1) { + if (x1 > x0) { + ++current_x; + } else { + -- current_x; + } + + current_y = (diff_xy - current_x * diff_y) / diff_x; + event.mi.dy = current_y * points_in_y_pixel + 0.5; + event.mi.dx = current_x * points_in_x_pixel + 0.5; + SendInput(1, &event, sizeof(event)); + } + } + +#ifdef _DEBUG + GTGlobals::sleep(500); +#else + GTGlobals::sleep(100); //May be not needed +#endif + + return true; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "press" +bool GTMouseDriver::press(Qt::MouseButton button) +{ + unsigned int btn = button == Qt::LeftButton ? MOUSEEVENTF_LEFTDOWN : + button == Qt::RightButton ? MOUSEEVENTF_RIGHTDOWN : + button == Qt::MidButton ? MOUSEEVENTF_MIDDLEDOWN : 0; + DRIVER_CHECK(btn != 0, "button is 0"); + + INPUT event; + event.type = INPUT_MOUSE; + event.mi.dx = 0; + event.mi.dy = 0; + event.mi.mouseData = 0; + event.mi.dwFlags = btn; + event.mi.time = 0; + event.mi.dwExtraInfo = 0; + + SendInput(1, &event, sizeof(event)); + + return true; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "release" +bool GTMouseDriver::release(Qt::MouseButton button) +{ + // TODO: check if this key has been already pressed + //unsigned int buttons[3] = {MOUSEEVENTF_LEFTUP, MOUSEEVENTF_RIGHTUP, MOUSEEVENTF_MIDDLEUP}; + unsigned int btn = button == Qt::LeftButton ? MOUSEEVENTF_LEFTUP : + button == Qt::RightButton ? MOUSEEVENTF_RIGHTUP : + button == Qt::MidButton ? MOUSEEVENTF_MIDDLEUP : 0; + DRIVER_CHECK(btn != 0, "button is 0"); + + INPUT event; + event.type = INPUT_MOUSE; + event.mi.dx = 0; + event.mi.dy = 0; + event.mi.mouseData = 0; + event.mi.dwFlags = btn; + event.mi.time = 0; + event.mi.dwExtraInfo = 0; + + SendInput(1, &event, sizeof(event)); + + return true; +} +#undef GT_METHOD_NAME + +bool GTMouseDriver::scroll(int value) +{ + INPUT event; + event.type = INPUT_MOUSE; + event.mi.dx = 0; + event.mi.dy = 0; + event.mi.mouseData = value * WHEEL_DELTA; + event.mi.dwFlags = MOUSEEVENTF_WHEEL; + event.mi.time = 0; + event.mi.dwExtraInfo = 0; + + SendInput(1, &event, sizeof(event)); + + return true; +} + +#undef GT_CLASS_NAME + +#endif +} // namespace diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTAction.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTAction.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bf4fae17b5cfb51740ba6bac385a8caad7239a30 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTAction.cpp @@ -0,0 +1,142 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "primitives/GTAction.h" +#include "primitives/GTMainWindow.h" + +#include <QAbstractButton> +#include <QApplication> +#include <QMainWindow> +#include <QToolButton> +#include <QWidget> + +namespace HI { + +#define GT_CLASS_NAME "GTAction" + +#define GT_METHOD_NAME "button" +QAbstractButton* GTAction::button(GUITestOpStatus &os, const QString &actionName, QObject *parent, const GTGlobals::FindOptions& options) { + + QAction* a = findAction(os, actionName, parent); + if (!a) { + a = findAction(os, actionName, parent, GTGlobals::FindOptions(false)); + } + if (options.failIfNotFound) { + GT_CHECK_RESULT(NULL != a, "Action " + actionName + " is NULL!", NULL); + } else if (NULL == a) { + return NULL; + } + + QList<QWidget*> associated = a->associatedWidgets(); + foreach(QWidget* w, associated) { + QAbstractButton *tb = qobject_cast<QAbstractButton*>(w); + if (tb) { + return tb; + } + } + + return NULL; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "button" +QAbstractButton* GTAction::button(GUITestOpStatus &os, const QAction* a, QObject *parent) { + + GT_CHECK_RESULT(a != NULL, "action is NULL", NULL); + + QList<QWidget*> associated = a->associatedWidgets(); + foreach(QWidget* w, associated) { + QAbstractButton *tb = qobject_cast<QAbstractButton*>(w); + if (tb) { + if (parent) { + QList<QToolButton*> childButtons = parent->findChildren<QToolButton*>(); // da. daa. + if (childButtons.contains(dynamic_cast<QToolButton*>(tb))) { + return tb; + } + } + else { + return tb; + } + } + } + + return NULL; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "findAction" +QAction* GTAction::findAction(GUITestOpStatus &os, const QString &actionName, QObject *parent, const GTGlobals::FindOptions& options) { + + if (parent == NULL) { // If parent null, then searching for at QMainWindows + QList<QAction*> list; + foreach(QWidget* parent, GTMainWindow::getMainWindowsAsWidget(os)){ + if(parent->findChild<QAction*>(actionName) != NULL){ + list.append(parent->findChild<QAction*>(actionName)); + } + } + GT_CHECK_RESULT(list.count()<2, QString("There are %1 actions with this text").arg(list.count()), NULL); + if(options.failIfNotFound){ + GT_CHECK_RESULT(list.count()!=0,"action not found", NULL); + return list.takeFirst(); + } + return NULL; + } + QAction* a = parent->findChild<QAction*>(actionName); + + return a; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "findActionByText" +QAction* GTAction::findActionByText(GUITestOpStatus &os, const QString &text, QWidget *parent) { + + if (parent == NULL) { // If parent null, then searching for at QMainWindows + QList<QAction*> resultList; + foreach(QWidget* parent, GTMainWindow::getMainWindowsAsWidget(os)){ + QList<QAction*> list = parent->findChildren<QAction*>(); + foreach(QAction* act, list){ + if(act->text() == text){ + resultList<<act; + } + } + } + GT_CHECK_RESULT(resultList.count()!=0,"action not found", NULL); + GT_CHECK_RESULT(resultList.count()<2, QString("There are %1 actions with this text").arg(resultList.count()), NULL); + return resultList.takeFirst(); + } + QList<QAction*> list = parent->findChildren<QAction*>(); + QList<QAction*> resultList; + foreach(QAction* act, list){ + if(act->text() == text){ + resultList<<act; + } + } + + GT_CHECK_RESULT(resultList.count()!=0,"action not found", NULL); + GT_CHECK_RESULT(resultList.count()<2, QString("There are %1 actions with this text").arg(resultList.count()), NULL); + + return resultList.takeFirst(); +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +} //namespace diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTAction.h b/src/libs_3rdparty/QSpec/src/primitives/GTAction.h new file mode 100644 index 0000000000000000000000000000000000000000..083e9e51e0c1fe17790d409a88942335c9b714c4 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTAction.h @@ -0,0 +1,45 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GUI_GTACTION_H_ +#define _HI_GUI_GTACTION_H_ + +#include "GTGlobals.h" +#include <QAction> + +class QAbstractButton; +namespace HI { + +class HI_EXPORT GTAction { +public: + // returns first QAbstractButton associated with an action with a given name + static QAbstractButton* button(GUITestOpStatus &os, const QString &actionName, QObject *parent = NULL, const GTGlobals::FindOptions& = GTGlobals::FindOptions()); + + static QAbstractButton* button(GUITestOpStatus &os, const QAction* a, QObject *parent = NULL); + + static QAction* findAction(GUITestOpStatus &os, const QString &actionName, QObject *parent = NULL, const GTGlobals::FindOptions& options = GTGlobals::FindOptions()); + + static QAction* findActionByText(GUITestOpStatus &os, const QString &text, QWidget *parent = NULL); +}; + +} //namespace + +#endif diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTCheckBox.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTCheckBox.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b1f7100ec5ac5d1699880321090f000e65c1c640 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTCheckBox.cpp @@ -0,0 +1,91 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "primitives/GTCheckBox.h" +#include "primitives/GTWidget.h" + +namespace HI { + +#define GT_CLASS_NAME "GTCheckBox" + +#define GT_METHOD_NAME "setChecked" +void GTCheckBox::setChecked(GUITestOpStatus& os, QCheckBox *checkBox, bool checked) { + GT_CHECK(checkBox != NULL, "QCheckBox == NULL"); + if(checkBox->isChecked() == checked){ + return; + } + GT_CHECK(checkBox->isEnabled(), "QcheckBox is disabled"); + + bool checkBoxState = checkBox->isChecked(); + if (checked != checkBoxState) { + QPoint p = QPoint(5, checkBox->rect().height()/2); + GTWidget::click(os, checkBox, Qt::LeftButton, p); + } + GTGlobals::sleep(500); + + GT_CHECK(checked == checkBox->isChecked(), "Can't set checked state"); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setChecked" +void GTCheckBox::setChecked(GUITestOpStatus& os, const QString &checkBoxName, bool checked, QWidget const * const parent) { + GTCheckBox::setChecked(os, GTWidget::findExactWidget<QCheckBox *>(os, checkBoxName, parent), checked); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setChecked" +void GTCheckBox::setChecked(GUITestOpStatus& os, const QString &checkBoxName, QWidget const * const parent) { + GTCheckBox::setChecked(os, GTWidget::findExactWidget<QCheckBox *>(os, checkBoxName, parent)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getState" +bool GTCheckBox::getState(GUITestOpStatus &os, QCheckBox const * const checkBox) { + Q_UNUSED(os); + GT_CHECK_RESULT(checkBox != NULL, "QCheckBox == NULL", false); + return checkBox->isChecked(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getState" +bool GTCheckBox::getState(GUITestOpStatus &os, const QString &checkBoxName, QWidget * const parent) { + return getState(os, GTWidget::findExactWidget<QCheckBox *>(os, checkBoxName, parent)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkState" +void GTCheckBox::checkState(GUITestOpStatus &os, QCheckBox const * const checkBox, const bool expectedState) { + Q_UNUSED(os); + GT_CHECK(checkBox != NULL, "QCheckBox == NULL"); + const bool actualState = checkBox->isChecked(); + GT_CHECK(expectedState == actualState, QString("Incorrect checkbox state: expected '%1', got '%2'").arg(expectedState).arg(actualState)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkState" +void GTCheckBox::checkState(GUITestOpStatus &os, const QString &checkBoxName, bool expectedState, QWidget const * const parent) { + checkState(os, GTWidget::findExactWidget<QCheckBox *>(os, checkBoxName, parent), expectedState); +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +} diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTCheckBox.h b/src/libs_3rdparty/QSpec/src/primitives/GTCheckBox.h new file mode 100644 index 0000000000000000000000000000000000000000..defca360ee47c4cf3506341c1ddc8384c1b0f959 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTCheckBox.h @@ -0,0 +1,46 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GT_CHECKBOX_H_ +#define _HI_GT_CHECKBOX_H_ + +#include "GTGlobals.h" +#include <QCheckBox> + +namespace HI { +/*! + * \brief The class for working with QCheckBox primitive + */ +class HI_EXPORT GTCheckBox { +public: + static void setChecked(GUITestOpStatus &os, QCheckBox *checkBox, bool checked = true); + static void setChecked(GUITestOpStatus &os, const QString &checkBoxName, bool checked = true, QWidget const * const parent = NULL); + static void setChecked(GUITestOpStatus &os, const QString &checkBoxName, QWidget const * const parent = NULL); + + static bool getState(GUITestOpStatus &os, QCheckBox const * const checkBox); + static bool getState(GUITestOpStatus &os, const QString &checkBoxName, QWidget * const parent = NULL); + + static void checkState(GUITestOpStatus &os, QCheckBox const * const checkBox, const bool expectedState); + static void checkState(GUITestOpStatus &os, const QString &checkBoxName, bool expectedState, QWidget const * const parent = NULL); +}; + +} +#endif diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTComboBox.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTComboBox.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5c342e5b9a6076c76a60658a41764139af43811a --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTComboBox.cpp @@ -0,0 +1,257 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "drivers/GTKeyboardDriver.h" +#include "drivers/GTMouseDriver.h" +#include "primitives/GTComboBox.h" +#include "primitives/GTWidget.h" + +#include <utils/GTThread.h> + +#include <QListView> +#include <QStandardItemModel> + +namespace HI { + +#define GT_CLASS_NAME "GTComboBox" + +#define GT_METHOD_NAME "setCurrentIndex" +void GTComboBox::setCurrentIndex(GUITestOpStatus& os, QComboBox *comboBox, int index, bool checkVal, GTGlobals::UseMethod method) { + + GT_CHECK(comboBox != NULL, "QComboBox* == NULL"); + + if(comboBox->currentIndex() == index){ + return; + } + + int comboCount = comboBox->count(); + GT_CHECK(index>=0 && index<comboCount, "invalid index"); + + if(comboBox->isEditable()){ + QPoint p = QPoint(comboBox->rect().width() - 10, 10); + GTWidget::click(os, comboBox, Qt::LeftButton, p); + }else{ + GTWidget::setFocus(os, comboBox); + } + GTGlobals::sleep(); + + switch (method){ + case GTGlobals::UseKey:{ + int currIndex = comboBox->currentIndex() == -1 ? 0 : comboBox->currentIndex(); + Qt::Key directionKey = index > currIndex ? Qt::Key_Down : Qt::Key_Up; + + int pressCount = qAbs(index-currIndex); + for (int i=0; i<pressCount; i++) { + GTKeyboardDriver::keyClick( directionKey); + GTGlobals::sleep(100); + } + GTKeyboardDriver::keyClick( Qt::Key_Enter); + + GTThread::waitForMainThread(); + GTGlobals::sleep(500); + + if(checkVal){ + currIndex = comboBox->currentIndex(); + GT_CHECK(currIndex == index, "Can't set index"); + } + break; + } + case GTGlobals::UseMouse:{ + QListView* view = comboBox->findChild<QListView*>(); + GT_CHECK(view != NULL, "list view not found"); + QModelIndex modelIndex = view->model()->index(index,0); + GT_CHECK(modelIndex.isValid(), "invalid model index"); + view->scrollTo(modelIndex); + GTGlobals::sleep(500); + qDebug("GT_DEBUG_MESSAGE moving to list item"); + GTMouseDriver::moveTo(view->viewport()->mapToGlobal(view->visualRect(modelIndex).center())); + GTMouseDriver::click(); + GTGlobals::sleep(500); + break; + } + default: + GT_CHECK(false, "Unexpected method"); + break; + } + +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setCurrentText" +void GTComboBox::setCurrentTextWithKeyboard(GUITestOpStatus& os, QComboBox* comboBox, const QString& text, bool checkVal) { + + GT_CHECK(comboBox != NULL, "QComboBox* == NULL"); + + if (comboBox->currentText() == text) { + return; + } + + int index = comboBox->findText(text, Qt::MatchExactly); + GT_CHECK(index != -1, "Text " + text + " was not found"); + + if (comboBox->isEditable()) { + QPoint p = QPoint(comboBox->rect().width() - 10, 10); + GTWidget::click(os, comboBox, Qt::LeftButton, p); + } else { + GTWidget::setFocus(os, comboBox); + } + GTGlobals::sleep(); + + for (auto c : text) { + GTKeyboardDriver::keyClick(c.toLatin1()); + GTGlobals::sleep(200); + } + + GTKeyboardDriver::keyClick(Qt::Key_Enter); + + GTThread::waitForMainThread(); + GTGlobals::sleep(500); + + if (checkVal) { + QString currentText = comboBox->currentText(); + GT_CHECK(currentText == text, "Can't set text"); + } + +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setIndexWithText" +void GTComboBox::setIndexWithText(GUITestOpStatus& os, QComboBox * const comboBox, const QString& text, bool checkVal, GTGlobals::UseMethod method) { + GT_CHECK(comboBox != NULL, "QComboBox* == NULL"); + + int index = comboBox->findText(text, Qt::MatchExactly); + GT_CHECK(index != -1, "Text " + text + " was not found"); + + switch (method) { + case GTGlobals::UseKeyBoard: + setCurrentTextWithKeyboard(os, comboBox, text, checkVal); + break; + default: + setCurrentIndex(os, comboBox, index, checkVal, method); + break; + } + + if(checkVal){ + QString currentText = comboBox->currentText(); + GT_CHECK(currentText == text, "Can't set text"); + } +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setIndexWithText" +void GTComboBox::setIndexWithText(GUITestOpStatus &os, const QString &comboBoxName, QWidget const * const parent, const QString &text, bool checkVal, GTGlobals::UseMethod method) { + setIndexWithText(os, GTWidget::findExactWidget<QComboBox *>(os, comboBoxName, parent), text, checkVal, method); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getCurrentText" +QString GTComboBox::getCurrentText(GUITestOpStatus &os, QComboBox * const comboBox) { + Q_UNUSED(os); + GT_CHECK_RESULT(comboBox != NULL, "comboBox is NULL", ""); + return comboBox->currentText(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getCurrentText" +QString GTComboBox::getCurrentText(GUITestOpStatus &os, const QString &comboBoxName, const QWidget * const parent) { + return getCurrentText(os, GTWidget::findExactWidget<QComboBox *>(os, comboBoxName, parent)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getValues" +QStringList GTComboBox::getValues(GUITestOpStatus &os, QComboBox *comboBox) { + QStringList result; + GT_CHECK_RESULT(NULL != comboBox, "Combobox is NULL", result); + for (int i = 0; i < comboBox->count(); i++) { + result << comboBox->itemText(i); + } + return result; +} + +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkValues" +void GTComboBox::checkValues(GUITestOpStatus& os, QComboBox *comboBox, const QStringList &values) { + GT_CHECK(NULL != comboBox, "comboBox is NULL"); + + GTWidget::setFocus(os, comboBox); + GTGlobals::sleep(); + + QListView *view = comboBox->findChild<QListView*>(); + GT_CHECK(NULL != view, "list view is not found"); + QStandardItemModel *model = dynamic_cast<QStandardItemModel*>(view->model()); + GT_CHECK(NULL != model, "model is not found"); + QList<QStandardItem *> items = model->findItems("",Qt::MatchContains); + + foreach (QStandardItem *item, items) { + if (values.contains(item->data().toString())){ + if(item->checkState() != Qt::Checked){ + QModelIndex modelIndex = item->index(); + view->scrollTo(modelIndex); + GTGlobals::sleep(500); + QRect itemRect = view->visualRect(modelIndex); + QPoint checkPoint(itemRect.left() + 10, itemRect.center().y()); + GTMouseDriver::moveTo(view->viewport()->mapToGlobal(checkPoint)); + GTMouseDriver::click(); + GTGlobals::sleep(500); + GT_CHECK(item->checkState() == Qt::Checked, "Item is not checked: " + item->data().toString()); + } + }else{ + if(item->checkState() == Qt::Checked){ + QModelIndex modelIndex = item->index(); + view->scrollTo(modelIndex); + GTGlobals::sleep(500); + QRect itemRect = view->visualRect(modelIndex); + QPoint checkPoint(itemRect.left() + 10, itemRect.center().y()); + GTMouseDriver::moveTo(view->viewport()->mapToGlobal(checkPoint)); + GTMouseDriver::click(); + GTGlobals::sleep(500); + GT_CHECK(item->checkState() != Qt::Checked, "Item is checked: " + item->data().toString()); + } + } + } +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkValuesPresence" +void GTComboBox::checkValuesPresence(GUITestOpStatus &os, QComboBox *comboBox, const QStringList &values){ + Q_UNUSED(os) + GT_CHECK(NULL != comboBox, "ComboBox is NULL"); + + foreach (const QString &s, values) { + int index = comboBox->findText(s); + GT_CHECK(index != -1, "text not found " + s); + } +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkCurrentValue" +void GTComboBox::checkCurrentValue(GUITestOpStatus &os, QComboBox *comboBox, const QString &expectedValue) { + Q_UNUSED(os); + GT_CHECK(NULL != comboBox, "ComboBox is NULL"); + GT_CHECK(expectedValue == comboBox->currentText(), QString("An unexpected value: expect '%1', got '%2'") + .arg(expectedValue).arg(comboBox->currentText())); +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +} diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTComboBox.h b/src/libs_3rdparty/QSpec/src/primitives/GTComboBox.h new file mode 100644 index 0000000000000000000000000000000000000000..f4decf034c2c3c5c793248f683fdf14833622d7a --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTComboBox.h @@ -0,0 +1,55 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GT_COMBOBOX_H_ +#define _HI_GT_COMBOBOX_H_ + +#include "GTGlobals.h" +#include <QComboBox> + +namespace HI { +/*! + * \brief The class for working with QComboBox primitive + */ +class HI_EXPORT GTComboBox { +public: + // fails if the comboBox is NULL, index is not in a comboBox range + // or a comboBox's index differs from a given index in the end of method's execution + static void setCurrentIndex(GUITestOpStatus& os, QComboBox *comboBox, int index, bool checkVal = true, GTGlobals::UseMethod method = GTGlobals::UseKey); + static void setCurrentTextWithKeyboard(GUITestOpStatus& os, QComboBox* comboBox, const QString& text, bool checkVal = true); + + // Fails if the comboBox is NULL, combobox doesn't contain an item with text + // or a comboBox current item's text differs from a given text in the end of method's execution + static void setIndexWithText(GUITestOpStatus& os, QComboBox * const comboBox, const QString& text, bool checkVal = true, GTGlobals::UseMethod method = GTGlobals::UseKey); + static void setIndexWithText(GUITestOpStatus& os, const QString &comboBoxName, const QWidget * const parent, const QString &text, bool checkVal = true, GTGlobals::UseMethod method = GTGlobals::UseKey); + + static QString getCurrentText(GUITestOpStatus& os, QComboBox * const comboBox); + static QString getCurrentText(GUITestOpStatus& os, const QString &comboBoxName, const QWidget * const parent = NULL); + + static QStringList getValues(GUITestOpStatus &os, QComboBox *comboBox); + static void checkValues(GUITestOpStatus& os, QComboBox *comboBox, const QStringList &values); + + static void checkValuesPresence(GUITestOpStatus& os, QComboBox *comboBox, const QStringList &values); + static void checkCurrentValue(GUITestOpStatus &os, QComboBox *comboBox, const QString &expectedValue); +}; + +} +#endif diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTDoubleSpinBox.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTDoubleSpinBox.cpp new file mode 100644 index 0000000000000000000000000000000000000000..344123c73ad60627a1b1a4ebe35138fe68fcd51b --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTDoubleSpinBox.cpp @@ -0,0 +1,141 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "drivers/GTKeyboardDriver.h" +#include "drivers/GTMouseDriver.h" +#include "primitives/GTDoubleSpinBox.h" +#include "primitives/GTWidget.h" + +#include <utils/GTThread.h> + +namespace HI { + +#define GT_CLASS_NAME "GTDoubleSpinBox" + +#define GT_METHOD_NAME "getValue" +int GTDoubleSpinbox::getValue(GUITestOpStatus &os, QDoubleSpinBox *spinBox) { + Q_UNUSED(os); + GT_CHECK_RESULT(spinBox != NULL, "spinBox is NULL", -1); + return spinBox->value(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getValue" +int GTDoubleSpinbox::getValue(GUITestOpStatus &os, const QString &spinBoxName, QWidget *parent) { + return GTDoubleSpinbox::getValue(os, GTWidget::findExactWidget<QDoubleSpinBox *>(os, spinBoxName, parent)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setValue" +void GTDoubleSpinbox::setValue(GUITestOpStatus& os, QDoubleSpinBox *spinBox, double v, GTGlobals::UseMethod useMethod) { + GT_CHECK(spinBox != NULL, "spinBox is NULL"); + if(spinBox->value() == v){ + return; + } + + QPoint arrowPos; + QRect spinBoxRect; + + GT_CHECK(spinBox->isEnabled(), "SpinBox is not enabled"); + + if (spinBox->value() != v) { + switch(useMethod) { + case GTGlobals::UseMouse: + spinBoxRect = spinBox->rect(); + if (v > spinBox->value()) { + arrowPos = QPoint(spinBoxRect.right() - 5, spinBoxRect.height() / 4); // -5 it's needed that area under cursor was clickable + } else { + arrowPos = QPoint(spinBoxRect.right() - 5, spinBoxRect.height() * 3 / 4); + } + + GTMouseDriver::moveTo(spinBox->mapToGlobal(arrowPos)); + while (QString().setNum(spinBox->value()) != QString().setNum(v)) { + GTMouseDriver::click(); + GTGlobals::sleep(100); + } + break; + + case GTGlobals::UseKey: { + Qt::Key key; + if (v > spinBox->value()) { + key = Qt::Key_Up; + } else { + key = Qt::Key_Down; + } + + GTWidget::setFocus(os, spinBox); + while (QString().setNum(spinBox->value()) != QString().setNum(v)) { + GTKeyboardDriver::keyClick( key); + GTGlobals::sleep(100); + } + break; + } + case GTGlobals::UseKeyBoard: + QString s = QString::number(v); + GTWidget::setFocus(os, spinBox); + + GTGlobals::sleep(100); + GTKeyboardDriver::keyClick( Qt::Key_Up); + GTGlobals::sleep(100); + GTKeyboardDriver::keyClick( Qt::Key_Down); + GTKeyboardDriver::keySequence(s); + GTGlobals::sleep(100); + + } + } + + GTThread::waitForMainThread(); + double currIndex = spinBox->value(); + GT_CHECK(QString().setNum(currIndex) == QString().setNum(v), "Expected: " + QString().setNum(v) + " Found: " + QString().setNum(currIndex)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setValue" +void GTDoubleSpinbox::setValue(GUITestOpStatus &os, const QString &spinBoxName, int v, GTGlobals::UseMethod useMethod, QWidget *parent) { + GTDoubleSpinbox::setValue(os, GTWidget::findExactWidget<QDoubleSpinBox *>(os, spinBoxName, parent), v, useMethod); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setValue" +void GTDoubleSpinbox::setValue(GUITestOpStatus &os, const QString &spinBoxName, int v, QWidget *parent) { + GTDoubleSpinbox::setValue(os, GTWidget::findExactWidget<QDoubleSpinBox *>(os, spinBoxName, parent), v); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkLimits" +void GTDoubleSpinbox::checkLimits(GUITestOpStatus &os, QDoubleSpinBox *spinBox, double min, double max){ + GT_CHECK(spinBox != NULL, "spinbox is NULL"); + int actualMin = spinBox->minimum(); + int actualMax = spinBox->maximum(); + GT_CHECK(actualMin == min, QString("wrong minimum. Expected: %1, actual: 2").arg(min).arg(actualMin)); + GT_CHECK(actualMax == max, QString("wrong maximum. Expected: %1, actual: 2").arg(max).arg(actualMax)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkLimits" +void GTDoubleSpinbox::checkLimits(GUITestOpStatus &os, const QString &spinBoxName, int min, int max, QWidget *parent){ + GTDoubleSpinbox::checkLimits(os, GTWidget::findExactWidget<QDoubleSpinBox *>(os, spinBoxName, parent), min, max); +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +} diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTDoubleSpinBox.h b/src/libs_3rdparty/QSpec/src/primitives/GTDoubleSpinBox.h new file mode 100644 index 0000000000000000000000000000000000000000..aa43ad08f3efcd79deb4c93b49a7e1b383c2e54c --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTDoubleSpinBox.h @@ -0,0 +1,27 @@ +#ifndef _HI_GT_DOUBLE_SPINBOX_H +#define _HI_GT_DOUBLE_SPINBOX_H + +#include "primitives/GTSpinBox.h" +#include "GTGlobals.h" + +#include <QDoubleSpinBox> + +namespace HI { +/*! + * \brief The class for working with QDoubleSpinBox primitive + */ +class HI_EXPORT GTDoubleSpinbox +{ +public: + static int getValue(GUITestOpStatus &os, QDoubleSpinBox *spinBox); + static int getValue(GUITestOpStatus &os, const QString &spinBoxName, QWidget *parent = NULL); + + static void setValue(GUITestOpStatus& os, QDoubleSpinBox *spinBox, double v, GTGlobals::UseMethod useMethod = GTGlobals::UseMouse); + static void setValue(GUITestOpStatus &os, const QString &spinBoxName, int v, GTGlobals::UseMethod useMethod = GTGlobals::UseMouse, QWidget *parent = NULL); + static void setValue(GUITestOpStatus &os, const QString &spinBoxName, int v, QWidget *parent = NULL); + + static void checkLimits(GUITestOpStatus &os, QDoubleSpinBox *spinBox, double min, double max); + static void checkLimits(GUITestOpStatus &os, const QString &spinBoxName, int min, int max, QWidget *parent = NULL); +}; +} +#endif // GTDOUBLESPINBOX_H diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTGroupBox.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTGroupBox.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1381730834325929b4e559bd8c20c3521c0652cd --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTGroupBox.cpp @@ -0,0 +1,101 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + + +#include "primitives/GTGroupBox.h" +#include "primitives/GTWidget.h" + +#include <QStyle> +#include <QStyleOption> + +namespace HI { + +#define GT_CLASS_NAME "GTGroupBox" + +#define GT_METHOD_NAME "getChecked" +bool GTGroupBox::getChecked(GUITestOpStatus &os, QGroupBox *groupBox) { + GT_CHECK_RESULT(groupBox != NULL, "QGroupBox is NULL", false); + GT_CHECK_RESULT(groupBox->isEnabled(), "QGroupBox is disabled", false); + + return groupBox->isChecked(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getChecked" +bool GTGroupBox::getChecked(GUITestOpStatus& os, const QString &groupBoxName, QWidget *parent) { + return GTGroupBox::getChecked(os, GTWidget::findExactWidget<QGroupBox *>(os, groupBoxName, parent)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setChecked" +void GTGroupBox::setChecked(GUITestOpStatus &os, QGroupBox *groupBox, bool checked) { + GT_CHECK(groupBox != NULL, "QGroupBox is NULL"); + + if (groupBox->isChecked() == checked) { + return; + } + + GT_CHECK(groupBox->isEnabled(), "QGroupBox is disabled"); + + QStyleOptionGroupBox options; + options.initFrom(groupBox); + if (groupBox->isFlat()) { + options.features |= QStyleOptionFrame::Flat; + } + options.lineWidth = 1; + options.midLineWidth = 0; + options.text = groupBox->title(); + options.textAlignment = groupBox->alignment(); + options.subControls = (QStyle::SC_GroupBoxFrame | QStyle::SC_GroupBoxCheckBox); + if (!groupBox->title().isEmpty()) { + options.subControls |= QStyle::SC_GroupBoxLabel; + } + options.state |= (groupBox->isChecked() ? QStyle::State_On : QStyle::State_Off); + + const QRect checkboxRect = groupBox->style()->subControlRect(QStyle::CC_GroupBox, &options, QStyle::SC_GroupBoxCheckBox); + + GTWidget::click(os, groupBox, Qt::LeftButton, checkboxRect.center()); + GTGlobals::sleep(200); + + GT_CHECK(checked == groupBox->isChecked(), "Can't set a new state"); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setChecked" +void GTGroupBox::setChecked(GUITestOpStatus& os, const QString &groupBoxName, bool checked, QWidget *parent) { + GTGroupBox::setChecked(os, GTWidget::findExactWidget<QGroupBox *>(os, groupBoxName, parent), checked); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setChecked" +void GTGroupBox::setChecked(GUITestOpStatus& os, const QString &groupBoxName, QWidget *parent) { + GTGroupBox::setChecked(os, GTWidget::findExactWidget<QGroupBox *>(os, groupBoxName, parent)); +} +#undef GT_METHOD_NAME + +QRect GTGroupBox::getCheckBoxRect(QGroupBox *groupBox) { + QStyleOptionGroupBox options; + return groupBox->style()->subControlRect(QStyle::CC_GroupBox, &options, QStyle::SC_GroupBoxCheckBox); +} + +#undef GT_CLASS_NAME + +} // namespace diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTGroupBox.h b/src/libs_3rdparty/QSpec/src/primitives/GTGroupBox.h new file mode 100644 index 0000000000000000000000000000000000000000..65458af3859aef7052d33c4e8391224e13d51c45 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTGroupBox.h @@ -0,0 +1,47 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GT_GROUP_BOX_H_ +#define _HI_GT_GROUP_BOX_H_ + +#include "GTGlobals.h" +#include <QGroupBox> + +namespace HI { +/*! + * \brief The class for working with QGroupBox primitive + */ +class HI_EXPORT GTGroupBox { +public: + static bool getChecked(GUITestOpStatus &os, QGroupBox *groupBox); + static bool getChecked(GUITestOpStatus& os, const QString &groupBoxName, QWidget *parent = NULL); + + static void setChecked(GUITestOpStatus &os, QGroupBox *groupBox, bool checked = true); + static void setChecked(GUITestOpStatus& os, const QString &groupBoxName, bool checked = true, QWidget *parent = NULL); + static void setChecked(GUITestOpStatus& os, const QString &groupBoxName, QWidget *parent = NULL); + +private: + static QRect getCheckBoxRect(QGroupBox *groupBox); +}; + +} + +#endif diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTLineEdit.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTLineEdit.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6094e4ded34c1100a101af856f96d0a2ecd0fbb1 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTLineEdit.cpp @@ -0,0 +1,187 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "drivers/GTKeyboardDriver.h" +#include "drivers/GTMouseDriver.h" +#include "primitives/GTLineEdit.h" +#include "primitives/GTWidget.h" +#include "system/GTClipboard.h" +#include "utils/GTKeyboardUtils.h" +#include "utils/GTThread.h" + +namespace HI { +#define GT_CLASS_NAME "GTLineEdit" + +#define GT_METHOD_NAME "setText" +void GTLineEdit::setText(GUITestOpStatus& os, QLineEdit* lineEdit, const QString &str, bool noCheck /* = false*/, bool useCopyPaste) { + + GT_CHECK(lineEdit != NULL, "lineEdit is NULL"); + if(lineEdit->text() == str){ + return; + } + + GTWidget::setFocus(os, lineEdit); + if (lineEdit->text() == str) { + return; + } + if (!lineEdit->text().isEmpty()) { + clear(os, lineEdit); + } + + if(useCopyPaste){ + GTClipboard::setText(os, str); + GTKeyboardDriver::keyClick( 'v', Qt::ControlModifier); + }else{ + GTKeyboardDriver::keySequence(str); + } + GTGlobals::sleep(500); + + if(noCheck){ + return; + } + + QString s = lineEdit->text(); + for (int i = 0; i <= 10 && (s != str); i++) { + GTGlobals::sleep(500); + s = lineEdit->text(); + } + GT_CHECK(s == str, QString("Can't set text, set text differs from a given string in lineEdit '%1'. " + "Expected '%2', got '%3'").arg(lineEdit->objectName()).arg(str).arg(s)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setText" +void GTLineEdit::setText(GUITestOpStatus &os, const QString &lineEditName, const QString &text, QWidget const * const parent, bool noCheck, bool useCopyPaste) { + setText(os, GTWidget::findExactWidget<QLineEdit *>(os, lineEditName, parent), text, noCheck, useCopyPaste); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getText" +QString GTLineEdit::getText(GUITestOpStatus &os, QLineEdit *lineEdit) { + Q_UNUSED(os); + GT_CHECK_RESULT(NULL != lineEdit, "lineEdit is NULL", ""); + return lineEdit->text(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getText" +QString GTLineEdit::getText(GUITestOpStatus &os, const QString &lineEditName, QWidget *parent) { + return getText(os, GTWidget::findExactWidget<QLineEdit *>(os, lineEditName, parent)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "clear" +void GTLineEdit::clear(GUITestOpStatus& os, QLineEdit* lineEdit) { + + GT_CHECK(lineEdit != NULL, "lineEdit is NULL"); + + GTWidget::setFocus(os, lineEdit); + + GTKeyboardUtils::selectAll(os); + GTGlobals::sleep(100); + GTKeyboardDriver::keyClick( Qt::Key_Delete); + GTGlobals::sleep(100); + GTThread::waitForMainThread(); + + QString s = lineEdit->text(); + GT_CHECK(s.isEmpty() == true, "Can't clear text, lineEdit is not empty"); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "pasteClipboard" +void GTLineEdit::pasteClipboard(GUITestOpStatus& os, QLineEdit* lineEdit, PasteMethod pasteMethod) { + + GT_CHECK(lineEdit != NULL, "lineEdit is NULL"); + + clear(os, lineEdit); + switch(pasteMethod) { + case Mouse: + os.setError("GTLineEdit::pasteClipboard: Not implemented: Paste by mouse"); + break; + + default: + case Shortcut: + GTKeyboardUtils::paste(os); + break; + } + + GTGlobals::sleep(500); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkTextSize" +void GTLineEdit::checkTextSize(GUITestOpStatus& os, QLineEdit* lineEdit) { + + GT_CHECK(lineEdit != NULL, "lineEdit is NULL"); + + QMargins lineEditMargins = lineEdit->textMargins(); + QFontMetrics fontMetrics = lineEdit->fontMetrics(); + int textWidth = lineEditMargins.left() + lineEditMargins.right() + fontMetrics.width(lineEdit->text()); + int rectWidth = lineEdit->rect().width(); + + GT_CHECK(textWidth <= rectWidth, "GTLineEdit::checkTextSize: Text is not inside LineEdit's rect"); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkText" +void GTLineEdit::checkText(GUITestOpStatus &os, QLineEdit *lineEdit, const QString &expectedText) { + Q_UNUSED(os); + GT_CHECK(NULL != lineEdit, "Line edit is NULL"); + GT_CHECK(expectedText == lineEdit->text(), QString("The text differs: expect '%1', got '%2'").arg(expectedText).arg(lineEdit->text())); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkText" +void GTLineEdit::checkText(GUITestOpStatus &os, const QString &lineEditName, const QWidget * const parent, const QString &expectedText) { + checkText(os, GTWidget::findExactWidget<QLineEdit *>(os, lineEditName, parent), expectedText); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "copyText" +QString GTLineEdit::copyText(GUITestOpStatus& os, QLineEdit* lineEdit) { + GT_CHECK_RESULT(lineEdit != NULL, "lineEdit is NULL", QString()); + return lineEdit->text(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "tryToSetText" +bool GTLineEdit::tryToSetText(GUITestOpStatus &os, QLineEdit *lineEdit, const QString &str) { + GT_CHECK_RESULT(lineEdit != NULL, "lineEdit is NULL", false); + GTWidget::setFocus(os, lineEdit); + if (lineEdit->text() == str) { + return true; + } + + if (!lineEdit->text().isEmpty()) { + clear(os, lineEdit); + } + + GTKeyboardDriver::keySequence(str); + GTGlobals::sleep(500); + + QString s = lineEdit->text(); + return s == str; +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +} // namespace diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTLineEdit.h b/src/libs_3rdparty/QSpec/src/primitives/GTLineEdit.h new file mode 100644 index 0000000000000000000000000000000000000000..7b88bbffbb54dd9a127def8518eb773e8bbf2e4e --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTLineEdit.h @@ -0,0 +1,69 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GT_LINEEDIT_H_ +#define _HI_GT_LINEEDIT_H_ + +#include "GTGlobals.h" +#include <QLineEdit> + +namespace HI { +/*! + * \brief The class for working with QLineEdit primitive + */ +class HI_EXPORT GTLineEdit { +public: + enum PasteMethod {Shortcut, Mouse}; + + // fails if lineEdit is NULL, GTLineEdit::clear fails + // or a set text differs from a given string +#ifdef Q_OS_MAC + static void setText(GUITestOpStatus& os, QLineEdit* lineEdit, const QString &str, bool noCheck = false, bool useCopyPaste = true); + static void setText(GUITestOpStatus& os, const QString &lineEditName, const QString &text, const QWidget * const parent, bool noCheck = false, bool useCopyPaste = true); +#else + static void setText(GUITestOpStatus& os, QLineEdit* lineEdit, const QString &str, bool noCheck = false, bool useCopyPaste = false); + static void setText(GUITestOpStatus& os, const QString &lineEditName, const QString &text, QWidget const * const parent, bool noCheck = false, bool useCopyPaste = false); +#endif + static QString getText(GUITestOpStatus &os, QLineEdit *lineEdit); + static QString getText(GUITestOpStatus &os, const QString &lineEditName, QWidget *parent = NULL); + + // fails if lineEdit is NULL, or lineEdit's text wasn't cleared + static void clear(GUITestOpStatus& os, QLineEdit* lineEdit); + + // fails if GTLineEdit::clear fails + static void pasteClipboard(GUITestOpStatus& os, QLineEdit* lineEdit, PasteMethod pasteMethod = Shortcut); + + // fails if lineEdit is NULL or lineEdit text is not in lineEdit's rect + // considering lineEdit's fontMetrics and textMargins + static void checkTextSize(GUITestOpStatus& os, QLineEdit* lineEdit); + static void checkText(GUITestOpStatus& os, QLineEdit* lineEdit, const QString &expectedText); + static void checkText(GUITestOpStatus& os, const QString &lineEditName, QWidget const * const parent, const QString &expectedText); + + static QString copyText(GUITestOpStatus& os, QLineEdit* lineEdit); + + // fails if lineEdit is NULL + // checks if str can be pasted in lineEdit + static bool tryToSetText(GUITestOpStatus& os, QLineEdit* lineEdit, const QString& str); +}; + +} // namespace + +#endif // _HI_GT_LINEEDIT_H_ diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTListWidget.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTListWidget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ba7fe0cd7b4d45c22217693382c6ab497b8345ad --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTListWidget.cpp @@ -0,0 +1,115 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "drivers/GTKeyboardDriver.h" +#include "drivers/GTMouseDriver.h" +#include "primitives/GTListWidget.h" + +namespace HI{ + +#define GT_CLASS_NAME "GTListWidget" + +#define GT_METHOD_NAME "click" +void GTListWidget::click(GUITestOpStatus &os, QListWidget *listWidget, const QString &text, Qt::MouseButton button){ + QList<QListWidgetItem*> list = listWidget->findItems(text, Qt::MatchExactly); + GT_CHECK(!list.isEmpty(), QString("item %1 not found").arg(text)); + + QListWidgetItem* item = list.first(); + listWidget->scrollToItem(item); + + QRect r = listWidget->visualItemRect(item); + QPoint p = QPoint(r.left() + 30, r.center().y()); + QPoint global = listWidget->viewport()->mapToGlobal(p); + GTMouseDriver::moveTo(global); + GTMouseDriver::click(button); + GTGlobals::sleep(); + GT_CHECK(true, "click method completed"); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "isItemChecked" +bool GTListWidget::isItemChecked(GUITestOpStatus &os, QListWidget *listWidget, const QString &text) { + Q_UNUSED(os); + GT_CHECK_RESULT(NULL != listWidget, "List widget is NULL", false); + QList<QListWidgetItem *> list = listWidget->findItems(text, Qt::MatchExactly); + GT_CHECK_RESULT(!list.isEmpty(), QString("Item '%1' wasn't' not found").arg(text), false); + QListWidgetItem *item = list.first(); + return Qt::Checked == item->checkState(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkItem" +void GTListWidget::checkItem(GUITestOpStatus &os, QListWidget *listWidget, const QString &text, bool newState) { + Q_UNUSED(os); + GT_CHECK(NULL != listWidget, "List widget is NULL"); + if (newState != isItemChecked(os, listWidget, text)) { + click(os, listWidget, text); + GTKeyboardDriver::keyClick( Qt::Key_Space); + } +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkAllItems" +void GTListWidget::checkAllItems(GUITestOpStatus &os, QListWidget *listWidget, bool newState) { + Q_UNUSED(os); + GT_CHECK(NULL != listWidget, "List widget is NULL"); + + const QStringList itemTexts = getItems(os, listWidget); + foreach (const QString &itemText, itemTexts) { + checkItem(os, listWidget, itemText, newState); + } +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkOnlyItems" +void GTListWidget::checkOnlyItems(GUITestOpStatus &os, QListWidget *listWidget, const QStringList &itemTexts, bool newState) { + Q_UNUSED(os); + GT_CHECK(NULL != listWidget, "List widget is NULL"); + + const QStringList allItemTexts = getItems(os, listWidget); + int checkedItemsCount = 0; + foreach (const QString &itemText, allItemTexts) { + if (!itemTexts.contains(itemText)) { + checkItem(os, listWidget, itemText, !newState); + } else { + checkedItemsCount++; + checkItem(os, listWidget, itemText, newState); + } + } + GT_CHECK(checkedItemsCount == itemTexts.count(), "Some items weren't found"); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getItems" +QStringList GTListWidget::getItems(GUITestOpStatus &os, QListWidget *listWidget) { + Q_UNUSED(os); + GT_CHECK_RESULT(NULL != listWidget, "List widget is NULL", QStringList()); + QStringList itemTexts; + QList<QListWidgetItem *> items = listWidget->findItems("", Qt::MatchContains); + foreach (QListWidgetItem *item, items) { + itemTexts << item->text(); + } + return itemTexts; +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME +} diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTListWidget.h b/src/libs_3rdparty/QSpec/src/primitives/GTListWidget.h new file mode 100644 index 0000000000000000000000000000000000000000..24b1bf6e02eb0cb7b89edc3e403c842d62817ff8 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTListWidget.h @@ -0,0 +1,44 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + + +#ifndef _HI_GT_LISTWIDGET_H_ +#define _HI_GT_LISTWIDGET_H_ + +#include "GTGlobals.h" +#include <QListWidget> + +namespace HI{ + +class HI_EXPORT GTListWidget +{ +public: + static void click(GUITestOpStatus &os, QListWidget *listWidget, const QString &text, Qt::MouseButton button = Qt::LeftButton); + static bool isItemChecked(GUITestOpStatus &os, QListWidget *listWidget, const QString &text); + static void checkItem(GUITestOpStatus &os, QListWidget *listWidget, const QString &text, bool newState); + static void checkAllItems(GUITestOpStatus &os, QListWidget *listWidget, bool newState); + static void checkOnlyItems(GUITestOpStatus &os, QListWidget *listWidget, const QStringList &itemTexts, bool newState = true); + static QStringList getItems(GUITestOpStatus &os, QListWidget *listWidget); +}; + +} + +#endif // _HI_GT_LISTWIDGET_H_ diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTMainWindow.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTMainWindow.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fc9450cd0c300eed5ac1a317854b3d72be65337a --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTMainWindow.cpp @@ -0,0 +1,63 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "primitives/GTMainWindow.h" + +#include <QApplication> +#include <QWindow> + +namespace HI { + +#define GT_CLASS_NAME "GTMainWindow" + +#define GT_METHOD_NAME "getMainWindows" +QList<QMainWindow*> GTMainWindow::getMainWindows(GUITestOpStatus &os) { + QList<QMainWindow*> list; + foreach(QWindow *window, qApp->topLevelWindows()){ + if(window->inherits("QMainWindow")){ + list.append(qobject_cast<QMainWindow*>(window)); + } + } + + GT_CHECK_RESULT(!list.isEmpty(),"No one main window found", list); + return list; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getMainWindowsAsWidget" +QList<QWidget*> GTMainWindow::getMainWindowsAsWidget(GUITestOpStatus &os) { + QList<QWidget*> list; + foreach(QWidget *widget, qApp->topLevelWidgets()){ + if(widget->inherits("QMainWindow")){ + list.append(widget); + } + } + if(list.isEmpty()){ + list = qApp->topLevelWidgets(); + } + GT_CHECK_RESULT(!list.isEmpty(),"No one main window widget found", list); + return list; +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +} diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTMainWindow.h b/src/libs_3rdparty/QSpec/src/primitives/GTMainWindow.h new file mode 100644 index 0000000000000000000000000000000000000000..6cd0b4baabb98c4637dff89dde3bb73091976cc6 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTMainWindow.h @@ -0,0 +1,40 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GT_MAIN_WINDOW_H_ +#define _HI_GT_MAIN_WINDOW_H_ + +#include "GTGlobals.h" + +#include <QMainWindow> +#include <QWidget> + +namespace HI { + +class HI_EXPORT GTMainWindow { +public: + static QList<QMainWindow *> getMainWindows(GUITestOpStatus &os); + static QList<QWidget *> getMainWindowsAsWidget(GUITestOpStatus &os); +}; + +} // namespace + +#endif diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTMenu.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTMenu.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1952b33108a1e07acb8bba3e33f2dc3e403dcf2a --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTMenu.cpp @@ -0,0 +1,318 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "drivers/GTKeyboardDriver.h" +#include "drivers/GTMouseDriver.h" +#include "primitives/GTMainWindow.h" +#include "primitives/GTMenu.h" +#include "primitives/GTWidget.h" +#include "primitives/private/GTMenuPrivate.h" + +#include <QApplication> +#include <QMainWindow> +#include <QMenuBar> + +#include <utils/GTThread.h> + +namespace HI { + +#define GT_CLASS_NAME "GTMenu" + +#define GT_METHOD_NAME "showMainMenu" +QMenu* GTMenu::showMainMenu(GUITestOpStatus &os, const QString &menuName, GTGlobals::UseMethod m) { + + QMainWindow* mainWindow = NULL; + QList<QAction*> list; + foreach(QWidget* window, GTMainWindow::getMainWindowsAsWidget(os)){ + if(window->findChild<QAction*>(menuName) != NULL){ + list.append(window->findChild<QAction*>(menuName)); + mainWindow = qobject_cast<QMainWindow*>(window); + } + } + GT_CHECK_RESULT(list.count()!=0,"action not found", NULL); + GT_CHECK_RESULT(list.count()<2, QString("There are %1 actions with this text").arg(list.count()), NULL); + + QAction *menu = list.takeFirst(); + + GT_CHECK_RESULT(menu != NULL, QString("menu \"%1\" not found").arg(menuName), NULL); + + QPoint pos; + QPoint gPos; + QString menuText; + int key = 0, key_pos = 0; + + switch(m) { + case GTGlobals::UseMouse: + pos = mainWindow->menuBar()->actionGeometry(menu).center(); + gPos = mainWindow->menuBar()->mapToGlobal(pos); + + GTMouseDriver::moveTo(gPos); + GTMouseDriver::click(); + break; + + case GTGlobals::UseKeyBoard: + case GTGlobals::UseKey: + menuText = menu->text(); + key_pos = menuText.indexOf('&'); + key = (menuText.at(key_pos + 1)).toLatin1(); + + GTKeyboardDriver::keyClick( key, Qt::AltModifier); + break; + + default: + break; + } + + GTGlobals::sleep(1000); + + return menu->menu(); +} +#undef GT_METHOD_NAME + +namespace { + +QStringList fixMenuItemPath(const QStringList &itemPath) { + QStringList fixedItemPath = itemPath; +#ifdef Q_OS_MAC + // Some actions are moved to the application menu on mac +#ifdef _DEBUG + const QString appName = "ugeneuid"; +#else + const QString appName = "Unipro UGENE"; +#endif + const QString menuName = "Apple"; + + static const QStringList appSettingsPath = QStringList() << "Settings" << "Preferences..."; + if (appSettingsPath == itemPath) { + fixedItemPath = QStringList() << menuName << "Preferences..."; + } + + static const QStringList aboutPath = QStringList() << "Help" << "About"; + if (aboutPath == itemPath) { + fixedItemPath = QStringList() << menuName << "About " + appName; + } +#endif + return fixedItemPath; +} +bool compare(QString s1, QString s2, Qt::MatchFlag mathcFlag, bool replaceSpecSymbol = true){ + if(replaceSpecSymbol){ + s1.remove('&'); + s2.remove('&'); + } + switch (mathcFlag) { + case Qt::MatchContains: + return s1.contains(s2); + case Qt::MatchExactly: + return s1 == s2; + default: + return false; + } +} + +} + +#define GT_METHOD_NAME "clickMainMenuItem" +void GTMenu::clickMainMenuItem(GUITestOpStatus &os, const QStringList &itemPath, GTGlobals::UseMethod method, Qt::MatchFlag matchFlag) { + GTMenuPrivate::clickMainMenuItem(os, fixMenuItemPath(itemPath), method, matchFlag); + GTGlobals::sleep(100); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkMainMenuItemState" +void GTMenu::checkMainMenuItemState(GUITestOpStatus &os, const QStringList &itemPath, PopupChecker::CheckOption expectedState) { + GTMenuPrivate::checkMainMenuItemState(os, fixMenuItemPath(itemPath), expectedState); + GTGlobals::sleep(100); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkMainMenuItemState" +void GTMenu::checkMainMenuItemsState(GUITestOpStatus &os, const QStringList &menuPath, const QStringList &itemsNames, PopupChecker::CheckOption expectedState) { + const QStringList fixedPath = fixMenuItemPath(menuPath); + GTMenuPrivate::checkMainMenuItemsState(os, fixedPath, itemsNames, expectedState); + GTGlobals::sleep(100); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "showContextMenu" +QMenu* GTMenu::showContextMenu(GUITestOpStatus &os, QWidget *ground, GTGlobals::UseMethod m) +{ + GT_CHECK_RESULT(ground != NULL, "ground widget is NULL", NULL); + + switch(m) { + case GTGlobals::UseMouse: + GTWidget::click(os, ground, Qt::RightButton); + break; + + case GTGlobals::UseKey: + + break; + default: + break; + } + + GTGlobals::sleep(1000); + + QMenu *menu = static_cast<QMenu*>(QApplication::activePopupWidget()); + return menu; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getMenuItem" +QAction* GTMenu::getMenuItem(GUITestOpStatus &os, const QMenu* menu, const QString &itemName, bool byText, Qt::MatchFlag matchFlag) { + + GT_CHECK_RESULT(menu != NULL, "menu not found", NULL); + + QAction *action = NULL; + QList<QAction*>actions = menu->actions(); + if(!byText){ + foreach(QAction *act, actions) { + QString objName = act->objectName(); + qDebug("GT_DEBUG_MESSAGE: Action name: '%s'", objName.toLocal8Bit().constData()); + if (compare(objName, itemName, matchFlag)) { + qDebug("GT_DEBUG_MESSAGE: Found action"); + action = act; + break; + } + } + }else{ + foreach(QAction *act, actions) { + QString text = act->text(); + qDebug("GT_DEBUG_MESSAGE: Action text: '%s'",text.toLocal8Bit().constData()); + if (compare(text, itemName, matchFlag)) { + qDebug("GT_DEBUG_MESSAGE: Found action"); + action = act; + break; + } + } + } + + if (!action) { + qDebug("GT_DEBUG_MESSAGE: Not found action"); + } + return action; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "actionPos" +QPoint GTMenu::actionPos(GUITestOpStatus &os, const QMenu* menu, QAction* action) { + + GT_CHECK_RESULT(menu != NULL, "menu == NULL", QPoint()); + GT_CHECK_RESULT(action != NULL, "action == NULL", QPoint()); + + QPoint p = menu->actionGeometry(action).center(); + return menu->mapToGlobal(p); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "clickMenuItem" +QAction* GTMenu::clickMenuItem(GUITestOpStatus &os, const QMenu *menu, const QString &itemName, GTGlobals::UseMethod m,bool byText, Qt::MatchFlag matchFlag) { + + GT_CHECK_RESULT(menu != NULL, "menu not found", NULL); + GT_CHECK_RESULT(itemName.isEmpty() == false, "itemName is empty", NULL); + + QAction *action = getMenuItem(os, menu, itemName, byText, matchFlag); + GT_CHECK_RESULT(action != NULL, "action not found for item " + itemName, NULL); + GT_CHECK_RESULT(action->isEnabled() == true, "action <" + itemName + "> is not enabled", NULL); + + QPoint currentCursorPosition = GTMouseDriver::getMousePosition(); + QPoint menuCorner = menu->mapToGlobal(QPoint(0, 0)); + + bool verticalMenu = currentCursorPosition.y() < menuCorner.y(); // TODO: assuming here that submenu is always lower then menu + + switch(m) { + case GTGlobals::UseMouse: + { + QPoint actionPosition = actionPos(os, menu, action); + + QPoint firstMoveTo = QPoint(actionPosition.x(), currentCursorPosition.y()); // move by X first + if (verticalMenu) { + firstMoveTo = QPoint(currentCursorPosition.x(), actionPosition.y()); // move by Y first + } + + GTMouseDriver::moveTo(firstMoveTo); // move by Y first + GTGlobals::sleep(100); + + GTMouseDriver::moveTo(actionPosition); // move cursor to action + GTGlobals::sleep(200); + +#ifdef Q_OS_WIN + GTMouseDriver::click(); +#else + QMenu* actionMenu = action->menu(); + bool clickingSubMenu = actionMenu ? true : false; + if (!clickingSubMenu) { + GTMouseDriver::click(); + } +#endif + break; + } + case GTGlobals::UseKey: + while(action != menu->activeAction()) { + GTKeyboardDriver::keyClick( Qt::Key_Down); + GTGlobals::sleep(200); + } + + GTKeyboardDriver::keyClick( Qt::Key_Enter); + + GTGlobals::sleep(200); + break; + default: + break; + } + GTThread::waitForMainThread(); + QMenu* activePopupMenu = qobject_cast<QMenu*>(QApplication::activePopupWidget()); + if(activePopupMenu==NULL) + action=NULL; + return action; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "clickMenuItem" +void GTMenu::clickMenuItemPrivate(GUITestOpStatus &os, const QMenu *menu, const QStringList &itemPath, GTGlobals::UseMethod useMethod, bool byText, Qt::MatchFlag matchFlag) { + + GT_CHECK(menu != NULL, "menu is NULL"); + GT_CHECK(!itemPath.isEmpty(), "itemPath is empty"); + + foreach(QString itemName, itemPath) { + GT_CHECK(menu != NULL, "menu not found for item " + itemName); + + GTGlobals::sleep(500); + QAction *action = clickMenuItem(os, menu, itemName, useMethod, byText, matchFlag); + menu = action ? action->menu() : NULL; + } +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "clickMenuItemByName" +void GTMenu::clickMenuItemByName(GUITestOpStatus &os, const QMenu *menu, const QStringList &itemPath, GTGlobals::UseMethod m, Qt::MatchFlag matchFlag){ + clickMenuItemPrivate(os, menu, itemPath, m, false, matchFlag); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "clickMenuItemByText" +void GTMenu::clickMenuItemByText(GUITestOpStatus &os, const QMenu *menu, const QStringList &itemPath, GTGlobals::UseMethod m, Qt::MatchFlag matchFlag){ + clickMenuItemPrivate(os, menu, itemPath, m, true, matchFlag); +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +} // namespace diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTMenu.h b/src/libs_3rdparty/QSpec/src/primitives/GTMenu.h new file mode 100644 index 0000000000000000000000000000000000000000..ec184cd72193c1ec8347ec16dc3a1b91acec1725 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTMenu.h @@ -0,0 +1,66 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef GTMENU_H +#define GTMENU_H + +#include "GTGlobals.h" +#include "primitives/PopupChooser.h" + +#include <QAction> +#include <QMenu> + +namespace HI { + +class HI_EXPORT GTMenu { +public: + static QMenu* showMainMenu(GUITestOpStatus &os, const QString &menuName, GTGlobals::UseMethod m = GTGlobals::UseMouse); // should be removed in Qt5, use clickMainMenuItem instead + static void clickMainMenuItem(GUITestOpStatus &os, const QStringList &itemPath, GTGlobals::UseMethod method = GTGlobals::UseMouse, Qt::MatchFlag matchFlag = Qt::MatchExactly); + static void checkMainMenuItemState(GUITestOpStatus &os, const QStringList &itemPath, PopupChecker::CheckOption expectedState); + static void checkMainMenuItemsState(GUITestOpStatus &os, const QStringList &menuPath, const QStringList &itemsNames, PopupChecker::CheckOption expectedState); + static QMenu* showContextMenu(GUITestOpStatus &os, QWidget *ground, GTGlobals::UseMethod m = GTGlobals::UseMouse); + + static void clickMenuItemByName(GUITestOpStatus &os, const QMenu *menu, const QStringList &itemPath, GTGlobals::UseMethod m = GTGlobals::UseMouse, Qt::MatchFlag matchFlag = Qt::MatchExactly); + static void clickMenuItemByText(GUITestOpStatus &os, const QMenu *menu, const QStringList &itemPath, GTGlobals::UseMethod m = GTGlobals::UseMouse, Qt::MatchFlag matchFlag = Qt::MatchExactly); + + // moves cursor to menu item, clicks on menu item; + + static QAction* clickMenuItem(GUITestOpStatus &os, const QMenu *menu, const QString &itemName, GTGlobals::UseMethod m = GTGlobals::UseMouse, bool byText = false, Qt::MatchFlag matchFlag = Qt::MatchExactly); + + static QAction* getMenuItem(GUITestOpStatus &os, const QMenu* menu, const QString &itemName, bool byText = false, Qt::MatchFlag matchFlag = Qt::MatchExactly); + + // global position of menu action's center + static QPoint actionPos(GUITestOpStatus &os, const QMenu* menu, QAction* action); + + static const QString FILE; + static const QString ACTIONS; + static const QString SETTINGS; + static const QString TOOLS; + static const QString WINDOW; + static const QString HELP; + +private: + static void clickMenuItemPrivate(GUITestOpStatus &os, const QMenu *menu, const QStringList &itemName, GTGlobals::UseMethod m = GTGlobals::UseMouse, + bool byText = false, Qt::MatchFlag matchFlag = Qt::MatchExactly); +}; + +} +#endif // GTMENU_H diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTMenuBar.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTMenuBar.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8a5ef569a331ce0cf8ce4c14d93960254b167bd4 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTMenuBar.cpp @@ -0,0 +1,54 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "drivers/GTMouseDriver.h" +#include "primitives/GTMenuBar.h" + +namespace HI { +#define GT_CLASS_NAME "GTMenuBar" + +#define GT_METHOD_NAME "clickCornerMenu" +void GTMenuBar::clickCornerMenu(GUITestOpStatus &os, QMenuBar* mBar, GTGlobals::WindowAction action) { + + GT_CHECK(mBar != NULL, "QMenuBar is NULL"); + QWidget* cWidget = mBar->cornerWidget(); + GT_CHECK(cWidget != NULL, "Corner widget is NULL"); + QRect r = cWidget->rect(); + + int num = (int)action; + GT_CHECK(num>=0 && num<(int)GTGlobals::WindowActionCount, "action is not GTGlobals::WindowAction"); + + GT_CHECK((int)GTGlobals::WindowActionCount != 0, "GTGlobals::WindowActionCount == 0"); + int oneWidth = r.width()/(int)GTGlobals::WindowActionCount; + + QPoint need((num+1)*oneWidth - oneWidth/2, r.height()/2); + QPoint p = cWidget->mapToGlobal(need); + + GTMouseDriver::moveTo(p); + GTGlobals::sleep(200); + GTMouseDriver::click(); + GTGlobals::sleep(500); +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +} diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTMenuBar.h b/src/libs_3rdparty/QSpec/src/primitives/GTMenuBar.h new file mode 100644 index 0000000000000000000000000000000000000000..eac73757bc3d93569491ebec297aa5ee356e114c --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTMenuBar.h @@ -0,0 +1,39 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GT_MENU_BAR_H_ +#define _HI_GT_MENU_BAR_H_ + +#include "GTGlobals.h" +#include <QMenuBar> + +namespace HI { + +class HI_EXPORT GTMenuBar { +public: + // clicks cornerMenu of QMenuBar as if it is a standard {Minimize, Maximize, Close} buttons widget + // fails if menuBar is NULL or action as int value is not one of GTGlobals::WindowAction values + static void clickCornerMenu(GUITestOpStatus &os, QMenuBar *mBar, GTGlobals::WindowAction action); +}; + +} // namespace + +#endif diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTPlainTextEdit.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTPlainTextEdit.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4c83887421db683121d28ad01cd1ec3fdd7fe9ef --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTPlainTextEdit.cpp @@ -0,0 +1,67 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "drivers/GTKeyboardDriver.h" +#include "drivers/GTMouseDriver.h" +#include "primitives/GTPlainTextEdit.h" +#include "primitives/GTWidget.h" +#include "utils/GTKeyboardUtils.h" + +namespace HI { + +#define GT_CLASS_NAME "GTPlainTextEdit" + +#define GT_METHOD_NAME "setPlainText" +void GTPlainTextEdit::setPlainText(GUITestOpStatus& os, QPlainTextEdit* plainTextEdit, const QString &text) { + + GT_CHECK(plainTextEdit != NULL, "plainTextEdit is NULL"); + if(plainTextEdit->toPlainText() == text){ + return; + } + + GTWidget::setFocus(os, plainTextEdit); + + GTKeyboardDriver::keySequence(text); + GTGlobals::sleep(500); + +} +#undef GT_METHOD_NAME + +//#define GT_METHOD_NAME "clear" +//void GTPlainTextEdit::clear(GUITestOpStatus& os, QPlainTextEdit* plainTextEdit) { +// +// GT_CHECK(plainTextEdit != NULL, "plainTextEdit is NULL"); +// +// GTWidget::setFocus(os, plainTextEdit); +// +// GTKeyboardUtils::selectAll(os); +// GTGlobals::sleep(100); +// GTKeyboardDriver::keyClick( Qt::Key_Delete); +// GTGlobals::sleep(1000); +// +// QString s = plainTextEdit->toPlainText(); +// GT_CHECK(s.isEmpty() == true, "Can't clear text, lineEdit is not empty"); +//} +//#undef GT_METHOD_NAME + + + +} diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTPlainTextEdit.h b/src/libs_3rdparty/QSpec/src/primitives/GTPlainTextEdit.h new file mode 100644 index 0000000000000000000000000000000000000000..4faa3f62c75ad2d3da06a797c481115547485c34 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTPlainTextEdit.h @@ -0,0 +1,51 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GT_PLAINTEXTEDIT_H_ +#define _HI_GT_PLAINTEXTEDIT_H_ + +#include "GTGlobals.h" +#include <QPlainTextEdit> + +namespace HI { + +class HI_EXPORT GTPlainTextEdit { +public: + enum PasteMethod {Shortcut, Mouse}; + + // fails if lineEdit is NULL, GTLineEdit::clear fails + // or a set text differs from a given string + static void setPlainText(GUITestOpStatus& os, QPlainTextEdit* plainTextEdit, const QString &text); + + // fails if lineEdit is NULL, or lineEdit's text wasn't cleared + static void clear(GUITestOpStatus& os, QPlainTextEdit* plainTextEdit); + + // fails if GTLineEdit::clear fails + // static void pasteClipboard(GUITestOpStatus& os, QPlainTextEdit* plainTextEdit, PasteMethod pasteMethod = Shortcut); + + // fails if lineEdit is NULL or lineEdit text is not in lineEdit's rect + // considering lineEdit's fontMetrics and textMargins + //static void checkTextSize(GUITestOpStatus& os, QPlainTextEdit* plainTextEdit); +}; + +} + +#endif // _HI_GT_PLAINTEXTEDIT_H_ diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTRadioButton.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTRadioButton.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b011e89540d76371ea7cb108ec2b7dabca02d0e5 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTRadioButton.cpp @@ -0,0 +1,98 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "drivers/GTKeyboardDriver.h" +#include "drivers/GTMouseDriver.h" +#include "primitives/GTMainWindow.h" +#include "primitives/GTRadioButton.h" +#include "primitives/GTWidget.h" + +#include <QApplication> +#include <QMainWindow> + +namespace HI { +#define GT_CLASS_NAME "GTRadioButton" + +#define GT_METHOD_NAME "click" +void GTRadioButton::click(GUITestOpStatus& os, QRadioButton *radioButton) { + GT_CHECK(radioButton != NULL, "RadioButton is NULL"); + if(radioButton->isChecked() == true){ + return; + } + + QPoint buttonPos = radioButton->mapToGlobal(radioButton->rect().topLeft()); + if (Qt::RightToLeft != radioButton->layoutDirection()) { + buttonPos = QPoint(buttonPos.x() + 10, buttonPos.y() + 10); // moved to clickable area + } else { + buttonPos = QPoint(radioButton->mapToGlobal(QPoint(radioButton->rect().right(), 0)).x() - 10, buttonPos.y() + 10); // moved to clickable area + } + + GTMouseDriver::moveTo(buttonPos); + GTMouseDriver::click(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "click" +void GTRadioButton::click(GUITestOpStatus &os, const QString &radioButtonName, QWidget *parent) { + click(os, GTWidget::findExactWidget<QRadioButton *>(os, radioButtonName, parent)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getRadioButtonByText" +QRadioButton* GTRadioButton::getRadioButtonByText(GUITestOpStatus &os, QString text, QWidget *parent){ + QList<QRadioButton*> radioList = getAllButtonsByText(os, text, parent); + GT_CHECK_RESULT(radioList.size() > 1, "Several radioButtons contain this text", NULL); + GT_CHECK_RESULT(radioList.size() == 0, "No radioButtons with this text found", NULL); + + return radioList[0]; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getAllButtonsByText" +QList<QRadioButton*> GTRadioButton::getAllButtonsByText(GUITestOpStatus &os, QString text, QWidget *parent){ + Q_UNUSED(os); + QList<QRadioButton*> result; + if(parent==NULL){ + foreach(QWidget* parent, GTMainWindow::getMainWindowsAsWidget(os)){ + QList<QRadioButton*> list = parent->findChildren<QRadioButton*>(); + foreach(QRadioButton* rb, list){ + if(rb->text() == text){ + result.append(rb); + } + } + } + return result; + } + QList<QRadioButton*> radioList = parent->findChildren<QRadioButton*>(); + foreach(QRadioButton* but, radioList){ + QString s = but->text().toLower(); + if(but->text().toLower().contains(text.toLower())){ + result<<but; + } + } + + return result; +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +} diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTRadioButton.h b/src/libs_3rdparty/QSpec/src/primitives/GTRadioButton.h new file mode 100644 index 0000000000000000000000000000000000000000..9bfb699b00363ad0130e60edcffe699d5d13516a --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTRadioButton.h @@ -0,0 +1,44 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GT_RADIOBUTTON_H_ +#define _HI_GT_RADIOBUTTON_H_ + +#include "GTGlobals.h" + +#include <QRadioButton> + +namespace HI { +/*! + * \brief The class for working with QRadioButton primitive + */ +class HI_EXPORT GTRadioButton { +public: + // fails if the radioButton is NULL or can't click + static void click(GUITestOpStatus& os, QRadioButton *radioButton); + static void click(GUITestOpStatus& os, const QString &radioButtonName, QWidget *parent = NULL); + + static QRadioButton* getRadioButtonByText(GUITestOpStatus& os, QString text, QWidget* parent=NULL); + static QList<QRadioButton*> getAllButtonsByText(GUITestOpStatus &os, QString text, QWidget* parent=NULL); +}; + +} +#endif // _HI_GT_RADIOBUTTON_H_ diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTScrollBar.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTScrollBar.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c6cbac98245d30a19e3bb619fb8bae125de95a41 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTScrollBar.cpp @@ -0,0 +1,302 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "drivers/GTKeyboardDriver.h" +#include "drivers/GTMouseDriver.h" +#include "primitives/GTScrollBar.h" +#include "primitives/GTWidget.h" + +namespace HI { +#define GT_CLASS_NAME "GTScrollBar" + +#define GT_METHOD_NAME "getScrollBar" +QScrollBar *GTScrollBar::getScrollBar(GUITestOpStatus &os, const QString &scrollBarName) { + return GTWidget::findExactWidget<QScrollBar *>(os, scrollBarName); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "pageUp" +void GTScrollBar::pageUp(GUITestOpStatus &os, QScrollBar *scrollbar, GTGlobals::UseMethod useMethod) { + GT_CHECK(scrollbar != NULL, "scrollbar is NULL"); + switch (useMethod) { + case GTGlobals::UseMouse: + GTMouseDriver::moveTo(GTScrollBar::getAreaOverSliderPosition(os, scrollbar)); + GTMouseDriver::click(); + break; + + case GTGlobals::UseKey: + GTMouseDriver::moveTo(GTScrollBar::getSliderPosition(os, scrollbar)); + GTMouseDriver::click(); + GTKeyboardDriver::keyClick( Qt::Key_PageUp); + break; + + default: + break; + } +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "pageDown" +void GTScrollBar::pageDown(GUITestOpStatus &os, QScrollBar *scrollbar, GTGlobals::UseMethod useMethod) { + GT_CHECK(scrollbar != NULL, "scrollbar is NULL"); + switch (useMethod) { + case GTGlobals::UseMouse: + GTMouseDriver::moveTo(GTScrollBar::getAreaUnderSliderPosition(os, scrollbar)); + GTMouseDriver::click(); + break; + + case GTGlobals::UseKey: + GTMouseDriver::moveTo(GTScrollBar::getSliderPosition(os, scrollbar)); + GTMouseDriver::click(); + GTKeyboardDriver::keyClick( Qt::Key_PageDown); + break; + + default: + break; + } +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "lineUp" +void GTScrollBar::lineUp(GUITestOpStatus &os, QScrollBar *scrollbar, GTGlobals::UseMethod useMethod) { + GT_CHECK(scrollbar != NULL, "scrollbar is NULL"); + switch (useMethod) { + case GTGlobals::UseMouse: + GTMouseDriver::moveTo(GTScrollBar::getUpArrowPosition(os, scrollbar)); + GTMouseDriver::click(); + break; + + case GTGlobals::UseKey: + GTMouseDriver::moveTo(GTScrollBar::getSliderPosition(os, scrollbar)); + GTMouseDriver::click(); + GTKeyboardDriver::keyClick( Qt::Key_Up); + break; + + default: + break; + } +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "lineDown" +void GTScrollBar::lineDown(GUITestOpStatus &os, QScrollBar *scrollbar, GTGlobals::UseMethod useMethod) { + GT_CHECK(scrollbar != NULL, "scrollbar is NULL"); + switch (useMethod) { + case GTGlobals::UseMouse: + GTMouseDriver::moveTo(GTScrollBar::getDownArrowPosition(os, scrollbar)); + GTMouseDriver::click(); + break; + + case GTGlobals::UseKey: + GTMouseDriver::moveTo(GTScrollBar::getSliderPosition(os, scrollbar)); + GTMouseDriver::click(); + GTKeyboardDriver::keyClick( Qt::Key_Down); + break; + + default: + break; + } +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "moveSliderWithMouseUp" +void GTScrollBar::moveSliderWithMouseUp(GUITestOpStatus &os, QScrollBar *scrollbar, int nPix) { + GT_CHECK(scrollbar != NULL, "scrollbar is NULL"); + GTMouseDriver::moveTo(GTScrollBar::getSliderPosition(os, scrollbar)); + QPoint newPosition; + if (Qt::Horizontal == scrollbar->orientation()) { + newPosition = QPoint(QCursor::pos().x() + nPix, QCursor::pos().y()); + } + else { + newPosition = QPoint(QCursor::pos().x(), QCursor::pos().y() + nPix); + } + GTMouseDriver::press(); + GTMouseDriver::moveTo(newPosition); + GTMouseDriver::release(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "moveSliderWithMouseDown" +void GTScrollBar::moveSliderWithMouseDown(GUITestOpStatus &os, QScrollBar *scrollbar, int nPix) { + GT_CHECK(scrollbar != NULL, "scrollbar is NULL"); + GTMouseDriver::moveTo(GTScrollBar::getSliderPosition(os, scrollbar)); + GTMouseDriver::press(); + QPoint newPosition; + if (Qt::Horizontal == scrollbar->orientation()) { + newPosition = QPoint(QCursor::pos().x() - nPix , QCursor::pos().y()); + } + else { + newPosition = QPoint(QCursor::pos().x(), QCursor::pos().y() - nPix); + } + GTMouseDriver::moveTo(newPosition); + GTMouseDriver::release(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "moveSliderWithMouseToValue" +void GTScrollBar::moveSliderWithMouseToValue(GUITestOpStatus &os, QScrollBar *scrollbar, int value) { + GT_CHECK_RESULT(scrollbar != NULL, "scrollbar is NULL", ); + QStyleOptionSlider options = initScrollbarOptions(os, scrollbar); + QRect grooveRect = scrollbar->style()->subControlRect(QStyle::CC_ScrollBar, &options, QStyle::SC_ScrollBarGroove); + QRect sliderRect = scrollbar->style()->subControlRect(QStyle::CC_ScrollBar, &options, QStyle::SC_ScrollBarSlider); + + value = qBound(0, value, scrollbar->maximum()); + QPoint newPosition; + switch (scrollbar->orientation()) { + case Qt::Horizontal: { + int newPositionX = qBound((sliderRect.width() - 1) / 2, + (sliderRect.width() - 1) / 2 + (int)((double)value * (grooveRect.width() - sliderRect.width()) / scrollbar->maximum()), + grooveRect.width() - sliderRect.width() / 2); + newPosition = QPoint(grooveRect.x() + newPositionX, grooveRect.height() / 2); + break; + } + case Qt::Vertical: { + int newPositionY = qBound((sliderRect.height() - 1) / 2, + (sliderRect.height() - 1) / 2 + (int)((double)value * (grooveRect.height() - sliderRect.height()) / scrollbar->maximum()), + grooveRect.height() - sliderRect.height() / 2); + newPosition = QPoint(grooveRect.width() / 2, grooveRect.y() + newPositionY); + break; + } + } + + GTMouseDriver::moveTo(GTScrollBar::getSliderPosition(os, scrollbar)); + GTMouseDriver::press(); + GTMouseDriver::moveTo(scrollbar->mapToGlobal(newPosition)); + GTMouseDriver::release(); +} +#undef GT_METHOD_NAME + +void GTScrollBar::moveSliderWithMouseWheelUp(GUITestOpStatus &os, QScrollBar *scrollbar, int nScrolls) { + GTMouseDriver::moveTo(GTScrollBar::getSliderPosition(os, scrollbar)); + GTMouseDriver::click(); + GTMouseDriver::scroll(nScrolls); +} + +void GTScrollBar::moveSliderWithMouseWheelDown(GUITestOpStatus &os, QScrollBar *scrollbar, int nScrolls) { + GTMouseDriver::moveTo(GTScrollBar::getSliderPosition(os, scrollbar)); + GTMouseDriver::click(); + GTMouseDriver::scroll((-1 * nScrolls)); //since scrolling down means negative value for GTMouseDriver::scroll +} + +#define GT_METHOD_NAME "getSliderPosition" +QPoint GTScrollBar::getSliderPosition(GUITestOpStatus &os, QScrollBar *scrollbar) { + GT_CHECK_RESULT(scrollbar != NULL, "scrollbar is NULL", QPoint()); + QStyleOptionSlider options = initScrollbarOptions(os, scrollbar); + QRect sliderRect = scrollbar->style()->subControlRect(QStyle::CC_ScrollBar, &options, QStyle::SC_ScrollBarSlider); + return scrollbar->mapToGlobal(sliderRect.center()); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getUpArrowPosition" +QPoint GTScrollBar::getUpArrowPosition(GUITestOpStatus &os, QScrollBar *scrollbar) { + GT_CHECK_RESULT(scrollbar != NULL, "scrollbar is NULL", QPoint()); + QStyleOptionSlider options = initScrollbarOptions(os, scrollbar); + QRect grooveRect = scrollbar->style()->subControlRect(QStyle::CC_ScrollBar, &options, QStyle::SC_ScrollBarGroove); + + return scrollbar->mapToGlobal(scrollbar->rect().topLeft() + QPoint(5, 5)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getDownArrowPosition" +QPoint GTScrollBar::getDownArrowPosition(GUITestOpStatus &os, QScrollBar *scrollbar) { + GT_CHECK_RESULT(scrollbar != NULL, "scrollbar is NULL", QPoint()); + QStyleOptionSlider options = initScrollbarOptions(os, scrollbar); + QRect grooveRect = scrollbar->style()->subControlRect(QStyle::CC_ScrollBar, &options, QStyle::SC_ScrollBarGroove); + + return scrollbar->mapToGlobal(scrollbar->rect().bottomRight() - QPoint(5, 5)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getAreaUnderSliderPosition" +QPoint GTScrollBar::getAreaUnderSliderPosition(GUITestOpStatus &os, QScrollBar *scrollbar) { + GT_CHECK_RESULT(scrollbar != NULL, "scrollbar is NULL", QPoint()); + QStyleOptionSlider options = initScrollbarOptions(os, scrollbar); + QRect grooveRect = scrollbar->style()->subControlRect(QStyle::CC_ScrollBar, &options, QStyle::SC_ScrollBarGroove); + QRect sliderRect = scrollbar->style()->subControlRect(QStyle::CC_ScrollBar, &options, QStyle::SC_ScrollBarSlider); + QRect underSliderRect; + + if (Qt::Horizontal == scrollbar->orientation()) { + int underSliderRectWidth = grooveRect.right() - sliderRect.right(); + int underSliderRectHeight = grooveRect.height(); + underSliderRect = QRect(sliderRect.topRight() + QPoint(1, 0), QSize(underSliderRectWidth, underSliderRectHeight)); + } + else { + int underSliderRectWidth = grooveRect.width(); + int underSliderRectHeight = grooveRect.bottom() - sliderRect.bottom(); + underSliderRect = QRect(sliderRect.topRight() + QPoint(1, 1), QSize(underSliderRectWidth, underSliderRectHeight)); + } + + if (underSliderRect.contains(scrollbar->mapFromGlobal(QCursor::pos()))) { + return QCursor::pos(); + } + return scrollbar->mapToGlobal(underSliderRect.center()); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getAreaOverSliderPosition" +QPoint GTScrollBar::getAreaOverSliderPosition(GUITestOpStatus &os, QScrollBar *scrollbar) { + GT_CHECK_RESULT(scrollbar != NULL, "scrollbar is NULL", QPoint()); + QStyleOptionSlider options = initScrollbarOptions(os, scrollbar); + QRect grooveRect = scrollbar->style()->subControlRect(QStyle::CC_ScrollBar, &options, QStyle::SC_ScrollBarGroove); + QRect sliderRect = scrollbar->style()->subControlRect(QStyle::CC_ScrollBar, &options, QStyle::SC_ScrollBarSlider); + QRect overSliderRect; + + if (Qt::Horizontal == scrollbar->orientation()) { + int overSliderRectWidth = sliderRect.left() - grooveRect.left(); + int overSliderRectHeight = grooveRect.height(); + overSliderRect = QRect(grooveRect.topLeft(), QSize(overSliderRectWidth, overSliderRectHeight)); + } + else { + int overSliderRectWidth = grooveRect.width(); + int overSliderRectHeight = sliderRect.top() - grooveRect.top(); + overSliderRect = QRect(grooveRect.topLeft(), QSize(overSliderRectWidth, overSliderRectHeight)); + } + + if (overSliderRect.contains(scrollbar->mapFromGlobal(QCursor::pos()))) { + return QCursor::pos(); + } + return scrollbar->mapToGlobal(overSliderRect.center() + QPoint(1,0)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "initScrollbarOptions" +QStyleOptionSlider GTScrollBar::initScrollbarOptions(GUITestOpStatus &os, QScrollBar *scrollbar) { + GT_CHECK_RESULT(scrollbar != NULL, "scrollbar is NULL", QStyleOptionSlider()); + QStyleOptionSlider options; + options.initFrom(scrollbar); + options.sliderPosition = scrollbar->sliderPosition(); + options.maximum = scrollbar->maximum(); + options.minimum = scrollbar->minimum(); + options.singleStep = scrollbar->singleStep(); + options.pageStep = scrollbar->pageStep(); + options.orientation = scrollbar->orientation(); + options.sliderValue = options.sliderPosition; + options.upsideDown = false; + options.state = QStyle::State_Sunken | QStyle::State_Enabled; + + return options; +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +} +// namespace diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTScrollBar.h b/src/libs_3rdparty/QSpec/src/primitives/GTScrollBar.h new file mode 100644 index 0000000000000000000000000000000000000000..9fb986117ccf7a130ae77c80d999023f9028942d --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTScrollBar.h @@ -0,0 +1,62 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GUI_GTSCROLLBAR_H_ +#define _HI_GUI_GTSCROLLBAR_H_ + +#include "GTGlobals.h" + +#include <QPoint> +#include <QScrollBar> +#include <QStyleOptionSlider> + +namespace HI { + +class HI_EXPORT GTScrollBar { +public: + static QScrollBar *getScrollBar(GUITestOpStatus &os, const QString &scrollBarName); + + static void pageUp(GUITestOpStatus &os, QScrollBar *scrollbar, GTGlobals::UseMethod useMethod); + static void pageDown(GUITestOpStatus &os, QScrollBar *scrollbar, GTGlobals::UseMethod useMethod); + + static void lineUp(GUITestOpStatus &os, QScrollBar *scrollbar, GTGlobals::UseMethod useMethod); //does not necessarily move one line up (for example, moves cursor in text editors) + static void lineDown(GUITestOpStatus &os, QScrollBar *scrollbar, GTGlobals::UseMethod useMethod); //does not necessarily move one line down (for example, moves cursor in text editors) + + static void moveSliderWithMouseUp(GUITestOpStatus &os, QScrollBar *scrollbar, int nPix); + static void moveSliderWithMouseDown(GUITestOpStatus &os, QScrollBar *scrollbar, int nPix); + static void moveSliderWithMouseToValue(GUITestOpStatus &os, QScrollBar *scrollbar, int value); + + static void moveSliderWithMouseWheelUp(GUITestOpStatus &os, QScrollBar *scrollbar, int nScrolls); //first moves the cursor to the slider and clicks it, then starts scrolling + static void moveSliderWithMouseWheelDown(GUITestOpStatus &os, QScrollBar *scrollbar, int nScrolls); //first moves the cursor to the slider and clicks it, then starts scrolling + + static QPoint getSliderPosition(GUITestOpStatus &os, QScrollBar *scrollbar); + static QPoint getUpArrowPosition(GUITestOpStatus &os, QScrollBar *scrollbar); + static QPoint getDownArrowPosition(GUITestOpStatus &os, QScrollBar *scrollbar); + static QPoint getAreaUnderSliderPosition(GUITestOpStatus &os, QScrollBar *scrollbar); + static QPoint getAreaOverSliderPosition(GUITestOpStatus &os, QScrollBar *scrollbar); + +private: + static QStyleOptionSlider initScrollbarOptions(GUITestOpStatus &os, QScrollBar *scrollbar); +}; + +} //namespace + +#endif diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTSlider.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTSlider.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bdf1be26c2c96b65570ba5ea498c299e5f9bb82c --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTSlider.cpp @@ -0,0 +1,43 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "GTSlider.h" + +namespace HI{ +#define GT_CLASS_NAME "GTSlider" + +#define GT_METHOD_NAME "setValue" +void GTSlider::setValue(GUITestOpStatus &os, QSlider *slider, int value){ + Q_UNUSED(os); + GT_CHECK(slider != NULL, "slider not found"); + int min = slider->minimum(); + int max = slider->maximum(); + GT_CHECK(slider->isEnabled(), "slider is disabled"); + GT_CHECK(value >= min, QString("can not set value %1, mininum is %2").arg(value).arg(min)); + GT_CHECK(value <= max, QString("can not set value %1, maximum is %2").arg(value).arg(max)); + + slider->setValue(value); + +} +#undef GT_CLASS_NAME + +#undef GT_METHOD_NAME +} diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTSlider.h b/src/libs_3rdparty/QSpec/src/primitives/GTSlider.h new file mode 100644 index 0000000000000000000000000000000000000000..699f02c880eff0f498d9af6b4e7868311e64172c --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTSlider.h @@ -0,0 +1,37 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GT_SLIDER_H_ +#define _HI_GT_SLIDER_H_ + +#include "GTGlobals.h" +#include <QSlider> + +namespace HI { + +class HI_EXPORT GTSlider { +public: + static void setValue(GUITestOpStatus &os, QSlider* slider, int value); +}; + +} + +#endif // _HI_GT_SLIDER_H diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTSpinBox.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTSpinBox.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f573f891aad4db02f2e66c3c1b7ea984a5c21fa9 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTSpinBox.cpp @@ -0,0 +1,143 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "drivers/GTKeyboardDriver.h" +#include "drivers/GTMouseDriver.h" +#include "primitives/GTSpinBox.h" +#include "primitives/GTWidget.h" + +#include <utils/GTThread.h> + +namespace HI { + +#define GT_CLASS_NAME "GTSpinBox" + +#define GT_METHOD_NAME "getValue" +int GTSpinBox::getValue(GUITestOpStatus &os, QSpinBox *spinBox) { + Q_UNUSED(os); + GT_CHECK_RESULT(spinBox != NULL, "spinBox is NULL", -1); + return spinBox->value(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getValue" +int GTSpinBox::getValue(GUITestOpStatus &os, const QString &spinBoxName, QWidget *parent) { + return GTSpinBox::getValue(os, GTWidget::findExactWidget<QSpinBox *>(os, spinBoxName, parent)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setValue" +void GTSpinBox::setValue(GUITestOpStatus& os, QSpinBox *spinBox, int v, GTGlobals::UseMethod useMethod) { + GT_CHECK(spinBox != NULL, "spinBox is NULL"); + if(spinBox->value() == v){ + return; + } + + GT_CHECK(v <= spinBox->maximum(), QString("value for this spinbox cannot be more then %1").arg(spinBox->maximum())); + GT_CHECK(v >= spinBox->minimum(), QString("value for this spinbox cannot be less then %1").arg(spinBox->minimum())); + + QPoint arrowPos; + QRect spinBoxRect; + + GT_CHECK(spinBox->isEnabled(), "SpinBox is not enabled"); + + if (spinBox->value() != v) { + switch(useMethod) { + case GTGlobals::UseMouse: + spinBoxRect = spinBox->rect(); + if (v > spinBox->value()) { + arrowPos = QPoint(spinBoxRect.right() - 5, spinBoxRect.height() / 4); // -5 it's needed that area under cursor was clickable + } else { + arrowPos = QPoint(spinBoxRect.right() - 5, spinBoxRect.height() * 3 / 4); + } + + GTMouseDriver::moveTo(spinBox->mapToGlobal(arrowPos)); + while (spinBox->value() != v) { + GTMouseDriver::click(); + GTGlobals::sleep(100); + } + break; + + case GTGlobals::UseKey: { + Qt::Key key; + if (v > spinBox->value()) { + key = Qt::Key_Up; + } else { + key = Qt::Key_Down; + } + + GTWidget::setFocus(os, spinBox); + while (spinBox->value() != v) { + GTKeyboardDriver::keyClick( key); + GTGlobals::sleep(100); + } + break; + } + case GTGlobals::UseKeyBoard: + QString s = QString::number(v); + GTWidget::setFocus(os, spinBox); + GTGlobals::sleep(100); + GTKeyboardDriver::keyClick( 'a', Qt::ControlModifier); + GTGlobals::sleep(100); + GTKeyboardDriver::keyClick( Qt::Key_Delete); + GTGlobals::sleep(100); + GTKeyboardDriver::keySequence(s); + GTGlobals::sleep(100); + } + } + GTThread::waitForMainThread(); + int currIndex = spinBox->value(); + GT_CHECK(currIndex == v, QString("Can't set index. Expected: %1 actual: %2").arg(v).arg(currIndex)); + GTGlobals::sleep(100); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setValue" +void GTSpinBox::setValue(GUITestOpStatus &os, const QString &spinBoxName, int v, GTGlobals::UseMethod useMethod, QWidget *parent) { + GTSpinBox::setValue(os, GTWidget::findExactWidget<QSpinBox *>(os, spinBoxName, parent), v, useMethod); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setValue" +void GTSpinBox::setValue(GUITestOpStatus &os, const QString &spinBoxName, int v, QWidget *parent) { + GTSpinBox::setValue(os, GTWidget::findExactWidget<QSpinBox *>(os, spinBoxName, parent), v); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkLimits" +void GTSpinBox::checkLimits(GUITestOpStatus &os, QSpinBox *spinBox, int min, int max){ + GT_CHECK(spinBox != NULL, "spinbox is NULL"); + int actualMin = spinBox->minimum(); + int actualMax = spinBox->maximum(); + GT_CHECK(actualMin == min, QString("wrong minimum. Expected: %1, actual: %2").arg(min).arg(actualMin)); + GT_CHECK(actualMax == max, QString("wrong maximum. Expected: %1, actual: %2").arg(max).arg(actualMax)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkLimits" +void GTSpinBox::checkLimits(GUITestOpStatus &os, const QString &spinBoxName, int min, int max, QWidget *parent){ + GTSpinBox::checkLimits(os, GTWidget::findExactWidget<QSpinBox *>(os, spinBoxName, parent), min, max); +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +} diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTSpinBox.h b/src/libs_3rdparty/QSpec/src/primitives/GTSpinBox.h new file mode 100644 index 0000000000000000000000000000000000000000..09700c659b45879bdb57b4c3bcd26bfeaf5a1dfe --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTSpinBox.h @@ -0,0 +1,47 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GT_SPINBOX_H_ +#define _HI_GT_SPINBOX_H_ + +#include "GTGlobals.h" +#include <QSpinBox> + +namespace HI { +/*! + * \brief The class for working with QSpinBox primitive + */ +class HI_EXPORT GTSpinBox { +public: + static int getValue(GUITestOpStatus &os, QSpinBox *spinBox); + static int getValue(GUITestOpStatus &os, const QString &spinBoxName, QWidget *parent = NULL); + + static void setValue(GUITestOpStatus &os, QSpinBox *spinBox, int v, GTGlobals::UseMethod useMethod = GTGlobals::UseMouse); + static void setValue(GUITestOpStatus &os, const QString &spinBoxName, int v, GTGlobals::UseMethod useMethod = GTGlobals::UseMouse, QWidget *parent = NULL); + static void setValue(GUITestOpStatus &os, const QString &spinBoxName, int v, QWidget *parent = NULL); + + static void checkLimits(GUITestOpStatus &os, QSpinBox *spinBox, int min, int max); + static void checkLimits(GUITestOpStatus &os, const QString &spinBoxName, int min, int max, QWidget *parent = NULL); +}; + +} // namespace + +#endif diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTTabBar.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTTabBar.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d175ac788a8a661c234f720b914214a3461938a2 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTTabBar.cpp @@ -0,0 +1,55 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <drivers/GTKeyboardDriver.h> +#include <drivers/GTMouseDriver.h> +#include "primitives/GTTabBar.h" +#include <primitives/GTWidget.h> + +#include <QToolButton> + +namespace HI { +#define GT_CLASS_NAME "GTTabBar" + +#define GT_METHOD_NAME "setCurrentIndex" +void GTTabBar::setCurrentIndex(GUITestOpStatus& os, QTabBar *tabBar, int index) { + + GT_CHECK(tabBar != NULL, "QTabWidget* == NULL"); + + if(tabBar->currentIndex() == index){ + return; + } + + int tabsCount = tabBar->count(); + GT_CHECK(index>=0 && index<tabsCount, "invalid index"); + + // TODO: set index by mouse/keyboard + tabBar->setCurrentIndex(index); + GTGlobals::sleep(); + + int currIndex = tabBar->currentIndex(); + GT_CHECK(currIndex == index, "Can't set index"); +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +} diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTTabBar.h b/src/libs_3rdparty/QSpec/src/primitives/GTTabBar.h new file mode 100644 index 0000000000000000000000000000000000000000..efb3236f3d619ef08c8bc5d2a644c1da1dd78b13 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTTabBar.h @@ -0,0 +1,38 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GT_TABBAR_H_ +#define _HI_GT_TABBAR_H_ + +#include "GTGlobals.h" +#include <QTabBar> + +namespace HI { + +class HI_EXPORT GTTabBar { +public: + // fails if the tabbar is NULL, index is not in a tabbar's range + // or a tabbar's index differs from a given index in the end of method's execution + static void setCurrentIndex(GUITestOpStatus& os, QTabBar *tabBar, int index); +}; + +} +#endif // _HI_GT_TABBAR_H_ diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTTabWidget.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTTabWidget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..16c7c021aafb1aa226df7610e706bf2d12f84387 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTTabWidget.cpp @@ -0,0 +1,136 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <drivers/GTKeyboardDriver.h> +#include <drivers/GTMouseDriver.h> +#include "primitives/GTTabBar.h" +#include "primitives/GTTabWidget.h" +#include <primitives/GTWidget.h> + +namespace HI { + +#define GT_CLASS_NAME "GTTabWidget" + +#define GT_METHOD_NAME "setCurrentIndex" +void GTTabWidget::setCurrentIndex(GUITestOpStatus& os, QTabWidget * const tabWidget, int index) { + + GT_CHECK(tabWidget != NULL, "QTabWidget* == NULL"); + + int tabsCount = tabWidget->count(); + GT_CHECK(index>=0 && index<tabsCount, "invalid index"); + + QTabBar* tabBar = tabWidget->findChild<QTabBar*>(); + GTTabBar::setCurrentIndex(os, tabBar, index); + + int currIndex = tabWidget->currentIndex(); + GT_CHECK(currIndex == index, "Can't set index"); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getTabBar" +QTabBar* GTTabWidget::getTabBar(GUITestOpStatus &os, QTabWidget* tabWidget){ + Q_UNUSED(os) + GT_CHECK_RESULT(tabWidget != NULL, "tabWidget is NULL", NULL); + QList<QTabBar*> tabBars= tabWidget->findChildren<QTabBar*>(); + int numToCheck = tabBars.size(); + GT_CHECK_RESULT(numToCheck < 2, QString("too many tab bars found: ").arg(numToCheck), NULL); + GT_CHECK_RESULT(numToCheck != 0, "tab bar not found", NULL); + return tabBars.first(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "clickTab" +void GTTabWidget::clickTab(GUITestOpStatus &os, QTabWidget * const tabWidget, int tabIndex, Qt::MouseButton button){ + GT_CHECK(tabWidget != NULL, "tabWidget is NULL"); + setCurrentIndex(os, tabWidget, tabIndex); + QTabBar* tabBar = getTabBar(os, tabWidget); + QRect r = tabBar->tabRect(tabIndex); + GTMouseDriver::moveTo(tabBar->mapToGlobal(r.center())); + GTMouseDriver::click(button); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "clickTab" +void GTTabWidget::clickTab(GUITestOpStatus &os, const QString &tabWidgetName, QWidget const * const parent, int tabIndex, Qt::MouseButton button) { + clickTab(os, GTWidget::findExactWidget<QTabWidget *>(os, tabWidgetName, parent), tabIndex, button); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "clickTab" +void GTTabWidget::clickTab(GUITestOpStatus &os, QTabWidget * const tabWidget, const QString &tabName, Qt::MouseButton button){ + int num = getTabNumByName(os, tabWidget, tabName); + clickTab(os, tabWidget, num, button); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "clickTab" +void GTTabWidget::clickTab(GUITestOpStatus &os, const QString &tabWidgetName, QWidget const * const parent, const QString &tabName, Qt::MouseButton button) { + clickTab(os, GTWidget::findExactWidget<QTabWidget *>(os, tabWidgetName, parent), tabName, button); +} +#undef GT_METHOD_NAME + +QString GTTabWidget::getTabName(GUITestOpStatus &os, QTabWidget *tabWidget, int idx){ + return getTabBar(os, tabWidget)->tabText(idx); +} + +#define GT_METHOD_NAME "getTabNumByName" +int GTTabWidget::getTabNumByName(GUITestOpStatus &os, QTabWidget *tabWidget, QString tabName){ + GT_CHECK_RESULT(tabWidget != NULL, "tabWidget is NULL", -1); + QTabBar* tabBar = getTabBar(os, tabWidget); + int num = -1; + for(int i=0; i<tabBar->count(); i++){ + QString text = tabBar->tabText(i); + if(text == tabName){ + num = i; + break; + } + } + GT_CHECK_RESULT(num != -1, "tab " + tabName + " not found", -1); + return num; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getTabCornerWidget" +QWidget* GTTabWidget::getTabCornerWidget(GUITestOpStatus &os, QTabWidget *tabWidget, int idx){ + QWidget* result = GTTabWidget::getTabBar(os, tabWidget)->tabButton(idx, QTabBar::RightSide); + GT_CHECK_RESULT(result != NULL, "corner widget not found", NULL); + return result; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getTabCornerWidget" +QWidget* GTTabWidget::getTabCornerWidget(GUITestOpStatus &os, QTabWidget *tabWidget, QString tabName){ + int idx = getTabNumByName(os, tabWidget, tabName); + return getTabCornerWidget(os, tabWidget, idx); +} +#undef GT_METHOD_NAME + +void GTTabWidget::closeTab(GUITestOpStatus &os, QTabWidget *tabWidget, int idx){ + GTWidget::click(os, getTabCornerWidget(os, tabWidget, idx)); +} + +void GTTabWidget::closeTab(GUITestOpStatus &os, QTabWidget *tabWidget, QString tabName){ + GTWidget::click(os, getTabCornerWidget(os, tabWidget, tabName)); +} + +#undef GT_CLASS_NAME + +} diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTTabWidget.h b/src/libs_3rdparty/QSpec/src/primitives/GTTabWidget.h new file mode 100644 index 0000000000000000000000000000000000000000..0045c59b0d444d1261d3d3b47aff78336980c5d6 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTTabWidget.h @@ -0,0 +1,55 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GT_TABWIDGET_H_ +#define _HI_GT_TABWIDGET_H_ + +#include "GTGlobals.h" +#include <QTabWidget> + +namespace HI { + +class HI_EXPORT GTTabWidget { +public: + // fails if the tabwidget is NULL, index is not in a tabwidget's range + // or a tabwidget's index differs from a given index in the end of method's execution + static void setCurrentIndex(GUITestOpStatus& os, QTabWidget * const tabWidget, int index); + static QTabBar* getTabBar(GUITestOpStatus &os, QTabWidget* tabWidget); + + static void clickTab(GUITestOpStatus &os, QTabWidget * const tabWidget, int tabIndex, Qt::MouseButton button = Qt::LeftButton); + static void clickTab(GUITestOpStatus &os, const QString &tabWidgetName, QWidget const * const parent, int tabIndex, Qt::MouseButton button = Qt::LeftButton); + static void clickTab(GUITestOpStatus &os, QTabWidget * const tabWidget, const QString &tabName, Qt::MouseButton button = Qt::LeftButton); + static void clickTab(GUITestOpStatus &os, const QString &tabWidgetName, const QWidget * const parent, const QString &tabName, Qt::MouseButton button = Qt::LeftButton); + + static QString getTabName(GUITestOpStatus &os, QTabWidget* tabWidget, int idx); + + static int getTabNumByName(GUITestOpStatus &os, QTabWidget* tabWidget, QString tabName); + static QWidget* getTabCornerWidget(GUITestOpStatus &os, QTabWidget* tabWidget, int idx); + static QWidget* getTabCornerWidget(GUITestOpStatus &os, QTabWidget* tabWidget, QString tabName); + + static void closeTab(GUITestOpStatus &os, QTabWidget *tabWidget, int idx); + static void closeTab(GUITestOpStatus &os, QTabWidget *tabWidget, QString tabName); + + +}; + +} +#endif // _HI_GT_TABWIDGET_H_ diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTTableView.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTTableView.cpp new file mode 100644 index 0000000000000000000000000000000000000000..65ce6e570be9bc0dbf154e8a86b3163db8d7024f --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTTableView.cpp @@ -0,0 +1,70 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "primitives/GTTableView.h" +#include <primitives/GTWidget.h> + +namespace HI{ + +#define GT_CLASS_NAME "GTSpinBox" +#define GT_METHOD_NAME "getCellPosition" +QPoint GTTableView::getCellPosition(GUITestOpStatus &os, QTableView *table, int column, int row){ + GT_CHECK_RESULT(table,"table view is NULL",QPoint()); + QPoint p(table->columnViewportPosition(column)+table->columnWidth(column)/2, + table->rowViewportPosition(row)+table->rowHeight(row)*1.5); + QPoint pGlob = table->mapToGlobal(p); + return pGlob; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getCellPoint" +QPoint GTTableView::getCellPoint(GUITestOpStatus &os, QTableView *table, int row, int column) { + QModelIndex idx = table->model()->index(row, column); + table->scrollTo(idx); + QRect rect = table->visualRect(idx); + QWidget *content = GTWidget::findWidget(os, "qt_scrollarea_viewport", table); + return content->mapToGlobal(rect.center()); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "rowCount" +int GTTableView::rowCount(GUITestOpStatus &os, QTableView *table) { + Q_UNUSED(os); + GT_CHECK_RESULT(NULL != table, "Table view is NULL", -1); + GT_CHECK_RESULT(NULL != table->model(), "Table view model is NULL", -1); + return table->model()->rowCount(QModelIndex()); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "data" +QString GTTableView::data(GUITestOpStatus &os, QTableView *table, int row, int column) { + Q_UNUSED(os); + GT_CHECK_RESULT(NULL != table, "Table view is NULL", ""); + GT_CHECK_RESULT(NULL != table->model(), "Table view model is NULL", ""); + + QModelIndex idx = table->model()->index(row, column); + GT_CHECK_RESULT(idx.isValid(), "Item index is invalid", ""); + return table->model()->data(idx, Qt::DisplayRole).toString(); +} +#undef GT_METHOD_NAME +#undef GT_CLASS_NAME + +} diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTTableView.h b/src/libs_3rdparty/QSpec/src/primitives/GTTableView.h new file mode 100644 index 0000000000000000000000000000000000000000..dd8d2bccd295861d2cd7d4ffba331b5168bbaf16 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTTableView.h @@ -0,0 +1,40 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ +#ifndef GTTABLEVIEW_H +#define GTTABLEVIEW_H + +#include "GTGlobals.h" + +#include <QPoint> +#include <QTableView> + +namespace HI{ + +class HI_EXPORT GTTableView { +public: + static QPoint getCellPosition(GUITestOpStatus &os, QTableView *table, int column, int row); + static QPoint getCellPoint(GUITestOpStatus &os, QTableView *table, int row, int column); + static int rowCount(GUITestOpStatus &os, QTableView *table); + static QString data(GUITestOpStatus &os, QTableView *table, int row, int column); +}; + +} +#endif // GTTABLEVIEW_H diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTTextEdit.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTTextEdit.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c89d852d4cf4537753bdf3a47ff7086e6e20a2ad --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTTextEdit.cpp @@ -0,0 +1,82 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <drivers/GTKeyboardDriver.h> +#include "primitives/GTTextEdit.h" +#include <primitives/GTWidget.h> +#include "utils/GTKeyboardUtils.h" + +namespace HI { + +#define GT_CLASS_NAME "GTTextEdit" + +#define GT_METHOD_NAME "" +void GTTextEdit::setText(GUITestOpStatus& os, QTextEdit* textEdit, const QString &text) { + + GT_CHECK(textEdit != NULL, "plainTextEdit is NULL"); + + if(textEdit->toPlainText() == text){ + return; + } + + clear(os, textEdit); + GTWidget::setFocus(os, textEdit); + + GTKeyboardDriver::keySequence(text); + GTGlobals::sleep(500); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getText" +QString GTTextEdit::getText(GUITestOpStatus &os, QTextEdit *textEdit) { + Q_UNUSED(os); + GT_CHECK_RESULT(NULL != textEdit, "Text edit is NULL", ""); + return textEdit->toPlainText(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "containsString" +bool GTTextEdit::containsString(GUITestOpStatus &os, QTextEdit *textEdit, const QString &string) { + const QString text = getText(os, textEdit); + return text.contains(string); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "clear" +void GTTextEdit::clear(GUITestOpStatus& os, QTextEdit* textEdit) { + + GT_CHECK(textEdit != NULL, "textEdit is NULL"); + + GTWidget::setFocus(os, textEdit); + + GTKeyboardUtils::selectAll(os); + GTGlobals::sleep(100); + GTKeyboardDriver::keyClick( Qt::Key_Delete); + GTGlobals::sleep(1000); + + QString s = textEdit->toPlainText(); + GT_CHECK(s.isEmpty() == true, "Can't clear text, textEdit is not empty"); + } +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +} diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTTextEdit.h b/src/libs_3rdparty/QSpec/src/primitives/GTTextEdit.h new file mode 100644 index 0000000000000000000000000000000000000000..7366b1b4dcb42b967d098a5af487a38c75f1491a --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTTextEdit.h @@ -0,0 +1,44 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GT_TEXTEDIT_H_ +#define _HI_GT_TEXTEDIT_H_ + +#include "GTGlobals.h" +#include <QTextEdit> + +namespace HI { + +class HI_EXPORT GTTextEdit { +public: + // fails if textEdit is NULL + // or a set text differs from a given text + static void setText(GUITestOpStatus& os, QTextEdit* textEdit, const QString &text); + static QString getText(GUITestOpStatus &os, QTextEdit* textEdit); + + static bool containsString(GUITestOpStatus &os, QTextEdit *textEdit, const QString &string); + + static void clear(GUITestOpStatus& os, QTextEdit* textEdit); +}; + +} + +#endif // _HI_GT_TEXTEDIT_H_ diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTToolbar.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTToolbar.cpp new file mode 100644 index 0000000000000000000000000000000000000000..144fdb34e2201f884faef9d6a531d3ecb2d348e2 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTToolbar.cpp @@ -0,0 +1,99 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "primitives/GTToolbar.h" +#include "primitives/GTWidget.h" + +#include <QAction> + +namespace HI { +#define GT_CLASS_NAME "GTToolbar" + +#define GT_METHOD_NAME "getToolbar" + QToolBar* GTToolbar::getToolbar(GUITestOpStatus &os, const QString &toolbarSysName) { + QString toolbarTypeCheck = "QToolBar"; + QToolBar *toolbar = static_cast<QToolBar*>(GTWidget::findWidget(os, toolbarSysName)); + GT_CHECK_RESULT((toolbar != NULL) && 0 == toolbarTypeCheck.compare(toolbar->metaObject()->className()), "No such toolbar: " + toolbarSysName, NULL); //the found widget is not a qtoolbar + return toolbar; + } +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getWidgetForAction" + QWidget* GTToolbar::getWidgetForAction(GUITestOpStatus &os, const QToolBar *toolbar, QAction *action) { + QString toolbarTypeCheck = "QToolBar"; + GT_CHECK_RESULT((toolbar != NULL) && (0 == toolbarTypeCheck.compare(toolbar->metaObject()->className())), "Toolbar not found", NULL); //the found widget is not a qtoolbar or doesn't exist + QWidget *widget = toolbar->widgetForAction(action); + GT_CHECK_RESULT(widget != NULL, "No widget for action", NULL); + return widget; + } +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getWidgetForActionName" + QWidget* GTToolbar::getWidgetForActionName(GUITestOpStatus &os, const QToolBar *toolbar, const QString &actionName) { + QString toolbarTypeCheck = "QToolBar"; + GT_CHECK_RESULT((toolbar != NULL) && (0 == toolbarTypeCheck.compare(toolbar->metaObject()->className())), "Toolbar not found", NULL); //the found widget is not a qtoolbar or doesn't exist + QAction *action = GTToolbar::getToolbarAction(os, actionName, toolbar); + GT_CHECK_RESULT(action != NULL, "No such action:" + actionName, NULL); + return GTToolbar::getWidgetForAction(os, toolbar, action); + } +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getWidgetForActionTooltip" + QWidget* GTToolbar::getWidgetForActionTooltip(GUITestOpStatus &os, const QToolBar *toolbar, const QString &tooltip) { + QString toolbarTypeCheck = "QToolBar"; + GT_CHECK_RESULT((toolbar != NULL) && (0 == toolbarTypeCheck.compare(toolbar->metaObject()->className())), "Toolbar not found", NULL); //the found widget is not a qtoolbar or doesn't exist + QAction *action = NULL; + foreach (QAction* a, toolbar->actions()) { + if (a->toolTip() == tooltip) { + action = a; + break; + } + } + GT_CHECK_RESULT(action != NULL, "No action with such tooltip: " + tooltip, NULL); + return GTToolbar::getWidgetForAction(os, toolbar, action); + } +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "clickButtonByTooltipOnToolbar" +void GTToolbar::clickButtonByTooltipOnToolbar(GUITestOpStatus &os, const QString &toolbarSysName, const QString &tooltip) { + GTWidget::click(os, GTToolbar::getWidgetForActionTooltip(os, getToolbar(os, toolbarSysName), tooltip)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getToolbarAction" + QAction* GTToolbar::getToolbarAction(GUITestOpStatus &os, const QString &actionName, const QToolBar *toolbar) { + QString toolbarTypeCheck = "QToolBar"; + GT_CHECK_RESULT((toolbar != NULL) && (0 == toolbarTypeCheck.compare(toolbar->metaObject()->className())), "Toolbar not found", NULL); //the found widget is not a qtoolbar or doesn't exist + QAction *action = NULL; + foreach(QAction* a, toolbar->actions()) { + const QString& aname = a->objectName(); + if (aname == actionName) { + action = a; + } + } + return action; + } +#undef GT_METHOD_NAME + + +#undef GT_CLASS_NAME + +} diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTToolbar.h b/src/libs_3rdparty/QSpec/src/primitives/GTToolbar.h new file mode 100644 index 0000000000000000000000000000000000000000..8d3f8708bfe554d09d904bbd9bba8d457359171f --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTToolbar.h @@ -0,0 +1,50 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GUI_GTTOOLBAR_H_ +#define _HI_GUI_GTTOOLBAR_H_ + +#include "GTGlobals.h" +#include <QToolBar> + +namespace HI { + +class HI_EXPORT GTToolbar { +public: + + static QToolBar* getToolbar(GUITestOpStatus &os, const QString &toolbarSysName); + + static QWidget* getWidgetForAction(GUITestOpStatus &os, const QToolBar *toolbar, QAction *action); + static QWidget* getWidgetForActionName(GUITestOpStatus &os, const QToolBar *toolbar, const QString &actionName); + static QWidget* getWidgetForActionTooltip(GUITestOpStatus &os, const QToolBar *toolbar, const QString &tooltip); + + static void clickButtonByTooltipOnToolbar(GUITestOpStatus &os, const QString &toolbarSysName, const QString &tooltip); + +private: + + static QAction* getToolbarAction(GUITestOpStatus &os, const QString &actionName, const QToolBar *toolbar); + + +}; + +} // namespace + +#endif diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTTreeView.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTTreeView.cpp new file mode 100644 index 0000000000000000000000000000000000000000..66e6598915a092fd0b4a0720ea14cccfe161b14c --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTTreeView.cpp @@ -0,0 +1,96 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "primitives/GTTreeView.h" + +#include <QAbstractItemModel> + + +namespace HI{ + +#define GT_CLASS_NAME "GTTreeView" +#define GT_METHOD_NAME "findIndex" +QModelIndex GTTreeView::findIndex(GUITestOpStatus &os, QTreeView* treeView, QVariant data, Qt::ItemDataRole role, + const GTGlobals::FindOptions& options){ + return findIndex(os, treeView, data, QModelIndex(), role, options); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "findIndex" +QModelIndex GTTreeView::findIndex(GUITestOpStatus &os, QTreeView* treeView, QVariant data, QModelIndex parent, Qt::ItemDataRole role, + const GTGlobals::FindOptions& options){ + + GT_CHECK_RESULT(treeView != NULL, "Tree widget is NULL", QModelIndex()); + + QModelIndexList foundIndexes = findIndexes(os, treeView, data, role,parent, 0, options); + if (foundIndexes.isEmpty()) { + if(options.failIfNotFound){ + GT_CHECK_RESULT(foundIndexes.size() != 0, QString("Item whith name %1 not found").arg(data.toString()), QModelIndex()); + } else { + return QModelIndex(); + } + } + + GT_CHECK_RESULT(foundIndexes.size() == 1, QString("there are %1 items with name %2").arg(foundIndexes.size()).arg(data.toString()), QModelIndex()); + + treeView->scrollTo(foundIndexes.at(0)); + return foundIndexes.at(0); + +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "findIndexes" +QModelIndexList GTTreeView::findIndexes(GUITestOpStatus &os, QTreeView* treeView, QVariant data, Qt::ItemDataRole role, + QModelIndex parent, int depth, const GTGlobals::FindOptions& options){ + QModelIndexList foundIndexes; + if (!(GTGlobals::FindOptions::INFINITE_DEPTH == options.depth || depth < options.depth)) { + return foundIndexes; + } + + QAbstractItemModel *model = treeView->model(); + CHECK_SET_ERR_RESULT(NULL != model, "Model is NULL", foundIndexes); + + int rowcount = model->rowCount(parent); + for (int i = 0; i < rowcount; i++) { + const QModelIndex index = model->index(i, 0, parent); + QVariant indexData = index.data(role); + + if (data == indexData) { + foundIndexes << index; + } else { + foundIndexes << findIndexes(os, treeView, data, role, index, depth + 1, options); + } + } + + return foundIndexes; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getItemCenter" +QPoint GTTreeView::getItemCenter(GUITestOpStatus &, QTreeView *treeView, const QModelIndex &itemIndex) { + QRect r = treeView->visualRect(itemIndex); + + return treeView->mapToGlobal(r.center()); +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME +} diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTTreeView.h b/src/libs_3rdparty/QSpec/src/primitives/GTTreeView.h new file mode 100644 index 0000000000000000000000000000000000000000..23b299f0cfa5102fb5585f17072925b68a3b95b9 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTTreeView.h @@ -0,0 +1,50 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef GTTREEVIEW_H +#define GTTREEVIEW_H + +#include "GTGlobals.h" +#include <QTreeView> + +namespace HI{ + +class HI_EXPORT GTTreeView +{ +public: + //find index with data and role in the tree view + static QModelIndex findIndex(GUITestOpStatus &os, QTreeView* treeView, QVariant data, Qt::ItemDataRole role = Qt::DisplayRole, + const GTGlobals::FindOptions& = GTGlobals::FindOptions()); + + //find index with data and role for current parent index + static QModelIndex findIndex(GUITestOpStatus &os, QTreeView* treeView, QVariant data, QModelIndex parent, Qt::ItemDataRole role = Qt::DisplayRole, + const GTGlobals::FindOptions& = GTGlobals::FindOptions()); + + static QPoint getItemCenter(GUITestOpStatus &os, QTreeView* treeView, const QModelIndex &itemIndex); + +private: + static QModelIndexList findIndexes(GUITestOpStatus &os, QTreeView* treeView, QVariant data, Qt::ItemDataRole role = Qt::DisplayRole, + QModelIndex parent = QModelIndex(), int depth = 0, const GTGlobals::FindOptions& = GTGlobals::FindOptions()); +}; + +} + +#endif // GTTREEVIEW_H diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTTreeWidget.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTTreeWidget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1eacee4e4a482f5b3ac5eb925375da2abb1e9dc1 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTTreeWidget.cpp @@ -0,0 +1,271 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + + +#include <drivers/GTKeyboardDriver.h> +#include <drivers/GTMouseDriver.h> +#include "primitives/GTTreeWidget.h" +#include <primitives/GTWidget.h> + +#include <QHeaderView> + +namespace HI { + +#define GT_CLASS_NAME "GTUtilsTreeView" + +#define GT_METHOD_NAME "expand" +void GTTreeWidget::expand(GUITestOpStatus &os, QTreeWidgetItem* item) { + if (item == NULL) { + return; + } + expand(os, item->parent()); + GT_CHECK(item->isHidden() == false, "parent item is hidden"); + + QTreeWidget *treeWidget = item->treeWidget(); + GT_CHECK(item->isHidden() == false, "parent item is hidden"); + + treeWidget->scrollToItem(item); + + QRect itemRect = treeWidget->visualItemRect(item); + if (!item->isExpanded()) { + QPoint p = QPoint(itemRect.left() - 8, itemRect.center().y()); + + GTMouseDriver::moveTo(treeWidget->viewport()->mapToGlobal(p)); + GTMouseDriver::click(); + } +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkItem" +void GTTreeWidget::checkItem(GUITestOpStatus &os, QTreeWidgetItem *item, int column, GTGlobals::UseMethod method) { + Q_UNUSED(os); + GT_CHECK(NULL != item, "treeWidgetItem is NULL"); + GT_CHECK(0 <= column, "The column number is invalid"); + + QTreeWidget *tree = item->treeWidget(); + GT_CHECK(NULL != tree, "The tree widget is NULL"); + + const QRect itemRect = getItemRect(os, item); + const QPoint indentationOffset(tree->indentation(), 0); + const QPoint itemStartPos = QPoint(itemRect.left(), itemRect.center().y()) - indentationOffset; + const QPoint columnOffset(tree->columnViewportPosition(column), 0); + const QPoint itemLevelOffset(getItemLevel(os, item) * tree->indentation(), 0); + + switch (method) { + case GTGlobals::UseKeyBoard: { + const QPoint cellCenterOffset(tree->columnWidth(column) / 2, itemRect.height() / 2); + GTMouseDriver::moveTo(itemStartPos + itemLevelOffset + columnOffset + cellCenterOffset); + GTMouseDriver::click(); + GTKeyboardDriver::keyClick( Qt::Key_Space); + break; + } + case GTGlobals::UseMouse: { + const QPoint magicCheckBoxOffset = QPoint(15, 0); + GTMouseDriver::moveTo(tree->viewport()->mapToGlobal(itemStartPos + itemLevelOffset + columnOffset + magicCheckBoxOffset)); + GTMouseDriver::click(); + break; + } + default: + GT_CHECK(false, "Method is not implemented"); + } +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getItemRect" +QRect GTTreeWidget::getItemRect(GUITestOpStatus &os, QTreeWidgetItem* item) { + GT_CHECK_RESULT(item != NULL, "treeWidgetItem is NULL", QRect()); + + QTreeWidget *treeWidget = item->treeWidget(); + GT_CHECK_RESULT(treeWidget != NULL, "treeWidget is NULL", QRect()); + + expand(os, item); + GT_CHECK_RESULT(item->isHidden() == false, "item is hidden", QRect()); + + QRect rect = treeWidget->visualItemRect(item); + + return rect; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getItemCenter" +QPoint GTTreeWidget::getItemCenter(GUITestOpStatus &os, QTreeWidgetItem* item) { + + GT_CHECK_RESULT(item != NULL, "item is NULL", QPoint()); + + QTreeWidget *treeWidget = item->treeWidget(); + GT_CHECK_RESULT(treeWidget != NULL, "treeWidget is NULL", QPoint()); + + QPoint p = getItemRect(os, item).center(); + + return treeWidget->viewport()->mapToGlobal(p); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getItems" +QList<QTreeWidgetItem*> GTTreeWidget::getItems(QTreeWidgetItem* root) { + + QList<QTreeWidgetItem*> treeItems; + + for (int i=0; i<root->childCount(); i++) { + treeItems.append(root->child(i)); + treeItems.append(getItems(root->child(i))); + } + + return treeItems; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getItems" +QList<QTreeWidgetItem *> GTTreeWidget::getItems(GUITestOpStatus &os, QTreeWidget *treeWidget) { + Q_UNUSED(os); + GT_CHECK_RESULT(NULL != treeWidget, "Tree widget is NULL", QList<QTreeWidgetItem *>()); + return getItems(treeWidget->invisibleRootItem()); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getItemNames" +QStringList GTTreeWidget::getItemNames(GUITestOpStatus &os, QTreeWidget *treeWidget) { + QStringList itemNames; + QList<QTreeWidgetItem *> items = getItems(os, treeWidget); + foreach (QTreeWidgetItem *item, items) { + itemNames << item->text(0); + } + return itemNames; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "findItemPrivate" +QTreeWidgetItem * GTTreeWidget::findItemPrivate(GUITestOpStatus &os, QTreeWidget *tree, const QString &text, QTreeWidgetItem *parent, int column, const GTGlobals::FindOptions &options) { + Q_UNUSED(os); + GT_CHECK_RESULT(tree != NULL, "tree widget is NULL", NULL); + + if (parent == NULL) { + parent = tree->invisibleRootItem(); + } + + GTGlobals::FindOptions innerOptions(options); + if (options.depth != GTGlobals::FindOptions::INFINITE_DEPTH) { + innerOptions.depth--; + } + + const QList<QTreeWidgetItem *> list = getItems(parent); + foreach (QTreeWidgetItem *item, list){ + const QString itemText = item->text(column); + if (options.matchPolicy.testFlag(Qt::MatchExactly) && itemText == text) { + return item; + } else if (options.matchPolicy.testFlag(Qt::MatchContains) && itemText.contains(text)) { + return item; + } + + if (options.depth == GTGlobals::FindOptions::INFINITE_DEPTH || + innerOptions.depth > 0) { + QTreeWidgetItem * childItem = findItemPrivate(os, tree, text, item, column, innerOptions); + if (NULL != childItem) { + return childItem; + } + } + } + return NULL; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "findItem" +QTreeWidgetItem * GTTreeWidget::findItem(GUITestOpStatus &os, QTreeWidget *tree, const QString &text, QTreeWidgetItem *parent, int column, const GTGlobals::FindOptions &options) { + QTreeWidgetItem* result = findItemPrivate(os, tree, text, parent, column, options); + if(options.failIfNotFound){ + CHECK_SET_ERR_RESULT(result != NULL, QString("Item '%1' not found").arg(text), NULL); + } + return result; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "findItems" +QList<QTreeWidgetItem *> GTTreeWidget::findItems(GUITestOpStatus &os, QTreeWidget *tree, const QString &text, QTreeWidgetItem *parent, int column, const GTGlobals::FindOptions &options) { + QList<QTreeWidgetItem *> items; + + GT_CHECK_RESULT(tree != NULL, "tree widget is NULL", items); + + if (parent == NULL) { + parent = tree->invisibleRootItem(); + } + + GTGlobals::FindOptions innerOptions(options); + if (options.depth != GTGlobals::FindOptions::INFINITE_DEPTH) { + innerOptions.depth--; + } + + const QList<QTreeWidgetItem *> list = getItems(parent); + foreach (QTreeWidgetItem *item, list) { + const QString itemText = item->text(column); + if (options.matchPolicy.testFlag(Qt::MatchExactly) && itemText == text) { + items << item; + } else if (options.matchPolicy.testFlag(Qt::MatchContains) && itemText.contains(text)) { + items << item; + } + + if (options.depth == GTGlobals::FindOptions::INFINITE_DEPTH || + innerOptions.depth > 0) { + items << findItems(os, tree, text, item, column, innerOptions); + } + } + + return items; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "click" +void GTTreeWidget::click(GUITestOpStatus &os, QTreeWidgetItem *item, int column) { + GT_CHECK(item != NULL, "item is NULL"); + QTreeWidget* tree = item->treeWidget(); + tree->scrollToItem(item); + + QPoint point; + if (-1 == column) { + point = getItemCenter(os, item); + } else { + const QRect itemRect = getItemRect(os, item); + point = tree->viewport()->mapToGlobal(itemRect.topLeft()); + point += QPoint(tree->columnViewportPosition(column) + tree->columnWidth(column) / 2, itemRect.height() / 2); + } + + GTMouseDriver::moveTo(point); + GTMouseDriver::click(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getItemLevel" +int GTTreeWidget::getItemLevel(GUITestOpStatus &os, QTreeWidgetItem *item) { + Q_UNUSED(os); + GT_CHECK_RESULT(item != NULL, "item is NULL", -1); + + int level = 0; + while (NULL != item->parent()) { + level++; + item = item->parent(); + } + + return level; +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +} diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTTreeWidget.h b/src/libs_3rdparty/QSpec/src/primitives/GTTreeWidget.h new file mode 100644 index 0000000000000000000000000000000000000000..3aff2b6ed25300fd3ecbc6253381c65f965af880 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTTreeWidget.h @@ -0,0 +1,65 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GT_TREE_WIDGET_H_ +#define _HI_GT_TREE_WIDGET_H_ + +#include "GTGlobals.h" + +#include <QTreeWidget> +#include <QTreeWidgetItem> + +namespace HI { + +class HI_EXPORT GTTreeWidget { +public: + // expands treeWidget to the item and returns item's rect + static QRect getItemRect(GUITestOpStatus &os, QTreeWidgetItem* item); + + static QPoint getItemCenter(GUITestOpStatus &os, QTreeWidgetItem* item); + + // recursively expands the tree making the given item visible + // fails if item is NULL, item is hidden or item wasn't expanded + static void expand(GUITestOpStatus &os, QTreeWidgetItem* item); + + // Checks the tree item or unchecks it if it is already checked + static void checkItem(GUITestOpStatus &os, QTreeWidgetItem *item, int column = 0, GTGlobals::UseMethod method = GTGlobals::UseMouse); + + // gets all items under root recursively and returns a list of them + static QList<QTreeWidgetItem*> getItems(QTreeWidgetItem* root); + static QList<QTreeWidgetItem*> getItems(GUITestOpStatus &os, QTreeWidget *treeWidget); + static QStringList getItemNames(GUITestOpStatus &os, QTreeWidget *treeWidget); + + static QTreeWidgetItem * findItem(GUITestOpStatus &os, QTreeWidget *tree, const QString &text, QTreeWidgetItem *parent = NULL, int column = 0, const GTGlobals::FindOptions &options = GTGlobals::FindOptions()); + + static QList<QTreeWidgetItem *> findItems(GUITestOpStatus &os, QTreeWidget *tree, const QString &text, QTreeWidgetItem *parent = NULL, int column = 0, const GTGlobals::FindOptions &options = GTGlobals::FindOptions()); + + static void click(GUITestOpStatus &os, QTreeWidgetItem* item, int column = -1); // column == -1 - item center + + // Returns item level, 0 - top level item + static int getItemLevel(GUITestOpStatus &os, QTreeWidgetItem *item); +private: + static QTreeWidgetItem * findItemPrivate(GUITestOpStatus &os, QTreeWidget *tree, const QString &text, QTreeWidgetItem *parent = NULL, int column = 0, const GTGlobals::FindOptions &options = GTGlobals::FindOptions()); +}; + +} // namespace + +#endif diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTWebView.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTWebView.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9694aa0b26a0ab1c1b18e5040a0030fa0ec96c82 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTWebView.cpp @@ -0,0 +1,302 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QDebug> +#include <QWebFrame> + +#include "GTWebView.h" +#include "core/MainThreadRunnable.h" +#include "drivers/GTMouseDriver.h" +#include "utils/GTThread.h" + +namespace HI { +namespace { + +bool compare(QString s1, QString s2, bool exactMatch){ + if(exactMatch){ + return s1==s2; + }else{ + return s1.contains(s2); + } +} +} + +HIWebElement::HIWebElement(){ + rect = QRect(); + text = QString(); + xml = QString(); +} + +HIWebElement::HIWebElement(const QWebElement &el) + : rect(el.geometry()), + text(el.toPlainText()), + xml(el.toInnerXml()), + tag(el.tagName()), + idAttribute(el.attribute("id")) +{ + foreach (const QString &name, el.attributeNames()) { + attributesMap.insert(name, el.attribute(name)); + } +} + +const QRect &HIWebElement::geometry() const { + return rect; +} + +const QString &HIWebElement::toInnerXml() const { + return xml; +} + +const QString &HIWebElement::toPlainText() const { + return text; +} + +const QString &HIWebElement::tagName() const { + return tag; +} + +const QString &HIWebElement::id() const { + return idAttribute; +} + +const QMap<QString, QString> &HIWebElement::attributes() const { + return attributesMap; +} + +QString HIWebElement::attribute(const QString &name, const QString &defaultValue) const { + return attributesMap.value(name, defaultValue); +} + +#define GT_CLASS_NAME "GTWebView" + +#define GT_METHOD_NAME "findElement" +HIWebElement GTWebView::findElement(GUITestOpStatus &os, QWebView *view, const QString &text, const QString &tag, bool exactMatch) { + foreach (const HIWebElement &element, findElementsBySelector(os, view, tag, GTGlobals::FindOptions())) { + if (compare(element.toPlainText(), text, exactMatch)) { + return element; + } + } + + GT_CHECK_RESULT(false, QString("element with text '%1' and tag '%2' not found").arg(text).arg(tag), HIWebElement()); + return HIWebElement(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "findElementById" +HIWebElement GTWebView::findElementById(GUITestOpStatus &os, QWebView *view, const QString &id, const QString &tag) { + const QString selector = id.isEmpty() ? tag : QString("%1 [id='%2']").arg(tag).arg(id); + return findElementBySelector(os, view, selector, GTGlobals::FindOptions()); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "findElementsById" +QList<HIWebElement> GTWebView::findElementsById(GUITestOpStatus &os, QWebView *view, const QString &id, const QString &tag, const HIWebElement &parentElement) { + const QString parentQuery = parentElement.tagName().isEmpty() ? "" : parentElement.tagName() + (id.isEmpty() ? "" : "[id=" + parentElement.id() + "]") + " "; + const QString elementQuery = tag + (id.isEmpty() ? "" : "[id=" + id + "]"); + return findElementsBySelector(os, view, parentQuery + elementQuery, GTGlobals::FindOptions()); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "findElementBySelector" +HIWebElement GTWebView::findElementBySelector(GUITestOpStatus &os, QWebView *view, const QString &selector, const GTGlobals::FindOptions &options) { + class Scenario : public CustomScenario { + public: + Scenario(QWebView *view, const QString &selector, const GTGlobals::FindOptions &options, HIWebElement &webElement) : + view(view), + selector(selector), + options(options), + webElement(webElement) {} + + void run(GUITestOpStatus &os) { + Q_UNUSED(os) + QWebFrame* frame = view->page()->mainFrame(); + foreach (const QWebElement &el, frame->findAllElements(selector)) { + const int width = el.geometry().width(); + + if (options.searchInHidden || width != 0) { + webElement = HIWebElement(el); + return; + } + } + + if (options.failIfNotFound) { + GT_CHECK(false, QString("There are no elements that match selector '%1'").arg(selector)); + } + } + + private: + QWebView *view; + const QString selector; + const GTGlobals::FindOptions options; + HIWebElement &webElement; + }; + + HIWebElement webElement; + MainThreadRunnable mainThreadRunnable(os, new Scenario(view, selector, options, webElement)); + mainThreadRunnable.doRequest(); + return webElement; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "findElementsBySelector" +QList<HIWebElement> GTWebView::findElementsBySelector(GUITestOpStatus &os, QWebView *view, const QString &selector, const GTGlobals::FindOptions &options) { + class Scenario : public CustomScenario { + public: + Scenario(QWebView *view, const QString &selector, const GTGlobals::FindOptions &options, QList<HIWebElement> &webElements) : + view(view), + selector(selector), + options(options), + webElements(webElements) {} + + void run(GUITestOpStatus &os) { + Q_UNUSED(os); + QWebFrame* frame = view->page()->mainFrame(); + foreach (const QWebElement &el, frame->findAllElements(selector)) { + const int width = el.geometry().width(); + + if (options.searchInHidden || width != 0) { + webElements << HIWebElement(el); + } + } + + if (webElements.isEmpty() && options.failIfNotFound) { + GT_CHECK(!webElements.isEmpty(), QString("There are no elements that match selector '%1'").arg(selector)); + } + } + + private: + QWebView *view; + const QString selector; + const GTGlobals::FindOptions options; + QList<HIWebElement> &webElements; + }; + + QList<HIWebElement> webElements; + MainThreadRunnable mainThreadRunnable(os, new Scenario(view, selector, options, webElements)); + mainThreadRunnable.doRequest(); + return webElements; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkElement" +void GTWebView::checkElement(GUITestOpStatus &os, QWebView *view, QString text, QString tag, bool exists, bool exactMatch){ + const bool found = doesElementExist(os, view, text, tag, exactMatch); + if (exists) { + GT_CHECK(found, "element with text " + text + " and tag " + tag + " not found"); + } else { + GT_CHECK(!found, "element with text " + text + " and tag " + tag + " unexpectedly found"); + } +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "doesElementExist" +bool GTWebView::doesElementExist(GUITestOpStatus &os, QWebView *view, const QString &text, const QString &tag, bool exactMatch) { + class Scenario : public CustomScenario { + public: + Scenario(QWebView *view, const QString &text, const QString &tag, bool exactMatch, bool &webElementExists) : + view(view), + text(text), + tag(tag), + exactMatch(exactMatch), + webElementExists(webElementExists) {} + + void run(GUITestOpStatus &os) { + Q_UNUSED(os); + webElementExists = false; + QWebFrame* frame = view->page()->mainFrame(); + foreach (QWebElement el, frame->findAllElements(tag)) { + QString s = el.toPlainText(); + int width = el.geometry().width(); + + if (compare(s, text, exactMatch) && width != 0) { + webElementExists = true; + return; + } + } + } + + private: + QWebView *view; + const QString text; + const QString tag; + bool exactMatch; + bool &webElementExists; + }; + + bool webElementExists; + MainThreadRunnable mainThreadRunnable(os, new Scenario(view, text, tag, exactMatch, webElementExists)); + mainThreadRunnable.doRequest(); + return webElementExists; +} +#undef GT_METHOD_NAME + +HIWebElement GTWebView::findTreeElement(GUITestOpStatus &os, QWebView *view, QString text){ + return findElement(os, view, text, "SPAN"); +} + +HIWebElement GTWebView::findContextMenuElement(GUITestOpStatus &os, QWebView *view, QString text){ + return findElement(os, view, text, "LI"); +} + +void GTWebView::click(GUITestOpStatus &os, QWebView *view, HIWebElement el, Qt::MouseButton button){ + GTMouseDriver::moveTo(view->mapToGlobal(el.geometry().center())); + GTMouseDriver::click(button); + GTThread::waitForMainThread(); +} + +void GTWebView::selectElementText(GUITestOpStatus &os, QWebView *view, HIWebElement el){ + GTMouseDriver::moveTo(view->mapToGlobal(el.geometry().topLeft()) + QPoint(5,5)); + GTMouseDriver::press(); + GTMouseDriver::moveTo(view->mapToGlobal(el.geometry().bottomRight()) - QPoint(5,5)); + GTMouseDriver::release(); +} + +void GTWebView::traceAllWebElements(GUITestOpStatus &os, QWebView *view){ + class Scenario : public CustomScenario { + public: + Scenario(QWebView *view) : + view(view) {} + + void run(GUITestOpStatus &os) { + Q_UNUSED(os); + QWebFrame* frame = view->page()->mainFrame(); + foreach (QWebElement el, frame->findAllElements("*")) { + QString s = el.toPlainText(); + QString tagName = el.tagName(); + QString localName = el.localName(); + + if (el.geometry().width() != 0){ + qDebug("GT_DEBUG_MESSAGE tag: %s name: %s text: %s width: %d", tagName.toLocal8Bit().constData(), localName.toLocal8Bit().constData(), s.toLocal8Bit().constData(), el.geometry().width()); + } + } + } + + private: + QWebView *view; + }; + + MainThreadRunnable mainThreadRunnable(os, new Scenario(view)); + mainThreadRunnable.doRequest(); +} + +#undef GT_CLASS_NAME + +} diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTWebView.h b/src/libs_3rdparty/QSpec/src/primitives/GTWebView.h new file mode 100644 index 0000000000000000000000000000000000000000..ad0a08983dcd61867b2c7ce12d98781a17e843a3 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTWebView.h @@ -0,0 +1,77 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef GTWEBVIEW_H +#define GTWEBVIEW_H + +#include "GTGlobals.h" + +#include <QWebView> +#include <QWebElement> + +namespace HI { + +class HI_EXPORT HIWebElement{ +public: + HIWebElement(); + HIWebElement(const QWebElement& el); + + const QRect &geometry() const; + const QString &toInnerXml() const; + const QString &toPlainText() const; + const QString &tagName() const; + const QString &id() const; + const QMap<QString, QString> &attributes() const; + QString attribute(const QString &name, const QString &defaultValue = QString()) const; + +private: + QRect rect; + QString text; + QString xml; + QString tag; + QString idAttribute; + QMap<QString, QString> attributesMap; +}; + +class HI_EXPORT GTWebView{ +public: + static HIWebElement findElement(GUITestOpStatus &os, QWebView *view, const QString &text, const QString &tag = "*", bool exactMatch = false); + static HIWebElement findElementById(GUITestOpStatus &os, QWebView *view, const QString &id, const QString &tag = "*"); + static QList<HIWebElement> findElementsById(GUITestOpStatus &os, QWebView *view, const QString &id, const QString &tag = "*", const HIWebElement &parentElement = HIWebElement()); + + // Selectors: https://www.w3.org/TR/selectors/ + static HIWebElement findElementBySelector(GUITestOpStatus &os, QWebView *view, const QString &selector, const GTGlobals::FindOptions &options = GTGlobals::FindOptions()); + static QList<HIWebElement> findElementsBySelector(GUITestOpStatus &os, QWebView *view, const QString &selector, const GTGlobals::FindOptions &options = GTGlobals::FindOptions()); + + static void checkElement(GUITestOpStatus &os, QWebView *view, QString text, QString tag = "*", bool exists = true, bool exactMatch = false); + static bool doesElementExist(GUITestOpStatus &os, QWebView *view, const QString &text, const QString &tag = "*", bool exactMatch = false); + + static void click(GUITestOpStatus &os, QWebView *view, HIWebElement el, Qt::MouseButton button = Qt::LeftButton); + static void selectElementText(GUITestOpStatus &os, QWebView *view, HIWebElement el); + static HIWebElement findTreeElement(GUITestOpStatus &os, QWebView *view, QString text); + static HIWebElement findContextMenuElement(GUITestOpStatus &os, QWebView *view, QString text); + + static void traceAllWebElements(GUITestOpStatus &os, QWebView *view); +}; + +} + +#endif // GTWEBVIEW_H diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTWidget.cpp b/src/libs_3rdparty/QSpec/src/primitives/GTWidget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8dd925a4356afd0a3772bbcc2d43d68e9150aa6a --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTWidget.cpp @@ -0,0 +1,422 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QApplication> +#include <QComboBox> +#include <QDesktopWidget> +#include <QGuiApplication> +#include <QLineEdit> +#include <QMainWindow> +#include <QStyle> + +#include "drivers/GTMouseDriver.h" +#include "primitives/GTMainWindow.h" +#include "primitives/GTWidget.h" +#include "utils/GTThread.h" + +namespace HI { +#define GT_CLASS_NAME "GTWidget" + +#define GT_METHOD_NAME "click" +void GTWidget::click(GUITestOpStatus &os, QWidget *w, Qt::MouseButton mouseButton, QPoint p, bool safe) { + GTGlobals::sleep(100); + GT_CHECK(w != NULL, "widget is NULL"); +// GT_CHECK(w->isEnabled() == true, "widget " + w->objectName() + "is not enabled"); + + if (p.isNull()) { + p = w->rect().center(); + + // TODO: this is a fast fix + if (w->objectName().contains("ADV_single_sequence_widget")) { + p += QPoint(0, 8); + } + } + GTMouseDriver::moveTo(w->mapToGlobal(p)); + if (safe) { + GTMouseDriver::click(mouseButton); + } else { + //sometimes GTGlobals::sleep(os) should not be used after clicking + GTMouseDriver::press(mouseButton); + GTMouseDriver::release(mouseButton); + } + GTGlobals::sleep(200); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setFocus" +void GTWidget::setFocus(GUITestOpStatus &os, QWidget *w) { + GT_CHECK(w != NULL, "widget is NULL"); + + GTWidget::click(os, w); + GTGlobals::sleep(200); + + if(!qobject_cast<QComboBox*>(w)){ + GT_CHECK(w->hasFocus(), QString("Can't set focus on widget '%1'").arg(w->objectName())); + } + +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "findWidget" +QWidget* GTWidget::findWidget(GUITestOpStatus &os, const QString &widgetName, QWidget const * const parentWidget, const GTGlobals::FindOptions& options) { + Q_UNUSED(os); + + if (parentWidget == NULL) { + QList<QWidget*> list; + foreach(QWidget* parent, GTMainWindow::getMainWindowsAsWidget(os)){ + list << parent->findChildren<QWidget*>(widgetName); + } + if (options.failIfNotFound) { + GT_CHECK_RESULT(list.count() != 0, QString("Widget '%1' not found").arg(widgetName), NULL); + } + GT_CHECK_RESULT(list.count()<2, QString("There are %1 widgets with name '%2'").arg(list.count()).arg(widgetName), NULL); + if (list.count() == 0) { + return NULL; + } else { + return list.takeFirst(); + } + } + QWidget* widget = parentWidget->findChild<QWidget*>(widgetName); + + if (options.failIfNotFound) { + GT_CHECK_RESULT(widget != NULL, "Widget " + widgetName + " not found", NULL); + } + + return widget; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getWidgetCenter" +QPoint GTWidget::getWidgetCenter(GUITestOpStatus &os, QWidget *w){ + Q_UNUSED(os) + return w->mapToGlobal(w->rect().center()); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "findButtonByText" +QAbstractButton* GTWidget::findButtonByText(GUITestOpStatus &os, const QString &text, QWidget *parentWidget, const GTGlobals::FindOptions& options) { + + if (parentWidget == NULL) { + QList<QAbstractButton*> resultList; + foreach(QWidget* parent, GTMainWindow::getMainWindowsAsWidget(os)){ + QList<QAbstractButton*> list = parent->findChildren<QAbstractButton*>(); + foreach(QAbstractButton* ab, list){ + if(ab->text().contains(text, Qt::CaseInsensitive)){ + resultList.append(ab); + } + } + } + + if (options.failIfNotFound) { + GT_CHECK_RESULT(resultList.count()!=0,"button not found", NULL); + } + GT_CHECK_RESULT(resultList.count()<2, QString("There are %1 buttons with this text").arg(resultList.count()), NULL); + if(resultList.count() == 0){ + return NULL; + }else{ + return resultList.takeFirst(); + } + } + QList<QAbstractButton*> buttonList = parentWidget->findChildren<QAbstractButton*>(); + QList<QAbstractButton*> foundButtonList; + QStringList sL; + + foreach(QAbstractButton* but, buttonList){ + sL.append(but->text()); + if (but->text().contains(text, Qt::CaseInsensitive)){ + foundButtonList << but; + } + } + + GT_CHECK_RESULT(foundButtonList.count()<=1, QString("there are %1 buttons with such text").arg(foundButtonList.count()), NULL); + + if (options.failIfNotFound) { + GT_CHECK_RESULT(foundButtonList.count() != 0, QString("button with this text <%1> not found").arg(text), NULL); + } + + return foundButtonList.takeFirst(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "findWidget" +void GTWidget::getAllWidgetsInfo(GUITestOpStatus &os, QWidget *parent){ + + QList<QObject*> list; + if(parent == NULL){ + foreach(QWidget* parent, GTMainWindow::getMainWindowsAsWidget(os)){ + list.append(parent->findChildren<QObject*>()); + } + }else{ + list = parent->findChildren<QObject*>(); + } + QString actStr; + actStr.append("Getting all info about widget\n"); + + foreach(QObject* act, list){ + actStr.append(act->objectName()+ " " + act->metaObject()->className() + " " + /*QString("%1").arg(act->isVisible()) + " " + QString("%1").arg(act->geometry().width()) +*/ "\n"); + } + CHECK_SET_ERR(false, actStr); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "close" +void GTWidget::close(GUITestOpStatus &os, QWidget *widget) { + GT_CHECK(NULL != widget, "Widget is NULL"); + + class Scenario : public CustomScenario { + public: + Scenario(QWidget *widget) : + widget(widget) + { + + } + + void run(GUITestOpStatus &os) { + Q_UNUSED(os); + CHECK_SET_ERR(NULL != widget, "Widget is NULL"); + widget->close(); + GTGlobals::sleep(100); + } + + private: + QWidget *widget; + }; + + GTThread::runInMainThread(os, new Scenario(widget)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "showMaximized" +void GTWidget::showMaximized(GUITestOpStatus &os, QWidget *widget) { + GT_CHECK(NULL != widget, "Widget is NULL"); + + class Scenario : public CustomScenario { + public: + Scenario(QWidget *widget) : + widget(widget) + { + + } + + void run(GUITestOpStatus &os) { + Q_UNUSED(os); + CHECK_SET_ERR(NULL != widget, "Widget is NULL"); + widget->showMaximized(); + GTGlobals::sleep(100); + } + + private: + QWidget *widget; + }; + + GTThread::runInMainThread(os, new Scenario(widget)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "showNormal" +void GTWidget::showNormal(GUITestOpStatus &os, QWidget *widget) { + GT_CHECK(NULL != widget, "Widget is NULL"); + + class Scenario : public CustomScenario { + public: + Scenario(QWidget *widget) : + widget(widget) + { + + } + + void run(GUITestOpStatus &os) { + Q_UNUSED(os); + CHECK_SET_ERR(NULL != widget, "Widget is NULL"); + widget->showNormal(); + GTGlobals::sleep(100); + } + + private: + QWidget *widget; + }; + + GTThread::runInMainThread(os, new Scenario(widget)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getColor" +QColor GTWidget::getColor(GUITestOpStatus &os, QWidget *widget, const QPoint &point) { + Q_UNUSED(os); + GT_CHECK_RESULT(NULL != widget, "Widget is NULL", QColor()); + + return QColor(getImage(os, widget).pixel(point)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getPixmap" +QPixmap GTWidget::getPixmap(GUITestOpStatus &os, QWidget *widget) { + Q_UNUSED(os); + GT_CHECK_RESULT(NULL != widget, "Widget is NULL", QPixmap()); + + class Scenario : public CustomScenario { + public: + Scenario(QWidget *widget, QPixmap &pixmap) : + widget(widget), + pixmap(pixmap) + { + + } + + void run(GUITestOpStatus &os) { + Q_UNUSED(os); + CHECK_SET_ERR(NULL != widget, "Widget to grab is NULL"); + pixmap = widget->grab(widget->rect()); + } + + private: + QWidget *widget; + QPixmap &pixmap; + }; + + QPixmap pixmap; + GTThread::runInMainThread(os, new Scenario(widget, pixmap)); + return pixmap; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getImage" +QImage GTWidget::getImage(GUITestOpStatus &os, QWidget *widget) { + Q_UNUSED(os); + GT_CHECK_RESULT(NULL != widget, "Widget is NULL", QImage()); + + return getPixmap(os, widget).toImage(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "clickLabelLink" +void GTWidget::clickLabelLink(GUITestOpStatus &os, QWidget *label, int step, int indent){ + + QRect r = label->rect(); + + int left = r.left(); + int right = r.right(); + int top = r.top() + indent; + int bottom = r.bottom(); + for(int i = left; i < right; i+=step){ + for(int j = top; j < bottom; j+=step){ + GTMouseDriver::moveTo(label->mapToGlobal(QPoint(i,j))); + if(label->cursor().shape() == Qt::PointingHandCursor){ + GTGlobals::sleep(500); + GTMouseDriver::click(); + return; + } + } + } + GT_CHECK(false, "label does not contain link"); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "clickWindowTitle" +void GTWidget::clickWindowTitle(GUITestOpStatus &os, QWidget *window) { + GT_CHECK(NULL != window, "Window is NULL"); + + QStyleOptionTitleBar opt; + opt.initFrom(window); + const QRect titleLabelRect = window->style()->subControlRect(QStyle::CC_TitleBar, &opt, QStyle::SC_TitleBarLabel); + GTMouseDriver::moveTo(getWidgetGlobalTopLeftPoint(os, window) + titleLabelRect.center()); + GTMouseDriver::click(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "moveWidgetTo" +void GTWidget::moveWidgetTo(GUITestOpStatus &os, QWidget *window, const QPoint &point){ + //QPoint(window->width()/2,3) - is hack + GTMouseDriver::moveTo(getWidgetGlobalTopLeftPoint(os, window) + QPoint(window->width()/2,3)); + const QPoint p0 = getWidgetGlobalTopLeftPoint(os, window) + QPoint(window->width()/2,3); + const QPoint p1 = point + QPoint(window->width()/2,3); + GTMouseDriver::dragAndDrop(p0, p1); + GTGlobals::sleep(1000); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "resizeWidget" +void GTWidget::resizeWidget(GUITestOpStatus &os, QWidget *widget, const QSize &size) { + GT_CHECK(NULL != widget, "Widget is NULL"); + + QRect displayRect = QApplication::desktop()->screenGeometry(); + GT_CHECK( (displayRect.width() >= size.width()) && (displayRect.height() >= size.height()) , "Specified the size larger than the size of the screen"); + + bool neededPositionFound = false; + QSize oldSize = widget->size(); + + QPoint topLeftPos = getWidgetGlobalTopLeftPoint(os, widget) + QPoint(5, 5); + for (int i=0; i<5; i++){ + GTMouseDriver::moveTo(topLeftPos); + QPoint newTopLeftPos = topLeftPos + QPoint(widget->frameGeometry().width() - 1, widget->frameGeometry().height() - 1) - QPoint(size.width(), size.height()); + GTMouseDriver::dragAndDrop(topLeftPos, newTopLeftPos); + if (widget->size() != oldSize){ + neededPositionFound = true; + break; + }else{ + topLeftPos -= QPoint(1,1); + } + } + GT_CHECK(neededPositionFound, "Needed mouse position for resizing not found"); + + GTGlobals::sleep(1000); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getWidgetGlobalTopLeftPoint" +QPoint GTWidget::getWidgetGlobalTopLeftPoint(GUITestOpStatus &os, QWidget *widget) { + Q_UNUSED(os); + GT_CHECK_RESULT(NULL != widget, "Widget is NULL", QPoint()); + return (widget->isWindow() ? widget->pos() : widget->parentWidget()->mapToGlobal(QPoint(0, 0))); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getActiveModalWidget" +QWidget *GTWidget::getActiveModalWidget(GUITestOpStatus &os) { + Q_UNUSED(os); + QWidget *modalWidget = QApplication::activeModalWidget(); + GT_CHECK_RESULT(NULL != modalWidget, "Active modal widget is NULL", NULL); + return modalWidget; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkEnabled" +void GTWidget::checkEnabled(GUITestOpStatus &os, QWidget *widget, bool expectedEnabledState) { + Q_UNUSED(os); + GT_CHECK(NULL != widget, "Widget is NULL"); + GT_CHECK(widget->isVisible(), "Widget is not visible"); + const bool actualEnabledState = widget->isEnabled(); + GT_CHECK(expectedEnabledState == actualEnabledState, + QString("Widget state is incorrect: expected '%1', got '%'2") + .arg(expectedEnabledState ? "enabled" : "disabled") + .arg(actualEnabledState ? "enabled" : "disabled")); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkEnabled" +void GTWidget::checkEnabled(GUITestOpStatus &os, const QString &widgetName, bool expectedEnabledState, QWidget const * const parent) { + checkEnabled(os, GTWidget::findWidget(os, widgetName, parent), expectedEnabledState); +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +} //namespace diff --git a/src/libs_3rdparty/QSpec/src/primitives/GTWidget.h b/src/libs_3rdparty/QSpec/src/primitives/GTWidget.h new file mode 100644 index 0000000000000000000000000000000000000000..d06620f95fa19661c72a36facdf9c0efdf583dc2 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/GTWidget.h @@ -0,0 +1,91 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GUI_GTWIDGET_H_ +#define _HI_GUI_GTWIDGET_H_ + +#include "GTGlobals.h" + +#include <QAbstractButton> +#include <QPushButton> +#include <QWidget> + +namespace HI { +/*! + * \brief The class for working with QWidget primitive + */ +class HI_EXPORT GTWidget { +public: + // fails if widget is NULL, not visible or not enabled; if p isNull, clicks on the center of widget + static void click(GUITestOpStatus &os, QWidget *w, Qt::MouseButton mouseButton = Qt::LeftButton, QPoint p = QPoint(), bool safe = true); + + // fails if widget is NULL, GTWidget::click fails or widget hasn't got focus + static void setFocus(GUITestOpStatus &os, QWidget *w); + + // finds widget with the given object name using given FindOptions. Parent widget is QMainWindow, if not set + static QWidget *findWidget(GUITestOpStatus &os, const QString &widgetName, const QWidget * const parentWidget = NULL, const GTGlobals::FindOptions& = GTGlobals::FindOptions()); + static QPoint getWidgetCenter(GUITestOpStatus &os, QWidget* w); + + static QAbstractButton *findButtonByText(GUITestOpStatus &os, const QString &text, QWidget *parentWidget = NULL, const GTGlobals::FindOptions& = GTGlobals::FindOptions()); + + //returns color of point p in widget w coordinates + static QColor getColor(GUITestOpStatus &os, QWidget *widget, const QPoint &point); + static QPixmap getPixmap(GUITestOpStatus &os, QWidget *widget); + static QImage getImage(GUITestOpStatus &os, QWidget *widget); + + //this method writes info about all widgets to opStatus + static void getAllWidgetsInfo(GUITestOpStatus &os, QWidget* parent=NULL); + + static void close(GUITestOpStatus &os, QWidget *widget); + static void showMaximized(GUITestOpStatus &os, QWidget *widget); + static void showNormal(GUITestOpStatus &os, QWidget *widget); + + static void clickLabelLink(GUITestOpStatus &os, QWidget* label, int step = 10, int indent = 0); + static void clickWindowTitle(GUITestOpStatus &os, QWidget *window); + static void moveWidgetTo(GUITestOpStatus &os, QWidget *window, const QPoint &point); + static void resizeWidget(GUITestOpStatus &os, QWidget *widget, const QSize &size); + static QPoint getWidgetGlobalTopLeftPoint(GUITestOpStatus &os, QWidget *widget); + + static QWidget *getActiveModalWidget(GUITestOpStatus &os); + + static void checkEnabled(GUITestOpStatus &os, QWidget *widget, bool expectedEnabledState = true); + static void checkEnabled(GUITestOpStatus &os, const QString &widgetName, bool expectedEnabledState = true, QWidget const * const parent = NULL); + + #define GT_CLASS_NAME "GTWidget" + #define GT_METHOD_NAME "findWidget" + template<class T> + static T findExactWidget(GUITestOpStatus &os, const QString &widgetName, QWidget const * const parentWidget = NULL, const GTGlobals::FindOptions& options= GTGlobals::FindOptions()){ + T result = NULL; + QWidget* w = findWidget(os, widgetName, parentWidget, options); + result = qobject_cast<T>(w); + if(options.failIfNotFound == true){ + GT_CHECK_RESULT(w != NULL, "widget " + widgetName + " not found", result); + GT_CHECK_RESULT(result != NULL, "widget of specefied class not found, but there is another widget with the same name, its class is: " + QString(w->metaObject()->className()), result); + } + return result; + } + #undef GT_METHOD_NAME + #undef GT_CLASS_NAME +}; + +} //namespace + +#endif diff --git a/src/libs_3rdparty/QSpec/src/primitives/PopupChooser.cpp b/src/libs_3rdparty/QSpec/src/primitives/PopupChooser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7100ed47e8231752a9707d7ce09654da8c48f546 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/PopupChooser.cpp @@ -0,0 +1,289 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "primitives/PopupChooser.h" +#include "drivers/GTKeyboardDriver.h" +#include "primitives/GTMenu.h" +#include "drivers/GTMouseDriver.h" + +#include <QApplication> +#include <QMenu> + +namespace HI { +#define GT_CLASS_NAME "PopupChooser" + +PopupChooser::PopupChooser(GUITestOpStatus &os, const QStringList &namePath, GTGlobals::UseMethod useMethod) + : Filler(os, GUIDialogWaiter::WaitSettings(QString(), GUIDialogWaiter::Popup)), + namePath(namePath), + useMethod(useMethod) +{ + +} + +#define GT_METHOD_NAME "run" +void PopupChooser::commonScenario() { + GTGlobals::sleep(1000); + GTMouseDriver::release(); + QMenu* activePopupMenu = qobject_cast<QMenu*>(QApplication::activePopupWidget()); + GT_CHECK(NULL != activePopupMenu, "Active popup menu is NULL"); + + if (!namePath.isEmpty()) { + GTMenu::clickMenuItemByName(os, activePopupMenu, namePath, useMethod); + } else { + clickEsc(os); + } + + if (os.hasError()) { + clickEsc(os); + } +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "clickEsc" +void PopupChooser::clickEsc(GUITestOpStatus &) { + GTKeyboardDriver::keyClick(Qt::Key_Escape); +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +PopupChooserByText::PopupChooserByText(GUITestOpStatus &os, const QStringList &namePath, GTGlobals::UseMethod useMethod, Qt::MatchFlag matchFlag) + : Filler(os, GUIDialogWaiter::WaitSettings(QString(), GUIDialogWaiter::Popup)), + namePath(namePath), + useMethod(useMethod), + matchFlag(matchFlag) +{ + +} + +void PopupChooserByText::commonScenario() +{ + GTGlobals::sleep(1000); + GTMouseDriver::release(); + QMenu* activePopupMenu = qobject_cast<QMenu*>(QApplication::activePopupWidget()); + GTMenu::clickMenuItemByText(os, activePopupMenu, namePath, useMethod, matchFlag); +} + +#define GT_CLASS_NAME "PopupChecker" + +PopupChecker::PopupChecker(GUITestOpStatus &os, CustomScenario *scenario) : + Filler(os, GUIDialogWaiter::WaitSettings(QString(), GUIDialogWaiter::Popup), scenario) +{ + +} + +PopupChecker::PopupChecker(GUITestOpStatus &os, const QStringList &namePath, CheckOptions options, GTGlobals::UseMethod useMethod) + : Filler(os, GUIDialogWaiter::WaitSettings(QString(), GUIDialogWaiter::Popup)), + namePath(namePath), + options(options), + useMethod(useMethod) +{ + +} + +#define GT_METHOD_NAME "commonScenario" +void PopupChecker::commonScenario() { + GTGlobals::sleep(1000); + GTMouseDriver::release(); + QMenu* activePopupMenu = qobject_cast<QMenu*>(QApplication::activePopupWidget()); + GT_CHECK(NULL != activePopupMenu, "Active popup menu is NULL"); + + QAction* act; + if (!namePath.isEmpty()) { + QString actName; + int escCount = namePath.size(); + if(namePath.size()>1){ + actName = namePath.takeLast(); + GTMenu::clickMenuItemByName(os, activePopupMenu, namePath, useMethod); + QMenu* activePopupMenuToCheck = qobject_cast<QMenu*>(QApplication::activePopupWidget()); + act = GTMenu::getMenuItem(os, activePopupMenuToCheck, actName); + }else{ + QMenu* activePopupMenuToCheck = qobject_cast<QMenu*>(QApplication::activePopupWidget()); + actName = namePath.last(); + act = GTMenu::getMenuItem(os, activePopupMenuToCheck, actName); + } + + if(options.testFlag(Exists)){ + GT_CHECK(act != NULL, "action '" + actName + "' not found"); + qDebug("GT_DEBUG_MESSAGE options.testFlag(Exists)"); + }else{ + GT_CHECK(act == NULL, "action '" + actName + "' unexpectidly found"); + } + if(options.testFlag(IsEnabled)){ + GT_CHECK(act->isEnabled(), "action '" + act->objectName() + "' is not enabled"); + qDebug("GT_DEBUG_MESSAGE options.testFlag(IsEnabled)"); + } + if(options.testFlag(IsDisabled)){ + GT_CHECK(!act->isEnabled(), "action '" + act->objectName() + "' is enabled"); + qDebug("GT_DEBUG_MESSAGE options.testFlag(IsDisabled"); + } + if(options.testFlag(IsChecable)){ + GT_CHECK(act->isCheckable(), "action '" + act->objectName() + "' is not checkable"); + qDebug("GT_DEBUG_MESSAGE options.testFlag(IsChecable)"); + } + if(options.testFlag(IsChecked)){ + GT_CHECK(act->isChecked(), "action '" + act->objectName() + "' is not checked"); + qDebug("GT_DEBUG_MESSAGE options.testFlag(IsChecked)"); + } + if (options.testFlag(PopupChecker::IsUnchecked)){ + GT_CHECK(!act->isChecked(), "action '" + act->objectName() + "' is checked"); + qDebug("GT_DEBUG_MESSAGE options.testFlag(IsUnchecked)"); + } + for(int i = 0; i<escCount; i++){ + PopupChooser::clickEsc(os); + GTGlobals::sleep(300); + } + } else { + PopupChooser::clickEsc(os); + } + + if (os.hasError()) { + PopupChooser::clickEsc(os); + } +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +#define GT_CLASS_NAME "PopupCheckerByText" + +PopupCheckerByText::PopupCheckerByText(GUITestOpStatus &os, CustomScenario *scenario) : + Filler(os, GUIDialogWaiter::WaitSettings(QString(), GUIDialogWaiter::Popup), scenario) +{ + +} + +PopupCheckerByText::PopupCheckerByText(GUITestOpStatus &os, + const QStringList &namePath, + PopupChecker::CheckOptions options, + GTGlobals::UseMethod useMethod) : + Filler(os, GUIDialogWaiter::WaitSettings(QString(), GUIDialogWaiter::Popup)), + menuPath(namePath.mid(0, namePath.size() - 1)), + itemsNames(namePath.isEmpty() ? "" : namePath.last()), + options(options), + useMethod(useMethod) +{ + +} + +PopupCheckerByText::PopupCheckerByText(GUITestOpStatus &os, + const QStringList &menuPath, + const QStringList &itemsNames, + PopupChecker::CheckOptions options, + GTGlobals::UseMethod useMethod) : + Filler(os, GUIDialogWaiter::WaitSettings(QString(), GUIDialogWaiter::Popup)), + menuPath(menuPath), + itemsNames(itemsNames), + options(options), + useMethod(useMethod) +{ + +} + +PopupCheckerByText::PopupCheckerByText(GUITestOpStatus &os, + const QList<QStringList> &itemsPaths, + PopupChecker::CheckOptions options, + GTGlobals::UseMethod useMethod) : + Filler(os, GUIDialogWaiter::WaitSettings(QString(), GUIDialogWaiter::Popup)), + options(options), + useMethod(useMethod) +{ + CHECK_SET_ERR(!itemsPaths.isEmpty(), "itemsPaths is empty"); + menuPath = itemsPaths.first().mid(0, itemsPaths.first().size() - 1); + foreach (const QStringList &itemPath, itemsPaths) { + CHECK_SET_ERR(!itemPath.isEmpty(), "itemPath is empty"); + CHECK_SET_ERR(itemPath.mid(0, itemPath.size() - 1) == menuPath, "Items from different submenus were passed to the PopupCheckerByText constructor"); + itemsNames << itemPath.last(); + } +} + +#define GT_METHOD_NAME "commonScenario" +void PopupCheckerByText::commonScenario() { + GTGlobals::sleep(1000); + GTMouseDriver::release(); + QMenu* activePopupMenu = qobject_cast<QMenu *>(QApplication::activePopupWidget()); + GT_CHECK(NULL != activePopupMenu, "Active popup menu is NULL"); + + QAction* act = NULL; + + if (itemsNames.isEmpty()) { + PopupChooser::clickEsc(os); + return; + } + + if (!menuPath.isEmpty()) { + GTMenu::clickMenuItemByText(os, activePopupMenu, menuPath, useMethod); + } + + QMenu *activePopupMenuToCheck = qobject_cast<QMenu *>(QApplication::activePopupWidget()); + + foreach (const QString &itemName, itemsNames) { + act = GTMenu::getMenuItem(os, activePopupMenuToCheck, itemName, true); + if (options.testFlag(PopupChecker::Exists)) { + GT_CHECK(act != NULL, "action '" + itemName + "' not found"); + qDebug("GT_DEBUG_MESSAGE options.testFlag(Exists)"); + } else { + GT_CHECK(act == NULL, "action '" + itemName + "' unexpectidly found"); + } + + if (options.testFlag(PopupChecker::IsEnabled)) { + GT_CHECK(act->isEnabled(), "action '" + act->objectName() + "' is not enabled"); + qDebug("GT_DEBUG_MESSAGE options.testFlag(IsEnabled)"); + } + + if (options.testFlag(PopupChecker::IsDisabled)) { + GT_CHECK(!act->isEnabled(), "action '" + act->objectName() + "' is enabled"); + qDebug("GT_DEBUG_MESSAGE options.testFlag(IsDisabled"); + } + + if (options.testFlag(PopupChecker::IsChecable)) { + GT_CHECK(act->isCheckable(), "action '" + act->objectName() + "' is not checkable"); + qDebug("GT_DEBUG_MESSAGE options.testFlag(IsChecable)"); + } + + if (options.testFlag(PopupChecker::IsChecked)) { + GT_CHECK(act->isCheckable(), "action '" + act->objectName() + "' is not checked"); + qDebug("GT_DEBUG_MESSAGE options.testFlag(IsChecked)"); + } + + if (options.testFlag(PopupChecker::IsChecked)) { + GT_CHECK(act->isChecked(), "action '" + act->objectName() + "' is not checked"); + qDebug("GT_DEBUG_MESSAGE options.testFlag(IsChecked)"); + } + + if (options.testFlag(PopupChecker::IsUnchecked) ){ + GT_CHECK(!act->isChecked(), "action '" + act->objectName() + "' is checked"); + qDebug("GT_DEBUG_MESSAGE options.testFlag(IsUnchecked)"); + } + } + + for (int i = 0; i < menuPath.size(); i++) { + PopupChooser::clickEsc(os); + GTGlobals::sleep(100); + } + + PopupChooser::clickEsc(os); +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME +} + diff --git a/src/libs_3rdparty/QSpec/src/primitives/PopupChooser.h b/src/libs_3rdparty/QSpec/src/primitives/PopupChooser.h new file mode 100644 index 0000000000000000000000000000000000000000..e167796d5b0d46e3cb7f77a25f872cbf2f4a813d --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/PopupChooser.h @@ -0,0 +1,118 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GT_RUNNABLES_POPUP_CHOOSER_FILLER_H_ +#define _HI_GT_RUNNABLES_POPUP_CHOOSER_FILLER_H_ + +#include "GTGlobals.h" +#include "utils/GTUtilsDialog.h" + +namespace HI { + +class HI_EXPORT PopupChooser : public Filler { + friend class PopupChecker; + friend class PopupCheckerByText; +public: + PopupChooser(GUITestOpStatus &os, + const QStringList &namePath, + GTGlobals::UseMethod useMethod = GTGlobals::UseKey); //UseKey is needed for Ubuntu + + virtual void commonScenario(); + +protected: + QStringList namePath; + GTGlobals::UseMethod useMethod; + +private: + static void clickEsc(GUITestOpStatus &os); +}; + +class HI_EXPORT PopupChooserByText : public Filler { +public: + PopupChooserByText(GUITestOpStatus &os, + const QStringList &namePath, + GTGlobals::UseMethod useMethod = GTGlobals::UseKey, + Qt::MatchFlag _matchFlag = Qt::MatchExactly); //UseKey is needed for Ubuntu + + virtual void commonScenario(); + +protected: + QStringList namePath; + GTGlobals::UseMethod useMethod; + Qt::MatchFlag matchFlag; +}; + +class HI_EXPORT PopupChecker : public Filler { +public: + enum CheckOption{ + NotExists = 0, + Exists = 1, + IsEnabled = 2 | Exists, + IsDisabled = 4 | Exists, + IsChecable = 8 | Exists, + IsChecked = 16 | Exists | IsChecable, + IsUnchecked = 32 | Exists | IsChecable + }; + Q_DECLARE_FLAGS(CheckOptions, CheckOption) + + PopupChecker(GUITestOpStatus &os, CustomScenario *scenario); + PopupChecker(GUITestOpStatus &os, + const QStringList &namePath, + CheckOptions options = CheckOptions(IsEnabled), + GTGlobals::UseMethod _useMethod = GTGlobals::UseKey); //UseKey is needed for Ubuntu + + virtual void commonScenario(); + +protected: + QStringList namePath; + CheckOptions options; + GTGlobals::UseMethod useMethod; +}; +Q_DECLARE_OPERATORS_FOR_FLAGS(PopupChecker::CheckOptions) + +class HI_EXPORT PopupCheckerByText : public Filler { +public: + PopupCheckerByText(GUITestOpStatus &os, CustomScenario *scenario); + PopupCheckerByText(GUITestOpStatus &os, + const QStringList &namePath, + PopupChecker::CheckOptions options = PopupChecker::CheckOptions(PopupChecker::IsEnabled), + GTGlobals::UseMethod useMethod = GTGlobals::UseKey); //UseKey is needed for Ubuntu + PopupCheckerByText(GUITestOpStatus &os, + const QStringList &menuPath, + const QStringList &itemsNames, + PopupChecker::CheckOptions options = PopupChecker::CheckOptions(PopupChecker::IsEnabled), + GTGlobals::UseMethod useMethod = GTGlobals::UseKey); + PopupCheckerByText(GUITestOpStatus &os, + const QList<QStringList> &itemsPaths, + PopupChecker::CheckOptions options = PopupChecker::CheckOptions(PopupChecker::IsEnabled), + GTGlobals::UseMethod useMethod = GTGlobals::UseKey); + + virtual void commonScenario(); + +protected: + QStringList menuPath; + QStringList itemsNames; + PopupChecker::CheckOptions options; + GTGlobals::UseMethod useMethod; +}; +} + +#endif diff --git a/src/libs_3rdparty/QSpec/src/primitives/private/GTMenuPrivate.cpp b/src/libs_3rdparty/QSpec/src/primitives/private/GTMenuPrivate.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e83d40dd9725e415232678bbb7b194b9d2b095fa --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/private/GTMenuPrivate.cpp @@ -0,0 +1,146 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "GTMenuPrivate.h" +#ifdef Q_OS_MAC +#include "GTMenuPrivateMac.h" +#endif +#include "drivers/GTKeyboardDriver.h" +#include "drivers/GTMouseDriver.h" +#include "primitives/GTAction.h" +#include "primitives/GTMainWindow.h" +#include "primitives/PopupChooser.h" +#include "utils/GTUtilsDialog.h" + +#include <QMainWindow> +#include <QMenuBar> + +namespace HI { + +#define GT_CLASS_NAME "GTMenu" + +#define GT_METHOD_NAME "clickMainMenuItem" +void GTMenuPrivate::clickMainMenuItem(GUITestOpStatus &os, const QStringList &itemPath, GTGlobals::UseMethod method, Qt::MatchFlag matchFlag) { + GT_CHECK(itemPath.count() > 1, QString("Menu item path is too short: { %1 }").arg(itemPath.join(" -> "))); + qWarning("clickMainMenuItem is going to click menu: '%s'", itemPath.join(" -> ").toLocal8Bit().constData()); +#ifdef Q_OS_MAC + Q_UNUSED(method); + GTMenuPrivateMac::clickMainMenuItem(os, itemPath, matchFlag); +#else + QStringList cuttedItemPath = itemPath; + const QString menuName = cuttedItemPath.takeFirst(); + GTUtilsDialog::waitForDialog(os, new PopupChooserByText(os, cuttedItemPath, method, matchFlag)); + showMainMenu(os, menuName, method); +#endif +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkMainMenuItemState" +void GTMenuPrivate::checkMainMenuItemState(GUITestOpStatus &os, const QStringList &itemPath, PopupChecker::CheckOption expectedState) { + GT_CHECK(itemPath.count() > 1, QString("Menu item path is too short: { %1 }").arg(itemPath.join(" -> "))); + +#ifdef Q_OS_MAC + GTMenuPrivateMac::checkMainMenuItemState(os, itemPath, expectedState); +#else + QStringList cuttedItemPath = itemPath; + const QString menuName = cuttedItemPath.takeFirst(); + GTUtilsDialog::waitForDialog(os, new PopupCheckerByText(os, cuttedItemPath, expectedState, GTGlobals::UseMouse)); + showMainMenu(os, menuName, GTGlobals::UseMouse); + GTGlobals::sleep(100); +#endif +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkMainMenuItemState" +void GTMenuPrivate::checkMainMenuItemsState(GUITestOpStatus &os, const QStringList &menuPath, const QStringList &itemsNames, PopupChecker::CheckOption expectedState) { + GT_CHECK(menuPath.count() > 0, QString("Menu path is too short: { %1 }").arg(menuPath.join(" -> "))); + GT_CHECK(itemsNames.count() > 0, QString("There are no menu items to check: %1").arg(itemsNames.join(", "))); + +#ifdef Q_OS_MAC + GTMenuPrivateMac::checkMainMenuItemsState(os, menuPath, itemsNames, expectedState); +#else + QStringList cutMenuPath = menuPath; + const QString menuName = cutMenuPath.takeFirst(); + GTUtilsDialog::waitForDialog(os, new PopupCheckerByText(os, cutMenuPath, itemsNames, expectedState, GTGlobals::UseMouse)); + showMainMenu(os, menuName, GTGlobals::UseMouse); + GTGlobals::sleep(100); +#endif +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "showMainMenu" +void GTMenuPrivate::showMainMenu(GUITestOpStatus &os, const QString &menuName, GTGlobals::UseMethod m) { + + QMainWindow* mainWindow = NULL; + QList<QAction*> resultList; + foreach(QWidget* parent, GTMainWindow::getMainWindowsAsWidget(os)){ + QList<QAction*> list = parent->findChildren<QAction*>(); + bool isContainMenu = false; + foreach(QAction* act, list){ + QString name = act->text().replace('&',""); + if(name == menuName){ + resultList<<act; + isContainMenu = true; + } + } + if (isContainMenu){ + mainWindow = qobject_cast<QMainWindow*>(parent); + } + } + GT_CHECK_RESULT(resultList.count()!=0,"action not found", ); + GT_CHECK_RESULT(resultList.count()<2, QString("There are %1 actions with this text").arg(resultList.count()), ); + + QAction *menu = resultList.takeFirst(); + + QPoint pos; + QPoint gPos; + QString menuText; + int key = 0; + int key_pos = 0; + + switch(m) { + case GTGlobals::UseMouse: + pos = mainWindow->menuBar()->actionGeometry(menu).center(); + gPos = mainWindow->menuBar()->mapToGlobal(pos); + + GTMouseDriver::moveTo(gPos); + GTMouseDriver::click(); + break; + + case GTGlobals::UseKey: + menuText = menu->text(); + key_pos = menuText.indexOf('&'); + key = (menuText.at(key_pos + 1)).toLatin1(); + + GTKeyboardDriver::keyClick( key, Qt::AltModifier); + break; + + default: + break; + } + + GTGlobals::sleep(1000); +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +} // namespace diff --git a/src/libs_3rdparty/QSpec/src/primitives/private/GTMenuPrivate.h b/src/libs_3rdparty/QSpec/src/primitives/private/GTMenuPrivate.h new file mode 100644 index 0000000000000000000000000000000000000000..4aa1ab7fc5f9eb85c1e77c232b943c11902cf483 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/private/GTMenuPrivate.h @@ -0,0 +1,43 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GT_MENU_PRIVATE_H_ +#define _HI_GT_MENU_PRIVATE_H_ + +#include "GTGlobals.h" +#include "primitives/PopupChooser.h" + +namespace HI { + +class GTMenuPrivate { +public: + static void clickMainMenuItem(GUITestOpStatus &os, const QStringList &itemPath, GTGlobals::UseMethod method = GTGlobals::UseMouse, Qt::MatchFlag matchFlag = Qt::MatchExactly); + static void checkMainMenuItemState(GUITestOpStatus &os, const QStringList &itemPath, PopupChecker::CheckOption expectedState); + static void checkMainMenuItemsState(GUITestOpStatus &os, const QStringList &menuPath, const QStringList &itemsNames, PopupChecker::CheckOption expectedState); + +private: + static void showMainMenu(GUITestOpStatus &os, const QString &menuName, GTGlobals::UseMethod m = GTGlobals::UseMouse); + +}; + +} // namespace + +#endif diff --git a/src/libs_3rdparty/QSpec/src/primitives/private/GTMenuPrivateMac.h b/src/libs_3rdparty/QSpec/src/primitives/private/GTMenuPrivateMac.h new file mode 100644 index 0000000000000000000000000000000000000000..f2488f90c727b59b4ee20e50eb7f17e53f01fac4 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/private/GTMenuPrivateMac.h @@ -0,0 +1,54 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2016 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_GT_MENU_PRIVATE_MAC_H_ +#define _U2_GT_MENU_PRIVATE_MAC_H_ + + +#ifdef __OBJC__ +#import <AppKit/AppKit.h> +#endif // __OBJC__ + +#include "GTGlobals.h" +#include "primitives/PopupChooser.h" + +namespace HI { + +/** + * It is supposed that Cocoa is used on OSX + */ +class GTMenuPrivateMac { +public: + static void clickMainMenuItem(GUITestOpStatus &os, const QStringList &itemPath, Qt::MatchFlag matchFlag = Qt::MatchExactly); + static void checkMainMenuItemState(GUITestOpStatus &os, const QStringList &itemPath, PopupChecker::CheckOption expectedState); + static void checkMainMenuItemsState(GUITestOpStatus &os, const QStringList &menuPath, const QStringList &itemsNames, PopupChecker::CheckOption expectedState); + +private: +#ifdef __OBJC__ + static NSMenu *clickMenuItem(GUITestOpStatus &os, NSMenu *menu, const QString &itemTitle, Qt::MatchFlag matchFlag); + static NSMenuItem *getMenuItem(GUITestOpStatus &os, NSMenu *menu, const QString &itemTitle, Qt::MatchFlag matchFlag); + static void checkMenuItemState(GUITestOpStatus &os, NSMenu *containerMenu, const QString &itemTitle, PopupChecker::CheckOption expectedState); +#endif // __OBJC__NSMenuItem +}; + +} // namespace U2 + +#endif // _U2_GT_MENU_PRIVATE_MAC_H_ diff --git a/src/libs_3rdparty/QSpec/src/primitives/private/GTMenuPrivateMac.mm b/src/libs_3rdparty/QSpec/src/primitives/private/GTMenuPrivateMac.mm new file mode 100644 index 0000000000000000000000000000000000000000..b03d80e8c6eeecb6ace6035a8b7997b04e124843 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/primitives/private/GTMenuPrivateMac.mm @@ -0,0 +1,161 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "GTMenuPrivateMac.h" + +namespace HI { + +#ifdef __OBJC__ + +#define GT_CLASS_NAME "GTMenuPrivateMac" + +#define GT_METHOD_NAME "clickMainMenuItem" +void GTMenuPrivateMac::clickMainMenuItem(GUITestOpStatus &os, const QStringList &itemPath, Qt::MatchFlag matchFlag) { + NSMenu *menu = [NSApp mainMenu]; + foreach (const QString &itemTitle, itemPath) { + GT_CHECK(NULL != menu, QString("Menu not found: '%1'").arg(itemTitle)); + menu = clickMenuItem(os, menu, itemTitle, matchFlag); + GTGlobals::sleep(1000); + } + [menu cancelTrackingWithoutAnimation]; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkMainMenuItemState" +void GTMenuPrivateMac::checkMainMenuItemState(GUITestOpStatus &os, const QStringList &itemPath, PopupChecker::CheckOption expectedState) { + const QStringList itemContainerMenuPath = itemPath.mid(0, itemPath.size() - 1); + NSMenu *menu = [NSApp mainMenu]; + foreach (const QString &itemTitle, itemContainerMenuPath) { + GT_CHECK(NULL != menu, QString("Menu not found: '%1'").arg(itemTitle)); + menu = clickMenuItem(os, menu, itemTitle, Qt::MatchExactly); + GTGlobals::sleep(500); + } + + checkMenuItemState(os, menu, itemPath.last(), expectedState); + [menu cancelTrackingWithoutAnimation]; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "checkMainMenuItemsState" +void GTMenuPrivateMac::checkMainMenuItemsState(GUITestOpStatus &os, const QStringList &menuPath, const QStringList &itemsNames, PopupChecker::CheckOption expectedState) { + NSMenu *menu = [NSApp mainMenu]; + foreach (const QString &itemTitle, menuPath) { + GT_CHECK(NULL != menu, QString("Menu not found: '%1'").arg(itemTitle)); + menu = clickMenuItem(os, menu, itemTitle, Qt::MatchExactly); + GTGlobals::sleep(500); + } + + foreach (const QString &itemName, itemsNames) { + checkMenuItemState(os, menu, itemName, expectedState); + } + [menu cancelTrackingWithoutAnimation]; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "clickMenuItem" +NSMenu * GTMenuPrivateMac::clickMenuItem(GUITestOpStatus &os, NSMenu *menu, const QString &itemTitle, Qt::MatchFlag matchFlag) { + NSMenuItem *item = getMenuItem(os, menu, itemTitle, matchFlag); + if (NULL == item) { + QStringList items; + for (NSInteger i = 0, itemsCount = [menu numberOfItems]; i < itemsCount; i++) { + items << QString::fromNSString([[menu itemAtIndex:i] title]); + } + GT_CHECK_RESULT(NULL != item, QString("Menu item not found: '%1', available items: %2") + .arg(itemTitle).arg(items.join(", ")), NULL); + } + NSMenu *submenu = [item submenu]; + [menu performActionForItemAtIndex:[menu indexOfItem:item]]; + return submenu; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getMenuItem" +NSMenuItem *GTMenuPrivateMac::getMenuItem(GUITestOpStatus &os, NSMenu *menu, const QString &itemTitle, Qt::MatchFlag matchFlag) { + switch (matchFlag) { + case Qt::MatchExactly: + return [menu itemWithTitle:(itemTitle.toNSString())]; + case Qt::MatchContains: { + NSInteger itemsCount = [menu numberOfItems]; + for (NSInteger i = 0; i < itemsCount; i++) { + NSMenuItem *menuItem = [menu itemAtIndex:i]; + if (QString::fromNSString([menuItem title]).contains(itemTitle)) { + return menuItem; + } + } + break; + } + default: + GT_CHECK_RESULT(false, "Match flag is not supported", NULL); + } + return NULL; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getMenuItem" +void GTMenuPrivateMac::checkMenuItemState(GUITestOpStatus &os, NSMenu *containerMenu, const QString &itemTitle, PopupChecker::CheckOption expectedState) { + switch (expectedState) { + case PopupChecker::NotExists: { + NSMenuItem *menuItem = getMenuItem(os, containerMenu, itemTitle, Qt::MatchExactly); + GT_CHECK(NULL == menuItem, QString("A menu item unexpectedly exists: %1").arg(itemTitle)); + break; + } + + case PopupChecker::Exists: { + NSMenuItem *menuItem = getMenuItem(os, containerMenu, itemTitle, Qt::MatchExactly); + GT_CHECK(NULL != menuItem, QString("A menu item unexpectedly doesn't exist: %1").arg(itemTitle)); + break; + } + + case PopupChecker::IsEnabled: { + NSMenuItem *menuItem = getMenuItem(os, containerMenu, itemTitle, Qt::MatchExactly); + GT_CHECK(NULL != menuItem, QString("A menu item unexpectedly doesn't exist: %1").arg(itemTitle)); + GT_CHECK([menuItem isEnabled], QString("A menu item is unexpectedly disabled: %1").arg(itemTitle)); + break; + } + + case PopupChecker::IsDisabled: { + NSMenuItem *menuItem = getMenuItem(os, containerMenu, itemTitle, Qt::MatchExactly); + GT_CHECK(NULL != menuItem, QString("A menu item unexpectedly doesn't exist: %1").arg(itemTitle)); + GT_CHECK(![menuItem isEnabled], QString("A menu item is unexpectedly enabled: %1").arg(itemTitle)); + break; + } + + case PopupChecker::IsChecable: { + GT_CHECK(false, "Not implemented. Do you really need to check is menu item checkable or not?"); + break; + } + + case PopupChecker::IsChecked: { + NSMenuItem *menuItem = getMenuItem(os, containerMenu, itemTitle, Qt::MatchExactly); + GT_CHECK(NULL != menuItem, QString("A menu item unexpectedly doesn't exist: %1").arg(itemTitle)); + GT_CHECK(NSOnState == [menuItem state], QString("A menu item is unexpectedly not checked: %1").arg(itemTitle)); + break; + } + } +} + +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +} // namespace + +#endif // __OBJC__ diff --git a/src/libs_3rdparty/QSpec/src/system/GTClipboard.cpp b/src/libs_3rdparty/QSpec/src/system/GTClipboard.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1a53750649bd09037405751bfb4b143eb152fc41 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/system/GTClipboard.cpp @@ -0,0 +1,151 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "system/GTClipboard.h" +#include "utils/GTThread.h" + +#include <QApplication> +#include <QClipboard> +#include <QFileInfo> +#include <QMimeData> +#include <QUrl> + +namespace HI { + +#define GT_CLASS_NAME "GTClipboard" + +#define GT_METHOD_NAME "text" +QString GTClipboard::text(GUITestOpStatus &os) { + GTGlobals::sleep(300); + + // check that clipboard contains text + QString clipboardText; + class Scenario : public CustomScenario { + public: + Scenario(QString &_text) : text(_text){} + void run(GUITestOpStatus &os) { + Q_UNUSED(os); + QClipboard *clipboard = QApplication::clipboard(); + + GT_CHECK(clipboard != NULL, "Clipboard is NULL"); + const QMimeData *mimeData = clipboard->mimeData(); + GT_CHECK(mimeData != NULL, "Clipboard MimeData is NULL"); + + GT_CHECK(mimeData->hasText() == true, "Clipboard doesn't contain text data"); + QString clipboardText = mimeData->text(); + text = clipboardText; + // need to clear clipboard, UGENE will crash on close otherwise because of Qt assert + clipboard->clear(); + } + private: + QString &text; + }; + + GTThread::runInMainThread(os, new Scenario(clipboardText)); + GTThread::waitForMainThread(); + return clipboardText; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setText" +void GTClipboard::setText(GUITestOpStatus &os, QString text ){ + class Scenario : public CustomScenario { + public: + Scenario(QString _text) : text(_text){} + void run(GUITestOpStatus &os) { + Q_UNUSED(os); + QClipboard *clipboard = QApplication::clipboard(); + clipboard->clear(); + clipboard->setText(text); + } + private: + QString text; + }; + + GTThread::runInMainThread(os, new Scenario(text)); + GTThread::waitForMainThread(); +} + +#undef GT_METHOD_NAME + +namespace { + QList<QUrl> toLocalQUrls(GUITestOpStatus &os, const QList<QString> &urls) { + QList<QUrl> qurls; + foreach (const QString &url, urls) { + QFileInfo fi(url); + if (fi.makeAbsolute()) { + QString absolutePath = fi.absoluteFilePath(); + qurls.append(QUrl::fromLocalFile(absolutePath)); + } else { + os.setError("Cannot make an absolute path"); + return qurls; + } + } + return qurls; + } +} + +#define GT_METHOD_NAME "setUrls" +void GTClipboard::setUrls(GUITestOpStatus &os, const QList<QString> &urls) { + class Scenario : public CustomScenario { + QList<QUrl> urls; + public: + Scenario(const QList<QUrl> &urls) : urls(urls) {} + + void run(GUITestOpStatus &os) { + Q_UNUSED(os); + QMimeData *urlMime = new QMimeData(); + urlMime->setUrls(urls); + + QClipboard *clipboard = QApplication::clipboard(); + clipboard->clear(); + clipboard->setMimeData(urlMime); + } + }; + + QList<QUrl> qurls = toLocalQUrls(os, urls); + GTThread::runInMainThread(os, new Scenario(qurls)); + GTThread::waitForMainThread(); +} + +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "clear" +void GTClipboard::clear(GUITestOpStatus &os){ + class Scenario : public CustomScenario { + public: + Scenario(){} + void run(GUITestOpStatus &os) { + Q_UNUSED(os); + QClipboard *clipboard = QApplication::clipboard(); + clipboard->clear(); + } + }; + + GTThread::runInMainThread(os, new Scenario()); + GTThread::waitForMainThread(); +} +#undef GT_METHOD_NAME + + +#undef GT_CLASS_NAME + +} //namespace diff --git a/src/libs_3rdparty/QSpec/src/system/GTClipboard.h b/src/libs_3rdparty/QSpec/src/system/GTClipboard.h new file mode 100644 index 0000000000000000000000000000000000000000..ca4bd83e19c8c1c6f9604d05201c0d84657dbda1 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/system/GTClipboard.h @@ -0,0 +1,43 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GT_CLIPBOARD_H_ +#define _HI_GT_CLIPBOARD_H_ + +#include "GTGlobals.h" + +namespace HI { + +class HI_EXPORT GTClipboard { +public: + // fails if can't get clipboard or clipboard doesn't contain text data + static QString text(GUITestOpStatus &os); + + static void setText(GUITestOpStatus &os, QString text); + + static void setUrls(GUITestOpStatus &os, const QList<QString>& urls); + + static void clear(GUITestOpStatus &os); +}; + +} //namespace + +#endif diff --git a/src/libs_3rdparty/QSpec/src/system/GTFile.cpp b/src/libs_3rdparty/QSpec/src/system/GTFile.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6f74f045b8acc0552cb6175d3913f7386129b6bf --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/system/GTFile.cpp @@ -0,0 +1,394 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "system/GTFile.h" +#include <QDir> +#include<QDebug> + +#ifdef Q_OS_WIN + +// Microsoft's example of how to change file system permissions is used below. +// See http://msdn.microsoft.com/en-us/library/windows/desktop/aa379283%28v=vs.85%29.aspx for details. + +#include <Aclapi.h> + +// Sets NTFS security rights of the current user for the specified file or directory, +// either to allow or deny writing to the file or creating files/subfolders in the directory. +// In case of a directory, rights to delete files/subfolders are not affected. +// NB: Only works for NTFS, has no effect on FAT objects. +static DWORD SetFileWriteACL ( + LPTSTR pszObjName, // name of object + BOOL allowWrite // zero to deny file modification + ) +{ + DWORD dwRes = 0; + PACL pNewDACL = NULL; + EXPLICIT_ACCESS ea[2]; + SE_OBJECT_TYPE ObjectType = SE_FILE_OBJECT; // type of object + TRUSTEE_FORM TrusteeForm = TRUSTEE_IS_NAME; // format of trustee structure + +#ifdef UNICODE + LPWSTR pszTrustee = const_cast<LPWSTR>( L"CURRENT_USER" ); // trustee for new ACE +#else + LPSTR pszTrustee = const_cast<LPSTR>( "CURRENT_USER" ); +#endif + + if ( NULL == pszObjName ) { + return ERROR_INVALID_PARAMETER; + } + + // Initialize an EXPLICIT_ACCESS structure for the new ACE. + + ZeroMemory( &ea, 2 * sizeof( EXPLICIT_ACCESS ) ); + ea[0].grfAccessMode = GRANT_ACCESS; + ea[0].grfInheritance= NO_INHERITANCE; + ea[0].Trustee.TrusteeForm = TrusteeForm; + ea[0].Trustee.ptstrName = pszTrustee; + + ULONG aclCount; + if ( allowWrite ) + { + aclCount = 1; + ea[0].grfAccessPermissions = FILE_ALL_ACCESS; + } else { + aclCount = 2; + ea[0].grfAccessPermissions = ( FILE_GENERIC_READ | GENERIC_EXECUTE ); + + // All generic rights have common bits (READ_CONTROL etc) and we do not want to deny them + ea[1].grfAccessPermissions = (FILE_GENERIC_WRITE & ~FILE_GENERIC_READ); + ea[1].grfAccessMode = DENY_ACCESS; + ea[1].grfInheritance= NO_INHERITANCE; + ea[1].Trustee.TrusteeForm = TrusteeForm; + ea[1].Trustee.ptstrName = pszTrustee; + } + + // Create a new ACL + dwRes = SetEntriesInAcl( aclCount, ea, NULL, &pNewDACL ); + if ( ERROR_SUCCESS != dwRes ) { + printf( "SetEntriesInAcl Error %u\n", dwRes ); + goto Cleanup; + } + + // Attach the new ACL as the object's DACL. + dwRes = SetNamedSecurityInfo( pszObjName, ObjectType, DACL_SECURITY_INFORMATION, NULL, NULL, + pNewDACL, NULL ); + if ( ERROR_SUCCESS != dwRes ) { + printf( "SetNamedSecurityInfo Error %u\n", dwRes ); + goto Cleanup; + } + +Cleanup: + + if (pNewDACL != NULL) { + LocalFree( static_cast<HLOCAL>( pNewDACL ) ); + } + + return dwRes; +} + +#endif + +namespace HI { + +static const QFile::Permissions GenericReadPermissions = QFile::ReadOwner | QFile::ExeOwner | + QFile::ReadUser | QFile::ExeUser | QFile::ReadGroup | QFile::ExeGroup | + QFile::ReadOther | QFile::ExeOther; + +static const QFile::Permissions GenericWritePermissions = QFile::WriteOwner | + QFile::WriteUser | QFile::WriteGroup | QFile::WriteOther; + +static bool setFilePermissions(const QString &path, bool allowWrite, bool recursive) +{ + QFileInfo fileInfo(path); + if (!(fileInfo.exists())) { + return false; + } + if (fileInfo.isSymLink()) { + return false; + } + + bool res = true; + if (recursive && fileInfo.isDir()) { + QDir dir(path); + foreach (const QString& entryPath, dir.entryList(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot | QDir::NoSymLinks)) { + res &= setFilePermissions(path + "/" + entryPath, allowWrite, recursive); + } + } + + QFile::Permissions perm = GenericReadPermissions; + if ( allowWrite ) { + perm |= GenericWritePermissions; + } + // On Windows, Qt permissions partially work (e.g. FAT respects read-only attribute for ordinary files), + // so try it anyway. + // And the case of FAT folders is hopeless, there's no way to control access to a folder content. + bool qtRes = QFile( path ).setPermissions( perm ); + +#ifdef Q_OS_WIN + // Probably, could skip this NTFS-specific branch if the qtRes is OK, assuming it worked nicely on FAT + // But Qt did not really documented this, so let's go for the most guarantee + if ( fileInfo.isRelative( ) && !fileInfo.makeAbsolute( ) ) { + return false; + } + const QString windowsPath = QDir::toNativeSeparators( fileInfo.filePath( ) ); + + const int pathLength = windowsPath.size( ); + QScopedArrayPointer<wchar_t> pathString( new wchar_t[pathLength + 1] ); + + windowsPath.toWCharArray( pathString.data( ) ); + pathString[pathLength] = '\0'; + + DWORD dwRes = SetFileWriteACL( pathString.data(), allowWrite ); + if ( allowWrite ) + { + // workaround Qt's quirk on NTFS, force clearing RO attr + SetFileAttributesW(/*reinterpret_cast<LPCWSTR>*/(pathString.data()), FILE_ATTRIBUTE_NORMAL ); + } + + qtRes = ( ERROR_SUCCESS == dwRes ); +#endif + + return res & qtRes; +} + +#define GT_CLASS_NAME "GTFile" + +#define GT_METHOD_NAME "setReadWrite" +void GTFile::setReadWrite(GUITestOpStatus &os, const QString &path, bool recursive) +{ + bool set = setFilePermissions(path, true, recursive); + GT_CHECK(set, "read-write permission could not be set") +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setReadOnly" +void GTFile::setReadOnly(GUITestOpStatus &os, const QString &path, bool recursive) +{ + bool set = setFilePermissions(path, false, recursive); + GT_CHECK(set, "read-only permission could not be set") +} +#undef GT_METHOD_NAME + +const QString GTFile::backupPostfix = "_GT_backup"; + +#define GT_METHOD_NAME "equals" +bool GTFile::equals(GUITestOpStatus &os, const QString& path1, const QString& path2) { + + QFile f1(path1); + QFile f2(path2); + + bool ok = f1.open(QIODevice::ReadOnly) && f2.open(QIODevice::ReadOnly); + GT_CHECK_RESULT(ok, f1.errorString() + " " + f2.errorString(), false); + + QByteArray byteArray1 = f1.readAll(); + QByteArray byteArray2 = f2.readAll(); + + GT_CHECK_RESULT((f1.error() == QFile::NoError) && (f2.error() == QFile::NoError), f1.errorString() + " " + f2.errorString(), false); + + return byteArray1 == byteArray2; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getSize" +qint64 GTFile::getSize(GUITestOpStatus &os, const QString &path){ + QFile f(path); + bool ok = f.open(QIODevice::ReadOnly); + GT_CHECK_RESULT(ok, "file " + path + "not found",-1); + + int size = f.size(); + f.close(); + return size; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "copy" +void GTFile::copy(GUITestOpStatus &os, const QString& from, const QString& to) { + + QFile f2(to); + bool ok = f2.open(QIODevice::ReadOnly); + if (ok) { + f2.remove(); + } + + bool copied = QFile::copy(from, to); + GT_CHECK(copied == true, "can't copy <" + from + "> to <" + to + ">"); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "copyDir" +void GTFile::copyDir(GUITestOpStatus &os, const QString& dirToCopy, const QString& dirToPaste) { + + QDir from; + from.setFilter(QDir::Hidden | QDir::AllDirs | QDir::Files); + from.setPath(dirToCopy); + + QString pastePath = dirToPaste; + bool ok = QDir().mkpath(pastePath); + GT_CHECK(ok, "could not create directory: " + pastePath); + + QFileInfoList list = from.entryInfoList(); + foreach(QFileInfo info, list){ + if(info.fileName()=="." || info.fileName()==".."){ + continue; + } + if (info.isFile()){ + copy(os, info.filePath(), pastePath + '/' + info.fileName()); + }else if(info.isDir()){ + copyDir(os, info.filePath(), pastePath + '/' + info.fileName()); + } + + } +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "removeDir" +#ifdef Q_OS_WIN +void GTFile::removeDir(QString dirName) +{ + QDir dir(dirName); + dir.setFilter(QDir::Hidden | QDir::AllDirs | QDir::Files); + + foreach (QFileInfo fileInfo, dir.entryInfoList()) { + QString fileName = fileInfo.fileName(); + QString filePath = fileInfo.filePath(); + if (fileName != "." && fileName != "..") { + QFile file(filePath); + file.setPermissions(QFile::ReadOther | QFile::WriteOther); + if(!file.remove(filePath)){ + QDir dir(filePath); + if(!dir.rmdir(filePath)){ + removeDir(filePath); + } + } + } + } + dir.rmdir(dir.absoluteFilePath(dirName)); +} +#else +void GTFile::removeDir(QString dirName) +{ + QDir dir(dirName); + qDebug("GT_DEBUG_MESSAGE removing dir: %s", dirName.toLocal8Bit().constData()); + + foreach (QFileInfo fileInfo, dir.entryInfoList(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot | QDir::NoSymLinks | QDir::Hidden)) { + QString fileName = fileInfo.fileName(); + QString filePath = fileInfo.filePath(); + if (fileName != "." && fileName != "..") { + if(QFile::remove(filePath)) + continue; + else{ + QDir dir(filePath); + if(dir.rmdir(filePath)) + continue; + else + removeDir(filePath); + } + } + } + dir.rmdir(dir.absoluteFilePath(dirName)); + + qDebug("GT_DEBUG_MESSAGE directory removed: %s", dirName.toLocal8Bit().constData()); + +} +#endif + +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "backup" +void GTFile::backup(GUITestOpStatus &os, const QString& path) { + + copy(os, path, path + backupPostfix); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "backupDir" +void GTFile::backupDir(GUITestOpStatus &os, const QString& path) { + + copyDir(os, path, path + backupPostfix); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "restore" +void GTFile::restore(GUITestOpStatus &os, const QString& path) { + + QFile backupFile(path + backupPostfix); + + bool ok = backupFile.open(QIODevice::ReadOnly); + GT_CHECK(ok, "There is no backup file for <" + path + ">"); + + QFile file(path); + ok = file.open(QIODevice::ReadOnly); + if (ok) { + file.remove(); + } + + bool renamed = backupFile.rename(path); + GT_CHECK(renamed == true, "restore of <" + path + "> can't be done"); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "restoreDir" +void GTFile::restoreDir(GUITestOpStatus &os, const QString& path) { + QDir backupDir(path + backupPostfix); + bool exists = backupDir.exists(); + if(!exists){ + return; + } + + QDir dir(path); + exists = dir.exists(); + if (exists) { + removeDir(dir.absolutePath()); + } + + bool renamed = backupDir.rename(path + backupPostfix, path); + GT_CHECK(renamed == true, "restore of <" + path + "> can't be done"); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "check" +bool GTFile::check(GUITestOpStatus &/*os*/, const QString& path) { + QFile file(path); + return file.exists(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "create" +void GTFile::create(GUITestOpStatus &os, const QString &filePath) { + Q_UNUSED(os); + bool success = QFile(filePath).open(QIODevice::WriteOnly); + GT_CHECK(success, "Can't open file to write"); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "readAll" +QByteArray GTFile::readAll(GUITestOpStatus &os, const QString &filePath) { + Q_UNUSED(os); + QFile file(filePath); + bool opened = file.open(QFile::ReadOnly); + GT_CHECK_RESULT(opened, "Can't open file for read", ""); + + return file.readAll(); +} +#undef GT_METHOD_NAME +#undef GT_CLASS_NAME + +} //namespace diff --git a/src/libs_3rdparty/QSpec/src/system/GTFile.h b/src/libs_3rdparty/QSpec/src/system/GTFile.h new file mode 100644 index 0000000000000000000000000000000000000000..e7535aa904fdb675475f8870a50bed55cabcbc66 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/system/GTFile.h @@ -0,0 +1,73 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GT_FILE_H_ +#define _HI_GT_FILE_H_ + +#include "GTGlobals.h" +#include <QFile> + +namespace HI { + +class HI_EXPORT GTFile { +public: + static void setReadWrite(GUITestOpStatus &os, const QString& path, bool recursive = false); + static void setReadOnly(GUITestOpStatus &os, const QString& path, bool recursive = false); + + static bool equals(GUITestOpStatus &os, const QString&, const QString&); + + static qint64 getSize(GUITestOpStatus &os, const QString&); + + // backup file to the file with backupPostfix. fail the given file can't be opened + static void backup(GUITestOpStatus &os, const QString&); + + // backup directory to the file with backupPostfix + static void backupDir(GUITestOpStatus &os, const QString&); + + // copy file removing target file if exist + static void copy(GUITestOpStatus &os, const QString& from, const QString& to); + + // copy directory entries removing target file if exist + static void copyDir(GUITestOpStatus &os, const QString& dirToCopy, const QString& dirToPaste); + + // copy file removing target file if exist + static void removeDir(QString dirName); + + // restores file and deletes backup. fail if there is no backup or can't write to the given file + static void restore(GUITestOpStatus &os, const QString&); + + // restores file and deletes backup. fail if there is no backup or can't write to the given file + static void restoreDir(GUITestOpStatus &os, const QString&); + + // checks if file exists + static bool check(GUITestOpStatus &os, const QString&); + + // creates a new empty file, rewrite the file if it already exists + static void create(GUITestOpStatus &os, const QString &filePath); + + static QByteArray readAll(GUITestOpStatus &os, const QString &filePath); + + static const QString backupPostfix; +}; + +} //namespace + +#endif diff --git a/src/libs_3rdparty/QSpec/src/utils/GTKeyboardUtils.cpp b/src/libs_3rdparty/QSpec/src/utils/GTKeyboardUtils.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b984521f1f7be57c334e769de86bf788ed5dc62d --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/utils/GTKeyboardUtils.cpp @@ -0,0 +1,47 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "utils/GTKeyboardUtils.h" + +namespace HI { + +void GTKeyboardUtils::selectAll(GUITestOpStatus &os) +{ + GTKeyboardDriver::keyClick( 'a', Qt::ControlModifier); +} + +void GTKeyboardUtils::copy(GUITestOpStatus &os) +{ + GTKeyboardDriver::keyClick( 'c', Qt::ControlModifier); +} + +void GTKeyboardUtils::paste(GUITestOpStatus &os) +{ + GTKeyboardDriver::keyClick( 'v', Qt::ControlModifier); +} + +void GTKeyboardUtils::cut(GUITestOpStatus &os) +{ + + GTKeyboardDriver::keyClick( 'x', Qt::ControlModifier); +} + +} // namespace diff --git a/src/libs_3rdparty/QSpec/src/utils/GTKeyboardUtils.h b/src/libs_3rdparty/QSpec/src/utils/GTKeyboardUtils.h new file mode 100644 index 0000000000000000000000000000000000000000..0a06a81b117f65c839f99e53c438a699b7dd65e4 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/utils/GTKeyboardUtils.h @@ -0,0 +1,42 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef GTKEYBOARD_UTILS_H +#define GTKEYBOARD_UTILS_H + +#include "drivers/GTKeyboardDriver.h" +#include "GTGlobals.h" + +namespace HI { +/*! + * \brief The class contains the most commonly used keyboard hotkeys + */ +class HI_EXPORT GTKeyboardUtils { +public: + static void selectAll(GUITestOpStatus&); // ctrl (or cmd on MacOS) + A + static void copy(GUITestOpStatus&); // ctrl (or cmd on MacOS) + C + static void paste(GUITestOpStatus&); // ctrl (or cmd on MacOS) + V + static void cut(GUITestOpStatus&); // ctrl (or cmd on MacOS) + X +}; + +} // namespace + +#endif diff --git a/src/libs_3rdparty/QSpec/src/utils/GTMouseUtils.cpp b/src/libs_3rdparty/QSpec/src/utils/GTMouseUtils.cpp new file mode 100644 index 0000000000000000000000000000000000000000..887dce7fcc8abed22747b0f34d90b5cdcd03a44c --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/utils/GTMouseUtils.cpp @@ -0,0 +1,51 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "GTMouseUtils.h" +#include "GTGlobals.h" +#include "drivers/GTMouseDriver.h" +#include <QtGui/QCursor> + +namespace HI { + +#define GT_CLASS_NAME "GTMouse" + +#define GT_METHOD_NAME "moveCursorToWidget" +void GTMouseUtils::moveCursorToWidget(GUITestOpStatus &os, QWidget *widget) { + GT_CHECK(widget != NULL, "Provided widget is null"); + QPoint widgetCenter = widget->rect().center(); + GTMouseDriver::moveTo(widgetCenter); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "moveCursorOutOfWidget" +void GTMouseUtils::moveCursorOutOfWidget(GUITestOpStatus &os, QWidget *widget) { + GT_CHECK(widget != NULL, "Provided widget is null"); + QPoint currentPosition = QCursor::pos(); + GT_CHECK(widget->rect().contains(currentPosition, false), "Cursor not over widget"); + QPoint finalPosition = widget->rect().topLeft() + QPoint(1, 1); //top left + offset + GTMouseDriver::moveTo(finalPosition); +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +} diff --git a/src/libs_3rdparty/QSpec/src/utils/GTMouseUtils.h b/src/libs_3rdparty/QSpec/src/utils/GTMouseUtils.h new file mode 100644 index 0000000000000000000000000000000000000000..cecb24146972d72be5de9298fdeee28984172e66 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/utils/GTMouseUtils.h @@ -0,0 +1,44 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef HI_GUI_GTMOUSE_H_ +#define HI_GUI_GTMOUSE_H_ + +#include "GTGlobals.h" +#if (QT_VERSION < 0x050000) //Qt 5 +#include <QtGui/QWidget> +#else +#include <QtWidgets/QWidget> +#endif + + +namespace HI { + +class HI_EXPORT GTMouseUtils { +public: + + static void moveCursorToWidget(GUITestOpStatus &os, QWidget *widget); + static void moveCursorOutOfWidget(GUITestOpStatus &os, QWidget *widget); + +}; + +} +#endif diff --git a/src/libs_3rdparty/QSpec/src/utils/GTThread.cpp b/src/libs_3rdparty/QSpec/src/utils/GTThread.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b7ec624c5fa3c4e19067337beff18379db86e50e --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/utils/GTThread.cpp @@ -0,0 +1,72 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <core/MainThreadRunnable.h> +#include "core/MainThreadTimer.h" + +#include "GTGlobals.h" +#include "utils/GTThread.h" + +namespace HI { + +#define GT_CLASS_NAME "ThreadWaiter" +const qint64 TIMER_INTERVAL = 100; + +ThreadWaiter::ThreadWaiter() : + //os(os), + startValue(0), + endValue(0) +{ +} + +#define GT_METHOD_NAME "wait" +void ThreadWaiter::wait() { + MainThreadTimer mainThreadTimer(TIMER_INTERVAL); + startValue = mainThreadTimer.getCounter(); + while (endValue <= startValue) { + GTGlobals::sleep(TIMER_INTERVAL); + endValue = mainThreadTimer.getCounter(); + } +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +#define GT_CLASS_NAME "GTThread" + +#define GT_METHOD_NAME "waitForMainThread" +void GTThread::waitForMainThread() { + ThreadWaiter waiter; + waiter.wait(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "runInMainThread" +void GTThread::runInMainThread(GUITestOpStatus &os, CustomScenario *scenario) { + qDebug("Guing to run in main thread"); + MainThreadRunnable::runInMainThread(os, scenario); + qDebug("Running in main thread finished"); +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +} // namespace diff --git a/src/libs_3rdparty/QSpec/src/utils/GTThread.h b/src/libs_3rdparty/QSpec/src/utils/GTThread.h new file mode 100644 index 0000000000000000000000000000000000000000..f580987e8fce8d7503dcedc7831efa389100fba6 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/utils/GTThread.h @@ -0,0 +1,52 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GT_THREAD_H_ +#define _HI_GT_THREAD_H_ + +#include <QTimer> +#include <GTGlobals.h> +#include <core/CustomScenario.h> + +namespace HI { + +class HI_EXPORT ThreadWaiter : public QObject { + Q_OBJECT +public: + ThreadWaiter(); + + void wait(); + +private: + //GUITestOpStatus &os; + qint64 startValue; + qint64 endValue; +}; + +class HI_EXPORT GTThread { +public: + static void waitForMainThread(); + static void runInMainThread(GUITestOpStatus &os, CustomScenario *scenario); +}; + +} // namespace + +#endif // _HI_GT_THREAD_H_ diff --git a/src/libs_3rdparty/QSpec/src/utils/GTUtilsApp.cpp b/src/libs_3rdparty/QSpec/src/utils/GTUtilsApp.cpp new file mode 100644 index 0000000000000000000000000000000000000000..77091f8315fd5598e9d04c0760fe4fa03941ad55 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/utils/GTUtilsApp.cpp @@ -0,0 +1,68 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "primitives/GTMainWindow.h" +#include "utils/GTUtilsApp.h" + +#include <QMainWindow> + +namespace HI { + +#define GT_CLASS_NAME "GTUtilsApp" + +#define GT_METHOD_NAME "checkUGENETitle" +void GTUtilsApp::checkUGENETitle(GUITestOpStatus &os, const QString &title) { + + bool isTitleGood = false; + foreach(QWidget* w, GTMainWindow::getMainWindowsAsWidget(os)){ + QString ugeneTitle = w->windowTitle(); + if(ugeneTitle == title){ + isTitleGood = true; + } + } + + GT_CHECK(isTitleGood, "UGENE title not <" + title + ">"); +} + +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +#define GT_CLASS_NAME "GTUtilsApp" + +#define GT_METHOD_NAME "checkUGENETitleContains" +void GTUtilsApp::checkUGENETitleContains(GUITestOpStatus &os, const QString& string) { + + bool isTitleContains = false; + foreach(QWidget* w, GTMainWindow::getMainWindowsAsWidget(os)){ + QString ugeneTitle = w->windowTitle(); + if(ugeneTitle.contains(string)){ + isTitleContains = true; + } + } + + GT_CHECK(isTitleContains, "UGENE title not contains <" + string + ">"); +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + +} diff --git a/src/libs_3rdparty/QSpec/src/utils/GTUtilsApp.h b/src/libs_3rdparty/QSpec/src/utils/GTUtilsApp.h new file mode 100644 index 0000000000000000000000000000000000000000..e666e98c0edf59d9009f8726e3b3bef5aa556c3c --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/utils/GTUtilsApp.h @@ -0,0 +1,37 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GUI_APP_UTILS_H_ +#define _HI_GUI_APP_UTILS_H_ + +#include "GTGlobals.h" + +namespace HI { + +class HI_EXPORT GTUtilsApp { +public: + static void checkUGENETitle(GUITestOpStatus &os, const QString& title); + static void checkUGENETitleContains(GUITestOpStatus &os, const QString& string); +}; + +} // namespace + +#endif diff --git a/src/libs_3rdparty/QSpec/src/utils/GTUtilsDialog.cpp b/src/libs_3rdparty/QSpec/src/utils/GTUtilsDialog.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a8c84b5d60a771ee58169890886218be7d43a9cb --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/utils/GTUtilsDialog.cpp @@ -0,0 +1,397 @@ + /** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QApplication> +#include <QDateTime> +#include <QPushButton> +#include <QTimer> + +#include <core/GUITest.h> + +#include "GTUtilsDialog.h" +#include "drivers/GTMouseDriver.h" +#include "primitives/GTWidget.h" +#include "utils/GTThread.h" + +namespace HI { + +#define GT_CLASS_NAME "GUIDialogWaiter" + +GUIDialogWaiter::GUIDialogWaiter(GUITestOpStatus &_os, Runnable* _r, const WaitSettings& _settings) +: hadRun(false), waiterId(-1), os(_os), runnable(_r), settings(_settings), timer(NULL), waitingTime(0) { + + static int totalWaiterCount = 0; + waiterId = totalWaiterCount++; + + timer = new QTimer(); + + timer->connect(timer, SIGNAL(timeout()), this, SLOT(checkDialog())); + timer->start(timerPeriod); +} + +GUIDialogWaiter::~GUIDialogWaiter() { + finishWaiting(); +} + +void GUIDialogWaiter::finishWaiting() { + delete timer; + timer = NULL; + delete runnable; + runnable = NULL; +} + +void GUIDialogWaiter::stopTimer() { + if (NULL != timer) { + timer->stop(); + } +} + +bool GUIDialogWaiter::isExpectedName(const QString& widgetObjectName, const QString& expectedObjectName) { + + if (expectedObjectName.isNull()) { + qWarning("GT_DEBUG_MESSAGE GUIDialogWaiter Warning!! Checking name, widget name '%s', but expected any, saying it's expected", widgetObjectName.toLocal8Bit().constData()); + return true; + } + + qDebug("GT_DEBUG_MESSAGE GUIDialogWaiter Checking name, widget name '%s', expected '%s'", widgetObjectName.toLocal8Bit().constData(), expectedObjectName.toLocal8Bit().constData()); + return widgetObjectName == expectedObjectName; +} + +bool GUIDialogWaiter::operator ==(Runnable const * const otherRunnable) const { + return runnable == otherRunnable; +} + +void GUIDialogWaiter::checkDialogPool(){ + foreach(GUIDialogWaiter* waiter, GTUtilsDialog::pool){ + waiter->checkDialog(); + } +} + +#define GT_METHOD_NAME "checkDialog" +void GUIDialogWaiter::checkDialog() { + try { + QWidget *widget = NULL; + GT_CHECK_NO_MESSAGE(runnable != NULL, "Runnable is NULL"); + + switch (settings.dialogType) { + case Modal: + widget = QApplication::activeModalWidget(); + break; + case Popup: + widget = QApplication::activePopupWidget(); + break; + default: + break; + } + + if (widget && !hadRun && isExpectedName(widget->objectName(), settings.objectName)) { + timer->stop(); + qDebug("-------------------------"); + qDebug("GT_DEBUG_MESSAGE GUIDialogWaiter::wait ID = %d, name = '%s' going to RUN", waiterId, settings.objectName.toLocal8Bit().constData()); + qDebug("-------------------------"); + + GT_CHECK(settings.destiny != MustNotBeRun, + QString("Dialog appears which mustn't appear: %1") + .arg(settings.objectName.isEmpty() ? "(an unnamed dialog)" : settings.objectName)); + + try { + GTThread::waitForMainThread(); + runnable->run(); + hadRun = true; + } catch(GUITestOpStatus *) { + QWidget *popupWidget = QApplication::activePopupWidget(); + while (popupWidget != NULL) { + GTWidget::close(os, popupWidget); + popupWidget = QApplication::activePopupWidget(); + } + + QWidget *modalWidget = QApplication::activeModalWidget(); + while (modalWidget != NULL) { + GTWidget::close(os, modalWidget); + modalWidget = QApplication::activeModalWidget(); + } + } + } else { + waitingTime += timerPeriod; + if (waitingTime > settings.timeout) { + qDebug("-------------------------"); + qDebug("GT_DEBUG_MESSAGE !!! GUIDialogWaiter::TIMEOUT Id = %d, going to finish waiting", waiterId); + qDebug("-------------------------"); + + finishWaiting(); + GT_CHECK(false, "TIMEOUT, waiterId = " + QString::number(waiterId)); + } + } + + } + catch(GUITestOpStatus *){} +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + + +#define GT_CLASS_NAME "GTUtilsDialog" + +HangChecker::HangChecker(GUITestOpStatus &_os):os(_os), mightHung(false){ + timer = new QTimer(); +} + +void HangChecker::startChecking(){ + timer->connect(timer, SIGNAL(timeout()), this, SLOT(sl_check())); + timer->start(GTUtilsDialog::timerPeriod*100); +} + +#define GT_METHOD_NAME "sl_check" +void HangChecker::sl_check(){ + QWidget* dialog = QApplication::activeModalWidget(); + try{ + if(dialog != NULL){ + bool found = false; + foreach (GUIDialogWaiter* waiter, GTUtilsDialog::pool) { + if(!waiter->hadRun && waiter->isExpectedName(dialog->objectName(), waiter->getSettings().objectName)){ + found = true; + mightHung = false; + } + } + + if(!found){ + if(mightHung){ + GT_CHECK(false, "dialog " + QString(dialog->metaObject()->className()) + " name: " + dialog->objectName() + " hang up"); + } + } + + if(!found){ + if(!mightHung){ + mightHung = true; + qWarning("GT_DEBUG_MESSAGE dialog mignt hang up"); + } + } + + }else{ + mightHung = false; + } + } catch(GUITestOpStatus *) { + GTGlobals::takeScreenShot(GUITest::screenshotDir + QDateTime::currentDateTime().toString() + ".jpg"); + QWidget* w = QApplication::activeModalWidget(); + while (w != NULL){ + w->close(); + w = QApplication::activeModalWidget(); + } + w = QApplication::activePopupWidget(); + while (w != NULL){ + w->close(); + w = QApplication::activePopupWidget(); + } + } +} +#undef GT_METHOD_NAME + +#undef GT_CLASS_NAME + + +#define GT_CLASS_NAME "GTUtilsDialog" + +QList<GUIDialogWaiter*> GTUtilsDialog::pool = QList<GUIDialogWaiter*>(); +HangChecker* GTUtilsDialog::hangChecker = NULL; + +void GTUtilsDialog::startHangChecking(GUITestOpStatus &os){ + hangChecker = new HangChecker(os); + hangChecker->startChecking(); +} + +void GTUtilsDialog::stopHangChecking(){ + if(hangChecker != NULL){ + hangChecker->timer->stop(); + } +} + +#define GT_METHOD_NAME "buttonBox" +QDialogButtonBox * GTUtilsDialog::buttonBox(GUITestOpStatus &os, QWidget *dialog) { + return qobject_cast<QDialogButtonBox*>(GTWidget::findWidget(os, "buttonBox", dialog)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "clickButtonBox" +void GTUtilsDialog::clickButtonBox(GUITestOpStatus &os, QDialogButtonBox::StandardButton button) { + clickButtonBox(os, QApplication::activeModalWidget(), button); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "clickButtonBox" +void GTUtilsDialog::clickButtonBox(GUITestOpStatus& os, QWidget* dialog, QDialogButtonBox::StandardButton button) { + QDialogButtonBox* box = buttonBox(os, dialog); + GT_CHECK(box != NULL, "buttonBox is NULL"); + QPushButton* pushButton = box->button(button); + GT_CHECK(pushButton != NULL, "pushButton is NULL"); + GTWidget::click(os, pushButton); +} +#undef GT_METHOD_NAME + +void GTUtilsDialog::waitForDialog(GUITestOpStatus &os, Runnable *r, const GUIDialogWaiter::WaitSettings& settings) +{ + GUIDialogWaiter *waiter = new GUIDialogWaiter(os, r, settings); + pool.prepend(waiter); +} + +void GTUtilsDialog::waitForDialog(GUITestOpStatus &os, Runnable *r, int timeout) { + GUIDialogWaiter::WaitSettings settings; + Filler* f = dynamic_cast<Filler*>(r); + if (f) { + settings = f->getSettings(); + if (timeout > 0) { + settings.timeout = timeout; + } + } + + waitForDialog(os, r, settings); +} + +void GTUtilsDialog::waitForDialogWhichMustNotBeRun(GUITestOpStatus &os, Runnable *r) { + GUIDialogWaiter::WaitSettings settings; + Filler* f = dynamic_cast<Filler*>(r); + if (f) { + settings = f->getSettings(); + } + + settings.destiny = GUIDialogWaiter::MustNotBeRun; + waitForDialog(os, r, settings); +} + +void GTUtilsDialog::waitForDialogWhichMayRunOrNot(GUITestOpStatus &os, Runnable *r) { + GUIDialogWaiter::WaitSettings settings; + Filler* f = dynamic_cast<Filler*>(r); + if (f) { + settings = f->getSettings(); + } + + settings.destiny = GUIDialogWaiter::NoMatter; + settings.timeout = 480000; + waitForDialog(os, r, settings); +} + +void GTUtilsDialog::removeRunnable(Runnable const * const runnable) { + foreach (GUIDialogWaiter *waiter, pool) { + if (*waiter == runnable) { + pool.removeOne(waiter); + delete waiter; + } + } +} + +void GTUtilsDialog::waitForDialogClosed(){ + while(QApplication::activeModalWidget() != NULL){ + GTGlobals::sleep(100); + } + GTThread::waitForMainThread(); +} + +#define GT_METHOD_NAME "checkAllFinished" +void GTUtilsDialog::checkAllFinished(GUITestOpStatus &os) { + Q_UNUSED(os); + + foreach(GUIDialogWaiter* w, pool) { + GT_CHECK(w, "NULL GUIDialogWaiter"); + switch (w->getSettings().destiny){ + case GUIDialogWaiter::MustBeRun: + GT_CHECK(w->hadRun, QString("\"%1\" not run but should be").arg((w->getSettings().objectName))); + break; + case GUIDialogWaiter::MustNotBeRun: + GT_CHECK(!w->hadRun, QString("\"%1\" had run but should not").arg((w->getSettings().objectName))); + break; + case GUIDialogWaiter::NoMatter: + break; + } + } +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "isButtonEnabled" +bool GTUtilsDialog::isButtonEnabled(GUITestOpStatus& os, QWidget* dialog, QDialogButtonBox::StandardButton button) { + QDialogButtonBox* box = buttonBox(os, dialog); + GT_CHECK_RESULT(box != NULL, "buttonBox is NULL", false); + QPushButton* pushButton = box->button(button); + GT_CHECK_RESULT(pushButton != NULL, "pushButton is NULL", false); + return pushButton->isEnabled(); +} +#undef GT_METHOD_NAME + +void GTUtilsDialog::cleanup(GUITestOpStatus &os, CleanupSettings s) { + foreach (GUIDialogWaiter* waiter, pool) { + waiter->stopTimer(); + } + + if (s == FailOnUnfinished) { + checkAllFinished(os); + } + + stopHangChecking(); + + qDeleteAll(pool); + pool.clear(); +} + +#undef GT_CLASS_NAME + +Filler::Filler(GUITestOpStatus &os, const GUIDialogWaiter::WaitSettings &settings, CustomScenario *scenario) +: os(os), settings(settings), scenario(scenario) +{ + +} + +Filler::Filler(GUITestOpStatus &os, const QString &objectName, CustomScenario *scenario) +: os(os), settings(GUIDialogWaiter::WaitSettings(objectName)), scenario(scenario) +{ + +} + +Filler::~Filler() { + delete scenario; +} + +GUIDialogWaiter::WaitSettings Filler::getSettings() const { + return settings; +} + +void Filler::run() { + GTGlobals::sleep(500); +// releaseMouseButtons(); + if (NULL == scenario) { + commonScenario(); + } else { + scenario->run(os); + } + GTThread::waitForMainThread(); +} + +void Filler::releaseMouseButtons() { + Qt::MouseButtons buttons = QGuiApplication::mouseButtons(); + + if (buttons | Qt::LeftButton) { + GTMouseDriver::release(Qt::LeftButton); + } + + if (buttons | Qt::RightButton) { + GTMouseDriver::release(Qt::RightButton); + } +} + +} //namespace diff --git a/src/libs_3rdparty/QSpec/src/utils/GTUtilsDialog.h b/src/libs_3rdparty/QSpec/src/utils/GTUtilsDialog.h new file mode 100644 index 0000000000000000000000000000000000000000..2d8b416c8609311b6b452da48efad5fed663e30f --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/utils/GTUtilsDialog.h @@ -0,0 +1,185 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GUI_DIALOG_UTILS_H_ +#define _HI_GUI_DIALOG_UTILS_H_ + +#include <QDialogButtonBox> + +#include <core/CustomScenario.h> + +#include "GTGlobals.h" + +namespace HI { + +class HI_EXPORT Runnable { +public: + virtual void run() = 0; + virtual ~Runnable(){} +}; + +class HI_EXPORT GUIDialogWaiter : public QObject { + Q_OBJECT +public: + enum DialogType { + Modal, + Popup + }; + enum DialogDestiny { + MustBeRun, + MustNotBeRun, + NoMatter + }; + + struct WaitSettings { + WaitSettings(const QString& _objectName = "", + DialogType _dialogType = GUIDialogWaiter::Modal, + int _timeout = 120000, + DialogDestiny _destiny = MustBeRun) : + dialogType(_dialogType), + objectName(_objectName), + timeout(_timeout), + destiny(_destiny) {} + + DialogType dialogType; + QString objectName; + int timeout; + DialogDestiny destiny; + }; + + GUIDialogWaiter(GUITestOpStatus &os, Runnable* _r, const WaitSettings& settings = WaitSettings()); + virtual ~GUIDialogWaiter(); + + WaitSettings getSettings(){return settings;} + void stopTimer(); + static const int timerPeriod = 100; + + bool hadRun; + int waiterId; + + bool isExpectedName(const QString& widgetObjectName, const QString& expectedObjectName); + + bool operator ==(Runnable const * const runnable) const; + +public slots: + void checkDialog(); + void checkDialogPool(); + +private: + GUITestOpStatus &os; + Runnable *runnable; + WaitSettings settings; + + QTimer* timer; + int waitingTime; + + void finishWaiting(); // deletes timer and runnable + +}; + +class HI_EXPORT Filler : public Runnable { +public: + Filler(GUITestOpStatus &os, const GUIDialogWaiter::WaitSettings &settings, CustomScenario *scenario = NULL); + Filler(GUITestOpStatus &os, const QString &objectName, CustomScenario *scenario = NULL); + ~Filler(); + + GUIDialogWaiter::WaitSettings getSettings() const; + void run(); + virtual void commonScenario() {} + +protected: + GUITestOpStatus &os; + GUIDialogWaiter::WaitSettings settings; + CustomScenario *scenario; + +private: + void releaseMouseButtons(); +}; + +#define DIALOG_FILLER_DECLARATION(className, DialogName) \ + class className : public Filler { \ + public: \ + className(HI::GUITestOpStatus& os):Filler(os, DialogName){} \ + virtual void run(); \ + } + +#define DIALOG_FILLER_DEFFINITION(className) \ + void className::run() + + +class HI_EXPORT HangChecker: public QObject{ + Q_OBJECT +public: + HangChecker(GUITestOpStatus &_os); + QTimer* timer; + void startChecking(); + GUITestOpStatus &os; + bool mightHung; +public slots: + void sl_check(); +}; + +class HI_EXPORT GTUtilsDialog{ + friend class TimerLauncher; + friend class GUIDialogWaiter; + friend class HangChecker; +public: + enum CleanupSettings { + FailOnUnfinished, NoFailOnUnfinished + }; + + static QDialogButtonBox * buttonBox(GUITestOpStatus &os, QWidget *dialog); + + static void clickButtonBox(GUITestOpStatus &os, QDialogButtonBox::StandardButton button); + static void clickButtonBox(GUITestOpStatus &os, QWidget *dialog, QDialogButtonBox::StandardButton button); + + // if objectName is not empty, waits for QWidget with a given name + static void waitForDialog(GUITestOpStatus &os, Runnable *r, const GUIDialogWaiter::WaitSettings& settings); + + static void waitForDialog(GUITestOpStatus &os, Runnable *r, int timeout = 0); + + static void waitForDialogClosed(); + + static void waitForDialogWhichMustNotBeRun(GUITestOpStatus &os, Runnable *r); + + static void waitForDialogWhichMayRunOrNot(GUITestOpStatus &os, Runnable *r); + + static void removeRunnable(Runnable const * const runnable); + + // deletes all GUIDialogWaiters, sets err if there are unfinished waiters + static void cleanup(GUITestOpStatus &os, CleanupSettings s = FailOnUnfinished); + + static void startHangChecking(GUITestOpStatus &os); + static void stopHangChecking(); + + static bool isButtonEnabled(GUITestOpStatus& os, QWidget* dialog, QDialogButtonBox::StandardButton button); + +private: + static void checkAllFinished(GUITestOpStatus &os); + + static QList<GUIDialogWaiter*> pool; + static HangChecker* hangChecker; + static const int timerPeriod = 100; +}; + +} // namespace + +#endif diff --git a/src/libs_3rdparty/QSpec/src/utils/GTUtilsToolTip.cpp b/src/libs_3rdparty/QSpec/src/utils/GTUtilsToolTip.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7cd688dd9baeed932f73118ca865d337da5ea1a7 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/utils/GTUtilsToolTip.cpp @@ -0,0 +1,43 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "GTUtilsToolTip.h" + +namespace HI { + +#define GT_CLASS_NAME "GTUtilsToolTip" + +#define GT_METHOD_NAME "checkExistingToolTip" +void GTUtilsToolTip::checkExistingToolTip(GUITestOpStatus &os, const QString& tooltip) { + + QString t = getToolTip(); + GT_CHECK(t.contains(tooltip), "Tooltip is <" + t + ">, doesn't contain <" + tooltip + ">"); +} +#undef GT_METHOD_NAME + +QString GTUtilsToolTip::getToolTip() { + GTGlobals::sleep(3000); + return QToolTip::text(); +} + +#undef GT_CLASS_NAME + +} diff --git a/src/libs_3rdparty/QSpec/src/utils/GTUtilsToolTip.h b/src/libs_3rdparty/QSpec/src/utils/GTUtilsToolTip.h new file mode 100644 index 0000000000000000000000000000000000000000..c23b46d2c9ff6d3652e3d55fcef6b6469ec371f7 --- /dev/null +++ b/src/libs_3rdparty/QSpec/src/utils/GTUtilsToolTip.h @@ -0,0 +1,39 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _HI_GUI_TOOLTIP_UTILS_H_ +#define _HI_GUI_TOOLTIP_UTILS_H_ + +#include "GTGlobals.h" +#include <QToolTip> + +namespace HI { + +class HI_EXPORT GTUtilsToolTip { +public: + static void checkExistingToolTip(GUITestOpStatus &os, const QString& tooltip); + + static QString getToolTip(); +}; + +} // namespace + +#endif diff --git a/src/libs_3rdparty/QSpec/testApp/EventFilter.cpp b/src/libs_3rdparty/QSpec/testApp/EventFilter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ac87648b27aa3fc2846039eb8ea0dd8bd913200b --- /dev/null +++ b/src/libs_3rdparty/QSpec/testApp/EventFilter.cpp @@ -0,0 +1,54 @@ +#include "EventFilter.h" +#include <QDebug> + +KeyEvent::KeyEvent(){ + key = Qt::Key_unknown; + type = QEvent::None; +} + +KeyEvent::KeyEvent(QKeyEvent *e){ + key = (Qt::Key)e->key(); + type = e->type(); +} + +Qt::Key KeyEvent::getKey(){return key;} +QEvent::Type KeyEvent::getType(){return type;} + +MouseEvent::MouseEvent(){ + button = Qt::NoButton; + type = QEvent::None; +} + +MouseEvent::MouseEvent(QMouseEvent *e){ + button = e->button(); + type = e->type(); +} + +Qt::MouseButton MouseEvent::getButton(){return button;} +QEvent::Type MouseEvent::getType(){return type;} + +EventFilter::EventFilter(QObject *parent) : + QObject(parent) +{ +} + +bool EventFilter::eventFilter(QObject *o, QEvent *e){ + QKeyEvent* keyEvent = dynamic_cast<QKeyEvent*>(e); + if(keyEvent != NULL){ + QEvent::Type type = keyEvent->type(); + if(type == QEvent::KeyPress || type == QEvent::KeyRelease){ + keyEvents.append(KeyEvent(keyEvent)); + return QObject::eventFilter(o,e); + } + } + + QMouseEvent* mouseEvent = dynamic_cast<QMouseEvent*>(e); + if(mouseEvent != NULL){ + QEvent::Type type = mouseEvent->type(); + if(type == QEvent::MouseButtonDblClick || type == QEvent::MouseButtonPress || type == QEvent::MouseButtonRelease){ + mouseEvents.append(MouseEvent(mouseEvent)); + return QObject::eventFilter(o,e); + } + } + return QObject::eventFilter(o,e); +} diff --git a/src/libs_3rdparty/QSpec/testApp/EventFilter.h b/src/libs_3rdparty/QSpec/testApp/EventFilter.h new file mode 100644 index 0000000000000000000000000000000000000000..df4458f359cc00f828d3f198eb4960b53b2eb03b --- /dev/null +++ b/src/libs_3rdparty/QSpec/testApp/EventFilter.h @@ -0,0 +1,44 @@ +#ifndef EVENTFILTER_H +#define EVENTFILTER_H + +#include <QObject> +#include <QKeyEvent> + +class KeyEvent +{ +public: + KeyEvent(); + KeyEvent(QKeyEvent*); + + Qt::Key getKey(); + QEvent::Type getType(); +private: + Qt::Key key; + QEvent::Type type; +}; + +class MouseEvent +{ +public: + MouseEvent(); + MouseEvent(QMouseEvent*); + + Qt::MouseButton getButton(); + QEvent::Type getType(); +private: + Qt::MouseButton button; + QEvent::Type type; +}; + +class EventFilter : public QObject +{ + Q_OBJECT +public: + EventFilter(QObject *parent = 0); + QList<KeyEvent> keyEvents; + QList<MouseEvent> mouseEvents; +protected: + bool eventFilter(QObject *, QEvent *); +}; + +#endif // EVENTFILTER_H diff --git a/src/libs_3rdparty/QSpec/testApp/EventRecorderWidget.cpp b/src/libs_3rdparty/QSpec/testApp/EventRecorderWidget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1baef8a7f8839bdb628660b8cf64150903f501c6 --- /dev/null +++ b/src/libs_3rdparty/QSpec/testApp/EventRecorderWidget.cpp @@ -0,0 +1,18 @@ +#include "EventRecorderWidget.h" + +#include <QEvent> +#include <QKeyEvent> + +EventRecorderWidget::EventRecorderWidget(QWidget *parent) : + QWidget(parent) +{ + setGeometry(0,50,50,50); + setFocusPolicy(Qt::ClickFocus); + + QPalette Pal(palette()); + Pal.setColor(QPalette::Background, Qt::darkBlue); + setAutoFillBackground(true); + setPalette(Pal); +} + + diff --git a/src/libs_3rdparty/QSpec/testApp/EventRecorderWidget.h b/src/libs_3rdparty/QSpec/testApp/EventRecorderWidget.h new file mode 100644 index 0000000000000000000000000000000000000000..0862e71be481a8aa3d9000985e923d35061732bc --- /dev/null +++ b/src/libs_3rdparty/QSpec/testApp/EventRecorderWidget.h @@ -0,0 +1,14 @@ +#ifndef EVENTRECORDERWIDGET_H +#define EVENTRECORDERWIDGET_H + +#include <QWidget> + +class EventRecorderWidget : public QWidget +{ + Q_OBJECT +public: + EventRecorderWidget(QWidget *parent = 0); + +}; + +#endif // EVENTRECORDERWIDGET_H diff --git a/src/libs_3rdparty/QSpec/testApp/driversGuiTests.cpp b/src/libs_3rdparty/QSpec/testApp/driversGuiTests.cpp new file mode 100644 index 0000000000000000000000000000000000000000..80716d726d2c24514ab0e52b274de62708a82f80 --- /dev/null +++ b/src/libs_3rdparty/QSpec/testApp/driversGuiTests.cpp @@ -0,0 +1,154 @@ +#include "driversGuiTests.h" +#include "mainwindow.h" +#include "EventFilter.h" +#include "systemTests.h" + +#include <drivers/GTKeyboardDriver.h> +#include <drivers/GTMouseDriver.h> + +#include <QApplication> +#include <QLineEdit> + +namespace { +QLineEdit* getTestLine(){ + return MainWindow::getInstance()->findChild<QLineEdit*>("testLine"); +} + +QWidget* getRecorder(){ + return MainWindow::getInstance()->findChild<QWidget*>("eventRecorder"); +} + +QPoint getWidgetCenter(QWidget* w){ + return w->mapToGlobal(w->rect().center()); +} +} + +using namespace HI; +driversGuiTestsLauncher::driversGuiTestsLauncher(): GUITestsLauncher() +{ + guiTestBase.registerTest(new Test1()); + guiTestBase.registerTest(new Test2()); + guiTestBase.registerTest(new Test3()); + guiTestBase.registerTest(new Test4()); + guiTestBase.registerTest(new Test5()); + guiTestBase.registerTest(new Test6()); + guiTestBase.registerTest(new Test7()); + guiTestBase.registerTest(new FilePermissionTest()); + guiTestBase.registerTest(new DirPermissionTest()); +} + +TEST_CLASS_DEFINITION(Test1){ + QLineEdit* line = getTestLine(); + GTMouseDriver::moveTo(getWidgetCenter(line)); + GTMouseDriver::click(); + GTGlobals::sleep(); + GTKeyboardDriver::keySequence("abcdefghigklmnopqrstuvwxy z"); + CHECK_SET_ERR(line->text() == "abcdefghigklmnopqrstuvwxy z", "expected: abcdefghigklmnopqrstuvwxy z, actual: " + line->text()) + GTGlobals::sleep(500); +} + +TEST_CLASS_DEFINITION(Test2){ + QLineEdit* line = getTestLine(); + GTMouseDriver::moveTo(getWidgetCenter(line)); + GTMouseDriver::click(); + //GTGlobals::sleep(); + GTKeyboardDriver::keySequence("0123456789,<.>!@#$%^&*()-_=+[{]};:\'\"/\\|"); + CHECK_SET_ERR(line->text() == "0123456789,<.>!@#$%^&*()-_=+[{]};:\'\"/\\|", "expected: 0123456789,<.>!@#$%^&*()-_=+[{]};:\'\"/\\|, actual: " + line->text()) + GTGlobals::sleep(500); +} + +TEST_CLASS_DEFINITION(Test3){ + QWidget* recorder = getRecorder(); + GTMouseDriver::moveTo(getWidgetCenter(recorder)); + GTMouseDriver::click(); + + GTKeyboardDriver::keyClick( Qt::Key_Up); + GTGlobals::sleep(500); + + QList<KeyEvent> list = MainWindow::getInstance()->eventFilter->keyEvents; + int i = list.size(); + CHECK_SET_ERR(i == 2, QString("unexpected number of key events: %1").arg(i)); + CHECK_SET_ERR(list.first().getKey() == Qt::Key_Up, QString("unexpected first key: %1").arg(list.first().getKey())); + CHECK_SET_ERR(list.first().getType() == QEvent::KeyPress, QString("unexpected first type: %1").arg(list.first().getType())); + CHECK_SET_ERR(list.last().getKey() == Qt::Key_Up, QString("unexpected second key: %1").arg(list.last().getKey())); + CHECK_SET_ERR(list.last().getType() == QEvent::KeyRelease, QString("unexpected second type: %1").arg(list.last().getType())); +} + +TEST_CLASS_DEFINITION(Test4){ + QWidget* recorder = getRecorder(); + GTMouseDriver::moveTo(getWidgetCenter(recorder)); + GTMouseDriver::click(); + GTKeyboardDriver::keyClick( Qt::Key_Enter, Qt::ControlModifier); + GTGlobals::sleep(500); + + QList<KeyEvent> list = MainWindow::getInstance()->eventFilter->keyEvents; + int i = list.size(); + + CHECK_SET_ERR(i == 4, QString("unexpected number of key events: %1").arg(i)); + + CHECK_SET_ERR(list[0].getKey() == Qt::Key_Control, QString("unexpected 1 key: %1").arg(list[0].getKey())); + CHECK_SET_ERR(list[0].getType() == QEvent::KeyPress, QString("unexpected 1 type: %1").arg(list[0].getType())); + + CHECK_SET_ERR(list[1].getKey() == Qt::Key_Return, QString("unexpected 2 key: %1").arg(list[1].getKey())); + CHECK_SET_ERR(list[1].getType() == QEvent::KeyPress, QString("unexpected 2 key: %1").arg(list[1].getType())); + + CHECK_SET_ERR(list[2].getKey() == Qt::Key_Return, QString("unexpected 3 key: %1").arg(list[2].getKey())); + CHECK_SET_ERR(list[2].getType() == QEvent::KeyRelease, QString("unexpected 3 type: %1").arg(list[2].getType())); + + CHECK_SET_ERR(list[3].getKey() == Qt::Key_Control, QString("unexpected 4 key: %1").arg(list[3].getKey())); + CHECK_SET_ERR(list[3].getType() == QEvent::KeyRelease, QString("unexpected 4 type: %1").arg(list[3].getType())); +} + +TEST_CLASS_DEFINITION(Test5){ + QWidget* recorder = getRecorder(); + GTMouseDriver::moveTo(getWidgetCenter(recorder)); + GTMouseDriver::click(); + GTGlobals::sleep(500); + + QList<MouseEvent> list = MainWindow::getInstance()->eventFilter->mouseEvents; + int i = list.size(); + + CHECK_SET_ERR(i == 2, QString("unexpected number of mouse events: %1").arg(i)); + + CHECK_SET_ERR(list[0].getButton() == Qt::LeftButton, QString("unexpected 1 button: %1").arg(list[0].getButton())); + CHECK_SET_ERR(list[0].getType() == QEvent::MouseButtonPress, QString("unexpected 1 type: %1").arg(list[0].getType())); + + CHECK_SET_ERR(list[1].getButton() == Qt::LeftButton, QString("unexpected 2 button: %1").arg(list[1].getButton())); + CHECK_SET_ERR(list[1].getType() == QEvent::MouseButtonRelease, QString("unexpected 2 type: %1").arg(list[1].getType())); +} + +TEST_CLASS_DEFINITION(Test6){ + QWidget* recorder = getRecorder(); + GTMouseDriver::moveTo(getWidgetCenter(recorder)); + GTMouseDriver::click(Qt::RightButton); + GTGlobals::sleep(500); + + QList<MouseEvent> list = MainWindow::getInstance()->eventFilter->mouseEvents; + int i = list.size(); + + CHECK_SET_ERR(i == 2, QString("unexpected number of mouse events: %1").arg(i)); + + CHECK_SET_ERR(list[0].getButton() == Qt::RightButton, QString("unexpected 1 button: %1").arg(list[0].getButton())); + CHECK_SET_ERR(list[0].getType() == QEvent::MouseButtonPress, QString("unexpected 1 type: %1").arg(list[0].getType())); + + CHECK_SET_ERR(list[1].getButton() == Qt::RightButton, QString("unexpected 2 button: %1").arg(list[1].getButton())); + CHECK_SET_ERR(list[1].getType() == QEvent::MouseButtonRelease, QString("unexpected 2 type: %1").arg(list[1].getType())); +} + +TEST_CLASS_DEFINITION(Test7){ + QWidget* recorder = getRecorder(); + GTMouseDriver::moveTo(getWidgetCenter(recorder)); + GTMouseDriver::doubleClick(os); + GTGlobals::sleep(500); + + QList<MouseEvent> list = MainWindow::getInstance()->eventFilter->mouseEvents; + int i = list.size(); + + CHECK_SET_ERR(i == 2, QString("unexpected number of mouse events: %1").arg(i)); + + CHECK_SET_ERR(list[0].getButton() == Qt::LeftButton, QString("unexpected 1 button: %1").arg(list[0].getButton())); + CHECK_SET_ERR(list[0].getType() == QEvent::MouseButtonPress, QString("unexpected 1 type: %1").arg(list[0].getType())); + + CHECK_SET_ERR(list[1].getButton() == Qt::LeftButton, QString("unexpected 2 button: %1").arg(list[1].getButton())); + CHECK_SET_ERR(list[1].getType() == QEvent::MouseButtonRelease, QString("unexpected 2 type: %1").arg(list[1].getType())); +} diff --git a/src/libs_3rdparty/QSpec/testApp/driversGuiTests.h b/src/libs_3rdparty/QSpec/testApp/driversGuiTests.h new file mode 100644 index 0000000000000000000000000000000000000000..ffcd6f64f69fc7a21095854e49e4661a511e1e83 --- /dev/null +++ b/src/libs_3rdparty/QSpec/testApp/driversGuiTests.h @@ -0,0 +1,27 @@ +#ifndef DRIVERSGUITESTS_H +#define DRIVERSGUITESTS_H + +#include <core/GUITest.h> +#include <core/GUITestBase.h> +#include <core/GUITestsLauncher.h> +#include <GTGlobals.h> + +#include <QThread> + +using namespace HI; +class driversGuiTestsLauncher: public GUITestsLauncher +{ +public: + driversGuiTestsLauncher(); +}; +#define GUI_TEST_SUITE "Drivers_gui_test" + TEST_CLASS_DECLARATION(Test1) + TEST_CLASS_DECLARATION(Test2) + TEST_CLASS_DECLARATION(Test3) + TEST_CLASS_DECLARATION(Test4) + TEST_CLASS_DECLARATION(Test5) + TEST_CLASS_DECLARATION(Test6) + TEST_CLASS_DECLARATION(Test7) +#undef GUI_TEST_SUITE + +#endif // DRIVERSGUITESTS_H diff --git a/src/libs_3rdparty/QSpec/testApp/main.cpp b/src/libs_3rdparty/QSpec/testApp/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6837e433f5096f94df4daab69ce140493de9b4d9 --- /dev/null +++ b/src/libs_3rdparty/QSpec/testApp/main.cpp @@ -0,0 +1,24 @@ +#include "mainwindow.h" +#include "driversGuiTests.h" +#include <QApplication> +#include <QLineEdit> +#include <QTime> + +#include <drivers/GTMouseDriver.h> + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + MainWindow* w = MainWindow::getInstance(); + w->show(); + + QString runGuiTest = qgetenv("HI_GUI_TEST"); + if (!runGuiTest.isEmpty()) { + + GUITestsLauncher* launcher = new driversGuiTestsLauncher(); + QTimer::singleShot(1000, launcher, SLOT(sl_runTest())); + } + + + return a.exec(); +} diff --git a/src/libs_3rdparty/QSpec/testApp/mainwindow.cpp b/src/libs_3rdparty/QSpec/testApp/mainwindow.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1e4f66ab7dbfcb0454de91c05bcef29e7aa9b867 --- /dev/null +++ b/src/libs_3rdparty/QSpec/testApp/mainwindow.cpp @@ -0,0 +1,40 @@ +#include "mainwindow.h" +#include "EventRecorderWidget.h" +#include "EventFilter.h" + +#include <QEvent> +#include <QKeyEvent> +#include <QLineEdit> +#include <QGridLayout> + +MainWindow* MainWindow::instance; + +MainWindow::MainWindow(QWidget *parent) + : QMainWindow(parent) +{ + QGridLayout* l = new QGridLayout(this); + setLayout(l); + + testLine = new QLineEdit(this); + testLine->setObjectName("testLine"); + l->addWidget(testLine, 0, 0, 5, 5); + + eventFilter = new EventFilter(this); + + eventRecorderWidget = new EventRecorderWidget(this); + eventRecorderWidget->setObjectName("eventRecorder"); + eventRecorderWidget->installEventFilter(eventFilter); + l->addWidget(eventRecorderWidget, 1, 0, 5, 5); +} + +MainWindow::~MainWindow() +{ + +} + +MainWindow* MainWindow::getInstance(){ + if(instance == NULL){ + instance = new MainWindow(); + } + return instance; +} diff --git a/src/libs_3rdparty/QSpec/testApp/mainwindow.h b/src/libs_3rdparty/QSpec/testApp/mainwindow.h new file mode 100644 index 0000000000000000000000000000000000000000..e054ca864ae2f70481bb0599902f09d7ea201f5d --- /dev/null +++ b/src/libs_3rdparty/QSpec/testApp/mainwindow.h @@ -0,0 +1,27 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include <QMainWindow> +#include <QMutex> + +class QLineEdit; +class EventRecorderWidget; +class EventFilter; + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + static MainWindow* getInstance(); + EventFilter* eventFilter; + ~MainWindow(); +protected: + MainWindow(QWidget *parent = 0); +private: + static MainWindow* instance; + QLineEdit* testLine; + EventRecorderWidget* eventRecorderWidget; +}; + +#endif // MAINWINDOW_H diff --git a/src/libs_3rdparty/QSpec/testApp/systemTests.cpp b/src/libs_3rdparty/QSpec/testApp/systemTests.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9b9b2940f72a391b565d4c4fa68d75775b6d5599 --- /dev/null +++ b/src/libs_3rdparty/QSpec/testApp/systemTests.cpp @@ -0,0 +1,88 @@ +#include "systemTests.h" + +#include <system/GTFile.h> + +using namespace HI; + +TEST_CLASS_DEFINITION(FilePermissionTest) +{ + QDir dir("TestFile.dir"); + bool mk = dir.mkdir("."); + qDebug() << "created dir: " << mk; + QString testDir = dir.path(); + + // create a file and check we can write to it + QString f1(testDir+"/" + "testfile1"); + GTFile::create(os, f1); + qint64 f1_size = GTFile::readAll(os, f1).size(); + QFile ff1(f1); + qDebug() << "Initial testfile1 perms " << ff1.permissions(); + bool res = ff1.open(QFile::ReadWrite); + CHECK_SET_ERR(res, "cannot open testfile1 to write"); + res = (5 == ff1.write("aaaaa")); + ff1.close(); + CHECK_SET_ERR(res, "cannot write to testfile1"); + f1_size = GTFile::getSize(os, f1); + CHECK_SET_ERR(f1_size == 5, "wrong size of testfile1"); + + // set the file RO and check we cannot modify it + //GTFile::setReadOnly(os, f1); TODO: restore after merging with master + qDebug() << "RO testfile1 perms " << ff1.permissions(); + res = ff1.open(QFile::ReadWrite); + CHECK_SET_ERR(!res, "should not open testfile1 to write"); + res = (-1 == ff1.write("bb")); + ff1.close(); + CHECK_SET_ERR(res, "should not write to testfile1"); + f1_size = GTFile::getSize(os, f1); + CHECK_SET_ERR(f1_size == 5, "wrong size of testfile1"); + + // set the file RW and check we can modify it + GTFile::setReadWrite(os, f1); + qDebug() << "RW testfile1 perms " << ff1.permissions(); + QFile ff2(f1); + res = ff2.open(QFile::Append); + CHECK_SET_ERR(res, "should open testfile1 to write"); + res = (3 == ff2.write("ccc")); + ff2.close(); + CHECK_SET_ERR(res, "should write to testfile1"); + f1_size = GTFile::getSize(os, f1); + CHECK_SET_ERR(f1_size == 8, "wrong size of testfile1"); + + // set the file RO and check we can remove it + // TODO this does not work on Windows due to RO attr set +// GTFile::setReadOnly(os, f1); +// res = ff1.remove(); +// CHECK_SET_ERR(res, "failed to delete RO testfile1"); +} + +TEST_CLASS_DEFINITION(DirPermissionTest) +{ + QDir dir("TestDir.dir"); + bool mk = dir.mkdir("."); + qDebug() << "created dir: " << mk; + QString testDir = dir.path(); + + // check we can create a file in it + QString f1(testDir+"/" + "testfile1"); + GTFile::create(os, f1); + + // set the dir RO and check we can read the file + //GTFile::setReadOnly(os, testDir); TODO: restore after merging with master + QFile ff1(f1); + qDebug() << "Initial testfile1 perms " << ff1.permissions(); + qint64 f1_size = GTFile::readAll(os, f1).size(); + CHECK_SET_ERR(f1_size == 0, "cannot access testfile1"); + + // but cannot create a new file + QString f2(testDir+"/" + "testfile2"); + bool res = QFile(f2).open(QIODevice::WriteOnly); + CHECK_SET_ERR(!res, "should not create new file"); + + // set the dir RW and check we can create the new file again + GTFile::setReadWrite(os, testDir); + GTFile::create( os, f2 ); + +// // set the dir RO and check we can delete it +// GTFile::setReadOnly(os, testDir); + +} diff --git a/src/libs_3rdparty/QSpec/testApp/systemTests.h b/src/libs_3rdparty/QSpec/testApp/systemTests.h new file mode 100644 index 0000000000000000000000000000000000000000..b81dee33ae9f84e7358cedbd168a215b3e58c21b --- /dev/null +++ b/src/libs_3rdparty/QSpec/testApp/systemTests.h @@ -0,0 +1,15 @@ +#ifndef SYSTEMTESTS_H +#define SYSTEMTESTS_H + +#include <core/GUITest.h> +#include <core/GUITestBase.h> +#include <GTGlobals.h> + +using namespace HI; + +#define GUI_TEST_SUITE "System_test" + TEST_CLASS_DECLARATION(FilePermissionTest) + TEST_CLASS_DECLARATION(DirPermissionTest) +#undef GUI_TEST_SUITE + +#endif // SYSTEMTESTS_H diff --git a/src/libs_3rdparty/QSpec/testApp/testApp.pro b/src/libs_3rdparty/QSpec/testApp/testApp.pro new file mode 100644 index 0000000000000000000000000000000000000000..7daf9fb5348155e49e324097f7821dc903a4e34a --- /dev/null +++ b/src/libs_3rdparty/QSpec/testApp/testApp.pro @@ -0,0 +1,30 @@ +QT += core gui testlib + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = testApp +TEMPLATE = app + + +SOURCES += main.cpp\ + mainwindow.cpp \ + driversGuiTests.cpp \ + systemTests.cpp \ + EventRecorderWidget.cpp \ + EventFilter.cpp + +HEADERS += mainwindow.h \ + driversGuiTests.h \ + systemTests.h \ + EventRecorderWidget.h \ + EventFilter.h + +INCLUDEPATH +=../src/ + +CONFIG(debug, debug|release) { + LIBS += -L../_build/debug -lqspecd +} + +CONFIG(release, debug|release) { + LIBS += -L../_build/release -lqspec +} diff --git a/src/libs_3rdparty/breakpad/breakpad.pri b/src/libs_3rdparty/breakpad/breakpad.pri index 17337bc8baa24aa3f3b2dc0978c1b84741f1cf3f..500a3d701f97fb6a947260e6a1d7b608b4755458 100644 --- a/src/libs_3rdparty/breakpad/breakpad.pri +++ b/src/libs_3rdparty/breakpad/breakpad.pri @@ -1,11 +1,10 @@ include( ../../ugene_globals.pri ) -UGENE_RELATIVE_DESTDIR = '' TEMPLATE = lib CONFIG += thread debug_and_release warn_off INCLUDEPATH += src TARGET = breakpad -DESTDIR = ../../_release +DESTDIR = ../../$$out_dir() QT -= gui !debug_and_release|build_pass { @@ -13,7 +12,6 @@ QT -= gui TARGET = breakpadd DEFINES += _DEBUG CONFIG += console - DESTDIR = ../../_debug OBJECTS_DIR = _tmp/obj/debug } @@ -24,7 +22,7 @@ QT -= gui } unix { - target.path = $$UGENE_INSTALL_DIR/$$UGENE_RELATIVE_DESTDIR + target.path = $$UGENE_INSTALL_DIR/ INSTALLS += target } @@ -34,3 +32,7 @@ macx { QMAKE_RPATHDIR += @executable_path/ QMAKE_LFLAGS_SONAME = -Wl,-dylib_install_name,@rpath/ } + +win32 { + LIBS += psapi.lib +} diff --git a/src/libs_3rdparty/qscore/qscore.pri b/src/libs_3rdparty/qscore/qscore.pri index 0c59e66a1ba8f83d36f1da3196277d47f08e092a..dfbe22e5c49b5a1440df7984624ac1e9797caaa6 100644 --- a/src/libs_3rdparty/qscore/qscore.pri +++ b/src/libs_3rdparty/qscore/qscore.pri @@ -1,31 +1,27 @@ # include (qscore.pri) include( ../../ugene_globals.pri ) -UGENE_RELATIVE_DESTDIR = '' TEMPLATE = lib CONFIG +=qt thread debug_and_release staticlib warn_off QT += network xml script -INCLUDEPATH += src _tmp ../../core/src ../../include +INCLUDEPATH += src _tmp ../../include -LIBS += -L../../_release -lU2Core -lU2Core -lcore +LIBS += -L../../$$out_dir() +LIBS += -lU2Core$$D +DESTDIR = ../../$$out_dir() +TARGET = qscore$$D !debug_and_release|build_pass { CONFIG(debug, debug|release) { - TARGET = qscored DEFINES+=_DEBUG CONFIG +=console - DESTDIR=../../_debug/ MOC_DIR=_tmp/moc/debug OBJECTS_DIR=_tmp/obj/debug - LIBS -= -L../../_release -lU2Core -lU2Core -lcore - LIBS += -L../../_debug -lcored -lU2Cored -lU2Cored } CONFIG(release, debug|release) { - TARGET = qscore DEFINES+=NDEBUG - DESTDIR=../../_release/ MOC_DIR=_tmp/moc/release OBJECTS_DIR=_tmp/obj/release } @@ -50,6 +46,6 @@ macx { } #unix { -# target.path = $$UGENE_INSTALL_DIR/$$UGENE_RELATIVE_DESTDIR +# target.path = $$UGENE_INSTALL_DIR/ # INSTALLS += target #} diff --git a/src/libs_3rdparty/samtools/samtools.pri b/src/libs_3rdparty/samtools/samtools.pri index 22dab69b4f3f13a72df6da7763dbae7f335ed31c..e9dc079b5c4d8096a3ee22601bcf4fa59dab3425 100644 --- a/src/libs_3rdparty/samtools/samtools.pri +++ b/src/libs_3rdparty/samtools/samtools.pri @@ -1,5 +1,4 @@ include( ../../ugene_globals.pri ) -UGENE_RELATIVE_DESTDIR = '' TEMPLATE = lib CONFIG +=thread debug_and_release staticlib warn_off @@ -7,13 +6,11 @@ INCLUDEPATH += src src/samtools ../../include win32 : INCLUDEPATH += src/samtools/win32 DEFINES+="_FILE_OFFSET_BITS=64" _LARGEFILE64_SOURCE _USE_KNETFILE win32 : DEFINES += _USE_MATH_DEFINES "__func__=__FUNCTION__" "R_OK=4" "atoll=_atoi64" "alloca=_alloca" -LIBS += -L../../_release -use_bundled_zlib() { - LIBS += -lzlib -} else { - LIBS += -lz -} +LIBS += -L../../$$out_dir() +LIBS += $$add_z_lib() +DESTDIR = ../../$$out_dir() +TARGET = samtools$$D macx { DEFINES+="_CURSES_LIB=1" @@ -23,24 +20,14 @@ macx { !debug_and_release|build_pass { CONFIG(debug, debug|release) { - TARGET = samtoolsd DEFINES+=_DEBUG CONFIG +=console - DESTDIR=../../_debug/ MOC_DIR=_tmp/moc/debug OBJECTS_DIR=_tmp/obj/debug - LIBS -= -L../../_release - LIBS += -L../../_debug - use_bundled_zlib() { - LIBS -= -lzlib - LIBS += -lzlibd - } } CONFIG(release, debug|release) { - TARGET = samtools DEFINES+=NDEBUG - DESTDIR=../../_release/ MOC_DIR=_tmp/moc/release OBJECTS_DIR=_tmp/obj/release } @@ -69,7 +56,12 @@ macx { QMAKE_LFLAGS_SONAME = -Wl,-dylib_install_name,@rpath/ } +linux-g++ { + # Original samtools package has multiple warnings like this. + QMAKE_CXXFLAGS += -Wno-sign-compare +} + #unix { -# target.path = $$UGENE_INSTALL_DIR/$$UGENE_RELATIVE_DESTDIR +# target.path = $$UGENE_INSTALL_DIR/ # INSTALLS += target #} diff --git a/src/libs_3rdparty/samtools/src/SamtoolsAdapter.cpp b/src/libs_3rdparty/samtools/src/SamtoolsAdapter.cpp index a3f6013bbe4b1c2a9ff550422405c4b01f98b373..adccec35abbe8aafb1a6c8b61a98dc4b6d51a786 100644 --- a/src/libs_3rdparty/samtools/src/SamtoolsAdapter.cpp +++ b/src/libs_3rdparty/samtools/src/SamtoolsAdapter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/libs_3rdparty/samtools/src/SamtoolsAdapter.h b/src/libs_3rdparty/samtools/src/SamtoolsAdapter.h index 1cde1a3c6dc0c8a1a8c886aff83fbfc5762cecc2..0523571d99b74815405e0150000edd086dc7a852 100644 --- a/src/libs_3rdparty/samtools/src/SamtoolsAdapter.h +++ b/src/libs_3rdparty/samtools/src/SamtoolsAdapter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/libs_3rdparty/samtools/src/samtools/bam_sort.c b/src/libs_3rdparty/samtools/src/samtools/bam_sort.c index 761a3920c1118f99e4dfbbd0c0f3f38c46d342cc..1287e9d252c621bbdcb6a55f965247a6e43cc1dd 100644 --- a/src/libs_3rdparty/samtools/src/samtools/bam_sort.c +++ b/src/libs_3rdparty/samtools/src/samtools/bam_sort.c @@ -458,15 +458,15 @@ void bam_sort_core(int is_by_qname, const char *fn, const char *prefix, size_t m int bam_sort(int argc, char *argv[]) { size_t max_mem = 500000000; - int c, is_by_qname = 0, is_stdout = 0; - while (0) { - //while ((c = getopt(argc, argv, "nom:")) >= 0) { - switch (c) { - case 'o': is_stdout = 1; break; - case 'n': is_by_qname = 1; break; - case 'm': max_mem = atol(optarg); break; - } - } + int is_by_qname = 0, is_stdout = 0; + //int c; + //while ((c = getopt(argc, argv, "nom:")) >= 0) { + // switch (c) { + // case 'o': is_stdout = 1; break; + // case 'n': is_by_qname = 1; break; + // case 'm': max_mem = atol(optarg); break; + // } + //} if (optind + 2 > argc) { fprintf(stderr, "Usage: samtools sort [-on] [-m <maxMem>] <in.bam> <out.prefix>\n"); return 1; diff --git a/src/libs_3rdparty/samtools/src/samtools/ksort.h b/src/libs_3rdparty/samtools/src/samtools/ksort.h index 40d41f71aedb10082351bede1f878765c344cf26..fd2177fc45534a3f476b4da5040de6f1004bb5cd 100644 --- a/src/libs_3rdparty/samtools/src/samtools/ksort.h +++ b/src/libs_3rdparty/samtools/src/samtools/ksort.h @@ -69,7 +69,7 @@ typedef struct { int depth; } ks_isort_stack_t; -#define KSORT_SWAP(type_t, a, b) { register type_t t=(a); (a)=(b); (b)=t; } +#define KSORT_SWAP(type_t, a, b) { type_t t=(a); (a)=(b); (b)=t; } #define KSORT_INIT(name, type_t, __sort_lt) \ void ks_mergesort_##name(size_t n, type_t array[], type_t temp[]) \ diff --git a/src/libs_3rdparty/sqlite3/sqlite3.pri b/src/libs_3rdparty/sqlite3/sqlite3.pri index 86354d31384376114a5e54760a69664a256bd5ac..3f0493d34878c3e8514d4ca85bc86aee4ad0b9ef 100644 --- a/src/libs_3rdparty/sqlite3/sqlite3.pri +++ b/src/libs_3rdparty/sqlite3/sqlite3.pri @@ -1,7 +1,6 @@ # include (sqlite.pri) include( ../../ugene_globals.pri ) -UGENE_RELATIVE_DESTDIR = '' TARGET = ugenedb TEMPLATE = lib @@ -11,24 +10,20 @@ DEFINES+=SQLITE_ENABLE_COLUMN_METADATA DEFINES+=SQLITE_ENABLE_RTREE unix:DEFINES+=SQLITE_OMIT_LOAD_EXTENSION DEFINES+=THREADSAFE -LIBS += -L../../_release +LIBS += -L../../$$out_dir() +DESTDIR = ../../$$out_dir() +TARGET = ugenedb$$D !debug_and_release|build_pass { CONFIG(debug, debug|release) { - TARGET = ugenedbd DEFINES+=_DEBUG CONFIG +=console - DESTDIR=../../_debug/ OBJECTS_DIR=_tmp/obj/debug - LIBS -= -L../../_release - LIBS += -L../../_debug } CONFIG(release, debug|release) { - TARGET = ugenedb DEFINES+=NDEBUG - DESTDIR=../../_release/ OBJECTS_DIR=_tmp/obj/release } } @@ -45,7 +40,7 @@ win32 { unix { - target.path = $$UGENE_INSTALL_DIR/$$UGENE_RELATIVE_DESTDIR + target.path = $$UGENE_INSTALL_DIR/ INSTALLS += target } diff --git a/src/libs_3rdparty/zlib/zlib.pri b/src/libs_3rdparty/zlib/zlib.pri index 6e809a6679465abd86b880362130fbca98c048e8..690c1aeabbb1b6a1c68930d1e849b2f14a6d237c 100644 --- a/src/libs_3rdparty/zlib/zlib.pri +++ b/src/libs_3rdparty/zlib/zlib.pri @@ -1,5 +1,4 @@ include( ../../ugene_globals.pri ) -UGENE_RELATIVE_DESTDIR = '' TEMPLATE = lib CONFIG +=thread debug_and_release staticlib @@ -7,7 +6,7 @@ DEFINES+= _CRT_SECURE_NO_WARNINGS INCLUDEPATH += src TARGET = zlib -DESTDIR=../../_release +DESTDIR = ../../$$out_dir() !debug_and_release|build_pass { @@ -15,7 +14,6 @@ DESTDIR=../../_release TARGET = zlibd DEFINES+=_DEBUG CONFIG +=console - DESTDIR=../../_debug OBJECTS_DIR=_tmp/obj/debug MOC_DIR=_tmp/moc/debug } @@ -37,6 +35,10 @@ win32 { QMAKE_CXXFLAGS+=/wd4996 QMAKE_MSVC_PROJECT_NAME=lib_3rd_zlib } +win32-msvc2015 { + DEFINES += _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS + DEFINES += _XKEYCHECK_H +} macx { QMAKE_RPATHDIR += @executable_path/ @@ -44,6 +46,6 @@ macx { } #unix { -# target.path = $$UGENE_INSTALL_DIR/$$UGENE_RELATIVE_DESTDIR +# target.path = $$UGENE_INSTALL_DIR/ # INSTALLS += target #} diff --git a/src/plugins/CoreTests/src/AnnotationTableObjectTest.cpp b/src/plugins/CoreTests/src/AnnotationTableObjectTest.cpp index e11ee395aaccb3e2ca9a8d2fa6c721695e656cfb..8a06fbf9b8d0e185eddcea553189befa4c81119d 100644 --- a/src/plugins/CoreTests/src/AnnotationTableObjectTest.cpp +++ b/src/plugins/CoreTests/src/AnnotationTableObjectTest.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -141,6 +141,8 @@ void GTest_FindAnnotationByNum::cleanup() { if (result != NULL && !annotationContextName.isEmpty()) { removeContext(annotationContextName); } + + XmlTest::cleanup(); } //--------------------------------------------------------------- @@ -221,6 +223,8 @@ void GTest_FindAnnotationByName::cleanup() { if (result != NULL && !annotationContextName.isEmpty()) { removeContext(annotationContextName); } + + XmlTest::cleanup(); } //--------------------------------------------------------------- @@ -462,24 +466,7 @@ Task::ReportResult GTest_CheckAnnotationQualifierIsAbsent::report() { } const SharedAnnotationData a = annCtx->getAnnotation(); QVector<U2Qualifier> res; - if (res.isEmpty()) { - int i = 0; - i++; - } - else { - int j = 0; - j++; - } a->findQualifiers(qName, res); - if (res.isEmpty()) { - int i = 0; - i++; - } - else { - int j = 0; - j++; - stateInfo.setError(QString("An annotation has qualifier %1, but it shouldn't!").arg(qName)); - } if (!res.isEmpty()) { stateInfo.setError(QString("An annotation has qualifier %1, but it shouldn't!").arg(qName)); } @@ -1063,6 +1050,8 @@ void GTest_FindAnnotationByLocation::cleanup() { if (result != NULL && !annotationContextName.isEmpty()) { removeContext(annotationContextName); } + + XmlTest::cleanup(); } //--------------------------------------------------------------- @@ -1099,6 +1088,8 @@ void GTest_CreateTmpAnnotationObject::cleanup() { removeContext(objContextName); } delete aobj; + + XmlTest::cleanup(); } //--------------------------------------------------------------- diff --git a/src/plugins/CoreTests/src/AnnotationTableObjectTest.h b/src/plugins/CoreTests/src/AnnotationTableObjectTest.h index 2909c466b0ed6e512a8c114217d1f33cdb34b0f9..c3d88a874832c5004e6393e3dcb8d06490d82b2e 100644 --- a/src/plugins/CoreTests/src/AnnotationTableObjectTest.h +++ b/src/plugins/CoreTests/src/AnnotationTableObjectTest.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -41,7 +41,7 @@ private: SharedAnnotationData aData; }; -class GTest_CheckNumAnnotations : public GTest { +class GTest_CheckNumAnnotations : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CheckNumAnnotations, "check-num-annotations") @@ -52,7 +52,7 @@ private: int num; }; -class GTest_FindAnnotationByNum : public GTest { +class GTest_FindAnnotationByNum : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_FindAnnotationByNum, "find-annotation-by-number") @@ -69,7 +69,7 @@ private: Annotation *result; }; -class GTest_FindAnnotationByName : public GTest { +class GTest_FindAnnotationByName : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_FindAnnotationByName, "find-annotation-by-name") @@ -87,7 +87,7 @@ private: Annotation *result; }; -class GTest_FindAnnotationByLocation : public GTest { +class GTest_FindAnnotationByLocation : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_FindAnnotationByLocation, "find-annotation-by-location") @@ -106,7 +106,7 @@ private: Annotation *result; }; -class GTest_CheckAnnotationLocation : public GTest { +class GTest_CheckAnnotationLocation : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CheckAnnotationLocation, "check-annotation-location") @@ -118,7 +118,7 @@ private: U2Strand strand; }; -class GTest_CheckAnnotationName : public GTest { +class GTest_CheckAnnotationName : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CheckAnnotationName, "check-annotation-name") @@ -129,7 +129,7 @@ private: QString aName; }; -class GTest_CheckAnnotationSequence : public GTest { +class GTest_CheckAnnotationSequence : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CheckAnnotationSequence, "check-annotation-sequence") @@ -142,7 +142,7 @@ private: }; -class GTest_CheckAnnotationQualifier : public GTest { +class GTest_CheckAnnotationQualifier : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CheckAnnotationQualifier, "check-annotation-qualifier") @@ -155,7 +155,7 @@ private: }; -class GTest_CheckAnnotationQualifierIsAbsent : public GTest { +class GTest_CheckAnnotationQualifierIsAbsent : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CheckAnnotationQualifierIsAbsent, "check-no-annotation-qualifier") @@ -167,7 +167,7 @@ private: }; -class GTest_CheckAnnotationsNumInTwoObjects : public GTest { +class GTest_CheckAnnotationsNumInTwoObjects : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CheckAnnotationsNumInTwoObjects, "compare-annotations-num-in-two-objects") @@ -177,7 +177,7 @@ class GTest_CheckAnnotationsNumInTwoObjects : public GTest { QString secondDocContextName; }; -class GTest_CheckAnnotationsLocationsInTwoObjects : public GTest { +class GTest_CheckAnnotationsLocationsInTwoObjects : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CheckAnnotationsLocationsInTwoObjects, "compare-annotations-locations-in-two-objects") @@ -188,7 +188,7 @@ class GTest_CheckAnnotationsLocationsInTwoObjects : public GTest { }; // compare annotations that may be in different order in two docs -class GTest_CheckAnnotationsLocationsAndNumReorderdered : public GTest { +class GTest_CheckAnnotationsLocationsAndNumReorderdered : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CheckAnnotationsLocationsAndNumReorderdered, "compare-annotations-locations-and-num-reordered") @@ -197,7 +197,7 @@ class GTest_CheckAnnotationsLocationsAndNumReorderdered : public GTest { QString doc2CtxName; }; -class GTest_CheckAnnotationsQualifiersInTwoObjects : public GTest { +class GTest_CheckAnnotationsQualifiersInTwoObjects : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CheckAnnotationsQualifiersInTwoObjects, "compare-annotations-qualifiers-in-two-objects") @@ -206,7 +206,7 @@ class GTest_CheckAnnotationsQualifiersInTwoObjects : public GTest { QString secondDocContextName; }; -class GTest_CheckAnnotationsNamesInTwoObjects : public GTest { +class GTest_CheckAnnotationsNamesInTwoObjects : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CheckAnnotationsNamesInTwoObjects, "compare-annotations-names-in-two-objects") @@ -215,7 +215,7 @@ class GTest_CheckAnnotationsNamesInTwoObjects : public GTest { QString secondDocContextName; }; -class GTest_CreateTmpAnnotationObject : public GTest { +class GTest_CreateTmpAnnotationObject : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CreateTmpAnnotationObject, "create-tmp-annotation-object") diff --git a/src/plugins/CoreTests/src/AsnParserTests.cpp b/src/plugins/CoreTests/src/AsnParserTests.cpp index f9fdba9719b94b129a6f3a8d8e1fbddff0412513..0c40c5b46bcebba836e5f5aa1343720f8b7d6bdc 100644 --- a/src/plugins/CoreTests/src/AsnParserTests.cpp +++ b/src/plugins/CoreTests/src/AsnParserTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -81,6 +81,8 @@ void GTest_LoadAsnTree::cleanup() removeContext(asnTreeContextName); delete rootElem; } + + XmlTest::cleanup(); } Task::ReportResult GTest_LoadAsnTree::report() { @@ -125,6 +127,8 @@ void GTest_FindFirstNodeByName::cleanup() if (contextAdded) { removeContext(nodeContextName); } + + XmlTest::cleanup(); } Task::ReportResult GTest_FindFirstNodeByName::report() { diff --git a/src/plugins/CoreTests/src/AsnParserTests.h b/src/plugins/CoreTests/src/AsnParserTests.h index e84c4d74d1b51ce6c46997ec0c21b732bb3c78dc..6d6d484ed7ec9b4c9c6694d62cbc550fe3c1886f 100644 --- a/src/plugins/CoreTests/src/AsnParserTests.h +++ b/src/plugins/CoreTests/src/AsnParserTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,7 +32,7 @@ namespace U2 { class AsnNode; -class GTest_LoadAsnTree : public GTest { +class GTest_LoadAsnTree : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_LoadAsnTree, "load-asn-tree"); @@ -47,7 +47,7 @@ private: AsnNode* rootElem; }; -class GTest_FindFirstNodeByName : public GTest { +class GTest_FindFirstNodeByName : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_FindFirstNodeByName, "find-first-node-by-name"); @@ -62,7 +62,7 @@ private: }; -class GTest_CheckNodeType : public GTest { +class GTest_CheckNodeType : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CheckNodeType, "check-node-type"); @@ -74,7 +74,7 @@ private: }; -class GTest_CheckNodeValue : public GTest { +class GTest_CheckNodeValue : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CheckNodeValue, "check-node-value"); @@ -86,7 +86,7 @@ private: }; -class GTest_CheckNodeChildrenCount : public GTest { +class GTest_CheckNodeChildrenCount : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CheckNodeChildrenCount, "check-node-children-count"); diff --git a/src/plugins/CoreTests/src/BinaryFindOpenCLTests.cpp b/src/plugins/CoreTests/src/BinaryFindOpenCLTests.cpp index dbfbf6d2b50b2c0e719572171e83d4c56d32780f..74298273b9287b85a5ee46e11155bb7c9bb993e4 100644 --- a/src/plugins/CoreTests/src/BinaryFindOpenCLTests.cpp +++ b/src/plugins/CoreTests/src/BinaryFindOpenCLTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/CoreTests/src/BinaryFindOpenCLTests.h b/src/plugins/CoreTests/src/BinaryFindOpenCLTests.h index b7305cbe907a5b912562dd556da735e4fc0ae5e9..c3b2d0f0970d979a751eb12b22e340cb51880698 100644 --- a/src/plugins/CoreTests/src/BinaryFindOpenCLTests.h +++ b/src/plugins/CoreTests/src/BinaryFindOpenCLTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,7 +32,7 @@ namespace U2{ -class GTest_BinaryFindOpenCL : public GTest { +class GTest_BinaryFindOpenCL : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_BinaryFindOpenCL, "check-binary-find-opencl", TaskFlags_NR_FOSCOE); diff --git a/src/plugins/CoreTests/src/BioStruct3DObjectTests.cpp b/src/plugins/CoreTests/src/BioStruct3DObjectTests.cpp index 74b1f8ad571b11ca8ea5ce48d23ecbb717354ac1..7638ab553a3a90f0f3eb78b30a1e5b86eff6ae31 100644 --- a/src/plugins/CoreTests/src/BioStruct3DObjectTests.cpp +++ b/src/plugins/CoreTests/src/BioStruct3DObjectTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -459,7 +459,7 @@ void GTest_PDBFormatStressTest::init(XMLTestFormat *tf, const QDomElement& el) { Task::ReportResult GTest_PDBFormatStressTest::report() { - foreach (Task* task, getSubtasks()) { + foreach (const QPointer<Task> &task, getSubtasks()) { if (task->hasError()) { stateInfo.setError(stateInfo.getError()+fileNames.value(task) + "(" + task->getError() + "); "); } @@ -523,7 +523,7 @@ void GTest_ASNFormatStressTest::init(XMLTestFormat *tf, const QDomElement& el) { Task::ReportResult GTest_ASNFormatStressTest::report() { - foreach (Task* task, getSubtasks()) { + foreach (const QPointer<Task> &task, getSubtasks()) { if (task->hasError()) { stateInfo.setError(stateInfo.getError()+fileNames.value(task) + "(" + task->getError() + "); "); } diff --git a/src/plugins/CoreTests/src/BioStruct3DObjectTests.h b/src/plugins/CoreTests/src/BioStruct3DObjectTests.h index 9c4f588f1d8d5d158eedc5fe375dfd14eeea71ac..90a8977706122a5eaa85eb555804edaade34b709 100644 --- a/src/plugins/CoreTests/src/BioStruct3DObjectTests.h +++ b/src/plugins/CoreTests/src/BioStruct3DObjectTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ namespace U2 { class Document; -class GTest_BioStruct3DNumberOfAtoms : public GTest { +class GTest_BioStruct3DNumberOfAtoms : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_BioStruct3DNumberOfAtoms, "check-biostruct3d-number-of-atoms"); @@ -41,7 +41,7 @@ class GTest_BioStruct3DNumberOfAtoms : public GTest { }; -class GTest_BioStruct3DNumberOfChains : public GTest { +class GTest_BioStruct3DNumberOfChains : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_BioStruct3DNumberOfChains, "check-biostruct3d-number-of-chains"); @@ -52,7 +52,7 @@ class GTest_BioStruct3DNumberOfChains : public GTest { }; -class GTest_BioStruct3DAtomCoordinates : public GTest { +class GTest_BioStruct3DAtomCoordinates : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_BioStruct3DAtomCoordinates, "check-biostruct3d-atom-coords"); @@ -65,7 +65,7 @@ class GTest_BioStruct3DAtomCoordinates : public GTest { }; -class GTest_BioStruct3DAtomChainIndex : public GTest { +class GTest_BioStruct3DAtomChainIndex : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_BioStruct3DAtomChainIndex, "check-biostruct3d-atom-chain-id"); @@ -78,7 +78,7 @@ class GTest_BioStruct3DAtomChainIndex : public GTest { }; -class GTest_BioStruct3DAtomResidueName : public GTest { +class GTest_BioStruct3DAtomResidueName : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_BioStruct3DAtomResidueName, "check-biostruct3d-atom-residue-name"); @@ -92,7 +92,7 @@ class GTest_BioStruct3DAtomResidueName : public GTest { }; -class GTest_PDBFormatStressTest : public GTest { +class GTest_PDBFormatStressTest : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_PDBFormatStressTest, "try-load-all-pdb-documents"); @@ -102,7 +102,7 @@ class GTest_PDBFormatStressTest : public GTest { }; -class GTest_ASNFormatStressTest : public GTest { +class GTest_ASNFormatStressTest : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_ASNFormatStressTest, "try-load-all-mmdb-documents"); diff --git a/src/plugins/CoreTests/src/CMDLineTests.cpp b/src/plugins/CoreTests/src/CMDLineTests.cpp index 5c7164eca11ae3ced9c6f271a18a94d0c55eec40..aa9d68c472052362a33f2439463171c943c79b4e 100644 --- a/src/plugins/CoreTests/src/CMDLineTests.cpp +++ b/src/plugins/CoreTests/src/CMDLineTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,7 +25,9 @@ #include <U2Core/AppContext.h> #include <U2Core/CMDLineCoreOptions.h> +#include <U2Core/GUrlUtils.h> #include <U2Core/Log.h> +#include <U2Core/Settings.h> #include <U2Lang/WorkflowSettings.h> #include <U2Lang/WorkflowUtils.h> @@ -37,10 +39,11 @@ namespace U2 { #define COMMON_DATA_DIR_ENV_ID "COMMON_DATA_DIR" #define LOCAL_DATA_DIR_ENV_ID "LOCAL_DATA_DIR" #define WORKFLOW_SAMPLES_ENV_ID "WORKFLOW_SAMPLES_DIR" +#define WORKFLOW_OUTPUT_ENV_ID "WORKFLOW_OUTPUT_DIR" #define TEMP_DATA_DIR_ENV_ID "TEMP_DATA_DIR" #define CONFIG_FILE_ENV_ID "CONFIG_FILE" #define CONFIG_PROTOTYPE "PROTOTYPE" -#define WORKINK_DIR_ATTR "working-dir" +#define WORKING_DIR_ATTR "working-dir" /************************ * GTest_RunCMDLine @@ -51,22 +54,27 @@ const QString GTest_RunCMDLine::UGENECL_PATH = "/ugenecl"; const QString GTest_RunCMDLine::UGENECL_PATH = "/ugenecld"; #endif // _DEBUG -const QString GTest_RunCMDLine::TMP_DATA_DIR_PREFIX = "!tmp_data_dir!"; -const QString GTest_RunCMDLine::COMMON_DATA_DIR_PREFIX = "!common_data_dir!"; -const QString GTest_RunCMDLine::CONFIG_FILE_PATH = "!config_file_path!"; -const QString GTest_RunCMDLine::LOCAL_DATA_DIR_PREFIX = "!input!"; -const QString GTest_RunCMDLine::WORKFLOW_SAMPLES_DIR_PREFIX = "!workflow_samples!"; - void GTest_RunCMDLine::init(XMLTestFormat *tf, const QDomElement& el) { Q_UNUSED(tf); + customIniSet = false; setUgeneclPath(); setArgs(el); proc = new QProcess(this); - if (el.hasAttribute(WORKINK_DIR_ATTR)) { - QString workingDir = el.attribute(WORKINK_DIR_ATTR); - QDir().mkpath(env->getVar(TEMP_DATA_DIR_ENV_ID) + "/" + workingDir); - proc->setWorkingDirectory(env->getVar(TEMP_DATA_DIR_ENV_ID) + "/" + workingDir); + if (el.hasAttribute(WORKING_DIR_ATTR)) { + workingDir = el.attribute(WORKING_DIR_ATTR); + XMLTestUtils::replacePrefix(env, workingDir); + if (QUrl(workingDir).isRelative()) { + workingDir = env->getVar(TEMP_DATA_DIR_ENV_ID) + "/" + workingDir; + } } + + autoRemoveWorkingDir = false; + if (workingDir.isEmpty()) { + workingDir = GUrlUtils::rollFileName(env->getVar(TEMP_DATA_DIR_ENV_ID) + "/workingDir", "_"); + autoRemoveWorkingDir = true; + taskLog.trace(QString("Working dir is not defined, the foolowing dir will be used as working: %1").arg(workingDir)); + } + QString protosPath = env->getVar(COMMON_DATA_DIR_ENV_ID) + "/" + env->getVar(CONFIG_PROTOTYPE); QDir protoDir(protosPath), userScriptsDir(WorkflowSettings::getUserDirectory()); QStringList filters; @@ -99,9 +107,13 @@ void GTest_RunCMDLine::setArgs(const QDomElement & el) { unexpectedMessage = node.nodeValue(); continue; } - if(node.nodeName() == WORKINK_DIR_ATTR){ + if(node.nodeName() == WORKING_DIR_ATTR){ continue; } + if (node.nodeName() == CMDLineCoreOptions::INI_FILE) { + customIniSet = true; + } + QString argument = "--" + node.nodeName() + "=" + getVal(node.nodeValue()); if( argument.startsWith("--task") ) { args.prepend(argument); @@ -111,6 +123,11 @@ void GTest_RunCMDLine::setArgs(const QDomElement & el) { commandLine.append(argument + " "); } } + + if (!customIniSet) { + args.append("--" + CMDLineCoreOptions::INI_FILE + "=" + AppContext::getSettings()->fileName()); + } + args.append("--log-level-details"); args.append("--lang=en"); args.append("--log-no-task-progress"); @@ -145,20 +162,23 @@ QString GTest_RunCMDLine::getVal( const QString & val ) { if (val.isEmpty()) { return val; } - if (val.startsWith(COMMON_DATA_DIR_PREFIX)) { - return splitVal(val, COMMON_DATA_DIR_PREFIX, env->getVar(COMMON_DATA_DIR_ENV_ID) + "/", false); + if (val.startsWith(XMLTestUtils::COMMON_DATA_DIR_PREFIX)) { + return splitVal(val, XMLTestUtils::COMMON_DATA_DIR_PREFIX, env->getVar(COMMON_DATA_DIR_ENV_ID) + "/", false); } - if (val.startsWith(TMP_DATA_DIR_PREFIX)) { - return splitVal(val, TMP_DATA_DIR_PREFIX, env->getVar(TEMP_DATA_DIR_ENV_ID) + "/", true); + if (val.startsWith(XMLTestUtils::TMP_DATA_DIR_PREFIX)) { + return splitVal(val, XMLTestUtils::TMP_DATA_DIR_PREFIX, env->getVar(TEMP_DATA_DIR_ENV_ID) + "/", true); } - if (val == CONFIG_FILE_PATH) { + if (val == XMLTestUtils::CONFIG_FILE_PATH) { return env->getVar(COMMON_DATA_DIR_ENV_ID) + "/" + env->getVar(CONFIG_FILE_ENV_ID); } - if (val.startsWith(LOCAL_DATA_DIR_PREFIX)) { - return splitVal(val, LOCAL_DATA_DIR_PREFIX, env->getVar(LOCAL_DATA_DIR_ENV_ID), false); + if (val.startsWith(XMLTestUtils::LOCAL_DATA_DIR_PREFIX)) { + return splitVal(val, XMLTestUtils::LOCAL_DATA_DIR_PREFIX, env->getVar(LOCAL_DATA_DIR_ENV_ID), false); } - if (val.startsWith(WORKFLOW_SAMPLES_DIR_PREFIX)) { - return splitVal(val, WORKFLOW_SAMPLES_DIR_PREFIX, env->getVar(WORKFLOW_SAMPLES_ENV_ID), false); + if (val.startsWith(XMLTestUtils::WORKFLOW_SAMPLES_DIR_PREFIX)) { + return splitVal(val, XMLTestUtils::WORKFLOW_SAMPLES_DIR_PREFIX, env->getVar(WORKFLOW_SAMPLES_ENV_ID), false); + } + if (val.startsWith(XMLTestUtils::WORKFLOW_OUTPUT_DIR_PREFIX)) { + return splitVal(val, XMLTestUtils::WORKFLOW_OUTPUT_DIR_PREFIX, env->getVar(WORKFLOW_OUTPUT_ENV_ID) + "/", false); } return val; } @@ -170,6 +190,11 @@ void GTest_RunCMDLine::setUgeneclPath() { } void GTest_RunCMDLine::prepare() { + if (!workingDir.isEmpty()) { + QDir().mkpath(workingDir); + proc->setWorkingDirectory(workingDir); + } + QString argsStr = args.join(" "); coreLog.trace( "Starting UGENE with arguments: " + argsStr ); proc->start( ugeneclPath, args ); @@ -178,8 +203,8 @@ void GTest_RunCMDLine::prepare() { static const QString ERROR_LABEL_TRY1 = "finished with error"; static QString getErrorMsg(const QString & str) { int ind = str.indexOf(ERROR_LABEL_TRY1); - if(ind != -1) { - return str.mid(ind + ERROR_LABEL_TRY1.size() ); + if (ind != -1) { + return str.mid(ind + ERROR_LABEL_TRY1.size()); } return QString(); } @@ -212,23 +237,35 @@ Task::ReportResult GTest_RunCMDLine::report() { } QString err = getErrorMsg(output); - if( !err.isEmpty() ) { + if (!err.isEmpty()) { int eofIdx = err.indexOf("\n"); - if (eofIdx>0) { - err = err.left(eofIdx-1); + if (eofIdx > 0) { + err = err.left(eofIdx - 1); } - setError( "Process finished with error" + err); + setError("Process finished with error" + err); } + if (proc->exitStatus() == QProcess::CrashExit) { setError("Process is crashed!"); } + return ReportResult_Finished; } void GTest_RunCMDLine::cleanup() { - foreach(const QString & file, tmpFiles) { - QFile::remove(file); + if (!XMLTestUtils::parentTasksHaveError(this)) { + foreach(const QString & file, tmpFiles) { + taskLog.trace(QString("Temporary file removed: %1").arg(file)); + QFile::remove(file); + } + + if (autoRemoveWorkingDir) { + taskLog.trace(QString("Temporary working dir autoremoved: %1").arg(workingDir)); + QDir(workingDir).removeRecursively(); + } } + + XmlTest::cleanup(); } /************************ diff --git a/src/plugins/CoreTests/src/CMDLineTests.h b/src/plugins/CoreTests/src/CMDLineTests.h index bef75f24e514ed0318784ddc8eea10e2c6b6cfbf..9f916ea82a6ffb0c2aa395dee949d7bd4b938345 100644 --- a/src/plugins/CoreTests/src/CMDLineTests.h +++ b/src/plugins/CoreTests/src/CMDLineTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,16 +33,8 @@ namespace U2 { * if value is existing file in _common_data we will resolve this * if you want to place file in _tmp you should write filename as "!tmp_out!filename" ***********************************/ -class GTest_RunCMDLine : public GTest { +class GTest_RunCMDLine : public XmlTest { Q_OBJECT -public: - static const QString UGENECL_PATH; - static const QString TMP_DATA_DIR_PREFIX; - static const QString COMMON_DATA_DIR_PREFIX; - static const QString LOCAL_DATA_DIR_PREFIX; - static const QString CONFIG_FILE_PATH; - static const QString WORKFLOW_SAMPLES_DIR_PREFIX; - public: SIMPLE_XML_TEST_BODY_WITH_FACTORY( GTest_RunCMDLine, "run-cmdline" ); virtual void prepare(); @@ -62,7 +54,11 @@ private: QProcess * proc; QString ugeneclPath; QStringList tmpFiles; + QString workingDir; + bool autoRemoveWorkingDir; + bool customIniSet; + static const QString UGENECL_PATH; }; // GTest_RunCMDLine class CMDLineTests { diff --git a/src/plugins/CoreTests/src/CoreTests.cpp b/src/plugins/CoreTests/src/CoreTests.cpp index 20a515fab42a3c3748c2f9f1bc1d2f46edb7052a..b4a75b8bd443de2f72fabd616b0b86088000becd 100644 --- a/src/plugins/CoreTests/src/CoreTests.cpp +++ b/src/plugins/CoreTests/src/CoreTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/CoreTests/src/CoreTests.h b/src/plugins/CoreTests/src/CoreTests.h index e963a9c4b3da7e77b54df3114da7235586610e52..ffba9626f7dd6b86ea033af747a8dde317a57b6d 100644 --- a/src/plugins/CoreTests/src/CoreTests.h +++ b/src/plugins/CoreTests/src/CoreTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/CoreTests/src/DNASequenceObjectTests.cpp b/src/plugins/CoreTests/src/DNASequenceObjectTests.cpp index 8a2363232097ce0687fc9ded5e832127f21a7326..172db186ec621f72c57a0000f37c5efee14465cf 100644 --- a/src/plugins/CoreTests/src/DNASequenceObjectTests.cpp +++ b/src/plugins/CoreTests/src/DNASequenceObjectTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -635,6 +635,49 @@ Task::ReportResult GTest_DNAMulSequencePart::report() { } +//----------------------------------------------------------------------------- + +void GTest_DNAMulSequenceName::init(XMLTestFormat *tf, const QDomElement& el) { + Q_UNUSED(tf); + + objContextName = el.attribute(OBJ_ATTR); + if (objContextName.isEmpty()) { + failMissingValue(OBJ_ATTR); + return; + } + + seqName = el.attribute(SEQNAME_ATTR); + if (seqName.isEmpty()) { + failMissingValue(SEQNAME_ATTR); + return; + } + +} + +Task::ReportResult GTest_DNAMulSequenceName::report() { + GObject *obj = getContext<GObject>(this, objContextName); + if (obj == NULL) { + stateInfo.setError(QString("wrong value: %1").arg(OBJ_ATTR)); + return ReportResult_Finished; + } + + MultipleSequenceAlignmentObject* myMSequence = qobject_cast<MultipleSequenceAlignmentObject*>(obj); + bool ok_flag = false; + const MultipleSequenceAlignment ma = myMSequence->getMultipleAlignment(); + foreach(const MultipleSequenceAlignmentRow& myItem, ma->getMsaRows()){ + if (myItem->getName() == seqName){ + ok_flag = true; + break; + } + } + if (!ok_flag){ + stateInfo.setError(QString("no Sequence name: %1").arg(seqName)); + } + return ReportResult_Finished; + +} + + //----------------------------------------------------------------------------- void GTest_DNAMulSequenceQuality::init(XMLTestFormat *tf, const QDomElement& el) { @@ -1179,6 +1222,7 @@ QList<XMLTestFactory*> DNASequenceObjectTests::createTestFactories() { res.append(GTest_DNAcompareSequencesAlphabetsInTwoObjects::createFactory()); res.append(GTest_DNAcompareMulSequencesInTwoObjects::createFactory()); res.append(GTest_DNAMulSequenceQuality::createFactory()); + res.append(GTest_DNAMulSequenceName::createFactory()); res.append(GTest_DNAcompareMulSequencesNamesInTwoObjects::createFactory()); res.append(GTest_DNAcompareMulSequencesAlphabetIdInTwoObjects::createFactory()); return res; diff --git a/src/plugins/CoreTests/src/DNASequenceObjectTests.h b/src/plugins/CoreTests/src/DNASequenceObjectTests.h index 2650166ba89a991510fc416f86b2b5aae5469b39..ff9fb9052d4e0861534e778fea34a22e7418973e 100644 --- a/src/plugins/CoreTests/src/DNASequenceObjectTests.h +++ b/src/plugins/CoreTests/src/DNASequenceObjectTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -31,7 +31,7 @@ namespace U2 { class Document; -class GTest_DNASequenceSize : public GTest { +class GTest_DNASequenceSize : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DNASequenceSize, "check-sequence-size"); @@ -43,7 +43,7 @@ class GTest_DNASequenceSize : public GTest { }; -class GTest_DNASequenceAlphabet : public GTest { +class GTest_DNASequenceAlphabet : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DNASequenceAlphabet, "check-sequence-alphabet"); @@ -55,7 +55,7 @@ class GTest_DNASequenceAlphabet : public GTest { QString alphabetId; }; -class GTest_DNASequencePart : public GTest { +class GTest_DNASequencePart : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DNASequencePart, "check-sequence-part"); @@ -67,7 +67,7 @@ class GTest_DNASequencePart : public GTest { int startPos; }; -class GTest_DNASequenceAlphabetType : public GTest { +class GTest_DNASequenceAlphabetType : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DNASequenceAlphabetType, "check-sequence-alphabet-by-type"); @@ -78,7 +78,7 @@ class GTest_DNASequenceAlphabetType : public GTest { DNAAlphabetType alphabetType; }; -class GTest_DNASequenceAlphabetId : public GTest { +class GTest_DNASequenceAlphabetId : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DNASequenceAlphabetId, "check-sequence-alphabet-by-id"); @@ -90,7 +90,7 @@ class GTest_DNASequenceAlphabetId : public GTest { }; -class GTest_DNASequenceQualityScores : public GTest { +class GTest_DNASequenceQualityScores : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DNASequenceQualityScores, "check-sequence-quality-scores"); @@ -100,7 +100,7 @@ class GTest_DNASequenceQualityScores : public GTest { QByteArray qualityScores; }; -class GTest_DNASequenceQualityValue : public GTest { +class GTest_DNASequenceQualityValue : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DNASequenceQualityValue, "check-sequence-quality-value"); @@ -111,7 +111,7 @@ class GTest_DNASequenceQualityValue : public GTest { int expectedVal; }; -class GTest_CompareDNASequenceQualityInTwoObjects : public GTest { +class GTest_CompareDNASequenceQualityInTwoObjects : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CompareDNASequenceQualityInTwoObjects, "compare-sequence-quality-in-two-objects"); @@ -121,7 +121,7 @@ class GTest_CompareDNASequenceQualityInTwoObjects : public GTest { QString doc2CtxName; }; -class GTest_DNAcompareSequencesNamesInTwoObjects : public GTest { +class GTest_DNAcompareSequencesNamesInTwoObjects : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DNAcompareSequencesNamesInTwoObjects, "compare-sequences-names-in-two-objects"); @@ -130,7 +130,7 @@ class GTest_DNAcompareSequencesNamesInTwoObjects : public GTest { QString secondDocContextName; }; -class GTest_DNAcompareSequencesInTwoObjects : public GTest { +class GTest_DNAcompareSequencesInTwoObjects : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DNAcompareSequencesInTwoObjects, "compare-sequences-in-two-objects"); @@ -139,7 +139,7 @@ class GTest_DNAcompareSequencesInTwoObjects : public GTest { QString secondDocContextName; }; -class GTest_DNAcompareSequencesAlphabetsInTwoObjects : public GTest { +class GTest_DNAcompareSequencesAlphabetsInTwoObjects : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DNAcompareSequencesAlphabetsInTwoObjects, "compare-sequences-alphabets-in-two-objects"); @@ -148,7 +148,7 @@ class GTest_DNAcompareSequencesAlphabetsInTwoObjects : public GTest { QString secondDocContextName; }; -class GTest_DNAMulSequenceAlphabetId : public GTest { +class GTest_DNAMulSequenceAlphabetId : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DNAMulSequenceAlphabetId, "check-Msequence-alphabet-by-id"); @@ -159,7 +159,7 @@ class GTest_DNAMulSequenceAlphabetId : public GTest { QString alpId; }; -class GTest_DNAMulSequenceSize : public GTest { +class GTest_DNAMulSequenceSize : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DNAMulSequenceSize, "check-Msequence-size"); @@ -171,7 +171,7 @@ class GTest_DNAMulSequenceSize : public GTest { }; -class GTest_DNAMulSequencePart : public GTest { +class GTest_DNAMulSequencePart : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DNAMulSequencePart, "check-Msequence-part"); @@ -185,7 +185,19 @@ class GTest_DNAMulSequencePart : public GTest { }; -class GTest_DNAMulSequenceQuality : public GTest { +class GTest_DNAMulSequenceName : public XmlTest { + Q_OBJECT + SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DNAMulSequenceName, "check-Msequence-name"); + + ReportResult report(); + + QString objContextName; + + QString seqName; + +}; + +class GTest_DNAMulSequenceQuality : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DNAMulSequenceQuality, "check-Msequence-quality"); @@ -200,7 +212,7 @@ class GTest_DNAMulSequenceQuality : public GTest { }; -class GTest_DNASequencInMulSequence : public GTest { +class GTest_DNASequencInMulSequence : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DNASequencInMulSequence, "check-numbers-of-sequence-in-Msequence"); @@ -211,7 +223,7 @@ class GTest_DNASequencInMulSequence : public GTest { int seqInMSeq; }; -class GTest_DNAcompareMulSequencesInTwoObjects : public GTest { +class GTest_DNAcompareMulSequencesInTwoObjects : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DNAcompareMulSequencesInTwoObjects, "compare-Msequences-in-two-objects"); @@ -221,7 +233,7 @@ class GTest_DNAcompareMulSequencesInTwoObjects : public GTest { QString sortValue; }; -class GTest_DNAcompareMulSequencesNamesInTwoObjects : public GTest { +class GTest_DNAcompareMulSequencesNamesInTwoObjects : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DNAcompareMulSequencesNamesInTwoObjects, "compare-Msequences-names-in-two-objects"); @@ -230,7 +242,7 @@ class GTest_DNAcompareMulSequencesNamesInTwoObjects : public GTest { QString secondDocContextName; }; -class GTest_DNAcompareMulSequencesAlphabetIdInTwoObjects : public GTest { +class GTest_DNAcompareMulSequencesAlphabetIdInTwoObjects : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DNAcompareMulSequencesAlphabetIdInTwoObjects, "compare-Msequences-alphabets-in-two-objects"); diff --git a/src/plugins/CoreTests/src/DNATranslationImplTests.cpp b/src/plugins/CoreTests/src/DNATranslationImplTests.cpp index d3053dc9b0f413e1a41fea7761f137e96d14627e..ac28a9203f51e13e3756c9f14512d9e012eff1d4 100644 --- a/src/plugins/CoreTests/src/DNATranslationImplTests.cpp +++ b/src/plugins/CoreTests/src/DNATranslationImplTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/CoreTests/src/DNATranslationImplTests.h b/src/plugins/CoreTests/src/DNATranslationImplTests.h index e551569eb887acf95703e4f281d42460d1b0234f..0ad16a7dcc2c68433a78cf775dfe16f816aeb951 100644 --- a/src/plugins/CoreTests/src/DNATranslationImplTests.h +++ b/src/plugins/CoreTests/src/DNATranslationImplTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,7 +32,7 @@ namespace U2 { class Document; //--------------------------------------------------------------------- -class GTest_DNATranslation3to1Test : public GTest { +class GTest_DNATranslation3to1Test : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DNATranslation3to1Test, "check-translation"); diff --git a/src/plugins/CoreTests/src/DnaAssemblyTests.cpp b/src/plugins/CoreTests/src/DnaAssemblyTests.cpp index efc9c5984992e7d16464f70abd6d5f99ce9dc7ad..9c51e3cacf50e478a16f1c69b6d12d7a13d4c169 100644 --- a/src/plugins/CoreTests/src/DnaAssemblyTests.cpp +++ b/src/plugins/CoreTests/src/DnaAssemblyTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -164,12 +164,16 @@ void GTest_DnaAssemblyToReferenceTask::cleanup() { // cleanup temporary files - QDir dir(env->getVar("TEMP_DATA_DIR")); - QStringList tmpFiles = dir.entryList(QStringList() << "*.sarr" << "*.idx" << "*.ref", QDir::Files); + if (!XMLTestUtils::parentTasksHaveError(this)) { + QDir dir(env->getVar("TEMP_DATA_DIR")); + QStringList tmpFiles = dir.entryList(QStringList() << "*.sarr" << "*.idx" << "*.ref", QDir::Files); - foreach (const QString& f, tmpFiles) { - QFile::remove(dir.absoluteFilePath(f)); - } + foreach (const QString& f, tmpFiles) { + QFile::remove(dir.absoluteFilePath(f)); + } + } + + XmlTest::cleanup(); } //---------------------------------------------------------- diff --git a/src/plugins/CoreTests/src/DnaAssemblyTests.h b/src/plugins/CoreTests/src/DnaAssemblyTests.h index 564dd9945eb55935a139a74c0e62eb00b0e347a8..e5f933d1ed318bcf996b1739feb35bf653a30971 100644 --- a/src/plugins/CoreTests/src/DnaAssemblyTests.h +++ b/src/plugins/CoreTests/src/DnaAssemblyTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,7 +33,7 @@ class DnaAssemblyMultiTask; class U2SequenceObject; class LoadDocumentTask; -class GTest_DnaAssemblyToReferenceTask : public GTest { +class GTest_DnaAssemblyToReferenceTask : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DnaAssemblyToReferenceTask, "test-dna-assembly-to-ref"); @@ -53,7 +53,7 @@ private: bool pairedReads; }; -class GTest_AssemblycompareTwoSAMbyLength : public GTest { +class GTest_AssemblycompareTwoSAMbyLength : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_AssemblycompareTwoSAMbyLength, "compare-sam-by-length"); diff --git a/src/plugins/CoreTests/src/DocumentModelTests.cpp b/src/plugins/CoreTests/src/DocumentModelTests.cpp index de79c7501ea1d2f68baaf62badb56389331a5663..a2fe145911e98498e257c2d1685f238024530af6 100644 --- a/src/plugins/CoreTests/src/DocumentModelTests.cpp +++ b/src/plugins/CoreTests/src/DocumentModelTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -131,9 +131,12 @@ void GTest_LoadDocument::cleanup() { if (contextAdded) { removeContext(docContextName); } - if(tempFile){ + if(!XMLTestUtils::parentTasksHaveError(this) && tempFile){ + taskLog.trace(QString("Temporary file removed: %1").arg(url)); QFile::remove(url); } + + XmlTest::cleanup(); } void GTest_LoadDocument::prepare() { @@ -279,9 +282,11 @@ Task::ReportResult GTest_LoadBrokenDocument::report() { } void GTest_LoadBrokenDocument::cleanup() { - if (tempFile) { + if (!XMLTestUtils::parentTasksHaveError(this) && tempFile) { QFile::remove(url); } + + XmlTest::cleanup(); } /******************************* @@ -357,11 +362,15 @@ void GTest_ImportDocument::cleanup() { removeContext(docContextName); } - if (tempFile) { - QFile::remove(url); + if (!XMLTestUtils::parentTasksHaveError(this)) { + if (tempFile) { + QFile::remove(url); + } + + QFile::remove(destUrl); } - QFile::remove(destUrl); + XmlTest::cleanup(); } void GTest_ImportDocument::prepare() { @@ -406,7 +415,7 @@ void GTest_ImportBrokenDocument::init(XMLTestFormat* tf, const QDomElement& el) Q_UNUSED(tf); QString urlAttr = el.attribute("url"); - QString outUrlAttr = el.attribute("outUrl"); + QString outUrlAttr = getTempDir(env) + "/" + el.attribute("outUrl"); QString dir = el.attribute("dir"); DocumentFormatId formatId = el.attribute("format"); @@ -462,10 +471,14 @@ Task::ReportResult GTest_ImportBrokenDocument::report() { } void GTest_ImportBrokenDocument::cleanup() { - if (tempFile) { - QFile::remove(url); + if (!XMLTestUtils::parentTasksHaveError(this)) { + if (tempFile) { + QFile::remove(url); + } + QFile::remove(destUrl); } - QFile::remove(destUrl); + + XmlTest::cleanup(); } /******************************* @@ -681,7 +694,9 @@ Task::ReportResult GTest_FindGObjectByName::report() { const QList<GObject*>& objs = doc->getObjects(); foreach(GObject* obj, objs) { - if ((obj->getGObjectType() == type) && (obj->getGObjectName() == objName)) { + QString objectType = obj->getGObjectType(); + QString objectName = obj->getGObjectName(); + if ((objectType == type) && (objectName == objName)) { result = obj; break; } @@ -699,6 +714,8 @@ void GTest_FindGObjectByName::cleanup() { if (result!=NULL && !objContextName.isEmpty()) { removeContext(objContextName); } + + XmlTest::cleanup(); } @@ -715,6 +732,7 @@ static const QString COMMENTS_START_WITH = "comments_start_with"; static const QString COMPARE_LINE_NUMBER_ONLY = "line_num_only"; static const QString COMPARE_FIRST_N_LINES = "first_n_lines"; static const QString COMPARE_MIXED_LINES = "mixed-lines"; +static const QString COMPARE_FORCE_BUFFER_SIZE = "buffer-size"; void GTest_CompareFiles::init(XMLTestFormat *tf, const QDomElement& el) { Q_UNUSED(tf); @@ -734,24 +752,30 @@ void GTest_CompareFiles::init(XMLTestFormat *tf, const QDomElement& el) { return; } - if (!el.attribute(COMPARE_FIRST_N_LINES).isEmpty()){ + if (!el.attribute(COMPARE_FIRST_N_LINES).isEmpty()) { first_n_lines = el.attribute(COMPARE_FIRST_N_LINES).toInt(); - }else{ + } else { first_n_lines = -1; } - if (!el.attribute(COMPARE_LINE_NUMBER_ONLY).isEmpty()){ + if (!el.attribute(COMPARE_LINE_NUMBER_ONLY).isEmpty()) { line_num_only = true; - }else{ + } else { line_num_only = false; } - if(!el.attribute(COMPARE_MIXED_LINES).isEmpty()){ + if (!el.attribute(COMPARE_MIXED_LINES).isEmpty()) { mixed_lines = true; - }else{ + } else { mixed_lines = false; } + if (!el.attribute(COMPARE_FORCE_BUFFER_SIZE).isEmpty()) { + forceBufferSize = el.attribute(COMPARE_FORCE_BUFFER_SIZE).toInt(); + } else { + forceBufferSize = 0; + } + // Get the full documents paths if (!tmpAttr.isEmpty()) { // Attribute "tmp" is used to determine paths prefixes, @@ -874,13 +898,14 @@ IOAdapter* GTest_CompareFiles::createIoAdapter(const QString& filePath) { QByteArray GTest_CompareFiles::getLine(IOAdapter* io) { QByteArray line; - QByteArray readBuff(READ_BUFF_SIZE + 1, 0); + const qint64 bufferSize = forceBufferSize > 0 ? forceBufferSize : READ_BUFF_SIZE; + QByteArray readBuff(bufferSize + 1, 0); char* buff = readBuff.data(); bool commentString = false; do { bool lineOk = true; - qint64 len = io->readUntil(buff, READ_BUFF_SIZE, TextUtils::LINE_BREAKS, IOAdapter::Term_Include, &lineOk); + qint64 len = io->readUntil(buff, bufferSize, TextUtils::LINE_BREAKS, IOAdapter::Term_Include, &lineOk); CHECK(len != 0, ""); CHECK_EXT(lineOk, setError("Line is too long"), ""); diff --git a/src/plugins/CoreTests/src/DocumentModelTests.h b/src/plugins/CoreTests/src/DocumentModelTests.h index c26e240db75f592c62aab010cbc33c9ecc90de28..1a701e48ef0e6db6109ff3ffa3f4da210f150bb7 100644 --- a/src/plugins/CoreTests/src/DocumentModelTests.h +++ b/src/plugins/CoreTests/src/DocumentModelTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ class LoadDocumentTask; class SaveDocumentTask; class DocumentProviderTask; -class GTest_LoadDocument : public GTest { +class GTest_LoadDocument : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_LoadDocument, "load-document"); @@ -62,7 +62,7 @@ private: bool needVerifyLog; }; -class GTest_SaveDocument : public GTest { +class GTest_SaveDocument : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_SaveDocument, "save-document"); @@ -78,7 +78,7 @@ private: SaveDocumentTask* saveTask; }; -class GTest_LoadBrokenDocument : public GTest { +class GTest_LoadBrokenDocument : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_LoadBrokenDocument, "load-broken-document", TaskFlags(TaskFlag_NoRun)| TaskFlag_FailOnSubtaskCancel); @@ -94,7 +94,7 @@ private: QString message; }; -class GTest_ImportDocument : public GTest { +class GTest_ImportDocument : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_ImportDocument, "import-document"); @@ -121,7 +121,7 @@ private: bool needVerifyLog; }; -class GTest_ImportBrokenDocument : public GTest { +class GTest_ImportBrokenDocument : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_ImportBrokenDocument, "import-broken-document", TaskFlags(TaskFlag_NoRun)| TaskFlag_FailOnSubtaskCancel); @@ -138,7 +138,7 @@ private: QString message; }; -class GTest_DocumentNumObjects : public GTest { +class GTest_DocumentNumObjects : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DocumentNumObjects, "check-num-objects"); @@ -147,7 +147,7 @@ class GTest_DocumentNumObjects : public GTest { int numObjs; }; -class GTest_DocumentFormat : public GTest { +class GTest_DocumentFormat : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DocumentFormat, "check-document-format"); @@ -157,7 +157,7 @@ class GTest_DocumentFormat : public GTest { QString docFormat; }; -class GTest_DocumentObjectNames : public GTest { +class GTest_DocumentObjectNames : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DocumentObjectNames, "check-document-object-names"); @@ -167,7 +167,7 @@ class GTest_DocumentObjectNames : public GTest { QStringList names; }; -class GTest_DocumentObjectTypes : public GTest { +class GTest_DocumentObjectTypes : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DocumentObjectTypes, "check-document-object-types"); @@ -183,7 +183,7 @@ public: }; -class GTest_FindGObjectByName : public GTest { +class GTest_FindGObjectByName : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_FindGObjectByName, "find-object-by-name"); @@ -200,7 +200,7 @@ private: }; -class GTest_CompareFiles : public GTest { +class GTest_CompareFiles : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CompareFiles, "compare-docs"); @@ -218,12 +218,13 @@ private: QStringList commentsStartWith; bool line_num_only; bool mixed_lines; + qint64 forceBufferSize; int first_n_lines; }; -class GTest_Compare_VCF_Files : public GTest { +class GTest_Compare_VCF_Files : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_Compare_VCF_Files, "compare-vcf-docs"); @@ -239,7 +240,7 @@ private: static const QByteArray COMMENT_MARKER; }; -class GTest_Compare_PDF_Files : public GTest { +class GTest_Compare_PDF_Files : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_Compare_PDF_Files, "compare-pdf-docs"); diff --git a/src/plugins/CoreTests/src/EditAlignmentTests.cpp b/src/plugins/CoreTests/src/EditAlignmentTests.cpp index 44954f498ea48bc4f3df8b9a4f81d9544f57cda2..53e0f7f013c7a61361bfd80b9b7e46cea80c5f5d 100644 --- a/src/plugins/CoreTests/src/EditAlignmentTests.cpp +++ b/src/plugins/CoreTests/src/EditAlignmentTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/CoreTests/src/EditAlignmentTests.h b/src/plugins/CoreTests/src/EditAlignmentTests.h index 31d62a5ee1f526e1abab709403a25cfca455dca4..8f236e25cca0be7960f792ac87528eeb23d077d9 100644 --- a/src/plugins/CoreTests/src/EditAlignmentTests.h +++ b/src/plugins/CoreTests/src/EditAlignmentTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ namespace U2 { class U2SequenceObject; -class GTest_CreateSubalignimentTask : public GTest { +class GTest_CreateSubalignimentTask : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_CreateSubalignimentTask, "plugin_create-subalignment-task", TaskFlags_NR_FOSCOE); @@ -54,7 +54,7 @@ private: U2Region window; }; -class GTest_RemoveAlignmentRegion : public GTest { +class GTest_RemoveAlignmentRegion : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_RemoveAlignmentRegion, "test-remove-alignment-region", TaskFlags_NR_FOSCOE); @@ -70,7 +70,7 @@ private: }; -class GTest_AddSequenceToAlignment : public GTest { +class GTest_AddSequenceToAlignment : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_AddSequenceToAlignment, "test-add-seq-to-alignment", TaskFlags_NR_FOSCOE); @@ -86,7 +86,7 @@ private: }; -class GTest_RemoveColumnsOfGaps : public GTest { +class GTest_RemoveColumnsOfGaps : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_RemoveColumnsOfGaps, "remove-columns-of-gaps"); diff --git a/src/plugins/CoreTests/src/EditSequenceTests.cpp b/src/plugins/CoreTests/src/EditSequenceTests.cpp index c046ed116dd97194ac5a5f9202721a89492360b8..84741d0b1134abac4faf0c14956fc98a3b2b74ca 100644 --- a/src/plugins/CoreTests/src/EditSequenceTests.cpp +++ b/src/plugins/CoreTests/src/EditSequenceTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/CoreTests/src/EditSequenceTests.h b/src/plugins/CoreTests/src/EditSequenceTests.h index 1ca05cee0ee7c54d4ef91180bdd3169b19dbbd3d..4e7460dc299dfc0e034b0a1757d6b85dc301a1c5 100644 --- a/src/plugins/CoreTests/src/EditSequenceTests.h +++ b/src/plugins/CoreTests/src/EditSequenceTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ namespace U2 { -class GTest_RemovePartFromSequenceTask : GTest { +class GTest_RemovePartFromSequenceTask : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_RemovePartFromSequenceTask, "Remove_Part_From_Sequence_Task", TaskFlags_NR_FOSCOE); @@ -57,7 +57,7 @@ private: U2SequenceObject* dnaso; }; -class GTest_AddPartToSequenceTask : GTest { +class GTest_AddPartToSequenceTask : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_AddPartToSequenceTask, "Add_Part_To_Sequence_Task", TaskFlags_NR_FOSCOE); @@ -77,7 +77,7 @@ private: U2SequenceObject * dnaso; }; -class GTest_ReplacePartOfSequenceTask : GTest { +class GTest_ReplacePartOfSequenceTask : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_ReplacePartOfSequenceTask, "replace-part-of-sequence", TaskFlags_NR_FOSCOE); diff --git a/src/plugins/CoreTests/src/FindAlgorithmTests.cpp b/src/plugins/CoreTests/src/FindAlgorithmTests.cpp index 6c2d64b45333a1fddab3db02b42086cd65d778e4..f7e91d31d98acb60c749b7905711e097ed26ca67 100644 --- a/src/plugins/CoreTests/src/FindAlgorithmTests.cpp +++ b/src/plugins/CoreTests/src/FindAlgorithmTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/CoreTests/src/FindAlgorithmTests.h b/src/plugins/CoreTests/src/FindAlgorithmTests.h index 911035735de070547396663527fcb4c3fb69f8d4..cd952e3880af3564cbdf216092b3a30fce21d118 100644 --- a/src/plugins/CoreTests/src/FindAlgorithmTests.h +++ b/src/plugins/CoreTests/src/FindAlgorithmTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -28,7 +28,7 @@ namespace U2 { -class GTest_FindAlgorithmTest : public GTest { +class GTest_FindAlgorithmTest : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_FindAlgorithmTest, "find-algorithm"); diff --git a/src/plugins/CoreTests/src/FormatDetectionTests.cpp b/src/plugins/CoreTests/src/FormatDetectionTests.cpp index 8333aa03f34a2e41b58bc5cf01cf532016f9f638..f3406e10d5db9775a367ff85d66255d3747d8329 100644 --- a/src/plugins/CoreTests/src/FormatDetectionTests.cpp +++ b/src/plugins/CoreTests/src/FormatDetectionTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -35,7 +35,7 @@ static const QString LESS_THAN("less-than"); // score should be less than static const QString MORE_THAN("more-than"); // score should be more than -/* class GTest_CheckScore : public GTest */ +/* class GTest_CheckScore : public XmlTest */ static bool equal_to(int a, int b) { return a == b; } static bool less_than(int a, int b) { return a < b; } @@ -127,7 +127,7 @@ Task::ReportResult GTest_CheckScore::report() { } -/*class GTest_PerfectMatch : public GTest */ +/*class GTest_PerfectMatch : public XmlTest */ void GTest_PerfectMatch::init(XMLTestFormat*, const QDomElement& el) { QString fileURLStr = el.attribute(URL); diff --git a/src/plugins/CoreTests/src/FormatDetectionTests.h b/src/plugins/CoreTests/src/FormatDetectionTests.h index 01d9a8da5aa4d0e77dbcb0184ef355f7448c76c9..0d4d7b3fd04f5848492b121e6ace33b9e56f9a1d 100644 --- a/src/plugins/CoreTests/src/FormatDetectionTests.h +++ b/src/plugins/CoreTests/src/FormatDetectionTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ namespace U2 { // NOTE: "fd" stays for Format Detection /** Check that given file will get specified score */ -class GTest_CheckScore : public GTest { +class GTest_CheckScore : public XmlTest { Q_OBJECT public: @@ -38,7 +38,6 @@ public: virtual void run(); virtual ReportResult report(); - virtual void cleanup() {}; private: QString fileURL; @@ -51,7 +50,7 @@ private: }; /** Check that format detected exatly for specified file */ -class GTest_PerfectMatch : public GTest { +class GTest_PerfectMatch : public XmlTest { Q_OBJECT public: @@ -59,7 +58,6 @@ public: virtual void run(); virtual ReportResult report(); - virtual void cleanup() {}; private: QString fileURL; diff --git a/src/plugins/CoreTests/src/GUrlTests.cpp b/src/plugins/CoreTests/src/GUrlTests.cpp index 3237aa36790b9352dd4277600c32d7e137dfa680..c19ce9226940ad78152b69f31a382038c124d2a4 100644 --- a/src/plugins/CoreTests/src/GUrlTests.cpp +++ b/src/plugins/CoreTests/src/GUrlTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/CoreTests/src/GUrlTests.h b/src/plugins/CoreTests/src/GUrlTests.h index 904244767dd64c33dcdc7b53a0a0edcd2fc27d10..c1b35692d60264bc6d43856f955413f387313074 100644 --- a/src/plugins/CoreTests/src/GUrlTests.h +++ b/src/plugins/CoreTests/src/GUrlTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -27,7 +27,7 @@ namespace U2 { -class GTest_ConvertPath : public GTest { +class GTest_ConvertPath : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_ConvertPath, "convert-path"); @@ -39,7 +39,7 @@ private: bool isFileUrl, runThisTest; }; -class GTest_CreateTmpDir : public GTest { +class GTest_CreateTmpDir : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CreateTmpDir, "create-temp-dir"); @@ -50,7 +50,7 @@ private: QString url; }; -class GTest_RemoveTmpDir : public GTest { +class GTest_RemoveTmpDir : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_RemoveTmpDir, "remove-temp-dir"); @@ -64,7 +64,7 @@ private: void removeDir(const QString &url); }; -class GTest_RemoveTmpFile : public GTest { +class GTest_RemoveTmpFile : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_RemoveTmpFile, "remove-temp-file"); @@ -75,7 +75,7 @@ private: QString url; }; -class GTest_CreateTmpFile : public GTest { +class GTest_CreateTmpFile : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CreateTmpFile, "create-temp-file"); @@ -87,7 +87,7 @@ private: QString data; }; -class GTest_CheckTmpFile : public GTest { +class GTest_CheckTmpFile : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CheckTmpFile, "check-temp-file"); @@ -99,7 +99,7 @@ private: bool exists; }; -class GTest_CheckStorageFile : public GTest { +class GTest_CheckStorageFile : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CheckStorageFile, "check-storage-file"); @@ -114,7 +114,7 @@ private: bool exists; }; -class GTest_CheckCreationTime : public GTest { +class GTest_CheckCreationTime : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CheckCreationTime, "check-creation-time"); @@ -127,7 +127,7 @@ private: int moreThen; }; -class GTest_CheckFilesNum : public GTest { +class GTest_CheckFilesNum : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CheckFilesNum, "check-files-num"); diff --git a/src/plugins/CoreTests/src/LoadRemoteDocumentTests.cpp b/src/plugins/CoreTests/src/LoadRemoteDocumentTests.cpp index ae4d8edd33564b148e9bd62698b11a48542407ea..5b3cebd3fd2a2d4b27e21041bb33929be633b98d 100644 --- a/src/plugins/CoreTests/src/LoadRemoteDocumentTests.cpp +++ b/src/plugins/CoreTests/src/LoadRemoteDocumentTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -97,10 +97,6 @@ namespace U2 { return ReportResult_Finished; } - void GTest_LoadRemoteDocumentTask::cleanup(){ - - } - QList<XMLTestFactory*> LoadRemoteDocumentTests::createTestFactories(){ QList<XMLTestFactory*> res; res.append(GTest_LoadRemoteDocumentTask::createFactory()); diff --git a/src/plugins/CoreTests/src/LoadRemoteDocumentTests.h b/src/plugins/CoreTests/src/LoadRemoteDocumentTests.h index e6466916b7a8b1b1120d0460c16ea0d22bb2618c..82a8b2aaf502d47079b5f9a3e3699876940db4c0 100644 --- a/src/plugins/CoreTests/src/LoadRemoteDocumentTests.h +++ b/src/plugins/CoreTests/src/LoadRemoteDocumentTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -29,13 +29,12 @@ namespace U2 { class LoadRemoteDocumentTask; - class GTest_LoadRemoteDocumentTask : public GTest { + class GTest_LoadRemoteDocumentTask : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_LoadRemoteDocumentTask, "load-remote-document", TaskFlags_NR_FOSCOE); void prepare(); - void cleanup(); ReportResult report(); private: LoadRemoteDocumentTask *t; diff --git a/src/plugins/CoreTests/src/McaObjectTests.cpp b/src/plugins/CoreTests/src/McaObjectTests.cpp index fa7dd8a0053eb00e82842ff20c7bfbcb4988da4c..4e45edd656de5b741e7a478e8f0652c32c8a8139 100644 --- a/src/plugins/CoreTests/src/McaObjectTests.cpp +++ b/src/plugins/CoreTests/src/McaObjectTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/CoreTests/src/McaObjectTests.h b/src/plugins/CoreTests/src/McaObjectTests.h index 22360adb36c3152dc5cf571fe9f3c8490566036d..5ef0be42aa545ee3a72741a7d9fd03fc7386ec13 100644 --- a/src/plugins/CoreTests/src/McaObjectTests.h +++ b/src/plugins/CoreTests/src/McaObjectTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,7 +26,7 @@ namespace U2 { -class GTest_CompareTwoMca : public GTest { +class GTest_CompareTwoMca : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CompareTwoMca, "compare-two-mca") diff --git a/src/plugins/CoreTests/src/MsaObjectTests.cpp b/src/plugins/CoreTests/src/MsaObjectTests.cpp index c79aa96cb1c0719488d059f8816ff9ff872b3665..dfa9e4266387d2b49fd4db00f73debece623aaf5 100644 --- a/src/plugins/CoreTests/src/MsaObjectTests.cpp +++ b/src/plugins/CoreTests/src/MsaObjectTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/CoreTests/src/MsaObjectTests.h b/src/plugins/CoreTests/src/MsaObjectTests.h index 048d8c173e48300502e27bf233a4a6c253447130..218d087e53706a9a9f9325977510f08fb1939a56 100644 --- a/src/plugins/CoreTests/src/MsaObjectTests.h +++ b/src/plugins/CoreTests/src/MsaObjectTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,7 +26,7 @@ namespace U2 { -class GTest_CompareTwoMsa : public GTest { +class GTest_CompareTwoMsa : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CompareTwoMsa, "compare-two-msa") diff --git a/src/plugins/CoreTests/src/PWMatrixTests.cpp b/src/plugins/CoreTests/src/PWMatrixTests.cpp index 4c2e7432fb57c6759cb2ed9da8f76ca7a7f1570e..cde4361c4ff8f1e510506d2bcc9203f05248538a 100644 --- a/src/plugins/CoreTests/src/PWMatrixTests.cpp +++ b/src/plugins/CoreTests/src/PWMatrixTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/CoreTests/src/PWMatrixTests.h b/src/plugins/CoreTests/src/PWMatrixTests.h index 358d67eeaba6d44a29384c38475fbbe3ded24a62..5ebe521a92e1bfc9bec9b603381e7cea529953d5 100644 --- a/src/plugins/CoreTests/src/PWMatrixTests.h +++ b/src/plugins/CoreTests/src/PWMatrixTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,7 +34,7 @@ namespace U2 { class Document; //--------------------------------------------------------------------- -class GTest_PFMtoPWMConvertTest : public GTest { +class GTest_PFMtoPWMConvertTest : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_PFMtoPWMConvertTest, "check-pfm2pwm-convert"); private: @@ -44,7 +44,7 @@ public: ReportResult report(); }; -class GTest_PFMCreateTest : public GTest { +class GTest_PFMCreateTest : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_PFMCreateTest, "check-pfm-create"); private: @@ -58,7 +58,7 @@ public: ReportResult report(); }; -class GTest_PWMCreateTest : public GTest { +class GTest_PWMCreateTest : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_PWMCreateTest, "check-pwm-create"); diff --git a/src/plugins/CoreTests/src/PhyTreeObjectTests.cpp b/src/plugins/CoreTests/src/PhyTreeObjectTests.cpp index 61d25a39cefa22edc9be2106a6912bf816256400..f39bf983e01d28eeb98020b9fa77843f87a78ba0 100644 --- a/src/plugins/CoreTests/src/PhyTreeObjectTests.cpp +++ b/src/plugins/CoreTests/src/PhyTreeObjectTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -63,8 +63,8 @@ void GTest_CalculateTreeFromAligment::init(XMLTestFormat *tf, const QDomElement& return; } - algName = el.attribute(ALGORITHM_ATTR); - if (algName.isEmpty()) { + algId = el.attribute(ALGORITHM_ATTR); + if (algId.isEmpty()) { failMissingValue(ALGORITHM_ATTR); return; } @@ -85,7 +85,7 @@ void GTest_CalculateTreeFromAligment::prepare() { } CreatePhyTreeSettings settings; - settings.algorithmId = algName; + settings.algorithm = algId; settings.mb_ngen = 1000; settings.mrBayesSettingsScript = QString("Begin MrBayes;\n" "lset Nst=2 rates=gamma ngammacat=4;\n" @@ -97,7 +97,7 @@ void GTest_CalculateTreeFromAligment::prepare() { task = new PhyTreeGeneratorLauncherTask(maObj->getMultipleAlignment(), settings); if (task == NULL) { - stateInfo.setError(QString("Algorithm %1 not found").arg(algName)); + stateInfo.setError(QString("Algorithm %1 not found").arg(algId)); return; } addSubTask(task); diff --git a/src/plugins/CoreTests/src/PhyTreeObjectTests.h b/src/plugins/CoreTests/src/PhyTreeObjectTests.h index 25baf01e958aba4e42e9ca48b3171060f6b40176..2afed8763b866d408a96bc3d8c929317abe54e9a 100644 --- a/src/plugins/CoreTests/src/PhyTreeObjectTests.h +++ b/src/plugins/CoreTests/src/PhyTreeObjectTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -31,7 +31,7 @@ namespace U2 { class Document; class PhyTreeGeneratorLauncherTask; -class GTest_CalculateTreeFromAligment : public GTest { +class GTest_CalculateTreeFromAligment : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CalculateTreeFromAligment, "calc-tree-from-alignment"); @@ -41,10 +41,10 @@ class GTest_CalculateTreeFromAligment : public GTest { PhyTreeGeneratorLauncherTask* task; QString objContextName; QString treeObjContextName; - QString algName; + QString algId; }; -class GTest_CheckPhyNodeHasSibling : public GTest { +class GTest_CheckPhyNodeHasSibling : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CheckPhyNodeHasSibling, "check-phynode-has-sibling"); @@ -56,7 +56,7 @@ class GTest_CheckPhyNodeHasSibling : public GTest { }; -class GTest_CheckPhyNodeBranchDistance : public GTest { +class GTest_CheckPhyNodeBranchDistance : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CheckPhyNodeBranchDistance, "check-phynode-branch-distance"); @@ -68,7 +68,7 @@ class GTest_CheckPhyNodeBranchDistance : public GTest { }; -class GTest_CompareTreesInTwoObjects : public GTest { +class GTest_CompareTreesInTwoObjects : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CompareTreesInTwoObjects, "compare-trees-in-two-objects"); diff --git a/src/plugins/CoreTests/src/SMatrixTests.cpp b/src/plugins/CoreTests/src/SMatrixTests.cpp index 2bf3f0307564d744c9aa440a9aa5dd1a024bf43b..f389f1cb7c8fa2611353ee0f4c91aaab3d972721 100644 --- a/src/plugins/CoreTests/src/SMatrixTests.cpp +++ b/src/plugins/CoreTests/src/SMatrixTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/CoreTests/src/SMatrixTests.h b/src/plugins/CoreTests/src/SMatrixTests.h index ceca257b32f0095298bca47740d16c46a865d2ba..418796297d215db826fc37af78e8097de009ac4c 100644 --- a/src/plugins/CoreTests/src/SMatrixTests.h +++ b/src/plugins/CoreTests/src/SMatrixTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,7 +26,7 @@ namespace U2{ -class GTest_SubstMatrix : public GTest { +class GTest_SubstMatrix : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_SubstMatrix, "check-subst-matrix", TaskFlags_NR_FOSCOE); diff --git a/src/plugins/CoreTests/src/SecStructPredictTests.cpp b/src/plugins/CoreTests/src/SecStructPredictTests.cpp index 46a7c42aac12506363fd33445e11a841da3d799d..392835d8c040e7009796135707de575d8a2f669b 100644 --- a/src/plugins/CoreTests/src/SecStructPredictTests.cpp +++ b/src/plugins/CoreTests/src/SecStructPredictTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -157,6 +157,8 @@ void GTest_SecStructPredictTask::cleanup() if (contextAdded) { removeContext(resultsTableContextName); } + + XmlTest::cleanup(); } /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/plugins/CoreTests/src/SecStructPredictTests.h b/src/plugins/CoreTests/src/SecStructPredictTests.h index 1c8411843fa6c7ebd37e33a146f2368fec688f5a..26a4b33a49a39f90667b81ace02af885480ccdf0 100644 --- a/src/plugins/CoreTests/src/SecStructPredictTests.h +++ b/src/plugins/CoreTests/src/SecStructPredictTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ namespace U2 { class SecStructPredictTask; class AnnotationTableObject; -class GTest_SecStructPredictAlgorithm : public GTest { +class GTest_SecStructPredictAlgorithm : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_SecStructPredictAlgorithm, "test-sec-struct-predict-algorithm"); @@ -44,7 +44,7 @@ private: }; -class GTest_SecStructPredictTask : public GTest { +class GTest_SecStructPredictTask : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_SecStructPredictTask, "predict-sec-structure-and-save-results"); diff --git a/src/plugins/CoreTests/src/SequenceWalkerTests.cpp b/src/plugins/CoreTests/src/SequenceWalkerTests.cpp index 587038b68cefb226461ec7085cc7851d2416fa86..f7be79cfb400ec8792ddd2b3e63f2efb0bc411e0 100644 --- a/src/plugins/CoreTests/src/SequenceWalkerTests.cpp +++ b/src/plugins/CoreTests/src/SequenceWalkerTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/CoreTests/src/SequenceWalkerTests.h b/src/plugins/CoreTests/src/SequenceWalkerTests.h index 71496a36e374deb1399a55b0594408a083a6489f..084937abd36d218b455ab18b35fc170541d8e031 100644 --- a/src/plugins/CoreTests/src/SequenceWalkerTests.h +++ b/src/plugins/CoreTests/src/SequenceWalkerTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ namespace U2 { -class GTest_SW_CheckRegion : public GTest, public SequenceWalkerCallback { +class GTest_SW_CheckRegion : public XmlTest, public SequenceWalkerCallback { Q_OBJECT public: diff --git a/src/plugins/CoreTests/src/TaskTests.cpp b/src/plugins/CoreTests/src/TaskTests.cpp index adb5f75e6db43b2e9de7469672ae6c0d47310597..e4629ec09b77b85cad8a36b7c95748de624e6321 100644 --- a/src/plugins/CoreTests/src/TaskTests.cpp +++ b/src/plugins/CoreTests/src/TaskTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -46,6 +46,9 @@ namespace U2 { #define RUN_AFTER_ALL_SUBS_FINISHED_FLAG_ATTR "run_after_all_subs" #define DELAY_ATTR "ms" #define CONDITION_ATTR "cond" +#define BASE_TASK "base_task" +#define INFINITE_TASK "infinite_task" +#define DESTRUCTOR_CLEANUP_TASK "destructor_cleanup_task" class SThread : public QThread { public: @@ -100,12 +103,26 @@ static Task::State stateFromString(QString str, bool *ok = NULL) { return taskState; } +/*****************************************/ +/*InfiniteTestTask*/ +/*****************************************/ + void InfiniteTestTask::run() { while(!stateInfo.cancelFlag) { SThread::msleep(100); } } +/*****************************************/ +/*DestructorCleanupTask*/ +/*****************************************/ + +DestructorCleanupTask::DestructorCleanupTask(QString taskName, TaskFlags f) :Task(taskName, f) {} + +DestructorCleanupTask::~DestructorCleanupTask() { + cleanup(); +} + StateOrderTestTask::StateOrderTestTask(StateOrderTestTaskCallback *ptr, TaskFlags _f) : Task("calback_test_task",_f) { @@ -166,11 +183,13 @@ void GTest_TaskCreateTest::init(XMLTestFormat *tf, const QDomElement& el) { } } - if( taskType_str == "base_task") { + if (taskType_str == BASE_TASK) { task = new Task(taskName_str, taskFlags|TaskFlags(TaskFlag_NoRun)); - } else if(taskType_str == "infinite_task") { + } else if (taskType_str == INFINITE_TASK) { task = new InfiniteTestTask(taskName_str, taskFlags); - } else { + } else if (taskType_str == DESTRUCTOR_CLEANUP_TASK) { + task = new DestructorCleanupTask(taskName_str, taskFlags | TaskFlags(TaskFlag_NoRun)); + } else { failMissingValue(TASK_TYPE_ATTR); return; } @@ -190,6 +209,8 @@ void GTest_TaskCreateTest::cleanup() { if (deleteTask /*|| task->hasFlags(TaskFlag_NoAutoDelete)*/) { delete task; } + + XmlTest::cleanup(); } void GTest_TaskAddSubtaskTest::init(U2::XMLTestFormat *tf, const QDomElement &el){ @@ -205,6 +226,7 @@ void GTest_TaskAddSubtaskTest::init(U2::XMLTestFormat *tf, const QDomElement &el return; } } + Task::ReportResult GTest_TaskAddSubtaskTest::report() { Task *task= getContext<Task>(this, taskContextName); if(task==NULL) { @@ -219,7 +241,7 @@ Task::ReportResult GTest_TaskAddSubtaskTest::report() { } task->addSubTask(subtask); - if(!task->getSubtasks().contains(subtask)) { + if(!task->getPureSubtasks().contains(subtask)) { stateInfo.setError(QString("subtask not add")); return ReportResult_Finished; } diff --git a/src/plugins/CoreTests/src/TaskTests.h b/src/plugins/CoreTests/src/TaskTests.h index 5962fccd722915da9226bb2834cac84df63187d1..5c53173e04a84f17e5ff7623fd1d388729cea2b0 100644 --- a/src/plugins/CoreTests/src/TaskTests.h +++ b/src/plugins/CoreTests/src/TaskTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,7 +33,14 @@ class InfiniteTestTask : public Task { Q_OBJECT public: InfiniteTestTask(QString _taskName, TaskFlags _f) : Task(_taskName, _f) {} - void run(); + void run() override; +}; + +class DestructorCleanupTask : public Task { + Q_OBJECT +public: + DestructorCleanupTask(QString taskName, TaskFlags f); + ~DestructorCleanupTask(); }; enum StateOrderType { @@ -59,7 +66,7 @@ private: StateOrderTestTaskCallback *callback; }; -class GTest_TaskCreateTest : public GTest { +class GTest_TaskCreateTest : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_TaskCreateTest, "task-create"); @@ -72,7 +79,7 @@ private: QString resultContextName; }; -class GTest_TaskAddSubtaskTest : public GTest { +class GTest_TaskAddSubtaskTest : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_TaskAddSubtaskTest, "task-add-subtask"); @@ -83,7 +90,7 @@ private: QString subtaskContextName; }; -class GTest_TaskCancelTest : public GTest { +class GTest_TaskCancelTest : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_TaskCancelTest, "task-cancel"); @@ -93,7 +100,7 @@ private: QString objContextName; }; -class GTest_TaskCheckFlag : public GTest { +class GTest_TaskCheckFlag : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_TaskCheckFlag, "task-check-flag"); @@ -104,7 +111,7 @@ private: QString taskContextName; }; -class GTest_TaskCheckState : public GTest { +class GTest_TaskCheckState : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_TaskCheckState, "task-check-state"); @@ -121,7 +128,7 @@ private: QString taskContextName; }; -class GTest_TaskExec : public GTest { +class GTest_TaskExec : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_TaskExec, "task-exec"); @@ -132,7 +139,7 @@ private: QString taskContextName; }; -class GTest_TaskStateOrder : public GTest, public StateOrderTestTaskCallback{ +class GTest_TaskStateOrder : public XmlTest, public StateOrderTestTaskCallback{ Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_TaskStateOrder, "task-state-order-test", TaskFlags_FOSCOE); @@ -149,7 +156,7 @@ private: bool run_after_all_subs_flag; }; -class GTest_Wait : public GTest { +class GTest_Wait : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_Wait, "wait",TaskFlags(TaskFlags_FOSCOE)); diff --git a/src/plugins/CoreTests/src/TextObjectTests.cpp b/src/plugins/CoreTests/src/TextObjectTests.cpp index f6f62b885cb10ac0bc33192ae2061821659f3656..468e7d7b33bd62af6bedee7489ec3ee49bdd1e7d 100644 --- a/src/plugins/CoreTests/src/TextObjectTests.cpp +++ b/src/plugins/CoreTests/src/TextObjectTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/CoreTests/src/TextObjectTests.h b/src/plugins/CoreTests/src/TextObjectTests.h index 3ecdbba5c65cddd58bc8e99d7479acebf7af0bac..34a7bad0d4aee8e52575e42070f1467621a055dc 100644 --- a/src/plugins/CoreTests/src/TextObjectTests.h +++ b/src/plugins/CoreTests/src/TextObjectTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,7 +26,7 @@ namespace U2 { -class GTest_CheckStringExists : public GTest { +class GTest_CheckStringExists : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CheckStringExists, "check-string-exists") diff --git a/src/plugins/CoreTests/src/UtilTestActions.cpp b/src/plugins/CoreTests/src/UtilTestActions.cpp index f60877567444ab38da6fcdc713cdff1507ef5ab1..51e1af35ae9122f7c2fd1b7227a42c3bc762fed6 100644 --- a/src/plugins/CoreTests/src/UtilTestActions.cpp +++ b/src/plugins/CoreTests/src/UtilTestActions.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -36,22 +36,49 @@ namespace U2 { /************************************************************************/ const QString GTest_CopyFile::FROM_URL_ATTR = "from"; const QString GTest_CopyFile::TO_URL_ATTR ="to"; +const QString GTest_CopyFile::IS_DIRECTORY ="is_dir"; void GTest_CopyFile::init(XMLTestFormat *, const QDomElement &el) { fromUrl = el.attribute(FROM_URL_ATTR); toUrl = el.attribute(TO_URL_ATTR); + isDir = el.attribute(IS_DIRECTORY) == "true"; XMLTestUtils::replacePrefix(env, fromUrl); XMLTestUtils::replacePrefix(env, toUrl); } Task::ReportResult GTest_CopyFile::report() { QDir().mkpath(QFileInfo(toUrl).absoluteDir().absolutePath()); - if (!QFile::copy(fromUrl, toUrl)) { - stateInfo.setError(tr("Can't copy file '%1' to '%2'.").arg(fromUrl).arg(toUrl)); + bool copied = isDir ? copyDirectry(fromUrl, toUrl) : QFile::copy(fromUrl, toUrl); + if (!copied) { + stateInfo.setError(tr("Can't copy %1 '%2' to '%3'.") + .arg(isDir ? "directory" : "file") + .arg(fromUrl) + .arg(toUrl)); } + return ReportResult_Finished; } +bool GTest_CopyFile::copyDirectry(const QString& from, const QString& to) { + QDir dirFrom(from); + + QStringList foldersList = dirFrom.entryList(QDir::Dirs | QDir::NoDotAndDotDot); + foreach(const QString& folder, foldersList) { + QString subfolder = to + QDir::separator() + folder; + dirFrom.mkpath(subfolder); + bool copied = copyDirectry(from + QDir::separator() + folder, subfolder); + CHECK(copied, false); + } + + QStringList filesList = dirFrom.entryList(QDir::Files); + foreach(const QString& file, filesList) { + bool copied = QFile::copy(from + QDir::separator() + file, to + QDir::separator() + file); + CHECK(copied, false); + } + + return true; +} + /************************************************************************/ /* GTest_AddSharedDbUrl */ /************************************************************************/ diff --git a/src/plugins/CoreTests/src/UtilTestActions.h b/src/plugins/CoreTests/src/UtilTestActions.h index 84b54eb084085cf55f603ede2eb2ea2522664f3a..21730f61b6865003ea529c6b5d184b2b6134bae0 100644 --- a/src/plugins/CoreTests/src/UtilTestActions.h +++ b/src/plugins/CoreTests/src/UtilTestActions.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -27,7 +27,7 @@ namespace U2 { -class GTest_CopyFile : public GTest { +class GTest_CopyFile : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CopyFile, "copy-file"); @@ -35,14 +35,18 @@ public: ReportResult report(); private: + bool copyDirectry(const QString& from, const QString& to); + QString fromUrl; QString toUrl; + bool isDir; static const QString FROM_URL_ATTR; static const QString TO_URL_ATTR; + static const QString IS_DIRECTORY; }; -class GTest_AddSharedDbUrl : public GTest { +class GTest_AddSharedDbUrl : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_AddSharedDbUrl, "add-shared-db"); diff --git a/src/plugins/GUITestBase/GUITestBase.pri b/src/plugins/GUITestBase/GUITestBase.pri index 44c2bdfdb14a50fac49eb72a48f35c92287b46fb..3a57c182b15ce2ae4c187f41ffd6280d33322a72 100644 --- a/src/plugins/GUITestBase/GUITestBase.pri +++ b/src/plugins/GUITestBase/GUITestBase.pri @@ -8,15 +8,7 @@ include( ../../ugene_plugin_common.pri ) QT += testlib webkitwidgets INCLUDEPATH += ../../corelibs/U2View/_tmp/ ../../libs_3rdparty/QSpec/src -LIBS +=-L../../_release -lQSpec - -!debug_and_release|build_pass { - - CONFIG(debug, debug|release) { - LIBS -= -L../../_release -lQSpec - LIBS += -L../../_debug -lQSpecd - } -} +LIBS += -lQSpec$$D unix { !macx { diff --git a/src/plugins/GUITestBase/GUITestBase.pro b/src/plugins/GUITestBase/GUITestBase.pro index 27e90be5b76f40cfb7a20a877dd9f08100561b9c..c4b3b8257589ffe630e61650d6fb0267bf80a338 100644 --- a/src/plugins/GUITestBase/GUITestBase.pro +++ b/src/plugins/GUITestBase/GUITestBase.pro @@ -120,6 +120,9 @@ HEADERS += src/GUITestBasePlugin.h \ src/runnables/ugene/plugins/external_tools/SnpEffDatabaseDialogFiller.h \ src/runnables/ugene/plugins/external_tools/SpadesGenomeAssemblyDialogFiller.h \ src/runnables/ugene/plugins/external_tools/TCoffeeDailogFiller.h \ + src/runnables/ugene/plugins/external_tools/TrimmomaticDialogFiller.h \ +# Runnables / UGENE / plugins / ngs_classification + src/runnables/ugene/plugins/ngs_classification/GenomicLibraryDialogFiller.h \ # Runnables / UGENE / plugins / orf_marker src/runnables/ugene/plugins/orf_marker/OrfDialogFiller.h \ # Runnables / UGENE / plugins / pcr @@ -217,6 +220,7 @@ HEADERS += src/GUITestBasePlugin.h \ src/tests/common_scenarios/msa_editor/edit/GTTestsMSAEditorEdit.h \ src/tests/common_scenarios/msa_editor/replace_character/GTTestsMSAEditorReplaceCharacter.h \ src/tests/common_scenarios/msa_editor/overview/GTTestsMSAEditorOverview.h \ + src/tests/common_scenarios/ngs_classification/metaphlan2/GTTestsMetaPhlAn2.h \ src/tests/common_scenarios/options_panel/GTTestsOptionPanel.h \ src/tests/common_scenarios/options_panel/msa/GTTestsOptionPanelMSA.h \ src/tests/common_scenarios/options_panel/sequence_view/GTTestsOptionPanelSequenceView.h \ @@ -247,6 +251,7 @@ HEADERS += src/GUITestBasePlugin.h \ src/tests/common_scenarios/tree_viewer/GTTestsCommonScenariousTreeviewer.h \ src/tests/common_scenarios/undo_redo/GTTestsUndoRedo.h \ src/tests/common_scenarios/workflow_designer/GTTestsWorkflowDesigner.h \ + src/tests/common_scenarios/workflow_designer/dashboard/GTTestsWorkflowDashboard.h \ src/tests/common_scenarios/workflow_designer/estimating/GTTestsWorkflowEstimating.h \ src/tests/common_scenarios/workflow_designer/name_filter/GTTestsWorkflowNameFilter.h \ src/tests/common_scenarios/workflow_designer/parameters_validation/GTTestsWorkflowParameterValidation.h \ @@ -380,6 +385,9 @@ SOURCES += src/GUITestBasePlugin.cpp \ src/runnables/ugene/plugins/external_tools/SnpEffDatabaseDialogFiller.cpp \ src/runnables/ugene/plugins/external_tools/SpadesGenomeAssemblyDialogFiller.cpp \ src/runnables/ugene/plugins/external_tools/TCoffeeDailogFiller.cpp \ + src/runnables/ugene/plugins/external_tools/TrimmomaticDialogFiller.cpp \ +# Runnables / UGENE / plugins / ngs_classification + src/runnables/ugene/plugins/ngs_classification/GenomicLibraryDialogFiller.cpp \ # Runnables / UGENE / plugins / orf_marker src/runnables/ugene/plugins/orf_marker/OrfDialogFiller.cpp \ # Runnables / UGENE / plugins / pcr @@ -394,7 +402,7 @@ SOURCES += src/GUITestBasePlugin.cpp \ # Runnables / UGENE / plugins / workflow_designer src/runnables/ugene/plugins/workflow_designer/AliasesDialogFiller.cpp \ src/runnables/ugene/plugins/workflow_designer/ConfigurationWizardFiller.cpp \ - src/runnables/ugene/plugins/workflow_designer/CreateElementWithCommandLineFiller.cpp \ + src/runnables/ugene/plugins/workflow_designer/CreateElementWithCommandLineToolFiller.cpp \ src/runnables/ugene/plugins/workflow_designer/CreateElementWithScriptDialogFiller.cpp \ src/runnables/ugene/plugins/workflow_designer/DashboardsManagerDialogFiller.cpp \ src/runnables/ugene/plugins/workflow_designer/DatasetNameEditDialogFiller.cpp \ @@ -477,6 +485,7 @@ SOURCES += src/GUITestBasePlugin.cpp \ src/tests/common_scenarios/msa_editor/edit/GTTestsMSAEditorEdit.cpp \ src/tests/common_scenarios/msa_editor/replace_character/GTTestsMSAEditorReplaceCharacter.cpp \ src/tests/common_scenarios/msa_editor/overview/GTTestsMSAEditorOverview.cpp \ + src/tests/common_scenarios/ngs_classification/metaphlan2/GTTestsMetaPhlAn2.cpp \ src/tests/common_scenarios/options_panel/GTTestsOptionPanel.cpp \ src/tests/common_scenarios/options_panel/msa/GTTestsOptionPanelMSA.cpp \ src/tests/common_scenarios/options_panel/sequence_view/GTTestsOptionPanelSequenceView.cpp \ @@ -507,6 +516,7 @@ SOURCES += src/GUITestBasePlugin.cpp \ src/tests/common_scenarios/tree_viewer/GTTestsCommonScenariousTreeviewer.cpp \ src/tests/common_scenarios/undo_redo/GTTestsUndoRedo.cpp \ src/tests/common_scenarios/workflow_designer/GTTestsWorkflowDesigner.cpp \ + src/tests/common_scenarios/workflow_designer/dashboard/GTTestsWorkflowDashboard.cpp \ src/tests/common_scenarios/workflow_designer/estimating/GTTestsWorkflowEstimating.cpp \ src/tests/common_scenarios/workflow_designer/name_filter/GTTestsWorkflowNameFilter.cpp \ src/tests/common_scenarios/workflow_designer/parameters_validation/GTTestsWorkflowParameterValidation.cpp \ diff --git a/src/plugins/GUITestBase/src/GTDatabaseConfig.cpp b/src/plugins/GUITestBase/src/GTDatabaseConfig.cpp index c8c9a1e349e4196ee6b828a9c0fcfefcf65b692c..72b1a8f3f8ea73501b59ff1efd6973cc8bc953c2 100644 --- a/src/plugins/GUITestBase/src/GTDatabaseConfig.cpp +++ b/src/plugins/GUITestBase/src/GTDatabaseConfig.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTDatabaseConfig.h b/src/plugins/GUITestBase/src/GTDatabaseConfig.h index ae8f8d197685bd19f2d48f26d845d2db92ba89f3..870012d28d4d71bcd2fd053dbaa90a742dad5e50 100644 --- a/src/plugins/GUITestBase/src/GTDatabaseConfig.h +++ b/src/plugins/GUITestBase/src/GTDatabaseConfig.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsAnnotationsHighlightingTreeView.cpp b/src/plugins/GUITestBase/src/GTUtilsAnnotationsHighlightingTreeView.cpp index af63503df25d7073a670bb3ae3ccf067eeffd49b..8424cd7828ae1932034f4249644d697e3380e61e 100644 --- a/src/plugins/GUITestBase/src/GTUtilsAnnotationsHighlightingTreeView.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsAnnotationsHighlightingTreeView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsAnnotationsHighlightingTreeView.h b/src/plugins/GUITestBase/src/GTUtilsAnnotationsHighlightingTreeView.h index 46e51eba56d4c30145732375e6129a52dbe07409..fca805f76f46326ab06c73f0bc0a5a19607a9834 100644 --- a/src/plugins/GUITestBase/src/GTUtilsAnnotationsHighlightingTreeView.h +++ b/src/plugins/GUITestBase/src/GTUtilsAnnotationsHighlightingTreeView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsAnnotationsTreeView.cpp b/src/plugins/GUITestBase/src/GTUtilsAnnotationsTreeView.cpp index 206b28f2f20c211b58889dd527a8e296863eb755..a520421430e2367caa20d1a15829f3e53293bc5c 100644 --- a/src/plugins/GUITestBase/src/GTUtilsAnnotationsTreeView.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsAnnotationsTreeView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsAnnotationsTreeView.h b/src/plugins/GUITestBase/src/GTUtilsAnnotationsTreeView.h index c2a2b61522e95147bf1bb861d44341461ff4417c..d460e977a68996a94af6b2b57d427a457d7bc843 100644 --- a/src/plugins/GUITestBase/src/GTUtilsAnnotationsTreeView.h +++ b/src/plugins/GUITestBase/src/GTUtilsAnnotationsTreeView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsAssemblyBrowser.cpp b/src/plugins/GUITestBase/src/GTUtilsAssemblyBrowser.cpp index 59fccedaa2f072723fc584ef8711afbe4b660ba7..c6d75b3b77a6aa867fb9f43a3d2bc6aa06f7312a 100644 --- a/src/plugins/GUITestBase/src/GTUtilsAssemblyBrowser.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsAssemblyBrowser.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsAssemblyBrowser.h b/src/plugins/GUITestBase/src/GTUtilsAssemblyBrowser.h index 9a26a03208703d5864bbcfb390222bd9dba70725..630c061367df3ce5d010c5e37b97210cc120b672 100644 --- a/src/plugins/GUITestBase/src/GTUtilsAssemblyBrowser.h +++ b/src/plugins/GUITestBase/src/GTUtilsAssemblyBrowser.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsBookmarksTreeView.cpp b/src/plugins/GUITestBase/src/GTUtilsBookmarksTreeView.cpp index fa8510c352945e8d375b582a56d47dbc83bb7266..dc6786709b090e78e63f968194866b28c08ff21c 100644 --- a/src/plugins/GUITestBase/src/GTUtilsBookmarksTreeView.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsBookmarksTreeView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsBookmarksTreeView.h b/src/plugins/GUITestBase/src/GTUtilsBookmarksTreeView.h index 185567b2ca20f49af7102b85571210e6717772da..93bceda52d9d5170c4a182f6f8623ce67fb1d7a6 100644 --- a/src/plugins/GUITestBase/src/GTUtilsBookmarksTreeView.h +++ b/src/plugins/GUITestBase/src/GTUtilsBookmarksTreeView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsCircularView.cpp b/src/plugins/GUITestBase/src/GTUtilsCircularView.cpp index 4e20b2cc93512cdc6ebca0552600935e093cf613..99f9a56b897818887eff2a65385e52dab55dc2d7 100644 --- a/src/plugins/GUITestBase/src/GTUtilsCircularView.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsCircularView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsCircularView.h b/src/plugins/GUITestBase/src/GTUtilsCircularView.h index e4da8f7c8f46d27ceace8f612d2154b014148a9e..b51a05f7c240ccc7a3d702f4f516d235ea711ef2 100644 --- a/src/plugins/GUITestBase/src/GTUtilsCircularView.h +++ b/src/plugins/GUITestBase/src/GTUtilsCircularView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsDashboard.cpp b/src/plugins/GUITestBase/src/GTUtilsDashboard.cpp index caf6a7610a6b42f251747e5697d3a67e8fb7319c..56e255577d3124a98ddaf618420b6e9cf175f913 100644 --- a/src/plugins/GUITestBase/src/GTUtilsDashboard.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsDashboard.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,11 +19,14 @@ * MA 02110-1301, USA. */ +#include <QRegularExpression> #include <QTabWidget> #include <QWebElement> #include <QWebFrame> #include <QWebView> +#include <GTUtilsMdi.h> +#include <primitives/GTTabWidget.h> #include <primitives/GTWebView.h> #include <primitives/GTWidget.h> @@ -41,19 +44,76 @@ QMap<QString, GTUtilsDashboard::Tabs> GTUtilsDashboard::initTabMap(){ return result; } +QString GTUtilsDashboard::getNodeSpanId(const QString &nodeId) { + // It is defined in ExternalToolsWidget.js. + return nodeId + "_span"; +} + +HIWebElement GTUtilsDashboard::getCopyButton(GUITestOpStatus &os, const QString &toolRunNodeId) { + const QString selector = QString("SPAN#%1 > BUTTON").arg(getNodeSpanId(toolRunNodeId)); + + GTGlobals::FindOptions options; + options.searchInHidden = true; + + return GTWebView::findElementBySelector(os, getDashboard(os), selector, options); +} + +HIWebElement GTUtilsDashboard::getNodeSpan(GUITestOpStatus &os, const QString &nodeId) { + const QString selector = QString("SPAN#%1").arg(getNodeSpanId(nodeId)); + + GTGlobals::FindOptions options; + options.searchInHidden = true; + + return GTWebView::findElementBySelector(os, getDashboard(os), selector, options); +} + +HIWebElement GTUtilsDashboard::getNodeUl(GUITestOpStatus &os, const QString &nodeId) { + const QString selector = QString("UL#%1").arg(nodeId); + + GTGlobals::FindOptions options; + options.searchInHidden = true; + + return GTWebView::findElementBySelector(os, getDashboard(os), selector, options); +} + +#define GT_METHOD_NAME "clickOutputFile" +QString GTUtilsDashboard::getLogUrlFromElement(GUITestOpStatus &os, const HIWebElement &element) { + Q_UNUSED(os); + const QString onclickFunction = element.attribute(ON_CLICK); + QRegularExpression urlFetcher("openLog\\(\\\'(.*)\\\'\\)"); + const QRegularExpressionMatch match = urlFetcher.match(onclickFunction); + GT_CHECK_RESULT(match.hasMatch(), + QString("Can't get URL with a regexp from an element: regexp is '%1', element ID is '%2', element class is '%3'") + .arg(urlFetcher.pattern()).arg(element.id()).arg(element.attribute("class")), QString()); + return match.captured(1); +} +#undef GT_METHOD_NAME + const QMap<QString, GTUtilsDashboard::Tabs> GTUtilsDashboard::tabMap = initTabMap(); +const QString GTUtilsDashboard::TREE_ROOT_ID = "treeRoot"; +const QString GTUtilsDashboard::PARENT_LI = "parent_li"; + +const QString GTUtilsDashboard::WIDTH = "width"; +const QString GTUtilsDashboard::HEIGHT = "height"; +const QString GTUtilsDashboard::TITLE = "title"; +const QString GTUtilsDashboard::COLLAPSED_NODE_TITLE = "Expand this branch"; +const QString GTUtilsDashboard::ON_CLICK = "onclick"; -QWebView* GTUtilsDashboard::getDashboard(HI::GUITestOpStatus &os){ - return GTWidget::findExactWidget<QWebView*>(os, "Dashboard"); +QWebView* GTUtilsDashboard::getDashboard(HI::GUITestOpStatus &os) { + return qobject_cast<QWebView *>(getTabWidget(os)->currentWidget()); } QTabWidget* GTUtilsDashboard::getTabWidget(HI::GUITestOpStatus &os){ - return GTWidget::findExactWidget<QTabWidget*>(os, "WorkflowTabView"); + return GTWidget::findExactWidget<QTabWidget *>(os, "WorkflowTabView", GTUtilsMdi::activeWindow(os)); } -QStringList GTUtilsDashboard::getOutputFiles(HI::GUITestOpStatus &os, const QString &producerName) { - const HIWebElement outputFilesWidget = GTWebView::findElementById(os, getDashboard(os), "output files", "table"); - const QList<HIWebElement> outputFilesButtons = GTWebView::findElementsById(os, getDashboard(os), producerName, "button", outputFilesWidget); +const QString GTUtilsDashboard::getDashboardName(GUITestOpStatus &os, int dashboardNumber) { + return GTTabWidget::getTabName(os, getTabWidget(os), dashboardNumber); +} + +QStringList GTUtilsDashboard::getOutputFiles(HI::GUITestOpStatus &os) { + const QString selector = "div#outputWidget button.btn.full-width.long-text"; + const QList<HIWebElement> outputFilesButtons = GTWebView::findElementsBySelector(os, getDashboard(os), selector, GTGlobals::FindOptions(false)); QStringList outputFilesNames; foreach (const HIWebElement &outputFilesButton, outputFilesButtons) { const QString outputFileName = outputFilesButton.toPlainText(); @@ -65,8 +125,9 @@ QStringList GTUtilsDashboard::getOutputFiles(HI::GUITestOpStatus &os, const QStr } #define GT_METHOD_NAME "clickOutputFile" -void GTUtilsDashboard::clickOutputFile(GUITestOpStatus &os, const QString &outputFileName, const QString &producerName) { - const QList<HIWebElement> outputFilesButtons = GTWebView::findElementsById(os, getDashboard(os), producerName, "button"); +void GTUtilsDashboard::clickOutputFile(GUITestOpStatus &os, const QString &outputFileName) { + const QString selector = "div#outputWidget button.btn.full-width.long-text"; + const QList<HIWebElement> outputFilesButtons = GTWebView::findElementsBySelector(os, getDashboard(os), selector); foreach (const HIWebElement &outputFilesButton, outputFilesButtons) { QString buttonText = outputFilesButton.toPlainText(); if (buttonText == outputFileName) { @@ -83,7 +144,7 @@ void GTUtilsDashboard::clickOutputFile(GUITestOpStatus &os, const QString &outpu } } - GT_CHECK(false, QString("The output file with name '%1' produced by '%2' not found").arg(outputFileName).arg(producerName)); + GT_CHECK(false, QString("The output file with name '%1' not found").arg(outputFileName)); } #undef GT_METHOD_NAME @@ -115,6 +176,163 @@ void GTUtilsDashboard::openTab(HI::GUITestOpStatus &os, Tabs tab){ } #undef GT_METHOD_NAME +#define GT_METHOD_NAME "doesTabExist" +bool GTUtilsDashboard::doesTabExist(HI::GUITestOpStatus &os, Tabs tab) { + return GTWebView::doesElementExist(os, getDashboard(os), tabMap.key(tab), "A"); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getRootNode" +QString GTUtilsDashboard::getRootNode(GUITestOpStatus &os) { + return GTWebView::findElementById(os, getDashboard(os), TREE_ROOT_ID).id(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getNodeText" +QString GTUtilsDashboard::getNodeText(GUITestOpStatus &os, const QString &nodeId) { + return getNodeSpan(os, nodeId).toPlainText(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getChildrenNodesCount" +int GTUtilsDashboard::getChildrenNodesCount(GUITestOpStatus &os, const QString &nodeId) { + const QString selector = QString("UL#%1 > LI.%2 > UL").arg(nodeId).arg(PARENT_LI); + + GTGlobals::FindOptions options; + options.failIfNotFound = false; + options.searchInHidden = true; + + return GTWebView::findElementsBySelector(os, getDashboard(os), selector, options).size(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getChildNodeId" +QString GTUtilsDashboard::getChildNodeId(GUITestOpStatus &os, const QString &nodeId, int childNum) { + return getDescendantNodeId(os, nodeId, { childNum }); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getDescendantNodeId" +QString GTUtilsDashboard::getDescendantNodeId(GUITestOpStatus &os, const QString &nodeId, const QList<int> &childNums) { + QString selector = QString("UL#%1").arg(nodeId); + foreach (const int childNum, childNums) { + selector += QString(" > LI:nth-of-type(%1) > UL").arg(childNum + 1); + } + + GTGlobals::FindOptions options; + options.searchInHidden = true; + + return GTWebView::findElementBySelector(os, getDashboard(os), selector, options).id(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getChildWithTextId" +QString GTUtilsDashboard::getChildWithTextId(GUITestOpStatus &os, const QString &nodeId, const QString &text) { + const int childrenCount = getChildrenNodesCount(os, nodeId); + QString resultChildId; + QStringList quotedChildrenTexts; + for (int i = 0; i < childrenCount; i++) { + const QString currentChildId = getChildNodeId(os, nodeId, i); + const QString childText = getNodeText(os, currentChildId); + quotedChildrenTexts << "\'" + childText + "\'"; + if (text == childText) { + GT_CHECK_RESULT(resultChildId.isEmpty(), + QString("Expected text '%1' is not unique among the node with ID '%2' children") + .arg(text).arg(nodeId), ""); + resultChildId = currentChildId; + } + } + + GT_CHECK_RESULT(!resultChildId.isEmpty(), + QString("Child with text '%1' not found among the node with ID '%2' children; there are children with the following texts: %3") + .arg(text).arg(nodeId).arg(quotedChildrenTexts.join(", ")), ""); + + return resultChildId; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "doesNodeHaveLimitationMessageNode" +bool GTUtilsDashboard::doesNodeHaveLimitationMessageNode(GUITestOpStatus &os, const QString &nodeId) { + const QString selector = QString("UL#%1 > LI.%2 > SPAN.limitation-message").arg(nodeId).arg(PARENT_LI); + + GTGlobals::FindOptions options; + options.failIfNotFound = false; + + return !GTWebView::findElementsBySelector(os, getDashboard(os), selector, options).isEmpty(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getLimitationMessageNodeText" +QString GTUtilsDashboard::getLimitationMessageNodeText(GUITestOpStatus &os, const QString &nodeId) { + const QString selector = QString("UL#%1 > LI.%2 > SPAN.limitation-message").arg(nodeId).arg(PARENT_LI); + return GTWebView::findElementBySelector(os, getDashboard(os), selector).toPlainText(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getLimitationMessageLogUrl" +QString GTUtilsDashboard::getLimitationMessageLogUrl(GUITestOpStatus &os, const QString &nodeId) { + const QString selector = QString("UL#%1 > LI.%2 > SPAN.limitation-message > A").arg(nodeId).arg(PARENT_LI); + return getLogUrlFromElement(os, GTWebView::findElementBySelector(os, getDashboard(os), selector)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getCopyButtonSize" +QSize GTUtilsDashboard::getCopyButtonSize(GUITestOpStatus &os, const QString &toolRunNodeId) { + return getCopyButton(os, toolRunNodeId).geometry().size(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "clickCopyButton" +void GTUtilsDashboard::clickCopyButton(GUITestOpStatus &os, const QString &toolRunNodeId) { + click(os, getCopyButton(os, toolRunNodeId)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "isNodeVisible" +bool GTUtilsDashboard::isNodeVisible(GUITestOpStatus &os, const QString &nodeId) { + const HIWebElement nodeSpanElement = getNodeSpan(os, nodeId); + return nodeSpanElement.geometry().isValid(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "isNodeCollapsed" +bool GTUtilsDashboard::isNodeCollapsed(GUITestOpStatus &os, const QString &nodeId) { + const HIWebElement nodeSpanElement = getNodeSpan(os, nodeId); + return nodeSpanElement.attribute(TITLE, "") == COLLAPSED_NODE_TITLE; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "collapseNode" +void GTUtilsDashboard::collapseNode(GUITestOpStatus &os, const QString &nodeId) { + GT_CHECK(isNodeVisible(os, nodeId), + QString("SPAN of the node with ID '%1' is not visible. Some of the parent nodes are collapsed?").arg(nodeId)); + + GT_CHECK(!isNodeCollapsed(os, nodeId), + QString("UL of the node with ID '%1' is not visible. It is already collapsed.").arg(nodeId)); + + click(os, getNodeSpan(os, nodeId)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "expandNode" +void GTUtilsDashboard::expandNode(GUITestOpStatus &os, const QString &nodeId) { + GT_CHECK(isNodeVisible(os, nodeId), + QString("SPAN of the node with ID '%1' is not visible. Some of the parent nodes are collapsed?").arg(nodeId)); + + GT_CHECK(isNodeCollapsed(os, nodeId), + QString("UL of the node with ID '%1' is visible. It is already expanded.").arg(nodeId)); + + click(os, getNodeSpan(os, nodeId)); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getLogUrlFromNode" +QString GTUtilsDashboard::getLogUrlFromNode(GUITestOpStatus &os, const QString &outputNodeId) { + const QString logFileLinkSelector = QString("SPAN#%1 A").arg(getNodeSpanId(outputNodeId)); + return getLogUrlFromElement(os, GTWebView::findElementBySelector(os, getDashboard(os), logFileLinkSelector)); +} +#undef GT_METHOD_NAME + #undef GT_CLASS_NAME } // namespace U2 diff --git a/src/plugins/GUITestBase/src/GTUtilsDashboard.h b/src/plugins/GUITestBase/src/GTUtilsDashboard.h index b249d46084e6e9984676ec00a10ac4e4e552584f..57c3f980b07e26865ba8a88a61d92b065dd1a904 100644 --- a/src/plugins/GUITestBase/src/GTUtilsDashboard.h +++ b/src/plugins/GUITestBase/src/GTUtilsDashboard.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -37,8 +37,10 @@ public: static QWebView* getDashboard(HI::GUITestOpStatus &os); static QTabWidget* getTabWidget(HI::GUITestOpStatus &os); - static QStringList getOutputFiles(HI::GUITestOpStatus &os, const QString &producerName = ""); - static void clickOutputFile(HI::GUITestOpStatus &os, const QString &outputFileName, const QString &producerName = ""); + static const QString getDashboardName(HI::GUITestOpStatus &os, int dashboardNumber); + + static QStringList getOutputFiles(HI::GUITestOpStatus &os); + static void clickOutputFile(HI::GUITestOpStatus &os, const QString &outputFileName); static HI::HIWebElement findElement(HI::GUITestOpStatus &os, QString text, QString tag = "*", bool exactMatch = false); static HI::HIWebElement findTreeElement(HI::GUITestOpStatus &os, QString text); @@ -47,9 +49,51 @@ public: static bool areThereNotifications(HI::GUITestOpStatus &os); static void openTab(HI::GUITestOpStatus &os, Tabs tab); + static bool doesTabExist(HI::GUITestOpStatus &os, Tabs tab); + +// External tools tab + static QString getRootNode(HI::GUITestOpStatus &os); + static QString getNodeText(HI::GUITestOpStatus &os, const QString &nodeId); + static int getChildrenNodesCount(HI::GUITestOpStatus &os, const QString &nodeId); + static QString getChildNodeId(HI::GUITestOpStatus &os, const QString &nodeId, int childNum); + static QString getDescendantNodeId(HI::GUITestOpStatus &os, const QString &nodeId, const QList<int> &childNums); + static QString getChildWithTextId(HI::GUITestOpStatus &os, const QString &nodeId, const QString &text); // childrens has to have unique texts + + static bool doesNodeHaveLimitationMessageNode(HI::GUITestOpStatus &os, const QString &nodeId); + static QString getLimitationMessageNodeText(HI::GUITestOpStatus &os, const QString &nodeId); + static QString getLimitationMessageLogUrl(HI::GUITestOpStatus &os, const QString &nodeId); + + static QSize getCopyButtonSize(HI::GUITestOpStatus &os, const QString &toolRunNodeId); + static void clickCopyButton(HI::GUITestOpStatus &os, const QString &toolRunNodeId); + + // All parent nodes should be expanded + static bool isNodeVisible(HI::GUITestOpStatus &os, const QString &nodeId); + static bool isNodeCollapsed(HI::GUITestOpStatus &os, const QString &nodeId); + static void collapseNode(HI::GUITestOpStatus &os, const QString &nodeId); + static void expandNode(HI::GUITestOpStatus &os, const QString &nodeId); + + static QString getLogUrlFromNode(HI::GUITestOpStatus &os, const QString &outputNodeId); + + static const QString TREE_ROOT_ID; // This constant is defined in ExternalToolWidget.js + private: static QMap<QString, Tabs> initTabMap(); + static QString getNodeSpanId(const QString &nodeId); + static HI::HIWebElement getCopyButton(HI::GUITestOpStatus &os, const QString &toolRunNodeId); + static HI::HIWebElement getNodeSpan(HI::GUITestOpStatus &os, const QString &nodeId); + static HI::HIWebElement getNodeUl(HI::GUITestOpStatus &os, const QString &nodeId); + + static QString getLogUrlFromElement(HI::GUITestOpStatus &os, const HI::HIWebElement &element); + static const QMap<QString, Tabs> tabMap; + static const QString PARENT_LI; // This constant is defined in ExternalToolWidget.js + + // Some CSS attributes + static const QString WIDTH; + static const QString HEIGHT; + static const QString TITLE; + static const QString COLLAPSED_NODE_TITLE; + static const QString ON_CLICK; }; } // namespace U2 diff --git a/src/plugins/GUITestBase/src/GTUtilsDocument.cpp b/src/plugins/GUITestBase/src/GTUtilsDocument.cpp index cbcfd9d0bcc63e190707393f83df6c845e365f23..b8822a63ebc8e7a47e4a30bb0b9469e94d4eec88 100644 --- a/src/plugins/GUITestBase/src/GTUtilsDocument.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsDocument.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsDocument.h b/src/plugins/GUITestBase/src/GTUtilsDocument.h index 54407fb4aac60d00be73aa078569720ddd04e0e6..5865bf71e44cebffa003bab4fb1af9cb855d7128 100644 --- a/src/plugins/GUITestBase/src/GTUtilsDocument.h +++ b/src/plugins/GUITestBase/src/GTUtilsDocument.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsEscClicker.cpp b/src/plugins/GUITestBase/src/GTUtilsEscClicker.cpp index 03c3e8c1671e44cb1fb06b0712527ba34ca18dc5..35f2bb69dbbd81c938c45d2ef941dbc7b715b211 100644 --- a/src/plugins/GUITestBase/src/GTUtilsEscClicker.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsEscClicker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsEscClicker.h b/src/plugins/GUITestBase/src/GTUtilsEscClicker.h index 93b842201959bdf12e5c297e1b937f5d10924903..b041c7488ee872d20de85359d38979a8ef61d0c1 100644 --- a/src/plugins/GUITestBase/src/GTUtilsEscClicker.h +++ b/src/plugins/GUITestBase/src/GTUtilsEscClicker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsExternalTools.cpp b/src/plugins/GUITestBase/src/GTUtilsExternalTools.cpp index ea6e77e1da2c6083e63cbeac17ce124fd2030726..f3059c83aa4b5323e9686d32db1e973575f2174e 100644 --- a/src/plugins/GUITestBase/src/GTUtilsExternalTools.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsExternalTools.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsExternalTools.h b/src/plugins/GUITestBase/src/GTUtilsExternalTools.h index 2c13fada3705c1c6d36099363e22ca405029bb87..1b4f6b124e53e8fe8df145dbbf8be43ab6b2f752 100644 --- a/src/plugins/GUITestBase/src/GTUtilsExternalTools.h +++ b/src/plugins/GUITestBase/src/GTUtilsExternalTools.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsLog.cpp b/src/plugins/GUITestBase/src/GTUtilsLog.cpp index 91bb484dfa71d7ebf77593d378aff4fe08d44cb0..499b93e62e92e0e41ee07b8e0f36d17670e33d75 100644 --- a/src/plugins/GUITestBase/src/GTUtilsLog.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsLog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -70,6 +70,20 @@ bool GTLogTracer::checkMessage(QString s){ return false; } +#define GT_CLASS_NAME "GTUtilsLog" +#define GT_METHOD_NAME "checkMessageStartsWith" +bool GTLogTracer::checkMessageStartsWith(QString s) { + QList<LogMessage*> messages = getMessages(); + QList<QString> textMessages; + foreach(LogMessage* message, messages) { + if (message->text.startsWith(s, Qt::CaseInsensitive)) { + return true; + } + } + return false; +} +#undef GT_METHOD_NAME + #define GT_CLASS_NAME "GTUtilsLog" #define GT_METHOD_NAME "check" void GTUtilsLog::check(HI::GUITestOpStatus &os, const GTLogTracer& logTracer) { diff --git a/src/plugins/GUITestBase/src/GTUtilsLog.h b/src/plugins/GUITestBase/src/GTUtilsLog.h index eaa61f2a4daa26c4fb31cf69530893d3a4239beb..b7de0f8ec40fb2a5cae0247d63efbb658512ece8 100644 --- a/src/plugins/GUITestBase/src/GTUtilsLog.h +++ b/src/plugins/GUITestBase/src/GTUtilsLog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -42,6 +42,7 @@ public: void onMessage(const LogMessage& msg); static QList<LogMessage*> getMessages(); static bool checkMessage(QString s); + static bool checkMessageStartsWith(QString s); private: bool wasError; diff --git a/src/plugins/GUITestBase/src/GTUtilsMcaEditor.cpp b/src/plugins/GUITestBase/src/GTUtilsMcaEditor.cpp index a5430207ddb82a017efb35ecde9d671e1d22473f..b17379db2e4f236e4df201161419f61508c6d8f5 100644 --- a/src/plugins/GUITestBase/src/GTUtilsMcaEditor.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsMcaEditor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsMcaEditor.h b/src/plugins/GUITestBase/src/GTUtilsMcaEditor.h index 6daad4650999245fef28b25ecab2e8626b7b6f46..8a51ff38271738da24dfbabf99d460226ee73366 100644 --- a/src/plugins/GUITestBase/src/GTUtilsMcaEditor.h +++ b/src/plugins/GUITestBase/src/GTUtilsMcaEditor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsMcaEditorReference.cpp b/src/plugins/GUITestBase/src/GTUtilsMcaEditorReference.cpp index cd1cf507f5db2adcb6f1b8509e0aef2602eaac9f..2da37a4b7f47803066d77bb312bdb4808abbcd95 100644 --- a/src/plugins/GUITestBase/src/GTUtilsMcaEditorReference.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsMcaEditorReference.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsMcaEditorReference.h b/src/plugins/GUITestBase/src/GTUtilsMcaEditorReference.h index e32ac12f2a7eaebcb28cc574fae15644b3c5aa3e..984ede6b86cec79f68bea306a698055d8de3b48c 100644 --- a/src/plugins/GUITestBase/src/GTUtilsMcaEditorReference.h +++ b/src/plugins/GUITestBase/src/GTUtilsMcaEditorReference.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsMcaEditorSequenceArea.cpp b/src/plugins/GUITestBase/src/GTUtilsMcaEditorSequenceArea.cpp index a4543de41bc986d1dcd5f71575a65cd3bc1abb19..f1a1b4f8534725c226183691aaa3f809ed4a06c4 100644 --- a/src/plugins/GUITestBase/src/GTUtilsMcaEditorSequenceArea.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsMcaEditorSequenceArea.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsMcaEditorSequenceArea.h b/src/plugins/GUITestBase/src/GTUtilsMcaEditorSequenceArea.h index 80536421812215172cdeec3c6e5d6e50d1ce5b8f..de18e44278451c8108597c1fbf0a4d772fe73b7b 100644 --- a/src/plugins/GUITestBase/src/GTUtilsMcaEditorSequenceArea.h +++ b/src/plugins/GUITestBase/src/GTUtilsMcaEditorSequenceArea.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsMcaEditorStatusWidget.cpp b/src/plugins/GUITestBase/src/GTUtilsMcaEditorStatusWidget.cpp index 3d755deed8948d091a857b35eec3acc8bf942107..e05480f33d5b78436fcd89e2c1fc1f1125ce8e64 100644 --- a/src/plugins/GUITestBase/src/GTUtilsMcaEditorStatusWidget.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsMcaEditorStatusWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsMcaEditorStatusWidget.h b/src/plugins/GUITestBase/src/GTUtilsMcaEditorStatusWidget.h index 8ecf7031b3aa91cdd0231b99b2aca32d13d8b7d7..df740f92654ecd4b10641833fe6a408d87701d59 100644 --- a/src/plugins/GUITestBase/src/GTUtilsMcaEditorStatusWidget.h +++ b/src/plugins/GUITestBase/src/GTUtilsMcaEditorStatusWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsMdi.cpp b/src/plugins/GUITestBase/src/GTUtilsMdi.cpp index 0b92031015a87f215b5a28e5a3ca9b570a8ce804..8a70415e520b4027d91e58b857402675532c06e2 100644 --- a/src/plugins/GUITestBase/src/GTUtilsMdi.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsMdi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -159,9 +159,11 @@ void GTUtilsMdi::closeAllWindows(HI::GUITestOpStatus &os) { void run(HI::GUITestOpStatus &os) { const QList<QMdiSubWindow *> mdiWindows = AppContext::getMainWindow()->getQMainWindow()->findChildren<QMdiSubWindow *>(); foreach (QMdiSubWindow *mdiWindow, mdiWindows) { - GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new MessageBoxDialogFiller(os, QMessageBox::Discard)); + MessageBoxDialogFiller *filler = new MessageBoxDialogFiller(os, QMessageBox::Discard); + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, filler); mdiWindow->close(); GTGlobals::sleep(100); + GTUtilsDialog::removeRunnable(filler); } } }; @@ -327,6 +329,42 @@ bool GTUtilsMdi::isAnyPartOfWindowVisible(HI::GUITestOpStatus &os, const QString } #undef GT_METHOD_NAME +#define GT_METHOD_NAME "getTabBar" +QTabBar* GTUtilsMdi::getTabBar(HI::GUITestOpStatus &os) { + MainWindow* mainWindow = AppContext::getMainWindow(); + GT_CHECK_RESULT(mainWindow != nullptr, "MainWindow == nullptr", NULL); + + QMdiArea *mdiArea = GTWidget::findExactWidget<QMdiArea *>(os, "MDI_Area", mainWindow->getQMainWindow()); + GT_CHECK_RESULT(mdiArea != nullptr, "mdiArea == nullptr", NULL); + + QTabBar *tabBar = mdiArea->findChild<QTabBar *>("", Qt::FindDirectChildrenOnly); + GT_CHECK_RESULT(tabBar != nullptr, "MDI tabbar not found", NULL); + + return tabBar; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getTabBar" +int GTUtilsMdi::getCurrentTab(HI::GUITestOpStatus &os) { + QTabBar* tabBar = getTabBar(os); + GT_CHECK_RESULT(tabBar != NULL, "tabBar == NULL", -1); + + return tabBar->currentIndex(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "clickTab" +void GTUtilsMdi::clickTab(HI::GUITestOpStatus &os, int tabIndex) { + QTabBar* tabBar = getTabBar(os); + GT_CHECK_RESULT(tabBar != NULL, "tabBar == NULL", ); + + coreLog.info(QString("Try to click tab %1(%2)").arg(tabIndex).arg(tabBar->tabText(tabIndex))); + QPoint tabCenter = tabBar->mapToGlobal(tabBar->tabRect(tabIndex).center()); + GTMouseDriver::moveTo(tabCenter); + GTMouseDriver::click(); +} +#undef GT_METHOD_NAME + #undef GT_CLASS_NAME } diff --git a/src/plugins/GUITestBase/src/GTUtilsMdi.h b/src/plugins/GUITestBase/src/GTUtilsMdi.h index 440cb06fa5c845116adf799f157d5c5dbf69122f..b8657239ae7f9a78dccc593161b18e97bd931bbe 100644 --- a/src/plugins/GUITestBase/src/GTUtilsMdi.h +++ b/src/plugins/GUITestBase/src/GTUtilsMdi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,6 +23,7 @@ #define _U2_GT_UTILS_MDI_H_ #include <QPoint> +#include <QTabBar> #include "GTGlobals.h" #include "primitives/GTMenuBar.h" @@ -52,6 +53,10 @@ public: static void waitWindowOpened(HI::GUITestOpStatus &os, const QString &windowNamePart, qint64 timeout = 180000); static bool isTabbedLayout(HI::GUITestOpStatus &os); + + static QTabBar* getTabBar(HI::GUITestOpStatus &os); + static int getCurrentTab(HI::GUITestOpStatus &os); + static void clickTab(HI::GUITestOpStatus &os, int tabIndex); }; } // namespace diff --git a/src/plugins/GUITestBase/src/GTUtilsMsaEditor.cpp b/src/plugins/GUITestBase/src/GTUtilsMsaEditor.cpp index 7a4e202599a6ceff106adaf3c70b62c72636a863..b6e7f12673b60a7c0bb1a7bbb034367197b35af9 100644 --- a/src/plugins/GUITestBase/src/GTUtilsMsaEditor.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsMsaEditor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsMsaEditor.h b/src/plugins/GUITestBase/src/GTUtilsMsaEditor.h index 083f52a75612f0ec81ea5a04fe654f00f8dd6cc9..db4773f8dade6ddaa53107c0e905c55e4f886d88 100644 --- a/src/plugins/GUITestBase/src/GTUtilsMsaEditor.h +++ b/src/plugins/GUITestBase/src/GTUtilsMsaEditor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsMsaEditorSequenceArea.cpp b/src/plugins/GUITestBase/src/GTUtilsMsaEditorSequenceArea.cpp index 6239fdade5415c263ceef6fca3aed94e65ef7fc1..fe373f6d68c800d935849b4e750133f1bb0dee01 100644 --- a/src/plugins/GUITestBase/src/GTUtilsMsaEditorSequenceArea.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsMsaEditorSequenceArea.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -27,6 +27,7 @@ #include <drivers/GTKeyboardDriver.h> #include <drivers/GTMouseDriver.h> #include <primitives/GTAction.h> +#include "primitives/GTToolbar.h" #include <primitives/GTWidget.h> #include <primitives/PopupChooser.h> #include <system/GTClipboard.h> @@ -86,6 +87,30 @@ void GTUtilsMSAEditorSequenceArea::moveTo(GUITestOpStatus &os, const QPoint &p) } #undef GT_METHOD_NAME +#define GT_METHOD_NAME "convertCoordinatesToRegions" +QPair<U2Region, U2Region> GTUtilsMSAEditorSequenceArea::convertCoordinatesToRegions(GUITestOpStatus& os, const QPoint p) { + QWidget* activeWindow = GTUtilsMdi::activeWindow(os); + MSAEditorSequenceArea* msaEditArea = qobject_cast<MSAEditorSequenceArea*>(GTWidget::findWidget(os, "msa_editor_sequence_area", activeWindow)); + QPair<U2Region, U2Region> res; + GT_CHECK_RESULT(msaEditArea != NULL, "MsaEditorSequenceArea not found", res); + + U2Region regX = msaEditArea->getEditor()->getUI()->getBaseWidthController()->getBaseGlobalRange(p.x()); + U2Region regY = msaEditArea->getEditor()->getUI()->getRowHeightController()->getRowGlobalRangeByNumber(p.y()); + + QPoint leftTop(regX.startPos, regY.startPos); + QPoint rightBot(regX.endPos(), regY.endPos()); + + QPoint leftTopGlobal = msaEditArea->mapToGlobal(leftTop); + QPoint rightBotGlobal = msaEditArea->mapToGlobal(rightBot); + + U2Region regXGlobal(leftTopGlobal.x(), rightBotGlobal.x() - leftTopGlobal.x()); + U2Region regYGlobal(leftTopGlobal.y(), rightBotGlobal.y() - leftTopGlobal.y()); + + res = QPair<U2Region, U2Region>(regXGlobal, regYGlobal); + return res; +} +#undef GT_METHOD_NAME + #define GT_METHOD_NAME "convertCoordinates" QPoint GTUtilsMSAEditorSequenceArea::convertCoordinates(GUITestOpStatus &os, const QPoint p){ QWidget* activeWindow = GTUtilsMdi::activeWindow(os); @@ -452,6 +477,16 @@ void GTUtilsMSAEditorSequenceArea::selectSequence(GUITestOpStatus &os, const QSt } #undef GT_METHOD_NAME +#define GT_METHOD_NAME "selectSequence" +void GTUtilsMSAEditorSequenceArea::selectSequence(GUITestOpStatus &os, const int row) { + MSAEditorSequenceArea *msaEditArea = qobject_cast<MSAEditorSequenceArea*> + (GTWidget::findWidget(os, "msa_editor_sequence_area")); + CHECK_SET_ERR(msaEditArea != NULL, "MsaEditorSequenceArea not found"); + + click(os, QPoint(-5, row)); +} +#undef GT_METHOD_NAME + #define GT_METHOD_NAME "isSequenceSelected" bool GTUtilsMSAEditorSequenceArea::isSequenceSelected(GUITestOpStatus &os, const QString &seqName) { MSAEditorSequenceArea *msaEditArea = qobject_cast<MSAEditorSequenceArea*> @@ -601,6 +636,46 @@ QString GTUtilsMSAEditorSequenceArea::getColor(GUITestOpStatus &os, QPoint p){ } #undef GT_METHOD_NAME +#define GT_METHOD_NAME "getFontColor" + QString GTUtilsMSAEditorSequenceArea::getFontColor(GUITestOpStatus& os, QPoint p) { + QString backgroundColor = getColor(os, p); + + MSAEditorSequenceArea* msaEditArea = qobject_cast<MSAEditorSequenceArea*>(GTWidget::findWidget(os, "msa_editor_sequence_area", GTUtilsMdi::activeWindow(os))); + GT_CHECK_RESULT(msaEditArea != NULL, "MsaEditorSequenceArea not found", ""); + + QPair<U2Region, U2Region> regions = convertCoordinatesToRegions(os, p); + U2Region regX = regions.first; + U2Region regY = regions.second; + //QString resultFontColor; + int xEndPos = regX.endPos(); + QMap<QString, int> usableColors; + for (int i = regX.startPos; i < xEndPos; i++) { + int yEndPos = regY.endPos(); + for (int j = regY.startPos; j < yEndPos; j++) { + QPoint global(i, j); + QPoint local = msaEditArea->mapFromGlobal(global); + QColor c = GTWidget::getColor(os, msaEditArea, local); + QString name = c.name(); + CHECK_CONTINUE(backgroundColor != name); + + QString fontColor = name; + if (usableColors.keys().contains(fontColor)) { + usableColors[fontColor] = usableColors[fontColor] + 1; + } else { + usableColors.insert(fontColor, 1); + } + } + } + CHECK(!usableColors.isEmpty(), QString()); + + QList<int> values = usableColors.values(); + int max = *std::max_element(values.begin(), values.end()); + QString resultFontColor = usableColors.key(max); + + return resultFontColor; +} +#undef GT_METHOD_NAME + #define GT_METHOD_NAME "checkColor" bool GTUtilsMSAEditorSequenceArea::checkColor(GUITestOpStatus &os, const QPoint &p, const QString &expectedColor){ QColor c = getColor(os, p); @@ -778,6 +853,37 @@ void GTUtilsMSAEditorSequenceArea::expandSelectedRegion(GUITestOpStatus &os, con } #undef GT_METHOD_NAME +void GTUtilsMSAEditorSequenceArea::zoomIn(GUITestOpStatus& os) { + QWidget* zoomInButton = GTWidget::findButtonByText(os, "Zoom in"); + CHECK_SET_ERR(nullptr != zoomInButton, "Can't find the 'Zoom in' button"); + + GTWidget::click(os, zoomInButton); +} + +void GTUtilsMSAEditorSequenceArea::zoomOut(GUITestOpStatus& os) { + QWidget* zoomOutButton = GTWidget::findButtonByText(os, "Zoom out"); + CHECK_SET_ERR(nullptr != zoomOutButton, "Can't find the 'Zoom out' button"); + + GTWidget::click(os, zoomOutButton); +} + +void GTUtilsMSAEditorSequenceArea::zoomToMax(GUITestOpStatus& os) { + QWidget* zoomInButton = GTWidget::findButtonByText(os, "Zoom in"); + CHECK_SET_ERR(nullptr != zoomInButton, "Can't find the 'Zoom in' button"); + + while (zoomInButton->isEnabled()) { + GTWidget::click(os, zoomInButton); + } +} + +void GTUtilsMSAEditorSequenceArea::zoomToMin(GUITestOpStatus& os) { + QWidget* zoomOutButton = GTWidget::findButtonByText(os, "Zoom out"); + CHECK_SET_ERR(nullptr != zoomOutButton, "Can't find the 'Zoom out' button"); + + while (zoomOutButton->isEnabled()) { + GTWidget::click(os, zoomOutButton); + } +} #undef GT_CLASS_NAME diff --git a/src/plugins/GUITestBase/src/GTUtilsMsaEditorSequenceArea.h b/src/plugins/GUITestBase/src/GTUtilsMsaEditorSequenceArea.h index f89fac759184ecaad4dbec784f07964a66de7d5d..2e05c8c3f7db1e5fc7a338b45e3a9249d72abafc 100644 --- a/src/plugins/GUITestBase/src/GTUtilsMsaEditorSequenceArea.h +++ b/src/plugins/GUITestBase/src/GTUtilsMsaEditorSequenceArea.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -65,6 +65,7 @@ public: // zero-based position static void selectArea(GUITestOpStatus &os, QPoint p1 = QPoint(0, 0), QPoint p2 = QPoint(-1, -1), GTGlobals::UseMethod method = GTGlobals::UseKey); static void cancelSelection(GUITestOpStatus &os); + static QPair<U2Region, U2Region> convertCoordinatesToRegions(GUITestOpStatus& os, const QPoint p); static QPoint convertCoordinates(GUITestOpStatus &os, const QPoint p); static void click(GUITestOpStatus &os, const QPoint &screenMaPoint = QPoint(0, 0)); @@ -74,6 +75,7 @@ public: static void clickToPosition(GUITestOpStatus &os, const QPoint& globalMaPosition); static void selectSequence(GUITestOpStatus &os, const QString &seqName); + static void selectSequence(GUITestOpStatus &os, const int row); static bool isSequenceSelected(GUITestOpStatus &os, const QString &seqName); static void removeSequence(GUITestOpStatus &os, const QString &sequenceName); static int getSelectedSequencesNum(GUITestOpStatus &os); @@ -86,6 +88,8 @@ public: static bool hasAminoAlphabet(GUITestOpStatus &os); static bool isSequenceHightighted(GUITestOpStatus &os, const QString& seqName); static QString getColor(GUITestOpStatus &os, QPoint p); + //To increase the accuracy of this function I advice you to maximize the font size before calling + static QString getFontColor(GUITestOpStatus& os, QPoint p); static bool checkColor(GUITestOpStatus &os, const QPoint& p, const QString& expectedColor); static int getRowHeight(GUITestOpStatus &os, int rowNumber); @@ -104,6 +108,11 @@ public: */ static void expandSelectedRegion(GUITestOpStatus &os, const int expandedBorder, const int symbolsToExpand); + static void zoomIn(GUITestOpStatus& os); + static void zoomOut(GUITestOpStatus& os); + static void zoomToMax(GUITestOpStatus& os); + static void zoomToMin(GUITestOpStatus& os); + static const QString highlightningColorName; }; diff --git a/src/plugins/GUITestBase/src/GTUtilsNotifications.cpp b/src/plugins/GUITestBase/src/GTUtilsNotifications.cpp index a4880c49325e98d0c202ccbe8536ee5c25929473..1f3df944c44e1ee7fa782a4979adbdf2ad64e62d 100644 --- a/src/plugins/GUITestBase/src/GTUtilsNotifications.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsNotifications.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsNotifications.h b/src/plugins/GUITestBase/src/GTUtilsNotifications.h index 42ec17eba1bd268576e13e46539eb075a6309257..53b1d3c013bc2b64ec8197b67512a3b37c00c754 100644 --- a/src/plugins/GUITestBase/src/GTUtilsNotifications.h +++ b/src/plugins/GUITestBase/src/GTUtilsNotifications.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsOptionPanelMSA.cpp b/src/plugins/GUITestBase/src/GTUtilsOptionPanelMSA.cpp index dd9998afd41e258ddda2e6d8b5b5006f3e670dd7..2bd83214789b133fd4db63b587a5c3d57d439ecb 100644 --- a/src/plugins/GUITestBase/src/GTUtilsOptionPanelMSA.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsOptionPanelMSA.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -122,9 +122,7 @@ void GTUtilsOptionPanelMsa::addReference(HI::GUITestOpStatus &os, QString seqNam GTWidget::click(os, sequenceLineEdit); GTKeyboardDriver::keyClick(seqName.at(0).toLatin1()); GTGlobals::sleep(200); - QTreeWidget* completer = sequenceLineEdit->findChild<QTreeWidget*>(); - GT_CHECK(completer != NULL, "auto completer widget not found"); - GTBaseCompleter::click(os, completer, seqName); + GTBaseCompleter::click(os, sequenceLineEdit, seqName); break; } GTThread::waitForMainThread(); @@ -169,9 +167,9 @@ int GTUtilsOptionPanelMsa::getHeight(HI::GUITestOpStatus &os){ #undef GT_METHOD_NAME #define GT_METHOD_NAME "setColorScheme" -void GTUtilsOptionPanelMsa::setColorScheme(HI::GUITestOpStatus &os, const QString &colorSchemeName) { +void GTUtilsOptionPanelMsa::setColorScheme(HI::GUITestOpStatus &os, const QString &colorSchemeName, GTGlobals::UseMethod method) { openTab(os, Highlighting); - GTComboBox::setIndexWithText(os, GTWidget::findExactWidget<QComboBox *>(os, "colorScheme"), colorSchemeName); + GTComboBox::setIndexWithText(os, GTWidget::findExactWidget<QComboBox *>(os, "colorScheme"), colorSchemeName, true, method); } #undef GT_METHOD_NAME @@ -228,9 +226,7 @@ void GTUtilsOptionPanelMsa::addSeqToPA(HI::GUITestOpStatus &os, QString seqName, GTWidget::click(os, sequenceLineEdit); GTKeyboardDriver::keyClick( seqName.at(0).toLatin1()); GTGlobals::sleep(200); - QTreeWidget* completer = sequenceLineEdit->findChild<QTreeWidget*>(); - GT_CHECK(completer != NULL, "auto completer widget not found"); - GTBaseCompleter::click(os, completer, seqName); + GTBaseCompleter::click(os, sequenceLineEdit, seqName); break; } } diff --git a/src/plugins/GUITestBase/src/GTUtilsOptionPanelMSA.h b/src/plugins/GUITestBase/src/GTUtilsOptionPanelMSA.h index a161e7842d5f3353aeec52ad91e54da9edf19c3b..df989beed3a78a82434552db6461b7bad9473d3c 100644 --- a/src/plugins/GUITestBase/src/GTUtilsOptionPanelMSA.h +++ b/src/plugins/GUITestBase/src/GTUtilsOptionPanelMSA.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -68,7 +68,7 @@ public: static int getLength(HI::GUITestOpStatus &os); static int getHeight(HI::GUITestOpStatus &os); - static void setColorScheme(HI::GUITestOpStatus &os, const QString &colorSchemeName); + static void setColorScheme(HI::GUITestOpStatus &os, const QString &colorSchemeName, GTGlobals::UseMethod method = GTGlobals::UseKeyBoard); static QString getColorScheme(HI::GUITestOpStatus &os); static void setHighlightingScheme(HI::GUITestOpStatus &os, const QString &highlightingSchemeName); diff --git a/src/plugins/GUITestBase/src/GTUtilsOptionPanelMca.cpp b/src/plugins/GUITestBase/src/GTUtilsOptionPanelMca.cpp index 425a4e71b74aa884809cf017900d8d63c8142b9a..0f7902bebf5a77adece89fe29061696e2ad07170 100644 --- a/src/plugins/GUITestBase/src/GTUtilsOptionPanelMca.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsOptionPanelMca.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,8 +25,9 @@ #include <QToolButton> #include <primitives/GTComboBox.h> -#include <primitives/GTWidget.h> +#include <primitives/GTLineEdit.h> #include <primitives/GTSlider.h> +#include <primitives/GTWidget.h> #include "GTUtilsOptionPanelMca.h" @@ -144,6 +145,24 @@ int GTUtilsOptionPanelMca::getThreshold(GUITestOpStatus &os) { } #undef GT_METHOD_NAME +#define GT_METHOD_NAME "setExportFileName" +void GTUtilsOptionPanelMca::setExportFileName(HI::GUITestOpStatus &os, QString exportFileName) { + openTab(os, Consensus); + QLineEdit *exportToFileLineEdit = GTWidget::findExactWidget<QLineEdit*>(os, "pathLe"); + GT_CHECK_RESULT(exportToFileLineEdit != NULL, "exportToFileLineEdit is NULL", ); + GTLineEdit::setText(os, exportToFileLineEdit, exportFileName); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getExportFileName" +QString GTUtilsOptionPanelMca::getExportFileName(HI::GUITestOpStatus &os) { + openTab(os, Consensus); + QLineEdit *exportToFileLineEdit = GTWidget::findExactWidget<QLineEdit*>(os, "pathLe"); + GT_CHECK_RESULT(exportToFileLineEdit != NULL, "exportToFileLineEdit is NULL", QString()); + return GTLineEdit::getText(os, exportToFileLineEdit); +} +#undef GT_METHOD_NAME + #define GT_METHOD_NAME "setFileFormat" void GTUtilsOptionPanelMca::setFileFormat(HI::GUITestOpStatus &os, FileFormat fileFormat) { openTab(os, Consensus); diff --git a/src/plugins/GUITestBase/src/GTUtilsOptionPanelMca.h b/src/plugins/GUITestBase/src/GTUtilsOptionPanelMca.h index 8e8b514febdf82ff694557ee558d14d603855a33..8e8968339bd5d78822939518eb70d4f38e0dbec7 100644 --- a/src/plugins/GUITestBase/src/GTUtilsOptionPanelMca.h +++ b/src/plugins/GUITestBase/src/GTUtilsOptionPanelMca.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -56,6 +56,9 @@ public: static void setThreshold(HI::GUITestOpStatus &os, int threshold); static int getThreshold(HI::GUITestOpStatus &os); + static void setExportFileName(HI::GUITestOpStatus &os, QString exportFileName); + static QString getExportFileName(HI::GUITestOpStatus &os); + static void setFileFormat(HI::GUITestOpStatus &os, FileFormat fileFormat); static void pushResetButton(HI::GUITestOpStatus &os); diff --git a/src/plugins/GUITestBase/src/GTUtilsOptionPanelSequenceView.cpp b/src/plugins/GUITestBase/src/GTUtilsOptionPanelSequenceView.cpp index 8aa016d63644fdff11d1245123ed699cf67ece75..d28056c813b23b2a6974864a8d92748b59bed957 100644 --- a/src/plugins/GUITestBase/src/GTUtilsOptionPanelSequenceView.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsOptionPanelSequenceView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsOptionPanelSequenceView.h b/src/plugins/GUITestBase/src/GTUtilsOptionPanelSequenceView.h index 18fd58c7c27f8e29bb69268a664d80032a43df6d..496559302d7aad268880c2d32ea6a3bf4dac58c5 100644 --- a/src/plugins/GUITestBase/src/GTUtilsOptionPanelSequenceView.h +++ b/src/plugins/GUITestBase/src/GTUtilsOptionPanelSequenceView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsOptionsPanel.cpp b/src/plugins/GUITestBase/src/GTUtilsOptionsPanel.cpp index 75c3bd9e4971a031cb3d4065a19f84948e1f79c8..408a28e0ccda031b7bf17efa79932abfc1e94411 100644 --- a/src/plugins/GUITestBase/src/GTUtilsOptionsPanel.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsOptionsPanel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,29 +19,33 @@ * MA 02110-1301, USA. */ -#include <U2Core/global.h> -#include "GTUtilsOptionsPanel.h" -#include <drivers/GTMouseDriver.h> +#include <QApplication> +#include <QMainWindow> +#include <QSplitter> +#include <QTreeWidget> + #include <drivers/GTKeyboardDriver.h> -#include "utils/GTKeyboardUtils.h" -#include <primitives/GTWidget.h> +#include <drivers/GTMouseDriver.h> #include <primitives/GTTreeWidget.h> -#include "GTUtilsTaskTreeView.h" -#include "utils/GTUtilsApp.h" -#include "utils/GTThread.h" +#include <primitives/GTWidget.h> +#include <utils/GTKeyboardUtils.h> +#include <utils/GTThread.h> +#include <utils/GTUtilsApp.h> + +#include <U2Core/global.h> #include <U2Core/ProjectModel.h> #include <U2Core/U2OpStatus.h> + #include <U2Gui/MainWindow.h> -#include <QApplication> -#include <QMainWindow> -#include <QTreeWidget> + +#include "GTUtilsOptionsPanel.h" +#include "GTUtilsTaskTreeView.h" namespace U2 { using namespace HI; #define GT_CLASS_NAME "GTUtilsOptionsPanel" - #define GT_METHOD_NAME "runFindPatternWithHotKey" void GTUtilsOptionsPanel::runFindPatternWithHotKey( const QString& pattern, HI::GUITestOpStatus& os){ GTKeyboardDriver::keyClick( 'f', Qt::ControlModifier); @@ -57,6 +61,19 @@ void GTUtilsOptionsPanel::runFindPatternWithHotKey( const QString& pattern, HI:: } #undef GT_METHOD_NAME +#define GT_METHOD_NAME "resizeToMaximum" +void GTUtilsOptionsPanel::resizeToMaximum(GUITestOpStatus &os) { + QSplitter *optionsPanelSplitter = GTWidget::findExactWidget<QSplitter *>(os, "OPTIONS_PANEL_SPLITTER"); + GT_CHECK(nullptr != optionsPanelSplitter, "Options panel splitter is nullptr"); + QSplitterHandle *handle = optionsPanelSplitter->handle(1); + GT_CHECK(nullptr != handle, "Options panel splitter handle is nullptr"); + + const QPoint handleCenter = optionsPanelSplitter->mapToGlobal(handle->geometry().center()); + const int delta = 500; + GTMouseDriver::dragAndDrop(handleCenter, handleCenter - QPoint(delta, 0)); +} +#undef GT_METHOD_NAME + #undef GT_CLASS_NAME } diff --git a/src/plugins/GUITestBase/src/GTUtilsOptionsPanel.h b/src/plugins/GUITestBase/src/GTUtilsOptionsPanel.h index d6d69037dbae191fd1e82040bad4b78174b05064..3181ac9aa5d7856ee3c9214788a37921ae6bb122 100644 --- a/src/plugins/GUITestBase/src/GTUtilsOptionsPanel.h +++ b/src/plugins/GUITestBase/src/GTUtilsOptionsPanel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,6 +30,8 @@ class GTUtilsOptionsPanel { public: static void runFindPatternWithHotKey(const QString& pattern, HI::GUITestOpStatus& os); + + static void resizeToMaximum(HI::GUITestOpStatus& os); }; } // namespace diff --git a/src/plugins/GUITestBase/src/GTUtilsPcr.cpp b/src/plugins/GUITestBase/src/GTUtilsPcr.cpp index 7796a7878dc9b68439a0080f2a82c32fa51eda2d..9a4242749718513e07bd11c6ee791f83266d4d12 100644 --- a/src/plugins/GUITestBase/src/GTUtilsPcr.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsPcr.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsPcr.h b/src/plugins/GUITestBase/src/GTUtilsPcr.h index 7c1a0ee52776612d6c7943fcf36e6a36cba4d14b..7907f3cb415de7c9ccfd5fc02b432c050524a0b4 100644 --- a/src/plugins/GUITestBase/src/GTUtilsPcr.h +++ b/src/plugins/GUITestBase/src/GTUtilsPcr.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsPhyTree.cpp b/src/plugins/GUITestBase/src/GTUtilsPhyTree.cpp index 2edd91b09e157b5e8321b82d5a79f982bc0ce23f..a23093cd88c4cc9f5f71e1ade2acc5c01d00b09b 100644 --- a/src/plugins/GUITestBase/src/GTUtilsPhyTree.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsPhyTree.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsPhyTree.h b/src/plugins/GUITestBase/src/GTUtilsPhyTree.h index cc43a004feb347aeb6297cb37d12552385c51827..ec3923c2854a42932c90d69f15cf8a9a31ede7c0 100644 --- a/src/plugins/GUITestBase/src/GTUtilsPhyTree.h +++ b/src/plugins/GUITestBase/src/GTUtilsPhyTree.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsPrimerLibrary.cpp b/src/plugins/GUITestBase/src/GTUtilsPrimerLibrary.cpp index 3d1a4d182d069b68a75fd9c14ec74022dd57f8e3..4866f98e803395f0c389f055518346336855c2a1 100644 --- a/src/plugins/GUITestBase/src/GTUtilsPrimerLibrary.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsPrimerLibrary.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsPrimerLibrary.h b/src/plugins/GUITestBase/src/GTUtilsPrimerLibrary.h index 1ecfc9f6020ac97ac8915334ad918c8717c1a1fc..69609cc7c833cec1ac4a5b6854279638619af5d1 100644 --- a/src/plugins/GUITestBase/src/GTUtilsPrimerLibrary.h +++ b/src/plugins/GUITestBase/src/GTUtilsPrimerLibrary.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsProject.cpp b/src/plugins/GUITestBase/src/GTUtilsProject.cpp index 6522add6da2faac305a3d193dd871e957d5ec570..b8736520f08ee8c850656be1ef0f1e3ca5d331a9 100644 --- a/src/plugins/GUITestBase/src/GTUtilsProject.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsProject.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsProject.h b/src/plugins/GUITestBase/src/GTUtilsProject.h index 26909f724a9e60e019209f803d6be80216868313..86287001790179e7f2cb97837f6d43f643d9593b 100644 --- a/src/plugins/GUITestBase/src/GTUtilsProject.h +++ b/src/plugins/GUITestBase/src/GTUtilsProject.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsProjectTreeView.cpp b/src/plugins/GUITestBase/src/GTUtilsProjectTreeView.cpp index 6c2765c56282a99f82b8ea050e03c95b9478f5f9..1e6fc702f59533aabab154c6ab9baf0294c61781 100644 --- a/src/plugins/GUITestBase/src/GTUtilsProjectTreeView.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsProjectTreeView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -306,6 +306,8 @@ namespace { bool compareStrings(const QString &pattern, const QString &data, Qt::MatchFlags matchPolicy) { if (matchPolicy.testFlag(Qt::MatchContains)) { return data.contains(pattern); + } else if (matchPolicy.testFlag(Qt::MatchStartsWith)) { + return data.startsWith(pattern) || pattern.startsWith(data); } return (data == pattern); } @@ -412,9 +414,12 @@ QModelIndexList GTUtilsProjectTreeView::findFilteredIndexes(HI::GUITestOpStatus #undef GT_METHOD_NAME #define GT_METHOD_NAME "checkFilteredGroup" -void GTUtilsProjectTreeView::checkFilteredGroup(HI::GUITestOpStatus &os, const QString &groupName, const QStringList &namesToCheck, - const QStringList &alternativeNamesToCheck, const QStringList &excludedNames) -{ +void GTUtilsProjectTreeView::checkFilteredGroup(HI::GUITestOpStatus &os, + const QString &groupName, + const QStringList &namesToCheck, + const QStringList &alternativeNamesToCheck, + const QStringList &excludedNames, + const QStringList& skipGroupIfContains) { const QModelIndexList groupIndexes = findFilteredIndexes(os, groupName); CHECK_SET_ERR(groupIndexes.size() == 1, QString("Expected to find a single filter group. Found %1").arg(groupIndexes.size())); @@ -423,9 +428,18 @@ void GTUtilsProjectTreeView::checkFilteredGroup(HI::GUITestOpStatus &os, const Q CHECK_SET_ERR(filteredItemsCount > 0, "No project items have been filtered"); for (int i = 0; i < filteredItemsCount; ++i) { const QString childName = group.child(i, 0).data().toString(); + bool notSkipGroup = true; + foreach(const QString& checkToSkip, skipGroupIfContains) { + if (childName.contains(checkToSkip, Qt::CaseInsensitive)){ + notSkipGroup = false; + break; + } + } + CHECK_CONTINUE(notSkipGroup); foreach (const QString &nameToCheck, namesToCheck) { - CHECK_SET_ERR(childName.contains(nameToCheck, Qt::CaseInsensitive), QString("Filtered item doesn't contain '%1'").arg(nameToCheck)); + bool contains = childName.contains(nameToCheck, Qt::CaseInsensitive); + CHECK_SET_ERR(contains, QString("Filtered item doesn't contain '%1'").arg(nameToCheck)); } bool oneAlternativeFound = alternativeNamesToCheck.isEmpty(); @@ -438,7 +452,8 @@ void GTUtilsProjectTreeView::checkFilteredGroup(HI::GUITestOpStatus &os, const Q CHECK_SET_ERR(oneAlternativeFound, QString("Filtered item doesn't contain either of strings: '%1'").arg(alternativeNamesToCheck.join("', '"))); foreach(const QString &nameToCheck, excludedNames) { - CHECK_SET_ERR(!childName.contains(nameToCheck, Qt::CaseInsensitive), QString("Filtered item contains unexpectedly '%1'").arg(nameToCheck)); + bool doesNotContain = !childName.contains(nameToCheck, Qt::CaseInsensitive); + CHECK_SET_ERR(doesNotContain, QString("Filtered item contains unexpectedly '%1'").arg(nameToCheck)); } } } diff --git a/src/plugins/GUITestBase/src/GTUtilsProjectTreeView.h b/src/plugins/GUITestBase/src/GTUtilsProjectTreeView.h index 120928242065d0f625ff13d4bfdb938f32500c8f..81241e5fbd996d8e898b860ab3db03326d4e9ed9 100644 --- a/src/plugins/GUITestBase/src/GTUtilsProjectTreeView.h +++ b/src/plugins/GUITestBase/src/GTUtilsProjectTreeView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -83,7 +83,7 @@ public: static void filterProjectSequental(HI::GUITestOpStatus &os, const QStringList &searchField, bool waitUntilSearchEnd); static QModelIndexList findFilteredIndexes(HI::GUITestOpStatus &os, const QString &substring, const QModelIndex &parentIndex = QModelIndex()); static void checkFilteredGroup(HI::GUITestOpStatus &os, const QString &groupName, const QStringList &namesToCheck, const QStringList &alternativeNamesToCheck, - const QStringList &excludedNames); + const QStringList &excludedNames, const QStringList& skipGroupIfContains = QStringList()); static void ensureFilteringIsDisabled(HI::GUITestOpStatus &os); // returns true if the item exists, does not set error unlike findIndex method diff --git a/src/plugins/GUITestBase/src/GTUtilsQueryDesigner.cpp b/src/plugins/GUITestBase/src/GTUtilsQueryDesigner.cpp index a0463fc37ea6e0ea7802ed776806a060d9a2d279..345f32f5036a66491c7c2998aa1819ed75d7a9dd 100644 --- a/src/plugins/GUITestBase/src/GTUtilsQueryDesigner.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsQueryDesigner.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsQueryDesigner.h b/src/plugins/GUITestBase/src/GTUtilsQueryDesigner.h index 0d507bd3217b96213cfe2da082e07af3c46c97b2..b69e27a378c599805962fc1150198963b71a2507 100644 --- a/src/plugins/GUITestBase/src/GTUtilsQueryDesigner.h +++ b/src/plugins/GUITestBase/src/GTUtilsQueryDesigner.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsSequenceView.cpp b/src/plugins/GUITestBase/src/GTUtilsSequenceView.cpp index a17e9404454d25fa5e6768eaec6352f66e8ab26b..79b3e11a447117fe21f6b767d80dd80c3c3743b9 100644 --- a/src/plugins/GUITestBase/src/GTUtilsSequenceView.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsSequenceView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -141,8 +141,8 @@ QString GTUtilsSequenceView::getBeginOfSequenceAsString(HI::GUITestOpStatus &os, QWidget *mdiWindow = GTUtilsMdi::activeWindow(os); GT_CHECK_RESULT(mdiWindow != NULL, "MDI window == NULL", NULL); - GTMouseDriver::moveTo(mdiWindow->mapToGlobal(mdiWindow->rect().center())); - GTMouseDriver::click(); + // GTMouseDriver::moveTo(mdiWindow->mapToGlobal(mdiWindow->rect().center())); commented for test 6232_4 + // GTMouseDriver::click(); Runnable *filler = new SelectSequenceRegionDialogFiller(os, length); GTUtilsDialog::waitForDialog(os, filler); diff --git a/src/plugins/GUITestBase/src/GTUtilsSequenceView.h b/src/plugins/GUITestBase/src/GTUtilsSequenceView.h index 15597fba641a7f16f3545a11e948a0d6027005e0..ff98341037a1478faeb9609140b49590087b7d59 100644 --- a/src/plugins/GUITestBase/src/GTUtilsSequenceView.h +++ b/src/plugins/GUITestBase/src/GTUtilsSequenceView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsSharedDatabaseDocument.cpp b/src/plugins/GUITestBase/src/GTUtilsSharedDatabaseDocument.cpp index 911340541b0770af313613b7b19523f4a32fd112..ead3f6236c9c81d8ca696b74268f600ecf155947 100644 --- a/src/plugins/GUITestBase/src/GTUtilsSharedDatabaseDocument.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsSharedDatabaseDocument.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsSharedDatabaseDocument.h b/src/plugins/GUITestBase/src/GTUtilsSharedDatabaseDocument.h index 8e9729fc626aab38c2af7df98ab831e7633799f3..25e0c63c6159340e19065ed5ea79ae3d5ba01291 100644 --- a/src/plugins/GUITestBase/src/GTUtilsSharedDatabaseDocument.h +++ b/src/plugins/GUITestBase/src/GTUtilsSharedDatabaseDocument.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsStartPage.cpp b/src/plugins/GUITestBase/src/GTUtilsStartPage.cpp index c184577e9494c647fe7cb5ba677fa7009dcf8652..0ed24601faf06786642948ccc5f967420f5245f3 100644 --- a/src/plugins/GUITestBase/src/GTUtilsStartPage.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsStartPage.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsStartPage.h b/src/plugins/GUITestBase/src/GTUtilsStartPage.h index b6dde44dd54934ecc6d6d876d32da502fc4e6b4e..8c15c3019c455df23675e195e474888abdd06de8 100644 --- a/src/plugins/GUITestBase/src/GTUtilsStartPage.h +++ b/src/plugins/GUITestBase/src/GTUtilsStartPage.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsTask.cpp b/src/plugins/GUITestBase/src/GTUtilsTask.cpp index 003ba10c5769de2b14b911799f8e90a4a51a29f7..e38a59e56cea61c8fad5afc08449a56a71f2b62b 100644 --- a/src/plugins/GUITestBase/src/GTUtilsTask.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -57,11 +57,11 @@ Task* GTUtilsTask::getSubTaskByName(HI::GUITestOpStatus &os, QString taskName, G #define GT_METHOD_NAME "getSubTaskByName" Task* GTUtilsTask::getSubTaskByName(HI::GUITestOpStatus &os, Task *parent, QString taskName, GTGlobals::FindOptions options){ Task* result; - foreach (Task* t, parent->getSubtasks()) { + foreach (const QPointer<Task> &t, parent->getSubtasks()) { if(t->getTaskName() == taskName){ - return t; + return t.data(); }else{ - result = getSubTaskByName(os, t, taskName, false); + result = getSubTaskByName(os, t.data(), taskName, false); } } diff --git a/src/plugins/GUITestBase/src/GTUtilsTask.h b/src/plugins/GUITestBase/src/GTUtilsTask.h index 830761644006fb82569843e8a746e743cfb3ff36..a50594c061c86dcbfb3a3b4f99c3d551bc9e8f0f 100644 --- a/src/plugins/GUITestBase/src/GTUtilsTask.h +++ b/src/plugins/GUITestBase/src/GTUtilsTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsTaskTreeView.cpp b/src/plugins/GUITestBase/src/GTUtilsTaskTreeView.cpp index f8ab3d5a39d5cb884834feb6d931c7029cf7a190..dbd163258bcfe0b04e1923ba6512756fbbcf4da5 100644 --- a/src/plugins/GUITestBase/src/GTUtilsTaskTreeView.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsTaskTreeView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -69,7 +69,7 @@ QString GTUtilsTaskTreeView::getTasksInfo(QList<Task *> tasks, int level){ result.append(" "); } result.append(QString("%1: %2\n").arg(t->getTaskName()).arg(stateMap.value(t->getState()))); - result.append(getTasksInfo(t->getSubtasks(),level+1)); + result.append(getTasksInfo(t->getPureSubtasks(),level+1)); } return result; } diff --git a/src/plugins/GUITestBase/src/GTUtilsTaskTreeView.h b/src/plugins/GUITestBase/src/GTUtilsTaskTreeView.h index 47f17e93d5691e855d27d56a757457e9c941c99a..0f5b0c156dd526acb28016c76d876eb1f4aacf54 100644 --- a/src/plugins/GUITestBase/src/GTUtilsTaskTreeView.h +++ b/src/plugins/GUITestBase/src/GTUtilsTaskTreeView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/GTUtilsWizard.cpp b/src/plugins/GUITestBase/src/GTUtilsWizard.cpp index 8d3958943f253239117fabbfd79e772269907964..7803f49ee7a54ac4bfde2fec438816b21e539008 100644 --- a/src/plugins/GUITestBase/src/GTUtilsWizard.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsWizard.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -49,6 +49,7 @@ QMap<QString, GTUtilsWizard::WizardButton> GTUtilsWizard::initButtonMap(){ result.insert("Cancel", Cancel); result.insert("Defaults", Defaults); result.insert("Setup", Setup); + result.insert("Finish", Finish); return result; } const QMap<QString, GTUtilsWizard::WizardButton> GTUtilsWizard::buttonMap = GTUtilsWizard::initButtonMap(); diff --git a/src/plugins/GUITestBase/src/GTUtilsWizard.h b/src/plugins/GUITestBase/src/GTUtilsWizard.h index 45aba054cc0ccf5d3c67765b9a4ba60a002b09fd..f2df0aec8ba68f2d0b8104e50ae73b3573a79819 100644 --- a/src/plugins/GUITestBase/src/GTUtilsWizard.h +++ b/src/plugins/GUITestBase/src/GTUtilsWizard.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -35,7 +35,8 @@ public: Run, Cancel, Defaults, - Setup + Setup, + Finish }; static void setInputFiles(HI::GUITestOpStatus &os, const QList<QStringList> &list); diff --git a/src/plugins/GUITestBase/src/GTUtilsWorkflowDesigner.cpp b/src/plugins/GUITestBase/src/GTUtilsWorkflowDesigner.cpp index 134c07137702d36a04f1caab1f708a106d692b2e..2bf63ecf32f87028ed8203be51ff8f5c9b174327 100644 --- a/src/plugins/GUITestBase/src/GTUtilsWorkflowDesigner.cpp +++ b/src/plugins/GUITestBase/src/GTUtilsWorkflowDesigner.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,12 +23,15 @@ #include <QDialogButtonBox> #include <QFileInfo> #include <QGraphicsView> +#include <QGroupBox> #include <QListWidget> #include <QMainWindow> #include <QMessageBox> #include <QSpinBox> +#include <QStandardItemModel> #include <QTableView> #include <QTableWidget> +#include <QTextEdit> #include <QToolButton> #include <QTreeWidget> @@ -40,15 +43,17 @@ #include <primitives/GTCheckBox.h> #include <primitives/GTComboBox.h> #include <primitives/GTDoubleSpinBox.h> +#include <primitives/GTGroupBox.h> #include <primitives/GTLineEdit.h> #include <primitives/GTMenu.h> #include <primitives/GTSpinBox.h> -#include <primitives/GTTabWidget.h> #include <primitives/GTTableView.h> +#include <primitives/GTTabWidget.h> #include <primitives/GTToolbar.h> #include <primitives/GTTreeWidget.h> #include <primitives/GTWidget.h> #include <primitives/PopupChooser.h> +#include <primitives/GTScrollBar.h> #include <utils/GTThread.h> #include <U2Core/AppContext.h> @@ -72,10 +77,12 @@ const int GTUtilsWorkflowDesigner::verticalShift = 35; #define GT_CLASS_NAME "GTUtilsWorkflowDesigner" #define GT_METHOD_NAME "openWorkflowDesigner" -void GTUtilsWorkflowDesigner::openWorkflowDesigner(HI::GUITestOpStatus &os){ - GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); +void GTUtilsWorkflowDesigner::openWorkflowDesigner(HI::GUITestOpStatus &os) { + StartupDialogFiller *filler = new StartupDialogFiller(os); + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, filler); GTMenu::clickMainMenuItem(os, QStringList() << "Tools" << "Workflow Designer..."); GTUtilsMdi::waitWindowOpened(os, "Workflow Designer"); + GTUtilsDialog::removeRunnable(filler); } #undef GT_METHOD_NAME @@ -128,7 +135,13 @@ void GTUtilsWorkflowDesigner::validateWorkflow(GUITestOpStatus &os) { #define GT_METHOD_NAME "runWorkflow" void GTUtilsWorkflowDesigner::runWorkflow(HI::GUITestOpStatus &os) { - GTWidget::click(os, GTAction::button(os, "Run workflow")); + GTWidget::click(os, GTAction::button(os, "Run workflow", GTUtilsMdi::activeWindow(os))); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "stopWorkflow" +void GTUtilsWorkflowDesigner::stopWorkflow(HI::GUITestOpStatus &os) { + GTWidget::click(os, GTAction::button(os, "Stop workflow", GTUtilsMdi::activeWindow(os))); } #undef GT_METHOD_NAME @@ -154,10 +167,10 @@ QTreeWidgetItem* GTUtilsWorkflowDesigner::findTreeItem(HI::GUITestOpStatus &os,Q QTreeWidgetItem* foundItem=NULL; QTreeWidget *w; if(t==algoriths){ - w=qobject_cast<QTreeWidget*>(GTWidget::findWidget(os,"WorkflowPaletteElements")); + w=qobject_cast<QTreeWidget*>(GTWidget::findWidget(os,"WorkflowPaletteElements",GTUtilsMdi::activeWindow(os))); } else{ - w=qobject_cast<QTreeWidget*>(GTWidget::findWidget(os,"samples")); + w=qobject_cast<QTreeWidget*>(GTWidget::findWidget(os,"samples",GTUtilsMdi::activeWindow(os))); } GT_CHECK_RESULT(w!=NULL,"WorkflowPaletteElements is null", NULL); @@ -253,6 +266,15 @@ WorkflowProcessItem * GTUtilsWorkflowDesigner::addElement(HI::GUITestOpStatus &o } #undef GT_METHOD_NAME +#define GT_METHOD_NAME "addElementByUsingNameFilter" +WorkflowProcessItem* GTUtilsWorkflowDesigner::addElementByUsingNameFilter(HI::GUITestOpStatus &os, const QString &elementName, bool exactMatch) { + GTUtilsWorkflowDesigner::findByNameFilter(os, elementName); + WorkflowProcessItem* item = GTUtilsWorkflowDesigner::addElement(os, elementName, exactMatch); + GTUtilsWorkflowDesigner::cleanNameFilter(os); + return item; +} +#undef GT_METHOD_NAME + #define GT_METHOD_NAME "selectAlgorithm" void GTUtilsWorkflowDesigner::selectAlgorithm(HI::GUITestOpStatus &os, QTreeWidgetItem* algorithm){ GT_CHECK(algorithm!=NULL, "algorithm is NULL"); @@ -265,9 +287,9 @@ void GTUtilsWorkflowDesigner::selectAlgorithm(HI::GUITestOpStatus &os, QTreeWidg #undef GT_METHOD_NAME #define GT_METHOD_NAME "addSample" -void GTUtilsWorkflowDesigner::addSample(HI::GUITestOpStatus &os, const QString &sampName) { - expandTabs(os); - QTabWidget *tabs = qobject_cast<QTabWidget *>(GTWidget::findWidget(os, "tabs")); +void GTUtilsWorkflowDesigner::addSample(HI::GUITestOpStatus &os, const QString &sampName, QWidget const * const parentWidget) { + expandTabs(os, parentWidget); + QTabWidget *tabs = qobject_cast<QTabWidget *>(GTWidget::findWidget(os, "tabs", parentWidget)); GT_CHECK(tabs != NULL, "tabs widget not found"); GTTabWidget::setCurrentIndex(os, tabs, 1); @@ -276,17 +298,17 @@ void GTUtilsWorkflowDesigner::addSample(HI::GUITestOpStatus &os, const QString & GTGlobals::sleep(100); GT_CHECK(samp != NULL,"sample is NULL"); - selectSample(os, samp); + selectSample(os, samp, parentWidget); GTGlobals::sleep(500); } #undef GT_METHOD_NAME #define GT_METHOD_NAME "selectSample" -void GTUtilsWorkflowDesigner::selectSample(HI::GUITestOpStatus &os, QTreeWidgetItem *sample) { +void GTUtilsWorkflowDesigner::selectSample(HI::GUITestOpStatus &os, QTreeWidgetItem *sample, QWidget const * const parentWidget) { GT_CHECK(sample != NULL, "sample is NULL"); GTGlobals::sleep(500); - QTreeWidget *paletteTree = qobject_cast<QTreeWidget *>(GTWidget::findWidget(os,"samples")); + QTreeWidget *paletteTree = qobject_cast<QTreeWidget *>(GTWidget::findWidget(os,"samples",parentWidget)); paletteTree->scrollToItem(sample); GTThread::waitForMainThread(); GTMouseDriver::moveTo(GTTreeWidget::getItemCenter(os, sample)); @@ -296,8 +318,8 @@ void GTUtilsWorkflowDesigner::selectSample(HI::GUITestOpStatus &os, QTreeWidgetI #undef GT_METHOD_NAME #define GT_METHOD_NAME "expandTabs" -void GTUtilsWorkflowDesigner::expandTabs(HI::GUITestOpStatus &os){ - QSplitter* splitter = qobject_cast<QSplitter*>(GTWidget::findWidget(os,"splitter")); +void GTUtilsWorkflowDesigner::expandTabs(HI::GUITestOpStatus &os, QWidget const * const parentWidget){ + QSplitter* splitter = qobject_cast<QSplitter*>(GTWidget::findWidget(os, "WorkflowViewMainSplitter", parentWidget)); GT_CHECK(splitter, "splitter not found"); QList<int> s; s = splitter->sizes(); @@ -317,6 +339,51 @@ void GTUtilsWorkflowDesigner::expandTabs(HI::GUITestOpStatus &os){ } #undef GT_METHOD_NAME +#define GT_METHOD_NAME "findByNameFilter" +void GTUtilsWorkflowDesigner::findByNameFilter(HI::GUITestOpStatus& os, const QString& elementName) { + QLineEdit* nameFilterLineEdit = qobject_cast<QLineEdit*>(GTWidget::findWidget(os, "nameFilterLineEdit", GTWidget::findWidget(os, "palette"))); + GT_CHECK(nameFilterLineEdit != NULL, "Filter name line edit is not found"); + + const QPoint mappedLineEditPos = nameFilterLineEdit->mapToGlobal(nameFilterLineEdit->pos()); + const QPoint pos(mappedLineEditPos.x() + 75, mappedLineEditPos.y() + 10); + GTMouseDriver::moveTo(pos); + GTGlobals::sleep(500); + GTMouseDriver::click(); + GTGlobals::sleep(100); + GTKeyboardDriver::keyClick(Qt::Key_Home); + GTGlobals::sleep(100); + GTKeyboardDriver::keyClick(Qt::Key_End, Qt::ShiftModifier); + GTGlobals::sleep(100); + GTKeyboardDriver::keyClick(Qt::Key_Backspace); + GTGlobals::sleep(500); + for (int i = 0; i < elementName.size(); i++) { + GTKeyboardDriver::keyClick(elementName[i].toLatin1()); + GTGlobals::sleep(50); + } + GTGlobals::sleep(1000); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "cleanNameFilter" +void GTUtilsWorkflowDesigner::cleanNameFilter(HI::GUITestOpStatus& os) { + QLineEdit* nameFilterLineEdit = qobject_cast<QLineEdit*>(GTWidget::findWidget(os, "nameFilterLineEdit", GTWidget::findWidget(os, "palette"))); + GT_CHECK(nameFilterLineEdit != NULL, "Filter name line edit is not found"); + + const QPoint mappedLineEditPos = nameFilterLineEdit->mapToGlobal(nameFilterLineEdit->pos()); + const QPoint pos(mappedLineEditPos.x() + 75, mappedLineEditPos.y() + 10); + GTMouseDriver::moveTo(pos); + GTGlobals::sleep(500); + GTMouseDriver::click(); + GTGlobals::sleep(100); + GTKeyboardDriver::keyClick(Qt::Key_Home); + GTGlobals::sleep(100); + GTKeyboardDriver::keyClick(Qt::Key_End, Qt::ShiftModifier); + GTGlobals::sleep(100); + GTKeyboardDriver::keyClick(Qt::Key_Backspace); + GTGlobals::sleep(1000); +} +#undef GT_METHOD_NAME + #define GT_METHOD_NAME "clickOnPalette" void GTUtilsWorkflowDesigner::clickOnPalette(HI::GUITestOpStatus &os, const QString &itemName, Qt::MouseButton mouseButton) { selectAlgorithm(os, findTreeItem(os, itemName, algoriths, true)); @@ -436,7 +503,7 @@ int GTUtilsWorkflowDesigner::getItemBottom(HI::GUITestOpStatus &os, QString item } #define GT_METHOD_NAME "click" void GTUtilsWorkflowDesigner::click(HI::GUITestOpStatus &os, QString itemName, QPoint p, Qt::MouseButton button){ - QGraphicsView* sceneView = qobject_cast<QGraphicsView*>(GTWidget::findWidget(os,"sceneView")); + QGraphicsView* sceneView = qobject_cast<QGraphicsView*>(GTWidget::findWidget(os, "sceneView", GTUtilsMdi::activeWindow(os))); GT_CHECK(sceneView!=NULL, "scene view is NULL"); sceneView->ensureVisible(getWorker(os, itemName)); GTThread::waitForMainThread(); @@ -467,7 +534,7 @@ void GTUtilsWorkflowDesigner::click(HI::GUITestOpStatus &os, QGraphicsItem* item #define GT_METHOD_NAME "getWorker" WorkflowProcessItem* GTUtilsWorkflowDesigner::getWorker(HI::GUITestOpStatus &os,QString itemName,const GTGlobals::FindOptions &options){ - QGraphicsView* sceneView = qobject_cast<QGraphicsView*>(GTWidget::findWidget(os,"sceneView")); + QGraphicsView* sceneView = qobject_cast<QGraphicsView*>(GTWidget::findWidget(os,"sceneView",GTUtilsMdi::activeWindow(os))); GT_CHECK_RESULT(sceneView, "sceneView not found", NULL); QList<QGraphicsItem *> items = sceneView->items(); @@ -679,6 +746,33 @@ void GTUtilsWorkflowDesigner::removeCmdlineWorkerFromPalette(HI::GUITestOpStatus } #undef GT_METHOD_NAME +#define GT_METHOD_NAME "increaseOutputPortBoxHeight" +void GTUtilsWorkflowDesigner::changeInputPortBoxHeight(HI::GUITestOpStatus &os, const int offset) { + QTextEdit* doc = GTWidget::findExactWidget<QTextEdit *>(os, "doc"); + GT_CHECK(doc != NULL, "doc is not found"); + + QGroupBox* paramBox = GTWidget::findExactWidget<QGroupBox *>(os, "paramBox"); + GT_CHECK(paramBox != NULL, "Param Box is not found"); + + QGroupBox* inputPortBox = GTWidget::findExactWidget<QGroupBox *>(os, "inputPortBox"); + GT_CHECK(paramBox != NULL, "inputPortBox is not found"); + + QPoint docGlobal = doc->mapToGlobal(doc->pos()); + QPoint bottomDevidePos(docGlobal.x() + (inputPortBox->width() / 2), docGlobal.y() + doc->height() + paramBox->height() + inputPortBox->height() + 10); + QPoint newBottomDevidePos(bottomDevidePos.x(), bottomDevidePos.y() + offset); + GTMouseDriver::dragAndDrop(bottomDevidePos, newBottomDevidePos); + GTGlobals::sleep(); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "importCmdlineBasedElement" +void GTUtilsWorkflowDesigner::importCmdlineBasedElement(GUITestOpStatus &os, const QString &path) { + GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, path)); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Add element with external tool"); + GTGlobals::sleep(500); +} +#undef GT_METHOD_NAME + #define GT_METHOD_NAME "connect" void GTUtilsWorkflowDesigner::connect(HI::GUITestOpStatus &os, WorkflowProcessItem * from , WorkflowProcessItem * to){ QGraphicsView* sceneView = qobject_cast<QGraphicsView*>(from->scene()->views().at(0)); @@ -767,13 +861,29 @@ QList<WorkflowProcessItem*> GTUtilsWorkflowDesigner::getWorkers(HI::GUITestOpSta return result; } +#define GT_METHOD_NAME "getDatasetsListWidget" +QWidget *GTUtilsWorkflowDesigner::getDatasetsListWidget(GUITestOpStatus &os) { + return GTWidget::findWidget(os, "DatasetsListWidget"); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getCurrentDatasetWidget" +QWidget *GTUtilsWorkflowDesigner::getCurrentDatasetWidget(GUITestOpStatus &os) { + QTabWidget* datasetsTabWidget = GTWidget::findExactWidget<QTabWidget *>(os + , "DatasetsTabWidget" + , GTUtilsMdi::activeWindow(os)); + GT_CHECK_RESULT(datasetsTabWidget, "DatasetsTabWidget not found", nullptr); + return datasetsTabWidget->currentWidget(); +} +#undef GT_METHOD_NAME + #define GT_METHOD_NAME "setDatasetInputFile" void GTUtilsWorkflowDesigner::setDatasetInputFile(GUITestOpStatus &os, const QString &filePath, bool pastePath) { GTGlobals::sleep(200); - QWidget* DatasetWidget = GTWidget::findWidget(os, "DatasetWidget"); - GT_CHECK(DatasetWidget, "DatasetWidget not found"); + QWidget *currentDatasetWidget = getCurrentDatasetWidget(os); + GT_CHECK(nullptr != currentDatasetWidget, "Current dataset widget not found"); - QWidget* addFileButton = GTWidget::findWidget(os, "addFileButton", DatasetWidget); + QWidget *addFileButton = GTWidget::findWidget(os, "addFileButton", currentDatasetWidget); GT_CHECK(addFileButton, "addFileButton not found"); GTFileDialogUtils::TextInput t = pastePath ? GTFileDialogUtils::CopyPaste : GTFileDialogUtils::Typing; @@ -786,6 +896,22 @@ void GTUtilsWorkflowDesigner::setDatasetInputFile(GUITestOpStatus &os, const QSt } #undef GT_METHOD_NAME +#define GT_METHOD_NAME "setDatasetInputFiles" +void GTUtilsWorkflowDesigner::setDatasetInputFiles(GUITestOpStatus &os, const QStringList &filePaths) { + GTGlobals::sleep(200); + QWidget *currentDatasetWidget = getCurrentDatasetWidget(os); + GT_CHECK(nullptr != currentDatasetWidget, "Current dataset widget not found"); + + QWidget *addFileButton = GTWidget::findWidget(os, "addFileButton", currentDatasetWidget); + GT_CHECK(nullptr != addFileButton, "addFileButton not found"); + + GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils_list(os, filePaths)); + + GTWidget::click(os, addFileButton); + GTGlobals::sleep(3000); +} +#undef GT_METHOD_NAME + #define GT_METHOD_NAME "addInputFile" void GTUtilsWorkflowDesigner::addInputFile(HI::GUITestOpStatus &os, const QString &elementName, const QString &url) { click(os, elementName); @@ -797,10 +923,7 @@ void GTUtilsWorkflowDesigner::addInputFile(HI::GUITestOpStatus &os, const QStrin #define GT_METHOD_NAME "createDataset" void GTUtilsWorkflowDesigner::createDataset(HI::GUITestOpStatus &os, QString datasetName){ - QWidget* DatasetWidget = GTWidget::findWidget(os, "DatasetWidget"); - GT_CHECK(DatasetWidget, "DatasetWidget not found"); - - QWidget* plusButton = GTWidget::findButtonByText(os, "+"); + QWidget* plusButton = GTWidget::findButtonByText(os, "+", getDatasetsListWidget(os)); GT_CHECK(plusButton, "plusButton not found"); GTUtilsDialog::waitForDialog(os, new DatasetNameEditDialogFiller(os, datasetName)); @@ -812,10 +935,10 @@ void GTUtilsWorkflowDesigner::createDataset(HI::GUITestOpStatus &os, QString dat #define GT_METHOD_NAME "setDatasetInputFolder" void GTUtilsWorkflowDesigner::setDatasetInputFolder(HI::GUITestOpStatus &os, QString filePath){ - QWidget* DatasetWidget = GTWidget::findWidget(os, "DatasetWidget"); - GT_CHECK(DatasetWidget, "DatasetWidget not found"); + QWidget *currentDatasetWidget = getCurrentDatasetWidget(os); + GT_CHECK(nullptr != currentDatasetWidget, "Current dataset widget not found"); - QWidget* addDirButton = GTWidget::findWidget(os, "addDirButton", DatasetWidget); + QWidget* addDirButton = GTWidget::findWidget(os, "addDirButton", currentDatasetWidget); GT_CHECK(addDirButton, "addFileButton not found"); GTFileDialogUtils *ob = new GTFileDialogUtils(os, filePath, "", GTFileDialogUtils::Choose, GTGlobals::UseMouse); @@ -825,6 +948,19 @@ void GTUtilsWorkflowDesigner::setDatasetInputFolder(HI::GUITestOpStatus &os, QSt } #undef GT_METHOD_NAME +#define GT_METHOD_NAME "setDatasetInputFolders" +void GTUtilsWorkflowDesigner::setDatasetInputFolders(GUITestOpStatus &os, const QStringList &dirPaths) { + QWidget *currentDatasetWidget = getCurrentDatasetWidget(os); + GT_CHECK(nullptr != currentDatasetWidget, "Current dataset widget not found"); + + QWidget *addDirButton = GTWidget::findWidget(os, "addDirButton", currentDatasetWidget); + GT_CHECK(nullptr != addDirButton, "addFileButton not found"); + + GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils_list(os, dirPaths)); + GTWidget::click(os, addDirButton); +} +#undef GT_METHOD_NAME + #define GT_METHOD_NAME "setParameter" void GTUtilsWorkflowDesigner::setParameter(HI::GUITestOpStatus &os, QString parameter, QVariant value, valueType type, GTGlobals::UseMethod method){ QTableView* table = qobject_cast<QTableView*>(GTWidget::findWidget(os,"table")); @@ -846,7 +982,7 @@ void GTUtilsWorkflowDesigner::setParameter(HI::GUITestOpStatus &os, QString para GTMouseDriver::moveTo(GTTableView::getCellPosition(os,table,1,row)); GTMouseDriver::click(); - GTGlobals::sleep(500); + GTGlobals::sleep(); //SET VALUE setCellValue(os, table, value, type, method); @@ -856,8 +992,9 @@ void GTUtilsWorkflowDesigner::setParameter(HI::GUITestOpStatus &os, QString para #define GT_METHOD_NAME "setTableValue" void GTUtilsWorkflowDesigner::setTableValue(HI::GUITestOpStatus &os, QString parameter, QVariant value, valueType type, QTableWidget *table, GTGlobals::UseMethod method){ int row = -1; - for(int i = 0; i<table->rowCount(); i++){ - QString s = table->item(i,0)->text(); + const int rows = table->rowCount(); + for(int i = 0; i < rows; i++) { + QString s = table->item(i, 0)->text(); if(s == parameter){ row = i; break; @@ -865,13 +1002,35 @@ void GTUtilsWorkflowDesigner::setTableValue(HI::GUITestOpStatus &os, QString pa } GT_CHECK(row != -1, QString("parameter not found: %1").arg(parameter)); - QRect rect = table->visualItemRect(table->item(row, 1)); + QScrollArea* scrollArea = qobject_cast<QScrollArea*>(GTWidget::findWidget(os, "inputScrollArea")); + GT_CHECK(scrollArea != NULL, "inputPortBox isn't found"); + if (!scrollArea->findChildren<QTableWidget*>().contains(table)) { + scrollArea = qobject_cast<QScrollArea*>(GTWidget::findWidget(os, "outputScrollArea")); + GT_CHECK(scrollArea != NULL, "outputPortBox isn't found"); + GT_CHECK(scrollArea->findChildren<QTableWidget*>().contains(table), "The owner of the table widget isn't found"); + } + QScrollBar* scrollBar = scrollArea->verticalScrollBar(); + GT_CHECK(scrollBar != NULL, "Horizontal scroll bar isn't found"); + + QRect parentTableRect = scrollArea->rect(); + QPoint globalTopLeftParentTable = scrollArea->mapToGlobal(parentTableRect.topLeft()); + QPoint globalBottomRightParentTable = scrollArea->mapToGlobal(parentTableRect.bottomRight()); + QRect globalParentRect(globalTopLeftParentTable, globalBottomRightParentTable - QPoint (0, 1)); + + QTableWidgetItem* item = table->item(row, 1); + QRect rect = table->visualItemRect(item); QPoint globalP = table->viewport()->mapToGlobal(rect.center()); + + while (!globalParentRect.contains(globalP)) { + GTScrollBar::lineDown(os, scrollBar, method); + rect = table->visualItemRect(item); + globalP = table->viewport()->mapToGlobal(rect.center()); + } + GTMouseDriver::moveTo(globalP); GTMouseDriver::click(); GTGlobals::sleep(500); - //SET VALUE setCellValue(os, table, value, type, method); } @@ -922,10 +1081,6 @@ void GTUtilsWorkflowDesigner::setCellValue(HI::GUITestOpStatus &os, QWidget* par }else{ GTComboBox::setCurrentIndex(os, box, comboVal, true, method); } -#ifdef Q_OS_WIN - //added to fix UGENE-3597 - GTKeyboardDriver::keyClick(Qt::Key_Enter); -#endif break; } case(textValue):{ @@ -976,6 +1131,7 @@ QString GTUtilsWorkflowDesigner::getCellValue(HI::GUITestOpStatus &os, QString p #define GT_METHOD_NAME "getInputPortsTable" QTableWidget* GTUtilsWorkflowDesigner::getInputPortsTable(HI::GUITestOpStatus &os, int index){ QWidget* inputPortBox = GTWidget::findWidget(os, "inputPortBox"); + GTGroupBox::setChecked(os, "inputPortBox", true); QList<QTableWidget*> tables= inputPortBox->findChildren<QTableWidget*>(); foreach (QTableWidget* w, tables) { if(!w->isVisible()){ @@ -991,6 +1147,7 @@ QTableWidget* GTUtilsWorkflowDesigner::getInputPortsTable(HI::GUITestOpStatus &o #define GT_METHOD_NAME "getOutputPortsTable" QTableWidget *GTUtilsWorkflowDesigner::getOutputPortsTable(GUITestOpStatus &os, int index) { QWidget *outputPortBox = GTWidget::findWidget(os, "outputPortBox"); + GTGroupBox::setChecked(os, "outputPortBox", true); QList<QTableWidget *> tables= outputPortBox->findChildren<QTableWidget *>(); foreach (QTableWidget *w, tables) { if (!w->isVisible()){ @@ -1003,6 +1160,29 @@ QTableWidget *GTUtilsWorkflowDesigner::getOutputPortsTable(GUITestOpStatus &os, } #undef GT_METHOD_NAME +#define GT_METHOD_NAME "scrollInputPortsWidgetToTableRow" +void GTUtilsWorkflowDesigner::scrollInputPortsWidgetToTableRow(GUITestOpStatus &os, int tableIndex, const QString &slotName) { + QWidget *inputPortBox = GTWidget::findWidget(os, "inputPortBox"); + QTableWidget *table = getInputPortsTable(os, tableIndex); + + QList<QTableWidgetItem *> itemList = table->findItems(slotName, Qt::MatchFixedString); + GT_CHECK(!itemList.isEmpty(), QString("Can't find item for slot name '%1'").arg(slotName)); + + const QRect itemLocalRect = table->visualItemRect(itemList.first()); + const QRect itemPortWidgetRect = QRect(table->viewport()->mapTo(inputPortBox, itemLocalRect.topLeft()), + table->viewport()->mapTo(inputPortBox, itemLocalRect.bottomRight())); + + bool isCenterVisible = inputPortBox->rect().contains(itemPortWidgetRect.center()); + if (isCenterVisible) { + return; + } + + QScrollArea *inputScrollArea = GTWidget::findExactWidget<QScrollArea *>(os, "inputScrollArea", inputPortBox); + QScrollBar *scrollBar = inputScrollArea->verticalScrollBar(); + GTScrollBar::moveSliderWithMouseToValue(os, scrollBar, itemPortWidgetRect.center().y()); +} +#undef GT_METHOD_NAME + #define GT_METHOD_NAME "getAllParameters" QStringList GTUtilsWorkflowDesigner::getAllParameters(HI::GUITestOpStatus &os){ QStringList result; @@ -1019,6 +1199,74 @@ QStringList GTUtilsWorkflowDesigner::getAllParameters(HI::GUITestOpStatus &os){ } #undef GT_METHOD_NAME +#define GT_METHOD_NAME "getComboBoxParameterValues" +QStringList GTUtilsWorkflowDesigner::getComboBoxParameterValues(HI::GUITestOpStatus& os, QString parameter) { + QTableView* table = qobject_cast<QTableView*>(GTWidget::findWidget(os, "table")); + GT_CHECK_RESULT(table, "tableView not found", QStringList()); + + //FIND CELL + QAbstractItemModel* model = table->model(); + int iMax = model->rowCount(); + int row = -1; + for (int i = 0; i < iMax; i++){ + QString s = model->data(model->index(i, 0)).toString(); + if (s.compare(parameter, Qt::CaseInsensitive) == 0) { + row = i; + break; + } + } + GT_CHECK_RESULT(row != -1, QString("parameter not found: %1").arg(parameter), QStringList()); + table->scrollTo(model->index(row, 1)); + + GTMouseDriver::moveTo(GTTableView::getCellPosition(os, table, 1, row)); + GTMouseDriver::click(); + GTGlobals::sleep(); + + QComboBox* box = qobject_cast<QComboBox*>(table->findChild<QComboBox*>()); + GT_CHECK_RESULT(box, "QComboBox not found. Widget in this cell might be not QComboBox", QStringList()); + + QStringList result; + int valuesCount = box->count(); + for (int i = 0; i < valuesCount; i++) { + result << box->itemText(i); + } + + return result; +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "getCheckableComboboxValuesFromInputPortTable" +QList<QPair<QString, bool> > GTUtilsWorkflowDesigner::getCheckableComboboxValuesFromInputPortTable(GUITestOpStatus &os, int tableIndex, const QString &slotName) { + QList<QPair<QString, bool> > result; + + QTableWidget *table = getInputPortsTable(os, tableIndex); + GT_CHECK_RESULT(nullptr != table, "table is nullptr", result); + + scrollInputPortsWidgetToTableRow(os, tableIndex, slotName); + + QList<QTableWidgetItem *> itemList = table->findItems(slotName, Qt::MatchFixedString); + GT_CHECK_RESULT(!itemList.isEmpty(), QString("Can't find item for slot name '%1'").arg(slotName), result); + const int row = itemList.first()->row(); + + GTMouseDriver::moveTo(GTTableView::getCellPosition(os, table, 1, row)); + GTMouseDriver::click(); + GTGlobals::sleep(); + + QComboBox *box = qobject_cast<QComboBox*>(table->findChild<QComboBox*>()); + GT_CHECK_RESULT(box, "QComboBox not found. Widget in this cell might be not QComboBox", result); + + QStandardItemModel *checkBoxModel = qobject_cast<QStandardItemModel *>(box->model()); + GT_CHECK_RESULT(nullptr != checkBoxModel, "Unexpected checkbox model", result); + + for (int i = 0; i < checkBoxModel->rowCount(); ++i) { + QStandardItem *item = checkBoxModel->item(i); + result << qMakePair(item->data(Qt::DisplayRole).toString(), Qt::Checked == item->checkState()); + } + + return result; +} +#undef GT_METHOD_NAME + namespace { bool equalStrings(const QString &where, const QString &what, bool exactMatch) { if (exactMatch) { diff --git a/src/plugins/GUITestBase/src/GTUtilsWorkflowDesigner.h b/src/plugins/GUITestBase/src/GTUtilsWorkflowDesigner.h index 23691175361e1fd03da06bfa6f366bd97e113b0d..49be9a09341bd8b113ec7c4ae89b3b6887bcc498 100644 --- a/src/plugins/GUITestBase/src/GTUtilsWorkflowDesigner.h +++ b/src/plugins/GUITestBase/src/GTUtilsWorkflowDesigner.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -65,6 +65,7 @@ public: static void validateWorkflow(HI::GUITestOpStatus &os); static void runWorkflow(HI::GUITestOpStatus &os); + static void stopWorkflow(HI::GUITestOpStatus &os); static void returnToWorkflow(HI::GUITestOpStatus &os); //returns item from samples or algorithms tab @@ -77,7 +78,11 @@ public: static QList<QTreeWidgetItem*> getVisibleSamples(HI::GUITestOpStatus &os); //expands samples/Elements tabwidget if collapsed - static void expandTabs(HI::GUITestOpStatus &os); + static void expandTabs(HI::GUITestOpStatus &os, QWidget const * const parentWidget = NULL); + + static void findByNameFilter(HI::GUITestOpStatus& os, const QString& elementName); + + static void cleanNameFilter(HI::GUITestOpStatus& os); static void clickOnPalette(HI::GUITestOpStatus &os, const QString &itemName, Qt::MouseButton mouseButton = Qt::LeftButton); @@ -89,9 +94,10 @@ public: static QStringList getPaletteGroupEntriesNames(HI::GUITestOpStatus &os, const QString &groupName); //add to scene - static void addSample(HI::GUITestOpStatus &os, const QString &sampName); + static void addSample(HI::GUITestOpStatus &os, const QString &sampName, QWidget const * const parentWidget = NULL); static void addAlgorithm(HI::GUITestOpStatus &os, QString algName, bool exactMatch = false, bool useDragAndDrop = false); static WorkflowProcessItem * addElement(HI::GUITestOpStatus &os, const QString &algName, bool exactMatch = false); + static WorkflowProcessItem * addElementByUsingNameFilter(HI::GUITestOpStatus &os, const QString &elementName, bool exactMatch = false); //returns center of worker on workflow scene in global coordinates static QPoint getItemCenter(HI::GUITestOpStatus &os,QString itemName); @@ -127,15 +133,20 @@ public: //returns all workers placed on workflow scene static QList<WorkflowProcessItem*> getWorkers(HI::GUITestOpStatus &os); + static QWidget *getDatasetsListWidget(HI::GUITestOpStatus& os); + static QWidget *getCurrentDatasetWidget(HI::GUITestOpStatus& os); + static void createDataset(HI::GUITestOpStatus& os, QString datasetName = ""); //sets input file with path "filePath" to the current dataset //this method should be called after selecting worker which contains dataset on scene static void setDatasetInputFile(HI::GUITestOpStatus &os, const QString &filePath, bool pastePath = false); + static void setDatasetInputFiles(HI::GUITestOpStatus &os, const QStringList &filePaths); static void addInputFile(HI::GUITestOpStatus &os, const QString &elementName, const QString &url); //sets input folder with path "filePath" to dataset static void setDatasetInputFolder(HI::GUITestOpStatus &os, QString filePath); + static void setDatasetInputFolders(HI::GUITestOpStatus &os, const QStringList &dirPaths); //sets oneparameter worker parameter static void setParameter(HI::GUITestOpStatus& os, QString parameter, QVariant value, valueType type, GTGlobals::UseMethod method = GTGlobals::UseMouse); @@ -143,10 +154,17 @@ public: static QString getCellValue(HI::GUITestOpStatus& os, QString parameter, QTableWidget* table); static void setCellValue(HI::GUITestOpStatus& os, QWidget* parent, QVariant value, valueType type, GTGlobals::UseMethod method); static QStringList getAllParameters(HI::GUITestOpStatus& os); + static QStringList getComboBoxParameterValues(HI::GUITestOpStatus& os, QString parameter); + static QList<QPair<QString, bool> > getCheckableComboboxValuesFromInputPortTable(HI::GUITestOpStatus &os, int tableIndex, const QString &slotName); static QTableWidget* getInputPortsTable(HI::GUITestOpStatus &os, int index); static QTableWidget* getOutputPortsTable(HI::GUITestOpStatus &os, int index); + static void scrollInputPortsWidgetToTableRow(HI::GUITestOpStatus &os, int tableIndex, const QString &slotName); + + static bool getGroupBoxChecked(HI::GUITestOpStatus &os, QWidget *box); + static bool setGroupBoxChecked(HI::GUITestOpStatus &os, QWidget *box, bool newCheckStatus); + //gets oneparameter worker parameter static QString getParameter(HI::GUITestOpStatus& os, QString parameter, bool exactMatch = false); static bool isParameterEnabled(HI::GUITestOpStatus& os, QString parameter); @@ -174,9 +192,14 @@ public: static void removeCmdlineWorkerFromPalette(HI::GUITestOpStatus &os, const QString &workerName); + static void changeInputPortBoxHeight(HI::GUITestOpStatus &os, const int offset); + + // custom elements + static void importCmdlineBasedElement(HI::GUITestOpStatus &os, const QString &path); + private: static void selectAlgorithm(HI::GUITestOpStatus &os, QTreeWidgetItem *algorithm); - static void selectSample(HI::GUITestOpStatus &os, QTreeWidgetItem *sample); + static void selectSample(HI::GUITestOpStatus &os, QTreeWidgetItem *sample, QWidget const * const parentWidget = NULL); static QRect getItemRect(HI::GUITestOpStatus &os,QString itemName); static QTreeWidget * getCurrentTabTreeWidget(HI::GUITestOpStatus &os); diff --git a/src/plugins/GUITestBase/src/GUITestBasePlugin.cpp b/src/plugins/GUITestBase/src/GUITestBasePlugin.cpp index 54215874e5b729775da1a0b3fe45f024383d8ef6..62343876edf6bf7540cd81761d40f7b908e42812 100644 --- a/src/plugins/GUITestBase/src/GUITestBasePlugin.cpp +++ b/src/plugins/GUITestBase/src/GUITestBasePlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -21,9 +21,10 @@ #include <U2Core/AppContext.h> -#include <U2Test/UGUITestBase.h> #include <U2Gui/ToolsMenu.h> +#include <U2Test/UGUITestBase.h> + #include "GUITestBasePlugin.h" #include "tests/PosteriorActions.h" #include "tests/PosteriorChecks.h" @@ -53,6 +54,7 @@ #include "tests/common_scenarios/msa_editor/edit/GTTestsMSAEditorEdit.h" #include "tests/common_scenarios/msa_editor/overview/GTTestsMSAEditorOverview.h" #include "tests/common_scenarios/msa_editor/replace_character/GTTestsMSAEditorReplaceCharacter.h" +#include "tests/common_scenarios/ngs_classification/metaphlan2/GTTestsMetaPhlAn2.h" #include "tests/common_scenarios/options_panel/GTTestsOptionPanel.h" #include "tests/common_scenarios/options_panel/msa/GTTestsOptionPanelMSA.h" #include "tests/common_scenarios/options_panel/sequence_view/GTTestsOptionPanelSequenceView.h" @@ -84,6 +86,7 @@ #include "tests/common_scenarios/tree_viewer/GTTestsCommonScenariousTreeviewer.h" #include "tests/common_scenarios/undo_redo/GTTestsUndoRedo.h" #include "tests/common_scenarios/workflow_designer/GTTestsWorkflowDesigner.h" +#include "tests/common_scenarios/workflow_designer/dashboard/GTTestsWorkflowDashboard.h" #include "tests/common_scenarios/workflow_designer/estimating/GTTestsWorkflowEstimating.h" #include "tests/common_scenarios/workflow_designer/name_filter/GTTestsWorkflowNameFilter.h" #include "tests/common_scenarios/workflow_designer/parameters_validation/GTTestsWorkflowParameterValidation.h" @@ -155,9 +158,9 @@ GUITestBasePlugin::GUITestBasePlugin() : Plugin(tr("GUITestBase"), tr("GUI Test registerAdditionalActions(guiTestBase); openGUITestRunnerAction = new QAction(tr("GUI Test runner"), this); + openGUITestRunnerAction->setShortcut(QKeySequence(Qt::CTRL | Qt::ALT | Qt::Key_G)); openGUITestRunnerAction->setObjectName("GUI_TEST_RUNNER"); openGUITestRunnerAction->setIcon(QIcon(":gui_test/images/open_gui_test_runner.png")); - view = NULL; connect(openGUITestRunnerAction, SIGNAL(triggered()), SLOT(sl_showWindow())); ToolsMenu::addAction(ToolsMenu::TOOLS, openGUITestRunnerAction); } @@ -165,8 +168,10 @@ GUITestBasePlugin::GUITestBasePlugin() : Plugin(tr("GUITestBase"), tr("GUI Test void GUITestBasePlugin::sl_showWindow() { if (view == NULL) { view = new GUITestRunner(AppContext::getGUITestBase()); + view->show(); + } else { + view->raise(); } - view->show(); } void GUITestBasePlugin::registerTests(UGUITestBase *guiTestBase) { @@ -233,7 +238,6 @@ void GUITestBasePlugin::registerTests(UGUITestBase *guiTestBase) { REGISTER_TEST(GUITest_regression_scenarios::test_0808); REGISTER_TEST(GUITest_regression_scenarios::test_0812); REGISTER_TEST(GUITest_regression_scenarios::test_0814); - REGISTER_TEST(GUITest_regression_scenarios::test_0818); REGISTER_TEST(GUITest_regression_scenarios::test_0821); REGISTER_TEST(GUITest_regression_scenarios::test_0828); REGISTER_TEST(GUITest_regression_scenarios::test_0829); @@ -483,7 +487,6 @@ void GUITestBasePlugin::registerTests(UGUITestBase *guiTestBase) { REGISTER_TEST(GUITest_regression_scenarios::test_1528); REGISTER_TEST(GUITest_regression_scenarios::test_1529); REGISTER_TEST(GUITest_regression_scenarios::test_1531); - REGISTER_TEST(GUITest_regression_scenarios::test_1533); REGISTER_TEST(GUITest_regression_scenarios::test_1537); REGISTER_TEST(GUITest_regression_scenarios::test_1548); REGISTER_TEST_ONLY_MAC(GUITest_regression_scenarios::test_1551); @@ -571,7 +574,6 @@ void GUITestBasePlugin::registerTests(UGUITestBase *guiTestBase) { REGISTER_TEST(GUITest_regression_scenarios::test_1756); REGISTER_TEST(GUITest_regression_scenarios::test_1759); REGISTER_TEST(GUITest_regression_scenarios::test_1763_1); - REGISTER_TEST(GUITest_regression_scenarios::test_1763_2); REGISTER_TEST(GUITest_regression_scenarios::test_1764); REGISTER_TEST(GUITest_regression_scenarios::test_1771); REGISTER_TEST(GUITest_regression_scenarios::test_1784); @@ -1038,7 +1040,6 @@ void GUITestBasePlugin::registerTests(UGUITestBase *guiTestBase) { REGISTER_TEST(GUITest_regression_scenarios::test_3938); REGISTER_TEST_NOT_FOR_WINDOWS(GUITest_regression_scenarios::test_3950);//too long for windows test server REGISTER_TEST(GUITest_regression_scenarios::test_3953); - REGISTER_TEST_NOT_FOR_WINDOWS(GUITest_regression_scenarios::test_3967); REGISTER_TEST(GUITest_regression_scenarios::test_3959); REGISTER_TEST(GUITest_regression_scenarios::test_3960); REGISTER_TEST(GUITest_regression_scenarios::test_3975); @@ -1154,6 +1155,7 @@ void GUITestBasePlugin::registerTests(UGUITestBase *guiTestBase) { REGISTER_TEST(GUITest_regression_scenarios::test_4439); REGISTER_TEST(GUITest_regression_scenarios::test_4440); REGISTER_TEST(GUITest_regression_scenarios::test_4463); + REGISTER_TEST(GUITest_regression_scenarios::test_4483); REGISTER_TEST(GUITest_regression_scenarios::test_4486); REGISTER_TEST(GUITest_regression_scenarios::test_4488); REGISTER_TEST(GUITest_regression_scenarios::test_4489); @@ -1374,6 +1376,8 @@ void GUITestBasePlugin::registerTests(UGUITestBase *guiTestBase) { REGISTER_TEST(GUITest_regression_scenarios::test_5770); REGISTER_TEST(GUITest_regression_scenarios::test_5773); REGISTER_TEST(GUITest_regression_scenarios::test_5775); + REGISTER_TEST(GUITest_regression_scenarios::test_5781); + REGISTER_TEST(GUITest_regression_scenarios::test_5783); REGISTER_TEST(GUITest_regression_scenarios::test_5786_1); REGISTER_TEST(GUITest_regression_scenarios::test_5786_2); REGISTER_TEST(GUITest_regression_scenarios::test_5786_3); @@ -1411,7 +1415,10 @@ void GUITestBasePlugin::registerTests(UGUITestBase *guiTestBase) { REGISTER_TEST(GUITest_regression_scenarios::test_6031); REGISTER_TEST(GUITest_regression_scenarios::test_6033); - REGISTER_TEST(GUITest_regression_scenarios::test_6038); + REGISTER_TEST(GUITest_regression_scenarios::test_6038_1); + REGISTER_TEST(GUITest_regression_scenarios::test_6038_2); + REGISTER_TEST(GUITest_regression_scenarios::test_6038_3); + REGISTER_TEST(GUITest_regression_scenarios::test_6038_4); REGISTER_TEST(GUITest_regression_scenarios::test_6043); REGISTER_TEST(GUITest_regression_scenarios::test_6047); REGISTER_TEST(GUITest_regression_scenarios::test_6058_1); @@ -1425,9 +1432,66 @@ void GUITestBasePlugin::registerTests(UGUITestBase *guiTestBase) { REGISTER_TEST(GUITest_regression_scenarios::test_6102); REGISTER_TEST(GUITest_regression_scenarios::test_6118); + REGISTER_TEST(GUITest_regression_scenarios::test_6135); REGISTER_TEST(GUITest_regression_scenarios::test_6136); + REGISTER_TEST(GUITest_regression_scenarios::test_6167); + + REGISTER_TEST(GUITest_regression_scenarios::test_6204); + REGISTER_TEST(GUITest_regression_scenarios::test_6207); + REGISTER_TEST(GUITest_regression_scenarios::test_6212); REGISTER_TEST(GUITest_regression_scenarios::test_6225); + REGISTER_TEST(GUITest_regression_scenarios::test_6226); + REGISTER_TEST(GUITest_regression_scenarios::test_6229); + REGISTER_TEST(GUITest_regression_scenarios::test_6230); + REGISTER_TEST(GUITest_regression_scenarios::test_6232_1); + REGISTER_TEST(GUITest_regression_scenarios::test_6232_2); + REGISTER_TEST(GUITest_regression_scenarios::test_6232_3); + REGISTER_TEST(GUITest_regression_scenarios::test_6232_4); + REGISTER_TEST(GUITest_regression_scenarios::test_6233); + + REGISTER_TEST(GUITest_regression_scenarios::test_6235_1); + REGISTER_TEST(GUITest_regression_scenarios::test_6235_2); + REGISTER_TEST(GUITest_regression_scenarios::test_6235_3); + REGISTER_TEST(GUITest_regression_scenarios::test_6235_4); + REGISTER_TEST(GUITest_regression_scenarios::test_6236); + REGISTER_TEST_ONLY_MAC(GUITest_regression_scenarios::test_6238); + REGISTER_TEST(GUITest_regression_scenarios::test_6240); REGISTER_TEST(GUITest_regression_scenarios::test_6243); + REGISTER_TEST(GUITest_regression_scenarios::test_6247); + REGISTER_TEST(GUITest_regression_scenarios::test_6249_1); + REGISTER_TEST(GUITest_regression_scenarios::test_6249_2); + REGISTER_TEST(GUITest_regression_scenarios::test_6249_3); + REGISTER_TEST(GUITest_regression_scenarios::test_6256); + REGISTER_TEST(GUITest_regression_scenarios::test_6262); + REGISTER_TEST(GUITest_regression_scenarios::test_6277); + REGISTER_TEST(GUITest_regression_scenarios::test_6279); + REGISTER_TEST(GUITest_regression_scenarios::test_6283); + REGISTER_TEST(GUITest_regression_scenarios::test_6291); + + REGISTER_TEST_NOT_FOR_WINDOWS(GUITest_regression_scenarios::test_6301); + REGISTER_TEST(GUITest_regression_scenarios::test_6309); + REGISTER_TEST(GUITest_regression_scenarios::test_6314); + REGISTER_TEST(GUITest_regression_scenarios::test_6334); + REGISTER_TEST(GUITest_regression_scenarios::test_6350); + REGISTER_TEST_NOT_FOR_WINDOWS(GUITest_regression_scenarios::test_6378); + REGISTER_TEST(GUITest_regression_scenarios::test_6397); + REGISTER_TEST(GUITest_regression_scenarios::test_6398); + + REGISTER_TEST(GUITest_regression_scenarios::test_6459); + REGISTER_TEST(GUITest_regression_scenarios::test_6475_1); + REGISTER_TEST(GUITest_regression_scenarios::test_6475_2); + REGISTER_TEST(GUITest_regression_scenarios::test_6481_1); + REGISTER_TEST(GUITest_regression_scenarios::test_6481_2); + REGISTER_TEST(GUITest_regression_scenarios::test_6481_3); + REGISTER_TEST(GUITest_regression_scenarios::test_6481_4); + REGISTER_TEST(GUITest_regression_scenarios::test_6474_1); + REGISTER_TEST(GUITest_regression_scenarios::test_6474_2); + REGISTER_TEST(GUITest_regression_scenarios::test_6488_1); + REGISTER_TEST(GUITest_regression_scenarios::test_6488_2); + + REGISTER_TEST(GUITest_regression_scenarios::test_6490); + REGISTER_TEST(GUITest_regression_scenarios::test_6580); + ////////////////////////////////////////////////////////////////////////// // Common scenarios/project/ ////////////////////////////////////////////////////////////////////////// @@ -1722,12 +1786,16 @@ void GUITestBasePlugin::registerTests(UGUITestBase *guiTestBase) { REGISTER_TEST(GUITest_common_scenarios_project_remote_request::test_0002); REGISTER_TEST(GUITest_common_scenarios_project_remote_request::test_0003); REGISTER_TEST(GUITest_common_scenarios_project_remote_request::test_0004); + REGISTER_TEST(GUITest_common_scenarios_project_remote_request::test_0005); + REGISTER_TEST(GUITest_common_scenarios_project_remote_request::test_0006); REGISTER_TEST(GUITest_common_scenarios_project_remote_request::test_0007); REGISTER_TEST(GUITest_common_scenarios_project_remote_request::test_0008); REGISTER_TEST(GUITest_common_scenarios_project_remote_request::test_0009); REGISTER_TEST(GUITest_common_scenarios_project_remote_request::test_0010); REGISTER_TEST(GUITest_common_scenarios_project_remote_request::test_0011); REGISTER_TEST(GUITest_common_scenarios_project_remote_request::test_0012); + REGISTER_TEST(GUITest_common_scenarios_project_remote_request::test_0013); + REGISTER_TEST(GUITest_common_scenarios_project_remote_request::test_0014); ////////////////////////////////////////////////////////////////////////// // Common scenarios/toggle view/ @@ -1820,6 +1888,22 @@ void GUITestBasePlugin::registerTests(UGUITestBase *guiTestBase) { REGISTER_TEST(GUITest_common_scenarios_project_sequence_exporting_from_project_view::test_0008_1); REGISTER_TEST(GUITest_common_scenarios_project_sequence_exporting_from_project_view::test_0008_2); + ///////////////////////////////////////////////////////////////////////// + // Common scenarios/ngs_classification/metaphlan2 + ///////////////////////////////////////////////////////////////////////// + REGISTER_TEST_NOT_FOR_WINDOWS(GUITest_common_scenarios_mg_metaphlan2_external_tool::test_0001); + REGISTER_TEST_NOT_FOR_WINDOWS(GUITest_common_scenarios_mg_metaphlan2_external_tool::test_0002); + REGISTER_TEST_NOT_FOR_WINDOWS(GUITest_common_scenarios_mg_metaphlan2_external_tool::test_0003); + REGISTER_TEST_NOT_FOR_WINDOWS(GUITest_common_scenarios_mg_metaphlan2_external_tool::test_0004); + REGISTER_TEST_NOT_FOR_WINDOWS(GUITest_common_scenarios_mg_metaphlan2_external_tool::test_0005); + REGISTER_TEST_NOT_FOR_WINDOWS(GUITest_common_scenarios_mg_metaphlan2_external_tool::test_0006); + REGISTER_TEST_NOT_FOR_WINDOWS(GUITest_common_scenarios_mg_metaphlan2_external_tool::test_0007); + REGISTER_TEST_NOT_FOR_WINDOWS(GUITest_common_scenarios_mg_metaphlan2_external_tool::test_0008); + REGISTER_TEST_NOT_FOR_WINDOWS(GUITest_common_scenarios_mg_metaphlan2_workflow_designer_element::test_0001); + REGISTER_TEST_NOT_FOR_WINDOWS(GUITest_common_scenarios_mg_metaphlan2_workflow_designer_element::test_0002); + REGISTER_TEST_NOT_FOR_WINDOWS(GUITest_common_scenarios_mg_metaphlan2_workflow_designer_element::test_0003); + REGISTER_TEST_NOT_FOR_WINDOWS(GUITest_common_scenarios_mg_metaphlan2_workflow_designer_element::test_0004); + ///////////////////////////////////////////////////////////////////////// // Common scenarios/msa_editor ///////////////////////////////////////////////////////////////////////// @@ -2718,8 +2802,7 @@ void GUITestBasePlugin::registerTests(UGUITestBase *guiTestBase) { ///////////////////////////////////////////////////////////////////////// // Common scenarios/Workflow designer ///////////////////////////////////////////////////////////////////////// - REGISTER_TEST_NOT_FOR_WINDOWS(GUITest_common_scenarios_workflow_designer::test_0002) - REGISTER_TEST_NOT_FOR_WINDOWS(GUITest_common_scenarios_workflow_designer::test_0002_1) + REGISTER_TEST_NOT_FOR_WINDOWS(GUITest_common_scenarios_workflow_designer::test_0002_1); REGISTER_TEST(GUITest_common_scenarios_workflow_designer::test_0003); REGISTER_TEST_NOT_FOR_WINDOWS(GUITest_common_scenarios_workflow_designer::test_0005) REGISTER_TEST_ONLY_LINUX(GUITest_common_scenarios_workflow_designer::test_0006); @@ -2746,6 +2829,54 @@ void GUITestBasePlugin::registerTests(UGUITestBase *guiTestBase) { REGISTER_TEST_NOT_FOR_WINDOWS(GUITest_common_scenarios_workflow_parameters_validation::test_0005);//, "Test should run not under admin user on WIN"); REGISTER_TEST(GUITest_common_scenarios_workflow_parameters_validation::test_0006); + ///////////////////////////////////////////////////////////////////////// + // Common scenarios/Workflow designer/Dashboard misc + ///////////////////////////////////////////////////////////////////////// + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::misc_test_0001); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::misc_test_0002); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::misc_test_0003); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::misc_test_0004); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::misc_test_0005); + + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::tree_nodes_creation_test_0001); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::tree_nodes_creation_test_0002); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::tree_nodes_creation_test_0003); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::tree_nodes_creation_test_0004); + + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::tool_launch_nodes_test_0001); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::tool_launch_nodes_test_0002); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::tool_launch_nodes_test_0003); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::tool_launch_nodes_test_0004); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::tool_launch_nodes_test_0005); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::tool_launch_nodes_test_0006); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::tool_launch_nodes_test_0007); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::tool_launch_nodes_test_0008); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::tool_launch_nodes_test_0009); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::tool_launch_nodes_test_0010); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::tool_launch_nodes_test_0011); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::tool_launch_nodes_test_0012); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::tool_launch_nodes_test_0013); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::tool_launch_nodes_test_0014); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::tool_launch_nodes_test_0015); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::tool_launch_nodes_test_0016); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::tool_launch_nodes_test_0017); + + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::view_opening_test_0001); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::view_opening_test_0002); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::view_opening_test_0003); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::view_opening_test_0004); + + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::output_dir_scanning_test_0001); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::output_dir_scanning_test_0002); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::output_dir_scanning_test_0003); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::output_dir_scanning_test_0004); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::output_dir_scanning_test_0005_1); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::output_dir_scanning_test_0005); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::output_dir_scanning_test_0006); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::output_dir_scanning_test_0007); + REGISTER_TEST(GUITest_common_scenarios_workflow_dashboard::output_dir_scanning_test_0008); + + ///////////////////////////////////////////////////////////////////////// // Common scenarios/Workflow designer/Estimating ///////////////////////////////////////////////////////////////////////// @@ -2858,7 +2989,7 @@ void GUITestBasePlugin::registerTests(UGUITestBase *guiTestBase) { REGISTER_TEST(GUITest_common_scenarios_shared_database::import_test_0001); REGISTER_TEST(GUITest_common_scenarios_shared_database::import_test_0002); - REGISTER_TEST(GUITest_common_scenarios_shared_database::import_test_0003); + REGISTER_TEST_IGNORED(GUITest_common_scenarios_shared_database::import_test_0003,"drag&drop"); REGISTER_TEST(GUITest_common_scenarios_shared_database::import_test_0004); REGISTER_TEST(GUITest_common_scenarios_shared_database::import_test_0005); REGISTER_TEST(GUITest_common_scenarios_shared_database::import_test_0006); diff --git a/src/plugins/GUITestBase/src/GUITestBasePlugin.h b/src/plugins/GUITestBase/src/GUITestBasePlugin.h index 91f3929ecadeb61adc498877b1ece3808435686f..a866d28db6f735a54d3115b8d770b58810c0a3fe 100644 --- a/src/plugins/GUITestBase/src/GUITestBasePlugin.h +++ b/src/plugins/GUITestBase/src/GUITestBasePlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -41,7 +41,7 @@ private: void registerAdditionalActions(UGUITestBase *guiTestBase); QAction* openGUITestRunnerAction; - GUITestRunner* view; + QPointer<GUITestRunner> view; }; } //namespace diff --git a/src/plugins/GUITestBase/src/api/GTBaseCompleter.cpp b/src/plugins/GUITestBase/src/api/GTBaseCompleter.cpp index e69c9daea07b4d282dfdceb74815c5fd7dfedaa6..9a2e625515592f5a1c420c387c299b28f4974061 100644 --- a/src/plugins/GUITestBase/src/api/GTBaseCompleter.cpp +++ b/src/plugins/GUITestBase/src/api/GTBaseCompleter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,8 +32,9 @@ using namespace HI; #define GT_CLASS_NAME "GTBaseCompleter" #define GT_METHOD_NAME "click" -void GTBaseCompleter::click(HI::GUITestOpStatus &os, QTreeWidget* tree, const QString &seqName){ - GT_CHECK(tree != NULL, "tree widget is NULL"); +void GTBaseCompleter::click(HI::GUITestOpStatus &os, QWidget *widgetCompleterFor, const QString &seqName) { + QTreeWidget *tree = getCompleter(os, widgetCompleterFor); + GT_CHECK(tree != nullptr, "tree widget is NULL"); QTreeWidgetItem* item = GTTreeWidget::findItem(os, tree, seqName); GT_CHECK(item != NULL, "item not found"); tree->scrollToItem(item); @@ -46,10 +47,8 @@ void GTBaseCompleter::click(HI::GUITestOpStatus &os, QTreeWidget* tree, const QS #undef GT_METHOD_NAME #define GT_METHOD_NAME "getNames" -QStringList GTBaseCompleter::getNames(HI::GUITestOpStatus &os, QTreeWidget *tree){ - if(tree == NULL){ - tree = getCompleter(os); - } +QStringList GTBaseCompleter::getNames(HI::GUITestOpStatus &os, QWidget *widgetCompleterFor) { + QTreeWidget *tree = getCompleter(os, widgetCompleterFor); GT_CHECK_RESULT(tree != NULL, "tree widget is NULL", QStringList()); QStringList result; QList<QTreeWidgetItem*> items = GTTreeWidget::getItems(tree->invisibleRootItem()); @@ -60,20 +59,20 @@ QStringList GTBaseCompleter::getNames(HI::GUITestOpStatus &os, QTreeWidget *tree } #undef GT_METHOD_NAME -bool GTBaseCompleter::isEmpty(HI::GUITestOpStatus &os, QTreeWidget *tree){ - if(tree == NULL){ - tree = getCompleter(os); - } - QStringList items = getNames(os, tree); +#define GT_METHOD_NAME "isEmpty" +bool GTBaseCompleter::isEmpty(HI::GUITestOpStatus &os, QWidget *widgetCompleterFor) { + QTreeWidget *tree = getCompleter(os, widgetCompleterFor); + GT_CHECK_RESULT(tree != NULL, "tree widget is NULL", true); + QStringList items = getNames(os, widgetCompleterFor); bool result = (items.count() == 1) && (items.at(0) == ""); return result; } +#undef GT_METHOD_NAME #define GT_METHOD_NAME "getCompleter" -QTreeWidget* GTBaseCompleter::getCompleter(HI::GUITestOpStatus &os){ - QWidget* sequenceLineEdit = GTWidget::findWidget(os, "sequenceLineEdit"); - GT_CHECK_RESULT(sequenceLineEdit != NULL, "sequenceLineEdit not found", NULL); - QTreeWidget* completer = sequenceLineEdit->findChild<QTreeWidget*>(); +QTreeWidget* GTBaseCompleter::getCompleter(HI::GUITestOpStatus &os, QWidget *widgetCompleterFor) { + GT_CHECK_RESULT(widgetCompleterFor != NULL, "Widget associated with completer not found", NULL); + QTreeWidget* completer = widgetCompleterFor->findChild<QTreeWidget*>(); GT_CHECK_RESULT(completer != NULL, "auto completer widget not found", NULL); return completer; } diff --git a/src/plugins/GUITestBase/src/api/GTBaseCompleter.h b/src/plugins/GUITestBase/src/api/GTBaseCompleter.h index f117cbedf8fc540c9f49b082ef86b82bc92befde..c8e9e9e6fecb982f31fe8dedaa2868d015fd1504 100644 --- a/src/plugins/GUITestBase/src/api/GTBaseCompleter.h +++ b/src/plugins/GUITestBase/src/api/GTBaseCompleter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,13 +30,12 @@ class QTreeWidget; namespace U2 { using namespace HI; -class GTBaseCompleter -{ +class GTBaseCompleter { public: - static void click(HI::GUITestOpStatus &os, QTreeWidget* tree, const QString &seqName); - static QStringList getNames(HI::GUITestOpStatus &os, QTreeWidget* tree = NULL); - static bool isEmpty(HI::GUITestOpStatus &os, QTreeWidget* tree = NULL); - static QTreeWidget* getCompleter(HI::GUITestOpStatus &os); + static void click(HI::GUITestOpStatus &os, QWidget *widgetCompleterFor, const QString &seqName); + static QStringList getNames(HI::GUITestOpStatus &os, QWidget *widgetCompleterFor); + static bool isEmpty(HI::GUITestOpStatus &os, QWidget *widgetCompleterFor); + static QTreeWidget* getCompleter(HI::GUITestOpStatus &os, QWidget *widgetCompleterFor); }; } diff --git a/src/plugins/GUITestBase/src/api/GTGraphicsItem.cpp b/src/plugins/GUITestBase/src/api/GTGraphicsItem.cpp index 960930fbb0de8a142044e45c7fed15851921ae7e..2750089a68b1e806d332b34ca96903f75985ebc1 100644 --- a/src/plugins/GUITestBase/src/api/GTGraphicsItem.cpp +++ b/src/plugins/GUITestBase/src/api/GTGraphicsItem.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/api/GTGraphicsItem.h b/src/plugins/GUITestBase/src/api/GTGraphicsItem.h index fa3d4b9b2f8a4bf5225f571d878bc3a8106ff634..2e6f1a2466c2fbead417ae6417d78b0df53c8f27 100644 --- a/src/plugins/GUITestBase/src/api/GTGraphicsItem.h +++ b/src/plugins/GUITestBase/src/api/GTGraphicsItem.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/api/GTMSAEditorStatusWidget.cpp b/src/plugins/GUITestBase/src/api/GTMSAEditorStatusWidget.cpp index 9d974ef543ee41361b3860040fa5b56b00fd01ad..f53bd5d27977075d90d4521e72545ecff1353924 100644 --- a/src/plugins/GUITestBase/src/api/GTMSAEditorStatusWidget.cpp +++ b/src/plugins/GUITestBase/src/api/GTMSAEditorStatusWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/api/GTMSAEditorStatusWidget.h b/src/plugins/GUITestBase/src/api/GTMSAEditorStatusWidget.h index 9dca0fcc39b14d36f320636dd5830e338624a353..2cc41419fb54c53917b8e6f1ab448cbe0ed42a51 100644 --- a/src/plugins/GUITestBase/src/api/GTMSAEditorStatusWidget.h +++ b/src/plugins/GUITestBase/src/api/GTMSAEditorStatusWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/api/GTRegionSelector.cpp b/src/plugins/GUITestBase/src/api/GTRegionSelector.cpp index 47b5816f055d1a13e8aa51a3baea1817bfa6d75a..e0af1d3753e79431d4d518670f62fb3a9ddd2b7a 100644 --- a/src/plugins/GUITestBase/src/api/GTRegionSelector.cpp +++ b/src/plugins/GUITestBase/src/api/GTRegionSelector.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/api/GTRegionSelector.h b/src/plugins/GUITestBase/src/api/GTRegionSelector.h index f1db5e727ddbe2c0a831cd57e9ca8add8e00e455..65bf23b9a178f96f5dc08347ab867fbb79fbf64e 100644 --- a/src/plugins/GUITestBase/src/api/GTRegionSelector.h +++ b/src/plugins/GUITestBase/src/api/GTRegionSelector.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/api/GTSequenceReadingModeDialog.cpp b/src/plugins/GUITestBase/src/api/GTSequenceReadingModeDialog.cpp index 1774c97fc8d811ea5b2cd59e870af9015e7604a0..783629a56c9798e29567a22a496c83ef57bbbb20 100644 --- a/src/plugins/GUITestBase/src/api/GTSequenceReadingModeDialog.cpp +++ b/src/plugins/GUITestBase/src/api/GTSequenceReadingModeDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/api/GTSequenceReadingModeDialog.h b/src/plugins/GUITestBase/src/api/GTSequenceReadingModeDialog.h index fce165ac5a939fcfe645f7a03eb8540164d331b9..42d27611dec4fda2f7e0c33fa9a2834660a957f9 100644 --- a/src/plugins/GUITestBase/src/api/GTSequenceReadingModeDialog.h +++ b/src/plugins/GUITestBase/src/api/GTSequenceReadingModeDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/api/GTSequenceReadingModeDialogUtils.cpp b/src/plugins/GUITestBase/src/api/GTSequenceReadingModeDialogUtils.cpp index 636e29932df5e2f57e48f8752cdd45105eff76ca..08ea042f351d3235b5c9812cdc8d7f5c74ab1533 100644 --- a/src/plugins/GUITestBase/src/api/GTSequenceReadingModeDialogUtils.cpp +++ b/src/plugins/GUITestBase/src/api/GTSequenceReadingModeDialogUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/api/GTSequenceReadingModeDialogUtils.h b/src/plugins/GUITestBase/src/api/GTSequenceReadingModeDialogUtils.h index f52d215b90c8b9cbd332d04440eb5242d8431ba8..b8ef44a0803abbd97853b412b09ce83d3f6f0d0f 100644 --- a/src/plugins/GUITestBase/src/api/GTSequenceReadingModeDialogUtils.h +++ b/src/plugins/GUITestBase/src/api/GTSequenceReadingModeDialogUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/qt/EscapeClicker.cpp b/src/plugins/GUITestBase/src/runnables/qt/EscapeClicker.cpp index 19c4a659882f234dd0ad253a65c4ca600f2f3755..49292b00b39b6a0811919b39b30543ce00248fc0 100644 --- a/src/plugins/GUITestBase/src/runnables/qt/EscapeClicker.cpp +++ b/src/plugins/GUITestBase/src/runnables/qt/EscapeClicker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/qt/EscapeClicker.h b/src/plugins/GUITestBase/src/runnables/qt/EscapeClicker.h index 50ef7b140b36bf94537727e735c9737025cad5b7..07b26241b4383cb13b00ca62b94dce15fc9aa4c2 100644 --- a/src/plugins/GUITestBase/src/runnables/qt/EscapeClicker.h +++ b/src/plugins/GUITestBase/src/runnables/qt/EscapeClicker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AddFolderDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AddFolderDialogFiller.cpp index dc8e4aa9aa954de98c6a12d96e608c18bc79141c..4793dedc4799facfa5e11cc1b7ab83fdae617e08 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AddFolderDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AddFolderDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AddFolderDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AddFolderDialogFiller.h index ee8ea542d0d9986eea6351f273758bed64a9162d..c991693a7e7fe4ee42da5ff0609c0eda8b0fd4a3 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AddFolderDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AddFolderDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AddNewDocumentDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AddNewDocumentDialogFiller.cpp index 75024d5b3276c839d9d399408c1a2d93c59a634c..dd6f916c830b4e6c1cfca186ab64994fb0996af8 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AddNewDocumentDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AddNewDocumentDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AddNewDocumentDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AddNewDocumentDialogFiller.h index 55115bc4c5ab0bb482cd5b393b927777d1f1ef14..24430cb911aa9360ded698ffae0d37e4f414c246 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AddNewDocumentDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AddNewDocumentDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AlignShortReadsDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AlignShortReadsDialogFiller.cpp index 94ec20e47c2be10065f5c0406ea1f52d4dfe1f25..dcfebe249dd7f9c6cd5fce450e8eace470187531 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AlignShortReadsDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AlignShortReadsDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AlignShortReadsDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AlignShortReadsDialogFiller.h index 32a3ad6b2e3534e3bf57ef2238b218a65b70d92c..bcc559d5f0847b011b300d945b171d0359e778a5 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AlignShortReadsDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AlignShortReadsDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AppSettingsDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AppSettingsDialogFiller.cpp index df9db6feca95b83fb8562a37c69227a070df856a..32e5eb446a11ce311e0041e0da91db3e2f6e7b26 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AppSettingsDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AppSettingsDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,15 +32,17 @@ #include <U2Core/Log.h> +#include <QAbstractButton> #include <QApplication> +#include <QComboBox> +#include <QDialogButtonBox> #include <QListWidget> +#include <QTextBrowser> #include <QToolButton> #include <QTreeWidget> -#include <QComboBox> -#include <QDialogButtonBox> -#include <QAbstractButton> -#include <QTextBrowser> +#include <QFile> +#include <QFileInfoList> namespace U2{ using namespace HI; @@ -111,7 +113,7 @@ void AppSettingsDialogFiller::setExternalToolPath(HI::GUITestOpStatus &os, const openTab(os, ExternalTools); - QTreeWidget* treeWidget = GTWidget::findExactWidget<QTreeWidget*>(os, "treeWidget", dialog); + QTreeWidget* treeWidget = GTWidget::findExactWidget<QTreeWidget*>(os, "twIntegratedTools", dialog); QList<QTreeWidgetItem*> listOfItems = treeWidget->findItems("", Qt::MatchContains | Qt::MatchRecursive); bool set = false; foreach (QTreeWidgetItem* item, listOfItems) { @@ -129,6 +131,40 @@ void AppSettingsDialogFiller::setExternalToolPath(HI::GUITestOpStatus &os, const } #undef GT_METHOD_NAME +#define GT_METHOD_NAME "setExternalToolPath" +void AppSettingsDialogFiller::setExternalToolPath(HI::GUITestOpStatus &os, const QString& toolName, const QString& path, const QString& name) { + QWidget *dialog = QApplication::activeModalWidget(); + GT_CHECK(dialog, "activeModalWidget is NULL"); + + openTab(os, ExternalTools); + + QTreeWidget* treeWidget = GTWidget::findExactWidget<QTreeWidget*>(os, "twIntegratedTools", dialog); + QList<QTreeWidgetItem*> listOfItems = treeWidget->findItems("", Qt::MatchContains | Qt::MatchRecursive); + bool set = false; + foreach(QTreeWidgetItem* item, listOfItems) { + if (item->text(0) == toolName) { + treeWidget->scrollToItem(item); + GTThread::waitForMainThread(); + GTFileDialogUtils *ob = new GTFileDialogUtils(os, path, name, (GTFileDialogUtils::Button)GTFileDialog::Open, GTGlobals::UseMouse); + GTUtilsDialog::waitForDialog(os, ob); + + QWidget *itemWid = treeWidget->itemWidget(item, 1); + GT_CHECK(itemWid, "itemWid is NULL"); + + QLineEdit *lineEdit = itemWid->findChild<QLineEdit*>("PathLineEdit"); + GT_CHECK(lineEdit, "lineEdit is NULL"); + + QToolButton* clearToolPathButton = lineEdit->parentWidget()->findChild<QToolButton*>("ResetExternalTool"); + GT_CHECK(clearToolPathButton, "clearToolPathButton is NULL"); + + GTWidget::click(os, clearToolPathButton); + set = true; + } + } + GT_CHECK(set, "tool " + toolName + " not found in tree view"); +} +#undef GT_METHOD_NAME + #define GT_METHOD_NAME "getExternalToolPath" QString AppSettingsDialogFiller::getExternalToolPath(HI::GUITestOpStatus &os, const QString &toolName){ QWidget *dialog = QApplication::activeModalWidget(); @@ -136,7 +172,7 @@ QString AppSettingsDialogFiller::getExternalToolPath(HI::GUITestOpStatus &os, co openTab(os, ExternalTools); - QTreeWidget* treeWidget = GTWidget::findExactWidget<QTreeWidget*>(os, "treeWidget", dialog); + QTreeWidget* treeWidget = GTWidget::findExactWidget<QTreeWidget*>(os, "twIntegratedTools", dialog); QList<QTreeWidgetItem*> listOfItems = treeWidget->findItems("", Qt::MatchContains | Qt::MatchRecursive); foreach (QTreeWidgetItem* item, listOfItems){ @@ -157,7 +193,7 @@ bool AppSettingsDialogFiller::isExternalToolValid(HI::GUITestOpStatus &os, const openTab(os, ExternalTools); - QTreeWidget* treeWidget = GTWidget::findExactWidget<QTreeWidget*>(os, "treeWidget", dialog); + QTreeWidget* treeWidget = GTWidget::findExactWidget<QTreeWidget*>(os, "twIntegratedTools", dialog); QList<QTreeWidgetItem*> listOfItems = treeWidget->findItems("", Qt::MatchContains | Qt::MatchRecursive); foreach (QTreeWidgetItem* item, listOfItems){ if(item->text(0) == toolName){ @@ -178,7 +214,7 @@ void AppSettingsDialogFiller::clearToolPath(HI::GUITestOpStatus &os, const QStri openTab(os, ExternalTools); - QTreeWidget* treeWidget = GTWidget::findExactWidget<QTreeWidget*>(os, "treeWidget", dialog); + QTreeWidget* treeWidget = GTWidget::findExactWidget<QTreeWidget*>(os, "twIntegratedTools", dialog); QList<QTreeWidgetItem*> listOfItems = treeWidget->findItems("", Qt::MatchContains | Qt::MatchRecursive); foreach (QTreeWidgetItem* item, listOfItems){ if(item->text(0) == toolName){ @@ -195,6 +231,21 @@ void AppSettingsDialogFiller::clearToolPath(HI::GUITestOpStatus &os, const QStri } #undef GT_METHOD_NAME +#define GT_METHOD_NAME "isToolDescriptionContainsString" +bool AppSettingsDialogFiller::isToolDescriptionContainsString(HI::GUITestOpStatus &os, const QString& toolName, const QString& checkIfContains) { + QWidget *dialog = QApplication::activeModalWidget(); + GT_CHECK_RESULT(dialog, "activeModalWidget is NULL", false); + + clickOnTool(os, toolName); + + QTextBrowser* textBrowser = GTWidget::findExactWidget<QTextBrowser*>(os, "descriptionTextBrowser", dialog); + GT_CHECK_RESULT(textBrowser, "textBrowser is NULL", false); + + QString plainText = textBrowser->toPlainText(); + return plainText.contains(checkIfContains); +} +#undef GT_METHOD_NAME + #define GT_METHOD_NAME "setTemporaryDirPath" void AppSettingsDialogFiller::setTemporaryDirPath(GUITestOpStatus &os, const QString &path) { QWidget *dialog = QApplication::activeModalWidget(); @@ -206,6 +257,28 @@ void AppSettingsDialogFiller::setTemporaryDirPath(GUITestOpStatus &os, const QSt } #undef GT_METHOD_NAME +#define GT_METHOD_NAME "setDocumentsDirPath" +void AppSettingsDialogFiller::setDocumentsDirPath(GUITestOpStatus &os, const QString &path) { + QWidget *dialog = QApplication::activeModalWidget(); + GT_CHECK(NULL != dialog, "activeModalWidget is NULL"); + + openTab(os, Directories); + + GTLineEdit::setText(os, "documentsDirectoryEdit", path, dialog); +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setWorkflowOutputDirPath" +void AppSettingsDialogFiller::setWorkflowOutputDirPath(GUITestOpStatus &os, const QString &path) { + QWidget *dialog = QApplication::activeModalWidget(); + GT_CHECK(nullptr != dialog, "activeModalWidget is nullptr"); + + openTab(os, WorkflowDesigner); + + GTLineEdit::setText(os, "workflowOutputEdit", path, dialog); +} +#undef GT_METHOD_NAME + #define GT_METHOD_NAME "OpenTab" void AppSettingsDialogFiller::openTab(HI::GUITestOpStatus &os, Tabs tab){ QWidget *dialog = QApplication::activeModalWidget(); @@ -222,6 +295,44 @@ void AppSettingsDialogFiller::openTab(HI::GUITestOpStatus &os, Tabs tab){ GTGlobals::sleep(300); } #undef GT_METHOD_NAME + +#define GT_METHOD_NAME "clickOnTool" +void AppSettingsDialogFiller::clickOnTool(HI::GUITestOpStatus &os, const QString& toolName) { + QWidget *dialog = QApplication::activeModalWidget(); + GT_CHECK_RESULT(dialog, "activeModalWidget is NULL", ); + + openTab(os, ExternalTools); + + QTreeWidget* treeWidget = GTWidget::findExactWidget<QTreeWidget*>(os, "twIntegratedTools", dialog); + QList<QTreeWidgetItem*> listOfItems = treeWidget->findItems("", Qt::MatchContains | Qt::MatchRecursive); + foreach(QTreeWidgetItem* item, listOfItems){ + if (item->text(0) == toolName){ + GTTreeWidget::click(os, item); + return; + } + } +} +#undef GT_METHOD_NAME + +#define GT_METHOD_NAME "setExternalToolsDir" +void AppSettingsDialogFiller::setExternalToolsDir(HI::GUITestOpStatus &os, const QString& dirPath) { + QWidget *dialog = QApplication::activeModalWidget(); + GT_CHECK(dialog, "activeModalWidget is NULL"); + + openTab(os, ExternalTools); + + QWidget* selectExToolsDirButton = GTWidget::findWidget(os, "selectToolPackButton", dialog); + GT_CHECK(selectExToolsDirButton, "selectToolPackButton not found"); + while (!selectExToolsDirButton->isEnabled()) { + uiLog.trace("selectToolPackButton is disabled"); + GTGlobals::sleep(100); + } + + GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, dirPath, "", GTFileDialogUtils::Choose)); + GTWidget::click(os, selectExToolsDirButton); +} +#undef GT_METHOD_NAME + #undef GT_CLASS_NAME NewColorSchemeCreator::NewColorSchemeCreator(HI::GUITestOpStatus &_os, QString _schemeName, alphabet _al, Action _act, bool cancel) diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AppSettingsDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AppSettingsDialogFiller.h index 237a9da4cff624467c41b39ee91453acf65d955a..7a35f3208a410e8a353c065cfb82ed34fab30e3c 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AppSettingsDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/AppSettingsDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -40,13 +40,17 @@ public: void commonScenario(); static void openTab(HI::GUITestOpStatus &os, Tabs tab); - + static void clickOnTool(HI::GUITestOpStatus &os, const QString& toolName); + static void setExternalToolsDir(HI::GUITestOpStatus &os, const QString& dirPath); static void setExternalToolPath(HI::GUITestOpStatus &os, const QString& toolName, const QString& toolPath); + static void setExternalToolPath(HI::GUITestOpStatus &os, const QString& toolName, const QString& path, const QString& name); static QString getExternalToolPath(HI::GUITestOpStatus &os, const QString& toolName); static bool isExternalToolValid(HI::GUITestOpStatus &os, const QString& toolName); static void clearToolPath(HI::GUITestOpStatus &os, const QString& toolName); - + static bool isToolDescriptionContainsString(HI::GUITestOpStatus &os, const QString& toolName, const QString& checkIfContains); static void setTemporaryDirPath(HI::GUITestOpStatus &os, const QString &path); + static void setDocumentsDirPath(HI::GUITestOpStatus &os, const QString &path); + static void setWorkflowOutputDirPath(HI::GUITestOpStatus &os, const QString &path); private: style itemStyle; diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/BuildIndexDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/BuildIndexDialogFiller.cpp index 800892b3d6aafcc7bce6baf284dea5dd32da56b3..7afc9ab0da811339e545db4c926f9901c9bcac27 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/BuildIndexDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/BuildIndexDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/BuildIndexDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/BuildIndexDialogFiller.h index 0ea240bed68ad103913a641d10c55ad422e07f66..8ea115b0ddb87cb3645be7a7dc4c80fa56145c6a 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/BuildIndexDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/BuildIndexDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CommonImportOptionsDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CommonImportOptionsDialogFiller.cpp index 209d57c5904e52061f16cd15b928066182c267e8..68cac457bbf5195607d97894b7743bb83f2ebba7 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CommonImportOptionsDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CommonImportOptionsDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CommonImportOptionsDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CommonImportOptionsDialogFiller.h index 6a7403458abc595650938a3039b6f2007c9daacf..f0ddde2072da84ab1c0c4a9d07080b76a447b70a 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CommonImportOptionsDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CommonImportOptionsDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ConvertAssemblyToSAMDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ConvertAssemblyToSAMDialogFiller.cpp index 4b35261298a149c56154bfd24c2d5f82c4c3e9d8..be366903265602db9dd874e56f594b2e9e4ed218 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ConvertAssemblyToSAMDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ConvertAssemblyToSAMDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ConvertAssemblyToSAMDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ConvertAssemblyToSAMDialogFiller.h index bcf193d36a781f72570a26cc8d957ebdacce025d..3aa1e3c448344fb19df9eb742fce6b40affaa12c 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ConvertAssemblyToSAMDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ConvertAssemblyToSAMDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateAnnotationWidgetFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateAnnotationWidgetFiller.cpp index 85109273f582201288ef289d4a7c4dcbc544d95e..932b0f1869318ae7be8a426ea8d7e4ac8f9d589d 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateAnnotationWidgetFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateAnnotationWidgetFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateAnnotationWidgetFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateAnnotationWidgetFiller.h index c9bfcff4c4520026be1c2ef8ba39546152eb5d5e..2fdcdb50b50f67cfc5820f46603180117b33e024 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateAnnotationWidgetFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateAnnotationWidgetFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateDocumentFromTextDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateDocumentFromTextDialogFiller.cpp index ed0d5b2dbb25fcd5633f43cfb46813c4547acb24..eb1f20ce730a1a08fde83314f369152c54158f37 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateDocumentFromTextDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateDocumentFromTextDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateDocumentFromTextDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateDocumentFromTextDialogFiller.h index 759d2effb070d915149c01cc9cf6343ea66bc15f..2224239714bcf58c0144a17ad14999f1e0ad0265 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateDocumentFromTextDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateDocumentFromTextDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateObjectRelationDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateObjectRelationDialogFiller.cpp index eb435ca2d5392882db3c534a5ff818af194ea99f..c4295b8275fc34f4543a8414fbc7ec29bfaf7b51 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateObjectRelationDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateObjectRelationDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateObjectRelationDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateObjectRelationDialogFiller.h index 520717f7e9ce4764b037c1f2b42796f895e1ac17..ecc2716b276bf0fba5ad616324f77e17275eadb6 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateObjectRelationDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateObjectRelationDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateRulerDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateRulerDialogFiller.cpp index 945f77d663421a8f50bcff19435da5a52149b486..25c65543fd221a323c690457ea8becad91e7cfe1 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateRulerDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateRulerDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateRulerDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateRulerDialogFiller.h index 046eca62b1635ff97ac19382ec1bd2b41dd81513..17a95141e12c69de4811f8f39b6c5ff04711c59b 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateRulerDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/CreateRulerDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/DownloadRemoteFileDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/DownloadRemoteFileDialogFiller.cpp index 5af7f22090586434aa5973bb046f9d5f5ebd59c2..a38b41013cbe85942ebab45d2f567120105d767c 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/DownloadRemoteFileDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/DownloadRemoteFileDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/DownloadRemoteFileDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/DownloadRemoteFileDialogFiller.h index a4aa4326cd08b050460c9656ce6e6433ee0c1c51..753f7137ddebd177758def24dde0c3c5d1bd9223 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/DownloadRemoteFileDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/DownloadRemoteFileDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditAnnotationDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditAnnotationDialogFiller.cpp index 88d74b6b63597f9c436c507574de1989dd0b16c1..0b0a63c597742377e980890bae6f598b3c4e1993 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditAnnotationDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditAnnotationDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditAnnotationDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditAnnotationDialogFiller.h index d13af4af7fa0f0fc402164ca84d3a7f7fd36694d..d1ac8d50bfff316ae4026d6040c7ba35d28149f7 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditAnnotationDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditAnnotationDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditConnectionDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditConnectionDialogFiller.cpp index 59f2e26805f9cad1e9dbc674f0c77c12ab9b6764..302650a375c5bb465225be48b9892dae9fc48e12 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditConnectionDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditConnectionDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditConnectionDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditConnectionDialogFiller.h index 8a8ac8e7e09e426a4e848edcbaf07ab760624f45..933f9420c52afe35ba0080a96f7ed293dbb4acc6 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditConnectionDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditConnectionDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditGroupAnnotationsDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditGroupAnnotationsDialogFiller.cpp index dbe2834667a58c9859a6c6b94d59d12807cd0a0e..bed45407a6093f5355fdd794f758d921e579c3d5 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditGroupAnnotationsDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditGroupAnnotationsDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditGroupAnnotationsDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditGroupAnnotationsDialogFiller.h index 4b762c80ad9072b409a9e0a6ea10fb21f6a3b772..041b65b1d6d7a0117a0236e628111a627df8e2d5 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditGroupAnnotationsDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditGroupAnnotationsDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditQualifierDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditQualifierDialogFiller.cpp index e787b98cc592b2e9572a273f9fb4af16d19d925b..2d969dd407237ca9fe49862344435f9c7041d5d9 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditQualifierDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditQualifierDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditQualifierDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditQualifierDialogFiller.h index 599dd525aa439a8b8e109fa84bcc9a9913551d78..c2bca34b36414e8bb680709d0ffd6b832f436acf 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditQualifierDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditQualifierDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditSequenceDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditSequenceDialogFiller.cpp index a98f82dbfe0ca6a8df560e7b15ef6d24cea3e75d..cfb5af82be4419ca696c4844d66df06ecee88535 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditSequenceDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditSequenceDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditSequenceDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditSequenceDialogFiller.h index e09a6096e171fa1eeccdbda61f0ae600d3162592..248be79925ed05631e25e402d733487348415a02 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditSequenceDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditSequenceDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditSettingsDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditSettingsDialogFiller.cpp index 3260d3b9d9ecb1471c53e71c7330f0339e899765..5daaeb1d766b35a60d2a1cf1fdd4b89f6febdf2a 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditSettingsDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditSettingsDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditSettingsDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditSettingsDialogFiller.h index 033e58996d0473fee7980da42ec7e70f5d20d475..0f11e34b0e86e96b46b9aa7ddd30121d1e7e7aa7 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditSettingsDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/EditSettingsDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportChromatogramFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportChromatogramFiller.cpp index c64470cf32916bab474fe71406671bd52ca9d3af..695c4b60db61c39301a758b8a9680f17edba35ab 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportChromatogramFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportChromatogramFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportChromatogramFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportChromatogramFiller.h index fd16417659f9e8dc0b89a14ff15a617d91327058..51a20cea2f058ecf2ccb9005e88b73ed9870e83d 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportChromatogramFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportChromatogramFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportDocumentDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportDocumentDialogFiller.cpp index c0dda4dffeff9d52157032d7103ce804d258c40d..1d2cfa04d357d09168381b09b894f3d6a6dac472 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportDocumentDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportDocumentDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportDocumentDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportDocumentDialogFiller.h index 2ad78d21396467b784b856008bb38dac60e057e1..57461f38de4471656fd314f003e6dedf54d18a85 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportDocumentDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportDocumentDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportImageDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportImageDialogFiller.cpp index a0560cad6254def422e2d994d0acc2f5ee6cb4e3..be92b39aeb86247091d39c34a990e0fe8250c2ef 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportImageDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportImageDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportImageDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportImageDialogFiller.h index 77fd476db7abb74442d266509793cb9873fd4931..c39d5cbed8cb572167340896ce019fe5c5a50f6d 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportImageDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ExportImageDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindQualifierDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindQualifierDialogFiller.cpp index 80668514fc106d85107cee8a01640d0c77f38d44..18f6a4e78a71fc1a59afc21de858d535b90ced85 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindQualifierDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindQualifierDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindQualifierDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindQualifierDialogFiller.h index a0d9f12660aec755ac1e8a4bc4e0361ba89f3efc..e44faf2b4609d9082c2bce9258c64cdedefab887 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindQualifierDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindQualifierDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindRepeatsDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindRepeatsDialogFiller.cpp index 7f81a658364bb2063a580ca2b6028c9b7d89c8d9..0bbc478c878735df8808f10d57c5523d029a64b5 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindRepeatsDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindRepeatsDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindRepeatsDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindRepeatsDialogFiller.h index f468358a9c2ea88f5937e3f0318e2ddd3836ebcb..b7298bff295df9ec91507f26dbc364eb71ec89b6 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindRepeatsDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindRepeatsDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindTandemsDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindTandemsDialogFiller.cpp index 1e199b04248bc471181f5f39caad351b228910f6..b3954cb1c577626814b24b86179b40e1835c1c86 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindTandemsDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindTandemsDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindTandemsDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindTandemsDialogFiller.h index 697d14f0e9357588ee3aa0782b9a8373047fd8cc..f7dac31723d6bb0b5a9b553c06a6ea1df98ff972 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindTandemsDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/FindTandemsDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/GraphLabelsSelectDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/GraphLabelsSelectDialogFiller.cpp index 36173e41160a73052d1c6e0fe0d60cd6ed47a457..c75dbaac3d8bad0208386d4dad7d189f03f090e3 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/GraphLabelsSelectDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/GraphLabelsSelectDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/GraphLabelsSelectDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/GraphLabelsSelectDialogFiller.h index f40331fdb73a4e08bac1d6e9f583d2006c6d938c..da32e46afce14a3b0f61c8e36caf89335a9fb5ab 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/GraphLabelsSelectDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/GraphLabelsSelectDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/GraphSettingsDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/GraphSettingsDialogFiller.cpp index 6363f7b4ff286a718e37ecb2c4aa9ee4770d537f..a357910154cd63e9fba99e20c0934ec58aa42ad5 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/GraphSettingsDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/GraphSettingsDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/GraphSettingsDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/GraphSettingsDialogFiller.h index ac59c437882c503e506b3f82b0aff51134032377..0b50b50237ab233574c6cad182b36374ce6ed548 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/GraphSettingsDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/GraphSettingsDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportACEFileDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportACEFileDialogFiller.cpp index 83f5bdf7aa7302f9f26bf52f953844c4c8c0ba30..109dd902b48bafb6c97fa40f40c6e5889d0be9f9 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportACEFileDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportACEFileDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportACEFileDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportACEFileDialogFiller.h index 26a1971449ed94c90d14ea6b521ed47c877556b3..0fd0741bd19de507dbf46ad5ea049ae934766a3f 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportACEFileDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportACEFileDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportAPRFileDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportAPRFileDialogFiller.cpp index 1c8b02f6d31ec5b06931342907cb31e87eedeeea..7e77b92cf028ca347391a85dcc1b9e8c5aaa38af 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportAPRFileDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportAPRFileDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportAPRFileDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportAPRFileDialogFiller.h index ed3411c72d744360ae081dcf46cae5cf3b32d438..19f1ce5569323c4b43138156727583b6dfe9d7b8 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportAPRFileDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportAPRFileDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportBAMFileDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportBAMFileDialogFiller.cpp index b47359676274df2023819286a9b47fcc474b1837..9153fe697eeb14925877f2dcc5f07fc527535561 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportBAMFileDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportBAMFileDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportBAMFileDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportBAMFileDialogFiller.h index e281eebe9f037878dd6337dc6e7652182a6ff5c4..e79abe86ddb9b2737d31a7d1b7c73526e4b2d4c5 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportBAMFileDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportBAMFileDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportOptionsWidgetFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportOptionsWidgetFiller.cpp index b94364d00863e20ace4365b9d6d839e4e1f0a8b5..2d477d6d52811d0a796a78144a6372b861884de2 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportOptionsWidgetFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportOptionsWidgetFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportOptionsWidgetFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportOptionsWidgetFiller.h index a841d2108d7d5f2681729273d4556f51bb85e99e..47c84fa2aa004bf95cafa2ad4678e981f01e4325 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportOptionsWidgetFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportOptionsWidgetFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportToDatabaseDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportToDatabaseDialogFiller.cpp index 7cfb7212afb023f3c6ab9fe61a85fa5b80c1048b..23aac3d12f33d16600db564d0d84f6e4360eabca 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportToDatabaseDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportToDatabaseDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportToDatabaseDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportToDatabaseDialogFiller.h index 78dadcf45e63309252e444605fb5e38d3dbab0c4..50ab92069272f4900487adeb4b0d0556760e5553 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportToDatabaseDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ImportToDatabaseDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ItemToImportEditDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ItemToImportEditDialogFiller.cpp index a66452a8fb011c1e959722ef57138f7d6c1dc3a9..38c820509bf079a3ba3a0c25017e1643b2c28bde 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ItemToImportEditDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ItemToImportEditDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ItemToImportEditDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ItemToImportEditDialogFiller.h index 4d5a859e55e49ef3cd38957661c9fdee888534fa..55c1d0695a7815940d27dcaa52e4bc1bc7eef015 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ItemToImportEditDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ItemToImportEditDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/PositionSelectorFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/PositionSelectorFiller.cpp index 90e7ec7897ef5e8b7507144873e043cc4484064c..3e5e423286f66cb42ff4b5c0e9a2bee0c9a6451e 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/PositionSelectorFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/PositionSelectorFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/PositionSelectorFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/PositionSelectorFiller.h index 1ec59b0d770cf42f638c801c04e8d2eed09c5310..a4c9d45a60bce5e23e88e64a9ad2e218b8306da4 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/PositionSelectorFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/PositionSelectorFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/PredictSecondaryStructureDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/PredictSecondaryStructureDialogFiller.cpp index 9b1c0a635b1b9d4fcc59e2a84d5cf62807eaafe8..245c674485d2ef46ccf1abbc1cc054b7e20db1e5 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/PredictSecondaryStructureDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/PredictSecondaryStructureDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/PredictSecondaryStructureDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/PredictSecondaryStructureDialogFiller.h index 521c4a8004eefc57d86a71a01c7827315e4afb95..c7d3ff711fa00784cf8cef11d4c09943220c48df 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/PredictSecondaryStructureDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/PredictSecondaryStructureDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ProjectTreeItemSelectorDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ProjectTreeItemSelectorDialogFiller.cpp index ad15014fce4741595be9a3cc4102093d9eb9799d..045bc716bf6b762b9e8cd85b1085cd9795e18743 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ProjectTreeItemSelectorDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ProjectTreeItemSelectorDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ProjectTreeItemSelectorDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ProjectTreeItemSelectorDialogFiller.h index 2c6785a180b1257578c60c0e58a947c42a3d6297..43bc668d74a2469bc48ada594769841f738ea6e4 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ProjectTreeItemSelectorDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ProjectTreeItemSelectorDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RangeSelectionDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RangeSelectionDialogFiller.cpp index 4a31b3861649ccc53e025700f52b13bb4d9fca63..b5f66aafe2dea695aa110938601d8f1508c7e9de 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RangeSelectionDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RangeSelectionDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RangeSelectionDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RangeSelectionDialogFiller.h index 8041f4dddab6fbdbb186670414e1f0865b3aaad4..8f88fd62a49873fc03c7e0821e3e23819682b745 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RangeSelectionDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RangeSelectionDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RangeSelectorFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RangeSelectorFiller.cpp index 3b3cefd295a7b76ce0c52f805178df49637e358f..4471227458d3a9fe25152499211053ba9c79a153 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RangeSelectorFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RangeSelectorFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RangeSelectorFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RangeSelectorFiller.h index e862ff66b4684df48cd95c4f55e01904e388e898..75c2c1b666a49bf483d86d59525c139d76b34ce0 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RangeSelectorFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RangeSelectorFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RemovePartFromSequenceDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RemovePartFromSequenceDialogFiller.cpp index c4e83ec7e7f04a450d8d88d9686acdcd90d0b6d2..add1af72a428a316ddad0eae1b812cffce3f1fdd 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RemovePartFromSequenceDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RemovePartFromSequenceDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RemovePartFromSequenceDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RemovePartFromSequenceDialogFiller.h index cd2a747b47b9376fcaa8a48b4505584b3cd9c977..aa09fb94fbd0f4a86027caa8cf62acede9769b5e 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RemovePartFromSequenceDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/RemovePartFromSequenceDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ReplaceSubsequenceDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ReplaceSubsequenceDialogFiller.cpp index a8f529c9f346ef2eb9151a33b5837671b92c2fda..aa2b1481140f4f325b699d5d11d19eaa0f14e507 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ReplaceSubsequenceDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ReplaceSubsequenceDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ReplaceSubsequenceDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ReplaceSubsequenceDialogFiller.h index cfc7bb0abbb52fb0c481436bab1c80881ace046c..9d3f47c20607a8bf82090e37eadec44f2a80e331 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ReplaceSubsequenceDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/ReplaceSubsequenceDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/SetSequenceOriginDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/SetSequenceOriginDialogFiller.cpp index 8cd742854e15b42552a0e79d094f051adba8a91c..5dfc4c9e1d01694b57fd9644529d590bd7f1ee1d 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/SetSequenceOriginDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/SetSequenceOriginDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/SetSequenceOriginDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/SetSequenceOriginDialogFiller.h index 84010f867856101773460791a6a7e1af17bdb229..f3d9ced5882a3f60425f8cf0b2c5068c34ec901c 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/SetSequenceOriginDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/SetSequenceOriginDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/SharedConnectionsDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/SharedConnectionsDialogFiller.cpp index 5e83a22c2e36aa881baaa0a2c6fc952e37ab729e..47e2e4fbadb522e8ab1353e8e486af9fee83aafd 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/SharedConnectionsDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/SharedConnectionsDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/SharedConnectionsDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/SharedConnectionsDialogFiller.h index 8af0351f28895e5bd3e4a11aebc993d246d32cda..05d02045cdf02fac585714e4d1268122cfebf41c 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/SharedConnectionsDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/SharedConnectionsDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/util/RenameSequenceFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/util/RenameSequenceFiller.cpp index 7c590983dcb1ff62db03aadc0a8fe7326c632e45..c38f4045b25366667f34b58ebc70714b2be22ff1 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/util/RenameSequenceFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/util/RenameSequenceFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/util/RenameSequenceFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/util/RenameSequenceFiller.h index 5001b1c9731fed6a9811b5e4e7ccd0506dfdc91e..f0c75740b4c0afb2e027d69f93d15d418657a50a 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/util/RenameSequenceFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2Gui/util/RenameSequenceFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportConsensusDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportConsensusDialogFiller.cpp index 74eeac7248c1a8546a5503cb8ffd982e1b3edd84..a5ea2e9a41633f7d751d6f56a25d140606f97889 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportConsensusDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportConsensusDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportConsensusDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportConsensusDialogFiller.h index 38e506dd6bc00c22255cf1b4bb6e7c9fd44cf1af..e470d0265e2acab1729b4f37fb06bc04d40eee9f 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportConsensusDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportConsensusDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportCoverageDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportCoverageDialogFiller.cpp index 7d88d08f5eafb1cd8bf4f9aa51b470b3a0026501..47054fb2ca6d1e7a35ae6129427f1da5ae41b943 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportCoverageDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportCoverageDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportCoverageDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportCoverageDialogFiller.h index 0133bbae1dd3e8510155fb09561fb2444df82834..26d5c1b59f9f5a84ef61ffab52d911e53b571f30 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportCoverageDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportCoverageDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportReadsDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportReadsDialogFiller.cpp index c0523f695bef4ef12e4168a71d8cb2a484f48c60..332d51bae776983d79a2b1c6ea605e154ed9425e 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportReadsDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportReadsDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportReadsDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportReadsDialogFiller.h index 9f710f1b543e07bac1a168a8fdf63b6cd59d1732..f9b9ed077cadbd0ae51e7f6f90bd4e9085ee60cb 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportReadsDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExportReadsDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExtractAssemblyRegionDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExtractAssemblyRegionDialogFiller.cpp index b0d8fbd3c907780b5d4f060d5440d1a6d7e1b45a..2e588990d40dd1ade76670e4ba74781a4b450ab0 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExtractAssemblyRegionDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExtractAssemblyRegionDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExtractAssemblyRegionDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExtractAssemblyRegionDialogFiller.h index 6759c704e0bc04860da2fe6b18eb6a229dc89c63..bff81386c540de7c286288ee940a83526308d5a2 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExtractAssemblyRegionDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_assembly/ExtractAssemblyRegionDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/BranchSettingsDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/BranchSettingsDialogFiller.cpp index 7bc6aedf440ab8a0d69695ef9ab90a4f8d0b8b0a..9d4f4023e7eab9d471f4b79beeb35a30bd2595fa 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/BranchSettingsDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/BranchSettingsDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/BranchSettingsDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/BranchSettingsDialogFiller.h index 7c28c5f162dd0a00a0b4a990806f561130450e95..cabf4b128e963d3332b7968cbf160ae42289d1c2 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/BranchSettingsDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/BranchSettingsDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/BuildTreeDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/BuildTreeDialogFiller.cpp index 41a6d55a560cbc960492b891d6b07d8a8023108d..0d230b7854e70ae53eddadd399bb70da36401270 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/BuildTreeDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/BuildTreeDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/BuildTreeDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/BuildTreeDialogFiller.h index 666fa35f1789f786fc7984a7c0cfa3d8ee0c03e3..868802b3e5c5749a59032bca8c059dcadd41c23f 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/BuildTreeDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/BuildTreeDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/DeleteGapsDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/DeleteGapsDialogFiller.cpp index 04906696d754ce19f9a809ee3774d98c9d48b3ed..d64750ca165fa34c150edcd3f389e7c778c28f3c 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/DeleteGapsDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/DeleteGapsDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/DeleteGapsDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/DeleteGapsDialogFiller.h index e6034004cd4e0e9b78c320a6c258937dc0766ae4..d32381dfdc8564de5dd3ce8552352d27c3b8a8a7 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/DeleteGapsDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/DeleteGapsDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/DistanceMatrixDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/DistanceMatrixDialogFiller.cpp index 747416d3a939c898856b0f10f96c14211143a455..22e81a7cb458b9fdfc0420ab77ea47055cea7331 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/DistanceMatrixDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/DistanceMatrixDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/DistanceMatrixDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/DistanceMatrixDialogFiller.h index 2c11f7d2838e4efc77d7d2ce73698aed64423219..9dc69d329759e3fa6b0ebd451659ce9929dc1584 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/DistanceMatrixDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/DistanceMatrixDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/ExportHighlightedDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/ExportHighlightedDialogFiller.cpp index bafb9ac5d79d6c31181fdbd2199e2d93fdfaca59..11d2a81cb0d86ad72c810cbb1416b4526b7e4f13 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/ExportHighlightedDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/ExportHighlightedDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/ExportHighlightedDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/ExportHighlightedDialogFiller.h index 89a62f4050442582a2fa2a8e7f86b0b699ba3369..175638960acaeeb6591854dcac0b6b7969b9fa9f 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/ExportHighlightedDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/ExportHighlightedDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/ExtractSelectedAsMSADialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/ExtractSelectedAsMSADialogFiller.cpp index e2816c90421d433941dee989878dc457f202f4bf..6b2da5f91313eb228626d9f17b35a6ad11f444af 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/ExtractSelectedAsMSADialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/ExtractSelectedAsMSADialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/ExtractSelectedAsMSADialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/ExtractSelectedAsMSADialogFiller.h index 472b7b521c4753c1893ab64ae0d13b55f18ee8cb..27771f3b4625017d2cbb7498acb6024452d22a6e 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/ExtractSelectedAsMSADialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/ExtractSelectedAsMSADialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/GenerateAlignmentProfileDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/GenerateAlignmentProfileDialogFiller.cpp index 3944b02c5bb2cc4203ce80914c178a3683b2509f..ca37caee58554c43aaeff9f20de18efeb192da84 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/GenerateAlignmentProfileDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/GenerateAlignmentProfileDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/GenerateAlignmentProfileDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/GenerateAlignmentProfileDialogFiller.h index 6049d6ca0daad1c42e34b49b5b9a161839e7b9a7..c12624e57e82b52f3f651896d0ba819950004ad4 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/GenerateAlignmentProfileDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/GenerateAlignmentProfileDialogFiller.h @@ -1,7 +1,7 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/LicenseAgreementDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/LicenseAgreementDialogFiller.cpp index 7394f8b029654e75913df70467c66ff78de76a29..39774458cae34ad9fc739c24f56a3d0f65edf7dd 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/LicenseAgreementDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/LicenseAgreementDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/LicenseAgreementDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/LicenseAgreementDialogFiller.h index b5d07805342769621e8494bba4410f6af240dec7..355d35afbdf92898b2f4c6170cf276eef106c1f4 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/LicenseAgreementDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/ov_msa/LicenseAgreementDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/utils_smith_waterman/SmithWatermanDialogBaseFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/utils_smith_waterman/SmithWatermanDialogBaseFiller.cpp index a5396b64f967b84b271c40a8c6152cd6d9d30c9c..955c98ef29f9856cc1ad077d1656b4cfb97cd11f 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/utils_smith_waterman/SmithWatermanDialogBaseFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/utils_smith_waterman/SmithWatermanDialogBaseFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/utils_smith_waterman/SmithWatermanDialogBaseFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/utils_smith_waterman/SmithWatermanDialogBaseFiller.h index 4e4242fd0785c8069434f4001b72abb94080a842..fdcc672868c7dd3ffaa657bad5f708dcbe074c9a 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/utils_smith_waterman/SmithWatermanDialogBaseFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/corelibs/U2View/utils_smith_waterman/SmithWatermanDialogBaseFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/annotator/FindAnnotationCollocationsDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/annotator/FindAnnotationCollocationsDialogFiller.cpp index 47c54610a289000fcd475c633924c952c024cdb7..9874b2b95fb186dd44a89e6781c6f744d01106d7 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/annotator/FindAnnotationCollocationsDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/annotator/FindAnnotationCollocationsDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/annotator/FindAnnotationCollocationsDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/annotator/FindAnnotationCollocationsDialogFiller.h index 88190d6afa4e53f40f5bd870586634f6747f25f9..2d03c3492f12b984be5c73045f80af5e7e1d7fad 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/annotator/FindAnnotationCollocationsDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/annotator/FindAnnotationCollocationsDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/biostruct3d_view/StructuralAlignmentDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/biostruct3d_view/StructuralAlignmentDialogFiller.cpp index 01e92e979ad57a172c17808c6cbd0e100cf0e37d..1132ef67a9e6ee5c8bdb6040552cac23216e069c 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/biostruct3d_view/StructuralAlignmentDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/biostruct3d_view/StructuralAlignmentDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/biostruct3d_view/StructuralAlignmentDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/biostruct3d_view/StructuralAlignmentDialogFiller.h index 84472eddd63ac62c8d7008135d47c206ed81b5f7..8df165686ee69587c51b8db24169cc876fdd8a33 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/biostruct3d_view/StructuralAlignmentDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/biostruct3d_view/StructuralAlignmentDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/cap3/CAP3SupportDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/cap3/CAP3SupportDialogFiller.cpp index 1ee0db3b25ec2f1da8e226bc6b9bbf26ad2418bc..4952004596f07429635c2da6615b2d54bfc194a6 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/cap3/CAP3SupportDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/cap3/CAP3SupportDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/cap3/CAP3SupportDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/cap3/CAP3SupportDialogFiller.h index c386112fdd7f8b04bb78812c46dedd2d2182a0f2..87fba283878b70244055923fc5157a9985f4c52f 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/cap3/CAP3SupportDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/cap3/CAP3SupportDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportAnnotationsDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportAnnotationsDialogFiller.cpp index a8eb618bebe7642e6f0f5646e26b26df91a4e5f7..9df880a0e064b4727d9e5fcfb2b9af0e5c5d874b 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportAnnotationsDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportAnnotationsDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportAnnotationsDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportAnnotationsDialogFiller.h index 1cdfffa8d17ba88e2de561d55ba401f261016fa6..5a31398bb85237cb1e7fcfd33cdc388975a16a50 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportAnnotationsDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportAnnotationsDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportBlastResultDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportBlastResultDialogFiller.cpp index fec551d6dbcf155e382d4ee0ddc26802c6415d84..0f38b1272b86f22fc978e05ba3960722ad0298a9 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportBlastResultDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportBlastResultDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportBlastResultDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportBlastResultDialogFiller.h index 8ac2adc5e68905681ba9626d1bb8adc1b3177469..f3d26a93922cbd4e0560946df3c206b744189553 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportBlastResultDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportBlastResultDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportMSA2MSADialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportMSA2MSADialogFiller.cpp index 4b80e953eb49126e5649a7020e1de26352efeaa3..15ce2e1e098c47f6195ea0f4e02e7d9d8e7c8c78 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportMSA2MSADialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportMSA2MSADialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportMSA2MSADialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportMSA2MSADialogFiller.h index ef7582afc6af9e4607a214177d5fc8fc1df99bda..5a9456c814f3bcdc60306b75fe91ea3a83026759 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportMSA2MSADialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportMSA2MSADialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportMSA2SequencesDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportMSA2SequencesDialogFiller.cpp index 6a1b23b013fc962f8097210ec921a1d299225a91..5cb448bd8cb0a8dc0adc90c1d1c45fda233d1fe2 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportMSA2SequencesDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportMSA2SequencesDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportMSA2SequencesDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportMSA2SequencesDialogFiller.h index af2029116531472dda8d0e0d1cc9ff5f89b9e240..0f96e7147e4bd0d051545020d5e532b50a9973e4 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportMSA2SequencesDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportMSA2SequencesDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSelectedSequenceFromAlignmentDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSelectedSequenceFromAlignmentDialogFiller.cpp index 903b847d5e215b7fb68e3dfe4aa1723390d4439d..e2a0c11470d0848f5d62ca64285e4b7b4066d456 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSelectedSequenceFromAlignmentDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSelectedSequenceFromAlignmentDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSelectedSequenceFromAlignmentDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSelectedSequenceFromAlignmentDialogFiller.h index fb79b143ebfa3e2855362bc1314239b974cb5c00..933ab8e8bef797e53fe9209e9b36d023f8b2e68d 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSelectedSequenceFromAlignmentDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSelectedSequenceFromAlignmentDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSequences2MSADialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSequences2MSADialogFiller.cpp index a5e3d45774d8aae480461984f333b9507def6098..56fd305683983282043984db316141a9b7a51fcc 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSequences2MSADialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSequences2MSADialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSequences2MSADialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSequences2MSADialogFiller.h index d6683a420e53193630600d8e486e883af7a9bceb..9c88dfebf108a85ed69e1e9790154971abba2165 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSequences2MSADialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSequences2MSADialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSequencesDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSequencesDialogFiller.cpp index 483d8b1568cfeee2ffa5a38f7aa930be5a7ff8c3..467bf0f8c5324ca1ceda6e6a097983678cbc81bc 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSequencesDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSequencesDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSequencesDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSequencesDialogFiller.h index f98403e5a327f666a6e42b2a936ab7fcc85890ca..3f334655a7fa255720fb0bbcf1a598a7dafed60c 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSequencesDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ExportSequencesDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ImportAnnotationsToCsvFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ImportAnnotationsToCsvFiller.cpp index 7a22e6de7045c08e85185d310c6d993693d7f0e0..c1bd30dfe889685d7fde3eb14f4dacc265d86388 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ImportAnnotationsToCsvFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ImportAnnotationsToCsvFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ImportAnnotationsToCsvFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ImportAnnotationsToCsvFiller.h index 702e4a3d934f3e542e91b0153640412286e8e628..e565e4c0b4fbdf4d6fcc4b9f448ca32807e42efe 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ImportAnnotationsToCsvFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dna_export/ImportAnnotationsToCsvFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dotplot/BuildDotPlotDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dotplot/BuildDotPlotDialogFiller.cpp index b1ac31bc0b032c670498fd630c824f426c33764a..37ae923ab59a32566662e4c4100887b82f2555ca 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dotplot/BuildDotPlotDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dotplot/BuildDotPlotDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dotplot/BuildDotPlotDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dotplot/BuildDotPlotDialogFiller.h index 8009df55ee4831703e261fe5c20837d1667653d7..2bf4307767abb6cfa8c7889ae62ab481a8577937 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dotplot/BuildDotPlotDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dotplot/BuildDotPlotDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dotplot/DotPlotDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dotplot/DotPlotDialogFiller.cpp index 0ac3848103e26ee7aca10ac6e6fbfa4bce381df4..dd6b459f5203a290fea9b995584991fd2d1c20b7 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dotplot/DotPlotDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dotplot/DotPlotDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dotplot/DotPlotDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dotplot/DotPlotDialogFiller.h index 9e6ca13bdf473c7a453cb4c4f0df1fdf5f00dea1..d5e40a25d7f8a6d72fdd87baf6de6491da06665b 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/dotplot/DotPlotDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/dotplot/DotPlotDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/ConstructMoleculeDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/ConstructMoleculeDialogFiller.cpp index 412fbf5809d36707d476da9f2c7a35713ca9afba..3507c6d521929a276d1cf8d5d2258b5e3eaa67b7 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/ConstructMoleculeDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/ConstructMoleculeDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -61,6 +61,9 @@ void ConstructMoleculeDialogFiller::commonScenario() { case ClickCancel: clickCancel(); break; + case ClickOk: + clickOk(); + break; default: GT_CHECK(false, "An unrecognized action type"); } @@ -90,6 +93,12 @@ void ConstructMoleculeDialogFiller::clickCancel() { } #undef GT_METHOD_NAME +#define GT_METHOD_NAME "clickOk" +void ConstructMoleculeDialogFiller::clickOk() { + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); +} +#undef GT_METHOD_NAME + #undef GT_CLASS_NAME } // namespace U2 diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/ConstructMoleculeDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/ConstructMoleculeDialogFiller.h index d8eb575900d8edc2d13434c516f6d81153901e9c..c3b1483b563c14b637e0304b80079989c1920177 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/ConstructMoleculeDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/ConstructMoleculeDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,7 +32,8 @@ public: enum ActionType { // an appropriate action data AddAllFragments, // ignored InvertAddedFragment, // QString with a part of the fragment name, if several fragments match this part, the first one will be inverted - ClickCancel // ignored + ClickCancel, // ignored + ClickOk }; typedef QPair<ActionType, QVariant> Action; @@ -45,6 +46,7 @@ private: void addAllFragments(); void invertAddedFragment(const QVariant &actionData); void clickCancel(); + void clickOk(); QWidget *dialog; const QList<Action> actions; diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/CreateFragmentDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/CreateFragmentDialogFiller.cpp index f0952f0f61b03482bd738fb238333a97e5d881e3..c32bdf97e371ddae3bd65f619a627fe756324a29 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/CreateFragmentDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/CreateFragmentDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/CreateFragmentDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/CreateFragmentDialogFiller.h index 948b9d1c571a4c05654c98df2196220a21710863..a4fcddd030d02ebe0e8a5002dbb974f1f492b81f 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/CreateFragmentDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/CreateFragmentDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/DigestSequenceDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/DigestSequenceDialogFiller.cpp index 5fd742a21fd931ef631548f1d98b86b3c92d6297..e1e8f3438fc36ed1ff028ab4646a75706607fc72 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/DigestSequenceDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/DigestSequenceDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/DigestSequenceDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/DigestSequenceDialogFiller.h index 6816bc667de047dfcc7761ac2a8f2b9569b2bea9..06640e0fede7054504664cde58a730d2fddc688f 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/DigestSequenceDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/DigestSequenceDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/EditFragmentDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/EditFragmentDialogFiller.cpp index e2456a08f41febef663426874279cdf8f5c9285f..682177347025e9d9753cf5a06c0a3dd5d45aad34 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/EditFragmentDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/EditFragmentDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/EditFragmentDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/EditFragmentDialogFiller.h index e1b5e9cb51dfd8b9e0dfcca5eb741a4120430e00..582c5e4921dd041715660f61c1143b1e5dcd3cc3 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/EditFragmentDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/EditFragmentDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/FindEnzymesDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/FindEnzymesDialogFiller.cpp index 7d8b2ec3b99f44bcaafaa7fadae5d055ea3a7181..21e630486d8954b6db04857a2a11e41bfec87ad8 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/FindEnzymesDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/FindEnzymesDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/FindEnzymesDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/FindEnzymesDialogFiller.h index 20b1d17174c0be33030680d9dce8a1cd4fa62d13..a4aa2a8392a5bef9b132fc3e082aed353b1e509a 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/FindEnzymesDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/enzymes/FindEnzymesDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/AlignToReferenceBlastDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/AlignToReferenceBlastDialogFiller.cpp index 4fbaa9bdc26e46c61aa565bbc4ac36506a50f2b5..2b37f062b07b54fab5db18e126f55f7782e94b80 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/AlignToReferenceBlastDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/AlignToReferenceBlastDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/AlignToReferenceBlastDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/AlignToReferenceBlastDialogFiller.h index 9b7500f0a27002e630d7b1c89e4d3a73c99bbf63..efecdeab9fabfe331ee9aa1ae9bba37af9654c6e 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/AlignToReferenceBlastDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/AlignToReferenceBlastDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/BlastAllSupportDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/BlastAllSupportDialogFiller.cpp index e3ffaf1350ad2565cc0dccd81c3c2de316c3bd2c..8216a55dfae0a50d0f3f3708f02bfb85fb46e387 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/BlastAllSupportDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/BlastAllSupportDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/BlastAllSupportDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/BlastAllSupportDialogFiller.h index 1f3204cb5e48d89bafe7f6f70227f3721656ef27..efe1412ecb96d470c5932fd837ab149ec4a8e9f9 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/BlastAllSupportDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/BlastAllSupportDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/ClustalOSupportRunDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/ClustalOSupportRunDialogFiller.cpp index 7faac257dbe16cc68e8ba33a0a1a13a0b636bf64..a1c2211d437561383b076f20bd8af9c3c5326cc5 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/ClustalOSupportRunDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/ClustalOSupportRunDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/ClustalOSupportRunDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/ClustalOSupportRunDialogFiller.h index d233e934ff93b26f403c0e5068d22d36b8919d9f..1a62077197031541787aaf06aaf7961848d55552 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/ClustalOSupportRunDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/ClustalOSupportRunDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/FormatDBDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/FormatDBDialogFiller.cpp index e00ddd8595c11e6557ccea142c36ee9097835b40..a3c1b5a61676dc1cbabbdb61e40fa17676a79a88 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/FormatDBDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/FormatDBDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/FormatDBDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/FormatDBDialogFiller.h index 1e6cf5964017f18c99b29624edb78ec99c0d9a0a..2af24c45b6d76ba50e3ee364b16343be88d51f62 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/FormatDBDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/FormatDBDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/RemoteBLASTDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/RemoteBLASTDialogFiller.cpp index 0a32e57e84bd1d418d95598c5cab9a8c72472d1e..8494462a2453e760fbfd42e0d5bd7caef9dd4d4a 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/RemoteBLASTDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/RemoteBLASTDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/RemoteBLASTDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/RemoteBLASTDialogFiller.h index 4d4762c0ccdfa4b60ca176849d0fa4bffe864c51..92d4a9bc3192c368caef3343b0808048247f6303 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/RemoteBLASTDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/RemoteBLASTDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/SnpEffDatabaseDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/SnpEffDatabaseDialogFiller.cpp index 088d4262449d7d75173ac4882466134067372524..24d2350774308883f20cfaa1ba7ec1fa8aae659c 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/SnpEffDatabaseDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/SnpEffDatabaseDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/SnpEffDatabaseDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/SnpEffDatabaseDialogFiller.h index ec97063c96c27355ae14c28d3b62ee0a0b41bb12..9e80e0320b5f60a26ae8b745c2804cddae358c29 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/SnpEffDatabaseDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/SnpEffDatabaseDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/SpadesGenomeAssemblyDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/SpadesGenomeAssemblyDialogFiller.cpp index 18f080007da42a11b11cc476173cafd0fb0339b2..90296c0b8cbd4a254d133c74254c5033c3008b88 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/SpadesGenomeAssemblyDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/SpadesGenomeAssemblyDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/SpadesGenomeAssemblyDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/SpadesGenomeAssemblyDialogFiller.h index 60ed3f465a9ae54cceb4e3d347a83f0641fafa1a..0ed9cc99d224d02398f308e782e1fe452552a8cc 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/SpadesGenomeAssemblyDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/SpadesGenomeAssemblyDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/TCoffeeDailogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/TCoffeeDailogFiller.cpp index c520871c302cd03c0145ddf4b5e32e45830507ca..9d57eceb0bb49d816987ff3c6a3d4288e8d47d0e 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/TCoffeeDailogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/TCoffeeDailogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/TCoffeeDailogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/TCoffeeDailogFiller.h index 97fdd0c3e3e8ecabb872fb94b3840614c7c43ac2..8ef5863d7e657d0cc8e746c55180e036dc08f143 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/TCoffeeDailogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/TCoffeeDailogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/TrimmomaticDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/TrimmomaticDialogFiller.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2658a182929a96cb1e8dfe7e7f74a7aba7449027 --- /dev/null +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/TrimmomaticDialogFiller.cpp @@ -0,0 +1,36 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "TrimmomaticDialogFiller.h" + +namespace U2 { + +using namespace HI; + +#define GT_CLASS_NAME "TrimmomaticDialogFiller" + +TrimmomaticDialogFiller::TrimmomaticDialogFiller(HI::GUITestOpStatus &os, CustomScenario *customScenario) : + Filler(os, "TrimmomaticPropertyDialog", customScenario) {} + + + +#undef GT_CLASS_NAME +} diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/TrimmomaticDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/TrimmomaticDialogFiller.h new file mode 100644 index 0000000000000000000000000000000000000000..fab9c74cb0f2ebaa4312fa95ea35e01ddd94bc08 --- /dev/null +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/external_tools/TrimmomaticDialogFiller.h @@ -0,0 +1,40 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef TRIMMOMATIC_DIALOG_FILLER_H +#define TRIMMOMATIC_DIALOG_FILLER_H + +#include <base_dialogs/GTFileDialog.h> + +namespace U2 { + +using namespace HI; + +class TrimmomaticDialogFiller : public Filler { +public: + TrimmomaticDialogFiller(HI::GUITestOpStatus &os, CustomScenario *customScenario); + + //void commonScenario(); +}; + +} + +#endif // TRIMMOMATIC_DIALOG_FILLER_H diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/ngs_classification/GenomicLibraryDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/ngs_classification/GenomicLibraryDialogFiller.cpp new file mode 100644 index 0000000000000000000000000000000000000000..559fc72f42893450d5846768fb3fc25e4be2ebec --- /dev/null +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/ngs_classification/GenomicLibraryDialogFiller.cpp @@ -0,0 +1,71 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QApplication> +#include <QFileInfo> + +#include "GenomicLibraryDialogFiller.h" +#include "GTUtilsWorkflowDesigner.h" + +namespace U2 { +using namespace HI; + +GenomicLibraryDialogFiller::GenomicLibraryDialogFiller(GUITestOpStatus &os, const QStringList &_urls) + : Filler(os, "GenomicLibraryDialog"), + urls(_urls) +{ + +} + +#define GT_CLASS_NAME "GenomicLibraryDialogFiller" +#define GT_METHOD_NAME "commonScenario" +void GenomicLibraryDialogFiller::commonScenario() { + QWidget *dialog = QApplication::activeModalWidget(); + GT_CHECK(nullptr != dialog, "activeModalWidget is nullptr"); + + QStringList dirUrls; + QStringList fileUrls; + foreach (const QString &url, urls) { + QFileInfo fileInfo(url); + GT_CHECK(fileInfo.exists(), QString("'%1' doesn't exist").arg(url)); + if (QFileInfo(url).isFile()) { + fileUrls << url; + } else if (fileInfo.isDir()) { + dirUrls << url; + } else { + GT_CHECK(false, QString("An unknown entry: '%1'").arg(url)); + } + } + + if (!fileUrls.isEmpty()) { + GTUtilsWorkflowDesigner::setDatasetInputFiles(os, fileUrls); + } + + if (!dirUrls.isEmpty()) { + GTUtilsWorkflowDesigner::setDatasetInputFolders(os, dirUrls); + } + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); +} +#undef GT_METHOD_NAME +#undef GT_CLASS_NAME + +} // namespace U2 diff --git a/src/corelibs/U2Designer/src/dashboard/ParametersWidget.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/ngs_classification/GenomicLibraryDialogFiller.h similarity index 64% rename from src/corelibs/U2Designer/src/dashboard/ParametersWidget.h rename to src/plugins/GUITestBase/src/runnables/ugene/plugins/ngs_classification/GenomicLibraryDialogFiller.h index 5021e150214db57f8df336fa30c2b294713c4bd5..6b25e09a50e277487538a18e3d0da38f49b539f3 100644 --- a/src/corelibs/U2Designer/src/dashboard/ParametersWidget.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/ngs_classification/GenomicLibraryDialogFiller.h @@ -19,31 +19,23 @@ * MA 02110-1301, USA. */ -#ifndef _U2_PARAMETERS_WIDGET_H_ -#define _U2_PARAMETERS_WIDGET_H_ - -#include "Dashboard.h" +#ifndef _U2_GENOMIC_LIBRARY_DIALOG_FILLER_H_ +#define _U2_GENOMIC_LIBRARY_DIALOG_FILLER_H_ +#include "utils/GTUtilsDialog.h" namespace U2 { +using namespace HI; -using namespace Workflow::Monitor; - -struct ParametersWidgetTab { - QString tabName; - QMap<QString, QString> paramsWithValues; -}; - -class ParametersWidget : public DashboardWidget { - Q_OBJECT +class GenomicLibraryDialogFiller : public Filler { public: - ParametersWidget(const QWebElement &container, Dashboard *parent); - - void createWidget(const QList<WorkerParamsInfo> &workersParamsInfo); + GenomicLibraryDialogFiller(GUITestOpStatus &os, const QStringList& urls); + void commonScenario(); - static const QString ID; +private: + const QStringList urls; }; -} // namespace U2 +} // namespace U2 -#endif +#endif // _U2_GENOMIC_LIBRARY_DIALOG_FILLER_H_ diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/orf_marker/OrfDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/orf_marker/OrfDialogFiller.cpp index 3f4f2544f8b76419662510a8d5e9f40acddda5e9..1962e2c19a2d3cb73700143bbd09495ed4446440 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/orf_marker/OrfDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/orf_marker/OrfDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/orf_marker/OrfDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/orf_marker/OrfDialogFiller.h index 5c2cccd7e939b1fe725c6dfa36b4a6ef21f694d5..89d2fb06af1434fb43044a0576429f03e4042b3a 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/orf_marker/OrfDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/orf_marker/OrfDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/AddPrimerDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/AddPrimerDialogFiller.cpp index 8e4201fc3459208351834606bf55b60fd5edeaf9..0d2698bb3c610954a6f9e0a65a64be7b679bce4c 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/AddPrimerDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/AddPrimerDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/AddPrimerDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/AddPrimerDialogFiller.h index 00b0fc5cf2be2ecc0bf4826dbe15703f3536bac9..0b382fc39ce86b20f4626a5ab31717d98276fabe 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/AddPrimerDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/AddPrimerDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/ExportPrimersDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/ExportPrimersDialogFiller.cpp index 82906ebe56c3f3a5446b2f3ad6189e224746438d..9e6bfa8df2d420701697873bd1cbb65652d32999 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/ExportPrimersDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/ExportPrimersDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/ExportPrimersDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/ExportPrimersDialogFiller.h index 7c4554d19d07e8cf7b6f3366aeb5e9b349c103d2..505e68477e333b3d32f2e52cedf520f8872aa695 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/ExportPrimersDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/ExportPrimersDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/ImportPrimersDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/ImportPrimersDialogFiller.cpp index 3462ba2d7b9775afa639c6614bfb746a72a8d37d..2e2f10f9d1eb4ba8f83373b7653406b36d1b42f0 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/ImportPrimersDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/ImportPrimersDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/ImportPrimersDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/ImportPrimersDialogFiller.h index e7474e602fdb2efe0ef721531b9dedeca557ed44..977581e195d7e8d27ff730c0ead46113eafe5150 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/ImportPrimersDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/ImportPrimersDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/PrimerLibrarySelectorFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/PrimerLibrarySelectorFiller.cpp index 8a44517b4d87fdbb4a24ac05ecc5f733fc0ef4aa..3cd7f98634624afcf82fa52ae1e5936e1b2cc777 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/PrimerLibrarySelectorFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/PrimerLibrarySelectorFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/PrimerLibrarySelectorFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/PrimerLibrarySelectorFiller.h index 32b8c075dc973d440c83b681656efb90384eb7a2..736b11ffa14c7e8f5fb0db5c473f5a7387ad4b4b 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/PrimerLibrarySelectorFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/PrimerLibrarySelectorFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/PrimersDetailsDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/PrimersDetailsDialogFiller.cpp index cb924ec9310e258a4c203336c07f8fa8aab9cf92..b5d452ad1363191a213ff4d4fe995678fb8f466d 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/PrimersDetailsDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/PrimersDetailsDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/PrimersDetailsDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/PrimersDetailsDialogFiller.h index ce429c578658cced975d6e394e2548fb79e8d8c4..056dbb04c3b9b6db116761c6c76eec5f6e4308a0 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/PrimersDetailsDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/pcr/PrimersDetailsDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/weight_matrix/PwmBuildDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/weight_matrix/PwmBuildDialogFiller.cpp index 4d5be5e35ab69d031615b2d977831a1ae71aa086..87985f106fa1f795a326da2b4aed683041eb4ba2 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/weight_matrix/PwmBuildDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/weight_matrix/PwmBuildDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/weight_matrix/PwmBuildDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/weight_matrix/PwmBuildDialogFiller.h index 69f76a37b74209693533cdff222a2fb0f26f8e18..c5034e485f0a6724959b27008d3657c35a662c6d 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/weight_matrix/PwmBuildDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/weight_matrix/PwmBuildDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/weight_matrix/PwmSearchDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/weight_matrix/PwmSearchDialogFiller.cpp index 82a3479b8c521c2a9b72d627d85b4c2cc939a805..ac4a6f286c940dc2031940e974d9a3abcb69bb16 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/weight_matrix/PwmSearchDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/weight_matrix/PwmSearchDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/weight_matrix/PwmSearchDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/weight_matrix/PwmSearchDialogFiller.h index b6213e05273b1882665359dbf55069615d28899d..a5ce385d79f8824a831788f44c080bf78fe1ff57 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/weight_matrix/PwmSearchDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/weight_matrix/PwmSearchDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/AliasesDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/AliasesDialogFiller.cpp index 2badc45739d45ada9c0bc822ab8e75b2beb37220..bcef949590ab979d4ef612c73b12224ac54cb137 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/AliasesDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/AliasesDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/AliasesDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/AliasesDialogFiller.h index 2c45570adef46da9d2b67f9801551c71afb130fb..860f44daaf85e5d70f66019c0263c97beb22b88f 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/AliasesDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/AliasesDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/ConfigurationWizardFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/ConfigurationWizardFiller.cpp index a13853d2c593b44e1a66bf9d2d436876f4b37b9d..8d4d5c28cecf9d370887a327a1444a0779c944c6 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/ConfigurationWizardFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/ConfigurationWizardFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/ConfigurationWizardFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/ConfigurationWizardFiller.h index 31c53d509bb45b3fd6a1d872647704307099ccfa..d520d247609fdb06ba028ee4a56c470f319d226b 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/ConfigurationWizardFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/ConfigurationWizardFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/CreateElementWithCommandLineFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/CreateElementWithCommandLineFiller.cpp deleted file mode 100644 index 591fdcdc4a6bc7eaa88c195146c19f6d5bd8ada6..0000000000000000000000000000000000000000 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/CreateElementWithCommandLineFiller.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/** - * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> - * http://ugene.net - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ - -#include "CreateElementWithCommandLineToolFiller.h" - -#include <primitives/GTTextEdit.h> - -namespace U2 { - -#define GT_CLASS_NAME "CreateElementWithCommandLineFiller" - -CreateElementWithCommandLineToolFiller::CreateElementWithCommandLineToolFiller(HI::GUITestOpStatus& os, - const ElementWithCommandLineSettings& settings) - : Filler(os, "CreateExternalProcessWorkerDialog"), - settings(settings) -{} - -CreateElementWithCommandLineToolFiller::CreateElementWithCommandLineToolFiller(HI::GUITestOpStatus &os, CustomScenario *scenario) -: Filler(os, "CreateExternalProcessWorkerDialog", scenario) -{ - -} - -#define GT_METHOD_NAME "run" -void CreateElementWithCommandLineToolFiller::commonScenario() { - QWidget* dialog = QApplication::activeModalWidget(); - GT_CHECK(dialog, "activeModalWidget is NULL"); - - // page 1 - QLineEdit* nameEdit = qobject_cast<QLineEdit*>(GTWidget::findWidget(os, "nameLineEdit", dialog)); - GT_CHECK(nameEdit, "nameLineEdit not found"); - GTLineEdit::setText(os, nameEdit, settings.elementName); - GTGlobals::sleep(); - - QWidget* nextButton = GTWidget::findWidget(os, "__qt__passive_wizardbutton1", dialog); - GTWidget::click(os, nextButton); - - // page 2 - QWidget* addInputButton = GTWidget::findWidget(os, "addInputButton", dialog); - GT_CHECK(addInputButton != NULL, "addInputButton not found"); - QTableView* table = qobject_cast<QTableView*>(GTWidget::findWidget(os,"inputTableView")); - GT_CHECK(table != NULL, "inputTable not found"); - fillTheTable(table, addInputButton, settings.input); - - QWidget* addOutputButton = GTWidget::findWidget(os, "addOutputButton", dialog); - GT_CHECK(addOutputButton != NULL, "addOutputButton not found"); - table = qobject_cast<QTableView*>(GTWidget::findWidget(os,"outputTableView")); - GT_CHECK(table != NULL, "outputTable not found"); - fillTheTable(table, addOutputButton, settings.output); - - nextButton = GTWidget::findWidget(os, "__qt__passive_wizardbutton1", dialog); - GTWidget::click(os, nextButton); - - // page 3 - QWidget* addAttributeButton = GTWidget::findWidget(os, "addAttributeButton", dialog); - GT_CHECK(addAttributeButton != NULL, "addAttributeButton not found"); - table = qobject_cast<QTableView*>(GTWidget::findWidget(os,"attributesTableView")); - GT_CHECK(table != NULL, "attributesTable not found"); - fillTheTable(table, addAttributeButton, settings.parameters); - - nextButton = GTWidget::findWidget(os, "__qt__passive_wizardbutton1", dialog); - GTWidget::click(os, nextButton); - - // page 4 - QLineEdit* execLineEdit = qobject_cast<QLineEdit*>(GTWidget::findWidget(os, "templateLineEdit", dialog)); - GT_CHECK(nameEdit, "templateLineEdit not found"); - GTLineEdit::setText(os, execLineEdit, settings.executionString); - - QTextEdit* prompterTextEdit = qobject_cast<QTextEdit*>(GTWidget::findWidget(os, "prompterTextEdit", dialog)); - GT_CHECK(prompterTextEdit, "templateLineEdit not found"); - GTTextEdit::setText(os, prompterTextEdit, settings.parameterizedDescription); - - QWidget* finishButton = GTWidget::findButtonByText(os, "Finish"); - GTWidget::click(os, finishButton); -} -#undef GT_METHOD_NAME -#undef GT_CLASS_NAME - -QString CreateElementWithCommandLineToolFiller::dataTypeToString(const InOutType &type) const { - switch (type) { - case MultipleAlignment: - return "Multiple Alignment"; - case Sequence: - return "Sequence"; - case SequenceWithAnnotations: - return "Sequence with annotations"; - case SetOfAnnotations: - return "Set of annotations"; - case DataString: - return "String"; - default: - return QString(); - } -} - -QString CreateElementWithCommandLineToolFiller::dataTypeToString(const ParameterType &type) const { - switch (type) { - case Boolean: - return "Boolean"; - case Number: - return "Number"; - case ParameterString: - return "String"; - case URL: - return "URL"; - default: - return QString(); - } -} - -void CreateElementWithCommandLineToolFiller::processDataType(QTableView *table, int row, const InOutDataType &type) { - setType(table, row, type.first); - { - GTMouseDriver::moveTo(GTTableView::getCellPosition(os, table, 2, row)); - GTMouseDriver::doubleClick(); - - QComboBox* box = qobject_cast<QComboBox*>(QApplication::focusWidget()); - GTComboBox::setIndexWithText(os, box, type.second); -#ifdef Q_OS_WIN - GTKeyboardDriver::keyClick( Qt::Key_Enter); -#endif - } -} - -void CreateElementWithCommandLineToolFiller::processDataType(QTableView *table, int row, const ParameterType &type) { - setType(table, row, type); -} - -} diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/CreateElementWithCommandLineToolFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/CreateElementWithCommandLineToolFiller.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8a09726dd04f561f3c7f47ef385a22dd42111153 --- /dev/null +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/CreateElementWithCommandLineToolFiller.cpp @@ -0,0 +1,304 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QRadioButton> + +#include "CreateElementWithCommandLineToolFiller.h" +#include "GTUtilsWizard.h" + +#include <primitives/GTRadioButton.h> +#include <primitives/GTTextEdit.h> + +#include <U2Core/U2SafePoints.h> + +#include "base_dialogs/MessageBoxFiller.h" + +namespace U2 { + +#define GT_CLASS_NAME "CreateElementWithCommandLineFiller" + +CreateElementWithCommandLineToolFiller::CreateElementWithCommandLineToolFiller(HI::GUITestOpStatus& os, + const ElementWithCommandLineSettings& settings) + : Filler(os, "CreateExternalProcessWorkerDialog"), + settings(settings) +{} + +CreateElementWithCommandLineToolFiller::CreateElementWithCommandLineToolFiller(HI::GUITestOpStatus &os, CustomScenario *scenario) +: Filler(os, "CreateExternalProcessWorkerDialog", scenario) +{ + +} + +#define GT_METHOD_NAME "run" +void CreateElementWithCommandLineToolFiller::commonScenario() { + QWidget* dialog = QApplication::activeModalWidget(); + GT_CHECK(dialog, "activeModalWidget is NULL"); + + QString errorMessage; + bool firstPageResult = processFirstPage(dialog, errorMessage); + GT_CHECK(firstPageResult, errorMessage); + + bool secondPageResult = processSecondPage(dialog, errorMessage); + GT_CHECK(secondPageResult, errorMessage); + + bool thirdPageResult = processThirdPage(dialog, errorMessage); + GT_CHECK(thirdPageResult, errorMessage); + + bool fourthPageResult = processFourthPage(dialog, errorMessage); + GT_CHECK(fourthPageResult, errorMessage); + + bool fifthPageResult = processFifthPage(dialog, errorMessage); + GT_CHECK(fifthPageResult, errorMessage); + + bool sixthPageResult = processSixthPage(dialog, errorMessage); + GT_CHECK(sixthPageResult, errorMessage); + + bool seventhPageResult = processSeventhPage(dialog, errorMessage); + GT_CHECK(seventhPageResult, errorMessage); + +} +#undef GT_METHOD_NAME + +QString CreateElementWithCommandLineToolFiller::dataTypeToString(const InOutType &type) const { + switch (type) { + case Alignment: + return "Alignment"; + case AnnotatedSequence: + return "Annotated Sequence"; + case Annotations: + return "Annotations"; + case Sequence: + return "Sequence"; + case String: + return "String"; + default: + return QString(); + } +} + +QString CreateElementWithCommandLineToolFiller::dataTypeToString(const ParameterType &type) const { + switch (type) { + case Boolean: + return "Boolean"; + case Integer: + return "Integer"; + case Double: + return "Double"; + case ParameterString: + return "String"; + case InputFileUrl: + return "Input file URL"; + case InputFolderUrl: + return "Input folder URL"; + case OutputFileUrl: + return "Output file URL"; + case OutputFolderUrl: + return "Output folder URL"; + default: + return QString(); + } +} + +QString CreateElementWithCommandLineToolFiller::formatToArgumentValue(const QString& format) const { + QString result; + if ("String data value" != format || "Output URL" != format) { + result = QString("URL to %1 file with data").arg(format); + } + else { + result = format; + } + + return result; +} + +void CreateElementWithCommandLineToolFiller::processStringType(QTableView* table, int row, const ColumnName columnName, const QString& value) { + CHECK(!value.isEmpty(), ); + + GTMouseDriver::moveTo(GTTableView::getCellPosition(os, table, static_cast<int>(columnName), row)); + GTMouseDriver::doubleClick(); + GTKeyboardDriver::keySequence(value); + GTKeyboardDriver::keyClick(Qt::Key_Enter); +} + +void CreateElementWithCommandLineToolFiller::processDataType(QTableView *table, int row, const InOutDataType &type) { + setType(table, row, type.first); + { + GTMouseDriver::moveTo(GTTableView::getCellPosition(os, table, static_cast<int>(ColumnName::Value), row)); + GTMouseDriver::doubleClick(); + + QComboBox* box = qobject_cast<QComboBox*>(QApplication::focusWidget()); + QString fullValue = formatToArgumentValue(type.second); + GTComboBox::setIndexWithText(os, box, fullValue); +#ifdef Q_OS_WIN + GTKeyboardDriver::keyClick( Qt::Key_Enter); +#endif + } +} + +void CreateElementWithCommandLineToolFiller::processDataType(QTableView *table, int row, const ParameterDataType& type) { + setType(table, row, type.first); + processStringType(table, row, ColumnName::Value, type.second); +} + +bool CreateElementWithCommandLineToolFiller::processFirstPage(QWidget* dialog, QString& errorMessage) { + if (!settings.elementName.isEmpty()) { + QLineEdit* nameEdit = qobject_cast<QLineEdit*>(GTWidget::findWidget(os, "leName", dialog)); + CHECK_EXT(nullptr != nameEdit, errorMessage = "leName not found", false); + + GTLineEdit::setText(os, nameEdit, settings.elementName); + } + + switch (settings.tooltype) { + case CommandLineToolType::ExecutablePath: { + QRadioButton* rbCustomTool = qobject_cast<QRadioButton*>(GTWidget::findWidget(os, "rbCustomTool", dialog)); + CHECK_EXT(nullptr != rbCustomTool, errorMessage = "rbCustomTool not found", false); + + GTRadioButton::click(os, rbCustomTool); + QLineEdit* leToolPath = qobject_cast<QLineEdit*>(GTWidget::findWidget(os, "leToolPath", dialog)); + CHECK_EXT(nullptr != leToolPath, errorMessage = "leName not found", false); + + GTLineEdit::setText(os, leToolPath, settings.tool); + break; + } + case CommandLineToolType::IntegratedExternalTool: { + QRadioButton* rbIntegratedTool = qobject_cast<QRadioButton*>(GTWidget::findWidget(os, "rbIntegratedTool", dialog)); + CHECK_EXT(nullptr != rbIntegratedTool, errorMessage = "rbIntegratedTool not found", false); + + GTRadioButton::click(os, rbIntegratedTool); + if (!settings.tool.isEmpty()) { + QComboBox* cbIntegratedTools = qobject_cast<QComboBox*>(GTWidget::findWidget(os, "cbIntegratedTools", dialog)); + CHECK_EXT(nullptr != cbIntegratedTools, errorMessage = "cbIntegratedTools not found", false); + + if (cbIntegratedTools->findText(settings.tool) == -1) { + GTComboBox::setIndexWithText(os, cbIntegratedTools, "Show all tools", false); + GTKeyboardDriver::keyClick(Qt::Key_Escape); + } + GTComboBox::setIndexWithText(os, cbIntegratedTools, settings.tool, false, HI::GTGlobals::UseKeyBoard); + } + break; + } + default: + CHECK_EXT(false, errorMessage = "Unexpected tool type", false); + break; + } + + //GTGlobals::sleep(); + GTUtilsWizard::clickButton(os, GTUtilsWizard::Next); + + return true; +} + +bool CreateElementWithCommandLineToolFiller::processSecondPage(QWidget* dialog, QString& errorMessage) { + QWidget* pbAddInput = GTWidget::findWidget(os, "pbAddInput", dialog); + CHECK_EXT(nullptr != pbAddInput, errorMessage = "pbAddInput not found", false); + + QTableView* tvInput = qobject_cast<QTableView*>(GTWidget::findWidget(os, "tvInput")); + CHECK_EXT(nullptr != tvInput, errorMessage = "tvInput not found", false); + + fillTheTable(tvInput, pbAddInput, settings.input); + + //GTGlobals::sleep(); + GTUtilsWizard::clickButton(os, GTUtilsWizard::Next); + + return true; +} + +bool CreateElementWithCommandLineToolFiller::processThirdPage(QWidget* dialog, QString& errorMessage) { + QWidget* pbAdd = GTWidget::findWidget(os, "pbAdd", dialog); + CHECK_EXT(nullptr != pbAdd, errorMessage = "pbAdd not found", false); + + QTableView* tvAttributes = qobject_cast<QTableView*>(GTWidget::findWidget(os, "tvAttributes")); + CHECK_EXT(nullptr != tvAttributes, errorMessage = "tvAttributes not found", false); + + fillTheTable(tvAttributes, pbAdd, settings.parameters); + + //GTGlobals::sleep(); + GTUtilsWizard::clickButton(os, GTUtilsWizard::Next); + + return true; +} + +bool CreateElementWithCommandLineToolFiller::processFourthPage(QWidget* dialog, QString& errorMessage) { + QWidget* pbAddOutput = GTWidget::findWidget(os, "pbAddOutput", dialog); + CHECK_EXT(nullptr != pbAddOutput, errorMessage = "pbAddOutput not found", false); + + QTableView* tvOutput = qobject_cast<QTableView*>(GTWidget::findWidget(os, "tvOutput")); + CHECK_EXT(nullptr != tvOutput, errorMessage = "tvOutput not found", false); + + fillTheTable(tvOutput, pbAddOutput, settings.output); + + //GTGlobals::sleep(); + GTUtilsWizard::clickButton(os, GTUtilsWizard::Next); + + return true; +} + +bool CreateElementWithCommandLineToolFiller::processFifthPage(QWidget* dialog, QString& errorMessage) { + QTextEdit* teCommand = qobject_cast<QTextEdit*>(GTWidget::findWidget(os, "teCommand", dialog)); + CHECK_EXT(nullptr != teCommand, errorMessage = "teCommand not found", false); + + GTTextEdit::setText(os, teCommand, settings.command); + + MessageBoxDialogFiller* msbxFiller = new MessageBoxDialogFiller(os, settings.commandDialogButtonTitle, "You don't use listed parameters in template string"); + GTUtilsDialog::waitForDialog(os, msbxFiller); + //GTGlobals::sleep(); + GTUtilsWizard::clickButton(os, GTUtilsWizard::Next); + GTGlobals::sleep(1000); + GTUtilsDialog::removeRunnable(msbxFiller); + + return true; +} + +bool CreateElementWithCommandLineToolFiller::processSixthPage(QWidget* dialog, QString& errorMessage) { + QTextEdit* teDescription = qobject_cast<QTextEdit*>(GTWidget::findWidget(os, "teDescription", dialog)); + CHECK_EXT(nullptr != teDescription, errorMessage = "teCommand not found", false); + + if (teDescription->toPlainText().isEmpty()) { + GTTextEdit::setText(os, teDescription, settings.description); + } + + QTextEdit* tePrompter = qobject_cast<QTextEdit*>(GTWidget::findWidget(os, "tePrompter", dialog)); + CHECK_EXT(nullptr != tePrompter, errorMessage = "teCommand not found", false); + + if (tePrompter->toPlainText().isEmpty()) { + GTTextEdit::setText(os, tePrompter, settings.prompter); + } + + //GTGlobals::sleep(); + GTUtilsWizard::clickButton(os, GTUtilsWizard::Next); + + return true; +} + +bool CreateElementWithCommandLineToolFiller::processSeventhPage(QWidget* dialog, QString& errorMessage) { + MessageBoxDialogFiller* msbxFiller = new MessageBoxDialogFiller(os, settings.summaryDialogButton, "You have changed the structure of the element"); + GTUtilsDialog::waitForDialog(os, msbxFiller); + //GTGlobals::sleep(); + GTUtilsWizard::clickButton(os, GTUtilsWizard::Finish); + GTGlobals::sleep(1000); + GTUtilsDialog::removeRunnable(msbxFiller); + + return true; +} + +#undef GT_CLASS_NAME + +} diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/CreateElementWithCommandLineToolFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/CreateElementWithCommandLineToolFiller.h index 4b43e5882b9ce95025ca5e3df76fef8258d9089c..9487668f213b6ea785efed8d30fe689075383580 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/CreateElementWithCommandLineToolFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/CreateElementWithCommandLineToolFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,6 +23,7 @@ #define _U2_GT_CREATE_ELEMENT_WITH_COMMAND_LINE_TOOL_FILLER_H_ #include <QApplication> +#include <QMessageBox> #include <QTableView> #include <drivers/GTKeyboardDriver.h> @@ -42,40 +43,82 @@ public: template <typename DataType> class Data { public: - Data(QString name, DataType type, QString desc = QString()) - : name(name), + Data(QString _displayName, DataType type, QString desc = QString(), QString _argumentName = QString()) + : displayName(_displayName), + argumentName(_argumentName), type(type), description(desc) {} - QString name; + QString displayName; + QString argumentName; DataType type; QString description; }; + enum class CommandLineToolType { + ExecutablePath, + IntegratedExternalTool + }; + + enum class ColumnName { + DisplayName = 0, + ArgumentName, + Type, + Value, + Description + }; + enum InOutType { - MultipleAlignment, + Alignment, + AnnotatedSequence, + Annotations, Sequence, - SequenceWithAnnotations, - SetOfAnnotations, - DataString + String }; - typedef QPair<InOutType, QString> InOutDataType; // type / read as + typedef QPair<InOutType, QString> InOutDataType; // type / argument value typedef Data<InOutDataType> InOutData; enum ParameterType { Boolean, - Number, + Integer, + Double, ParameterString, - URL + InputFileUrl, + InputFolderUrl, + OutputFileUrl, + OutputFolderUrl }; - typedef Data<ParameterType> Parameter; + typedef QPair<ParameterType, QString> ParameterDataType; // type / default value + typedef Data<ParameterDataType> ParameterData; struct ElementWithCommandLineSettings { - QString elementName; - QList<InOutData> input; - QList<InOutData> output; - QList<Parameter> parameters; - QString executionString; - QString parameterizedDescription; + ElementWithCommandLineSettings() : tooltype(CommandLineToolType::IntegratedExternalTool), + commandDialogButtonTitle("Continue"), + summaryDialogButton(QMessageBox::Yes) {} + + //1th page + QString elementName; + CommandLineToolType tooltype; + QString tool; + + //2th page + QList<InOutData> input; + + //3th page + QList<ParameterData> parameters; + + //4th page + QList<InOutData> output; + + //5th page + QString command; + QString commandDialogButtonTitle; + + //6th page + QString description; + QString prompter; + + //7th page + QMessageBox::Button summaryDialogButton; }; public: @@ -86,18 +129,29 @@ public: private: QString dataTypeToString(const InOutType &type) const; QString dataTypeToString(const ParameterType &type) const; + QString formatToArgumentValue(const QString& format) const; + void processStringType(QTableView* table, int row, const ColumnName columnName, const QString& value); void processDataType(QTableView *table, int row, const InOutDataType &type); - void processDataType(QTableView *table, int row, const ParameterType &type); + void processDataType(QTableView *table, int row, const ParameterDataType &type); + + bool processFirstPage(QWidget* dialog, QString& errorMessage); + bool processSecondPage(QWidget* dialog, QString& errorMessage); + bool processThirdPage(QWidget* dialog, QString& errorMessage); + bool processFourthPage(QWidget* dialog, QString& errorMessage); + bool processFifthPage(QWidget* dialog, QString& errorMessage); + bool processSixthPage(QWidget* dialog, QString& errorMessage); + bool processSeventhPage(QWidget* dialog, QString& errorMessage); template <typename DataType> void setType(QTableView *table, int row, const DataType &type) { - GTMouseDriver::moveTo(GTTableView::getCellPosition(os, table, 1, row)); + GTMouseDriver::moveTo(GTTableView::getCellPosition(os, table, static_cast<int>(ColumnName::Type), row)); GTMouseDriver::doubleClick(); GTThread::waitForMainThread(); QComboBox* box = qobject_cast<QComboBox*>(QApplication::focusWidget()); - GTComboBox::setIndexWithText(os, box, dataTypeToString(type)); + QString dataType = dataTypeToString(type); + GTComboBox::setIndexWithText(os, box, dataType); #ifdef Q_OS_WIN GTKeyboardDriver::keyClick( Qt::Key_Enter); #endif @@ -112,22 +166,18 @@ private: foreach (const Data<DataType> &rowData, rowItems) { GTWidget::click(os, addRowButton); - table->scrollTo(model->index(row, 0)); + table->scrollTo(model->index(row, static_cast<int>(ColumnName::DisplayName))); - GTMouseDriver::moveTo(GTTableView::getCellPosition(os, table, 0, row)); - GTMouseDriver::click(); + processStringType(table, row, ColumnName::DisplayName, rowData.displayName); - GTKeyboardDriver::keySequence(rowData.name); - GTKeyboardDriver::keyClick( Qt::Key_Enter); + if (!rowData.argumentName.isEmpty()) { + processStringType(table, row, ColumnName::ArgumentName, rowData.argumentName); + } processDataType(table, row, rowData.type); - GTMouseDriver::moveTo(GTTableView::getCellPosition(os, table, model->columnCount() - 1, row)); - GTMouseDriver::click(); - if (!rowData.description.isEmpty()) { - GTKeyboardDriver::keySequence(rowData.description); - GTKeyboardDriver::keyClick( Qt::Key_Enter); + processStringType(table, row, ColumnName::Description, rowData.description); } row++; } diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/CreateElementWithScriptDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/CreateElementWithScriptDialogFiller.cpp index 523445637c4558480ae0f954410b00cfef447d4d..3b26020af21eb9e144961c53efd47f6a3496626d 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/CreateElementWithScriptDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/CreateElementWithScriptDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/CreateElementWithScriptDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/CreateElementWithScriptDialogFiller.h index d22720fde2a55e316c764d8f55f74d8a8c7eeae9..f5a29e2b18be1b0f518cfd690f3a22386f18277d 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/CreateElementWithScriptDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/CreateElementWithScriptDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DashboardsManagerDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DashboardsManagerDialogFiller.cpp index e8d44315344a344097b0b324ba9e174ea4a42608..80b66db5ba0ab25178eab549ec03e0d2fb684e6c 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DashboardsManagerDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DashboardsManagerDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -67,6 +67,22 @@ bool DashboardsManagerDialogFiller::isDashboardPresent(HI::GUITestOpStatus &os, } #undef GT_METHOD_NAME +#define GT_METHOD_NAME "getDashboardsState" +QList<QPair<QString, bool> > DashboardsManagerDialogFiller::getDashboardsState(HI::GUITestOpStatus &os) { + QList<QPair<QString, bool> > result; + + QWidget *dialog = QApplication::activeModalWidget(); + GT_CHECK_RESULT(dialog, "activeModalWidget is NULL", result); + + QTreeWidget *treeWidget = GTWidget::findExactWidget<QTreeWidget *>(os, "listWidget", dialog); + for (int i = 0; i < treeWidget->topLevelItemCount(); ++i) { + QTreeWidgetItem *item = treeWidget->topLevelItem(i); + result << QPair<QString, bool>(item->text(0), Qt::Checked == item->checkState(0)); + } + return result; +} +#undef GT_METHOD_NAME + #undef GT_CLASS_NAME } diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DashboardsManagerDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DashboardsManagerDialogFiller.h index b450f24f151cef40ad9660656de39482eb538986..6026ca1d1b91903a0cb0c7280e02a66c65e0493b 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DashboardsManagerDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DashboardsManagerDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,9 +32,12 @@ class DashboardsManagerDialogFiller: public Filler public: DashboardsManagerDialogFiller(HI::GUITestOpStatus &os, CustomScenario* _c = NULL): Filler(os, "DashboardsManagerDialog", _c){} + virtual void commonScenario(); + static void selectDashboards(HI::GUITestOpStatus &os, QStringList names); static bool isDashboardPresent(HI::GUITestOpStatus &os, QString name); + static QList<QPair<QString, bool> > getDashboardsState(HI::GUITestOpStatus &os); // returns map dashboard_name->is_checked }; diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DatasetNameEditDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DatasetNameEditDialogFiller.cpp index 72e88cac26205a119261c0d752a438d4d39f9181..4b72df523f873e092eb4a62d2c559c4fc061dcac 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DatasetNameEditDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DatasetNameEditDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DatasetNameEditDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DatasetNameEditDialogFiller.h index 353a23fd7e26166703a66cede4dd299b4a42039b..ebdf389a71ccbd95cb820bc9e5657d43ef501e8f 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DatasetNameEditDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DatasetNameEditDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DefaultWizardFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DefaultWizardFiller.cpp index c38e7f4cb626d56a3539e29770400bc50960eb34..94ac8d4b3c7c99cede9ee8edbc67cc1e0007b03d 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DefaultWizardFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DefaultWizardFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DefaultWizardFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DefaultWizardFiller.h index a583727935eb9ce5e77d305dcc16d552f16c6630..ecfd9523c0ae43df74e7d575f8e9c13ac848512e 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DefaultWizardFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/DefaultWizardFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/RPackageDialorFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/RPackageDialorFiller.cpp index 328b30fe6389eee753ce79c2b84175cfea8e09fb..828c3f1ff1c6efe10713e8f76b18a15c0aebf783 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/RPackageDialorFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/RPackageDialorFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/RPackageDialorFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/RPackageDialorFiller.h index fae81fdced41eb3db78618a636011f2192064cc4..a36f845f33e534468264a71821b9a78c1128a93e 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/RPackageDialorFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/RPackageDialorFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/StartupDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/StartupDialogFiller.cpp index 37ab4ddc9a2bb0694337a923ea15186f4a8b09d4..be120d079e1de22e17c4588355317de74631b191 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/StartupDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/StartupDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/StartupDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/StartupDialogFiller.h index 0a37ea1342a1246fb3fdb05d3107b3e13c5506e2..f38037603ac96045acb25c4557b7005292ce3372 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/StartupDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/StartupDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/WizardFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/WizardFiller.cpp index 866478b1d432120a5697413509c844e47c7f9335..7433f8f7e0c66b360bfda0b2dc1879b6451dedc0 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/WizardFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/WizardFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/WizardFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/WizardFiller.h index 8379e960238b978c5d420149b0479abd9f94e349..fa9583ad680322e6f353e623b441f78a07d7c946 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/WizardFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/WizardFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/WorkflowMetadialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/WorkflowMetadialogFiller.cpp index a0c80c374f6f36b3ae4a655618dfd8ba811e2f9b..9ac6df7619daff7c1bed46c284f65a9942e42c9e 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/WorkflowMetadialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/WorkflowMetadialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/WorkflowMetadialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/WorkflowMetadialogFiller.h index 2c0c2c30e09a48e91773111d3adf59743ad8c8b3..9dbb1a0ed0f7d3d83e23d519981d70696f9e4ad1 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/WorkflowMetadialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins/workflow_designer/WorkflowMetadialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/MAFFT/MAFFTSupportRunDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/MAFFT/MAFFTSupportRunDialogFiller.cpp index de8fd9fb828f1ca494096d0d4f812e22345808c6..9a52820ed57212876eec6ceb5e9d664a1fe4758a 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/MAFFT/MAFFTSupportRunDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/MAFFT/MAFFTSupportRunDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/MAFFT/MAFFTSupportRunDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/MAFFT/MAFFTSupportRunDialogFiller.h index a4b55e3e65ba13f78e0785e313c29c25d4ec2ae9..c7e65e21c415961c0b2e3ac9339b8e19a5db7986 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/MAFFT/MAFFTSupportRunDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/MAFFT/MAFFTSupportRunDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/clustalw/ClustalWDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/clustalw/ClustalWDialogFiller.cpp index 0b756bd77a2d15282f8e7b210ffde4d50886b93f..fc8430ab7a38bb891863013cdd063c28ba3f1b76 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/clustalw/ClustalWDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/clustalw/ClustalWDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/clustalw/ClustalWDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/clustalw/ClustalWDialogFiller.h index 1ee746909077e92004ec3e422aff852d8033812f..8a6ac26e46874562e8030b34607913a8f61039ef 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/clustalw/ClustalWDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/clustalw/ClustalWDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/hmm3/HmmerSearchDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/hmm3/HmmerSearchDialogFiller.cpp index b00aa352cbba3349f638c6e9857ecd00ccaf52a4..77b268cce3e4dc9ee3f6e02ec956c4e381668bd7 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/hmm3/HmmerSearchDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/hmm3/HmmerSearchDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/hmm3/HmmerSearchDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/hmm3/HmmerSearchDialogFiller.h index ec3169379c2b9e167c694471f4d84fde5ebaefa4..c18984fe37f51aa91117ff6bbd0dafacfd057ad5 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/hmm3/HmmerSearchDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/hmm3/HmmerSearchDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/hmm3/UHMM3PhmmerDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/hmm3/UHMM3PhmmerDialogFiller.cpp index d7ad323837f12d28f76fadc1535c137853f5f901..6bc93cf9bb1f2de5bb0c5b8926548ff8c33c2ef0 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/hmm3/UHMM3PhmmerDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/hmm3/UHMM3PhmmerDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/hmm3/UHMM3PhmmerDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/hmm3/UHMM3PhmmerDialogFiller.h index 397b30702b8ac6b3bab6f66d856b8de4e0f0380b..21e4e0fcf4d48549d062b661b3f57f1c8cb382b3 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/hmm3/UHMM3PhmmerDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/hmm3/UHMM3PhmmerDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/kalign/KalignDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/kalign/KalignDialogFiller.cpp index 3db09475e172e5101fae145f9de573226b750d52..56913127eb44ec3a7a6593cd9ce23de52e012047 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/kalign/KalignDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/kalign/KalignDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/kalign/KalignDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/kalign/KalignDialogFiller.h index e6b783af91a7ae1b287f32961e4f9ac08e322eb1..471b2f1c9a01d4797ad189cb80a894db8fa4f764 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/kalign/KalignDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/kalign/KalignDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/primer3/Primer3DialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/primer3/Primer3DialogFiller.cpp index d81af3121cd48b43d0808eb56f016310cd0d9903..c9ed8e051f0fc2fbfc52e868a00d1ba147bc205a 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/primer3/Primer3DialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/primer3/Primer3DialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/primer3/Primer3DialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/primer3/Primer3DialogFiller.h index a3197195e7e47c3167528e21e911c20ffbf13a4a..4dd79fdc136378e3e29b3169afb2a15d6bf7d5b1 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/primer3/Primer3DialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/primer3/Primer3DialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/umuscle/MuscleDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/umuscle/MuscleDialogFiller.cpp index ddfafcee954355b24a3e1f2a03ded256c9e791aa..4b58df4e91c8027efb8144c667035bf8440fec51 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/umuscle/MuscleDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/umuscle/MuscleDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/umuscle/MuscleDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/umuscle/MuscleDialogFiller.h index 70dc907e5fca5eae0e70ea4f93c042b4429a89e8..d2fe19372f25c783a0771e3181ad8f820ef50f37 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/umuscle/MuscleDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/plugins_3rdparty/umuscle/MuscleDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/ConvertAceToSqliteDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/ConvertAceToSqliteDialogFiller.cpp index ec21b0f89805496958675d83cf4ed51092dcab2b..4a5346c16ce1e2408302aa0b2513ebcbb1ea0f15 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/ConvertAceToSqliteDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/ConvertAceToSqliteDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/ConvertAceToSqliteDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/ConvertAceToSqliteDialogFiller.h index 39cd13f51ddd55c4155bb98f2ad791aaab9058e6..38fae3ebd6a94ee2d13c68b4964ea4880fd58e5c 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/ConvertAceToSqliteDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/ConvertAceToSqliteDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/CreateNewProjectWidgetFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/CreateNewProjectWidgetFiller.cpp index 0f8089c5f55db9ff2a43dabaea2c86ed4feacda3..5ca95a13b15535f6a5e150cb7162478f2b209d7d 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/CreateNewProjectWidgetFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/CreateNewProjectWidgetFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/CreateNewProjectWidgetFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/CreateNewProjectWidgetFiller.h index 72485988f556e01c98cb087e5e73d955247b3a8a..a50d5f7e08f21315f1e355a770cc9c793e7bdfde 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/CreateNewProjectWidgetFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/CreateNewProjectWidgetFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/DocumentFormatSelectorDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/DocumentFormatSelectorDialogFiller.cpp index 2d1e0b7f571aec5b7e6768b353c82eb3f9936ac6..85da256485a046a6e9af037ddb685071df321036 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/DocumentFormatSelectorDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/DocumentFormatSelectorDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -52,6 +52,19 @@ void DocumentFormatSelectorDialogFiller::commonScenario() QRadioButton* radio = getButton(os); if (NULL != radio) { + if (-1 != score) { + GT_CHECK(formatLineLable != -1, "line is not defined"); + + QLabel* label = GTWidget::findExactWidget<QLabel*>(os, QString("label_%1").arg(formatLineLable), dialog, GTGlobals::FindOptions(false)); + GT_CHECK(label, "label is NULL"); + + const QString sign = label->text(); + QRegExp regExp(QString("<b>%1</b> format. Score: (\\d+)").arg(format)); + regExp.indexIn(sign); + int currentScore = regExp.cap(1).toInt(); + GT_CHECK(currentScore == score, QString("Unexpected similarity score, expected: %1, current: %2").arg(score).arg(currentScore)); + } + GTRadioButton::click(os, radio); } else { QRadioButton* chooseFormatManuallyRadio = GTWidget::findExactWidget<QRadioButton*>(os, "chooseFormatManuallyRadio", dialog); diff --git a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/DocumentFormatSelectorDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/DocumentFormatSelectorDialogFiller.h index 4dc9f983b3ab06b06cff50e4655d4deb4347b722..56ab791a6c21c895e67ec56ffd129b962ab13d7f 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/DocumentFormatSelectorDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/DocumentFormatSelectorDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,13 +32,21 @@ using namespace HI; class DocumentFormatSelectorDialogFiller : public Filler { public: - DocumentFormatSelectorDialogFiller(HI::GUITestOpStatus &os, const QString &_format): - Filler(os, "DocumentFormatSelectorDialog"), format(_format){} + DocumentFormatSelectorDialogFiller(HI::GUITestOpStatus &os, + const QString &_format, + const int _score = -1, + const int _formatLineLable = -1): + Filler(os, "DocumentFormatSelectorDialog"), + format(_format), + score(_score), + formatLineLable(_formatLineLable){} DocumentFormatSelectorDialogFiller(HI::GUITestOpStatus &os, CustomScenario* custom): Filler(os, "DocumentFormatSelectorDialog", custom){} virtual void commonScenario(); private: QString format; + int score; + int formatLineLable; QRadioButton* getButton(HI::GUITestOpStatus &os); }; diff --git a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/DocumentProviderSelectorDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/DocumentProviderSelectorDialogFiller.cpp index d834b69f5eca5986131b0badb477e7c935ca8602..053e995bd40c11195878c7f1a9792357990555b6 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/DocumentProviderSelectorDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/DocumentProviderSelectorDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/DocumentProviderSelectorDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/DocumentProviderSelectorDialogFiller.h index 5182075eec0c50226932fcea557e3eacb032ea88..d18c07809280eabc6411d54704b2e1e66b7189ca 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/DocumentProviderSelectorDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/DocumentProviderSelectorDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/ExportProjectDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/ExportProjectDialogFiller.cpp index eaae515b580658540d5fa8ac7a42c062b35ae38e..8bb4fb98edbe113ad0d6b8351abab28babacffea 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/ExportProjectDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/ExportProjectDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/ExportProjectDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/ExportProjectDialogFiller.h index afbb77d45365d3ea2c89cca21b2ccd461cff29b0..57290eea68b969e579eab077b3f5380a4930421a 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/ExportProjectDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/ExportProjectDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/NCBISearchDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/NCBISearchDialogFiller.cpp index 45d5bfe249ec914b144921a3305bacb0ab3171d6..aaa86b73e23bb29e7bba3ee822643e46084c0d8e 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/NCBISearchDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/NCBISearchDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/NCBISearchDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/NCBISearchDialogFiller.h index 49cfbc5d3a3e7cb6f43365aeb5592edadb129b18..5c7d345d86f1209e4ae02fa28f41b50c32d3aa0f 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/NCBISearchDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/NCBISearchDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SaveProjectDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SaveProjectDialogFiller.cpp index 9e9e0d99b3ef1e27d7c24853eedb6ccc45187384..061b4f3022c073fcb2490711faa8973a04d95f80 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SaveProjectDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SaveProjectDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SaveProjectDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SaveProjectDialogFiller.h index aca46f23f442255a3c2407a32cabd44fe89e9561..40376fd8b1fde448554956a8dabd8d12bd77d26d 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SaveProjectDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SaveProjectDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SelectDocumentFormatDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SelectDocumentFormatDialogFiller.cpp index 04aa7375b52af71592155dc75d05240edb3ecb8d..8e5a647b5e9588a12ccce02bcbbd1bf739420786 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SelectDocumentFormatDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SelectDocumentFormatDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SelectDocumentFormatDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SelectDocumentFormatDialogFiller.h index 0ca29e42ac11f6cefe0c8ba99a78ec2235b5e638..dccceb4ec6c0de0a07ddf7ecd2eaa6ea98a43ef3 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SelectDocumentFormatDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SelectDocumentFormatDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SequenceReadingModeSelectorDialogFiller.cpp b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SequenceReadingModeSelectorDialogFiller.cpp index bfc83a359461fd60e59041ee41027ba2444f6b7f..532c5521fa2d59e198239a7b82080fff7ef62573 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SequenceReadingModeSelectorDialogFiller.cpp +++ b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SequenceReadingModeSelectorDialogFiller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -48,7 +48,7 @@ void SequenceReadingModeSelectorDialogFiller::commonScenario() GT_CHECK(buttonBox != NULL, "buttonBox not found"); if (cancel) { QPushButton *button = buttonBox->button(QDialogButtonBox::Cancel); - GT_CHECK(button != NULL, "standart button not found"); + GT_CHECK(button != NULL, "standard button not found"); GTWidget::click(os, button); return; } diff --git a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SequenceReadingModeSelectorDialogFiller.h b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SequenceReadingModeSelectorDialogFiller.h index 6425d8cba86be755447924d5161d3ead84b9fa9c..b186ee1d9eb6b23ca7c95b1804e2004d47f40a2f 100644 --- a/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SequenceReadingModeSelectorDialogFiller.h +++ b/src/plugins/GUITestBase/src/runnables/ugene/ugeneui/SequenceReadingModeSelectorDialogFiller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/test_runner/GUITestRunner.cpp b/src/plugins/GUITestBase/src/test_runner/GUITestRunner.cpp index d3b297e072dc85b77be4553e4965810bfffb8e4c..10cd2baaf2c45926bbe6c820d3536b24c5aa03c2 100644 --- a/src/plugins/GUITestBase/src/test_runner/GUITestRunner.cpp +++ b/src/plugins/GUITestBase/src/test_runner/GUITestRunner.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -45,6 +45,8 @@ GUITestRunner::GUITestRunner(UGUITestBase* _guiTestBase, QWidget *parent) : { setupUi(this); setWindowIcon(QIcon(QString(":gui_test/images/open_gui_test_runner.png"))); + setAttribute(Qt::WA_DeleteOnClose); + tree->setColumnWidth(0,550); const GUITests tests = guiTestBase->getTests(); diff --git a/src/plugins/GUITestBase/src/test_runner/GUITestRunner.h b/src/plugins/GUITestBase/src/test_runner/GUITestRunner.h index eb9125a37d729ba063b182f18fc138666cceeec8..cffad5bb5d01a523482d67862cf8787cf7089114 100644 --- a/src/plugins/GUITestBase/src/test_runner/GUITestRunner.h +++ b/src/plugins/GUITestBase/src/test_runner/GUITestRunner.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/PosteriorActions.cpp b/src/plugins/GUITestBase/src/tests/PosteriorActions.cpp index c17ba0e212cc266a44b4753d384de5aa88607a1c..358fae7e4e530c65af2e47316ab6ae2f8f9cc0e1 100644 --- a/src/plugins/GUITestBase/src/tests/PosteriorActions.cpp +++ b/src/plugins/GUITestBase/src/tests/PosteriorActions.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/PosteriorActions.h b/src/plugins/GUITestBase/src/tests/PosteriorActions.h index 9a5ff5903503ab4891bc871936ea5740047fdfcd..48e136a2e25f399c1b62daeb532bd4b2176572d0 100644 --- a/src/plugins/GUITestBase/src/tests/PosteriorActions.h +++ b/src/plugins/GUITestBase/src/tests/PosteriorActions.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/PosteriorChecks.cpp b/src/plugins/GUITestBase/src/tests/PosteriorChecks.cpp index 3add8d080af199681eccad41f7d58e043b8f1fe8..9b4bdf2f7b0805f26fa2f4767cae8183dabb3a26 100644 --- a/src/plugins/GUITestBase/src/tests/PosteriorChecks.cpp +++ b/src/plugins/GUITestBase/src/tests/PosteriorChecks.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/PosteriorChecks.h b/src/plugins/GUITestBase/src/tests/PosteriorChecks.h index ce975e2db0d22dcf843896c8944cd654e1d00b36..166b615a3757a6fd9e4bba9a8f46e3a52a15f10a 100644 --- a/src/plugins/GUITestBase/src/tests/PosteriorChecks.h +++ b/src/plugins/GUITestBase/src/tests/PosteriorChecks.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/PreliminaryActions.cpp b/src/plugins/GUITestBase/src/tests/PreliminaryActions.cpp index 01ca6df2a11a14bee9531a0238723805f46effb6..629573d71d6f723d07e583fc41169c637284d58c 100644 --- a/src/plugins/GUITestBase/src/tests/PreliminaryActions.cpp +++ b/src/plugins/GUITestBase/src/tests/PreliminaryActions.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/PreliminaryActions.h b/src/plugins/GUITestBase/src/tests/PreliminaryActions.h index d2cfd73a2c7a7e7be51f3a17d872dc30f7b87459..8eaf6e4433d4825c1ea9f62e705db46579311c4e 100644 --- a/src/plugins/GUITestBase/src/tests/PreliminaryActions.h +++ b/src/plugins/GUITestBase/src/tests/PreliminaryActions.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/Assembly_browser/GTTestsAssemblyBrowser.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/Assembly_browser/GTTestsAssemblyBrowser.cpp index 592fa94106bb9b32a16ddb4d0120f8d911597113..47b041350c7adc0c46af75ec88bf3f2fb6bd2c02 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/Assembly_browser/GTTestsAssemblyBrowser.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/Assembly_browser/GTTestsAssemblyBrowser.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -584,17 +584,16 @@ GUI_TEST_CLASS_DEFINITION(test_0018) { //8. Right click on the reference area while the file is loading. //Expected: "Unassociate" and "Set reference sequence" are disabled. - GTUtilsDialog::waitForDialog(os, new PopupChecker(os, QStringList() << "unassociateReferenceAction", PopupChecker::IsDisabled)); - GTWidget::click(os, GTWidget::findWidget(os, "Assembly reference sequence area"), Qt::RightButton); GTUtilsDialog::waitForDialog(os, new PopupChecker(os, QStringList() << "setReferenceAction", PopupChecker::IsDisabled)); + // GTUtilsDialog::waitForDialog(os, new PopupChecker(os, QStringList() << "setReferenceAction", PopupChecker::IsDisabled)); GTWidget::click(os, GTWidget::findWidget(os, "Assembly reference sequence area"), Qt::RightButton); + //GTUtilsDialog::waitForDialog(os, new PopupChecker(os, QStringList() << "unassociateReferenceAction" , PopupChecker::IsDisabled)); + //GTWidget::click(os, GTWidget::findWidget(os, "Assembly reference sequence area"), Qt::RightButton); //9. Right click on the reference area after loading. //Expected: "Unassociate" and "Set reference sequence" are enabled. GTUtilsTaskTreeView::waitTaskFinished(os); - GTUtilsDialog::waitForDialog(os, new PopupChecker(os, QStringList() << "unassociateReferenceAction", PopupChecker::IsEnabled)); - GTWidget::click(os, GTWidget::findWidget(os, "Assembly reference sequence area"), Qt::RightButton); - GTUtilsDialog::waitForDialog(os, new PopupChecker(os, QStringList() << "setReferenceAction", PopupChecker::IsEnabled)); + GTUtilsDialog::waitForDialog(os, new PopupCheckerByText(os, QStringList(), QStringList() << "Set reference" << "Unassociate", PopupChecker::IsEnabled)); GTWidget::click(os, GTWidget::findWidget(os, "Assembly reference sequence area"), Qt::RightButton); } @@ -842,7 +841,7 @@ GUI_TEST_CLASS_DEFINITION(test_0027){ GTFileDialog::openFile(os, testDir + "_common_data/scenarios/assembly/", "example-alignment.ugenedb"); // 3. Drag and drop COI object to assembly browser GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, QMessageBox::Ok, - "Only sequence or variant track objects can be added to assembly browser")); + "Only a nucleotide sequence or a variant track objects can be added to the Assembly Browser")); GTUtilsAssemblyBrowser::addRefFromProject(os, "COI"); // Expected: error message box appears GTGlobals::sleep(500); diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/Assembly_browser/GTTestsAssemblyBrowser.h b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/Assembly_browser/GTTestsAssemblyBrowser.h index 4c345ae447814e37ffab1c02b478581c72317e21..5607b1dd05f30e7eb18a7509046fc13f66ba73d5 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/Assembly_browser/GTTestsAssemblyBrowser.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/Assembly_browser/GTTestsAssemblyBrowser.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/bowtie2/GTTestsBowtie2.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/bowtie2/GTTestsBowtie2.cpp index 1b5f8fe795b4f1a94747b745e4106e3c0537b5cf..c6e6fc50f60aba97cf05c8b942ad4eebd4820724 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/bowtie2/GTTestsBowtie2.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/bowtie2/GTTestsBowtie2.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/bowtie2/GTTestsBowtie2.h b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/bowtie2/GTTestsBowtie2.h index 9867c7cb27842726950839960bc8bfb9225fcee0..a6e3af3075853d2da8365a8f1e61ef0e2b880978 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/bowtie2/GTTestsBowtie2.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/bowtie2/GTTestsBowtie2.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/GTTestsDnaAssembly.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/GTTestsDnaAssembly.cpp index 7a55e848c928ca9f918e995a3b97acdea5445f96..52cc4d4bc3b6df5ecde7f27c4ad1d25ddf38ff06 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/GTTestsDnaAssembly.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/GTTestsDnaAssembly.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/GTTestsDnaAssembly.h b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/GTTestsDnaAssembly.h index e04a13ad24a74ae02a0f07f9a27de4d0c8cd997d..b23275a2eb90b99b268c2906bc3e073437ed9e1b 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/GTTestsDnaAssembly.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/GTTestsDnaAssembly.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/GTTestsIndexReuse.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/GTTestsIndexReuse.cpp index 95591965601ddcfbc87ac3c380cea1353ccbdf8d..de568a5250bc8696e35b40d5828c4fa6546d3e6a 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/GTTestsIndexReuse.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/GTTestsIndexReuse.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/GTTestsIndexReuse.h b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/GTTestsIndexReuse.h index dfef0b0c3011edc27933f7a31d937e965b2834df..3a1562a7214b75fd56d4e90fbb84bee05d2c699d 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/GTTestsIndexReuse.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/GTTestsIndexReuse.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/conversions/GTTestsDnaAssemblyConversions.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/conversions/GTTestsDnaAssemblyConversions.cpp index fe03251bc12185166c0b18dd0302fb396218c280..3a3b51e39c8eeacde5a798dc60357c93e78277ed 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/conversions/GTTestsDnaAssemblyConversions.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/conversions/GTTestsDnaAssemblyConversions.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/conversions/GTTestsDnaAssemblyConversions.h b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/conversions/GTTestsDnaAssemblyConversions.h index 235b1e41165c14193bd2f37049a2c400c5740f70..d742f66ac82177efc39b5022cf475f3c58d92601 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/conversions/GTTestsDnaAssemblyConversions.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/dna_assembly/conversions/GTTestsDnaAssemblyConversions.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/sam/GTTestsSAM.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/sam/GTTestsSAM.cpp index 09246be31a24d57fc614127febbd30bbd60cf765..f81810fe610220f081db35e3229f50cf0b4fb0dd 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/sam/GTTestsSAM.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/sam/GTTestsSAM.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/sam/GTTestsSAM.h b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/sam/GTTestsSAM.h index 9989428044591a578a56871540b379f12262ecf4..7f9e0dc99cdcd48923010a267df4203717d2e5e9 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/sam/GTTestsSAM.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/Assembling/sam/GTTestsSAM.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/NIAID_pipelines/GTTestsNiaidPipelines.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/NIAID_pipelines/GTTestsNiaidPipelines.cpp index d9eb6160a2c7a2c1bd9e8d8809ad8951b495f41c..3b535359f365a6030ae6a97443ecd7e02a1d89de 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/NIAID_pipelines/GTTestsNiaidPipelines.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/NIAID_pipelines/GTTestsNiaidPipelines.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/NIAID_pipelines/GTTestsNiaidPipelines.h b/src/plugins/GUITestBase/src/tests/common_scenarios/NIAID_pipelines/GTTestsNiaidPipelines.h index 1604868cf3b0f71c290412b5de9dd990a8aa7b9f..3acb3d18023063718e5e26840b980084dbce876c 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/NIAID_pipelines/GTTestsNiaidPipelines.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/NIAID_pipelines/GTTestsNiaidPipelines.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/Query_Designer/GTTestsQuerryDesigner.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/Query_Designer/GTTestsQuerryDesigner.cpp index 3fffc7b4452e88f64e0151c112d91718b33c9e84..a96f2e1d8f7022bb0c2a92b986c8d63de6d12dcb 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/Query_Designer/GTTestsQuerryDesigner.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/Query_Designer/GTTestsQuerryDesigner.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/Query_Designer/GTTestsQuerryDesigner.h b/src/plugins/GUITestBase/src/tests/common_scenarios/Query_Designer/GTTestsQuerryDesigner.h index 8377917043667b5a1087bacb6b44adf8444f057b..de0bac994017ac797eecd196905057125990bd83 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/Query_Designer/GTTestsQuerryDesigner.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/Query_Designer/GTTestsQuerryDesigner.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/GTTestsAnnotations.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/GTTestsAnnotations.cpp index 979d197729bcb3201d7897882e83d843fde02dc9..2003e5236ae42cd9008cce31ea078c64ed4352c3 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/GTTestsAnnotations.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/GTTestsAnnotations.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -625,12 +625,12 @@ GUI_TEST_CLASS_DEFINITION(test_0010_1) { GTUtilsDialog::waitForDialog(os, new CreateAnnotationWidgetFiller(os, true, "<auto>", "ann_1", "200..300", sandBoxDir + "ann_test_0010_1_19.gb")); GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "ADV_MENU_ADD" << "create_annotation_action")); - GTWidget::click(os, GTWidget::findWidget(os, "ADV_single_sequence_widget_0"), Qt::RightButton); + GTWidget::click(os, GTWidget::findWidget(os, "det_view_GXL_141619"), Qt::RightButton); GTUtilsDialog::waitForDialog(os, new CreateAnnotationWidgetFiller(os, true, "<auto>", "ann_2", "100..200", sandBoxDir + "ann_test_0010_1_18.gb")); GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "ADV_MENU_ADD" << "create_annotation_action")); - GTWidget::click(os, GTWidget::findWidget(os, "ADV_single_sequence_widget_1"), Qt::RightButton); + GTWidget::click(os, GTWidget::findWidget(os, "det_view_GXL_141618"), Qt::RightButton); QStringList annList; annList << "ann_1" << "ann_2"; @@ -677,12 +677,12 @@ GUI_TEST_CLASS_DEFINITION(test_0010_2) { GTUtilsDialog::waitForDialog(os, new CreateAnnotationWidgetFiller(os, true, "<auto>", "ann_1", "200..300", sandBoxDir + "ann_test_0010_2_19.gb")); GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "ADV_MENU_ADD" << "create_annotation_action")); - GTWidget::click(os, GTWidget::findWidget(os, "ADV_single_sequence_widget_0"), Qt::RightButton); + GTWidget::click(os, GTWidget::findWidget(os, "det_view_GXL_141619"), Qt::RightButton); GTUtilsDialog::waitForDialog(os, new CreateAnnotationWidgetFiller(os, true, "<auto>", "ann_2", "100..200", sandBoxDir + "ann_test_0010_2_18.gb")); GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "ADV_MENU_ADD" << "create_annotation_action")); - GTWidget::click(os, GTWidget::findWidget(os, "ADV_single_sequence_widget_1"), Qt::RightButton); + GTWidget::click(os, GTWidget::findWidget(os, "det_view_GXL_141618"), Qt::RightButton); QStringList annList; annList << "ann_1" << "ann_2"; @@ -729,13 +729,13 @@ GUI_TEST_CLASS_DEFINITION(test_0010_3) { GTUtilsDialog::waitForDialog(os, new CreateAnnotationWidgetFiller(os, true, "<auto>", "ann_1", "200..300", sandBoxDir + "ann_test_0010_3_19.gb")); GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "ADV_MENU_ADD" << "create_annotation_action")); - GTWidget::click(os, GTWidget::findWidget(os, "ADV_single_sequence_widget_0"), Qt::RightButton); + GTWidget::click(os, GTWidget::findWidget(os, "det_view_GXL_141619"), Qt::RightButton); GTUtilsDialog::waitForDialog(os, new CreateAnnotationWidgetFiller(os, true, "<auto>", "ann_2", "100..200", sandBoxDir + "ann_test_0010_3_18.gb")); GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "ADV_MENU_ADD" << "create_annotation_action")); - GTWidget::click(os, GTWidget::findWidget(os, "ADV_single_sequence_widget_1"), Qt::RightButton); + GTWidget::click(os, GTWidget::findWidget(os, "det_view_GXL_141618"), Qt::RightButton); QStringList annList; @@ -775,9 +775,9 @@ GUI_TEST_CLASS_DEFINITION(test_0011_1) { // 1. Open "human_T1.fa" // 2. Create an annotation // 3. Try to export it to GTF format - // Expected state: error message is in the log(GTF annotation MUST have gene_id and transcript_id attribute!) + // Expected state: info message - "GTF format is not strict - some annotations do not have "gene_id" and/or "transcript_id" qualifiers" - GTLogTracer l; + GTLogTracer l("GTF format is not strict - some annotations do not have \"gene_id\" and/or \"transcript_id\" qualifiers"); GTFileDialog::openFile(os, dataDir + "samples/FASTA/", "human_T1.fa"); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -794,10 +794,11 @@ GUI_TEST_CLASS_DEFINITION(test_0011_1) { GTUtilsDialog::waitForDialog(os, new ExportAnnotationsFiller(sandBoxDir + "ann_export_test_0011_1.gtf", ExportAnnotationsFiller::gtf, os)); GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << ADV_MENU_EXPORT << "action_export_annotations")); + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new DocumentFormatSelectorDialogFiller(os, "GTF")); GTMouseDriver::click(Qt::RightButton); GTGlobals::sleep(); - CHECK_SET_ERR(l.hasError(), "No error in the log"); + CHECK_SET_ERR(l.messageFound(), "No expected message in the log"); } GUI_TEST_CLASS_DEFINITION(test_0011_2) { @@ -806,9 +807,9 @@ GUI_TEST_CLASS_DEFINITION(test_0011_2) { // 1. Open "human_T1.fa" // 2. Create an annotation // 3. Try to export it to GTF format - // Expected state: error message is in the log(GTF annotation MUST have gene_id and transcript_id attribute!) + // Expected state: info message - "GTF format is not strict - some annotations do not have "gene_id" and/or "transcript_id" qualifiers" - GTLogTracer l; + GTLogTracer l("GTF format is not strict - some annotations do not have \"gene_id\" and/or \"transcript_id\" qualifiers"); GTFileDialog::openFile(os, dataDir + "samples/FASTA/", "human_T1.fa"); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -825,10 +826,11 @@ GUI_TEST_CLASS_DEFINITION(test_0011_2) { GTUtilsDialog::waitForDialog(os, new ExportAnnotationsFiller(sandBoxDir + "ann_export_test_0011_1.gtf", ExportAnnotationsFiller::gtf, os)); GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << ADV_MENU_EXPORT << "action_export_annotations")); + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new DocumentFormatSelectorDialogFiller(os, "GTF")); GTMouseDriver::click(Qt::RightButton); GTGlobals::sleep(); - CHECK_SET_ERR(l.hasError(), "No erro in the log"); + CHECK_SET_ERR(l.messageFound(), "No expected message in the log"); } GUI_TEST_CLASS_DEFINITION(test_0011_3) { diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/GTTestsAnnotations.h b/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/GTTestsAnnotations.h index 5bdf65f6714fcb943a07e8a1558fecd7c4833910..2bc3def833962c692612dc0d759754a124d67f26 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/GTTestsAnnotations.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/GTTestsAnnotations.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/GTTestsCreateAnnotationWidget.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/GTTestsCreateAnnotationWidget.cpp index 8c53c694e8795b2ef4721583b6b4eb08a9bc0aca..37be51b24137e89eb674ce71fab8ada3a80baef5 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/GTTestsCreateAnnotationWidget.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/GTTestsCreateAnnotationWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -3210,7 +3210,8 @@ GUI_TEST_CLASS_DEFINITION(test_0040) { CHECK_SET_ERR(!rbUseAutoTable->isVisible(), "rbUseAutoTable is unexpectedly visible for murine_1"); // 8. Select "Create new table" option. Check if destination table widgets are enabled or disabled. - GTWidget::click(os, GTWidget::findWidget(os, "rbCreateNewTable")); + //GTWidget::click(os, GTWidget::findWidget(os, "rbCreateNewTable")); + GTRadioButton::click(os, GTWidget::findExactWidget<QRadioButton*>(os, "rbCreateNewTable")); GTGlobals::sleep(); // Expected state: diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/GTTestsCreateAnnotationWidget.h b/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/GTTestsCreateAnnotationWidget.h index 009114c2c1d137cc804d37812f2563a2499b2d3b..bdca94d3489667e9822695833548ebb65c147566 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/GTTestsCreateAnnotationWidget.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/GTTestsCreateAnnotationWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/edit/GTTestsAnnotationsEdit.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/edit/GTTestsAnnotationsEdit.cpp index d0a35a0d01bb79761f99e61d5b01dfe582271cee..7af692df5646c2b2f9a63f7faa63f18acc770ee8 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/edit/GTTestsAnnotationsEdit.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/edit/GTTestsAnnotationsEdit.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/edit/GTTestsAnnotationsEdit.h b/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/edit/GTTestsAnnotationsEdit.h index eabda60f5fda8cc71629a4e9e13318f6e6e8d17c..86e3edef34f08d36fd0ea464fd21e2cb40fe058a 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/edit/GTTestsAnnotationsEdit.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/edit/GTTestsAnnotationsEdit.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/qualifiers/GTTestsAnnotationsQualifiers.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/qualifiers/GTTestsAnnotationsQualifiers.cpp index 632271f1c9fce7841b810e2bf4892a61be56c800..776a545f9bd12ce444e1530147bb1a25e0cb0f37 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/qualifiers/GTTestsAnnotationsQualifiers.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/qualifiers/GTTestsAnnotationsQualifiers.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/qualifiers/GTTestsAnnotationsQualifiers.h b/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/qualifiers/GTTestsAnnotationsQualifiers.h index a47d9728d083b6b47194cd53bd032254801965ce..3e475b79dd8918883c1fcfcbc9b1a7dd5a965c04 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/qualifiers/GTTestsAnnotationsQualifiers.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/annotations/qualifiers/GTTestsAnnotationsQualifiers.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/annotations_import/GTTestsAnnotationsImport.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/annotations_import/GTTestsAnnotationsImport.cpp index 4ffe8af6aa31e1728b1aba9d7bdf269deee42ecd..64125c670c2651cfc15ee7c3b7d05896939933f7 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/annotations_import/GTTestsAnnotationsImport.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/annotations_import/GTTestsAnnotationsImport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/annotations_import/GTTestsAnnotationsImport.h b/src/plugins/GUITestBase/src/tests/common_scenarios/annotations_import/GTTestsAnnotationsImport.h index 536f4537a2d04064c7903d9b5f97accead93da90..3a7013e10ce9c772f94b602316d651851ff7a727 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/annotations_import/GTTestsAnnotationsImport.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/annotations_import/GTTestsAnnotationsImport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/circular_view/GTTestsCvGeneral.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/circular_view/GTTestsCvGeneral.cpp index a7a049ca766be7425ea29e5fe1cda3bfe3060cfa..0b897527e012af3b0e32d809060e11b65916899b 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/circular_view/GTTestsCvGeneral.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/circular_view/GTTestsCvGeneral.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/circular_view/GTTestsCvGeneral.h b/src/plugins/GUITestBase/src/tests/common_scenarios/circular_view/GTTestsCvGeneral.h index 8e1be74ad2806b8bb5e719d7f700a4b6d942f55a..599a2cb4561ed05c301c9b2e830213f0ede699b4 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/circular_view/GTTestsCvGeneral.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/circular_view/GTTestsCvGeneral.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/cloning/GTTestsCloning.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/cloning/GTTestsCloning.cpp index c0e83ae2f3465d831f71d01f501e4b6a9432a0a2..13d97ce6c7cd716584ea236a2dc063a318b4c7d9 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/cloning/GTTestsCloning.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/cloning/GTTestsCloning.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/cloning/GTTestsCloning.h b/src/plugins/GUITestBase/src/tests/common_scenarios/cloning/GTTestsCloning.h index c6e91c02a2c06adf4f6aabdebe58f51716269a0c..1bb517cd0aa407831cbe821588467cd132325373 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/cloning/GTTestsCloning.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/cloning/GTTestsCloning.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/document_from_text/GTTestsDocumentFromText.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/document_from_text/GTTestsDocumentFromText.cpp index 6acfc7ab31fd1935d3ed7aac3d0c61e4e593db32..6454318607bdf05191dfea89db748556ff1a4eb1 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/document_from_text/GTTestsDocumentFromText.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/document_from_text/GTTestsDocumentFromText.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/document_from_text/GTTestsDocumentFromText.h b/src/plugins/GUITestBase/src/tests/common_scenarios/document_from_text/GTTestsDocumentFromText.h index aafe911366d97eb3f27c40f5b2a75d7eb6e4a2ec..9ba2e18df9a0bb9d171805538ce3a16263a0e979 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/document_from_text/GTTestsDocumentFromText.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/document_from_text/GTTestsDocumentFromText.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/dp_view/GTTestsDpView.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/dp_view/GTTestsDpView.cpp index 674ded9a6f11761b81e2cb7cb016b2980a9c49f3..2ddf01f12a2d745ceb14ef51906bd780ec67f461 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/dp_view/GTTestsDpView.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/dp_view/GTTestsDpView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/dp_view/GTTestsDpView.h b/src/plugins/GUITestBase/src/tests/common_scenarios/dp_view/GTTestsDpView.h index d82c70a5a71df88949c5762a80c51425d071e002..fef6ba0306f9be80e9ebedab68afb05f62159925 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/dp_view/GTTestsDpView.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/dp_view/GTTestsDpView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/mca_editor/GTTestsMcaEditor.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/mca_editor/GTTestsMcaEditor.cpp index 8ac9893e708e41dc80f3161e508f9157922e4dc8..22c9c767e7d75b5627335b6bf34c25635fe6f7bd 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/mca_editor/GTTestsMcaEditor.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/mca_editor/GTTestsMcaEditor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/mca_editor/GTTestsMcaEditor.h b/src/plugins/GUITestBase/src/tests/common_scenarios/mca_editor/GTTestsMcaEditor.h index 10431797dc0a6f6f54686e97be19334e7e34036b..0e65c9d1f2f00a91e38839467a0bbd25b44da2fc 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/mca_editor/GTTestsMcaEditor.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/mca_editor/GTTestsMcaEditor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/GTTestsMsaEditor.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/GTTestsMsaEditor.cpp index a7e0d6580a7904d0b08be01d5c7ee8b288ec3199..2d56aa766e57078d568d5d7dbfe3b79191bd1bb6 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/GTTestsMsaEditor.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/GTTestsMsaEditor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -1874,7 +1874,7 @@ GUI_TEST_CLASS_DEFINITION(test_0016) { // GTKeyboardDriver::keyClick( 'c', Qt::ControlModifier); GTUtilsDialog::waitForDialog(os,new PopupChooser(os,QStringList()<<MSAE_MENU_COPY<<"copy_selection")); GTMouseDriver::click(Qt::RightButton); - GTGlobals::sleep(); + GTGlobals::sleep(4000); QString clipboardText = GTClipboard::text(os); CHECK_SET_ERR(clipboardText == "CTT", "MSA part differs from expected"); @@ -1915,10 +1915,10 @@ GUI_TEST_CLASS_DEFINITION(test_0016_1) { GTGlobals::sleep(); GTUtilsMSAEditorSequenceArea::selectArea(os, QPoint(0, 0), QPoint(2, 0)); - GTGlobals::sleep(); + GTGlobals::sleep(4000); // copy to clipboard GTKeyboardDriver::keyClick( 'c', Qt::ControlModifier); - GTGlobals::sleep(); + GTGlobals::sleep(4000); QString clipboardText = GTClipboard::text(os); @@ -3232,7 +3232,7 @@ void test_0039_function(HI::GUITestOpStatus &os, int comboNum, QString extention //3.Fill dialog: // File name: test/_common_data/scenarios/sandbox/transl.aln // File format: CLUSTALW(use other formats too, check extension change) - // Amino translation: Standart genetic code + // Amino translation: Standard genetic code // Add document to project: checked GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "action_project__export_import_menu_action" << "action_project__export_to_amino_action")); diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/GTTestsMsaEditor.h b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/GTTestsMsaEditor.h index fa09621b4f65118b3b76b79950462d6e493e8fae..a5d989aa6abcdfabb829a5b511d11f1e6d6e26e0 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/GTTestsMsaEditor.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/GTTestsMsaEditor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/align/GTTestsAlignSequenceToMsa.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/align/GTTestsAlignSequenceToMsa.cpp index abe747a76803cf14d8c69960e297a290efc5eadb..34589318eaa12824cd82e03e665ad915dbed4403 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/align/GTTestsAlignSequenceToMsa.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/align/GTTestsAlignSequenceToMsa.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -89,8 +89,8 @@ GUI_TEST_CLASS_DEFINITION(test_0001){ GTUtilsProjectTreeView::click(os, "tub"); GTUtilsMdi::activateWindow(os, "3000_sequences [m] 3000_sequences"); - QAbstractButton *align = GTAction::button( os, "Align sequence to this alignment" ); - CHECK_SET_ERR(align != NULL, "MSA \"Align sequence to this alignment\" action not found"); + QAbstractButton *align = GTAction::button( os, "Align sequence(s) to this alignment" ); + CHECK_SET_ERR(align != NULL, "MSA \"Align sequence(s) to this alignment\" action not found"); GTWidget::click( os, align); GTUtilsProjectTreeView::click(os, "tub1.txt"); @@ -120,8 +120,8 @@ GUI_TEST_CLASS_DEFINITION(test_0002){ GTUtilsProjectTreeView::click(os, "tub"); GTUtilsMdi::activateWindow(os, "3000_sequences [m] 3000_sequences"); - QAbstractButton *align = GTAction::button( os, "Align sequence to this alignment" ); - CHECK_SET_ERR(align != NULL, "MSA \"Align sequence to this alignment\" action not found"); + QAbstractButton *align = GTAction::button( os, "Align sequence(s) to this alignment" ); + CHECK_SET_ERR(align != NULL, "MSA \"Align sequence(s) to this alignment\" action not found"); GTWidget::click( os, align); GTUtilsProjectTreeView::click(os, "3000_sequences.aln"); @@ -138,8 +138,8 @@ GUI_TEST_CLASS_DEFINITION(test_0002){ GUI_TEST_CLASS_DEFINITION(test_0003) { //Align short sequences with default settings(on platforms with MAFFT) - //Expected state: MAFFT alignment started and finished succesfully with using option --addfragments - ExternalTool *mafftTool = AppContext::getExternalToolRegistry()->getByName("MAFFT"); + //Expected state: MAFFT alignment started and finished successfully with using option --addfragments + ExternalTool *mafftTool = AppContext::getExternalToolRegistry()->getById("USUPP_MAFFT"); CHECK_SET_ERR(NULL != mafftTool, "Can't find MAFFT tool in the registry"); CHECK_SET_ERR(mafftTool->isValid(), "MAFFT tool is not valid"); @@ -151,8 +151,8 @@ GUI_TEST_CLASS_DEFINITION(test_0003) { GTFileDialogUtils *ob = new GTFileDialogUtils(os, testDir + "_common_data/cmdline/primers/", "primers.fa"); GTUtilsDialog::waitForDialog(os, ob); - QAbstractButton *align = GTAction::button( os, "Align sequence to this alignment" ); - CHECK_SET_ERR(align != NULL, "MSA \"Align sequence to this alignment\" action not found"); + QAbstractButton *align = GTAction::button( os, "Align sequence(s) to this alignment" ); + CHECK_SET_ERR(align != NULL, "MSA \"Align sequence(s) to this alignment\" action not found"); GTWidget::click( os, align); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -174,7 +174,7 @@ GUI_TEST_CLASS_DEFINITION(test_0003) { GUI_TEST_CLASS_DEFINITION(test_0004){ //Remove MAFFT from external tools, then align short sequences - //Expected state: UGENE alignment started and finished succesfully + //Expected state: UGENE alignment started and finished successfully GTFileDialog::openFile(os, dataDir + "samples/CLUSTALW/", "COI.aln"); GTUtilsTaskTreeView::waitTaskFinished(os); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -184,8 +184,8 @@ GUI_TEST_CLASS_DEFINITION(test_0004){ GTFileDialogUtils *ob = new GTFileDialogUtils(os, testDir + "_common_data/cmdline/primers/", "primers.fa"); GTUtilsDialog::waitForDialog(os, ob); - QAbstractButton *align = GTAction::button( os, "Align sequence to this alignment" ); - CHECK_SET_ERR(align != NULL, "MSA \"Align sequence to this alignment\" action not found"); + QAbstractButton *align = GTAction::button( os, "Align sequence(s) to this alignment" ); + CHECK_SET_ERR(align != NULL, "MSA \"Align sequence(s) to this alignment\" action not found"); GTWidget::click( os, align); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -198,7 +198,7 @@ GUI_TEST_CLASS_DEFINITION(test_0004){ } GUI_TEST_CLASS_DEFINITION(test_0005){ - ExternalTool *mafftTool = AppContext::getExternalToolRegistry()->getByName("MAFFT"); + ExternalTool *mafftTool = AppContext::getExternalToolRegistry()->getById("USUPP_MAFFT"); CHECK_SET_ERR(NULL != mafftTool, "Can't find MAFFT tool in the registry"); CHECK_SET_ERR(mafftTool->isValid(), "MAFFT tool is not valid"); @@ -211,8 +211,8 @@ GUI_TEST_CLASS_DEFINITION(test_0005){ GTFileDialogUtils_list *ob = new GTFileDialogUtils_list(os, testDir + "_common_data/alignment/align_sequence_to_an_alignment/", fileList); GTUtilsDialog::waitForDialog(os, ob); - QAbstractButton *align = GTAction::button( os, "Align sequence to this alignment" ); - CHECK_SET_ERR(align != NULL, "MSA \"Align sequence to this alignment\" action not found"); + QAbstractButton *align = GTAction::button( os, "Align sequence(s) to this alignment" ); + CHECK_SET_ERR(align != NULL, "MSA \"Align sequence(s) to this alignment\" action not found"); GTWidget::click( os, align); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -254,8 +254,8 @@ GUI_TEST_CLASS_DEFINITION(test_0006){ GTFileDialogUtils_list *ob = new GTFileDialogUtils_list(os, testDir + "_common_data/alignment/align_sequence_to_an_alignment/", fileList); GTUtilsDialog::waitForDialog(os, ob); - QAbstractButton *align = GTAction::button( os, "Align sequence to this alignment" ); - CHECK_SET_ERR(align != NULL, "MSA \"Align sequence to this alignment\" action not found"); + QAbstractButton *align = GTAction::button( os, "Align sequence(s) to this alignment" ); + CHECK_SET_ERR(align != NULL, "MSA \"Align sequence(s) to this alignment\" action not found"); GTWidget::click( os, align); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -296,8 +296,8 @@ GUI_TEST_CLASS_DEFINITION(test_0007){ GTFileDialogUtils *ob = new GTFileDialogUtils(os, dataDir + "samples/Genbank/", "CVU55762.gb"); GTUtilsDialog::waitForDialog(os, ob); - QAbstractButton *align = GTAction::button( os, "Align sequence to this alignment" ); - CHECK_SET_ERR(align != NULL, "MSA \"Align sequence to this alignment\" action not found"); + QAbstractButton *align = GTAction::button( os, "Align sequence(s) to this alignment" ); + CHECK_SET_ERR(align != NULL, "MSA \"Align sequence(s) to this alignment\" action not found"); GTWidget::click( os, align); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -317,8 +317,8 @@ GUI_TEST_CLASS_DEFINITION(test_0008){ GTFileDialogUtils_list *ob = new GTFileDialogUtils_list(os, testDir + "_common_data/abif/", fileList); GTUtilsDialog::waitForDialog(os, ob); - QAbstractButton *align = GTAction::button( os, "Align sequence to this alignment" ); - CHECK_SET_ERR(align != NULL, "MSA \"Align sequence to this alignment\" action not found"); + QAbstractButton *align = GTAction::button( os, "Align sequence(s) to this alignment" ); + CHECK_SET_ERR(align != NULL, "MSA \"Align sequence(s) to this alignment\" action not found"); GTWidget::click( os, align); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -336,8 +336,8 @@ GUI_TEST_CLASS_DEFINITION(test_0009){ GTFileDialogUtils *ob = new GTFileDialogUtils(os, testDir + "_common_data/clustal/", "COI na.aln"); GTUtilsDialog::waitForDialog(os, ob); - QAbstractButton *align = GTAction::button( os, "Align sequence to this alignment" ); - CHECK_SET_ERR(align != NULL, "MSA \"Align sequence to this alignment\" action not found"); + QAbstractButton *align = GTAction::button( os, "Align sequence(s) to this alignment" ); + CHECK_SET_ERR(align != NULL, "MSA \"Align sequence(s) to this alignment\" action not found"); GTWidget::click( os, align); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -351,10 +351,10 @@ GUI_TEST_CLASS_DEFINITION(test_0010) { GTUtilsTaskTreeView::waitTaskFinished(os); GTUtilsTaskTreeView::waitTaskFinished(os); - //3. Click "Align sequence to this alignment" button on the toolbar. + //3. Click "Align sequence(s) to this alignment" button on the toolbar. //4. Select "data/samples/FASTQ/eas.fastq". GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, dataDir + "samples/FASTQ/eas.fastq")); - GTWidget::click(os, GTAction::button(os, "Align sequence to this alignment")); + GTWidget::click(os, GTAction::button(os, "Align sequence(s) to this alignment")); GTUtilsTaskTreeView::waitTaskFinished(os); //Expected state: three sequences are added to the msa. @@ -369,14 +369,14 @@ GUI_TEST_CLASS_DEFINITION(test_0011) { GTUtilsTaskTreeView::waitTaskFinished(os); // 2. Ensure that MAFFT tool is set. - ExternalTool *mafftTool = AppContext::getExternalToolRegistry()->getByName("MAFFT"); + ExternalTool *mafftTool = AppContext::getExternalToolRegistry()->getById("USUPP_MAFFT"); CHECK_SET_ERR(NULL != mafftTool, "Can't find MAFFT tool in the registry"); CHECK_SET_ERR(mafftTool->isValid(), "MAFFT tool is not valid"); -// 3. Click "Align sequence to this alignment" button on the toolbar. +// 3. Click "Align sequence(s) to this alignment" button on the toolbar. // 4. Select "_common_data/scenarios/add_and_align/add_and_align_1.fa" in the dialog. GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, testDir + "_common_data/scenarios/add_and_align/add_and_align_1.fa")); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence to this alignment"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence(s) to this alignment"); // Expected state: an additional row appeared in the alignment, all old rows were shifted to be aligned with the new row. const QStringList expectedMsaData = QStringList() << "----TAAGACTTCTAA------------" @@ -411,14 +411,14 @@ GUI_TEST_CLASS_DEFINITION(test_0012) { GTUtilsTaskTreeView::waitTaskFinished(os); // 2. Ensure that MAFFT tool is set. - ExternalTool *mafftTool = AppContext::getExternalToolRegistry()->getByName("MAFFT"); + ExternalTool *mafftTool = AppContext::getExternalToolRegistry()->getById("USUPP_MAFFT"); CHECK_SET_ERR(NULL != mafftTool, "Can't find MAFFT tool in the registry"); CHECK_SET_ERR(mafftTool->isValid(), "MAFFT tool is not valid"); -// 3. Click "Align sequence to this alignment" button on the toolbar. +// 3. Click "Align sequence(s) to this alignment" button on the toolbar. // 4. Select "_common_data/scenarios/add_and_align/add_and_align_2.fa" in the dialog. GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, testDir + "_common_data/scenarios/add_and_align/add_and_align_2.fa")); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence to this alignment"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence(s) to this alignment"); // Expected state: an additional row appeared in the alignment, all old rows were shifted to be aligned with the new row. const QStringList expectedMsaData = QStringList() << "------TAAGACTTCTAA" @@ -453,14 +453,14 @@ GUI_TEST_CLASS_DEFINITION(test_0013) { GTUtilsTaskTreeView::waitTaskFinished(os); // 2. Ensure that MAFFT tool is set. - ExternalTool *mafftTool = AppContext::getExternalToolRegistry()->getByName("MAFFT"); + ExternalTool *mafftTool = AppContext::getExternalToolRegistry()->getById("USUPP_MAFFT"); CHECK_SET_ERR(NULL != mafftTool, "Can't find MAFFT tool in the registry"); CHECK_SET_ERR(mafftTool->isValid(), "MAFFT tool is not valid"); -// 3. Click "Align sequence to this alignment" button on the toolbar. +// 3. Click "Align sequence(s) to this alignment" button on the toolbar. // 4. Select "_common_data/scenarios/add_and_align/add_and_align_1.fa" in the dialog. GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, testDir + "_common_data/scenarios/add_and_align/add_and_align_1.fa")); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence to this alignment"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence(s) to this alignment"); // Expected state: an additional row appeared in the alignment, all old rows were shifted to be aligned with the new row, columns with gaps were removed const QStringList expectedMsaData = QStringList() << "-----AAGCTTCTTTTAA----------" @@ -487,14 +487,14 @@ GUI_TEST_CLASS_DEFINITION(test_0014) { GTUtilsTaskTreeView::waitTaskFinished(os); // 2. Ensure that MAFFT tool is set. - ExternalTool *mafftTool = AppContext::getExternalToolRegistry()->getByName("MAFFT"); + ExternalTool *mafftTool = AppContext::getExternalToolRegistry()->getById("USUPP_MAFFT"); CHECK_SET_ERR(NULL != mafftTool, "Can't find MAFFT tool in the registry"); CHECK_SET_ERR(mafftTool->isValid(), "MAFFT tool is not valid"); -// 3. Click "Align sequence to this alignment" button on the toolbar. +// 3. Click "Align sequence(s) to this alignment" button on the toolbar. // 4. Select "_common_data/scenarios/add_and_align/add_and_align_3.fa" in the dialog. GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, testDir + "_common_data/scenarios/add_and_align/add_and_align_3.fa")); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence to this alignment"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence(s) to this alignment"); // Expected state: an additional row appeared in the alignment, the forth column doesn't consist only of gaps, there are no columns of gaps even in the end of the alignment. const QStringList expectedMsaData = QStringList() << "AAGCTTCTTTTAA" @@ -523,9 +523,9 @@ GUI_TEST_CLASS_DEFINITION(test_0015) { GTFileDialog::openFile(os, testDir + "_common_data/scenarios/msa/ma2_gap_8_col.aln"); GTUtilsTaskTreeView::waitTaskFinished(os); -// 3. Click "Align sequence to this alignment" button on the toolbar. +// 3. Click "Align sequence(s) to this alignment" button on the toolbar. GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, testDir + "_common_data/scenarios/add_and_align/add_and_align_3.fa")); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence to this alignment"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence(s) to this alignment"); // 4. Select "_common_data/scenarios/add_and_align/add_and_align_3.fa" in the dialog. // Expected state: an additional row appeared in the alignment, the forth column doesn't consist only of gaps, there are no columns of gaps even in the end of the alignment. @@ -548,7 +548,7 @@ GUI_TEST_CLASS_DEFINITION(test_0015) { GUI_TEST_CLASS_DEFINITION(test_0016_1) { // Sequences with length less or equal than 50 should be aligned without gaps, even the result alignment is worse in this case. - ExternalTool *mafftTool = AppContext::getExternalToolRegistry()->getByName("MAFFT"); + ExternalTool *mafftTool = AppContext::getExternalToolRegistry()->getById("USUPP_MAFFT"); CHECK_SET_ERR(NULL != mafftTool, "Can't find MAFFT tool in the registry"); CHECK_SET_ERR(mafftTool->isValid(), "MAFFT tool is not valid"); @@ -556,10 +556,10 @@ GUI_TEST_CLASS_DEFINITION(test_0016_1) { GTFileDialog::openFile(os, testDir + "_common_data/clustal/COI na.aln"); GTUtilsTaskTreeView::waitTaskFinished(os); -// 2. Click "Align sequence to this alignment" button on the toolbar. +// 2. Click "Align sequence(s) to this alignment" button on the toolbar. // 3. Select "_common_data/scenarios/add_and_align/seq1.fa" as sequence to align. GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, testDir + "_common_data/scenarios/add_and_align/seq1.fa")); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence to this alignment"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence(s) to this alignment"); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -572,7 +572,7 @@ GUI_TEST_CLASS_DEFINITION(test_0016_1) { GUI_TEST_CLASS_DEFINITION(test_0016_2) { // Sequences with length greater than 50 should be aligned with gaps - ExternalTool *mafftTool = AppContext::getExternalToolRegistry()->getByName("MAFFT"); + ExternalTool *mafftTool = AppContext::getExternalToolRegistry()->getById("USUPP_MAFFT"); CHECK_SET_ERR(NULL != mafftTool, "Can't find MAFFT tool in the registry"); CHECK_SET_ERR(mafftTool->isValid(), "MAFFT tool is not valid"); @@ -580,10 +580,10 @@ GUI_TEST_CLASS_DEFINITION(test_0016_2) { GTFileDialog::openFile(os, testDir + "_common_data/clustal/COI na.aln"); GTUtilsTaskTreeView::waitTaskFinished(os); -// 2. Click "Align sequence to this alignment" button on the toolbar. +// 2. Click "Align sequence(s) to this alignment" button on the toolbar. // 3. Select "_common_data/scenarios/add_and_align/seq2.fa" as sequence to align. GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, testDir + "_common_data/scenarios/add_and_align/seq2.fa")); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence to this alignment"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence(s) to this alignment"); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -598,7 +598,7 @@ GUI_TEST_CLASS_DEFINITION(test_0016_3) { // Sequences with length less or equal than 50 should be aligned without gaps, even the result alignment is worse in this case. // This behaviour should be applied, even if input data is alignment - ExternalTool *mafftTool = AppContext::getExternalToolRegistry()->getByName("MAFFT"); + ExternalTool *mafftTool = AppContext::getExternalToolRegistry()->getById("USUPP_MAFFT"); CHECK_SET_ERR(NULL != mafftTool, "Can't find MAFFT tool in the registry"); CHECK_SET_ERR(mafftTool->isValid(), "MAFFT tool is not valid"); @@ -606,10 +606,10 @@ GUI_TEST_CLASS_DEFINITION(test_0016_3) { GTFileDialog::openFile(os, testDir + "_common_data/clustal/COI na.aln"); GTUtilsTaskTreeView::waitTaskFinished(os); -// 2. Click "Align sequence to this alignment" button on the toolbar. +// 2. Click "Align sequence(s) to this alignment" button on the toolbar. // 3. Select "_common_data/scenarios/add_and_align/two_seqs.aln" as input data. GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, testDir + "_common_data/scenarios/add_and_align/two_seqs.aln")); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence to this alignment"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence(s) to this alignment"); GTUtilsTaskTreeView::waitTaskFinished(os); diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/align/GTTestsAlignSequenceToMsa.h b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/align/GTTestsAlignSequenceToMsa.h index f0cada22364fe604d4b295ab748ff9fea292de30..588105ce6e8af2be93a09a35e7bd25ad0691cbfd 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/align/GTTestsAlignSequenceToMsa.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/align/GTTestsAlignSequenceToMsa.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/colors/GTTestsMSAEditorColors.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/colors/GTTestsMSAEditorColors.cpp index b3e3f4b30db2d1375b6879b67e12ea7c01e5e30a..465c9d3107d9e6782ebb219328abe677db6ac316 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/colors/GTTestsMSAEditorColors.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/colors/GTTestsMSAEditorColors.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -161,7 +161,7 @@ GUI_TEST_CLASS_DEFINITION(test_0004){ // Expected state: Background of the symbol with the highest number of matches in the column is painted over. // Intensity of colour depends on the frequency of appearance in the column. QWidget* seq=GTWidget::findWidget(os, "msa_editor_sequence_area"); - GTUtilsDialog::waitForDialog(os, new PopupChooser(os,QStringList()<<"Colors"<<"Percentage Identity")); + GTUtilsDialog::waitForDialog(os, new PopupChooser(os,QStringList()<<"Colors"<<"Percentage identity")); GTMenu::showContextMenu(os,seq); // Symbols and columns at the descending order // 1. A,G,T at 2,3,9 diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/colors/GTTestsMSAEditorColors.h b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/colors/GTTestsMSAEditorColors.h index 0fef08c9297c987561fa7ac67a5ced53d0828c41..0745528831c4b7687454b6814a5b638ffa4fe901 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/colors/GTTestsMSAEditorColors.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/colors/GTTestsMSAEditorColors.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/consensus/GTTestsMSAEditorConsensus.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/consensus/GTTestsMSAEditorConsensus.cpp index e99e6f754d9512ca10720b52a9659a28d3ebca48..829b6527d7a050956d3352c81d25d317607eee08 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/consensus/GTTestsMSAEditorConsensus.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/consensus/GTTestsMSAEditorConsensus.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/consensus/GTTestsMSAEditorConsensus.h b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/consensus/GTTestsMSAEditorConsensus.h index 1acd6ce26ea35cd1c0156f51f4234a9941c03fb9..020042ebd42f88979624c9a434ebd128e065ae39 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/consensus/GTTestsMSAEditorConsensus.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/consensus/GTTestsMSAEditorConsensus.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/edit/GTTestsMSAEditorEdit.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/edit/GTTestsMSAEditorEdit.cpp index f6b31473261d2faaa20445ad6875e712b09ee5b5..bc4640e7de183e7edd9c2a0af75495478564ca8e 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/edit/GTTestsMSAEditorEdit.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/edit/GTTestsMSAEditorEdit.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/edit/GTTestsMSAEditorEdit.h b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/edit/GTTestsMSAEditorEdit.h index 67a85269db495785bf9eb55fd212a1f36c95aa7d..f5308028aef600414d21c8a338176f966de22b9e 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/edit/GTTestsMSAEditorEdit.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/edit/GTTestsMSAEditorEdit.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/overview/GTTestsMSAEditorOverview.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/overview/GTTestsMSAEditorOverview.cpp index cb4700c34fa97ae533398a5253f1e8b672eba3f6..0f2725bdf2fe7b3e6166a1208a1c8885bfb57033 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/overview/GTTestsMSAEditorOverview.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/overview/GTTestsMSAEditorOverview.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -121,7 +121,7 @@ GUI_TEST_CLASS_DEFINITION(test_0005) { GTUtilsTaskTreeView::waitTaskFinished(os); // 2. Align "samples/CLUSTALW/HIV-1.aln" GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, dataDir + "samples/CLUSTALW/HIV-1.aln")); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence to this alignment"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence(s) to this alignment"); GTUtilsTaskTreeView::waitTaskFinished(os); GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "Show simple overview")); @@ -158,22 +158,18 @@ GUI_TEST_CLASS_DEFINITION(test_0006){ GTMenu::showContextMenu(os, GTWidget::findWidget(os, "msa_overview_area")); // 2. Resize main window. QWidget* overviewSimple = GTWidget::findWidget(os, "msa_overview_area_simple"); - QPixmap pixmapSimple1 = QPixmap::grabWidget(overviewSimple, QRect(QPoint(0,0), QPoint(200,overviewSimple->rect().height()))); // It should be replaces with GTWidget::getPixmap() - QImage imgSimple1 = pixmapSimple1.toImage(); + QImage imgSimple1 = GTWidget::getImage(os, overviewSimple); QWidget* overviewGraph = GTWidget::findWidget(os, "msa_overview_area_graph"); - QPixmap pixmapGraph1 = QPixmap::grabWidget(overviewGraph, QRect(QPoint(0,0), QPoint(200,overviewGraph->rect().height()))); // It should be replaces with GTWidget::getPixmap() - QImage imgGraph1 = pixmapGraph1.toImage(); + QImage imgGraph1 = GTWidget::getImage(os, overviewGraph); QMainWindow* window = AppContext::getMainWindow()->getQMainWindow(); window->showNormal(); GTGlobals::sleep(1000); - QPixmap pixmapSimple2 = QPixmap::grabWidget(overviewSimple, QRect(QPoint(0,0), QPoint(200,overviewSimple->rect().height()))); // It should be replaces with GTWidget::getPixmap() - QImage imgSimple2 = pixmapSimple2.toImage(); - QPixmap pixmapGraph2 = QPixmap::grabWidget(overviewGraph, QRect(QPoint(0,0), QPoint(200,overviewGraph->rect().height()))); // It should be replaces with GTWidget::getPixmap() - QImage imgGraph2 = pixmapGraph2.toImage(); + QImage imgSimple2 = GTWidget::getImage(os, overviewSimple); + QImage imgGraph2 = GTWidget::getImage(os, overviewGraph); CHECK_SET_ERR(imgSimple1 != imgSimple2, "simple overview not updated"); CHECK_SET_ERR(imgGraph1 != imgGraph2, "graph overview not updated"); @@ -191,24 +187,21 @@ GUI_TEST_CLASS_DEFINITION(test_0007){ QWidget* overviewSimple = GTWidget::findWidget(os, "msa_overview_area_simple"); QWidget* overviewGraph = GTWidget::findWidget(os, "msa_overview_area_graph"); + //Close Project view for small screens + GTKeyboardDriver::keyClick('1', Qt::AltModifier); for(int i=0; i<12; i++){ //saving overviews' images - QPixmap pixmapSimple1 = QPixmap::grabWidget(overviewSimple, QRect(QPoint(0,0), QPoint(200,overviewSimple->rect().height()))); // It should be replaces with GTWidget::getPixmap() - QImage imgSimple1 = pixmapSimple1.toImage(); - - QPixmap pixmapGraph1 = QPixmap::grabWidget(overviewGraph, QRect(QPoint(0,0), QPoint(200,overviewGraph->rect().height()))); // It should be replaces with GTWidget::getPixmap() - QImage imgGraph1 = pixmapGraph1.toImage(); + QImage imgSimple1 = GTWidget::getImage(os, overviewSimple); + QImage imgGraph1 = GTWidget::getImage(os, overviewGraph); GTUtilsMSAEditorSequenceArea::selectArea(os, QPoint(0,0), QPoint(40,17)); GTKeyboardDriver::keyClick( Qt::Key_Delete); GTGlobals::sleep(500); //checking images changed - QPixmap pixmapSimple2 = QPixmap::grabWidget(overviewSimple, QRect(QPoint(0,0), QPoint(200,overviewSimple->rect().height()))); // It should be replaces with GTWidget::getPixmap() - QImage imgSimple2 = pixmapSimple2.toImage(); - QPixmap pixmapGraph2 = QPixmap::grabWidget(overviewGraph, QRect(QPoint(0,0), QPoint(200,overviewGraph->rect().height()))); // It should be replaces with GTWidget::getPixmap() - QImage imgGraph2 = pixmapGraph2.toImage(); + QImage imgSimple2 = GTWidget::getImage(os, overviewSimple); + QImage imgGraph2 = GTWidget::getImage(os, overviewGraph); CHECK_SET_ERR(imgSimple1 != imgSimple2, "simple overview not updated"); CHECK_SET_ERR(imgGraph1 != imgGraph2, "graph overview not updated") @@ -226,8 +219,7 @@ GUI_TEST_CLASS_DEFINITION(test_0008) { QWidget *overviewGraph = GTWidget::findWidget(os, "msa_overview_area_graph"); //saving overviews' images - QPixmap pixmapSimple1 = QPixmap::grabWidget(overviewSimple, QRect(QPoint(0, 0), QPoint(200, overviewSimple->rect().height()))); // It should be replaces with GTWidget::getPixmap() - QImage imgSimple1 = pixmapSimple1.toImage(); + QImage imgSimple1 = GTWidget::getImage(os, overviewSimple); // 2. Select some area in msa view and move it with mouse. GTUtilsMSAEditorSequenceArea::selectArea(os, QPoint(0, 0), QPoint(10, 10)); @@ -238,8 +230,7 @@ GUI_TEST_CLASS_DEFINITION(test_0008) { // Expected state: while mouse button is pressed graph overview is blocked. On mouse release overview updating starts. // Simple overview updates simultaneously. //checking simple overview image changed - QPixmap pixmapSimple2 = QPixmap::grabWidget(overviewSimple, QRect(QPoint(0, 0), QPoint(200, overviewSimple->rect().height()))); // It should be replaces with GTWidget::getPixmap() - QImage imgSimple2 = pixmapSimple2.toImage(); + QImage imgSimple2 = GTWidget::getImage(os, overviewSimple); CHECK_SET_ERR(imgSimple1 != imgSimple2, "simple overview not updated"); @@ -266,8 +257,7 @@ GUI_TEST_CLASS_DEFINITION(test_0009) { QWidget *overviewGraph = GTWidget::findWidget(os, "msa_overview_area_graph"); //saving overviews' images - QPixmap pixmapSimple1 = QPixmap::grabWidget(overviewSimple, QRect(QPoint(0, 0), QPoint(200, overviewSimple->rect().height()))); // It should be replaces with GTWidget::getPixmap() - QImage imgSimple1 = pixmapSimple1.toImage(); + QImage imgSimple1 = GTWidget::getImage(os, overviewSimple); // 2. Select one symbol. GTUtilsMSAEditorSequenceArea::moveTo(os, QPoint(5, 5)); @@ -280,8 +270,7 @@ GUI_TEST_CLASS_DEFINITION(test_0009) { // Expected state: while button is pressed graph overview is blocked. Overview updating starts on button release. // Simple overview updates simultaneously. //checking simple overview image changed - QPixmap pixmapSimple2 = QPixmap::grabWidget(overviewSimple, QRect(QPoint(0, 0), QPoint(200, overviewSimple->rect().height()))); // It should be replaces with GTWidget::getPixmap() - QImage imgSimple2 = pixmapSimple2.toImage(); + QImage imgSimple2 = GTWidget::getImage(os, overviewSimple); CHECK_SET_ERR(imgSimple1 != imgSimple2, "simple overview not updated"); @@ -302,8 +291,7 @@ GUI_TEST_CLASS_DEFINITION(test_0010) { QWidget* overviewGraph = GTWidget::findWidget(os, "msa_overview_area_graph"); //saving overviews' images - QPixmap pixmapSimple1 = QPixmap::grabWidget(overviewSimple, QRect(QPoint(0, 0), QPoint(200, overviewSimple->rect().height()))); // It should be replaces with GTWidget::getPixmap() - QImage imgSimple1 = pixmapSimple1.toImage(); + QImage imgSimple1 = GTWidget::getImage(os, overviewSimple); // 2. Select one symbol. GTUtilsMSAEditorSequenceArea::moveTo(os, QPoint(5, 5)); @@ -316,8 +304,7 @@ GUI_TEST_CLASS_DEFINITION(test_0010) { // Expected state: while button is pressed graph overview is blocked. Overview updating starts on button release. // Simple overview updates simultaneously. //checking simple overview image changed - QPixmap pixmapSimple2 = QPixmap::grabWidget(overviewSimple, QRect(QPoint(0, 0), QPoint(200, overviewSimple->rect().height()))); // It should be replaces with GTWidget::getPixmap() - QImage imgSimple2 = pixmapSimple2.toImage(); + QImage imgSimple2 = GTWidget::getImage(os, overviewSimple); CHECK_SET_ERR(imgSimple1 != imgSimple2, "simple overview not updated"); @@ -513,16 +500,16 @@ GUI_TEST_CLASS_DEFINITION(test_0019) { } GUI_TEST_CLASS_DEFINITION(test_0020) { -/* 1. Open "_common_data/clustal/test_1393.aln". +/* 1. Open "_common_data/regression/1393/test_1393.aln". * 2. Show simple overview. * 3. Select whole alignment. * Expected state: whole simple overview is filled with a selection rect. - * 4. Click "Align sequence to this alignment" button on the tool bar and select "data/samples/fastq/eas.fastq". + * 4. Click "Align sequence(s) to this alignment" button on the tool bar and select "data/samples/fastq/eas.fastq". * Expected state: sequences are added, two of five sequences are selected both in the sequence area and simple overview. * Current state: sequences are added, two of five sequences are selected in the sequence area, but the simple overview is filled with a selection rect like whole alignment is selected. */ - GTFileDialog::openFile(os, testDir + "_common_data/clustal/test_1393.aln"); + GTFileDialog::openFile(os, testDir + "_common_data/regression/1393/test_1393.aln"); GTUtilsTaskTreeView::waitTaskFinished(os); GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "Show simple overview")); @@ -531,7 +518,7 @@ GUI_TEST_CLASS_DEFINITION(test_0020) { GTUtilsMSAEditorSequenceArea::selectArea(os); GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, dataDir + "samples/FASTQ/eas.fastq")); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence to this alignment"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence(s) to this alignment"); GTUtilsTaskTreeView::waitTaskFinished(os); QWidget *overviewSimple = GTWidget::findWidget(os, "msa_overview_area_simple"); @@ -540,14 +527,14 @@ GUI_TEST_CLASS_DEFINITION(test_0020) { } GUI_TEST_CLASS_DEFINITION(test_0021) { -/* 1. Open "_common_data/clustal/test_1393.aln". +/* 1. Open "_common_data/regression/1393/test_1393.aln". * 2. Select whole alignment. * 3. Show simple overview. * Expected state: whole simple overview is filled with a selection rect. * Current state: selection not showed. */ - GTFileDialog::openFile(os, testDir + "_common_data/clustal/test_1393.aln"); + GTFileDialog::openFile(os, testDir + "_common_data/regression/1393/test_1393.aln"); GTUtilsTaskTreeView::waitTaskFinished(os); GTUtilsMSAEditorSequenceArea::selectArea(os); @@ -561,7 +548,7 @@ GUI_TEST_CLASS_DEFINITION(test_0021) { } GUI_TEST_CLASS_DEFINITION(test_0022) { -/* 1. Open "_common_data/clustal/test_1393.aln". +/* 1. Open "_common_data/regression/1393/test_1393.aln". * 2. Open ProjectView if it closed * 3. Select whole alignment. * 4. Show simple overview. @@ -571,7 +558,7 @@ GUI_TEST_CLASS_DEFINITION(test_0022) { * Current state: selection is not full. */ - GTFileDialog::openFile(os, testDir + "_common_data/clustal/test_1393.aln"); + GTFileDialog::openFile(os, testDir + "_common_data/regression/1393/test_1393.aln"); GTUtilsTaskTreeView::waitTaskFinished(os); GTUtilsProjectTreeView::openView(os); diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/overview/GTTestsMSAEditorOverview.h b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/overview/GTTestsMSAEditorOverview.h index a633fce9f9876ba97677993258a245d28afbc0ab..af0e63c1a2bb4a20e02e23675ad86103f76ff15b 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/overview/GTTestsMSAEditorOverview.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/overview/GTTestsMSAEditorOverview.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/replace_character/GTTestsMSAEditorReplaceCharacter.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/replace_character/GTTestsMSAEditorReplaceCharacter.cpp index 8e5d6a0e1013af5577e9329ddb34d04655e2ff86..a91c138d276fd6f9737608d6e1dbac2109b349a2 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/replace_character/GTTestsMSAEditorReplaceCharacter.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/replace_character/GTTestsMSAEditorReplaceCharacter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -303,7 +303,7 @@ GUI_TEST_CLASS_DEFINITION(test_0008){ GTUtilsMSAEditorSequenceArea::clickToPosition(os, QPoint(41, 9)); //3. Replace the gap - //Expected result : the gap is succesfully replaced. + //Expected result : the gap is successfully replaced. GTKeyboardDriver::keyClick( 'r', Qt::ShiftModifier); GTKeyboardDriver::keyClick( 'c'); @@ -323,7 +323,7 @@ GUI_TEST_CLASS_DEFINITION(test_0009){ GTUtilsMSAEditorSequenceArea::clickToPosition(os, QPoint(43, 9)); //3. Replace the gap - //Expected result : the gap is succesfully replaced. + //Expected result : the gap is successfully replaced. GTKeyboardDriver::keyClick( 'r', Qt::ShiftModifier); GTKeyboardDriver::keyClick( 'c'); @@ -343,7 +343,7 @@ GUI_TEST_CLASS_DEFINITION(test_0010){ GTUtilsMSAEditorSequenceArea::clickToPosition(os, QPoint(42, 9)); //3. Replace the gap - //Expected result : the gap is succesfully replaced. + //Expected result : the gap is successfully replaced. GTKeyboardDriver::keyClick( 'r', Qt::ShiftModifier); GTKeyboardDriver::keyClick( 'c'); @@ -370,7 +370,7 @@ GUI_TEST_CLASS_DEFINITION(test_0011){ GTGlobals::sleep(500); //3. Replace the gap - //Expected result : the gap is succesfully replaced. + //Expected result : the gap is successfully replaced. GTKeyboardDriver::keyClick( 'r', Qt::ShiftModifier); GTGlobals::sleep(1000); GTKeyboardDriver::keyClick( 'c'); @@ -393,7 +393,7 @@ GUI_TEST_CLASS_DEFINITION(test_0012){ GTUtilsMSAEditorSequenceArea::selectArea(os, QPoint(0, 9), QPoint(0, 9)); //3. Replace the gap - //Expected result : the gap is succesfully replaced. + //Expected result : the gap is successfully replaced. GTKeyboardDriver::keyClick( 'r', Qt::ShiftModifier); GTKeyboardDriver::keyClick( 'c'); @@ -413,7 +413,7 @@ GUI_TEST_CLASS_DEFINITION(test_0013){ GTUtilsMSAEditorSequenceArea::selectArea(os, QPoint(0, 9), QPoint(0, 9)); //3. Replace the character - //Expected result : the character is succesfully replaced. + //Expected result : the character is successfully replaced. GTKeyboardDriver::keyClick( 'r', Qt::ShiftModifier); GTKeyboardDriver::keyClick( 'c'); @@ -434,7 +434,7 @@ GUI_TEST_CLASS_DEFINITION(test_0014){ GTUtilsMSAEditorSequenceArea::clickToPosition(os, QPoint(603, 9)); //3. Replace the character - //Expected result : the character is succesfully replaced. + //Expected result : the character is successfully replaced. GTKeyboardDriver::keyClick( 'r', Qt::ShiftModifier); GTKeyboardDriver::keyClick( 'c'); @@ -487,7 +487,7 @@ GUI_TEST_CLASS_DEFINITION(test_0016){ GTUtilsMSAEditorSequenceArea::selectArea(os, QPoint(0, 9), QPoint(0, 9)); //3. Replace the character to gap by space key - //Expected result : the character is succesfully replaced. + //Expected result : the character is successfully replaced. GTKeyboardDriver::keyClick( 'r', Qt::ShiftModifier); GTKeyboardDriver::keyClick( Qt::Key_Space); @@ -502,7 +502,7 @@ GUI_TEST_CLASS_DEFINITION(test_0016){ GTUtilsMSAEditorSequenceArea::selectArea(os, QPoint(0, 10), QPoint(0, 10)); //4. Replace the character to gap by '-' key - //Expected result : the character is succesfully replaced. + //Expected result : the character is successfully replaced. GTKeyboardDriver::keyClick( 'r', Qt::ShiftModifier); GTKeyboardDriver::keyClick( '-'); diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/replace_character/GTTestsMSAEditorReplaceCharacter.h b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/replace_character/GTTestsMSAEditorReplaceCharacter.h index 9cc27c31f3b37e7c27838ac2d52b76e7c255996e..e0662debee5a32e6e4dff298382c53aaafcaccac 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/replace_character/GTTestsMSAEditorReplaceCharacter.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/msa_editor/replace_character/GTTestsMSAEditorReplaceCharacter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/ngs_classification/metaphlan2/GTTestsMetaPhlAn2.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/ngs_classification/metaphlan2/GTTestsMetaPhlAn2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d516785a00163744f003d4feaa0d371862037073 --- /dev/null +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/ngs_classification/metaphlan2/GTTestsMetaPhlAn2.cpp @@ -0,0 +1,754 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "GTTestsMetaPhlAn2.h" + +#include <QApplication> +#include <QDir> +#include <QFileInfo> +#include <QTableWidget> +#include <QTreeWidget> + +#include <base_dialogs/MessageBoxFiller.h> + +#include <primitives/GTLineEdit.h> +#include <primitives/GTMenu.h> +#include <primitives/GTWidget.h> + +#include <GTUtilsTaskTreeView.h> +#include "GTUtilsWorkflowDesigner.h" + +#include "runnables/ugene/corelibs/U2Gui/AppSettingsDialogFiller.h" + +#include <U2Core/AppContext.h> +#include <U2Core/AppResources.h> +#include <U2Core/AppSettings.h> + +#include "U2Test/UGUITest.h" + +namespace U2 { + +namespace GUITest_common_scenarios_mg_metaphlan2_external_tool { +using namespace HI; + +const QString ET_PYTHON = "python"; +const QString ET_NUMPY = "numpy"; +const QString ET_BIO = "Bio"; +const QString ET_BOWTIE_2_ALIGNER = "Bowtie 2 aligner"; +const QString ET_BOWTIE_2_BUILD = "Bowtie 2 build indexer"; +const QString ET_METAPHLAN = "MetaPhlAn2"; +const QString UTIL_SCRIPT = "/utils/read_fastx.py"; +const QString PATH_METAPHLAN2_WITHOUT_SCRIPT = "/_common_data/metagenomics/metaphlan2/external_tool/metaphlan2.py"; +const QString PATH_PYTHON_WITHOUT_NUMPY = "/opt/share/virogenesis-dev/test_external_tools/python_without_numpy/bin"; +const QString PATH_PYTHON_WITHOUT_BIO = "/opt/share/virogenesis-dev/test_external_tools/python_without_bio/bin"; +const QString NAME_PYTHON = "python2.7"; + +void checkExternalToolValid(GUITestOpStatus &os, const QString& toolName, const bool shouldBeValid) { + const bool isToolValid = AppSettingsDialogFiller::isExternalToolValid(os, toolName); + if (isToolValid != shouldBeValid) { + os.setError(QString("%1 %2 valid, but %3 be").arg(toolName) + .arg(shouldBeValid ? "isn't" : "is") + .arg(shouldBeValid ? "should" : "shoudn't")); + } +} + +void checkUtilScript(GUITestOpStatus &os, const bool shouldBeValid) { + QString pathToMetaphlan = QDir::toNativeSeparators(AppSettingsDialogFiller::getExternalToolPath(os, ET_METAPHLAN)); + QString pathToMetaphlanDir = QFileInfo(pathToMetaphlan).absolutePath(); + QString utilNativeSeparators = QDir::toNativeSeparators(UTIL_SCRIPT); + bool isValid = !AppSettingsDialogFiller::isToolDescriptionContainsString(os, ET_METAPHLAN, "MetaPhlAn2 script \"utils/read_fastx.py\" is not present!"); + if (isValid != shouldBeValid) { + os.setError(QString("Unitl script %1 %2 exist, but %3 be").arg(utilNativeSeparators) + .arg(shouldBeValid ? "doesn't" : "does") + .arg(shouldBeValid ? "should" : "shoudn't")); + } +} + +void checkDependedTools(GUITestOpStatus &os, const QString& tool, const QStringList& toolList) { + QStringList absentTools; + foreach(const QString& str, toolList) { + bool isOk = AppSettingsDialogFiller::isToolDescriptionContainsString(os, tool, str); + if (!isOk) { + absentTools << str; + } + } + + if (!absentTools.isEmpty()) { + QString error; + bool isSingleToolAbsent = absentTools.size() == 1; + error += QString("%1 tool should be depended on the following %2: ").arg(tool).arg(isSingleToolAbsent ? "tool" : "tools"); + foreach(const QString& t, absentTools) { + error += QString("%1 ,").arg(t); + } + error = error.left(error.size() - 1); + os.setError(error); + } +} + +QString getPythonWithoutNumpyPath() { + return QDir::toNativeSeparators(PATH_PYTHON_WITHOUT_NUMPY); +} + +QString getPythonWithoutBioPath() { + return QDir::toNativeSeparators(PATH_PYTHON_WITHOUT_BIO); +} + +QString getMetaphlan2WithoutScriptPath() { + return UGUITest::testDir + QDir::toNativeSeparators(PATH_METAPHLAN2_WITHOUT_SCRIPT); +} + +GUI_TEST_CLASS_DEFINITION(test_0001) { + class Custom : public CustomScenario { + void run(HI::GUITestOpStatus &os){ + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(dialog != NULL, "AppSettingsDialogFiller isn't found"); + + AppSettingsDialogFiller::openTab(os, AppSettingsDialogFiller::ExternalTools); + + //"python" is installed. + checkExternalToolValid(os, ET_PYTHON, true); + + //"Bio" python module is installed. + checkExternalToolValid(os, ET_BIO, true); + + //"numpy" python module is installed. + checkExternalToolValid(os, ET_NUMPY, true); + + //"bowtie-align" executable is specified in UGENE. + checkExternalToolValid(os, ET_BOWTIE_2_ALIGNER, true); + + //"bowtie-build" executable is not specified in UGENE. + AppSettingsDialogFiller::setExternalToolPath(os, ET_BOWTIE_2_BUILD, sandBoxDir); + checkExternalToolValid(os, ET_BOWTIE_2_BUILD, false); + + //"utils/read_fastq.py" is present in the metaphlan tool folder. + checkUtilScript(os, true); + + //"MetaPhlAn2" external tool is specified in UGENE. + //Expected state: "MetaPhlAn2" tool is present and valid. + checkExternalToolValid(os, ET_METAPHLAN, true); + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + }; + + //1. Open "UGENE Application Settings", select "External Tools" tab. + GTUtilsDialog::waitForDialog(os, new AppSettingsDialogFiller(os, new Custom())); + GTMenu::clickMainMenuItem(os, QStringList() << "Settings" << "Preferences...", GTGlobals::UseMouse); + + CHECK_SET_ERR(!os.hasError(), os.getError()); +} + +GUI_TEST_CLASS_DEFINITION(test_0002) { + class Custom : public CustomScenario { + void run(HI::GUITestOpStatus &os){ + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(dialog != NULL, "AppSettingsDialogFiller isn't found"); + + AppSettingsDialogFiller::openTab(os, AppSettingsDialogFiller::ExternalTools); + + //python" is not installed. + AppSettingsDialogFiller::setExternalToolPath(os, ET_PYTHON, sandBoxDir); + checkExternalToolValid(os, ET_PYTHON, false); + + //"Bio" python module is installed. + checkExternalToolValid(os, ET_BIO, false); + + //"numpy" python module is installed. + checkExternalToolValid(os, ET_NUMPY, false); + + //"bowtie-align" executable is specified in UGENE. + checkExternalToolValid(os, ET_BOWTIE_2_ALIGNER, true); + + //"utils/read_fastq.py" is present in the metaphlan tool folder. + checkUtilScript(os, true); + + //Expected state: "MetaPhlAn2" tool is present, but invalid. + checkExternalToolValid(os, ET_METAPHLAN, false); + + //Expected state: There is a message about tools "python" and "numpy". + checkDependedTools(os, ET_METAPHLAN, QStringList() << ET_PYTHON << ET_NUMPY); + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + }; + + //1. Open "UGENE Application Settings", select "External Tools" tab. + GTUtilsDialog::waitForDialog(os, new AppSettingsDialogFiller(os, new Custom())); + GTMenu::clickMainMenuItem(os, QStringList() << "Settings" << "Preferences...", GTGlobals::UseMouse); + + CHECK_SET_ERR(!os.hasError(), os.getError()); +} + +GUI_TEST_CLASS_DEFINITION(test_0003) { + class Custom : public CustomScenario { + void run(HI::GUITestOpStatus &os){ + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(dialog != NULL, "AppSettingsDialogFiller isn't found"); + + AppSettingsDialogFiller::openTab(os, AppSettingsDialogFiller::ExternalTools); + + //python" is installed. + AppSettingsDialogFiller::setExternalToolPath(os, ET_PYTHON, getPythonWithoutNumpyPath(), NAME_PYTHON); + checkExternalToolValid(os, ET_PYTHON, true); + + //"Bio" python module is installed. + checkExternalToolValid(os, ET_BIO, true); + + //"numpy" python module is not installed. + checkExternalToolValid(os, ET_NUMPY, false); + + //"bowtie-align" executable is specified in UGENE. + checkExternalToolValid(os, ET_BOWTIE_2_ALIGNER, true); + + //"utils/read_fastq.py" is present in the metaphlan tool folder. + checkUtilScript(os, true); + + //Expected state: "MetaPhlAn2" tool is present, but invalid. + checkExternalToolValid(os, ET_METAPHLAN, false); + + //Expected state: There is a message about "numpy" tool. + checkDependedTools(os, ET_METAPHLAN, QStringList() << ET_NUMPY); + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + }; + + //1. Open "UGENE Application Settings", select "External Tools" tab. + GTUtilsDialog::waitForDialog(os, new AppSettingsDialogFiller(os, new Custom())); + GTMenu::clickMainMenuItem(os, QStringList() << "Settings" << "Preferences...", GTGlobals::UseMouse); + + CHECK_SET_ERR(!os.hasError(), os.getError()); +} + +GUI_TEST_CLASS_DEFINITION(test_0004) { + class Custom : public CustomScenario { + void run(HI::GUITestOpStatus &os){ + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(dialog != NULL, "AppSettingsDialogFiller isn't found"); + + AppSettingsDialogFiller::openTab(os, AppSettingsDialogFiller::ExternalTools); + + //python" is installed. + checkExternalToolValid(os, ET_PYTHON, true); + + //"Bio" python module is installed. + checkExternalToolValid(os, ET_BIO, true); + + //"numpy" python module is installed. + checkExternalToolValid(os, ET_NUMPY, true); + + //"bowtie-align" executable is not specified in UGENE. + AppSettingsDialogFiller::setExternalToolPath(os, ET_BOWTIE_2_ALIGNER, sandBoxDir); + checkExternalToolValid(os, ET_BOWTIE_2_ALIGNER, false); + + //"utils/read_fastq.py" is present in the metaphlan tool folder. + checkUtilScript(os, true); + + //Expected state: "MetaPhlAn2" tool is present, but invalid. + checkExternalToolValid(os, ET_METAPHLAN, false); + + //Expected state: There is a message about "bowtie2-align" tool. + checkDependedTools(os, ET_METAPHLAN, QStringList() << ET_BOWTIE_2_ALIGNER); + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + }; + + //1. Open "UGENE Application Settings", select "External Tools" tab. + GTUtilsDialog::waitForDialog(os, new AppSettingsDialogFiller(os, new Custom())); + GTMenu::clickMainMenuItem(os, QStringList() << "Settings" << "Preferences...", GTGlobals::UseMouse); + + CHECK_SET_ERR(!os.hasError(), os.getError()); +} + +GUI_TEST_CLASS_DEFINITION(test_0005) { + class Custom : public CustomScenario { + void run(HI::GUITestOpStatus &os){ + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(dialog != NULL, "AppSettingsDialogFiller isn't found"); + + AppSettingsDialogFiller::openTab(os, AppSettingsDialogFiller::ExternalTools); + AppSettingsDialogFiller::setExternalToolPath(os, ET_METAPHLAN, getMetaphlan2WithoutScriptPath()); + + //python" is installed. + checkExternalToolValid(os, ET_PYTHON, true); + + //"Bio" python module is installed. + checkExternalToolValid(os, ET_BIO, true); + + //"numpy" python module is installed. + checkExternalToolValid(os, ET_NUMPY, true); + + //"bowtie-align" executable is specified in UGENE. + checkExternalToolValid(os, ET_BOWTIE_2_ALIGNER, true); + + //"utils/read_fastq.py" is not present in the metaphlan tool folder. + checkUtilScript(os, false); + + //Expected state: "MetaPhlAn2" tool is present, but invalid. + checkExternalToolValid(os, ET_METAPHLAN, false); + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + }; + + //1. Open "UGENE Application Settings", select "External Tools" tab. + GTUtilsDialog::waitForDialog(os, new AppSettingsDialogFiller(os, new Custom())); + GTMenu::clickMainMenuItem(os, QStringList() << "Settings" << "Preferences...", GTGlobals::UseMouse); + + CHECK_SET_ERR(!os.hasError(), os.getError()); +} + +GUI_TEST_CLASS_DEFINITION(test_0006) { + class Custom : public CustomScenario { + void run(HI::GUITestOpStatus &os){ + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(dialog != NULL, "AppSettingsDialogFiller isn't found"); + + AppSettingsDialogFiller::openTab(os, AppSettingsDialogFiller::ExternalTools); + + //python" is installed. + AppSettingsDialogFiller::setExternalToolPath(os, ET_PYTHON, getPythonWithoutNumpyPath(), NAME_PYTHON); + checkExternalToolValid(os, ET_PYTHON, true); + + //"Bio" python module is installed. + checkExternalToolValid(os, ET_BIO, true); + + //"numpy" python module is not installed. + checkExternalToolValid(os, ET_NUMPY, false); + + //"bowtie-align" executable is specified in UGENE. + checkExternalToolValid(os, ET_BOWTIE_2_ALIGNER, true); + + //"utils/read_fastq.py" is not present in the metaphlan tool folder (but there is no message aboute it) + checkUtilScript(os, true); + + //Expected state: "MetaPhlAn2" tool is present, but invalid. + checkExternalToolValid(os, ET_METAPHLAN, false); + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + }; + + //1. Open "UGENE Application Settings", select "External Tools" tab. + GTUtilsDialog::waitForDialog(os, new AppSettingsDialogFiller(os, new Custom())); + GTMenu::clickMainMenuItem(os, QStringList() << "Settings" << "Preferences...", GTGlobals::UseMouse); + + CHECK_SET_ERR(!os.hasError(), os.getError()); +} + +GUI_TEST_CLASS_DEFINITION(test_0007) { + class Custom : public CustomScenario { + void run(HI::GUITestOpStatus &os){ + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(dialog != NULL, "AppSettingsDialogFiller isn't found"); + + AppSettingsDialogFiller::openTab(os, AppSettingsDialogFiller::ExternalTools); + + //python" is installed. + AppSettingsDialogFiller::setExternalToolPath(os, ET_PYTHON, getPythonWithoutBioPath(), NAME_PYTHON); + checkExternalToolValid(os, ET_PYTHON, true); + + //"Bio" python module is not installed. + checkExternalToolValid(os, ET_BIO, false); + + //"numpy" python module is installed. + checkExternalToolValid(os, ET_NUMPY, true); + + //"bowtie-align" executable is specified in UGENE. + checkExternalToolValid(os, ET_BOWTIE_2_ALIGNER, true); + + //"utils/read_fastq.py" is present in the metaphlan tool folder. + checkUtilScript(os, true); + + //Expected state: "MetaPhlAn2" tool is present, but invalid. + checkExternalToolValid(os, ET_METAPHLAN, false); + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + }; + + //1. Open "UGENE Application Settings", select "External Tools" tab. + GTUtilsDialog::waitForDialog(os, new AppSettingsDialogFiller(os, new Custom())); + GTMenu::clickMainMenuItem(os, QStringList() << "Settings" << "Preferences...", GTGlobals::UseMouse); + + CHECK_SET_ERR(!os.hasError(), os.getError()); +} + +GUI_TEST_CLASS_DEFINITION(test_0008) { + // 1. Open the "External Tools" page in the "Application Settings" dialog. + // 2. Provide a valid MetaPhlAn2 executable, remove python executable. + // 3. Apply settings. + class Custom : public CustomScenario { + void run(HI::GUITestOpStatus& os) { + QWidget* dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(dialog != NULL, "AppSettingsDialogFiller isn't found"); + + AppSettingsDialogFiller::openTab(os, AppSettingsDialogFiller::ExternalTools); + + AppSettingsDialogFiller::setExternalToolPath(os, ET_PYTHON, "/invalid_path/"); + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + }; + + GTUtilsDialog::waitForDialog(os, new AppSettingsDialogFiller(os, new Custom())); + GTMenu::clickMainMenuItem(os, QStringList() << "Settings" << "Preferences...", GTGlobals::UseMouse); + + // 4. Open the Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + + // 5. Add "Classify Sequences with MetaPhlAn2" workflow element. + GTUtilsWorkflowDesigner::addElement(os, "Classify Sequences with MetaPhlAn2"); + + // Expected result : there are no errors about "python"and it's modules. There is a warning about "MetaPhlAn2" tool. + GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, QMessageBox::Ok)); + GTUtilsWorkflowDesigner::validateWorkflow(os); + QStringList errors = GTUtilsWorkflowDesigner::getErrors(os); + QString error("Classify Sequences with MetaPhlAn2: External tool \"MetaPhlAn2\" is invalid. UGENE may not support this version of the tool or a wrong path to the tools is selected"); + CHECK_SET_ERR(errors.contains(error), "The expected error is absent"); + const int expectedErrorCount = 2; + CHECK_SET_ERR(expectedErrorCount == errors.size(), QString("There are too many errors: expected %1, got %2").arg(expectedErrorCount).arg(errors.size())); +} + +} // namespace GUITest_common_scenarios_mg_metaphlan2_external_tool + +namespace GUITest_common_scenarios_mg_metaphlan2_workflow_designer_element { + +static const QString INPUT_DATA = "Input data"; +static const QString DATABASE = "Database"; +static const QString NUMBER_OF_THREADS = "Number of threads"; +static const QString ANALYSIS_TYPE = "Analysis type"; +static const QString TAX_LEVEL = "Tax level"; +static const QString PRESENCE_THRESHOLD = "Presence threshold"; +static const QString NORMALIZE_BY_METAGENOME_SIZE = "Normalize by metagenome size"; +static const QString BOWTIE2_OUTPUT_FILE = "Bowtie2 output file"; +static const QString OUTPUT_FILE = "Output file"; + +static const QStringList INPUT_DATA_VALUES = { "SE reads or contigs", + "PE reads" }; + +static const QStringList ANALYSIS_TYPE_VALUES = { "Relative abundance", + "Relative abundance with reads statistics", + "Reads mapping", + "Clade profiles", + "Marker abundance table", + "Marker presence table" }; + +static const QStringList TAX_LEVEL_VALUES = { "All", + "Kingdoms", + "Phyla", + "Classes", + "Orders", + "Families", + "Genera", + "Species" }; + +static const QStringList NORMALIZE_BY_METAGENOME_SIZE_VALUES = { "Skip", + "Normalize" }; + + +static const QString DEFAULT_OUTPUT_VALUE = "Auto"; + + +GUI_TEST_CLASS_DEFINITION(test_0001) { + //1. Open WD + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + + //2. Add "Classify Sequences with MetaPhlAn2" element to the scene + GTUtilsWorkflowDesigner::addElement(os, "Classify Sequences with MetaPhlAn2"); + + //3. Click on the element + GTUtilsWorkflowDesigner::click(os, "Classify Sequences with MetaPhlAn2"); + + //Expected default parameters: + //Input data, Input data format, Database, Number of threads, + //Analysis type, Tax level, Bowtie2 output file, Output file + QStringList currentParameters = GTUtilsWorkflowDesigner::getAllParameters(os); + CHECK_SET_ERR(currentParameters.size() == 7, + QString("Unexpected number of default parameters, expected: 7, current: %1") + .arg(currentParameters.size())); + QStringList defaultParameters = { INPUT_DATA, DATABASE, NUMBER_OF_THREADS, + ANALYSIS_TYPE, TAX_LEVEL, BOWTIE2_OUTPUT_FILE, OUTPUT_FILE }; + foreach(const QString& par, defaultParameters) { + CHECK_SET_ERR(currentParameters.contains(par), QString("The default parameter \"%1\" is missed").arg(par)); + } + + {//4. Check "Input data" + //Expected: current "Input data" value is "SE reads or contigs", input table has one line + QString inputDataValue = GTUtilsWorkflowDesigner::getParameter(os, INPUT_DATA); + CHECK_SET_ERR(inputDataValue == INPUT_DATA_VALUES.first(), + QString("Unexpected \"Input data\" value, expected: SE reads or contigs, current: %1") + .arg(inputDataValue)); + + QTableWidget* inputTable = GTUtilsWorkflowDesigner::getInputPortsTable(os, 0); + int row = inputTable->rowCount(); + CHECK_SET_ERR(row == 1, + QString("Unexpected \"Input data\" row count, expected: 1, current: %1") + .arg(row)); + + //5. Set "Input data" value on "PE reads" + GTUtilsWorkflowDesigner::setParameter(os, + INPUT_DATA, + INPUT_DATA_VALUES.last(), + GTUtilsWorkflowDesigner::comboValue); + + //Expected: input table has two lines + inputTable = GTUtilsWorkflowDesigner::getInputPortsTable(os, 0); + row = inputTable->rowCount(); + CHECK_SET_ERR(row == 2, + QString("Unexpected \"Input data\" row count, expected: 2, current: %1") + .arg(row)); + } + + {//7. Check "Database" + //Expected: database path ends with 'data/ngs_classification/metaphlan2/mpa_v20_m200' + QString databasePath = QDir::toNativeSeparators(GTUtilsWorkflowDesigner::getParameter(os, DATABASE)); + QString expectedEnd = QDir::toNativeSeparators("data/ngs_classification/metaphlan2/mpa_v20_m200"); + CHECK_SET_ERR(databasePath.endsWith(expectedEnd), + QString("Unexpected database path end: %1") + .arg(databasePath.right(expectedEnd.size()))); + } + + {//8. Check "Number of Threads" + //Expected: expected optimal for the current OS threads num + int threads = GTUtilsWorkflowDesigner::getParameter(os, NUMBER_OF_THREADS).toInt(); + int expectedThreads = AppContext::getAppSettings()->getAppResourcePool()->getIdealThreadCount(); + CHECK_SET_ERR(threads == expectedThreads, + QString("Unexpected threads num, expected: %1, current: %2") + .arg(expectedThreads) + .arg(threads)); + } + + {//9. Check "Analysis type" + //Expected: Analysis type default value is "Relative abundance" + QString analysisTypeDefault = GTUtilsWorkflowDesigner::getParameter(os, ANALYSIS_TYPE); + CHECK_SET_ERR(analysisTypeDefault == ANALYSIS_TYPE_VALUES.first(), + QString("Unexpected Analysis type default value, expected: %1, current: %2") + .arg(ANALYSIS_TYPE_VALUES.first()) + .arg(analysisTypeDefault)); + } + + {//10. Check "Tax level" + //Expected: Tax level default value is "All" + QString taxLevelDefault = GTUtilsWorkflowDesigner::getParameter(os, TAX_LEVEL); + CHECK_SET_ERR(taxLevelDefault == TAX_LEVEL_VALUES.first(), + QString("Unexpected Tax level default value, expected: %1, current: %2") + .arg(TAX_LEVEL_VALUES.first()) + .arg(taxLevelDefault)); + } + + {//11. Check "Bowtie2 output file" + //Expected: Bowtie2 output file value is "Auto" + QString bowtie2OutputFileDefault = GTUtilsWorkflowDesigner::getParameter(os, BOWTIE2_OUTPUT_FILE); + CHECK_SET_ERR(bowtie2OutputFileDefault == DEFAULT_OUTPUT_VALUE, + QString("Unexpected Bowtie2 output file default value, expected: Auto, current: %1") + .arg(bowtie2OutputFileDefault)); + } + + {//12. Check "Output file" + //Expected: Output file value is "Auto" + QString outputFileDefault = GTUtilsWorkflowDesigner::getParameter(os, OUTPUT_FILE); + CHECK_SET_ERR(outputFileDefault == DEFAULT_OUTPUT_VALUE, + QString("Unexpected Bowtie2 output file default value, expected: Auto, current: %1") + .arg(outputFileDefault)); + } +} + +GUI_TEST_CLASS_DEFINITION(test_0002) { + //1. Open WD + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + + //2. Add "Classify Sequences with MetaPhlAn2" element to the scene + GTUtilsWorkflowDesigner::addElement(os, "Classify Sequences with MetaPhlAn2"); + + //3. Click on the element + GTUtilsWorkflowDesigner::click(os, "Classify Sequences with MetaPhlAn2"); + + { + //4. Check if "Analysis type" parameter has 6 values: + //Relative abundance, Relative abundance with reads statistics, Reads mapping + //Clade profiles, Marker abundance table, Marker presence table + QStringList analysisTypeValues = GTUtilsWorkflowDesigner::getComboBoxParameterValues(os, ANALYSIS_TYPE); + CHECK_SET_ERR(analysisTypeValues.size() == ANALYSIS_TYPE_VALUES.size(), + QString("Unexpected \"Analysis type\" values size, expected: %1, current: %2") + .arg(ANALYSIS_TYPE_VALUES.size()) + .arg(analysisTypeValues.size())); + + foreach(const QString& value, ANALYSIS_TYPE_VALUES) { + CHECK_SET_ERR(analysisTypeValues.contains(value), + QString("Analysis type doesn't contain %1 value, but should be") + .arg(value)); + } + } + + { + //5. Check if "Tax level" parameter has 8 values: + //All, Kingdoms, Phyla, Classes, Orders, Families, Genera, Species + QStringList taxLevelValues = GTUtilsWorkflowDesigner::getComboBoxParameterValues(os, TAX_LEVEL); + CHECK_SET_ERR(taxLevelValues.size() == TAX_LEVEL_VALUES.size(), + QString("Unexpected \"Tax level\" values size, expected: %1, current: %2") + .arg(TAX_LEVEL_VALUES.size()) + .arg(taxLevelValues.size())); + + foreach(const QString& value, TAX_LEVEL_VALUES) { + CHECK_SET_ERR(taxLevelValues.contains(value), + QString("Tax level doesn't contain %1 value, but should be") + .arg(value)); + } + } + + //6. Set "Analysis type" value on "Marker abundance table" + GTUtilsWorkflowDesigner::setParameter(os, + ANALYSIS_TYPE, + ANALYSIS_TYPE_VALUES[4], + GTUtilsWorkflowDesigner::comboValue); + + { + //7. Check if "Normalize by metagenome size" parameter has 2 values: + //Skip, Normalize + QStringList normalizeValues = GTUtilsWorkflowDesigner::getComboBoxParameterValues(os, NORMALIZE_BY_METAGENOME_SIZE); + CHECK_SET_ERR(normalizeValues.size() == NORMALIZE_BY_METAGENOME_SIZE_VALUES.size(), + QString("Unexpected \"Normalize by metagenome size\" values size, expected: %1, current: %2") + .arg(NORMALIZE_BY_METAGENOME_SIZE_VALUES.size()) + .arg(normalizeValues.size())); + + foreach(const QString& value, NORMALIZE_BY_METAGENOME_SIZE_VALUES) { + CHECK_SET_ERR(normalizeValues.contains(value), + QString("Normalize by metagenome size doesn't contain %1 value, but should be") + .arg(value)); + } + } + + { + //8. Check if "Input data" parameter has 2 values: + //SE reads or contigs, PE reads + QStringList inputDataValues = GTUtilsWorkflowDesigner::getComboBoxParameterValues(os, INPUT_DATA); + CHECK_SET_ERR(inputDataValues.size() == INPUT_DATA_VALUES.size(), + QString("Unexpected \"Input data\" values size, expected: %1, current: %2") + .arg(INPUT_DATA_VALUES.size()) + .arg(inputDataValues.size())); + + foreach(const QString& value, INPUT_DATA_VALUES) { + CHECK_SET_ERR(inputDataValues.contains(value), + QString("Input data doesn't contain %1 value, but should be") + .arg(value)); + } + } +} + +GUI_TEST_CLASS_DEFINITION(test_0003) { + //1. Open WD + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + + //2. Add "Classify Sequences with MetaPhlAn2" element to the scene + GTUtilsWorkflowDesigner::addElement(os, "Classify Sequences with MetaPhlAn2"); + + //3. Click on the element + GTUtilsWorkflowDesigner::click(os, "Classify Sequences with MetaPhlAn2"); + + //4. Clear Database value + GTUtilsWorkflowDesigner::setParameter(os, DATABASE, QString(), GTUtilsWorkflowDesigner::lineEditWithFileSelector); + + //5. Click to another parameter to change focus + GTUtilsWorkflowDesigner::setParameter(os, INPUT_DATA, INPUT_DATA_VALUES.first(), GTUtilsWorkflowDesigner::comboValue); + + //Expected:: Database has value "Required" + QString databaseValue = GTUtilsWorkflowDesigner::getParameter(os, DATABASE); + CHECK_SET_ERR(databaseValue == "Required", + QString("Unexpected Database value, expected: \"Required\", current: \"%1\"") + .arg(databaseValue)); +} + +GUI_TEST_CLASS_DEFINITION(test_0004) { + //1. Open WD + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + + //2. Add "Classify Sequences with MetaPhlAn2" element to the scene + GTUtilsWorkflowDesigner::addElement(os, "Classify Sequences with MetaPhlAn2"); + + //3. Click on the element + GTUtilsWorkflowDesigner::click(os, "Classify Sequences with MetaPhlAn2"); + + QStringList allParameters = GTUtilsWorkflowDesigner::getAllParameters(os); + + //Expected: Tax value parameter is represented bu default + CHECK_SET_ERR(allParameters.contains(TAX_LEVEL), "Tax level parameter is'nt represented by default"); + + //4. Set "Analysis type" value to "Relative abundance with reads statistics" + GTUtilsWorkflowDesigner::setParameter(os, ANALYSIS_TYPE, ANALYSIS_TYPE_VALUES[1], GTUtilsWorkflowDesigner::comboValue); + + //Change focus to avoid problems + GTUtilsWorkflowDesigner::setParameter(os, INPUT_DATA, INPUT_DATA_VALUES.first(), GTUtilsWorkflowDesigner::comboValue); + + //Expected: Tax value parameter is represented + allParameters = GTUtilsWorkflowDesigner::getAllParameters(os); + CHECK_SET_ERR(allParameters.contains(TAX_LEVEL), "Tax level parameter isn't represented"); + + //5. Set "Analysis type" value to "Reads mapping" + GTUtilsWorkflowDesigner::setParameter(os, ANALYSIS_TYPE, ANALYSIS_TYPE_VALUES[2], GTUtilsWorkflowDesigner::comboValue); + + //Change focus to avoid problems + GTUtilsWorkflowDesigner::setParameter(os, INPUT_DATA, INPUT_DATA_VALUES.first(), GTUtilsWorkflowDesigner::comboValue); + + //Expected: 7 parameters are represented + allParameters = GTUtilsWorkflowDesigner::getAllParameters(os); + CHECK_SET_ERR(allParameters.size() == 6, + QString("Unexpected parameters number, expected: 6, current: %1") + .arg(allParameters.size())); + + //6. Set "Analysis type" value to "Reads mapping" + GTUtilsWorkflowDesigner::setParameter(os, ANALYSIS_TYPE, ANALYSIS_TYPE_VALUES[3], GTUtilsWorkflowDesigner::comboValue); + + //Change focus to avoid problems + GTUtilsWorkflowDesigner::setParameter(os, INPUT_DATA, INPUT_DATA_VALUES.first(), GTUtilsWorkflowDesigner::comboValue); + + //Expected: 7 parameters are represented + allParameters = GTUtilsWorkflowDesigner::getAllParameters(os); + CHECK_SET_ERR(allParameters.size() == 6, + QString("Unexpected parameters number, expected: 6, current: %1") + .arg(allParameters.size())); + + //7. Set "Analysis type" value to "Marker abundance table" + GTUtilsWorkflowDesigner::setParameter(os, ANALYSIS_TYPE, ANALYSIS_TYPE_VALUES[4], GTUtilsWorkflowDesigner::comboValue); + + //Change focus to avoid problems + GTUtilsWorkflowDesigner::setParameter(os, INPUT_DATA, INPUT_DATA_VALUES.first(), GTUtilsWorkflowDesigner::comboValue); + + //Expected: Normalize by metagenome size parameter is represented + allParameters = GTUtilsWorkflowDesigner::getAllParameters(os); + CHECK_SET_ERR(allParameters.contains(NORMALIZE_BY_METAGENOME_SIZE), "Normalize by metagenome size parameter isn't represented"); + + //8. Set "Analysis type" value to "Marker presence table" + GTUtilsWorkflowDesigner::setParameter(os, ANALYSIS_TYPE, ANALYSIS_TYPE_VALUES[5], GTUtilsWorkflowDesigner::comboValue); + + //Change focus to avoid problems + GTUtilsWorkflowDesigner::setParameter(os, INPUT_DATA, INPUT_DATA_VALUES.first(), GTUtilsWorkflowDesigner::comboValue); + + //Expected: Presence threshold parameter is represented + allParameters = GTUtilsWorkflowDesigner::getAllParameters(os); + CHECK_SET_ERR(allParameters.contains(PRESENCE_THRESHOLD), "Presence threshold parameter isn't represented"); +} + +} + +} // namespace U2 diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/ngs_classification/metaphlan2/GTTestsMetaPhlAn2.h b/src/plugins/GUITestBase/src/tests/common_scenarios/ngs_classification/metaphlan2/GTTestsMetaPhlAn2.h new file mode 100644 index 0000000000000000000000000000000000000000..ee31f4e50f93570b31f6810a21a37bb79b40d77e --- /dev/null +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/ngs_classification/metaphlan2/GTTestsMetaPhlAn2.h @@ -0,0 +1,60 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef GT_TESTS_METAPHLAN_H +#define GT_TESTS_METAPHLAN_H + +#include <U2Test/UGUITestBase.h> + +namespace U2 { + +namespace GUITest_common_scenarios_mg_metaphlan2_external_tool { +#undef GUI_TEST_SUITE +#define GUI_TEST_SUITE "GUITest_common_scenarios_mg_metaphlan2_external_tool" + +GUI_TEST_CLASS_DECLARATION(test_0001) +GUI_TEST_CLASS_DECLARATION(test_0002) +GUI_TEST_CLASS_DECLARATION(test_0003) +GUI_TEST_CLASS_DECLARATION(test_0004) +GUI_TEST_CLASS_DECLARATION(test_0005) +GUI_TEST_CLASS_DECLARATION(test_0006) +GUI_TEST_CLASS_DECLARATION(test_0007) +GUI_TEST_CLASS_DECLARATION(test_0008) + +#undef GUI_TEST_SUITE +} // namespace GUITest_common_scenarios_mg_metaphlan2_external_tool + +namespace GUITest_common_scenarios_mg_metaphlan2_workflow_designer_element { +#undef GUI_TEST_SUITE +#define GUI_TEST_SUITE "GUITest_common_scenarios_mg_metaphlan2_workflow_designer_element" + +GUI_TEST_CLASS_DECLARATION(test_0001) +GUI_TEST_CLASS_DECLARATION(test_0002) +GUI_TEST_CLASS_DECLARATION(test_0003) +GUI_TEST_CLASS_DECLARATION(test_0004) + +#undef GUI_TEST_SUITE +} // GUITest_common_scenarios_mg_metaphlan2_workflow_designer_element + +} //namespace U2 + +#endif // GT_TESTS_METAPHLAN_H + diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/GTTestsOptionPanel.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/GTTestsOptionPanel.cpp index dd36c169bc17fdffbf5f0b5ad5a6aa3b0fdc0217..602907a40ac247047257b001998e3b93f941e2a8 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/GTTestsOptionPanel.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/GTTestsOptionPanel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/GTTestsOptionPanel.h b/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/GTTestsOptionPanel.h index 1bab4f84ebc2c8a70acdf669d832bc8a23cd0b49..356ad49358730a1f06ca5dbdf0281ab52c600a16 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/GTTestsOptionPanel.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/GTTestsOptionPanel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/msa/GTTestsOptionPanelMSA.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/msa/GTTestsOptionPanelMSA.cpp index 0322c81ce5df16413ca2b15eda0c0e20dbb5735f..64a42e2ab03908e26c4e6d2062a6af0501d740de 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/msa/GTTestsOptionPanelMSA.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/msa/GTTestsOptionPanelMSA.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -28,16 +28,17 @@ #include <base_dialogs/GTFileDialog.h> #include <base_dialogs/MessageBoxFiller.h> #include <drivers/GTKeyboardDriver.h> +#include <drivers/GTMouseDriver.h> #include <primitives/GTAction.h> #include <primitives/GTCheckBox.h> #include <primitives/GTComboBox.h> #include <primitives/GTDoubleSpinBox.h> #include <primitives/GTLineEdit.h> +#include <primitives/GTMenu.h> #include <primitives/GTRadioButton.h> #include <primitives/GTSlider.h> #include <primitives/GTWidget.h> #include <primitives/PopupChooser.h> -#include <drivers/GTMouseDriver.h> #include <system/GTFile.h> #include <U2Core/AppContext.h> @@ -127,7 +128,7 @@ GUI_TEST_CLASS_DEFINITION(general_test_0002){ QLineEdit* sequenceLineEdit = qobject_cast<QLineEdit*>(GTWidget::findWidget(os, "sequenceLineEdit")); CHECK_SET_ERR(sequenceLineEdit != NULL, "sequenceLineEdit not found"); GTLineEdit::setText(os, sequenceLineEdit, "phan"); - QStringList names = GTBaseCompleter::getNames(os, GTBaseCompleter::getCompleter(os)); + QStringList names = GTBaseCompleter::getNames(os, sequenceLineEdit); //Expected state: popup helper contains Phaneroptera_falcata.(case insencivity is checked) int num = names.count(); CHECK_SET_ERR(num == 1, QString("wrong number of sequences in completer. Expected 1, found %1").arg(num)); @@ -148,7 +149,7 @@ GUI_TEST_CLASS_DEFINITION(general_test_0003){ CHECK_SET_ERR(sequenceLineEdit != NULL, "sequenceLineEdit not found"); GTLineEdit::setText(os, sequenceLineEdit, "wrong name"); // Expected state: empty popup helper appeared - bool empty = GTBaseCompleter::isEmpty(os, GTBaseCompleter::getCompleter(os)); + bool empty = GTBaseCompleter::isEmpty(os, sequenceLineEdit); CHECK_SET_ERR(empty, "completer is not empty"); GTWidget::click(os, sequenceLineEdit);//needed to close completer } @@ -165,7 +166,7 @@ GUI_TEST_CLASS_DEFINITION(general_test_0004){ QLineEdit* sequenceLineEdit = qobject_cast<QLineEdit*>(GTWidget::findWidget(os, "sequenceLineEdit")); CHECK_SET_ERR(sequenceLineEdit != NULL, "sequenceLineEdit not found"); GTLineEdit::setText(os, sequenceLineEdit, "Phan"); - QStringList completerList = GTBaseCompleter::getNames(os, GTBaseCompleter::getCompleter(os)); + QStringList completerList = GTBaseCompleter::getNames(os, sequenceLineEdit); // Expected state: two sequence names "Phaneroptera_falcata" appeared in popup helper CHECK_SET_ERR(completerList.count() == 2, "wrong number of sequences in completer"); QString first = completerList.at(0); @@ -222,7 +223,7 @@ GUI_TEST_CLASS_DEFINITION(highlighting_test_0001){ CHECK_SET_ERR(c == "#70f970", QString("c has color %1").arg(c)); CHECK_SET_ERR(gap == "#ffffff", QString("gap has color %1").arg(gap)); // 4. Check colors for all symbols -// (branches: check Jalview, Percentage Identity, Percentage Identity(gray), UGENE color schemes) +// (branches: check Jalview, Percentage identity, Percentage identity(gray), UGENE color schemes) } GUI_TEST_CLASS_DEFINITION(highlighting_test_0001_1){ @@ -245,7 +246,7 @@ GUI_TEST_CLASS_DEFINITION(highlighting_test_0001_1){ CHECK_SET_ERR(c == "#ffffff", QString("c has color %1").arg(c)); CHECK_SET_ERR(gap == "#ffffff", QString("gap has color %1").arg(gap)); // 4. Check colors for all symbols -// (branches: check Jalview, Percentage Identity, Percentage Identity(gray), UGENE color schemes) +// (branches: check Jalview, Percentage identity, Percentage identity(gray), UGENE color schemes) } GUI_TEST_CLASS_DEFINITION(highlighting_test_0001_2){ @@ -268,7 +269,7 @@ GUI_TEST_CLASS_DEFINITION(highlighting_test_0001_2){ CHECK_SET_ERR(c == "#ffb340", QString("c has color %1").arg(c)); CHECK_SET_ERR(gap == "#ffffff", QString("gap has color %1").arg(gap)); // 4. Check colors for all symbols -// (branches: check Jalview, Percentage Identity, Percentage Identity(gray), UGENE color schemes) +// (branches: check Jalview, Percentage identity, Percentage identity(gray), UGENE color schemes) } GUI_TEST_CLASS_DEFINITION(highlighting_test_0001_3){ @@ -277,9 +278,9 @@ GUI_TEST_CLASS_DEFINITION(highlighting_test_0001_3){ GTUtilsTaskTreeView::waitTaskFinished(os); // 2. Open highlighting option panel tab GTUtilsOptionPanelMsa::openTab(os, GTUtilsOptionPanelMsa::Highlighting); -// 3. Select "Percentage Identity" color scheme +// 3. Select "Percentage identity" color scheme QComboBox* colorScheme = qobject_cast<QComboBox*>(GTWidget::findWidget(os, "colorScheme")); - GTComboBox::setIndexWithText(os, colorScheme,"Percentage Identity"); + GTComboBox::setIndexWithText(os, colorScheme,"Percentage identity"); QString a = GTUtilsMSAEditorSequenceArea::getColor(os, QPoint(0,0)); QString t = GTUtilsMSAEditorSequenceArea::getColor(os, QPoint(0,2)); QString g = GTUtilsMSAEditorSequenceArea::getColor(os, QPoint(2,0)); @@ -291,7 +292,7 @@ GUI_TEST_CLASS_DEFINITION(highlighting_test_0001_3){ CHECK_SET_ERR(c == "#9999ff", QString("c has color %1").arg(c)); CHECK_SET_ERR(gap == "#ffffff", QString("gap has color %1").arg(gap)); // 4. Check colors for all symbols -// (branches: check Jalview, Percentage Identity, Percentage Identity(gray), UGENE color schemes) +// (branches: check Jalview, Percentage identity, Percentage identity(gray), UGENE color schemes) } GUI_TEST_CLASS_DEFINITION(highlighting_test_0001_4){ @@ -300,9 +301,9 @@ GUI_TEST_CLASS_DEFINITION(highlighting_test_0001_4){ GTUtilsTaskTreeView::waitTaskFinished(os); // 2. Open highlighting option panel tab GTUtilsOptionPanelMsa::openTab(os, GTUtilsOptionPanelMsa::Highlighting); -// 3. Select "Percentage Identity (gray)" color scheme +// 3. Select "Percentage identity (gray)" color scheme QComboBox* colorScheme = qobject_cast<QComboBox*>(GTWidget::findWidget(os, "colorScheme")); - GTComboBox::setIndexWithText(os, colorScheme,"Percentage Identity (gray)"); + GTComboBox::setIndexWithText(os, colorScheme,"Percentage identity (gray)"); QString a = GTUtilsMSAEditorSequenceArea::getColor(os, QPoint(0,0)); QString t = GTUtilsMSAEditorSequenceArea::getColor(os, QPoint(0,2)); QString g = GTUtilsMSAEditorSequenceArea::getColor(os, QPoint(2,0)); @@ -314,7 +315,7 @@ GUI_TEST_CLASS_DEFINITION(highlighting_test_0001_4){ CHECK_SET_ERR(c == "#999999", QString("c has color %1").arg(c)); CHECK_SET_ERR(gap == "#ffffff", QString("gap has color %1").arg(gap)); // 4. Check colors for all symbols -// (branches: check Jalview, Percentage Identity, Percentage Identity(gray), UGENE color schemes) +// (branches: check Jalview, Percentage identity, Percentage identity(gray), UGENE color schemes) } GUI_TEST_CLASS_DEFINITION(highlighting_test_0002){ @@ -1163,14 +1164,14 @@ GUI_TEST_CLASS_DEFINITION(pairwise_alignment_test_0004){ QLineEdit* line1 = GTUtilsOptionPanelMsa::getSeqLineEdit(os, 1); CHECK_SET_ERR(line1 != NULL, "lineEdit 1 not found"); GTLineEdit::setText(os, line1, "wrong name"); - CHECK_SET_ERR(GTBaseCompleter::isEmpty(os), "Completer is not empty"); + CHECK_SET_ERR(GTBaseCompleter::isEmpty(os, line1), "Completer is not empty"); GTKeyboardDriver::keyClick( Qt::Key_Escape); QLineEdit* line2 = GTUtilsOptionPanelMsa::getSeqLineEdit(os, 2); CHECK_SET_ERR(line2 != NULL, "lineEdit 2 not found"); GTLineEdit::setText(os, line2, "wrong name"); - CHECK_SET_ERR(GTBaseCompleter::isEmpty(os), "Completer is not empty"); + CHECK_SET_ERR(GTBaseCompleter::isEmpty(os, line2), "Completer is not empty"); GTKeyboardDriver::keyClick(Qt::Key_Escape); GTUtilsOptionPanelMsa::toggleTab(os, GTUtilsOptionPanelMsa::PairwiseAlignment); // Expected state: empty popup helper appeared @@ -1342,7 +1343,7 @@ GUI_TEST_CLASS_DEFINITION(pairwise_alignment_test_0007_1){ // 3. Add Phaneroptera_falcata and Isophya_altaica_EF540820 sequences to PA GTUtilsOptionPanelMsa::addFirstSeqToPA(os, "Phaneroptera_falcata"); GTUtilsOptionPanelMsa::addSecondSeqToPA(os, "Isophya_altaica_EF540820"); -// 4. Set gap extention penalty to 1000. Press align button +// 4. Set gap extension penalty to 1000. Press align button setGapExtd(os, 1000); inNewWindow(os, false); align(os); @@ -1439,27 +1440,27 @@ GUI_TEST_CLASS_DEFINITION(pairwise_alignment_test_0009){ GTUtilsOptionPanelMsa::addSecondSeqToPA(os, "Isophya_altaica_EF540820"); // 4. Add Isophya_altaica_EF540820 sequence // 5. Select some existing read-only file as output - QString s = sandBoxDir + "pairwise_alignment_test_0009"; + QString dirPath = sandBoxDir + "pairwise_alignment_test_0009"; - QDir().mkpath(s); + QDir().mkpath(dirPath); - s += "/" + fileName; - QFile f(s); + const QString filePath = dirPath + "/" + fileName; + QFile f(filePath); bool created = f.open(QFile::ReadWrite); CHECK_SET_ERR(created, "file not created"); f.close(); - GTFile::setReadOnly(os, s); + GTFile::setReadOnly(os, filePath); setOutputPath(os, sandBoxDir + dirName, fileName); align(os); GTGlobals::sleep(500); // Expected state: error in log: Task {Pairwise alignment task} finished with error: No permission to write to 'pairwise_alignment_test_0009.aln' file. QString error = l.getError(); - QString expected; - expected = QString("Task {Pairwise alignment task} finished with error: No permission to write to \'%1\' file.").arg(fileName); + const QString expectedFilePath = QFileInfo(filePath).absoluteFilePath(); + const QString expected = QString("Task {Pairwise alignment task} finished with error: No permission to write to \'%1\' file.").arg(expectedFilePath); CHECK_SET_ERR(error.contains(expected), QString("enexpected error: %1").arg(error)); - GTFile::setReadWrite(os, s); + GTFile::setReadWrite(os, filePath); } GUI_TEST_CLASS_DEFINITION(pairwise_alignment_test_0010){ @@ -1476,21 +1477,24 @@ GUI_TEST_CLASS_DEFINITION(pairwise_alignment_test_0010){ GTUtilsOptionPanelMsa::addSecondSeqToPA(os, "Isophya_altaica_EF540820"); // 4. Add Isophya_altaica_EF540820 sequence // 5. Select some existing read-only file as output - QString s = sandBoxDir + dirName; - bool ok = QDir().mkpath(s); + QString dirPath = sandBoxDir + dirName; + bool ok = QDir().mkpath(dirPath); CHECK_SET_ERR(ok, "subfolder not created"); - GTFile::setReadOnly(os, s); + GTFile::setReadOnly(os, dirPath); - setOutputPath(os, sandBoxDir + dirName, fileName); + const QString filePath = dirPath + "/" + fileName; + + setOutputPath(os, dirPath, fileName); align(os); GTGlobals::sleep(500); // Expected state: error in log: Task {Pairwise alignment task} finished with error: No permission to write to 'COI_transl.aln' file. QString error = l.getError(); - QString expected = QString("Task {Pairwise alignment task} finished with error: No permission to write to \'%1\' file.").arg(fileName); + const QString expectedFilePath = QFileInfo(filePath).absoluteFilePath(); + const QString expected = QString("Task {Pairwise alignment task} finished with error: No permission to write to \'%1\' file.").arg(expectedFilePath); CHECK_SET_ERR(error == expected, QString("enexpected error: %1").arg(error)); - GTFile::setReadWrite(os, s); + GTFile::setReadWrite(os, dirPath); } GUI_TEST_CLASS_DEFINITION(pairwise_alignment_test_0011){ @@ -1663,9 +1667,9 @@ GUI_TEST_CLASS_DEFINITION(tree_settings_test_0005){ CHECK_SET_ERR(showDistancesCheck != NULL, "showDistancesCheck not found"); QCheckBox* alignLabelsCheck = qobject_cast<QCheckBox*>(GTWidget::findWidget(os, "alignLabelsCheck")); CHECK_SET_ERR(alignLabelsCheck != NULL, "alignLabelsCheck not found"); - - QWidget* parent = GTWidget::findWidget(os, "COI [m] COI"); - QGraphicsView* treeView = qobject_cast<QGraphicsView*>(GTWidget::findWidget(os, "treeView", parent)); + QWidget* parent = GTWidget::findWidget(os, "COI [m] COI_SubWindow"); + QWidget* parent2 = GTWidget::findWidget(os, "COI [m] COI", parent); + QGraphicsView* treeView = qobject_cast<QGraphicsView*>(GTWidget::findWidget(os, "treeView", parent2)); QList<QGraphicsSimpleTextItem*> initNames = GTUtilsPhyTree::getVisiableLabels(os, treeView); QList<QGraphicsSimpleTextItem*> initDistanses = GTUtilsPhyTree::getVisiableDistances(os, treeView); @@ -1997,28 +2001,28 @@ GUI_TEST_CLASS_DEFINITION(export_consensus_test_0002){ GTUtilsOptionPanelMsa::openTab(os, GTUtilsOptionPanelMsa::ExportConsensus); // 3. Select existing read-only file "export_consensus_test_0002.aln" as output - QString s = sandBoxDir + "export_consensus_test_0002"; - QDir().mkpath(s); + const QString dirPath = sandBoxDir + "export_consensus_test_0002"; + QDir().mkpath(dirPath); - s += "/" + fileName; - QFile f(s); + const QString filePath = dirPath + "/" + fileName; + QFile f(filePath); bool created = f.open(QFile::ReadWrite); CHECK_SET_ERR(created, "file not created"); f.close(); - GTFile::setReadOnly(os, s); + GTFile::setReadOnly(os, filePath); - setConsensusOutputPath(os, s); + setConsensusOutputPath(os, filePath); // 4. Press export button GTWidget::click(os, GTWidget::findWidget(os, "exportBtn")); GTGlobals::sleep(300); // Expected state: error in log: Task {Save document} finished with error: No permission to write to 'COI_transl.aln' file. QString error = l.getError(); - QString expected; - expected = QString("Task {Export consensus} finished with error: Subtask {Save document} is failed: No permission to write to \'%1\' file.").arg(fileName); + const QString expectedFilePath = QFileInfo(filePath).absoluteFilePath(); + QString expected = QString("Task {Export consensus} finished with error: Subtask {Save document} is failed: No permission to write to \'%1\' file.").arg(expectedFilePath); CHECK_SET_ERR(error.contains(expected), QString("Unexpected error: %1").arg(error)); - GTFile::setReadWrite(os, s); + GTFile::setReadWrite(os, filePath); } GUI_TEST_CLASS_DEFINITION(export_consensus_test_0003){ @@ -2031,24 +2035,39 @@ GUI_TEST_CLASS_DEFINITION(export_consensus_test_0003){ // 2. Open export consensus option panel tab GTUtilsOptionPanelMsa::openTab(os, GTUtilsOptionPanelMsa::ExportConsensus); // 3. Select some existing file in read-only directory as output - QString s = sandBoxDir + dirName; - bool ok = QDir().mkpath(s); + QString dirPath = sandBoxDir + dirName; + bool ok = QDir().mkpath(dirPath); CHECK_SET_ERR(ok, "subfolder not created"); - GTFile::setReadOnly(os, s); + GTFile::setReadOnly(os, dirPath); - setConsensusOutputPath(os, sandBoxDir + dirName + '/' + fileName); + const QString filePath = dirPath + '/' + fileName; + setConsensusOutputPath(os, filePath); // 4. Press export button GTWidget::click(os, GTWidget::findWidget(os, "exportBtn")); GTGlobals::sleep(300); // Expected state: error in log: Task {Pairwise Alignment Task} finished with error: No permission to write to 'COI_transl.aln' file. QString error = l.getError(); - QString expected = QString("Task {Export consensus} finished with error: Subtask {Save document} is failed: No permission to write to \'%1\' file.").arg(fileName); + const QString expectedFilePath = QFileInfo(filePath).absoluteFilePath(); + QString expected = QString("Task {Export consensus} finished with error: Subtask {Save document} is failed: No permission to write to \'%1\' file.").arg(expectedFilePath); CHECK_SET_ERR(error == expected, QString("Unexpected error: %1").arg(error)); - GTFile::setReadWrite(os, s); + GTFile::setReadWrite(os, dirPath); } GUI_TEST_CLASS_DEFINITION(export_consensus_test_0004){ + //0. Change Documents folder to sandbox + class Custom : public CustomScenario { + void run(HI::GUITestOpStatus &os){ + QWidget *dialog = QApplication::activeModalWidget(); + AppSettingsDialogFiller::setDocumentsDirPath(os, sandBoxDir); + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + }; + + GTUtilsDialog::waitForDialog(os, new AppSettingsDialogFiller(os, new Custom())); + GTMenu::clickMainMenuItem(os, QStringList() << "Settings" << "Preferences...", GTGlobals::UseMouse); + GTUtilsTaskTreeView::waitTaskFinished(os); + // 1. Open data/samples/CLUSTALW/COI.aln GTFileDialog::openFile(os, dataDir + "samples/CLUSTALW", "COI.aln"); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -2073,7 +2092,7 @@ GUI_TEST_CLASS_DEFINITION(export_consensus_test_0004){ QLineEdit* pathLe = GTWidget::findExactWidget<QLineEdit*>(os, "pathLe"); QString pathLeText = pathLe->text(); - CHECK_SET_ERR(!pathLeText.isEmpty() && pathLeText.contains("COI_consensus.txt"), "wrong lineEdit text: " + pathLeText); + CHECK_SET_ERR(!pathLeText.isEmpty() && pathLeText.contains("COI_consensus_1.txt"), "wrong lineEdit text: " + pathLeText); } GUI_TEST_CLASS_DEFINITION(export_consensus_test_0005){ diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/msa/GTTestsOptionPanelMSA.h b/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/msa/GTTestsOptionPanelMSA.h index aa7f4c8ff60e644ad17ad4a610af21bd743068f7..38cdd16a6bb6289aef4bf0f9ea7b143b91f088c7 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/msa/GTTestsOptionPanelMSA.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/msa/GTTestsOptionPanelMSA.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/sequence_view/GTTestsOptionPanelSequenceView.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/sequence_view/GTTestsOptionPanelSequenceView.cpp index 593a6d6849ba9918cc18af153fa58e7ef0a7d847..e20c4f5ef3ff8ebef189d2b10d6d26ad57d97edb 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/sequence_view/GTTestsOptionPanelSequenceView.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/sequence_view/GTTestsOptionPanelSequenceView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/sequence_view/GTTestsOptionPanelSequenceView.h b/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/sequence_view/GTTestsOptionPanelSequenceView.h index e9a91eb3b3f25151ed2f825055707077ea9fc11f..f30a2bdeb7eb66288b049be53a968ee57bfd4852 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/sequence_view/GTTestsOptionPanelSequenceView.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/options_panel/sequence_view/GTTestsOptionPanelSequenceView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/pcr/GTTestsInSilicoPcr.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/pcr/GTTestsInSilicoPcr.cpp index 829e72de25cfcb91e11e8782134bae7c529e8d1a..1264d30f90ee5d71b3fae39ffa584052bdf4067b 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/pcr/GTTestsInSilicoPcr.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/pcr/GTTestsInSilicoPcr.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/pcr/GTTestsInSilicoPcr.h b/src/plugins/GUITestBase/src/tests/common_scenarios/pcr/GTTestsInSilicoPcr.h index 19f24e009f96adce5c3f18fd7233e89222e8892c..5936e1a3830be8ffbfeecd45936405dfdceae387 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/pcr/GTTestsInSilicoPcr.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/pcr/GTTestsInSilicoPcr.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/pcr/GTTestsPrimerLibrary.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/pcr/GTTestsPrimerLibrary.cpp index bfba6e4a900b05f3900936fa1500fe4f1b26e860..69194488ddbe6541cd8b17cd26eecb8e2df11571 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/pcr/GTTestsPrimerLibrary.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/pcr/GTTestsPrimerLibrary.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -719,6 +719,8 @@ GUI_TEST_CLASS_DEFINITION(test_0015) { // 5. Set the primers from the library GTUtilsOptionPanelSequenceView::openTab(os, GTUtilsOptionPanelSequenceView::InSilicoPcr); + GTUtilsTaskTreeView::waitTaskFinished(os); + GTGlobals::sleep(); GTUtilsDialog::waitForDialog(os, new PrimerLibrarySelectorFiller(os, 0, true)); GTWidget::click(os, GTUtilsPcr::browseButton(os, U2Strand::Direct)); @@ -726,13 +728,14 @@ GUI_TEST_CLASS_DEFINITION(test_0015) { GTUtilsDialog::waitForDialog(os, new PrimerLibrarySelectorFiller(os, 1, true)); GTWidget::click(os, GTUtilsPcr::browseButton(os, U2Strand::Complementary)); + GTGlobals::sleep(); // 4. Find the product GTWidget::click(os, GTWidget::findWidget(os, "findProductButton")); GTUtilsTaskTreeView::waitTaskFinished(os); - // Expected: 3 results were found - CHECK_SET_ERR(3 == GTUtilsPcr::productsCount(os), "Wrong results count"); + // Expected: 2 results were found + CHECK_SET_ERR(2 == GTUtilsPcr::productsCount(os), "Wrong results count"); } GUI_TEST_CLASS_DEFINITION(test_0016) { diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/pcr/GTTestsPrimerLibrary.h b/src/plugins/GUITestBase/src/tests/common_scenarios/pcr/GTTestsPrimerLibrary.h index 608be3e7cef3dcff10944095a9b9e825a220a7b0..a72dba7c6f129f7ab971e1146c58dc4e90e9659c 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/pcr/GTTestsPrimerLibrary.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/pcr/GTTestsPrimerLibrary.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/phyml/GTTestsCommonScenariosPhyml.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/phyml/GTTestsCommonScenariosPhyml.cpp index 66a8e03201f9401081fc58600e634520cebb3772..8b7f465936ee5b50356bc8fcb4ae59f5f8ede2bd 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/phyml/GTTestsCommonScenariosPhyml.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/phyml/GTTestsCommonScenariosPhyml.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/phyml/GTTestsCommonScenariosPhyml.h b/src/plugins/GUITestBase/src/tests/common_scenarios/phyml/GTTestsCommonScenariosPhyml.h index 41368d695997b2fa1d18eb7ed26a786155852f98..3aa158b7131418dbb7a5c64a0b6b3b273c8b983a 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/phyml/GTTestsCommonScenariosPhyml.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/phyml/GTTestsCommonScenariosPhyml.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/project/GTTestsProject.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/project/GTTestsProject.cpp index 417ac482d814b42685b6ec124d8e89f68abade83..278abafb257105b3ef8b2612594087c06bca895d 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/project/GTTestsProject.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/project/GTTestsProject.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -20,7 +20,6 @@ */ #include <QMdiSubWindow> -#include <QWebElement> #include <QApplication> #include <QTreeWidget> #include <QDebug> @@ -87,8 +86,8 @@ GUI_TEST_CLASS_DEFINITION(test_0004) { GTFileDialog::openFile(os, testDir+"_common_data/scenarios/project/", "proj1.uprj"); GTUtilsTaskTreeView::waitTaskFinished(os); // Expected state: -// 1) Project view with document "1CF7.PDB" is opened - GTUtilsDocument::checkDocument(os, "1CF7.PDB"); +// 1) Project view with document "1CF7.pdb" is opened + GTUtilsDocument::checkDocument(os, "1CF7.pdb"); // 2) UGENE window titled with text "proj1 UGENE" QString expectedTitle; #ifdef Q_OS_MAC @@ -121,25 +120,27 @@ GUI_TEST_CLASS_DEFINITION(test_0004) { GTGlobals::sleep(); // Expected state: -// 1) project view with document "1CF7.PDB" has been opened, - GTUtilsDocument::checkDocument(os, "1CF7.PDB"); +// 1) project view with document "1CF7.pdb" has been opened, + GTUtilsDocument::checkDocument(os, "1CF7.pdb"); // 2) UGENE window titled with text "proj1 UGENE" GTUtilsApp::checkUGENETitle(os, expectedTitle); -// 3) File path at tooltip for "1CF7.PDB" must be "_common_data/scenarios/sandbox/1CF7.PDB" - GTMouseDriver::moveTo(GTUtilsProjectTreeView::getItemCenter(os, "1CF7.PDB")); - GTGlobals::sleep(2000); - GTUtilsToolTip::checkExistingToolTip(os, "_common_data/scenarios/sandbox/1CF7.PDB"); +// 3) File path at tooltip for "1CF7.PDB" must be "_common_data/scenarios/sandbox/1CF7.pdb" + GTMouseDriver::moveTo(GTUtilsProjectTreeView::getItemCenter(os, "1CF7.pdb")); + GTMouseDriver::moveTo(GTMouseDriver::getMousePosition() + QPoint(5, 5)); + GTGlobals::sleep(); + GTUtilsToolTip::checkExistingToolTip(os, "_common_data/scenarios/sandbox/1CF7.pdb"); // 7. Select "1CF7.PDB" in project tree and press Enter - GTMouseDriver::moveTo(GTUtilsProjectTreeView::getItemCenter(os, "1CF7.PDB")); + GTMouseDriver::moveTo(GTUtilsProjectTreeView::getItemCenter(os, "1CF7.pdb")); GTMouseDriver::click(); GTKeyboardDriver::keyClick( Qt::Key_Enter); + GTUtilsTaskTreeView::waitTaskFinished(os); + GTGlobals::sleep(1000); // Expected state: // 1) Document is loaded, - GTUtilsDocument::checkDocument(os, "1CF7.PDB", AnnotatedDNAViewFactory::ID); -// 2) 4 sequences and 3D Viewer with molecule is appeared + GTUtilsDocument::checkDocument(os, "1CF7.pdb", AnnotatedDNAViewFactory::ID); } GUI_TEST_CLASS_DEFINITION(test_0005) { @@ -152,7 +153,8 @@ GUI_TEST_CLASS_DEFINITION(test_0005) { expectedTitle = "proj1 UGENE"; #endif GTUtilsApp::checkUGENETitle(os, expectedTitle); - GTUtilsDocument::checkDocument(os, "1CF7.PDB"); + GTGlobals::sleep(4000); + GTUtilsDocument::checkDocument(os, "1CF7.pdb"); GTUtilsDialog::waitForDialog(os, new SaveProjectAsDialogFiller(os, "proj2", testDir+"_common_data/scenarios/sandbox", "proj2")); GTMenu::clickMainMenuItem(os, QStringList() << "File" << "Save project as..."); @@ -168,11 +170,12 @@ GUI_TEST_CLASS_DEFINITION(test_0005) { expectedTitle = "proj2 UGENE"; #endif GTUtilsApp::checkUGENETitle(os, expectedTitle); - GTUtilsDocument::checkDocument(os, "1CF7.PDB"); + GTUtilsDocument::checkDocument(os, "1CF7.pdb"); - GTMouseDriver::moveTo(GTUtilsProjectTreeView::getItemCenter(os, "1CF7.PDB")); - GTGlobals::sleep(2000); - GTUtilsToolTip::checkExistingToolTip(os, "samples/PDB/1CF7.PDB"); + GTMouseDriver::moveTo(GTUtilsProjectTreeView::getItemCenter(os, "1CF7.pdb")); + GTMouseDriver::moveTo(GTMouseDriver::getMousePosition() + QPoint(5, 5)); + GTGlobals::sleep(); + GTUtilsToolTip::checkExistingToolTip(os, "_common_data/pdb/1CF7.pdb"); } GUI_TEST_CLASS_DEFINITION(test_0006) { @@ -196,9 +199,9 @@ GUI_TEST_CLASS_DEFINITION(test_0006) { GUI_TEST_CLASS_DEFINITION(test_0007) { GTUtilsProject::openFiles(os, testDir+"_common_data/scenarios/project/proj1.uprj"); - GTUtilsDocument::checkDocument(os, "1CF7.PDB"); + GTUtilsDocument::checkDocument(os, "1CF7.pdb"); - GTUtilsDocument::removeDocument(os, "1CF7.PDB", GTGlobals::UseMouse); + GTUtilsDocument::removeDocument(os, "1CF7.pdb", GTGlobals::UseMouse); GTUtilsProject::checkProject(os, GTUtilsProject::Empty); } @@ -308,9 +311,9 @@ GUI_TEST_CLASS_DEFINITION(test_0016) { GTMouseDriver::click(Qt::RightButton); GTMouseDriver::moveTo(GTUtilsProjectTreeView::getItemCenter(os, "murine_copy1.gb")); + GTMouseDriver::moveTo(GTMouseDriver::getMousePosition() + QPoint(5, 5)); GTGlobals::sleep(); - GTGlobals::sleep(2000); GTUtilsToolTip::checkExistingToolTip(os, ".dir"); } @@ -618,12 +621,14 @@ GUI_TEST_CLASS_DEFINITION(test_0038){ //check for first document GTUtilsProjectTreeView::doubleClickItem(os, "Contig1"); GTThread::waitForMainThread(); + GTGlobals::sleep(); title1 = GTUtilsMdi::activeWindowTitle(os); CHECK_SET_ERR(title1 == "BL060C3 [m] Contig1", "unexpected title for doc1: " + title1); //check for second document GTUtilsProjectTreeView::doubleClickItem(os, "Contig2"); GTThread::waitForMainThread(); + GTGlobals::sleep(); title2 = GTUtilsMdi::activeWindowTitle(os); CHECK_SET_ERR(title2 == "BL060C3 [m] Contig2", "unexpected title for doc2: " + title2); } @@ -653,11 +658,14 @@ GUI_TEST_CLASS_DEFINITION(test_0038_1){ //check for first document GTUtilsProjectTreeView::doubleClickItem(os, "Contig1"); + GTGlobals::sleep(); title1 = GTUtilsMdi::activeWindowTitle(os); CHECK_SET_ERR(title1 == "test_3637_1 [as] Contig1", "unexpected title for doc1: " + title1); + //check for second document GTUtilsProjectTreeView::doubleClickItem(os, "Contig2"); + GTGlobals::sleep(); title2 = GTUtilsMdi::activeWindowTitle(os); CHECK_SET_ERR(title2 == "test_3637_1 [as] Contig2", "unexpected title for doc2: " + title2); diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/project/GTTestsProject.h b/src/plugins/GUITestBase/src/tests/common_scenarios/project/GTTestsProject.h index 2726e94522b913b82cf8a3af2da5b4380c7c9adf..5aeed2d346e5fd0af5d2e3608a142becf7184867 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/project/GTTestsProject.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/project/GTTestsProject.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/project/anonymous_project/GTTestsProjectAnonymousProject.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/project/anonymous_project/GTTestsProjectAnonymousProject.cpp index bb4ffd974acff6dc28fc3fb9dffce923247a88ba..414184f2166425873f3d7f427d4f87234f5524ec 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/project/anonymous_project/GTTestsProjectAnonymousProject.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/project/anonymous_project/GTTestsProjectAnonymousProject.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/project/anonymous_project/GTTestsProjectAnonymousProject.h b/src/plugins/GUITestBase/src/tests/common_scenarios/project/anonymous_project/GTTestsProjectAnonymousProject.h index f0ab9a486c9683cbb9ffc7b5351b4c12fe6e3975..32afd938a9962d395c55e240bfb9273740fe7627 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/project/anonymous_project/GTTestsProjectAnonymousProject.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/project/anonymous_project/GTTestsProjectAnonymousProject.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/project/bookmarks/GTTestsBookmarks.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/project/bookmarks/GTTestsBookmarks.cpp index fba028b6b4f69593c44b3f9addd5af804b91d561..7f2311d90d04192083dae72580a5ed22e83da2fc 100755 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/project/bookmarks/GTTestsBookmarks.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/project/bookmarks/GTTestsBookmarks.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/project/bookmarks/GTTestsBookmarks.h b/src/plugins/GUITestBase/src/tests/common_scenarios/project/bookmarks/GTTestsBookmarks.h index 50d1f820f90349ebbde55440f71b608d90e3896c..e59720ae076c11f1e764ebe674ff2d00c1767a1e 100755 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/project/bookmarks/GTTestsBookmarks.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/project/bookmarks/GTTestsBookmarks.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/project/document_modifying/GTTestsProjectDocumentModifying.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/project/document_modifying/GTTestsProjectDocumentModifying.cpp index 75b5333d5cc3e030f17dcca6c7820972e6b9ff23..bcd5793334e2ad6650f386644a68e0a5e2760fd6 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/project/document_modifying/GTTestsProjectDocumentModifying.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/project/document_modifying/GTTestsProjectDocumentModifying.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/project/document_modifying/GTTestsProjectDocumentModifying.h b/src/plugins/GUITestBase/src/tests/common_scenarios/project/document_modifying/GTTestsProjectDocumentModifying.h index bab56de39c680b5aa27fc0109f8421f3a101a679..d1d1203685c34d4ae33fb2d6e4884f5b265017e0 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/project/document_modifying/GTTestsProjectDocumentModifying.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/project/document_modifying/GTTestsProjectDocumentModifying.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/project/multiple_docs/GTTestsProjectMultipleDocs.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/project/multiple_docs/GTTestsProjectMultipleDocs.cpp index daa194199239669f156867e776e2c8cd25e2f147..95b525971ba2a97cd3fdb059720644fc07b448ba 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/project/multiple_docs/GTTestsProjectMultipleDocs.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/project/multiple_docs/GTTestsProjectMultipleDocs.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/project/multiple_docs/GTTestsProjectMultipleDocs.h b/src/plugins/GUITestBase/src/tests/common_scenarios/project/multiple_docs/GTTestsProjectMultipleDocs.h index 050632fc6e962001b15213b5ae03f423c90171b3..e85585710f7617f08832efa3b89b4dc02b9a8591 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/project/multiple_docs/GTTestsProjectMultipleDocs.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/project/multiple_docs/GTTestsProjectMultipleDocs.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/project/project_filtering/GTTestsProjectFiltering.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/project/project_filtering/GTTestsProjectFiltering.cpp index e7920a89b58cf49253cba41794afef9ae72b0e15..8eacdbe9ae61a40109f4c221ed403954f1a01435 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/project/project_filtering/GTTestsProjectFiltering.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/project/project_filtering/GTTestsProjectFiltering.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -125,7 +125,7 @@ GUI_TEST_CLASS_DEFINITION(test_0003) { // Expected: There is a single item under the "Sequence accession number" item. It contains "CVU55762.gb". GTUtilsProjectTreeView::checkFilteredGroup(os, "Sequence accession number", QStringList() << "CVU55762.gb", - QStringList(), QStringList() << "ugene_gui_test" << "COI.aln"); + QStringList(), QStringList() << "ugene_gui_test" << "COI.aln", QStringList() << "4113"); } GUI_TEST_CLASS_DEFINITION(test_0004) { @@ -211,8 +211,8 @@ GUI_TEST_CLASS_DEFINITION(test_0006) { GTUtilsProjectTreeView::checkFilteredGroup(os, "Text content", QStringList() << "ugene_gui_test", QStringList(), QStringList() << "text.txt" << "HIV-1.aln"); const QModelIndexList groupIndexes = GTUtilsProjectTreeView::findFilteredIndexes(os, "Text content"); - CHECK_SET_ERR(groupIndexes.size() == 1, "Expected a single filter group in the project view"); - CHECK_SET_ERR(1 == groupIndexes.first().model()->rowCount(groupIndexes.first()), "Expected a single filtered object"); + bool containsItem = GTUtilsProjectTreeView::checkItem(os, "object", groupIndexes.first(), GTGlobals::FindOptions(true, Qt::MatchStartsWith)); + CHECK_SET_ERR(containsItem, "\"object\' item is absent"); } GUI_TEST_CLASS_DEFINITION(test_0007) { @@ -231,10 +231,10 @@ GUI_TEST_CLASS_DEFINITION(test_0007) { GTUtilsProjectTreeView::filterProject(os, "phosphoesterase"); // Expected: There is a single top level item named "mat_peptide" and its only sub-item contains "sars.gb" - GTUtilsProjectTreeView::checkFilteredGroup(os, "mat_peptide", QStringList() << "sars.gb", QStringList(), QStringList()); + GTUtilsProjectTreeView::checkFilteredGroup(os, "mat_peptide", QStringList() << "sars.gb", QStringList(), QStringList(), QStringList() << "4113"); const QModelIndexList groupIndexes = GTUtilsProjectTreeView::findFilteredIndexes(os, "mat_peptide"); - CHECK_SET_ERR(groupIndexes.size() == 1, "Expected a single filter group in the project view"); - CHECK_SET_ERR(1 == groupIndexes.first().model()->rowCount(groupIndexes.first()), "Expected a single filtered object"); + bool containsItem = GTUtilsProjectTreeView::checkItem(os, "NC_004718 features", groupIndexes.first(), GTGlobals::FindOptions(true, Qt::MatchStartsWith)); + CHECK_SET_ERR(containsItem, "\"NC_004718 features\' item is absent"); // 5. Type to the project filter field "genemark" GTUtilsProjectTreeView::filterProject(os, "genemark"); @@ -453,14 +453,15 @@ GUI_TEST_CLASS_DEFINITION(test_0013) { GTUtilsProjectTreeView::filterProject(os, "polyprotein"); // Expected: There is a single top-level group "CDS". - QTreeView *projectTreeView = GTUtilsProjectTreeView::getTreeView(os); - QAbstractItemModel *filterModel = projectTreeView->model(); - CHECK_SET_ERR(filterModel->rowCount() == 1 && "CDS" == filterModel->index(0, 0).data().toString(), "Unexpected number of project filter groups"); + bool containsCds = !GTUtilsProjectTreeView::findFilteredIndexes(os, "CDS").isEmpty(); + CHECK_SET_ERR(containsCds, "\"CDS\" item is absent"); // 5. Type to the project filter field "gag polyprotein" GTUtilsProjectTreeView::filterProject(os, "gag polyprotein"); // Expected : There are 3 top - level groups named "CDS", "Multiple alignment content" and "Sequence content". + QTreeView *projectTreeView = GTUtilsProjectTreeView::getTreeView(os); + QAbstractItemModel *filterModel = projectTreeView->model(); CHECK_SET_ERR(filterModel->rowCount() == 3 && "CDS" == filterModel->index(0, 0).data().toString() && "Multiple alignment content" == filterModel->index(1, 0).data().toString() && "Sequence content" == filterModel->index(2, 0).data().toString(), "Unexpected project filter groups"); diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/project/project_filtering/GTTestsProjectFiltering.h b/src/plugins/GUITestBase/src/tests/common_scenarios/project/project_filtering/GTTestsProjectFiltering.h index beca695167845becc1f513f82e3430677a013325..a3772fc91fed7c91a053ad8076f6f7b51e779f24 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/project/project_filtering/GTTestsProjectFiltering.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/project/project_filtering/GTTestsProjectFiltering.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/project/relations/GTTestsProjectRelations.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/project/relations/GTTestsProjectRelations.cpp index fd13c40e05bdabf732bd1ede7e97bf3a4168067c..f6e6fd242d49cf24b47386d4c28c85ed36ff5299 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/project/relations/GTTestsProjectRelations.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/project/relations/GTTestsProjectRelations.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/project/relations/GTTestsProjectRelations.h b/src/plugins/GUITestBase/src/tests/common_scenarios/project/relations/GTTestsProjectRelations.h index 6f8489dcf87dafe6ed5dbbab32fad1ee538434ab..f2bfbf75eacd89320bfcfe3068ab01a316a43cec 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/project/relations/GTTestsProjectRelations.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/project/relations/GTTestsProjectRelations.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/project/remote_request/GTTestsProjectRemoteRequest.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/project/remote_request/GTTestsProjectRemoteRequest.cpp index 79ee22ab76b6095c61eea75742d324cf0bbad5c7..ff3ffc21a304886fb61e3beae5eb9a0b2c13a7f8 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/project/remote_request/GTTestsProjectRemoteRequest.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/project/remote_request/GTTestsProjectRemoteRequest.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -46,7 +46,8 @@ #include "api/GTSequenceReadingModeDialogUtils.h" #include "runnables/ugene/corelibs/U2Gui/DownloadRemoteFileDialogFiller.h" #include "runnables/ugene/ugeneui/NCBISearchDialogFiller.h" - +#include "runnables/ugene/ugeneui/DocumentFormatSelectorDialogFiller.h" +#include "runnables/ugene/ugeneui/SelectDocumentFormatDialogFiller.h" namespace U2{ namespace GUITest_common_scenarios_project_remote_request { @@ -63,7 +64,7 @@ GUI_TEST_CLASS_DEFINITION(test_0001) { GUI_TEST_CLASS_DEFINITION(test_0002) { GTUtilsDialog::waitForDialog(os, new RemoteDBDialogFillerDeprecated(os, "NC_001363", 0)); - GTMenu::clickMainMenuItem(os, QStringList() << "File" << "Access remote database...", GTGlobals::UseKey); + GTMenu::clickMainMenuItem(os, QStringList() << "File" << "Access remote database..."); GTGlobals::sleep(); GTGlobals::sleep(20000); @@ -73,7 +74,6 @@ GUI_TEST_CLASS_DEFINITION(test_0002) { GUI_TEST_CLASS_DEFINITION(test_0003) { // 1. Select {File -> Access remote database} menu item in the main menu. - // 2. Fill the dialog: // Resource ID: NC_017775 // Database: NCBI GenBank (DNA sequence) @@ -92,7 +92,7 @@ GUI_TEST_CLASS_DEFINITION(test_0003) { actions << DownloadRemoteFileDialogFiller::Action(DownloadRemoteFileDialogFiller::ClickOk, ""); GTUtilsDialog::waitForDialog(os, new DownloadRemoteFileDialogFiller(os, actions)); - GTMenu::clickMainMenuItem(os, QStringList() << "File" << "Access remote database...", GTGlobals::UseKey); + GTMenu::clickMainMenuItem(os, QStringList() << "File" << "Access remote database..."); GTGlobals::sleep(); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -103,7 +103,6 @@ GUI_TEST_CLASS_DEFINITION(test_0003) { GUI_TEST_CLASS_DEFINITION(test_0004) { // 1. Select {File -> Access remote database} menu item in the main menu. - // 2. Fill the dialog: // Resource ID: NC_017775 // Database: NCBI GenBank (DNA sequence) @@ -122,7 +121,7 @@ GUI_TEST_CLASS_DEFINITION(test_0004) { actions << DownloadRemoteFileDialogFiller::Action(DownloadRemoteFileDialogFiller::ClickOk, ""); GTUtilsDialog::waitForDialog(os, new DownloadRemoteFileDialogFiller(os, actions)); - GTMenu::clickMainMenuItem(os, QStringList() << "File" << "Access remote database...", GTGlobals::UseKey); + GTMenu::clickMainMenuItem(os, QStringList() << "File" << "Access remote database..."); GTGlobals::sleep(); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -130,9 +129,52 @@ GUI_TEST_CLASS_DEFINITION(test_0004) { GTUtilsDocument::checkDocument(os, "NC_017775.gb", AnnotatedDNAViewFactory::ID); } +GUI_TEST_CLASS_DEFINITION(test_0005) { + // 1. Select {File -> Access remote database} menu item in the main menu. + // 2. Fill the dialog: + // Resource ID: ENSG00000205571 ENSG00000146463: space between IDs + // Database: ENSEMBL + // Save to folder: any valid path and accept it. + // Expected state: after the downloading task finish a new documents appears in the project + + QDir().mkpath(sandBoxDir + "remote_request/test_0005"); + + GTUtilsDialog::waitForDialog(os, new RemoteDBDialogFillerDeprecated(os, "ENSG00000205571 ENSG00000146463", 2, true, true, false, sandBoxDir + "remote_request/test_0005")); + GTMenu::clickMainMenuItem(os, QStringList() << "File" << "Access remote database..."); + GTGlobals::sleep(); + GTUtilsTaskTreeView::waitTaskFinished(os); + + GTUtilsDocument::isDocumentLoaded(os, "ENSG00000205571.fa"); + GTUtilsDocument::checkDocument(os, "ENSG00000205571.fa", AnnotatedDNAViewFactory::ID); + GTUtilsDocument::isDocumentLoaded(os, "ENSG00000146463.fa"); + GTUtilsDocument::checkDocument(os, "ENSG00000146463.fa", AnnotatedDNAViewFactory::ID); +} + +GUI_TEST_CLASS_DEFINITION(test_0006) { + // 1. Select {File -> Access remote database} menu item in the main menu. + // 2. Fill the dialog: + // Resource ID: Q9IGQ6;A0N8V2: semicolon between IDs + // Database: SWISS-PROT + // Save to folder: any valid path and accept it. + // Expected state: after the downloading task finish a new documents appears in the project + + + QDir().mkpath(sandBoxDir + "remote_request/test_0006"); + GTUtilsDialog::waitForDialog(os, new DocumentFormatSelectorDialogFiller(os, "Swiss-Prot")); + + GTUtilsDialog::waitForDialog(os, new RemoteDBDialogFillerDeprecated(os, "Q9IGQ6;A0N8V2", 4, true, true, false, sandBoxDir + "remote_request/test_0006")); + GTMenu::clickMainMenuItem(os, QStringList() << "File" << "Access remote database..."); + GTGlobals::sleep(); + GTUtilsTaskTreeView::waitTaskFinished(os); + + GTUtilsDocument::isDocumentLoaded(os, "Q9IGQ6.txt"); + GTUtilsDocument::checkDocument(os, "Q9IGQ6.txt", AnnotatedDNAViewFactory::ID); + GTUtilsDocument::isDocumentLoaded(os, "A0N8V2.txt"); + GTUtilsDocument::checkDocument(os, "A0N8V2.txt", AnnotatedDNAViewFactory::ID); +} + GUI_TEST_CLASS_DEFINITION(test_0007) { // 1. Select {File -> Access remote database} menu item in the main menu. - // 2. Check all databases. // Expected state: "Force download the appropriate sequence" checkbox is visible only for NCBI databases. QList<DownloadRemoteFileDialogFiller::Action> actions; @@ -160,13 +202,11 @@ GUI_TEST_CLASS_DEFINITION(test_0007) { GUI_TEST_CLASS_DEFINITION(test_0008) { // 1. Select {File -> Search NCBI Genbak} menu item in the main menu. - // 2. Search "human" in the "nucleotide" database. Download the first result. // Expected state: the "Fetch Data from Remote Database" appears. It is filled with: // Database: "NCBI GenBank (DNA sequence)", it the only database in the combobox. // Output format: "gb". // "Force download the appropriate sequence" checkbox is visible and checked. - // 3. Set "fasta" format. // Expected state: "Force download the appropriate sequence" checkbox becomes invisible. QList<NcbiSearchDialogFiller::Action> searchActions; @@ -192,19 +232,17 @@ GUI_TEST_CLASS_DEFINITION(test_0008) { searchActions << NcbiSearchDialogFiller::Action(NcbiSearchDialogFiller::ClickClose, ""); GTUtilsDialog::waitForDialog(os, new NcbiSearchDialogFiller(os, searchActions)); - GTMenu::clickMainMenuItem(os, QStringList() << "File" << "Search NCBI GenBank...", GTGlobals::UseKey); + GTMenu::clickMainMenuItem(os, QStringList() << "File" << "Search NCBI GenBank..."); GTGlobals::sleep(); } GUI_TEST_CLASS_DEFINITION(test_0009) { // 1. Select {File -> Search NCBI Genbak} menu item in the main menu. - // 2. Search "human" in the "protein" database. Download the first result. // Expected state: the "Fetch Data from Remote Database" appears. It is filled with: // Database: "NCBI protein sequence database", it the only database in the combobox. // Output format: "gb". // "Force download the appropriate sequence" checkbox is visible and checked. - // 3. Set "fasta" format. // Expected state: "Force download the appropriate sequence" checkbox becomes invisible. QList<NcbiSearchDialogFiller::Action> searchActions; @@ -230,7 +268,7 @@ GUI_TEST_CLASS_DEFINITION(test_0009) { searchActions << NcbiSearchDialogFiller::Action(NcbiSearchDialogFiller::ClickClose, ""); GTUtilsDialog::waitForDialog(os, new NcbiSearchDialogFiller(os, searchActions)); - GTMenu::clickMainMenuItem(os, QStringList() << "File" << "Search NCBI GenBank...", GTGlobals::UseKey); + GTMenu::clickMainMenuItem(os, QStringList() << "File" << "Search NCBI GenBank..."); GTGlobals::sleep(); } @@ -311,5 +349,49 @@ GUI_TEST_CLASS_DEFINITION(test_0012) { CHECK_SET_ERR(!GTUtilsProjectTreeView::checkItem(os, "1ezg.pdb"), "Object shound not be in the project"); } +GUI_TEST_CLASS_DEFINITION(test_0013) { + // 1. Select {File -> Access remote database} menu item in the main menu. + // 2. Fill the dialog: + // Resource ID: P16152 + // Database: UniProtKB/Swiss-Prot + // Save to folder: any valid path and accept it. + // Expected state: after the downloading task finish a new documents appears in the project + + + QDir().mkpath(sandBoxDir + "remote_request/test_0013"); + QList<DownloadRemoteFileDialogFiller::Action> actions; + + GTUtilsDialog::waitForDialog(os, new DocumentFormatSelectorDialogFiller(os, "Swiss-Prot")); + GTUtilsDialog::waitForDialog(os, new RemoteDBDialogFillerDeprecated(os, "P16152", 5, true, true, false, sandBoxDir)); + GTMenu::clickMainMenuItem(os, QStringList() << "File" << "Access remote database..."); + GTGlobals::sleep(); + GTUtilsTaskTreeView::waitTaskFinished(os); + + GTUtilsDocument::isDocumentLoaded(os, "P16152.txt"); + GTUtilsDocument::checkDocument(os, "P16152.txt", AnnotatedDNAViewFactory::ID); + +} +GUI_TEST_CLASS_DEFINITION(test_0014) { + // 1. Select {File -> Access remote database} menu item in the main menu. + // 2. Fill the dialog: + // Resource ID: D0VTW9 + // Database: UniProtKB/TrEMBL + // Save to folder: any valid path and accept it. + // Expected state: after the downloading task finish a new documents appears in the project + + + QDir().mkpath(sandBoxDir + "remote_request/test_0014"); + GTUtilsDialog::waitForDialog(os, new DocumentFormatSelectorDialogFiller(os, "Swiss-Prot")); + + GTUtilsDialog::waitForDialog(os, new RemoteDBDialogFillerDeprecated(os, "D0VTW9", 6, true, true, false, sandBoxDir)); + GTMenu::clickMainMenuItem(os, QStringList() << "File" << "Access remote database..."); + GTGlobals::sleep(); + GTUtilsTaskTreeView::waitTaskFinished(os); + + GTUtilsDocument::isDocumentLoaded(os, "D0VTW9.txt"); + GTUtilsDocument::checkDocument(os, "D0VTW9.txt", AnnotatedDNAViewFactory::ID); + +} + } // namespace } // namespace U2 diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/project/remote_request/GTTestsProjectRemoteRequest.h b/src/plugins/GUITestBase/src/tests/common_scenarios/project/remote_request/GTTestsProjectRemoteRequest.h index 5fa2301fd9afe52d862540c96993b84934587eb8..8c14bf1cad4002f1ed1c75bae5fcdc1e01c9d07d 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/project/remote_request/GTTestsProjectRemoteRequest.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/project/remote_request/GTTestsProjectRemoteRequest.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -42,6 +42,8 @@ GUI_TEST_CLASS_DECLARATION(test_0009) GUI_TEST_CLASS_DECLARATION(test_0010) GUI_TEST_CLASS_DECLARATION(test_0011) GUI_TEST_CLASS_DECLARATION(test_0012) +GUI_TEST_CLASS_DECLARATION(test_0013) +GUI_TEST_CLASS_DECLARATION(test_0014) #undef GUI_TEST_SUITE } diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/project/sequence_exporting/GTTestsProjectSequenceExporting.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/project/sequence_exporting/GTTestsProjectSequenceExporting.cpp index e5fd3de77bcde706a33dbc8c22a4f326c5f70caf..2204adc790ff0f324920ba1d25a8b502ad011ae1 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/project/sequence_exporting/GTTestsProjectSequenceExporting.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/project/sequence_exporting/GTTestsProjectSequenceExporting.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -296,20 +296,25 @@ GUI_TEST_CLASS_DEFINITION(test_0005) { const QString firstAnn = testDir + "_common_data/scenarios/project/1.gb"; const QString firstAnnFileName = "1.gb"; const QString secondAnn = testDir + "_common_data/scenarios/project/2.gb"; - const QString secondAnnFaleName = "2.gb"; + const QString secondAnnFileName = "2.gb"; GTFile::copy(os, filePath, sandBoxDir + "/" + fileName); GTFile::copy(os, firstAnn, sandBoxDir + "/" + firstAnnFileName); - GTFile::copy(os, secondAnn, sandBoxDir + "/" + secondAnnFaleName); + GTFile::copy(os, secondAnn, sandBoxDir + "/" + secondAnnFileName); // 1. Use menu {File->Open}. Open project _common_data/scenario/project/proj4.uprj GTFileDialog::openFile(os, sandBoxDir, fileName); GTUtilsTaskTreeView::waitTaskFinished(os); + GTUtilsDocument::checkDocument(os, "1.gb"); + GTUtilsDocument::checkDocument(os, "2.gb"); + QModelIndex nc_001363 = GTUtilsProjectTreeView::findIndex(os,"NC_001363 sequence", GTUtilsProjectTreeView::findIndex(os, "1.gb")); + GTUtilsTaskTreeView::waitTaskFinished(os); + GTMouseDriver::moveTo(GTUtilsProjectTreeView::getItemCenter(os, nc_001363)); GTMouseDriver::doubleClick(); + GTGlobals::sleep(1000); GTUtilsDocument::checkDocument(os, "1.gb", AnnotatedDNAViewFactory::ID); - GTGlobals::sleep(100); QTreeWidgetItem* item = GTUtilsAnnotationsTreeView::findItem(os, "C"); CHECK_SET_ERR(item != NULL, "AnnotationsTreeView is NULL"); diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/project/sequence_exporting/GTTestsProjectSequenceExporting.h b/src/plugins/GUITestBase/src/tests/common_scenarios/project/sequence_exporting/GTTestsProjectSequenceExporting.h index 23cabce297810a56097c4c5b6acc79ec6815e07f..3adb7e2c7ae8be12110a8ff7a87e8dcd283502c6 100755 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/project/sequence_exporting/GTTestsProjectSequenceExporting.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/project/sequence_exporting/GTTestsProjectSequenceExporting.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/project/sequence_exporting/from_project_view/GTTestsFromProjectView.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/project/sequence_exporting/from_project_view/GTTestsFromProjectView.cpp index 12e3246ff4336ad6c810df83a9b1f53504b707c2..9d8275a681d265dc5b33f85e4a8da2f54b50b0b3 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/project/sequence_exporting/from_project_view/GTTestsFromProjectView.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/project/sequence_exporting/from_project_view/GTTestsFromProjectView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/project/sequence_exporting/from_project_view/GTTestsFromProjectView.h b/src/plugins/GUITestBase/src/tests/common_scenarios/project/sequence_exporting/from_project_view/GTTestsFromProjectView.h index b8b3c27045251e671d53a75f2a8b5cb65cabc06d..2d47c8b08df35b6b79b79dabffa9c2ba90f9b5b5 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/project/sequence_exporting/from_project_view/GTTestsFromProjectView.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/project/sequence_exporting/from_project_view/GTTestsFromProjectView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/project/user_locking/GTTestsProjectUserLocking.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/project/user_locking/GTTestsProjectUserLocking.cpp index 2c5a28d2d5706e6cbb64f31f290c328e008463ed..2f398cc549af6e8f6f09f8a886e99db3ffb03a9a 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/project/user_locking/GTTestsProjectUserLocking.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/project/user_locking/GTTestsProjectUserLocking.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/project/user_locking/GTTestsProjectUserLocking.h b/src/plugins/GUITestBase/src/tests/common_scenarios/project/user_locking/GTTestsProjectUserLocking.h index 50277bae5369133f1e72ad1952d8a68c39e9a3fc..e12c30c7550407afd4997b6f675169f395b19d6b 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/project/user_locking/GTTestsProjectUserLocking.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/project/user_locking/GTTestsProjectUserLocking.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/repeat_finder/GTTestsRepeatFinder.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/repeat_finder/GTTestsRepeatFinder.cpp index 79d2b3ab9b33fae800697b290e12f109b5adb390..f26f84d29182cad7024cd208a36120b73bc4e9e2 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/repeat_finder/GTTestsRepeatFinder.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/repeat_finder/GTTestsRepeatFinder.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/repeat_finder/GTTestsRepeatFinder.h b/src/plugins/GUITestBase/src/tests/common_scenarios/repeat_finder/GTTestsRepeatFinder.h index ab2ec10dd0f31222ce63825ae8f60b2cb6463afc..b4ce420feae885ae8a3506a39278be4033d1ed34 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/repeat_finder/GTTestsRepeatFinder.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/repeat_finder/GTTestsRepeatFinder.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/sanger/GTTestsSanger.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/sanger/GTTestsSanger.cpp index 3b591231321079da2ca76360ad65c1ef36788196..b64f40b0359fb18ddf7ce2b7bb4802bfad78e1be 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/sanger/GTTestsSanger.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/sanger/GTTestsSanger.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,6 +25,8 @@ #include <QLineEdit> #include <QSpinBox> +#include <drivers/GTKeyboardDriver.h> + #include <base_dialogs/GTFileDialog.h> #include <base_dialogs/MessageBoxFiller.h> #include <primitives/GTCheckBox.h> @@ -330,6 +332,8 @@ GUI_TEST_CLASS_DEFINITION(test_0005_3) { // 3. Fill the wizard till the end. Run the workflow. GTUtilsWizard::clickButton(os, GTUtilsWizard::Next); GTUtilsWizard::setParameter(os, "Mapped reads file", QFileInfo(sandBoxDir + "sanger_test_0005_3.ugenedb").absoluteFilePath()); + GTKeyboardDriver::keyClick(Qt::Key_Enter); + GTGlobals::sleep(200); GTUtilsWizard::clickButton(os, GTUtilsWizard::Run); } }; @@ -340,7 +344,7 @@ GUI_TEST_CLASS_DEFINITION(test_0005_3) { // Expected state: the result alignment rows are named like "SZYD_Cas9_*". GTUtilsTaskTreeView::waitTaskFinished(os); - GTUtilsDashboard::clickOutputFile(os, "sanger_test_0005_3.ugenedb", "align-to-reference"); + GTUtilsDashboard::clickOutputFile(os, "sanger_test_0005_3.ugenedb"); GTUtilsTaskTreeView::waitTaskFinished(os); const QStringList expectedReadsnames = QStringList() << "SZYD_Cas9_5B70" @@ -373,9 +377,9 @@ GUI_TEST_CLASS_DEFINITION(test_0005_4) { void run(HI::GUITestOpStatus &os) { // Expected state: wizard has appeared. - QWidget *wizard = QApplication::activeModalWidget(); - CHECK_SET_ERR(NULL != wizard, "active modal widget is NULL"); - GTWidget::clickWindowTitle(os, wizard); + QWidget *wizard = QApplication::activeModalWidget(); + CHECK_SET_ERR(NULL != wizard, "active modal widget is NULL"); + GTWidget::clickWindowTitle(os, wizard); // 2. Fill it with any valid data until the 'Mapping settings' page. GTUtilsWizard::setParameter(os, "Reference", QFileInfo(testDir + "_common_data/sanger/reference.gb").absoluteFilePath()); @@ -402,6 +406,8 @@ GUI_TEST_CLASS_DEFINITION(test_0005_4) { // 4. Fill the wizard till the end. Run the workflow. GTUtilsWizard::clickButton(os, GTUtilsWizard::Next); GTUtilsWizard::setParameter(os, "Mapped reads file", QFileInfo(sandBoxDir + "sanger_test_0005_4.ugenedb").absoluteFilePath()); + GTKeyboardDriver::keyClick(Qt::Key_Enter); + GTGlobals::sleep(200); GTUtilsWizard::clickButton(os, GTUtilsWizard::Run); } }; @@ -412,7 +418,7 @@ GUI_TEST_CLASS_DEFINITION(test_0005_4) { // Expected state: the result alignment rows are named like "sanger_*". GTUtilsTaskTreeView::waitTaskFinished(os); - GTUtilsDashboard::clickOutputFile(os, "sanger_test_0005_4.ugenedb", "align-to-reference"); + GTUtilsDashboard::clickOutputFile(os, "sanger_test_0005_4.ugenedb"); GTUtilsTaskTreeView::waitTaskFinished(os); const QStringList expectedReadsnames = QStringList() << "sanger_01" diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/sanger/GTTestsSanger.h b/src/plugins/GUITestBase/src/tests/common_scenarios/sanger/GTTestsSanger.h index caaf2b54bec76fd9bd927698c59e3e62428750ba..d9c063d70cc49cb3cd21daa5adefef50b129cc46 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/sanger/GTTestsSanger.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/sanger/GTTestsSanger.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_edit/GTTestsSequenceEdit.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_edit/GTTestsSequenceEdit.cpp index a8e42a2d0f4d438e6db98fd2dfa7fb3a61025e9a..9b393a022963e0bff92087d411fa555e360d05c7 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_edit/GTTestsSequenceEdit.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_edit/GTTestsSequenceEdit.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_edit/GTTestsSequenceEdit.h b/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_edit/GTTestsSequenceEdit.h index b92ee178a3503813fa988f5445d1057a512c4fb9..48441afe4381e73fdb41a750ae924059e80e382a 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_edit/GTTestsSequenceEdit.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_edit/GTTestsSequenceEdit.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_edit/GTTestsSequenceEditMode.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_edit/GTTestsSequenceEditMode.cpp index 11ae72a7072768f213f1f4b328d26ed882b5e768..339743011c7ceb3c7f39bf985615690f40c71e36 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_edit/GTTestsSequenceEditMode.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_edit/GTTestsSequenceEditMode.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_edit/GTTestsSequenceEditMode.h b/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_edit/GTTestsSequenceEditMode.h index ce05351deb390af9dc578dd8ad5df8a1b062ebdd..5e48b353bddae8a5499a72d25648ce63f1af7abe 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_edit/GTTestsSequenceEditMode.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_edit/GTTestsSequenceEditMode.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_view/GTTestsSequenceView.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_view/GTTestsSequenceView.cpp index ee9f97f1a44480a7331f6e34b18d86796e87317c..78b1670501bf6d682d6ea9f3becfb79aa1688f5b 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_view/GTTestsSequenceView.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_view/GTTestsSequenceView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -713,12 +713,20 @@ GUI_TEST_CLASS_DEFINITION(test_0025) { ADVSingleSequenceWidget* wgt = GTUtilsSequenceView::getSeqWidgetByNumber(os); CHECK_SET_ERR(wgt != NULL, "ADVSequenceWidget is NULL"); + GTWidget::click(os, GTWidget::findWidget(os, "CircularViewAction")); + + QWidget *toggleViewButton = GTWidget::findWidget(os, "toggleViewButton"); + GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "toggleZoomView")); + GTWidget::click(os, toggleViewButton); + GTGlobals::sleep(); + GTUtilsDialog::waitForDialog(os, new SelectSequenceRegionDialogFiller(os, "560..743,1..180")); GTKeyboardDriver::keyClick('a', Qt::ControlModifier); + GTGlobals::sleep(); GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "ADV_MENU_ANALYSE" << "primer3_action")); GTUtilsDialog::waitForDialog(os, new Primer3DialogFiller(os)); - GTWidget::click(os, wgt, Qt::RightButton); + GTWidget::click(os, wgt, Qt::RightButton, QPoint(10,10)); GTGlobals::sleep(); @@ -748,7 +756,7 @@ GUI_TEST_CLASS_DEFINITION(test_0026) { settings.start = 560; settings.end = 180; GTUtilsDialog::waitForDialog(os, new Primer3DialogFiller(os, settings)); - GTWidget::click(os, wgt, Qt::RightButton); + GTWidget::click(os, GTWidget::findWidget(os, "det_view_Primers_DNA"), Qt::RightButton); GTGlobals::sleep(); @@ -1335,6 +1343,7 @@ GUI_TEST_CLASS_DEFINITION(test_0040){ QAbstractButton* wrapButton = GTAction::button(os, "wrap_sequence_action"); CHECK_SET_ERR(wrapButton->isChecked(), "Multi-line mode is unexpectedly inactive"); GTWidget::click(os, wrapButton); + GTUtilsProjectTreeView::toggleView(os, GTGlobals::UseKey); DetView* det = GTWidget::findExactWidget<DetView*>(os, "det_view_human_T1 (UCSC April 2002 chr7:115977709-117855134)"); QScrollBar* scroll = GTScrollBar::getScrollBar(os, "singleline_scrollbar"); @@ -1687,7 +1696,7 @@ GUI_TEST_CLASS_DEFINITION(test_0051){ GTUtilsDialog::waitForDialog(os, new ColorDialogFiller(os, 255, 0, 0)); GTUtilsAnnotHighlightingTreeView::click(os, "CDS"); - GTMouseDriver::moveTo(GTMouseDriver::getMousePosition() + QPoint(20, 0)); + GTMouseDriver::moveTo(GTMouseDriver::getMousePosition() + QPoint(60, 0)); GTMouseDriver::click(); GTGlobals::sleep(1000); @@ -2112,23 +2121,25 @@ GUI_TEST_CLASS_DEFINITION(test_0064) { // 2. Scroll with the mouse wheel to the end of the sequence and back to the beginning GTFileDialog::openFile(os, testDir + "_common_data/fasta", "seq4.fa"); + GTUtilsTaskTreeView::waitTaskFinished(os); + QAbstractButton* wrapButton = GTAction::button(os, "wrap_sequence_action"); CHECK_SET_ERR(wrapButton->isChecked(), "Multi-line mode is unexpectedly inactive"); QScrollBar* scrollBar = GTScrollBar::getScrollBar(os, "multiline_scrollbar"); CHECK_SET_ERR(scrollBar != NULL, "Cannot find multiline_scrollbar"); - + GTGlobals::sleep(500); GTScrollBar::moveSliderWithMouseWheelDown(os, scrollBar, scrollBar->maximum()); GTGlobals::sleep(); U2Region visibleRange = GTUtilsSequenceView::getVisibleRange(os); - CHECK_SET_ERR(visibleRange.contains(GTUtilsSequenceView::getSeqWidgetByNumber(os)->getSequenceLength() - 1), "The end position of the sequence is not visible. Failed to scroll to the end" ); + CHECK_SET_ERR(visibleRange.contains(GTUtilsSequenceView::getSeqWidgetByNumber(os)->getSequenceLength() - 1), "The end position of the sequence is not visible. Failed to scroll to the end_1" ); GTScrollBar::moveSliderWithMouseWheelUp(os, scrollBar, scrollBar->maximum()); - GTGlobals::sleep(); + GTGlobals::sleep(500); visibleRange = GTUtilsSequenceView::getVisibleRange(os); - CHECK_SET_ERR(visibleRange.contains(1), "The end position of the sequence is not visible. Failed to scroll to the end" ); + CHECK_SET_ERR(visibleRange.contains(1), "The end position of the sequence is not visible. Failed to scroll to the end_2" ); } GUI_TEST_CLASS_DEFINITION(test_0065) { @@ -2483,7 +2494,7 @@ GUI_TEST_CLASS_DEFINITION(test_0078) { // Expected state: the line edits are red // 4. Click Ok // Expected state: message box appears - // 5. Set start search postion back to 1 + // 5. Set start search position back to 1 // 6. Check the exclude checkbox // 7. Click Ok // Expected state: message box appears diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_view/GTTestsSequenceView.h b/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_view/GTTestsSequenceView.h index 147b39c888238f04839520f45bb440c9387b29c7..21bbd83b7b9322ca4e442d29af30cf92dfffd8e2 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_view/GTTestsSequenceView.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/sequence_view/GTTestsSequenceView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/shared_database/GTTestsSharedDatabase.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/shared_database/GTTestsSharedDatabase.cpp index 42ae489670b15b8a46631da3a93b920af0e5287c..79b2f0ab4037bcfbdbefa719b520af33e40bb758 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/shared_database/GTTestsSharedDatabase.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/shared_database/GTTestsSharedDatabase.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -805,10 +805,12 @@ GUI_TEST_CLASS_DEFINITION(proj_test_0004) { QModelIndex dirItem1 = GTUtilsProjectTreeView::findIndex(os, "pt0004_dir1"); QModelIndex dirItem2 = GTUtilsProjectTreeView::findIndex(os, "pt0004_dir2"); + GTGlobals::sleep(); QModelIndex objItem = GTUtilsProjectTreeView::findIndex(os, "pt0004_human_T1"); CHECK_SET_ERR(treeView->isExpanded(dirItem2), "The folder item has not expanded after double click"); - + GTGlobals::sleep(); GTUtilsProjectTreeView::dragAndDrop(os, objItem, dirItem1); + GTGlobals::sleep(20000); dirItem1 = GTUtilsProjectTreeView::findIndex(os, "pt0004_dir1"); dirItem2 = GTUtilsProjectTreeView::findIndex(os, "pt0004_dir2"); CHECK_SET_ERR(2 == model->rowCount(dirItem1), QString("Invalid child item count for pt0004_dir1 Expected: 2; actual: %1").arg(model->rowCount(dirItem1))); diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/shared_database/GTTestsSharedDatabase.h b/src/plugins/GUITestBase/src/tests/common_scenarios/shared_database/GTTestsSharedDatabase.h index aae7b0ed4ec2471d9732e867a81faaafd791a66d..b5cb69b2336650e8fe070f536c263ed7543e20b4 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/shared_database/GTTestsSharedDatabase.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/shared_database/GTTestsSharedDatabase.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/smith_waterman_dialog/GTTestsSWDialog.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/smith_waterman_dialog/GTTestsSWDialog.cpp index c6c7c86cb1012a5b215ff757d8ba70854f2d6e5c..c45f7f0a05a157f83be438dbb6a5345ba21f010b 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/smith_waterman_dialog/GTTestsSWDialog.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/smith_waterman_dialog/GTTestsSWDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/smith_waterman_dialog/GTTestsSWDialog.h b/src/plugins/GUITestBase/src/tests/common_scenarios/smith_waterman_dialog/GTTestsSWDialog.h index 79bef36a8a397a6e9ba6f6ded4f85fdefba59865..2804f1ea7e900ab54e7a85ca50e2cf58f1b0fb41 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/smith_waterman_dialog/GTTestsSWDialog.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/smith_waterman_dialog/GTTestsSWDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/start_page/GTTestsStartPage.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/start_page/GTTestsStartPage.cpp index caf89124f60119a6a17a60008d1335250f2671d9..5bb6cc10300a4c146240c20ddc7e939416bd18d8 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/start_page/GTTestsStartPage.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/start_page/GTTestsStartPage.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,8 +19,6 @@ * MA 02110-1301, USA. */ -#include <QWebElement> - #include "GTUtilsMdi.h" #include "GTUtilsProject.h" #include "GTUtilsProjectTreeView.h" @@ -113,7 +111,7 @@ GUI_TEST_CLASS_DEFINITION(test_0006){ GTGlobals::sleep(); GTUtilsStartPage::clickResentProject(os, "proj1.uprj"); // Expected state: project is opened - GTUtilsDocument::checkDocument(os, "1CF7.PDB"); + GTUtilsDocument::checkDocument(os, "1CF7.pdb"); QString expectedTitle; expectedTitle = "proj1 UGENE"; diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/start_page/GTTestsStartPage.h b/src/plugins/GUITestBase/src/tests/common_scenarios/start_page/GTTestsStartPage.h index 8289d5d6053d0d2845a74574e241173921a7f347..4cffab09e36b6087bd0c535a34f45ebd4dd4425d 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/start_page/GTTestsStartPage.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/start_page/GTTestsStartPage.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/toggle_view/GTTestsToggleView.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/toggle_view/GTTestsToggleView.cpp index bef8c8d683748c75b83b28bc26bde9a43f97fa0a..8cd45f512c9ea13854e9208be01658ba72f767cf 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/toggle_view/GTTestsToggleView.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/toggle_view/GTTestsToggleView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/toggle_view/GTTestsToggleView.h b/src/plugins/GUITestBase/src/tests/common_scenarios/toggle_view/GTTestsToggleView.h index bf420299f2418726eb1b935ccbfbfc655230f7f3..d7d0fdc55e22f66ba93fa7ceaef2fdbbc1bb999d 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/toggle_view/GTTestsToggleView.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/toggle_view/GTTestsToggleView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/tree_viewer/GTTestsCommonScenariousTreeviewer.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/tree_viewer/GTTestsCommonScenariousTreeviewer.cpp index 62ea2ac7f84d7332d8516007b7be827a44114c9d..9cb12755ba4d1ef12b8863b09f7f2f2fd06ebd73 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/tree_viewer/GTTestsCommonScenariousTreeviewer.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/tree_viewer/GTTestsCommonScenariousTreeviewer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/tree_viewer/GTTestsCommonScenariousTreeviewer.h b/src/plugins/GUITestBase/src/tests/common_scenarios/tree_viewer/GTTestsCommonScenariousTreeviewer.h index 4d75767da498b477eb0567deb921c67cb22f7ed8..25c44997b9d4ac0bd787bab56e7bc8ff5a403424 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/tree_viewer/GTTestsCommonScenariousTreeviewer.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/tree_viewer/GTTestsCommonScenariousTreeviewer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/undo_redo/GTTestsUndoRedo.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/undo_redo/GTTestsUndoRedo.cpp index f59413dcaaa24a58463992766627de7da8a1c4b9..257045568b8669358eef0e3e0d5f9b60f1d79a14 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/undo_redo/GTTestsUndoRedo.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/undo_redo/GTTestsUndoRedo.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/undo_redo/GTTestsUndoRedo.h b/src/plugins/GUITestBase/src/tests/common_scenarios/undo_redo/GTTestsUndoRedo.h index cbf5c578a6406373e717f6e44a0b4ae83140f270..d707f179e823ed418103e88b6234d07428ca0433 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/undo_redo/GTTestsUndoRedo.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/undo_redo/GTTestsUndoRedo.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/GTTestsWorkflowDesigner.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/GTTestsWorkflowDesigner.cpp index a52ae1a4d0b02e7319c853f241112171aa0dfda8..35bff68ab38884d79aa840bd9e0f1285edd8e62e 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/GTTestsWorkflowDesigner.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/GTTestsWorkflowDesigner.cpp @@ -1,6 +1,6 @@ /**009 * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -79,35 +79,6 @@ namespace U2 { namespace GUITest_common_scenarios_workflow_designer { using namespace HI; -GUI_TEST_CLASS_DEFINITION(test_0002){ - GTUtilsDialog::waitForDialog(os, new StartupDialogFiller(os)); - //1. Start UGENE. Open workflow schema file from data\cmdline\pfm-build.uws - GTFileDialog::openFile(os,dataDir + "cmdline/","pwm-build.uwl"); - GTUtilsTaskTreeView::waitTaskFinished(os); - GTGlobals::sleep(1000); -// Expected state: workflow schema opened in Workflow designer -// 2. Change item style (Minimal - Extended - Minimal - Extended) - QGraphicsView* sceneView = qobject_cast<QGraphicsView*>(GTWidget::findWidget(os,"sceneView")); - CHECK_SET_ERR(sceneView,"scene not found"); - QList<QGraphicsItem *> items = sceneView->items(); - QList<QPointF> posList; - - foreach(QGraphicsItem* item,items){ - posList.append(item->pos()); - } - GTUtilsDialog::waitForDialog(os, new PopupChooser(os,QStringList()<<"Minimal")); - GTWidget::click(os, GTWidget::findWidget(os,"Element style")); - GTUtilsDialog::waitForDialog(os, new PopupChooser(os,QStringList()<<"Extended")); - GTWidget::click(os, GTWidget::findWidget(os,"Element style")); -// Expected state: all arrows in schema still unbroken - items = sceneView->items(); - foreach(QGraphicsItem* item,items){ - QPointF p = posList.takeFirst(); - CHECK_SET_ERR(p==item->pos(),QString("some item changed position from %1, %2 to %3, %4") - .arg(p.x()).arg(p.y()).arg(item->pos().x()).arg(item->pos().y())); - } - -} GUI_TEST_CLASS_DEFINITION(test_0002_1){ GTUtilsDialog::waitForDialog(os, new StartupDialogFiller(os)); @@ -484,37 +455,26 @@ GUI_TEST_CLASS_DEFINITION(test_0060){ // Expected state: sample works as it stated (the result of default run(format should be BED) on that data is "_common_data/bedtools/out17.bed" GTUtilsWorkflowDesigner::openWorkflowDesigner(os); - GTUtilsWorkflowDesigner::addSample(os, "Intersect annotations"); - - class wd_test_0060 : public CustomScenario { - public: - void run(HI::GUITestOpStatus &os) { - QMap<QString, QVariant> parameters; - parameters["Output file"] = QDir(sandBoxDir).absolutePath() + "/wd_test_0060"; - //! The following code will not work because of UGENE-4234 -// parameters["Annotations A"] = QDir(testDir).absolutePath() + "/_common_data/bedtools/introns.bed"; -// parameters["Annotations B"] = QDir(testDir).absolutePath() + "/_common_data/bedtools/mutation.gff"; - GTUtilsWizard::setAllParameters(os, parameters); - - GTKeyboardDriver::keyClick( Qt::Key_Enter); - GTUtilsWizard::clickButton(os, GTUtilsWizard::Apply); - } - }; - + GTUtilsTaskTreeView::waitTaskFinished(os); - GTUtilsDialog::waitForDialog(os, new WizardFiller(os, "Intersect Annotations Wizard", new wd_test_0060())); - GTWidget::click(os, GTAction::button(os, "Show wizard")); - GTGlobals::sleep(); + GTUtilsWorkflowDesigner::addSample(os, "Intersect annotations"); + GTGlobals::sleep(100); + GTKeyboardDriver::keyClick(Qt::Key_Escape); GTUtilsWorkflowDesigner::click(os, "Read Annotations A"); + GTGlobals::sleep(); GTUtilsWorkflowDesigner::setDatasetInputFile(os, testDir + "/_common_data/bedtools/introns.bed"); GTUtilsWorkflowDesigner::click(os, "Read Annotations B"); + GTGlobals::sleep(); GTUtilsWorkflowDesigner::setDatasetInputFile(os, testDir + "/_common_data/bedtools/mutation.gff"); GTUtilsWorkflowDesigner::click(os, "Write Annotations"); GTGlobals::sleep(); GTUtilsWorkflowDesigner::setParameter(os, "Document format", "BED", GTUtilsWorkflowDesigner::comboValue); + QString s = QFileInfo(testDir + "_common_data/scenarios/sandbox").absoluteFilePath(); + GTUtilsWorkflowDesigner::setParameter(os, "Output file", QVariant(s + "/wd_test_0060"), GTUtilsWorkflowDesigner::textValue); + GTUtilsWorkflowDesigner::runWorkflow(os); GTUtilsTaskTreeView::waitTaskFinished(os); diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/GTTestsWorkflowDesigner.h b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/GTTestsWorkflowDesigner.h index f7e1db6c779f151949c478907ba3b692ef79db67..bf148199fb729745bd8e4a337f40dd7b839fefdb 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/GTTestsWorkflowDesigner.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/GTTestsWorkflowDesigner.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -31,7 +31,6 @@ namespace GUITest_common_scenarios_workflow_designer { #undef GUI_TEST_SUITE #define GUI_TEST_SUITE "GUITest_common_scenarios_workflow_designer" -GUI_TEST_CLASS_DECLARATION(test_0002) GUI_TEST_CLASS_DECLARATION(test_0002_1) GUI_TEST_CLASS_DECLARATION(test_0003) GUI_TEST_CLASS_DECLARATION(test_0005) diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/dashboard/GTTestsWorkflowDashboard.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/dashboard/GTTestsWorkflowDashboard.cpp new file mode 100644 index 0000000000000000000000000000000000000000..589bc266142b8d4a9e2bf8ca1d710cffc4cedf40 --- /dev/null +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/dashboard/GTTestsWorkflowDashboard.cpp @@ -0,0 +1,4681 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <base_dialogs/GTFileDialog.h> +#include <base_dialogs/MessageBoxFiller.h> +#include <drivers/GTKeyboardDriver.h> +#include <drivers/GTMouseDriver.h> +#include <primitives/GTMainWindow.h> +#include <primitives/GTMenu.h> +#include <primitives/GTTabWidget.h> +#include <primitives/GTToolbar.h> +#include <primitives/GTWebView.h> +#include <primitives/GTWidget.h> +#include <system/GTClipboard.h> +#include <system/GTFile.h> + +#include <QApplication> +#include <QDir> +#include <QFileInfo> +#include <QMdiArea> +#include <QTemporaryDir> + +#include <U2Core/AppContext.h> +#include <U2Core/ExternalToolRegistry.h> +#include <U2Core/U2SafePoints.h> + +#include "GTTestsWorkflowDashboard.h" +#include "GTUtilsDashboard.h" +#include "GTUtilsExternalTools.h" +#include "GTUtilsLog.h" +#include "GTUtilsMdi.h" +#include "GTUtilsTaskTreeView.h" +#include "GTUtilsWorkflowDesigner.h" +#include "runnables/ugene/corelibs/U2Gui/AppSettingsDialogFiller.h" +#include "runnables/ugene/plugins/ngs_classification/GenomicLibraryDialogFiller.h" +#include "runnables/ugene/plugins/workflow_designer/DashboardsManagerDialogFiller.h" +#include "runnables/ugene/plugins/workflow_designer/StartupDialogFiller.h" + +namespace U2 { + +namespace GUITest_common_scenarios_workflow_dashboard { +using namespace HI; + +namespace { + +QString getExternalToolPath(GUITestOpStatus &os, const QString &toolName) { + Q_UNUSED(os) + + ExternalToolRegistry *etRegistry = AppContext::getExternalToolRegistry(); + CHECK_SET_ERR_RESULT(nullptr != etRegistry, "ExternalToolRegistry is nullptr", QString()); + + ExternalTool *tool = etRegistry->getByName(toolName); + CHECK_SET_ERR_RESULT(nullptr != tool, QString("'%1' tool not found in the registry is nullptr").arg(toolName), QString()); + + const QString toolPath = tool->getPath(); + CHECK_SET_ERR_RESULT(!toolPath.isEmpty(), QString("'%1' tool path is empty").arg(toolName), QString()); + CHECK_SET_ERR_RESULT(tool->isValid(), QString("'%1' tool is invalid").arg(toolName), QString()); + + return toolPath; +} + +QString getExternalToolDirPath(GUITestOpStatus &os, const QString &toolName, const QString &dirNamePart) { + const QString toolPath = getExternalToolPath(os, toolName); + QDir toolDir = QFileInfo(toolPath).dir(); + while (!toolDir.dirName().contains(dirNamePart)) { + if (!toolDir.cdUp()) { + CHECK_SET_ERR_RESULT(false, QString("Can't find tool '%1' dir that should contain '%2'. The tool path: '%3'") + .arg(toolName).arg(dirNamePart).arg(toolPath), QString()); + } + } + return toolDir.path(); +} + +QString putToolToFolderWithSpaces(GUITestOpStatus &os, const QString &toolName, const QString &toolDirPath, const QString &sandboxDir) { + const QString toolPath = getExternalToolPath(os, toolName); + CHECK(!toolPath.contains(" "), toolPath); + + QTemporaryDir dirWithSpaces(QFileInfo(sandboxDir).absolutePath() + "/folder XXXXXX"); + dirWithSpaces.setAutoRemove(false); + + const QString newToolDirPath = dirWithSpaces.path() + "/" + QFileInfo(toolDirPath).fileName(); + QString newToolPath = toolPath; + newToolPath.replace(toolDirPath, newToolDirPath); + GTFile::copyDir(os, toolDirPath, newToolDirPath); + + return newToolPath; +} + +QString putToolToFolderWithoutSpaces(GUITestOpStatus &os, const QString &toolName, const QString &toolDirPath, const QString &sandboxDir) { + const QString toolPath = getExternalToolPath(os, toolName); + CHECK(toolPath.contains(" "), toolPath); + + CHECK_SET_ERR_RESULT(!sandboxDir.contains(" "), + QString("Sandbox dir path contains spaces, can't find an acceptable place to copy tool '%1'. Sandbox dir path: '%2'") + .arg(toolName).arg(sandboxDir), QString()); + + QTemporaryDir dirWithoutSpaces(sandboxDir + "/folderXXXXXX"); + dirWithoutSpaces.setAutoRemove(false); + + const QString newToolDirPath = dirWithoutSpaces.path() + "/" + QFileInfo(toolDirPath).fileName(); + QString newToolPath = toolPath; + newToolPath.replace(toolDirPath, newToolDirPath); + CHECK_SET_ERR_RESULT(!newToolPath.contains(" "), + QString("Can't copy tool '%1' to a folder without spaces in the path: the tool contains spaces in its inner folders. Supposed new tool path: '%2'") + .arg(toolName).arg(newToolPath), QString()); + + GTFile::copyDir(os, toolDirPath, newToolDirPath); + + return newToolPath; +} + +QMap<QString, QList<QPair<QString, QStringList> > > getNodesTexts(GUITestOpStatus &os) { + const int firstLevelNodesCount = GTUtilsDashboard::getChildrenNodesCount(os, GTUtilsDashboard::TREE_ROOT_ID); + QMap<QString, QList<QPair<QString, QStringList> > > nodesTexts; + for (int i = 0; i < firstLevelNodesCount; i++) { + const QString firstLevelNodeId = GTUtilsDashboard::getChildNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, i); + const QString firstLevelNodeText = GTUtilsDashboard::getNodeText(os, firstLevelNodeId); + + const int secondLevelNodesCount = GTUtilsDashboard::getChildrenNodesCount(os, firstLevelNodeId); + QList<QPair<QString, QStringList> > subtree; + for (int j = 0; j < secondLevelNodesCount; j++) { + const QString secondLevelNodeId = GTUtilsDashboard::getChildNodeId(os, firstLevelNodeId, j); + const QString secondLevelNodeText = GTUtilsDashboard::getNodeText(os, secondLevelNodeId); + + const int thirdLevelNodesCount = GTUtilsDashboard::getChildrenNodesCount(os, secondLevelNodeId); + QStringList thirdLevelNodesTexts; + for (int k = 0; k < thirdLevelNodesCount; k++) { + thirdLevelNodesTexts << GTUtilsDashboard::getNodeText(os, GTUtilsDashboard::getChildNodeId(os, secondLevelNodeId, k)); + } + subtree << qMakePair(secondLevelNodeText, thirdLevelNodesTexts); + } + nodesTexts.insert(firstLevelNodeText, subtree); + } + return nodesTexts; +} + +void checkTreeStructure(GUITestOpStatus &os, const QMap<QString, QList<QPair<QString, QStringList> > > &expectedNodesTexts) { + const QMap<QString, QList<QPair<QString, QStringList> > > nodesTexts = getNodesTexts(os); + + // Do explicitely comparison to be able to log the incorrect values + CHECK_SET_ERR(nodesTexts.size() == expectedNodesTexts.size(), + QString("Unexpected first level nodes count: expected %1, got %2") + .arg(expectedNodesTexts.size()).arg(nodesTexts.size())); + + foreach (const QString &expectedFirstLevelNodeText, expectedNodesTexts.keys()) { + CHECK_SET_ERR(nodesTexts.contains(expectedFirstLevelNodeText), + QString("An expected first level node with text '%1' is not found in the tree") + .arg(expectedFirstLevelNodeText)); + + const QList<QPair<QString, QStringList> > &expectedSecondLevelNodes = expectedNodesTexts[expectedFirstLevelNodeText]; + const QList<QPair<QString, QStringList> > &secondLevelNodes = nodesTexts[expectedFirstLevelNodeText]; + + CHECK_SET_ERR(expectedSecondLevelNodes.size() == secondLevelNodes.size(), + QString("Unexpected second level nodes count for the first level node with text '%1': expected %2, got %3") + .arg(expectedFirstLevelNodeText).arg(expectedSecondLevelNodes.size()).arg(secondLevelNodes.size())); + + for (int i = 0, n = expectedSecondLevelNodes.size(); i < n; i++) { + const QPair<QString, QStringList> &expectedSecondLevelNode = expectedSecondLevelNodes[i]; + const QPair<QString, QStringList> &secondLevelNode = secondLevelNodes[i]; + + const QString expectedSecondLevelNodeText = expectedSecondLevelNode.first; + const QString secondLevelNodeText = secondLevelNode.first; + CHECK_SET_ERR(expectedSecondLevelNodeText == secondLevelNodeText, + QString("%1 (zero-based) child of the first level node with text '%2' has unexpected text: expected '%3', got '%4'") + .arg(i).arg(expectedFirstLevelNodeText).arg(expectedSecondLevelNodeText).arg(secondLevelNodeText)); + + const QStringList &expectedThirdLevelNodes = expectedSecondLevelNode.second; + const QStringList &thirdLevelNodes = secondLevelNode.second; + + CHECK_SET_ERR(expectedThirdLevelNodes.size() == thirdLevelNodes.size(), + QString("Unexpected third level nodes count for the second level node with text '%1', which is %2 (zero-based) child of the first level node with text '%3': expected %4, got %5") + .arg(expectedSecondLevelNodeText).arg(i).arg(expectedFirstLevelNodeText).arg(expectedThirdLevelNodes.size()).arg(thirdLevelNodes.size())); + + for (int j = 0, m = expectedThirdLevelNodes.size(); j < m; j++) { + CHECK_SET_ERR(expectedThirdLevelNodes[j] == thirdLevelNodes[j], + QString("%1 (zero-based) child of the second level node with text '%2', which is %3 (zero-based) child of " + "the first node with text '%4', has unexpected text: expected '%5', got '%6'") + .arg(j).arg(expectedSecondLevelNodeText).arg(i).arg(expectedFirstLevelNodeText).arg(expectedThirdLevelNodes[j]).arg(thirdLevelNodes[j])); + } + } + } +} + +class SetWorkflowOutputDirScenario : public CustomScenario { +public: + SetWorkflowOutputDirScenario(const QString &_path) + : CustomScenario(), path(_path) + { + + } + + void run(HI::GUITestOpStatus &os) { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(nullptr != dialog, "activeModalWidget is nullptr"); + + AppSettingsDialogFiller::setWorkflowOutputDirPath(os, path); + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + +private: + const QString path; +}; + +void setWorkflowOutputDir(GUITestOpStatus &os, const QString &path) { + GTUtilsDialog::waitForDialog(os, new AppSettingsDialogFiller(os, new SetWorkflowOutputDirScenario(path))); + GTMenu::clickMainMenuItem(os, QStringList() << "Settings" << "Preferences..."); +} + +} + +GUI_TEST_CLASS_DEFINITION(misc_test_0001) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Open "_common_data/workflow/dashboard/external_tools_free_worfklow.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/external_tools_free_worfklow.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 2. Click "Read File URL(s)" element. + GTUtilsWorkflowDesigner::click(os, "Read File URL(s)"); + +// 3. Add "data/samples/FASTA/human_T1.fa" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/FASTA/human_T1.fa", true); + +// 4. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 5. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// Expected result: a dashboard appears, it has no "External Tools" tab. + const bool externalToolsTabExists = GTUtilsDashboard::doesTabExist(os, GTUtilsDashboard::ExternalTools); + CHECK_SET_ERR(!externalToolsTabExists, "'External tools' dashboard tab unexpectedly is present on the dashboard"); +} + +GUI_TEST_CLASS_DEFINITION(misc_test_0002) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Open "_common_data/workflow/dashboard/clustulo.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/clustulo.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 2. Click "Read Alignment" element. + GTUtilsWorkflowDesigner::click(os, "Read Alignment"); + +// 3. Add "data/samples/CLUSTALW/COI.aln" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/CLUSTALW/COI.aln", true); + +// 4. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 5. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// Expected result: a dashboard appears, it has "External Tools" tab. + const bool externalToolsTabExists = GTUtilsDashboard::doesTabExist(os, GTUtilsDashboard::ExternalTools); + CHECK_SET_ERR(externalToolsTabExists, "'External tools' dashboard tab unexpectedly is not present on the dashboard"); +} + +GUI_TEST_CLASS_DEFINITION(misc_test_0003) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Open "_common_data/workflow/dashboard/clustulo.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/clustulo.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 2. Click "Read Alignment" element. + GTUtilsWorkflowDesigner::click(os, "Read Alignment"); + +// 3. Add "data/samples/CLUSTALW/COI.aln" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/CLUSTALW/COI.aln", true); + +// 4. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 5. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 6. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// Expected result: +// The tree looks like: +// Align with ClustalO +// â””Align with ClustalO run 1 +// â””ClustalO run + + int childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, GTUtilsDashboard::TREE_ROOT_ID); + int expectedChildrenCount = 1; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, QString("There is an unexpected children count of node with ID '%1': expected %2, got %3") + .arg(GTUtilsDashboard::TREE_ROOT_ID).arg(expectedChildrenCount).arg(childrenCount)); + + QString nodeId = GTUtilsDashboard::getChildNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, 0); + QString nodeText = GTUtilsDashboard::getNodeText(os, nodeId); + QString expectedNodeText = "Align with ClustalO"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(nodeId).arg(expectedNodeText).arg(nodeText)); + + childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, nodeId); + expectedChildrenCount = 1; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, QString("There is an unexpected children count of node with ID '%1': expected %2, got %3") + .arg(nodeId).arg(expectedChildrenCount).arg(childrenCount)); + + nodeId = GTUtilsDashboard::getChildNodeId(os, nodeId, 0); + nodeText = GTUtilsDashboard::getNodeText(os, nodeId); + expectedNodeText = "Align with ClustalO run 1"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(nodeId).arg(expectedNodeText).arg(nodeText)); + + childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, nodeId); + expectedChildrenCount = 1; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, QString("There is an unexpected children count of node with ID '%1': expected %2, got %3") + .arg(nodeId).arg(expectedChildrenCount).arg(childrenCount)); + + nodeId = GTUtilsDashboard::getChildNodeId(os, nodeId, 0); + nodeText = GTUtilsDashboard::getNodeText(os, nodeId); + expectedNodeText = "ClustalO run "; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(nodeId).arg(expectedNodeText).arg(nodeText)); +} + +GUI_TEST_CLASS_DEFINITION(misc_test_0004) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Open "_common_data/workflow/dashboard/samtools_clustulo_clustalw.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/samtools_clustulo_clustalw.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 2. Click "Read File URL(s)" element. + GTUtilsWorkflowDesigner::click(os, "Read File URL(s)"); + +// 3. Add "data/samples/Assembly/chrM.sam.bam" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/Assembly/chrM.sorted.bam", true); + +// 4. Create a new dataset with name "Dataset 2". + GTUtilsWorkflowDesigner::createDataset(os, "Dataset 2"); + +// 5. Add "data/samples/Assembly/chrM.sam.bam" file to "Dataset 2" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/Assembly/chrM.sam", true); + +// 6. Click "Call Variants with SAMtools" element. + GTUtilsWorkflowDesigner::click(os, "Call Variants with SAMtools"); + +// 7. Set "Reference" attribute value to "data/samples/Assembly/chrM.fa". + GTUtilsWorkflowDesigner::setParameter(os, "Reference", dataDir + "samples/Assembly/chrM.fa", GTUtilsWorkflowDesigner::textValue); + +// 8. Set "Output variants file" attribute value to "misc_test_0004.vcf". + GTUtilsWorkflowDesigner::setParameter(os, "Output variants file", QFileInfo(sandBoxDir + "misc_test_0004.vcf").absoluteFilePath(), GTUtilsWorkflowDesigner::textValue); + +// 9. Click "Read Alignment" element. + GTUtilsWorkflowDesigner::click(os, "Read Alignment"); + +// 10. Add "data/samples/CLUSTALW/COI.aln" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/CLUSTALW/COI.aln", true); + +// 11. Add "data/samples/CLUSTALW/COI.aln" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/CLUSTALW/COI.aln", true); + +// 12. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 13. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 14. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// Expected result: +// The tree looks like: +// Call Variants with SAMtools +// ├Call Variants with SAMtools run 1 +// |├SAMtools run +// |├BCFtools run +// |â””vcfutils run +// â””Call Variants with SAMtools run 2 +// ├SAMtools run +// ├BCFtools run +// â””vcfutils run +// Align with ClustalO +// ├Align with ClustalO run 1 +// |â””ClustalO run +// â””Align with ClustalO run 2 +// â””ClustalO run +// Align with ClustalW +// ├Align with ClustalW run 1 +// |â””ClustalW run +// â””Align with ClustalW run 2 +// â””ClustalW run + + // root + int childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, GTUtilsDashboard::TREE_ROOT_ID); + int expectedChildrenCount = 3; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, QString("There is an unexpected children count of node with ID '%1': expected %2, got %3") + .arg(GTUtilsDashboard::TREE_ROOT_ID).arg(expectedChildrenCount).arg(childrenCount)); + + // root / Call Variants with SAMtools + QString nodeLevel1Id = GTUtilsDashboard::getChildNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, 0); + QString nodeText = GTUtilsDashboard::getNodeText(os, nodeLevel1Id); + QString expectedNodeText = "Call Variants with SAMtools"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(nodeLevel1Id).arg(expectedNodeText).arg(nodeText)); + + childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, nodeLevel1Id); + expectedChildrenCount = 2; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, QString("There is an unexpected children count of node with ID '%1': expected %2, got %3") + .arg(nodeLevel1Id).arg(expectedChildrenCount).arg(childrenCount)); + + // root / Call Variants with SAMtools / Call Variants with SAMtools run 1 + QString nodeLevel2Id = GTUtilsDashboard::getChildNodeId(os, nodeLevel1Id, 0); + nodeText = GTUtilsDashboard::getNodeText(os, nodeLevel2Id); + expectedNodeText = "Call Variants with SAMtools run 1"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(nodeLevel2Id).arg(expectedNodeText).arg(nodeText)); + + childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, nodeLevel2Id); + expectedChildrenCount = 3; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, QString("There is an unexpected children count of node with ID '%1': expected %2, got %3") + .arg(nodeLevel2Id).arg(expectedChildrenCount).arg(childrenCount)); + + // root / Call Variants with SAMtools / Call Variants with SAMtools run 1 / SAMtools run + QString nodeLevel3Id = GTUtilsDashboard::getChildNodeId(os, nodeLevel2Id, 0); + nodeText = GTUtilsDashboard::getNodeText(os, nodeLevel3Id); + expectedNodeText = "SAMtools run "; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(nodeLevel3Id).arg(expectedNodeText).arg(nodeText)); + + // root / Call Variants with SAMtools / Call Variants with SAMtools run 1 / BCFtools run + nodeLevel3Id = GTUtilsDashboard::getChildNodeId(os, nodeLevel2Id, 1); + nodeText = GTUtilsDashboard::getNodeText(os, nodeLevel3Id); + expectedNodeText = "BCFtools run "; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(nodeLevel3Id).arg(expectedNodeText).arg(nodeText)); + + // root / Call Variants with SAMtools / Call Variants with SAMtools run 1 / vcfutils run + nodeLevel3Id = GTUtilsDashboard::getChildNodeId(os, nodeLevel2Id, 2); + nodeText = GTUtilsDashboard::getNodeText(os, nodeLevel3Id); + expectedNodeText = "vcfutils run "; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(nodeLevel3Id).arg(expectedNodeText).arg(nodeText)); + + // root / Call Variants with SAMtools / Call Variants with SAMtools run 2 + nodeLevel2Id = GTUtilsDashboard::getChildNodeId(os, nodeLevel1Id, 1); + nodeText = GTUtilsDashboard::getNodeText(os, nodeLevel2Id); + expectedNodeText = "Call Variants with SAMtools run 2"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(nodeLevel2Id).arg(expectedNodeText).arg(nodeText)); + + childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, nodeLevel2Id); + expectedChildrenCount = 3; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, QString("There is an unexpected children count of node with ID '%1': expected %2, got %3") + .arg(nodeLevel2Id).arg(expectedChildrenCount).arg(childrenCount)); + + // root / Call Variants with SAMtools / Call Variants with SAMtools run 2 / SAMtools run + nodeLevel3Id = GTUtilsDashboard::getChildNodeId(os, nodeLevel2Id, 0); + nodeText = GTUtilsDashboard::getNodeText(os, nodeLevel3Id); + expectedNodeText = "SAMtools run "; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(nodeLevel3Id).arg(expectedNodeText).arg(nodeText)); + + // root / Call Variants with SAMtools / Call Variants with SAMtools run 2 / BCFtools run + nodeLevel3Id = GTUtilsDashboard::getChildNodeId(os, nodeLevel2Id, 1); + nodeText = GTUtilsDashboard::getNodeText(os, nodeLevel3Id); + expectedNodeText = "BCFtools run "; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(nodeLevel3Id).arg(expectedNodeText).arg(nodeText)); + + // root / Call Variants with SAMtools / Call Variants with SAMtools run 2 / vcfutils run + nodeLevel3Id = GTUtilsDashboard::getChildNodeId(os, nodeLevel2Id, 2); + nodeText = GTUtilsDashboard::getNodeText(os, nodeLevel3Id); + expectedNodeText = "vcfutils run "; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(nodeLevel3Id).arg(expectedNodeText).arg(nodeText)); + + + // root / Align with ClustalO + nodeLevel1Id = GTUtilsDashboard::getChildNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, 1); + nodeText = GTUtilsDashboard::getNodeText(os, nodeLevel1Id); + expectedNodeText = "Align with ClustalO"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(nodeLevel1Id).arg(expectedNodeText).arg(nodeText)); + + childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, nodeLevel1Id); + expectedChildrenCount = 2; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, QString("There is an unexpected children count of node with ID '%1': expected %2, got %3") + .arg(nodeLevel1Id).arg(expectedChildrenCount).arg(childrenCount)); + + // root / Align with ClustalO / Align with ClustalO run 1 + nodeLevel2Id = GTUtilsDashboard::getChildNodeId(os, nodeLevel1Id, 0); + nodeText = GTUtilsDashboard::getNodeText(os, nodeLevel2Id); + expectedNodeText = "Align with ClustalO run 1"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(nodeLevel2Id).arg(expectedNodeText).arg(nodeText)); + + childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, nodeLevel2Id); + expectedChildrenCount = 1; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, QString("There is an unexpected children count of node with ID '%1': expected %2, got %3") + .arg(nodeLevel2Id).arg(expectedChildrenCount).arg(childrenCount)); + + // root / Align with ClustalO / Align with ClustalO run 1 / ClustalO run + nodeLevel3Id = GTUtilsDashboard::getChildNodeId(os, nodeLevel2Id, 0); + nodeText = GTUtilsDashboard::getNodeText(os, nodeLevel3Id); + expectedNodeText = "ClustalO run "; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(nodeLevel3Id).arg(expectedNodeText).arg(nodeText)); + + // root / Align with ClustalO / Align with ClustalO run 2 + nodeLevel2Id = GTUtilsDashboard::getChildNodeId(os, nodeLevel1Id, 1); + nodeText = GTUtilsDashboard::getNodeText(os, nodeLevel2Id); + expectedNodeText = "Align with ClustalO run 2"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(nodeLevel2Id).arg(expectedNodeText).arg(nodeText)); + + childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, nodeLevel2Id); + expectedChildrenCount = 1; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, QString("There is an unexpected children count of node with ID '%1': expected %2, got %3") + .arg(nodeLevel2Id).arg(expectedChildrenCount).arg(childrenCount)); + + // root / Align with ClustalO / Align with ClustalO run 2 / ClustalO run + nodeLevel3Id = GTUtilsDashboard::getChildNodeId(os, nodeLevel2Id, 0); + nodeText = GTUtilsDashboard::getNodeText(os, nodeLevel3Id); + expectedNodeText = "ClustalO run "; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(nodeLevel3Id).arg(expectedNodeText).arg(nodeText)); + + + // root / Align with ClustalW + nodeLevel1Id = GTUtilsDashboard::getChildNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, 2); + nodeText = GTUtilsDashboard::getNodeText(os, nodeLevel1Id); + expectedNodeText = "Align with ClustalW"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(nodeLevel1Id).arg(expectedNodeText).arg(nodeText)); + + childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, nodeLevel1Id); + expectedChildrenCount = 2; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, QString("There is an unexpected children count of node with ID '%1': expected %2, got %3") + .arg(nodeLevel1Id).arg(expectedChildrenCount).arg(childrenCount)); + + // root / Align with ClustalW / Align with ClustalW run 1 + nodeLevel2Id = GTUtilsDashboard::getChildNodeId(os, nodeLevel1Id, 0); + nodeText = GTUtilsDashboard::getNodeText(os, nodeLevel2Id); + expectedNodeText = "Align with ClustalW run 1"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(nodeLevel2Id).arg(expectedNodeText).arg(nodeText)); + + childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, nodeLevel2Id); + expectedChildrenCount = 1; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, QString("There is an unexpected children count of node with ID '%1': expected %2, got %3") + .arg(nodeLevel2Id).arg(expectedChildrenCount).arg(childrenCount)); + + // root / Align with ClustalW / Align with ClustalW run 1 / ClustalW run + nodeLevel3Id = GTUtilsDashboard::getChildNodeId(os, nodeLevel2Id, 0); + nodeText = GTUtilsDashboard::getNodeText(os, nodeLevel3Id); + expectedNodeText = "ClustalW run "; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(nodeLevel3Id).arg(expectedNodeText).arg(nodeText)); + + + // root / Align with ClustalO / Align with ClustalW run 2 + nodeLevel2Id = GTUtilsDashboard::getChildNodeId(os, nodeLevel1Id, 1); + nodeText = GTUtilsDashboard::getNodeText(os, nodeLevel2Id); + expectedNodeText = "Align with ClustalW run 2"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(nodeLevel2Id).arg(expectedNodeText).arg(nodeText)); + + childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, nodeLevel2Id); + expectedChildrenCount = 1; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, QString("There is an unexpected children count of node with ID '%1': expected %2, got %3") + .arg(nodeLevel2Id).arg(expectedChildrenCount).arg(childrenCount)); + + // root / Align with ClustalO / Align with ClustalW run 2 / ClustalW run + nodeLevel3Id = GTUtilsDashboard::getChildNodeId(os, nodeLevel2Id, 0); + nodeText = GTUtilsDashboard::getNodeText(os, nodeLevel3Id); + expectedNodeText = "ClustalW run "; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(nodeLevel3Id).arg(expectedNodeText).arg(nodeText)); +} + +GUI_TEST_CLASS_DEFINITION(misc_test_0005) { + os.setError("Not implemented"); +} + +GUI_TEST_CLASS_DEFINITION(tree_nodes_creation_test_0001) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Ensure that taxonomy data is set. It should be full enough to pass the kraken-build validator. + // Currently, it is impossible to set taxonomy data after UGENE launch: UGENE-5979 + // Test should be updated. + +// 2. Set the "_common_data/workflow/dashboard/fake_tools/fake_kraken-build" as "kraken-build" external tool in the "Application Settings". + const QString krakenBuildToolName = "kraken-build"; + const QString krakenBuildToolPath = QDir::toNativeSeparators(QFileInfo(testDir + "_common_data/workflow/dashboard/fake_tools/fake_kraken-build").absoluteFilePath()); + GTUtilsExternalTools::setToolUrl(os, krakenBuildToolName, krakenBuildToolPath); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Open "_common_data/workflow/dashboard/2_kraken-builds.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/2_kraken-builds.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 4. Click "Build Kraken Database" element. + GTUtilsWorkflowDesigner::click(os, "Build Kraken Database"); + +// 5. Set "Database" attribute value to tree_nodes_creation_test_0001_db1". + const QString db1Url = QFileInfo(sandBoxDir + "tree_nodes_creation_test_0001_db1").absoluteFilePath(); + QDir().mkpath(db1Url); + GTUtilsWorkflowDesigner::setParameter(os, "Database", db1Url, GTUtilsWorkflowDesigner::textValue); + +// 6. Click the "..." button in the "Genomic library" attribute value field. +// Expected result: "Select Genomes for Kraken Database" dialog appeared. +// 7. Add "data/samples/FASTA/human_T1.fa", "_common_data/fasta/COI2.fa", "_common_data/fasta/DNA.fa" files to the dataset in the dialog. +// 8. Click the "Select" button in the dialog. + QStringList urls = { QFileInfo(dataDir + "samples/FASTA/human_T1.fa").absoluteFilePath(), + QFileInfo(testDir + "_common_data/fasta/COI2.fa").absoluteFilePath(), + QFileInfo(testDir + "_common_data/fasta/DNA.fa").absoluteFilePath() }; + GTUtilsDialog::waitForDialog(os, new GenomicLibraryDialogFiller(os, urls)); + GTUtilsWorkflowDesigner::setParameter(os, "Genomic library", QVariant(), GTUtilsWorkflowDesigner::customDialogSelector); + +// 9. Click "Build Kraken Database 1" element. + GTUtilsWorkflowDesigner::click(os, "Build Kraken Database 1"); + +// 10. Set "Database" attribute value to tree_nodes_creation_test_0001_db2". + const QString db2Url = QFileInfo(sandBoxDir + "tree_nodes_creation_test_0001_db2").absoluteFilePath(); + QDir().mkpath(db2Url); + GTUtilsWorkflowDesigner::setParameter(os, "Database", db2Url, GTUtilsWorkflowDesigner::textValue); + +// 11. Click the "..." button in the "Genomic library" attribute value field. +// Expected result: "Select Genomes for Kraken Database" dialog appeared. +// 12. Add "data/samples/FASTA/human_T1.fa", "_common_data/fasta/COI2.fa" files to the dataset in the dialog. +// 13. Click the "Select" button in the dialog. + urls.removeLast(); + GTUtilsDialog::waitForDialog(os, new GenomicLibraryDialogFiller(os, urls)); + GTUtilsWorkflowDesigner::setParameter(os, "Genomic library", QVariant(), GTUtilsWorkflowDesigner::customDialogSelector); + +// 14. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 15. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 16. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// Expected result: +// The tree looks like: +// ----------- +// Build Kraken Database +// â””Build Kraken Database run 1 +// ├kraken-build run 1 +// ├kraken-build run 2 +// ├kraken-build run 3 +// â””Messages limit on the dashboard exceeded. See log files, if required. +// Build Kraken Database 1 +// â””Build Kraken Database 1 run 1 +// ├kraken-build run 1 +// ├kraken-build run 2 +// â””kraken-build run 3 +// ----------- +// "log files" in a message is a link to a dir with tools execution logs. + + QMap<QString, QList<QPair<QString, QStringList> > > expectedNodesTexts; + expectedNodesTexts.insert("Build Kraken Database", { qMakePair(QString("Build Kraken Database run 1"), + QStringList({ "kraken-build run 1 ", + "kraken-build run 2 ", + "kraken-build run 3 " })) }); + expectedNodesTexts.insert("Build Kraken Database 1", { qMakePair(QString("Build Kraken Database 1 run 1"), + QStringList({ "kraken-build run 1 ", + "kraken-build run 2 ", + "kraken-build run 3 " })) }); + checkTreeStructure(os, expectedNodesTexts); + + const QString elementNodeId = GTUtilsDashboard::getChildWithTextId(os, GTUtilsDashboard::TREE_ROOT_ID, "Build Kraken Database"); + const QString elementTickNodeId = GTUtilsDashboard::getChildNodeId(os, elementNodeId, 0); + const bool limitationMessageNodeExists = GTUtilsDashboard::doesNodeHaveLimitationMessageNode(os, elementTickNodeId); + CHECK_SET_ERR(limitationMessageNodeExists, QString("Message node unexpectedly not found, parent node ID: '%1'").arg(elementTickNodeId)); + + const QString messageNodeText = GTUtilsDashboard::getLimitationMessageNodeText(os, elementTickNodeId); + const QString expectedMessageNodeText = "Messages limit on the dashboard exceeded. See log files, if required."; + CHECK_SET_ERR(expectedMessageNodeText == messageNodeText, + QString("Unexpected message node text: expected '%1', got '%2'; parent node ID: '%3'") + .arg(expectedMessageNodeText).arg(messageNodeText).arg(elementTickNodeId)); + + const QString logUrl = GTUtilsDashboard::getLimitationMessageLogUrl(os, elementTickNodeId); + + const QFileInfo fileInfo(logUrl); + CHECK_SET_ERR(fileInfo.exists(), QString("Dir with URL '%1' doesn't exist").arg(logUrl)); + CHECK_SET_ERR(fileInfo.isDir(), QString("Entry with URL '%1' is not a dir").arg(logUrl)); + CHECK_SET_ERR(!QDir(logUrl).entryList(QDir::Files).isEmpty(), QString("Dir with URL '%1' doesn't contain log files").arg(logUrl)); +} + +GUI_TEST_CLASS_DEFINITION(tree_nodes_creation_test_0002) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Set the "_common_data/workflow/dashboard/fake_tools/fake_cutadapt.py" as "cutadapt" external tool in the "Application Settings". + const QString cutadaptToolName = "cutadapt"; + const QString cutadaptToolPath = QDir::toNativeSeparators(QFileInfo(testDir + "_common_data/workflow/dashboard/fake_tools/fake_cutadapt.py").absoluteFilePath()); + GTUtilsExternalTools::setToolUrl(os, cutadaptToolName, cutadaptToolPath); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 2. Open "_common_data/workflow/dashboard/cutadapt.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/cutadapt.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Click "Read File URL(s)" element. + GTUtilsWorkflowDesigner::click(os, "Read File URL(s)"); + +// 4. Add "data/samples/FASTQ/eas.fastq" file 100 times to "Dataset 1" dataset. + const QString inputDir = QFileInfo(sandBoxDir + "tree_nodes_creation_test_0002_input").absoluteFilePath(); + QDir().mkpath(inputDir); + for (int i = 0; i < 100; i++) { + GTFile::copy(os, dataDir + "samples/FASTQ/eas.fastq", inputDir + "/" + QString("eas_%2.fastq").arg(i)); + } + GTUtilsWorkflowDesigner::setDatasetInputFolder(os, inputDir); + +// 5. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 6. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 7. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// Expected result: +// The tree looks like: +// ----------- +// Cut Adapter +// ├Cut Adapter run 1 +// |â””cutadapt run +// ├Cut Adapter run 2 +// |â””cutadapt run +// ... +// â””Cut Adapter run 100 +// â””cutadapt run + QMap<QString, QList<QPair<QString, QStringList> > > expectedNodesTexts; + QList<QPair<QString, QStringList> > secondLevelNodes; + for (int i = 1; i < 101; i++) { + secondLevelNodes << qMakePair(QString("Cut Adapter run %1").arg(i), QStringList({ "cutadapt run " })); + } + expectedNodesTexts.insert("Cut Adapter", secondLevelNodes); + checkTreeStructure(os, expectedNodesTexts); +} + +GUI_TEST_CLASS_DEFINITION(tree_nodes_creation_test_0003) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Set the "_common_data/workflow/dashboard/fake_tools/fake_cutadapt.py" as "cutadapt" external tool in the "Application Settings". + const QString cutadaptToolName = "cutadapt"; + const QString cutadaptToolPath = QDir::toNativeSeparators(QFileInfo(testDir + "_common_data/workflow/dashboard/fake_tools/fake_cutadapt.py").absoluteFilePath()); + GTUtilsExternalTools::setToolUrl(os, cutadaptToolName, cutadaptToolPath); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 2. Open "_common_data/workflow/dashboard/50_cutadapts.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/50_cutadapts.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Click "Read File URL(s)" element. + GTUtilsWorkflowDesigner::click(os, "Read File URL(s)"); + +// 4. Add "_common_data/fastq/eas.fastq" and "_common_data/fastq/eas_broken.fastq" files to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFiles(os, { testDir + "_common_data/fastq/eas.fastq", testDir + "_common_data/fastq/eas_broken.fastq" }); + +// 5. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 6. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 7. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// Expected result: +// The tree looks like (note, that the elements order is not fixed): +// ----------- +// Cut Adapter 1 +// ├Cut Adapter 1 run 1 +// |â””cutadapt run +// â””Cut Adapter 1 run 2 +// â””cutadapt run +// Cut Adapter 2 +// ├Cut Adapter 2 run 1 +// |â””cutadapt run +// â””Cut Adapter 2 run 2 +// â””cutadapt run +// ... +// Cut Adapter 50 +// ├Cut Adapter 50 run 1 +// |â””cutadapt run +// â””Cut Adapter 50 run 2 +// â””cutadapt run + QMap<QString, QList<QPair<QString, QStringList> > > expectedNodesTexts; + QList<QPair<QString, QStringList> > secondLevelNodes; + for (int i = 1; i < 51; i++) { + expectedNodesTexts.insert(QString("Cut Adapter %1").arg(i), { qMakePair(QString("Cut Adapter %1 run 1").arg(i), QStringList({ "cutadapt run " })), + qMakePair(QString("Cut Adapter %1 run 2").arg(i), QStringList({ "cutadapt run " })) }); + } + checkTreeStructure(os, expectedNodesTexts); +} + +GUI_TEST_CLASS_DEFINITION(tree_nodes_creation_test_0004) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Set the "_common_data/workflow/dashboard/fake_tools/fake_cutadapt.py" as "cutadapt" external tool in the "Application Settings". + const QString cutadaptToolName = "cutadapt"; + const QString cutadaptToolPath = QDir::toNativeSeparators(QFileInfo(testDir + "_common_data/workflow/dashboard/fake_tools/fake_cutadapt.py").absoluteFilePath()); + GTUtilsExternalTools::setToolUrl(os, cutadaptToolName, cutadaptToolPath); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 2. Open "_common_data/workflow/dashboard/101_cutadapts.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/101_cutadapts.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Click "Read File URL(s)" element. + GTUtilsWorkflowDesigner::click(os, "Read File URL(s)"); + +// 4. Add "data/samples/FASTQ/eas.fastq" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/FASTQ/eas.fastq", true); + +// 5. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 6. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 7. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// Expected result: +// The tree looks like (note, that the elements order is not fixed): +// ----------- +// Cut Adapter 1 +// â””Cut Adapter 1 run 1 +// â””cutadapt run +// Cut Adapter 2 +// â””Cut Adapter 2 run 1 +// â””cutadapt run +// ... +// Cut Adapter 101 +// â””Cut Adapter 101 run 1 +// â””cutadapt run +// Messages limit on the dashboard exceeded. See log files, if required. +// ----------- +// "log files" in a message is a link to a dir with tools execution logs. + QMap<QString, QList<QPair<QString, QStringList> > > expectedNodesTexts; + QList<QPair<QString, QStringList> > secondLevelNodes; + for (int i = 1; i < 101; i++) { + expectedNodesTexts.insert(QString("Cut Adapter %1").arg(i), { qMakePair(QString("Cut Adapter %1 run 1").arg(i), QStringList({ "cutadapt run " })) }); + } + expectedNodesTexts.insert(QString("Cut Adapter 101"), { qMakePair(QString("Cut Adapter 101 run 1"), QStringList()) }); + checkTreeStructure(os, expectedNodesTexts); + + const bool limitationMessageNodeExists = GTUtilsDashboard::doesNodeHaveLimitationMessageNode(os, GTUtilsDashboard::TREE_ROOT_ID); + CHECK_SET_ERR(limitationMessageNodeExists, QString("Message node unexpectedly not found, parent node ID: '%1'").arg(GTUtilsDashboard::TREE_ROOT_ID)); + + const QString messageNodeText = GTUtilsDashboard::getLimitationMessageNodeText(os, GTUtilsDashboard::TREE_ROOT_ID); + const QString expectedMessageNodeText = "Messages limit on the dashboard exceeded. See log files, if required."; + CHECK_SET_ERR(expectedMessageNodeText == messageNodeText, + QString("Unexpected message node text: expected '%1', got '%2'; parent node ID: '%3'") + .arg(expectedMessageNodeText).arg(messageNodeText).arg(GTUtilsDashboard::TREE_ROOT_ID)); + + const QString logUrl = GTUtilsDashboard::getLimitationMessageLogUrl(os, GTUtilsDashboard::TREE_ROOT_ID); + + const QFileInfo fileInfo(logUrl); + CHECK_SET_ERR(fileInfo.exists(), QString("Dir with URL '%1' doesn't exist").arg(logUrl)); + CHECK_SET_ERR(fileInfo.isDir(), QString("Entry with URL '%1' is not a dir").arg(logUrl)); + CHECK_SET_ERR(!QDir(logUrl).entryList(QDir::Files).isEmpty(), QString("Dir with URL '%1' doesn't contain log files").arg(logUrl)); +} + +GUI_TEST_CLASS_DEFINITION(tool_launch_nodes_test_0001) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Open "_common_data/workflow/dashboard/clustulo_clustalw.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/clustulo_clustalw.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 2. Click "Read Alignment" element. + GTUtilsWorkflowDesigner::click(os, "Read Alignment"); + +// 3. Add "data/samples/CLUSTALW/COI.aln" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/CLUSTALW/COI.aln", true); + +// 4. Launch the workflow. + GTLogTracer logTracer; + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 5. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 6. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// Expected result: +// the third-level node "ClustalO run" has a button to copy the command. The icon size is greater than 10x10 pixels. +// the third-level node "ClustalW run" has a button to copy the command. The icon size is greater than 10x10 pixels. + const QString clustaloRunNodeId = GTUtilsDashboard::getDescendantNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, { 0, 0, 0 }); + QSize copyButtonSize = GTUtilsDashboard::getCopyButtonSize(os, clustaloRunNodeId); + QSize minimumCopyButtonSize(10, 10); + + CHECK_SET_ERR(minimumCopyButtonSize.width() <= copyButtonSize.width(), + QString("Copy button width of node with ID '%1' is less than %2 pixels: it's width is %3 pixels") + .arg(clustaloRunNodeId).arg(minimumCopyButtonSize.width()).arg(copyButtonSize.width())); + CHECK_SET_ERR(minimumCopyButtonSize.height() <= copyButtonSize.height(), + QString("Copy button height of node with ID '%1' is less than %2 pixels: it's height is %3 pixels") + .arg(clustaloRunNodeId).arg(minimumCopyButtonSize.height()).arg(copyButtonSize.height())); + + const QString clustalwRunNodeId = GTUtilsDashboard::getDescendantNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, { 1, 0, 0 }); + copyButtonSize = GTUtilsDashboard::getCopyButtonSize(os, clustalwRunNodeId); + + CHECK_SET_ERR(minimumCopyButtonSize.width() <= copyButtonSize.width(), + QString("Copy button width of node with ID '%1' is less than %2 pixels: it's width is %3 pixels") + .arg(clustalwRunNodeId).arg(minimumCopyButtonSize.width()).arg(copyButtonSize.width())); + CHECK_SET_ERR(minimumCopyButtonSize.height() <= copyButtonSize.height(), + QString("Copy button height of node with ID '%1' is less than %2 pixels: it's height is %3 pixels") + .arg(clustalwRunNodeId).arg(minimumCopyButtonSize.height()).arg(copyButtonSize.height())); + +// 7. Expand the third-level node "ClustalO run". + GTUtilsDashboard::expandNode(os, clustaloRunNodeId); + GTGlobals::sleep(500); + +// Expected result: +// the third-level node "ClustalO run" has a child node "Command". +// the "Command" node has a child node with the command that was used to launch the "ClustalO" external tool. +// log contains the command that is on the dashboard. + const QString clustaloRunCommandNodeId = GTUtilsDashboard::getChildNodeId(os, clustaloRunNodeId, 0); + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, clustaloRunCommandNodeId), + QString("Node with ID '%1' is invisible after parent node expanding") + .arg(clustaloRunCommandNodeId)); + + QString nodeText = GTUtilsDashboard::getNodeText(os, clustaloRunCommandNodeId); + QString expectedNodeText = "Command"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(clustaloRunCommandNodeId).arg(expectedNodeText).arg(nodeText)); + + const QString clustaloRunCommandContentNodeId = GTUtilsDashboard::getChildNodeId(os, clustaloRunCommandNodeId, 0); + nodeText = GTUtilsDashboard::getNodeText(os, clustaloRunCommandContentNodeId); + QString expectedNodeTextPart = "clustalo"; + CHECK_SET_ERR(nodeText.contains(expectedNodeTextPart), + QString("Tool run command doesn't contain the following expected part: '%1'. Full command: '%2'") + .arg(expectedNodeText).arg(nodeText)); + CHECK_SET_ERR(logTracer.checkMessage(nodeText), QString("Log doesn't contain the following expected message: '%1'").arg(nodeText)); + +// 8. Click to the "Copy command" button that is in the third-level node "ClustalO run". + GTUtilsDashboard::clickCopyButton(os, clustaloRunNodeId); + GTGlobals::sleep(500); + +// Expected result: the clipboard contains the same command as the child of "Command" node that belongs to "ClustalO run" does. + QString clipboardData = GTClipboard::text(os); + CHECK_SET_ERR(clipboardData == nodeText, + QString("Clipboard data is not the same as 'Command' node text: clipboard data is '%1', node text is '%2'") + .arg(clipboardData).arg(nodeText)); + +// 9. Expand the third-level node "ClustalW run". + GTUtilsDashboard::collapseNode(os, clustaloRunNodeId); + GTUtilsDashboard::expandNode(os, clustalwRunNodeId); + +// Expected result: +// the third-level node "ClustalW run" has a child node "Command". +// the "Command" node has a child node with the command that was used to launch the "ClustalW" external tool. +// log contains the command that is on the dashboard. + const QString clustalwRunCommandNodeId = GTUtilsDashboard::getChildNodeId(os, clustalwRunNodeId, 0); + GTGlobals::sleep(500); + + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, clustalwRunCommandNodeId), + QString("Node with ID '%1' is invisible after parent node expanding") + .arg(clustalwRunCommandNodeId)); + + nodeText = GTUtilsDashboard::getNodeText(os, clustalwRunCommandNodeId); + expectedNodeText = "Command"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(clustalwRunCommandNodeId).arg(expectedNodeText).arg(nodeText)); + + const QString clustalwRunCommandContentNodeId = GTUtilsDashboard::getChildNodeId(os, clustalwRunCommandNodeId, 0); + nodeText = GTUtilsDashboard::getNodeText(os, clustalwRunCommandContentNodeId); + expectedNodeTextPart = "clustalw"; + CHECK_SET_ERR(nodeText.contains(expectedNodeTextPart), + QString("Tool run command doesn't contain the following expected part: '%1'. Full command: '%2'") + .arg(expectedNodeText).arg(nodeText)); + CHECK_SET_ERR(logTracer.checkMessage(nodeText), QString("Log doesn't contain the following expected message: '%1'").arg(nodeText)); + +// 10. Click to the "Copy command" button that is in the third-level node "ClustalW run". + GTUtilsDashboard::clickCopyButton(os, clustalwRunNodeId); + GTGlobals::sleep(500); + +// Expected result: the clipboard contains the same command as the child of "Command" node that belongs to "ClustalW run" does. + clipboardData = GTClipboard::text(os); + CHECK_SET_ERR(clipboardData == nodeText, + QString("Clipboard data is not the same as 'Command' node text: clipboard data is '%1', node text is '%2'") + .arg(clipboardData).arg(nodeText)); +} + +GUI_TEST_CLASS_DEFINITION(tool_launch_nodes_test_0002) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Ensure that "ClustalO" tool doesn't contain spaces in its paths. + const QString toolName = "ClustalO"; + QString toolPath = getExternalToolPath(os, toolName); + if (toolPath.contains(" ")) { + const QString newToolPath = putToolToFolderWithoutSpaces(os, toolName, getExternalToolDirPath(os, toolName, "clustalo"), sandBoxDir); + GTUtilsExternalTools::setToolUrl(os, toolName, QDir::toNativeSeparators(newToolPath)); + + GTUtilsTaskTreeView::waitTaskFinished(os); + toolPath = getExternalToolPath(os, toolName); + CHECK_SET_ERR(QDir::toNativeSeparators(toolPath) == QDir::toNativeSeparators(newToolPath), + QString("'%1' tool path wasn't set properly: expected '%2', got '%3'") + .arg(toolName).arg(newToolPath).arg(toolPath)); + } + +// 2. Open "_common_data/workflow/dashboard/clustulo.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/clustulo.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Click "Read Alignment" element. + GTUtilsWorkflowDesigner::click(os, "Read Alignment"); + +// 4. Add "data/samples/CLUSTALW/COI.aln" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/CLUSTALW/COI.aln", true); + +// 5. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 6. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 7. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// 8. Expand the third-level node "ClustalO run". + const QString clustaloRunNodeId = GTUtilsDashboard::getDescendantNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, { 0, 0, 0 }); + GTUtilsDashboard::expandNode(os, clustaloRunNodeId); + +// Expected result: the third-level node "ClustalO run" has a child node "Command", which has a child node with the command. The first argument in the command is the path to the "ClustalO" that was set at the beginning, the path is not wrapped with double quotes. + const QString clustaloRunCommandNodeId = GTUtilsDashboard::getChildNodeId(os, clustaloRunNodeId, 0); + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, clustaloRunCommandNodeId), + QString("Node with ID '%1' is invisible after parent node expanding") + .arg(clustaloRunCommandNodeId)); + + QString nodeText = GTUtilsDashboard::getNodeText(os, clustaloRunCommandNodeId); + QString expectedNodeText = "Command"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(clustaloRunCommandNodeId).arg(expectedNodeText).arg(nodeText)); + + const QString clustaloRunCommandContentNodeId = GTUtilsDashboard::getChildNodeId(os, clustaloRunCommandNodeId, 0); + nodeText = GTUtilsDashboard::getNodeText(os, clustaloRunCommandContentNodeId); + const QString expectedNodeTextPart = QString("%1 ").arg(toolPath); + CHECK_SET_ERR(nodeText.startsWith(expectedNodeTextPart), + QString("Tool run command doesn't start with the following expected part: '%1'. Full command: '%2'") + .arg(expectedNodeTextPart).arg(nodeText)); +} + +GUI_TEST_CLASS_DEFINITION(tool_launch_nodes_test_0003) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Copy external tool "ClustalO" to a folder with spaces in its path. +// 2. Set the copied "ClustalO" in the "Application Settings". + const QString toolName = "ClustalO"; + QString toolPath = getExternalToolPath(os, toolName); + if (!toolPath.contains(" ")) { + const QString newToolPath = putToolToFolderWithSpaces(os, toolName, getExternalToolDirPath(os, toolName, "clustalo"), sandBoxDir); + GTUtilsExternalTools::setToolUrl(os, toolName, QDir::toNativeSeparators(newToolPath)); + + GTUtilsTaskTreeView::waitTaskFinished(os); + toolPath = getExternalToolPath(os, toolName); + CHECK_SET_ERR(QDir::toNativeSeparators(toolPath) == QDir::toNativeSeparators(newToolPath), + QString("'%1' tool path wasn't set properly: expected '%2', got '%3'") + .arg(toolName).arg(newToolPath).arg(toolPath)); + } + +// 3. Open "_common_data/workflow/dashboard/clustulo.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/clustulo.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 4. Click "Read Alignment" element. + GTUtilsWorkflowDesigner::click(os, "Read Alignment"); + +// 5. Add "data/samples/CLUSTALW/COI.aln" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/CLUSTALW/COI.aln", true); + +// 6. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 7. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 8. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// 9. Expand the third-level node "ClustalO run". + const QString clustaloRunNodeId = GTUtilsDashboard::getDescendantNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, { 0, 0, 0 }); + GTUtilsDashboard::expandNode(os, clustaloRunNodeId); + +// Expected result: the third-level node "ClustalO run" has a child node "Command", which has a child node with the command. The first argument in the command is the path to the "ClustalO" that was set at the beginning, the path is wrapped with double quotes. + const QString clustaloRunCommandNodeId = GTUtilsDashboard::getChildNodeId(os, clustaloRunNodeId, 0); + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, clustaloRunCommandNodeId), + QString("Node with ID '%1' is invisible after parent node expanding") + .arg(clustaloRunCommandNodeId)); + + QString nodeText = GTUtilsDashboard::getNodeText(os, clustaloRunCommandNodeId); + QString expectedNodeText = "Command"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(clustaloRunCommandNodeId).arg(expectedNodeText).arg(nodeText)); + + const QString clustaloRunCommandContentNodeId = GTUtilsDashboard::getChildNodeId(os, clustaloRunCommandNodeId, 0); + nodeText = GTUtilsDashboard::getNodeText(os, clustaloRunCommandContentNodeId); + const QString expectedNodeTextPart = QString("\"%1\" ").arg(toolPath); + CHECK_SET_ERR(nodeText.startsWith(expectedNodeTextPart), + QString("Tool run command doesn't start with the following expected part: '%1'. Full command: '%2'") + .arg(expectedNodeTextPart).arg(nodeText)); +} + +GUI_TEST_CLASS_DEFINITION(tool_launch_nodes_test_0004) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Ensure that neither "python" nor "cutadapt" contain spaces in their paths. + const QString pythonToolName = "python"; + QString pythonToolPath = getExternalToolPath(os, pythonToolName); + if (pythonToolPath.contains(" ")) { + const QString newToolPath = putToolToFolderWithSpaces(os, pythonToolName, getExternalToolDirPath(os, pythonToolName, "python"), sandBoxDir); + GTUtilsExternalTools::setToolUrl(os, pythonToolName, QDir::toNativeSeparators(newToolPath)); + + GTUtilsTaskTreeView::waitTaskFinished(os); + pythonToolPath = getExternalToolPath(os, pythonToolName); + CHECK_SET_ERR(QDir::toNativeSeparators(pythonToolPath) == QDir::toNativeSeparators(newToolPath), + QString("'%1' tool path wasn't set properly: expected '%2', got '%3'") + .arg(pythonToolName).arg(newToolPath).arg(pythonToolPath)); + } + + const QString cutadaptToolName = "cutadapt"; + QString cutadaptToolPath = getExternalToolPath(os, cutadaptToolName); + if (cutadaptToolPath.contains(" ")) { + const QString newToolPath = putToolToFolderWithSpaces(os, cutadaptToolName, getExternalToolDirPath(os, cutadaptToolName, "cutadapt"), sandBoxDir); + GTUtilsExternalTools::setToolUrl(os, cutadaptToolName, QDir::toNativeSeparators(newToolPath)); + + GTUtilsTaskTreeView::waitTaskFinished(os); + cutadaptToolPath = getExternalToolPath(os, cutadaptToolName); + CHECK_SET_ERR(QDir::toNativeSeparators(cutadaptToolPath) == QDir::toNativeSeparators(newToolPath), + QString("'%1' tool path wasn't set properly: expected '%2', got '%3'") + .arg(cutadaptToolName).arg(newToolPath).arg(cutadaptToolPath)); + } + +// 1. Open "_common_data/workflow/dashboard/cutadapt.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/cutadapt.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 2. Click "Read File URL(s)" element. + GTUtilsWorkflowDesigner::click(os, "Read File URL(s)"); + +// 3. Add "data/samples/FASTQ/eas.fastq" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/FASTQ/eas.fastq", true); + +// 4. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 5. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 6. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// 7. Expand the third-level node "cutadapt run". + const QString cutadaptRunNodeId = GTUtilsDashboard::getDescendantNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, { 0, 0, 0 }); + GTUtilsDashboard::expandNode(os, cutadaptRunNodeId); + +// Expected result: the third-level node "cutadapt run" has a child node "Command", which has a child node with the command. The first argument in the command is the path to the "python", the second argument in the command is the path to "cutadapt". Neither the first nor the second argument is wrapped with double quotes. + const QString cutadaptRunCommandNodeId = GTUtilsDashboard::getChildNodeId(os, cutadaptRunNodeId, 0); + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, cutadaptRunCommandNodeId), + QString("Node with ID '%1' is invisible after parent node expanding") + .arg(cutadaptRunCommandNodeId)); + + QString nodeText = GTUtilsDashboard::getNodeText(os, cutadaptRunCommandNodeId); + QString expectedNodeText = "Command"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(cutadaptRunCommandNodeId).arg(expectedNodeText).arg(nodeText)); + + const QString cutadaptRunCommandContentNodeId = GTUtilsDashboard::getChildNodeId(os, cutadaptRunCommandNodeId, 0); + nodeText = GTUtilsDashboard::getNodeText(os, cutadaptRunCommandContentNodeId); + const QString expectedNodeTextPart = QString("%1 %2 ").arg(pythonToolPath).arg(cutadaptToolPath); + CHECK_SET_ERR(nodeText.startsWith(expectedNodeTextPart), + QString("Tool run command doesn't start with the following expected part: '%1'. Full command: '%2'") + .arg(expectedNodeTextPart).arg(nodeText)); +} + +GUI_TEST_CLASS_DEFINITION(tool_launch_nodes_test_0005) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Copy external tool "python" to a folder with spaces in its path. +// 2. Set the copied "python" in the "Application Settings". + const QString pythonToolName = "python"; + QString pythonToolPath = getExternalToolPath(os, pythonToolName); + if (!pythonToolPath.contains(" ")) { + const QString newToolPath = putToolToFolderWithSpaces(os, pythonToolName, getExternalToolDirPath(os, pythonToolName, "python"), sandBoxDir); + GTUtilsExternalTools::setToolUrl(os, pythonToolName, QDir::toNativeSeparators(newToolPath)); + + GTUtilsTaskTreeView::waitTaskFinished(os); + pythonToolPath = getExternalToolPath(os, pythonToolName); + CHECK_SET_ERR(QDir::toNativeSeparators(pythonToolPath) == QDir::toNativeSeparators(newToolPath), + QString("'%1' tool path wasn't set properly: expected '%2', got '%3'") + .arg(pythonToolName).arg(newToolPath).arg(pythonToolPath)); + } + +// 3. Open "_common_data/workflow/dashboard/cutadapt.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/cutadapt.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 4. Click "Read File URL(s)" element. + GTUtilsWorkflowDesigner::click(os, "Read File URL(s)"); + +// 5. Add "data/samples/FASTQ/eas.fastq" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/FASTQ/eas.fastq", true); + +// 6. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 7. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 8. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// 9. Expand the third-level node "cutadapt run". + const QString cutadaptRunNodeId = GTUtilsDashboard::getDescendantNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, { 0, 0, 0 }); + GTUtilsDashboard::expandNode(os, cutadaptRunNodeId); + +// Expected result: the third-level node "cutadapt run" has a child node "Command", which has a child node with the command. The first argument in the command is the path to the "python" that was set at the beginning, the path is wrapped with double quotes. + const QString cutadaptRunCommandNodeId = GTUtilsDashboard::getChildNodeId(os, cutadaptRunNodeId, 0); + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, cutadaptRunCommandNodeId), + QString("Node with ID '%1' is invisible after parent node expanding") + .arg(cutadaptRunCommandNodeId)); + + QString nodeText = GTUtilsDashboard::getNodeText(os, cutadaptRunCommandNodeId); + QString expectedNodeText = "Command"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(cutadaptRunCommandNodeId).arg(expectedNodeText).arg(nodeText)); + + const QString cutadaptRunCommandContentNodeId = GTUtilsDashboard::getChildNodeId(os, cutadaptRunCommandNodeId, 0); + nodeText = GTUtilsDashboard::getNodeText(os, cutadaptRunCommandContentNodeId); + const QString expectedNodeTextPart = QString("\"%1\" ").arg(pythonToolPath); + CHECK_SET_ERR(nodeText.startsWith(expectedNodeTextPart), + QString("Tool run command doesn't start with the following expected part: '%1'. Full command: '%2'") + .arg(expectedNodeTextPart).arg(nodeText)); +} + +GUI_TEST_CLASS_DEFINITION(tool_launch_nodes_test_0006) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Copy external tool "cutadapt" to a folder with spaces in its path. +// 2. Set the copied "cutadapt" in the "Application Settings". + const QString cutadaptToolName = "cutadapt"; + QString cutadaptToolPath = getExternalToolPath(os, cutadaptToolName); + if (!cutadaptToolPath.contains(" ")) { + const QString newToolPath = putToolToFolderWithSpaces(os, cutadaptToolName, getExternalToolDirPath(os, cutadaptToolName, "cutadapt"), sandBoxDir); + GTUtilsExternalTools::setToolUrl(os, cutadaptToolName, QDir::toNativeSeparators(newToolPath)); + + GTUtilsTaskTreeView::waitTaskFinished(os); + cutadaptToolPath = getExternalToolPath(os, cutadaptToolName); + CHECK_SET_ERR(QDir::toNativeSeparators(cutadaptToolPath) == QDir::toNativeSeparators(newToolPath), + QString("'%1' tool path wasn't set properly: expected '%2', got '%3'") + .arg(cutadaptToolName).arg(newToolPath).arg(cutadaptToolPath)); + } + +// 3. Open "_common_data/workflow/dashboard/cutadapt.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/cutadapt.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 4. Click "Read File URL(s)" element. + GTUtilsWorkflowDesigner::click(os, "Read File URL(s)"); + +// 5. Add "data/samples/FASTQ/eas.fastq" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/FASTQ/eas.fastq", true); + +// 6. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 7. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 8. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// 9. Expand the third-level node "cutadapt run". + const QString cutadaptRunNodeId = GTUtilsDashboard::getDescendantNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, { 0, 0, 0 }); + GTUtilsDashboard::expandNode(os, cutadaptRunNodeId); + +// Expected result: the third-level node "cutadapt run" has a child node "Command", which has a child node with the command. The second argument in the command is the path to the "cutadapt" that was set at the beginning, the path is wrapped with double quotesos.setError("Not implemented"); + const QString cutadaptRunCommandNodeId = GTUtilsDashboard::getChildNodeId(os, cutadaptRunNodeId, 0); + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, cutadaptRunCommandNodeId), + QString("Node with ID '%1' is invisible after parent node expanding") + .arg(cutadaptRunCommandNodeId)); + + QString nodeText = GTUtilsDashboard::getNodeText(os, cutadaptRunCommandNodeId); + QString expectedNodeText = "Command"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(cutadaptRunCommandNodeId).arg(expectedNodeText).arg(nodeText)); + + const QString cutadaptRunCommandContentNodeId = GTUtilsDashboard::getChildNodeId(os, cutadaptRunCommandNodeId, 0); + nodeText = GTUtilsDashboard::getNodeText(os, cutadaptRunCommandContentNodeId); + const QString expectedNodeTextPart = QString("\"%1\" ").arg(cutadaptToolPath); + CHECK_SET_ERR(nodeText.contains(expectedNodeTextPart), + QString("Tool run command doesn't contain the following expected part: '%1'. Full command: '%2'") + .arg(expectedNodeTextPart).arg(nodeText)); +} + +GUI_TEST_CLASS_DEFINITION(tool_launch_nodes_test_0007) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Copy external tool "python" to a folder with spaces in its path. +// 2. Copy external tool "cutadapt" to a folder with spaces in its path. +// 3. Set the copied "python" in the "Application Settings". +// 4. Set the copied "cutadapt" in the "Application Settings". + const QString pythonToolName = "python"; + QString pythonToolPath = getExternalToolPath(os, pythonToolName); + if (!pythonToolPath.contains(" ")) { + const QString newToolPath = putToolToFolderWithSpaces(os, pythonToolName, getExternalToolDirPath(os, pythonToolName, "python"), sandBoxDir); + GTUtilsExternalTools::setToolUrl(os, pythonToolName, QDir::toNativeSeparators(newToolPath)); + + GTUtilsTaskTreeView::waitTaskFinished(os); + pythonToolPath = getExternalToolPath(os, pythonToolName); + CHECK_SET_ERR(QDir::toNativeSeparators(pythonToolPath) == QDir::toNativeSeparators(newToolPath), + QString("'%1' tool path wasn't set properly: expected '%2', got '%3'") + .arg(pythonToolName).arg(newToolPath).arg(pythonToolPath)); + } + + const QString cutadaptToolName = "cutadapt"; + QString cutadaptToolPath = getExternalToolPath(os, cutadaptToolName); + if (!cutadaptToolPath.contains(" ")) { + const QString newToolPath = putToolToFolderWithSpaces(os, cutadaptToolName, getExternalToolDirPath(os, cutadaptToolName, "cutadapt"), sandBoxDir); + GTUtilsExternalTools::setToolUrl(os, cutadaptToolName, QDir::toNativeSeparators(newToolPath)); + + GTUtilsTaskTreeView::waitTaskFinished(os); + cutadaptToolPath = getExternalToolPath(os, cutadaptToolName); + CHECK_SET_ERR(QDir::toNativeSeparators(cutadaptToolPath) == QDir::toNativeSeparators(newToolPath), + QString("'%1' tool path wasn't set properly: expected '%2', got '%3'") + .arg(cutadaptToolName).arg(newToolPath).arg(cutadaptToolPath)); + } + +// 5. Open "_common_data/workflow/dashboard/cutadapt.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/cutadapt.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 6. Click "Read File URL(s)" element. + GTUtilsWorkflowDesigner::click(os, "Read File URL(s)"); + +// 7. Add "data/samples/FASTQ/eas.fastq" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/FASTQ/eas.fastq", true); + +// 8. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 9. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 10. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// 11. Expand the third-level node "cutadapt run". + const QString cutadaptRunNodeId = GTUtilsDashboard::getDescendantNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, { 0, 0, 0 }); + GTUtilsDashboard::expandNode(os, cutadaptRunNodeId); + +// Expected result: the third-level node "cutadapt run" has a child node "Command", which has a child node with the command. The first argument in the command is the path to the "python", the second argument in the command is the path to the "cutadapt". Both of them are wrapped with double quotes. + const QString cutadaptRunCommandNodeId = GTUtilsDashboard::getChildNodeId(os, cutadaptRunNodeId, 0); + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, cutadaptRunCommandNodeId), + QString("Node with ID '%1' is invisible after parent node expanding") + .arg(cutadaptRunCommandNodeId)); + + QString nodeText = GTUtilsDashboard::getNodeText(os, cutadaptRunCommandNodeId); + QString expectedNodeText = "Command"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(cutadaptRunCommandNodeId).arg(expectedNodeText).arg(nodeText)); + + const QString cutadaptRunCommandContentNodeId = GTUtilsDashboard::getChildNodeId(os, cutadaptRunCommandNodeId, 0); + nodeText = GTUtilsDashboard::getNodeText(os, cutadaptRunCommandContentNodeId); + const QString expectedNodeTextPart = QString("\"%1\" \"%2\" ").arg(pythonToolPath).arg(cutadaptToolPath); + CHECK_SET_ERR(nodeText.startsWith(expectedNodeTextPart), + QString("Tool run command doesn't start with the following expected part: '%1'. Full command: '%2'") + .arg(expectedNodeTextPart).arg(nodeText)); +} + +GUI_TEST_CLASS_DEFINITION(tool_launch_nodes_test_0008) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Ensure that file "data/samples/FASTQ/eas.fastq' is in the folder without spaces in the path. + QString inputFileUrl = QFileInfo(dataDir + "samples/FASTQ/eas.fastq").absoluteFilePath(); + if (inputFileUrl.contains(" ")) { + QString newInputFileUrl = QFileInfo(sandBoxDir + "eas.fastq").absoluteFilePath(); + CHECK_SET_ERR(!newInputFileUrl.contains(" "), + QString("Can't copy input file to a folder without spaces in the path, sandbox dir path contains spaces: %1").arg(sandBoxDir)); + GTFile::copy(os, inputFileUrl, newInputFileUrl); + inputFileUrl = newInputFileUrl; + } + +// 2. Open "_common_data/workflow/dashboard/cutadapt.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/cutadapt.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Click "Read File URL(s)" element. + GTUtilsWorkflowDesigner::click(os, "Read File URL(s)"); + +// 4. Add "eas.fastq" from the step 1 file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, inputFileUrl, true); + +// 5. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 6. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 7. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// 8. Expand the third-level node "cutadapt run". + const QString cutadaptRunNodeId = GTUtilsDashboard::getDescendantNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, { 0, 0, 0 }); + GTUtilsDashboard::expandNode(os, cutadaptRunNodeId); + +// Expected result: the third-level node "cutadapt run" has a child node "Command", which has a child node with the command. The last argument in the command is the path to the input file. It is not wrapped with double quotes. + const QString cutadaptRunCommandNodeId = GTUtilsDashboard::getChildNodeId(os, cutadaptRunNodeId, 0); + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, cutadaptRunCommandNodeId), + QString("Node with ID '%1' is invisible after parent node expanding") + .arg(cutadaptRunCommandNodeId)); + + QString nodeText = GTUtilsDashboard::getNodeText(os, cutadaptRunCommandNodeId); + QString expectedNodeText = "Command"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(cutadaptRunCommandNodeId).arg(expectedNodeText).arg(nodeText)); + + const QString cutadaptRunCommandContentNodeId = GTUtilsDashboard::getChildNodeId(os, cutadaptRunCommandNodeId, 0); + nodeText = GTUtilsDashboard::getNodeText(os, cutadaptRunCommandContentNodeId); + const QString expectedNodeTextPart = QString(" %1").arg(inputFileUrl); + CHECK_SET_ERR(nodeText.endsWith(expectedNodeTextPart), + QString("Tool run command doesn't end with the following expected part: '%1'. Full command: '%2'") + .arg(expectedNodeTextPart).arg(nodeText)); +} + +GUI_TEST_CLASS_DEFINITION(tool_launch_nodes_test_0009) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Copy "data/samples/FASTQ/eas.fastq" to a folder with spaces in its path. + QString inputFileUrl = QFileInfo(dataDir + "samples/FASTQ/eas.fastq").absoluteFilePath(); + if (!inputFileUrl.contains(" ")) { + QString newInputFileUrl = QFileInfo(sandBoxDir + "tool launch nodes test 0009").absoluteFilePath(); + QDir().mkpath(newInputFileUrl); + newInputFileUrl += "/" + QFileInfo(inputFileUrl).fileName(); + GTFile::copy(os, inputFileUrl, newInputFileUrl); + inputFileUrl = newInputFileUrl; + } + +// 2. Open "_common_data/workflow/dashboard/cutadapt.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/cutadapt.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Click "Read File URL(s)" element. + GTUtilsWorkflowDesigner::click(os, "Read File URL(s)"); + +// 4. Add the copied file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, inputFileUrl, true); + +// 5. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 6. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 7. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// 8. Expand the third-level node "cutadapt run". + const QString cutadaptRunNodeId = GTUtilsDashboard::getDescendantNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, { 0, 0, 0 }); + GTUtilsDashboard::expandNode(os, cutadaptRunNodeId); + +// Expected result: the third-level node "cutadapt run" has a child node "Command", which has a child node with the command. The last argument in the command is the path to the input file. It is wrapped with double quotes. + const QString cutadaptRunCommandNodeId = GTUtilsDashboard::getChildNodeId(os, cutadaptRunNodeId, 0); + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, cutadaptRunCommandNodeId), + QString("Node with ID '%1' is invisible after parent node expanding") + .arg(cutadaptRunCommandNodeId)); + + QString nodeText = GTUtilsDashboard::getNodeText(os, cutadaptRunCommandNodeId); + QString expectedNodeText = "Command"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(cutadaptRunCommandNodeId).arg(expectedNodeText).arg(nodeText)); + + const QString cutadaptRunCommandContentNodeId = GTUtilsDashboard::getChildNodeId(os, cutadaptRunCommandNodeId, 0); + nodeText = GTUtilsDashboard::getNodeText(os, cutadaptRunCommandContentNodeId); + const QString expectedNodeTextPart = QString(" \"%1\"").arg(inputFileUrl); + CHECK_SET_ERR(nodeText.endsWith(expectedNodeTextPart), + QString("Tool run command doesn't end with the following expected part: '%1'. Full command: '%2'") + .arg(expectedNodeTextPart).arg(nodeText)); +} + +GUI_TEST_CLASS_DEFINITION(tool_launch_nodes_test_0010) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Set the "_common_data/workflow/dashboard/fake_tools/fake_spades_no_output.py" as "SPAdes" external tool in the "Application Settings". + const QString spadesToolName = "SPAdes"; + const QString spadesToolPath = QDir::toNativeSeparators(QFileInfo(testDir + "_common_data/workflow/dashboard/fake_tools/fake_spades_no_output.py").absoluteFilePath()); + GTUtilsExternalTools::setToolUrl(os, spadesToolName, spadesToolPath); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 2. Open "_common_data/workflow/dashboard/spades.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/spades.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Click "Read File URL(s)" element. + GTUtilsWorkflowDesigner::click(os, "Read File URL(s)"); + +// 4. Add "data/samples/FASTQ/eas.fastq" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/FASTQ/eas.fastq", true); + +// 5. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 6. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 7. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// 8. Expand the third-level node "SPAdes run". + const QString spadesRunNodeId = GTUtilsDashboard::getDescendantNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, { 0, 0, 0 }); + GTUtilsDashboard::expandNode(os, spadesRunNodeId); + +// Expected result: the third-level node "SPAdes run" doesn't have child nodes "Output log (stdout)" and "Output log (stderr)". + const int spadesRunNodeChildrenCount = GTUtilsDashboard::getChildrenNodesCount(os, spadesRunNodeId); + const int expectedChildrenCount = 1; + CHECK_SET_ERR(expectedChildrenCount == spadesRunNodeChildrenCount, + QString("Node with ID '%1' has unexpected children count: expected %2, got %3") + .arg(spadesRunNodeId).arg(expectedChildrenCount).arg(spadesRunNodeChildrenCount)); + + const QString spadesRunCommandNodeId = GTUtilsDashboard::getChildNodeId(os, spadesRunNodeId, 0); + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, spadesRunCommandNodeId), + QString("Node with ID '%1' is invisible after parent node expanding") + .arg(spadesRunCommandNodeId)); + + QString nodeText = GTUtilsDashboard::getNodeText(os, spadesRunCommandNodeId); + QString expectedNodeText = "Command"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(spadesRunCommandNodeId).arg(expectedNodeText).arg(nodeText)); +} + +GUI_TEST_CLASS_DEFINITION(tool_launch_nodes_test_0011) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Set the "_common_data/workflow/dashboard/fake_tools/fake_spades_stdout_only.py" as "SPAdes" external tool in the "Application Settings". + const QString spadesToolName = "SPAdes"; + const QString spadesToolPath = QDir::toNativeSeparators(QFileInfo(testDir + "_common_data/workflow/dashboard/fake_tools/fake_spades_stdout_only.py").absoluteFilePath()); + GTUtilsExternalTools::setToolUrl(os, spadesToolName, spadesToolPath); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 2. Open "_common_data/workflow/dashboard/spades.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/spades.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Click "Read File URL(s)" element. + GTUtilsWorkflowDesigner::click(os, "Read File URL(s)"); + +// 4. Add "data/samples/FASTQ/eas.fastq" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/FASTQ/eas.fastq", true); + +// 5. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 6. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 7. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// 8. Expand the third-level node "SPAdes run". + const QString spadesRunNodeId = GTUtilsDashboard::getDescendantNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, { 0, 0, 0 }); + GTUtilsDashboard::expandNode(os, spadesRunNodeId); + +// Expected result: the third-level node "SPAdes run" have a child node "Output log (stdout)" and doesn't have a child node "Output log (stderr)". + const int spadesRunNodeChildrenCount = GTUtilsDashboard::getChildrenNodesCount(os, spadesRunNodeId); + const int expectedChildrenCount = 2; + CHECK_SET_ERR(expectedChildrenCount == spadesRunNodeChildrenCount, + QString("Node with ID '%1' has unexpected children count: expected %2, got %3") + .arg(spadesRunNodeId).arg(expectedChildrenCount).arg(spadesRunNodeChildrenCount)); + + const QString spadesRunCommandNodeId = GTUtilsDashboard::getChildNodeId(os, spadesRunNodeId, 0); + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, spadesRunCommandNodeId), + QString("Node with ID '%1' is invisible after parent node expanding") + .arg(spadesRunCommandNodeId)); + + QString nodeText = GTUtilsDashboard::getNodeText(os, spadesRunCommandNodeId); + QString expectedNodeText = "Command"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(spadesRunCommandNodeId).arg(expectedNodeText).arg(nodeText)); + + const QString spadesRunStdoutNodeId = GTUtilsDashboard::getChildNodeId(os, spadesRunNodeId, 1); + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, spadesRunStdoutNodeId), + QString("Node with ID '%1' is invisible after parent node expanding") + .arg(spadesRunStdoutNodeId)); + + nodeText = GTUtilsDashboard::getNodeText(os, spadesRunStdoutNodeId); + expectedNodeText = "Output log (stdout)"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(spadesRunStdoutNodeId).arg(expectedNodeText).arg(nodeText)); +} + +GUI_TEST_CLASS_DEFINITION(tool_launch_nodes_test_0012) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Set the "_common_data/workflow/dashboard/fake_tools/fake_spades_stderr_only.py" as "SPAdes" external tool in the "Application Settings". + const QString spadesToolName = "SPAdes"; + const QString spadesToolPath = QDir::toNativeSeparators(QFileInfo(testDir + "_common_data/workflow/dashboard/fake_tools/fake_spades_stderr_only.py").absoluteFilePath()); + GTUtilsExternalTools::setToolUrl(os, spadesToolName, spadesToolPath); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 2. Open "_common_data/workflow/dashboard/spades.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/spades.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Click "Read File URL(s)" element. + GTUtilsWorkflowDesigner::click(os, "Read File URL(s)"); + +// 4. Add "data/samples/FASTQ/eas.fastq" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/FASTQ/eas.fastq", true); + +// 5. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 6. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 7. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// 8. Expand the third-level node "SPAdes run". + const QString spadesRunNodeId = GTUtilsDashboard::getDescendantNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, { 0, 0, 0 }); + GTUtilsDashboard::expandNode(os, spadesRunNodeId); + +// Expected result: the third-level node "SPAdes run" has a child node "Output log (stderr)" and doesn't have a child node "Output log (stdout)". + const int spadesRunNodeChildrenCount = GTUtilsDashboard::getChildrenNodesCount(os, spadesRunNodeId); + const int expectedChildrenCount = 2; + CHECK_SET_ERR(expectedChildrenCount == spadesRunNodeChildrenCount, + QString("Node with ID '%1' has unexpected children count: expected %2, got %3") + .arg(spadesRunNodeId).arg(expectedChildrenCount).arg(spadesRunNodeChildrenCount)); + + const QString spadesRunCommandNodeId = GTUtilsDashboard::getChildNodeId(os, spadesRunNodeId, 0); + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, spadesRunCommandNodeId), + QString("Node with ID '%1' is invisible after parent node expanding") + .arg(spadesRunCommandNodeId)); + + QString nodeText = GTUtilsDashboard::getNodeText(os, spadesRunCommandNodeId); + QString expectedNodeText = "Command"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(spadesRunCommandNodeId).arg(expectedNodeText).arg(nodeText)); + + const QString spadesRunStderrNodeId = GTUtilsDashboard::getChildNodeId(os, spadesRunNodeId, 1); + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, spadesRunStderrNodeId), + QString("Node with ID '%1' is invisible after parent node expanding") + .arg(spadesRunStderrNodeId)); + + nodeText = GTUtilsDashboard::getNodeText(os, spadesRunStderrNodeId); + expectedNodeText = "Output log (stderr)"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(spadesRunStderrNodeId).arg(expectedNodeText).arg(nodeText)); +} + +GUI_TEST_CLASS_DEFINITION(tool_launch_nodes_test_0013) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Set the "_common_data/workflow/dashboard/fake_tools/fake_spades_stdout_and_stderr.py" as "SPAdes" external tool in the "Application Settings". + const QString spadesToolName = "SPAdes"; + const QString spadesToolPath = QDir::toNativeSeparators(QFileInfo(testDir + "_common_data/workflow/dashboard/fake_tools/fake_spades_stdout_and_stderr.py").absoluteFilePath()); + GTUtilsExternalTools::setToolUrl(os, spadesToolName, spadesToolPath); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 2. Open "_common_data/workflow/dashboard/spades.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/spades.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Click "Read File URL(s)" element. + GTUtilsWorkflowDesigner::click(os, "Read File URL(s)"); + +// 4. Add "data/samples/FASTQ/eas.fastq" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/FASTQ/eas.fastq", true); + +// 5. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 6. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 7. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// 8. Expand the third-level node "SPAdes run". + const QString spadesRunNodeId = GTUtilsDashboard::getDescendantNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, { 0, 0, 0 }); + GTUtilsDashboard::expandNode(os, spadesRunNodeId); + +// Expected result: the third-level node "SPAdes run" has child nodes "Output log (stdout)" and "Output log (stderr)". + const int spadesRunNodeChildrenCount = GTUtilsDashboard::getChildrenNodesCount(os, spadesRunNodeId); + const int expectedChildrenCount = 3; + CHECK_SET_ERR(expectedChildrenCount == spadesRunNodeChildrenCount, + QString("Node with ID '%1' has unexpected children count: expected %2, got %3") + .arg(spadesRunNodeId).arg(expectedChildrenCount).arg(spadesRunNodeChildrenCount)); + + const QString spadesRunCommandNodeId = GTUtilsDashboard::getChildNodeId(os, spadesRunNodeId, 0); + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, spadesRunCommandNodeId), + QString("Node with ID '%1' is invisible after parent node expanding") + .arg(spadesRunCommandNodeId)); + + QString nodeText = GTUtilsDashboard::getNodeText(os, spadesRunCommandNodeId); + QString expectedNodeText = "Command"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(spadesRunCommandNodeId).arg(expectedNodeText).arg(nodeText)); + + const QString oneOutNodeId = GTUtilsDashboard::getChildNodeId(os, spadesRunNodeId, 1); + const QString anotherOutNodeId = GTUtilsDashboard::getChildNodeId(os, spadesRunNodeId, 2); + + QString spadesRunStdoutNodeId; + QString spadesRunStderrNodeId; + if (oneOutNodeId.contains("stderr")) { + spadesRunStdoutNodeId = anotherOutNodeId; + spadesRunStderrNodeId = oneOutNodeId; + } else { + spadesRunStdoutNodeId = oneOutNodeId; + spadesRunStderrNodeId = anotherOutNodeId; + } + + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, spadesRunStdoutNodeId), + QString("Node with ID '%1' is invisible after parent node expanding") + .arg(spadesRunStdoutNodeId)); + + nodeText = GTUtilsDashboard::getNodeText(os, spadesRunStdoutNodeId); + expectedNodeText = "Output log (stdout)"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(spadesRunStdoutNodeId).arg(expectedNodeText).arg(nodeText)); + + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, spadesRunStderrNodeId), + QString("Node with ID '%1' is invisible after parent node expanding") + .arg(spadesRunStderrNodeId)); + + nodeText = GTUtilsDashboard::getNodeText(os, spadesRunStderrNodeId); + expectedNodeText = "Output log (stderr)"; + CHECK_SET_ERR(expectedNodeText == nodeText, QString("There is unexpected text of node with ID '%1': expected '%2', got '%3'") + .arg(spadesRunStderrNodeId).arg(expectedNodeText).arg(nodeText)); + +} + +GUI_TEST_CLASS_DEFINITION(tool_launch_nodes_test_0014) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Ensure that taxonomy data is set. It should be full enough to pass the "kraken-build" validator. + // Currently, it is impossible to set taxonomy data after UGENE launch: UGENE-5979 + // Test should be updated. + +// 2. Set the "_common_data/workflow/dashboard/fake_tools/fake_kraken-build" as "kraken-build" external tool in the "Application Settings". + const QString krakenBuildToolName = "kraken-build"; + const QString spadesToolPath = QDir::toNativeSeparators(QFileInfo(testDir + "_common_data/workflow/dashboard/fake_tools/fake_kraken-build").absoluteFilePath()); + GTUtilsExternalTools::setToolUrl(os, krakenBuildToolName, spadesToolPath); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Open "_common_data/workflow/dashboard/kraken-build.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/kraken-build.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 4. Click "Build Kraken Database" element. + GTUtilsWorkflowDesigner::click(os, "Build Kraken Database"); + +// 5. Set "Database" attribute value to "tool_launch_nodes_test_0013". + GTUtilsWorkflowDesigner::setParameter(os, "Database", "tool_launch_nodes_test_0013", GTUtilsWorkflowDesigner::textValue); + +// 6. Click the "..." button in the "Genomic library" attribute value field. +// Expected result: "Select Genomes for Kraken Database" dialog appeared. +// 7. Add "data/samples/FASTA/human_T1.fa" file to the dataset in the dialog. +// 8. Click the "Select" button in the dialog. + GTUtilsDialog::waitForDialog(os, new GenomicLibraryDialogFiller(os, { dataDir + "samples/FASTA/human_T1.fa" })); + GTUtilsWorkflowDesigner::setParameter(os, "Genomic library", QVariant(), GTUtilsWorkflowDesigner::customDialogSelector); + +// 9. Set "Clean" attribute value to "False". + GTUtilsWorkflowDesigner::setParameter(os, "Clean", "False", GTUtilsWorkflowDesigner::comboValue); + +// 10. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 11. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 12. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// Expected result: there is one second-level node "Build Kraken Database run 1", it has two child nodes: "kraken-build run 1" and "kraken-build run 2" + const QString firstLevelNodeId = GTUtilsDashboard::getChildNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, 0); + int childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, firstLevelNodeId); + int expectedChildrenCount = 1; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, + QString("Node with ID '%1' has unexpected children count: expected %2, got %3") + .arg(firstLevelNodeId).arg(expectedChildrenCount).arg(childrenCount)); + + const QString secondLevelNodeId = GTUtilsDashboard::getChildNodeId(os, firstLevelNodeId, 0); + childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, secondLevelNodeId); + expectedChildrenCount = 2; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, + QString("Node with ID '%1' has unexpected children count: expected %2, got %3") + .arg(secondLevelNodeId).arg(expectedChildrenCount).arg(childrenCount)); + + QString nodeText = GTUtilsDashboard::getNodeText(os, secondLevelNodeId); + QString expectedNodeText = "Build Kraken Database run 1"; + CHECK_SET_ERR(expectedNodeText == nodeText, + QString("Node with ID '%1' has unexpected text: expected '%2', got '%3'") + .arg(secondLevelNodeId).arg(expectedNodeText).arg(nodeText)); + + const QString thirdLevelNodeId1 = GTUtilsDashboard::getChildNodeId(os, secondLevelNodeId, 0); + nodeText = GTUtilsDashboard::getNodeText(os, thirdLevelNodeId1); + expectedNodeText = "kraken-build run 1 "; + CHECK_SET_ERR(expectedNodeText == nodeText, + QString("Node with ID '%1' has unexpected text: expected '%2', got '%3'") + .arg(thirdLevelNodeId1).arg(expectedNodeText).arg(nodeText)); + + const QString thirdLevelNodeId2 = GTUtilsDashboard::getChildNodeId(os, secondLevelNodeId, 1); + nodeText = GTUtilsDashboard::getNodeText(os, thirdLevelNodeId2); + expectedNodeText = "kraken-build run 2 "; + CHECK_SET_ERR(expectedNodeText == nodeText, + QString("Node with ID '%1' has unexpected text: expected '%2', got '%3'") + .arg(thirdLevelNodeId2).arg(expectedNodeText).arg(nodeText)); + +// 13. Expand the third-level node "kraken-build run 1". + GTUtilsDashboard::expandNode(os, thirdLevelNodeId1); + +// Expected result: the third-level node "kraken-build run 1" has child nodes "Command", "Output log (stdout)" and "Output log (stderr)". These nodes contain text "--add-to-library". + childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, thirdLevelNodeId1); + expectedChildrenCount = 3; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, + QString("Node with ID '%1' has unexpected children count: expected %2, got %3") + .arg(thirdLevelNodeId1).arg(expectedChildrenCount).arg(childrenCount)); + + // Command node + QString commandTitleNodeId = GTUtilsDashboard::getChildNodeId(os, thirdLevelNodeId1, 0); + + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, commandTitleNodeId), + QString("Node with ID '%1' is unexpectedly invisible") + .arg(commandTitleNodeId)); + + nodeText = GTUtilsDashboard::getNodeText(os, commandTitleNodeId); + expectedNodeText = "Command"; + CHECK_SET_ERR(expectedNodeText == nodeText, + QString("Node with ID '%1' has unexpected text: expected '%2', got '%3'") + .arg(commandTitleNodeId).arg(expectedNodeText).arg(nodeText)); + + childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, commandTitleNodeId); + expectedChildrenCount = 1; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, + QString("Node with ID '%1' has unexpected children count: expected %2, got %3") + .arg(commandTitleNodeId).arg(expectedChildrenCount).arg(childrenCount)); + + QString commandDataNodeId = GTUtilsDashboard::getChildNodeId(os, commandTitleNodeId, 0); + + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, commandDataNodeId), + QString("Node with ID '%1' is unexpectedly invisible") + .arg(commandDataNodeId)); + + nodeText = GTUtilsDashboard::getNodeText(os, commandDataNodeId); + QString expectedNodeTextPart = "--add-to-library"; + CHECK_SET_ERR(nodeText.contains(expectedNodeTextPart), + QString("Node with ID '%1' text doesn't contain expected text: expected part is '%2', full node text is '%3'") + .arg(commandDataNodeId).arg(expectedNodeTextPart).arg(nodeText)); + + // Output nodes + QString oneOutNodeId = GTUtilsDashboard::getChildNodeId(os, thirdLevelNodeId1, 1); + QString anotherOutNodeId = GTUtilsDashboard::getChildNodeId(os, thirdLevelNodeId1, 2); + + QString stdoutTitleNodeId; + QString stderrTitleNodeId; + if (oneOutNodeId.contains("stderr")) { + stdoutTitleNodeId = anotherOutNodeId; + stderrTitleNodeId = oneOutNodeId; + } else { + stdoutTitleNodeId = oneOutNodeId; + stderrTitleNodeId = anotherOutNodeId; + } + + // Output log (stdout) node + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, stdoutTitleNodeId), + QString("Node with ID '%1' is unexpectedly invisible") + .arg(stdoutTitleNodeId)); + + nodeText = GTUtilsDashboard::getNodeText(os, stdoutTitleNodeId); + expectedNodeText = "Output log (stdout)"; + CHECK_SET_ERR(expectedNodeText == nodeText, + QString("Node with ID '%1' has unexpected text: expected '%2', got '%3'") + .arg(stdoutTitleNodeId).arg(expectedNodeText).arg(nodeText)); + + childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, stdoutTitleNodeId); + expectedChildrenCount = 1; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, + QString("Node with ID '%1' has unexpected children count: expected %2, got %3") + .arg(stdoutTitleNodeId).arg(expectedChildrenCount).arg(childrenCount)); + + QString stdoutDataNodeId = GTUtilsDashboard::getChildNodeId(os, stdoutTitleNodeId, 0); + + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, stdoutDataNodeId), + QString("Node with ID '%1' is unexpectedly invisible") + .arg(stdoutDataNodeId)); + + nodeText = GTUtilsDashboard::getNodeText(os, stdoutDataNodeId); + expectedNodeTextPart = "--add-to-library"; + CHECK_SET_ERR(nodeText.contains(expectedNodeTextPart), + QString("Node with ID '%1' text doesn't contain expected text: expected part is '%2', full node text is '%3'") + .arg(stdoutDataNodeId).arg(expectedNodeTextPart).arg(nodeText)); + + // Output log (stderr) node + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, stderrTitleNodeId), + QString("Node with ID '%1' is unexpectedly invisible") + .arg(stderrTitleNodeId)); + + nodeText = GTUtilsDashboard::getNodeText(os, stderrTitleNodeId); + expectedNodeText = "Output log (stderr)"; + CHECK_SET_ERR(expectedNodeText == nodeText, + QString("Node with ID '%1' has unexpected text: expected '%2', got '%3'") + .arg(stderrTitleNodeId).arg(expectedNodeText).arg(nodeText)); + + childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, stderrTitleNodeId); + expectedChildrenCount = 1; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, + QString("Node with ID '%1' has unexpected children count: expected %2, got %3") + .arg(stderrTitleNodeId).arg(expectedChildrenCount).arg(childrenCount)); + + QString stderrDataNodeId = GTUtilsDashboard::getChildNodeId(os, stderrTitleNodeId, 0); + + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, stderrDataNodeId), + QString("Node with ID '%1' is unexpectedly invisible") + .arg(stderrDataNodeId)); + + nodeText = GTUtilsDashboard::getNodeText(os, stderrDataNodeId); + expectedNodeTextPart = "--add-to-library"; + CHECK_SET_ERR(nodeText.contains(expectedNodeTextPart), + QString("Node with ID '%1' text doesn't contain expected text: expected part is '%2', full node text is '%3'") + .arg(stderrDataNodeId).arg(expectedNodeTextPart).arg(nodeText)); + +// 14. Expand the third-level node "kraken-build run 2". + GTUtilsDashboard::collapseNode(os, thirdLevelNodeId1); + GTUtilsDashboard::expandNode(os, thirdLevelNodeId2); + +// Expected result: the third-level node "kraken-build run 2" has child nodes "Command", "Output log (stdout)" and "Output log (stderr)". These nodes contain text "--build". + childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, thirdLevelNodeId1); + expectedChildrenCount = 3; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, + QString("Node with ID '%1' has unexpected children count: expected %2, got %3") + .arg(thirdLevelNodeId2).arg(expectedChildrenCount).arg(childrenCount)); + + // Command node + commandTitleNodeId = GTUtilsDashboard::getChildNodeId(os, thirdLevelNodeId2, 0); + + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, commandTitleNodeId), + QString("Node with ID '%1' is unexpectedly invisible") + .arg(commandTitleNodeId)); + + nodeText = GTUtilsDashboard::getNodeText(os, commandTitleNodeId); + expectedNodeText = "Command"; + CHECK_SET_ERR(expectedNodeText == nodeText, + QString("Node with ID '%1' has unexpected text: expected '%2', got '%3'") + .arg(commandTitleNodeId).arg(expectedNodeText).arg(nodeText)); + + childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, commandTitleNodeId); + expectedChildrenCount = 1; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, + QString("Node with ID '%1' has unexpected children count: expected %2, got %3") + .arg(commandTitleNodeId).arg(expectedChildrenCount).arg(childrenCount)); + + commandDataNodeId = GTUtilsDashboard::getChildNodeId(os, commandTitleNodeId, 0); + + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, commandDataNodeId), + QString("Node with ID '%1' is unexpectedly invisible") + .arg(commandDataNodeId)); + + nodeText = GTUtilsDashboard::getNodeText(os, commandDataNodeId); + expectedNodeTextPart = "--build"; + CHECK_SET_ERR(nodeText.contains(expectedNodeTextPart), + QString("Node with ID '%1' text doesn't contain expected text: expected part is '%2', full node text is '%3'") + .arg(commandDataNodeId).arg(expectedNodeTextPart).arg(nodeText)); + + // Output nodes + oneOutNodeId = GTUtilsDashboard::getChildNodeId(os, thirdLevelNodeId2, 1); + anotherOutNodeId = GTUtilsDashboard::getChildNodeId(os, thirdLevelNodeId2, 2); + + if (oneOutNodeId.contains("stderr")) { + stdoutTitleNodeId = anotherOutNodeId; + stderrTitleNodeId = oneOutNodeId; + } else { + stdoutTitleNodeId = oneOutNodeId; + stderrTitleNodeId = anotherOutNodeId; + } + + // Output log (stdout) node + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, stdoutTitleNodeId), + QString("Node with ID '%1' is unexpectedly invisible") + .arg(stdoutTitleNodeId)); + + nodeText = GTUtilsDashboard::getNodeText(os, stdoutTitleNodeId); + expectedNodeText = "Output log (stdout)"; + CHECK_SET_ERR(expectedNodeText == nodeText, + QString("Node with ID '%1' has unexpected text: expected '%2', got '%3'") + .arg(stdoutTitleNodeId).arg(expectedNodeText).arg(nodeText)); + + childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, stdoutTitleNodeId); + expectedChildrenCount = 1; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, + QString("Node with ID '%1' has unexpected children count: expected %2, got %3") + .arg(stdoutTitleNodeId).arg(expectedChildrenCount).arg(childrenCount)); + + stdoutDataNodeId = GTUtilsDashboard::getChildNodeId(os, stdoutTitleNodeId, 0); + + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, stdoutDataNodeId), + QString("Node with ID '%1' is unexpectedly invisible") + .arg(stdoutDataNodeId)); + + nodeText = GTUtilsDashboard::getNodeText(os, stdoutDataNodeId); + expectedNodeTextPart = "--build"; + CHECK_SET_ERR(nodeText.contains(expectedNodeTextPart), + QString("Node with ID '%1' text doesn't contain expected text: expected part is '%2', full node text is '%3'") + .arg(stdoutDataNodeId).arg(expectedNodeTextPart).arg(nodeText)); + + // Output log (stderr) node + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, stderrTitleNodeId), + QString("Node with ID '%1' is unexpectedly invisible") + .arg(stderrTitleNodeId)); + + nodeText = GTUtilsDashboard::getNodeText(os, stderrTitleNodeId); + expectedNodeText = "Output log (stderr)"; + CHECK_SET_ERR(expectedNodeText == nodeText, + QString("Node with ID '%1' has unexpected text: expected '%2', got '%3'") + .arg(stderrTitleNodeId).arg(expectedNodeText).arg(nodeText)); + + childrenCount = GTUtilsDashboard::getChildrenNodesCount(os, stderrTitleNodeId); + expectedChildrenCount = 1; + CHECK_SET_ERR(expectedChildrenCount == childrenCount, + QString("Node with ID '%1' has unexpected children count: expected %2, got %3") + .arg(stderrTitleNodeId).arg(expectedChildrenCount).arg(childrenCount)); + + stderrDataNodeId = GTUtilsDashboard::getChildNodeId(os, stderrTitleNodeId, 0); + + CHECK_SET_ERR(GTUtilsDashboard::isNodeVisible(os, stderrDataNodeId), + QString("Node with ID '%1' is unexpectedly invisible") + .arg(stderrDataNodeId)); + + nodeText = GTUtilsDashboard::getNodeText(os, stderrDataNodeId); + expectedNodeTextPart = "--build"; + CHECK_SET_ERR(nodeText.contains(expectedNodeTextPart), + QString("Node with ID '%1' text doesn't contain expected text: expected part is '%2', full node text is '%3'") + .arg(stderrDataNodeId).arg(expectedNodeTextPart).arg(nodeText)); +} + +GUI_TEST_CLASS_DEFINITION(tool_launch_nodes_test_0015) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Set the "_common_data/workflow/dashboard/fake_tools/fake_spades_stdout_only.py" as "SPAdes" external tool in the "Application Settings". + const QString spadesToolName = "SPAdes"; + const QString spadesToolPath = QDir::toNativeSeparators(QFileInfo(testDir + "_common_data/workflow/dashboard/fake_tools/fake_spades_stdout_only.py").absoluteFilePath()); + GTUtilsExternalTools::setToolUrl(os, spadesToolName, spadesToolPath); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 2. Open "_common_data/workflow/dashboard/spades.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/spades.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Click "Read File URL(s)" element. + GTUtilsWorkflowDesigner::click(os, "Read File URL(s)"); + +// 4. Add "data/samples/FASTQ/eas.fastq" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/FASTQ/eas.fastq", true); + +// 5. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 6. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 7. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// 8. Expand the third-level node "SPAdes run". + const QString spadesRunNodeId = GTUtilsDashboard::getDescendantNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, { 0, 0, 0 }); + GTUtilsDashboard::expandNode(os, spadesRunNodeId); + +// Expected result: +// the third-level node "SPAdes run" has child node "Output log (stdout)". + const QString stdoutTitleNodeId = GTUtilsDashboard::getChildNodeId(os, spadesRunNodeId, 1); + + QString nodeText = GTUtilsDashboard::getNodeText(os, stdoutTitleNodeId); + QString expectedNodeText = "Output log (stdout)"; + CHECK_SET_ERR(expectedNodeText == nodeText, + QString("Node with ID '%1' has unexpected text: expected '%2', got '%3'") + .arg(stdoutTitleNodeId).arg(expectedNodeText).arg(nodeText)); + + const QString stdoutDataNodeId = GTUtilsDashboard::getChildNodeId(os, stdoutTitleNodeId, 0); + +// the "Output log (stdout)" node content has significant size (~100 kb of text). + nodeText = GTUtilsDashboard::getNodeText(os, stdoutDataNodeId); + int expectedLength = 80000; + CHECK_SET_ERR(nodeText.size() > expectedLength, + QString("Node with ID '%1' text is not long enough: expected length is at least %2, actual text length is %3") + .arg(stdoutDataNodeId).arg(expectedLength).arg(nodeText.size())); + +// the "Output log (stdout)" node content ends with the following message: "The external tools output is too large and can't be visualized on the dashboard. Find full output in this file.", where "this file" is a link to the log file. + const QString expectedNodeTextPart = "The external tools output is too large and can't be visualized on the dashboard. Find full output in this file."; + CHECK_SET_ERR(nodeText.endsWith(expectedNodeTextPart), + QString("Node with ID '%1' text doesn't ends with the expected part: expected part '%2', last 200 symbols of the text '%3'") + .arg(stdoutDataNodeId).arg(expectedNodeTextPart).arg(nodeText.right(200))); + +// the link from the previous item is correct: it points to a file with the same data; the file size is not less than the node contents size; the file name contains "stdout". + const QString url = GTUtilsDashboard::getLogUrlFromNode(os, stdoutDataNodeId); + + const QFileInfo fileInfo(url); + CHECK_SET_ERR(fileInfo.exists(), QString("File with URL '%1' doesn't exist").arg(url)); + CHECK_SET_ERR(fileInfo.size() >= nodeText.size(), + QString("File with URL '%1' size is less than node '%2' text") + .arg(url).arg(stdoutDataNodeId)); + + const QString expectedFileNamePart = "stdout"; + CHECK_SET_ERR(fileInfo.fileName().contains(expectedFileNamePart), + QString("File name '%1' doesn't contain '%2'") + .arg(url).arg(expectedFileNamePart)); + + QString fileData = GTFile::readAll(os, url); + fileData.remove(QRegularExpression("\\r|\\n")); + + nodeText.chop(200); + nodeText.remove(QRegularExpression("\\r|\\n|<br>")); + CHECK_SET_ERR(fileData.startsWith(nodeText), + QString("File '%1' data doesn't start with node '%2' text") + .arg(url).arg(stdoutDataNodeId)); +} + +GUI_TEST_CLASS_DEFINITION(tool_launch_nodes_test_0016) { + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + +// 1. Set the "_common_data/workflow/dashboard/fake_tools/fake_spades_stderr_only.py" as "SPAdes" external tool in the "Application Settings". + const QString spadesToolName = "SPAdes"; + const QString spadesToolPath = QDir::toNativeSeparators(QFileInfo(testDir + "_common_data/workflow/dashboard/fake_tools/fake_spades_stderr_only.py").absoluteFilePath()); + GTUtilsExternalTools::setToolUrl(os, spadesToolName, spadesToolPath); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 2. Open "_common_data/workflow/dashboard/spades.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/spades.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Click "Read File URL(s)" element. + GTUtilsWorkflowDesigner::click(os, "Read File URL(s)"); + +// 4. Add "data/samples/FASTQ/eas.fastq" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/FASTQ/eas.fastq", true); + +// 5. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 6. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 7. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// 8. Expand the third-level node "SPAdes run". + const QString spadesRunNodeId = GTUtilsDashboard::getDescendantNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, { 0, 0, 0 }); + GTUtilsDashboard::expandNode(os, spadesRunNodeId); + +// Expected result: +// the third-level node "SPAdes run" has child node "Output log (stderr)". + const QString stderrTitleNodeId = GTUtilsDashboard::getChildNodeId(os, spadesRunNodeId, 1); + + QString nodeText = GTUtilsDashboard::getNodeText(os, stderrTitleNodeId); + QString expectedNodeText = "Output log (stderr)"; + CHECK_SET_ERR(expectedNodeText == nodeText, + QString("Node with ID '%1' has unexpected text: expected '%2', got '%3'") + .arg(stderrTitleNodeId).arg(expectedNodeText).arg(nodeText)); + + const QString stderrDataNodeId = GTUtilsDashboard::getChildNodeId(os, stderrTitleNodeId, 0); + +// the "Output log (stderr)" node content has significant size (~100 kb of text). + nodeText = GTUtilsDashboard::getNodeText(os, stderrDataNodeId); + int expectedLength = 80000; + CHECK_SET_ERR(nodeText.size() > expectedLength, + QString("Node with ID '%1' text is not long enough: expected length is at least %2, actual text length is %3") + .arg(stderrDataNodeId).arg(expectedLength).arg(nodeText.size())); + +// the "Output log (stderr)" node content ends with the following message: "The external tools output is too large and can't be visualized on the dashboard. Find full output in this file", where "this file" is a link to the log file. + const QString expectedNodeTextPart = "The external tools output is too large and can't be visualized on the dashboard. Find full output in this file."; + CHECK_SET_ERR(nodeText.endsWith(expectedNodeTextPart), + QString("Node with ID '%1' text doesn't ends with the expected part: expected part '%2', last 200 symbols of the text '%3'") + .arg(stderrDataNodeId).arg(expectedNodeTextPart).arg(nodeText.right(200))); + +// the link from the previous item is correct: it points to a file with the same data; the file size is not less than the node contents size; the file name contains "stderr". + const QString url = GTUtilsDashboard::getLogUrlFromNode(os, stderrDataNodeId); + + const QFileInfo fileInfo(url); + CHECK_SET_ERR(fileInfo.exists(), QString("File with URL '%1' doesn't exist").arg(url)); + CHECK_SET_ERR(fileInfo.size() >= nodeText.size(), + QString("File with URL '%1' size is less than node '%2' text") + .arg(url).arg(stderrDataNodeId)); + + const QString expectedFileNamePart = "stderr"; + CHECK_SET_ERR(fileInfo.fileName().contains(expectedFileNamePart), + QString("File name '%1' doesn't contain '%2'") + .arg(url).arg(expectedFileNamePart)); + + QString fileData = GTFile::readAll(os, url); + fileData.remove(QRegularExpression("\\r|\\n")); + + nodeText.chop(200); + nodeText.remove(QRegularExpression("\\r|\\n|<br>")); + CHECK_SET_ERR(fileData.startsWith(nodeText), + QString("File '%1' data doesn't start with node '%2' text") + .arg(url).arg(stderrDataNodeId)); +} + +GUI_TEST_CLASS_DEFINITION(tool_launch_nodes_test_0017) { + GTUtilsDialog::waitForDialog(os, new StartupDialogFiller(os)); + +// 1. Set the "_common_data/workflow/dashboard/fake_tools/fake_spades_stdout_and_stderr.py" as "SPAdes" external tool in the "Application Settings". + const QString spadesToolName = "SPAdes"; + const QString spadesToolPath = QDir::toNativeSeparators(QFileInfo(testDir + "_common_data/workflow/dashboard/fake_tools/fake_spades_stdout_and_stderr.py").absoluteFilePath()); + GTUtilsExternalTools::setToolUrl(os, spadesToolName, spadesToolPath); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 2. Open "_common_data/workflow/dashboard/spades.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/workflow/dashboard/spades.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Click "Read File URL(s)" element. + GTUtilsWorkflowDesigner::click(os, "Read File URL(s)"); + +// 4. Add "data/samples/FASTQ/eas.fastq" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/FASTQ/eas.fastq", true); + +// 5. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// 6. Wait the workflow execution finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 7. Switch to an "External Tools" tab. + GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); + +// 8. Expand the third-level node "SPAdes run". + const QString spadesRunNodeId = GTUtilsDashboard::getDescendantNodeId(os, GTUtilsDashboard::TREE_ROOT_ID, { 0, 0, 0 }); + GTUtilsDashboard::expandNode(os, spadesRunNodeId); + +// Expected result: +// the third-level node "SPAdes run" has child nodes "Output log (stdout)" and "Output log (stderr)". + const QString oneOutNodeId = GTUtilsDashboard::getChildNodeId(os, spadesRunNodeId, 1); + const QString anotherOutNodeId = GTUtilsDashboard::getChildNodeId(os, spadesRunNodeId, 2); + + QString stdoutTitleNodeId; + QString stderrTitleNodeId; + if (oneOutNodeId.contains("stderr")) { + stdoutTitleNodeId = anotherOutNodeId; + stderrTitleNodeId = oneOutNodeId; + } else { + stdoutTitleNodeId = oneOutNodeId; + stderrTitleNodeId = anotherOutNodeId; + } + + QString nodeText = GTUtilsDashboard::getNodeText(os, stderrTitleNodeId); + QString expectedNodeText = "Output log (stderr)"; + CHECK_SET_ERR(expectedNodeText == nodeText, + QString("Node with ID '%1' has unexpected text: expected '%2', got '%3'") + .arg(stderrTitleNodeId).arg(expectedNodeText).arg(nodeText)); + + nodeText = GTUtilsDashboard::getNodeText(os, stdoutTitleNodeId); + expectedNodeText = "Output log (stdout)"; + CHECK_SET_ERR(expectedNodeText == nodeText, + QString("Node with ID '%1' has unexpected text: expected '%2', got '%3'") + .arg(stdoutTitleNodeId).arg(expectedNodeText).arg(nodeText)); + + const QString stdoutDataNodeId = GTUtilsDashboard::getChildNodeId(os, stdoutTitleNodeId, 0); + const QString stderrDataNodeId = GTUtilsDashboard::getChildNodeId(os, stderrTitleNodeId, 0); + +// both "Output log (stdout)" and "Output log (stderr)" nodes contents have significant size (~100 kb of text). + QString stdoutNodeText = GTUtilsDashboard::getNodeText(os, stdoutDataNodeId); + int expectedLength = 80000; + CHECK_SET_ERR(stdoutNodeText.size() > expectedLength, + QString("Node with ID '%1' text is not long enough: expected length is at least %2, actual text length is %3") + .arg(stdoutDataNodeId).arg(expectedLength).arg(stdoutNodeText.size())); + + QString stderrNodeText = GTUtilsDashboard::getNodeText(os, stderrDataNodeId); + expectedLength = 80000; + CHECK_SET_ERR(stderrNodeText.size() > expectedLength, + QString("Node with ID '%1' text is not long enough: expected length is at least %2, actual text length is %3") + .arg(stderrDataNodeId).arg(expectedLength).arg(stderrNodeText.size())); + +// both "Output log (stdout)" and "Output log (stderr)" nodes contents ends with the following message: "The external tools output is too large and can't be visualized on the dashboard. Find full output in %logUrl% this file", where %logUrl% is a link to log file. + const QString expectedNodeTextPart = "The external tools output is too large and can't be visualized on the dashboard. Find full output in this file."; + CHECK_SET_ERR(stdoutNodeText.endsWith(expectedNodeTextPart), + QString("Node with ID '%1' text doesn't ends with the expected part: expected part '%2', last 200 symbols of the text '%3'") + .arg(stderrDataNodeId).arg(expectedNodeTextPart).arg(stdoutNodeText.right(200))); + + CHECK_SET_ERR(stderrNodeText.endsWith(expectedNodeTextPart), + QString("Node with ID '%1' text doesn't ends with the expected part: expected part '%2', last 200 symbols of the text '%3'") + .arg(stderrDataNodeId).arg(expectedNodeTextPart).arg(stderrNodeText.right(200))); + +// the links from the previous item are correct: they point to files with the same data as in nodes; the file sizes are not less than the appropriate nodes contents size; the appropriate files names contain "stdout" and "stderr". + const QString stdoutLogUrl = GTUtilsDashboard::getLogUrlFromNode(os, stdoutDataNodeId); + + const QFileInfo stdoutFileInfo(stdoutLogUrl); + CHECK_SET_ERR(stdoutFileInfo.exists(), QString("File with URL '%1' doesn't exist").arg(stdoutLogUrl)); + CHECK_SET_ERR(stdoutFileInfo.size() >= stdoutNodeText.size(), + QString("File with URL '%1' size is less than node '%2' text") + .arg(stdoutLogUrl).arg(stdoutDataNodeId)); + + QString expectedFileNamePart = "stdout"; + CHECK_SET_ERR(stdoutFileInfo.fileName().contains(expectedFileNamePart), + QString("File name '%1' doesn't contain '%2'") + .arg(stdoutLogUrl).arg(expectedFileNamePart)); + + QString fileData = GTFile::readAll(os, stdoutLogUrl); + fileData.remove(QRegularExpression("\\r|\\n")); + + stdoutNodeText.chop(200); + stdoutNodeText.remove(QRegularExpression("\\r|\\n|<br>")); + CHECK_SET_ERR(fileData.startsWith(stdoutNodeText), + QString("File '%1' data doesn't start with node '%2' text") + .arg(stdoutLogUrl).arg(stdoutDataNodeId)); + + const QString stderrLogUrl = GTUtilsDashboard::getLogUrlFromNode(os, stderrDataNodeId); + + const QFileInfo stderrFileInfo(stderrLogUrl); + CHECK_SET_ERR(stderrFileInfo.exists(), QString("File with URL '%1' doesn't exist").arg(stderrLogUrl)); + CHECK_SET_ERR(stderrFileInfo.size() >= stderrNodeText.size(), + QString("File with URL '%1' size is less than node '%2' text") + .arg(stderrLogUrl).arg(stderrDataNodeId)); + + expectedFileNamePart = "stderr"; + CHECK_SET_ERR(stderrFileInfo.fileName().contains(expectedFileNamePart), + QString("File name '%1' doesn't contain '%2'") + .arg(stderrLogUrl).arg(expectedFileNamePart)); + + fileData = GTFile::readAll(os, stderrLogUrl); + fileData.remove(QRegularExpression("\\r|\\n")); + + stderrNodeText.chop(200); + stderrNodeText.remove(QRegularExpression("\\r|\\n|<br>")); + CHECK_SET_ERR(fileData.startsWith(stderrNodeText), + QString("File '%1' data doesn't start with node '%2' text") + .arg(stderrLogUrl).arg(stderrDataNodeId)); +} + +GUI_TEST_CLASS_DEFINITION(view_opening_test_0001) { +// 1. Set "_common_data/workflow/dashboard/workflow_outputs/empty_workflow_output" as workflow output folder in the "Application Settings". + const QFileInfo originalWorkflowOutputDir = testDir + "_common_data/workflow/dashboard/workflow_outputs/empty_workflow_output"; + const QFileInfo testWorkflowOutputDir = sandBoxDir + "empty_workflow_output"; + GTFile::copyDir(os, originalWorkflowOutputDir.absoluteFilePath(), testWorkflowOutputDir.absoluteFilePath()); + setWorkflowOutputDir(os, testWorkflowOutputDir.absoluteFilePath()); + +// 2. Wait for scan task finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + +// Expected result: +// - "Dashboards manager" button on the toolbar is active. +// - There is no "Go to Dashboard" button on the toolbar. + QWidget *dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + + QWidget *viewSwitchButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Show dashboard"); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'Go to Dashboards' is nullptr"); + CHECK_SET_ERR(!viewSwitchButton->isVisible(), "'Go to Dashboards' button is unexpectedly invisible"); + +// 4. Click to the "Dashboards manager" button on the toolbar. +// 5. Expected result: a messagebox appears. It contains the following text: "You do not have any dashboards yet. You need to run some workflow to use Dashboards Manager." +// 6. Close the messagebox. + GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, "OK", "You do not have any dashboards yet. You need to run some workflow to use Dashboards Manager.")); + GTWidget::click(os, dashboardsManagerButton); + + GTGlobals::sleep(); +} + +GUI_TEST_CLASS_DEFINITION(view_opening_test_0002) { +// 1. Set "_common_data/workflow/dashboard/workflow_outputs/two_visible_dashboards" as workflow output folder in the "Application Settings". + const QFileInfo originalWorkflowOutputDir = testDir + "_common_data/workflow/dashboard/workflow_outputs/two_visible_dashboards"; + const QFileInfo testWorkflowOutputDir = sandBoxDir + "two_visible_dashboards"; + GTFile::copyDir(os, originalWorkflowOutputDir.absoluteFilePath(), testWorkflowOutputDir.absoluteFilePath()); + setWorkflowOutputDir(os, testWorkflowOutputDir.absoluteFilePath()); + +// 2. Wait for scan task finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + +// Expected result: +// - "Dashboards manager" button on the toolbar is active. +// - There is "Go to Dashboard" button on the toolbar. The button text is exactly as written. + QWidget *dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + + QAbstractButton *viewSwitchButton = qobject_cast<QAbstractButton *>(GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Show dashboard")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'Go to Dashboards' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + + QString expectedButtonText = "Go to Dashboard"; + QString actualButtonText = viewSwitchButton->text(); + CHECK_SET_ERR(expectedButtonText == actualButtonText, + QString("View switch button has an unexpected text: expected '%1', got '%2'") + .arg(expectedButtonText).arg(actualButtonText)); + +// 4. Click to the "Dashboards manager" button on the toolbar. +// Expected result: the "Dashboards Manager" dialog appears. It contains two items, both of them are checked. Their names are "Extract consensus as sequence 1" and "Extract consensus as sequence 2". +// 5. Cancel the dialog. + class Scenario : public CustomScenario { + public: + void run(HI::GUITestOpStatus &os) override { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(nullptr != dialog, "Active modal widget is nullptr"); + + const QList<QPair<QString, bool> > expectedDashboardsState( { qMakePair(QString("Extract consensus as sequence 1"), true), + qMakePair(QString("Extract consensus as sequence 2"), true) } ); + const QList<QPair<QString, bool> > actualDashboardsState = DashboardsManagerDialogFiller::getDashboardsState(os); + + CHECK_SET_ERR(expectedDashboardsState.size() == actualDashboardsState.size(), + QString("Expected dashboards count is not equal to the actual dashboards list size: expected %1, got %2") + .arg(expectedDashboardsState.size()).arg(actualDashboardsState.size())); + + for (int i = 0; i < expectedDashboardsState.size(); ++i) { + const QString expectedDashboardName = expectedDashboardsState[i].first; + const QString actualDashboardName = actualDashboardsState[i].first; + CHECK_SET_ERR(expectedDashboardName == actualDashboardName, + QString("Dashboard number %1 has an unexpected name: expected '%2', got '%3'") + .arg(i).arg(expectedDashboardName).arg(actualDashboardName)); + + const bool expectedDashboardState = expectedDashboardsState[i].second; + const bool actualDashboardState = actualDashboardsState[i].second; + CHECK_SET_ERR(expectedDashboardState == actualDashboardState, + QString("Dashboard number %1 has an unexpected state: it should be %2, but it is '%3'") + .arg(i).arg(expectedDashboardState ? "visible" : "invisible").arg(actualDashboardState ? "visible" : "invisible")); + } + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Cancel); + } + }; + + GTUtilsDialog::waitForDialog(os, new DashboardsManagerDialogFiller(os, new Scenario())); + GTWidget::click(os, dashboardsManagerButton); + +// 6. Click to the "Go to Dashboards" button on the toolbar. + GTWidget::click(os, viewSwitchButton); + +// Expected result: +// - There is "To Workflow Designer" button on the toolbar. The button text is exactly as written. +// - There are two tabs with dashboards. Their names are "Extract consensus as sequence 1" and "Extract consensus as sequence 2". +// - The "Extract consensus as sequence 2" dashboard is active. +// - The dashboard is correctly displayed. + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + + expectedButtonText = "To Workflow Designer"; + actualButtonText = viewSwitchButton->text(); + CHECK_SET_ERR(expectedButtonText == actualButtonText, + QString("View switch button has an unexpected text: expected '%1', got '%2'") + .arg(expectedButtonText).arg(actualButtonText)); + + QTabWidget *dashboardsView = GTUtilsDashboard::getTabWidget(os); + CHECK_SET_ERR(nullptr != dashboardsView, "Dashboards view is nullptr"); + + const int expectedTabsCount = 2; + const int actualTabsCount = dashboardsView->count(); + CHECK_SET_ERR(expectedTabsCount == actualTabsCount, + QString("There is an incorrect count of tabs in the Dashboard View: expected %1, got %2") + .arg(expectedTabsCount).arg(actualTabsCount)); + + const int expectedActiveTabIndex = 1; + const int actualActiveTabIndex = dashboardsView->currentIndex(); + CHECK_SET_ERR(expectedActiveTabIndex == actualActiveTabIndex, + QString("There is an incorrect active tab: expected index is %1, actual index is %2") + .arg(expectedActiveTabIndex).arg(actualActiveTabIndex)); + + const QString expectedTabName = "Extract consensus as sequence 2"; + const QString actualTabName = GTUtilsDashboard::getDashboardName(os, expectedActiveTabIndex); + CHECK_SET_ERR(expectedTabName == actualTabName, + QString("Active dashboard has an unexpected name: expect '%1', got '%2'") + .arg(expectedTabName).arg(actualTabName)); + + const QStringList outputFiles = GTUtilsDashboard::getOutputFiles(os); + CHECK_SET_ERR(!outputFiles.isEmpty(), "Active dashboard is not displayed properly"); + +// 7. Click to the "To Workflow Designer" button on the toolbar. + GTWidget::click(os, viewSwitchButton); + +// Expected result: there is "Go to Dashboard" button on the toolbar. The button text is exactly as written. + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + + expectedButtonText = "Go to Dashboard"; + actualButtonText = viewSwitchButton->text(); + CHECK_SET_ERR(expectedButtonText == actualButtonText, + QString("View switch button has an unexpected text: expected '%1', got '%2'") + .arg(expectedButtonText).arg(actualButtonText)); +} + +GUI_TEST_CLASS_DEFINITION(view_opening_test_0003) { +// 1. Set "_common_data/workflow/dashboard/workflow_outputs/one_visible_one_invisible" as workflow output folder in the "Application Settings". + const QFileInfo originalWorkflowOutputDir = testDir + "_common_data/workflow/dashboard/workflow_outputs/one_visible_one_invisible"; + const QFileInfo testWorkflowOutputDir = sandBoxDir + "one_visible_one_invisible"; + GTFile::copyDir(os, originalWorkflowOutputDir.absoluteFilePath(), testWorkflowOutputDir.absoluteFilePath()); + setWorkflowOutputDir(os, testWorkflowOutputDir.absoluteFilePath()); + +// 2. Wait for scan task finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + +// Expected result: +// - "Dashboards manager" button on the toolbar is active. +// - There is "Go to Dashboard" button on the toolbar. The button text is exactly as written. + QWidget *dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + + QAbstractButton *viewSwitchButton = qobject_cast<QAbstractButton *>(GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Show dashboard")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'Go to Dashboards' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + + QString expectedButtonText = "Go to Dashboard"; + QString actualButtonText = viewSwitchButton->text(); + CHECK_SET_ERR(expectedButtonText == actualButtonText, + QString("View switch button has an unexpected text: expected '%1', got '%2'") + .arg(expectedButtonText).arg(actualButtonText)); + +// 4. Click to the "Dashboards manager" button on the toolbar. +// Expected result: the "Dashboards Manager" dialog appears. It contains two items, the first one is unchecked, the second one is checked. Their names are "Extract consensus as sequence 1" and "Extract consensus as sequence 2". +// 5. Cancel the dialog. + class Scenario : public CustomScenario { + public: + void run(HI::GUITestOpStatus &os) override { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(nullptr != dialog, "Active modal widget is nullptr"); + + const QList<QPair<QString, bool> > expectedDashboardsState( { qMakePair(QString("Extract consensus as sequence 1"), false), + qMakePair(QString("Extract consensus as sequence 2"), true) } ); + const QList<QPair<QString, bool> > actualDashboardsState = DashboardsManagerDialogFiller::getDashboardsState(os); + + CHECK_SET_ERR(expectedDashboardsState.size() == actualDashboardsState.size(), + QString("Expected dashboards count is not equal to the actual dashboards list size: expected %1, got %2") + .arg(expectedDashboardsState.size()).arg(actualDashboardsState.size())); + + for (int i = 0; i < expectedDashboardsState.size(); ++i) { + const QString expectedDashboardName = expectedDashboardsState[i].first; + const QString actualDashboardName = actualDashboardsState[i].first; + CHECK_SET_ERR(expectedDashboardName == actualDashboardName, + QString("Dashboard number %1 has an unexpected name: expected '%2', got '%3'") + .arg(i).arg(expectedDashboardName).arg(actualDashboardName)); + + const bool expectedDashboardState = expectedDashboardsState[i].second; + const bool actualDashboardState = actualDashboardsState[i].second; + CHECK_SET_ERR(expectedDashboardState == actualDashboardState, + QString("Dashboard number %1 has an unexpected state: it should be %2, but it is '%3'") + .arg(i).arg(expectedDashboardState ? "visible" : "invisible").arg(actualDashboardState ? "visible" : "invisible")); + } + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Cancel); + } + }; + + GTUtilsDialog::waitForDialog(os, new DashboardsManagerDialogFiller(os, new Scenario())); + GTWidget::click(os, dashboardsManagerButton); + +// 6. Click to the "Go to Dashboards" button on the toolbar. + GTWidget::click(os, viewSwitchButton); + +// Expected result: +// - There is "To Workflow Designer" button on the toolbar. The button text is exactly as written. +// - There is one tab with dashboard. Its name is "Extract consensus as sequence 2". +// - The "Extract consensus as sequence 2" dashboard is active. +// - The dashboard is correctly displayed. + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + + expectedButtonText = "To Workflow Designer"; + actualButtonText = viewSwitchButton->text(); + CHECK_SET_ERR(expectedButtonText == actualButtonText, + QString("View switch button has an unexpected text: expected '%1', got '%2'") + .arg(expectedButtonText).arg(actualButtonText)); + + QTabWidget *dashboardsView = GTUtilsDashboard::getTabWidget(os); + CHECK_SET_ERR(nullptr != dashboardsView, "Dashboards view is nullptr"); + + const int expectedTabsCount = 1; + const int actualTabsCount = dashboardsView->count(); + CHECK_SET_ERR(expectedTabsCount == actualTabsCount, + QString("There is an incorrect count of tabs in the Dashboard View: expected %1, got %2") + .arg(expectedTabsCount).arg(actualTabsCount)); + + const int expectedActiveTabIndex = 0; + const int actualActiveTabIndex = dashboardsView->currentIndex(); + CHECK_SET_ERR(expectedActiveTabIndex == actualActiveTabIndex, + QString("There is an incorrect active tab: expected index is %1, actual index is %2") + .arg(expectedActiveTabIndex).arg(actualActiveTabIndex)); + + const QString expectedTabName = "Extract consensus as sequence 2"; + const QString actualTabName = GTUtilsDashboard::getDashboardName(os, expectedActiveTabIndex); + CHECK_SET_ERR(expectedTabName == actualTabName, + QString("Active dashboard has an unexpected name: expect '%1', got '%2'") + .arg(expectedTabName).arg(actualTabName)); + + const QStringList outputFiles = GTUtilsDashboard::getOutputFiles(os); + CHECK_SET_ERR(!outputFiles.isEmpty(), "Active dashboard is not displayed properly"); + +// 7. Click to the "To Workflow Designer" button on the toolbar. + GTWidget::click(os, viewSwitchButton); + +// Expected result: there is "Go to Dashboard" button on the toolbar. The button text is exactly as written. + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + + expectedButtonText = "Go to Dashboard"; + actualButtonText = viewSwitchButton->text(); + CHECK_SET_ERR(expectedButtonText == actualButtonText, + QString("View switch button has an unexpected text: expected '%1', got '%2'") + .arg(expectedButtonText).arg(actualButtonText)); +} + +GUI_TEST_CLASS_DEFINITION(view_opening_test_0004) { +// 1. Set "_common_data/workflow/dashboard/workflow_outputs/two_invisible_dashboards" as workflow output folder in the "Application Settings". + const QFileInfo originalWorkflowOutputDir = testDir + "_common_data/workflow/dashboard/workflow_outputs/two_invisible_dashboards"; + const QFileInfo testWorkflowOutputDir = sandBoxDir + "two_invisible_dashboards"; + GTFile::copyDir(os, originalWorkflowOutputDir.absoluteFilePath(), testWorkflowOutputDir.absoluteFilePath()); + setWorkflowOutputDir(os, testWorkflowOutputDir.absoluteFilePath()); + +// 2. Wait for scan task finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + +// Expected result: +// - "Dashboards manager" button on the toolbar is active. +// - There is no "Go to Dashboard" button on the toolbar. + QWidget *dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + + QWidget *viewSwitchButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Show dashboard"); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'Go to Dashboards' is nullptr"); + CHECK_SET_ERR(!viewSwitchButton->isVisible(), "'Go to Dashboards' button is unexpectedly invisible"); + +// 4. Click to the "Dashboards manager" button on the toolbar. +// Expected result: the "Dashboards Manager" dialog appears. It contains two items, both of them are unchecked. Their names are "Extract consensus as sequence 1" and "Extract consensus as sequence 2". +// 5. Cancel the dialog. + class Scenario : public CustomScenario { + public: + void run(HI::GUITestOpStatus &os) override { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(nullptr != dialog, "Active modal widget is nullptr"); + + const QList<QPair<QString, bool> > expectedDashboardsState( { qMakePair(QString("Extract consensus as sequence 1"), false), + qMakePair(QString("Extract consensus as sequence 2"), false) } ); + const QList<QPair<QString, bool> > actualDashboardsState = DashboardsManagerDialogFiller::getDashboardsState(os); + + CHECK_SET_ERR(expectedDashboardsState.size() == actualDashboardsState.size(), + QString("Expected dashboards count is not equal to the actual dashboards list size: expected %1, got %2") + .arg(expectedDashboardsState.size()).arg(actualDashboardsState.size())); + + for (int i = 0; i < expectedDashboardsState.size(); ++i) { + const QString expectedDashboardName = expectedDashboardsState[i].first; + const QString actualDashboardName = actualDashboardsState[i].first; + CHECK_SET_ERR(expectedDashboardName == actualDashboardName, + QString("Dashboard number %1 has an unexpected name: expected '%2', got '%3'") + .arg(i).arg(expectedDashboardName).arg(actualDashboardName)); + + const bool expectedDashboardState = expectedDashboardsState[i].second; + const bool actualDashboardState = actualDashboardsState[i].second; + CHECK_SET_ERR(expectedDashboardState == actualDashboardState, + QString("Dashboard number %1 has an unexpected state: it should be %2, but it is '%3'") + .arg(i).arg(expectedDashboardState ? "visible" : "invisible").arg(actualDashboardState ? "visible" : "invisible")); + } + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Cancel); + } + }; + + GTUtilsDialog::waitForDialog(os, new DashboardsManagerDialogFiller(os, new Scenario())); + GTWidget::click(os, dashboardsManagerButton); + + GTGlobals::sleep(); +} + +GUI_TEST_CLASS_DEFINITION(output_dir_scanning_test_0001) { +// 1. Set "_common_data/workflow/dashboard/workflow_outputs/two_visible_two_invisible" as workflow output folder in the "Application Settings". + const QFileInfo originalWorkflowOutputDir = testDir + "_common_data/workflow/dashboard/workflow_outputs/two_visible_two_invisible"; + const QFileInfo testWorkflowOutputDir = sandBoxDir + "two_visible_two_invisible"; + GTFile::copyDir(os, originalWorkflowOutputDir.absoluteFilePath(), testWorkflowOutputDir.absoluteFilePath()); + setWorkflowOutputDir(os, testWorkflowOutputDir.absoluteFilePath()); + +// 2. Wait for scan task finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + int tabIndex1 = GTUtilsMdi::getCurrentTab(os); + +// 4. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + int tabIndex2 = GTUtilsMdi::getCurrentTab(os); + +// 5. Click to the "Go to Dashboards" button on the toolbar. + QAbstractButton *viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), + "Show dashboard")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'Go to Dashboards' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + GTWidget::click(os, viewSwitchButton); + +// 6. Set "_common_data/workflow/dashboard/workflow_outputs/empty_workflow_output" as workflow output folder in the "Application Settings". + const QFileInfo originalWorkflowOutputDir2 = testDir + "_common_data/workflow/dashboard/workflow_outputs/empty_workflow_output"; + const QFileInfo testWorkflowOutputDir2 = sandBoxDir + "empty_workflow_output"; + GTFile::copyDir(os, originalWorkflowOutputDir2.absoluteFilePath(), testWorkflowOutputDir2.absoluteFilePath()); + setWorkflowOutputDir(os, testWorkflowOutputDir2.absoluteFilePath()); + +// 7. Wait for scan task finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// Expected result: +// - The Workflow Designer switches to the scene view mode. +// - There is no scene/dashboards switch button on the toolbar. +// - The "Dashboards manager" button on the toolbar is active. + QWidget *dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + + QWidget *viewSwitchButton2 = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Show dashboard"); + CHECK_SET_ERR(nullptr == viewSwitchButton2 || + !viewSwitchButton2->isVisible(), "'Go to Dashboards' is visible"); + +// 8. Click to the "Dashboards manager" button on the toolbar. +// Expected result: the "Dashboards Manager" dialog appears. It contains the following text: "You do not have any dashboards yet. You need to run some workflow to use Dashboards Manager." +// 9. Close the messagebox. + GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, "OK", "You do not have any dashboards yet. You need to run some workflow to use Dashboards Manager.")); + GTWidget::click(os, dashboardsManagerButton); + +// 10. Switch to another Workflow Designer. + coreLog.info(QString("Try to switch to tab %1(%2)") + .arg(tabIndex1) + .arg(GTUtilsMdi::getTabBar(os)->tabText(tabIndex1))); + GTUtilsMdi::clickTab(os, tabIndex1); + +// Expected result: +// - The Workflow Designer is in the scene view mode. +// - There is no scene/dashboards switch button on the toolbar. +// - The "Dashboards manager" button on the toolbar is active. + dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + + viewSwitchButton2 = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Show dashboard"); + CHECK_SET_ERR(nullptr == viewSwitchButton2 || + !viewSwitchButton2->isVisible(), "'Go to Dashboards' is visible"); + +// 11. Click to the "Dashboards manager" button on the toolbar. +// Expected result: a messagebox appears. It contains the following text: "You do not have any dashboards yet. You need to run some workflow to use Dashboards Manager." +// 12. Close the messagebox. + GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, "OK", "You do not have any dashboards yet. You need to run some workflow to use Dashboards Manager.")); + GTWidget::click(os, dashboardsManagerButton); + + GTGlobals::sleep(); +} + +GUI_TEST_CLASS_DEFINITION(output_dir_scanning_test_0002) { +// 1. Set "_common_data/workflow/dashboard/workflow_outputs/two_visible_two_invisible" as workflow output folder in the "Application Settings". + const QFileInfo originalWorkflowOutputDir = testDir + "_common_data/workflow/dashboard/workflow_outputs/two_visible_two_invisible"; + const QFileInfo testWorkflowOutputDir = sandBoxDir + "two_visible_two_invisible"; + GTFile::copyDir(os, originalWorkflowOutputDir.absoluteFilePath(), testWorkflowOutputDir.absoluteFilePath()); + setWorkflowOutputDir(os, testWorkflowOutputDir.absoluteFilePath()); + +// 2. Wait for scan task finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + int tabIndex1 = GTUtilsMdi::getCurrentTab(os); + +// 4. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + int tabIndex2 = GTUtilsMdi::getCurrentTab(os); + +// 5. Click to the "Go to Dashboards" button on the toolbar. + QAbstractButton *viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), + "Show dashboard")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'Go to Dashboards' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + GTWidget::click(os, viewSwitchButton); + +// 6. Set "_common_data/workflow/dashboard/workflow_outputs/two_visible_dashboards" as workflow output folder in the "Application Settings". + const QFileInfo originalWorkflowOutputDir2 = testDir + "_common_data/workflow/dashboard/workflow_outputs/two_visible_dashboards"; + const QFileInfo testWorkflowOutputDir2 = sandBoxDir + "two_visible_dashboards"; + GTFile::copyDir(os, originalWorkflowOutputDir2.absoluteFilePath(), testWorkflowOutputDir2.absoluteFilePath()); + setWorkflowOutputDir(os, testWorkflowOutputDir2.absoluteFilePath()); + +// 7. Wait for scan task finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// Expected result: +// - The Workflow Designer is in the dashboards view mode. +// - There are two tabs with dashboards. Their names are "Extract consensus as sequence 1" and "Extract consensus as sequence 2". +// - The "Extract consensus as sequence 2" dashboard is active. +// - The dashboard is correctly displayed. +// - The "Dashboards manager" button on the toolbar is active. + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + + QString expectedButtonText = "To Workflow Designer"; + QString actualButtonText = viewSwitchButton->text(); + CHECK_SET_ERR(expectedButtonText == actualButtonText, + QString("View switch button has an unexpected text: expected '%1', got '%2'") + .arg(expectedButtonText).arg(actualButtonText)); + + coreLog.info("Trying get GTUtilsDashboard::getTabWidget(os)"); + QTabWidget *dashboardsView = GTUtilsDashboard::getTabWidget(os); + CHECK_SET_ERR(nullptr != dashboardsView, "Dashboards view is nullptr"); + coreLog.info("Successfully got GTUtilsDashboard::getTabWidget(os)"); + + const int expectedTabsCount = 2; + const int actualTabsCount = dashboardsView->count(); + CHECK_SET_ERR(expectedTabsCount == actualTabsCount, + QString("There is an incorrect count of tabs in the Dashboard View: expected %1, got %2") + .arg(expectedTabsCount).arg(actualTabsCount)); + + const int expectedActiveTabIndex = 1; + const int actualActiveTabIndex = dashboardsView->currentIndex(); + CHECK_SET_ERR(expectedActiveTabIndex == actualActiveTabIndex, + QString("There is an incorrect active tab: expected index is %1, actual index is %2") + .arg(expectedActiveTabIndex).arg(actualActiveTabIndex)); + + const QString expectedTabName = "Extract consensus as sequence 2"; + const QString actualTabName = GTUtilsDashboard::getDashboardName(os, expectedActiveTabIndex); + CHECK_SET_ERR(expectedTabName == actualTabName, + QString("Active dashboard has an unexpected name: expect '%1', got '%2'") + .arg(expectedTabName).arg(actualTabName)); + + const QStringList outputFiles = GTUtilsDashboard::getOutputFiles(os); + CHECK_SET_ERR(!outputFiles.isEmpty(), "Active dashboard is not displayed properly"); + + QWidget *dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + +// 8. Click to the "Dashboards manager" button on the toolbar. +// Expected result: the "Dashboards Manager" dialog appears. It contains two items, both of them are checked. Their names are "Extract consensus as sequence 1" and "Extract consensus as sequence 2". +// 9. Close the messagebox. + class Scenario : public CustomScenario { + public: + void run(HI::GUITestOpStatus &os) override { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(nullptr != dialog, "Active modal widget is nullptr"); + + const QList<QPair<QString, bool> > expectedDashboardsState( { qMakePair(QString("Extract consensus as sequence 1"), true), + qMakePair(QString("Extract consensus as sequence 2"), true) } ); + const QList<QPair<QString, bool> > actualDashboardsState = DashboardsManagerDialogFiller::getDashboardsState(os); + + CHECK_SET_ERR(expectedDashboardsState.size() == actualDashboardsState.size(), + QString("Expected dashboards count is not equal to the actual dashboards list size: expected %1, got %2") + .arg(expectedDashboardsState.size()).arg(actualDashboardsState.size())); + + for (int i = 0; i < expectedDashboardsState.size(); ++i) { + const QString expectedDashboardName = expectedDashboardsState[i].first; + const QString actualDashboardName = actualDashboardsState[i].first; + CHECK_SET_ERR(expectedDashboardName == actualDashboardName, + QString("Dashboard number %1 has an unexpected name: expected '%2', got '%3'") + .arg(i).arg(expectedDashboardName).arg(actualDashboardName)); + + const bool expectedDashboardState = expectedDashboardsState[i].second; + const bool actualDashboardState = actualDashboardsState[i].second; + CHECK_SET_ERR(expectedDashboardState == actualDashboardState, + QString("Dashboard number %1 has an unexpected state: it should be %2, but it is '%3'") + .arg(i).arg(expectedDashboardState ? "visible" : "invisible").arg(actualDashboardState ? "visible" : "invisible")); + } + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Cancel); + } + }; + + GTUtilsDialog::waitForDialog(os, new DashboardsManagerDialogFiller(os, new Scenario())); + GTWidget::click(os, dashboardsManagerButton); + +// 10. Switch to another Workflow Designer. + coreLog.info(QString("Try to switch to tab %1(%2)") + .arg(tabIndex1) + .arg(GTUtilsMdi::getTabBar(os)->tabText(tabIndex1))); + GTUtilsMdi::clickTab(os, tabIndex1); + +// Expected result: +// - The Workflow Designer is in the scene view mode. +// - The "Dashboards manager" button on the toolbar is active. + dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + + QWidget *viewSwitchButton2 = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Show dashboard"); + CHECK_SET_ERR(nullptr != viewSwitchButton2 && + viewSwitchButton2->isVisible(), "'Go to Dashboards' is invisible"); + +// 11. Click to the "Dashboards manager" button on the toolbar. +// 12. Cancel the dialog +// Expected result: +// - There are two tabs with dashboards. Their names are "Extract consensus as sequence 1" and "Extract consensus as sequence 2". +// - The "Extract consensus as sequence 2" dashboard is active. +// - The dashboard is correctly displayed. + GTUtilsDialog::waitForDialog(os, new DashboardsManagerDialogFiller(os, new Scenario())); + GTWidget::click(os, dashboardsManagerButton); + +// 13. Click to the "Go to Dashboards" button on the toolbar. +// Expected result: +// - There are two tabs with dashboards. Their names are "Extract consensus as sequence 1" and "Extract consensus as sequence 2". +// - The "Extract consensus as sequence 2" dashboard is active. +// - The dashboard is correctly displayed. + viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), + "Show dashboard")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'Go to Dashboards' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + GTWidget::click(os, viewSwitchButton); + + dashboardsView = GTUtilsDashboard::getTabWidget(os); + CHECK_SET_ERR(nullptr != dashboardsView, "Dashboards view is nullptr"); + + const int expectedTabsCount2 = 2; + const int actualTabsCount2 = dashboardsView->count(); + CHECK_SET_ERR(expectedTabsCount2 == actualTabsCount2, + QString("There is an incorrect count of tabs in the Dashboard View: expected %1, got %2") + .arg(expectedTabsCount2).arg(actualTabsCount2)); + + const int expectedActiveTabIndex2 = 1; + const int actualActiveTabIndex2 = dashboardsView->currentIndex(); + CHECK_SET_ERR(expectedActiveTabIndex2 == actualActiveTabIndex2, + QString("There is an incorrect active tab: expected index is %1, actual index is %2") + .arg(expectedActiveTabIndex2).arg(actualActiveTabIndex2)); + + const QString expectedTabName2 = "Extract consensus as sequence 2"; + const QString actualTabName2 = GTUtilsDashboard::getDashboardName(os, expectedActiveTabIndex2); + CHECK_SET_ERR(expectedTabName2 == actualTabName2, + QString("Active dashboard has an unexpected name: expect '%1', got '%2'") + .arg(expectedTabName2).arg(actualTabName2)); + + const QStringList outputFiles2 = GTUtilsDashboard::getOutputFiles(os); + CHECK_SET_ERR(!outputFiles2.isEmpty(), "Active dashboard is not displayed properly"); + + GTGlobals::sleep(); +} + +GUI_TEST_CLASS_DEFINITION(output_dir_scanning_test_0003) { +// 1. Set "_common_data/workflow/dashboard/workflow_outputs/two_visible_two_invisible" as workflow output folder in the "Application Settings". + const QFileInfo originalWorkflowOutputDir = testDir + "_common_data/workflow/dashboard/workflow_outputs/two_visible_two_invisible"; + const QFileInfo testWorkflowOutputDir = sandBoxDir + "two_visible_two_invisible"; + GTFile::copyDir(os, originalWorkflowOutputDir.absoluteFilePath(), testWorkflowOutputDir.absoluteFilePath()); + setWorkflowOutputDir(os, testWorkflowOutputDir.absoluteFilePath()); + +// 2. Wait for scan task finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + int tabIndex1 = GTUtilsMdi::getCurrentTab(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 4. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + int tabIndex2 = GTUtilsMdi::getCurrentTab(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 5. Click to the "Go to Dashboards" button on the toolbar. + QAbstractButton *viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), + "Show dashboard")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'Go to Dashboards' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + GTWidget::click(os, viewSwitchButton); + +// 6. Set "_common_data/workflow/dashboard/workflow_outputs/one_visible_one_invisible" as workflow output folder in the "Application Settings". + const QFileInfo originalWorkflowOutputDir2 = testDir + "_common_data/workflow/dashboard/workflow_outputs/one_visible_one_invisible"; + const QFileInfo testWorkflowOutputDir2 = sandBoxDir + "one_visible_one_invisible"; + GTFile::copyDir(os, originalWorkflowOutputDir2.absoluteFilePath(), testWorkflowOutputDir2.absoluteFilePath()); + setWorkflowOutputDir(os, testWorkflowOutputDir2.absoluteFilePath()); + +// 7. Wait for scan task finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// Expected result: +// - The Workflow Designer is in the dashboards view mode. +// - There is one tab with a dashboard. Its name is "Extract consensus as sequence 2". +// - The "Extract consensus as sequence 2" dashboard is active. +// - The dashboard is correctly displayed. +// - The "Dashboards manager" button on the toolbar is active. + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + + QString expectedButtonText = "To Workflow Designer"; + QString actualButtonText = viewSwitchButton->text(); + CHECK_SET_ERR(expectedButtonText == actualButtonText, + QString("View switch button has an unexpected text: expected '%1', got '%2'") + .arg(expectedButtonText).arg(actualButtonText)); + + QTabWidget *dashboardsView = GTUtilsDashboard::getTabWidget(os); + CHECK_SET_ERR(nullptr != dashboardsView, "Dashboards view is nullptr"); + + const int expectedTabsCount = 1; + const int actualTabsCount = dashboardsView->count(); + CHECK_SET_ERR(expectedTabsCount == actualTabsCount, + QString("There is an incorrect count of tabs in the Dashboard View: expected %1, got %2") + .arg(expectedTabsCount).arg(actualTabsCount)); + + const int expectedActiveTabIndex = 0; + const int actualActiveTabIndex = dashboardsView->currentIndex(); + CHECK_SET_ERR(expectedActiveTabIndex == actualActiveTabIndex, + QString("There is an incorrect active tab: expected index is %1, actual index is %2") + .arg(expectedActiveTabIndex).arg(actualActiveTabIndex)); + + const QString expectedTabName = "Extract consensus as sequence 2"; + const QString actualTabName = GTUtilsDashboard::getDashboardName(os, expectedActiveTabIndex); + CHECK_SET_ERR(expectedTabName == actualTabName, + QString("Active dashboard has an unexpected name: expect '%1', got '%2'") + .arg(expectedTabName).arg(actualTabName)); + + const QStringList outputFiles = GTUtilsDashboard::getOutputFiles(os); + CHECK_SET_ERR(!outputFiles.isEmpty(), "Active dashboard is not displayed properly"); + + QWidget *dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + +// 8. Click to the "Dashboards manager" button on the toolbar. +// Expected result: the "Dashboards Manager" dialog appears. It contains two items, both of them are checked. Their names are "Extract consensus as sequence 1" and "Extract consensus as sequence 2". +// 9. Close the messagebox. + class Scenario : public CustomScenario { + public: + void run(HI::GUITestOpStatus &os) override { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(nullptr != dialog, "Active modal widget is nullptr"); + + const QList<QPair<QString, bool> > expectedDashboardsState( { qMakePair(QString("Extract consensus as sequence 1"), false), + qMakePair(QString("Extract consensus as sequence 2"), true) } ); + const QList<QPair<QString, bool> > actualDashboardsState = DashboardsManagerDialogFiller::getDashboardsState(os); + + CHECK_SET_ERR(expectedDashboardsState.size() == actualDashboardsState.size(), + QString("Expected dashboards count is not equal to the actual dashboards list size: expected %1, got %2") + .arg(expectedDashboardsState.size()).arg(actualDashboardsState.size())); + + for (int i = 0; i < expectedDashboardsState.size(); ++i) { + const QString expectedDashboardName = expectedDashboardsState[i].first; + const QString actualDashboardName = actualDashboardsState[i].first; + CHECK_SET_ERR(expectedDashboardName == actualDashboardName, + QString("Dashboard number %1 has an unexpected name: expected '%2', got '%3'") + .arg(i).arg(expectedDashboardName).arg(actualDashboardName)); + + const bool expectedDashboardState = expectedDashboardsState[i].second; + const bool actualDashboardState = actualDashboardsState[i].second; + CHECK_SET_ERR(expectedDashboardState == actualDashboardState, + QString("Dashboard number %1 has an unexpected state: it should be %2, but it is '%3'") + .arg(i).arg(expectedDashboardState ? "visible" : "invisible").arg(actualDashboardState ? "visible" : "invisible")); + } + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Cancel); + } + }; + + GTUtilsDialog::waitForDialog(os, new DashboardsManagerDialogFiller(os, new Scenario())); + GTWidget::click(os, dashboardsManagerButton); + +// 10. Switch to another Workflow Designer. + coreLog.info(QString("Try to switch to tab %1(%2)") + .arg(tabIndex1) + .arg(GTUtilsMdi::getTabBar(os)->tabText(tabIndex1))); + GTUtilsMdi::clickTab(os, tabIndex1); + +// Expected result: +// - The Workflow Designer is in the scene view mode. +// - The "Dashboards manager" button on the toolbar is active. + dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + +// 11. Click to the "Dashboards manager" button on the toolbar. +// 12. Cancel the dialog +// Expected result: +// - There are two tabs with dashboards. Their names are "Extract consensus as sequence 1" and "Extract consensus as sequence 2". +// - The "Extract consensus as sequence 2" dashboard is active. +// - The dashboard is correctly displayed. + GTUtilsDialog::waitForDialog(os, new DashboardsManagerDialogFiller(os, new Scenario())); + GTWidget::click(os, dashboardsManagerButton); + +// 13. Click to the "Go to Dashboards" button on the toolbar. +// Expected result: +// - There is one tab with a dashboard. Its name is "Extract consensus as sequence 2". +// - The "Extract consensus as sequence 2" dashboard is active. +// - The dashboard is correctly displayed. + viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), + "Show dashboard")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'Go to Dashboards' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + GTWidget::click(os, viewSwitchButton); + + dashboardsView = GTUtilsDashboard::getTabWidget(os); + CHECK_SET_ERR(nullptr != dashboardsView, "Dashboards view is nullptr"); + + const int expectedTabsCount2 = 1; + const int actualTabsCount2 = dashboardsView->count(); + CHECK_SET_ERR(expectedTabsCount2 == actualTabsCount2, + QString("There is an incorrect count of tabs in the Dashboard View: expected %1, got %2") + .arg(expectedTabsCount2).arg(actualTabsCount2)); + + const int expectedActiveTabIndex2 = 0; + const int actualActiveTabIndex2 = dashboardsView->currentIndex(); + CHECK_SET_ERR(expectedActiveTabIndex2 == actualActiveTabIndex2, + QString("There is an incorrect active tab: expected index is %1, actual index is %2") + .arg(expectedActiveTabIndex2).arg(actualActiveTabIndex2)); + + const QString expectedTabName2 = "Extract consensus as sequence 2"; + const QString actualTabName2 = GTUtilsDashboard::getDashboardName(os, expectedActiveTabIndex2); + CHECK_SET_ERR(expectedTabName2 == actualTabName2, + QString("Active dashboard has an unexpected name: expect '%1', got '%2'") + .arg(expectedTabName2).arg(actualTabName2)); + + const QStringList outputFiles2 = GTUtilsDashboard::getOutputFiles(os); + CHECK_SET_ERR(!outputFiles2.isEmpty(), "Active dashboard is not displayed properly"); + + GTGlobals::sleep(); +} + +GUI_TEST_CLASS_DEFINITION(output_dir_scanning_test_0004) { +// 1. Set "_common_data/workflow/dashboard/workflow_outputs/two_visible_two_invisible" as workflow output folder in the "Application Settings". + const QFileInfo originalWorkflowOutputDir = testDir + "_common_data/workflow/dashboard/workflow_outputs/two_visible_two_invisible"; + const QFileInfo testWorkflowOutputDir = sandBoxDir + "two_visible_two_invisible"; + GTFile::copyDir(os, originalWorkflowOutputDir.absoluteFilePath(), testWorkflowOutputDir.absoluteFilePath()); + setWorkflowOutputDir(os, testWorkflowOutputDir.absoluteFilePath()); + +// 2. Wait for scan task finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + int tabIndex1 = GTUtilsMdi::getCurrentTab(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 4. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + int tabIndex2 = GTUtilsMdi::getCurrentTab(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 5. Click to the "Go to Dashboards" button on the toolbar. + QAbstractButton *viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), + "Show dashboard")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'Go to Dashboards' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + GTWidget::click(os, viewSwitchButton); + +// 6. Set "_common_data/workflow/dashboard/workflow_outputs/two_invisible_dashboards" as workflow output folder in the "Application Settings". + const QFileInfo originalWorkflowOutputDir2 = testDir + "_common_data/workflow/dashboard/workflow_outputs/two_invisible_dashboards"; + const QFileInfo testWorkflowOutputDir2 = sandBoxDir + "two_invisible_dashboards"; + GTFile::copyDir(os, originalWorkflowOutputDir2.absoluteFilePath(), testWorkflowOutputDir2.absoluteFilePath()); + setWorkflowOutputDir(os, testWorkflowOutputDir2.absoluteFilePath()); + +// 7. Wait for scan task finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// Expected result: +// - The Workflow Designer is in the scene view mode. +// - There is no scene/dashboards switch button on the toolbar. +// - The "Dashboards manager" button on the toolbar is active. + CHECK_SET_ERR(!viewSwitchButton->isVisible(), "View switch button is unexpectedly visible"); + + QTabWidget *dashboardsView = GTUtilsDashboard::getTabWidget(os); + CHECK_SET_ERR(nullptr != dashboardsView, "Dashboards view is nullptr"); + + QWidget *dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + +// 8. Click to the "Dashboards manager" button on the toolbar. +// Expected result: the "Dashboards Manager" dialog appears. It contains two items, both of them are unchecked. Their names are "Extract consensus as sequence 1" and "Extract consensus as sequence 2". +// 9. Close the messagebox. + class Scenario : public CustomScenario { + public: + void run(HI::GUITestOpStatus &os) override { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(nullptr != dialog, "Active modal widget is nullptr"); + + const QList<QPair<QString, bool> > expectedDashboardsState( { qMakePair(QString("Extract consensus as sequence 1"), false), + qMakePair(QString("Extract consensus as sequence 2"), false) } ); + const QList<QPair<QString, bool> > actualDashboardsState = DashboardsManagerDialogFiller::getDashboardsState(os); + + CHECK_SET_ERR(expectedDashboardsState.size() == actualDashboardsState.size(), + QString("Expected dashboards count is not equal to the actual dashboards list size: expected %1, got %2") + .arg(expectedDashboardsState.size()).arg(actualDashboardsState.size())); + + for (int i = 0; i < expectedDashboardsState.size(); ++i) { + const QString expectedDashboardName = expectedDashboardsState[i].first; + const QString actualDashboardName = actualDashboardsState[i].first; + CHECK_SET_ERR(expectedDashboardName == actualDashboardName, + QString("Dashboard number %1 has an unexpected name: expected '%2', got '%3'") + .arg(i).arg(expectedDashboardName).arg(actualDashboardName)); + + const bool expectedDashboardState = expectedDashboardsState[i].second; + const bool actualDashboardState = actualDashboardsState[i].second; + CHECK_SET_ERR(expectedDashboardState == actualDashboardState, + QString("Dashboard number %1 has an unexpected state: it should be %2, but it is '%3'") + .arg(i).arg(expectedDashboardState ? "visible" : "invisible").arg(actualDashboardState ? "visible" : "invisible")); + } + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Cancel); + } + }; + + GTUtilsDialog::waitForDialog(os, new DashboardsManagerDialogFiller(os, new Scenario())); + GTWidget::click(os, dashboardsManagerButton); + +// 10. Switch to another Workflow Designer. + coreLog.info(QString("Try to switch to tab %1(%2)") + .arg(tabIndex1) + .arg(GTUtilsMdi::getTabBar(os)->tabText(tabIndex1))); + GTUtilsMdi::clickTab(os, tabIndex1); + +// Expected result: +// - The Workflow Designer is in the scene view mode. +// - There is no scene/dashboards switch button on the toolbar. +// - The "Dashboards manager" button on the toolbar is active. + viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), + "Show dashboard")); + CHECK_SET_ERR(nullptr == viewSwitchButton + || !viewSwitchButton->isVisible(), "View switch button is unexpectedly visible"); + + QTabWidget *dashboardsView2 = GTUtilsDashboard::getTabWidget(os); + CHECK_SET_ERR(nullptr != dashboardsView2, "Dashboards view is nullptr"); + + dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + +// 11. Click to the "Dashboards manager" button on the toolbar. +// 12. Cancel the dialog +// Expected result: +// Expected result: the "Dashboards Manager" dialog appears. It contains two items, both of them are unchecked. Their names are "Extract consensus as sequence 1" and "Extract consensus as sequence 2". + GTUtilsDialog::waitForDialog(os, new DashboardsManagerDialogFiller(os, new Scenario())); + GTWidget::click(os, dashboardsManagerButton); + + GTGlobals::sleep(); +} + +GUI_TEST_CLASS_DEFINITION(output_dir_scanning_test_0005_1) { +// 1. Set "_common_data/workflow/dashboard/workflow_outputs/two_visible_two_invisible" as workflow output folder in the "Application Settings". + const QFileInfo originalWorkflowOutputDir = testDir + "_common_data/workflow/dashboard/workflow_outputs/two_visible_two_invisible"; + const QFileInfo testWorkflowOutputDir = sandBoxDir + "two_visible_two_invisible"; + GTFile::copyDir(os, originalWorkflowOutputDir.absoluteFilePath(), testWorkflowOutputDir.absoluteFilePath()); + setWorkflowOutputDir(os, testWorkflowOutputDir.absoluteFilePath()); + +// 2. Wait for scan task finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + int tabIndex1 = GTUtilsMdi::getCurrentTab(os); + +// 4. Open "Align sequence with MUSCLE" sample. + GTUtilsWorkflowDesigner::addSample(os, "Align sequences with MUSCLE", GTUtilsMdi::activeWindow(os)); + +// 5. Cancel the wizard. + GTKeyboardDriver::keyClick(Qt::Key_Escape); + +// 6. Click to the "Read alignment" element. + GTMouseDriver::moveTo(GTUtilsWorkflowDesigner::getItemCenter(os, "Read alignment")); + GTMouseDriver::click(); + +// 7. Add "_common_data/clustal/200_sequences.aln" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, testDir + "_common_data/clustal/100_sequences.aln"); + +// 8. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + int tabIndex2 = GTUtilsMdi::getCurrentTab(os); + +// 9. Open "Align sequence with MUSCLE" sample. + GTUtilsWorkflowDesigner::addSample(os, "Align sequences with MUSCLE", GTUtilsMdi::activeWindow(os)); + +// 10. Cancel the wizard. + GTKeyboardDriver::keyClick(Qt::Key_Escape); + +// 11. Click to the "Read alignment" element. + GTMouseDriver::moveTo(GTUtilsWorkflowDesigner::getItemCenter(os, "Read alignment")); + GTMouseDriver::click(); + +// 12. Add "_common_data/clustal/200_sequences.aln" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, testDir + "_common_data/clustal/100_sequences.aln"); + +// 13. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + int tabIndex3 = GTUtilsMdi::getCurrentTab(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 14. Click to the "Go to Dashboards" button on the toolbar. + QAbstractButton *viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), + "Show dashboard")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'Go to Dashboards' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + GTWidget::click(os, viewSwitchButton); + +// 15. Switch to first Workflow Designer. + coreLog.info(QString("Try to switch to tab %1(%2)") + .arg(tabIndex1) + .arg(GTUtilsMdi::getTabBar(os)->tabText(tabIndex1))); + GTUtilsMdi::clickTab(os, tabIndex1); + +// 16. Launch the workflow. Do not wait for the task finish. + coreLog.info("Try to start workflow #1"); + GTUtilsWorkflowDesigner::runWorkflow(os); + coreLog.info("It seems that workflow was started"); + +// 17. Switch to the second Workflow Designer. + coreLog.info(QString("Try to switch to tab %1(%2)") + .arg(tabIndex2) + .arg(GTUtilsMdi::getTabBar(os)->tabText(tabIndex2))); + GTUtilsMdi::clickTab(os, tabIndex2); + +// 18. Launch the workflow. Wait for all tasks finish. + coreLog.info("Try to start workflow #2"); + GTUtilsWorkflowDesigner::runWorkflow(os); + coreLog.info("It seems that workflow was started"); + + GTUtilsTaskTreeView::waitTaskFinished(os); + + GTGlobals::sleep(); +} + +GUI_TEST_CLASS_DEFINITION(output_dir_scanning_test_0005) { +// 1. Set "_common_data/workflow/dashboard/workflow_outputs/two_visible_two_invisible" as workflow output folder in the "Application Settings". + const QFileInfo originalWorkflowOutputDir = testDir + "_common_data/workflow/dashboard/workflow_outputs/two_visible_two_invisible"; + const QFileInfo testWorkflowOutputDir = sandBoxDir + "two_visible_two_invisible"; + GTFile::copyDir(os, originalWorkflowOutputDir.absoluteFilePath(), testWorkflowOutputDir.absoluteFilePath()); + setWorkflowOutputDir(os, testWorkflowOutputDir.absoluteFilePath()); + +// 2. Wait for scan task finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + int tabIndex1 = GTUtilsMdi::getCurrentTab(os); + +// 4. Open "Align sequence with MUSCLE" sample. + GTUtilsWorkflowDesigner::addSample(os, "Align sequences with MUSCLE", GTUtilsMdi::activeWindow(os)); + +// 5. Cancel the wizard. + GTKeyboardDriver::keyClick(Qt::Key_Escape); + +// 6. Click to the "Read alignment" element. + GTMouseDriver::moveTo(GTUtilsWorkflowDesigner::getItemCenter(os, "Read alignment")); + GTMouseDriver::click(); + +// 7. Add "_common_data/clustal/200_sequences.aln" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, testDir + "_common_data/clustal/200_sequences.aln"); + +// 8. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + int tabIndex2 = GTUtilsMdi::getCurrentTab(os); + +// 9. Open "Align sequence with MUSCLE" sample. + GTUtilsWorkflowDesigner::addSample(os, "Align sequences with MUSCLE", GTUtilsMdi::activeWindow(os)); + +// 10. Cancel the wizard. + GTKeyboardDriver::keyClick(Qt::Key_Escape); + +// 11. Click to the "Read alignment" element. + GTMouseDriver::moveTo(GTUtilsWorkflowDesigner::getItemCenter(os, "Read alignment")); + GTMouseDriver::click(); + +// 12. Add "_common_data/clustal/200_sequences.aln" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, testDir + "_common_data/clustal/200_sequences.aln"); + +// 13. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + int tabIndex3 = GTUtilsMdi::getCurrentTab(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 14. Click to the "Go to Dashboards" button on the toolbar. + QAbstractButton *viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), + "Show dashboard")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'Go to Dashboards' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + GTWidget::click(os, viewSwitchButton); + +// 15. Switch to first Workflow Designer. + coreLog.info(QString("Try to switch to tab %1(%2)") + .arg(tabIndex1) + .arg(GTUtilsMdi::getTabBar(os)->tabText(tabIndex1))); + GTUtilsMdi::clickTab(os, tabIndex1); + +// 16. Launch the workflow. Do not wait for the task finish. + coreLog.info("Try to start workflow #1"); + GTUtilsWorkflowDesigner::runWorkflow(os); + coreLog.info("It seems that workflow was started"); + +// 17. Switch to the second Workflow Designer. + coreLog.info(QString("Try to switch to tab %1(%2)") + .arg(tabIndex2) + .arg(GTUtilsMdi::getTabBar(os)->tabText(tabIndex2))); + GTUtilsMdi::clickTab(os, tabIndex2); + +// 18. Launch the workflow. Do not wait for the task finish. + coreLog.info("Try to start workflow #2"); + GTUtilsWorkflowDesigner::runWorkflow(os); + coreLog.info("It seems that workflow was started"); + +// 19. Set "_common_data/workflow/dashboard/workflow_outputs/empty_workflow_output" as workflow output folder in the "Application Settings". + const QFileInfo originalWorkflowOutputDir2 = testDir + "_common_data/workflow/dashboard/workflow_outputs/empty_workflow_output"; + const QFileInfo testWorkflowOutputDir2 = sandBoxDir + "empty_workflow_output"; + GTFile::copyDir(os, originalWorkflowOutputDir2.absoluteFilePath(), testWorkflowOutputDir2.absoluteFilePath()); + setWorkflowOutputDir(os, testWorkflowOutputDir2.absoluteFilePath()); + + // Some workaround for mac: after changing workflow output dir the active tab is `Start Page` + // Don't sure that this issue exists (or will not exist in the future) on other OS(s) + // So just switch back to last tab which is tabIndex2 + GTUtilsMdi::clickTab(os, tabIndex2); + +// 20. Wait for all tasks finish. The scan task is supposed to finish before align tasks. +// Expected result: +// - The Workflow Designer is in the dashboards view mode. +// - There are two dashboard tabs. Their names are "Align sequence with MUSCLE 2" and "Align sequence with MUSCLE 1". +// - The "Align sequence with MUSCLE 2" dashboard is active. +// - The "Dashboards manager" button on the toolbar is active. + GTUtilsTaskTreeView::waitTaskFinished(os, 600000); + + viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, + MWTOOLBAR_ACTIVEMDI), + "Show workflow")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'To Workflow Designer' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + + QString expectedButtonText = "To Workflow Designer"; + QString actualButtonText = viewSwitchButton->text(); + CHECK_SET_ERR(expectedButtonText == actualButtonText, + QString("View switch button has an unexpected text: expected '%1', got '%2'") + .arg(expectedButtonText).arg(actualButtonText)); + + coreLog.info("Trying get GTUtilsDashboard::getTabWidget(os)"); + QTabWidget *dashboardsView = GTUtilsDashboard::getTabWidget(os); + CHECK_SET_ERR(nullptr != dashboardsView, "Dashboards view is nullptr"); + coreLog.info("Successfully got GTUtilsDashboard::getTabWidget(os)"); + + int expectedTabsCount = 2; + int actualTabsCount = dashboardsView->count(); + CHECK_SET_ERR(expectedTabsCount == actualTabsCount, + QString("There is an incorrect count of tabs in the Dashboard View: expected %1, got %2") + .arg(expectedTabsCount).arg(actualTabsCount)); + + int expectedActiveTabIndex = 0; + int actualActiveTabIndex = dashboardsView->currentIndex(); + CHECK_SET_ERR(expectedActiveTabIndex == actualActiveTabIndex, + QString("There is an incorrect active tab: expected index is %1, actual index is %2") + .arg(expectedActiveTabIndex).arg(actualActiveTabIndex)); + + QString expectedTabName = "Align sequences with MUSCLE 2"; + QString actualTabName = GTUtilsDashboard::getDashboardName(os, actualActiveTabIndex); + CHECK_SET_ERR(expectedTabName == actualTabName, + QString("Active dashboard has an unexpected name: expect '%1', got '%2'") + .arg(expectedTabName).arg(actualTabName)); + + QStringList outputFiles = GTUtilsDashboard::getOutputFiles(os); + CHECK_SET_ERR(!outputFiles.isEmpty(), "Active dashboard is not displayed properly"); + + QWidget *dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + +// 21. Click to the "Dashboards manager" button on the toolbar. +// Expected result: the "Dashboards Manager" dialog appears. It contains two items, both of them are checked. Their names are "Align sequence with MUSCLE 1" and "Align sequence with MUSCLE 2". +// 22. Cancel the dialog + class Scenario : public CustomScenario { + public: + void run(HI::GUITestOpStatus &os) override { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(nullptr != dialog, "Active modal widget is nullptr"); + + const QList<QPair<QString, bool> > expectedDashboardsState( { qMakePair(QString("Align sequences with MUSCLE 1"), true), + qMakePair(QString("Align sequences with MUSCLE 2"), true) } ); + const QList<QPair<QString, bool> > actualDashboardsState = DashboardsManagerDialogFiller::getDashboardsState(os); + + CHECK_SET_ERR(expectedDashboardsState.size() == actualDashboardsState.size(), + QString("Expected dashboards count is not equal to the actual dashboards list size: expected %1, got %2") + .arg(expectedDashboardsState.size()).arg(actualDashboardsState.size())); + + for (int i = 0; i < expectedDashboardsState.size(); ++i) { + const QString expectedDashboardName = expectedDashboardsState[i].first; + const QString actualDashboardName = actualDashboardsState[i].first; + CHECK_SET_ERR(expectedDashboardName == actualDashboardName, + QString("Dashboard number %1 has an unexpected name: expected '%2', got '%3'") + .arg(i).arg(expectedDashboardName).arg(actualDashboardName)); + + const bool expectedDashboardState = expectedDashboardsState[i].second; + const bool actualDashboardState = actualDashboardsState[i].second; + CHECK_SET_ERR(expectedDashboardState == actualDashboardState, + QString("Dashboard number %1 has an unexpected state: it should be %2, but it is '%3'") + .arg(i).arg(expectedDashboardState ? "visible" : "invisible").arg(actualDashboardState ? "visible" : "invisible")); + } + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Cancel); + } + }; + + GTUtilsDialog::waitForDialog(os, new DashboardsManagerDialogFiller(os, new Scenario())); + GTWidget::click(os, dashboardsManagerButton); + +// 23. Switch to the first Workflow Designer. +// Expected result: +// - The Workflow Designer is in the dashboards view mode. +// - There are two dashboard tabs. Their names are "Align sequence with MUSCLE 1" and "Align sequence with MUSCLE 2". +// - The "Align sequence with MUSCLE 1" dashboard is active. +// - The "Dashboards manager" button on the toolbar is active. + coreLog.info(QString("Try to switch to tab %1(%2)") + .arg(tabIndex1) + .arg(GTUtilsMdi::getTabBar(os)->tabText(tabIndex1))); + GTUtilsMdi::clickTab(os, tabIndex1); + GTUtilsTaskTreeView::waitTaskFinished(os); + + viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, + MWTOOLBAR_ACTIVEMDI), + "Show workflow")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'To Workflow Designer' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + + expectedButtonText = "To Workflow Designer"; + actualButtonText = viewSwitchButton->text(); + CHECK_SET_ERR(expectedButtonText == actualButtonText, + QString("View switch button has an unexpected text: expected '%1', got '%2'") + .arg(expectedButtonText).arg(actualButtonText)); + + coreLog.info("Trying get GTUtilsDashboard::getTabWidget(os)"); + dashboardsView = GTUtilsDashboard::getTabWidget(os); + CHECK_SET_ERR(nullptr != dashboardsView, "Dashboards view is nullptr"); + coreLog.info("Successfully got GTUtilsDashboard::getTabWidget(os)"); + + expectedTabsCount = 2; + actualTabsCount = dashboardsView->count(); + CHECK_SET_ERR(expectedTabsCount == actualTabsCount, + QString("There is an incorrect count of tabs in the Dashboard View: expected %1, got %2") + .arg(expectedTabsCount).arg(actualTabsCount)); + + expectedActiveTabIndex = 0; + actualActiveTabIndex = dashboardsView->currentIndex(); + CHECK_SET_ERR(expectedActiveTabIndex == actualActiveTabIndex, + QString("There is an incorrect active tab: expected index is %1, actual index is %2") + .arg(expectedActiveTabIndex).arg(actualActiveTabIndex)); + + expectedTabName = "Align sequences with MUSCLE 1"; + actualTabName = GTUtilsDashboard::getDashboardName(os, actualActiveTabIndex); + CHECK_SET_ERR(expectedTabName == actualTabName, + QString("Active dashboard has an unexpected name: expect '%1', got '%2'") + .arg(expectedTabName).arg(actualTabName)); + + outputFiles = GTUtilsDashboard::getOutputFiles(os); + CHECK_SET_ERR(!outputFiles.isEmpty(), "Active dashboard is not displayed properly"); + + dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + +// 24. Click to the "Dashboards manager" button on the toolbar. +// Expected result: +// - the "Dashboards Manager" dialog appears. +// It contains two items, both of them are checked. +// Their names are "Align sequence with MUSCLE 1" and "Align sequence with MUSCLE 2". +// 25. Cancel the dialog + GTUtilsDialog::waitForDialog(os, new DashboardsManagerDialogFiller(os, new Scenario())); + GTWidget::click(os, dashboardsManagerButton); + +// 26. Switch to the third Workflow Designer. +// Expected result: +// - The Workflow Designer is in the scene view mode. +// - The "Dashboards manager" button on the toolbar is active. + coreLog.info(QString("Try to switch to tab %1(%2)") + .arg(tabIndex3) + .arg(GTUtilsMdi::getTabBar(os)->tabText(tabIndex3))); + GTUtilsMdi::clickTab(os, tabIndex3); + + dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + + viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), + "Show dashboard")); + CHECK_SET_ERR(nullptr != viewSwitchButton && + viewSwitchButton->isVisible(), "'Go to Dashboards' is invisible"); + +// 27. Click to the "Dashboards manager" button on the toolbar. +// Expected result: +// - the "Dashboards Manager" dialog appears. +// - It contains two items, both of them are checked. +// - Their names are "Align sequence with MUSCLE 1" and "Align sequence with MUSCLE 2". +// 28. Cancel the dialog. + GTUtilsDialog::waitForDialog(os, new DashboardsManagerDialogFiller(os, new Scenario())); + GTWidget::click(os, dashboardsManagerButton); + +// 29. Click to the "Go to Dashboards" button on the toolbar. +// Expected result: +// - There are two dashboard tabs. +// Their names are "Align sequence with MUSCLE 1" and "Align sequence with MUSCLE 2" (warning: two last tabs can be swapped, +// it depends on the task finish order, it is a correct situation). +// - The first dashboard is active. + viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), + "Show dashboard")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'Go to Dashboards' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + GTWidget::click(os, viewSwitchButton); + + coreLog.info("Trying get GTUtilsDashboard::getTabWidget(os)"); + dashboardsView = GTUtilsDashboard::getTabWidget(os); + CHECK_SET_ERR(nullptr != dashboardsView, "Dashboards view is nullptr"); + coreLog.info("Successfully got GTUtilsDashboard::getTabWidget(os)"); + + expectedTabsCount = 2; + actualTabsCount = dashboardsView->count(); + CHECK_SET_ERR(expectedTabsCount == actualTabsCount, + QString("There is an incorrect count of tabs in the Dashboard View: expected %1, got %2") + .arg(expectedTabsCount).arg(actualTabsCount)); + + expectedActiveTabIndex = 0; + actualActiveTabIndex = dashboardsView->currentIndex(); + CHECK_SET_ERR(expectedActiveTabIndex == actualActiveTabIndex, + QString("There is an incorrect active tab: expected index is %1, actual index is %2") + .arg(expectedActiveTabIndex).arg(actualActiveTabIndex)); + + expectedTabName = "Align sequences with MUSCLE 1"; + actualTabName = GTUtilsDashboard::getDashboardName(os, actualActiveTabIndex); + CHECK_SET_ERR(expectedTabName == actualTabName, + QString("Active dashboard has an unexpected name: expect '%1', got '%2'") + .arg(expectedTabName).arg(actualTabName)); + + GTGlobals::sleep(); +} + +GUI_TEST_CLASS_DEFINITION(output_dir_scanning_test_0006) { +// 1. Set "_common_data/workflow/dashboard/workflow_outputs/two_visible_two_invisible" as workflow output folder in the "Application Settings". + const QFileInfo originalWorkflowOutputDir = testDir + "_common_data/workflow/dashboard/workflow_outputs/two_visible_two_invisible"; + const QFileInfo testWorkflowOutputDir = sandBoxDir + "two_visible_two_invisible"; + GTFile::copyDir(os, originalWorkflowOutputDir.absoluteFilePath(), testWorkflowOutputDir.absoluteFilePath()); + setWorkflowOutputDir(os, testWorkflowOutputDir.absoluteFilePath()); + +// 2. Wait for scan task finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + int tabIndex1 = GTUtilsMdi::getCurrentTab(os); + +// 4. Open "Align sequence with MUSCLE" sample. + GTUtilsWorkflowDesigner::addSample(os, "Align sequences with MUSCLE", GTUtilsMdi::activeWindow(os)); + +// 5. Cancel the wizard. + GTKeyboardDriver::keyClick(Qt::Key_Escape); + +// 6. Click to the "Read alignment" element. + GTMouseDriver::moveTo(GTUtilsWorkflowDesigner::getItemCenter(os, "Read alignment")); + GTMouseDriver::click(); + +// 7. Add "_common_data/clustal/200_sequences.aln" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, testDir + "_common_data/clustal/200_sequences.aln"); + +// 8. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + int tabIndex2 = GTUtilsMdi::getCurrentTab(os); + +// 9. Open "Align sequence with MUSCLE" sample. + GTUtilsWorkflowDesigner::addSample(os, "Align sequences with MUSCLE", GTUtilsMdi::activeWindow(os)); + +// 10. Cancel the wizard. + GTKeyboardDriver::keyClick(Qt::Key_Escape); + +// 11. Click to the "Read alignment" element. + GTMouseDriver::moveTo(GTUtilsWorkflowDesigner::getItemCenter(os, "Read alignment")); + GTMouseDriver::click(); + +// 12. Add "_common_data/clustal/200_sequences.aln" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, testDir + "_common_data/clustal/200_sequences.aln"); + +// 13. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + int tabIndex3 = GTUtilsMdi::getCurrentTab(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 14. Click to the "Go to Dashboards" button on the toolbar. + QAbstractButton *viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), + "Show dashboard")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'Go to Dashboards' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + GTWidget::click(os, viewSwitchButton); + +// 15. Switch to first Workflow Designer. + coreLog.info(QString("Try to switch to tab %1(%2)") + .arg(tabIndex1) + .arg(GTUtilsMdi::getTabBar(os)->tabText(tabIndex1))); + GTUtilsMdi::clickTab(os, tabIndex1); + +// 16. Launch the workflow. Do not wait for the task finish. + coreLog.info("Try to start workflow #1"); + GTUtilsWorkflowDesigner::runWorkflow(os); + coreLog.info("It seems that workflow was started"); + +// 17. Switch to the second Workflow Designer. + coreLog.info(QString("Try to switch to tab %1(%2)") + .arg(tabIndex2) + .arg(GTUtilsMdi::getTabBar(os)->tabText(tabIndex2))); + GTUtilsMdi::clickTab(os, tabIndex2); + +// 18. Launch the workflow. Do not wait for the task finish. + coreLog.info("Try to start workflow #2"); + GTUtilsWorkflowDesigner::runWorkflow(os); + coreLog.info("It seems that workflow was started"); + +// 19. Set "_common_data/workflow/dashboard/workflow_outputs/two_visible_dashboards" as workflow output folder in the "Application Settings". + const QFileInfo originalWorkflowOutputDir2 = testDir + "_common_data/workflow/dashboard/workflow_outputs/two_visible_dashboards"; + const QFileInfo testWorkflowOutputDir2 = sandBoxDir + "two_visible_dashboards"; + GTFile::copyDir(os, originalWorkflowOutputDir2.absoluteFilePath(), testWorkflowOutputDir2.absoluteFilePath()); + setWorkflowOutputDir(os, testWorkflowOutputDir2.absoluteFilePath()); + + // Some workaround for mac: after changing workflow output dir the active tab is `Start Page` + // Don't sure that this issue exists (or will not exist in the future) on other OS(s) + // So just switch back to last tab which is tabIndex2 + GTUtilsMdi::clickTab(os, tabIndex2); + +// 20. Wait for all tasks finish. The scan task is supposed to finish before align tasks. +// Expected result: +// - The Workflow Designer is in the dashboards view mode. +// - There are 4 dashboard tabs. +// Their names are "Align sequence with MUSCLE 2", +// "Extract consensus as sequence 1", +// "Extract consensus as sequence 2", +// "Align sequence with MUSCLE 1". +// - The "Align sequence with MUSCLE 2" dashboard is active. +// - The "Dashboards manager" button on the toolbar is active. + GTUtilsTaskTreeView::waitTaskFinished(os, 600000); + + viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, + MWTOOLBAR_ACTIVEMDI), + "Show workflow")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'To Workflow Designer' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + + QString expectedButtonText = "To Workflow Designer"; + QString actualButtonText = viewSwitchButton->text(); + CHECK_SET_ERR(expectedButtonText == actualButtonText, + QString("View switch button has an unexpected text: expected '%1', got '%2'") + .arg(expectedButtonText).arg(actualButtonText)); + + coreLog.info("Trying get GTUtilsDashboard::getTabWidget(os)"); + QTabWidget *dashboardsView = GTUtilsDashboard::getTabWidget(os); + CHECK_SET_ERR(nullptr != dashboardsView, "Dashboards view is nullptr"); + coreLog.info("Successfully got GTUtilsDashboard::getTabWidget(os)"); + + int expectedTabsCount = 4; + int actualTabsCount = dashboardsView->count(); + CHECK_SET_ERR(expectedTabsCount == actualTabsCount, + QString("There is an incorrect count of tabs in the Dashboard View: expected %1, got %2") + .arg(expectedTabsCount).arg(actualTabsCount)); + + int expectedActiveTabIndex = 0; + int actualActiveTabIndex = dashboardsView->currentIndex(); + CHECK_SET_ERR(expectedActiveTabIndex == actualActiveTabIndex, + QString("There is an incorrect active tab: expected index is %1, actual index is %2") + .arg(expectedActiveTabIndex).arg(actualActiveTabIndex)); + + QString expectedTabName = "Align sequences with MUSCLE 2"; + QString actualTabName = GTUtilsDashboard::getDashboardName(os, actualActiveTabIndex); + CHECK_SET_ERR(expectedTabName == actualTabName, + QString("Active dashboard has an unexpected name: expect '%1', got '%2'") + .arg(expectedTabName).arg(actualTabName)); + + QStringList outputFiles = GTUtilsDashboard::getOutputFiles(os); + CHECK_SET_ERR(!outputFiles.isEmpty(), "Active dashboard is not displayed properly"); + + QWidget *dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + +// 21. Click to the "Dashboards manager" button on the toolbar. +// Expected result: the "Dashboards Manager" dialog appears. It contains four items, all of them are checked. Their names are "Extract consensus as sequence 1", "Extract consensus as sequence 2", "Align sequence with MUSCLE 1", "Align sequence with MUSCLE 2". +// 22. Cancel the dialog + class Scenario : public CustomScenario { + public: + static bool sorting(const QPair<QString, bool>& e1, const QPair<QString, bool>& e2) { + if (e1.first < e2.first) return true; + return false; + } + + void run(HI::GUITestOpStatus &os) override { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(nullptr != dialog, "Active modal widget is nullptr"); + + QList<QPair<QString, bool> > expectedDashboardsState({ + qMakePair(QString("Align sequences with MUSCLE 1"), true), + qMakePair(QString("Align sequences with MUSCLE 2"), true), + qMakePair(QString("Extract consensus as sequence 1"), true), + qMakePair(QString("Extract consensus as sequence 2"), true) + }); + qSort(expectedDashboardsState.begin(), expectedDashboardsState.end(), sorting); + + QList<QPair<QString, bool> > actualDashboardsState = DashboardsManagerDialogFiller::getDashboardsState(os); + qSort(actualDashboardsState.begin(), actualDashboardsState.end(), sorting); + + CHECK_SET_ERR(expectedDashboardsState.size() == actualDashboardsState.size(), + QString("Expected dashboards count is not equal to the actual dashboards list size: expected %1, got %2") + .arg(expectedDashboardsState.size()).arg(actualDashboardsState.size())); + + for (int i = 0; i < expectedDashboardsState.size(); ++i) { + const QString expectedDashboardName = expectedDashboardsState[i].first; + const QString actualDashboardName = actualDashboardsState[i].first; + CHECK_SET_ERR(expectedDashboardName == actualDashboardName, + QString("Dashboard number %1 has an unexpected name: expected '%2', got '%3'") + .arg(i).arg(expectedDashboardName).arg(actualDashboardName)); + + const bool expectedDashboardState = expectedDashboardsState[i].second; + const bool actualDashboardState = actualDashboardsState[i].second; + CHECK_SET_ERR(expectedDashboardState == actualDashboardState, + QString("Dashboard number %1 has an unexpected state: it should be %2, but it is '%3'") + .arg(i).arg(expectedDashboardState ? "visible" : "invisible").arg(actualDashboardState ? "visible" : "invisible")); + } + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Cancel); + } + }; + + GTUtilsDialog::waitForDialog(os, new DashboardsManagerDialogFiller(os, new Scenario())); + GTWidget::click(os, dashboardsManagerButton); + +// 23. Switch to the first Workflow Designer. +// Expected result: +// - The Workflow Designer is in the dashboards view mode. +// - There are four dashboard tabs. Their names are "Align sequence with MUSCLE 1", "Extract consensus as sequence 1", "Extract consensus as sequence 2", "Align sequence with MUSCLE 2". +// - The "Align sequence with MUSCLE 1" dashboard is active. +// - The "Dashboards manager" button on the toolbar is active. + coreLog.info(QString("Try to switch to tab %1(%2)") + .arg(tabIndex1) + .arg(GTUtilsMdi::getTabBar(os)->tabText(tabIndex1))); + GTUtilsMdi::clickTab(os, tabIndex1); + GTUtilsTaskTreeView::waitTaskFinished(os); + + viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, + MWTOOLBAR_ACTIVEMDI), + "Show workflow")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'To Workflow Designer' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + + expectedButtonText = "To Workflow Designer"; + actualButtonText = viewSwitchButton->text(); + CHECK_SET_ERR(expectedButtonText == actualButtonText, + QString("View switch button has an unexpected text: expected '%1', got '%2'") + .arg(expectedButtonText).arg(actualButtonText)); + + coreLog.info("Trying get GTUtilsDashboard::getTabWidget(os)"); + dashboardsView = GTUtilsDashboard::getTabWidget(os); + CHECK_SET_ERR(nullptr != dashboardsView, "Dashboards view is nullptr"); + coreLog.info("Successfully got GTUtilsDashboard::getTabWidget(os)"); + + expectedTabsCount = 4; + actualTabsCount = dashboardsView->count(); + CHECK_SET_ERR(expectedTabsCount == actualTabsCount, + QString("There is an incorrect count of tabs in the Dashboard View: expected %1, got %2") + .arg(expectedTabsCount).arg(actualTabsCount)); + + expectedActiveTabIndex = 0; + actualActiveTabIndex = dashboardsView->currentIndex(); + CHECK_SET_ERR(expectedActiveTabIndex == actualActiveTabIndex, + QString("There is an incorrect active tab: expected index is %1, actual index is %2") + .arg(expectedActiveTabIndex).arg(actualActiveTabIndex)); + + expectedTabName = "Align sequences with MUSCLE 1"; + actualTabName = GTUtilsDashboard::getDashboardName(os, actualActiveTabIndex); + CHECK_SET_ERR(expectedTabName == actualTabName, + QString("Active dashboard has an unexpected name: expect '%1', got '%2'") + .arg(expectedTabName).arg(actualTabName)); + + outputFiles = GTUtilsDashboard::getOutputFiles(os); + CHECK_SET_ERR(!outputFiles.isEmpty(), "Active dashboard is not displayed properly"); + + dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + +// 24. Click to the "Dashboards manager" button on the toolbar. +// Expected result: +// - the "Dashboards Manager" dialog appears. +// It contains 4 items, all of them are checked. +// Their names are "Extract consensus as sequence 1", "Extract consensus as sequence 2", "Align sequence with MUSCLE 1", "Align sequence with MUSCLE 2". +// 25. Cancel the dialog + GTUtilsDialog::waitForDialog(os, new DashboardsManagerDialogFiller(os, new Scenario())); + GTWidget::click(os, dashboardsManagerButton); + +// 26. Switch to the third Workflow Designer. +// Expected result: +// - The Workflow Designer is in the dashboard view mode. +// - The "Dashboards manager" button on the toolbar is active. +// - There are four dashboard tabs. Their names are "Extract consensus as sequence 1", "Extract consensus as sequence 2", "Align sequence with MUSCLE 1", "Align sequence with MUSCLE 2" (warning: two last tabs can be swapped, it depends on the task finish order, it is a correct situation). +// - The "Extract consensus as sequence 2" dashboard is active. + coreLog.info(QString("Try to switch to tab %1(%2)") + .arg(tabIndex3) + .arg(GTUtilsMdi::getTabBar(os)->tabText(tabIndex3))); + GTUtilsMdi::clickTab(os, tabIndex3); + GTUtilsTaskTreeView::waitTaskFinished(os); + + viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Show workflow")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'To Workflow Designer' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + + expectedButtonText = "To Workflow Designer"; + actualButtonText = viewSwitchButton->text(); + CHECK_SET_ERR(expectedButtonText == actualButtonText, + QString("View switch button has an unexpected text: expected '%1', got '%2'") + .arg(expectedButtonText).arg(actualButtonText)); + + coreLog.info("Trying get GTUtilsDashboard::getTabWidget(os)"); + dashboardsView = GTUtilsDashboard::getTabWidget(os); + CHECK_SET_ERR(nullptr != dashboardsView, "Dashboards view is nullptr"); + coreLog.info("Successfully got GTUtilsDashboard::getTabWidget(os)"); + + expectedTabsCount = 4; + actualTabsCount = dashboardsView->count(); + CHECK_SET_ERR(expectedTabsCount == actualTabsCount, + QString("There is an incorrect count of tabs in the Dashboard View: expected %1, got %2") + .arg(expectedTabsCount).arg(actualTabsCount)); + + actualActiveTabIndex = dashboardsView->currentIndex(); + CHECK_SET_ERR(actualActiveTabIndex >=0 && actualActiveTabIndex < expectedTabsCount, + QString("There is an incorrect active tab: expected index is %1, actual index is %2") + .arg(expectedActiveTabIndex).arg(actualActiveTabIndex)); + + expectedTabName = "Extract consensus as sequence 2"; + actualTabName = GTUtilsDashboard::getDashboardName(os, actualActiveTabIndex); + CHECK_SET_ERR(expectedTabName == actualTabName, + QString("Active dashboard has an unexpected name: expect '%1', got '%2'") + .arg(expectedTabName).arg(actualTabName)); + + outputFiles = GTUtilsDashboard::getOutputFiles(os); + CHECK_SET_ERR(!outputFiles.isEmpty(), "Active dashboard is not displayed properly"); + + dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + +// 27. Click to the "Dashboards manager" button on the toolbar. +// Expected result: +// - the "Dashboards Manager" dialog appears. +// - It contains two items, both of them are checked. +// - Their names are "Align sequence with MUSCLE 1" and "Align sequence with MUSCLE 2". +// 28. Cancel the dialog. + GTUtilsDialog::waitForDialog(os, new DashboardsManagerDialogFiller(os, new Scenario())); + GTWidget::click(os, dashboardsManagerButton); + + + GTGlobals::sleep(); +} + +GUI_TEST_CLASS_DEFINITION(output_dir_scanning_test_0007) { +// 1. Set "_common_data/workflow/dashboard/workflow_outputs/two_visible_two_invisible" as workflow output folder in the "Application Settings". + const QFileInfo originalWorkflowOutputDir = testDir + "_common_data/workflow/dashboard/workflow_outputs/two_visible_two_invisible"; + const QFileInfo testWorkflowOutputDir = sandBoxDir + "two_visible_two_invisible"; + GTFile::copyDir(os, originalWorkflowOutputDir.absoluteFilePath(), testWorkflowOutputDir.absoluteFilePath()); + setWorkflowOutputDir(os, testWorkflowOutputDir.absoluteFilePath()); + +// 2. Wait for scan task finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + int tabIndex1 = GTUtilsMdi::getCurrentTab(os); + +// 4. Open "Align sequence with MUSCLE" sample. + GTUtilsWorkflowDesigner::addSample(os, "Align sequences with MUSCLE", GTUtilsMdi::activeWindow(os)); + +// 5. Cancel the wizard. + GTKeyboardDriver::keyClick(Qt::Key_Escape); + +// 6. Click to the "Read alignment" element. + GTMouseDriver::moveTo(GTUtilsWorkflowDesigner::getItemCenter(os, "Read alignment")); + GTMouseDriver::click(); + +// 7. Add "_common_data/clustal/200_sequences.aln" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, testDir + "_common_data/clustal/200_sequences.aln"); + +// 8. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + int tabIndex2 = GTUtilsMdi::getCurrentTab(os); + +// 9. Open "Align sequence with MUSCLE" sample. + GTUtilsWorkflowDesigner::addSample(os, "Align sequences with MUSCLE", GTUtilsMdi::activeWindow(os)); + +// 10. Cancel the wizard. + GTKeyboardDriver::keyClick(Qt::Key_Escape); + +// 11. Click to the "Read alignment" element. + GTMouseDriver::moveTo(GTUtilsWorkflowDesigner::getItemCenter(os, "Read alignment")); + GTMouseDriver::click(); + +// 12. Add "_common_data/clustal/200_sequences.aln" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, testDir + "_common_data/clustal/200_sequences.aln"); + +// 13. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + int tabIndex3 = GTUtilsMdi::getCurrentTab(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 14. Click to the "Go to Dashboards" button on the toolbar. + QAbstractButton *viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), + "Show dashboard")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'Go to Dashboards' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + GTWidget::click(os, viewSwitchButton); + +// 15. Switch to first Workflow Designer. + coreLog.info(QString("Try to switch to tab %1(%2)") + .arg(tabIndex1) + .arg(GTUtilsMdi::getTabBar(os)->tabText(tabIndex1))); + GTUtilsMdi::clickTab(os, tabIndex1); + +// 16. Launch the workflow. Do not wait for the task finish. + coreLog.info("Try to start workflow #1"); + GTUtilsWorkflowDesigner::runWorkflow(os); + coreLog.info("It seems that workflow was started"); + +// 17. Switch to the second Workflow Designer. + coreLog.info(QString("Try to switch to tab %1(%2)") + .arg(tabIndex2) + .arg(GTUtilsMdi::getTabBar(os)->tabText(tabIndex2))); + GTUtilsMdi::clickTab(os, tabIndex2); + +// 18. Launch the workflow. Do not wait for the task finish. + coreLog.info("Try to start workflow #2"); + GTUtilsWorkflowDesigner::runWorkflow(os); + coreLog.info("It seems that workflow was started"); + +// 19. Set "_common_data/workflow/dashboard/workflow_outputs/one_visible_one_invisible" as workflow output folder in the "Application Settings". + const QFileInfo originalWorkflowOutputDir2 = testDir + "_common_data/workflow/dashboard/workflow_outputs/one_visible_one_invisible"; + const QFileInfo testWorkflowOutputDir2 = sandBoxDir + "one_visible_one_invisible"; + GTFile::copyDir(os, originalWorkflowOutputDir2.absoluteFilePath(), testWorkflowOutputDir2.absoluteFilePath()); + setWorkflowOutputDir(os, testWorkflowOutputDir2.absoluteFilePath()); + + // Some workaround for mac: after changing workflow output dir the active tab is `Start Page` + // Don't sure that this issue exists (or will not exist in the future) on other OS(s) + // So just switch back to last tab which is tabIndex2 + GTUtilsMdi::clickTab(os, tabIndex2); + +// 20. Wait for all tasks finish. The scan task is supposed to finish before align tasks. +// Expected result: +// - The Workflow Designer is in the dashboards view mode. +// - There are 3 dashboard tabs. +// Their names are "Align sequence with MUSCLE 2", +// "Extract consensus as sequence 2", +// "Align sequence with MUSCLE 1". +// - The "Align sequence with MUSCLE 2" dashboard is active. +// - The "Dashboards manager" button on the toolbar is active. + GTUtilsTaskTreeView::waitTaskFinished(os, 600000); + + viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, + MWTOOLBAR_ACTIVEMDI), + "Show workflow")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'To Workflow Designer' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + + QString expectedButtonText = "To Workflow Designer"; + QString actualButtonText = viewSwitchButton->text(); + CHECK_SET_ERR(expectedButtonText == actualButtonText, + QString("View switch button has an unexpected text: expected '%1', got '%2'") + .arg(expectedButtonText).arg(actualButtonText)); + + coreLog.info("Trying get GTUtilsDashboard::getTabWidget(os)"); + QTabWidget *dashboardsView = GTUtilsDashboard::getTabWidget(os); + CHECK_SET_ERR(nullptr != dashboardsView, "Dashboards view is nullptr"); + coreLog.info("Successfully got GTUtilsDashboard::getTabWidget(os)"); + + int expectedTabsCount = 3; + int actualTabsCount = dashboardsView->count(); + CHECK_SET_ERR(expectedTabsCount == actualTabsCount, + QString("There is an incorrect count of tabs in the Dashboard View: expected %1, got %2") + .arg(expectedTabsCount).arg(actualTabsCount)); + + int expectedActiveTabIndex = 0; + int actualActiveTabIndex = dashboardsView->currentIndex(); + CHECK_SET_ERR(expectedActiveTabIndex == actualActiveTabIndex, + QString("There is an incorrect active tab: expected index is %1, actual index is %2") + .arg(expectedActiveTabIndex).arg(actualActiveTabIndex)); + + QString expectedTabName = "Align sequences with MUSCLE 2"; + QString actualTabName = GTUtilsDashboard::getDashboardName(os, actualActiveTabIndex); + CHECK_SET_ERR(expectedTabName == actualTabName, + QString("Active dashboard has an unexpected name: expect '%1', got '%2'") + .arg(expectedTabName).arg(actualTabName)); + + QStringList outputFiles = GTUtilsDashboard::getOutputFiles(os); + CHECK_SET_ERR(!outputFiles.isEmpty(), "Active dashboard is not displayed properly"); + + QWidget *dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + +// 21. Click to the "Dashboards manager" button on the toolbar. +// Expected result: the "Dashboards Manager" dialog appears. It contains 3 items, not all of them are checked. Their names are "Extract consensus as sequence 1", "Extract consensus as sequence 2", "Align sequence with MUSCLE 1", "Align sequence with MUSCLE 2". +// 22. Cancel the dialog + class Scenario : public CustomScenario { + public: + static bool sorting(const QPair<QString, bool>& e1, const QPair<QString, bool>& e2) { + if (e1.first < e2.first) return true; + return false; + } + + void run(HI::GUITestOpStatus &os) override { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(nullptr != dialog, "Active modal widget is nullptr"); + + QList<QPair<QString, bool> > expectedDashboardsState({ + qMakePair(QString("Align sequences with MUSCLE 1"), true), + qMakePair(QString("Align sequences with MUSCLE 2"), true), + qMakePair(QString("Extract consensus as sequence 1"), false), + qMakePair(QString("Extract consensus as sequence 2"), true) + }); + qSort(expectedDashboardsState.begin(), expectedDashboardsState.end(), sorting); + + QList<QPair<QString, bool> > actualDashboardsState = DashboardsManagerDialogFiller::getDashboardsState(os); + qSort(actualDashboardsState.begin(), actualDashboardsState.end(), sorting); + + CHECK_SET_ERR(expectedDashboardsState.size() == actualDashboardsState.size(), + QString("Expected dashboards count is not equal to the actual dashboards list size: expected %1, got %2") + .arg(expectedDashboardsState.size()).arg(actualDashboardsState.size())); + + for (int i = 0; i < expectedDashboardsState.size(); ++i) { + const QString expectedDashboardName = expectedDashboardsState[i].first; + const QString actualDashboardName = actualDashboardsState[i].first; + CHECK_SET_ERR(expectedDashboardName == actualDashboardName, + QString("Dashboard number %1 has an unexpected name: expected '%2', got '%3'") + .arg(i).arg(expectedDashboardName).arg(actualDashboardName)); + + const bool expectedDashboardState = expectedDashboardsState[i].second; + const bool actualDashboardState = actualDashboardsState[i].second; + CHECK_SET_ERR(expectedDashboardState == actualDashboardState, + QString("Dashboard number %1 has an unexpected state: it should be %2, but it is '%3'") + .arg(i).arg(expectedDashboardState ? "visible" : "invisible").arg(actualDashboardState ? "visible" : "invisible")); + } + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Cancel); + } + }; + + GTUtilsDialog::waitForDialog(os, new DashboardsManagerDialogFiller(os, new Scenario())); + GTWidget::click(os, dashboardsManagerButton); + +// 23. Switch to the first Workflow Designer. +// Expected result: +// - The Workflow Designer is in the dashboards view mode. +// - There are 3 dashboard tabs. Their names are "Align sequence with MUSCLE 1", "Extract consensus as sequence 2", "Align sequence with MUSCLE 2". +// - The "Align sequence with MUSCLE 1" dashboard is active. +// - The "Dashboards manager" button on the toolbar is active. + coreLog.info(QString("Try to switch to tab %1(%2)") + .arg(tabIndex1) + .arg(GTUtilsMdi::getTabBar(os)->tabText(tabIndex1))); + GTUtilsMdi::clickTab(os, tabIndex1); + GTUtilsTaskTreeView::waitTaskFinished(os); + + viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, + MWTOOLBAR_ACTIVEMDI), + "Show workflow")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'To Workflow Designer' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + + expectedButtonText = "To Workflow Designer"; + actualButtonText = viewSwitchButton->text(); + CHECK_SET_ERR(expectedButtonText == actualButtonText, + QString("View switch button has an unexpected text: expected '%1', got '%2'") + .arg(expectedButtonText).arg(actualButtonText)); + + coreLog.info("Trying get GTUtilsDashboard::getTabWidget(os)"); + dashboardsView = GTUtilsDashboard::getTabWidget(os); + CHECK_SET_ERR(nullptr != dashboardsView, "Dashboards view is nullptr"); + coreLog.info("Successfully got GTUtilsDashboard::getTabWidget(os)"); + + expectedTabsCount = 3; + actualTabsCount = dashboardsView->count(); + CHECK_SET_ERR(expectedTabsCount == actualTabsCount, + QString("There is an incorrect count of tabs in the Dashboard View: expected %1, got %2") + .arg(expectedTabsCount).arg(actualTabsCount)); + + expectedActiveTabIndex = 0; + actualActiveTabIndex = dashboardsView->currentIndex(); + CHECK_SET_ERR(expectedActiveTabIndex == actualActiveTabIndex, + QString("There is an incorrect active tab: expected index is %1, actual index is %2") + .arg(expectedActiveTabIndex).arg(actualActiveTabIndex)); + + expectedTabName = "Align sequences with MUSCLE 1"; + actualTabName = GTUtilsDashboard::getDashboardName(os, actualActiveTabIndex); + CHECK_SET_ERR(expectedTabName == actualTabName, + QString("Active dashboard has an unexpected name: expect '%1', got '%2'") + .arg(expectedTabName).arg(actualTabName)); + + outputFiles = GTUtilsDashboard::getOutputFiles(os); + CHECK_SET_ERR(!outputFiles.isEmpty(), "Active dashboard is not displayed properly"); + + dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + +// 24. Click to the "Dashboards manager" button on the toolbar. +// Expected result: +// - the "Dashboards Manager" dialog appears. +// It contains 4 items, all of them are checked. +// Their names are "Extract consensus as sequence 1", "Extract consensus as sequence 2", "Align sequence with MUSCLE 1", "Align sequence with MUSCLE 2". +// 25. Cancel the dialog + GTUtilsDialog::waitForDialog(os, new DashboardsManagerDialogFiller(os, new Scenario())); + GTWidget::click(os, dashboardsManagerButton); + +// 26. Switch to the third Workflow Designer. +// Expected result: +// - The Workflow Designer is in the dashboard view mode. +// - The "Dashboards manager" button on the toolbar is active. +// - There are 3 dashboard tabs. Their names are "Extract consensus as sequence 2", "Align sequence with MUSCLE 1", "Align sequence with MUSCLE 2" (warning: two last tabs can be swapped, it depends on the task finish order, it is a correct situation). +// - The "Extract consensus as sequence 2" dashboard is active. + coreLog.info(QString("Try to switch to tab %1(%2)") + .arg(tabIndex3) + .arg(GTUtilsMdi::getTabBar(os)->tabText(tabIndex3))); + GTUtilsMdi::clickTab(os, tabIndex3); + GTUtilsTaskTreeView::waitTaskFinished(os); + + viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Show workflow")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'To Workflow Designer' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + + expectedButtonText = "To Workflow Designer"; + actualButtonText = viewSwitchButton->text(); + CHECK_SET_ERR(expectedButtonText == actualButtonText, + QString("View switch button has an unexpected text: expected '%1', got '%2'") + .arg(expectedButtonText).arg(actualButtonText)); + + coreLog.info("Trying get GTUtilsDashboard::getTabWidget(os)"); + dashboardsView = GTUtilsDashboard::getTabWidget(os); + CHECK_SET_ERR(nullptr != dashboardsView, "Dashboards view is nullptr"); + coreLog.info("Successfully got GTUtilsDashboard::getTabWidget(os)"); + + expectedTabsCount = 3; + actualTabsCount = dashboardsView->count(); + CHECK_SET_ERR(expectedTabsCount == actualTabsCount, + QString("There is an incorrect count of tabs in the Dashboard View: expected %1, got %2") + .arg(expectedTabsCount).arg(actualTabsCount)); + + actualActiveTabIndex = dashboardsView->currentIndex(); + CHECK_SET_ERR(actualActiveTabIndex >=0 && actualActiveTabIndex < expectedTabsCount, + QString("There is an incorrect active tab: expected index is %1, actual index is %2") + .arg(expectedActiveTabIndex).arg(actualActiveTabIndex)); + + expectedTabName = "Extract consensus as sequence 2"; + actualTabName = GTUtilsDashboard::getDashboardName(os, actualActiveTabIndex); + CHECK_SET_ERR(expectedTabName == actualTabName, + QString("Active dashboard has an unexpected name: expect '%1', got '%2'") + .arg(expectedTabName).arg(actualTabName)); + + outputFiles = GTUtilsDashboard::getOutputFiles(os); + CHECK_SET_ERR(!outputFiles.isEmpty(), "Active dashboard is not displayed properly"); + + dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + +// 27. Click to the "Dashboards manager" button on the toolbar. +// Expected result: +// - the "Dashboards Manager" dialog appears. +// - It contains 4 items, not all of them are checked. +// - Their names are "Extract consensus as sequence 1", "Extract consensus as sequence 2", "Align sequence with MUSCLE 1" and "Align sequence with MUSCLE 2". +// 28. Cancel the dialog. + GTUtilsDialog::waitForDialog(os, new DashboardsManagerDialogFiller(os, new Scenario())); + GTWidget::click(os, dashboardsManagerButton); + + + GTGlobals::sleep(); +} + +GUI_TEST_CLASS_DEFINITION(output_dir_scanning_test_0008) { +// 1. Set "_common_data/workflow/dashboard/workflow_outputs/two_visible_two_invisible" as workflow output folder in the "Application Settings". + const QFileInfo originalWorkflowOutputDir = testDir + "_common_data/workflow/dashboard/workflow_outputs/two_visible_two_invisible"; + const QFileInfo testWorkflowOutputDir = sandBoxDir + "two_visible_two_invisible"; + GTFile::copyDir(os, originalWorkflowOutputDir.absoluteFilePath(), testWorkflowOutputDir.absoluteFilePath()); + setWorkflowOutputDir(os, testWorkflowOutputDir.absoluteFilePath()); + +// 2. Wait for scan task finish. + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 3. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + int tabIndex1 = GTUtilsMdi::getCurrentTab(os); + +// 4. Open "Align sequence with MUSCLE" sample. + GTUtilsWorkflowDesigner::addSample(os, "Align sequences with MUSCLE", GTUtilsMdi::activeWindow(os)); + +// 5. Cancel the wizard. + GTKeyboardDriver::keyClick(Qt::Key_Escape); + +// 6. Click to the "Read alignment" element. + GTMouseDriver::moveTo(GTUtilsWorkflowDesigner::getItemCenter(os, "Read alignment")); + GTMouseDriver::click(); + +// 7. Add "_common_data/clustal/200_sequences.aln" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, testDir + "_common_data/clustal/200_sequences.aln"); + +// 8. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + int tabIndex2 = GTUtilsMdi::getCurrentTab(os); + +// 9. Open "Align sequence with MUSCLE" sample. + GTUtilsWorkflowDesigner::addSample(os, "Align sequences with MUSCLE", GTUtilsMdi::activeWindow(os)); + +// 10. Cancel the wizard. + GTKeyboardDriver::keyClick(Qt::Key_Escape); + +// 11. Click to the "Read alignment" element. + GTMouseDriver::moveTo(GTUtilsWorkflowDesigner::getItemCenter(os, "Read alignment")); + GTMouseDriver::click(); + +// 12. Add "_common_data/clustal/200_sequences.aln" file to "Dataset 1" dataset. + GTUtilsWorkflowDesigner::setDatasetInputFile(os, testDir + "_common_data/clustal/200_sequences.aln"); + +// 13. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + int tabIndex3 = GTUtilsMdi::getCurrentTab(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 14. Click to the "Go to Dashboards" button on the toolbar. + QAbstractButton *viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), + "Show dashboard")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'Go to Dashboards' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + GTWidget::click(os, viewSwitchButton); + +// 15. Switch to first Workflow Designer. + coreLog.info(QString("Try to switch to tab %1(%2)") + .arg(tabIndex1) + .arg(GTUtilsMdi::getTabBar(os)->tabText(tabIndex1))); + GTUtilsMdi::clickTab(os, tabIndex1); + +// 16. Launch the workflow. Do not wait for the task finish. + coreLog.info("Try to start workflow #1"); + GTUtilsWorkflowDesigner::runWorkflow(os); + coreLog.info("It seems that workflow was started"); + +// 17. Switch to the second Workflow Designer. + coreLog.info(QString("Try to switch to tab %1(%2)") + .arg(tabIndex2) + .arg(GTUtilsMdi::getTabBar(os)->tabText(tabIndex2))); + GTUtilsMdi::clickTab(os, tabIndex2); + +// 18. Launch the workflow. Do not wait for the task finish. + coreLog.info("Try to start workflow #2"); + GTUtilsWorkflowDesigner::runWorkflow(os); + coreLog.info("It seems that workflow was started"); + +// 19. Set "_common_data/workflow/dashboard/workflow_outputs/two_invisible_dashboards" as workflow output folder in the "Application Settings". + const QFileInfo originalWorkflowOutputDir2 = testDir + "_common_data/workflow/dashboard/workflow_outputs/two_invisible_dashboards"; + const QFileInfo testWorkflowOutputDir2 = sandBoxDir + "two_invisible_dashboards"; + GTFile::copyDir(os, originalWorkflowOutputDir2.absoluteFilePath(), testWorkflowOutputDir2.absoluteFilePath()); + setWorkflowOutputDir(os, testWorkflowOutputDir2.absoluteFilePath()); + + // Some workaround for mac: after changing workflow output dir the active tab is `Start Page` + // Don't sure that this issue exists (or will not exist in the future) on other OS(s) + // So just switch back to last tab which is tabIndex2 + GTUtilsMdi::clickTab(os, tabIndex2); + +// 20. Wait for all tasks finish. The scan task is supposed to finish before align tasks. +// Expected result: +// - The Workflow Designer is in the dashboards view mode. +// - There are 2 dashboard tabs. +// Their names are "Align sequence with MUSCLE 2", +// "Align sequence with MUSCLE 1". +// - The "Align sequence with MUSCLE 2" dashboard is active. +// - The "Dashboards manager" button on the toolbar is active. + GTUtilsTaskTreeView::waitTaskFinished(os, 600000); + + viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, + MWTOOLBAR_ACTIVEMDI), + "Show workflow")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'To Workflow Designer' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + + QString expectedButtonText = "To Workflow Designer"; + QString actualButtonText = viewSwitchButton->text(); + CHECK_SET_ERR(expectedButtonText == actualButtonText, + QString("View switch button has an unexpected text: expected '%1', got '%2'") + .arg(expectedButtonText).arg(actualButtonText)); + + coreLog.info("Trying get GTUtilsDashboard::getTabWidget(os)"); + QTabWidget *dashboardsView = GTUtilsDashboard::getTabWidget(os); + CHECK_SET_ERR(nullptr != dashboardsView, "Dashboards view is nullptr"); + coreLog.info("Successfully got GTUtilsDashboard::getTabWidget(os)"); + + int expectedTabsCount = 2; + int actualTabsCount = dashboardsView->count(); + CHECK_SET_ERR(expectedTabsCount == actualTabsCount, + QString("There is an incorrect count of tabs in the Dashboard View: expected %1, got %2") + .arg(expectedTabsCount).arg(actualTabsCount)); + + int expectedActiveTabIndex = 0; + int actualActiveTabIndex = dashboardsView->currentIndex(); + CHECK_SET_ERR(expectedActiveTabIndex == actualActiveTabIndex, + QString("There is an incorrect active tab: expected index is %1, actual index is %2") + .arg(expectedActiveTabIndex).arg(actualActiveTabIndex)); + + QString expectedTabName = "Align sequences with MUSCLE 2"; + QString actualTabName = GTUtilsDashboard::getDashboardName(os, actualActiveTabIndex); + CHECK_SET_ERR(expectedTabName == actualTabName, + QString("Active dashboard has an unexpected name: expect '%1', got '%2'") + .arg(expectedTabName).arg(actualTabName)); + + QStringList outputFiles = GTUtilsDashboard::getOutputFiles(os); + CHECK_SET_ERR(!outputFiles.isEmpty(), "Active dashboard is not displayed properly"); + + QWidget *dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + +// 21. Click to the "Dashboards manager" button on the toolbar. +// Expected result: the "Dashboards Manager" dialog appears. It contains four items, not all of them are checked. Their names are "Extract consensus as sequence 1", "Extract consensus as sequence 2", "Align sequence with MUSCLE 1", "Align sequence with MUSCLE 2". +// 22. Cancel the dialog + class Scenario : public CustomScenario { + public: + static bool sorting(const QPair<QString, bool>& e1, const QPair<QString, bool>& e2) { + if (e1.first < e2.first) return true; + return false; + } + + void run(HI::GUITestOpStatus &os) override { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(nullptr != dialog, "Active modal widget is nullptr"); + + QList<QPair<QString, bool> > expectedDashboardsState({ + qMakePair(QString("Align sequences with MUSCLE 1"), true), + qMakePair(QString("Align sequences with MUSCLE 2"), true), + qMakePair(QString("Extract consensus as sequence 1"), false), + qMakePair(QString("Extract consensus as sequence 2"), false) + }); + qSort(expectedDashboardsState.begin(), expectedDashboardsState.end(), sorting); + + QList<QPair<QString, bool> > actualDashboardsState = DashboardsManagerDialogFiller::getDashboardsState(os); + qSort(actualDashboardsState.begin(), actualDashboardsState.end(), sorting); + + CHECK_SET_ERR(expectedDashboardsState.size() == actualDashboardsState.size(), + QString("Expected dashboards count is not equal to the actual dashboards list size: expected %1, got %2") + .arg(expectedDashboardsState.size()).arg(actualDashboardsState.size())); + + for (int i = 0; i < expectedDashboardsState.size(); ++i) { + const QString expectedDashboardName = expectedDashboardsState[i].first; + const QString actualDashboardName = actualDashboardsState[i].first; + CHECK_SET_ERR(expectedDashboardName == actualDashboardName, + QString("Dashboard number %1 has an unexpected name: expected '%2', got '%3'") + .arg(i).arg(expectedDashboardName).arg(actualDashboardName)); + + const bool expectedDashboardState = expectedDashboardsState[i].second; + const bool actualDashboardState = actualDashboardsState[i].second; + CHECK_SET_ERR(expectedDashboardState == actualDashboardState, + QString("Dashboard number %1 has an unexpected state: it should be %2, but it is '%3'") + .arg(i).arg(expectedDashboardState ? "visible" : "invisible").arg(actualDashboardState ? "visible" : "invisible")); + } + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Cancel); + } + }; + + GTUtilsDialog::waitForDialog(os, new DashboardsManagerDialogFiller(os, new Scenario())); + GTWidget::click(os, dashboardsManagerButton); + +// 23. Switch to the first Workflow Designer. +// Expected result: +// - The Workflow Designer is in the dashboards view mode. +// - There are 2 dashboard tabs. Their names are "Extract consensus as sequence 2", "Align sequence with MUSCLE 2". +// - The "Align sequence with MUSCLE 1" dashboard is active. +// - The "Dashboards manager" button on the toolbar is active. + coreLog.info(QString("Try to switch to tab %1(%2)") + .arg(tabIndex1) + .arg(GTUtilsMdi::getTabBar(os)->tabText(tabIndex1))); + GTUtilsMdi::clickTab(os, tabIndex1); + GTUtilsTaskTreeView::waitTaskFinished(os); + + viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, + MWTOOLBAR_ACTIVEMDI), + "Show workflow")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'To Workflow Designer' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + + expectedButtonText = "To Workflow Designer"; + actualButtonText = viewSwitchButton->text(); + CHECK_SET_ERR(expectedButtonText == actualButtonText, + QString("View switch button has an unexpected text: expected '%1', got '%2'") + .arg(expectedButtonText).arg(actualButtonText)); + + coreLog.info("Trying get GTUtilsDashboard::getTabWidget(os)"); + dashboardsView = GTUtilsDashboard::getTabWidget(os); + CHECK_SET_ERR(nullptr != dashboardsView, "Dashboards view is nullptr"); + coreLog.info("Successfully got GTUtilsDashboard::getTabWidget(os)"); + + expectedTabsCount = 2; + actualTabsCount = dashboardsView->count(); + CHECK_SET_ERR(expectedTabsCount == actualTabsCount, + QString("There is an incorrect count of tabs in the Dashboard View: expected %1, got %2") + .arg(expectedTabsCount).arg(actualTabsCount)); + + expectedActiveTabIndex = 0; + actualActiveTabIndex = dashboardsView->currentIndex(); + CHECK_SET_ERR(expectedActiveTabIndex == actualActiveTabIndex, + QString("There is an incorrect active tab: expected index is %1, actual index is %2") + .arg(expectedActiveTabIndex).arg(actualActiveTabIndex)); + + expectedTabName = "Align sequences with MUSCLE 1"; + actualTabName = GTUtilsDashboard::getDashboardName(os, actualActiveTabIndex); + CHECK_SET_ERR(expectedTabName == actualTabName, + QString("Active dashboard has an unexpected name: expect '%1', got '%2'") + .arg(expectedTabName).arg(actualTabName)); + + outputFiles = GTUtilsDashboard::getOutputFiles(os); + CHECK_SET_ERR(!outputFiles.isEmpty(), "Active dashboard is not displayed properly"); + + dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + +// 24. Click to the "Dashboards manager" button on the toolbar. +// Expected result: +// - the "Dashboards Manager" dialog appears. +// It contains 4 items, not all of them are checked. +// Their names are "Extract consensus as sequence 1", "Extract consensus as sequence 2", "Align sequence with MUSCLE 1", "Align sequence with MUSCLE 2". +// 25. Cancel the dialog + GTUtilsDialog::waitForDialog(os, new DashboardsManagerDialogFiller(os, new Scenario())); + GTWidget::click(os, dashboardsManagerButton); + +// 26. Switch to the third Workflow Designer. +// Expected result: +// - The Workflow Designer is in the scene view mode. +// - The "Dashboards manager" button on the toolbar is active. + coreLog.info(QString("Try to switch to tab %1(%2)") + .arg(tabIndex3) + .arg(GTUtilsMdi::getTabBar(os)->tabText(tabIndex3))); + GTUtilsMdi::clickTab(os, tabIndex3); + + dashboardsManagerButton = GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Dashboards manager"); + CHECK_SET_ERR(nullptr != dashboardsManagerButton, "'Dashboards manager' is nullptr"); + CHECK_SET_ERR(dashboardsManagerButton->isEnabled(), "'Dashboards manager' button is unexpectedly disabled"); + + viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), + "Show dashboard")); + CHECK_SET_ERR(nullptr != viewSwitchButton && + viewSwitchButton->isVisible(), "'Go to Dashboards' is invisible"); + +// 27. Click to the "Dashboards manager" button on the toolbar. +// Expected result: +// - the "Dashboards Manager" dialog appears. It contains four items. Their names are "Extract consensus as sequence 1", "Extract consensus as sequence 2", "Align sequence with MUSCLE 1", "Align sequence with MUSCLE 2". +// - "Extract consensus as sequence 1" and "Extract consensus as sequence 2" are unchecked, all other are checked. +// 28. Cancel the dialog. + GTUtilsDialog::waitForDialog(os, new DashboardsManagerDialogFiller(os, new Scenario())); + GTWidget::click(os, dashboardsManagerButton); + +// 29. Click to the "Go to Dashboards" button on the toolbar. +// Expected result: +// - There are two dashboard tabs. Their names are "Align sequence with MUSCLE 1", "Align sequence with MUSCLE 2" (warning: two last tabs can be swapped, it depends on the task finish order, it is a correct situation). +// - The first dashboard is active. + viewSwitchButton = qobject_cast<QAbstractButton *>( + GTToolbar::getWidgetForActionTooltip(os, + GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), + "Show dashboard")); + CHECK_SET_ERR(nullptr != viewSwitchButton, "'Go to Dashboards' is nullptr"); + CHECK_SET_ERR(viewSwitchButton->isVisible(), "View switch button is unexpectedly invisible"); + CHECK_SET_ERR(viewSwitchButton->isEnabled(), "View switch button is unexpectedly disabled"); + GTWidget::click(os, viewSwitchButton); + + coreLog.info("Trying get GTUtilsDashboard::getTabWidget(os)"); + dashboardsView = GTUtilsDashboard::getTabWidget(os); + CHECK_SET_ERR(nullptr != dashboardsView, "Dashboards view is nullptr"); + coreLog.info("Successfully got GTUtilsDashboard::getTabWidget(os)"); + + expectedTabsCount = 2; + actualTabsCount = dashboardsView->count(); + CHECK_SET_ERR(expectedTabsCount == actualTabsCount, + QString("There is an incorrect count of tabs in the Dashboard View: expected %1, got %2") + .arg(expectedTabsCount).arg(actualTabsCount)); + + expectedActiveTabIndex = 0; + actualActiveTabIndex = dashboardsView->currentIndex(); + CHECK_SET_ERR(expectedActiveTabIndex == actualActiveTabIndex, + QString("There is an incorrect active tab: expected index is %1, actual index is %2") + .arg(expectedActiveTabIndex).arg(actualActiveTabIndex)); + + expectedTabName = "Align sequences with MUSCLE 1"; + actualTabName = GTUtilsDashboard::getDashboardName(os, actualActiveTabIndex); + CHECK_SET_ERR(expectedTabName == actualTabName, + QString("Active dashboard has an unexpected name: expect '%1', got '%2'") + .arg(expectedTabName).arg(actualTabName)); + + GTGlobals::sleep(); +} + + +} // namespace GUITest_common_scenarios_workflow_dashboard + +} // namespace U2 diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/dashboard/GTTestsWorkflowDashboard.h b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/dashboard/GTTestsWorkflowDashboard.h new file mode 100644 index 0000000000000000000000000000000000000000..5644c9f1b1766b62ef77ab046822540f02d0f45f --- /dev/null +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/dashboard/GTTestsWorkflowDashboard.h @@ -0,0 +1,83 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_GT_TESTS_WORKFLOW_DASHBOARD_H_ +#define _U2_GT_TESTS_WORKFLOW_DASHBOARD_H_ + +#include <U2Test/UGUITestBase.h> + +namespace U2 { + +namespace GUITest_common_scenarios_workflow_dashboard { +#undef GUI_TEST_SUITE +#define GUI_TEST_SUITE "GUITest_common_scenarios_workflow_dashboard" + +GUI_TEST_CLASS_DECLARATION(misc_test_0001) +GUI_TEST_CLASS_DECLARATION(misc_test_0002) +GUI_TEST_CLASS_DECLARATION(misc_test_0003) +GUI_TEST_CLASS_DECLARATION(misc_test_0004) +GUI_TEST_CLASS_DECLARATION(misc_test_0005) + +GUI_TEST_CLASS_DECLARATION(tree_nodes_creation_test_0001) +GUI_TEST_CLASS_DECLARATION(tree_nodes_creation_test_0002) +GUI_TEST_CLASS_DECLARATION(tree_nodes_creation_test_0003) +GUI_TEST_CLASS_DECLARATION(tree_nodes_creation_test_0004) + +GUI_TEST_CLASS_DECLARATION(tool_launch_nodes_test_0001) +GUI_TEST_CLASS_DECLARATION(tool_launch_nodes_test_0002) +GUI_TEST_CLASS_DECLARATION(tool_launch_nodes_test_0003) +GUI_TEST_CLASS_DECLARATION(tool_launch_nodes_test_0004) +GUI_TEST_CLASS_DECLARATION(tool_launch_nodes_test_0005) +GUI_TEST_CLASS_DECLARATION(tool_launch_nodes_test_0006) +GUI_TEST_CLASS_DECLARATION(tool_launch_nodes_test_0007) +GUI_TEST_CLASS_DECLARATION(tool_launch_nodes_test_0008) +GUI_TEST_CLASS_DECLARATION(tool_launch_nodes_test_0009) +GUI_TEST_CLASS_DECLARATION(tool_launch_nodes_test_0010) +GUI_TEST_CLASS_DECLARATION(tool_launch_nodes_test_0011) +GUI_TEST_CLASS_DECLARATION(tool_launch_nodes_test_0012) +GUI_TEST_CLASS_DECLARATION(tool_launch_nodes_test_0013) +GUI_TEST_CLASS_DECLARATION(tool_launch_nodes_test_0014) +GUI_TEST_CLASS_DECLARATION(tool_launch_nodes_test_0015) +GUI_TEST_CLASS_DECLARATION(tool_launch_nodes_test_0016) +GUI_TEST_CLASS_DECLARATION(tool_launch_nodes_test_0017) + +GUI_TEST_CLASS_DECLARATION(view_opening_test_0001) +GUI_TEST_CLASS_DECLARATION(view_opening_test_0002) +GUI_TEST_CLASS_DECLARATION(view_opening_test_0003) +GUI_TEST_CLASS_DECLARATION(view_opening_test_0004) + +GUI_TEST_CLASS_DECLARATION(output_dir_scanning_test_0001) +GUI_TEST_CLASS_DECLARATION(output_dir_scanning_test_0002) +GUI_TEST_CLASS_DECLARATION(output_dir_scanning_test_0003) +GUI_TEST_CLASS_DECLARATION(output_dir_scanning_test_0004) +GUI_TEST_CLASS_DECLARATION_SET_TIMEOUT(output_dir_scanning_test_0005_1, 720000) +GUI_TEST_CLASS_DECLARATION_SET_TIMEOUT(output_dir_scanning_test_0005, 720000) +GUI_TEST_CLASS_DECLARATION_SET_TIMEOUT(output_dir_scanning_test_0006, 720000) +GUI_TEST_CLASS_DECLARATION_SET_TIMEOUT(output_dir_scanning_test_0007, 720000) +GUI_TEST_CLASS_DECLARATION_SET_TIMEOUT(output_dir_scanning_test_0008, 720000) + + +#undef GUI_TEST_SUITE +} // namespace GUITest_common_scenarios_workflow_dashboard + +} // namespace U2 + +#endif // _U2_GT_TESTS_WORKFLOW_DASHBOARD_H_ diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/estimating/GTTestsWorkflowEstimating.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/estimating/GTTestsWorkflowEstimating.cpp index 2bb2886ef5f81e2a7dc7237854540840fc8b9732..bf5c228f64cca4722fa20900f82675c4d061fdad 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/estimating/GTTestsWorkflowEstimating.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/estimating/GTTestsWorkflowEstimating.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/estimating/GTTestsWorkflowEstimating.h b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/estimating/GTTestsWorkflowEstimating.h index fe62bf6b05e805ea07b1a2177114ee12fc868930..29aed81d7f53e1ef6c7836c5cf3863b9569156ec 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/estimating/GTTestsWorkflowEstimating.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/estimating/GTTestsWorkflowEstimating.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/name_filter/GTTestsWorkflowNameFilter.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/name_filter/GTTestsWorkflowNameFilter.cpp index 34b08137cf4414ad0442a096d16e23681d8858f2..b6c37b04d671e9024799ac667497769571c975fa 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/name_filter/GTTestsWorkflowNameFilter.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/name_filter/GTTestsWorkflowNameFilter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -50,7 +50,8 @@ GUI_TEST_CLASS_DEFINITION( test_0001 ) { //GTWidget::click(os, GTWidget::findWidget(os, "samples")); // 3. Click the "Name filter" line edit. - QLineEdit *nameFilter = qobject_cast<QLineEdit*>(GTWidget::findWidget(os, "nameFilterLineEdit")); + QWidget *parent = GTWidget::findWidget(os, "palette"); + QLineEdit *nameFilter = qobject_cast<QLineEdit*>(GTWidget::findWidget(os, "nameFilterLineEdit", parent)); CHECK(nameFilter, ); //hack. GTLineEdit can not set focus on widget. Don't know why GTWidget::click(os, nameFilter); @@ -146,7 +147,8 @@ GUI_TEST_CLASS_DEFINITION( test_0003 ) { GTTabWidget::setCurrentIndex(os,tabs,1); // 3. Click the "Name filter" line edit. - QLineEdit *nameFilter = qobject_cast<QLineEdit*>(GTWidget::findWidget(os, "nameFilterLineEdit")); + QWidget *parent = GTWidget::findWidget(os, "palette"); + QLineEdit *nameFilter = qobject_cast<QLineEdit*>(GTWidget::findWidget(os, "nameFilterLineEdit", parent)); CHECK(nameFilter, ); // 4. Write "NGS". diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/name_filter/GTTestsWorkflowNameFilter.h b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/name_filter/GTTestsWorkflowNameFilter.h index 94750ce3950ca33bb1e5110b101167db312f7971..33127f09b528b64fa3c1b1bf701e9fd43fabbbe1 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/name_filter/GTTestsWorkflowNameFilter.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/name_filter/GTTestsWorkflowNameFilter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/parameters_validation/GTTestsWorkflowParameterValidation.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/parameters_validation/GTTestsWorkflowParameterValidation.cpp index 3c757654d01e5867b804c55c1d9c241f96ea39dc..1efd6a5cd3d2ac151b979519d69730d25399a28a 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/parameters_validation/GTTestsWorkflowParameterValidation.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/parameters_validation/GTTestsWorkflowParameterValidation.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/parameters_validation/GTTestsWorkflowParameterValidation.h b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/parameters_validation/GTTestsWorkflowParameterValidation.h index 38c6b3ad8b767e0716aba89033d0e1375c2f5326..7de38be44562474b0b1e36036aea3ef8dd8fcb9e 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/parameters_validation/GTTestsWorkflowParameterValidation.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/parameters_validation/GTTestsWorkflowParameterValidation.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/scripting/GTTestsWorkflowScripting.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/scripting/GTTestsWorkflowScripting.cpp index 5abb7fe1f8d3d091af5d24a54056166df7e233c2..bd36dff4a430be6c677052642cc6254a3ab8498b 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/scripting/GTTestsWorkflowScripting.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/scripting/GTTestsWorkflowScripting.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -78,9 +78,8 @@ GUI_TEST_CLASS_DEFINITION(test_0001) { GTUtilsWorkflowDesigner::openWorkflowDesigner(os); GTGlobals::sleep(500); - GTUtilsDialog::waitForDialog(os, new CreateElementWithScriptDialogFiller(os, "wd_scripting_test_0001")); - GTWidget::click(os, GTAction::button(os, "createScriptAction")); - + GTUtilsDialog::waitForDialog(os, new CreateElementWithScriptDialogFiller(os, "wd_scripting_test_0001")); + GTMenu::clickMainMenuItem(os, QStringList() << "Actions" << "Create element with script...", GTGlobals::UseMouse); // 4. Select created worker. Press toolbar button "Edit script text". // Expected state: Script editor dialog appears. @@ -91,7 +90,7 @@ GUI_TEST_CLASS_DEFINITION(test_0001) { GTMouseDriver::click(); GTUtilsDialog::waitForDialog(os, new ScriptEditorDialogSyntaxChecker(os, "#$%not a script asdasd321 123", "Script syntax check failed!")); - GTWidget::click(os, GTAction::button(os, "editScriptAction")); + GTMenu::clickMainMenuItem(os, QStringList() << "Actions" << "Edit script of the element...", GTGlobals::UseMouse); } GUI_TEST_CLASS_DEFINITION(test_0002) { @@ -156,14 +155,14 @@ GUI_TEST_CLASS_DEFINITION(test_0004) { GTGlobals::sleep(500); GTUtilsDialog::waitForDialog(os, new CreateElementWithScriptDialogFiller(os, "workflow_scripting_test_0004")); - GTWidget::click(os, GTAction::button(os, "createScriptAction")); + GTMenu::clickMainMenuItem(os, QStringList() << "Actions" << "Create element with script...", GTGlobals::UseMouse); GTMouseDriver::moveTo(GTUtilsWorkflowDesigner::getItemCenter(os,"workflow_scripting_test_0004")); GTMouseDriver::click(); const QString scriptText = "if(size(in_seq) >= 10000) {out_seq = in_seq;}"; - GTUtilsDialog::waitForDialog(os, new ScriptEditorDialogFiller(os, "", scriptText)); - GTWidget::click(os, GTAction::button(os, "editScriptAction")); + GTUtilsDialog::waitForDialog(os, new ScriptEditorDialogFiller(os, "", scriptText)); + GTMenu::clickMainMenuItem(os, QStringList() << "Actions" << "Edit script of the element...", GTGlobals::UseMouse); WorkflowProcessItem *script = GTUtilsWorkflowDesigner::getWorker(os, "workflow_scripting_test_0004"); QString text = script->getProcess()->getScript()->getScriptText(); diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/scripting/GTTestsWorkflowScripting.h b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/scripting/GTTestsWorkflowScripting.h index d24ce761b82dbbbf06a6b69052221fb6b9c2b462..d736cb676c145ef316407b52efb8ab737d18827d 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/scripting/GTTestsWorkflowScripting.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/scripting/GTTestsWorkflowScripting.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/shared_db/GTTestsSharedDbWd.cpp b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/shared_db/GTTestsSharedDbWd.cpp index 9f2b998959f96f514825382e0cb04f39654241bb..5f07c3a88a3afa950183c892eebf2570049e72e3 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/shared_db/GTTestsSharedDbWd.cpp +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/shared_db/GTTestsSharedDbWd.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -500,7 +500,7 @@ GUI_TEST_CLASS_DEFINITION(save_uwl_gui_test_0001) { GTMenu::clickMainMenuItem(os, QStringList() << "File" << "Connect to UGENE shared database..."); GTUtilsWorkflowDesigner::openWorkflowDesigner(os); - GTUtilsWorkflowDesigner::addAlgorithm(os, "Write Variations"); + GTUtilsWorkflowDesigner::addAlgorithm(os, "Write Variants"); GTUtilsWorkflowDesigner::setParameter(os, "Data storage", 1, GTUtilsWorkflowDesigner::comboValue); diff --git a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/shared_db/GTTestsSharedDbWd.h b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/shared_db/GTTestsSharedDbWd.h index 8c2223b921dab43b5215e3ff686bf6a263cbe1af..f8c8634e8a3f3a957f96c91dae33cd9fd1ae609c 100644 --- a/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/shared_db/GTTestsSharedDbWd.h +++ b/src/plugins/GUITestBase/src/tests/common_scenarios/workflow_designer/shared_db/GTTestsSharedDbWd.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/crazy_user/GTAbstractGUIAction.cpp b/src/plugins/GUITestBase/src/tests/crazy_user/GTAbstractGUIAction.cpp index 7fbf68a6834d430eea8ee677e12ca77422039d2b..f3092c25c9e7ccf3ff7ce738538d6eeff92dee85 100644 --- a/src/plugins/GUITestBase/src/tests/crazy_user/GTAbstractGUIAction.cpp +++ b/src/plugins/GUITestBase/src/tests/crazy_user/GTAbstractGUIAction.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/crazy_user/GTAbstractGUIAction.h b/src/plugins/GUITestBase/src/tests/crazy_user/GTAbstractGUIAction.h index ea663a02972ab9b9b3e7ffc5e73f4e7c9f9b8a65..298e3b40c585bec7b592fe3cbeaf5cb132b139b6 100644 --- a/src/plugins/GUITestBase/src/tests/crazy_user/GTAbstractGUIAction.h +++ b/src/plugins/GUITestBase/src/tests/crazy_user/GTAbstractGUIAction.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/crazy_user/GTRandomGUIActionFactory.cpp b/src/plugins/GUITestBase/src/tests/crazy_user/GTRandomGUIActionFactory.cpp index 540f32f6caca994fe5b3098406b72af0c9fd33c9..c541dc51783708d548c1d11282037b95c01066e2 100644 --- a/src/plugins/GUITestBase/src/tests/crazy_user/GTRandomGUIActionFactory.cpp +++ b/src/plugins/GUITestBase/src/tests/crazy_user/GTRandomGUIActionFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/crazy_user/GTRandomGUIActionFactory.h b/src/plugins/GUITestBase/src/tests/crazy_user/GTRandomGUIActionFactory.h index daf6e90b4f9176732d149322f8d8aa07ea729529..a4b4e529fc3e845a36ea1e13b18d6df8970ae8ea 100644 --- a/src/plugins/GUITestBase/src/tests/crazy_user/GTRandomGUIActionFactory.h +++ b/src/plugins/GUITestBase/src/tests/crazy_user/GTRandomGUIActionFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/crazy_user/GUICrazyUserTest.cpp b/src/plugins/GUITestBase/src/tests/crazy_user/GUICrazyUserTest.cpp index b5eea7bb2f26c905af5a71b9781a160102ef4712..0f4f1d214bfafbdbf14798534cba6b343101846f 100644 --- a/src/plugins/GUITestBase/src/tests/crazy_user/GUICrazyUserTest.cpp +++ b/src/plugins/GUITestBase/src/tests/crazy_user/GUICrazyUserTest.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/crazy_user/GUICrazyUserTest.h b/src/plugins/GUITestBase/src/tests/crazy_user/GUICrazyUserTest.h index d80746fa5ee25863e50a7c195e7911904c4e6878..0a5de196253a0a02ba1ab34c03db63e637bad93f 100644 --- a/src/plugins/GUITestBase/src/tests/crazy_user/GUICrazyUserTest.h +++ b/src/plugins/GUITestBase/src/tests/crazy_user/GUICrazyUserTest.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_1001_2000.cpp b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_1001_2000.cpp index ae7317ed0990f4bf1fc380e39a972a68900a314e..33d52b5e8961895a586d77e9395c4778f8884aa4 100644 --- a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_1001_2000.cpp +++ b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_1001_2000.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -1452,7 +1452,7 @@ GUI_TEST_CLASS_DEFINITION(test_1080) { } }; - GTUtilsDialog::waitForDialog(os, new StartupDialogFiller(os)); + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); GTFileDialog::openFile(os, testDir + "_common_data/regression/1080", "blast+marker_new.uwl"); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -1467,7 +1467,7 @@ GUI_TEST_CLASS_DEFINITION(test_1080) { GTUtilsDialog::waitForDialog(os, new OkClicker(os)); GTWidget::click(os, editButton); - GTUtilsWorkflowDesigner::addInputFile(os, "Read Sequence", dataDir + "samples/Genbank/sars.gb"); + GTUtilsWorkflowDesigner::addInputFile(os, "Read Sequence", dataDir + "samples/Genbank/PBR322.gb"); GTUtilsWorkflowDesigner::runWorkflow(os); GTUtilsTaskTreeView::waitTaskFinished(os); } @@ -1749,8 +1749,8 @@ GUI_TEST_CLASS_DEFINITION(test_1124){ // 2. Hover the {Input files (long DNA reads to assembly)} field with mouse and wait the tooltip appeares. QListWidget* seqList = GTWidget::findExactWidget<QListWidget*>(os, "seqList", dialog); GTWidget::click(os, seqList); - GTMouseDriver::moveTo(GTMouseDriver::getMousePosition() + QPoint(20,20)); - GTGlobals::sleep(3000); + GTGlobals::sleep(300); + GTMouseDriver::moveTo(GTMouseDriver::getMousePosition() + QPoint(10,10)); // Expected state: tooltip is presented. GTUtilsToolTip::checkExistingToolTip(os, "The quality scores for FASTA sequences can be provided in an additional file"); @@ -1774,8 +1774,9 @@ GUI_TEST_CLASS_DEFINITION(test_1133) { QString patttern = "ATGAA GGAAAAA\nA T G CTA AG GG\nCAGC CAGAG AGAGGTCA GGT"; GTUtilsDialog::waitForDialog(os, new SmithWatermanDialogFiller(os, patttern)); GTWidget::click(os, GTToolbar::getWidgetForActionTooltip(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Find pattern [Smith-Waterman]")); - GTGlobals::sleep(500); + GTGlobals::sleep(); GTMouseDriver::moveTo(GTUtilsProjectTreeView::getItemCenter(os, "Annotations")); + GTGlobals::sleep(100); QTreeWidgetItem *item = GTUtilsAnnotationsTreeView::findItem(os, "Misc. Feature (0, 1)"); GTMouseDriver::moveTo(GTTreeWidget::getItemCenter(os, item)); } @@ -2498,7 +2499,7 @@ GUI_TEST_CLASS_DEFINITION(test_1219) { GTUtilsDialog::waitForDialog(os, new SmithWatermanDialogFiller(os, new Scenario)); GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Find pattern [Smith-Waterman]"); GTUtilsTaskTreeView::waitTaskFinished(os); - + GTGlobals::sleep(1500); // Excepted state: new *.aln documents (with specified names) should be created and contain founded subsequences for // one pair in each [m]object. Few documents must be loaded to current project, others will stay unloaded // 7. Check that numeration of founded sequences starting from 1 @@ -2680,7 +2681,7 @@ GUI_TEST_CLASS_DEFINITION(test_1245){ QLineEdit* lineEdit = qobject_cast<QLineEdit*>(GTWidget::findWidget(os, "fileNameEdit")); CHECK_SET_ERR(lineEdit != NULL, "fileNameEdit not found"); - CHECK_SET_ERR(GTLineEdit::copyText(os, lineEdit).endsWith(".fa"), "Wrong extention"); + CHECK_SET_ERR(GTLineEdit::copyText(os, lineEdit).endsWith(".fa"), "Wrong extension"); QDialogButtonBox* box = qobject_cast<QDialogButtonBox*>(GTWidget::findWidget(os, "buttonBox", dialog)); CHECK_SET_ERR(box != NULL, "buttonBox is NULL"); @@ -2882,29 +2883,16 @@ GUI_TEST_CLASS_DEFINITION(test_1252_real) { // Excepted state : Input "Annotations" slot of WS is not empty and contains annotations from ORF Finder GTUtilsWorkflowDesigner::click(os, "Write Sequence"); - QTableWidget* tw = GTUtilsWorkflowDesigner::getInputPortsTable(os, 0); - CHECK_SET_ERR(tw != NULL, "InputPortsTable is NULL"); - - QRect visibleArea = tw->visualItemRect(tw->item(0, 1)); - const QPoint globalVisibleArea = tw->viewport()->mapToGlobal(visibleArea.center()); - GTMouseDriver::moveTo(globalVisibleArea); - GTMouseDriver::scroll(-5); - GTGlobals::sleep(); - - QRect rect = tw->visualItemRect(tw->item(2, 1)); - QPoint globalP = tw->viewport()->mapToGlobal(rect.center()/* - QPoint(0, 3)*/); - GTMouseDriver::moveTo(globalP); - GTGlobals::sleep(); - GTMouseDriver::click(); - GTGlobals::sleep(500); - QComboBox* box = qobject_cast<QComboBox*>(tw->findChild<QComboBox*>()); - - QStandardItemModel *checkBoxModel = qobject_cast<QStandardItemModel *>(box->model()); - CHECK_SET_ERR(checkBoxModel != NULL, "Unexpected checkbox model"); - - QStandardItem *firstItem = checkBoxModel->item(0); - CHECK_SET_ERR(firstItem->data(Qt::DisplayRole).toString() == "Set of annotations (by ORF Marker)", "Unexpected port"); - CHECK_SET_ERR(Qt::Checked == firstItem->checkState(), "Unexpected check state"); + const QList<QPair<QString, bool> > items = GTUtilsWorkflowDesigner::getCheckableComboboxValuesFromInputPortTable(os, 0, "Set of annotations"); + bool found = false; + const QString expectedText = "Set of annotations (by ORF Marker)"; + foreach (const auto &item, items) { + if (expectedText == item.first) { + found = true; + CHECK_SET_ERR(item.second, QString("'%1' is not checked").arg(expectedText)); + } + } + CHECK_SET_ERR(found, QString("'%1' is not found among the values").arg(expectedText)); } GUI_TEST_CLASS_DEFINITION(test_1253){ @@ -3062,7 +3050,11 @@ GUI_TEST_CLASS_DEFINITION(test_1263){ GUI_TEST_CLASS_DEFINITION(test_1266) { // 1. Open "Call variants" sample pipleine from the "NGS" category GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + GTUtilsWorkflowDesigner::addSample(os, "call variants"); + GTGlobals::sleep(); + GTKeyboardDriver::keyClick(Qt::Key_Escape); class custom : public CustomScenario { public: @@ -3077,11 +3069,13 @@ GUI_TEST_CLASS_DEFINITION(test_1266) { CHECK_SET_ERR(s.contains("<html>Disable"), "unexpected tooltip: " + s); GTUtilsWizard::clickButton(os, GTUtilsWizard::Cancel); + GTGlobals::sleep(); } }; // 2. Run its wizzard GTUtilsDialog::waitForDialog(os, new WizardFiller(os, "Call Variants Wizard", new custom())); GTWidget::click(os, GTAction::button(os, "Show wizard")); + GTGlobals::sleep(); // Expected state: all parameters of the wizzard have tooltips with their descriptions } @@ -3211,15 +3205,20 @@ GUI_TEST_CLASS_DEFINITION(test_1299) { * Expected state: Popup menu should appear, contains bold "Additional" item menu */ GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + GTUtilsWorkflowDesigner::addSample(os, "Find substrings in sequences"); GTKeyboardDriver::keyClick(Qt::Key_Escape); + GTUtilsTaskTreeView::waitTaskFinished(os); GTUtilsWorkflowDesigner::click(os, "Find Substrings"); + GTGlobals::sleep(); QTableWidget* tw = GTUtilsWorkflowDesigner::getInputPortsTable(os, 0); CHECK_SET_ERR(tw != NULL, "InputPortsTable is NULL"); GTUtilsWorkflowDesigner::setTableValue(os, "Plain text", "Source URL (by Read Sequence)", GTUtilsWorkflowDesigner::comboValue, tw); + GTGlobals::sleep(1000); int row = -1; for(int i = 0; i<tw->rowCount(); i++){ @@ -3233,7 +3232,8 @@ GUI_TEST_CLASS_DEFINITION(test_1299) { QPoint globalP = tw->viewport()->mapToGlobal(rect.center()); GTMouseDriver::moveTo(globalP); GTMouseDriver::click(); - GTGlobals::sleep(500); + GTGlobals::sleep(); + QComboBox* box = qobject_cast<QComboBox*>(tw->findChild<QComboBox*>()); CHECK_SET_ERR(box->itemText(3) != "Additional", "Additional item not found"); @@ -3686,11 +3686,9 @@ public: #undef GT_METHOD_NAME #undef GT_CLASS_NAME }; + GTUtilsDialog::waitForDialog(os, new CallVariantsWizardFiller(os)); GTUtilsWorkflowDesigner::openWorkflowDesigner(os); GTUtilsWorkflowDesigner::addSample(os, "call variants"); - - GTUtilsDialog::waitForDialog(os, new CallVariantsWizardFiller(os)); - GTWidget::click(os, GTAction::button(os, "Show wizard")); } GUI_TEST_CLASS_DEFINITION( test_1337 ) { @@ -3785,8 +3783,8 @@ GUI_TEST_CLASS_DEFINITION(test_1347) { GUI_TEST_CLASS_DEFINITION(test_1348) { // 1) Create "Element with command line tool" with name "test" and any slots. -// 2) Use context menu on "test" element in "Custom Elements with CMD Tools" in "Elements", click "Remove" -// 3) Use context menu on WD main window, add element -> "Custom Elements with CMD Tools". Select "test", UGENE DOES NOT crash. +// 2) Use context menu on "test" element in "Custom Elements with External Tools" in "Elements", click "Remove" +// 3) Use context menu on WD main window, add element -> "Custom Elements with External Tools". Select "test", UGENE DOES NOT crash. // Expected state: There shouldn't be "test" element on the step 3 after removing it @@ -3802,7 +3800,7 @@ GUI_TEST_CLASS_DEFINITION(test_1348) { input << CreateElementWithCommandLineToolFiller::InOutData("in1", inOutDataType); settings.input = input; - settings.executionString = "./ugenem $in1"; + settings.command = "./ugenem $in1"; GTGlobals::sleep(); GTUtilsDialog::waitForDialog(os, new CreateElementWithCommandLineToolFiller(os, settings)); @@ -3821,7 +3819,7 @@ GUI_TEST_CLASS_DEFINITION(test_1348) { GTGlobals::sleep(4000); - const QString groupName = "Custom Elements with CMD Tools"; + const QString groupName = "Custom Elements with External Tools"; const QStringList groups = GTUtilsWorkflowDesigner::getPaletteGroupNames(os); if (groups.contains(groupName)) { CHECK_SET_ERR(!GTUtilsWorkflowDesigner::getPaletteGroupEntriesNames(os, groupName).contains(settings.elementName), "Element was not removed"); @@ -4112,7 +4110,7 @@ GUI_TEST_CLASS_DEFINITION(test_1393) { // are the same as if you open the *.aln file in text editor. GTUtilsProjectTreeView::checkItem(os, "test_1393.aln"); - const QString referenceMsaContent = getFileContent(testDir + "_common_data/clustal/test_1393.aln"); + const QString referenceMsaContent = getFileContent(testDir + "_common_data/regression/1393/test_1393.aln"); const QString resultMsaContent = getFileContent(sandBoxDir + "test_1393.aln"); CHECK_SET_ERR(!referenceMsaContent.isEmpty() && referenceMsaContent == resultMsaContent, "Unexpected MSA content"); } @@ -4592,7 +4590,7 @@ GUI_TEST_CLASS_DEFINITION(test_1455) { GTGlobals::sleep(); //3. Close WD GTUtilsMdi::click( os, GTGlobals::Close ); - GTMouseDriver::click(); + //GTMouseDriver::click(); GTGlobals::sleep(); //4. Reopen the scheme's file // Expected result: scheme is loaded completely without any error messages in log @@ -4679,7 +4677,7 @@ GUI_TEST_CLASS_DEFINITION(test_1435) { inOutDataType); settings.output = output; - settings.executionString = "./ugenem $in1 $in2 $out1 $out2"; + settings.command = "./ugenem $in1 $in2 $out1 $out2"; GTUtilsDialog::waitForDialog(os, new CreateElementWithCommandLineToolFiller(os, settings)); QAbstractButton *createElement = GTAction::button(os, "createElementWithCommandLineTool"); @@ -5067,8 +5065,8 @@ GUI_TEST_CLASS_DEFINITION(test_1499) { const QStringList msaSequences1 = GTUtilsMSAEditorSequenceArea::getNameList(os); CHECK_SET_ERR(msaSequences1 != msaSequences0, "MSA is not changed"); GTGlobals::sleep(5000); - QWidget* qt_toolbar_ext_button = GTWidget::findWidget(os, "qt_toolbar_ext_button", - GTWidget::findWidget(os, "COI [m] COI"), GTGlobals::FindOptions(false)); + QWidget *parent = GTWidget::findWidget(os, "COI [m] COI", GTWidget::findWidget(os, "COI [m] COI_SubWindow")); + QWidget* qt_toolbar_ext_button = GTWidget::findWidget(os, "qt_toolbar_ext_button", parent, GTGlobals::FindOptions(false)); if(qt_toolbar_ext_button != NULL && qt_toolbar_ext_button->isVisible()){ GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList()<<"Sort Alignment")); GTWidget::click(os, qt_toolbar_ext_button); @@ -5169,7 +5167,7 @@ GUI_TEST_CLASS_DEFINITION(test_1510) { GTUtilsWorkflowDesigner::setTableValue(os, "Source URL", "Source URL (by Read Sequence 1)", GTUtilsWorkflowDesigner::comboValue, w); GTUtilsWorkflowDesigner::runWorkflow(os); - GTGlobals::sleep(); + GTGlobals::sleep(5000); CHECK_SET_ERR(l.hasError(), "No errors in the log"); } @@ -5396,24 +5394,6 @@ GUI_TEST_CLASS_DEFINITION(test_1531) { CHECK_SET_ERR(warningMessage->isVisible(), QString("Reference sequence warning must be visible")); } -GUI_TEST_CLASS_DEFINITION(test_1533){ -// 1. Open an alignment in ClustalW format (e.g. "test.aln") - GTFile::copy(os, dataDir+"samples/CLUSTALW/COI.aln", testDir + "_common_data/scenarios/sandbox/COI.aln"); - GTFileDialog::openFile(os, testDir + "_common_data/scenarios/sandbox/COI.aln"); - GTUtilsTaskTreeView::waitTaskFinished(os); -// 2. Outside UGENE create a FASTA file with the same name as the alignment file (e.g. "test.aln", even if it is FASTA) - GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, QMessageBox::YesAll)); -// 3. Copy the second file to replace the first one outside UGENE - QFile f(testDir + "_common_data/scenarios/sandbox/COI.aln"); - f.remove(); - //CHECK_SET_ERR(f.remove(), "file not removed"); - GTFile::copy(os, dataDir+"samples/FASTA/human_T1.fa", testDir + "_common_data/scenarios/sandbox/COI.aln"); - GTGlobals::sleep(10000); -// 4. Confirm to reload the file in UGENE -// => Unloaded file is shown, "Alignment is empty" error occurs when it is opened. This error doesn't appear if the file is just opened in UGENE. - GTWidget::findWidget(os, "ADV_single_sequence_widget_0"); -} - GUI_TEST_CLASS_DEFINITION(test_1537){ // 1. Open "_common_data/clustal/10000_sequences.aln". GTFileDialog::openFile(os, testDir + "_common_data/fasta/PF07724_full_family.fa", GTFileDialog::Open, GTGlobals::UseMouse); @@ -7501,7 +7481,7 @@ GUI_TEST_CLASS_DEFINITION(test_1710_2){ GUI_TEST_CLASS_DEFINITION(test_1714){ // 1. Open the "external tools" configuration window using Settings/Preferences menu -// 2. Select path for external tools package (if not set). External tools package can be downloaded from http://ugene.net/external.html +// 2. Select path for external tools package (if not set). // 3. Deselect all Cistrome tools // 4. Deselect python external tool // Expected state: the python tool is deselected. UGENE doesn't hangs up (or crashes) @@ -7658,7 +7638,7 @@ GUI_TEST_CLASS_DEFINITION(test_1733){ GUI_TEST_CLASS_DEFINITION(test_1734){ // 1. Open WD GTUtilsWorkflowDesigner::openWorkflowDesigner(os); -// 2. Select "Call variants sample" +// 2. Select "Call variants sample", wizard opens automatically class custom : public CustomScenario { public: @@ -7680,20 +7660,18 @@ GUI_TEST_CLASS_DEFINITION(test_1734){ GTUtilsWizard::clickButton(os, GTUtilsWizard::Cancel); } }; - - GTUtilsWorkflowDesigner::addSample(os, "Call variants with SAMtools"); -// 3. Open wizard. Try to add several bams on the first page GTUtilsDialog::waitForDialog(os, new WizardFiller(os, "Call Variants Wizard", new custom())); - GTWidget::click(os, GTAction::button(os, "Show wizard")); + GTUtilsWorkflowDesigner::addSample(os, "Call variants with SAMtools"); // Expected state: adding several bams is allowed } GUI_TEST_CLASS_DEFINITION(test_1735){ -// 1) Run UGENE -// 2) Open Workflow Designer +// 1. Open Workflow Designer. GTLogTracer l; GTUtilsWorkflowDesigner::openWorkflowDesigner(os); -// 3) Open Call variant pipeline scheme from samples + +// 2. Open"Call variants with SAMtools" sample. +// Expected state: the sample is opened, a wizard appears. class custom : public CustomScenario { public: @@ -7702,31 +7680,37 @@ GUI_TEST_CLASS_DEFINITION(test_1735){ QWizard* wizard = qobject_cast<QWizard*>(dialog); CHECK_SET_ERR(wizard, "activeModalWidget is not wizard"); +// 3. Set "_common_data/cmdline/call-variations/chrM.fa" as reference; "_common_data/bam/chrM.sorted.bam" as input assembly. GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, testDir + "_common_data/cmdline/call-variations/chrM.fa")); GTWidget::click(os, GTWidget::findWidget(os, "browseButton", GTWidget::findWidget(os, "Reference sequence file labeledWidget", dialog))); GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, testDir + "_common_data/bam/chrM.sorted.bam")); GTWidget::click(os, GTWidget::findWidget(os, "addFileButton", wizard->currentPage())); +// 4. Go to the fourth page of the wizard. GTUtilsWizard::clickButton(os, GTUtilsWizard::Next); GTUtilsWizard::clickButton(os, GTUtilsWizard::Next); GTUtilsWizard::clickButton(os, GTUtilsWizard::Next); +// Expected state: the page title is "SAMtools vcfutils varFilter parameters". QString title = GTUtilsWizard::getPageTitle(os); CHECK_SET_ERR(title == "SAMtools <i>vcfutils varFilter</i> parameters", "unexpected title: " + title); +// 5. Go to the last page of the wizard, click to the "Run" button. GTUtilsWizard::clickButton(os, GTUtilsWizard::Next); GTUtilsWizard::clickButton(os, GTUtilsWizard::Run); } }; + GTUtilsDialog::waitForDialog(os, new EscapeClicker(os, "Call Variants Wizard")); GTUtilsWorkflowDesigner::addSample(os, "Call variants with SAMtools"); -// 4) Click on "Show wizard" at the top of WD window yo specify vcfutils.pl parameters (page #4 of Call Variants Wizard) -// 5) Run scheme at last page (if you specify all parameters: SAM/BAM file for Read Assembly and sequence file for Read Sequence) + GTGlobals::sleep(500); + GTUtilsDialog::waitForDialog(os, new WizardFiller(os, "Call Variants Wizard", new custom())); - GTWidget::click(os, GTAction::button(os, "Show wizard")); + GTToolbar::clickButtonByTooltipOnToolbar(os, "mwtoolbar_activemdi", "Show wizard"); + GTGlobals::sleep(500); -// Expected state: there are no errors when this pipeline scheme is running +// Expected state: there are no errors when this pipeline scheme is running. GTUtilsTaskTreeView::waitTaskFinished(os); GTUtilsLog::check(os, l); } @@ -7875,35 +7859,6 @@ GUI_TEST_CLASS_DEFINITION(test_1763_1){ GTGlobals::sleep(500); } -GUI_TEST_CLASS_DEFINITION(test_1763_2){ -// Improve dashboards: If a workflow contains an element with an external tool, the log or parameters list of the tool run should be added to the dashboard. - -// 1. Create Read alignment->Align with ClustalO->Write alignment workflow. -// 2. Set COI.aln as input file - GTUtilsWorkflowDesigner::openWorkflowDesigner(os); - WorkflowProcessItem* read = GTUtilsWorkflowDesigner::addElement(os, "Read Alignment"); - GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/CLUSTALW/COI.aln"); - - WorkflowProcessItem* write = GTUtilsWorkflowDesigner::addElement(os, "Write Alignment"); - WorkflowProcessItem* align = GTUtilsWorkflowDesigner::addElement(os, "Align with ClustalO"); - GTUtilsWorkflowDesigner::connect(os, read, align); - GTUtilsWorkflowDesigner::connect(os, align, write); - -// 3. Start workflow - GTUtilsWorkflowDesigner::runWorkflow(os); -// Expected state: Workflow dasboard opened and dashboard has External Tools tab - GTUtilsTaskTreeView::waitTaskFinished(os); -// 4. Click on External Tools tab - GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); -// Expected state: Showed tree "Align with ClustalO" - GTUtilsDashboard::click(os, GTUtilsDashboard::findTreeElement(os, "ClustalO run 1")); - GTGlobals::sleep(500); -// 5. Click on "ClustalO run 1" item -// Expected state: Showed "Run info" and "Output log" - GTUtilsDashboard::findTreeElement(os, "Run info"); - GTUtilsDashboard::findTreeElement(os, "Output log"); -} - GUI_TEST_CLASS_DEFINITION(test_1764){ // 1) Open WD GTUtilsWorkflowDesigner::openWorkflowDesigner(os); @@ -8160,7 +8115,7 @@ GUI_TEST_CLASS_DEFINITION(test_1834) { //3. Set the input file for the "Read Alignment" element to "data/samples/COI.aln". GTUtilsWorkflowDesigner::addInputFile(os, "Read Alignment", dataDir + "samples/CLUSTALW/COI.aln"); - //4. Set the "Document format" parameter of the "File Format Conversion" element to "mega". + //4. Set the "Document format" parameter of the "File Format Conversion" element to "Mega". GTUtilsWorkflowDesigner::click(os, "File Format Conversion"); GTUtilsWorkflowDesigner::setParameter(os, "Document format", "mega", GTUtilsWorkflowDesigner::comboValue, GTGlobals::UseMouse); GTUtilsWorkflowDesigner::setParameter(os, "Output folder", 0, GTUtilsWorkflowDesigner::comboValue, GTGlobals::UseMouse); @@ -8448,8 +8403,8 @@ GUI_TEST_CLASS_DEFINITION(test_1918) { GTUtilsWorkflowDesigner::addInputFile(os, "Read File URL(s)", testDir + "_common_data/mega/MegaTest_2.meg"); GTUtilsWorkflowDesigner::addInputFile(os, "Read File URL(s)", testDir + "_common_data/clustal/align.aln"); - //5. Set the following parameters of the "File Conversion" element: { Document format : nexus }, - // { Excluded formats : clustal } + //5. Set the following parameters of the "File Conversion" element: { Document format : NEXUS }, + // { Excluded formats : CLUSTAL } GTUtilsWorkflowDesigner::click(os, "File Format Conversion"); GTUtilsWorkflowDesigner::setParameter(os, "Document format", "nexus", GTUtilsWorkflowDesigner::comboValue, GTGlobals::UseMouse); GTUtilsWorkflowDesigner::setParameter(os, "Excluded formats", QStringList("clustal"), GTUtilsWorkflowDesigner::ComboChecks); diff --git a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_1001_2000.h b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_1001_2000.h index cf12adc938963dad0deff486f1958677943041b3..4752c56e37a2c36e6952edaa1151bc5a084f626e 100644 --- a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_1001_2000.h +++ b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_1001_2000.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -217,7 +217,6 @@ GUI_TEST_CLASS_DECLARATION(test_1527_1) GUI_TEST_CLASS_DECLARATION(test_1528) GUI_TEST_CLASS_DECLARATION(test_1529) GUI_TEST_CLASS_DECLARATION(test_1531) -GUI_TEST_CLASS_DECLARATION(test_1533) GUI_TEST_CLASS_DECLARATION(test_1537) GUI_TEST_CLASS_DECLARATION(test_1548) GUI_TEST_CLASS_DECLARATION(test_1551) @@ -306,7 +305,6 @@ GUI_TEST_CLASS_DECLARATION(test_1751) GUI_TEST_CLASS_DECLARATION(test_1756) GUI_TEST_CLASS_DECLARATION(test_1759) GUI_TEST_CLASS_DECLARATION(test_1763_1) -GUI_TEST_CLASS_DECLARATION(test_1763_2) GUI_TEST_CLASS_DECLARATION(test_1764) GUI_TEST_CLASS_DECLARATION(test_1771) GUI_TEST_CLASS_DECLARATION(test_1784) diff --git a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_1_1000.cpp b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_1_1000.cpp index 83495efeb9346fc456133066c4017f685586f9f6..f55dcc251f0605156fa5aacf196eb08cc1f64fea 100644 --- a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_1_1000.cpp +++ b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_1_1000.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -735,7 +735,7 @@ GUI_TEST_CLASS_DEFINITION(test_0598) { // 5. Set parameters: window = 1000, step = 4 // 6. Press 'Ok' // Expected state: 'Calculate graph points' task is started - GTUtilsDialog::waitForDialog(os, new GraphSettingsDialogFiller(os, 100, 25)); + GTUtilsDialog::waitForDialog(os, new GraphSettingsDialogFiller(os, 200, 100)); GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "Graph" << "visual_properties_action")); QWidget* graphView = GTUtilsSequenceView::getGraphView(os); @@ -1350,7 +1350,7 @@ GUI_TEST_CLASS_DEFINITION(test_0768) { GTUtilsWorkflowDesigner::openWorkflowDesigner(os); GTGlobals::sleep(500); - + QTreeWidget* w = qobject_cast<QTreeWidget*>(GTWidget::findWidget(os,"WorkflowPaletteElements")); CHECK_SET_ERR(w != NULL,"WorkflowPaletteElements is null"); @@ -1381,7 +1381,7 @@ GUI_TEST_CLASS_DEFINITION(test_0768) { } GTUtilsDialog::waitForDialog(os, new CreateElementWithScriptDialogFiller(os, "test_0768")); - GTWidget::click(os, GTAction::button(os, "createScriptAction")); + GTMenu::clickMainMenuItem(os, QStringList() << "Actions" << "Create element with script...", GTGlobals::UseMouse); // 4. Select created worker. Press toolbar button "Edit script text". // Expected state: Script editor dialog appears. @@ -1392,8 +1392,8 @@ GUI_TEST_CLASS_DEFINITION(test_0768) { GTMouseDriver::moveTo(GTUtilsWorkflowDesigner::getItemCenter(os, "test_0768")); GTMouseDriver::click(); - GTUtilsDialog::waitForDialog(os, new ScriptEditorDialogSyntaxChecker(os, "xyz", "Syntax is OK!")); - GTWidget::click(os, GTAction::button(os, "editScriptAction")); + GTUtilsDialog::waitForDialog(os, new ScriptEditorDialogSyntaxChecker(os, "xyz", "Syntax is OK!")); + GTMenu::clickMainMenuItem(os, QStringList() << "Actions" << "Edit script of the element...", GTGlobals::UseMouse); } GUI_TEST_CLASS_DEFINITION(test_0774) { @@ -1690,7 +1690,7 @@ GUI_TEST_CLASS_DEFINITION(test_0807) { //4. Click this menu item. GTUtilsDialog::waitForDialog(os, new PopupChooserByText(os, QStringList() << "Edit configuration")); - //Expected state: the last page of the "Create Element with Command Line Tool" dialog appeared. + //Expected state: the last page of the "Create Element with External Tool" dialog appeared. class Scenario1 : public CustomScenario { public: void run(HI::GUITestOpStatus &os) { @@ -1730,7 +1730,7 @@ GUI_TEST_CLASS_DEFINITION(test_0807) { //Expected state: message box with notification about structure changes appears. Thre buttons presented: {Reset}, {No}, {Yes}. //7. Click {Reset} button. - //Expected state: "Create Element with Command Line Tool" dialog not closed. Changes from point 7 are reset. + //Expected state: "Create Element with External Tool" dialog not closed. Changes from point 7 are reset. GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, reset ? QMessageBox::Reset : QMessageBox::Yes)); GTWidget::click(os, GTWidget::findButtonByText(os, "Finish")); if (reset) { @@ -1775,7 +1775,7 @@ GUI_TEST_CLASS_DEFINITION(test_0808) { GUI_TEST_CLASS_DEFINITION(test_0812) { // 1. Create a "seq.txt" file in <some_path> location. - // 2. Click "Create element with command line tool". + // 2. Click "Create element with external tool". // 3. Input a name. // 4. Specify a slot. // 5. There is no need to add a parameter. @@ -1786,6 +1786,7 @@ GUI_TEST_CLASS_DEFINITION(test_0812) { // 4. Verify whether the file has been copied. GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + CreateElementWithCommandLineToolFiller::ElementWithCommandLineSettings settings; settings.elementName = "Element_0812"; @@ -1796,9 +1797,9 @@ GUI_TEST_CLASS_DEFINITION(test_0812) { input << CreateElementWithCommandLineToolFiller::InOutData("in1", inOutDataType); settings.input = input; - settings.executionString = "copy _common_data/scenarios/_regression/812/seq.txt _common_data/scenarios/_regression/812/seq2.txt"; + settings.command = "copy _common_data/scenarios/_regression/812/seq.txt _common_data/scenarios/_regression/812/seq2.txt"; - GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, "Continue")); + //GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, "Continue")); GTUtilsDialog::waitForDialog(os, new CreateElementWithCommandLineToolFiller(os, settings)); QAbstractButton *createElement = GTAction::button(os, "createElementWithCommandLineTool"); @@ -1864,42 +1865,6 @@ GUI_TEST_CLASS_DEFINITION(test_0814) { CHECK_SET_ERR(GTFile::check(os, QDir(sandBoxDir).absolutePath() + "test_0814_log") == true, "Log file not found"); } -GUI_TEST_CLASS_DEFINITION(test_0818) { -// 1) Open WD, Click "create element with command line tool" -// 2) Fill in the "Name" lineedit with a name containing space symbol -// Expected state: -// Status - text is red -// Next button is disabled - - GTUtilsWorkflowDesigner::openWorkflowDesigner(os); - - class SpaceNameFiller: public Filler { - public: - SpaceNameFiller(HI::GUITestOpStatus& _os) : Filler(_os, "CreateExternalProcessWorkerDialog"){} - virtual void run() { - QWidget *w = QApplication::activeWindow(); - CHECK(NULL != w, ); - - QLineEdit* nameEdit = qobject_cast<QLineEdit*>(GTWidget::findWidget(os, "nameLineEdit", w)); - CHECK_SET_ERR(nameEdit != NULL, "nameLineEdit not found"); - GTLineEdit::setText(os, nameEdit, "External tool element"); - GTGlobals::sleep(); - - QWidget* nextButton = GTWidget::findWidget(os, "__qt__passive_wizardbutton1", w); - CHECK_SET_ERR(nextButton != NULL, "Next button not found"); - CHECK_SET_ERR(!nextButton->isEnabled(), "Next button is enabled"); - GTGlobals::sleep(); - - GTWidget::click(os, GTWidget::findButtonByText(os, "Cancel")); - } - }; - - - GTUtilsDialog::waitForDialog(os, new SpaceNameFiller(os)); - QAbstractButton *createElement = GTAction::button(os, "createElementWithCommandLineTool"); - GTWidget::click(os, createElement); - GTGlobals::sleep(); -} GUI_TEST_CLASS_DEFINITION(test_0821) { // 1. Open files samples/genbank/sars.gb and samples/genbank/murine.gb in merge mode // Expected state: annotations in both files has right coordinates @@ -2174,15 +2139,16 @@ GUI_TEST_CLASS_DEFINITION(test_0842) { } const QStringList groupNames = GTUtilsWorkflowDesigner::getPaletteGroupNames(os); - const int customElementsCount = groupNames.contains("Custom Elements with CMD Tools") ? - GTUtilsWorkflowDesigner::getPaletteGroupEntries(os, "Custom Elements with CMD Tools").size() : 0; + const int customElementsCount = groupNames.contains("Custom Elements with External Tools") ? + GTUtilsWorkflowDesigner::getPaletteGroupEntries(os, "Custom Elements with External Tools").size() : 0; CreateElementWithCommandLineToolFiller::ElementWithCommandLineSettings settings; settings.elementName = "test"; settings.input << CreateElementWithCommandLineToolFiller::InOutData("in", CreateElementWithCommandLineToolFiller::InOutDataType(CreateElementWithCommandLineToolFiller::Sequence, "FASTA")); - settings.executionString = "<My tool> $in"; + settings.command = "<My tool> $in"; + //GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, "Continue")); GTUtilsDialog::waitForDialog(os, new CreateElementWithCommandLineToolFiller(os, settings)); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Create element with command line tool"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Create element with external tool"); // 2) Right click at this worker on the palette -> Edit. // 3) Set a new name for the worker ("test1", for example). @@ -2190,24 +2156,24 @@ GUI_TEST_CLASS_DEFINITION(test_0842) { // 5) "Remove this element?" -> Cancel. settings.elementName = "test1"; settings.input.clear(); + //GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, QMessageBox::Yes, "You have changed the structure of the element")); + //GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, "Continue", "You don't use listed parameters in template string")); GTUtilsDialog::waitForDialog(os, new CreateElementWithCommandLineToolFiller(os, settings)); GTUtilsDialog::waitForDialog(os, new PopupChooserByText(os, QStringList() << "Edit")); - GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, QMessageBox::Yes, "You have changed the structure of the element")); - GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, QMessageBox::Cancel, "Remove this element?", "Remove element")); GTUtilsWorkflowDesigner::setCurrentTab(os, GTUtilsWorkflowDesigner::algoriths); GTUtilsWorkflowDesigner::clickOnPalette(os, "test", Qt::RightButton); GTGlobals::sleep(5000);//added to ensure that crash is not here or to fix this crash -// Expected state: There are two custom workers on the palette now (test and test1). - const QList<QTreeWidgetItem *> customElements = GTUtilsWorkflowDesigner::getPaletteGroupEntries(os, "Custom Elements with CMD Tools"); - CHECK_SET_ERR(customElementsCount + 2 == customElements.size(), QString("Unexpected custom elements count: expect %1, got %2") - .arg(customElementsCount + 2).arg(customElements.size())); +// Expected state: There are no custom workers on the palette now + const QList<QTreeWidgetItem *> customElements = GTUtilsWorkflowDesigner::getPaletteGroupEntries(os, "Custom Elements with External Tools"); + CHECK_SET_ERR(customElementsCount + 1 == customElements.size(), QString("Unexpected custom elements count: expect %1, got %2") + .arg(customElementsCount + 1).arg(customElements.size())); // 6) Click at the test worker on the palette // Expected state: UGENE not crashes. - GTUtilsWorkflowDesigner::clickOnPalette(os, "test"); + GTUtilsWorkflowDesigner::clickOnPalette(os, "test1"); } GUI_TEST_CLASS_DEFINITION(test_0844) { @@ -2399,10 +2365,10 @@ GUI_TEST_CLASS_DEFINITION(test_0861_5){ // 2. Open the "Annotations Highlighting" bar of the Options Panel GTUtilsOptionPanelSequenceView::openTab(os, GTUtilsOptionPanelSequenceView::AnnotationsHighlighting); QLineEdit* editQualifiers = GTWidget::findExactWidget<QLineEdit*>(os, "editQualifiers"); - GTLineEdit::setText(os, editQualifiers, "aaaaaaaaaaaaaaaaaaaaaaa"); + GTLineEdit::setText(os, editQualifiers, "aaaaaaaaaaa aaaaaaaaaaaa"); QString style = editQualifiers->styleSheet(); CHECK_SET_ERR(style == "background-color: rgb(255, 152, 142);", "unexpected styleSheet: " + style); -// 3. Enter any character set longer then 20 symbols in the line editor of the bar +// 3. Enter something with an incorrect symbol (eg "space") // Expected state: the line editor is highlighted in red background-color: rgb(255, 152, 142); } @@ -2570,6 +2536,7 @@ GUI_TEST_CLASS_DEFINITION(test_0886) { GTUtilsProjectTreeView::click(os, "Gene.fa"); GTGlobals::sleep(); GTKeyboardDriver::keyClick( Qt::Key_Delete); + GTGlobals::sleep(1000); GTLogTracer l2; GTUtilsNotifications::waitForNotification(os, false); @@ -2616,6 +2583,11 @@ GUI_TEST_CLASS_DEFINITION(test_0888) { } GUI_TEST_CLASS_DEFINITION(test_0889) { + //64-bit OS supported only +#ifdef Q_OS_WIN32 + return; +#endif + // 1) Open RNA.fa // 2) Use context menu on sequence {Align->Align sequence to mRNA} // 3) Select any item @@ -2648,6 +2620,7 @@ GUI_TEST_CLASS_DEFINITION(test_0889) { GUI_TEST_CLASS_DEFINITION(test_0896) { GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + GTUtilsWorkflowDesigner::removeCmdlineWorkerFromPalette(os, "SAMtools"); GTFileDialogUtils *ob = new GTFileDialogUtils(os, testDir + "_common_data/scenarios/_regression/896/_input", "SAMtools.etc"); GTGlobals::sleep(); @@ -2663,32 +2636,24 @@ GUI_TEST_CLASS_DEFINITION(test_0896) { GTUtilsTaskTreeView::waitTaskFinished(os); GTUtilsTaskTreeView::waitTaskFinished(os); - QString outputFile = QDir(sandBoxDir).absolutePath() + "/test_0896out.bam"; - - class OkClicker : public Filler { - public: - OkClicker(HI::GUITestOpStatus& _os) : Filler(_os, "CreateExternalProcessWorkerDialog"){} - virtual void run() { - QWidget *w = QApplication::activeWindow(); - CHECK(NULL != w, ); - - ExternalTool *samtools = AppContext::getExternalToolRegistry()->getByName("SAMtools"); - QLineEdit *ed = qobject_cast<QLineEdit*>(GTWidget::findWidget(os, "templateLineEdit", w)); - GTLineEdit::setText(os, ed, "'" + samtools->getPath() + "' view -b -S -o '" + QDir(sandBoxDir).absolutePath() + "/test_0896out.bam' $sam", false, true); - - QAbstractButton *button = GTWidget::findButtonByText(os, "Finish"); - CHECK(NULL != button, ); - GTWidget::click(os, button); - } - }; + CreateElementWithCommandLineToolFiller::ElementWithCommandLineSettings settings; + settings.tool = "SAMtools"; + settings.command = "%USUPP_SAMTOOLS% view -b -S -o '" + QDir(sandBoxDir).absolutePath() + "/test_0896out.bam' $sam"; + GTUtilsDialog::waitForDialog(os, new CreateElementWithCommandLineToolFiller(os, settings)); - GTUtilsDialog::waitForDialog(os, new OkClicker(os)); GTMouseDriver::moveTo(GTUtilsWorkflowDesigner::getItemCenter(os, "SAMtools")); GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "editConfiguration")); GTMouseDriver::click(); GTMouseDriver::click(Qt::RightButton); GTGlobals::sleep(); + WorkflowProcessItem* samtools = GTUtilsWorkflowDesigner::addElement(os, "SAMtools", true); + WorkflowProcessItem* fileList = GTUtilsWorkflowDesigner::getWorker(os, "File List"); + GTUtilsWorkflowDesigner::connect(os, fileList, samtools); + GTUtilsWorkflowDesigner::click(os, samtools); + QTableWidget* table = GTUtilsWorkflowDesigner::getInputPortsTable(os, 0); + GTUtilsWorkflowDesigner::setTableValue(os, "Plain text", "Source URL (by File List)", GTUtilsWorkflowDesigner::comboValue, table); + GTUtilsWorkflowDesigner::click(os, "File List"); GTUtilsWorkflowDesigner::setDatasetInputFile(os, testDir + "_common_data/bowtie/pattern/e_coli_1000.sam"); @@ -2766,7 +2731,7 @@ GUI_TEST_CLASS_DEFINITION(test_0908) { GTUtilsWorkflowDesigner::removeCmdlineWorkerFromPalette(os, "test_0908"); - //2) Click "Create element with command line tool" + //2) Click "Create element with external tool" //3) input name "test" //4) input data : "in1" and "in2" of FASTA //5) output data : "out1" of FASTA @@ -2959,10 +2924,10 @@ GUI_TEST_CLASS_DEFINITION(test_0938) { GTGlobals::sleep(); GTWidget::click(os, GTWidget::findWidget(os, "OP_ASS_NAVIGATION")); GTGlobals::sleep(); - - CHECK_SET_ERR(GTWidget::findWidget(os, "go_to_pos_line_edit") != NULL, "go_to_pos_line_edit not found"); - CHECK_SET_ERR(GTWidget::findWidget(os, "Go!") != NULL, "Go! button not found"); - CHECK_SET_ERR(GTWidget::findWidget(os, "COVERED") != NULL, "Covered regions widget not found"); + QWidget *parent = GTWidget::findWidget(os, "OP_OPTIONS_WIDGET"); + CHECK_SET_ERR(GTWidget::findWidget(os, "go_to_pos_line_edit", parent) != NULL, "go_to_pos_line_edit not found"); + CHECK_SET_ERR(GTWidget::findWidget(os, "Go!", parent) != NULL, "Go! button not found"); + CHECK_SET_ERR(GTWidget::findWidget(os, "COVERED", parent) != NULL, "Covered regions widget not found"); } GUI_TEST_CLASS_DEFINITION(test_0940) { diff --git a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_1_1000.h b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_1_1000.h index e9144090218d7418d251b140f6065ecabaa88e6b..d7d7359a25f03d565052b22b66282377ef514fdf 100644 --- a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_1_1000.h +++ b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_1_1000.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -90,7 +90,6 @@ GUI_TEST_CLASS_DECLARATION(test_0807) GUI_TEST_CLASS_DECLARATION(test_0808) GUI_TEST_CLASS_DECLARATION(test_0812) GUI_TEST_CLASS_DECLARATION(test_0814) -GUI_TEST_CLASS_DECLARATION(test_0818) GUI_TEST_CLASS_DECLARATION(test_0821) GUI_TEST_CLASS_DECLARATION(test_0828) GUI_TEST_CLASS_DECLARATION(test_0829) diff --git a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_2001_3000.cpp b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_2001_3000.cpp index 326818831cb382c871a23c9bc48bd270e89c3cdc..486d9ed0b1cb1d6be13095bd69467ad276d21891 100644 --- a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_2001_3000.cpp +++ b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_2001_3000.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -518,6 +518,9 @@ GUI_TEST_CLASS_DEFINITION( test_2021_6 ) // 1. Open "data/samples/CLUSTAL/COI.aln". GTFileDialog::openFile(os, dataDir + "samples/CLUSTALW/", "COI.aln"); GTUtilsTaskTreeView::waitTaskFinished(os); + if (GTUtilsProjectTreeView::isVisible(os)) { + GTUtilsProjectTreeView::toggleView(os); + } //2. Set cursor to the position 45 of the first line (after gaps). //const QPoint initialSelectionPos(44, 0); @@ -565,6 +568,9 @@ GUI_TEST_CLASS_DEFINITION( test_2021_8 ) // 1. Open "data/samples/CLUSTAL/COI.aln". GTFileDialog::openFile( os, dataDir + "samples/CLUSTALW/", "COI.aln"); GTUtilsTaskTreeView::waitTaskFinished(os); + if (GTUtilsProjectTreeView::isVisible(os)) { + GTUtilsProjectTreeView::toggleView(os); + } //2. Select the 45 and 46 of the second line (two symbols after gaps). GTUtilsMSAEditorSequenceArea::selectArea(os, QPoint( 44,1), QPoint( 45, 1)); @@ -587,12 +593,15 @@ GUI_TEST_CLASS_DEFINITION( test_2021_9 ) // 1. Open "data/samples/CLUSTAL/COI.aln". GTFileDialog::openFile( os, dataDir + "samples/CLUSTALW/", "COI.aln"); GTUtilsTaskTreeView::waitTaskFinished(os); + if (GTUtilsProjectTreeView::isVisible(os)) { + GTUtilsProjectTreeView::toggleView(os); + } //2. Select the 45 and 46 of the second line (two symbols after gaps). GTUtilsMSAEditorSequenceArea::selectArea(os, QPoint(44, 2), QPoint( 46,2)); GTGlobals::sleep(); - //3. Press BACKSPAC� + //3. Press BACKSPACE GTKeyboardDriver::keyClick(Qt::Key_Backspace ); GTGlobals::sleep(); @@ -1542,7 +1551,7 @@ GUI_TEST_CLASS_DEFINITION( test_2192 ){ // 7. Choose "Copy element content" on any tree element and paste the data to any editor. // Expected state: correct data was copied. // 8. Select some amount of text on a tree and click on "Copy selected text" which is now should be available. - GTUtilsDashboard::click(os, GTUtilsDashboard::findTreeElement(os, "SAMtools run 1")); + GTUtilsDashboard::click(os, GTUtilsDashboard::findTreeElement(os, "SAMtools run")); HIWebElement el = GTUtilsDashboard::findElement(os, samtoolsPath, "SPAN"); GTWebView::selectElementText(os, GTUtilsDashboard::getDashboard(os), el); GTUtilsDashboard::click(os, el, Qt::RightButton); @@ -1647,6 +1656,7 @@ GUI_TEST_CLASS_DEFINITION( test_2266_1 ){ GTUtilsWorkflowDesigner::openWorkflowDesigner(os); GTUtilsWorkflowDesigner::addSample(os, "call variants"); + GTGlobals::sleep(100); GTKeyboardDriver::keyClick(Qt::Key_Escape); GTMouseDriver::moveTo(GTUtilsWorkflowDesigner::getItemCenter(os, "Read Assembly (BAM/SAM)")); @@ -1682,13 +1692,14 @@ GUI_TEST_CLASS_DEFINITION( test_2267_1 ){ GTMenu::clickMainMenuItem(os, QStringList() << "Actions" << "Add" << "New annotation..."); GTGlobals::sleep(); // 3. Press Insert, press '1' key until there is no new symbols in lineedit -// - Runnable *filler = new EditQualifierFiller(os, "111111111111111111111111111111111111111111111111111111111111111111111111111111111", "val", true,true); +// Current state: no error message for long qualifier + Runnable *filler = new EditQualifierFiller(os, "111111111111111111111111111111111111111111111111111111111111111111111111111111111", "val", true, false); GTUtilsDialog::waitForDialog(os, filler); GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << ADV_MENU_ADD << "add_qualifier_action")); GTMouseDriver::moveTo(GTUtilsAnnotationsTreeView::getItemCenter(os, "D")); GTMouseDriver::click(Qt::RightButton); + // 4. Press Enter // Expected state: Edit qualifier window closes } @@ -1722,7 +1733,7 @@ GUI_TEST_CLASS_DEFINITION( test_2268 ) { GTGlobals::sleep(); ExternalToolRegistry* etRegistry = AppContext::getExternalToolRegistry(); CHECK_SET_ERR(etRegistry, "External tool registry is NULL"); - ExternalTool* tCoffee = etRegistry->getByName("T-Coffee"); + ExternalTool* tCoffee = etRegistry->getById("USUPP_T_COFFEE"); CHECK_SET_ERR(tCoffee, "T-coffee tool is NULL"); QFileInfo toolPath(tCoffee->getPath()); CHECK_SET_ERR(toolPath.exists(), "T-coffee tool is not set"); @@ -3857,6 +3868,7 @@ GUI_TEST_CLASS_DEFINITION( test_2568 ){ GTUtilsWorkflowDesigner::openWorkflowDesigner(os); // 2. Add the "Call Variants" sample GTUtilsWorkflowDesigner::addSample(os, "call variants"); + GTGlobals::sleep(100); // 3. Run the wizard class customFileDialog : public CustomScenario { @@ -3896,6 +3908,7 @@ GUI_TEST_CLASS_DEFINITION( test_2568 ){ GTUtilsDialog::waitForDialog(os, new WizardFiller(os, "Call Variants Wizard", new customWizard())); GTWidget::click(os, GTAction::button(os, "Show wizard")); + GTGlobals::sleep(100); } GUI_TEST_CLASS_DEFINITION( test_2569 ){ @@ -3916,16 +3929,16 @@ GUI_TEST_CLASS_DEFINITION( test_2569 ){ GTUtilsTaskTreeView::waitTaskFinished(os); // 4. Click "External Tools" on the appeared Dashboard. GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); -// 5. Expand "SAMtools run 1" - GTUtilsDashboard::click(os, GTUtilsDashboard::findTreeElement(os, "SAMtools run 1")); -// 6. Right click on the child element of the "Arguments" element. - GTUtilsDashboard::click(os, GTUtilsDashboard::findTreeElement(os, "Arguments"), Qt::RightButton); +// 5. Expand "SAMtools run" + GTUtilsDashboard::click(os, GTUtilsDashboard::findTreeElement(os, "SAMtools run")); +// 6. Right click on the child element of the "Command" element. + GTUtilsDashboard::click(os, GTUtilsDashboard::findTreeElement(os, "Command"), Qt::RightButton); // 7. Click "Copy element content". GTUtilsDashboard::click(os, GTUtilsDashboard::findContextMenuElement(os, "Copy element content")); // 8. Check the clipboard. QString clipboardText = GTClipboard::text(os); // Expected state: the clipboard content is the same to the element content. - CHECK_SET_ERR(clipboardText == "Arguments", "copy element content works wrong " + clipboardText); + CHECK_SET_ERR(clipboardText == "Command", "copy element content works wrong " + clipboardText); } GUI_TEST_CLASS_DEFINITION( test_2570 ) { @@ -3936,8 +3949,7 @@ GUI_TEST_CLASS_DEFINITION( test_2570 ) { GTUtilsTaskTreeView::waitTaskFinished(os); GTMouseDriver::moveTo(GTUtilsProjectTreeView::getItemCenter(os, "human_T1.fa")); - - GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << ACTION_BLAST_SUBMENU << ACTION_BLAST_FORMAT_DB)); + GTUtilsDialog::waitForDialog(os, new PopupChooserByText(os, QStringList() << "BLAST" << "FormatDB...")); FormatDBSupportRunDialogFiller::Parameters p; p.justCancel = true; p.checkAlphabetType = true; @@ -4023,7 +4035,7 @@ GUI_TEST_CLASS_DEFINITION( test_2579 ) { GTUtilsDialog::waitForDialog(os, new AppSettingsDialogFiller(os, new MafftInactivation())); GTMenu::clickMainMenuItem(os, QStringList() << "Settings" << "Preferences..."); - + GTGlobals::sleep(); GTUtilsLog::check(os, l); } GUI_TEST_CLASS_DEFINITION(test_2581) { @@ -4395,12 +4407,8 @@ GUI_TEST_CLASS_DEFINITION(test_2640){ GTUtilsWorkflowDesigner::openWorkflowDesigner(os); // 2. Select "tuxedo" sample // 3. Set proper input data - QString expected; -#ifdef Q_OS_MAC - expected = "tophat-2.0.9/tophat -p 94 --output-dir"; -#else - expected = "tophat-2.0.8b/tophat -p 94 --output-dir"; -#endif + QString expected = "tophat-2.1.1/tophat -p 94 --output-dir";; + GTLogTracer l(expected); QMap<QString, QVariant> map; map.insert("Bowtie index folder", QDir().absoluteFilePath(testDir + "_common_data/bowtie/index")); @@ -4550,7 +4558,9 @@ GUI_TEST_CLASS_DEFINITION( test_2662 ){ GTUtilsDashboard::openTab(os, GTUtilsDashboard::ExternalTools); // Expected state: vcfTools executible file is /usr/bin/perl path/to/vcfutils.pl // Actual: vcfTools executible file is /usr/bin/perl - GTUtilsDashboard::click(os, GTUtilsDashboard::findElement(os, "vcfutils run 1", "*", true)); + GTUtilsDashboard::click(os, GTUtilsDashboard::findTreeElement(os, "vcfutils run")); + //GTUtilsDashboard::click(os, GTUtilsDashboard::findElement(os, "vcfutils run", "*", true)); + #ifdef Q_OS_WIN GTUtilsDashboard::findElement(os, "samtools-0.1.19\\vcfutils.pl", "SPAN"); #else @@ -4786,7 +4796,13 @@ GUI_TEST_CLASS_DEFINITION(test_2713) { // Expected state: dialog about detected file modification has appeared in UGENE window // 6. Press "Yes" // Expected state: "human_T1" view has disappeared from the "Bookmarks" list, "murine.gb" has been reloaded. - GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, QMessageBox::Yes)); + const GUIDialogWaiter::WaitSettings waitSettings(""); + GTUtilsDialog::waitForDialog(os, + new MessageBoxDialogFiller(os, + QMessageBox::Yes, + "Document 'test_2713.gb' was modified. Do you want to reload it?", + ""), + waitSettings); QFile file(sandBoxDir + "/test_2713.gb"); bool opened = file.open(QIODevice::ReadOnly | QIODevice::Text); @@ -5425,12 +5441,14 @@ GUI_TEST_CLASS_DEFINITION(test_2811) { // 2. Open any workflow, create a breakpoint for any element. GTUtilsWorkflowDesigner::addSample(os, "Align sequences with MUSCLE"); GTKeyboardDriver::keyClick(Qt::Key_Escape); + GTGlobals::sleep(); GTUtilsWorkflowDesigner::setBreakpoint(os, "Align with MUSCLE"); // 3. Open another workflow. // Expected state: breakpoints list is cleared. GTUtilsWorkflowDesigner::addSample(os, "Align sequences with MUSCLE"); GTKeyboardDriver::keyClick(Qt::Key_Escape); + GTGlobals::sleep(); QStringList breakpointList = GTUtilsWorkflowDesigner::getBreakpointList(os); CHECK_SET_ERR(breakpointList.isEmpty(), "There are unexpected breakpoints"); } @@ -5456,12 +5474,9 @@ GUI_TEST_CLASS_DEFINITION(test_2829) { //5) In second sequence view click Remove sequence on the toolbar //Expected state: DotPlot closed and UGENE didn't crash - GTKeyboardDriver::keyClick( Qt::Key_Tab, Qt::ControlModifier); - GTGlobals::sleep(500); - GTKeyboardDriver::keyClick( Qt::Key_Tab, Qt::ControlModifier); - GTGlobals::sleep(500); + GTUtilsMdi::activateWindow(os, "murine [s] NC_001363"); - QWidget* toolbar = GTWidget::findWidget(os, "views_tool_bar_NC_001363"); + QWidget* toolbar = GTWidget::findWidget(os, "views_tool_bar_NC_001363", GTUtilsMdi::activeWindow(os)); CHECK_SET_ERR(toolbar != NULL, "Cannot find views_tool_bar_NC_001363"); GTWidget::click(os, GTWidget::findWidget(os, "remove_sequence", toolbar)); } @@ -5742,7 +5757,7 @@ GUI_TEST_CLASS_DEFINITION(test_2900) { GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "ADV_MENU_ANALYSE" << "Find restriction sites")); GTUtilsDialog::waitForDialog(os, new FindEnzymesDialogFiller(os, defaultEnzymes)); GTMenu::showContextMenu(os, GTUtilsSequenceView::getSeqWidgetByNumber(os)); - + GTUtilsTaskTreeView::waitTaskFinished(os); GTGlobals::sleep(500); const int firstAnnotationsCount = GTUtilsAnnotationsTreeView::getAnnotationNamesOfGroup(os, "enzyme (8, 0)").size(); @@ -5751,7 +5766,7 @@ GUI_TEST_CLASS_DEFINITION(test_2900) { GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "ADV_MENU_ANALYSE" << "Find restriction sites")); GTUtilsDialog::waitForDialog(os, new FindEnzymesDialogFiller(os, defaultEnzymes)); GTMenu::showContextMenu(os, GTUtilsSequenceView::getSeqWidgetByNumber(os)); - + GTUtilsTaskTreeView::waitTaskFinished(os); GTGlobals::sleep(500); const int secondAnnotationsCount = GTUtilsAnnotationsTreeView::getAnnotationNamesOfGroup(os, "enzyme (8, 0)").size(); @@ -5764,7 +5779,15 @@ GUI_TEST_CLASS_DEFINITION(test_2903) { GTFileDialog::openFile( os, testDir + "_common_data/regression/2903", "unknown_virus.fa" ); GTUtilsTaskTreeView::waitTaskFinished(os); - GTUtilsDialog::waitForDialog(os, new RemoteBLASTDialogFiller(os)); + class Scenario : public CustomScenario { + void run(HI::GUITestOpStatus &os) { + QWidget* dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(dialog != NULL, "activeModalWidget is NULL"); + GTKeyboardDriver::keyClick(Qt::Key_Enter); + } + }; + + GTUtilsDialog::waitForDialog(os, new RemoteBLASTDialogFiller(os, new Scenario)); GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "ADV_MENU_ANALYSE" << "Query NCBI BLAST database")); GTMenu::showContextMenu(os, GTWidget::findWidget(os, "render_area_virus_X")); diff --git a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_2001_3000.h b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_2001_3000.h index 2bc80649da46ff1112ec27b596090a832b5dd7e0..ce6f9154cd7ff849132c94f7be92ffc6c07fdf33 100644 --- a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_2001_3000.h +++ b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_2001_3000.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_3001_4000.cpp b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_3001_4000.cpp index d47dfb1050257b4f82bd71284906292e2325d828..a9a6e65b236c08a88fc4c6a3bcaefa3d678d7c97 100644 --- a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_3001_4000.cpp +++ b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_3001_4000.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -471,6 +471,8 @@ GUI_TEST_CLASS_DEFINITION(test_3073) { GTGlobals::sleep(); GTUtilsDocument::loadDocument(os, "human_T1.fa"); + GTUtilsTaskTreeView::waitTaskFinished(os); + GTGlobals::sleep(); CHECK_SET_ERR( GTUtilsDocument::isDocumentLoaded(os, "test_3073.gb"), "Annotation file is not loaded!"); GTMenu::clickMainMenuItem(os, QStringList() << "File" << "Close project", GTGlobals::UseMouse); @@ -481,6 +483,8 @@ GUI_TEST_CLASS_DEFINITION(test_3073) { GTGlobals::sleep(); GTUtilsDocument::loadDocument(os, "test_3073.gb"); + GTUtilsTaskTreeView::waitTaskFinished(os); + GTGlobals::sleep(200); CHECK_SET_ERR( GTUtilsDocument::isDocumentLoaded(os, "human_T1.fa"), "Sequence file is not loaded!"); GTUtilsLog::check(os, l); @@ -538,11 +542,10 @@ GUI_TEST_CLASS_DEFINITION(test_3085_1) { GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, QMessageBox::Yes)); QFile(sandBoxDir + "murine_3085_1.gb").rename(sandBoxDir + "murine_3085_1_1.gb"); QFile(testDir + "_common_data/regression/3085/murine_1.gb").copy(sandBoxDir + "murine_3085_1.gb"); - GTGlobals::sleep(10000); + GTGlobals::sleep(6000); //Expected state: file was updated, the sequence view with annotations is opened and updated. QWidget *reloaded1Sv = GTUtilsMdi::activeWindow(os); - GTGlobals::sleep(1000); CHECK_SET_ERR(sv != reloaded1Sv, "File is not reloaded 1"); //4. Change the annotations file outside UGENE (e.g. change annotation region). @@ -551,7 +554,7 @@ GUI_TEST_CLASS_DEFINITION(test_3085_1) { GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, QMessageBox::Yes)); QFile(sandBoxDir + "murine_3085_1.gb").rename(sandBoxDir + "murine_3085_1_2.gb"); QFile(testDir + "_common_data/regression/3085/murine_2.gb").copy(sandBoxDir + "murine_3085_1.gb"); - GTGlobals::sleep(10000); + GTGlobals::sleep(6000); //Expected state:: file was updated, the sequence view with annotations is opened and updated. QWidget *reloaded2Sv = GTUtilsMdi::activeWindow(os); @@ -571,10 +574,11 @@ GUI_TEST_CLASS_DEFINITION(test_3085_2) { GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, QMessageBox::Yes)); QFile(sandBoxDir + "murine_3085_2.gb").rename(sandBoxDir + "murine_3085_2_1.gb"); QFile(testDir + "_common_data/regression/3085/test_1.gb").copy(sandBoxDir + "murine_3085_2.gb"); - GTGlobals::sleep(10000); + GTGlobals::sleep(6000); //Expected state: document reloaded without errors/warnings. CHECK_SET_ERR(!l.hasError(), "Errors in log"); + GTGlobals::sleep(); } GUI_TEST_CLASS_DEFINITION(test_3086) { @@ -1083,7 +1087,7 @@ class test_3165_messageBoxDialogFiller: public MessageBoxDialogFiller{ public: test_3165_messageBoxDialogFiller(HI::GUITestOpStatus &os, QMessageBox::StandardButton _b): MessageBoxDialogFiller(os, _b){} - virtual void run(){ + virtual void run() override { QWidget* activeModal = QApplication::activeModalWidget(); QMessageBox *messageBox = qobject_cast<QMessageBox*>(activeModal); CHECK_SET_ERR(messageBox != NULL, "messageBox is NULL"); @@ -1469,20 +1473,21 @@ GUI_TEST_CLASS_DEFINITION(test_3226) { GTUtilsWorkflowDesigner::openWorkflowDesigner(os); GTUtilsWorkflowDesigner::addAlgorithm(os, "Read File URL(s)"); - ////2. Setup alias 'in' for input path. + //2. Setup alias 'in' for input path. QMap<QPoint*, QString> map; QPoint p(1, 0); map[&p] = "in"; GTUtilsDialog::waitForDialog(os, new AliasesDialogFiller(os, map)); GTWidget::click(os, GTAction::button(os, "Set parameter aliases")); - ////3. Copy and paste the 'Read File URL(s)' element. + + //3. Copy and paste the 'Read File URL(s)' element. GTUtilsWorkflowDesigner::click(os, "Read File URL(s)"); - //GTKeyboardUtils::copy(os); - GTWidget::click(os, GTAction::button(os, "Copy action")); + GTKeyboardUtils::copy(os); + //GTWidget::click(os, GTAction::button(os, "Copy action")); GTKeyboardUtils::paste(os); - - ////4. Save the workflow. + + //4. Save the workflow. QString path = sandBoxDir + "test_3226_workflow.uwl"; GTUtilsDialog::waitForDialog(os, new WorkflowMetaDialogFiller(os, path, "")); GTWidget::click(os, GTAction::button(os, "Save workflow action")); @@ -1504,22 +1509,31 @@ GUI_TEST_CLASS_DEFINITION(test_3229){ WorkflowProcessItem* read = GTUtilsWorkflowDesigner::addElement(os, "Read Sequence", true); WorkflowProcessItem* write = GTUtilsWorkflowDesigner::addElement(os, "Write Sequence", true); GTUtilsWorkflowDesigner::connect(os, read, write); + // 2. Set input a single file human_T1 GTUtilsWorkflowDesigner::click(os, read); GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/FASTA/human_T1.fa"); + // 3. Set the output path: ../test.fa or ./test.fa Output file GTUtilsWorkflowDesigner::click(os, write); GTUtilsWorkflowDesigner::setParameter(os, "Output file", "./test.fa", GTUtilsWorkflowDesigner::textValue); + // 4. Run the workflow. GTUtilsWorkflowDesigner::runWorkflow(os); GTUtilsTaskTreeView::waitTaskFinished(os); + // Expected state: there is a single result file on the WD dashboard. - //QString text = "test.fa\" - HIWebElement table = GTUtilsDashboard::findElement(os, "test.fa", "TABLE"); - QString s = table.toInnerXml(); - int i = s.count("test.fa"); + const QStringList outputFiles = GTUtilsDashboard::getOutputFiles(os); - CHECK_SET_ERR( i==3, "unexpected table content: " + s); + const int expectedFilesCount = 1; + CHECK_SET_ERR(expectedFilesCount == outputFiles.size(), + QString("An unexpected count of output files: expected %1, got %2") + .arg(expectedFilesCount).arg(outputFiles.size())); + + const QString expectedFileName = "test.fa"; + CHECK_SET_ERR(expectedFileName == outputFiles.first(), + QString("An unexpected result file name: expected '%1', got '%2'") + .arg(expectedFileName).arg(outputFiles.first())); } GUI_TEST_CLASS_DEFINITION(test_3245) { @@ -1586,7 +1600,7 @@ GUI_TEST_CLASS_DEFINITION(test_3253) { GTFileDialog::openFile(os, dataDir + "/samples/ABIF/", "A01.abi"); GTUtilsTaskTreeView::waitTaskFinished(os); GTGlobals::sleep(); - QSplitterHandle *splitterHandle = qobject_cast<QSplitterHandle*>(GTWidget::findWidget(os, "qt_splithandle_")); + QSplitterHandle *splitterHandle = qobject_cast<QSplitterHandle*>(GTWidget::findWidget(os, "qt_splithandle_", GTUtilsMdi::activeWindow(os))); CHECK_SET_ERR( NULL != splitterHandle, "splitterHandle is not present" ); QWidget *chromaView = GTWidget::findWidget( os, "chromatogram_view_A1#berezikov"); @@ -2526,7 +2540,7 @@ GUI_TEST_CLASS_DEFINITION(test_3379) { //3.Add more files to the project and open a few more views GTFileDialog::openFile(os, testDir + "_common_data/cmdline/", "DNA.fa"); GTUtilsTaskTreeView::waitTaskFinished(os); - GTGlobals::sleep(500); + GTGlobals::sleep(1000); //4. Return to 'abcd.fa' view GTMouseDriver::moveTo(GTUtilsProjectTreeView::getItemCenter(os, "seq1")); @@ -2550,7 +2564,8 @@ GUI_TEST_CLASS_DEFINITION(test_3384){ GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "ADV_MENU_EDIT" << "action_edit_insert_sub_sequences")); GTUtilsDialog::waitForDialog(os, new InsertSequenceFiller(os, "A")); - GTMenu::showContextMenu(os, GTWidget::findWidget(os, "ADV_single_sequence_widget_0")); + GTMenu::showContextMenu(os, GTUtilsSequenceView::getDetViewByNumber(os)); + // Select an area on CV that contains zero position QWidget* cv = GTWidget::findWidget(os, "CV_ADV_single_sequence_widget_0"); @@ -2699,7 +2714,7 @@ GUI_TEST_CLASS_DEFINITION(test_3402){ } QList<Task*> innertList; foreach (Task* t, tList) { - innertList.append(t->getSubtasks()); + innertList.append(t->getPureSubtasks()); } foreach (Task* t, innertList) { if(t->getTaskName().contains("Opening view")){ @@ -2809,7 +2824,7 @@ GUI_TEST_CLASS_DEFINITION(test_3439){ GTGlobals::sleep(); //there is should be 2 errors CHECK_SET_ERR(GTUtilsWorkflowDesigner::checkErrorList(os, "Write Alignment") == 1, "Errors count dont match, should be 2 validation errors"); - //set paramter "Data storage" to "Shared UGENE database" + //set parameter "Data storage" to "Shared UGENE database" GTUtilsWorkflowDesigner::click(os, "Write Alignment", QPoint(-30,-30)); GTGlobals::sleep(); GTUtilsWorkflowDesigner::setParameter(os, "Data storage", 1, GTUtilsWorkflowDesigner::comboValue); @@ -3202,7 +3217,7 @@ GUI_TEST_CLASS_DEFINITION(test_3478) { FormatDBSupportRunDialogFiller::Parameters p; p.justCancel = true; GTUtilsDialog::waitForDialog(os, new FormatDBSupportRunDialogFiller(os, p)); - GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "BLAST" << "FormatDB")); + GTUtilsDialog::waitForDialog(os, new PopupChooserByText(os, QStringList() << "BLAST" << "FormatDB...")); GTMouseDriver::click(Qt::RightButton); GTUtilsLog::check(os, l); @@ -3461,7 +3476,7 @@ GUI_TEST_CLASS_DEFINITION(test_3519_2) { GTUtilsDialog::waitForDialog(os, new FindEnzymesDialogFiller(os, QStringList(), new AllEnzymesSearchScenario())); GTWidget::click(os, GTWidget::findWidget(os, "Find restriction sites_widget")); GTThread::waitForMainThread(); - GTGlobals::sleep(40000); + GTGlobals::sleep(1000); GTUtilsTaskTreeView::openView(os); GTUtilsDialog::waitForDialog(os, new SiteconCustomFiller(os)); @@ -3533,7 +3548,7 @@ GUI_TEST_CLASS_DEFINITION(test_3551){ FormatDBSupportRunDialogFiller::Parameters p; p.customFiller_3551 = true; GTUtilsDialog::waitForDialog(os, new FormatDBSupportRunDialogFiller(os, p)); - GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "BLAST" << "FormatDB")); + GTUtilsDialog::waitForDialog(os, new PopupChooserByText(os, QStringList() << "BLAST" << "FormatDB...")); GTMouseDriver::click(Qt::RightButton); } @@ -4618,6 +4633,7 @@ GUI_TEST_CLASS_DEFINITION(test_3715) { //3. Choose a sample GTUtilsWorkflowDesigner::addSample(os, "call variants"); GTKeyboardDriver::keyClick(Qt::Key_Escape); + GTUtilsWorkflowDesigner::click(os, "Read Assembly (BAM/SAM)"); GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, QMessageBox::Ok)); GTKeyboardDriver::keyClick( 'r', Qt::ControlModifier); @@ -5652,6 +5668,7 @@ GUI_TEST_CLASS_DEFINITION(test_3886) { //2. Open 'Extract consensus as sequence' sample. GTUtilsWorkflowDesigner::addSample(os, "Extract consensus as sequence"); + GTUtilsTaskTreeView::waitTaskFinished(os); //3. Show wizard. class TestWizardFiller : public Filler { @@ -6068,29 +6085,6 @@ GUI_TEST_CLASS_DEFINITION(test_3960) { CHECK_SET_ERR(logTracer.hasError() == false, QString("Error message found: %1, but not expected.").arg(logTracer.getError())); } -GUI_TEST_CLASS_DEFINITION(test_3967){ - GTLogTracer l; - GTUtilsDialog::waitForDialog(os, new SpadesGenomeAssemblyDialogFiller(os, "Paired-end (Interlaced)", QStringList()<<testDir + "_common_data/cmdline/external-tool-support/spades/ecoli_1K_1.fq", - QStringList(), sandBoxDir)); - GTMenu::clickMainMenuItem(os, QStringList() << "Tools" << "NGS data analysis" << "Reads de novo assembly (with SPAdes)..."); - GTUtilsTaskTreeView::waitTaskFinished(os); - GTUtilsLog::check(os, l); -//// 1. Open workflow designer -/// -// GTUtilsWorkflowDesigner::openWorkflowDesigner(os); -// QMap<QString, QVariant> map; -// map.insert("Left Read URL(s)", testDir + "_common_data/cmdline/external-tool-support/spades/ecoli_1K_1.fq"); -// map.insert("Right Read URL(s)", testDir + "_common_data/cmdline/external-tool-support/spades/ecoli_1K_2.fq"); -// GTUtilsDialog::waitForDialog(os, new ConfigurationWizardFiller(os, "Assembly Pipeline", QStringList()<<"Paired tags")); -// GTUtilsDialog::waitForDialog(os, new WizardFiller(os, "Assemble Genomes Wizard", QStringList(), map)); -//// 2. Add spades sampale. Use interlaced paired-read mode -// GTUtilsWorkflowDesigner::addSample(os, "Assembly with Spades"); -//// 3. Run workflow -// GTUtilsWorkflowDesigner::runWorkflow(os); -// GTUtilsTaskTreeView::waitTaskFinished(os); -//// 4. Expected stat -// GTUtilsLog::check(os, l); -} GUI_TEST_CLASS_DEFINITION(test_3975) { // 1. Open _common_data/gff/noheader.gff @@ -6266,7 +6260,7 @@ GUI_TEST_CLASS_DEFINITION(test_3998){ GTKeyboardDriver::keyClick( Qt::Key_Delete); GTGlobals::sleep(); -// Current state: error occured, sequence disappeared from the display +// Current state: error occurred, sequence disappeared from the display GTUtilsLog::check(os, l); } diff --git a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_3001_4000.h b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_3001_4000.h index c52cc848de8325f7a6d9b5a668642c17bdc64646..38e376727ade5ad8ee87d147ac9a74b34f00bb6b 100644 --- a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_3001_4000.h +++ b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_3001_4000.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -255,7 +255,6 @@ GUI_TEST_CLASS_DECLARATION(test_3928) GUI_TEST_CLASS_DECLARATION_SET_TIMEOUT(test_3938, 480000) GUI_TEST_CLASS_DECLARATION_SET_TIMEOUT(test_3950, 960000) GUI_TEST_CLASS_DECLARATION(test_3953) -GUI_TEST_CLASS_DECLARATION(test_3967) GUI_TEST_CLASS_DECLARATION(test_3959) GUI_TEST_CLASS_DECLARATION(test_3960) GUI_TEST_CLASS_DECLARATION(test_3975) diff --git a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_4001_5000.cpp b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_4001_5000.cpp index 7f68f92cf54206ef374ff36111c988a4cdf3c36a..8674152927b1d53464606999c9c66e06c1dd5062 100644 --- a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_4001_5000.cpp +++ b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_4001_5000.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -242,7 +242,7 @@ GUI_TEST_CLASS_DEFINITION(test_4009) { GTGlobals::sleep(); CHECK_SET_ERR(GTUtilsTaskTreeView::getTopLevelTasksCount(os)==0, "some tasks were not cancelled") - //Current state: the task hangs, debug error occured with message "Infinite wait has timed out" + //Current state: the task hangs, debug error occurred with message "Infinite wait has timed out" } GUI_TEST_CLASS_DEFINITION(test_4010) { @@ -287,7 +287,7 @@ GUI_TEST_CLASS_DEFINITION(test_4011){ GTUtilsWorkflowDesigner::setDatasetInputFile(os, testDir + "_common_data/regression/4011/human_T1.aln"); GTUtilsWorkflowDesigner::runWorkflow(os); // Current state: -// Runtime error occured(x86 version of UGENE) +// Runtime error occurred(x86 version of UGENE) // Windows hangs(x64 version) l.checkMessage("Nothing to write"); } @@ -699,7 +699,8 @@ GUI_TEST_CLASS_DEFINITION(test_4072) { CHECK_SET_ERR(vSeqScroll != NULL, "No scroll bar at the bottom of sequence area"); CHECK_SET_ERR(!vSeqScroll->isVisible(), "Scroll bar at the rigth side of sequence area is visible"); - QWidget* hNameScroll = GTWidget::findWidget(os, "horizontal_names_scroll"); + QWidget *parent = GTWidget::findWidget(os, "COI [m] COI", GTWidget::findWidget(os, "COI [m] COI_SubWindow")); + QWidget* hNameScroll = GTWidget::findWidget(os, "horizontal_names_scroll", parent); CHECK_SET_ERR(hNameScroll != NULL, "No scroll bar at the bottom of name list area"); QSplitter* splitter = qobject_cast<QSplitter *>(GTWidget::findWidget(os, "msa_editor_horizontal_splitter")); @@ -729,9 +730,11 @@ GUI_TEST_CLASS_DEFINITION(test_4072) { GTFileDialog::openFile(os, testDir + "_common_data/clustal/fungal - all.aln"); GTUtilsTaskTreeView::waitTaskFinished(os); GTGlobals::sleep(1000); - hNameScroll = GTWidget::findWidget(os, "horizontal_names_scroll"); + + parent = GTWidget::findWidget(os, "fungal - all [m] fungal - all", GTWidget::findWidget(os, "fungal - all [m] fungal - all_SubWindow")); + hNameScroll = GTWidget::findWidget(os, "horizontal_names_scroll", parent); CHECK_SET_ERR(hNameScroll != NULL, "No scroll bar at the bottom of name list area for fungal-all.aln"); - CHECK_SET_ERR(hNameScroll->isVisible(), "Scroll bar at the bottom of name list area is not visible for fungal-all.aln"); + CHECK_SET_ERR(!hNameScroll->isVisible(), "Scroll bar at the bottom of name list area is visible for fungal-all.aln"); } @@ -909,7 +912,7 @@ GUI_TEST_CLASS_DEFINITION(test_4096) { GTUtilsProjectTreeView::checkItem(os, "test_4096.aln"); - const QString referenceMsaContent = getFileContent(testDir + "_common_data/clustal/test_4096.aln"); + const QString referenceMsaContent = getFileContent(testDir + "_common_data/regression/4096/test_4096.aln"); const QString resultMsaContent = getFileContent(sandBoxDir + "test_4096.aln"); CHECK_SET_ERR(!referenceMsaContent.isEmpty() && referenceMsaContent == resultMsaContent, "Unexpected MSA content"); @@ -2094,7 +2097,6 @@ GUI_TEST_CLASS_DEFINITION(test_4232) { const QModelIndex sequenceDocIndex = GTUtilsProjectTreeView::findIndex(os, "illumina.fa"); const QModelIndex sequenceObjIndex = sequenceDocIndex.child(0, 0); - GTUtilsNotifications::waitForNotification(os, true, "It seems that sequence"); GTUtilsProjectTreeView::dragAndDrop(os, sequenceObjIndex, GTWidget::findWidget(os, "assembly_reads_area")); // Expected state: sequence object and document are highlighted in the Project view @@ -2333,6 +2335,7 @@ GUI_TEST_CLASS_DEFINITION(test_4295) { //clean up GTUtilsWorkflowDesigner::openWorkflowDesigner(os); GTUtilsWorkflowDesigner::removeCmdlineWorkerFromPalette(os, "test_4295"); + GTFile::copy(os, testDir + "_common_data/scenarios/_regression/4295/test_4295.etc", sandBoxDir + "test_4295.etc"); // start test GTLogTracer logTracer; @@ -2344,50 +2347,29 @@ GUI_TEST_CLASS_DEFINITION(test_4295) { GTUtilsWorkflowDesigner::addElement(os, "Write Plain Text"); GTGlobals::sleep(200); - GTFileDialogUtils *ob = new GTFileDialogUtils(os, testDir + "_common_data/scenarios/_regression/4295", "test_4295.etc"); + GTFileDialogUtils *ob = new GTFileDialogUtils(os, sandBoxDir, "test_4295.etc"); GTUtilsDialog::waitForDialog(os, ob); QAbstractButton* button = GTAction::button(os, "AddElementWithCommandLineTool"); GTWidget::click(os, button); GTGlobals::sleep(200); - WorkflowProcessItem *cmdlineWorker = GTUtilsWorkflowDesigner::getWorker(os, "test_4295"); - GTUtilsWorkflowDesigner::connect(os, GTUtilsWorkflowDesigner::getWorker(os, "Read File URL(s)"), cmdlineWorker); + GTUtilsWorkflowDesigner::click(os, "test_4295"); + + WorkflowProcessItem* element = GTUtilsWorkflowDesigner::getWorker(os, "test_4295"); + GTUtilsWorkflowDesigner::connect(os, GTUtilsWorkflowDesigner::getWorker(os, "Read File URL(s)"), element); GTGlobals::sleep(200); - GTUtilsWorkflowDesigner::connect(os, cmdlineWorker, GTUtilsWorkflowDesigner::getWorker(os, "Write Plain Text")); + GTUtilsWorkflowDesigner::connect(os, element, GTUtilsWorkflowDesigner::getWorker(os, "Write Plain Text")); GTGlobals::sleep(200); GTUtilsWorkflowDesigner::click(os, "test_4295"); GTGlobals::sleep(200); QTableWidget* table = GTUtilsWorkflowDesigner::getInputPortsTable(os, 0); GTUtilsWorkflowDesigner::setTableValue(os, "Plain text", "Source URL (by Read File URL(s))", GTUtilsWorkflowDesigner::comboValue, table); - GTUtilsWorkflowDesigner::click(os, "test_4295"); - - class OkClicker : public Filler { - public: - OkClicker(HI::GUITestOpStatus& _os) : Filler(_os, "CreateExternalProcessWorkerDialog"){} - virtual void run() { - QWidget *w = QApplication::activeWindow(); - CHECK(NULL != w, ); - - QLineEdit *ed = qobject_cast<QLineEdit*>(GTWidget::findWidget(os, "templateLineEdit", w)); - GTLineEdit::setText(os, ed, "echo $in > $out"); - - QAbstractButton *button = GTWidget::findButtonByText(os, "Finish"); - CHECK(NULL != button, ); - GTWidget::click(os, button); - } - }; - - GTUtilsDialog::waitForDialog(os, new OkClicker(os)); - GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "editConfiguration")); - GTUtilsWorkflowDesigner::click(os, "test_4295",QPoint(0,0),Qt::RightButton); - GTGlobals::sleep(); GTUtilsWorkflowDesigner::runWorkflow(os); GTUtilsTaskTreeView::waitTaskFinished(os); GTUtilsLog::check(os, logTracer); - } GUI_TEST_CLASS_DEFINITION(test_4302_1) { @@ -2470,9 +2452,10 @@ GUI_TEST_CLASS_DEFINITION(test_4308) { const bool itemExistsBefore = GTUtilsProjectTreeView::checkItem(os, "PF07724_full_family.fa"); CHECK_SET_ERR(itemExistsBefore, "A loading item not found"); - GTUtilsNotifications::waitForNotification(os, true, "Subtask {Load 'PF07724_full_family.fa'} is canceled Document was removed"); + //GTUtilsNotifications::waitForNotification(os, true, "Subtask {Load 'PF07724_full_family.fa'} is canceled Document was removed"); + GTUtilsNotifications::waitForNotification(os, true, "Document was removed"); GTUtilsDocument::removeDocument(os, "PF07724_full_family.fa"); - GTGlobals::sleep(500); + GTGlobals::sleep(); // Expected state: the document is removed from the project, the loading task is canceled, a notification about the canceled task appears. const bool itemExists = GTUtilsProjectTreeView::checkItem(os, "PF07724_full_family.fa"); @@ -2563,9 +2546,9 @@ GUI_TEST_CLASS_DEFINITION(test_4323_1) { GTFileDialog::openFile(os, dataDir + "samples/CLUSTALW/COI.aln"); GTUtilsTaskTreeView::waitTaskFinished(os); -// 2. Click "Align sequence to this alignment" and select "_common_data/database.ini". +// 2. Click "Align sequence(s) to this alignment" and select "_common_data/database.ini". GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, testDir + "_common_data/database.ini")); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence to this alignment"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence(s) to this alignment"); // Expected state: load task fails, safe point doesn't trigger. GTUtilsTaskTreeView::waitTaskFinished(os); @@ -2578,9 +2561,9 @@ GUI_TEST_CLASS_DEFINITION(test_4323_2) { GTFileDialog::openFile(os, dataDir + "samples/CLUSTALW/COI.aln"); GTUtilsTaskTreeView::waitTaskFinished(os); -// 2. Click "Align sequence to this alignment" button on the toolbar, select "samples/PDB/1CF7.pdb". +// 2. Click "Align sequence(s) to this alignment" button on the toolbar, select "samples/PDB/1CF7.pdb". GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, dataDir + "samples/PDB/1CF7.PDB")); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence to this alignment"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence(s) to this alignment"); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -2605,9 +2588,9 @@ GUI_TEST_CLASS_DEFINITION(test_4323_3) { GTFileDialog::openFile(os, dataDir + "samples/CLUSTALW/COI.aln"); GTUtilsTaskTreeView::waitTaskFinished(os); -// 2. Click "Align sequence to this alignment" button on the toolbar, select "samples/PDB/1CF7.pdb". +// 2. Click "Align sequence(s) to this alignment" button on the toolbar, select "samples/PDB/1CF7.pdb". GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, dataDir + "samples/PDB/1CF7.PDB")); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence to this alignment"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence(s) to this alignment"); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -2626,15 +2609,15 @@ GUI_TEST_CLASS_DEFINITION(test_4323_4) { GTUtilsMSAEditorSequenceArea::renameSequence(os, "Phaneroptera_falcata", "1"); GTUtilsMSAEditorSequenceArea::renameSequence(os, "Isophya_altaica_EF540820", "1"); -// 3. Click "Align sequence to this alignment" button on the toolbar, select "samples/FASTQ/eas.fastq". +// 3. Click "Align sequence(s) to this alignment" button on the toolbar, select "samples/FASTQ/eas.fastq". GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, dataDir + "samples/FASTQ/eas.fastq")); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence to this alignment"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence(s) to this alignment"); GTUtilsTaskTreeView::waitTaskFinished(os); // 4. Do it again. GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, dataDir + "samples/FASTQ/eas.fastq")); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence to this alignment"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence(s) to this alignment"); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -2694,8 +2677,8 @@ GUI_TEST_CLASS_DEFINITION(test_4334) { // 2. Add human_t1.fa sequence throu context menu {Add->Sequence from file} GTFileDialogUtils *ob = new GTFileDialogUtils(os, dataDir + "samples/FASTA", "human_T1.fa"); GTUtilsDialog::waitForDialog(os, ob); - QAbstractButton *align = GTAction::button(os, "Align sequence to this alignment"); - CHECK_SET_ERR(align != NULL, "MSA \"Align sequence to this alignment\" action not found"); + QAbstractButton *align = GTAction::button(os, "Align sequence(s) to this alignment"); + CHECK_SET_ERR(align != NULL, "MSA \"Align sequence(s) to this alignment\" action not found"); GTWidget::click(os, align); GTUtilsTaskTreeView::waitTaskFinished(os); CHECK_SET_ERR(!lt.hasError(), "log should not contain errors"); @@ -2737,7 +2720,7 @@ GUI_TEST_CLASS_DEFINITION(test_4352) { //5. Remove a part of the sequence that contains the selected site. GTUtilsDialog::waitForDialog(os, new PopupChooserByText(os, QStringList() << "Edit" << "Remove subsequence...")); GTUtilsDialog::waitForDialog(os, new RemovePartFromSequenceDialogFiller(os, "89300..89400")); - GTMenu::showContextMenu(os, GTUtilsSequenceView::getSeqWidgetByNumber(os)); + GTMenu::showContextMenu(os, GTUtilsSequenceView::getDetViewByNumber(os)); //6. Wait while restriction sites recalculates. GTUtilsTaskTreeView::waitTaskFinished(os); @@ -2961,12 +2944,12 @@ GUI_TEST_CLASS_DEFINITION(test_4386_1) { GTUtilsTaskTreeView::waitTaskFinished(os); - // 4. Select some sequences in project view and click "Align sequence to this alignment". + // 4. Select some sequences in project view and click "Align sequence(s) to this alignment". GTUtilsProject::openMultiSequenceFileAsSequences(os, dataDir + "samples/FASTQ/eas.fastq"); GTUtilsMdi::activateWindow(os, "COI [m] COI"); GTUtilsProjectTreeView::click(os, "EAS54_6_R1_2_1_413_324"); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence to this alignment"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence(s) to this alignment"); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -2983,9 +2966,9 @@ GUI_TEST_CLASS_DEFINITION(test_4386_2) { // 2. Rename the alignment, a new name should contain spaces. GTUtilsProjectTreeView::rename(os, "COI", "C O I"); -// 3. Click "Align sequence to this alignment" and select any file with sequence. +// 3. Click "Align sequence(s) to this alignment" and select any file with sequence. GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, dataDir + "samples/FASTQ/eas.fastq")); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence to this alignment"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence(s) to this alignment"); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -3129,7 +3112,7 @@ GUI_TEST_CLASS_DEFINITION(test_4463) { // 4. Press "Yes" // Expected state: UGENE does not crash // 5. Load the document again -// Expected state: the document is succesfully loaded +// Expected state: the document is successfully loaded GTFile::copy(os, testDir + "_common_data/genbank/gbbct131.gb.gz", sandBoxDir + "/test_4463.gb.gz"); @@ -3150,6 +3133,29 @@ GUI_TEST_CLASS_DEFINITION(test_4463) { CHECK_SET_ERR(NULL != GTUtilsSequenceView::getSeqWidgetByNumber(os), "Can't find sequence view widget"); } +GUI_TEST_CLASS_DEFINITION(test_4483) { + + // Open "samples/CLUSTALW/ty3.aln.gz". + // Click "Export as image". + // Choose SVG. + // Export. + + GTFileDialog::openFile(os, dataDir + "samples/CLUSTALW/ty3.aln.gz"); + GTUtilsTaskTreeView::waitTaskFinished(os); + + for (int i=0; i<8; i++) { + GTWidget::click(os, GTToolbar::getWidgetForActionName(os, GTToolbar::getToolbar(os, "mwtoolbar_activemdi"), "Zoom Out")); + } + GTUtilsDialog::waitForDialog(os,new ExportMsaImage(os, testDir + "_common_data/scenarios/sandbox/test.svg", QString("SVG"))); + GTUtilsDialog::waitForDialog( os, new PopupChooser(os, QStringList() << MSAE_MENU_EXPORT << "Export as image")); + GTMenu::showContextMenu(os, GTUtilsMdi::activeWindow(os)); + + qint64 fileSize = GTFile::getSize(os,testDir + "_common_data/scenarios/sandbox/test.svg"); + CHECK_SET_ERR(fileSize > 7000000 && fileSize < 80000000, "Current size: " + QString().setNum(fileSize)); + + +} + GUI_TEST_CLASS_DEFINITION(test_4486) { // 1. Open "data/samples/Assembly/chrM.sorted.bam". // 2. Import with default settings. @@ -3300,6 +3306,8 @@ GUI_TEST_CLASS_DEFINITION(test_4508) { GTUtilsMsaEditor::removeColumn(os, 1); GTThread::waitForMainThread(); + GTWidget::click(os, GTToolbar::getWidgetForActionName(os, GTToolbar::getToolbar(os, MWTOOLBAR_ACTIVEMDI), "Zoom Out")); + GTGlobals::sleep(500); class Scenario2 : public CustomScenario { void run(HI::GUITestOpStatus &os) { @@ -3537,6 +3545,9 @@ GUI_TEST_CLASS_DEFINITION(test_4563) { GTUtilsWorkflowDesigner::openWorkflowDesigner(os); // 3. Open the "Align sequences with MUSCLE" sample scheme. GTUtilsWorkflowDesigner::addSample(os, "Align sequences with MUSCLE"); + GTGlobals::sleep(); + GTUtilsWizard::clickButton(os, GTUtilsWizard::Cancel); + GTGlobals::sleep(); // 4. Set "_common_data/scenarios/_regression/4563/test_ma.fa" as the input file. GTMouseDriver::moveTo(GTUtilsWorkflowDesigner::getItemCenter(os, "Read alignment")); @@ -3801,6 +3812,8 @@ GUI_TEST_CLASS_DEFINITION(test_4606) { //Expected state: no safepoint triggered GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + GTUtilsWorkflowDesigner::removeCmdlineWorkerFromPalette(os, "Element_4606"); + CreateElementWithCommandLineToolFiller::ElementWithCommandLineSettings settings; settings.elementName = "Element_4606"; @@ -3811,9 +3824,7 @@ GUI_TEST_CLASS_DEFINITION(test_4606) { input << CreateElementWithCommandLineToolFiller::InOutData("in1", inOutDataType); settings.input = input; - settings.executionString = "echo"; - - GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, "Continue")); + settings.command = "echo"; GTUtilsDialog::waitForDialog(os, new CreateElementWithCommandLineToolFiller(os, settings)); QAbstractButton *createElement = GTAction::button(os, "createElementWithCommandLineTool"); @@ -3999,8 +4010,8 @@ GUI_TEST_CLASS_DEFINITION(test_4674_1) { GTFileDialogUtils *ob = new GTFileDialogUtils(os, dataDir + "samples/Genbank/", "murine.gb"); GTUtilsDialog::waitForDialog(os, ob); - QAbstractButton *align = GTAction::button( os, "Align sequence to this alignment" ); - CHECK_SET_ERR(align != NULL, "MSA \"Align sequence to this alignment\" action not found"); + QAbstractButton *align = GTAction::button( os, "Align sequence(s) to this alignment" ); + CHECK_SET_ERR(align != NULL, "MSA \"Align sequence(s) to this alignment\" action not found"); GTWidget::click( os, align); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -4169,12 +4180,12 @@ GUI_TEST_CLASS_DEFINITION(test_4687) { GTGlobals::sleep(500); GTUtilsOptionPanelMsa::addSecondSeqToPA(os, "Isophya_altaica_EF540820"); - //3. Press "Align sequence to this alignment" and add next sequence _common_data/fasta/amino_ext.fa + //3. Press "Align sequence(s) to this alignment" and add next sequence _common_data/fasta/amino_ext.fa GTFileDialogUtils *ob = new GTFileDialogUtils(os, testDir + "_common_data/fasta/", "amino_ext.fa"); GTUtilsDialog::waitForDialog(os, ob); - QAbstractButton *align = GTAction::button(os, "Align sequence to this alignment"); - CHECK_SET_ERR(align != NULL, "MSA \"Align sequence to this alignment\" action not found"); + QAbstractButton *align = GTAction::button(os, "Align sequence(s) to this alignment"); + CHECK_SET_ERR(align != NULL, "MSA \"Align sequence(s) to this alignment\" action not found"); GTWidget::click(os, align); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -4654,9 +4665,9 @@ GUI_TEST_CLASS_DEFINITION(test_4719_1) { // 2. Open highlighting option panel tab GTUtilsOptionPanelMsa::openTab(os, GTUtilsOptionPanelMsa::Highlighting); - // 3. Click "Align sequence to this alignment" and select "_common_data/fasta/amino_ext.fa". + // 3. Click "Align sequence(s) to this alignment" and select "_common_data/fasta/amino_ext.fa". GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, testDir + "_common_data/fasta/amino_ext.fa")); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence to this alignment"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence(s) to this alignment"); GTUtilsTaskTreeView::waitTaskFinished(os); // Expected state: "UGENE" color scheme is selected, "No highlighting" highlight scheme is selected @@ -4686,9 +4697,9 @@ GUI_TEST_CLASS_DEFINITION(test_4719_2) { // 2. Open highlighting option panel tab GTUtilsOptionPanelMsa::openTab(os, GTUtilsOptionPanelMsa::Highlighting); - // 3. Click "Align sequence to this alignment" and select "_common_data/fasta/amino_ext.fa". + // 3. Click "Align sequence(s) to this alignment" and select "_common_data/fasta/amino_ext.fa". GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, testDir + "_common_data/fasta/fa1.fa")); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence to this alignment"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence(s) to this alignment"); GTUtilsTaskTreeView::waitTaskFinished(os); // Expected state: "UGENE" color scheme is selected, "UGENE" highlight scheme is selected @@ -4714,9 +4725,9 @@ GUI_TEST_CLASS_DEFINITION(test_4719_3) { GTFileDialog::openFile(os, dataDir + "samples/CLUSTALW/ty3.aln.gz"); GTUtilsTaskTreeView::waitTaskFinished(os); - // 2. Click "Align sequence to this alignment" and select "data/samples/Genbank/PBR322.gb". + // 2. Click "Align sequence(s) to this alignment" and select "data/samples/Genbank/PBR322.gb". GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, dataDir + "samples/Genbank/PBR322.gb")); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence to this alignment"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence(s) to this alignment"); GTUtilsTaskTreeView::waitTaskFinished(os); // 3. Open/close highlighting option panel tab @@ -5054,7 +5065,8 @@ GUI_TEST_CLASS_DEFINITION(test_4784_1) { settings.dbPath = testDir + "_common_data/cmdline/external-tool-support/blastplus/human_T1/human_T1.nhr"; GTUtilsDialog::waitForDialog(os, new BlastAllSupportDialogFiller(settings, os)); GTMenu::clickMainMenuItem(os, QStringList() << "Tools" << "BLAST" << "BLAST search..."); - GTGlobals::sleep(3000); + GTGlobals::sleep(1000); + //5. Delete "chr6.fa" in file browser. //7. Click "No" in the appeared message box. //Expected result: An error notification appears - "A problem occurred during doing BLAST. The sequence is no more available". @@ -5081,6 +5093,7 @@ GUI_TEST_CLASS_DEFINITION(test_4784_2) { settings.dbPath = testDir + "_common_data/cmdline/external-tool-support/blastplus/human_T1/human_T1.nhr"; GTUtilsDialog::waitForDialog(os, new BlastAllSupportDialogFiller(settings, os)); GTMenu::clickMainMenuItem(os, QStringList() << "Actions" << "Analyze" << "Query with local BLAST+...", GTGlobals::UseMouse); + GTGlobals::sleep(100); //5. Delete "chr6.fa" in file browser. //7. Click "No" in the appeared message box. @@ -5117,7 +5130,7 @@ GUI_TEST_CLASS_DEFINITION(test_4784_3) { GUI_TEST_CLASS_DEFINITION(test_4784_4) { QFile::copy(testDir + "_common_data/fasta/chr6.fa", sandBoxDir + "regression_test_4784_4.fa"); - + GTGlobals::sleep(); //1. Click the menu Tools -> BLAST-> BLAST+ Search... //2. Select "_common_data/fasta/chr6" as input file. //3. Press "Select a database file". @@ -5126,17 +5139,18 @@ GUI_TEST_CLASS_DEFINITION(test_4784_4) { BlastAllSupportDialogFiller::Parameters settings; settings.runBlast = true; settings.withInputFile = true; - settings.inputPath = sandBoxDir + "regression_test_4784_4.fa"; settings.dbPath = testDir + "_common_data/cmdline/external-tool-support/blastplus/human_T1/human_T1.nhr"; + settings.inputPath = sandBoxDir + "regression_test_4784_4.fa"; GTUtilsDialog::waitForDialog(os, new BlastAllSupportDialogFiller(settings, os)); GTMenu::clickMainMenuItem(os, QStringList() << "Tools" << "BLAST" << "BLAST+ search..."); + GTGlobals::sleep(5000); //6. Remove "chr6.fa" from project. //Expected result: An error notification appears - "A problem occurred during doing BLAST. The sequence is no more available". GTUtilsNotifications::waitForNotification(os, true, "The sequence is no more available"); GTUtilsDocument::removeDocument(os, "regression_test_4784_4.fa"); GTUtilsTaskTreeView::waitTaskFinished(os); - GTGlobals::sleep(); + GTGlobals::sleep(5000); } GUI_TEST_CLASS_DEFINITION(test_4785_1) { @@ -5365,15 +5379,15 @@ GUI_TEST_CLASS_DEFINITION(test_4804_4) { GTFileDialog::openFile(os, testDir + "_common_data/scenarios/_regression/4804", "standard_dna.aln"); GTUtilsTaskTreeView::waitTaskFinished(os); // 2. Check what MAFFT tool is set up - // 3. Use 'Align sequence to this alignment' toolbar button to align Extended rna sequence to alignment + // 3. Use 'Align sequence(s) to this alignment' toolbar button to align Extended rna sequence to alignment //Expected state: corresponding notification message has appeared GTFileDialogUtils *ob = new GTFileDialogUtils(os, testDir + "_common_data/scenarios/_regression/4804", "ext_rna.fa"); GTUtilsDialog::waitForDialog(os, ob); GTUtilsNotifications::waitForNotification(os, true, "from \"Standard DNA\" to \"Raw\""); - QAbstractButton *align = GTAction::button(os, "Align sequence to this alignment"); - CHECK_SET_ERR(align != NULL, "MSA \"Align sequence to this alignment\" action not found"); + QAbstractButton *align = GTAction::button(os, "Align sequence(s) to this alignment"); + CHECK_SET_ERR(align != NULL, "MSA \"Align sequence(s) to this alignment\" action not found"); GTWidget::click(os, align); GTUtilsTaskTreeView::waitTaskFinished(os); } @@ -5383,7 +5397,7 @@ GUI_TEST_CLASS_DEFINITION(test_4804_5) { // 2. Open _common_data/scenarios/_regression/4804/standard_rna.aln GTFileDialog::openFile(os, testDir + "_common_data/scenarios/_regression/4804", "standard_rna.aln"); GTUtilsTaskTreeView::waitTaskFinished(os); - // 3. Use 'Align sequence to this alignment' toolbar button to align Extended rna sequence to alignment + // 3. Use 'Align sequence(s) to this alignment' toolbar button to align Extended rna sequence to alignment //Expected state: corresponding notification message has appeared GTUtilsExternalTools::removeTool(os, "MAFFT"); GTFileDialogUtils *ob = new GTFileDialogUtils(os, testDir + "_common_data/scenarios/_regression/4804", "ext_dna.fa"); @@ -5391,8 +5405,8 @@ GUI_TEST_CLASS_DEFINITION(test_4804_5) { GTUtilsNotifications::waitForNotification(os, true, "from \"Standard RNA\" to \"Raw\". Use \"Undo\", if you'd like to restore the original alignment."); - QAbstractButton *align = GTAction::button(os, "Align sequence to this alignment"); - CHECK_SET_ERR(align != NULL, "MSA \"Align sequence to this alignment\" action not found"); + QAbstractButton *align = GTAction::button(os, "Align sequence(s) to this alignment"); + CHECK_SET_ERR(align != NULL, "MSA \"Align sequence(s) to this alignment\" action not found"); GTWidget::click(os, align); GTUtilsTaskTreeView::waitTaskFinished(os); } @@ -5728,8 +5742,8 @@ GUI_TEST_CLASS_DEFINITION(test_4886) { ExportChromatogramFiller::SCF, false, false, true)); GTMouseDriver::click(Qt::RightButton); GTGlobals::sleep(5000); - - GTWidget::findWidget(os, "ADV_single_sequence_widget_0"); + QWidget *parent = GTWidget::findWidget(os, "90-JRI-07 [s] 90-JRI-07 sequence 2"); + GTWidget::findWidget(os, "ADV_single_sequence_widget_0", parent); CHECK_OP(os, ); CHECK_SET_ERR(!lt.hasError(), "errors in log"); } @@ -5851,18 +5865,19 @@ GUI_TEST_CLASS_DEFINITION(test_4918_1) { GUI_TEST_CLASS_DEFINITION(test_4934) { //1. Open samples/CLUSTALW/ty3.aln.gz GTLogTracer l; - GTFileDialog::openFile(os, dataDir + "samples/CLUSTALW", "ty3.aln.gz"); + //GTFileDialog::openFile(os, dataDir + "samples/CLUSTALW", "ty3.aln.gz"); + GTFileDialog::openFile(os, testDir + "_common_data/scenarios/_regression/1798", "1.4k.aln"); GTUtilsTaskTreeView::waitTaskFinished(os); //2. Align with Kalign GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << MSAE_MENU_ALIGN << "align_with_kalign", GTGlobals::UseMouse)); GTUtilsDialog::waitForDialog(os, new KalignDialogFiller(os)); GTUtilsMSAEditorSequenceArea::callContextMenu(os); //3. while aligning lock document for editing - GTUtilsDocument::lockDocument(os, "ty3.aln.gz"); + GTUtilsDocument::lockDocument(os, "1.4k.aln"); GTUtilsTaskTreeView::waitTaskFinished(os); //4. Unlock document after alignment finished - GTUtilsDocument::unlockDocument(os, "ty3.aln.gz"); + GTUtilsDocument::unlockDocument(os, "1.4k.aln"); //5. Align with Kalign again GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << MSAE_MENU_ALIGN << "align_with_kalign", GTGlobals::UseMouse)); @@ -5870,7 +5885,7 @@ GUI_TEST_CLASS_DEFINITION(test_4934) { GTUtilsMSAEditorSequenceArea::callContextMenu(os); GTUtilsTaskTreeView::waitTaskFinished(os); - GTUtilsLog::checkContainsError(os, l, "Object 'ty3.aln.gz' removed"); + GTUtilsLog::checkContainsError(os, l, "Object '1.4k.aln' removed"); int errorNum = GTUtilsLog::getErrors(os, l).size(); CHECK_SET_ERR(errorNum==1, QString("Too many errors in log: %1").arg(errorNum)); } diff --git a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_4001_5000.h b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_4001_5000.h index 8f17931cff9dc88f9ce00baa779747d5e9f740a2..eb2ecf0b84807e197870d277c9938635b297582a 100644 --- a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_4001_5000.h +++ b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_4001_5000.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -135,6 +135,7 @@ GUI_TEST_CLASS_DECLARATION(test_4434) GUI_TEST_CLASS_DECLARATION(test_4439) GUI_TEST_CLASS_DECLARATION(test_4440) GUI_TEST_CLASS_DECLARATION(test_4463) +GUI_TEST_CLASS_DECLARATION(test_4483) GUI_TEST_CLASS_DECLARATION(test_4486) GUI_TEST_CLASS_DECLARATION(test_4488) GUI_TEST_CLASS_DECLARATION(test_4489) diff --git a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_5001_6000.cpp b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_5001_6000.cpp index 44205b0ee5e6652fa085e3a43c3f9753e8d9d5e3..ce9d6baea6a165362be86651ce46935fc7b843ba 100644 --- a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_5001_6000.cpp +++ b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_5001_6000.cpp @@ -1,10 +1,10 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License + * modify it under the terms of the GNU General Public License57 * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * @@ -104,6 +104,7 @@ #include "GTUtilsWorkflowDesigner.h" #include <primitives/GTRadioButton.h> +#include "runnables/ugene/corelibs/U2Gui/AlignShortReadsDialogFiller.h" #include "runnables/ugene/corelibs/U2Gui/CreateAnnotationWidgetFiller.h" #include "runnables/ugene/corelibs/U2Gui/CreateObjectRelationDialogFiller.h" #include "runnables/ugene/corelibs/U2Gui/DownloadRemoteFileDialogFiller.h" @@ -405,7 +406,7 @@ GUI_TEST_CLASS_DEFINITION(test_5039) { //3. Add an additional sequence from file : "test/_common_data/fasta/amino_ext.fa". GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, testDir + "_common_data/fasta/amino_ext.fa")); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence to this alignment"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence(s) to this alignment"); GTUtilsTaskTreeView::waitTaskFinished(os); //4. Open the "Export consensus" OP tab. @@ -550,8 +551,8 @@ GUI_TEST_CLASS_DEFINITION(test_5137) { GTFileDialogUtils *ob = new GTFileDialogUtils(os, testDir + "_common_data/fasta/", "PF07724_full_family.fa"); GTUtilsDialog::waitForDialog(os, ob); - QAbstractButton *align = GTAction::button(os, "Align sequence to this alignment"); - CHECK_SET_ERR(align != NULL, "MSA \"Align sequence to this alignment\" action not found"); + QAbstractButton *align = GTAction::button(os, "Align sequence(s) to this alignment"); + CHECK_SET_ERR(align != NULL, "MSA \"Align sequence(s) to this alignment\" action not found"); GTWidget::click(os, align); GTUtilsNotifications::waitForNotification(os, true, "A problem occurred during adding sequences. The multiple alignment is no more available."); GTGlobals::sleep(); @@ -1001,7 +1002,7 @@ GUI_TEST_CLASS_DEFINITION(test_5314) { const QStringList defaultEnzymes = QStringList() << "ClaI"; GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "ADV_MENU_ANALYSE" << "Find restriction sites")); GTUtilsDialog::waitForDialog(os, new FindEnzymesDialogFiller(os, defaultEnzymes)); - GTMenu::showContextMenu(os, GTUtilsSequenceView::getSeqWidgetByNumber(os)); + GTMenu::showContextMenu(os, GTWidget::findWidget(os, "det_view_CVU55762")); GTUtilsTaskTreeView::waitTaskFinished(os); GTLogTracer lt; GTFileDialog::openFile(os, testDir + "_common_data/abif/A01.abi"); @@ -1131,7 +1132,6 @@ GUI_TEST_CLASS_DEFINITION(test_5356) { // Expected state: no errors in the log (empty sequences were skipped by CutAdapter) GTLogTracer l; - GTUtilsWorkflowDesigner::openWorkflowDesigner(os); GTUtilsWorkflowDesigner::loadWorkflow(os, testDir + "_common_data/regression/5356/cutadapt_and_trim.uwl"); GTUtilsTaskTreeView::waitTaskFinished(os); @@ -1139,13 +1139,14 @@ GUI_TEST_CLASS_DEFINITION(test_5356) { GTUtilsWorkflowDesigner::addInputFile(os, "Read FASTQ Files with Reads 1", testDir + "_common_data/regression/5356/reads.fastq"); GTUtilsWorkflowDesigner::click(os, "Cut Adapter"); + GTGlobals::sleep(200); GTUtilsWorkflowDesigner::setParameter(os, "FASTA file with 3' adapters", QDir(testDir + "_common_data/regression/5356/adapter.fa").absolutePath(), GTUtilsWorkflowDesigner::textValue); GTUtilsWorkflowDesigner::setParameter(os, "Output folder", "Custom", GTUtilsWorkflowDesigner::comboValue); GTUtilsWorkflowDesigner::setParameter(os, "Custom folder", QDir(sandBoxDir).absolutePath(), GTUtilsWorkflowDesigner::textValue); GTUtilsWorkflowDesigner::runWorkflow(os); GTUtilsTaskTreeView::waitTaskFinished(os); - + GTGlobals::sleep(200); CHECK_SET_ERR(!l.hasError(), "There is an error in the log"); } @@ -2634,7 +2635,7 @@ GUI_TEST_CLASS_DEFINITION(test_5696) { GTKeyboardDriver::keyClick('v', Qt::ControlModifier); // Qt::ControlModifier is for Cmd on Mac and for Ctrl on other systems GTUtilsNotifications::waitForNotification(os, true, "No new rows were inserted: selection contains no valid sequences."); - + //GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new MessageBoxDialogFiller(os, QMessageBox::Ok)); GTUtilsTaskTreeView::waitTaskFinished(os); QString sequence = "фыва..."; @@ -2642,7 +2643,9 @@ GUI_TEST_CLASS_DEFINITION(test_5696) { clipboard->setText(sequence); GTKeyboardDriver::keyClick('v', Qt::ControlModifier); // Qt::ControlModifier is for Cmd on Mac and for Ctrl on other systems + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new MessageBoxDialogFiller(os, QMessageBox::Ok)); GTUtilsNotifications::waitForNotification(os, true, "No new rows were inserted: selection contains no valid sequences."); + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new MessageBoxDialogFiller(os, QMessageBox::Ok)); GTUtilsTaskTreeView::waitTaskFinished(os); } @@ -3194,6 +3197,7 @@ GUI_TEST_CLASS_DEFINITION(test_5751) { GTUtilsDialog::waitForDialog(os, new AlignToReferenceBlastDialogFiller(os, new Scenario)); GTMenu::clickMainMenuItem(os, QStringList() << "Tools" << "Sanger data analysis" << "Map reads to reference..."); GTUtilsTaskTreeView::waitTaskFinished(os); + GTUtilsTaskTreeView::waitTaskFinished(os); //5. Call a context menu in the Project view on the opened MCA document. //6. Select "Lock document for editing" menu item. @@ -3207,6 +3211,7 @@ GUI_TEST_CLASS_DEFINITION(test_5751) { GTUtilsMcaEditorSequenceArea::callContextMenu(os); GTUtilsTaskTreeView::waitTaskFinished(os); GTKeyboardDriver::keyPress(Qt::Key_Escape); + GTGlobals::sleep(100); } GUI_TEST_CLASS_DEFINITION(test_5752) { @@ -3571,7 +3576,7 @@ GUI_TEST_CLASS_DEFINITION(test_5761) { QPoint perturbation(moveMouseTo.x(), moveMouseTo.y() + moving); GTMouseDriver::moveTo(perturbation); i--; - GTGlobals::sleep(20); + GTGlobals::sleep(300); } GTMouseDriver::release(); QStringList errors = GTUtilsLog::getErrors(os, trace); @@ -3848,6 +3853,53 @@ GUI_TEST_CLASS_DEFINITION(test_5775) { } +GUI_TEST_CLASS_DEFINITION(test_5781) { + GTUtilsDialog::waitForDialog(os, new SequenceReadingModeSelectorDialogFiller(os, SequenceReadingModeSelectorDialogFiller::Align)); + AlignShortReadsFiller::UgeneGenomeAlignerParams parameters(testDir + "_common_data/fasta/ref2.fa", QStringList()); + parameters.samOutput = false; + GTUtilsDialog::waitForDialog(os, new AlignShortReadsFiller(os, ¶meters)); + //GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, QMessageBox::Ok, "can't be mapped")); + GTFileDialog::openFile(os, testDir + "_common_data/fasta/COI2.fa"); + GTUtilsTaskTreeView::waitTaskFinished(os); + GTGlobals::sleep(); + + GTUtilsDialog::waitForDialog(os, new PopupChecker(os, QStringList() << "unassociateReferenceAction", PopupChecker::IsEnabled)); + GTWidget::click(os, GTWidget::findWidget(os, "Assembly reference sequence area"), Qt::RightButton); + GTKeyboardDriver::keyClick(Qt::Key_Escape); + GTGlobals::sleep(); +} + +GUI_TEST_CLASS_DEFINITION(test_5783) { + // Open "samples/FASTA/human_T1.fa" + // Create an annotation, set e.g. "ann" annotation name and "200..300" region. + // Add "gene_id" and "transcript_id" qualifiers. + // Export the annotation to the GTF format. Make sure the "Add to project" option is checked in the export dialog. + // Expected state: The export has finished without errors. The document has been added to the project. + + GTLogTracer l; + + GTFileDialog::openFile(os, dataDir + "samples/FASTA/", "human_T1.fa"); + GTUtilsTaskTreeView::waitTaskFinished(os); + + GTUtilsDialog::waitForDialog(os, new CreateAnnotationWidgetFiller(os, true, "<auto>", "ann", "200..300", + sandBoxDir + "ann_test_0011_1.gb")); + GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << "ADV_MENU_ADD" << "create_annotation_action")); + GTWidget::click(os, GTWidget::findWidget(os, "ADV_single_sequence_widget_0"), Qt::RightButton); + GTWidget::click(os, GTUtilsAnnotationsTreeView::getTreeWidget(os)); + GTUtilsAnnotationsTreeView::createQualifier(os, "gene_id", "XCV", "ann"); + GTUtilsAnnotationsTreeView::createQualifier(os, "transcript_id", "TR321", "ann"); + + GTUtilsAnnotationsTreeView::selectItems(os, QStringList() << "ann"); + + GTUtilsDialog::waitForDialog(os, new ExportAnnotationsFiller(os, sandBoxDir + "ann_export_test_0011_1.gtf", + ExportAnnotationsFiller::gtf, false, false, false)); + GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList() << ADV_MENU_EXPORT << "action_export_annotations")); + GTMouseDriver::click(Qt::RightButton); + GTGlobals::sleep(); + GTUtilsLog::check(os, l); +} + + GUI_TEST_CLASS_DEFINITION(test_5786_1) { // 1. Open "data/samples/CLUSTALW/COI.aln". GTFileDialog::openFile(os, dataDir + "samples/CLUSTALW/COI.aln"); @@ -4066,6 +4118,7 @@ GUI_TEST_CLASS_DEFINITION(test_5790) { //1. Copy to 'sandbox' and open alignment_short.ugenedb GTFile::copy(os, filePath, sandBoxDir + "/" + fileName); GTFileDialog::openFile(os, sandBoxDir, fileName); + GTUtilsTaskTreeView::waitTaskFinished(os); //GTUtilsMcaEditor::clickReadName(os, "SZYD_Cas9_5B71"); //2. Click to position on read @@ -4074,18 +4127,18 @@ GUI_TEST_CLASS_DEFINITION(test_5790) { //3. Enter edit mode GTKeyboardDriver::keyClick('i', Qt::ShiftModifier); - GTGlobals::sleep(1000); + GTGlobals::sleep(); //4. Click escape //Expected state: selection still present GTKeyboardDriver::keyClick(Qt::Key_Escape); - GTGlobals::sleep(1000); + GTGlobals::sleep(); CHECK_SET_ERR(GTUtilsMcaEditorSequenceArea::getCharacterModificationMode(os) == 0, "MCA is not in view mode"); //5. Click escape //Expected state: selection disappeared QRect emptyselection = QRect(); GTKeyboardDriver::keyClick(Qt::Key_Escape); - GTGlobals::sleep(1000); + GTGlobals::sleep(); CHECK_SET_ERR(GTUtilsMcaEditorSequenceArea::getSelectedRect(os) == emptyselection, "Selection isn't empty but should be"); } @@ -4364,12 +4417,12 @@ GUI_TEST_CLASS_DEFINITION(test_5849) { GTFileDialog::openFile(os, testDir + "_common_data/fasta", "empty.fa"); GTUtilsTaskTreeView::waitTaskFinished(os); - // 2. Click the "Align sequence to this alignment" button on the toolbar. + // 2. Click the "Align sequence(s) to this alignment" button on the toolbar. // Expected state: the file selection dialog is opened. // Select "..\samples\CLUSTALW\COI.aln" in the dialog. GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, dataDir + "samples/CLUSTALW/COI.aln")); - GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence to this alignment"); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Align sequence(s) to this alignment"); // 3. Select a sequence. GTUtilsMSAEditorSequenceArea::click(os, QPoint(2, 2)); @@ -4549,7 +4602,7 @@ GUI_TEST_CLASS_DEFINITION(test_5872) { // 4. Click to the position (3, 3). GTUtilsMSAEditorSequenceArea::clickToPosition(os, QPoint(2, 2)); -// Expected state: there is no message in the log starting with 'ASSERT: "!isInRange'. +// Expected state: there is no message in the log starting with 'ASSERT: "!isInRange'. GTUtilsLog::checkContainsMessage(os, logTracer, false); } diff --git a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_5001_6000.h b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_5001_6000.h index 3e937db5c7df6ea645574218d8d324bf5730598b..898929ce5120b67ac4ea1aefa1395473b985e584 100644 --- a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_5001_6000.h +++ b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_5001_6000.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -132,6 +132,8 @@ GUI_TEST_CLASS_DECLARATION(test_5769_2) GUI_TEST_CLASS_DECLARATION(test_5770) GUI_TEST_CLASS_DECLARATION(test_5773) GUI_TEST_CLASS_DECLARATION(test_5775) +GUI_TEST_CLASS_DECLARATION(test_5781) +GUI_TEST_CLASS_DECLARATION(test_5783) GUI_TEST_CLASS_DECLARATION(test_5786_1) GUI_TEST_CLASS_DECLARATION(test_5786_2) GUI_TEST_CLASS_DECLARATION(test_5786_3) diff --git a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_6001_7000.cpp b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_6001_7000.cpp index 273285b1c4591e2f11afdfd8a3b172e3a0a68f75..a94c1ce02526548dbf4233dc60ca556f0accfe80 100644 --- a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_6001_7000.cpp +++ b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_6001_7000.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -20,23 +20,39 @@ */ #include <QApplication> +#include <QDir> +#include <QGroupBox> +#include <QPushButton> #include <QRadioButton> #include <QSpinBox> #include <QTableWidget> +#include <QWizard> -#include <base_dialogs/MessageBoxFiller.h> #include <base_dialogs/DefaultDialogFiller.h> +#include <base_dialogs/MessageBoxFiller.h> #include <drivers/GTKeyboardDriver.h> #include <drivers/GTMouseDriver.h> +#include <primitives/GTCheckBox.h> #include <primitives/GTComboBox.h> +#include <primitives/GTGroupBox.h> +#include <primitives/GTLineEdit.h> +#include "primitives/GTMainWindow.h" #include <primitives/GTMenu.h> +#include <primitives/GTRadioButton.h> +#include <primitives/GTSlider.h> +#include <primitives/GTSpinBox.h> #include <primitives/GTTableView.h> -#include <primitives/GTTextEdit.h> #include <primitives/GTTabWidget.h> -#include <primitives/GTRadioButton.h> +#include <primitives/GTTextEdit.h> +#include <primitives/GTToolbar.h> +#include <primitives/GTTreeWidget.h> #include <primitives/PopupChooser.h> +#include <system/GTClipboard.h> #include <system/GTFile.h> #include <utils/GTKeyboardUtils.h> +#include <utils/GTThread.h> + +#include <U2Core/HttpFileAdapter.h> #include <U2View/DetView.h> @@ -56,8 +72,8 @@ #include "GTUtilsMsaEditor.h" #include "GTUtilsMsaEditorSequenceArea.h" #include "GTUtilsNotifications.h" -#include "GTUtilsOptionPanelMSA.h" #include "GTUtilsOptionPanelMca.h" +#include "GTUtilsOptionPanelMSA.h" #include "GTUtilsOptionPanelSequenceView.h" #include "GTUtilsOptionsPanel.h" #include "GTUtilsPcr.h" @@ -73,12 +89,30 @@ #include "GTUtilsWizard.h" #include "GTUtilsWorkflowDesigner.h" +#include "../../workflow_designer/src/WorkflowViewItems.h" + +#include "runnables/ugene/corelibs/U2Gui/AlignShortReadsDialogFiller.h" +#include "runnables/ugene/corelibs/U2Gui/AppSettingsDialogFiller.h" +#include "runnables/ugene/corelibs/U2Gui/DownloadRemoteFileDialogFiller.h" +#include "runnables/ugene/corelibs/U2Gui/EditAnnotationDialogFiller.h" #include "runnables/ugene/corelibs/U2Gui/EditSettingsDialogFiller.h" +#include "runnables/ugene/corelibs/U2Gui/FindRepeatsDialogFiller.h" #include "runnables/ugene/corelibs/U2Gui/ImportAPRFileDialogFiller.h" +#include "runnables/ugene/corelibs/U2View/ov_msa/ExtractSelectedAsMSADialogFiller.h" #include "runnables/ugene/corelibs/U2View/utils_smith_waterman/SmithWatermanDialogBaseFiller.h" #include "runnables/ugene/plugins/dna_export/ExportSelectedSequenceFromAlignmentDialogFiller.h" -#include "../../workflow_designer/src/WorkflowViewItems.h" -#include "runnables/ugene/corelibs/U2Gui/DownloadRemoteFileDialogFiller.h" +#include "runnables/ugene/plugins/dna_export/ExportSequencesDialogFiller.h" +#include "runnables/ugene/plugins/enzymes/ConstructMoleculeDialogFiller.h" +#include "runnables/ugene/plugins/enzymes/DigestSequenceDialogFiller.h" +#include "runnables/ugene/plugins/enzymes/FindEnzymesDialogFiller.h" +#include "runnables/ugene/plugins/external_tools/AlignToReferenceBlastDialogFiller.h" +#include "runnables/ugene/plugins/external_tools/TrimmomaticDialogFiller.h" +#include "runnables/ugene/plugins/workflow_designer/WizardFiller.h" +#include "runnables/ugene/ugeneui/DocumentFormatSelectorDialogFiller.h" +#include "runnables/ugene/ugeneui/SaveProjectDialogFiller.h" +#include "runnables/ugene/ugeneui/SequenceReadingModeSelectorDialogFiller.h" +#include "runnables/ugene/plugins/workflow_designer/CreateElementWithCommandLineToolFiller.h" +#include "runnables/ugene/plugins/workflow_designer/StartupDialogFiller.h" namespace U2 { @@ -128,26 +162,16 @@ GUI_TEST_CLASS_DEFINITION(test_6033) { CHECK_SET_ERR(correct, "Incorrect paste operation"); } - -GUI_TEST_CLASS_DEFINITION(test_6038) { -// 1. Open WD. +GUI_TEST_CLASS_DEFINITION(test_6038_1) { + // 1. Open WD. GTUtilsWorkflowDesigner::openWorkflowDesigner(os); -// 2. Add 'Improve Reads with Trimmomatic', 'Classify Sequences with CLARK', 'Classify Sequences with Kraken' and 'Filter by Classification' elements to the scene. + // 2. Add 'Improve Reads with Trimmomatic', 'Classify Sequences with CLARK', 'Classify Sequences with Kraken' and 'Filter by Classification' elements to the scene. const QString trimmomaticName = "Improve Reads with Trimmomatic"; - const QString clarkName = "Classify Sequences with CLARK"; - const QString krakenName = "Classify Sequences with Kraken"; - const QString filterName = "Filter by Classification"; - WorkflowProcessItem *trimmomaticElement = GTUtilsWorkflowDesigner::addElement(os, trimmomaticName); - WorkflowProcessItem *clarkElement = GTUtilsWorkflowDesigner::addElement(os, clarkName); - WorkflowProcessItem *krakenElement = GTUtilsWorkflowDesigner::addElement(os, krakenName); - WorkflowProcessItem *filterElement = GTUtilsWorkflowDesigner::addElement(os, filterName); -// 3. Each element has 'Input data' parameter. Set it to 'PE reads'. -// Expected state: 'Classify Sequences with Kraken' and 'Classify Sequences with CLARK' elements have two input slots ('Input URL 1' and 'Input URL 2') and some output slots; -// 'Improve Reads with Trimmomatic' element has two input slots ('Input FASTQ URL 1' and 'Input FASTQ URL 2') and two output slots ('Output FASTQ URL 1' and 'Output FASTQ URL 2'); -// 'Filter by Classification' element has three input slots (two of them are 'Input URL 1' and 'Input URL 2'), and two output slots ('Output URL 1' and 'Output URL 2'). + // 3. Each element has 'Input data' parameter. Set it to 'PE reads'. + // Expected state: 'Improve Reads with Trimmomatic' element has two input slots ('Input FASTQ URL 1' and 'Input FASTQ URL 2') and two output slots ('Output FASTQ URL 1' and 'Output FASTQ URL 2'); { GTUtilsWorkflowDesigner::click(os, trimmomaticElement); GTUtilsWorkflowDesigner::setParameter(os, "Input data", "PE reads", GTUtilsWorkflowDesigner::comboValue); @@ -174,10 +198,13 @@ GUI_TEST_CLASS_DEFINITION(test_6038) { CHECK_SET_ERR(outputSlotsNames.contains("Output FASTQ URL 1 (by Improve Reads with Trimmomatic)"), QString("'Output FASTQ URL 1 (by Improve Reads with Trimmomatic)' slot not found in element '%1'").arg(trimmomaticName)); CHECK_SET_ERR(outputSlotsNames.contains("Output FASTQ URL 2 (by Improve Reads with Trimmomatic)"), QString("'Output FASTQ URL 2 (by Improve Reads with Trimmomatic)' slot not found in element '%1'").arg(trimmomaticName)); } - + // 4. Set 'Input data' parameter in each element to 'SE reads' in 'Improve Reads with Trimmomatic' element. + // Expected state: 'Improve Reads with Trimmomatic' element has one input slot ('Input FASTQ URL 1') and one output slot ('Output FASTQ URL 1'); + // { - GTUtilsWorkflowDesigner::click(os, clarkElement); - GTUtilsWorkflowDesigner::setParameter(os, "Input data", "PE reads", GTUtilsWorkflowDesigner::comboValue); + GTWidget::click(os, GTWidget::findWidget(os, "sceneView")); + GTUtilsWorkflowDesigner::click(os, trimmomaticElement); + GTUtilsWorkflowDesigner::setParameter(os, "Input data", "SE reads", GTUtilsWorkflowDesigner::comboValue); QTableWidget *inputPortTable = GTUtilsWorkflowDesigner::getInputPortsTable(os, 0); CHECK_SET_ERR(NULL != inputPortTable, "inputPortTable is NULL"); @@ -187,12 +214,50 @@ GUI_TEST_CLASS_DEFINITION(test_6038) { inputSlotsNames << GTTableView::data(os, inputPortTable, i, 0); } - CHECK_SET_ERR(inputSlotsNames.contains("Input URL 1"), QString("'Input URL 1' slot not found in element '%1'").arg(clarkName)); - CHECK_SET_ERR(inputSlotsNames.contains("Input URL 2"), QString("'Input URL 2' slot not found in element '%1'").arg(clarkName)); + CHECK_SET_ERR(inputSlotsNames.contains("Input FASTQ URL 1"), QString("'Input FASTQ URL 1' slot not found in element '%1'").arg(trimmomaticName)); + CHECK_SET_ERR(!inputSlotsNames.contains("Input FASTQ URL 2"), QString("'Input FASTQ URL 2' slot unexpectedly found in element '%1'").arg(trimmomaticName)); + + QTableWidget *outputPortTable = GTUtilsWorkflowDesigner::getOutputPortsTable(os, 0); + CHECK_SET_ERR(NULL != outputPortTable, "outputPortTable is NULL"); + + QStringList outputSlotsNames; + for (int i = 0; i < GTTableView::rowCount(os, outputPortTable); i++) { + outputSlotsNames << GTTableView::data(os, outputPortTable, i, 0); + } + + CHECK_SET_ERR(outputSlotsNames.contains("Output FASTQ URL 1 (by Improve Reads with Trimmomatic)"), QString("'Output FASTQ URL 1 (by Improve Reads with Trimmomatic)' slot not found in element '%1'").arg(trimmomaticName)); + CHECK_SET_ERR(!outputSlotsNames.contains("Output FASTQ URL 2 (by Improve Reads with Trimmomatic)"), QString("'Output FASTQ URL 2 (by Improve Reads with Trimmomatic)' slot unexpectedly found in element '%1'").arg(trimmomaticName)); + } - { - GTUtilsWorkflowDesigner::click(os, krakenElement); + // 5. Click 'Validate workflow' button on the toolbar. + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new MessageBoxDialogFiller(os, QMessageBox::Ok)); + GTUtilsWorkflowDesigner::validateWorkflow(os); + + // Expected state: there could be errors, but there are neither errors not warnings about not connected slots. + QSet<QString> acceptableErrors = QSet<QString>() + << QString("%1: The mandatory \"Input FASTQ URL 1\" slot is not connected.").arg(trimmomaticName) + << QString("%1: Required parameter is not set: Trimming steps").arg(trimmomaticName); + + QSet<QString> actualErrors = GTUtilsWorkflowDesigner::getErrors(os).toSet(); + CHECK_SET_ERR(acceptableErrors.size() == actualErrors.size(), QString("Unexpected errors number, expected: %1, current: %2"). + arg(acceptableErrors.size()). + arg(actualErrors.size())); +} + +GUI_TEST_CLASS_DEFINITION(test_6038_2) { + // 1. Open WD. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + + // 2. Add 'Improve Reads with Trimmomatic', 'Classify Sequences with CLARK', 'Classify Sequences with Kraken' and 'Filter by Classification' elements to the scene. + const QString clarkName = "Classify Sequences with CLARK"; + + WorkflowProcessItem *clarkElement = GTUtilsWorkflowDesigner::addElement(os, clarkName); + + // 3. Each element has 'Input data' parameter. Set it to 'PE reads'. + // Expected state: 'Classify Sequences with CLARK' elements have two input slots ('Input URL 1' and 'Input URL 2') and some output slots; + + GTUtilsWorkflowDesigner::click(os, clarkElement); GTUtilsWorkflowDesigner::setParameter(os, "Input data", "PE reads", GTUtilsWorkflowDesigner::comboValue); QTableWidget *inputPortTable = GTUtilsWorkflowDesigner::getInputPortsTable(os, 0); @@ -203,9 +268,66 @@ GUI_TEST_CLASS_DEFINITION(test_6038) { inputSlotsNames << GTTableView::data(os, inputPortTable, i, 0); } - CHECK_SET_ERR(inputSlotsNames.contains("Input URL 1"), QString("'Input URL 1' slot not found in element '%1'").arg(krakenName)); - CHECK_SET_ERR(inputSlotsNames.contains("Input URL 2"), QString("'Input URL 2' slot not found in element '%1'").arg(krakenName)); - } + CHECK_SET_ERR(inputSlotsNames.contains("Input URL 1"), QString("'Input URL 1' slot not found in element '%1'").arg(clarkName)); + CHECK_SET_ERR(inputSlotsNames.contains("Input URL 2"), QString("'Input URL 2' slot not found in element '%1'").arg(clarkName)); + + // 4. Set 'Input data' parameter in each element to 'SE reads or contigs' ('SE reads' in 'Improve Reads with Trimmomatic' element). + // Expected state: 'Classify Sequences with Kraken' and 'Classify Sequences with CLARK' elements have one input slot ('Input URL 1') and some output slots; + // 'Improve Reads with Trimmomatic' element has one input slot ('Input FASTQ URL 1') and one output slot ('Output FASTQ URL 1'); + // 'Filter by Classification' element has two input slots (one of them is 'Input URL 1'), and one output slot ('Output URL 1'). + { + GTWidget::click(os, GTWidget::findWidget(os, "sceneView")); + GTUtilsWorkflowDesigner::click(os, clarkElement); + GTUtilsWorkflowDesigner::setParameter(os, "Input data", "SE reads or contigs", GTUtilsWorkflowDesigner::comboValue); + + QTableWidget *inputPortTable = GTUtilsWorkflowDesigner::getInputPortsTable(os, 0); + CHECK_SET_ERR(NULL != inputPortTable, "inputPortTable is NULL"); + + QStringList inputSlotsNames; + for (int i = 0; i < GTTableView::rowCount(os, inputPortTable); i++) { + inputSlotsNames << GTTableView::data(os, inputPortTable, i, 0); + } + + CHECK_SET_ERR(inputSlotsNames.contains("Input URL 1"), QString("'Input URL 1' slot not found in element '%1'").arg(clarkName)); + CHECK_SET_ERR(!inputSlotsNames.contains("Input URL 2"), QString("'Input URL 2' slot unexpectedly found in element '%1'").arg(clarkName)); + } + // 5. Click 'Validate workflow' button on the toolbar. + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new MessageBoxDialogFiller(os, QMessageBox::Ok)); + GTUtilsWorkflowDesigner::validateWorkflow(os); + + // Expected state: there could be errors, but there are neither errors not warnings about not connected slots. + QSet<QString> acceptableErrors; + +#ifdef Q_OS_WIN + acceptableErrors = QSet<QString>() + << QString("%1: The mandatory \"Input URL 1\" slot is not connected.").arg(clarkName) + << QString("%1: External tool \"CLARK\" is not set. You can set it in Settings -> Preferences -> External Tools").arg(clarkName) + << QString("%1: External tool \"CLARK-l\" is not set. You can set it in Settings -> Preferences -> External Tools").arg(clarkName) + << QString("%1: Required parameter is not set: Database").arg(clarkName); +#else + acceptableErrors = QSet<QString>() + << QString("%1: The mandatory \"Input URL 1\" slot is not connected.").arg(clarkName) + << QString("%1: Required parameter is not set: Database").arg(clarkName); +#endif + + QSet<QString> actualErrors = GTUtilsWorkflowDesigner::getErrors(os).toSet(); + CHECK_SET_ERR(acceptableErrors.size() == actualErrors.size(), QString("Unexpected errors number, expected: %1, current: %2"). + arg(acceptableErrors.size()). + arg(actualErrors.size())); +} + +GUI_TEST_CLASS_DEFINITION(test_6038_4) { + + // 1. Open WD. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + + // 2. Add 'Filter by Classification' element to the scene. + const QString filterName = "Filter by Classification"; + + WorkflowProcessItem *filterElement = GTUtilsWorkflowDesigner::addElement(os, filterName); + + // 3. Each element has 'Input data' parameter. Set it to 'PE reads'. + // Expected state: 'Filter by Classification' element has three input slots (two of them are 'Input URL 1' and 'Input URL 2'), and two output slots ('Output URL 1' and 'Output URL 2'). { GTUtilsWorkflowDesigner::click(os, filterElement); @@ -234,13 +356,13 @@ GUI_TEST_CLASS_DEFINITION(test_6038) { CHECK_SET_ERR(outputSlotsNames.contains("Output URL 2 (by Filter by Classification)"), QString("'Output URL 2 (by Filter by Classification)' slot not found in element '%1'").arg(filterName)); } -// 4. Set 'Input data' parameter in each element to 'SE reads or contigs' ('SE reads' in 'Improve Reads with Trimmomatic' element). -// Expected state: 'Classify Sequences with Kraken' and 'Classify Sequences with CLARK' elements have one input slot ('Input URL 1') and some output slots; -// 'Improve Reads with Trimmomatic' element has one input slot ('Input FASTQ URL 1') and one output slot ('Output FASTQ URL 1'); -// 'Filter by Classification' element has two input slots (one of them is 'Input URL 1'), and one output slot ('Output URL 1'). + // 4. Set 'Input data' parameter in each element to 'SE reads or contigs' ('SE reads' in 'Improve Reads with Trimmomatic' element). + // Expected state: 'Filter by Classification' element has two input slots (one of them is 'Input URL 1'), and one output slot ('Output URL 1'). + { - GTUtilsWorkflowDesigner::click(os, trimmomaticElement); - GTUtilsWorkflowDesigner::setParameter(os, "Input data", "SE reads", GTUtilsWorkflowDesigner::comboValue); + GTWidget::click(os, GTWidget::findWidget(os, "sceneView")); + GTUtilsWorkflowDesigner::click(os, filterElement); + GTUtilsWorkflowDesigner::setParameter(os, "Input data", "SE reads or contigs", GTUtilsWorkflowDesigner::comboValue); QTableWidget *inputPortTable = GTUtilsWorkflowDesigner::getInputPortsTable(os, 0); CHECK_SET_ERR(NULL != inputPortTable, "inputPortTable is NULL"); @@ -250,8 +372,8 @@ GUI_TEST_CLASS_DEFINITION(test_6038) { inputSlotsNames << GTTableView::data(os, inputPortTable, i, 0); } - CHECK_SET_ERR(inputSlotsNames.contains("Input FASTQ URL 1"), QString("'Input FASTQ URL 1' slot not found in element '%1'").arg(trimmomaticName)); - CHECK_SET_ERR(!inputSlotsNames.contains("Input FASTQ URL 2"), QString("'Input FASTQ URL 2' slot unexpectedly found in element '%1'").arg(trimmomaticName)); + CHECK_SET_ERR(inputSlotsNames.contains("Input URL 1"), QString("'Input URL 1' slot not found in element '%1'").arg(filterName)); + CHECK_SET_ERR(!inputSlotsNames.contains("Input URL 2"), QString("'Input URL 2' slot unexpectedly found in element '%1'").arg(filterName)); QTableWidget *outputPortTable = GTUtilsWorkflowDesigner::getOutputPortsTable(os, 0); CHECK_SET_ERR(NULL != outputPortTable, "outputPortTable is NULL"); @@ -261,29 +383,40 @@ GUI_TEST_CLASS_DEFINITION(test_6038) { outputSlotsNames << GTTableView::data(os, outputPortTable, i, 0); } - CHECK_SET_ERR(outputSlotsNames.contains("Output FASTQ URL 1 (by Improve Reads with Trimmomatic)"), QString("'Output FASTQ URL 1 (by Improve Reads with Trimmomatic)' slot not found in element '%1'").arg(trimmomaticName)); - CHECK_SET_ERR(!outputSlotsNames.contains("Output FASTQ URL 2 (by Improve Reads with Trimmomatic)"), QString("'Output FASTQ URL 2 (by Improve Reads with Trimmomatic)' slot unexpectedly found in element '%1'").arg(trimmomaticName)); + CHECK_SET_ERR(outputSlotsNames.contains("Output URL 1 (by Filter by Classification)"), QString("'Output URL 1 (by Filter by Classification)' slot not found in element '%1'").arg(filterName)); + CHECK_SET_ERR(!outputSlotsNames.contains("Output URL 2 (by Filter by Classification)"), QString("'Output URL 2 (by Filter by Classification)' slot unexpectedly found in element '%1'").arg(filterName)); } - { - GTUtilsWorkflowDesigner::click(os, clarkElement); - GTUtilsWorkflowDesigner::setParameter(os, "Input data", "SE reads or contigs", GTUtilsWorkflowDesigner::comboValue); + // 5. Click 'Validate workflow' button on the toolbar. + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new MessageBoxDialogFiller(os, QMessageBox::Ok)); + GTUtilsWorkflowDesigner::validateWorkflow(os); - QTableWidget *inputPortTable = GTUtilsWorkflowDesigner::getInputPortsTable(os, 0); - CHECK_SET_ERR(NULL != inputPortTable, "inputPortTable is NULL"); + // Expected state: there could be errors, but there are neither errors not warnings about not connected slots. + QSet<QString> acceptableErrors = QSet<QString>() + << QString("%1: The mandatory \"Input URL 1\" slot is not connected.").arg(filterName) + << QString("%1: Taxonomy classification data from NCBI are not available").arg(filterName); + QSet<QString> actualErrors = GTUtilsWorkflowDesigner::getErrors(os).toSet(); + CHECK_SET_ERR(acceptableErrors.size() == actualErrors.size(), QString("Unexpected errors number, expected: %1, current: %2"). + arg(acceptableErrors.size()). + arg(actualErrors.size())); +} - QStringList inputSlotsNames; - for (int i = 0; i < GTTableView::rowCount(os, inputPortTable); i++) { - inputSlotsNames << GTTableView::data(os, inputPortTable, i, 0); - } +GUI_TEST_CLASS_DEFINITION(test_6038_3) { - CHECK_SET_ERR(inputSlotsNames.contains("Input URL 1"), QString("'Input URL 1' slot not found in element '%1'").arg(clarkName)); - CHECK_SET_ERR(!inputSlotsNames.contains("Input URL 2"), QString("'Input URL 2' slot unexpectedly found in element '%1'").arg(clarkName)); - } + // 1. Open WD. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + + // 2. Add 'Classify Sequences with Kraken' element to the scene. + const QString krakenName = "Classify Sequences with Kraken"; + WorkflowProcessItem *krakenElement = GTUtilsWorkflowDesigner::addElement(os, krakenName); + + + // 3. Each element has 'Input data' parameter. Set it to 'PE reads'. + // Expected state: 'Classify Sequences with Kraken' element has two input slots ('Input URL 1' and 'Input URL 2') and some output slots; { GTUtilsWorkflowDesigner::click(os, krakenElement); - GTUtilsWorkflowDesigner::setParameter(os, "Input data", "SE reads or contigs", GTUtilsWorkflowDesigner::comboValue); + GTUtilsWorkflowDesigner::setParameter(os, "Input data", "PE reads", GTUtilsWorkflowDesigner::comboValue); QTableWidget *inputPortTable = GTUtilsWorkflowDesigner::getInputPortsTable(os, 0); CHECK_SET_ERR(NULL != inputPortTable, "inputPortTable is NULL"); @@ -294,11 +427,15 @@ GUI_TEST_CLASS_DEFINITION(test_6038) { } CHECK_SET_ERR(inputSlotsNames.contains("Input URL 1"), QString("'Input URL 1' slot not found in element '%1'").arg(krakenName)); - CHECK_SET_ERR(!inputSlotsNames.contains("Input URL 2"), QString("'Input URL 2' slot unexpectedly found in element '%1'").arg(krakenName)); + CHECK_SET_ERR(inputSlotsNames.contains("Input URL 2"), QString("'Input URL 2' slot not found in element '%1'").arg(krakenName)); } + // 4. Set 'Input data' parameter in each element to 'SE reads or contigs + // Expected state: 'Classify Sequences with Kraken' and some output slots; + { - GTUtilsWorkflowDesigner::click(os, filterElement); + GTWidget::click(os, GTWidget::findWidget(os, "sceneView")); + GTUtilsWorkflowDesigner::click(os, krakenElement); GTUtilsWorkflowDesigner::setParameter(os, "Input data", "SE reads or contigs", GTUtilsWorkflowDesigner::comboValue); QTableWidget *inputPortTable = GTUtilsWorkflowDesigner::getInputPortsTable(os, 0); @@ -309,41 +446,34 @@ GUI_TEST_CLASS_DEFINITION(test_6038) { inputSlotsNames << GTTableView::data(os, inputPortTable, i, 0); } - CHECK_SET_ERR(inputSlotsNames.contains("Input URL 1"), QString("'Input URL 1' slot not found in element '%1'").arg(filterName)); - CHECK_SET_ERR(!inputSlotsNames.contains("Input URL 2"), QString("'Input URL 2' slot unexpectedly found in element '%1'").arg(filterName)); - - QTableWidget *outputPortTable = GTUtilsWorkflowDesigner::getOutputPortsTable(os, 0); - CHECK_SET_ERR(NULL != outputPortTable, "outputPortTable is NULL"); - - QStringList outputSlotsNames; - for (int i = 0; i < GTTableView::rowCount(os, outputPortTable); i++) { - outputSlotsNames << GTTableView::data(os, outputPortTable, i, 0); - } - - CHECK_SET_ERR(outputSlotsNames.contains("Output URL 1 (by Filter by Classification)"), QString("'Output URL 1 (by Filter by Classification)' slot not found in element '%1'").arg(filterName)); - CHECK_SET_ERR(!outputSlotsNames.contains("Output URL 2 (by Filter by Classification)"), QString("'Output URL 2 (by Filter by Classification)' slot unexpectedly found in element '%1'").arg(filterName)); + CHECK_SET_ERR(inputSlotsNames.contains("Input URL 1"), QString("'Input URL 1' slot not found in element '%1'").arg(krakenName)); + CHECK_SET_ERR(!inputSlotsNames.contains("Input URL 2"), QString("'Input URL 2' slot unexpectedly found in element '%1'").arg(krakenName)); } -// 5. Click 'Validate workflow' button on the toolbar. + // 5. Click 'Validate workflow' button on the toolbar. GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new MessageBoxDialogFiller(os, QMessageBox::Ok)); GTUtilsWorkflowDesigner::validateWorkflow(os); -// Expected state: there could be errors, but there are neither errors not warnings about not connected slots. - QSet<QString> acceptableErrors = QSet<QString>() << QString("%1: %1 : The mandatory \"Input URL 1\" slot is not connected.").arg(clarkName) - << QString("%1: External tool \"CLARK\" is not set. You can set it in Settings -> Preferences -> External Tools").arg(clarkName) - << QString("%1: External tool \"CLARK-l\" is not set. You can set it in Settings -> Preferences -> External Tools").arg(clarkName) - << QString("%1: %1 : The mandatory \"Input URL 1\" slot is not connected.").arg(krakenName) - << QString("%1: External tool \"kraken\" is not set. You can set it in Settings -> Preferences -> External Tools").arg(krakenName) - << QString("%1: %1 : The mandatory \"Input URL 1\" slot is not connected.").arg(filterName) - << QString("%1: %1 : The mandatory \"Input FASTQ URL 1\" slot is not connected.").arg(trimmomaticName) - << QString("%1: External tool \"Trimmomatic\" is not set. You can set it in Settings -> Preferences -> External Tools").arg(trimmomaticName) - << QString("%1: Required parameter is not set: Database").arg(clarkName) - << QString("%1: Required parameter is not set: Database").arg(krakenName) - << QString("%1: The database folder \"\" doesn't exist.").arg(krakenName) - << QString("%1: Required parameter is not set: Trimming steps").arg(trimmomaticName); + // Expected state: there could be errors, but there are neither errors not warnings about not connected slots. + QSet<QString> acceptableErrors; + +#ifdef Q_OS_WIN + acceptableErrors = QSet<QString>() + << QString("%1: The mandatory \"Input URL 1\" slot is not connected.").arg(krakenName) + << QString("%1: External tool \"kraken\" is not set. You can set it in Settings -> Preferences -> External Tools").arg(krakenName) + << QString("%1: Required parameter is not set: Database").arg(krakenName) + << QString("%1: The database folder \"\" doesn't exist.").arg(krakenName); +#else + acceptableErrors = QSet<QString>() + << QString("%1: The mandatory \"Input URL 1\" slot is not connected.").arg(krakenName) + << QString("%1: Required parameter is not set: Database").arg(krakenName) + << QString("%1: The database folder \"\" doesn't exist.").arg(krakenName); +#endif QSet<QString> actualErrors = GTUtilsWorkflowDesigner::getErrors(os).toSet(); - CHECK_SET_ERR(acceptableErrors.contains(actualErrors), "There are unexpected errors after the workflow validation"); + CHECK_SET_ERR(acceptableErrors.size() == actualErrors.size(), QString("Unexpected errors number, expected: %1, current: %2"). + arg(acceptableErrors.size()). + arg(actualErrors.size())); } GUI_TEST_CLASS_DEFINITION(test_6043) { @@ -407,13 +537,19 @@ GUI_TEST_CLASS_DEFINITION(test_6058_2) { //2. Check "30. Peritrich Nuclear" "Genetic code" parameter option in "Classify Sequences with DIAMOND" WD element WorkflowProcessItem *diamondElement = GTUtilsWorkflowDesigner::addElement(os, "Classify Sequences with DIAMOND", true); + GTGlobals::sleep(); + WorkflowProcessItem *orfMarker = GTUtilsWorkflowDesigner::addElementByUsingNameFilter(os, "ORF Marker"); + GTGlobals::sleep(); GTUtilsWorkflowDesigner::click(os, diamondElement); + GTGlobals::sleep(); GTUtilsWorkflowDesigner::setParameter(os, "Genetic code", "30. Peritrich Nuclear", GTUtilsWorkflowDesigner::comboValue); + GTGlobals::sleep(); //3. Check "27. Karyorelict Nuclear" "Genetic code" parameter option in "ORF Marker" WD element - WorkflowProcessItem *orfmarkerElement = GTUtilsWorkflowDesigner::addElement(os, "ORF Marker", true); - GTUtilsWorkflowDesigner::click(os, orfmarkerElement); + GTUtilsWorkflowDesigner::click(os, orfMarker); + GTGlobals::sleep(); GTUtilsWorkflowDesigner::setParameter(os, "Genetic code", "27. Karyorelict Nuclear", GTUtilsWorkflowDesigner::comboValue); + GTGlobals::sleep(); } GUI_TEST_CLASS_DEFINITION(test_6062) { @@ -542,12 +678,14 @@ GUI_TEST_CLASS_DEFINITION(test_6071) { //3. Scroll to the 3874 coordinate. GTUtilsSequenceView::goToPosition(os, 3874); + GTGlobals::sleep(); DetView* dw = GTUtilsSequenceView::getDetViewByNumber(os); const U2Region firstVisibleRange = dw->getVisibleRange(); //4. Click on 2-th CDS join annotation GTUtilsSequenceView::clickAnnotationDet(os, "CDS", 3412); + GTGlobals::sleep(); //Expected: visible range was not changed const U2Region secondVisibleRange = dw->getVisibleRange(); @@ -649,7 +787,7 @@ GUI_TEST_CLASS_DEFINITION(test_6118) { //1. Open WD GTUtilsWorkflowDesigner::openWorkflowDesigner(os); - //2. Make scheme "Read FASTQ File with SE Reads" -> "Improve Reads with Trimmomatic" + //2. Make workflow "Read FASTQ File with SE Reads" -> "Improve Reads with Trimmomatic" const QString readSEName = "Read FASTQ File with SE Reads"; const QString trimmomaticName = "Improve Reads with Trimmomatic"; @@ -671,7 +809,8 @@ GUI_TEST_CLASS_DEFINITION(test_6118) { GTGlobals::sleep(500); GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, testDir + "_common_data/regression/6118/TruSeq3-SE.fa")); - GTWidget::click(os, GTWidget::findWidget(os, "tbBrowse")); + GTWidget::click(os, GTWidget::findWidget(os, "tbBrowse", dialog)); + GTGlobals::sleep(500); GTWidget::click(os, GTWidget::findWidget(os, "buttonAdd")); menu = qobject_cast<QMenu*>(GTWidget::findWidget(os, "stepsMenu")); @@ -680,7 +819,7 @@ GUI_TEST_CLASS_DEFINITION(test_6118) { GTGlobals::sleep(500); GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, testDir + "_common_data/regression/6118/deeperDir/TruSeq3-SE.fa")); - GTWidget::click(os, GTWidget::findWidget(os, "tbBrowse")); + GTWidget::click(os, GTWidget::findWidget(os, "tbBrowse", dialog)); GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); } @@ -694,8 +833,8 @@ GUI_TEST_CLASS_DEFINITION(test_6118) { QTableView* table = GTWidget::findExactWidget<QTableView*>(os, "table"); GTMouseDriver::moveTo(GTTableView::getCellPoint(os, table, 1, 1)); GTMouseDriver::click(); - GTGlobals::sleep(500); - GTWidget::click(os, GTWidget::findButtonByText(os, "...", table)); + GTGlobals::sleep(); + GTWidget::click(os, GTWidget::findWidget(os, "trimmomaticPropertyToolButton", table)); GTGlobals::sleep(500); //4. Run this workflow. @@ -706,6 +845,47 @@ GUI_TEST_CLASS_DEFINITION(test_6118) { CHECK_SET_ERR(!l.hasError(), "Errors in the log"); } +GUI_TEST_CLASS_DEFINITION(test_6135) { + + // Open "COI.aln". + // Rename the second sequence to "Phaneroptera_falcata". + // Current state: There are two sequences with name "Phaneroptera_falcata" (the first and the second one). + // Select "Export -> Save subalignment" in the context menu. + // Select only one "Phaneroptera_falcata" sequence and click "Extract". + // Expected state: one selected sequence was exported. + + GTUtilsProject::openFiles(os, dataDir + "samples/CLUSTALW/COI.aln"); + + class custom: public CustomScenario{ + public: + virtual void run(HI::GUITestOpStatus &os){ + QWidget *dialog = QApplication::activeModalWidget(); + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + }; + + GTUtilsMSAEditorSequenceArea::renameSequence(os, "Isophya_altaica_EF540820", "Phaneroptera_falcata"); + + GTUtilsDialog::waitForDialog(os, new PopupChooser(os, QStringList()<<MSAE_MENU_EXPORT<<"Save subalignment")); + GTUtilsDialog::waitForDialog(os,new ExtractSelectedAsMSADialogFiller(os, new custom())); + + GTMenu::showContextMenu(os,GTWidget::findWidget(os,"msa_editor_sequence_area")); + + GTMouseDriver::moveTo(GTUtilsProjectTreeView::getItemCenter(os, "COI.aln"));; + GTMouseDriver::click(); + + GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, QMessageBox::No)); + + GTKeyboardDriver::keyClick(Qt::Key_Delete); + GTUtilsTaskTreeView::waitTaskFinished(os); + const QStringList sequencesNameList = GTUtilsMSAEditorSequenceArea::getNameList(os); + + CHECK_SET_ERR(sequencesNameList.length() == 1, "Length of namelist is not 1! Length: " + QString::number(sequencesNameList.length())); +} + + + GUI_TEST_CLASS_DEFINITION(test_6136) { // 1. Open "test/scenarios/_common_data/genbank/target_gene_new.gb". GTFileDialog::openFile(os, testDir + "_common_data/genbank/target_gene_new.gb"); @@ -737,10 +917,12 @@ GUI_TEST_CLASS_DEFINITION(test_6136) { //Expected: Sequence length = 423 const int length = GTUtilsSequenceView::getLengthOfSequence(os); CHECK_SET_ERR(length == 423, QString("Unexpected sequence length, expected: 423, current: %1").arg(length)); + GTGlobals::sleep(200); //Check annotaions foreach(const int i, QList<int>() << 30 << 376) { GTUtilsSequenceView::clickAnnotationPan(os, "Misc. Feature", i, 0, true); + GTGlobals::sleep(); QVector<U2Region> sel = GTUtilsSequenceView::getSelection(os); CHECK_SET_ERR(sel.size() == 1, QString("Unexpected selection annotation regions, expected: 1, current: %1").arg(sel.size())); } @@ -752,6 +934,195 @@ GUI_TEST_CLASS_DEFINITION(test_6136) { } } +GUI_TEST_CLASS_DEFINITION(test_6167) { + //1. Change workflow designer output folder to sandbox + class Custom : public CustomScenario { + void run(HI::GUITestOpStatus &os){ + QWidget *dialog = QApplication::activeModalWidget(); + + QTreeWidget* tree = GTWidget::findExactWidget<QTreeWidget*>(os, "tree", dialog); + CHECK_SET_ERR(tree != NULL, "QTreeWidget unexpectedly not found"); + + AppSettingsDialogFiller::openTab(os, AppSettingsDialogFiller::WorkflowDesigner); + + QLineEdit* workflowOutputEdit = GTWidget::findExactWidget<QLineEdit*>(os, "workflowOutputEdit", dialog); + CHECK_SET_ERR(workflowOutputEdit != NULL, "QLineEdit unexpectedly not found"); + + GTLineEdit::setText(os, workflowOutputEdit, sandBoxDir); + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + }; + + GTUtilsDialog::waitForDialog(os, new AppSettingsDialogFiller(os, new Custom())); + GTMenu::clickMainMenuItem(os, QStringList() << "Settings" << "Preferences...", GTGlobals::UseMouse); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //2. Open "test\_common_data\regression\6167\6167.uwl" and run + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + GTUtilsWorkflowDesigner::loadWorkflow(os, testDir + "_common_data/regression/6167/6167.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + + GTUtilsWorkflowDesigner::addInputFile(os, "Read File URL(s)", dataDir + "samples/FASTQ/eas.fastq"); + + class TrimmomaticCustomScenario : public CustomScenario { + void run(HI::GUITestOpStatus& os) { + QWidget *dialog = QApplication::activeModalWidget(); + + QToolButton* addButton = GTWidget::findExactWidget<QToolButton*>(os, "buttonAdd", dialog); + CHECK_SET_ERR(addButton != NULL, "addButton unexpectedly not found"); + + GTWidget::click(os, addButton); + GTGlobals::sleep(200); + for (int i = 0; i < 4; i++) { + GTKeyboardDriver::keyClick(Qt::Key_Down); + GTGlobals::sleep(200); + } + + GTKeyboardDriver::keyClick(Qt::Key_Enter); + GTGlobals::sleep(500); + GTKeyboardDriver::keyClick(Qt::Key_Enter); + GTGlobals::sleep(200); + GTKeyboardDriver::keyClick(Qt::Key_Escape); + GTGlobals::sleep(200); + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + }; + + GTUtilsDialog::waitForDialog(os, new TrimmomaticDialogFiller(os, new TrimmomaticCustomScenario())); + GTUtilsWorkflowDesigner::click(os, "Trimmomatic 1"); + GTUtilsWorkflowDesigner::setParameter(os, "Trimming steps", "", GTUtilsWorkflowDesigner::customDialogSelector); + GTUtilsTaskTreeView::waitTaskFinished(os); + GTGlobals::sleep(); + + GTUtilsDialog::waitForDialog(os, new TrimmomaticDialogFiller(os, new TrimmomaticCustomScenario())); + GTUtilsWorkflowDesigner::click(os, "Trimmomatic 2"); + GTUtilsWorkflowDesigner::setParameter(os, "Trimming steps", "", GTUtilsWorkflowDesigner::customDialogSelector); + GTUtilsTaskTreeView::waitTaskFinished(os); + GTGlobals::sleep(); + + GTUtilsWorkflowDesigner::runWorkflow(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //Expected: There are no adapter files in the output directory + QDir sandbox(sandBoxDir); + QStringList filter = QStringList() << "????.??.??_?\?-??"; + QStringList sandboxEntry = sandbox.entryList(filter, QDir::AllEntries); + CHECK_SET_ERR(sandboxEntry.size() == 1, QString("Unexpected nomber of folders, expected: 1, current62: %1").arg(sandboxEntry.size())); + + QString insideSandbox(sandBoxDir + sandboxEntry.first()); + QDir insideSandboxDir(insideSandbox); + QStringList resultDirs = insideSandboxDir.entryList(); + CHECK_SET_ERR(resultDirs.size() == 5, QString("Unexpected number of result folders, expected: 5, current: %1").arg(resultDirs.size())); +} + +GUI_TEST_CLASS_DEFINITION(test_6204) { + //1. Open the WD. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + GTUtilsWorkflowDesigner::loadWorkflow(os, testDir + "_common_data/scenarios/_regression/6204/6204.uwl"); + + //2. add 3 big alignments to "Read Alignment 1" worker ""_common_data/clustal/100_sequences.aln", ""_common_data/clustal/non_unique_row_names.aln" + GTUtilsWorkflowDesigner::addInputFile(os, "Read Alignment 1", testDir + "_common_data/clustal/100_sequences.aln"); + GTUtilsWorkflowDesigner::addInputFile(os, "Read Alignment 1", testDir + "_common_data/clustal/non_unique_row_names.aln"); + GTUtilsWorkflowDesigner::addInputFile(os, "Read Alignment", testDir + "_common_data/clustal/COI na.aln"); + GTUtilsWorkflowDesigner::runWorkflow(os); + + // There is no message "Task is in progress.." after finished task where 2 notifications are present + GTUtilsTaskTreeView::waitTaskFinished(os); + GTGlobals::sleep(100); + HI::HIWebElement el = GTUtilsDashboard::findElement(os, "The workflow task has been finished"); + CHECK_SET_ERR(el.geometry() != QRect(), QString("Element with desired text not found")); +} + +GUI_TEST_CLASS_DEFINITION(test_6207) { + //1. Open the WD. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + //2. Compose scheme read fastq with PE reads -> Filter by Classification + GTUtilsWorkflowDesigner::addElement(os, "Read FASTQ File with SE Reads", true); + GTUtilsWorkflowDesigner::addElement(os, "Filter by Classification", true); + GTUtilsWorkflowDesigner::connect(os, GTUtilsWorkflowDesigner::getWorker(os, "Read FASTQ File with SE Reads"), + GTUtilsWorkflowDesigner::getWorker(os, "Filter by Classification")); + //3. Set eas.fastq as input data + //GTUtilsWorkflowDesigner::click(os, "Read FASTQ File with PE Reads"); + GTUtilsWorkflowDesigner::addInputFile(os, "Read FASTQ File with SE Reads", dataDir + "samples/FASTQ/eas.fastq"); + + //4. Validate scheme. Count errors + GTUtilsWorkflowDesigner::validateWorkflow(os); + int errorCount = GTUtilsWorkflowDesigner::getErrors(os).size(); + GTGlobals::sleep(); + GTKeyboardDriver::keyClick(Qt::Key_Enter); + GTUtilsWorkflowDesigner::click(os, "Filter by Classification"); + GTWidget::click(os, GTWidget::findExactWidget<QGroupBox*>(os, "inputPortBox"), Qt::LeftButton, QPoint(7,7)); + + //6. In the Property Editor change value of the "Input URL 1" slot to empty. Don't change focus. + QTableWidget* table1 = GTUtilsWorkflowDesigner::getInputPortsTable(os, 0); + //GTUtilsWorkflowDesigner::setTableValue(os, "Source URL", "<empty>", GTUtilsWorkflowDesigner::comboValue, table1); + GTUtilsWorkflowDesigner::setTableValue(os, "Input URL 1", "<empty>", GTUtilsWorkflowDesigner::comboValue, table1); + + //7. Validate workflow, count errors + GTUtilsWorkflowDesigner::validateWorkflow(os); + GTKeyboardDriver::keyClick(Qt::Key_Enter); + + //Expected state: error counter contains 1 error more + CHECK_SET_ERR(GTUtilsWorkflowDesigner::getErrors(os).size() == 1 + errorCount, QString("Workflow validation error count doesn't match. Expected error count %1, actual %2.") + .arg(QString::number(1 + errorCount)).arg(QString::number(GTUtilsWorkflowDesigner::getErrors(os).size()))); +} + +GUI_TEST_CLASS_DEFINITION(test_6212) { + //1. Open the WD. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + + //2. Add "Read File URL data" and "Improve Reads with Trimmomatic" elements and connect them. + const QString readFileName = "Read File URL(s)"; + const QString trimmomaticName = "Improve Reads with Trimmomatic"; + WorkflowProcessItem* readFileNameElement = GTUtilsWorkflowDesigner::addElement(os, readFileName); + WorkflowProcessItem* trimmomaticElement = GTUtilsWorkflowDesigner::addElement(os, trimmomaticName); + GTUtilsWorkflowDesigner::addInputFile(os, readFileName, dataDir + "samples/FASTQ/eas.fastq"); + GTUtilsWorkflowDesigner::connect(os, readFileNameElement, trimmomaticElement); + GTUtilsWorkflowDesigner::click(os, trimmomaticName); + QTableWidget* table1 = GTUtilsWorkflowDesigner::getInputPortsTable(os, 0); + CHECK_SET_ERR(table1 != NULL, "QTableWidget isn't found"); + + GTUtilsWorkflowDesigner::setTableValue(os, "Input FASTQ URL 1", "Dataset name (by Read File URL(s))", GTUtilsWorkflowDesigner::comboValue, table1); + + //3. Click on the Trimmomatic element, then click on the "Configure steps" parameter in the Property Editor, click on the appeared browse button in the value field. + class TrimmomaticCustomScenario : public CustomScenario { + void run(HI::GUITestOpStatus& os) { + QWidget *dialog = QApplication::activeModalWidget(); + + QDialogButtonBox* buttonBox = GTWidget::findExactWidget<QDialogButtonBox*>(os, "buttonBox", dialog); + CHECK_SET_ERR(buttonBox != NULL, "QDialogButtonBox unexpectedly not found"); + + QPushButton* buttonOk = buttonBox->button(QDialogButtonBox::Ok); + CHECK_SET_ERR(buttonOk != NULL, "buttonOk unexpectedly not found"); + CHECK_SET_ERR(!buttonOk->isEnabled(), "buttonOk should be disabled"); + + //4. Close the dialog + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Cancel); + } + }; + + GTUtilsDialog::waitForDialog(os, new TrimmomaticDialogFiller(os, new TrimmomaticCustomScenario())); + GTUtilsWorkflowDesigner::click(os, trimmomaticName); + GTUtilsWorkflowDesigner::setParameter(os, "Trimming steps", "", GTUtilsWorkflowDesigner::customDialogSelector); + GTUtilsTaskTreeView::waitTaskFinished(os); + GTGlobals::sleep(); + + //5. Click "Validate workflow". + GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, QMessageBox::Ok)); + GTUtilsWorkflowDesigner::validateWorkflow(os); + GTGlobals::sleep(); + + //Expected state: Validation doesn't pass, there is an error about absent steps. + QStringList errors = GTUtilsWorkflowDesigner::getErrors(os); + CHECK_SET_ERR(errors.size() == 1, QString("Unexpected errors number, expected: 1, current: %1").arg(errors.size())); + CHECK_SET_ERR(errors.first() == "Improve Reads with Trimmomatic: Required parameter is not set: Trimming steps", "Unexpected error in the log. Is should be something about Trimming steps"); + + GTKeyboardDriver::keyClick(Qt::Key_Enter); + GTGlobals::sleep(1000); +} + GUI_TEST_CLASS_DEFINITION(test_6225) { QString filePath = testDir + "_common_data/sanger/alignment_short.ugenedb"; QString fileName = "sanger_alignment_short.ugenedb"; @@ -774,32 +1145,1703 @@ GUI_TEST_CLASS_DEFINITION(test_6225) { CHECK_SET_ERR(size == 2, QString("Unexpected documents number; expected: 2, current: %1").arg(size)); } +GUI_TEST_CLASS_DEFINITION(test_6226) { -GUI_TEST_CLASS_DEFINITION(test_6243) { - //1. Select "File" -> "Access remove database...". - //2 Select "ENSEMBL" database. Use any sample ID as "Resource ID". Accept the dialog. - //Do it twice, for two different ids - QList<QString> ensemblyIds = QList<QString>() << "ENSG00000205571" << "ENSG00000146463"; - foreach(const QString& id, ensemblyIds) { - QList<DownloadRemoteFileDialogFiller::Action> actions; - actions << DownloadRemoteFileDialogFiller::Action(DownloadRemoteFileDialogFiller::SetResourceIds, QStringList() << id); - actions << DownloadRemoteFileDialogFiller::Action(DownloadRemoteFileDialogFiller::SetDatabase, "ENSEMBL"); - actions << DownloadRemoteFileDialogFiller::Action(DownloadRemoteFileDialogFiller::EnterSaveToDirectoryPath, sandBoxDir); - actions << DownloadRemoteFileDialogFiller::Action(DownloadRemoteFileDialogFiller::ClickOk, ""); + GTUtilsDialog::waitForDialog(os, new SequenceReadingModeSelectorDialogFiller(os, SequenceReadingModeSelectorDialogFiller::Align)); + AlignShortReadsFiller::UgeneGenomeAlignerParams parameters(testDir + "_common_data/fasta/reference.fa", QStringList()); + parameters.samOutput = false; + GTUtilsDialog::waitForDialog(os, new AlignShortReadsFiller(os, ¶meters)); + GTFileDialog::openFile(os, testDir + "_common_data/fasta/reads.fa"); + GTUtilsTaskTreeView::waitTaskFinished(os); + GTGlobals::sleep(); +} - GTUtilsDialog::waitForDialog(os, new DownloadRemoteFileDialogFiller(os, actions)); - GTMenu::clickMainMenuItem(os, QStringList() << "File" << "Access remote database...", GTGlobals::UseMouse); - GTUtilsTaskTreeView::waitTaskFinished(os); - GTGlobals::sleep(); - } +GUI_TEST_CLASS_DEFINITION(test_6229) { - //Expected state: the sequences are downloaded. The files names contain the sequence ID. - QString first = QString("%1.fa").arg(ensemblyIds.first()); + GTUtilsDialog::waitForDialog(os, new SequenceReadingModeSelectorDialogFiller(os, SequenceReadingModeSelectorDialogFiller::Align)); + AlignShortReadsFiller::UgeneGenomeAlignerParams parameters(testDir + "_common_data/fasta/reference.fa", QStringList()); + parameters.samOutput = false; + GTUtilsDialog::waitForDialog(os, new AlignShortReadsFiller(os, ¶meters)); + GTFileDialog::openFile(os, testDir + "_common_data/fasta/reads.fa"); + GTUtilsTaskTreeView::waitTaskFinished(os); + GTGlobals::sleep(); + + GTUtilsDialog::waitForDialog(os, new PopupChecker(os, QStringList() << "unassociateReferenceAction", PopupChecker::IsEnabled)); + GTWidget::click(os, GTWidget::findWidget(os, "Assembly reference sequence area"), Qt::RightButton); +} + +GUI_TEST_CLASS_DEFINITION(test_6230) { + + // 2. Select "Tools" -> Sanger data analysis" -> "Map reads to reference...". + // 3. Set "_common_data/sanger/reference.gb" as reference, "_common_data/sanger/sanger_*.ab1" as reads. Accept the dialog. + // Expected state: the task fails. + // 4. After the task finish open the report. + // Expected state: there is an error message in the report: "The task uses a temporary folder to process the data. The folder path is required not to have spaces. Please set up an appropriate path for the "Temporary files" parameter on the "Directories" tab of the UGENE Application Settings.". + class Scenario : public CustomScenario { + void run(HI::GUITestOpStatus &os) { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(NULL != dialog, "activeModalWidget is NULL"); + + AlignToReferenceBlastDialogFiller::setReference(os, testDir + "_common_data/sanger/reference.gb", dialog); + + QStringList reads; + for (int i = 1; i < 21; i++) { + reads << QString(testDir + "_common_data/sanger/sanger_%1.ab1").arg(i, 2, 10, QChar('0')); + } + AlignToReferenceBlastDialogFiller::setReads(os, reads, dialog); + AlignToReferenceBlastDialogFiller::setDestination(os, sandBoxDir + "test_6230/test_6230.ugenedb", dialog); + + GTUtilsDialog::clickButtonBox(os, QDialogButtonBox::Ok); + } + }; + + GTUtilsDialog::waitForDialog(os, new AlignToReferenceBlastDialogFiller(os, new Scenario)); + GTMenu::clickMainMenuItem(os, QStringList() << "Tools" << "Sanger data analysis" << "Map reads to reference..."); + GTUtilsTaskTreeView::waitTaskFinished(os); + + GTUtilsTaskTreeView::waitTaskFinished(os); + GTUtilsProjectTreeView::checkItem(os, "test_6230.ugenedb"); + +} + +GUI_TEST_CLASS_DEFINITION(test_6232_1) { + //1. Open "STEP1_pFUS2_a2a_5.gb" sequence. + GTFileDialog::openFile(os, testDir + "_common_data/regression/6232/STEP1_pFUS2_a2a_5.gb"); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //2. Select "Actions > Analyze > Find restriction sites", check "Esp3I" enzyme in the appeared dialog, click "OK". + GTUtilsDialog::waitForDialog(os, new FindEnzymesDialogFiller(os, QStringList() << "Esp3I")); + GTMenu::clickMainMenuItem(os, QStringList() << "Actions" << "Analyze" << "Find restriction sites...", GTGlobals::UseMouse); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //3. Select "Actions > Cloning > Digest into fragments".Add "Esp3I" to the "Selected enzymes" in the appeared dialog, click "OK". + GTUtilsDialog::waitForDialog(os, new DigestSequenceDialogFiller(os)); + GTMenu::clickMainMenuItem(os, QStringList() << "Tools" << "Cloning" << "Digest into fragments..."); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //Expected state : the corresponding "Fragment" annotations have been created + QStringList groupNames = GTUtilsAnnotationsTreeView::getGroupNames(os); + CHECK_SET_ERR(groupNames.contains("fragments (0, 2)"), "The group \"fragments (0, 2)\" is unexpectedly absent"); +} + +GUI_TEST_CLASS_DEFINITION(test_6232_2) { + //1. Open "STEP1_pFUS2_a2a_5_2.gb" sequence. + GTFileDialog::openFile(os, testDir + "_common_data/regression/6232/STEP1_pFUS2_a2a_5_2.gb"); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //2. Select "Actions > Analyze > Find restriction sites", check "Esp3I" enzyme in the appeared dialog, click "OK". + GTUtilsDialog::waitForDialog(os, new FindEnzymesDialogFiller(os, QStringList() << "Esp3I")); + GTMenu::clickMainMenuItem(os, QStringList() << "Actions" << "Analyze" << "Find restriction sites...", GTGlobals::UseMouse); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //3. Select "Actions > Cloning > Digest into fragments".Add "Esp3I" to the "Selected enzymes" in the appeared dialog, click "OK". + GTUtilsDialog::waitForDialog(os, new DigestSequenceDialogFiller(os)); + GTMenu::clickMainMenuItem(os, QStringList() << "Tools" << "Cloning" << "Digest into fragments..."); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //Expected state: "left_end_seq" qualifier of the first fragment and "right_end_seq" of the second fragment should have "TGAC" value + /*QTreeWidgetItem* fragment1 = GTUtilsAnnotationsTreeView::findItem(os, "Fragment 1"); + CHECK_SET_ERR(fragment1 != NULL, "Fragment 1 is not found"); +*/ + QString firstValue = GTUtilsAnnotationsTreeView::getQualifierValue(os, "left_end_seq", "Fragment 1"); + CHECK_SET_ERR(firstValue == "TGAC", QString("Unexpected qualifier value of the first fragment, expected: TGAC, current: %1").arg(firstValue)); + + QString secondValue = GTUtilsAnnotationsTreeView::getQualifierValue(os, "right_end_seq", "Fragment 2"); + CHECK_SET_ERR(secondValue == "TGAC", QString("Unexpected qualifier value of the first fragment, expected: TGAC, current: %1").arg(secondValue)); +} + +GUI_TEST_CLASS_DEFINITION(test_6232_3) { + //1. Open "STEP1_pFUS2_a2a_5.gb" sequence. + GTFileDialog::openFile(os, testDir + "_common_data/regression/6232/STEP1_pFUS2_a2a_5.gb"); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //2. Select "Actions > Analyze > Find restriction sites", check "Esp3I" enzyme in the appeared dialog, click "OK". + GTUtilsDialog::waitForDialog(os, new FindEnzymesDialogFiller(os, QStringList() << "Esp3I")); + GTMenu::clickMainMenuItem(os, QStringList() << "Actions" << "Analyze" << "Find restriction sites...", GTGlobals::UseMouse); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //3. Select "Actions > Cloning > Digest into fragments".Add "Esp3I" to the "Selected enzymes", disable "Circular Molecule" checkBox and click "OK". + class Scenario : public CustomScenario { + void run(GUITestOpStatus& os) { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(NULL != dialog, "activeModalWidget is NULL"); + + GTCheckBox::setChecked(os, "circularBox", false, dialog); + GTWidget::click(os, GTWidget::findWidget(os, "addAllButton", dialog)); + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + }; + + GTUtilsDialog::waitForDialog(os, new DigestSequenceDialogFiller(os, new Scenario)); + GTMenu::clickMainMenuItem(os, QStringList() << "Tools" << "Cloning" << "Digest into fragments..."); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //Expected: despite the sequence is circular, fragments were found without the gap it the junction point + //Expected: there are two annotations with the following regions were created - U2Region(2, 2467) and U2Region(2473, 412) + QList<U2Region> regions = GTUtilsAnnotationsTreeView::getAnnotatedRegionsOfGroup(os, "fragments (0, 2)"); + CHECK_SET_ERR(regions.size() == 2, QString("Unexpected number of fragments, expected: 2, current: %1").arg(regions.size())); + CHECK_SET_ERR(regions.first() == U2Region(2, 2467), QString("Unexpected fragment region, expected: start = 2, length = 2467; current: start = %1, length = %2").arg(regions.first().startPos).arg(regions.first().length)); + CHECK_SET_ERR(regions.last() == U2Region(2473, 412), QString("Unexpected fragment region, expected: start = 2473, length = 412; current: start = %1, length = %2").arg(regions.last().startPos).arg(regions.last().length)); +} + +GUI_TEST_CLASS_DEFINITION(test_6232_4) { + //1. Open "STEP1_pFUS2_a2a_5_not_circular.gb" sequence. + GTFileDialog::openFile(os, testDir + "_common_data/regression/6232/STEP1_pFUS2_a2a_5_not_circular.gb"); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //2. Select "Actions > Analyze > Find restriction sites", check "Esp3I" enzyme in the appeared dialog, click "OK". + GTUtilsDialog::waitForDialog(os, new FindEnzymesDialogFiller(os, QStringList() << "Esp3I")); + GTMenu::clickMainMenuItem(os, QStringList() << "Actions" << "Analyze" << "Find restriction sites...", GTGlobals::UseMouse); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //3. Select "Actions > Cloning > Digest into fragments".Add "Esp3I" to the "Selected enzymes" checkBox and click "OK". + GTUtilsDialog::waitForDialog(os, new DigestSequenceDialogFiller(os)); + GTMenu::clickMainMenuItem(os, QStringList() << "Tools" << "Cloning" << "Digest into fragments..."); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //4. Select "Actions > Cloning > Construct molecule...". Click "Add all" button, click "OK". + QList<ConstructMoleculeDialogFiller::Action> actions; + actions << ConstructMoleculeDialogFiller::Action(ConstructMoleculeDialogFiller::AddAllFragments, ""); + actions << ConstructMoleculeDialogFiller::Action(ConstructMoleculeDialogFiller::ClickOk, ""); + GTUtilsDialog::waitForDialog(os, new ConstructMoleculeDialogFiller(os, actions)); + GTMenu::clickMainMenuItem(os, QStringList() << "Actions" << "Cloning" << "Construct molecule..."); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //Expected state: the first fragment begins from 3 base, there are "AC" bases before it + QList<U2Region> regions = GTUtilsAnnotationsTreeView::getAnnotatedRegionsOfGroup(os, "STEP1_pFUS2_a2a_5 Fragment 1 (0, 1)"); + CHECK_SET_ERR(regions.size() == 1, QString("Unexpected number of fragments, expected: 1, current: %1").arg(regions.size())); + CHECK_SET_ERR(regions.first().startPos == 2, QString("Unexpected fragment startPos, expected: 2; current: %1").arg(regions.first().startPos)); + + QString beginning = GTUtilsSequenceView::getBeginOfSequenceAsString(os, 2); + CHECK_SET_ERR(beginning == "AC", QString("Unexpected beginning, expected: AC, currecnt: %1").arg(beginning)); +} + +GUI_TEST_CLASS_DEFINITION(test_6233) { + //1. Find the link to the ET downloadp page in the application settings + class Custom : public CustomScenario { + void run(HI::GUITestOpStatus &os){ + QWidget *dialog = QApplication::activeModalWidget(); + + AppSettingsDialogFiller::openTab(os, AppSettingsDialogFiller::ExternalTools); + QLabel* selectToolPackLabel = GTWidget::findExactWidget<QLabel*>(os, "selectToolPackLabel"); + CHECK_SET_ERR(selectToolPackLabel != NULL, "selectToolPackLabel unexpectedly not found"); + + QPoint pos(selectToolPackLabel->pos().x(), selectToolPackLabel->pos().y()); + QPoint globalPos = selectToolPackLabel->mapToGlobal(pos); +#ifdef Q_OS_LINUX + globalPos.setY(globalPos.y() - 20); +#endif + GTMouseDriver::moveTo(globalPos); + const int xpos = globalPos.x(); + GTClipboard::clear(os); + for (int i = 0; i < 7; i++) { + for (int j = 0; j < 20; j++) { + GTGlobals::sleep(100); + QPoint mousePos(GTMouseDriver::getMousePosition()); +#ifdef Q_OS_WIN + globalPos = QPoint(mousePos.x() + 11, mousePos.y() + 1); +#else + globalPos = QPoint(mousePos.x() + 10, mousePos.y()); +#endif + GTMouseDriver::moveTo(globalPos); + Qt::CursorShape shape = selectToolPackLabel->cursor().shape(); + if (shape != Qt::ArrowCursor) { + GTMouseDriver::click(Qt::RightButton); + GTGlobals::sleep(200); + GTKeyboardDriver::keyClick(Qt::Key_Down); + GTGlobals::sleep(200); + GTKeyboardDriver::keyClick(Qt::Key_Enter); + clip = GTClipboard::text(os); + if (!clip.isEmpty()) { + break; + } + } + } + if (!clip.isEmpty()) { + break; + } + GTGlobals::sleep(25); + globalPos = QPoint(xpos, globalPos.y() + 5); + GTMouseDriver::moveTo(globalPos); + } + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + + public: + QString clip; + }; + + Custom* c = new Custom(); + GTUtilsDialog::waitForDialog(os, new AppSettingsDialogFiller(os, c)); + GTMenu::clickMainMenuItem(os, QStringList() << "Settings" << "Preferences...", GTGlobals::UseMouse); + + //2. Pull html by the link + HttpFileAdapterFactory* factory = new HttpFileAdapterFactory; + IOAdapter* adapter = factory->createIOAdapter(); + bool isOpened = adapter->open(GUrl(c->clip), IOAdapterMode_Read); + CHECK_SET_ERR(isOpened, "HttpFileAdapter unexpectedly wasn't opened"); + + char* data = new char[128]; + bool isNotFound = false; + bool eof = false; + + while (!isNotFound && !eof) { + int read = adapter->readLine(data, 128); + QString d(data); + isNotFound = d.contains("Page not found"); + eof = read == 0; + } + + CHECK_SET_ERR(!isNotFound, "The External Tools page is not found"); +} + +GUI_TEST_CLASS_DEFINITION(test_6235_1) { + //1. Open "_common_data/regression/6235/6235_1.gb" sequence. + GTFileDialog::openFile(os, testDir + "_common_data/regression/6235/6235_1.gb"); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //2. Select "Actions > Analyze > Find restriction sites", check "Esp3I" enzyme in the appeared dialog, click "OK". + GTUtilsDialog::waitForDialog(os, new FindEnzymesDialogFiller(os, QStringList() << "Esp3I")); + GTMenu::clickMainMenuItem(os, QStringList() << "Actions" << "Analyze" << "Find restriction sites...", GTGlobals::UseMouse); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //3. Select "Actions > Cloning > Digest into fragments". Add "Esp3I" to the "Selected enzymes" in the appeared dialog, check "Circular molecule", click "OK". + class Scenario : public CustomScenario { + public: + void run(HI::GUITestOpStatus& os) { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(NULL != dialog, "activeModalWidget is NULL"); + + GTWidget::click(os, GTWidget::findWidget(os, "addAllButton", dialog)); + + GTCheckBox::setChecked(os, "circularBox", true, dialog); + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + }; + + GTUtilsDialog::waitForDialog(os, new DigestSequenceDialogFiller(os, new Scenario)); + GTMenu::clickMainMenuItem(os, QStringList() << "Tools" << "Cloning" << "Digest into fragments..."); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //Expected state: there are two annotations with the following regions were created - U2Region(2, 2467) and U2Region(2473, 410) + QList<U2Region> regions = GTUtilsAnnotationsTreeView::getAnnotatedRegionsOfGroup(os, "fragments (0, 2)"); + CHECK_SET_ERR(regions.size() == 2, QString("Unexpected number of fragments, expected: 2, current: %1").arg(regions.size())); + CHECK_SET_ERR(regions.first() == U2Region(2, 2467), QString("Unexpected fragment region, expected: start = 2, length = 2467; current: start = %1, length = %2").arg(regions.first().startPos).arg(regions.first().length)); + CHECK_SET_ERR(regions.last() == U2Region(2473, 410), QString("Unexpected fragment region, expected: start = 2473, length = 410; current: start = %1, length = %2").arg(regions.last().startPos).arg(regions.last().length)); +} + +GUI_TEST_CLASS_DEFINITION(test_6235_2) { + //1. Open "_common_data/regression/6235/6235_1.gb" sequence. + GTFileDialog::openFile(os, testDir + "_common_data/regression/6235/6235_1.gb"); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //2. Select "Actions > Analyze > Find restriction sites", check "Esp3I" enzyme in the appeared dialog, click "OK". + GTUtilsDialog::waitForDialog(os, new FindEnzymesDialogFiller(os, QStringList() << "Esp3I")); + GTMenu::clickMainMenuItem(os, QStringList() << "Actions" << "Analyze" << "Find restriction sites...", GTGlobals::UseMouse); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //3. Select "Actions > Cloning > Digest into fragments". Add "Esp3I" to the "Selected enzymes" in the appeared dialog, uncheck "Circular molecule", click "OK". + class Scenario : public CustomScenario { + public: + void run(HI::GUITestOpStatus& os) { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(NULL != dialog, "activeModalWidget is NULL"); + + GTWidget::click(os, GTWidget::findWidget(os, "addAllButton", dialog)); + + GTCheckBox::setChecked(os, "circularBox", false, dialog); + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + }; + + GTUtilsDialog::waitForDialog(os, new DigestSequenceDialogFiller(os, new Scenario)); + GTMenu::clickMainMenuItem(os, QStringList() << "Tools" << "Cloning" << "Digest into fragments..."); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //Expected state: there are two annotations with the following regions were created - U2Region(2, 2467) and U2Region(2473, 412) + QList<U2Region> regions = GTUtilsAnnotationsTreeView::getAnnotatedRegionsOfGroup(os, "fragments (0, 2)"); + CHECK_SET_ERR(regions.size() == 2, QString("Unexpected number of fragments, expected: 2, current: %1").arg(regions.size())); + CHECK_SET_ERR(regions.first() == U2Region(2, 2467), QString("Unexpected fragment region, expected: start = 2, length = 2467; current: start = %1, length = %2").arg(regions.first().startPos).arg(regions.first().length)); + CHECK_SET_ERR(regions.last() == U2Region(2473, 412), QString("Unexpected fragment region, expected: start = 2473, length = 412; current: start = %1, length = %2").arg(regions.last().startPos).arg(regions.last().length)); +} + +GUI_TEST_CLASS_DEFINITION(test_6235_3) { + //1. Open "_common_data/regression/6235/6235_2.gb" sequence. + GTFileDialog::openFile(os, testDir + "_common_data/regression/6235/6235_2.gb"); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //2. Select "Actions > Analyze > Find restriction sites", check "Esp3I" enzyme in the appeared dialog, click "OK". + GTUtilsDialog::waitForDialog(os, new FindEnzymesDialogFiller(os, QStringList() << "Esp3I")); + GTMenu::clickMainMenuItem(os, QStringList() << "Actions" << "Analyze" << "Find restriction sites...", GTGlobals::UseMouse); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //3. Select "Actions > Cloning > Digest into fragments". Add "Esp3I" to the "Selected enzymes" in the appeared dialog, check "Circular molecule", click "OK". + class Scenario : public CustomScenario { + public: + void run(HI::GUITestOpStatus& os) { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(NULL != dialog, "activeModalWidget is NULL"); + + GTWidget::click(os, GTWidget::findWidget(os, "addAllButton", dialog)); + + GTCheckBox::setChecked(os, "circularBox", true, dialog); + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + }; + + GTUtilsDialog::waitForDialog(os, new DigestSequenceDialogFiller(os, new Scenario)); + GTMenu::clickMainMenuItem(os, QStringList() << "Tools" << "Cloning" << "Digest into fragments..."); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //Expected state: there are two annotations with the following regions were created - U2Region(2, 2467) and U2Region(2473, 412) + QList<U2Region> regions = GTUtilsAnnotationsTreeView::getAnnotatedRegionsOfGroup(os, "fragments (0, 2)"); + CHECK_SET_ERR(regions.size() == 2, QString("Unexpected number of fragments, expected: 2, current: %1").arg(regions.size())); + CHECK_SET_ERR(regions.first() == U2Region(416, 2467), QString("Unexpected fragment region, expected: start = 416, length = 2467; current: start = %1, length = %2").arg(regions.first().startPos).arg(regions.first().length)); + CHECK_SET_ERR(regions.last() == U2Region(2, 410), QString("Unexpected fragment region, expected: start = 2, length = 410; current: start = %1, length = %2").arg(regions.last().startPos).arg(regions.last().length)); +} + +GUI_TEST_CLASS_DEFINITION(test_6235_4) { + //1. Open "_common_data/regression/6235/6235_2.gb" sequence. + GTFileDialog::openFile(os, testDir + "_common_data/regression/6235/6235_2.gb"); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //2. Select "Actions > Analyze > Find restriction sites", check "Esp3I" enzyme in the appeared dialog, click "OK". + GTUtilsDialog::waitForDialog(os, new FindEnzymesDialogFiller(os, QStringList() << "Esp3I")); + GTMenu::clickMainMenuItem(os, QStringList() << "Actions" << "Analyze" << "Find restriction sites...", GTGlobals::UseMouse); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //3. Select "Actions > Cloning > Digest into fragments". Add "Esp3I" to the "Selected enzymes" in the appeared dialog, uncheck "Circular molecule", click "OK". + class Scenario : public CustomScenario { + public: + void run(HI::GUITestOpStatus& os) { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(NULL != dialog, "activeModalWidget is NULL"); + + GTWidget::click(os, GTWidget::findWidget(os, "addAllButton", dialog)); + + GTCheckBox::setChecked(os, "circularBox", false, dialog); + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + }; + + GTUtilsDialog::waitForDialog(os, new DigestSequenceDialogFiller(os, new Scenario)); + GTMenu::clickMainMenuItem(os, QStringList() << "Tools" << "Cloning" << "Digest into fragments..."); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //Expected state: there are two annotations with the following regions were created - U2Region(2, 2467) and U2Region(2473, 412) + QList<U2Region> regions = GTUtilsAnnotationsTreeView::getAnnotatedRegionsOfGroup(os, "fragments (0, 2)"); + CHECK_SET_ERR(regions.size() == 2, QString("Unexpected number of fragments, expected: 2, current: %1").arg(regions.size())); + CHECK_SET_ERR(regions.first() == U2Region(416, 2467), QString("Unexpected fragment region, expected: start = 416, length = 2467; current: start = %1, length = %2").arg(regions.first().startPos).arg(regions.first().length)); + CHECK_SET_ERR(regions.last() == U2Region(0, 412), QString("Unexpected fragment region, expected: start = 0, length = 412; current: start = %1, length = %2").arg(regions.last().startPos).arg(regions.last().length)); +} + +GUI_TEST_CLASS_DEFINITION(test_6236) { + //1. Open WD + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + //2. Compose workflow read sequence -> Remote blase + WorkflowProcessItem *readElement = GTUtilsWorkflowDesigner::addElement(os, "Read Sequence", true); + WorkflowProcessItem *remoteBlast = GTUtilsWorkflowDesigner::addElementByUsingNameFilter(os, "Remote BLAST"); + GTUtilsWorkflowDesigner::connect(os, readElement, remoteBlast); + + //3. Set the input sequence file: "data/samples/Genbank/NC_014267.1.gb". + GTMouseDriver::moveTo(GTUtilsWorkflowDesigner::getItemCenter(os, "Read Sequence")); + GTMouseDriver::click(); + GTGlobals::sleep(300); + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/Genbank/NC_014267.1.gb"); + + GTLogTracer l; + //4. run workflow + GTUtilsWorkflowDesigner::runWorkflow(os); + GTGlobals::sleep(60000); + GTUtilsWorkflowDesigner::stopWorkflow(os); + + //5. Check id of the blast job in log + bool desiredMessage = l.checkMessage("Downloading from https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Get&FORMAT_TYPE=XML&RID"); + CHECK_SET_ERR(desiredMessage, "No expected message in the log"); +} + +GUI_TEST_CLASS_DEFINITION(test_6238) { + QString fastqFile = testDir + "_common_data/regression/6238/eas.fastq"; + QString sandboxFastqFile = sandBoxDir + "eas.fastq"; + QString badFastqFile = testDir + "_common_data/regression/6238/6238.fastq"; + //1. Open "data/samples/FASTQ/eas.fastq". + GTFile::copy(os, fastqFile, sandboxFastqFile); + + GTUtilsProject::openMultiSequenceFileAsSequences(os, sandboxFastqFile); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //2. Open the file in some external text editor. + QFile file(sandboxFastqFile); + QFile badFile(badFastqFile); + file.open(QFile::ReadWrite); + badFile.open(QFile::ReadOnly); + + //3. Replace the file content with the content if the file "_common_data/regression/6238/6238.fastq". + //Expected state : UGENE offers to reload the modified file. + //4. Accept the offering. + //Expected state: the file reloading failed, an error notification appeared, there are error messages in the log. + GTUtilsDialog::waitForDialog(os, new MessageBoxDialogFiller(os, QMessageBox::YesAll)); + GTUtilsDialog::waitForDialog(os, new SequenceReadingModeSelectorDialogFiller(os, SequenceReadingModeSelectorDialogFiller::Separate)); + GTUtilsNotifications::waitForNotification(os, false, "The text file can't be read. Check the file encoding and make sure the file is not corrupted"); + QByteArray badData = badFile.readAll(); + file.write(badData); + file.close(); + badFile.close(); + GTGlobals::sleep(10000); +} + +GUI_TEST_CLASS_DEFINITION(test_6240) { + //1. Open WD. This step allows us to prevent a bad case, when, at the first opening of WD, the dialog "Choose output directory" appears and the filler below is catching it + class Scenario : public CustomScenario { + public: + void run(HI::GUITestOpStatus& os) { + QWidget *wizard = GTWidget::getActiveModalWidget(os); + CHECK_SET_ERR(wizard != NULL, "Wizard isn't found"); + + GTUtilsWizard::setParameter(os, "Input file(s)", dataDir + "samples/Assembly/chrM.sam"); + GTUtilsWizard::clickButton(os, GTUtilsWizard::Run); + } + }; + //2. Open "Tools" -> "NGS data analysis" -> "Reads quality control..." workflow + //3. Choose "samples/Assembly/chrM.sam" as input and click "Run" + GTUtilsDialog::waitForDialogWhichMayRunOrNot(os, new StartupDialogFiller(os)); + GTUtilsDialog::waitForDialog(os, new WizardFiller(os, "Quality Control by FastQC Wizard", new Scenario())); + GTMenu::clickMainMenuItem(os, QStringList() << "Tools" << "NGS data analysis" << "Reads quality control..."); + GTGlobals::sleep(); + + //Expected: The dashboard appears + QWebView* dashboard = GTUtilsDashboard::getDashboard(os); + CHECK_SET_ERR(dashboard != NULL, "Dashboard isn't found"); +} + +GUI_TEST_CLASS_DEFINITION(test_6243) { + //1. Select "File" -> "Access remove database...". + //2 Select "ENSEMBL" database. Use any sample ID as "Resource ID". Accept the dialog. + //Do it twice, for two different ids + QList<QString> ensemblyIds = QList<QString>() << "ENSG00000205571" << "ENSG00000146463"; + foreach(const QString& id, ensemblyIds) { + QList<DownloadRemoteFileDialogFiller::Action> actions; + actions << DownloadRemoteFileDialogFiller::Action(DownloadRemoteFileDialogFiller::SetResourceIds, QStringList() << id); + actions << DownloadRemoteFileDialogFiller::Action(DownloadRemoteFileDialogFiller::SetDatabase, "ENSEMBL"); + actions << DownloadRemoteFileDialogFiller::Action(DownloadRemoteFileDialogFiller::EnterSaveToDirectoryPath, sandBoxDir); + actions << DownloadRemoteFileDialogFiller::Action(DownloadRemoteFileDialogFiller::ClickOk, ""); + + GTUtilsDialog::waitForDialog(os, new DownloadRemoteFileDialogFiller(os, actions)); + GTMenu::clickMainMenuItem(os, QStringList() << "File" << "Access remote database...", GTGlobals::UseMouse); + GTUtilsTaskTreeView::waitTaskFinished(os); + GTGlobals::sleep(); + } + + //Expected state: the sequences are downloaded. The files names contain the sequence ID. + QString first = QString("%1.fa").arg(ensemblyIds.first()); QString second = QString("%1.fa").arg(ensemblyIds.last()); CHECK_SET_ERR(GTUtilsProjectTreeView::checkItem(os, first), QString("The sequence %1 is absent in the project tree view").arg(first)); CHECK_SET_ERR(GTUtilsProjectTreeView::checkItem(os, second), QString("The sequence %1 is absent in the project tree view").arg(second)); } +GUI_TEST_CLASS_DEFINITION(test_6247) { + class Scenario : public CustomScenario { + void run(HI::GUITestOpStatus& os) { + QWidget *dialog = GTWidget::getActiveModalWidget(os); + CHECK_SET_ERR(dialog != NULL, "Dialog isn't found"); + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + }; + //1. Open "_common_data/sanger/alignment.ugenedb". + const QString filePath = sandBoxDir + "alignment.ugenedb"; + GTFile::copy(os, testDir + "_common_data/sanger/alignment.ugenedb", filePath); + GTFileDialog::openFile(os, filePath); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //2. Open "Export consensus" tab, set "../sandbox/Mapped reads_consensus.txt" to the "Export to file" field and click export + QString exportToFile = sandBoxDir + "Aligned reads_consensus.txt"; + GTUtilsOptionPanelMca::setExportFileName(os, exportToFile); + GTUtilsDialog::waitForDialog(os, new DocumentFormatSelectorDialogFiller(os, new Scenario)); + GTUtilsOptionPanelMca::pushExportButton(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //3. Open "alignment.ugenedb" again + GTUtilsProjectTreeView::doubleClickItem(os, "alignment.ugenedb"); + + //4. And again open "Export consensus" tab, and click export + GTUtilsDialog::waitForDialog(os, new DocumentFormatSelectorDialogFiller(os, new Scenario)); + GTUtilsOptionPanelMca::pushExportButton(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //Expected: there are 3 documents in the project tree: "alignment.ugenedb", "Aligned reads_consensus.txt" and "Aligned reads_consensus_1.txt" + QMap<QString, QStringList> docs = GTUtilsProjectTreeView::getDocuments(os); + CHECK_SET_ERR(docs.size() == 3, QString("Unexpected docs number, expected: 3, current: %1").arg(docs.size())); + CHECK_SET_ERR(docs.keys().contains("alignment.ugenedb"), "alignment.ugenedb in unexpectably absent"); + CHECK_SET_ERR(docs.keys().contains("Aligned reads_consensus.txt"), "alignment.ugenedb in unexpectably absent"); + CHECK_SET_ERR(docs.keys().contains("Aligned reads_consensus_1.txt"), "alignment.ugenedb in unexpectably absent"); +} + +GUI_TEST_CLASS_DEFINITION(test_6249_1) { + //1. Open WD + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + //2. Compose workflow read file urls -> Fastqc quality control + GTUtilsWorkflowDesigner::addElement(os, "Read File URL(s)", true); + GTUtilsWorkflowDesigner::addElement(os, "FastQC Quality Control", true); + GTUtilsWorkflowDesigner::connect(os, GTUtilsWorkflowDesigner::getWorker(os, "Read File URL(s)"), + GTUtilsWorkflowDesigner::getWorker(os, "FastQC Quality Control")); + + //3. Set the input sequence files: "data\samples\FASTQ\eas.fastq" and "data\samples\Assembly\chrM.sam" + GTMouseDriver::moveTo(GTUtilsWorkflowDesigner::getItemCenter(os, "Read File URL(s)")); + GTMouseDriver::click(); + GTGlobals::sleep(300); + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/FASTQ/eas.fastq"); + GTGlobals::sleep(300); + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/Assembly/chrM.sam"); + + //4. Run workflow, and check result files on dashboard + GTUtilsWorkflowDesigner::runWorkflow(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + + QStringList outFiles = GTUtilsDashboard::getOutputFiles(os); + + CHECK_SET_ERR(outFiles.contains("eas_fastqc.html"), QString("Output files not contains desired file eas_fastqc.html")); + CHECK_SET_ERR(outFiles.contains("chrM_fastqc.html"), QString("Output files not contains desired file chrM_fastqc.html")); +} + +GUI_TEST_CLASS_DEFINITION(test_6249_2) { + //1. Open WD + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + //2. Compose workflow read file urls -> Fastqc quality control + GTUtilsWorkflowDesigner::addElement(os, "Read File URL(s)", true); + GTUtilsWorkflowDesigner::addElement(os, "FastQC Quality Control", true); + GTUtilsWorkflowDesigner::connect(os, GTUtilsWorkflowDesigner::getWorker(os, "Read File URL(s)"), + GTUtilsWorkflowDesigner::getWorker(os, "FastQC Quality Control")); + + //3. Set the input sequence files: "data\samples\FASTQ\eas.fastq" and "data\samples\FASTQ\eas.fastq" + GTMouseDriver::moveTo(GTUtilsWorkflowDesigner::getItemCenter(os, "Read File URL(s)")); + GTMouseDriver::click(); + GTGlobals::sleep(300); + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/FASTQ/eas.fastq"); + GTGlobals::sleep(300); + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/Assembly/chrM.sam"); + + //4. Set parameter "Output file" to any location + GTMouseDriver::moveTo(GTUtilsWorkflowDesigner::getItemCenter(os, "FastQC Quality Control")); + GTMouseDriver::click(); + GTGlobals::sleep(300); + GTUtilsWorkflowDesigner::setParameter(os, "Output file", QDir(sandBoxDir).absolutePath() + "/test_6249_2_zzzz.html", GTUtilsWorkflowDesigner::textValue); + + //5. Run workflow, and check result files on dashboard + GTUtilsWorkflowDesigner::runWorkflow(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + + QStringList outFiles = GTUtilsDashboard::getOutputFiles(os); + + CHECK_SET_ERR(outFiles.contains("test_6249_2_zzzz.html"), QString("Output files not contains desired file test_6249_2_zzzz.html")); + CHECK_SET_ERR(outFiles.contains("test_6249_2_zzzz_1.html"), QString("Output files not contains desired file test_6249_2_zzzz_1.html")); +} + +GUI_TEST_CLASS_DEFINITION(test_6249_3) { + //1. Open WD + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + //2. Compose workflow read file urls -> Fastqc quality control x2 + GTUtilsWorkflowDesigner::addElement(os, "Read File URL(s)", true); + GTUtilsWorkflowDesigner::addElement(os, "FastQC Quality Control", true); + GTUtilsWorkflowDesigner::addElement(os, "FastQC Quality Control", true); + GTUtilsWorkflowDesigner::connect(os, GTUtilsWorkflowDesigner::getWorker(os, "Read File URL(s)"), + GTUtilsWorkflowDesigner::getWorker(os, "FastQC Quality Control")); + GTUtilsWorkflowDesigner::connect(os, GTUtilsWorkflowDesigner::getWorker(os, "Read File URL(s)"), + GTUtilsWorkflowDesigner::getWorker(os, "FastQC Quality Control 1")); + + //3. Set the input sequence files: "data\samples\FASTQ\eas.fastq" and "data\samples\Assembly\chrM.sam" + GTMouseDriver::moveTo(GTUtilsWorkflowDesigner::getItemCenter(os, "Read File URL(s)")); + GTMouseDriver::click(); + GTGlobals::sleep(300); + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/FASTQ/eas.fastq"); + GTGlobals::sleep(300); + GTUtilsWorkflowDesigner::setDatasetInputFile(os, dataDir + "samples/Assembly/chrM.sam"); + + //4. Run workflow, and check result files on dashboard + GTUtilsWorkflowDesigner::runWorkflow(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + + QStringList outFiles = GTUtilsDashboard::getOutputFiles(os); + + CHECK_SET_ERR(outFiles.contains("eas_fastqc.html"), QString("Output files not contains desired file eas_fastqc.html")); + CHECK_SET_ERR(outFiles.contains("chrM_fastqc.html"), QString("Output files not contains desired file chrM_fastqc.html")); + CHECK_SET_ERR(outFiles.contains("eas_fastqc_1.html"), QString("Output files not contains desired file eas_fastqc_1.html")); + CHECK_SET_ERR(outFiles.contains("chrM_fastqc_1.html"), QString("Output files not contains desired file chrM_fastqc_1.html")); +} + +GUI_TEST_CLASS_DEFINITION(test_6256) { + //1. Open WD + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + QString tempDir = QDir(sandBoxDir + "test_6256").absolutePath(); + + class Custom : public CustomScenario { + void run(HI::GUITestOpStatus &os) { + AppSettingsDialogFiller::openTab(os, AppSettingsDialogFiller::WorkflowDesigner); + QWidget *dialog = QApplication::activeModalWidget(); + QDir().mkpath(tempDir); + GTFile::setReadOnly(os, tempDir); + GTLineEdit::setText(os, GTWidget::findExactWidget<QLineEdit *>(os, "workflowOutputEdit", dialog), tempDir); + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + public: + QString tempDir; + }; + //2. Open application settings and change workflow output directory to nonexistent path + Custom* c = new Custom(); + c->tempDir = tempDir; + GTUtilsDialog::waitForDialog(os, new AppSettingsDialogFiller(os, c)); + GTMenu::clickMainMenuItem(os, QStringList() << "Settings" << "Preferences...", GTGlobals::UseMouse); + //3. Add "Read File URL" element and validate workflow + //Expected state: there are 2 erorrs after validation + GTUtilsWorkflowDesigner::addElement(os, "Read File URL(s)", true); + GTUtilsWorkflowDesigner::validateWorkflow(os); + GTGlobals::sleep(1000); + GTKeyboardDriver::keyClick(Qt::Key_Enter); + GTGlobals::sleep(1000); + GTFile::setReadWrite(os, tempDir); + + CHECK_SET_ERR(GTUtilsWorkflowDesigner::getErrors(os).size() == 2, "Unexpected number of errors"); +} + +GUI_TEST_CLASS_DEFINITION(test_6262) { + //1. Open WD + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + + //2. Add "Filter Annotations by Name", "Filter Annotations by Name" and connect them + WorkflowProcessItem* element1 = GTUtilsWorkflowDesigner::addElement(os, "Filter Annotations by Name"); + WorkflowProcessItem* element2 = GTUtilsWorkflowDesigner::addElement(os, "Filter Annotations by Name"); + + //3. Check Input port. + CHECK_SET_ERR(!GTGroupBox::getChecked(os, "inputPortBox"), "Input Ports table isn't closed"); + GTGroupBox::setChecked(os, "inputPortBox", true); + /* GTUtilsWorkflowDesigner::click(os, "Filter Annotations by Name"); + CHECK_SET_ERR(GTGroupBox::getChecked(os, "inputPortBox"), "Input Ports table isn't opened"); + GTUtilsWorkflowDesigner::click(os, "Filter Annotations by Name 1"); + CHECK_SET_ERR(GTGroupBox::getChecked(os, "inputPortBox"), "Input Ports table isn't opened"); + GTUtilsWorkflowDesigner::click(os, "Filter Annotations by Name"); + CHECK_SET_ERR(GTGroupBox::getChecked(os, "inputPortBox"), "Input Ports table isn't opened"); + + //4. Check Input port. + GTGroupBox::setChecked(os, "inputPortBox", false); + GTUtilsWorkflowDesigner::click(os, "Filter Annotations by Name"); + CHECK_SET_ERR(!GTGroupBox::getChecked(os, "inputPortBox"), "Input Ports table isn't closed"); + GTUtilsWorkflowDesigner::click(os, "Filter Annotations by Name 1"); + CHECK_SET_ERR(!GTGroupBox::getChecked(os, "inputPortBox"), "Input Ports table isn't closed"); + GTUtilsWorkflowDesigner::click(os, "Filter Annotations by Name"); + CHECK_SET_ERR(!GTGroupBox::getChecked(os, "inputPortBox"), "Input Ports table isn't closed"); + + //5. Check Output port. + CHECK_SET_ERR(!GTGroupBox::getChecked(os, "outputPortBox"), "Output Ports table isn't closed"); + GTGroupBox::setChecked(os, "outputPortBox", true); + GTUtilsWorkflowDesigner::click(os, element1); + CHECK_SET_ERR(GTGroupBox::getChecked(os, "outputPortBox"), "Output Ports table isn't opened"); + GTUtilsWorkflowDesigner::click(os, element2); + CHECK_SET_ERR(GTGroupBox::getChecked(os, "outputPortBox"), "Output Ports table isn't opened"); + GTUtilsWorkflowDesigner::click(os, element1); + CHECK_SET_ERR(GTGroupBox::getChecked(os, "outputPortBox"), "Output Ports table isn't opened"); + + //6. Check Output port. + GTGroupBox::setChecked(os, "outputPortBox", false); + GTUtilsWorkflowDesigner::click(os, element1); + CHECK_SET_ERR(!GTGroupBox::getChecked(os, "outputPortBox"), "Output Ports table isn't closed"); + GTUtilsWorkflowDesigner::click(os, element2); + CHECK_SET_ERR(!GTGroupBox::getChecked(os, "outputPortBox"), "Output Ports table isn't closed"); + GTUtilsWorkflowDesigner::click(os, element1); + CHECK_SET_ERR(!GTGroupBox::getChecked(os, "outputPortBox"), "Output Ports table isn't closed"); + */ +} + +GUI_TEST_CLASS_DEFINITION(test_6277) { +// The test checks that the second column of a table with annotations colors on the "Annotations Highlighting" options panel tab in Sequence View is wide enough. +// UGENE behaviour differed if it was build with Qt5.4 and Qt5.7 + +// 1. Open "data/samples/Genbank/murine.gb". + GTFileDialog::openFile(os, dataDir + "samples/Genbank/murine.gb"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 2. Open "Annotations Highlighting" options panel tab. + GTUtilsOptionPanelSequenceView::openTab(os, GTUtilsOptionPanelSequenceView::AnnotationsHighlighting); + +// Expected state: the second column's width is 60 pixels; it took at least 20% of the table width; the first column took all available space. + QTreeWidget *table = GTWidget::findExactWidget<QTreeWidget *>(os, "OP_ANNOT_HIGHLIGHT_TREE"); + CHECK_SET_ERR(nullptr != table, "OP_ANNOT_HIGHLIGHT_TREE widget is NULL"); + + QScrollBar *scrollBar = table->verticalScrollBar(); + const int scrollBarWidth = nullptr == scrollBar ? 0 : (scrollBar->isVisible() ? scrollBar->width() : 0); + + // These numbers are defined in the widget stylesheet in AnnotHighlightTree.cpp + const int MARGIN_LEFT = 5; + const int MARGIN_RIGHT = 10; + const int BORDER_WIDTH = 1; + const int MAGIC_NUMBER = scrollBarWidth + MARGIN_LEFT + MARGIN_RIGHT + 2 * BORDER_WIDTH; + + const int COLOR_COLUMN_NUMBER = 1; + int colorColumnWidth = table->columnWidth(COLOR_COLUMN_NUMBER); + int totalTableWidth = table->width(); + + const int EXPECTED_COLOR_COLUMN_WIDTH = 60; + CHECK_SET_ERR(EXPECTED_COLOR_COLUMN_WIDTH == colorColumnWidth, + QString("Color column width is incorrect: expected %1, got %2") + .arg(EXPECTED_COLOR_COLUMN_WIDTH).arg(colorColumnWidth)); + + CHECK_SET_ERR(static_cast<double>(colorColumnWidth) / totalTableWidth >= 0.2, + QString("Color column is too narrow: it's width is %1, the table width is %2") + .arg(colorColumnWidth).arg(totalTableWidth)); + + const int ANNOTATION_NAME_COLUMN_NUMBER = 0; + int annotationNameColumnWidth = table->columnWidth(ANNOTATION_NAME_COLUMN_NUMBER); + CHECK_SET_ERR(annotationNameColumnWidth == totalTableWidth - colorColumnWidth - MAGIC_NUMBER, + QString("Annotation name column isn't stretched: it's width is %1, width of the color column is %2, " + "the table width is %3") + .arg(annotationNameColumnWidth).arg(colorColumnWidth).arg(totalTableWidth)); + +// 3. Drag and drop the options panel tab's left border to enlarge it. + GTUtilsOptionsPanel::resizeToMaximum(os); + +// Expected state: the second column's width is 60 pixels; the first column took all available space. + colorColumnWidth = table->columnWidth(COLOR_COLUMN_NUMBER); + totalTableWidth = table->width(); + annotationNameColumnWidth = table->columnWidth(ANNOTATION_NAME_COLUMN_NUMBER); + + CHECK_SET_ERR(EXPECTED_COLOR_COLUMN_WIDTH == colorColumnWidth, + QString("Color column width is incorrect after resizing: expected %1, got %2") + .arg(EXPECTED_COLOR_COLUMN_WIDTH).arg(colorColumnWidth)); + + CHECK_SET_ERR(annotationNameColumnWidth == totalTableWidth - colorColumnWidth - MAGIC_NUMBER, + QString("Annotation name column isn't stretched after resizing: it's width is %1, width of the color column is %2, " + "the table width is %3") + .arg(annotationNameColumnWidth).arg(colorColumnWidth).arg(totalTableWidth)); +} + +GUI_TEST_CLASS_DEFINITION(test_6279) { + class Custom : public CustomScenario { + public: + virtual void run(HI::GUITestOpStatus &os) { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(dialog != NULL, "dialog not found"); + + QLineEdit *lineEdit = dialog->findChild<QLineEdit*>("leAnnotationName"); + CHECK_SET_ERR(lineEdit != NULL, "line edit leAnnotationName not found"); + + QRadioButton* gbFormatLocation = dialog->findChild<QRadioButton*>("rbGenbankFormat"); + CHECK_SET_ERR(gbFormatLocation != NULL, "radio button rbGenbankFormat not found"); + + QLineEdit *lineEdit1 = dialog->findChild<QLineEdit*>("leLocation"); + CHECK_SET_ERR(lineEdit1 != NULL, "line edit leLocation not found"); + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + }; + //1. Open murine.gb + GTFileDialog::openFile(os, dataDir + "samples/Genbank/murine.gb"); + GTUtilsTaskTreeView::waitTaskFinished(os); + //2. Click CDS annotation on pan view + GTUtilsSequenceView::clickAnnotationPan(os, "CDS", 2970, 0, true); + //3. Press F2 to open Edit annotation dialog + GTUtilsDialog::waitForDialog(os, new EditAnnotationFiller(os, new Custom())); + GTKeyboardDriver::keyClick(Qt::Key_F2); + GTGlobals::sleep(1000); +} + +GUI_TEST_CLASS_DEFINITION(test_6283) { + class Custom : public CustomScenario { + void run(HI::GUITestOpStatus &os){ + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(dialog != NULL, "AppSettingsDialogFiller isn't found"); + + AppSettingsDialogFiller::openTab(os, AppSettingsDialogFiller::ExternalTools); + + //2. Open a python tab + AppSettingsDialogFiller::isExternalToolValid(os, "python"); + + //Expected:: Bio module is valid + bool isToolValid = true; +#ifndef Q_OS_WIN + isToolValid = AppSettingsDialogFiller::isExternalToolValid(os, "Bio"); +#endif + if (!isToolValid) { + os.setError("Bio is not valid"); + } + + //Expected: Bio module version is 1.73 + bool hasVerion = true; +#ifndef Q_OS_WIN + hasVerion = AppSettingsDialogFiller::isToolDescriptionContainsString(os, "Bio", "Version: 1.73"); +#endif + if (!hasVerion) { + os.setError("Incorrect Bio version"); + } + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + }; + + //1. Open "UGENE Application Settings", select "External Tools" tab. + GTUtilsDialog::waitForDialog(os, new AppSettingsDialogFiller(os, new Custom())); + GTMenu::clickMainMenuItem(os, QStringList() << "Settings" << "Preferences...", GTGlobals::UseMouse); + + CHECK_SET_ERR(!os.hasError(), os.getError()); + +} + +GUI_TEST_CLASS_DEFINITION(test_6291) { + //1. Open murine.gb + GTFileDialog::openFile(os, dataDir + "samples/Genbank/murine.gb"); + GTUtilsTaskTreeView::waitTaskFinished(os); + //2. Click CDS annotation on pan view + //GTUtilsSequenceView::clickAnnotationPan(os, "CDS", 2970, 0, true); + //3. Select qualifier + QString qValue = GTUtilsAnnotationsTreeView::getQualifierValue(os, "product", GTUtilsAnnotationsTreeView::findItem(os, "CDS")); + //QTreeWidgetItem *item = GTUtilsAnnotationsTreeView::findItem(os, "db_xref"); + GTUtilsAnnotationsTreeView::clickItem(os, "product", 1, false); + //4. Click active action "Copy qualifier..." in menu actions + GTMenu::clickMainMenuItem(os, QStringList() << "Actions" << "Copy/Paste" << "Copy qualifier 'product' value", GTGlobals::UseMouse); + QString actualValue = GTClipboard::text(os); + CHECK_SET_ERR(actualValue == qValue, QString("Qualifier text %1 differs with expected %2.").arg(actualValue).arg(qValue)); +} + +GUI_TEST_CLASS_DEFINITION(test_6301) { + class Custom : public CustomScenario { + void run(HI::GUITestOpStatus &os){ + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(dialog != NULL, "AppSettingsDialogFiller isn't found"); + + AppSettingsDialogFiller::openTab(os, AppSettingsDialogFiller::ExternalTools); + + //Expected: SPAdes description contains the following string - "Version: 3.13.0" + const bool hasVersion = AppSettingsDialogFiller::isToolDescriptionContainsString(os, "SPAdes", "Version: 3.13.0"); + if (!hasVersion) { + os.setError("Unexpected SPAdes version"); + } + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + }; + + //1. Open "UGENE Application Settings", select "External Tools" tab. + GTUtilsDialog::waitForDialog(os, new AppSettingsDialogFiller(os, new Custom())); + GTMenu::clickMainMenuItem(os, QStringList() << "Settings" << "Preferences...", GTGlobals::UseMouse); + + CHECK_SET_ERR(!os.hasError(), os.getError()); + +} + +GUI_TEST_CLASS_DEFINITION(test_6309) { + + class SetToolUrlScenario : public CustomScenario { + public: + SetToolUrlScenario() : CustomScenario() {} + + void run(HI::GUITestOpStatus &os) { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(dialog, "activeModalWidget is NULL"); + QDialogButtonBox* box = qobject_cast<QDialogButtonBox*>(GTWidget::findWidget(os, "buttonBox", dialog)); + CHECK_SET_ERR(box != NULL, "buttonBox is NULL"); + QPushButton* pushButton = box->button(QDialogButtonBox::Ok); + CHECK_SET_ERR(pushButton != NULL, "pushButton is NULL"); + + AppSettingsDialogFiller::openTab(os, AppSettingsDialogFiller::ExternalTools); + QString tabixPath = AppSettingsDialogFiller::getExternalToolPath(os, "Tabix"); + QDir tabixDir(tabixPath); + tabixDir.cdUp(); + tabixDir.cdUp(); + QString extToolsPath = tabixDir.absolutePath(); + AppSettingsDialogFiller::setExternalToolsDir(os, extToolsPath); + + CHECK_SET_ERR(pushButton->isEnabled() == false , "pushButton is enabled"); + GTUtilsTaskTreeView::waitTaskFinished(os); + CHECK_SET_ERR(pushButton->isEnabled() == true, "pushButton is disabled"); + GTWidget::click(os, pushButton); + } + }; + //1. Open UGENE + //2. Open menu Settings->Preferences select page 'External tools' + //3. Press top '...' button and select folder with external tools + //Expected state: Ok button and left Tree element with preferences pages are disabled while external tools validating + + GTUtilsDialog::waitForDialog(os, new AppSettingsDialogFiller(os, new SetToolUrlScenario())); + GTMenu::clickMainMenuItem(os, QStringList() << "Settings" << "Preferences..."); +} + +GUI_TEST_CLASS_DEFINITION(test_6314) { + //1. Copy "_common_data/clustal/align.aln" to sandbox and open it + const QString filePath = sandBoxDir + "test_6043.aln"; + GTFile::copy(os, testDir + "_common_data/clustal/align.aln", filePath); + + GTFileDialog::openFile(os, filePath); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //2. Rename the first sequence with some very long name (more than 150 chars) + QString veryLongName; + for (int i = 0; i < 200; i++) { + veryLongName += "Q"; + } + GTUtilsMSAEditorSequenceArea::renameSequence(os, "IXI_234", veryLongName); + + //3. Save sequence and close the project + GTUtilsDialog::waitForDialog(os, new SaveProjectDialogFiller(os, QDialogButtonBox::No)); + GTMenu::clickMainMenuItem(os, QStringList() << "File" << "Save all", GTGlobals::UseMouse); + GTUtilsTaskTreeView::waitTaskFinished(os); + GTUtilsProject::closeProject(os); + + //4. Open the file again + GTFileDialog::openFile(os, filePath); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //Expected: the length of the first sequence name is 150 chars + QString name = GTUtilsMSAEditorSequenceArea::getVisibleNames(os).first(); + + CHECK_SET_ERR(name.size() == 150, + QString("Unexpected sequence name length, expected: 150, current: %1") + .arg(name.size())); +} + +GUI_TEST_CLASS_DEFINITION(test_6334) { + //1. Open WD + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + + //2. Add "Read FASTQ Files with PE Reads", "Classify Sequences with MetaPhlAn2" and connect them + WorkflowProcessItem* readElement = GTUtilsWorkflowDesigner::addElement(os, "Read FASTQ Files with PE Reads"); + WorkflowProcessItem* metaphlan2Element = GTUtilsWorkflowDesigner::addElement(os, "Classify Sequences with MetaPhlAn2"); + GTUtilsWorkflowDesigner::connect(os, readElement, metaphlan2Element); + + //3. Set "Classify" parameters: Inpet data = PE reads + GTUtilsWorkflowDesigner::click(os, metaphlan2Element); + GTUtilsWorkflowDesigner::setParameter(os, "Input data", "PE reads", GTUtilsWorkflowDesigner::comboValue); + + //4. Set the "Input URL 2" slot to "empty" + QTableWidget* table = GTUtilsWorkflowDesigner::getInputPortsTable(os, 0); + CHECK_SET_ERR(table != nullptr, "Input Ports table isn't found"); + + GTUtilsWorkflowDesigner::setTableValue(os, "Input URL 2", "<empty>", GTUtilsWorkflowDesigner::comboValue, table); + + //5. Click validateThe mandatory "Input URL 2" slot is not connected. + GTUtilsWorkflowDesigner::click(os, metaphlan2Element); + GTUtilsWorkflowDesigner::validateWorkflow(os); + GTGlobals::sleep(); + GTKeyboardDriver::keyClick(Qt::Key_Enter); + + //Expected: there is the following validation error appeared: + //Classify Sequences with MetaPhlAn2: The mandatory "Input URL 2" slot is not connected."), "Expected error isn't found + QStringList errors = GTUtilsWorkflowDesigner::getErrors(os); + CHECK_SET_ERR(errors.contains("Classify Sequences with MetaPhlAn2: The mandatory \"Input URL 2\" slot is not connected."), "Expected error isn't found"); +} + +GUI_TEST_CLASS_DEFINITION(test_6350) { + //1. Open "human_T1.fa" + GTFileDialog::openFile(os, dataDir + "samples/FASTA/human_T1.fa"); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //2. Mark the sequence as circular + GTUtilsProjectTreeView::markSequenceAsCircular(os, "human_T1 (UCSC April 2002 chr7:115977709-117855134)"); + + //3. Select a joined region, which contains a part in the end and a part in the beginning + GTUtilsSequenceView::selectSeveralRegionsByDialog(os, "150000..199950,1..50000"); + + //4. Export selected region as sequence + GTUtilsDialog::waitForDialog(os, new ExportSelectedRegionFiller(os, sandBoxDir + "human_T1_reg.fa", QString())); + GTMenu::clickMainMenuItem(os, QStringList() << "Actions" << "Export" << "Export selected sequence region...", GTGlobals::UseMouse); + GTUtilsTaskTreeView::waitTaskFinished(os); + + //Expected: there is the only sequence in the exported file + QStringList list = GTUtilsProjectTreeView::getDocuments(os).value("human_T1_reg.fa"); + CHECK_SET_ERR(list.size() == 1, + QString("Unexpected sequence number, expected: 1, current: %1") + .arg(list.size())); + CHECK_SET_ERR(list.first() == "[s] region [150000 199950]", + QString("Unexpected sequence name, expected: [s] region [150000 199950], current %1") + .arg(list.first())); +} + +GUI_TEST_CLASS_DEFINITION(test_6378) { + //1. Remove Python from external tools + class Custom : public CustomScenario { + void run(HI::GUITestOpStatus &os){ + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(dialog != NULL, "AppSettingsDialogFiller isn't found"); + AppSettingsDialogFiller::openTab(os, AppSettingsDialogFiller::ExternalTools); + AppSettingsDialogFiller::clearToolPath(os, "python"); + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Ok); + } + }; + + //1. Open "UGENE Application Settings", select "External Tools" tab. + GTUtilsDialog::waitForDialog(os, new AppSettingsDialogFiller(os, new Custom())); + GTMenu::clickMainMenuItem(os, QStringList() << "Settings" << "Preferences...", GTGlobals::UseMouse); + + //2. Open WD + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + + //3. Place Metaphlan worker on scene + GTUtilsWorkflowDesigner::addElement(os, "Classify Sequences with MetaPhlAn2"); + + //4. Validate scheme + GTUtilsWorkflowDesigner::validateWorkflow(os); + GTGlobals::sleep(); + GTKeyboardDriver::keyClick(Qt::Key_Enter); + GTGlobals::sleep(); + //Expected state: validation contains message: Classify Sequences with MetaPhlAn2: External tool "Bio" is not set + GTUtilsWorkflowDesigner::checkErrorList(os, "Classify Sequences with MetaPhlAn2: External tool \"Bio\" is not set"); +} + +GUI_TEST_CLASS_DEFINITION(test_6397) { + //1. Open WD + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + + //2. Place repeat worker + GTUtilsWorkflowDesigner::addElement(os, "Find Repeats"); + + //Expected state: default value for "Apply 'Max distance' attribute" is True + GTUtilsWorkflowDesigner::click(os, GTUtilsWorkflowDesigner::getWorker(os, "Find Repeats")); + QString defaultAttr = GTUtilsWorkflowDesigner::getParameter(os, "Apply 'Max distance' attribute"); + CHECK_SET_ERR(defaultAttr == "True","Attribute value isn't 'True'"); + + //3. Set "Max distance" parameter to 0 + GTUtilsWorkflowDesigner::setParameter(os, "Max distance", "0", GTUtilsWorkflowDesigner::spinValue, GTGlobals::UseKey); + GTUtilsWorkflowDesigner::click(os, GTUtilsWorkflowDesigner::getWorker(os, "Find Repeats")); + GTGlobals::sleep(); + GTUtilsWorkflowDesigner::clickParameter(os, "Max distance"); + + QList<QWidget*> list; + foreach(QWidget *w, GTMainWindow::getMainWindowsAsWidget(os)) { + list.append(w); + } + + QSpinBox *qsb = nullptr; + foreach (QWidget *w, list) { + foreach (QObject *o, w->findChildren<QObject*>()) { + qsb = qobject_cast<QSpinBox*>(o); + if (qsb != nullptr) { + break; + } + } + if (qsb != nullptr) { + break; + } + } + + //Expected state: it set successfully, ensure that 0 is minimum value + QString maxDistance = GTUtilsWorkflowDesigner::getParameter(os, "Max distance", true); + CHECK_SET_ERR(maxDistance == "0 bp", "Attribute value isn't 0 bp"); + CHECK_SET_ERR(qsb->minimum() == 0, "Minimum value isn't 0"); + + //4. Open human_t1.fa + GTFileDialog::openFile(os, dataDir + "samples/FASTA/human_T1.fa"); + GTUtilsTaskTreeView::waitTaskFinished(os); + + class Custom : public CustomScenario { + void run(HI::GUITestOpStatus &os){ + GTGlobals::sleep(1000); + QWidget* dialog = QApplication::activeModalWidget(); + + QSpinBox *maxDistanceBox = qobject_cast<QSpinBox *>(GTWidget::findWidget(os, "maxDistBox", dialog)); + GTSpinBox::checkLimits(os, maxDistanceBox, 0, 1000000); + + GTUtilsDialog::clickButtonBox(os, dialog, QDialogButtonBox::Cancel); + } + }; + + //5. Open repeat finder dialog + //Expected state: minimum value for max distance combobox is 0 + GTUtilsDialog::waitForDialog(os, new FindRepeatsDialogFiller(os, new Custom())); + GTMenu::clickMainMenuItem(os, QStringList() << "Actions" << "Analyze" << "Find repeats...", GTGlobals::UseMouse); + GTGlobals::sleep(); +} + +GUI_TEST_CLASS_DEFINITION(test_6398) { + //1. Open "_common_data/regression/6398/6398.gtf" file + //Expected: 5 similarity points of the 'GTF" format + GTUtilsDialog::waitForDialog(os, new DocumentFormatSelectorDialogFiller(os, "GTF", 5, 1)); + GTFileDialog::openFile(os, testDir + "_common_data/regression/6398/6398.gtf"); + GTUtilsTaskTreeView::waitTaskFinished(os); +} + +GUI_TEST_CLASS_DEFINITION(test_6459) { + //1. Open "data/samples/Genbank/human_T1.fa". + //2. Open "Search in Sequence" options panel tab. + //3. Set "Substitute" algorithm.Check "Search with ambiguous bases" checkbox. + //4. Ensure that the search is performed on both strands(it is the default value). + //5. Enter the following pattern : "YYYGYY". + //Expected result: 2738 results are found. + + GTFileDialog::openFile(os, dataDir + "samples/FASTA", "human_T1.fa"); + GTUtilsTaskTreeView::waitTaskFinished(os); + SchedulerListener listener; + GTUtilsOptionPanelSequenceView::openTab(os, GTUtilsOptionPanelSequenceView::Search); + GTUtilsOptionPanelSequenceView::setAlgorithm(os, "Substitute"); + GTUtilsOptionPanelSequenceView::setSearchWithAmbiguousBases(os); + GTUtilsOptionPanelSequenceView::enterPattern(os, "YYYGYY"); + + GTUtilsTaskTreeView::waitTaskFinished(os); + CHECK_SET_ERR(GTUtilsOptionPanelSequenceView::checkResultsText(os, "Results: 1/2738"), "Results string not match"); +} + +GUI_TEST_CLASS_DEFINITION(test_6475_1) { +// 1. Open the Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + +// 2. Click on "Add element with external tool" button on the toolbar. +// 3. Select "_common_data/scenarios/_regression/6475/test_6475_1.etc" file. +// Expected state: there is "test_6475_1" element on the scene. + GTUtilsWorkflowDesigner::importCmdlineBasedElement(os, testDir + "_common_data/scenarios/_regression/6475/test_6475_1.etc"); + +// 4. Run the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + +// Expected state: the workflow finishes soon. + GTUtilsTaskTreeView::waitTaskFinished(os, 30000); +} + +GUI_TEST_CLASS_DEFINITION(test_6475_2) { +// 1. Open the Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + +// 2. Click on "Add element with external tool" button on the toolbar. +// 3. Select "_common_data/scenarios/_regression/6475/test_6475_2.etc" file. + GTUtilsWorkflowDesigner::importCmdlineBasedElement(os, testDir + "_common_data/scenarios/_regression/6475/test_6475_2.etc"); + +// 4. Open "_common_data/scenarios/_regression/6475/test_6475_2.uwl". + GTFileDialog::openFile(os, testDir + "_common_data/scenarios/_regression/6475/test_6475_2.uwl"); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// 5. Click on "Read File URL(s)" element. + GTUtilsWorkflowDesigner::click(os, "Read File URL(s)"); + +// 6. Add "_common_data/fasta/fa2.fa" and "_common_data/fasta/fa3.fa" to "Dataset 1". + GTUtilsWorkflowDesigner::setDatasetInputFiles(os, QStringList({testDir + "_common_data/fasta/fa2.fa", testDir + "_common_data/fasta/fa3.fa"})); + +// 4. Run the workflow. + GTLogTracer logTracer; + + GTUtilsWorkflowDesigner::runWorkflow(os); + +// Expected state: the workflow finishes soon without errors. + GTUtilsTaskTreeView::waitTaskFinished(os, 30000); + GTUtilsLog::check(os, logTracer); +} + +GUI_TEST_CLASS_DEFINITION(test_6481_1) { +// Test to check that element with external tool will add to dashboard an URL to file that is set as parameter with type "Output file URL" and it will be opened by UGENE by default. + +// 1. Open the Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + +// 2. Click on the "Create element with external tool" button on the toolbar. +// 3. Fill the wizard with the following values (not mentioned values can be set with any value): +// Parameters page: a parameter with a type "Output file URL". +// 4. Accept the wizard. + CreateElementWithCommandLineToolFiller::ElementWithCommandLineSettings settings; + settings.elementName = "test_6481_1"; + settings.tooltype = CreateElementWithCommandLineToolFiller::CommandLineToolType::IntegratedExternalTool; + settings.parameters << CreateElementWithCommandLineToolFiller::ParameterData("output_file_url", qMakePair(CreateElementWithCommandLineToolFiller::OutputFileUrl, QString())); + settings.command = "%USUPP_JAVA% -help $output_file_url"; + GTUtilsDialog::waitForDialog(os, new CreateElementWithCommandLineToolFiller(os, settings)); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Create element with external tool"); + GTGlobals::sleep(); + +// 5. Create a valid workflow with the new element. + GTUtilsWorkflowDesigner::click(os, "test_6481_1"); + GTUtilsWorkflowDesigner::setParameter(os, "output_file_url", QFileInfo(testDir + "_common_data/fasta/human_T1_cutted.fa").absoluteFilePath(), GTUtilsWorkflowDesigner::textValue); + +// 6. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// Expected state: the workflow execution finishes, there is an output file on the dashboard. + const QStringList outputFiles = GTUtilsDashboard::getOutputFiles(os); + CHECK_SET_ERR(!outputFiles.isEmpty(), "There are no output files on the dashboard"); + const int expectedCount = 1; + CHECK_SET_ERR(expectedCount == outputFiles.size(), QString("There are too many output files on the dashboard: expected %1, got %2").arg(expectedCount).arg(outputFiles.size())); + const QString expectedName = "human_T1_cutted.fa"; + CHECK_SET_ERR(expectedName == outputFiles.first(), QString("An unexpected output file name: expected '%1', got '%2'").arg(expectedName).arg(outputFiles.first())); + +// 7. Open a menu on the output item on the dashboard. +// Expected state: there are two options in the menu: "Open containing folder" and "Open by operating system". + // It is not trivial to get the menu items. It is not implemented yet. + +// 8. Click on the file on the dashboard. + GTUtilsDashboard::clickOutputFile(os, outputFiles.first()); + +// Expected state: UGENE tries to open the file. + GTUtilsTaskTreeView::waitTaskFinished(os); + + GTUtilsDocument::checkDocument(os, "human_T1_cutted.fa", "AnnotatedDNAView"); +} + +GUI_TEST_CLASS_DEFINITION(test_6481_2) { +// Test to check that element with external tool will add to dashboard an URL to folder that is set as parameter with type "Output folder URL" and it doesn't have an option to be opened by UGENE. + +// 1. Open the Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + +// 2. Click on the "Create element with external tool" button on the toolbar. +// 3. Fill the wizard with the following values (not mentioned values can be set with any value): +// Parameters page: a parameter with a type "Output folder URL". +// 4. Accept the wizard. + CreateElementWithCommandLineToolFiller::ElementWithCommandLineSettings settings; + settings.elementName = "test_6481_2"; + settings.tooltype = CreateElementWithCommandLineToolFiller::CommandLineToolType::IntegratedExternalTool; + settings.parameters << CreateElementWithCommandLineToolFiller::ParameterData("output_folder_url", qMakePair(CreateElementWithCommandLineToolFiller::OutputFolderUrl, QString())); + settings.command = "%USUPP_JAVA% -help $output_folder_url"; + GTUtilsDialog::waitForDialog(os, new CreateElementWithCommandLineToolFiller(os, settings)); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Create element with external tool"); + GTGlobals::sleep(); + +// 5. Create a valid workflow with the new element. + GTUtilsWorkflowDesigner::click(os, "test_6481_2"); + GTUtilsWorkflowDesigner::setParameter(os, "output_folder_url", QFileInfo(sandBoxDir).absoluteFilePath(), GTUtilsWorkflowDesigner::textValue); + +// 6. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// Expected state: the workflow execution finishes, there is an output folder on the dashboard. + const QStringList outputFiles = GTUtilsDashboard::getOutputFiles(os); + CHECK_SET_ERR(!outputFiles.isEmpty(), "There are no output files on the dashboard"); + const int expectedCount = 1; + CHECK_SET_ERR(expectedCount == outputFiles.size(), QString("There are too many output files on the dashboard: expected %1, got %2").arg(expectedCount).arg(outputFiles.size())); + const QString expectedName = "sandbox"; + CHECK_SET_ERR(expectedName == outputFiles.first(), QString("An unexpected output file name: expected '%1', got '%2'").arg(expectedName).arg(outputFiles.first())); + +// 7. Open a menu on the output item on the dashboard. +// Expected state: there is the only option "Open containing folder" in the menu. + // It is not trivial to get the menu items. It is not implemented yet. + +// 8. Click on the output item. +// Expected state: a system file manager opens the folder. + // It is impossible to check that the file manager is opened on the item clicking. +} + +GUI_TEST_CLASS_DEFINITION(test_6481_3) { +// Test to check that it is possible to forbid to open by UGENE an URL to file that is added to a dashboard by element with external tool. + +// 1. Open the Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + +// 2. Click on the "Add element with external tool" button on the toolbar. +// 3. Select "_common_data/scenarios/_regression/6481/test_6481_3.etc". Accept the dialog. + GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, testDir + "_common_data/scenarios/_regression/6481/test_6481_3.etc")); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Add element with external tool"); + GTGlobals::sleep(); + +// 4. Create a valid workflow with the new element. + GTUtilsWorkflowDesigner::click(os, "test_6481_3"); + GTUtilsWorkflowDesigner::setParameter(os, "output_file_url", QFileInfo(testDir + "_common_data/fasta/human_T1_cutted.fa").absoluteFilePath(), GTUtilsWorkflowDesigner::textValue); + +// 5. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// Expected state: the workflow execution finishes, there is an output file on the dashboard. + const QStringList outputFiles = GTUtilsDashboard::getOutputFiles(os); + CHECK_SET_ERR(!outputFiles.isEmpty(), "There are no output files on the dashboard"); + const int expectedCount = 1; + CHECK_SET_ERR(expectedCount == outputFiles.size(), QString("There are too many output files on the dashboard: expected %1, got %2").arg(expectedCount).arg(outputFiles.size())); + const QString expectedName = "human_T1_cutted.fa"; + CHECK_SET_ERR(expectedName == outputFiles.first(), QString("An unexpected output file name: expected '%1', got '%2'").arg(expectedName).arg(outputFiles.first())); + +// 7. Open a menu on the output item on the dashboard. +// Expected state: there is the only option in the menu: "Open containing folder". + // It is not trivial to get the menu items. It is not implemented yet. + +// 8. Click on the output item. +// Expected state: the file is opened with some other application. + // It is impossible to check that some other application is opened on the item clicking. +} + +GUI_TEST_CLASS_DEFINITION(test_6481_4) { + // Test to check that it is possible to forbid to add to dashboard URLs to file that is set in parameters with types "Output file URL" or "Output folder URL" in element with external tool. + + // 1. Open the Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + + // 2. Click on the "Add element with external tool" button on the toolbar. + // 3. Select "_common_data/scenarios/_regression/6481/test_6481_4.etc". Accept the dialog. + GTUtilsDialog::waitForDialog(os, new GTFileDialogUtils(os, testDir + "_common_data/scenarios/_regression/6481/test_6481_4.etc")); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Add element with external tool"); + GTGlobals::sleep(); + + // 4. Create a valid workflow with the new element. + GTUtilsWorkflowDesigner::click(os, "test_6481_4"); + GTUtilsWorkflowDesigner::setParameter(os, "output_file_url", QFileInfo(testDir + "_common_data/fasta/human_T1_cutted.fa").absoluteFilePath(), GTUtilsWorkflowDesigner::textValue); + GTUtilsWorkflowDesigner::setParameter(os, "output_folder_url", QDir(sandBoxDir).absolutePath(), GTUtilsWorkflowDesigner::textValue); + + // 5. Launch the workflow. + GTUtilsWorkflowDesigner::runWorkflow(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + + // Expected state: the workflow execution finishes, there are no entries in the output widget on the dashboard. + const QStringList outputFiles = GTUtilsDashboard::getOutputFiles(os); + const int expectedCount = 0; + CHECK_SET_ERR(expectedCount == outputFiles.size(), QString("There are too many output files on the dashboard: expected %1, got %2").arg(expectedCount).arg(outputFiles.size())); +} + +GUI_TEST_CLASS_DEFINITION(test_6474_1) { + //1. Open "_common_data/scenarios/_regression/6474/6474.aln" + GTFileDialog::openFile(os, testDir + "_common_data/scenarios/_regression/6474/6474.aln"); + + //2. Open the highlighting tab + GTUtilsOptionPanelMsa::openTab(os, GTUtilsOptionPanelMsa::Highlighting); + + //3. Select the "Percentage identity (colored)" color scheme + QString cs = GTUtilsOptionPanelMsa::getColorScheme(os); + GTUtilsOptionPanelMsa::setColorScheme(os, "Percentage identity (colored) ", GTGlobals::UseMouse); + + QStringList backgroundColors = { "#ffff00", "#00ffff", "#00ffff", "#00ff00", "#00ff00", "#ffffff", "#ffffff", "#ffffff", "#ffffff" }; + QStringList fontColors = { "#ff0000", "#0000ff", "#0000ff", "#000000", "#000000", "#000000", "#000000", "#000000", "#000000" }; + + //Expected colors: + //background - #ffff00, #00ffff, #00ffff, #00ff00, #00ff00, #ffffff, #ffffff, #ffffff, #ffffff + //font - #ff0000, #0000ff, #0000ff, #000000, #000000, #000000, #000000, #000000, #000000 + //Zoom to max before GTUtilsMSAEditorSequenceArea::getFontColor + GTUtilsMSAEditorSequenceArea::zoomToMax(os); + for (int i = 0; i < 9; i++) { + QPoint p(i, 0); + QString backgroundColor = GTUtilsMSAEditorSequenceArea::getColor(os, p); + QString fontColor = GTUtilsMSAEditorSequenceArea::getFontColor(os, p); + coreLog.info(QString("Background color on the %1th column of the 1th row: %2").arg(i + 1).arg(backgroundColor)); + coreLog.info(QString("Font color on the %1th column of the 1th row: %2").arg(i + 1).arg(fontColor)); + QString expectedBackgroundColor = backgroundColors[i]; + QString expectedFontColor = fontColors[i]; + CHECK_SET_ERR(backgroundColor == expectedBackgroundColor, QString("Unexpected background color on the %1th column of the 1th row, expected: %2, current: %3").arg(i + 1).arg(expectedBackgroundColor).arg(backgroundColor)); + CHECK_SET_ERR(fontColor == expectedFontColor, QString("Unexpected font color on the %1th column of the 1th row, expected: %2, current: %3").arg(i + 1).arg(expectedFontColor).arg(fontColor)); + } +} + +GUI_TEST_CLASS_DEFINITION(test_6474_2) { + //1. Open "_common_data/scenarios/_regression/6474/6474.aln" + GTFileDialog::openFile(os, testDir + "_common_data/scenarios/_regression/6474/6474.aln"); + + //2. Open the highlighting tab + GTUtilsOptionPanelMsa::openTab(os, GTUtilsOptionPanelMsa::Highlighting); + + //3. Select the "Percentage identity (colored)" color scheme + QString cs = GTUtilsOptionPanelMsa::getColorScheme(os); + GTUtilsOptionPanelMsa::setColorScheme(os, "Percentage identity (colored) ", GTGlobals::UseMouse); + + //Zoom to max before GTUtilsMSAEditorSequenceArea::getFontColor + GTUtilsMSAEditorSequenceArea::zoomToMax(os); + QStringList backgroundColors = { "#00ffff", "#ffffff" }; + QStringList fontColors = { "#0000ff", "#000000" }; + QList<int> columns = { 1, 2, 5, 6 }; + //Expected colors: + //background - 2, 3 column: #00ffff; 6, 7 column: #ffffff + //font - 2, 3 column: #0000ff; 6, 7 column: #000000 + foreach(const int i, columns) { + QPoint p(i, 0); + QString backgroundColor = GTUtilsMSAEditorSequenceArea::getColor(os, p); + QString fontColor = GTUtilsMSAEditorSequenceArea::getFontColor(os, p); + coreLog.info(QString("Background color on the %1th column of the 1th row: %2").arg(i + 1).arg(backgroundColor)); + coreLog.info(QString("Font color on the %1th column of the 1th row: %2").arg(i + 1).arg(fontColor)); + int num = 1; + if (i == 1 || i == 2) { + num = 0; + } + QString expectedBackgroundColor = backgroundColors[num]; + QString expectedFontColor = fontColors[num]; + CHECK_SET_ERR(backgroundColor == expectedBackgroundColor, QString("Unexpected background color on the %1th column of the 1th row, expected: %2, current: %3").arg(i + 1).arg(expectedBackgroundColor).arg(backgroundColor)); + CHECK_SET_ERR(fontColor == expectedFontColor, QString("Unexpected font color on the %1th column of the 1th row, expected: %2, current: %3").arg(i + 1).arg(expectedFontColor).arg(fontColor)); + } + + //4. Set Threshold to 900 + QSlider* colorThresholdSlider = qobject_cast<QSlider*>(GTWidget::findWidget(os, "colorThresholdSlider")); + CHECK_SET_ERR(nullptr != colorThresholdSlider, "Can't find colorThresholdSlider"); + + GTSlider::setValue(os, colorThresholdSlider, 900); + GTGlobals::sleep(); + //Expected colors: + //background - all columns #ffffff + //font - all columns ##000000 + foreach(const int i, columns) { + QPoint p(i, 0); + QString backgroundColor = GTUtilsMSAEditorSequenceArea::getColor(os, p); + QString fontColor = GTUtilsMSAEditorSequenceArea::getFontColor(os, p); + coreLog.info(QString("Background color on the %1th column of the 1th row: %2").arg(i + 1).arg(backgroundColor)); + coreLog.info(QString("Font color on the %1th column of the 1th row: %2").arg(i + 1).arg(fontColor)); + QString expectedBackgroundColor = backgroundColors[1]; + QString expectedFontColor = fontColors[1]; + CHECK_SET_ERR(backgroundColor == expectedBackgroundColor, QString("Unexpected background color on the %1th column of the 1th row, expected: %2, current: %3").arg(i + 1).arg(expectedBackgroundColor).arg(backgroundColor)); + CHECK_SET_ERR(fontColor == expectedFontColor, QString("Unexpected font color on the %1th column of the 1th row, expected: %2, current: %3").arg(i + 1).arg(expectedFontColor).arg(fontColor)); + } + + //5. Set Threshold to 100 + GTSlider::setValue(os, colorThresholdSlider, 100); + GTGlobals::sleep(); + //Expected colors: + //background - all columns #00ffff + //font - all columns ##0000ff + foreach(const int i, columns) { + QPoint p(i, 0); + QString backgroundColor = GTUtilsMSAEditorSequenceArea::getColor(os, p); + QString fontColor = GTUtilsMSAEditorSequenceArea::getFontColor(os, p); + coreLog.info(QString("Background color on the %1th column of the 1th row: %2").arg(i + 1).arg(backgroundColor)); + coreLog.info(QString("Font color on the %1th column of the 1th row: %2").arg(i + 1).arg(fontColor)); + QString expectedBackgroundColor = backgroundColors[0]; + QString expectedFontColor = fontColors[0]; + CHECK_SET_ERR(backgroundColor == expectedBackgroundColor, QString("Unexpected background color on the %1th column of the 1th row, expected: %2, current: %3").arg(i + 1).arg(expectedBackgroundColor).arg(backgroundColor)); + CHECK_SET_ERR(fontColor == expectedFontColor, QString("Unexpected font color on the %1th column of the 1th row, expected: %2, current: %3").arg(i + 1).arg(expectedFontColor).arg(fontColor)); + } +} + +GUI_TEST_CLASS_DEFINITION(test_6488_1) { +// 1. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + +// 2. Click "Create element with external tool" button on the toolbar. +// 3. Fill the dialog with the following data: +// Element name: "UGENE-6488 test element 1" +// Command line tool: Integrated external tool "python" +// No inputs, parameters and outputs +// Command: "just a command" +// Element description on the scene: "description on the scene" +// Detailed element description: "detailed element description" +// 4. Accept the dialog. +// Expected state: the element was created and put on the scene. + CreateElementWithCommandLineToolFiller::ElementWithCommandLineSettings settings; + settings.elementName = "UGENE-6488 test element 1"; + settings.tooltype = CreateElementWithCommandLineToolFiller::CommandLineToolType::IntegratedExternalTool; + settings.command = "just a command"; + settings.description = "detailed element description"; + settings.prompter = "description on the scene"; + GTUtilsDialog::waitForDialog(os, new CreateElementWithCommandLineToolFiller(os, settings)); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Create element with external tool"); + GTGlobals::sleep(); + +// 5. Click on the element on the scene. + GTUtilsWorkflowDesigner::click(os, "UGENE-6488 test element 1"); + +// 6. Call a context menu on the element on the scene. +// 7. Select "Edit configuration..." menu item. +// 8. Go to the "Command" page in the wizard. +// 9. Set "a modified command" text as command. +// 10. Go to the last page, accept the dialog. + class ModifyScenario : public CustomScenario { + void run(GUITestOpStatus &os) { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(nullptr != dialog, "Active modal widget is nullptr"); + + QWizard *wizard = qobject_cast<QWizard *>(dialog); + CHECK_SET_ERR(nullptr != wizard, "Can't cast current dialog to QWizard"); + + GTWidget::click(os, wizard->button(QWizard::NextButton)); + GTWidget::click(os, wizard->button(QWizard::NextButton)); + GTWidget::click(os, wizard->button(QWizard::NextButton)); + GTWidget::click(os, wizard->button(QWizard::NextButton)); + + GTTextEdit::setText(os, GTWidget::findExactWidget<QTextEdit *>(os, "teCommand", dialog), "a modified command"); + + GTWidget::click(os, wizard->button(QWizard::NextButton)); + GTWidget::click(os, wizard->button(QWizard::NextButton)); + + GTWidget::click(os, wizard->button(QWizard::FinishButton)); + } + }; + + GTUtilsDialog::waitForDialog(os, new CreateElementWithCommandLineToolFiller(os, new ModifyScenario())); + GTUtilsDialog::waitForDialog(os, new PopupChooserByText(os, { "Edit configuration..." })); + GTUtilsWorkflowDesigner::click(os, "UGENE-6488 test element 1", QPoint(), Qt::RightButton); + +// 11. Edit the element again. +// 12. Go to the "Command" page in the wizard. +// Expected state: the command is "a modified command". + class CheckScenario : public CustomScenario { + void run(GUITestOpStatus &os) { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(nullptr != dialog, "Active modal widget is nullptr"); + + QWizard *wizard = qobject_cast<QWizard *>(dialog); + CHECK_SET_ERR(nullptr != wizard, "Can't cast current dialog to QWizard"); + + GTWidget::click(os, wizard->button(QWizard::NextButton)); + GTWidget::click(os, wizard->button(QWizard::NextButton)); + GTWidget::click(os, wizard->button(QWizard::NextButton)); + GTWidget::click(os, wizard->button(QWizard::NextButton)); + + const QString expectedText = "a modified command"; + const QString actualText = GTTextEdit::getText(os, GTWidget::findExactWidget<QTextEdit *>(os, "teCommand", dialog)); + CHECK_SET_ERR(actualText == expectedText, QString("Unexpected command text: expected '%1', got '%2'").arg(expectedText).arg(actualText)); + + GTKeyboardDriver::keyClick(Qt::Key_Escape); + } + }; + + GTUtilsWorkflowDesigner::removeItem(os, "UGENE-6488 test element 1"); + GTUtilsWorkflowDesigner::addElement(os, "UGENE-6488 test element 1"); + + GTUtilsDialog::waitForDialog(os, new CreateElementWithCommandLineToolFiller(os, new CheckScenario())); + GTUtilsDialog::waitForDialog(os, new PopupChooserByText(os, { "Edit configuration..." })); + GTUtilsWorkflowDesigner::click(os, "UGENE-6488 test element 1", QPoint(), Qt::RightButton); + + GTGlobals::sleep(); +} + +GUI_TEST_CLASS_DEFINITION(test_6488_2) { +// 1. Open Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + +// 2. Click "Create element with external tool" button on the toolbar. +// 3. Fill the dialog with the following data: +// Element name: "UGENE-6488 test element" +// Command line tool: Integrated external tool "python" +// No inputs, parameters and outputs +// Command: "just a command" +// Element description on the scene: "description on the scene" +// Detailed element description: "detailed element description" +// 4. Accept the dialog. +// Expected state: the element was created and put on the scene. + CreateElementWithCommandLineToolFiller::ElementWithCommandLineSettings settings; + settings.elementName = "UGENE-6488 test element 2"; + settings.tooltype = CreateElementWithCommandLineToolFiller::CommandLineToolType::IntegratedExternalTool; + settings.command = "just a command"; + settings.description = "detailed element description"; + settings.prompter = "description on the scene"; + GTUtilsDialog::waitForDialog(os, new CreateElementWithCommandLineToolFiller(os, settings)); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Create element with external tool"); + +// 5. Click on the element on the scene. + GTUtilsWorkflowDesigner::click(os, "UGENE-6488 test element 2"); + GTGlobals::sleep(); + +// 6. Call a context menu on the element on the scene. +// 7. Select "Edit configuration..." menu item. +// 8. Go to the "Element appearance" page in the wizard. +// 9. Set "a modified description on the scene" text as element description on the scene. +// 10. Go to the last page, accept the dialog. + class ModifyScenario : public CustomScenario { + void run(GUITestOpStatus &os) { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(nullptr != dialog, "Active modal widget is nullptr"); + + QWizard *wizard = qobject_cast<QWizard *>(dialog); + CHECK_SET_ERR(nullptr != wizard, "Can't cast current dialog to QWizard"); + + GTWidget::click(os, wizard->button(QWizard::NextButton)); + GTWidget::click(os, wizard->button(QWizard::NextButton)); + GTWidget::click(os, wizard->button(QWizard::NextButton)); + GTWidget::click(os, wizard->button(QWizard::NextButton)); + GTWidget::click(os, wizard->button(QWizard::NextButton)); + + GTTextEdit::setText(os, GTWidget::findExactWidget<QTextEdit *>(os, "tePrompter", dialog), "a modified description on the scene"); + + GTWidget::click(os, wizard->button(QWizard::NextButton)); + + GTWidget::click(os, wizard->button(QWizard::FinishButton)); + } + }; + + GTUtilsDialog::waitForDialog(os, new PopupChooserByText(os, { "Edit configuration..." })); + GTUtilsDialog::waitForDialog(os, new CreateElementWithCommandLineToolFiller(os, new ModifyScenario())); + GTUtilsWorkflowDesigner::click(os, "UGENE-6488 test element 2", QPoint(), Qt::RightButton); + +// 11. Edit the element again. +// 12. Go to the "Element appearance" page in the wizard. +// Expected state: the element description on the scene is "a modified description on the scene". + class CheckScenario : public CustomScenario { + void run(GUITestOpStatus &os) { + QWidget *dialog = QApplication::activeModalWidget(); + CHECK_SET_ERR(nullptr != dialog, "Active modal widget is nullptr"); + + QWizard *wizard = qobject_cast<QWizard *>(dialog); + CHECK_SET_ERR(nullptr != wizard, "Can't cast current dialog to QWizard"); + + GTWidget::click(os, wizard->button(QWizard::NextButton)); + GTWidget::click(os, wizard->button(QWizard::NextButton)); + GTWidget::click(os, wizard->button(QWizard::NextButton)); + GTWidget::click(os, wizard->button(QWizard::NextButton)); + GTWidget::click(os, wizard->button(QWizard::NextButton)); + + const QString expectedText = "a modified description on the scene"; + const QString actualText = GTTextEdit::getText(os, GTWidget::findExactWidget<QTextEdit *>(os, "tePrompter", dialog)); + CHECK_SET_ERR(actualText == expectedText, QString("Unexpected command text: expected '%1', got '%2'").arg(expectedText).arg(actualText)); + + GTKeyboardDriver::keyClick(Qt::Key_Escape); + } + }; + + GTUtilsWorkflowDesigner::removeItem(os, "UGENE-6488 test element 2"); + GTUtilsWorkflowDesigner::addElement(os, "UGENE-6488 test element 2"); + + GTUtilsDialog::waitForDialog(os, new PopupChooserByText(os, { "Edit configuration..." })); + GTUtilsDialog::waitForDialog(os, new CreateElementWithCommandLineToolFiller(os, new CheckScenario())); + GTUtilsWorkflowDesigner::click(os, "UGENE-6488 test element 2", QPoint(), Qt::RightButton); + + GTGlobals::sleep(); +} + +GUI_TEST_CLASS_DEFINITION(test_6490) { +// Test to check that element with external tool will +// successfully create and run the command: `%TOOL_PATH% $oooo $oooo$oooo $oooo $oooo$oooo$oooo`. + +// 1. Open the Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + +// 2. Click on the "Create element with external tool" button on the toolbar. +// 3. Fill the wizard with the following values (not mentioned values can be set with any value): +// Parameters page: a parameter with a type "Output file URL". +// 4. Accept the wizard. + CreateElementWithCommandLineToolFiller::ElementWithCommandLineSettings settings; + settings.elementName = "test_6490"; + settings.tooltype = CreateElementWithCommandLineToolFiller::CommandLineToolType::IntegratedExternalTool; + settings.parameters << CreateElementWithCommandLineToolFiller::ParameterData("oooo", + qMakePair(CreateElementWithCommandLineToolFiller::ParameterString, QString("-version")), QString("Desc-version"), QString("OoOoO")); + + settings.command = "%USUPP_JAVA% $oooo $oooo$oooo $oooo $oooo$oooo$oooo"; + GTUtilsDialog::waitForDialog(os, new CreateElementWithCommandLineToolFiller(os, settings)); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Create element with external tool"); + GTGlobals::sleep(); + +// 5. Create a valid workflow with the new element. + GTUtilsWorkflowDesigner::click(os, "test_6490"); + +// 6. Launch the workflow. + GTLogTracer logTracer; + GTUtilsWorkflowDesigner::runWorkflow(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// Expected state: the workflow execution finishes, there is an log string `-version -version-version -version -version-version-version`. + bool desiredMessage = logTracer.checkMessage("$oooo $oooo$oooo $oooo $oooo$oooo$oooo"); + CHECK_SET_ERR(desiredMessage, "No expected message in the log"); +} + +GUI_TEST_CLASS_DEFINITION(test_6580) { +// Test to check that element with external tool will +// successfully create and run the command: `%TOOL_PATH% $oooo $oooo$oooo $oooo $oooo$oooo$oooo`. + +// 1. Open the Workflow Designer. + GTUtilsWorkflowDesigner::openWorkflowDesigner(os); + +// 2. Click on the "Create element with external tool" button on the toolbar. +// 3. Fill the wizard with the following values (not mentioned values can be set with any value): +// Parameters page: a parameter with a type "Output file URL". +// 4. Accept the wizard. + CreateElementWithCommandLineToolFiller::ElementWithCommandLineSettings settings; + settings.elementName = "test_6580"; + settings.tooltype = CreateElementWithCommandLineToolFiller::CommandLineToolType::IntegratedExternalTool; + settings.parameters << CreateElementWithCommandLineToolFiller::ParameterData("oooo", + qMakePair(CreateElementWithCommandLineToolFiller::ParameterString, QString("-version")), QString("Desc-version"), QString("OoOoO")); + + settings.command = "%USUPP_JAVA% $OoOoO $OoOoO$OoOoO $OoOoO $OoOoO$OoOoO$OoOoO"; + GTUtilsDialog::waitForDialog(os, new CreateElementWithCommandLineToolFiller(os, settings)); + GTToolbar::clickButtonByTooltipOnToolbar(os, MWTOOLBAR_ACTIVEMDI, "Create element with external tool"); + GTGlobals::sleep(); + +// 5. Create a valid workflow with the new element. + GTUtilsWorkflowDesigner::click(os, "test_6580"); + +// 6. Launch the workflow. + GTLogTracer logTracer; + GTUtilsWorkflowDesigner::runWorkflow(os); + GTUtilsTaskTreeView::waitTaskFinished(os); + +// Expected state: the workflow execution finishes, there is an log string `-version -version-version -version -version-version-version`. + bool desiredMessage = logTracer.checkMessage("-version -version-version -version -version-version-version"); + CHECK_SET_ERR(desiredMessage, "No expected message in the log"); +} + } // namespace GUITest_regression_scenarios } // namespace U2 diff --git a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_6001_7000.h b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_6001_7000.h index b2d5b3506cf55d0c55513fb2d6a59f80851473ef..6ba02a878d67bf1936b9c7e26ed5330132ec2704 100644 --- a/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_6001_7000.h +++ b/src/plugins/GUITestBase/src/tests/regression_scenarios/GTTestsRegressionScenarios_6001_7000.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,7 +33,10 @@ namespace GUITest_regression_scenarios { GUI_TEST_CLASS_DECLARATION(test_6031) GUI_TEST_CLASS_DECLARATION(test_6033) -GUI_TEST_CLASS_DECLARATION(test_6038) +GUI_TEST_CLASS_DECLARATION(test_6038_1) +GUI_TEST_CLASS_DECLARATION(test_6038_2) +GUI_TEST_CLASS_DECLARATION(test_6038_3) +GUI_TEST_CLASS_DECLARATION(test_6038_4) GUI_TEST_CLASS_DECLARATION(test_6043) GUI_TEST_CLASS_DECLARATION(test_6047) GUI_TEST_CLASS_DECLARATION(test_6058_1) @@ -47,9 +50,64 @@ GUI_TEST_CLASS_DECLARATION(test_6087) GUI_TEST_CLASS_DECLARATION(test_6102) GUI_TEST_CLASS_DECLARATION(test_6118) +GUI_TEST_CLASS_DECLARATION(test_6135) GUI_TEST_CLASS_DECLARATION(test_6136) +GUI_TEST_CLASS_DECLARATION(test_6167) + +GUI_TEST_CLASS_DECLARATION(test_6204) +GUI_TEST_CLASS_DECLARATION(test_6207) +GUI_TEST_CLASS_DECLARATION(test_6212) GUI_TEST_CLASS_DECLARATION(test_6225) +GUI_TEST_CLASS_DECLARATION(test_6226) +GUI_TEST_CLASS_DECLARATION(test_6229) +GUI_TEST_CLASS_DECLARATION(test_6230) +GUI_TEST_CLASS_DECLARATION(test_6232_1) +GUI_TEST_CLASS_DECLARATION(test_6232_2) +GUI_TEST_CLASS_DECLARATION(test_6232_3) +GUI_TEST_CLASS_DECLARATION(test_6232_4) +GUI_TEST_CLASS_DECLARATION(test_6233) +GUI_TEST_CLASS_DECLARATION(test_6235_1) +GUI_TEST_CLASS_DECLARATION(test_6235_2) +GUI_TEST_CLASS_DECLARATION(test_6235_3) +GUI_TEST_CLASS_DECLARATION(test_6235_4) +GUI_TEST_CLASS_DECLARATION(test_6236) +GUI_TEST_CLASS_DECLARATION(test_6238) +GUI_TEST_CLASS_DECLARATION(test_6240) GUI_TEST_CLASS_DECLARATION(test_6243) +GUI_TEST_CLASS_DECLARATION(test_6247) +GUI_TEST_CLASS_DECLARATION(test_6249_1) +GUI_TEST_CLASS_DECLARATION(test_6249_2) +GUI_TEST_CLASS_DECLARATION(test_6249_3) +GUI_TEST_CLASS_DECLARATION(test_6256) +GUI_TEST_CLASS_DECLARATION(test_6262) +GUI_TEST_CLASS_DECLARATION(test_6277) +GUI_TEST_CLASS_DECLARATION(test_6279) +GUI_TEST_CLASS_DECLARATION(test_6283) +GUI_TEST_CLASS_DECLARATION(test_6291) + +GUI_TEST_CLASS_DECLARATION(test_6301) +GUI_TEST_CLASS_DECLARATION(test_6309) +GUI_TEST_CLASS_DECLARATION(test_6314) +GUI_TEST_CLASS_DECLARATION(test_6334) +GUI_TEST_CLASS_DECLARATION(test_6350) +GUI_TEST_CLASS_DECLARATION(test_6378) +GUI_TEST_CLASS_DECLARATION(test_6397) +GUI_TEST_CLASS_DECLARATION(test_6398) + +GUI_TEST_CLASS_DECLARATION(test_6459) +GUI_TEST_CLASS_DECLARATION(test_6475_1) +GUI_TEST_CLASS_DECLARATION(test_6475_2) +GUI_TEST_CLASS_DECLARATION(test_6481_1) +GUI_TEST_CLASS_DECLARATION(test_6481_2) +GUI_TEST_CLASS_DECLARATION(test_6481_3) +GUI_TEST_CLASS_DECLARATION(test_6481_4) +GUI_TEST_CLASS_DECLARATION(test_6474_1) +GUI_TEST_CLASS_DECLARATION(test_6474_2) +GUI_TEST_CLASS_DECLARATION(test_6488_1) +GUI_TEST_CLASS_DECLARATION(test_6488_2) + +GUI_TEST_CLASS_DECLARATION(test_6490) +GUI_TEST_CLASS_DECLARATION(test_6580) #undef GUI_TEST_SUITE diff --git a/src/plugins/annotator/src/AnnotatorPlugin.cpp b/src/plugins/annotator/src/AnnotatorPlugin.cpp index 5013a88181737afdd57bd32128b09d026276bea7..b9fb112321b655cb26485452b9b3c4945dfa199b 100644 --- a/src/plugins/annotator/src/AnnotatorPlugin.cpp +++ b/src/plugins/annotator/src/AnnotatorPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,17 +22,13 @@ #include <QMenu> #include <QMessageBox> -#include <U2Core/AnnotationTableObject.h> #include <U2Core/AppContext.h> #include <U2Core/GAutoDeleteList.h> -#include <U2Core/U2SafePoints.h> +#include <U2Core/QObjectScopedPointer.h> #include <U2Gui/GUIUtils.h> -#include <U2Core/QObjectScopedPointer.h> -#include <U2Test/GTest.h> #include <U2Test/GTestFrameworkComponents.h> -#include <U2Test/XMLTestFormat.h> #include <U2View/ADVConstants.h> #include <U2View/ADVUtils.h> @@ -94,13 +90,13 @@ AnnotatorViewContext::AnnotatorViewContext(QObject* p, bool customAutoAnnotation void AnnotatorViewContext::initViewContext(GObjectView* v) { AnnotatedDNAView* av = qobject_cast<AnnotatedDNAView*>(v); - ADVGlobalAction* a = new ADVGlobalAction(av, QIcon(":annotator/images/regions.png"), tr("Find annotated regions..."), 30); - connect(a, SIGNAL(triggered()), SLOT(sl_showCollocationDialog())); + ADVGlobalAction* findRegionsAction = new ADVGlobalAction(av, QIcon(":annotator/images/regions.png"), tr("Find annotated regions..."), 30); + connect(findRegionsAction, SIGNAL(triggered()), SLOT(sl_showCollocationDialog())); if (customFeaturesAvailable) { - ADVGlobalAction* a = new ADVGlobalAction(av, QIcon(":annotator/images/plasmid_features.png"), tr("Annotate plasmid..."), 31); - a->addAlphabetFilter(DNAAlphabet_NUCL); - connect(a, SIGNAL(triggered()), SLOT(sl_showCustomAutoAnnotationDialog())); + ADVGlobalAction* annotatePlasmidAction = new ADVGlobalAction(av, QIcon(":annotator/images/plasmid_features.png"), tr("Annotate plasmid..."), 31); + annotatePlasmidAction->addAlphabetFilter(DNAAlphabet_NUCL); + connect(annotatePlasmidAction, SIGNAL(triggered()), SLOT(sl_showCustomAutoAnnotationDialog())); } } @@ -113,8 +109,8 @@ void AnnotatorViewContext::sl_showCollocationDialog() { QSet<QString> allNames; foreach (AnnotationTableObject *ao, av->getAnnotationObjects()) { - foreach (Annotation *a, ao->getAnnotations()) { - allNames.insert(a->getName()); + foreach (Annotation *annotation, ao->getAnnotations()) { + allNames.insert(annotation->getName()); } } if (allNames.isEmpty()) { diff --git a/src/plugins/annotator/src/AnnotatorPlugin.h b/src/plugins/annotator/src/AnnotatorPlugin.h index ef06a49234b9b3e61c2833d1f9631e60e163a5ff..4dc7c09065ec9a0f67cd87582328a920197bc7b7 100644 --- a/src/plugins/annotator/src/AnnotatorPlugin.h +++ b/src/plugins/annotator/src/AnnotatorPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,10 +23,8 @@ #define _U2_ANNOTATION_COLLOCATOR_PLUGIN_H_ #include <U2Core/PluginModel.h> -#include <U2Gui/ObjectViewModel.h> -#include <QMap> -#include <QAction> +#include <U2Gui/ObjectViewModel.h> namespace U2 { diff --git a/src/plugins/annotator/src/AnnotatorTests.cpp b/src/plugins/annotator/src/AnnotatorTests.cpp index d943b00196ac20814e1c6ac879f50616ad6dd6b9..21e2cfa758c0fc66c56acd6ed5a1ef24c4a351b0 100644 --- a/src/plugins/annotator/src/AnnotatorTests.cpp +++ b/src/plugins/annotator/src/AnnotatorTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,14 +24,9 @@ #include <U2Core/AnnotationTableObject.h> #include <U2Core/BaseDocumentFormats.h> -#include <U2Core/DNASequence.h> -#include <U2Core/DNASequenceObject.h> #include <U2Core/DocumentModel.h> #include <U2Core/GObject.h> #include <U2Core/GObjectTypes.h> -#include <U2Core/U2OpStatusUtils.h> - -#include <U2Test/GTestFrameworkComponents.h> #include "AnnotatorTests.h" @@ -84,7 +79,7 @@ void GTest_AnnotatorSearch::init(XMLTestFormat *tf, const QDomElement& el) { } bool startOk, finishOk; int start = bounds.first().toInt(&startOk), finish = bounds.last().toInt(&finishOk); - if (startOk && finishOk != true) { + if (!startOk || !finishOk) { stateInfo.setError( QString("wrong value for %1").arg(EXPECTED_RESULTS_ATTR)); return; } diff --git a/src/plugins/annotator/src/AnnotatorTests.h b/src/plugins/annotator/src/AnnotatorTests.h index 7f11d3c111c25c32ab2338910a24a005e55c554f..fce6fa9ddbe6febb5ea23f1ddd10bdeaf6d29a51 100644 --- a/src/plugins/annotator/src/AnnotatorTests.h +++ b/src/plugins/annotator/src/AnnotatorTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,19 +22,21 @@ #ifndef _U2_ANNOTATOR_TESTS_H_ #define _U2_ANNOTATOR_TESTS_H_ -#include <U2Test/XMLTestUtils.h> -#include <U2Core/GObject.h> #include <QDomElement> + #include <U2Core/U2Region.h> -#include <U2Core/AnnotationTableObject.h> + +#include <U2Test/XMLTestUtils.h> + #include <U2View/AnnotatedDNAView.h> + #include "CollocationsDialogController.h" #include "GeneByGeneReportTask.h" #include "CustomPatternAnnotationTask.h" namespace U2 { -class GTest_AnnotatorSearch : public GTest { +class GTest_AnnotatorSearch : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_AnnotatorSearch, "plugin_dna-annotator-search"); @@ -44,7 +46,6 @@ public: private: QString seqName; QString docName; - QString resultDocContextName; QSet<QString> groupsToSearch; int regionSize; CollocationsAlgorithm::SearchType st; @@ -52,7 +53,7 @@ private: QVector<U2Region> expectedResults; }; -class GTest_CustomAutoAnnotation : public GTest { +class GTest_CustomAutoAnnotation : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CustomAutoAnnotation, "custom-auto-annotation-search"); @@ -64,12 +65,11 @@ private: QString docName; QString resultDocContextName; bool isCircular; - SharedFeatureStore featureStore; CustomPatternAnnotationTask* searchTask; }; -class GTest_GeneByGeneApproach : public GTest{ +class GTest_GeneByGeneApproach : public XmlTest{ public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_GeneByGeneApproach, "plugin_dna-annotator-gene-by-gene"); @@ -79,7 +79,6 @@ private: QString seqName; QString annName; QString docName; - QString resultDocContextName; bool expected; float identity; GeneByGeneCompareResult result; diff --git a/src/plugins/annotator/src/CollocationWorker.cpp b/src/plugins/annotator/src/CollocationWorker.cpp index 80193ba4c582c38ee19c3de0ed05b9efb26db2ff..061ff152809c9801f3769b785a47e1a43dfb5a83 100644 --- a/src/plugins/annotator/src/CollocationWorker.cpp +++ b/src/plugins/annotator/src/CollocationWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -21,25 +21,18 @@ #include <QScopedPointer> -#include <U2Lang/IntegralBusModel.h> -#include <U2Lang/WorkflowEnv.h> -#include <U2Lang/ActorPrototypeRegistry.h> +#include <U2Core/DNATranslation.h> +#include <U2Core/Log.h> #include <U2Core/QVariantUtils.h> + +#include <U2Designer/DelegateEditors.h> + +#include <U2Lang/ActorPrototypeRegistry.h> #include <U2Lang/BaseTypes.h> #include <U2Lang/BaseSlots.h> #include <U2Lang/BasePorts.h> #include <U2Lang/BaseActorCategories.h> -#include <U2Designer/DelegateEditors.h> -#include <U2Lang/CoreLibConstants.h> - -#include <U2Core/AnnotationTableObject.h> -#include <U2Core/DNASequence.h> -#include <U2Core/DNASequenceObject.h> -#include <U2Core/DNATranslation.h> -#include <U2Core/DNAAlphabet.h> -#include <U2Core/AppContext.h> -#include <U2Core/Log.h> -#include <U2Core/U2SafePoints.h> +#include <U2Lang/WorkflowEnv.h> #include "CollocationsSearchAlgorithm.h" #include "CollocationsDialogController.h" diff --git a/src/plugins/annotator/src/CollocationWorker.h b/src/plugins/annotator/src/CollocationWorker.h index cffd70c1e159d2b1ee8d7c10df6782daef698b5b..2c7b3d20d21a9891ca232df26d51f4946ae58255 100644 --- a/src/plugins/annotator/src/CollocationWorker.h +++ b/src/plugins/annotator/src/CollocationWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,10 +22,9 @@ #ifndef _U2_ANNOTATOR_WORKER_H_ #define _U2_ANNOTATOR_WORKER_H_ -#include <QSet> - #include <U2Lang/LocalDomain.h> #include <U2Lang/WorkflowUtils.h> + #include "CollocationsSearchAlgorithm.h" namespace U2 { diff --git a/src/plugins/annotator/src/CollocationsDialogController.cpp b/src/plugins/annotator/src/CollocationsDialogController.cpp index 2f3a20cde81fd52dca4cc85f538c0c9d55a4bfbb..a16b9e91a6b0301b546461ef2fada78606f3c599 100644 --- a/src/plugins/annotator/src/CollocationsDialogController.cpp +++ b/src/plugins/annotator/src/CollocationsDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,18 +19,10 @@ * MA 02110-1301, USA. */ -#include <QFileInfo> -#include <QMenu> -#include <QToolButton> - #include <U2Core/AnnotationSettings.h> -#include <U2Core/AnnotationTableObject.h> -#include <U2Core/AppContext.h> #include <U2Core/Counter.h> #include <U2Core/DNAAlphabet.h> #include <U2Core/DNASequenceObject.h> -#include <U2Core/DocumentModel.h> -#include <U2Core/GObjectUtils.h> #include <U2Core/U1AnnotationUtils.h> #include <U2Core/U2SafePoints.h> @@ -57,7 +49,7 @@ CollocationsDialogController::CollocationsDialogController(QStringList _names, A task = NULL; qSort(allNames); setupUi(this); - new HelpButton(this, buttonBox, "22056012"); + new HelpButton(this, buttonBox, "24742547"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Search")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/annotator/src/CollocationsDialogController.h b/src/plugins/annotator/src/CollocationsDialogController.h index 0a8dc9758c135efc3509b69af5d1d6997211634d..2da1be6fac1c7917fb197eefa22177b4187cc2c0 100644 --- a/src/plugins/annotator/src/CollocationsDialogController.h +++ b/src/plugins/annotator/src/CollocationsDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/annotator/src/CollocationsSearchAlgorithm.cpp b/src/plugins/annotator/src/CollocationsSearchAlgorithm.cpp index 296ab6e8f90720e4ae84ef8ac3b70e45b4b0a623..762b665a8f975ee8f05a6f794688947baf4ba90a 100644 --- a/src/plugins/annotator/src/CollocationsSearchAlgorithm.cpp +++ b/src/plugins/annotator/src/CollocationsSearchAlgorithm.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -83,7 +83,7 @@ void CollocationsAlgorithm::findN(const QList<CollocationsAlgorithmItem>& items, } while (i + distance < searchRegion.endPos()); } -void averagingRes(U2Region& res, const U2Region& min, const U2Region& max, int distance, const U2Region& searchRegion) +void averagingRes(U2Region& res, const U2Region& min, const U2Region& max, qint64 distance, const U2Region& searchRegion) { //? if (!min.intersects(max)) { @@ -94,7 +94,7 @@ void averagingRes(U2Region& res, const U2Region& min, const U2Region& max, int d res.startPos = max.startPos; res.length = min.endPos() - max.startPos; } - int tmp = distance - res.length; + qint64 tmp = distance - res.length; res.startPos -= tmp*min.length/(max.length+min.length); if (res.startPos<0) res.startPos = 0; res.length = distance; @@ -126,7 +126,6 @@ void CollocationsAlgorithm::findP(const QList<CollocationsAlgorithmItem>& items, if (i == searchRegion.endPos()) { return; } - U2Region prevResult; U2Region prevMax; do { U2Region res; @@ -156,38 +155,10 @@ void CollocationsAlgorithm::findP(const QList<CollocationsAlgorithmItem>& items, } //error mb use list of prev included anno? // - if (onResult && - prevMax != max - //!prevResult.contains(res) - ) { - prevResult = res; + if (onResult && prevMax != max) { prevMax = max; - if (res.length > distance) { - //function res averaging - //void averagingRes(U2Region& res, const U2Region& min, const U2Region& max, int distance) -/* if (!min.intersects(max)) { - res.startPos = min.endPos()-1; - res.len = max.startPos - min.endPos() + 2; - - int tmp = distance - res.len; - res.startPos -= tmp*min.len/(max.len+min.len); - if (res.startPos<0) res.startPos = 0; - res.len = distance; - if (res.endPos() > searchRegion.endPos()) res.len = (searchRegion.endPos() - res.startPos); - } - else { - res.startPos = max.startPos; - res.len = min.endPos() - max.startPos; - - int tmp = distance - res.len; - res.startPos -= tmp*min.len/(max.len+min.len); - if (res.startPos<0) res.startPos = 0; - res.len = distance; - if (res.endPos() > searchRegion.endPos()) res.len = (searchRegion.endPos() - res.startPos); - - }*/ averagingRes(res, min, max, distance, searchRegion); } diff --git a/src/plugins/annotator/src/CollocationsSearchAlgorithm.h b/src/plugins/annotator/src/CollocationsSearchAlgorithm.h index 8d822c26416f0f41a1d6ae83f5a7e7d1d3223670..03ab74db97be8fd0d6b9f61b780713e80d7f53e7 100644 --- a/src/plugins/annotator/src/CollocationsSearchAlgorithm.h +++ b/src/plugins/annotator/src/CollocationsSearchAlgorithm.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/annotator/src/CustomAutoAnnotationDialog.cpp b/src/plugins/annotator/src/CustomAutoAnnotationDialog.cpp index 6ef7956bcb68f20ff003197d661b2df9c41671ea..36967a44be5be71f862c0530b9109a5e8653178c 100644 --- a/src/plugins/annotator/src/CustomAutoAnnotationDialog.cpp +++ b/src/plugins/annotator/src/CustomAutoAnnotationDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -38,7 +38,7 @@ CustomAutoAnnotationDialog::CustomAutoAnnotationDialog(ADVSequenceObjectContext* : QDialog(ctx->getAnnotatedDNAView()->getWidget()), seqCtx(ctx) { setupUi(this); - new HelpButton(this, buttonBox, "22056091"); + new HelpButton(this, buttonBox, "24742626"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Annotate")); loadSettings(); diff --git a/src/plugins/annotator/src/CustomAutoAnnotationDialog.h b/src/plugins/annotator/src/CustomAutoAnnotationDialog.h index abc544d73ef7d384e57743e0c8b800b6e27d4949..e3ce90d3050250b779342fc8e999ea1eefdf203e 100644 --- a/src/plugins/annotator/src/CustomAutoAnnotationDialog.h +++ b/src/plugins/annotator/src/CustomAutoAnnotationDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/annotator/src/CustomPatternAnnotationTask.cpp b/src/plugins/annotator/src/CustomPatternAnnotationTask.cpp index 56f08a4f496f89805e02f1d7612b40b80c26bdb5..5e19b817de9b4c7fbeaeba907a286113b7478f4b 100644 --- a/src/plugins/annotator/src/CustomPatternAnnotationTask.cpp +++ b/src/plugins/annotator/src/CustomPatternAnnotationTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -21,15 +21,16 @@ #include <QFile> +#include <U2Algorithm/SArrayBasedFindTask.h> + +#include <U2Core/AnnotationTableObject.h> #include <U2Core/AppContext.h> #include <U2Core/Counter.h> +#include <U2Core/CreateAnnotationTask.h> #include <U2Core/DNAAlphabet.h> #include <U2Core/DNATranslation.h> -#include <U2Core/AnnotationTableObject.h> -#include <U2Core/CreateAnnotationTask.h> -#include <U2Algorithm/SArrayIndex.h> -#include <U2Core/TextUtils.h> #include <U2Core/Settings.h> +#include <U2Core/TextUtils.h> #include <U2Core/U2SafePoints.h> #include "CustomPatternAnnotationTask.h" @@ -75,8 +76,8 @@ void CustomPatternAnnotationTask::prepare() return; } - index = QSharedPointer<SArrayIndex>(new SArrayIndex(sequence.constData(), sequence.length(), - featureStore->getMinFeatureSize(), stateInfo, unknownChar)); + index = QSharedPointer<SArrayIndex>(new SArrayIndex(sequence.constData(), quint32(sequence.length()), + quint32(featureStore->getMinFeatureSize()), stateInfo, unknownChar)); if (hasError()) { return; @@ -139,8 +140,8 @@ QList<Task*> CustomPatternAnnotationTask::onSubTaskFinished(Task* subTask) { data->setStrand(strand); if (dnaObj.isCircular() && endPos > seqLen) { - int outerLen = endPos - seqLen; - int innerLen = task->getQuery().length() - outerLen; + qint64 outerLen = endPos - seqLen; + qint64 innerLen = task->getQuery().length() - outerLen; U2Region region1(pos - 1, innerLen); U2Region region2(0, outerLen); data->location->regions << region1 << region2; diff --git a/src/plugins/annotator/src/CustomPatternAnnotationTask.h b/src/plugins/annotator/src/CustomPatternAnnotationTask.h index 83c84edb97f8e35d1971c73c5ccba01e52f23b3f..2a6a8f7fe2793b7bb9993d8e9dfd8555d24ba5bb 100644 --- a/src/plugins/annotator/src/CustomPatternAnnotationTask.h +++ b/src/plugins/annotator/src/CustomPatternAnnotationTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,7 +24,6 @@ #include <QSharedPointer> -#include <U2Algorithm/SArrayBasedFindTask.h> #include <U2Algorithm/SArrayIndex.h> #include <U2Core/AnnotationData.h> diff --git a/src/plugins/annotator/src/GeneByGeneReportTask.cpp b/src/plugins/annotator/src/GeneByGeneReportTask.cpp index 89de4e494a3ec5d95d3f01cdad8080045e56ba59..7fe70d4d33d350594f0d45d3e504f1d332c2606a 100644 --- a/src/plugins/annotator/src/GeneByGeneReportTask.cpp +++ b/src/plugins/annotator/src/GeneByGeneReportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -21,9 +21,9 @@ #include "GeneByGeneReportTask.h" -#include <U2Core/IOAdapterUtils.h> -#include <U2Core/GUrlUtils.h> #include <U2Core/Counter.h> +#include <U2Core/GUrlUtils.h> +#include <U2Core/IOAdapterUtils.h> #include <QFile> #include <QSet> @@ -99,7 +99,7 @@ GeneByGeneCompareResult GeneByGeneComparator::compareGeneAnnotation(const DNASeq } } - if (result.identical == false && maxIdentity != -1.0f){ + if (!result.identical && maxIdentity != -1.0f){ result.identityString.append(QString("\\%1").arg(maxIdentity)); } @@ -332,7 +332,7 @@ void GeneByGeneReportTask::run(){ } progressCounter+=progressStep; - stateInfo.progress = static_cast<float>(progressCounter + 0.5f); + stateInfo.progress = static_cast<int>(progressCounter + 0.5f); } stateInfo.progress = 100; diff --git a/src/plugins/annotator/src/GeneByGeneReportTask.h b/src/plugins/annotator/src/GeneByGeneReportTask.h index 099255f2ef43b30d91b0a8a87b15197e818ea23c..dbb22446054abdd0391cc67432bf548df79feda1 100644 --- a/src/plugins/annotator/src/GeneByGeneReportTask.h +++ b/src/plugins/annotator/src/GeneByGeneReportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,11 +22,10 @@ #ifndef _U2_GENE_BY_GENE_REPORT_TASK_H_ #define _U2_GENE_BY_GENE_REPORT_TASK_H_ -#include <U2Core/Task.h> -#include <U2Core/U2Region.h> -#include <U2Core/DNASequence.h> #include <U2Core/AnnotationData.h> +#include <U2Core/DNASequence.h> #include <U2Core/IOAdapter.h> +#include <U2Core/Task.h> namespace U2 { diff --git a/src/plugins/annotator/src/GeneByGeneReportWorker.cpp b/src/plugins/annotator/src/GeneByGeneReportWorker.cpp index 1c192e1f26dd3bd9fb12b7f742d12101451783c9..558754a413d9854e7c1332ba5c749af73787be5e 100644 --- a/src/plugins/annotator/src/GeneByGeneReportWorker.cpp +++ b/src/plugins/annotator/src/GeneByGeneReportWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,11 +22,10 @@ #include <QScopedPointer> #include <U2Core/AnnotationTableObject.h> +#include <U2Core/AppContext.h> #include <U2Core/FailTask.h> -#include <U2Core/U2OpStatusUtils.h> -#include <U2Core/U2SafePoints.h> #include <U2Core/QVariantUtils.h> -#include <U2Core/AppContext.h> +#include <U2Core/U2OpStatusUtils.h> #include <U2Designer/DelegateEditors.h> diff --git a/src/plugins/annotator/src/GeneByGeneReportWorker.h b/src/plugins/annotator/src/GeneByGeneReportWorker.h index 641fe6ebc93ee3cb3790e014c6e76c4a999f55ea..07f13f2369dbb003f2e39e287940df8b0c2d9440 100644 --- a/src/plugins/annotator/src/GeneByGeneReportWorker.h +++ b/src/plugins/annotator/src/GeneByGeneReportWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,7 +22,6 @@ #ifndef _U2_GENEBYGENEREPORT_WORKER_H_ #define _U2_GENEBYGENEREPORT_WORKER_H_ -#include <U2Core/U2OpStatus.h> #include <U2Core/AnnotationData.h> #include <U2Lang/LocalDomain.h> diff --git a/src/plugins/annotator/transl/russian.ts b/src/plugins/annotator/transl/russian.ts index b19d9c89a5b0a5a3a18ff2ce55ff340fe3241967..132554d8e91065294d3a93ff41e03829091d64d3 100644 --- a/src/plugins/annotator/transl/russian.ts +++ b/src/plugins/annotator/transl/russian.ts @@ -110,12 +110,12 @@ <context> <name>U2::AnnotatorPlugin</name> <message> - <location filename="../src/AnnotatorPlugin.cpp" line="56"/> + <location filename="../src/AnnotatorPlugin.cpp" line="52"/> <source>DNA Annotator</source> <translation>ПоиÑк Ñгруппированных аннотаций</translation> </message> <message> - <location filename="../src/AnnotatorPlugin.cpp" line="56"/> + <location filename="../src/AnnotatorPlugin.cpp" line="52"/> <source>This plugin contains routines to manipulate and search DNA sequence annotations</source> <translation>ПоиÑк Ñгруппированных аннотаций</translation> </message> @@ -123,22 +123,22 @@ <context> <name>U2::AnnotatorViewContext</name> <message> - <location filename="../src/AnnotatorPlugin.cpp" line="97"/> + <location filename="../src/AnnotatorPlugin.cpp" line="93"/> <source>Find annotated regions...</source> <translation>ПоиÑк учаÑтков, ÑоответÑтвующих аннотации...</translation> </message> <message> - <location filename="../src/AnnotatorPlugin.cpp" line="101"/> + <location filename="../src/AnnotatorPlugin.cpp" line="97"/> <source>Annotate plasmid...</source> <translation>ÐвтоматичеÑкий поиÑк плазмид...</translation> </message> <message> - <location filename="../src/AnnotatorPlugin.cpp" line="121"/> + <location filename="../src/AnnotatorPlugin.cpp" line="117"/> <source>Warning</source> <translation>Предупреждение</translation> </message> <message> - <location filename="../src/AnnotatorPlugin.cpp" line="121"/> + <location filename="../src/AnnotatorPlugin.cpp" line="117"/> <source>No annotations found</source> <translation>Ðннотаций не найдено</translation> </message> @@ -146,8 +146,8 @@ <context> <name>U2::CollocationSearchTask</name> <message> - <location filename="../src/CollocationsDialogController.cpp" line="327"/> - <location filename="../src/CollocationsDialogController.cpp" line="357"/> + <location filename="../src/CollocationsDialogController.cpp" line="319"/> + <location filename="../src/CollocationsDialogController.cpp" line="349"/> <source>Search for annotated regions</source> <translation>ПоиÑк Ñгруппированных аннотаций</translation> </message> @@ -155,48 +155,48 @@ <context> <name>U2::CollocationsDialogController</name> <message> - <location filename="../src/CollocationsDialogController.cpp" line="61"/> + <location filename="../src/CollocationsDialogController.cpp" line="53"/> <source>Search</source> <translation>ПоиÑк</translation> </message> <message> - <location filename="../src/CollocationsDialogController.cpp" line="62"/> - <location filename="../src/CollocationsDialogController.cpp" line="104"/> + <location filename="../src/CollocationsDialogController.cpp" line="54"/> + <location filename="../src/CollocationsDialogController.cpp" line="96"/> <source>Cancel</source> <translation>Отмена</translation> </message> <message> - <location filename="../src/CollocationsDialogController.cpp" line="65"/> + <location filename="../src/CollocationsDialogController.cpp" line="57"/> <source><<click '+' button to add new annotation>></source> <translation><< Кликните '+' чтобы добавить аннотацию >></translation> </message> <message> - <location filename="../src/CollocationsDialogController.cpp" line="104"/> + <location filename="../src/CollocationsDialogController.cpp" line="96"/> <source>Stop</source> <translation>ОÑтановить</translation> </message> <message> - <location filename="../src/CollocationsDialogController.cpp" line="110"/> + <location filename="../src/CollocationsDialogController.cpp" line="102"/> <source>Searching... found %1 regions. Progress: %2%</source> <translation>СканируетÑÑ Ð¿Ð¾ÑледовательноÑÑ‚ÑŒ, прогреÑÑ %2. Ðайдено %1 регионов</translation> </message> <message> - <location filename="../src/CollocationsDialogController.cpp" line="112"/> + <location filename="../src/CollocationsDialogController.cpp" line="104"/> <source>Found %1 regions</source> <translation>Ðайдено %1 регионов</translation> </message> <message> - <location filename="../src/CollocationsDialogController.cpp" line="114"/> + <location filename="../src/CollocationsDialogController.cpp" line="106"/> <source>Ready</source> <translation>Готов к поиÑку</translation> </message> <message> - <location filename="../src/CollocationsDialogController.cpp" line="114"/> + <location filename="../src/CollocationsDialogController.cpp" line="106"/> <source>Select annotation names to search</source> <translation>Выберите аннотации</translation> </message> <message> - <location filename="../src/CollocationsDialogController.cpp" line="133"/> + <location filename="../src/CollocationsDialogController.cpp" line="125"/> <source>No annotations left</source> <translation>Ðннотаций больше нет</translation> </message> @@ -212,7 +212,7 @@ <context> <name>U2::CustomPatternAnnotationTask</name> <message> - <location filename="../src/CustomPatternAnnotationTask.cpp" line="52"/> + <location filename="../src/CustomPatternAnnotationTask.cpp" line="53"/> <source>Custom pattern annotation</source> <translation>ПользовательÑÐºÐ°Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ñ</translation> </message> @@ -220,7 +220,7 @@ <context> <name>U2::CustomPatternAutoAnnotationUpdater</name> <message> - <location filename="../src/CustomPatternAnnotationTask.cpp" line="211"/> + <location filename="../src/CustomPatternAnnotationTask.cpp" line="212"/> <source>Plasmid features</source> <translation>Ðннотирование плазмид</translation> </message> @@ -236,32 +236,32 @@ <context> <name>U2::LocalWorkflow::CollocationPrompter</name> <message> - <location filename="../src/CollocationWorker.cpp" line="157"/> + <location filename="../src/CollocationWorker.cpp" line="150"/> <source> sequence from <u>%1</u></source> <translation>поÑледовательноÑти из <u>%1</u></translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="160"/> + <location filename="../src/CollocationWorker.cpp" line="153"/> <source> set of annotations from <u>%1</u></source> <translation>набора аннотаций из <u>%1</u></translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="167"/> + <location filename="../src/CollocationWorker.cpp" line="160"/> <source>For each %1 and %2,</source> <translation>Ð”Ð»Ñ ÐºÐ°Ð¶Ð´Ñ‹Ñ… %1 и %2,</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="169"/> + <location filename="../src/CollocationWorker.cpp" line="162"/> <source>For each %1%2,</source> <translation>Ð”Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ %1%2,</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="185"/> + <location filename="../src/CollocationWorker.cpp" line="178"/> <source> Annotations themselves may not span beyond the region.</source> <translation>целиком.</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="189"/> + <location filename="../src/CollocationWorker.cpp" line="182"/> <source>%1 look if <u>%2</u> annotations appear collocated within same region of length <u>%3</u>.%4<br>Output the list of found regions annotated as <u>%5</u>.</source> <translation>%1 иÑкать группы аннотаций <u>%2</u> раÑположенные <u>%4</u> внутри регионов не длиннее <u>%3</u>.<br>Выдать ÑпиÑок найденных групп в виде аннотаций "<u>%5</u>".</translation> </message> @@ -269,107 +269,107 @@ <context> <name>U2::LocalWorkflow::CollocationWorker</name> <message> - <location filename="../src/CollocationWorker.cpp" line="99"/> + <location filename="../src/CollocationWorker.cpp" line="92"/> <source>Group annotations</source> <translation>Ðайденные регионы</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="140"/> + <location filename="../src/CollocationWorker.cpp" line="133"/> <source>Create new annotations</source> <translation>Создать новые аннотации</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="103"/> + <location filename="../src/CollocationWorker.cpp" line="96"/> <source>Result annotation</source> <translation>Ð˜Ð¼Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ð¸</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="104"/> + <location filename="../src/CollocationWorker.cpp" line="97"/> <source>Name of the result annotations to mark found collocations.</source> <translation>Ð˜Ð¼Ñ Ñ€ÐµÐ·ÑƒÐ»ÑŒÑ‚Ð¸Ñ€ÑƒÑŽÑ‰Ð¸Ñ… аннотаций отмечающих найденные группы.</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="105"/> + <location filename="../src/CollocationWorker.cpp" line="98"/> <source>Group of annotations</source> <translation>Ðннотации в группе</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="107"/> + <location filename="../src/CollocationWorker.cpp" line="100"/> <source>Region size</source> <translation>Размер региона</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="108"/> + <location filename="../src/CollocationWorker.cpp" line="101"/> <source>Effectively this is the maximum allowed distance between the interesting annotations in a group.</source> <translation>ФактичеÑки, Ñто макÑÐ¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ Ð´Ð¾Ð¿ÑƒÑÑ‚Ð¸Ð¼Ð°Ñ Ð´Ð¸ÑÑ‚Ð°Ð½Ñ†Ð¸Ñ Ð¼ÐµÐ¶Ð´Ñƒ аннотациÑми в одной группе.</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="109"/> + <location filename="../src/CollocationWorker.cpp" line="102"/> <source>Must fit into region</source> <translation>Компактные группы</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="110"/> + <location filename="../src/CollocationWorker.cpp" line="103"/> <source>Whether the interesting annotations should entirely fit into the specified region to form a group.</source> <translation>Ðннотации в группе должны целиком входить в указанный регион - Ñ‚.е. диÑÑ‚Ð°Ð½Ñ†Ð¸Ñ Ð² группе ÑчитаетÑÑ Ð¿Ð¾ внешним границам аннотаций.</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="111"/> + <location filename="../src/CollocationWorker.cpp" line="104"/> <source>Result type</source> <translation>Тип аннотации</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="112"/> + <location filename="../src/CollocationWorker.cpp" line="105"/> <source>Copy original annotations or annotate found regions with new ones.</source> <translation>Копировать оригинальные аннотации или аннотировать найденные регионы новыми.</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="113"/> + <location filename="../src/CollocationWorker.cpp" line="106"/> <source>Include boundaries</source> <translation>Включить границы</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="114"/> + <location filename="../src/CollocationWorker.cpp" line="107"/> <source>Include most left and most right boundary annotations regions into result or exclude them.</source> <translation>Включить границы региона в аннотацию или иÑключить их.</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="129"/> + <location filename="../src/CollocationWorker.cpp" line="122"/> <source>Collocation Search</source> <translation>ПоиÑк групп аннотаций</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="139"/> + <location filename="../src/CollocationWorker.cpp" line="132"/> <source>Copy original annotations</source> <translation>Копировать иÑходные аннотации</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="74"/> + <location filename="../src/CollocationWorker.cpp" line="67"/> <source>At least 2 annotations are required for collocation search.</source> <translation>Ðеобходимо указать не менее 2-Ñ… различных имён аннотаций Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка.</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="99"/> + <location filename="../src/CollocationWorker.cpp" line="92"/> <source>Annotated regions containing found collocations.</source> <translation>СпиÑок аннотаций отмечающих найденные группы аннотаций.</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="106"/> + <location filename="../src/CollocationWorker.cpp" line="99"/> <source>A list of annotation names to search. Found regions will contain all the named annotations.</source> <translation>СпиÑок имён интереÑующих аннотаций в группе. ИщутÑÑ Ñ€ÐµÐ³Ð¸Ð¾Ð½Ñ‹ Ñодержащие вÑе указанные аннотации.</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="130"/> + <location filename="../src/CollocationWorker.cpp" line="123"/> <source>Finds groups of specified annotations in each supplied set of annotations, stores found regions as annotations.</source> <translation>ПоиÑк Ñгруппированных аннотаций. ИщутÑÑ Ñ€ÐµÐ³Ð¸Ð¾Ð½Ñ‹ поÑледовательноÑти, Ñодержащие вÑе аннотации из заданного ÑпиÑка, раÑположенные друг от друга на раÑÑтоÑнии не более заданного.</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="94"/> + <location filename="../src/CollocationWorker.cpp" line="87"/> <source>Input data</source> <translation>Входные данные</translation> </message> <message> - <location filename="../src/CollocationWorker.cpp" line="95"/> + <location filename="../src/CollocationWorker.cpp" line="88"/> <source>An input sequence and a set of annotations to search in.</source> <translation>Входные поÑледовательноÑÑ‚ÑŒ и набор аннотированных регионов Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка.</translation> </message> @@ -377,32 +377,32 @@ <context> <name>U2::LocalWorkflow::GeneByGeneReportPrompter</name> <message> - <location filename="../src/GeneByGeneReportWorker.cpp" line="232"/> + <location filename="../src/GeneByGeneReportWorker.cpp" line="231"/> <source>unset</source> <translation>не указан</translation> </message> <message> - <location filename="../src/GeneByGeneReportWorker.cpp" line="240"/> + <location filename="../src/GeneByGeneReportWorker.cpp" line="239"/> <source>For annotated genes from <u>%1</u> build gene-by-gene approach report.</source> <translation>Ð”Ð»Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð½Ñ‹Ñ… генов из <u>%1</u> поÑтроить приближенный отчет по каждому гену.</translation> </message> <message> - <location filename="../src/GeneByGeneReportWorker.cpp" line="241"/> + <location filename="../src/GeneByGeneReportWorker.cpp" line="240"/> <source> With sequence identity of <u>%1</u>.</source> <translation>С идентичноÑтью поÑледовательноÑти <u>%1</u>.</translation> </message> <message> - <location filename="../src/GeneByGeneReportWorker.cpp" line="242"/> + <location filename="../src/GeneByGeneReportWorker.cpp" line="241"/> <source> Using <u>%1</u> to compare gene and genome sequences.</source> <translation> ИÑпользовать <u>%1</u> Ð´Ð»Ñ ÑÑ€Ð°Ð²Ð½ÐµÐ½Ð¸Ñ Ð³ÐµÐ½Ð° и геномных поÑледовательноÑтей.</translation> </message> <message> - <location filename="../src/GeneByGeneReportWorker.cpp" line="243"/> + <location filename="../src/GeneByGeneReportWorker.cpp" line="242"/> <source> Output result table to <u>%1</u>.</source> <translation> Ð’Ñ‹Ñ…Ð¾Ð´Ð½Ð°Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ð° в <u>%1</u>.</translation> </message> <message> - <location filename="../src/GeneByGeneReportWorker.cpp" line="244"/> + <location filename="../src/GeneByGeneReportWorker.cpp" line="243"/> <source> If a report file already exists, <u>%1</u> it</source> <translation> ЕÑли файл уже ÑущеÑтвует, <u>%1</u> его</translation> </message> @@ -410,82 +410,82 @@ <context> <name>U2::LocalWorkflow::GeneByGeneReportWorker</name> <message> - <location filename="../src/GeneByGeneReportWorker.cpp" line="153"/> + <location filename="../src/GeneByGeneReportWorker.cpp" line="152"/> <source>Input annotations</source> <translation>Входные аннотации</translation> </message> <message> - <location filename="../src/GeneByGeneReportWorker.cpp" line="154"/> + <location filename="../src/GeneByGeneReportWorker.cpp" line="153"/> <source>Gene annotations.</source> <translation>Ðннотации гена.</translation> </message> <message> - <location filename="../src/GeneByGeneReportWorker.cpp" line="157"/> + <location filename="../src/GeneByGeneReportWorker.cpp" line="156"/> <source>Input sequences</source> <translation>Входные поÑледовательноÑти</translation> </message> <message> - <location filename="../src/GeneByGeneReportWorker.cpp" line="158"/> + <location filename="../src/GeneByGeneReportWorker.cpp" line="157"/> <source>Gene sequences.</source> <translation>ПоÑледовательноÑти гена.</translation> </message> <message> - <location filename="../src/GeneByGeneReportWorker.cpp" line="162"/> + <location filename="../src/GeneByGeneReportWorker.cpp" line="161"/> <source>Gene by gene report data.</source> <translation>Отчетные данные.</translation> </message> <message> - <location filename="../src/GeneByGeneReportWorker.cpp" line="163"/> + <location filename="../src/GeneByGeneReportWorker.cpp" line="162"/> <source>Gene with similar regions to for report.</source> <translation>Ген Ñо Ñхожими регионами Ð´Ð»Ñ Ð¾Ñ‚Ñ‡ÐµÑ‚Ð°.</translation> </message> <message> - <location filename="../src/GeneByGeneReportWorker.cpp" line="171"/> + <location filename="../src/GeneByGeneReportWorker.cpp" line="170"/> <source>Output file</source> <translation>Выходной файл</translation> </message> <message> - <location filename="../src/GeneByGeneReportWorker.cpp" line="172"/> + <location filename="../src/GeneByGeneReportWorker.cpp" line="171"/> <source>File to store a report.</source> <translation>Файл Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð¾Ñ‚Ñ‡ÐµÑ‚Ð°.</translation> </message> <message> - <location filename="../src/GeneByGeneReportWorker.cpp" line="174"/> + <location filename="../src/GeneByGeneReportWorker.cpp" line="173"/> <source>Annotation name</source> <translation>Ð˜Ð¼Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ð¸</translation> </message> <message> - <location filename="../src/GeneByGeneReportWorker.cpp" line="175"/> + <location filename="../src/GeneByGeneReportWorker.cpp" line="174"/> <source>Annotation name used to compare genes and reference genomes.</source> <translation>Ð˜Ð¼Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ð¸ иÑпользуемое Ð´Ð»Ñ ÑÑ€Ð°Ð²Ð½ÐµÐ½Ð¸Ñ Ð³ÐµÐ½Ð¾Ð² и референÑных геномов.</translation> </message> <message> - <location filename="../src/GeneByGeneReportWorker.cpp" line="177"/> + <location filename="../src/GeneByGeneReportWorker.cpp" line="176"/> <source>Existing file</source> <translation>СущеÑтвующий файл</translation> </message> <message> - <location filename="../src/GeneByGeneReportWorker.cpp" line="178"/> + <location filename="../src/GeneByGeneReportWorker.cpp" line="177"/> <source>If a target report already exists you should specify how to handle that. <b>Merge</b> two table in one. <b>Overwrite</b> or <b>Rename</b> existing file.</source> <translation>ЕÑли файл уже ÑущеÑтвует выберите операцию. <b>Соединить</b> две таблицы в одну. <b>ПерепиÑать</b> или <b>Переименовать</b> ÑущеÑтвующий файл.</translation> </message> <message> - <location filename="../src/GeneByGeneReportWorker.cpp" line="181"/> + <location filename="../src/GeneByGeneReportWorker.cpp" line="180"/> <source>Identity cutoff</source> <translation>Сдвиг идентичноÑти</translation> </message> <message> - <location filename="../src/GeneByGeneReportWorker.cpp" line="182"/> + <location filename="../src/GeneByGeneReportWorker.cpp" line="181"/> <source>Identity between gene sequence length and annotation length in per cent. BLAST identity (if specified) is checked after.</source> <translation>ИдентичноÑÑ‚ÑŒ между длиной гена и длиной аннотации в процентах.</translation> </message> <message> - <location filename="../src/GeneByGeneReportWorker.cpp" line="213"/> + <location filename="../src/GeneByGeneReportWorker.cpp" line="212"/> <source>Gene-by-gene Approach Report</source> <translation>Отчёт по каждому гену</translation> </message> <message> - <location filename="../src/GeneByGeneReportWorker.cpp" line="214"/> + <location filename="../src/GeneByGeneReportWorker.cpp" line="213"/> <source>Output a table of genes found in a reference sequence.</source> <translation>Таблица генов найденных в референÑной поÑледовательноÑти.</translation> </message> diff --git a/src/plugins/api_tests/api_tests.pri b/src/plugins/api_tests/api_tests.pri index 40cd23c287a1b2a5e9a7b2308f2b03b5fa6a8f64..841764eb41add082cb4bb0a16e6e1555bb778f7f 100644 --- a/src/plugins/api_tests/api_tests.pri +++ b/src/plugins/api_tests/api_tests.pri @@ -10,10 +10,11 @@ use_bundled_zlib() { INCLUDEPATH += ../../libs_3rdparty/zlib/src } -LIBS += -lsamtools -L../../_release -lU2Script +LIBS += $$add_z_lib() +LIBS += -lsamtools$$D -lU2Script$$D # Force re-linking when lib changes -unix:POST_TARGETDEPS += ../../_release/libsamtools.a +unix:POST_TARGETDEPS += ../../$$out_dir()/libsamtools$${D}.a # Same options which samtools is built with DEFINES+="_FILE_OFFSET_BITS=64" _LARGEFILE64_SOURCE _USE_KNETFILE INCLUDEPATH += ../../libs_3rdparty/samtools/src ../../libs_3rdparty/samtools/src/samtools @@ -21,9 +22,8 @@ win32:INCLUDEPATH += ../../libs_3rdparty/samtools/src/samtools/win32 win32:LIBS += -lws2_32 win32:DEFINES += _USE_MATH_DEFINES "__func__=__FUNCTION__" "R_OK=4" "atoll=_atoi64" "alloca=_alloca" -win32-msvc2013 { +win32-msvc2013|win32-msvc2015|greaterThan(QMAKE_MSC_VER, 1909) { DEFINES += NOMINMAX _XKEYCHECK_H - LIBS += -L../../_release -lzlib } win32 { @@ -32,18 +32,3 @@ win32 { DEFINES += "inline=__inline" } } - -!debug_and_release|build_pass { - CONFIG(debug, debug|release) { - LIBS -= -lsamtools -L../../_release -lU2Script - LIBS += -lsamtoolsd -L../../_debug -lU2Scriptd - - win32-msvc2013 { - LIBS -= -L../../_release -lzlib - LIBS += -L../../_debug -lzlibd - } - - unix:POST_TARGETDEPS -= ../../_release/libsamtools.a - unix:POST_TARGETDEPS += ../../_debug/libsamtoolsd.a - } -} diff --git a/src/plugins/api_tests/src/ApiTestsPlugin.cpp b/src/plugins/api_tests/src/ApiTestsPlugin.cpp index 3a8e008069d69988d28228131f19f65155eef6dd..1def54cea6ebf36866adfaf30f95f39ae8cfa27f 100644 --- a/src/plugins/api_tests/src/ApiTestsPlugin.cpp +++ b/src/plugins/api_tests/src/ApiTestsPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,13 +24,10 @@ #include <U2Core/U2AssemblyDbi.h> #include <U2Core/U2AttributeDbi.h> #include <U2Core/U2DbiRegistry.h> -#include <U2Core/U2ObjectDbi.h> #include <U2Core/U2OpStatusUtils.h> #include <U2Core/U2SafePoints.h> -#include <U2Core/U2SequenceDbi.h> #include <U2Test/GTestFrameworkComponents.h> -#include <U2Test/XMLTestFormat.h> #include "ApiTestsPlugin.h" #include "UnitTestSuite.h" diff --git a/src/plugins/api_tests/src/ApiTestsPlugin.h b/src/plugins/api_tests/src/ApiTestsPlugin.h index 3c2a5e302d3071554abf14e6d7f7cae90855d5e8..b740972890ef02cbe9817685c507db347bc8c11e 100644 --- a/src/plugins/api_tests/src/ApiTestsPlugin.h +++ b/src/plugins/api_tests/src/ApiTestsPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/UnitTestSuite.cpp b/src/plugins/api_tests/src/UnitTestSuite.cpp index 54cdb11b90ecdcb1385c84826fd4d84003ee1fe9..b35388d8e77f14472cebfca93f0ffe722a81c1e4 100755 --- a/src/plugins/api_tests/src/UnitTestSuite.cpp +++ b/src/plugins/api_tests/src/UnitTestSuite.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -153,6 +153,8 @@ void UnitTestSuite::cleanup() { taskLog.info("Test failed: " + QString::number(failed)); setError("Test failed"); } + + XmlTest::cleanup(); } } //namespace diff --git a/src/plugins/api_tests/src/UnitTestSuite.h b/src/plugins/api_tests/src/UnitTestSuite.h index 5d15f95c82de597d07813a6310b6be1c9f8b17f4..f9dd4fe3a15823fd261f779754653b7021cb8225 100755 --- a/src/plugins/api_tests/src/UnitTestSuite.h +++ b/src/plugins/api_tests/src/UnitTestSuite.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,7 +26,7 @@ namespace U2 { -class UnitTestSuite : public GTest { +class UnitTestSuite : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(UnitTestSuite, "unittest", TaskFlags_NR_FOSCOE); diff --git a/src/plugins/api_tests/src/core/datatype/annotations/AnnotationGroupUnitTests.cpp b/src/plugins/api_tests/src/core/datatype/annotations/AnnotationGroupUnitTests.cpp index da0df934e3b4753c9267c286cdf4e33916ef0b37..3f028823ee21dbe9ebceade2f9fb3311d46ebbb2 100644 --- a/src/plugins/api_tests/src/core/datatype/annotations/AnnotationGroupUnitTests.cpp +++ b/src/plugins/api_tests/src/core/datatype/annotations/AnnotationGroupUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,10 +22,9 @@ #include <QBitArray> #include <U2Core/AnnotationData.h> -#include <U2Core/AnnotationTableObject.h> -#include <U2Core/U2FeatureDbi.h> #include <U2Core/U2FeatureUtils.h> #include <U2Core/U2OpStatusUtils.h> +#include <U2Core/U2SafePoints.h> #include "../../gobjects/FeaturesTableObjectUnitTest.h" #include "AnnotationGroupUnitTests.h" diff --git a/src/plugins/api_tests/src/core/datatype/annotations/AnnotationGroupUnitTests.h b/src/plugins/api_tests/src/core/datatype/annotations/AnnotationGroupUnitTests.h index 2595d8c73306f27146e6cbfa955e8fa3181a3053..7cdf18003b5af51fd916e454329dbad8dd8a5aa4 100644 --- a/src/plugins/api_tests/src/core/datatype/annotations/AnnotationGroupUnitTests.h +++ b/src/plugins/api_tests/src/core/datatype/annotations/AnnotationGroupUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,8 +22,6 @@ #ifndef _U2_ANNOTATION_GROUP_TESTS_H_ #define _U2_ANNOTATION_GROUP_TESTS_H_ -#include <core/dbi/DbiTest.h> - #include <unittest.h> namespace U2 { diff --git a/src/plugins/api_tests/src/core/datatype/annotations/AnnotationUnitTests.cpp b/src/plugins/api_tests/src/core/datatype/annotations/AnnotationUnitTests.cpp index e029b05d67a2c10e4e9a87be316f2d84f34fbff9..b5e371ef9ca19f016fc05c6c2f19f5ec301b8a87 100644 --- a/src/plugins/api_tests/src/core/datatype/annotations/AnnotationUnitTests.cpp +++ b/src/plugins/api_tests/src/core/datatype/annotations/AnnotationUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -21,10 +21,8 @@ #include <QBitArray> -#include <U2Core/AnnotationData.h> -#include <U2Core/AnnotationTableObject.h> -#include <U2Core/U2FeatureDbi.h> #include <U2Core/U2FeatureUtils.h> +#include <U2Core/U2SafePoints.h> #include <U2Core/U2OpStatusUtils.h> #include "../../gobjects/FeaturesTableObjectUnitTest.h" diff --git a/src/plugins/api_tests/src/core/datatype/annotations/AnnotationUnitTests.h b/src/plugins/api_tests/src/core/datatype/annotations/AnnotationUnitTests.h index b8a1d936593262768bc9d50a2b7c30a0a66428fd..23f42d48cc11af325f621209088e1db510c05b4d 100644 --- a/src/plugins/api_tests/src/core/datatype/annotations/AnnotationUnitTests.h +++ b/src/plugins/api_tests/src/core/datatype/annotations/AnnotationUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/datatype/msa/MsaRowUnitTests.cpp b/src/plugins/api_tests/src/core/datatype/msa/MsaRowUnitTests.cpp index 54007d417ef16579e805bfef2be5c1be936cb26c..a767e16921980d5cce168040a243bd4b75865236 100644 --- a/src/plugins/api_tests/src/core/datatype/msa/MsaRowUnitTests.cpp +++ b/src/plugins/api_tests/src/core/datatype/msa/MsaRowUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/datatype/msa/MsaRowUnitTests.h b/src/plugins/api_tests/src/core/datatype/msa/MsaRowUnitTests.h index c9c353d71800d61921835c2479f616e7f299ee18..6fce322c3d479fb750e0c16b241e6639d2c736b5 100644 --- a/src/plugins/api_tests/src/core/datatype/msa/MsaRowUnitTests.h +++ b/src/plugins/api_tests/src/core/datatype/msa/MsaRowUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/datatype/msa/MsaUnitTests.cpp b/src/plugins/api_tests/src/core/datatype/msa/MsaUnitTests.cpp index 544fd269734db17bd10ba77b54077ba3422aff08..1e27d9e176a94e2e825285408a03d1fc73022cf2 100644 --- a/src/plugins/api_tests/src/core/datatype/msa/MsaUnitTests.cpp +++ b/src/plugins/api_tests/src/core/datatype/msa/MsaUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/datatype/msa/MsaUnitTests.h b/src/plugins/api_tests/src/core/datatype/msa/MsaUnitTests.h index 0e7cc07bde68b026b76ba59744761cd92180cb48..daf586034cf551dd296d1c5512dfc6b6c4c51ac2 100644 --- a/src/plugins/api_tests/src/core/datatype/msa/MsaUnitTests.h +++ b/src/plugins/api_tests/src/core/datatype/msa/MsaUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/datatype/udr/RawDataUdrSchemaUnitTests.cpp b/src/plugins/api_tests/src/core/datatype/udr/RawDataUdrSchemaUnitTests.cpp index b21bfacdb5949fdf73fd3229acf186d16a2217cc..4b4f2c3a47e1dd1e995f663a7882026620838964 100644 --- a/src/plugins/api_tests/src/core/datatype/udr/RawDataUdrSchemaUnitTests.cpp +++ b/src/plugins/api_tests/src/core/datatype/udr/RawDataUdrSchemaUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -21,6 +21,7 @@ #include <U2Core/RawDataUdrSchema.h> #include <U2Core/U2OpStatusUtils.h> +#include <U2Core/U2SafePoints.h> #include "RawDataUdrSchemaUnitTests.h" diff --git a/src/plugins/api_tests/src/core/datatype/udr/RawDataUdrSchemaUnitTests.h b/src/plugins/api_tests/src/core/datatype/udr/RawDataUdrSchemaUnitTests.h index 5c1e5d7904d059c845d3a695c75c08f6b119ce5f..df3f902fb6a7dfd6a537f66bcea0fe9547e0567b 100644 --- a/src/plugins/api_tests/src/core/datatype/udr/RawDataUdrSchemaUnitTests.h +++ b/src/plugins/api_tests/src/core/datatype/udr/RawDataUdrSchemaUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,12 +22,10 @@ #ifndef _U2_RAW_DATA_UDR_SCHEMA_UNIT_TESTS_H_ #define _U2_RAW_DATA_UDR_SCHEMA_UNIT_TESTS_H_ -#include "core/dbi/DbiTest.h" - -#include <U2Core/U2RawData.h> - #include <unittest.h> +#include "core/dbi/DbiTest.h" + namespace U2 { class RawDataUdrSchemaTestData { diff --git a/src/plugins/api_tests/src/core/datatype/udr/UdrSchemaUnitTests.cpp b/src/plugins/api_tests/src/core/datatype/udr/UdrSchemaUnitTests.cpp index 372b3c9a5892c4fd94f25b59e281a6ca0101d61a..b989d0ff8781d119761bca898e818f1e02900f38 100644 --- a/src/plugins/api_tests/src/core/datatype/udr/UdrSchemaUnitTests.cpp +++ b/src/plugins/api_tests/src/core/datatype/udr/UdrSchemaUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -20,10 +20,10 @@ */ #include <U2Core/AppContext.h> -#include <U2Core/U2OpStatusUtils.h> -#include <U2Core/UdrSchema.h> #include <U2Core/UdrSchemaRegistry.h> #include <U2Core/UdrRecord.h> +#include <U2Core/U2OpStatusUtils.h> +#include <U2Core/U2SafePoints.h> #include "UdrSchemaUnitTests.h" diff --git a/src/plugins/api_tests/src/core/datatype/udr/UdrSchemaUnitTests.h b/src/plugins/api_tests/src/core/datatype/udr/UdrSchemaUnitTests.h index df7fffa05df5d6a98bf0f871112c0e1f0c317e2b..4090fd79957f384234e4a88eb6863f08bf962bd6 100644 --- a/src/plugins/api_tests/src/core/datatype/udr/UdrSchemaUnitTests.h +++ b/src/plugins/api_tests/src/core/datatype/udr/UdrSchemaUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/dbi/DbiTest.cpp b/src/plugins/api_tests/src/core/dbi/DbiTest.cpp index 501ca3c1a05bf66f90e8dabd0c424e67355951ef..664f4610e9b80a5af5972f500a9205971c894c1a 100644 --- a/src/plugins/api_tests/src/core/dbi/DbiTest.cpp +++ b/src/plugins/api_tests/src/core/dbi/DbiTest.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/dbi/DbiTest.h b/src/plugins/api_tests/src/core/dbi/DbiTest.h index cf14588c21a0cd5c95adadb967a142257c07ebe8..a80c6f4d5b25797fad9b90f4c7fbca06d42c32eb 100644 --- a/src/plugins/api_tests/src/core/dbi/DbiTest.h +++ b/src/plugins/api_tests/src/core/dbi/DbiTest.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/dbi/assembly/AssemblyDbiTestUtil.cpp b/src/plugins/api_tests/src/core/dbi/assembly/AssemblyDbiTestUtil.cpp index e9baefadb412b70b098a3304848c51903b7ed632..a4567d3e3a23b6476d1e571f16665eff2a305893 100644 --- a/src/plugins/api_tests/src/core/dbi/assembly/AssemblyDbiTestUtil.cpp +++ b/src/plugins/api_tests/src/core/dbi/assembly/AssemblyDbiTestUtil.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/dbi/assembly/AssemblyDbiTestUtil.h b/src/plugins/api_tests/src/core/dbi/assembly/AssemblyDbiTestUtil.h index 6391ec750623a5090703d8a85d4053a97b87422c..16646c29912f9c0a94b1b7c5524d96cd406b1b8b 100644 --- a/src/plugins/api_tests/src/core/dbi/assembly/AssemblyDbiTestUtil.h +++ b/src/plugins/api_tests/src/core/dbi/assembly/AssemblyDbiTestUtil.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/dbi/assembly/AssemblyDbiUnitTests.cpp b/src/plugins/api_tests/src/core/dbi/assembly/AssemblyDbiUnitTests.cpp index 468e495774bfb89f34aac44d7d2d381de23b20e4..7c7c7bafc7a0929dcbb12179f1281ddb278fb3e6 100755 --- a/src/plugins/api_tests/src/core/dbi/assembly/AssemblyDbiUnitTests.cpp +++ b/src/plugins/api_tests/src/core/dbi/assembly/AssemblyDbiUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/dbi/assembly/AssemblyDbiUnitTests.h b/src/plugins/api_tests/src/core/dbi/assembly/AssemblyDbiUnitTests.h index 96ee55e66f4b1b4309ea6ab27fc869a6e30a9ea6..dc3135f296a4a1c82a4e5e0e3fafa72b04a7087a 100755 --- a/src/plugins/api_tests/src/core/dbi/assembly/AssemblyDbiUnitTests.h +++ b/src/plugins/api_tests/src/core/dbi/assembly/AssemblyDbiUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/dbi/attribute/AttributeDbiUnitTests.cpp b/src/plugins/api_tests/src/core/dbi/attribute/AttributeDbiUnitTests.cpp index c150ce5875f88cc7d4050198182e8ba172fcb524..d630af490f349c8932778db750fff6906056008e 100755 --- a/src/plugins/api_tests/src/core/dbi/attribute/AttributeDbiUnitTests.cpp +++ b/src/plugins/api_tests/src/core/dbi/attribute/AttributeDbiUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/dbi/attribute/AttributeDbiUnitTests.h b/src/plugins/api_tests/src/core/dbi/attribute/AttributeDbiUnitTests.h index 95974bdbcc37aebaddef8f73031928773905bb98..07fcb946ba15325e728a501fda1421bd874ec3ce 100755 --- a/src/plugins/api_tests/src/core/dbi/attribute/AttributeDbiUnitTests.h +++ b/src/plugins/api_tests/src/core/dbi/attribute/AttributeDbiUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/dbi/features/FeatureDbiUnitTests.cpp b/src/plugins/api_tests/src/core/dbi/features/FeatureDbiUnitTests.cpp index f928a02feb867dad2a5f1e3f2f4ed95a2178a309..69762d59c0c6781f3b3858dbc02854dbfc045d58 100644 --- a/src/plugins/api_tests/src/core/dbi/features/FeatureDbiUnitTests.cpp +++ b/src/plugins/api_tests/src/core/dbi/features/FeatureDbiUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,11 +19,11 @@ * MA 02110-1301, USA. */ -#include <U2Core/U2FeatureDbi.h> -#include <U2Core/U2SequenceDbi.h> -#include <U2Core/U2OpStatusUtils.h> #include <U2Core/U2DbiUtils.h> #include <U2Core/U2FeatureUtils.h> +#include <U2Core/U2SequenceDbi.h> +#include <U2Core/U2OpStatusUtils.h> +#include <U2Core/U2SafePoints.h> #include "FeatureDbiUnitTests.h" diff --git a/src/plugins/api_tests/src/core/dbi/features/FeatureDbiUnitTests.h b/src/plugins/api_tests/src/core/dbi/features/FeatureDbiUnitTests.h index e01879766a268fcd537b596d7e9edc1461b5a880..39139d2f2b2c14583481965b8158323a8afea529 100644 --- a/src/plugins/api_tests/src/core/dbi/features/FeatureDbiUnitTests.h +++ b/src/plugins/api_tests/src/core/dbi/features/FeatureDbiUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,10 +22,11 @@ #ifndef _U2_FEATURES_DBI_UNIT_TESTS_H_ #define _U2_FEATURES_DBI_UNIT_TESTS_H_ +#include <unittest.h> + #include <U2Core/U2Feature.h> #include <U2Core/U2Sequence.h> -#include <unittest.h> #include "core/dbi/DbiTest.h" namespace U2 { diff --git a/src/plugins/api_tests/src/core/dbi/msa/MsaDbiUnitTests.cpp b/src/plugins/api_tests/src/core/dbi/msa/MsaDbiUnitTests.cpp index 7c401c67b6ef2f59bcb845fec6094bbd20a56077..8a5bd2631ec8798c3805108c7cf7574ee0c026bd 100644 --- a/src/plugins/api_tests/src/core/dbi/msa/MsaDbiUnitTests.cpp +++ b/src/plugins/api_tests/src/core/dbi/msa/MsaDbiUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/dbi/msa/MsaDbiUnitTests.h b/src/plugins/api_tests/src/core/dbi/msa/MsaDbiUnitTests.h index 2a8bdb97204d830da7ad5acf1e9718a39cfca5e3..942815d2f4f550f41bd5f9fb6d9c9d71e21bd73b 100644 --- a/src/plugins/api_tests/src/core/dbi/msa/MsaDbiUnitTests.h +++ b/src/plugins/api_tests/src/core/dbi/msa/MsaDbiUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/dbi/sequence/SequenceDbiUnitTests.cpp b/src/plugins/api_tests/src/core/dbi/sequence/SequenceDbiUnitTests.cpp index 363fc011d3bddd7e1afaa2d267e19e362a17f85b..b54766efcb06fd9fb8a00f6c214a21895e2c7864 100755 --- a/src/plugins/api_tests/src/core/dbi/sequence/SequenceDbiUnitTests.cpp +++ b/src/plugins/api_tests/src/core/dbi/sequence/SequenceDbiUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/dbi/sequence/SequenceDbiUnitTests.h b/src/plugins/api_tests/src/core/dbi/sequence/SequenceDbiUnitTests.h index 059b85eed6ca373da41c269bf1d149b586911e36..26855be98ffe6c004ea477d7b167584ca3c83bee 100755 --- a/src/plugins/api_tests/src/core/dbi/sequence/SequenceDbiUnitTests.h +++ b/src/plugins/api_tests/src/core/dbi/sequence/SequenceDbiUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/dbi/udr/UdrDbiUnitTests.cpp b/src/plugins/api_tests/src/core/dbi/udr/UdrDbiUnitTests.cpp index 9233705a25f84586d5995f4622b9ee5022ea1c0c..f66591d1b257abf1af1b3502cdd6be9928cd403f 100644 --- a/src/plugins/api_tests/src/core/dbi/udr/UdrDbiUnitTests.cpp +++ b/src/plugins/api_tests/src/core/dbi/udr/UdrDbiUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,6 +22,7 @@ #include <U2Core/AppContext.h> #include <U2Core/U2ObjectDbi.h> #include <U2Core/U2OpStatusUtils.h> +#include <U2Core/U2SafePoints.h> #include <U2Core/UdrSchemaRegistry.h> #include <U2Core/UdrDbi.h> diff --git a/src/plugins/api_tests/src/core/dbi/udr/UdrDbiUnitTests.h b/src/plugins/api_tests/src/core/dbi/udr/UdrDbiUnitTests.h index 04a4a335f2596156de3e3ec1d79404f2679ad6a3..1c4cf643361a5b8dd89dfd7189fe8b06d2fe150b 100644 --- a/src/plugins/api_tests/src/core/dbi/udr/UdrDbiUnitTests.h +++ b/src/plugins/api_tests/src/core/dbi/udr/UdrDbiUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/external_script/base_scheme_interface/CInterfaceManualTests.cpp b/src/plugins/api_tests/src/core/external_script/base_scheme_interface/CInterfaceManualTests.cpp index 2b4d1042c0c15b0b6469250f688babe7632252bf..a1506f7413e66ef6b0cfc5576289c75a3c8b27ee 100644 --- a/src/plugins/api_tests/src/core/external_script/base_scheme_interface/CInterfaceManualTests.cpp +++ b/src/plugins/api_tests/src/core/external_script/base_scheme_interface/CInterfaceManualTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -20,6 +20,8 @@ */ #include <U2Core/U2OpStatusUtils.h> +#include <U2Core/U2SafePoints.h> + #include "SchemeSimilarityUtils.h" #include "CInterfaceManualTests.h" @@ -653,7 +655,7 @@ IMPLEMENT_TEST( CInterfaceManualTests, call_variants ) { U2OpStatusImpl stateInfo; SchemeSimilarityUtils::checkSchemesSimilarity( scheme, - PROPER_WD_SCHEMES_PATH + "/NGS/call_variants.uwl", stateInfo ); + PROPER_WD_SCHEMES_PATH + "/NGS/ngs_variant_calling.uwl", stateInfo ); CHECK_NO_ERROR( stateInfo ); releaseScheme( scheme ); @@ -1055,6 +1057,7 @@ IMPLEMENT_TEST( CInterfaceManualTests, tuxedo_main_paired ) { CHECK_U2_ERROR( error ); error = addSchemeActorsBinding( scheme, getFileList2, L"url", filesConversion2, L"in-file.url" ); + CHECK_U2_ERROR( error ); error = addSchemeActorsBinding( scheme, getFileList1, L"dataset", topHat, L"in-sequence.dataset" ); CHECK_U2_ERROR( error ); diff --git a/src/plugins/api_tests/src/core/external_script/base_scheme_interface/CInterfaceManualTests.h b/src/plugins/api_tests/src/core/external_script/base_scheme_interface/CInterfaceManualTests.h index bfd2499ea29e4a345a2979219730fc9510bbcdb1..3ca65a5c5a4c1e9f94a3a3892372de949610f53f 100644 --- a/src/plugins/api_tests/src/core/external_script/base_scheme_interface/CInterfaceManualTests.h +++ b/src/plugins/api_tests/src/core/external_script/base_scheme_interface/CInterfaceManualTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/external_script/base_scheme_interface/CInterfaceSasTests.cpp b/src/plugins/api_tests/src/core/external_script/base_scheme_interface/CInterfaceSasTests.cpp index 43495fe769af32dc82767a1a3f4313c2498f7dae..915fdd61f7605ab0b6d9677908807b430d9f4e2a 100644 --- a/src/plugins/api_tests/src/core/external_script/base_scheme_interface/CInterfaceSasTests.cpp +++ b/src/plugins/api_tests/src/core/external_script/base_scheme_interface/CInterfaceSasTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -373,6 +373,7 @@ IMPLEMENT_TEST( CInterfaceSasTests, import_phred_qualities_sas ) { QString readerName; CHECK_U2_ERROR( error ); error = getActorDisplayName( "read-sequence", readerName ); + CHECK_U2_ERROR( error ); gauto_array<wchar_t> wReaderName( toDisposableWString( readerName ) ); error = setSchemeElementAttribute( scheme, wReaderName.get( ), L"url-in.dataset", L"Dataset 1" ); diff --git a/src/plugins/api_tests/src/core/external_script/base_scheme_interface/CInterfaceSasTests.h b/src/plugins/api_tests/src/core/external_script/base_scheme_interface/CInterfaceSasTests.h index 18c29a521c7c61f50b8d5983ac8967929f3702a6..bcfd6a749f8debb8185c99c5a0f5a515c3462b44 100644 --- a/src/plugins/api_tests/src/core/external_script/base_scheme_interface/CInterfaceSasTests.h +++ b/src/plugins/api_tests/src/core/external_script/base_scheme_interface/CInterfaceSasTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/external_script/base_scheme_interface/SchemeSimilarityUtils.cpp b/src/plugins/api_tests/src/core/external_script/base_scheme_interface/SchemeSimilarityUtils.cpp index 1977af6e16f331cb230316f9757aabaed468ac28..f3941f883eff86cc034656c72c98e28f7e98f1b7 100644 --- a/src/plugins/api_tests/src/core/external_script/base_scheme_interface/SchemeSimilarityUtils.cpp +++ b/src/plugins/api_tests/src/core/external_script/base_scheme_interface/SchemeSimilarityUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/external_script/base_scheme_interface/SchemeSimilarityUtils.h b/src/plugins/api_tests/src/core/external_script/base_scheme_interface/SchemeSimilarityUtils.h index 580c9e25cfffa988f69945868d4e86a2fa088a7c..d35b1fe792ed7564c3bc3830f736cf7dbf051304 100644 --- a/src/plugins/api_tests/src/core/external_script/base_scheme_interface/SchemeSimilarityUtils.h +++ b/src/plugins/api_tests/src/core/external_script/base_scheme_interface/SchemeSimilarityUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/format/fastq/FastqUnitTests.cpp b/src/plugins/api_tests/src/core/format/fastq/FastqUnitTests.cpp index 22fc15a6c4748858d2cbe10e31de31ec3db65658..d7dd9f96c04b71cd3fad66c6dd39a0c7a0fe4080 100755 --- a/src/plugins/api_tests/src/core/format/fastq/FastqUnitTests.cpp +++ b/src/plugins/api_tests/src/core/format/fastq/FastqUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/format/fastq/FastqUnitTests.h b/src/plugins/api_tests/src/core/format/fastq/FastqUnitTests.h index 7f89eb0714a25b16ec1cfeffa5988ab7d0cb1949..49bc3f25062ef3217b19256b6c9bb1d3a8d308f5 100755 --- a/src/plugins/api_tests/src/core/format/fastq/FastqUnitTests.h +++ b/src/plugins/api_tests/src/core/format/fastq/FastqUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/format/genbank/LocationParserUnitTests.cpp b/src/plugins/api_tests/src/core/format/genbank/LocationParserUnitTests.cpp index 595545c71d7c15a2cfcbb47e57c687b758c8e0e8..b0c594bad7d1f8eccb9a31cfcdbd0181c5139202 100755 --- a/src/plugins/api_tests/src/core/format/genbank/LocationParserUnitTests.cpp +++ b/src/plugins/api_tests/src/core/format/genbank/LocationParserUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/format/genbank/LocationParserUnitTests.h b/src/plugins/api_tests/src/core/format/genbank/LocationParserUnitTests.h index 2ef09be42bc2367b8ef682f427e73640ce657ac3..b3445e7e75257144ba7e597451dba2456da0c2a3 100755 --- a/src/plugins/api_tests/src/core/format/genbank/LocationParserUnitTests.h +++ b/src/plugins/api_tests/src/core/format/genbank/LocationParserUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/format/sqlite_mod_dbi/ModDbiSQLiteSpecificUnitTests.cpp b/src/plugins/api_tests/src/core/format/sqlite_mod_dbi/ModDbiSQLiteSpecificUnitTests.cpp index 707477d91c10f9b4b1acd455cdd1a14a17711d9a..4150a7579e8344784dc7312d97ed5701dfbb7860 100644 --- a/src/plugins/api_tests/src/core/format/sqlite_mod_dbi/ModDbiSQLiteSpecificUnitTests.cpp +++ b/src/plugins/api_tests/src/core/format/sqlite_mod_dbi/ModDbiSQLiteSpecificUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -378,7 +378,7 @@ IMPLEMENT_TEST(ModDbiSQLiteSpecificUnitTests, updateMsaName_severalUndoThenActio for (int i = 1; i < 6; ++i) { names << "Renamed alignment" + QString::number(i); } - QString newName("Action occured"); + QString newName("Action occurred"); // Steps count int valuesCount = names.length(); // changes = valuesCount - 1; @@ -1674,7 +1674,7 @@ IMPLEMENT_TEST(ModDbiSQLiteSpecificUnitTests, updateRowName_severalUndoThenActio for (int i = 0; i < 6; ++i) { rowNames << rowNames[i] + "test"; } - QString newRowName("Action occured"); + QString newRowName("Action occurred"); // Steps count int valuesCount = rowNames.length(); // changes = valuesCount - 1; diff --git a/src/plugins/api_tests/src/core/format/sqlite_mod_dbi/ModDbiSQLiteSpecificUnitTests.h b/src/plugins/api_tests/src/core/format/sqlite_mod_dbi/ModDbiSQLiteSpecificUnitTests.h index 166a88ef869a6a946587234d793224d318f97cc3..f48e286338ea490a694756e74e452293ec6893f7 100644 --- a/src/plugins/api_tests/src/core/format/sqlite_mod_dbi/ModDbiSQLiteSpecificUnitTests.h +++ b/src/plugins/api_tests/src/core/format/sqlite_mod_dbi/ModDbiSQLiteSpecificUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/format/sqlite_msa_dbi/MsaDbiSQLiteSpecificUnitTests.cpp b/src/plugins/api_tests/src/core/format/sqlite_msa_dbi/MsaDbiSQLiteSpecificUnitTests.cpp index b1fd81cb2cb52c701600df700e7fc7d4f63c8400..36b7095aa7fa6a2540ee803a5f596743b83404e1 100644 --- a/src/plugins/api_tests/src/core/format/sqlite_msa_dbi/MsaDbiSQLiteSpecificUnitTests.cpp +++ b/src/plugins/api_tests/src/core/format/sqlite_msa_dbi/MsaDbiSQLiteSpecificUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/format/sqlite_msa_dbi/MsaDbiSQLiteSpecificUnitTests.h b/src/plugins/api_tests/src/core/format/sqlite_msa_dbi/MsaDbiSQLiteSpecificUnitTests.h index 06c82e3215ac9a8572314f92d97b6cb80864f722..496968f928c85ca3f1afe7ac208bc3bc58ca868e 100644 --- a/src/plugins/api_tests/src/core/format/sqlite_msa_dbi/MsaDbiSQLiteSpecificUnitTests.h +++ b/src/plugins/api_tests/src/core/format/sqlite_msa_dbi/MsaDbiSQLiteSpecificUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/format/sqlite_object_dbi/SQLiteObjectDbiUnitTests.cpp b/src/plugins/api_tests/src/core/format/sqlite_object_dbi/SQLiteObjectDbiUnitTests.cpp index ed1ec1b52e3ca69d280b8bdba57f4be82d9f9814..d2fdc6f5da37591c834b197d76010c7b7c570ead 100644 --- a/src/plugins/api_tests/src/core/format/sqlite_object_dbi/SQLiteObjectDbiUnitTests.cpp +++ b/src/plugins/api_tests/src/core/format/sqlite_object_dbi/SQLiteObjectDbiUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/format/sqlite_object_dbi/SQLiteObjectDbiUnitTests.h b/src/plugins/api_tests/src/core/format/sqlite_object_dbi/SQLiteObjectDbiUnitTests.h index dc3208e70b440b408d4bc777a9672dcba3ae949d..ae8472f98e2e002cb4d9f92f61066f8c1c334842 100644 --- a/src/plugins/api_tests/src/core/format/sqlite_object_dbi/SQLiteObjectDbiUnitTests.h +++ b/src/plugins/api_tests/src/core/format/sqlite_object_dbi/SQLiteObjectDbiUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/format/sqlite_sequence_dbi/SequenceDbiSQLiteSpecificUnitTests.cpp b/src/plugins/api_tests/src/core/format/sqlite_sequence_dbi/SequenceDbiSQLiteSpecificUnitTests.cpp index c58dc357fdffdc5ddc35f072b1df7164a88bf6bb..ecfbc2bd91751b90f846cccc80ba122f8083594d 100644 --- a/src/plugins/api_tests/src/core/format/sqlite_sequence_dbi/SequenceDbiSQLiteSpecificUnitTests.cpp +++ b/src/plugins/api_tests/src/core/format/sqlite_sequence_dbi/SequenceDbiSQLiteSpecificUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/format/sqlite_sequence_dbi/SequenceDbiSQLiteSpecificUnitTests.h b/src/plugins/api_tests/src/core/format/sqlite_sequence_dbi/SequenceDbiSQLiteSpecificUnitTests.h index 70dd6f344c6568c2ab2f5e063aa86d81e5576538..171b686663f856e90ca3978ee17166608fd4bae8 100644 --- a/src/plugins/api_tests/src/core/format/sqlite_sequence_dbi/SequenceDbiSQLiteSpecificUnitTests.h +++ b/src/plugins/api_tests/src/core/format/sqlite_sequence_dbi/SequenceDbiSQLiteSpecificUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/gobjects/BioStruct3DObjectUnitTests.cpp b/src/plugins/api_tests/src/core/gobjects/BioStruct3DObjectUnitTests.cpp index 2047ae22b767d237d93ee7592cf4b109f5b29047..180f96033455350acb754d7f12c015f0f3c8fec1 100644 --- a/src/plugins/api_tests/src/core/gobjects/BioStruct3DObjectUnitTests.cpp +++ b/src/plugins/api_tests/src/core/gobjects/BioStruct3DObjectUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/gobjects/BioStruct3DObjectUnitTests.h b/src/plugins/api_tests/src/core/gobjects/BioStruct3DObjectUnitTests.h index 45c090fffa9eee86ce96a0bc2661e40e393b09c0..5217a806ce06a7a2bad1a26e9e2905fa3a463fbf 100644 --- a/src/plugins/api_tests/src/core/gobjects/BioStruct3DObjectUnitTests.h +++ b/src/plugins/api_tests/src/core/gobjects/BioStruct3DObjectUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/gobjects/DNAChromatogramObjectUnitTests.cpp b/src/plugins/api_tests/src/core/gobjects/DNAChromatogramObjectUnitTests.cpp index 97a54fc29e5521d685f753f5d46db1f84011c8a4..9f1373fa447bb16a1496e3c8eec80504202ac7ab 100644 --- a/src/plugins/api_tests/src/core/gobjects/DNAChromatogramObjectUnitTests.cpp +++ b/src/plugins/api_tests/src/core/gobjects/DNAChromatogramObjectUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/gobjects/DNAChromatogramObjectUnitTests.h b/src/plugins/api_tests/src/core/gobjects/DNAChromatogramObjectUnitTests.h index 63eb563f20544aabb425121805413d72d4007f31..a2882ba1487dce02a4c4dc24a83bf84492ce3dce 100644 --- a/src/plugins/api_tests/src/core/gobjects/DNAChromatogramObjectUnitTests.h +++ b/src/plugins/api_tests/src/core/gobjects/DNAChromatogramObjectUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/gobjects/FeaturesTableObjectUnitTest.cpp b/src/plugins/api_tests/src/core/gobjects/FeaturesTableObjectUnitTest.cpp index 7b46c37b60f4e4885eab1b23dc249e561daa15fd..a408a77fb0b018bda08d607e4e2de7479497e77f 100644 --- a/src/plugins/api_tests/src/core/gobjects/FeaturesTableObjectUnitTest.cpp +++ b/src/plugins/api_tests/src/core/gobjects/FeaturesTableObjectUnitTest.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/gobjects/FeaturesTableObjectUnitTest.h b/src/plugins/api_tests/src/core/gobjects/FeaturesTableObjectUnitTest.h index 97ce40660480d053aa8cec00b31717036b4a5528..d90545542db2ff0620b501ad8559416392491414 100644 --- a/src/plugins/api_tests/src/core/gobjects/FeaturesTableObjectUnitTest.h +++ b/src/plugins/api_tests/src/core/gobjects/FeaturesTableObjectUnitTest.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/gobjects/MsaObjectUnitTests.cpp b/src/plugins/api_tests/src/core/gobjects/MsaObjectUnitTests.cpp index 505e0c55d85c10b5872d057f72687ec184da1518..809eea6fad6ebf3feca8254b89e29c5b2a864613 100644 --- a/src/plugins/api_tests/src/core/gobjects/MsaObjectUnitTests.cpp +++ b/src/plugins/api_tests/src/core/gobjects/MsaObjectUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/gobjects/MsaObjectUnitTests.h b/src/plugins/api_tests/src/core/gobjects/MsaObjectUnitTests.h index dc6ae01eddceeba4e857211958c1c8cbfbfc83f0..e7be5e7f232a69aee0d72550ff6cd1cf51ba4d38 100644 --- a/src/plugins/api_tests/src/core/gobjects/MsaObjectUnitTests.h +++ b/src/plugins/api_tests/src/core/gobjects/MsaObjectUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/gobjects/PhyTreeObjectUnitTests.cpp b/src/plugins/api_tests/src/core/gobjects/PhyTreeObjectUnitTests.cpp index 80187c2d1eba95f920fcc97b10c4ffc1f5c154ee..306633848a57b4c404a2d1aca3aaa59703f9b96d 100644 --- a/src/plugins/api_tests/src/core/gobjects/PhyTreeObjectUnitTests.cpp +++ b/src/plugins/api_tests/src/core/gobjects/PhyTreeObjectUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/gobjects/PhyTreeObjectUnitTests.h b/src/plugins/api_tests/src/core/gobjects/PhyTreeObjectUnitTests.h index 62880b71c9529b6e19d0de97d29f70fd4c9977f9..c6fffccec6269a1cf13a1307f207f3f0e501f5ac 100644 --- a/src/plugins/api_tests/src/core/gobjects/PhyTreeObjectUnitTests.h +++ b/src/plugins/api_tests/src/core/gobjects/PhyTreeObjectUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/gobjects/TextObjectUnitTests.cpp b/src/plugins/api_tests/src/core/gobjects/TextObjectUnitTests.cpp index 647a61c52b8c85628f042379e985d40188ae4612..7c1afdaca90c9282bb7a58ba356e71f461a2f8d0 100644 --- a/src/plugins/api_tests/src/core/gobjects/TextObjectUnitTests.cpp +++ b/src/plugins/api_tests/src/core/gobjects/TextObjectUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,11 +19,12 @@ * MA 02110-1301, USA. */ +#include <U2Core/UdrDbi.h> #include <U2Core/RawDataUdrSchema.h> #include <U2Core/TextObject.h> #include <U2Core/U2ObjectDbi.h> #include <U2Core/U2OpStatusUtils.h> -#include <U2Core/UdrDbi.h> +#include <U2Core/U2SafePoints.h> #include "TextObjectUnitTests.h" diff --git a/src/plugins/api_tests/src/core/gobjects/TextObjectUnitTests.h b/src/plugins/api_tests/src/core/gobjects/TextObjectUnitTests.h index c290747f0249ac63d31cc6e38eb34ca859a01ab0..dcc158baf0c1ad816fd532914f2ca4c43846f42b 100644 --- a/src/plugins/api_tests/src/core/gobjects/TextObjectUnitTests.h +++ b/src/plugins/api_tests/src/core/gobjects/TextObjectUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/util/DatatypeSerializeUtilsUnitTest.cpp b/src/plugins/api_tests/src/core/util/DatatypeSerializeUtilsUnitTest.cpp index 57d274bae676f86b55e16eff4c70df55ac6ff79c..93086caf164a0679f0bf4c1830a993ff8982bb82 100644 --- a/src/plugins/api_tests/src/core/util/DatatypeSerializeUtilsUnitTest.cpp +++ b/src/plugins/api_tests/src/core/util/DatatypeSerializeUtilsUnitTest.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/util/DatatypeSerializeUtilsUnitTest.h b/src/plugins/api_tests/src/core/util/DatatypeSerializeUtilsUnitTest.h index 88d5ad06035dc19e988a425dee042c52b3abd779..df58805c7a44ff72b871d0fa8f428e9d9183d9c8 100644 --- a/src/plugins/api_tests/src/core/util/DatatypeSerializeUtilsUnitTest.h +++ b/src/plugins/api_tests/src/core/util/DatatypeSerializeUtilsUnitTest.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/util/MsaDbiUtilsUnitTests.cpp b/src/plugins/api_tests/src/core/util/MsaDbiUtilsUnitTests.cpp index 78eeabac6c801a864906cc830232c230cd628230..55e80e94305963c5f95bf6051eb292067987772f 100644 --- a/src/plugins/api_tests/src/core/util/MsaDbiUtilsUnitTests.cpp +++ b/src/plugins/api_tests/src/core/util/MsaDbiUtilsUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -1344,10 +1344,18 @@ IMPLEMENT_TEST(MsaDbiUtilsUnitTests, removeRegion_wrongId) { while (true == baseRowIds.contains(customId)) { customId = rand(); } + + QStringList ids; + foreach (qint64 id, rowIds) { + ids << QString::number(id); + } + coreLog.details(QString("MsaDbiUtilsUnitTests_removeRegion_wrongId: Existing IDs: %1; a custom wrong ID: %2").arg(ids.join(", ")).arg(customId)); + rowIds << customId; U2OpStatusImpl tmpOs; MsaDbiUtils::removeRegion(msaRef, rowIds, 0, 5, tmpOs); - CHECK_TRUE(tmpOs.hasError(), "No error occurred for negative pos"); + CHECK_TRUE(tmpOs.hasError(), "No error occurred for wrong ID"); + coreLog.details(QString("MsaDbiUtilsUnitTests_removeRegion_wrongId: an error message in tmpOs: %1").arg(tmpOs.getError())); } IMPLEMENT_TEST(MsaDbiUtilsUnitTests, removeRegion_wrongCount) { @@ -1363,7 +1371,7 @@ IMPLEMENT_TEST(MsaDbiUtilsUnitTests, removeRegion_wrongCount) { rowIds << baseRowIds[0]; U2OpStatusImpl tmpOs; MsaDbiUtils::removeRegion(msaRef, rowIds, 0, 0, tmpOs); - CHECK_TRUE(tmpOs.hasError(), "No error occurred for negative pos"); + CHECK_TRUE(tmpOs.hasError(), "No error occurred for wrong count"); MultipleSequenceAlignmentExporter ex; MultipleSequenceAlignment al = ex.getAlignment(msaRef.dbiRef, msaRef.entityId, os); diff --git a/src/plugins/api_tests/src/core/util/MsaDbiUtilsUnitTests.h b/src/plugins/api_tests/src/core/util/MsaDbiUtilsUnitTests.h index 004e62d50aef37f6854b6367e63d1cac654ad3df..a8be07edad1c4618767e4d76234cff34472fb853 100644 --- a/src/plugins/api_tests/src/core/util/MsaDbiUtilsUnitTests.h +++ b/src/plugins/api_tests/src/core/util/MsaDbiUtilsUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/util/MsaImporterExporterUnitTests.cpp b/src/plugins/api_tests/src/core/util/MsaImporterExporterUnitTests.cpp index 5f44740b77baf249c56bacd384de87d323d5641e..7fe57a02a58b3dbde9c8d9c538e29b09c9bd9d33 100644 --- a/src/plugins/api_tests/src/core/util/MsaImporterExporterUnitTests.cpp +++ b/src/plugins/api_tests/src/core/util/MsaImporterExporterUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/util/MsaImporterExporterUnitTests.h b/src/plugins/api_tests/src/core/util/MsaImporterExporterUnitTests.h index 1a71b2b169992a2de66cf0cf0700f6266a084456..b507cb7c81b03c06974a70f1b745f04a18bfd338 100644 --- a/src/plugins/api_tests/src/core/util/MsaImporterExporterUnitTests.h +++ b/src/plugins/api_tests/src/core/util/MsaImporterExporterUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/util/MsaUtilsUnitTests.cpp b/src/plugins/api_tests/src/core/util/MsaUtilsUnitTests.cpp index c7d7721204ed430725732713a2814e71771c8881..31fb45e97b0898a88345d905e58ab5dfbdb2eff8 100644 --- a/src/plugins/api_tests/src/core/util/MsaUtilsUnitTests.cpp +++ b/src/plugins/api_tests/src/core/util/MsaUtilsUnitTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/core/util/MsaUtilsUnitTests.h b/src/plugins/api_tests/src/core/util/MsaUtilsUnitTests.h index f8db822ab8498957372e14b75ddcaa39ba2b0986..50bbc31315a709f7ad22f144708ea2ab31326031 100644 --- a/src/plugins/api_tests/src/core/util/MsaUtilsUnitTests.h +++ b/src/plugins/api_tests/src/core/util/MsaUtilsUnitTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/api_tests/src/unittest.h b/src/plugins/api_tests/src/unittest.h index 61d6d86e1c7a17e71bea3abe46052312194a78c2..8a58488a1a8a78e7ea42bf009b7011394f84ab8f 100755 --- a/src/plugins/api_tests/src/unittest.h +++ b/src/plugins/api_tests/src/unittest.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,9 +22,6 @@ #ifndef _U2_UNIT_TEST_H_ #define _U2_UNIT_TEST_H_ -#include <U2Core/U2SafePoints.h> - -#include <QMetaType> #include <QString> diff --git a/src/plugins/biostruct3d_view/biostruct3d_view.pri b/src/plugins/biostruct3d_view/biostruct3d_view.pri index 858499841cde0fe2571e2398c4280811a197852d..b6fd8af81b199a9ac1153b0d0fabd93a2dfbf9c9 100644 --- a/src/plugins/biostruct3d_view/biostruct3d_view.pri +++ b/src/plugins/biostruct3d_view/biostruct3d_view.pri @@ -22,11 +22,7 @@ PLUGIN_MODE=ui include( ../../ugene_plugin_common.pri ) -win32-msvc2013 { - LIBS += opengl32.lib -} - -win32-msvc2015 { +win32-msvc2013|win32-msvc2015|greaterThan(QMAKE_MSC_VER, 1909) { LIBS += opengl32.lib } diff --git a/src/plugins/biostruct3d_view/src/AnaglyphRenderer.cpp b/src/plugins/biostruct3d_view/src/AnaglyphRenderer.cpp index a0b517372c98215f2775e2e703ca921540c2ebe8..74800040c9a630d1b035d1ef2fe0e80200fa476d 100644 --- a/src/plugins/biostruct3d_view/src/AnaglyphRenderer.cpp +++ b/src/plugins/biostruct3d_view/src/AnaglyphRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/AnaglyphRenderer.h b/src/plugins/biostruct3d_view/src/AnaglyphRenderer.h index 8299aede31e2cd4aa8ca21bf08012f150971c016..0b8281ac7de50cf3b5e4e6b5b5e8c6ae2f22e480 100644 --- a/src/plugins/biostruct3d_view/src/AnaglyphRenderer.h +++ b/src/plugins/biostruct3d_view/src/AnaglyphRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/BallAndStickGLRenderer.cpp b/src/plugins/biostruct3d_view/src/BallAndStickGLRenderer.cpp index 67c1c3ba9c0b324f1b060ca28246530104b1a1ce..7e0fe419867b5944009771055a0a491b63dd671f 100644 --- a/src/plugins/biostruct3d_view/src/BallAndStickGLRenderer.cpp +++ b/src/plugins/biostruct3d_view/src/BallAndStickGLRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,7 +34,7 @@ namespace U2 { -const QString BallAndStickGLRenderer::ID(QObject::tr("Ball-and-Stick")); +const QString BallAndStickGLRenderer::ID("Ball-and-Stick"); QList<GLuint> BallAndStickGLRenderer::dlIndexStorage; QMutex BallAndStickGLRenderer::mutex; diff --git a/src/plugins/biostruct3d_view/src/BallAndStickGLRenderer.h b/src/plugins/biostruct3d_view/src/BallAndStickGLRenderer.h index 4d196c117813125986877f1397bfb0560838e249..6fe54c6fe695bd12c82685f486ccb31ae6dc1824 100644 --- a/src/plugins/biostruct3d_view/src/BallAndStickGLRenderer.h +++ b/src/plugins/biostruct3d_view/src/BallAndStickGLRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/BioStruct3DColorScheme.cpp b/src/plugins/biostruct3d_view/src/BioStruct3DColorScheme.cpp index d1165f471e22595fa4ea3c94138a1c0a51287510..a278583f879a2794353a842e9b061d6ebe197d9f 100644 --- a/src/plugins/biostruct3d_view/src/BioStruct3DColorScheme.cpp +++ b/src/plugins/biostruct3d_view/src/BioStruct3DColorScheme.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/BioStruct3DColorScheme.h b/src/plugins/biostruct3d_view/src/BioStruct3DColorScheme.h index e14c1842ee766a8563d4eab5783931dddd7eab34..91decc07a86339d355c29ee5724c08ed7c02e955 100644 --- a/src/plugins/biostruct3d_view/src/BioStruct3DColorScheme.h +++ b/src/plugins/biostruct3d_view/src/BioStruct3DColorScheme.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/BioStruct3DGLImageExportTask.cpp b/src/plugins/biostruct3d_view/src/BioStruct3DGLImageExportTask.cpp index b4adbd8e3818a59322f4faa5fb1168af00f92440..d1be9cec03d1c892abbe5912557b65827ff6958a 100644 --- a/src/plugins/biostruct3d_view/src/BioStruct3DGLImageExportTask.cpp +++ b/src/plugins/biostruct3d_view/src/BioStruct3DGLImageExportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/BioStruct3DGLImageExportTask.h b/src/plugins/biostruct3d_view/src/BioStruct3DGLImageExportTask.h index 9fe7b96a39985b5dfccc9660620d850e0226d587..9049cb8c1b28ef24ce03a462ff4c609a40a51cb5 100644 --- a/src/plugins/biostruct3d_view/src/BioStruct3DGLImageExportTask.h +++ b/src/plugins/biostruct3d_view/src/BioStruct3DGLImageExportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/BioStruct3DGLRender.cpp b/src/plugins/biostruct3d_view/src/BioStruct3DGLRender.cpp index 7f08f41e5bcb4ba63dbc2aeb99dcc447fc2e25f0..fb731133910b82c0fb60c7e76613a66ff7bee153 100644 --- a/src/plugins/biostruct3d_view/src/BioStruct3DGLRender.cpp +++ b/src/plugins/biostruct3d_view/src/BioStruct3DGLRender.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/BioStruct3DGLRender.h b/src/plugins/biostruct3d_view/src/BioStruct3DGLRender.h index f62a2805b8854835dbd710534159181dd6e94cb0..79ecf9f6ff8a2445e8fb9b5569072fb7e4ae5ccc 100644 --- a/src/plugins/biostruct3d_view/src/BioStruct3DGLRender.h +++ b/src/plugins/biostruct3d_view/src/BioStruct3DGLRender.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/BioStruct3DGLWidget.cpp b/src/plugins/biostruct3d_view/src/BioStruct3DGLWidget.cpp index 4ac4e176fcf70832ff52a36e3df987e9656bc59f..bb2246ce762851b0aad396d89ed2dbca5b7161f5 100644 --- a/src/plugins/biostruct3d_view/src/BioStruct3DGLWidget.cpp +++ b/src/plugins/biostruct3d_view/src/BioStruct3DGLWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,12 +19,16 @@ * MA 02110-1301, USA. */ +#include <math.h> #include <time.h> #include <QColorDialog> #include <QImageWriter> #include <QMessageBox> #include <QMouseEvent> +#include <QOffscreenSurface> +#include <QOpenGLContext> +#include <QOpenGLShaderProgram> #include <QTime> #include <U2Algorithm/MolecularSurfaceFactoryRegistry.h> @@ -74,11 +78,30 @@ namespace U2 { int BioStruct3DGLWidget::widgetCount = 0; +bool BioStruct3DGLWidget::checkShaderPrograms() { + QOffscreenSurface surf; + surf.create(); + + QOpenGLContext ctx; + ctx.create(); + ctx.makeCurrent(&surf); + + bool opgl = QOpenGLShaderProgram::hasOpenGLShaderPrograms(&ctx); + if (!opgl) { + coreLog.error(tr("The \"3D Structure Viewer\" was disabled, because shader programs written in the OpenGL Shading Language (GLSL) are not supported on this system. " + "Please try to update drivers and reset the UGENE settings to default in the \"Application Settings\" dialog.")); + } + + return opgl; +} + void BioStruct3DGLWidget::tryGL() { volatile QOpenGLWidget wgt; Q_UNUSED(wgt); } +const double BioStruct3DGLWidget::MINIMUM_ACCEPTABLE_VERSION = 2.0f; + static QColor DEFAULT_BACKGROUND_COLOR = Qt::black; static QColor DEFAULT_SELECTION_COLOR = Qt::yellow; @@ -1095,7 +1118,7 @@ void BioStruct3DGLWidget::sl_resetAlignment() { void BioStruct3DGLWidget::sl_onAlignmentDone(Task *task) { if (!task->hasError()) { StructuralAlignmentTask *saTask = qobject_cast<StructuralAlignmentTask*> (task); - assert(saTask && "Task shoud have type StructuralAlignmentTask"); + assert(saTask && "Task should have type StructuralAlignmentTask"); StructuralAlignment result = saTask->getResult(); StructuralAlignmentTaskSettings settings = saTask->getSettings(); diff --git a/src/plugins/biostruct3d_view/src/BioStruct3DGLWidget.h b/src/plugins/biostruct3d_view/src/BioStruct3DGLWidget.h index 7cc893727297fb71885ec263841b8be35ac91418..900f34560e2ef861d5b17a633c95ac38d3ec30e5 100644 --- a/src/plugins/biostruct3d_view/src/BioStruct3DGLWidget.h +++ b/src/plugins/biostruct3d_view/src/BioStruct3DGLWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -93,8 +93,11 @@ class BioStruct3DGLWidget : public QOpenGLWidget static int widgetCount; public: // Used in PluginChecker to detect whether the GL is available + static bool checkShaderPrograms(); static void tryGL(); + static const double MINIMUM_ACCEPTABLE_VERSION; + public: /*! * Constructor. diff --git a/src/plugins/biostruct3d_view/src/BioStruct3DSplitter.cpp b/src/plugins/biostruct3d_view/src/BioStruct3DSplitter.cpp index c65695aaec0b79f7b3f745ff7a78ca3e0d63a4a3..ca6b60c3f14e2efca4804bf953a4ef627324b0fc 100644 --- a/src/plugins/biostruct3d_view/src/BioStruct3DSplitter.cpp +++ b/src/plugins/biostruct3d_view/src/BioStruct3DSplitter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/BioStruct3DSplitter.h b/src/plugins/biostruct3d_view/src/BioStruct3DSplitter.h index fc3b03dd22bd2f96c6f391a18538c25b4ffb88dc..1cf7fe49cf4d663ff4cb3f203f16250f6f5621cd 100644 --- a/src/plugins/biostruct3d_view/src/BioStruct3DSplitter.h +++ b/src/plugins/biostruct3d_view/src/BioStruct3DSplitter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/BioStruct3DSubsetEditor.cpp b/src/plugins/biostruct3d_view/src/BioStruct3DSubsetEditor.cpp index bfbafe60c13ccd9c78aa10971db501c1a006a6a0..57f5e665341cae0d6c2e5d496efbadb9592352a8 100644 --- a/src/plugins/biostruct3d_view/src/BioStruct3DSubsetEditor.cpp +++ b/src/plugins/biostruct3d_view/src/BioStruct3DSubsetEditor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/BioStruct3DSubsetEditor.h b/src/plugins/biostruct3d_view/src/BioStruct3DSubsetEditor.h index 7fc7e5184ddd9dee08c3f72a183f8b7672e19399..e2b07efbec2bf70af6d5ad787b2453321d530b89 100644 --- a/src/plugins/biostruct3d_view/src/BioStruct3DSubsetEditor.h +++ b/src/plugins/biostruct3d_view/src/BioStruct3DSubsetEditor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/BioStruct3DViewPlugin.cpp b/src/plugins/biostruct3d_view/src/BioStruct3DViewPlugin.cpp index 27d7a6a5dbd6cfe07be870759dbeb7b697874abc..01c8de748e786231460a151bae6791974d5edb5e 100644 --- a/src/plugins/biostruct3d_view/src/BioStruct3DViewPlugin.cpp +++ b/src/plugins/biostruct3d_view/src/BioStruct3DViewPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -79,6 +79,7 @@ extern "C" Q_DECL_EXPORT Plugin* U2_PLUGIN_INIT_FUNC() { } extern "C" Q_DECL_EXPORT bool U2_PLUGIN_VERIFY_FUNC() { + BioStruct3DGLWidget::checkShaderPrograms(); BioStruct3DGLWidget::tryGL(); return true; } @@ -93,8 +94,10 @@ BioStruct3DViewPlugin::BioStruct3DViewPlugin() : Plugin(tr("3D Structure Viewer"), tr("Visualizes 3D structures of biological molecules.")) { // Init plugin view context - viewContext = new BioStruct3DViewContext(this); - viewContext->init(); + if (BioStruct3DGLWidget::checkShaderPrograms()) { + viewContext = new BioStruct3DViewContext(this); + viewContext->init(); + } } BioStruct3DViewPlugin::~BioStruct3DViewPlugin() diff --git a/src/plugins/biostruct3d_view/src/BioStruct3DViewPlugin.h b/src/plugins/biostruct3d_view/src/BioStruct3DViewPlugin.h index 0bae19f444c556db7a87487aabe9900289fe15b7..b425e616bc7524386997bae3ec592bf71e2cc8f3 100644 --- a/src/plugins/biostruct3d_view/src/BioStruct3DViewPlugin.h +++ b/src/plugins/biostruct3d_view/src/BioStruct3DViewPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/GLFrameManager.cpp b/src/plugins/biostruct3d_view/src/GLFrameManager.cpp index 89fef38c1dc9e1e4e8454cdfb4d933a510e05bf4..e86c41f0ac3844668f43f69dd03a9750b66803ac 100644 --- a/src/plugins/biostruct3d_view/src/GLFrameManager.cpp +++ b/src/plugins/biostruct3d_view/src/GLFrameManager.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/GLFrameManager.h b/src/plugins/biostruct3d_view/src/GLFrameManager.h index d5d1ce0b7539a27aa883f16f2e8f88a5dcbf5845..f35afd069957cc6a21e400eb7dd239a436c9c942 100644 --- a/src/plugins/biostruct3d_view/src/GLFrameManager.h +++ b/src/plugins/biostruct3d_view/src/GLFrameManager.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/GraphicUtils.cpp b/src/plugins/biostruct3d_view/src/GraphicUtils.cpp index b896adb080d8dba0eef566f314290691c84883a2..f59d78907ebdd850981ffe2338db3a83fbe55494 100644 --- a/src/plugins/biostruct3d_view/src/GraphicUtils.cpp +++ b/src/plugins/biostruct3d_view/src/GraphicUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/GraphicUtils.h b/src/plugins/biostruct3d_view/src/GraphicUtils.h index 446ef9b0448e801559aff98d88aea95d3425d212..f8fe6f3a12c06a75dfc414040c5cba921e2c451e 100644 --- a/src/plugins/biostruct3d_view/src/GraphicUtils.h +++ b/src/plugins/biostruct3d_view/src/GraphicUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/MolecularSurfaceRenderer.cpp b/src/plugins/biostruct3d_view/src/MolecularSurfaceRenderer.cpp index 3003d23a4822e3f5f99a13e8d1730d9c462ad39a..23ca0767a701af06cb5fecbe5d086634b14dd6d0 100644 --- a/src/plugins/biostruct3d_view/src/MolecularSurfaceRenderer.cpp +++ b/src/plugins/biostruct3d_view/src/MolecularSurfaceRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/MolecularSurfaceRenderer.h b/src/plugins/biostruct3d_view/src/MolecularSurfaceRenderer.h index c7213ea9d0a108f977d0c63bfcea4d54e2138de8..f6db1679033ff6cf422f1c87ca6de1ccc83e8e99 100644 --- a/src/plugins/biostruct3d_view/src/MolecularSurfaceRenderer.h +++ b/src/plugins/biostruct3d_view/src/MolecularSurfaceRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/SelectModelsDialog.cpp b/src/plugins/biostruct3d_view/src/SelectModelsDialog.cpp index e9b6d53a500445be9462984872ba46d14ed9efaa..dbd31cdad9a12f689ad25621e1a5e78fd09ec0c1 100644 --- a/src/plugins/biostruct3d_view/src/SelectModelsDialog.cpp +++ b/src/plugins/biostruct3d_view/src/SelectModelsDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,7 +32,7 @@ SelectModelsDialog::SelectModelsDialog(const QList<int> &_modelIds, const QList< : QDialog(parent), Ui_SelectModelsDialog() { setupUi(this); - new HelpButton(this, buttonBox, "22055883"); + new HelpButton(this, buttonBox, "24742418"); buttonBox_1->button(QDialogButtonBox::Cancel)->setText(::U2::SelectModelsDialog::tr("All")); buttonBox_1->button(QDialogButtonBox::No)->setText(::U2::SelectModelsDialog::tr("Invert")); buttonBox->button(QDialogButtonBox::Ok)->setText(::U2::SelectModelsDialog::tr("OK")); @@ -87,7 +87,7 @@ void SelectModelsDialog::accept() { } if (selectedModelsIndexes.isEmpty()) { - QMessageBox::warning(this, tr("Error"), tr("At least one model shoud be selected.")); + QMessageBox::warning(this, tr("Error"), tr("At least one model should be selected.")); return; } diff --git a/src/plugins/biostruct3d_view/src/SelectModelsDialog.h b/src/plugins/biostruct3d_view/src/SelectModelsDialog.h index 226989a680672917e0042266df5bddccc777ade2..667b81eb38dfd2dfbd8f8af9bb28e5ec6f9600ba 100644 --- a/src/plugins/biostruct3d_view/src/SelectModelsDialog.h +++ b/src/plugins/biostruct3d_view/src/SelectModelsDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/SettingsDialog.cpp b/src/plugins/biostruct3d_view/src/SettingsDialog.cpp index e68a01a4b86bbc6f92cd535c079e6680eb44cf41..cad10aaa1bffee55a29d483b539368ec149f2653 100644 --- a/src/plugins/biostruct3d_view/src/SettingsDialog.cpp +++ b/src/plugins/biostruct3d_view/src/SettingsDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,7 +32,7 @@ BioStruct3DSettingsDialog::BioStruct3DSettingsDialog() { setupUi(this); - new HelpButton(this, buttonBox, "22055880"); + new HelpButton(this, buttonBox, "24742415"); glWidget = NULL; initColorSchemes(); diff --git a/src/plugins/biostruct3d_view/src/SettingsDialog.h b/src/plugins/biostruct3d_view/src/SettingsDialog.h index 7dbd89ed71216bd0de09af4ae88e1551ee1a143b..1dee1bc70c35b2b87295524071ae950b8f99398a 100644 --- a/src/plugins/biostruct3d_view/src/SettingsDialog.h +++ b/src/plugins/biostruct3d_view/src/SettingsDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/StructuralAlignmentDialog.cpp b/src/plugins/biostruct3d_view/src/StructuralAlignmentDialog.cpp index db6ae8539c02a30c1b1c07653d2b2cf8e5be5aed..ba8a82079f900e0f47094b915398a68ba0df2cca 100644 --- a/src/plugins/biostruct3d_view/src/StructuralAlignmentDialog.cpp +++ b/src/plugins/biostruct3d_view/src/StructuralAlignmentDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -29,6 +29,7 @@ #include <U2Core/AppContext.h> #include <U2Core/BioStruct3DObject.h> #include <U2Core/GObject.h> +#include <U2Core/GObjectTypes.h> #include <U2Core/GObjectUtils.h> #include <U2Core/U2DbiRegistry.h> #include <U2Core/U2OpStatusUtils.h> @@ -57,7 +58,7 @@ StructuralAlignmentDialog::StructuralAlignmentDialog(const BioStruct3DObject *fi : QDialog(parent), task(0) { setupUi(this); - new HelpButton(this, buttonBox, "22055886"); + new HelpButton(this, buttonBox, "24742421"); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); @@ -140,7 +141,7 @@ void StructuralAlignmentDialog::accept() { int StructuralAlignmentDialog::execIfAlgorithmAvailable() { StructuralAlignmentAlgorithmRegistry *reg = AppContext::getStructuralAlignmentAlgorithmRegistry(); if (reg->getFactoriesIds().isEmpty()) { - QMessageBox::warning(this, "Error", "No available algorithms, make sure that apropriate plugin loaded (for ex. PTools)"); + QMessageBox::warning(this, "Error", "No available algorithms, make sure that appropriate plugin loaded (for ex. PTools)"); return Rejected; } else { diff --git a/src/plugins/biostruct3d_view/src/StructuralAlignmentDialog.h b/src/plugins/biostruct3d_view/src/StructuralAlignmentDialog.h index 5f3c38e026068d27fae1df397ce89cf91a2606ef..52e2cd2e0504ba7701185405ac414cade3093ba0 100644 --- a/src/plugins/biostruct3d_view/src/StructuralAlignmentDialog.h +++ b/src/plugins/biostruct3d_view/src/StructuralAlignmentDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/TubeGLRenderer.cpp b/src/plugins/biostruct3d_view/src/TubeGLRenderer.cpp index da85090e83a00ac56f148d0ffaec4da41f7a0c3e..9efabec732e18a6efb7e8ca26cd879560721e181 100644 --- a/src/plugins/biostruct3d_view/src/TubeGLRenderer.cpp +++ b/src/plugins/biostruct3d_view/src/TubeGLRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/TubeGLRenderer.h b/src/plugins/biostruct3d_view/src/TubeGLRenderer.h index 5ef60d2ae7bd68b1218eb97a59ddc0cc4f59a7f4..612470767649f337ac8de9a9f7fda3a916c1fcae 100644 --- a/src/plugins/biostruct3d_view/src/TubeGLRenderer.h +++ b/src/plugins/biostruct3d_view/src/TubeGLRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/VanDerWaalsGLRenderer.cpp b/src/plugins/biostruct3d_view/src/VanDerWaalsGLRenderer.cpp index 44e091e4b58a68df5a7e2d05e819a5c5dd2d8250..c70443ecb23dc7e394b6ff3a6a76a334d249c50c 100644 --- a/src/plugins/biostruct3d_view/src/VanDerWaalsGLRenderer.cpp +++ b/src/plugins/biostruct3d_view/src/VanDerWaalsGLRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/VanDerWaalsGLRenderer.h b/src/plugins/biostruct3d_view/src/VanDerWaalsGLRenderer.h index 97dad5c56ee707df61777dc1a68e7e1e75b22e3a..52a8315f856d4cdf515174a892e0047eb8f330e4 100644 --- a/src/plugins/biostruct3d_view/src/VanDerWaalsGLRenderer.h +++ b/src/plugins/biostruct3d_view/src/VanDerWaalsGLRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/WormsGLRenderer.cpp b/src/plugins/biostruct3d_view/src/WormsGLRenderer.cpp index a0aa6fe9d7fac7291da906cdeeb2994082d07594..444cd82a6df4aaaf0d6e14bc4b450da3332b759a 100644 --- a/src/plugins/biostruct3d_view/src/WormsGLRenderer.cpp +++ b/src/plugins/biostruct3d_view/src/WormsGLRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/WormsGLRenderer.h b/src/plugins/biostruct3d_view/src/WormsGLRenderer.h index 6c1393afccf4872c6631fa1ac19008667f0ab4c6..706c1f5205df8c04b631bb7cf53f833cdac972b3 100644 --- a/src/plugins/biostruct3d_view/src/WormsGLRenderer.h +++ b/src/plugins/biostruct3d_view/src/WormsGLRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/AnaglyphRenderer.cpp b/src/plugins/biostruct3d_view/src/deprecated/AnaglyphRenderer.cpp index a0b517372c98215f2775e2e703ca921540c2ebe8..74800040c9a630d1b035d1ef2fe0e80200fa476d 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/AnaglyphRenderer.cpp +++ b/src/plugins/biostruct3d_view/src/deprecated/AnaglyphRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/AnaglyphRenderer.h b/src/plugins/biostruct3d_view/src/deprecated/AnaglyphRenderer.h index f2270cbc7436a9c566f466c6ff5e389b0ee6cc92..da58b52f0391774a8612bc208c331d32005de561 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/AnaglyphRenderer.h +++ b/src/plugins/biostruct3d_view/src/deprecated/AnaglyphRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/BallAndStickGLRenderer.cpp b/src/plugins/biostruct3d_view/src/deprecated/BallAndStickGLRenderer.cpp index 75fa31ab8a7571373ddf1d4d7423a90d6e6136a5..50db8fe8c0c5d3728070575db0b440b48a8e0203 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/BallAndStickGLRenderer.cpp +++ b/src/plugins/biostruct3d_view/src/deprecated/BallAndStickGLRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/BallAndStickGLRenderer.h b/src/plugins/biostruct3d_view/src/deprecated/BallAndStickGLRenderer.h index ba19c1a3255a5379cc705c5c22d032f89a6835ff..eed82208c16fd43904d997fff7e1f1feda0cd2f7 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/BallAndStickGLRenderer.h +++ b/src/plugins/biostruct3d_view/src/deprecated/BallAndStickGLRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DColorScheme.cpp b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DColorScheme.cpp index b07f9127648c3e523cf78fce78fc752eb60c666b..bcb7c5daa69a59a3290c131ae9bbd5ca799101f6 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DColorScheme.cpp +++ b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DColorScheme.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DColorScheme.h b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DColorScheme.h index e14c1842ee766a8563d4eab5783931dddd7eab34..91decc07a86339d355c29ee5724c08ed7c02e955 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DColorScheme.h +++ b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DColorScheme.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLImageExportTask.cpp b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLImageExportTask.cpp index 20f9b496f5813266033e22a4b9719f42af728e57..e44a5ae62eb3e7fed6b398faa96409cf473614d9 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLImageExportTask.cpp +++ b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLImageExportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLImageExportTask.h b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLImageExportTask.h index 9fe7b96a39985b5dfccc9660620d850e0226d587..9049cb8c1b28ef24ce03a462ff4c609a40a51cb5 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLImageExportTask.h +++ b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLImageExportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLRender.cpp b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLRender.cpp index 7f08f41e5bcb4ba63dbc2aeb99dcc447fc2e25f0..fb731133910b82c0fb60c7e76613a66ff7bee153 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLRender.cpp +++ b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLRender.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLRender.h b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLRender.h index f62a2805b8854835dbd710534159181dd6e94cb0..79ecf9f6ff8a2445e8fb9b5569072fb7e4ae5ccc 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLRender.h +++ b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLRender.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLWidget.cpp b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLWidget.cpp index f8407abb8152e1adcf7b2515a5d2a17b714467cd..89a51506bb2c5ce7b944f4d79d040dbe76000b93 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLWidget.cpp +++ b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,6 +19,7 @@ * MA 02110-1301, USA. */ +#include <math.h> #include <time.h> #include <QColorDialog> @@ -1102,7 +1103,7 @@ void BioStruct3DGLWidget::sl_resetAlignment() { void BioStruct3DGLWidget::sl_onAlignmentDone(Task *task) { if (!task->hasError()) { StructuralAlignmentTask *saTask = qobject_cast<StructuralAlignmentTask*> (task); - assert(saTask && "Task shoud have type StructuralAlignmentTask"); + assert(saTask && "Task should have type StructuralAlignmentTask"); StructuralAlignment result = saTask->getResult(); StructuralAlignmentTaskSettings settings = saTask->getSettings(); diff --git a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLWidget.h b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLWidget.h index 3084d64122c57f5b12937d8ae20f3bb06aab93e2..0c103e774bc9b879601c4be01656a1a6450d8e88 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLWidget.h +++ b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DGLWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DSplitter.cpp b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DSplitter.cpp index c65695aaec0b79f7b3f745ff7a78ca3e0d63a4a3..ca6b60c3f14e2efca4804bf953a4ef627324b0fc 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DSplitter.cpp +++ b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DSplitter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DSplitter.h b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DSplitter.h index fc3b03dd22bd2f96c6f391a18538c25b4ffb88dc..1cf7fe49cf4d663ff4cb3f203f16250f6f5621cd 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DSplitter.h +++ b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DSplitter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DSubsetEditor.cpp b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DSubsetEditor.cpp index bfbafe60c13ccd9c78aa10971db501c1a006a6a0..57f5e665341cae0d6c2e5d496efbadb9592352a8 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DSubsetEditor.cpp +++ b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DSubsetEditor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DSubsetEditor.h b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DSubsetEditor.h index 7fc7e5184ddd9dee08c3f72a183f8b7672e19399..e2b07efbec2bf70af6d5ad787b2453321d530b89 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DSubsetEditor.h +++ b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DSubsetEditor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DViewPlugin.cpp b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DViewPlugin.cpp index 27d7a6a5dbd6cfe07be870759dbeb7b697874abc..ab4b5b49dfddeeadb6df6433345351fce250ff2f 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DViewPlugin.cpp +++ b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DViewPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DViewPlugin.h b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DViewPlugin.h index 0bae19f444c556db7a87487aabe9900289fe15b7..b425e616bc7524386997bae3ec592bf71e2cc8f3 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DViewPlugin.h +++ b/src/plugins/biostruct3d_view/src/deprecated/BioStruct3DViewPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/GLFrameManager.cpp b/src/plugins/biostruct3d_view/src/deprecated/GLFrameManager.cpp index ce2e1a5a7aa1e361025d998b1656e90c8ee21bda..96971e684bf24a1a530328c64af15e0c6bd6a160 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/GLFrameManager.cpp +++ b/src/plugins/biostruct3d_view/src/deprecated/GLFrameManager.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/GLFrameManager.h b/src/plugins/biostruct3d_view/src/deprecated/GLFrameManager.h index 5071c5c5583340602cee6213fe1aac2c8a552e5c..edddb13f66a51d2018a5cd2e33fc365a704ae90a 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/GLFrameManager.h +++ b/src/plugins/biostruct3d_view/src/deprecated/GLFrameManager.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/GraphicUtils.cpp b/src/plugins/biostruct3d_view/src/deprecated/GraphicUtils.cpp index 66912d1095f3d51addae5e9d69f1e6fcae931e7e..671c583516f3fed52c29a4ac04ae59b26c466c85 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/GraphicUtils.cpp +++ b/src/plugins/biostruct3d_view/src/deprecated/GraphicUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/GraphicUtils.h b/src/plugins/biostruct3d_view/src/deprecated/GraphicUtils.h index 241c46e31808a50be6713501cadc89f2d26643d6..dc139db6a07b2b2dd38bb05733bae41c460ced57 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/GraphicUtils.h +++ b/src/plugins/biostruct3d_view/src/deprecated/GraphicUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/MolecularSurfaceRenderer.cpp b/src/plugins/biostruct3d_view/src/deprecated/MolecularSurfaceRenderer.cpp index cd1d1385a635e53c2bd04456637ee679cf10f7f4..850e589f02dca761753ab958f4a7b494d5e4c657 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/MolecularSurfaceRenderer.cpp +++ b/src/plugins/biostruct3d_view/src/deprecated/MolecularSurfaceRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/MolecularSurfaceRenderer.h b/src/plugins/biostruct3d_view/src/deprecated/MolecularSurfaceRenderer.h index c7213ea9d0a108f977d0c63bfcea4d54e2138de8..f6db1679033ff6cf422f1c87ca6de1ccc83e8e99 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/MolecularSurfaceRenderer.h +++ b/src/plugins/biostruct3d_view/src/deprecated/MolecularSurfaceRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/SelectModelsDialog.cpp b/src/plugins/biostruct3d_view/src/deprecated/SelectModelsDialog.cpp index e9b6d53a500445be9462984872ba46d14ed9efaa..dbd31cdad9a12f689ad25621e1a5e78fd09ec0c1 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/SelectModelsDialog.cpp +++ b/src/plugins/biostruct3d_view/src/deprecated/SelectModelsDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,7 +32,7 @@ SelectModelsDialog::SelectModelsDialog(const QList<int> &_modelIds, const QList< : QDialog(parent), Ui_SelectModelsDialog() { setupUi(this); - new HelpButton(this, buttonBox, "22055883"); + new HelpButton(this, buttonBox, "24742418"); buttonBox_1->button(QDialogButtonBox::Cancel)->setText(::U2::SelectModelsDialog::tr("All")); buttonBox_1->button(QDialogButtonBox::No)->setText(::U2::SelectModelsDialog::tr("Invert")); buttonBox->button(QDialogButtonBox::Ok)->setText(::U2::SelectModelsDialog::tr("OK")); @@ -87,7 +87,7 @@ void SelectModelsDialog::accept() { } if (selectedModelsIndexes.isEmpty()) { - QMessageBox::warning(this, tr("Error"), tr("At least one model shoud be selected.")); + QMessageBox::warning(this, tr("Error"), tr("At least one model should be selected.")); return; } diff --git a/src/plugins/biostruct3d_view/src/deprecated/SelectModelsDialog.h b/src/plugins/biostruct3d_view/src/deprecated/SelectModelsDialog.h index 226989a680672917e0042266df5bddccc777ade2..667b81eb38dfd2dfbd8f8af9bb28e5ec6f9600ba 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/SelectModelsDialog.h +++ b/src/plugins/biostruct3d_view/src/deprecated/SelectModelsDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/SettingsDialog.cpp b/src/plugins/biostruct3d_view/src/deprecated/SettingsDialog.cpp index 0fec5ea732990e6dfd2aed78fc58166b1a595c30..f8b068f465d78dcd47fc9964d61bafbf0164018d 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/SettingsDialog.cpp +++ b/src/plugins/biostruct3d_view/src/deprecated/SettingsDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,7 +32,7 @@ BioStruct3DSettingsDialog::BioStruct3DSettingsDialog() { setupUi(this); - new HelpButton(this, buttonBox, "22055880"); + new HelpButton(this, buttonBox, "24742415"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/biostruct3d_view/src/deprecated/SettingsDialog.h b/src/plugins/biostruct3d_view/src/deprecated/SettingsDialog.h index 7dbd89ed71216bd0de09af4ae88e1551ee1a143b..1dee1bc70c35b2b87295524071ae950b8f99398a 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/SettingsDialog.h +++ b/src/plugins/biostruct3d_view/src/deprecated/SettingsDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/StructuralAlignmentDialog.cpp b/src/plugins/biostruct3d_view/src/deprecated/StructuralAlignmentDialog.cpp index bd641cdaf70852875f92c565b99fad9945eb2301..049c28fc59b0e7882e87af57a12b7bc2f325a259 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/StructuralAlignmentDialog.cpp +++ b/src/plugins/biostruct3d_view/src/deprecated/StructuralAlignmentDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -28,6 +28,7 @@ #include <U2Core/AppContext.h> #include <U2Core/BioStruct3DObject.h> #include <U2Core/GObject.h> +#include <U2Core/GObjectTypes.h> #include <U2Core/GObjectUtils.h> #include <U2Core/U2DbiRegistry.h> #include <U2Core/U2OpStatusUtils.h> @@ -44,7 +45,7 @@ namespace U2 { static QList<BioStruct3DObject*> findAvailableBioStructs() { QList<GObject*> objs = GObjectUtils::findAllObjects(UOF_LoadedOnly, GObjectTypes::BIOSTRUCTURE_3D); QList<BioStruct3DObject*> biostructs; - foreach (GObject *obj, objs) { + foreach(GObject *obj, objs) { BioStruct3DObject *bso = qobject_cast<BioStruct3DObject*> (obj); assert(bso); biostructs << bso; @@ -54,15 +55,14 @@ static QList<BioStruct3DObject*> findAvailableBioStructs() { } StructuralAlignmentDialog::StructuralAlignmentDialog(const BioStruct3DObject *fixedRef/* = 0*/, int fixedRefModel/* = -1*/, QWidget *parent/* = 0*/) - : QDialog(parent), task(0) -{ + : QDialog(parent), task(0) { setupUi(this); - new HelpButton(this, buttonBox, "22055886"); + new HelpButton(this, buttonBox, "24742421"); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); StructuralAlignmentAlgorithmRegistry *reg = AppContext::getStructuralAlignmentAlgorithmRegistry(); - foreach (const QString &id, reg->getFactoriesIds()) { + foreach(const QString &id, reg->getFactoriesIds()) { algorithmCombo->addItem(id, qVariantFromValue(id)); } @@ -113,7 +113,7 @@ void StructuralAlignmentDialog::accept() { // Since we unable to change mob structure we clone the GObject // TODO: clone live-range? U2OpStatus2Log os; - const U2DbiRef dbiRef = AppContext::getDbiRegistry( )->getSessionTmpDbiRef( os ); + const U2DbiRef dbiRef = AppContext::getDbiRegistry()->getSessionTmpDbiRef(os); BioStruct3DObject *mobClone = qobject_cast<BioStruct3DObject*> (mobSubset.obj->clone(dbiRef, os)); mobSubset.obj = mobClone; @@ -139,10 +139,9 @@ void StructuralAlignmentDialog::accept() { int StructuralAlignmentDialog::execIfAlgorithmAvailable() { StructuralAlignmentAlgorithmRegistry *reg = AppContext::getStructuralAlignmentAlgorithmRegistry(); if (reg->getFactoriesIds().isEmpty()) { - QMessageBox::warning(this, "Error", "No available algorithms, make sure that apropriate plugin loaded (for ex. PTools)"); + QMessageBox::warning(this, "Error", "No available algorithms, make sure that appropriate plugin loaded (for ex. PTools)"); return Rejected; - } - else { + } else { return exec(); } } diff --git a/src/plugins/biostruct3d_view/src/deprecated/StructuralAlignmentDialog.h b/src/plugins/biostruct3d_view/src/deprecated/StructuralAlignmentDialog.h index 5f3c38e026068d27fae1df397ce89cf91a2606ef..52e2cd2e0504ba7701185405ac414cade3093ba0 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/StructuralAlignmentDialog.h +++ b/src/plugins/biostruct3d_view/src/deprecated/StructuralAlignmentDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/TubeGLRenderer.cpp b/src/plugins/biostruct3d_view/src/deprecated/TubeGLRenderer.cpp index d5a2a0b3ce943be5fe60d44db3277f7d07ec083a..dece69c26d2373f7e821de51859a35222be6a893 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/TubeGLRenderer.cpp +++ b/src/plugins/biostruct3d_view/src/deprecated/TubeGLRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/TubeGLRenderer.h b/src/plugins/biostruct3d_view/src/deprecated/TubeGLRenderer.h index 5ef60d2ae7bd68b1218eb97a59ddc0cc4f59a7f4..612470767649f337ac8de9a9f7fda3a916c1fcae 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/TubeGLRenderer.h +++ b/src/plugins/biostruct3d_view/src/deprecated/TubeGLRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/VanDerWaalsGLRenderer.cpp b/src/plugins/biostruct3d_view/src/deprecated/VanDerWaalsGLRenderer.cpp index 6edcf3bee4d4690720d398f121ff221d0cfdceff..44da7e0b8bd9d8d65ca4c84af80bee7fe088185c 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/VanDerWaalsGLRenderer.cpp +++ b/src/plugins/biostruct3d_view/src/deprecated/VanDerWaalsGLRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/VanDerWaalsGLRenderer.h b/src/plugins/biostruct3d_view/src/deprecated/VanDerWaalsGLRenderer.h index b753836c025f6d4d99b89b50f7c23289334c9bfc..e7425a2c87c3ac46ca132bfdbbc8dac037abeca7 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/VanDerWaalsGLRenderer.h +++ b/src/plugins/biostruct3d_view/src/deprecated/VanDerWaalsGLRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/WormsGLRenderer.cpp b/src/plugins/biostruct3d_view/src/deprecated/WormsGLRenderer.cpp index 56a02f97b095aa7aadcdb9b61ccd90370e4ba107..a92645d14daa8e40cb85c1e8a592c8677cda5148 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/WormsGLRenderer.cpp +++ b/src/plugins/biostruct3d_view/src/deprecated/WormsGLRenderer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/src/deprecated/WormsGLRenderer.h b/src/plugins/biostruct3d_view/src/deprecated/WormsGLRenderer.h index 6c1393afccf4872c6631fa1ac19008667f0ab4c6..706c1f5205df8c04b631bb7cf53f833cdac972b3 100644 --- a/src/plugins/biostruct3d_view/src/deprecated/WormsGLRenderer.h +++ b/src/plugins/biostruct3d_view/src/deprecated/WormsGLRenderer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/biostruct3d_view/transl/russian.ts b/src/plugins/biostruct3d_view/transl/russian.ts index 1ff3945bbf373b0bd9e4a8f2f547ea19547a159d..ebb58e37897c8c399fdb471b3523faa7ce62399a 100644 --- a/src/plugins/biostruct3d_view/transl/russian.ts +++ b/src/plugins/biostruct3d_view/transl/russian.ts @@ -62,7 +62,6 @@ <translation>Ð’Ñ‹Ð¿ÑƒÐºÐ»Ð°Ñ Ñтруктура</translation> </message> <message> - <location filename="../src/BallAndStickGLRenderer.cpp" line="37"/> <location filename="../src/deprecated/BallAndStickGLRenderer.cpp" line="38"/> <source>Ball-and-Stick</source> <translation>ШароÑÑ‚ÐµÑ€Ð¶Ð½ÐµÐ²Ð°Ñ Ð¼Ð¾Ð´ÐµÐ»ÑŒ</translation> @@ -199,92 +198,97 @@ <context> <name>U2::BioStruct3DGLWidget</name> <message> - <location filename="../src/BioStruct3DGLWidget.cpp" line="765"/> - <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="770"/> + <location filename="../src/BioStruct3DGLWidget.cpp" line="788"/> + <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="771"/> <source>Spin</source> <translation>Вращение</translation> </message> <message> - <location filename="../src/BioStruct3DGLWidget.cpp" line="754"/> - <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="759"/> + <location filename="../src/BioStruct3DGLWidget.cpp" line="777"/> + <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="760"/> <source>Off</source> <translation>Ðет</translation> </message> <message> - <location filename="../src/BioStruct3DGLWidget.cpp" line="761"/> - <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="766"/> + <location filename="../src/BioStruct3DGLWidget.cpp" line="784"/> + <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="767"/> <source>Models..</source> <translation>Модели..</translation> </message> <message> - <location filename="../src/BioStruct3DGLWidget.cpp" line="784"/> - <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="789"/> + <location filename="../src/BioStruct3DGLWidget.cpp" line="807"/> + <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="790"/> <source>Align With...</source> <translation>ВыровнÑÑ‚ÑŒ Ñ...</translation> </message> <message> - <location filename="../src/BioStruct3DGLWidget.cpp" line="805"/> - <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="810"/> + <location filename="../src/BioStruct3DGLWidget.cpp" line="828"/> + <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="811"/> <source>Molecular Surface Render Style</source> <translation>Стиль отриÑовки поверхноÑти</translation> </message> <message> - <location filename="../src/BioStruct3DGLWidget.cpp" line="809"/> - <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="814"/> + <location filename="../src/BioStruct3DGLWidget.cpp" line="832"/> + <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="815"/> <source>Molecular Surface</source> <translation>МолекулÑÑ€Ð½Ð°Ñ Ð¿Ð¾Ð²ÐµÑ€Ñ…Ð½Ð¾ÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/BioStruct3DGLWidget.cpp" line="582"/> - <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="587"/> + <location filename="../src/BioStruct3DGLWidget.cpp" line="605"/> + <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="588"/> <source>Error</source> <translation>Ошибка</translation> </message> <message> - <location filename="../src/BioStruct3DGLWidget.cpp" line="582"/> - <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="587"/> + <location filename="../src/BioStruct3DGLWidget.cpp" line="91"/> + <source>The "3D Structure Viewer" was disabled, because shader programs written in the OpenGL Shading Language (GLSL) are not supported on this system. Please try to update drivers and reset the UGENE settings to default in the "Application Settings" dialog.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/BioStruct3DGLWidget.cpp" line="605"/> + <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="588"/> <source>Unable to open file %1 for writing</source> <translation>Ðевозможно открыть файл %1 Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи</translation> </message> <message> - <location filename="../src/BioStruct3DGLWidget.cpp" line="769"/> - <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="774"/> + <location filename="../src/BioStruct3DGLWidget.cpp" line="792"/> + <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="775"/> <source>Settings...</source> <translation>ÐаÑтройки...</translation> </message> <message> - <location filename="../src/BioStruct3DGLWidget.cpp" line="772"/> - <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="777"/> + <location filename="../src/BioStruct3DGLWidget.cpp" line="795"/> + <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="778"/> <source>Close</source> <translation>Закрыть</translation> </message> <message> - <location filename="../src/BioStruct3DGLWidget.cpp" line="775"/> - <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="780"/> + <location filename="../src/BioStruct3DGLWidget.cpp" line="798"/> + <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="781"/> <source>Export Image...</source> <translation>ÐкÑпортировать изображение...</translation> </message> <message> - <location filename="../src/BioStruct3DGLWidget.cpp" line="788"/> - <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="793"/> + <location filename="../src/BioStruct3DGLWidget.cpp" line="811"/> + <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="794"/> <source>Reset</source> <translation>СброÑить</translation> </message> <message> - <location filename="../src/BioStruct3DGLWidget.cpp" line="795"/> - <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="800"/> + <location filename="../src/BioStruct3DGLWidget.cpp" line="818"/> + <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="801"/> <source>Render Style</source> <translation>Стиль отриÑовки</translation> </message> <message> - <location filename="../src/BioStruct3DGLWidget.cpp" line="800"/> - <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="805"/> + <location filename="../src/BioStruct3DGLWidget.cpp" line="823"/> + <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="806"/> <source>Coloring Scheme</source> <translation>Ð¦Ð²ÐµÑ‚Ð¾Ð²Ð°Ñ Ñхема</translation> </message> <message> - <location filename="../src/BioStruct3DGLWidget.cpp" line="834"/> - <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="839"/> + <location filename="../src/BioStruct3DGLWidget.cpp" line="857"/> + <location filename="../src/deprecated/BioStruct3DGLWidget.cpp" line="840"/> <source>Structural Alignment</source> <translation>Структурное выравнивание</translation> </message> @@ -354,7 +358,7 @@ <context> <name>U2::BioStruct3DViewContext</name> <message> - <location filename="../src/BioStruct3DViewPlugin.cpp" line="189"/> + <location filename="../src/BioStruct3DViewPlugin.cpp" line="192"/> <location filename="../src/deprecated/BioStruct3DViewPlugin.cpp" line="189"/> <source>Close 3D Structure Viewer</source> <translation>Закрыть визуализатор 3D Ñтруктур</translation> @@ -363,7 +367,7 @@ <context> <name>U2::BioStruct3DViewPlugin</name> <message> - <location filename="../src/BioStruct3DViewPlugin.cpp" line="87"/> + <location filename="../src/BioStruct3DViewPlugin.cpp" line="88"/> <location filename="../src/deprecated/BioStruct3DViewPlugin.cpp" line="87"/> <source>Unfortunately, your system does not have OpenGL Support. The 3D Structure Viewer is not available. @@ -373,13 +377,13 @@ The 3D Structure Viewer is not available. You may try to upgrade your system by updating the video card driver.</translation> </message> <message> - <location filename="../src/BioStruct3DViewPlugin.cpp" line="93"/> + <location filename="../src/BioStruct3DViewPlugin.cpp" line="94"/> <location filename="../src/deprecated/BioStruct3DViewPlugin.cpp" line="93"/> <source>3D Structure Viewer</source> <translation>Визуализатор 3D Ñтруктур</translation> </message> <message> - <location filename="../src/BioStruct3DViewPlugin.cpp" line="93"/> + <location filename="../src/BioStruct3DViewPlugin.cpp" line="94"/> <location filename="../src/deprecated/BioStruct3DViewPlugin.cpp" line="93"/> <source>Visualizes 3D structures of biological molecules.</source> <translation>Визуализирует 3D Ñтруктуры биологичеÑких молекул.</translation> @@ -420,7 +424,7 @@ You may try to upgrade your system by updating the video card driver.</translati <message> <location filename="../src/SelectModelsDialog.cpp" line="90"/> <location filename="../src/deprecated/SelectModelsDialog.cpp" line="90"/> - <source>At least one model shoud be selected.</source> + <source>At least one model should be selected.</source> <translation>Выберите как минимум одну модель.</translation> </message> </context> @@ -510,13 +514,13 @@ You may try to upgrade your system by updating the video card driver.</translati <context> <name>U2::StructuralAlignmentDialog</name> <message> - <location filename="../src/StructuralAlignmentDialog.cpp" line="61"/> + <location filename="../src/StructuralAlignmentDialog.cpp" line="62"/> <location filename="../src/deprecated/StructuralAlignmentDialog.cpp" line="61"/> <source>Cancel</source> <translation>Отмена</translation> </message> <message> - <location filename="../src/StructuralAlignmentDialog.cpp" line="62"/> + <location filename="../src/StructuralAlignmentDialog.cpp" line="63"/> <location filename="../src/deprecated/StructuralAlignmentDialog.cpp" line="62"/> <source>OK</source> <translation>ОК</translation> diff --git a/src/plugins/browser_support/src/BrowserSupportPlugin.cpp b/src/plugins/browser_support/src/BrowserSupportPlugin.cpp index e8da03713ed21bac054aeab0ccee5e361e6bc661..8b9671bab55c2c18c587ef5f63e429a483267f68 100644 --- a/src/plugins/browser_support/src/BrowserSupportPlugin.cpp +++ b/src/plugins/browser_support/src/BrowserSupportPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,41 +19,22 @@ * MA 02110-1301, USA. */ -#include <QDir> -#include <QUrl> - -#include <QNetworkProxy> - -#include <QClipboard> #include <QApplication> - -#include <U2Core/AppContext.h> -#include <U2Gui/OpenViewTask.h> -#include <U2Core/DocumentModel.h> -#include <U2Core/DocumentUtils.h> -#include <U2Core/Counter.h> +#include <QClipboard> +#include <QDir> #include <U2Core/AppContext.h> #include <U2Core/AppSettings.h> -#include <U2Core/UserApplicationsSettings.h> -#include <U2Core/DocumentModel.h> -#include <U2Core/IOAdapter.h> -#include <U2Core/Log.h> -#include <U2Core/ProjectModel.h> -#include <U2Core/NetworkConfiguration.h> +#include <U2Core/CopyDataTask.h> #include <U2Core/Counter.h> -#include <U2Core/DBXRefRegistry.h> #include <U2Core/DocumentUtils.h> -#include <U2Core/AddDocumentTask.h> -#include <U2Core/CopyDataTask.h> -#include <U2Core/U2SafePoints.h> - -#include <U2Core/StringAdapter.h> - +#include <U2Core/GUrlUtils.h> #include <U2Core/LoadRemoteDocumentTask.h> - +#include <U2Core/ProjectModel.h> #include <U2Core/U2OpStatusUtils.h> -#include <U2Core/GUrlUtils.h> +#include <U2Core/U2SafePoints.h> +#include <U2Core/UserApplicationsSettings.h> +#include <U2Gui/OpenViewTask.h> #include "BrowserSupportPlugin.h" diff --git a/src/plugins/browser_support/src/BrowserSupportPlugin.h b/src/plugins/browser_support/src/BrowserSupportPlugin.h index c47e2ad21325e87a602dff74f48bd42848fb745d..1cd8c19aaa4f17e233008a65554f7604b0676238 100644 --- a/src/plugins/browser_support/src/BrowserSupportPlugin.h +++ b/src/plugins/browser_support/src/BrowserSupportPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/chroma_view/src/ChromaViewPlugin.cpp b/src/plugins/chroma_view/src/ChromaViewPlugin.cpp index 24177b1960355541ca4702fcaa68d607cd7f7e66..3505155aefdbb096c5a712e9d50df36ad1e570d7 100644 --- a/src/plugins/chroma_view/src/ChromaViewPlugin.cpp +++ b/src/plugins/chroma_view/src/ChromaViewPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,13 +22,11 @@ #include "ChromaViewPlugin.h" #include "ChromatogramView.h" +#include <U2Core/DNAChromatogramObject.h> +#include <U2Core/DNASequenceObject.h> #include <U2Core/GObject.h> -#include <U2Core/DocumentModel.h> #include <U2Core/GObjectTypes.h> #include <U2Core/GObjectUtils.h> -#include <U2Core/DNASequenceObject.h> -#include <U2Core/DNAChromatogramObject.h> -#include <U2Core/DocumentSelection.h> #include <U2Core/U2SafePoints.h> #include <U2Gui/MainWindow.h> @@ -40,9 +38,6 @@ #include <U2Gui/GUIUtils.h> -#include <QMessageBox> -#include <QMenu> - namespace U2 { extern "C" Q_DECL_EXPORT Plugin* U2_PLUGIN_INIT_FUNC() { @@ -62,9 +57,6 @@ ChromaViewPlugin::ChromaViewPlugin() : Plugin(tr("Chromatogram View"), tr("Chrom ChromaViewPlugin::~ChromaViewPlugin() { } -#define CHROMA_ACTION_NAME "CHROMA_ACTION" -#define CHROMA_VIEW_NAME "CHROMA_VIEW" - ChromaViewContext::ChromaViewContext(QObject* p) : GObjectViewWindowContext(p, ANNOTATED_DNA_VIEW_FACTORY_ID) { } @@ -142,7 +134,7 @@ bool ChromaViewContext::canHandle(GObjectView* v, GObject* o) { return qobject_cast<DNAChromatogramObject*>(o) != NULL; } -ChromaViewAction::ChromaViewAction() : ADVSequenceWidgetAction(CHROMA_ACTION_NAME, tr("Show chromatogram")), view(NULL) +ChromaViewAction::ChromaViewAction() : ADVSequenceWidgetAction("CHROMA_ACTION", tr("Show chromatogram")), view(NULL) { } diff --git a/src/plugins/chroma_view/src/ChromaViewPlugin.h b/src/plugins/chroma_view/src/ChromaViewPlugin.h index f76868a68052eed8923632df06fc0f43ce2adb37..94f05c4ca714ffeb76ab4fe4c38e7117697d5acd 100644 --- a/src/plugins/chroma_view/src/ChromaViewPlugin.h +++ b/src/plugins/chroma_view/src/ChromaViewPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,12 +22,9 @@ #ifndef _U2_CHROMA_VIEW_PLUGIN_H_ #define _U2_CHROMA_VIEW_PLUGIN_H_ -#include <U2Core/PluginModel.h> #include <U2Core/AppContext.h> -#include <U2Gui/ObjectViewModel.h> -#include <QMap> -#include <QAction> +#include <U2Gui/ObjectViewModel.h> #include <U2View/ADVSequenceWidget.h> diff --git a/src/plugins/chroma_view/src/ChromatogramView.cpp b/src/plugins/chroma_view/src/ChromatogramView.cpp index 72fe81b232558f7a12e6f2a4fb7d541f079c8560..29c656e233ca6cdc67d76ab996f882f395b35fec 100644 --- a/src/plugins/chroma_view/src/ChromatogramView.cpp +++ b/src/plugins/chroma_view/src/ChromatogramView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -21,13 +21,10 @@ #include <QMessageBox> -#include <U2Core/AppContext.h> #include <U2Core/DNAAlphabet.h> -#include <U2Core/DNAChromatogram.h> #include <U2Core/DNAChromatogramObject.h> #include <U2Core/DNASequenceObject.h> #include <U2Core/DNASequenceSelection.h> -#include <U2Core/DocumentModel.h> #include <U2Core/DocumentUtils.h> #include <U2Core/GObject.h> #include <U2Core/GObjectTypes.h> @@ -46,7 +43,6 @@ #include <U2Gui/AddNewDocumentDialogController.h> #include <U2Gui/GScrollBar.h> #include <U2Gui/GUIUtils.h> -#include <U2Gui/MainWindow.h> #include <U2Gui/ProjectTreeController.h> #include <U2Gui/ProjectTreeItemSelectorDialog.h> @@ -63,7 +59,7 @@ static const char GAP_CHAR = '-'; ChromatogramView::ChromatogramView(QWidget* p, ADVSequenceObjectContext* v, GSequenceLineView* cv, const DNAChromatogram& chroma) : GSequenceLineView(p, v), editDNASeq(NULL) { - const QString objectName = "chromatogram_view_" + (NULL == v ? "" : v->getSequenceGObject()->getGObjectName()); + const QString objectName = "chromatogram_view_" + v->getSequenceGObject()->getGObjectName(); setObjectName(objectName); dnaView = v->getAnnotatedDNAView(); @@ -94,7 +90,7 @@ ChromatogramView::ChromatogramView(QWidget* p, ADVSequenceObjectContext* v, GSeq connect(scaleBar,SIGNAL(valueChanged(int)),SLOT(setRenderAreaHeight(int))); ra = static_cast<ChromatogramViewRenderArea *>(renderArea); - scaleBar->setValue(ra->height()-ra->getHeightAreaBC()+ra->addUpIfQVL); + scaleBar->setValue(int(ra->height() - ra->getHeightAreaBC() + ra->addUpIfQVL)); setCoherentRangeView(cv); @@ -189,7 +185,7 @@ void ChromatogramView::mousePressEvent(QMouseEvent* me) { const U2Region& visibleRange = getVisibleRange(); QRectF rect; - for (int i=visibleRange.startPos; i<visibleRange.endPos(); ++i) { + for (int i = int(visibleRange.startPos); i < visibleRange.endPos(); ++i) { rect = ra->posToRect(i); if (rect.contains(renderAreaPos)) { ra->hasSel = true; @@ -332,13 +328,15 @@ void ChromatogramView::sl_onSequenceObjectLoaded(Task* t) { LoadUnloadedDocumentTask* lut = qobject_cast<LoadUnloadedDocumentTask*>(t); GObject* go = GObjectUtils::selectObjectByReference(lut->getConfig().checkObjRef, lut->getDocument()->getObjects(), UOF_LoadedOnly); - assert(go); - if (go) { + if (go!=NULL) { editDNASeq = qobject_cast<U2SequenceObject*>(go); QString err = dnaView->addObject(editDNASeq); assert(err.isEmpty()); indexOfChangedChars.clear(); update(); + } else { + qCritical("object not found!"); + Q_ASSERT(false); } } @@ -464,8 +462,8 @@ ChromatogramViewRenderArea::ChromatogramViewRenderArea(ChromatogramView* p, cons } else { addUpIfQVL = heightAreaBC - 2*charHeight; - setMinimumHeight(height()-addUpIfQVL); - areaHeight = height()-heightAreaBC + addUpIfQVL; + setMinimumHeight(int(height() - addUpIfQVL)); + areaHeight = int(height() - heightAreaBC + addUpIfQVL); } } @@ -512,13 +510,13 @@ void ChromatogramViewRenderArea::drawAll(QPaintDevice* pd) { } else { QRectF rect(charWidth, 0, width() - 2*charWidth, 2*charHeight); p.drawText(rect, Qt::AlignCenter, QString(tr("Chromatogram view (zoom in to see base calls)"))); - int curCP = width() - charWidth; + qreal curCP = width() - charWidth; for (int i = 0; i < 4; ++i) { curCP-= 2*charWidth; p.setPen(colorForIds[i]); - p.drawRect(curCP+charWidth/6, heightAreaBC-charHeight, charWidth/2, -charHeight/2); + p.drawRect(int(curCP+charWidth/6), int(heightAreaBC-charHeight), int(charWidth/2), -int(charHeight/2)); p.setPen(Qt::black); - p.drawText(curCP+charWidth, heightAreaBC-charHeight, baseForIds[i]); + p.drawText(int(curCP + charWidth), int(heightAreaBC - charHeight), baseForIds[i]); } } if (pd->width()/charWidth>visible.length/dividerTraceOrBaseCallsLines) { @@ -552,24 +550,24 @@ void ChromatogramViewRenderArea::drawAll(QPaintDevice* pd) { p.setRenderHint(QPainter::Antialiasing, false); U2Region self=sel.first(); - int i1=self.startPos,i2=self.endPos()-1; - unsigned int startBaseCall = kLinearTransformTrace * chroma.baseCalls[i1]; - unsigned int endBaseCall = kLinearTransformTrace * chroma.baseCalls[i2]; - if (i1!=0) { - unsigned int prevBaseCall = kLinearTransformTrace * chroma.baseCalls[i1-1]; - p.drawLine((startBaseCall + prevBaseCall) / 2 + bLinearTransformTrace, 0, - (startBaseCall+ prevBaseCall)/2 + bLinearTransformTrace, pd->height()); - }else { - p.drawLine(startBaseCall + bLinearTransformTrace - charWidth / 2, 0, - startBaseCall + bLinearTransformTrace - charWidth / 2, pd->height()); + int i1 = int(self.startPos), i2 = int(self.endPos() - 1); + qreal startBaseCall = kLinearTransformTrace * chroma.baseCalls[i1]; + qreal endBaseCall = kLinearTransformTrace * chroma.baseCalls[i2]; + if (i1 != 0) { + qreal prevBaseCall = kLinearTransformTrace * chroma.baseCalls[i1 - 1]; + int lineX = int((startBaseCall + prevBaseCall) / 2 + bLinearTransformTrace); + p.drawLine(lineX, 0, lineX, pd->height()); + } else { + int lineX = int(startBaseCall + bLinearTransformTrace - charWidth / 2); + p.drawLine(lineX, 0, lineX, pd->height()); } - if (i2!=chroma.seqLength-1) { - unsigned int nextBaseCall = kLinearTransformTrace * chroma.baseCalls[i2+1]; - p.drawLine((endBaseCall + nextBaseCall) / 2 + bLinearTransformTrace, 0, - (endBaseCall + nextBaseCall) / 2 + bLinearTransformTrace, pd->height()); + if (i2 != chroma.seqLength - 1) { + int nextBaseCall = int(kLinearTransformTrace * chroma.baseCalls[i2 + 1]); + int lineX = int((endBaseCall + nextBaseCall) / 2 + bLinearTransformTrace); + p.drawLine(lineX, 0, lineX, pd->height()); } else { - p.drawLine(endBaseCall + bLinearTransformTrace + charWidth / 2, 0, - endBaseCall + bLinearTransformTrace + charWidth / 2, pd->height()); + int lineX = int(endBaseCall + bLinearTransformTrace + charWidth / 2); + p.drawLine(lineX, 0, lineX, pd->height()); } } } @@ -581,18 +579,18 @@ void ChromatogramViewRenderArea::setAreaHeight(int newH) { qint64 ChromatogramViewRenderArea::coordToPos(int c) const { const U2Region& visibleRange = view->getVisibleRange(); - int lastBaseCall = kLinearTransformTrace * chroma.baseCalls[chroma.seqLength-1] + bLinearTransformTrace; + qreal lastBaseCall = kLinearTransformTrace * chroma.baseCalls[chroma.seqLength-1] + bLinearTransformTrace; if (visibleRange.startPos + visibleRange.length == chroma.seqLength && c > lastBaseCall) { return chroma.seqLength; } - int nearestPos = visibleRange.startPos; + qreal nearestPos = visibleRange.startPos; while (nearestPos < chroma.seqLength - 1) { qreal leftBaseCallPos = kLinearTransformTrace * chroma.baseCalls[nearestPos] + bLinearTransformTrace; qreal rightBaseCallPos = kLinearTransformTrace * chroma.baseCalls[nearestPos + 1] + bLinearTransformTrace; CHECK_BREAK((leftBaseCallPos + rightBaseCallPos) / 2 < c + (rightBaseCallPos - leftBaseCallPos) / 2); nearestPos++; } - return nearestPos; + return qint64(nearestPos); } int ChromatogramViewRenderArea::posToCoord(qint64 p, bool useVirtualSpace) const { @@ -600,9 +598,9 @@ int ChromatogramViewRenderArea::posToCoord(qint64 p, bool useVirtualSpace) const if (!useVirtualSpace && !visibleRange.contains(p) && p!=visibleRange.endPos()) { return -1; } - int res = kLinearTransformTrace*chroma.baseCalls[visibleRange.startPos+p]+bLinearTransformTrace; + qreal res = kLinearTransformTrace*chroma.baseCalls[visibleRange.startPos+p]+bLinearTransformTrace; assert(useVirtualSpace || res <= width()); - return res; + return int(res); } QRectF ChromatogramViewRenderArea::posToRect(int i) const { @@ -654,17 +652,17 @@ void ChromatogramViewRenderArea::drawChromatogramTrace(qreal x, qreal y, qreal w int polylineSize = a2-a1+mk1+mk2+1; QPolygonF polylineA(polylineSize), polylineC(polylineSize), polylineG(polylineSize), polylineT(polylineSize); - int areaHeight = (heightPD - heightAreaBC + addUpIfQVL) * this->areaHeight / 100; + qreal areaHeight = (heightPD - heightAreaBC + addUpIfQVL) * this->areaHeight / 100; for (int j = a1-mk1; j <= a2+mk2; ++j) { - double x = kLinearTransformTrace*j+bLinearTransformTrace; - qreal yA = -qMin(static_cast<qreal>(chroma.A[j]) * areaHeight / chromaMax, h); - qreal yC = -qMin(static_cast<qreal>(chroma.C[j]) * areaHeight / chromaMax, h); - qreal yG = -qMin(static_cast<qreal>(chroma.G[j]) * areaHeight / chromaMax, h); - qreal yT = -qMin(static_cast<qreal>(chroma.T[j]) * areaHeight / chromaMax, h); - polylineA[j-a1+mk1] = QPointF(x, yA); - polylineC[j-a1+mk1] = QPointF(x, yC); - polylineG[j-a1+mk1] = QPointF(x, yG); - polylineT[j-a1+mk1] = QPointF(x, yT); + double lineX = kLinearTransformTrace*j+bLinearTransformTrace; + qreal yA = -qMin(chroma.A[j] * areaHeight / chromaMax, h); + qreal yC = -qMin(chroma.C[j] * areaHeight / chromaMax, h); + qreal yG = -qMin(chroma.G[j] * areaHeight / chromaMax, h); + qreal yT = -qMin(chroma.T[j] * areaHeight / chromaMax, h); + polylineA[j-a1+mk1] = QPointF(lineX, yA); + polylineC[j-a1+mk1] = QPointF(lineX, yC); + polylineG[j-a1+mk1] = QPointF(lineX, yG); + polylineT[j-a1+mk1] = QPointF(lineX, yT); } if (settings.drawTraceA) { p.setPen(colorForIds[0]); @@ -707,13 +705,9 @@ void ChromatogramViewRenderArea::drawOriginalBaseCalls(qreal x, qreal y, qreal w if (!is) { kLinearTransformBaseCallsOfEdited = kLinearTransformBaseCalls; bLinearTransformBaseCallsOfEdited = bLinearTransformBaseCalls; - xBaseCallsOfEdited = x; - yBaseCallsOfEdited = y; - wBaseCallsOfEdited = w; - hBaseCallsOfEdited = h; } ChromatogramView* cview = qobject_cast<ChromatogramView*>(view); - for (int i=visible.startPos;i<visible.endPos();i++) { + for (int i = int(visible.startPos); i < visible.endPos(); i++) { QColor color = getBaseColor(ba[i]); p.setPen(color); @@ -722,21 +716,21 @@ void ChromatogramViewRenderArea::drawOriginalBaseCalls(qreal x, qreal y, qreal w } else { p.setFont(font); } - int xP = kLinearTransformBaseCalls*chroma.baseCalls[i] + bLinearTransformBaseCalls; - rect.setRect(xP - charWidth/2 + linePen.width(), -h, charWidth, h); + qreal xP = kLinearTransformBaseCalls*chroma.baseCalls[i] + bLinearTransformBaseCalls; + rect.setRect(int(xP - charWidth / 2 + linePen.width()), -h, charWidth, h); p.drawText(rect, Qt::AlignCenter, QString(ba[i])); if (is) { p.setPen(linePen); p.setRenderHint(QPainter::Antialiasing, false); - p.drawLine(xP, 0, xP, height()-y); + p.drawLine(int(xP), 0, int(xP), int(height() - y)); } } if (is) { p.setPen(linePen); p.setFont(QFont(QString("Courier New"), 8)); - p.drawText(charWidth*1.3, charHeight/2, QString(tr("original sequence"))); + p.drawText(int(charWidth * 1.3), int(charHeight / 2), QString(tr("original sequence"))); } p.resetTransform(); } @@ -751,7 +745,9 @@ void ChromatogramViewRenderArea::drawQualityValues(qreal x, qreal y, qreal w, qr //draw grid p.setPen(linePen); p.setRenderHint(QPainter::Antialiasing, false); - for (int i = 0; i < 5; ++i) p.drawLine(0,-h*i/4, w, -h*i/4); + for (int i = 0; i < 5; ++i) { + p.drawLine(0, -int(h * i / 4), int(w), -int(h * i / 4)); + } QLinearGradient gradient(10, 0, 10, -h); gradient.setColorAt(0, Qt::green); @@ -774,8 +770,8 @@ void ChromatogramViewRenderArea::drawQualityValues(qreal x, qreal y, qreal w, qr qreal kLinearTransformQV = qreal (k1) / k2; qreal bLinearTransformQV = leftMargin - kLinearTransformQV*a1; - for (int i=visible.startPos;i<visible.endPos();i++) { - int xP = kLinearTransformQV*chroma.baseCalls[i] + bLinearTransformQV - charWidth/2 + linePen.width(); + for (int i = int(visible.startPos); i < visible.endPos(); i++) { + qreal xP = kLinearTransformQV * chroma.baseCalls[i] + bLinearTransformQV - charWidth / 2 + linePen.width(); switch (ba[i]) { case 'A': rectangle.setCoords(xP, 0, xP+charWidth, -h/100*chroma.prob_A[i]); @@ -826,33 +822,33 @@ void ChromatogramViewRenderArea::drawChromatogramBaseCallsLines(qreal x, qreal y kLinearTransformTrace = qreal (k1) / k2; bLinearTransformTrace = leftMargin - kLinearTransformTrace*a1; double yRes = 0; - int areaHeight = (heightPD - heightAreaBC + addUpIfQVL) * this->areaHeight / 100; - for (int j = visible.startPos; j < visible.startPos+visible.length; j++) { + double areaHeight = (heightPD - heightAreaBC + addUpIfQVL) * this->areaHeight / 100; + for (int j = int(visible.startPos); j < visible.startPos+visible.length; j++) { int temp = chroma.baseCalls[j]; if (temp >= chroma.traceLength) { // damaged data - FIXME improve? break; } - double x = kLinearTransformTrace*temp+bLinearTransformTrace; + double lineX = kLinearTransformTrace*temp+bLinearTransformTrace; bool drawBase = true; switch (ba[j]) { case 'A': - yRes = -qMin(static_cast<qreal>(chroma.A[temp])*areaHeight/chromaMax, h); + yRes = -qMin(chroma.A[temp] * areaHeight / chromaMax, h); p.setPen(colorForIds[0]); drawBase = settings.drawTraceA; break; case 'C': - yRes = -qMin(static_cast<qreal>(chroma.C[temp]) * areaHeight / chromaMax, h); + yRes = -qMin(chroma.C[temp] * areaHeight / chromaMax, h); p.setPen(colorForIds[1]); drawBase = settings.drawTraceC; break; case 'G': - yRes = -qMin(static_cast<qreal>(chroma.G[temp]) * areaHeight / chromaMax, h); + yRes = -qMin(chroma.G[temp] * areaHeight / chromaMax, h); p.setPen(colorForIds[2]); drawBase = settings.drawTraceG; break; case 'T': - yRes = -qMin(static_cast<qreal>(chroma.T[temp]) * areaHeight / chromaMax, h); + yRes = -qMin(chroma.T[temp] * areaHeight / chromaMax, h); p.setPen(colorForIds[3]); drawBase = settings.drawTraceT; break; @@ -860,7 +856,7 @@ void ChromatogramViewRenderArea::drawChromatogramBaseCallsLines(qreal x, qreal y continue; }; if (drawBase) { - p.drawLine(x, 0, x, yRes); + p.drawLine(int(lineX), 0, int(lineX), int(yRes)); } } p.resetTransform(); diff --git a/src/plugins/chroma_view/src/ChromatogramView.h b/src/plugins/chroma_view/src/ChromatogramView.h index c90581d09b0bf8aca47400b2a8318ead503ec532..af99623588d927a0308d79860bc7f2994a020581 100644 --- a/src/plugins/chroma_view/src/ChromatogramView.h +++ b/src/plugins/chroma_view/src/ChromatogramView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -145,10 +145,6 @@ private: qreal bLinearTransformTrace; qreal kLinearTransformBaseCallsOfEdited; qreal bLinearTransformBaseCallsOfEdited; - qreal xBaseCallsOfEdited; - qreal yBaseCallsOfEdited; - qreal wBaseCallsOfEdited; - qreal hBaseCallsOfEdited; }; diff --git a/src/plugins/chroma_view/transl/russian.ts b/src/plugins/chroma_view/transl/russian.ts index ee2d2596a99194e2afa5a1def1ac85e08bf4af3f..b56c460f79ddb194f9885969742fd6cc05f431c2 100644 --- a/src/plugins/chroma_view/transl/russian.ts +++ b/src/plugins/chroma_view/transl/russian.ts @@ -4,7 +4,7 @@ <context> <name>U2::ChromaViewAction</name> <message> - <location filename="../src/ChromaViewPlugin.cpp" line="145"/> + <location filename="../src/ChromaViewPlugin.cpp" line="137"/> <source>Show chromatogram</source> <translation>Показать хроматограмму</translation> </message> @@ -12,12 +12,12 @@ <context> <name>U2::ChromaViewPlugin</name> <message> - <location filename="../src/ChromaViewPlugin.cpp" line="57"/> + <location filename="../src/ChromaViewPlugin.cpp" line="52"/> <source>Chromatogram View</source> <translation>Хроматограмма</translation> </message> <message> - <location filename="../src/ChromaViewPlugin.cpp" line="57"/> + <location filename="../src/ChromaViewPlugin.cpp" line="52"/> <source>Chromatograms visualization</source> <translation>Показать хроматограмму</translation> </message> @@ -25,38 +25,38 @@ <context> <name>U2::ChromatogramView</name> <message> - <location filename="../src/ChromatogramView.cpp" line="78"/> + <location filename="../src/ChromatogramView.cpp" line="74"/> <source>Show all</source> <translation>Показать вÑе</translation> </message> <message> - <location filename="../src/ChromatogramView.cpp" line="81"/> + <location filename="../src/ChromatogramView.cpp" line="77"/> <source>Show/hide trace</source> <translation>Показывать/Ñкрывать отдельные Ñигналы</translation> </message> <message> - <location filename="../src/ChromatogramView.cpp" line="112"/> + <location filename="../src/ChromatogramView.cpp" line="108"/> <source>Edit new sequence</source> <translation>Редактировать новую поÑледовательноÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/ChromatogramView.cpp" line="115"/> + <location filename="../src/ChromatogramView.cpp" line="111"/> <source>Edit existing sequence</source> <translation>Редактировать ÑущеÑтвующую поÑледовательноÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/ChromatogramView.cpp" line="118"/> + <location filename="../src/ChromatogramView.cpp" line="114"/> <source>Remove edited sequence</source> <translation>Удалить редактируемую поÑледовательноÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/ChromatogramView.cpp" line="121"/> + <location filename="../src/ChromatogramView.cpp" line="117"/> <source>Undo changes</source> <translation>Отменить изменениÑ</translation> </message> <message> - <location filename="../src/ChromatogramView.cpp" line="221"/> - <location filename="../src/ChromatogramView.cpp" line="358"/> + <location filename="../src/ChromatogramView.cpp" line="217"/> + <location filename="../src/ChromatogramView.cpp" line="356"/> <source>The sequence is locked</source> <translation>ПоÑледовательноÑÑ‚ÑŒ заблокирована</translation> </message> @@ -69,7 +69,7 @@ <translation type="obsolete">ПоÑледовательноÑÑ‚ÑŒ заблокирована</translation> </message> <message> - <location filename="../src/ChromatogramView.cpp" line="71"/> + <location filename="../src/ChromatogramView.cpp" line="67"/> <source>Show quality bars</source> <translation>Показывать уровни доÑтоверноÑти</translation> </message> @@ -77,12 +77,12 @@ <context> <name>U2::ChromatogramViewRenderArea</name> <message> - <location filename="../src/ChromatogramView.cpp" line="514"/> + <location filename="../src/ChromatogramView.cpp" line="512"/> <source>Chromatogram view (zoom in to see base calls)</source> <translation>Хроматограмма (приближайте маÑштаб)</translation> </message> <message> - <location filename="../src/ChromatogramView.cpp" line="739"/> + <location filename="../src/ChromatogramView.cpp" line="733"/> <source>original sequence</source> <translation>ИÑÑ…Ð¾Ð´Ð½Ð°Ñ Ð¿Ð¾ÑледовательноÑÑ‚ÑŒ</translation> </message> diff --git a/src/plugins/circular_view/src/CircularItems.cpp b/src/plugins/circular_view/src/CircularItems.cpp index e6c32e2654d7e17557b326cef929a72aaf0e941c..0f2d35643f88b1d2fcf8a77d1c6b111800fa2e5c 100644 --- a/src/plugins/circular_view/src/CircularItems.cpp +++ b/src/plugins/circular_view/src/CircularItems.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/circular_view/src/CircularItems.h b/src/plugins/circular_view/src/CircularItems.h index 8087517e41a8c454b44ccaa7e9541fb13a8799ee..c1daac41b1a087436eadbfeec56cd6730e0635db 100644 --- a/src/plugins/circular_view/src/CircularItems.h +++ b/src/plugins/circular_view/src/CircularItems.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/circular_view/src/CircularView.cpp b/src/plugins/circular_view/src/CircularView.cpp index 4a2c353819f03b234deef39a2884476d9563a29a..3da4a0a866af744a4f09579028b148fa824edc64 100644 --- a/src/plugins/circular_view/src/CircularView.cpp +++ b/src/plugins/circular_view/src/CircularView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -52,22 +52,26 @@ namespace U2 { const int CircularView::CV_REGION_ITEM_WIDTH = 25; - const int CircularView::MIN_OUTER_SIZE = 100; -const int CircularView::graduation = 16; - - +const int CircularView::GRADUATION = 16; +const int CircularView::MAX_GRADUATION_ANGLE = 360 * GRADUATION; CircularView::CircularView(QWidget* p, ADVSequenceObjectContext* ctx, CircularViewSettings* settings) -: GSequenceLineViewAnnotated(p, ctx), clockwise(true), holdSelection(false), settings(settings) -{ + : GSequenceLineViewAnnotated(p, ctx), + lastMovePos(0), + currectSelectionLen(0), + lastMouseY(0), + clockwise(true), + holdSelection(false), + lastPressAngle(0.0), + lastMoveAngle(0.0), + settings(settings) { QSet<AnnotationTableObject*> anns = ctx->getAnnotationObjects(true); foreach(AnnotationTableObject* obj, anns) { registerAnnotations(obj->getAnnotations()); } renderArea = new CircularViewRenderArea(this); - ra = qobject_cast<CircularViewRenderArea*>(renderArea); setMouseTracking(true); connect(ctx->getSequenceGObject(), SIGNAL(si_nameChanged(const QString&)), this, SLOT(sl_onSequenceObjectRenamed(const QString&))); @@ -88,120 +92,85 @@ void CircularView::pack() { } void CircularView::updateMinSize() { - int min = (ra->regionY.count() - 1)*ra->ellipseDelta + MIN_OUTER_SIZE; + CircularViewRenderArea* ra = getRenderArea(); + int min = (ra->regionY.count() - 1) * ra->ellipseDelta + MIN_OUTER_SIZE; setMinimumSize(min, min); } void CircularView::mousePressEvent(QMouseEvent * e) { + visibleRange = U2Region(0, seqLen); GSequenceLineViewAnnotated::mousePressEvent(e); - QPoint p = toRenderAreaPoint(e->pos()); - int offset = ra->getCenterY(); - QPoint point(p.x() - width()/2 , p.y() - offset); - qreal arcsin = coordToAngle(point); - lastPressPos = 180 * graduation * arcsin / PI; - lastPressPos-=ra->rotationDegree*graduation; - if(lastPressPos<0) { - lastPressPos+=360*graduation; - } + CircularViewRenderArea* ra = getRenderArea(); + const QPoint renderAreaPoint = toRenderAreaPoint(e->pos()); + lastPressAngle = ra->coordToAsin(renderAreaPoint); + lastMoveAngle = lastPressAngle; + + lastPressPos = ra->asinToPos(lastPressAngle); lastMovePos = lastPressPos; - lastMouseY = point.y(); - currectSelectionLen = 0; + lastMouseY = toRenderAreaPoint(e->pos()).y() - getRenderArea()->getCenterY(); + currectSelectionLen = 0; holdSelection = false; - QWidget::mousePressEvent(e); } -CircularView::Direction CircularView::getDirection(float a, float b) const { - if (a == b) { - return UNKNOWN; - } - - a/=graduation; - b/=graduation; - - bool cl = ((a-b>=180) || ((b-a <=180) && (b-a >=0))); - - if (cl) { - return CW; - } - else { - return CCW; - } -} - -void CircularView::mouseMoveEvent(QMouseEvent * e) -{ +void CircularView::mouseMoveEvent(QMouseEvent * e) { QWidget::mouseMoveEvent(e); - QPoint areaPoint = toRenderAreaPoint(e->pos()); - QPoint point(areaPoint.x() - width()/2 , areaPoint.y() - ra->getCenterY()); - qreal arcsin = coordToAngle(point); + CircularViewRenderArea* ra = getRenderArea(); + const QPoint areaPoint = toRenderAreaPoint(e->pos()); + const qreal arcsin = ra->coordToAsin(areaPoint); ra->mouseAngle = arcsin; if (e->buttons() & Qt::LeftButton) { - float a = 180 * graduation * arcsin / PI; - a-=ra->rotationDegree*graduation; - if(a<0) { - a+=360*graduation; - } + Direction pressMove = getDirection(lastPressAngle, lastMoveAngle); + Direction moveA = getDirection(lastMoveAngle, arcsin); - Direction pressMove = getDirection(lastPressPos, lastMovePos); - Direction moveA = getDirection(lastMovePos, a); - - float totalLen = qAbs(lastPressPos-lastMovePos) + qAbs(lastMovePos-a); - totalLen/=graduation; - - if ((totalLen<10) && !holdSelection) { - if ((pressMove!=CW) && (moveA!=CW)) { + const float totalLen = qAbs(lastPressAngle - lastMoveAngle) + qAbs(lastMoveAngle - arcsin); + if ((totalLen < 10) && !holdSelection) { + if ((pressMove != CW) && (moveA != CW)) { clockwise = false; - } - else if ((pressMove != CCW) && (moveA != CCW)) { + } else if ((pressMove != CCW) && (moveA != CCW)) { clockwise = true; } - if (totalLen < 1) { - clockwise = lastPressPos < a; + clockwise = lastPressAngle < arcsin; } - holdSelection = true; } + qint64 movement = ra->asinToPos(arcsin); if (!clockwise) { - float tmp = a; - a = lastPressPos; - lastPressPos = tmp; + qSwap<qint64>(lastPressPos, movement); } // compute selection int seqLen = ctx->getSequenceLength(); - int selStart = lastPressPos / (360.0*graduation) * seqLen + 0.5f; - int selEnd = a / (360.0*graduation) * seqLen + 0.5f; - int selLen = selEnd-selStart; + int selStart = lastPressPos; + int selEnd = movement; + int selLen = selEnd - selStart; bool twoParts = false; if (selLen < 0) { // 'a' and 'lastPressPos' are swapped so it should be positive selLen = selEnd + seqLen - selStart; - Q_ASSERT(selLen>=0); + Q_ASSERT(selLen >= 0); if (selEnd) { // [0, selEnd] twoParts = true; } } - if (selLen > seqLen-selStart) { - selLen = seqLen-selStart; + if (selLen > seqLen - selStart) { + selLen = seqLen - selStart; } if (!clockwise) { - float tmp = lastPressPos; - lastPressPos = a; - a = tmp; + qSwap<qint64>(lastPressPos, movement); } - lastMovePos = a; - lastMouseY = point.y(); + lastMovePos = movement; + lastMouseY = areaPoint.y() - ra->getCenterY(); if (twoParts) { if (e->modifiers() & Qt::ControlModifier) { @@ -227,8 +196,8 @@ void CircularView::mouseReleaseEvent(QMouseEvent* e) { } void CircularView::setAngle(int angle) { - assert(angle>=0 && angle<=360); - ra->rotationDegree=angle; + assert(angle >= 0 && angle <= 360); + getRenderArea()->rotationDegree = angle; addUpdateFlags(GSLV_UF_NeedCompleteRedraw); renderArea->update(); } @@ -283,15 +252,15 @@ QList<AnnotationSelectionData> CircularView::selectAnnotationByCoord(const QPoin } QSize CircularView::sizeHint() const { - return ra->size(); + return getRenderArea()->size(); } const QMap<Annotation *,CircularAnnotationItem *> & CircularView::getCircularItems() const { - return ra->circItems; + return getRenderArea()->circItems; } const QList<CircularAnnotationLabel*>& CircularView::getLabelList() const { - return ra->labelList; + return getRenderArea()->labelList; } bool CircularView::isCircularTopology() const { @@ -326,7 +295,7 @@ void CircularView::keyReleaseEvent(QKeyEvent *e) { void CircularView::resizeEvent(QResizeEvent* e) { - if (ra->currentScale == 0) { + if (getRenderArea()->currentScale == 0) { sl_fitInView(); } QWidget::resizeEvent(e); @@ -334,6 +303,7 @@ void CircularView::resizeEvent(QResizeEvent* e) { #define VIEW_MARGIN 10 void CircularView::sl_fitInView() { + CircularViewRenderArea* ra = getRenderArea(); int yLvl = ra->regionY.count() - 1; ra->outerEllipseSize = qMin(height(), width()) - ra->ellipseDelta*yLvl - VIEW_MARGIN; ra->currentScale = 0; @@ -343,6 +313,7 @@ void CircularView::sl_fitInView() { #define ZOOM_SCALE 1.2 void CircularView::sl_zoomIn() { + CircularViewRenderArea* ra = getRenderArea(); if (ra->outerEllipseSize / width() > 10) { return; } @@ -353,6 +324,7 @@ void CircularView::sl_zoomIn() { } void CircularView::sl_zoomOut() { + CircularViewRenderArea* ra = getRenderArea(); if (ra->outerEllipseSize / ZOOM_SCALE < MIN_OUTER_SIZE) { return; } @@ -367,11 +339,13 @@ void CircularView::sl_onSequenceObjectRenamed(const QString&) { } void CircularView::sl_onCircularTopologyChange() { + CircularViewRenderArea* ra = getRenderArea(); addUpdateFlags(GSLV_UF_AnnotationsChanged); ra->update(); } void CircularView::updateZoomActions() { + CircularViewRenderArea* ra = getRenderArea(); if (ra->outerEllipseSize * ZOOM_SCALE / width() > 10) { emit si_zoomInDisabled(true); } else { @@ -415,7 +389,26 @@ void CircularView::invertCurrentSelection() { } } +CircularViewRenderArea* CircularView::getRenderArea() const { + return qobject_cast<CircularViewRenderArea*>(renderArea); +} + +CircularView::Direction CircularView::getDirection(float a, float b) const { + if (a == b) { + return UNKNOWN; + } + + bool cl = ((a - b >= PI) || ((b - a <= PI) && (b - a >= 0))); + + if (cl) { + return CW; + } else { + return CCW; + } +} + void CircularView::adaptSizes() { + CircularViewRenderArea* ra = getRenderArea(); ra->innerEllipseSize = ra->outerEllipseSize - CV_REGION_ITEM_WIDTH; ra->rulerEllipseSize = ra->outerEllipseSize - CV_REGION_ITEM_WIDTH; ra->middleEllipseSize = (ra->outerEllipseSize + ra->innerEllipseSize)/2; @@ -442,11 +435,11 @@ qreal CircularView::coordToAngle(const QPoint point) { } void CircularView::paint(QPainter &p, int w, int h, bool paintSelection, bool paintMarker) { - ra->paintContent(p, w, h, paintSelection, paintMarker); + getRenderArea()->paintContent(p, w, h, paintSelection, paintMarker); } void CircularView::redraw() { - ra->redraw(); + getRenderArea()->redraw(); } /************************************************************************/ @@ -1158,6 +1151,13 @@ U2Region CircularViewRenderArea::getAnnotationYRange(Annotation *, int, const An return U2Region(0,0); } +qint64 CircularViewRenderArea::coordToPos(const QPoint& p) const { + qreal arcsin = coordToAsin(p); + qint64 resultPosition = asinToPos(arcsin); + + return resultPosition; +} + void CircularViewRenderArea::resizeEvent(QResizeEvent *e) { view->addUpdateFlags(GSLV_UF_ViewResized); QWidget::resizeEvent(e); @@ -1244,6 +1244,26 @@ void CircularViewRenderArea::removeRegionsOutOfRange(QVector<U2Region> &location } } +qreal CircularViewRenderArea::coordToAsin(const QPoint& p) const { + int offset = getCenterY(); + QPoint point(p.x() - width() / 2, p.y() - offset); + qreal arcsin = circularView->coordToAngle(point); + + return arcsin; +} + +qint64 CircularViewRenderArea::asinToPos(const qreal asin) const { + qreal graduatedAngle = 180 * CircularView::GRADUATION * asin / PI; + graduatedAngle -= rotationDegree * CircularView::GRADUATION; + if (graduatedAngle < 0) { + graduatedAngle += 360 * CircularView::GRADUATION; + } + qint64 seqLength = circularView->getSequenceLength(); + qint64 resultPosition = (seqLength * graduatedAngle) / CircularView::MAX_GRADUATION_ANGLE + 0.5f; + + return resultPosition; +} + QPair<U2Region, U2Region> CircularViewRenderArea::mergeCircularJunctoinRegion(QVector<U2Region> &location, int seqLen) const { QPair<U2Region, U2Region> res; if (location.size() >= 2) { diff --git a/src/plugins/circular_view/src/CircularView.h b/src/plugins/circular_view/src/CircularView.h index 1b507f078c55a60431950d72a78e07f66dc49bfa..ac3ffb7f59670bf1c56274c45291fcefcc5f122f 100644 --- a/src/plugins/circular_view/src/CircularView.h +++ b/src/plugins/circular_view/src/CircularView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -81,6 +81,8 @@ public: static const int MIN_OUTER_SIZE; static const int CV_REGION_ITEM_WIDTH; + static const int GRADUATION; + static const int MAX_GRADUATION_ANGLE; void setAngle(int angle); void updateMinSize(); @@ -123,6 +125,8 @@ protected: */ void invertCurrentSelection(); + CircularViewRenderArea* getRenderArea() const; + Direction getDirection(float a, float b) const; QVBoxLayout *layout; @@ -130,12 +134,11 @@ protected: int lastMovePos; int currectSelectionLen; int lastMouseY; - CircularViewRenderArea* ra; - bool clockwise, holdSelection; - CircularViewSettings* settings; - -private: - static const int graduation; + bool clockwise; + bool holdSelection; + qreal lastPressAngle; + qreal lastMoveAngle; + CircularViewSettings* settings; }; class CircularViewRenderArea : public GSequenceLineViewAnnotatedRenderArea { @@ -153,7 +156,11 @@ public: static const int MIDDLE_ELLIPSE_SIZE; int getCenterY() const { return verticalOffset; } + qreal coordToAsin(const QPoint& p) const; + qint64 asinToPos(const qreal asin) const; + protected: + qint64 coordToPos(const QPoint& p) const override; void resizeEvent(QResizeEvent *e); virtual void drawAll(QPaintDevice* pd); virtual U2Region getAnnotationYRange(Annotation *a, int ri, const AnnotationSettings *as) const; diff --git a/src/plugins/circular_view/src/CircularViewImageExportTask.cpp b/src/plugins/circular_view/src/CircularViewImageExportTask.cpp index 21b8c15f301b8cf93383e568795450c153a2c5e1..a2bcd4b19a2f9f0b5deb50920517a84636b1b5cd 100644 --- a/src/plugins/circular_view/src/CircularViewImageExportTask.cpp +++ b/src/plugins/circular_view/src/CircularViewImageExportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,12 +19,11 @@ * MA 02110-1301, USA. */ -#include <QDomDocument> -#include <QPrinter> -#include <QLabel> #include <QCheckBox> #include <QComboBox> -#include <QVBoxLayout> +#include <QDomDocument> +#include <QLabel> +#include <QPrinter> #include <QSvgGenerator> #include <U2Core/U2SafePoints.h> @@ -148,7 +147,7 @@ void CircularViewImageExportController::initSettingsWidget() { sequenceComboBox = new QComboBox(); foreach(CircularView* cv, cvList) { SAFE_POINT( cv->getSequenceContext() != NULL, tr("Sequence context is NULL!"), ); - SAFE_POINT( cv->getSequenceContext()->getSequenceGObject() != NULL, tr("Sequece Gobject is NULL"), ); + SAFE_POINT( cv->getSequenceContext()->getSequenceGObject() != NULL, tr("Sequence Gobject is NULL"), ); QString seqName = cv->getSequenceContext()->getSequenceGObject()->getGObjectName(); sequenceComboBox->addItem(seqName); if (cv == cvWidget) { diff --git a/src/plugins/circular_view/src/CircularViewImageExportTask.h b/src/plugins/circular_view/src/CircularViewImageExportTask.h index f7ed8437a2074847a00b100746948ba0e0226fd1..35ead20b5f6cb79a8c8544ccdd2a43483ae84f7d 100644 --- a/src/plugins/circular_view/src/CircularViewImageExportTask.h +++ b/src/plugins/circular_view/src/CircularViewImageExportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/circular_view/src/CircularViewPlugin.cpp b/src/plugins/circular_view/src/CircularViewPlugin.cpp index 97731b8a7e47cfb1167add5e222e312085bcbb55..10aec0316f217a653f86dad0e106ea1ae6478edd 100644 --- a/src/plugins/circular_view/src/CircularViewPlugin.cpp +++ b/src/plugins/circular_view/src/CircularViewPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,19 +22,12 @@ #include <limits> #include <QMessageBox> -#include <QMenu> -#include <QApplication> #include <U2Core/DNASequenceObject.h> #include <U2Core/DNASequenceSelection.h> -#include <U2Core/DocumentModel.h> -#include <U2Core/DocumentSelection.h> -#include <U2Core/GObject.h> -#include <U2Core/GObjectTypes.h> #include <U2Core/U2SafePoints.h> #include <U2Gui/GUIUtils.h> -#include <U2Gui/MainWindow.h> #include <U2Gui/OPWidgetFactoryRegistry.h> #include <U2Core/QObjectScopedPointer.h> @@ -42,7 +35,6 @@ #include <U2View/ADVSequenceObjectContext.h> #include <U2View/ADVSingleSequenceWidget.h> #include <U2View/ADVUtils.h> -#include <U2View/AnnotatedDNAView.h> #include "CircularView.h" #include "CircularViewPlugin.h" diff --git a/src/plugins/circular_view/src/CircularViewPlugin.h b/src/plugins/circular_view/src/CircularViewPlugin.h index b66ccf7ceca9917e740fa1b7ec22b1e46a465aff..e3364ccc28cbd9244518e375b2c8968c4a93a23f 100644 --- a/src/plugins/circular_view/src/CircularViewPlugin.h +++ b/src/plugins/circular_view/src/CircularViewPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,11 +23,9 @@ #define _U2_CIRCULAR_VIEW_PLUGIN_H_ #include <U2Core/PluginModel.h> -#include <U2Core/AppContext.h> #include <U2Gui/ObjectViewModel.h> #include <QMap> -#include <QSet> #include <QAction> #include <U2View/ADVSequenceWidget.h> diff --git a/src/plugins/circular_view/src/CircularViewSettingsWidget.cpp b/src/plugins/circular_view/src/CircularViewSettingsWidget.cpp index e1cf1024622d62b2df2d3aa07689253e7dd0109c..66470e1a4a50070af77ca95eee6c8607cdd26c10 100644 --- a/src/plugins/circular_view/src/CircularViewSettingsWidget.cpp +++ b/src/plugins/circular_view/src/CircularViewSettingsWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/circular_view/src/CircularViewSettingsWidget.h b/src/plugins/circular_view/src/CircularViewSettingsWidget.h index c6995db64f87427d56efc236e2b4b7986657b015..e084884833e1869837f51397e56e23e9641aa54f 100644 --- a/src/plugins/circular_view/src/CircularViewSettingsWidget.h +++ b/src/plugins/circular_view/src/CircularViewSettingsWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/circular_view/src/CircularViewSettingsWidgetFactory.cpp b/src/plugins/circular_view/src/CircularViewSettingsWidgetFactory.cpp index 69c089dda1e011b92c3b34b4105dee57536026cc..0ac9d2741cef7c2f7e90cfa2ce0ac71e3bff6e39 100644 --- a/src/plugins/circular_view/src/CircularViewSettingsWidgetFactory.cpp +++ b/src/plugins/circular_view/src/CircularViewSettingsWidgetFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ namespace U2 { const QString CircularViewSettingsWidgetFactory::GROUP_ID = "OP_CV_SETTINGS"; const QString CircularViewSettingsWidgetFactory::GROUP_ICON_STR = ":circular_view/images/circular.png"; -const QString CircularViewSettingsWidgetFactory::GROUP_DOC_PAGE = "22055871"; +const QString CircularViewSettingsWidgetFactory::GROUP_DOC_PAGE = "24742406"; CircularViewSettingsWidgetFactory::CircularViewSettingsWidgetFactory(CircularViewContext* context) : ctx(context) { diff --git a/src/plugins/circular_view/src/CircularViewSettingsWidgetFactory.h b/src/plugins/circular_view/src/CircularViewSettingsWidgetFactory.h index 66ba650a399f7cc5fb61ffdf4ea895f3c027e317..619888c87fa099cbc6d4061656aaaba8f29ca645 100644 --- a/src/plugins/circular_view/src/CircularViewSettingsWidgetFactory.h +++ b/src/plugins/circular_view/src/CircularViewSettingsWidgetFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/circular_view/src/CircularViewSplitter.cpp b/src/plugins/circular_view/src/CircularViewSplitter.cpp index c5124ff6d52c1322872e65e84331032f30b43862..dddb8997c1f256d4867bdcd11ba44f4e0cdd1524 100644 --- a/src/plugins/circular_view/src/CircularViewSplitter.cpp +++ b/src/plugins/circular_view/src/CircularViewSplitter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/circular_view/src/CircularViewSplitter.h b/src/plugins/circular_view/src/CircularViewSplitter.h index c5f91f67282c8ba837f1cc87c32c8e962c174b63..067fe9e54d6b66abae3049f399dfdac346ad920b 100644 --- a/src/plugins/circular_view/src/CircularViewSplitter.h +++ b/src/plugins/circular_view/src/CircularViewSplitter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/circular_view/src/RestrictionMapWidget.cpp b/src/plugins/circular_view/src/RestrictionMapWidget.cpp index 64e19fb1e2f329d92d107df2367c9084959ca737..3df62a8cb3a0b8e663c4a1294f24be93fa076ae7 100644 --- a/src/plugins/circular_view/src/RestrictionMapWidget.cpp +++ b/src/plugins/circular_view/src/RestrictionMapWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/circular_view/src/RestrictionMapWidget.h b/src/plugins/circular_view/src/RestrictionMapWidget.h index 3e876a302e3e67f316284eaa557d3d1c9d222b21..09186d23c21afdba67c997e40fec3a690c9a4e8a 100644 --- a/src/plugins/circular_view/src/RestrictionMapWidget.h +++ b/src/plugins/circular_view/src/RestrictionMapWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/circular_view/src/SetSequenceOriginDialog.cpp b/src/plugins/circular_view/src/SetSequenceOriginDialog.cpp index c1514eb98ed75cb1ff5d9599e38b58cc9a42ddb2..40ac00624b4739b0ae1af8c53715c51053b63e09 100644 --- a/src/plugins/circular_view/src/SetSequenceOriginDialog.cpp +++ b/src/plugins/circular_view/src/SetSequenceOriginDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/circular_view/src/SetSequenceOriginDialog.h b/src/plugins/circular_view/src/SetSequenceOriginDialog.h index f0b36287af1aac591c60fcf0b30a0cb6f3b907a0..ddce1cb42831d28228c4283520f21ee9dd783035 100644 --- a/src/plugins/circular_view/src/SetSequenceOriginDialog.h +++ b/src/plugins/circular_view/src/SetSequenceOriginDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/circular_view/src/ShiftSequenceStartTask.cpp b/src/plugins/circular_view/src/ShiftSequenceStartTask.cpp index 8dc94f295e5202ded730eb9b1f1960521d3ba733..59da7ccb2e7c587e421a21f03c7185d829dfe2bb 100644 --- a/src/plugins/circular_view/src/ShiftSequenceStartTask.cpp +++ b/src/plugins/circular_view/src/ShiftSequenceStartTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/circular_view/src/ShiftSequenceStartTask.h b/src/plugins/circular_view/src/ShiftSequenceStartTask.h index aaa87c26b6b302f1c2eacc52ebe2eec12987c53f..335a101649954a65bc9eeafbb1b723b830549bb6 100644 --- a/src/plugins/circular_view/src/ShiftSequenceStartTask.h +++ b/src/plugins/circular_view/src/ShiftSequenceStartTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/circular_view/transl/russian.ts b/src/plugins/circular_view/transl/russian.ts index 6890fc14bb1aef530aa671eef7a6638fe648b841..ecc7a8f0dfa08c60859042912ce2cfc143df51d5 100644 --- a/src/plugins/circular_view/transl/russian.ts +++ b/src/plugins/circular_view/transl/russian.ts @@ -102,18 +102,18 @@ <context> <name>QObject</name> <message> - <location filename="../src/CircularViewImageExportTask.cpp" line="115"/> - <location filename="../src/CircularViewImageExportTask.cpp" line="129"/> + <location filename="../src/CircularViewImageExportTask.cpp" line="114"/> + <location filename="../src/CircularViewImageExportTask.cpp" line="128"/> <source>Circular view</source> <translation>Круговой вид</translation> </message> <message> - <location filename="../src/CircularViewImageExportTask.cpp" line="167"/> + <location filename="../src/CircularViewImageExportTask.cpp" line="166"/> <source>Include position marker</source> <translation>Включить позицию</translation> </message> <message> - <location filename="../src/CircularViewImageExportTask.cpp" line="168"/> + <location filename="../src/CircularViewImageExportTask.cpp" line="167"/> <source>Include selection</source> <translation>Включить выделение</translation> </message> @@ -144,7 +144,7 @@ <context> <name>U2::CircularViewAction</name> <message> - <location filename="../src/CircularViewPlugin.cpp" line="361"/> + <location filename="../src/CircularViewPlugin.cpp" line="353"/> <source>Show circular view</source> <translation>Показать круговой вид</translation> </message> @@ -152,27 +152,27 @@ <context> <name>U2::CircularViewContext</name> <message> - <location filename="../src/CircularViewPlugin.cpp" line="110"/> + <location filename="../src/CircularViewPlugin.cpp" line="102"/> <source>Save circular view as image...</source> <translation>Сохранить круговой вид как изображение...</translation> </message> <message> - <location filename="../src/CircularViewPlugin.cpp" line="115"/> + <location filename="../src/CircularViewPlugin.cpp" line="107"/> <source>Set new sequence origin...</source> <translation>УÑтановить поÑледовательноÑÑ‚ÑŒ отÑчета...</translation> </message> <message> - <location filename="../src/CircularViewPlugin.cpp" line="128"/> + <location filename="../src/CircularViewPlugin.cpp" line="120"/> <source>Toggle circular views</source> <translation>Переключить круговые виды</translation> </message> <message> - <location filename="../src/CircularViewPlugin.cpp" line="284"/> + <location filename="../src/CircularViewPlugin.cpp" line="276"/> <source>Remove circular view</source> <translation>Удалить круговой вид</translation> </message> <message> - <location filename="../src/CircularViewPlugin.cpp" line="295"/> + <location filename="../src/CircularViewPlugin.cpp" line="287"/> <source>Show circular view</source> <translation>Показать круговой вид</translation> </message> @@ -180,24 +180,24 @@ <context> <name>U2::CircularViewImageExportController</name> <message> - <location filename="../src/CircularViewImageExportTask.cpp" line="124"/> + <location filename="../src/CircularViewImageExportTask.cpp" line="123"/> <source>List of Circular Views is empty!</source> <translation>СпиÑок круговых видов пуÑÑ‚!</translation> </message> <message> - <location filename="../src/CircularViewImageExportTask.cpp" line="147"/> + <location filename="../src/CircularViewImageExportTask.cpp" line="146"/> <source>Sequence</source> <translation>ПоÑледовательноÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/CircularViewImageExportTask.cpp" line="150"/> + <location filename="../src/CircularViewImageExportTask.cpp" line="149"/> <source>Sequence context is NULL!</source> <translation>Sequence context is NULL!</translation> </message> <message> - <location filename="../src/CircularViewImageExportTask.cpp" line="151"/> - <source>Sequece Gobject is NULL</source> - <translation>Sequece Gobject is NULL</translation> + <location filename="../src/CircularViewImageExportTask.cpp" line="150"/> + <source>Sequence Gobject is NULL</source> + <translation>Sequence Gobject is NULL</translation> </message> </context> <context> @@ -215,24 +215,24 @@ <translation type="obsolete">Sequence context is NULL!</translation> </message> <message> - <source>Sequece Gobject is NULL</source> - <translation type="obsolete">Sequece Gobject is NULL</translation> + <source>Sequence Gobject is NULL</source> + <translation type="obsolete">Sequence Gobject is NULL</translation> </message> </context> <context> <name>U2::CircularViewPlugin</name> <message> - <location filename="../src/CircularViewPlugin.cpp" line="82"/> + <location filename="../src/CircularViewPlugin.cpp" line="74"/> <source>CircularView</source> <translation>Круговой вид</translation> </message> <message> - <location filename="../src/CircularViewPlugin.cpp" line="82"/> + <location filename="../src/CircularViewPlugin.cpp" line="74"/> <source>Enables drawing of DNA sequences using circular representation</source> <translation>Круговой вид ДÐК поÑледовательноÑти</translation> </message> <message> - <location filename="../src/CircularViewPlugin.cpp" line="87"/> + <location filename="../src/CircularViewPlugin.cpp" line="79"/> <source>OPWidgetFactoryRegistry is NULL</source> <translation>OPWidgetFactoryRegistry is NULL</translation> </message> @@ -240,17 +240,17 @@ <context> <name>U2::CircularViewRenderArea</name> <message> - <location filename="../src/CircularView.cpp" line="490"/> + <location filename="../src/CircularView.cpp" line="472"/> <source>CircularView is NULL</source> <translation>CircularView is NULL</translation> </message> <message> - <location filename="../src/CircularView.cpp" line="492"/> + <location filename="../src/CircularView.cpp" line="474"/> <source>Circular view settings are NULL</source> <translation>Circular view settings are NULL</translation> </message> <message> - <location filename="../src/CircularView.cpp" line="512"/> + <location filename="../src/CircularView.cpp" line="494"/> <source>circular view size %1 %2</source> <translation>Размер кругового вида %1 %2</translation> </message> @@ -270,34 +270,34 @@ </message> <message> <location filename="../src/CircularViewSettingsWidget.cpp" line="68"/> - <location filename="../src/CircularViewSettingsWidget.cpp" line="115"/> + <location filename="../src/CircularViewSettingsWidget.cpp" line="116"/> <source>Outside</source> <translation>Снаружи</translation> </message> <message> <location filename="../src/CircularViewSettingsWidget.cpp" line="71"/> - <location filename="../src/CircularViewSettingsWidget.cpp" line="120"/> + <location filename="../src/CircularViewSettingsWidget.cpp" line="122"/> <source>Inside/Outside</source> <translation>Внутри/Снаружи</translation> </message> <message> <location filename="../src/CircularViewSettingsWidget.cpp" line="74"/> - <location filename="../src/CircularViewSettingsWidget.cpp" line="117"/> + <location filename="../src/CircularViewSettingsWidget.cpp" line="119"/> <source>None</source> <translation>Ðет</translation> </message> <message> - <location filename="../src/CircularViewSettingsWidget.cpp" line="130"/> + <location filename="../src/CircularViewSettingsWidget.cpp" line="131"/> <source>Title</source> <translation>Ðазвание</translation> </message> <message> - <location filename="../src/CircularViewSettingsWidget.cpp" line="133"/> + <location filename="../src/CircularViewSettingsWidget.cpp" line="134"/> <source>Ruler</source> <translation>Шкала</translation> </message> <message> - <location filename="../src/CircularViewSettingsWidget.cpp" line="136"/> + <location filename="../src/CircularViewSettingsWidget.cpp" line="137"/> <source>Annotations</source> <translation>Ðннотации</translation> </message> diff --git a/src/plugins/clark_support/clark_support.pri b/src/plugins/clark_support/clark_support.pri index 5dd5c6bce056433b2394d05cba1833c484d29f55..cad3fc87dac209df0944321335b2010499c03bd3 100644 --- a/src/plugins/clark_support/clark_support.pri +++ b/src/plugins/clark_support/clark_support.pri @@ -1,21 +1,14 @@ # include (clark_support.pri) include (../../ugene_version.pri) +include (../../ugene_globals.pri) PLUGIN_ID=clark_support PLUGIN_NAME=CLARK external tool support PLUGIN_VENDOR=Unipro -PLUGIN_DEPENDS=ngs_reads_classification:$${UGENE_VERSION};external_tool_support:$${UGENE_VERSION} +PLUGIN_DEPENDS=ngs_reads_classification$${D}:$${UGENE_VERSION};external_tool_support$${D}:$${UGENE_VERSION} -LIBS += -L../../_release/plugins -lngs_reads_classification - -!debug_and_release|build_pass { - CONFIG(debug, debug|release) { - PLUGIN_DEPENDS -= ngs_reads_classification:$${UGENE_VERSION};external_tool_support:$${UGENE_VERSION} - PLUGIN_DEPENDS += ngs_reads_classificationd:$${UGENE_VERSION};external_tool_supportd:$${UGENE_VERSION} +include( ../../ugene_plugin_common.pri ) - LIBS -= -L../../_release/plugins -lngs_reads_classification - LIBS += -L../../_debug/plugins -lngs_reads_classificationd - } -} +LIBS += -L../../$$out_dir()/plugins +LIBS += -lngs_reads_classification$$D -include( ../../ugene_plugin_common.pri ) diff --git a/src/plugins/clark_support/clark_support.pro b/src/plugins/clark_support/clark_support.pro index 331a15f68817ea94650df79d9af2f9fa211cef59..4cc447f1fb7284271a864d3a2624bff91dea3d8c 100644 --- a/src/plugins/clark_support/clark_support.pro +++ b/src/plugins/clark_support/clark_support.pro @@ -4,11 +4,13 @@ include (clark_support.pri) HEADERS += src/ClarkBuildWorker.h \ src/ClarkClassifyWorker.h \ src/ClarkSupport.h \ - src/ClarkSupportPlugin.h + src/ClarkSupportPlugin.h \ + src/ClarkTests.h SOURCES += src/ClarkBuildWorker.cpp \ src/ClarkClassifyWorker.cpp \ src/ClarkSupport.cpp \ - src/ClarkSupportPlugin.cpp + src/ClarkSupportPlugin.cpp \ + src/ClarkTests.cpp TRANSLATIONS += transl/russian.ts diff --git a/src/plugins/clark_support/src/ClarkBuildWorker.cpp b/src/plugins/clark_support/src/ClarkBuildWorker.cpp index 68c9a69c02f4f58d39535e4be4bf7bb851c907a8..7e1dfed8ace15101c8a789b49494396654567e11 100644 --- a/src/plugins/clark_support/src/ClarkBuildWorker.cpp +++ b/src/plugins/clark_support/src/ClarkBuildWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -197,10 +197,10 @@ void ClarkBuildWorkerFactory::init() { ActorPrototype* proto = new IntegralBusActorPrototype(desc, p, a); proto->setEditor(new DelegateEditor(delegates)); proto->setPrompter(new ClarkBuildPrompter()); - proto->addExternalTool(ET_CLARK_getAccssnTaxID); - proto->addExternalTool(ET_CLARK_getfilesToTaxNodes); - proto->addExternalTool(ET_CLARK_getTargetsDef); - proto->addExternalTool(ET_CLARK_buildScript); + proto->addExternalTool(ClarkSupport::ET_CLARK_GET_ACCSSN_TAX_ID_ID); + proto->addExternalTool(ClarkSupport::ET_CLARK_GET_FILES_TO_TAX_NODES_ID); + proto->addExternalTool(ClarkSupport::ET_CLARK_GET_TARGETS_DEF_ID); + proto->addExternalTool(ClarkSupport::ET_CLARK_BUILD_SCRIPT_ID); proto->setValidator(new ClarkBuildValidator()); WorkflowEnv::getProtoRegistry()->registerProto(NgsReadsClassificationPlugin::WORKFLOW_ELEMENTS_GROUP, proto); @@ -306,7 +306,7 @@ private: const QStringList ClarkBuildLogParser::wellKnownErrors = QStringList() << "abort" << "core dumped"; void ClarkBuildTask::prepare() { - const QString db("custom");// = QString("custom_%1").arg(rank); + const QString db("custom"); const QString reflist = dbUrl + "/.custom"; QDir dir(dbUrl); if (!dir.mkpath(db)){ @@ -326,8 +326,8 @@ void ClarkBuildTask::prepare() { CHECK_OP(stateInfo, ); } - QString toolName = ET_CLARK_buildScript; - QScopedPointer<ExternalToolRunTask> task(new ExternalToolRunTask(toolName, getArguments(), new ClarkBuildLogParser())); + QString toolId = ClarkSupport::ET_CLARK_BUILD_SCRIPT_ID; + QScopedPointer<ExternalToolRunTask> task(new ExternalToolRunTask(toolId, getArguments(), new ClarkBuildLogParser())); CHECK_OP(stateInfo, ); setListenerForTask(task.data()); addSubTask(task.take()); diff --git a/src/plugins/clark_support/src/ClarkBuildWorker.h b/src/plugins/clark_support/src/ClarkBuildWorker.h index c3fae9aab75317ade5cf78b409636a90ddfa2613..3831203974494a68c326599d922c6a419e6e130b 100644 --- a/src/plugins/clark_support/src/ClarkBuildWorker.h +++ b/src/plugins/clark_support/src/ClarkBuildWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/clark_support/src/ClarkClassifyWorker.cpp b/src/plugins/clark_support/src/ClarkClassifyWorker.cpp index 2d93b64f346729b06f68cd4cc610a9306bb826dc..d88f7da376a02270a174906920d437d5c9b4f741 100644 --- a/src/plugins/clark_support/src/ClarkClassifyWorker.cpp +++ b/src/plugins/clark_support/src/ClarkClassifyWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -252,12 +252,6 @@ void ClarkClassifyWorkerFactory::init() { Descriptor outputUrl(OUTPUT_URL, ClarkClassifyWorker::tr("Output file"), ClarkClassifyWorker::tr("Specify the output file name.")); -// Descriptor taxonomy(TAXONOMY, ClarkClassifyWorker::tr("Taxonomy"), -// ClarkClassifyWorker::tr("A set of files that define the taxonomic name and tree information, and the GI number to taxon map." -// "<br>The NCBI taxonomy is used by default.")); - -// Descriptor rank(TAXONOMY_RANK, ClarkClassifyWorker::tr("Taxonomy rank"), -// ClarkClassifyWorker::tr("All input sequences are classified against all taxa from the selected database, which are defined all at the same taxonomy level (--species, --genus, --family, --order, --class, --phylum).")); Descriptor kLength(K_LENGTH, ClarkClassifyWorker::tr("K-mer length"), ClarkClassifyWorker::tr("Set the k-mer length (-k).<br><br>" @@ -293,7 +287,7 @@ void ClarkClassifyWorkerFactory::init() { Descriptor db2ram(DB_TO_RAM, ClarkClassifyWorker::tr("Load database into memory"), ClarkClassifyWorker::tr("Request the loading of database file by memory mapped-file (--ldm).<br><br>" "This option accelerates the loading time but it will require an additional amount of RAM significant. " - "This option also allows to load the database in multithreaded-task (see also the \"Number of threads\" parameter).")); + "This option also allows one to load the database in multithreaded-task (see also the \"Number of threads\" parameter).")); Descriptor numThreads(NUM_THREADS, ClarkClassifyWorker::tr("Number of threads"), ClarkClassifyWorker::tr("Use multiple threads for the classification and, with the \"Load database into memory\" option enabled, for the loading of the database into RAM (-n).")); @@ -325,9 +319,6 @@ void ClarkClassifyWorkerFactory::init() { } a << new Attribute(dbUrl, BaseTypes::STRING_TYPE(), Attribute::Required | Attribute::NeedValidateEncoding, clarkDatabasePath); -// a << new Attribute( taxonomy, BaseTypes::STRING_TYPE(), false, "Default"); -// a << new Attribute( rank, BaseTypes::NUM_TYPE(), false, ClarkClassifySettings::Species); - Attribute *klenAttr = new Attribute(kLength, BaseTypes::NUM_TYPE(), Attribute::None, 31); klenAttr->addRelation(new VisibilityRelation(TOOL_VARIANT, QVariant(ClarkClassifySettings::TOOL_DEFAULT))); a << klenAttr; @@ -347,8 +338,6 @@ void ClarkClassifyWorkerFactory::init() { gapAttr->addRelation(new VisibilityRelation(TOOL_VARIANT, QVariant(ClarkClassifySettings::TOOL_LIGHT))); a << gapAttr; - //a << new Attribute( outFile, BaseTypes::STRING_TYPE(), false, "results.csv"); - a << new Attribute(db2ram, BaseTypes::BOOL_TYPE(), Attribute::None, false); a << new Attribute(numThreads, BaseTypes::NUM_TYPE(), Attribute::None, AppContext::getAppSettings()->getAppResourcePool()->getIdealThreadCount()); a << new Attribute(outputUrl, BaseTypes::STRING_TYPE(), Attribute::Required | Attribute::NeedValidateEncoding | Attribute::CanBeEmpty); @@ -417,8 +406,8 @@ void ClarkClassifyWorkerFactory::init() { proto->setPrompter(new ClarkClassifyPrompter()); proto->setValidator(new ClarkClassifyValidator()); proto->setPortValidator(ClarkClassifyWorkerFactory::INPUT_PORT, new PairedReadsPortValidator(INPUT_SLOT, PAIRED_INPUT_SLOT)); - proto->addExternalTool(ET_CLARK); - proto->addExternalTool(ET_CLARK_L); + proto->addExternalTool(ClarkSupport::ET_CLARK_ID); + proto->addExternalTool(ClarkSupport::ET_CLARK_L_ID); WorkflowEnv::getProtoRegistry()->registerProto(NgsReadsClassificationPlugin::WORKFLOW_ELEMENTS_GROUP, proto); DomainFactory *localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID); @@ -470,33 +459,8 @@ void ClarkClassifyWorker::init() { } } -bool ClarkClassifyWorker::isReady() const { - if (isDone()) { - return false; - } - const int hasMessage1 = input->hasMessage(); - const bool ended1 = input->isEnded(); - //if (!paired) - { - return hasMessage1 || ended1; - } -/* - const int hasMessage2 = pairedInput->hasMessage(); - const bool ended2 = pairedInput->isEnded(); - - if (hasMessage1 && hasMessage2) { - return true; - } else if (hasMessage1) { - return ended2; - } else if (hasMessage2) { - return ended1; - } - - return ended1 && ended2;*/ -} - Task * ClarkClassifyWorker::tick() { - if (input->hasMessage() /*&& (!paired || pairedInput->hasMessage())*/) { + if (input->hasMessage()) { const Message message = getMessageAndSetupScriptValues(input); QString readsUrl = message.getData().toMap()[ClarkClassifyWorkerFactory::INPUT_SLOT].toString(); @@ -504,19 +468,28 @@ Task * ClarkClassifyWorker::tick() { U2OpStatusImpl os; QString tmpDir = FileAndDirectoryUtils::createWorkingDir(context->workingDir(), FileAndDirectoryUtils::WORKFLOW_INTERNAL, "", context->workingDir()); - tmpDir = GUrlUtils::createDirectory(tmpDir + "clark", "_", os); + tmpDir = GUrlUtils::createDirectory(tmpDir + "CLARK", "_", os); CHECK_OP(os, new FailTask(os.getError())); QString reportUrl = getValue<QString>(ClarkClassifyWorkerFactory::OUTPUT_URL); if (reportUrl.isEmpty()) { const MessageMetadata metadata = context->getMetadataStorage().get(message.getMetadataId()); - reportUrl = tmpDir + "/" + NgsReadsClassificationUtils::getClassificationFileName(metadata.getFileUrl(), "CLARK", "csv", paired); + QString fileUrl = metadata.getFileUrl(); + reportUrl = tmpDir + + "/" + + (fileUrl.isEmpty() ? QString("CLARK_%1.txt") + .arg(NgsReadsClassificationUtils::CLASSIFICATION_SUFFIX) + : NgsReadsClassificationUtils::getBaseFileNameWithSuffixes(fileUrl, + QStringList() << "CLARK" + << NgsReadsClassificationUtils::CLASSIFICATION_SUFFIX, + "csv", + paired)); } + FileAndDirectoryUtils::createWorkingDir(reportUrl, FileAndDirectoryUtils::FILE_DIRECTORY, "", ""); reportUrl = GUrlUtils::ensureFileExt(reportUrl, QStringList("csv")).getURLString(); reportUrl = GUrlUtils::rollFileName(reportUrl, "_"); if (paired) { -// const Message pairedMessage = getMessageAndSetupScriptValues(pairedInput); pairedReadsUrl = message.getData().toMap()[ClarkClassifyWorkerFactory::PAIRED_INPUT_SLOT].toString(); } //TODO uncompress input files if needed @@ -533,20 +506,6 @@ Task * ClarkClassifyWorker::tick() { output->setEnded(); } -// if (paired) { -// QString error; -// if (input->isEnded() && (!pairedInput->isEnded() || pairedInput->hasMessage())) { -// error = tr("Not enough downstream reads datasets"); -// } -// if (pairedInput->isEnded() && (!input->isEnded() || input->hasMessage())) { -// error = tr("Not enough upstream reads datasets"); -// } - -// if (!error.isEmpty()) { -// return new FailTask(error); -// } -// } - return NULL; } @@ -561,7 +520,7 @@ void ClarkClassifyWorker::sl_taskFinished(Task *t) { algoLog.details(QString("CLARK produced classification: %1").arg(rawClassificationUrl)); QVariantMap data; - TaxonomyClassificationResult classificationResult = parseReport(rawClassificationUrl); + const TaxonomyClassificationResult &classificationResult = task->getParsedReport(); data[TaxonomySupport::TAXONOMY_CLASSIFICATION_SLOT_ID] = QVariant::fromValue<U2::LocalWorkflow::TaxonomyClassificationResult>(classificationResult); output->put(Message(output->getBusType(), data)); context->getMonitor()->addOutputFile(rawClassificationUrl, getActor()->getId()); @@ -569,83 +528,49 @@ void ClarkClassifyWorker::sl_taskFinished(Task *t) { LocalWorkflow::TaxonomyClassificationResult::const_iterator it; int classifiedCount = NgsReadsClassificationUtils::countClassified(classificationResult); context->getMonitor()->addInfo(tr("There were %1 input reads, %2 reads were classified.").arg(QString::number(classificationResult.size())).arg(QString::number(classifiedCount)) - , getActor()->getId(), WorkflowNotification::U2_INFO); + , getActor()->getId(), WorkflowNotification::U2_INFO); } void ClarkClassifyWorker::cleanup() { } -//also see in clark: getObjectsDataComputeFast, getObjectsDataCompute, getObjectsDataComputeFastLight,getObjectsDataComputeFastSpaced, getObjectsDataComputeFull, printExtendedResults -static const QByteArray DEFAULT_REPORT("Object_ID, Length, Assignment"); -static const QByteArray REPORT_PREFIX("Object_ID,"); -static const QByteArray EXTENDED_REPORT_SUFFIX(",Length,Gamma,1st_assignment,score1,2nd_assignment,score2,confidence"); +const QMap<QString, QString> ClarkLogParser::wellKnownErrors = ClarkLogParser::initWellKnownErrors(); -TaxonomyClassificationResult ClarkClassifyWorker::parseReport(const QString &url) -{ - TaxonomyClassificationResult result; - QFile reportFile(url); - if (!reportFile.open(QIODevice::ReadOnly)) { - reportError(tr("Cannot open classification report: %1").arg(url)); - } else { - QByteArray line = reportFile.readLine().trimmed(); +ClarkLogParser::ClarkLogParser() : ExternalToolLogParser() {} - bool extended = line.endsWith(EXTENDED_REPORT_SUFFIX); - if (!line.startsWith(REPORT_PREFIX)) { - reportError(tr("Failed to recognize CLARK report format: %1").arg(QString(line))); - } else { - while ((line = reportFile.readLine().trimmed()).size() != 0) { - QList<QByteArray> row = line.split(','); - if (extended ? row.size() < 6 : row.size() != 3) { - reportError(tr("Broken CLARK report: %1").arg(url)); - break; - } - int assignmentIdx = extended ? row.size() - 5 : 2; - QString objID = row[0]; - QByteArray &assStr = row[assignmentIdx]; - algoLog.trace(QString("Found CLARK classification: %1=%2").arg(objID).arg(QString(assStr))); - - bool ok = true; - TaxID assID = (assStr != "NA") ? assStr.toUInt(&ok) : TaxonomyTree::UNCLASSIFIED_ID; - if (!ok) { - reportError(tr("Broken CLARK report: %1").arg(url)); - break; - } - if (result.contains(objID)) { - QString msg = tr("Duplicate sequence name '%1' have been detected in the classification output.").arg(objID); - monitor()->addInfo(msg, getActorId(), WorkflowNotification::U2_WARNING); - algoLog.info(msg); - } else { - result[objID] = assID; - } - } +bool ClarkLogParser::isError(const QString &line) const { + foreach (const QString &wellKnownError, wellKnownErrors.keys()) { + if (line.contains(wellKnownError)) { + return true; } - reportFile.close(); } - return result; + return false; } -class ClarkLogParser : public ExternalToolLogParser { -public: - ClarkLogParser() {} +void ClarkLogParser::setLastError(const QString &errorKey) { + QString errorValue = errorKey; + foreach(const QString& wellKnownErrorKey, wellKnownErrors.keys()) { + CHECK_CONTINUE(errorKey.contains(wellKnownErrorKey)); -private: - bool isError(const QString &line) const { - foreach (const QString &wellKnownError, wellKnownErrors) { - if (line.contains(wellKnownError)) { - return true; - } - } - return false; + errorValue = wellKnownErrors.value(wellKnownErrorKey, errorKey); } + ExternalToolLogParser::setLastError(errorValue); +} - static const QStringList wellKnownErrors; -}; +QMap<QString, QString> ClarkLogParser::initWellKnownErrors() { + QMap<QString, QString> result; + result.insert("std::bad_alloc", tr("There is not enough memory (RAM) to execute CLARK.")); + result.insert("Process crashed", tr("CLARK process crashed. It might happened because there is not enough memory (RAM) to complete the CLARK execution.")); -const QStringList ClarkLogParser::wellKnownErrors("std::bad_alloc"); + return result; +} + +static const QByteArray REPORT_PREFIX("Object_ID,"); +static const QByteArray EXTENDED_REPORT_SUFFIX(",Length,Gamma,1st_assignment,score1,2nd_assignment,score2,confidence"); ClarkClassifyTask::ClarkClassifyTask(const ClarkClassifySettings &settings, const QString &readsUrl, const QString &pairedReadsUrl, const QString &reportUrl) - : ExternalToolSupportTask(tr("Classify reads with Clark"), TaskFlags_NR_FOSE_COSC), + : ExternalToolSupportTask(tr("Classify reads with Clark"), TaskFlags_FOSE_COSC), cfg(settings), readsUrl(readsUrl), pairedReadsUrl(pairedReadsUrl), reportUrl(reportUrl) { GCOUNTER(cvar, tvar, "ClarkClassifyTask"); @@ -657,15 +582,16 @@ ClarkClassifyTask::ClarkClassifyTask(const ClarkClassifySettings &settings, cons } void ClarkClassifyTask::prepare() { - QString toolName = ET_CLARK_L; + QString toolId = ClarkSupport::ET_CLARK_L_ID; if ( QString::compare(cfg.tool, ClarkClassifySettings::TOOL_DEFAULT, Qt::CaseInsensitive) == 0) { - toolName = ET_CLARK; + toolId = ClarkSupport::ET_CLARK_ID; } else if (QString::compare(cfg.tool, ClarkClassifySettings::TOOL_LIGHT, Qt::CaseInsensitive) != 0) { stateInfo.setError(tr("Unsupported CLARK variant. Only default and light variants are supported.")); return; } - QScopedPointer<ExternalToolRunTask> task(new ExternalToolRunTask(toolName, getArguments(), new ClarkLogParser(), cfg.databaseUrl)); + QScopedPointer<ExternalToolRunTask> task(new ExternalToolRunTask(toolId, getArguments(), new ClarkLogParser(), cfg.databaseUrl)); CHECK_OP(stateInfo, ); + setListenerForTask(task.data()); addSubTask(task.take()); } @@ -711,6 +637,50 @@ QStringList ClarkClassifyTask::getArguments() { return arguments; } +const TaxonomyClassificationResult & ClarkClassifyTask::getParsedReport() const { + return parsedReport; +} + +void ClarkClassifyTask::run() { + QFile reportFile(reportUrl); + if (!reportFile.open(QIODevice::ReadOnly)) { + setError(tr("Cannot open classification report: %1").arg(reportUrl)); + } else { + QByteArray line = reportFile.readLine().trimmed(); + + bool extended = line.endsWith(EXTENDED_REPORT_SUFFIX); + if (!line.startsWith(REPORT_PREFIX)) { + setError(tr("Failed to recognize CLARK report format: %1").arg(QString(line))); + } else { + while ((line = reportFile.readLine().trimmed()).size() != 0) { + QList<QByteArray> row = line.split(','); + if (extended ? row.size() < 6 : row.size() != 3) { + setError(tr("Broken CLARK report: %1").arg(reportUrl)); + break; + } + int assignmentIdx = extended ? row.size() - 5 : 2; + QString objID = row.at(0); + const QByteArray &assStr = row.at(assignmentIdx); + algoLog.trace(QString("Found CLARK classification: %1=%2").arg(objID).arg(QString(assStr))); + + bool ok = true; + TaxID assID = (assStr != "NA") ? assStr.toUInt(&ok) : TaxonomyTree::UNCLASSIFIED_ID; + if (!ok) { + setError(tr("Broken CLARK report: %1").arg(reportUrl)); + break; + } + if (parsedReport.contains(objID)) { + QString msg = tr("Duplicate sequence name '%1' have been detected in the classification output.").arg(objID); + algoLog.info(msg); + } else { + parsedReport.insert(objID, assID); + } + } + } + reportFile.close(); + } +} + ClarkClassifySettings::ClarkClassifySettings() : tool(ClarkClassifySettings::TOOL_LIGHT), gap(4), factor(2), minFreqTarget(0), kmerSize(31), numberOfThreads(1), extOut(false), preloadDatabase(false), mode(ClarkClassifySettings::Default) diff --git a/src/plugins/clark_support/src/ClarkClassifyWorker.h b/src/plugins/clark_support/src/ClarkClassifyWorker.h index 74c674f41aae28b02572b7596ae04b8005c541af..cdfb9c311ff61f11de30f3f034aecba12805f175 100644 --- a/src/plugins/clark_support/src/ClarkClassifyWorker.h +++ b/src/plugins/clark_support/src/ClarkClassifyWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -80,13 +80,9 @@ public: ClarkClassifyWorker(Actor *a); protected: void init(); - bool isReady() const; Task * tick(); void cleanup(); -private: - TaxonomyClassificationResult parseReport(const QString& url); - private slots: void sl_taskFinished(Task *task); @@ -148,23 +144,35 @@ public: static const QString WORKFLOW_CLASSIFY_TOOL_CLARK; }; +class ClarkLogParser : public ExternalToolLogParser { +public: + ClarkLogParser(); + +private: + bool isError(const QString &line) const override; + void setLastError(const QString &errorKey) override; + static QMap<QString, QString> initWellKnownErrors(); + + static const QMap<QString, QString> wellKnownErrors; +}; + class ClarkClassifyTask : public ExternalToolSupportTask { Q_OBJECT public: ClarkClassifyTask(const ClarkClassifySettings &cfg, const QString &readsUrl, const QString &pairedReadsUrl, const QString &reportUrl); const QString &getReportUrl() const {return reportUrl;} - + const TaxonomyClassificationResult &getParsedReport() const; private: - void prepare(); - + void prepare() override; + void run() override; QStringList getArguments(); const ClarkClassifySettings cfg; const QString readsUrl; const QString pairedReadsUrl; QString reportUrl; - + TaxonomyClassificationResult parsedReport; }; } //LocalWorkflow diff --git a/src/plugins/clark_support/src/ClarkSupport.cpp b/src/plugins/clark_support/src/ClarkSupport.cpp index 4e648919c05183e07a60f4bb5bf91296eec63f39..bc3c6e931c8de0337f0ce311771d51835cd1786a 100644 --- a/src/plugins/clark_support/src/ClarkSupport.cpp +++ b/src/plugins/clark_support/src/ClarkSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -31,7 +31,21 @@ namespace U2 { -ClarkSupport::ClarkSupport(const QString& name, const QString& path) : ExternalTool(name, path) +const QString ClarkSupport::CLARK_GROUP = "CLARK"; +const QString ClarkSupport::ET_CLARK = "CLARK"; +const QString ClarkSupport::ET_CLARK_ID = "USUPP_CLARK"; +const QString ClarkSupport::ET_CLARK_L = "CLARK-l"; +const QString ClarkSupport::ET_CLARK_L_ID = "USUPP_CLARK_L"; +const QString ClarkSupport::ET_CLARK_BUILD_SCRIPT = "builddb.sh"; +const QString ClarkSupport::ET_CLARK_BUILD_SCRIPT_ID = "USUPP_CLARK_BUILD_DB"; +const QString ClarkSupport::ET_CLARK_GET_ACCSSN_TAX_ID = "getAccssnTaxID"; +const QString ClarkSupport::ET_CLARK_GET_ACCSSN_TAX_ID_ID = "USUPP_CLARK_GET_ACCSSN_TAX_ID"; +const QString ClarkSupport::ET_CLARK_GET_TARGETS_DEF = "getTargetsDef"; +const QString ClarkSupport::ET_CLARK_GET_TARGETS_DEF_ID = "USUPP_CLARK_GET_TARGETS_DEF"; +const QString ClarkSupport::ET_CLARK_GET_FILES_TO_TAX_NODES = "getfilesToTaxNodes"; +const QString ClarkSupport::ET_CLARK_GET_FILES_TO_TAX_NODES_ID = "USUPP_CLARK_GET_FILES_TO_TAX_NODES"; + +ClarkSupport::ClarkSupport(const QString& id, const QString& name, const QString& path) : ExternalTool(id, name, path) { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/cmdline.png"); @@ -63,37 +77,31 @@ ClarkSupport::ClarkSupport(const QString& name, const QString& path) : ExternalT "Note that a UGENE-customized version of the tool is required."); } - if (name == ET_CLARK_buildScript) { + if (name == ET_CLARK_BUILD_SCRIPT) { validMessage = name; } - - connect(this, SIGNAL(si_toolValidationStatusChanged(bool)), SLOT(sl_toolValidationStatusChanged(bool))); } void ClarkSupport::registerTools(ExternalToolRegistry *etRegistry) { - etRegistry->registerEntry(new ClarkSupport(ET_CLARK)); - etRegistry->registerEntry(new ClarkSupport(ET_CLARK_L)); - etRegistry->registerEntry(new ClarkSupport(ET_CLARK_getAccssnTaxID)); - etRegistry->registerEntry(new ClarkSupport(ET_CLARK_getfilesToTaxNodes)); - etRegistry->registerEntry(new ClarkSupport(ET_CLARK_getTargetsDef)); - etRegistry->registerEntry(new ClarkSupport(ET_CLARK_buildScript)); + etRegistry->registerEntry(new ClarkSupport(ET_CLARK_ID, ET_CLARK, "")); + etRegistry->registerEntry(new ClarkSupport(ET_CLARK_L_ID, ET_CLARK_L, "")); + etRegistry->registerEntry(new ClarkSupport(ET_CLARK_GET_ACCSSN_TAX_ID_ID, ET_CLARK_GET_ACCSSN_TAX_ID, "")); + etRegistry->registerEntry(new ClarkSupport(ET_CLARK_GET_FILES_TO_TAX_NODES_ID, ET_CLARK_GET_FILES_TO_TAX_NODES, "")); + etRegistry->registerEntry(new ClarkSupport(ET_CLARK_GET_TARGETS_DEF_ID, ET_CLARK_GET_TARGETS_DEF, "")); + etRegistry->registerEntry(new ClarkSupport(ET_CLARK_BUILD_SCRIPT_ID, ET_CLARK_BUILD_SCRIPT, "")); etRegistry->setToolkitDescription(CLARK_GROUP, tr("CLARK (CLAssifier based on Reduced K-mers) is a tool for supervised sequence classification " "based on discriminative k-mers. UGENE provides the GUI for CLARK and CLARK-l variants of the CLARK framework " "for solving the problem of the assignment of metagenomic reads to known genomes.")); } void ClarkSupport::unregisterTools(ExternalToolRegistry *etRegistry) { - etRegistry->unregisterEntry(ET_CLARK); - etRegistry->unregisterEntry(ET_CLARK_L); - etRegistry->unregisterEntry(ET_CLARK_getAccssnTaxID); - etRegistry->unregisterEntry(ET_CLARK_getfilesToTaxNodes); - etRegistry->unregisterEntry(ET_CLARK_getTargetsDef); - etRegistry->unregisterEntry(ET_CLARK_buildScript); -} - -void ClarkSupport::sl_toolValidationStatusChanged(bool) { - ScriptingTool::onPathChanged(this); + etRegistry->unregisterEntry(ET_CLARK_ID); + etRegistry->unregisterEntry(ET_CLARK_L_ID); + etRegistry->unregisterEntry(ET_CLARK_GET_ACCSSN_TAX_ID_ID); + etRegistry->unregisterEntry(ET_CLARK_GET_FILES_TO_TAX_NODES_ID); + etRegistry->unregisterEntry(ET_CLARK_GET_TARGETS_DEF_ID); + etRegistry->unregisterEntry(ET_CLARK_BUILD_SCRIPT_ID); } diff --git a/src/plugins/clark_support/src/ClarkSupport.h b/src/plugins/clark_support/src/ClarkSupport.h index b0a0dd19f11573386cb66a5d44abbe96b11d293a..f3f5b8748a0e110dccbcd3ae7d522164eb0f903d 100644 --- a/src/plugins/clark_support/src/ClarkSupport.h +++ b/src/plugins/clark_support/src/ClarkSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,26 +24,30 @@ #include <U2Core/ExternalToolRegistry.h> -#define CLARK_GROUP "CLARK" -#define ET_CLARK "CLARK" -#define ET_CLARK_L "CLARK-l" -#define ET_CLARK_getAccssnTaxID "getAccssnTaxID" -#define ET_CLARK_getfilesToTaxNodes "getfilesToTaxNodes" -#define ET_CLARK_getTargetsDef "getTargetsDef" -#define ET_CLARK_buildScript "builddb.sh" - namespace U2 { class ClarkSupport : public ExternalTool { Q_OBJECT public: - ClarkSupport(const QString& name, const QString& path = ""); + ClarkSupport(const QString& id, const QString& name, const QString& path = ""); static void registerTools(ExternalToolRegistry *etRegistry); static void unregisterTools(ExternalToolRegistry *etRegistry); -private slots: - void sl_toolValidationStatusChanged(bool isValid); + static const QString CLARK_GROUP; + static const QString ET_CLARK; + static const QString ET_CLARK_ID; + static const QString ET_CLARK_L; + static const QString ET_CLARK_L_ID; + static const QString ET_CLARK_BUILD_SCRIPT; + static const QString ET_CLARK_BUILD_SCRIPT_ID; + static const QString ET_CLARK_GET_ACCSSN_TAX_ID; + static const QString ET_CLARK_GET_ACCSSN_TAX_ID_ID; + static const QString ET_CLARK_GET_TARGETS_DEF; + static const QString ET_CLARK_GET_TARGETS_DEF_ID; + static const QString ET_CLARK_GET_FILES_TO_TAX_NODES; + static const QString ET_CLARK_GET_FILES_TO_TAX_NODES_ID; + }; }//namespace diff --git a/src/plugins/clark_support/src/ClarkSupportPlugin.cpp b/src/plugins/clark_support/src/ClarkSupportPlugin.cpp index e9a566feef936a8eb87fbdd2483710c326a1fa33..c9a66e838eea5b0bef3e56160f5f89e97abe62aa 100644 --- a/src/plugins/clark_support/src/ClarkSupportPlugin.cpp +++ b/src/plugins/clark_support/src/ClarkSupportPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,10 +22,14 @@ #include <U2Core/AppContext.h> #include <U2Core/ExternalToolRegistry.h> +#include <U2Test/GTestFrameworkComponents.h> +#include <U2Test/XMLTestFormat.h> + #include "ClarkBuildWorker.h" #include "ClarkClassifyWorker.h" #include "ClarkSupport.h" #include "ClarkSupportPlugin.h" +#include "ClarkTests.h" namespace U2 { @@ -38,7 +42,8 @@ extern "C" Q_DECL_EXPORT Plugin* U2_PLUGIN_INIT_FUNC() { } ClarkSupportPlugin::ClarkSupportPlugin() - : Plugin(PLUGIN_NAME, PLUGIN_DESCRIPRION) + : Plugin(PLUGIN_NAME, PLUGIN_DESCRIPRION), + testFactories(nullptr) { ExternalToolRegistry *etRegistry = AppContext::getExternalToolRegistry(); CHECK(NULL != etRegistry, ); @@ -47,9 +52,31 @@ ClarkSupportPlugin::ClarkSupportPlugin() LocalWorkflow::ClarkBuildWorkerFactory::init(); LocalWorkflow::ClarkClassifyWorkerFactory::init(); + + // tests + GTestFormatRegistry* testFormatRegistry = AppContext::getTestFramework()->getTestFormatRegistry(); + XMLTestFormat *xmlTestFormat = qobject_cast<XMLTestFormat *>(testFormatRegistry->findFormat("XML")); + SAFE_POINT(nullptr != xmlTestFormat, "Can't find XML test format", ); + + testFactories = new GAutoDeleteList<XMLTestFactory>(this); + testFactories->qlist = ClarkTests::createTestFactories(); + + foreach (XMLTestFactory *testFactory, testFactories->qlist) { + bool registered = xmlTestFormat->registerTestFactory(testFactory); + assert(registered); + Q_UNUSED(registered); + } } ClarkSupportPlugin::~ClarkSupportPlugin() { + GTestFormatRegistry* testFormatRegistry = AppContext::getTestFramework()->getTestFormatRegistry(); + XMLTestFormat *xmlTestFormat = qobject_cast<XMLTestFormat *>(testFormatRegistry->findFormat("XML")); + SAFE_POINT(nullptr != xmlTestFormat, "Can't find XML test format", ); + + foreach (XMLTestFactory *testFactory, testFactories->qlist) { + xmlTestFormat->unregisterTestFactory(testFactory); + } + ExternalToolRegistry *etRegistry = AppContext::getExternalToolRegistry(); CHECK(NULL != etRegistry, ); ClarkSupport::unregisterTools(etRegistry); diff --git a/src/plugins/clark_support/src/ClarkSupportPlugin.h b/src/plugins/clark_support/src/ClarkSupportPlugin.h index c3e9569029047fbbb8bcf89aaac1d31e12e8c0a2..8f13b6d0cc5e048f0a0d70b623673f167ff6450c 100644 --- a/src/plugins/clark_support/src/ClarkSupportPlugin.h +++ b/src/plugins/clark_support/src/ClarkSupportPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,10 +22,13 @@ #ifndef _U2_CLARK_SUPPORT_PLUGIN_H_ #define _U2_CLARK_SUPPORT_PLUGIN_H_ +#include <U2Core/GAutoDeleteList.h> #include <U2Core/PluginModel.h> namespace U2 { +class XMLTestFactory; + class ClarkSupportPlugin : public Plugin { Q_OBJECT public: @@ -34,6 +37,9 @@ public: static const QString PLUGIN_NAME; static const QString PLUGIN_DESCRIPRION; + +private: + GAutoDeleteList<XMLTestFactory> *testFactories; }; } // namespace U2 diff --git a/src/plugins/clark_support/src/ClarkTests.cpp b/src/plugins/clark_support/src/ClarkTests.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1d93a728c9d461328f6e062b0330ff6c074fa6c6 --- /dev/null +++ b/src/plugins/clark_support/src/ClarkTests.cpp @@ -0,0 +1,135 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QDomElement> +#include <QFileInfo> +#include <QTextStream> + +#include <U2Core/U2SafePoints.h> + +#include "ClarkTests.h" + +namespace U2 { + +const QString GTest_CompareClarkDatabaseMetafiles::DATABASE1 = "database1"; +const QString GTest_CompareClarkDatabaseMetafiles::DATABASE2 = "database2"; +const QString GTest_CompareClarkDatabaseMetafiles::DATABASE1_PREFIXES = "database1-prefixes"; +const QString GTest_CompareClarkDatabaseMetafiles::DATABASE2_PREFIXES = "database2-prefixes"; + +const QString GTest_CompareClarkDatabaseMetafiles::DATABASE_PREFIX_PLACEHOLDER = "!@#$%^&*()"; +const QStringList GTest_CompareClarkDatabaseMetafiles::DATABASE_METAFILES = { ".custom", + ".custom.fileToAccssnTaxID", + ".custom.fileToTaxIDs", + ".custom_rejected", + "files_excluded.txt", + "targets.txt" }; +const QString GTest_CompareClarkDatabaseMetafiles::PREFIXES_SEPARATOR = ";"; + +void GTest_CompareClarkDatabaseMetafiles::init(XMLTestFormat *, const QDomElement &element) { + // database 1 + checkNecessaryAttributeExistence(element, DATABASE1); + CHECK_OP(stateInfo, ); + + database1 = element.attribute(DATABASE1); + CHECK_EXT(!database1.isEmpty(), setError("Database 1 URL is empty"), ); + + XMLTestUtils::replacePrefix(env, database1); + + // database 2 + checkNecessaryAttributeExistence(element, DATABASE2); + CHECK_OP(stateInfo, ); + + database2 = element.attribute(DATABASE2); + CHECK_EXT(!database2.isEmpty(), setError("Database 2 URL is empty"), ); + + XMLTestUtils::replacePrefix(env, database2); + + // database 1 prefix + checkNecessaryAttributeExistence(element, DATABASE1_PREFIXES); + CHECK_OP(stateInfo, ); + + foreach (QString prefix, element.attribute(DATABASE1_PREFIXES).split(PREFIXES_SEPARATOR)) { + XMLTestUtils::replacePrefix(env, prefix); + database1Prefixes << prefix; + } + + // database 2 prefix + checkNecessaryAttributeExistence(element, DATABASE2_PREFIXES); + CHECK_OP(stateInfo, ); + + foreach (QString prefix, element.attribute(DATABASE2_PREFIXES).split(PREFIXES_SEPARATOR)) { + XMLTestUtils::replacePrefix(env, prefix); + database2Prefixes << prefix; + } +} + +Task::ReportResult GTest_CompareClarkDatabaseMetafiles::report() { + CHECK_OP(stateInfo, ReportResult_Finished); + + CHECK_EXT(QFileInfo::exists(database1), setError(QString("Database 1 doesn't exist: '%1'").arg(database1)), ReportResult_Finished); + CHECK_EXT(QFileInfo(database1).isDir(), setError(QString("Database 1 is not a directory: '%1'").arg(database1)), ReportResult_Finished); + + CHECK_EXT(QFileInfo::exists(database2), setError(QString("Database 2 doesn't exist: '%1'").arg(database2)), ReportResult_Finished); + CHECK_EXT(QFileInfo(database2).isDir(), setError(QString("Database 2 is not a directory: '%1'").arg(database2)), ReportResult_Finished); + + foreach (const QString &metafileName, DATABASE_METAFILES) { + const QString metafile1Url = database1 + "/" + metafileName; + QFile metafile1(metafile1Url); + bool opened = metafile1.open(QIODevice::ReadOnly); + CHECK_EXT(opened, setError(QString("Can't open metafile '%1' for reading").arg(metafile1.fileName())), ReportResult_Finished); + QTextStream metafileStream1(&metafile1); + + const QString metafile2Url = database2 + "/" + metafileName; + QFile metafile2(metafile2Url); + opened = metafile2.open(QIODevice::ReadOnly); + CHECK_EXT(opened, setError(QString("Can't open metafile '%1' for reading").arg(metafile2.fileName())), ReportResult_Finished); + QTextStream metafileStream2(&metafile2); + + int counter = 0; + while (!metafileStream1.atEnd() && !metafileStream2.atEnd()) { + QString metafile1Line = metafileStream1.readLine(); + foreach (const QString &prefix, database1Prefixes) { + metafile1Line.replace(prefix, DATABASE_PREFIX_PLACEHOLDER); + } + + QString metafile2Line = metafileStream2.readLine(); + foreach (const QString &prefix, database2Prefixes) { + metafile2Line.replace(prefix, DATABASE_PREFIX_PLACEHOLDER); + } + + CHECK_EXT(metafile1Line == metafile2Line, + setError(QString("Metafiles '%1' and '%2' differs at line %3: '%4' and '%5'") + .arg(metafile1Url).arg(metafile2Url).arg(++counter).arg(metafile1Line).arg(metafile2Line)), ReportResult_Finished); + } + + CHECK_EXT(metafileStream1.atEnd() && metafileStream2.atEnd(), + setError(QString("Metafiles '%1' and '%2' have different number of lines") + .arg(metafile1Url).arg(metafile2Url)), ReportResult_Finished); + } + + return ReportResult_Finished; +} + +QList<XMLTestFactory *> ClarkTests::createTestFactories() { + return { GTest_CompareClarkDatabaseMetafiles::createFactory() }; +} + +} // naamespace U2 diff --git a/src/plugins/clark_support/src/ClarkTests.h b/src/plugins/clark_support/src/ClarkTests.h new file mode 100644 index 0000000000000000000000000000000000000000..f7cbe7cd13aafab49865a5b9dd6acbc5cb6a13f1 --- /dev/null +++ b/src/plugins/clark_support/src/ClarkTests.h @@ -0,0 +1,69 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_CLARK_TESTS_H_ +#define _U2_CLARK_TESTS_H_ + +#include <U2Test/XMLTestUtils.h> + +namespace U2 { + +/** + * @brief The GTest_CompareClarkDatabaseMetafiles class + * This test compares metafiles of two CLARK databases defined by @database1 and @database2 attributes. + * The following metafiles are compared: ".custom", ".custom.fileToAccssnTaxID", ".custom.fileToTaxIDs", ".custom_rejected", "files_excluded.txt", "targets.txt". + * The metafiles ".setting" are not compared. + * @database1-prefixes and @database2-prefixes attributes contain lists of paths to folders with + * the source reference sequences that were used to build the databases separated with ';'. + * These paths are removed from every line of metafiles to make them independent from the test folder path. + */ +class GTest_CompareClarkDatabaseMetafiles : public XmlTest { +public: + SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CompareClarkDatabaseMetafiles, "clark-compare-database-metafiles") + +private: + ReportResult report() override; + + QString database1; + QString database2; + QStringList database1Prefixes; + QStringList database2Prefixes; + + // attributes + static const QString DATABASE1; // this attribute is a path to the first CLARK database + static const QString DATABASE2; // this attribute is a path to the second CLARK database + static const QString DATABASE1_PREFIXES; // this attribute contains prefixes separated with ';' for database 1 that will be removed from every database 1 metafile line before lines comparison + static const QString DATABASE2_PREFIXES; // this attribute contains prefixes separated with ';' for database 2 that will be removed from every database 2 metafile line before lines comparison + + // inner constants + static const QString DATABASE_PREFIX_PLACEHOLDER; + static const QStringList DATABASE_METAFILES; + static const QString PREFIXES_SEPARATOR; +}; + +class ClarkTests { +public: + static QList<XMLTestFactory *> createTestFactories(); +}; + +} // namespace U2 + +#endif // _U2_CLARK_TESTS_H_ diff --git a/src/plugins/clark_support/transl/russian.ts b/src/plugins/clark_support/transl/russian.ts index de67641df9fef3bc2cd4f7b38935aa776f468e10..c3d215f0fb210af187da32418f7c4cfd14c106b1 100644 --- a/src/plugins/clark_support/transl/russian.ts +++ b/src/plugins/clark_support/transl/russian.ts @@ -1,6 +1,32 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="ru_RU"> +<context> + <name>ClarkBuildValidator</name> + <message> + <source>Taxonomy classification data from NCBI data are not available.</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Taxonomy classification data from NCBI are not full: file '%1' is missing.</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>ClarkClassifyValidator</name> + <message> + <source>The database folder doesn't exist: %1.</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>The mandatory database file doesn't exist: %1.</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Reference database for these CLARK settings is not available. RefSeq data are required to build it.</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>QObject</name> <message> @@ -15,19 +41,19 @@ <context> <name>U2::ClarkSupport</name> <message> - <source>One of the classifiers from the CLARK framework. This tool is created for powerful workstations and can require a significant amount of RAM.</source> + <source>CLARK (CLAssifier based on Reduced K-mers) is a tool for supervised sequence classification based on discriminative k-mers. UGENE provides the GUI for CLARK and CLARK-l variants of the CLARK framework for solving the problem of the assignment of metagenomic reads to known genomes.</source> <translation type="unfinished"></translation> </message> <message> - <source>One of the classifiers from the CLARK framework. This tool is created for workstations with limited memory (i.e., “l†for light), it provides precise classification on small metagenomes.</source> + <source>One of the classifiers from the CLARK framework. This tool is created for powerful workstations and can require a significant amount of RAM.<br><br>Note that a UGENE-customized version of the tool is required.</source> <translation type="unfinished"></translation> </message> <message> - <source>Used to set up metagenomic database for CLARK. </source> + <source>One of the classifiers from the CLARK framework. This tool is created for workstations with limited memory (i.e., “l†for light), it provides precise classification on small metagenomes.<br><br>Note that a UGENE-customized version of the tool is required.</source> <translation type="unfinished"></translation> </message> <message> - <source>CLARK (CLAssifier based on Reduced K-mers) is a tool for supervised sequence classification based on discriminative k-mers. UGENE provides the GUI for CLARK and CLARK-l variants of the CLARK framework for solving the problem of the assignment of metagenomic reads to known genomes.</source> + <source>Used to set up metagenomic database for CLARK.<br><br>Note that a UGENE-customized version of the tool is required.</source> <translation type="unfinished"></translation> </message> </context> @@ -142,11 +168,11 @@ NCBI taxonomy data are used to map the accession number found in each reference <translation type="unfinished"></translation> </message> <message> - <source>Taxonomy data is not found.</source> + <source>Built Clark database</source> <translation type="unfinished"></translation> </message> <message> - <source>Built Clark database</source> + <source>Taxonomy classification data from NCBI are not available.</source> <translation type="unfinished"></translation> </message> </context> @@ -160,23 +186,31 @@ NCBI taxonomy data are used to map the accession number found in each reference <source>Classify paired-end reads from <u>%1</u> with CLARK, use %2 database.</source> <translation type="unfinished"></translation> </message> +</context> +<context> + <name>U2::LocalWorkflow::ClarkClassifyTask</name> + <message> + <source>Classify reads with Clark</source> + <translation type="unfinished"></translation> + </message> <message> - <source>The database folder doesn't exist: %1.</source> + <source>Unsupported CLARK variant. Only default and light variants are supported.</source> <translation type="unfinished"></translation> </message> <message> - <source>The mandatory database file doesn't exist: %1.</source> + <source>Cannot open classification report: %1</source> <translation type="unfinished"></translation> </message> -</context> -<context> - <name>U2::LocalWorkflow::ClarkClassifyTask</name> <message> - <source>Classify reads with Clark</source> + <source>Failed to recognize CLARK report format: %1</source> <translation type="unfinished"></translation> </message> <message> - <source>Unsupported CLARK variant. Only default and light variants are supported.</source> + <source>Broken CLARK report: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Duplicate sequence name '%1' have been detected in the classification output.</source> <translation type="unfinished"></translation> </message> </context> @@ -305,7 +339,7 @@ See also the "Input data" parameter of the element.</source> <translation type="unfinished"></translation> </message> <message> - <source>Request the loading of database file by memory mapped-file (--ldm).<br><br>This option accelerates the loading time but it will require an additional amount of RAM significant. This option also allows to load the database in multithreaded-task (see also the "Number of threads" parameter).</source> + <source>Request the loading of database file by memory mapped-file (--ldm).<br><br>This option accelerates the loading time but it will require an additional amount of RAM significant. This option also allows one to load the database in multithreaded-task (see also the "Number of threads" parameter).</source> <translation type="unfinished"></translation> </message> <message> @@ -337,19 +371,18 @@ See also the "Input data" parameter of the element.</source> <translation type="unfinished"></translation> </message> <message> - <source>Cannot open classification report: %1</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Failed to recognize CLARK report format: %1</source> + <source>There were %1 input reads, %2 reads were classified.</source> <translation type="unfinished"></translation> </message> +</context> +<context> + <name>U2::LocalWorkflow::ClarkLogParser</name> <message> - <source>Broken CLARK report: %1</source> + <source>There is not enough memory (RAM) to execute CLARK.</source> <translation type="unfinished"></translation> </message> <message> - <source>Duplicate sequence name '%1' have been detected in the classification output.</source> + <source>CLARK process crashed. It might happened because there is not enough memory (RAM) to complete the CLARK execution.</source> <translation type="unfinished"></translation> </message> </context> diff --git a/src/plugins/cuda_support/src/CudaSupportPlugin.cpp b/src/plugins/cuda_support/src/CudaSupportPlugin.cpp index f9bf6ac0bd3a3f19bc542a13ac31e9aacfeba024..28a6942b2a08adeed9964549df5a96d5fbaf609a 100644 --- a/src/plugins/cuda_support/src/CudaSupportPlugin.cpp +++ b/src/plugins/cuda_support/src/CudaSupportPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/cuda_support/src/CudaSupportPlugin.h b/src/plugins/cuda_support/src/CudaSupportPlugin.h index f258c7ac3521326b3ce969b69bc3badd10d517ff..c9fc1e3cd27b47dc2492bec7a5a37bc3879a019c 100644 --- a/src/plugins/cuda_support/src/CudaSupportPlugin.h +++ b/src/plugins/cuda_support/src/CudaSupportPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/cuda_support/src/CudaSupportSettingsController.cpp b/src/plugins/cuda_support/src/CudaSupportSettingsController.cpp index d908315bd0d89a5fd51be6f9f1872df8a9110f17..9d53ee939488116aabdb538c58c06cc5443790ce 100644 --- a/src/plugins/cuda_support/src/CudaSupportSettingsController.cpp +++ b/src/plugins/cuda_support/src/CudaSupportSettingsController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/cuda_support/src/CudaSupportSettingsController.h b/src/plugins/cuda_support/src/CudaSupportSettingsController.h index b6b746ec3d1f9b8f0d19d8847bf2a3bb0b40342c..402b6ccbbc709b19351f11bf3a17b4f891f7032e 100644 --- a/src/plugins/cuda_support/src/CudaSupportSettingsController.h +++ b/src/plugins/cuda_support/src/CudaSupportSettingsController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/dbi_bam.pri b/src/plugins/dbi_bam/dbi_bam.pri index 410027eadc7bd400f4d56fd3181940acd40a76e3..a3da5bb5d3bb60173f707466cc0f24a50f06ad0c 100644 --- a/src/plugins/dbi_bam/dbi_bam.pri +++ b/src/plugins/dbi_bam/dbi_bam.pri @@ -6,21 +6,16 @@ PLUGIN_VENDOR=Unipro include( ../../ugene_plugin_common.pri ) -use_bundled_zlib() { - macx: LIBS += -lzlib -} else { - macx: LIBS += -lz -} - -LIBS += -lugenedb -lsamtools +LIBS += -lsamtools$$D +LIBS += $$add_z_lib() +LIBS += $$add_sqlite_lib() -win32-msvc2013 { +win32-msvc2013|win32-msvc2015|greaterThan(QMAKE_MSC_VER, 1909) { DEFINES += NOMINMAX _XKEYCHECK_H - LIBS += -lzlib } # Force re-linking when lib changes -unix:POST_TARGETDEPS += ../../_release/libsamtools.a +unix:POST_TARGETDEPS += ../../$$out_dir()/libsamtools$${D}.a # Same options which samtools is built with DEFINES+="_FILE_OFFSET_BITS=64" _LARGEFILE64_SOURCE _USE_KNETFILE INCLUDEPATH += ../../libs_3rdparty/samtools/src ../../libs_3rdparty/samtools/src/samtools @@ -34,28 +29,5 @@ win32 { } } -!debug_and_release|build_pass { - - CONFIG(debug, debug|release) { - LIBS -= -lugenedb -lsamtools - LIBS += -lugenedbd -lsamtoolsd - - win32-msvc2013 { - LIBS -= -lzlib - LIBS += -lzlibd - } - - macx { - use_bundled_zlib() { - LIBS -= -lzlib - LIBS += -lzlibd - } - } - - unix:POST_TARGETDEPS -= ../../_release/libsamtools.a - unix:POST_TARGETDEPS += ../../_debug/libsamtoolsd.a - } -} - INCLUDEPATH += ../../libs_3rdparty/sqlite3/src INCLUDEPATH += ../../libs_3rdparty/samtools/src ../../libs_3rdparty/samtools/src/samtools diff --git a/src/plugins/dbi_bam/src/Alignment.cpp b/src/plugins/dbi_bam/src/Alignment.cpp index 1a9751e0b1785f1c814982c4a0c8a788ba264199..8e771c8e20f7a29c7d9eb30ec5b74f8682e11be7 100644 --- a/src/plugins/dbi_bam/src/Alignment.cpp +++ b/src/plugins/dbi_bam/src/Alignment.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/Alignment.h b/src/plugins/dbi_bam/src/Alignment.h index f81d8cb3c61da575be35ff372785a3a92c40ec94..d2f7899fbdd6b3c464906c75cadc346e49626ce1 100644 --- a/src/plugins/dbi_bam/src/Alignment.h +++ b/src/plugins/dbi_bam/src/Alignment.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/BAMDbiPlugin.cpp b/src/plugins/dbi_bam/src/BAMDbiPlugin.cpp index 3631f640bdee0a2e7128cef08dd6fa3d8918ce83..275dd648b5c283f4744042aa327f090e2686005b 100644 --- a/src/plugins/dbi_bam/src/BAMDbiPlugin.cpp +++ b/src/plugins/dbi_bam/src/BAMDbiPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/BAMDbiPlugin.h b/src/plugins/dbi_bam/src/BAMDbiPlugin.h index 0a7d1cc218bbfe57a38c58eb13d620b1ed5ec28c..96cb5894bf763c7b3156704be7d5e4c32263e88b 100644 --- a/src/plugins/dbi_bam/src/BAMDbiPlugin.h +++ b/src/plugins/dbi_bam/src/BAMDbiPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/BAMFormat.cpp b/src/plugins/dbi_bam/src/BAMFormat.cpp index 7f616fd850d91da30d60feb7407daf92d36aac66..37cb5707baea895584409b60b0ad9ae69fb84c01 100644 --- a/src/plugins/dbi_bam/src/BAMFormat.cpp +++ b/src/plugins/dbi_bam/src/BAMFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/BAMFormat.h b/src/plugins/dbi_bam/src/BAMFormat.h index eb76985504fb0223547a217807a9259d0d5aef82..6680e2660c3e45e9a7312129d3cb4e88f298978c 100644 --- a/src/plugins/dbi_bam/src/BAMFormat.h +++ b/src/plugins/dbi_bam/src/BAMFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/BaiReader.cpp b/src/plugins/dbi_bam/src/BaiReader.cpp index 46f789df524ff0de966f0ef9afb067c7073e5bdf..cb221b13175d8c36001931dc8f19cb1ced47c596 100644 --- a/src/plugins/dbi_bam/src/BaiReader.cpp +++ b/src/plugins/dbi_bam/src/BaiReader.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/BaiReader.h b/src/plugins/dbi_bam/src/BaiReader.h index 266eef46d238b88e3c471450b381c94dc4b86705..c6843b5a408192eac5a5874a90dd5ef0742f0f80 100644 --- a/src/plugins/dbi_bam/src/BaiReader.h +++ b/src/plugins/dbi_bam/src/BaiReader.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/BaiWriter.cpp b/src/plugins/dbi_bam/src/BaiWriter.cpp index a4a6db657ccc69889e6367773b327d9d87d256e0..9e201d855b2e6fde63062bf32fb6273163d89601 100644 --- a/src/plugins/dbi_bam/src/BaiWriter.cpp +++ b/src/plugins/dbi_bam/src/BaiWriter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/BaiWriter.h b/src/plugins/dbi_bam/src/BaiWriter.h index 802a105953b9261bd5a60349010718a837a1f4a5..9c11eeb39b984cd8a07638692e98053b7604200d 100644 --- a/src/plugins/dbi_bam/src/BaiWriter.h +++ b/src/plugins/dbi_bam/src/BaiWriter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/BgzfReader.cpp b/src/plugins/dbi_bam/src/BgzfReader.cpp index 4b42ba15b6338d0e5cf5917731b911b1c7b5ea74..a2ad963f8fe56ad08139312a62c47caad43f59a1 100644 --- a/src/plugins/dbi_bam/src/BgzfReader.cpp +++ b/src/plugins/dbi_bam/src/BgzfReader.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/BgzfReader.h b/src/plugins/dbi_bam/src/BgzfReader.h index 2bc5aa425c5ef51e939b4413385e7a8aa9ab7370..978f1825d06d0db31aa446a8ff519bb3b64f3521 100644 --- a/src/plugins/dbi_bam/src/BgzfReader.h +++ b/src/plugins/dbi_bam/src/BgzfReader.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/BgzfWriter.cpp b/src/plugins/dbi_bam/src/BgzfWriter.cpp index 6a65988b92dcbe35271ad87864749250b1d934f4..638be56eb06ffcb7db4ab29602813e8f6955761e 100644 --- a/src/plugins/dbi_bam/src/BgzfWriter.cpp +++ b/src/plugins/dbi_bam/src/BgzfWriter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/BgzfWriter.h b/src/plugins/dbi_bam/src/BgzfWriter.h index 47be27c1d23a78e4f2fd68b28502cfc27667fedf..b860b02febb86b6554ce5eaf5e6da285f329bf9e 100644 --- a/src/plugins/dbi_bam/src/BgzfWriter.h +++ b/src/plugins/dbi_bam/src/BgzfWriter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/CancelledException.cpp b/src/plugins/dbi_bam/src/CancelledException.cpp index b4322a7fdcf128f5e687b4990349c1693e68cfcd..3edffab56cf30ca78fd916eee3c3ebc0159f14df 100644 --- a/src/plugins/dbi_bam/src/CancelledException.cpp +++ b/src/plugins/dbi_bam/src/CancelledException.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/CancelledException.h b/src/plugins/dbi_bam/src/CancelledException.h index ffc8009b2423744879a4075b95c5139af76f880b..10f4848b1b343572cdf00340efb09caccccb2048 100644 --- a/src/plugins/dbi_bam/src/CancelledException.h +++ b/src/plugins/dbi_bam/src/CancelledException.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/CigarValidator.cpp b/src/plugins/dbi_bam/src/CigarValidator.cpp index 69274991415f6b5e37bfe50e60921e961a98552c..4df4b56dbc1256630b2cacf5f00173319daabea7 100644 --- a/src/plugins/dbi_bam/src/CigarValidator.cpp +++ b/src/plugins/dbi_bam/src/CigarValidator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/CigarValidator.h b/src/plugins/dbi_bam/src/CigarValidator.h index 69cb96e05d9f283e454b804313babbd553d0f050..b7939645dfc08584bc237b76cd2f7d4cc3494bab 100644 --- a/src/plugins/dbi_bam/src/CigarValidator.h +++ b/src/plugins/dbi_bam/src/CigarValidator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/ConvertToSQLiteDialog.cpp b/src/plugins/dbi_bam/src/ConvertToSQLiteDialog.cpp index 9c541ba0733c271eee297b4f769487807f863de5..179de3a716347164e1c8f4cf1b3a7b3b3d2ef4cd 100644 --- a/src/plugins/dbi_bam/src/ConvertToSQLiteDialog.cpp +++ b/src/plugins/dbi_bam/src/ConvertToSQLiteDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -57,7 +57,7 @@ ConvertToSQLiteDialog::ConvertToSQLiteDialog(const GUrl& _sourceUrl, BAMInfo& _b sourceUrl(_sourceUrl), bamInfo(_bamInfo) { ui.setupUi(this); - new HelpButton(this, ui.buttonBox, "22055960"); + new HelpButton(this, ui.buttonBox, "24742495"); ui.buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Import")); ui.buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -253,8 +253,6 @@ void ConvertToSQLiteDialog::sl_refUrlButtonClicked() { GUrl currentUrl = ui.refUrlEdit->text(); if (ui.refUrlEdit->text().isEmpty()) { currentUrl = sourceUrl; - } else { - currentUrl = ui.refUrlEdit->text(); } QString dir = currentUrl.dirPath() + "/" + currentUrl.baseFileName(); QString value; diff --git a/src/plugins/dbi_bam/src/ConvertToSQLiteDialog.h b/src/plugins/dbi_bam/src/ConvertToSQLiteDialog.h index 5f93d96f5bd6ac8f649057f84e627e072bc3dfdd..d41ffcf2dc8f9c2137822f78becd3665ec8423ad 100644 --- a/src/plugins/dbi_bam/src/ConvertToSQLiteDialog.h +++ b/src/plugins/dbi_bam/src/ConvertToSQLiteDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/ConvertToSQLiteTask.cpp b/src/plugins/dbi_bam/src/ConvertToSQLiteTask.cpp index b64ebdd99d060a8658f4b727ab70acabd262365e..a0f0bd602b3a1233fcdffda5ac91fb5921f9c9b6 100644 --- a/src/plugins/dbi_bam/src/ConvertToSQLiteTask.cpp +++ b/src/plugins/dbi_bam/src/ConvertToSQLiteTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -458,7 +458,7 @@ void ConvertToSQLiteTask::run() { time_t totalTime = time(0) - startTime; - taskLog.info(QString("Converting assembly from %1 to %2 succesfully finished: imported %3 reads, total time %4 s, pack time %5 s") + taskLog.info(QString("Converting assembly from %1 to %2 successfully finished: imported %3 reads, total time %4 s, pack time %5 s") .arg(sourceUrl.fileName()) .arg(getDestinationUrl().fileName()) .arg(totalReadsImported) diff --git a/src/plugins/dbi_bam/src/ConvertToSQLiteTask.h b/src/plugins/dbi_bam/src/ConvertToSQLiteTask.h index 82ac33eb9bd8f6a4f6528ffb679f52bce98d1040..12b500f156a7a74a70e38d9636fb742e9805ea72 100644 --- a/src/plugins/dbi_bam/src/ConvertToSQLiteTask.h +++ b/src/plugins/dbi_bam/src/ConvertToSQLiteTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/Dbi.cpp b/src/plugins/dbi_bam/src/Dbi.cpp index 67613f88a0def973edcf89a8eeda63ce5f02ea26..90c11f9f0d025f84ee5ac995449dd28c1ecf464a 100644 --- a/src/plugins/dbi_bam/src/Dbi.cpp +++ b/src/plugins/dbi_bam/src/Dbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/Dbi.h b/src/plugins/dbi_bam/src/Dbi.h index 6b32a6b5159cd5e0b359b91f43d35b79efb540fa..882bec2631a1a21dd08a2ea69cc1849db9930f6a 100644 --- a/src/plugins/dbi_bam/src/Dbi.h +++ b/src/plugins/dbi_bam/src/Dbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/Exception.cpp b/src/plugins/dbi_bam/src/Exception.cpp index 06f1d59a3759cac61b609900f6ac6f81c3068033..9054e04ea09c83b061f63e09896c6063f4541b36 100644 --- a/src/plugins/dbi_bam/src/Exception.cpp +++ b/src/plugins/dbi_bam/src/Exception.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/Exception.h b/src/plugins/dbi_bam/src/Exception.h index ae93247cfffb4c7d641f177e4da6d99c23f7823f..085eb4ca68c9219ef4ca716aeac24fae3120c21e 100644 --- a/src/plugins/dbi_bam/src/Exception.h +++ b/src/plugins/dbi_bam/src/Exception.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/Header.cpp b/src/plugins/dbi_bam/src/Header.cpp index 32c66df9ec230a51e573a61f8032f55f89a727bc..1c6dbeb774fb965e27d50ae5d7e9c930626939d8 100644 --- a/src/plugins/dbi_bam/src/Header.cpp +++ b/src/plugins/dbi_bam/src/Header.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/Header.h b/src/plugins/dbi_bam/src/Header.h index c968a3769206cc96169e4b4e7e2d46d37b51f604..e6054ae380469ce62e29f1f5f981c473f0a81c01 100644 --- a/src/plugins/dbi_bam/src/Header.h +++ b/src/plugins/dbi_bam/src/Header.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/IOException.cpp b/src/plugins/dbi_bam/src/IOException.cpp index 9a9f375103ac4fa0a8e9d7e169123b7be6e8b556..569cc7b98d965b414b02a95863e3279fe9c677d7 100644 --- a/src/plugins/dbi_bam/src/IOException.cpp +++ b/src/plugins/dbi_bam/src/IOException.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/IOException.h b/src/plugins/dbi_bam/src/IOException.h index c4c3e8fd08a075d1ddee28b58f2386fffd9e10a8..459d85b10a80fb64bfc87e37dfb6c9d1be608fcb 100644 --- a/src/plugins/dbi_bam/src/IOException.h +++ b/src/plugins/dbi_bam/src/IOException.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/Index.cpp b/src/plugins/dbi_bam/src/Index.cpp index 4250b950a307447e26932b259ca477325855522e..5c23f7d63761e61633f85477a6b5c0d3f12ed8b8 100644 --- a/src/plugins/dbi_bam/src/Index.cpp +++ b/src/plugins/dbi_bam/src/Index.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/Index.h b/src/plugins/dbi_bam/src/Index.h index f67704a3164f25babb37dcb9ac2a8c82e9b033e0..60f3bf7be56004a9c912fe5ee255c2c4e69df952 100644 --- a/src/plugins/dbi_bam/src/Index.h +++ b/src/plugins/dbi_bam/src/Index.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/InvalidFormatException.cpp b/src/plugins/dbi_bam/src/InvalidFormatException.cpp index c52855dcef37d031bdc41fa5a020e78ca31e5fef..461da2d72d94b9e89979a19af8e12470d56e9b92 100644 --- a/src/plugins/dbi_bam/src/InvalidFormatException.cpp +++ b/src/plugins/dbi_bam/src/InvalidFormatException.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/InvalidFormatException.h b/src/plugins/dbi_bam/src/InvalidFormatException.h index f555402db60cbea93f6140c66ecb31d97ee52b39..e780dd8040be2bbac6ed9754b947cdde9a9b8bd3 100644 --- a/src/plugins/dbi_bam/src/InvalidFormatException.h +++ b/src/plugins/dbi_bam/src/InvalidFormatException.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/LoadBamInfoTask.cpp b/src/plugins/dbi_bam/src/LoadBamInfoTask.cpp index a03b95d0d97e1df2883b51b0dd834304bdf3461b..a4e1beacc7770ab2725ff953a92e1120b6785f99 100644 --- a/src/plugins/dbi_bam/src/LoadBamInfoTask.cpp +++ b/src/plugins/dbi_bam/src/LoadBamInfoTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/LoadBamInfoTask.h b/src/plugins/dbi_bam/src/LoadBamInfoTask.h index 5df25bf0ff26565cc04b488ce9c638b969c6a602..c1b82c250d6e47aaeb66552456d9a904f3a662a8 100644 --- a/src/plugins/dbi_bam/src/LoadBamInfoTask.h +++ b/src/plugins/dbi_bam/src/LoadBamInfoTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/PrepareToImportTask.cpp b/src/plugins/dbi_bam/src/PrepareToImportTask.cpp index 34e8f83ba65e4d59875d1b534c3a548511712204..24533366e0be05da6bcc84a995d3f79758f88c07 100644 --- a/src/plugins/dbi_bam/src/PrepareToImportTask.cpp +++ b/src/plugins/dbi_bam/src/PrepareToImportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/PrepareToImportTask.h b/src/plugins/dbi_bam/src/PrepareToImportTask.h index ec8e5ad5f81a8a43b9fa220fb475f1037f80a63a..bcff5309468e73ae28149ce4d1392ce8ac22daa2 100644 --- a/src/plugins/dbi_bam/src/PrepareToImportTask.h +++ b/src/plugins/dbi_bam/src/PrepareToImportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/Reader.cpp b/src/plugins/dbi_bam/src/Reader.cpp index 9a4e7820f5ffbeff39cedd25d81e52c722600f50..de14596a5072061f5ec14ba37f15359330804d14 100644 --- a/src/plugins/dbi_bam/src/Reader.cpp +++ b/src/plugins/dbi_bam/src/Reader.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/Reader.h b/src/plugins/dbi_bam/src/Reader.h index d717d07e9c132fe739041d6bfe102d2a38717710..3fcb475192c2027eb54ef63ead8fddf5e76e5518 100644 --- a/src/plugins/dbi_bam/src/Reader.h +++ b/src/plugins/dbi_bam/src/Reader.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/SamReader.cpp b/src/plugins/dbi_bam/src/SamReader.cpp index c2b33a75f4d7cf713f9f3a2ada03144ebd7e07bd..64977075fc0ee070acc461e5d389900518362545 100644 --- a/src/plugins/dbi_bam/src/SamReader.cpp +++ b/src/plugins/dbi_bam/src/SamReader.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/SamReader.h b/src/plugins/dbi_bam/src/SamReader.h index 83c61771b352f35aec007c0037b1334095588180..a1e9cb6a1469bf9c1c01a72ab9c094437cdd7589 100644 --- a/src/plugins/dbi_bam/src/SamReader.h +++ b/src/plugins/dbi_bam/src/SamReader.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/SamtoolsBasedDbi.cpp b/src/plugins/dbi_bam/src/SamtoolsBasedDbi.cpp index 3eb5fc2f7206a7204d060aeca2bcfa91b3c092cd..3d5bfa4f37a7da374a612718124ec3397eee9a54 100644 --- a/src/plugins/dbi_bam/src/SamtoolsBasedDbi.cpp +++ b/src/plugins/dbi_bam/src/SamtoolsBasedDbi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/SamtoolsBasedDbi.h b/src/plugins/dbi_bam/src/SamtoolsBasedDbi.h index f9202ad6b67bba34c39991339f674b7d0143e779..0367f4eef8bdec81d589e472daa21a05131e2e4d 100644 --- a/src/plugins/dbi_bam/src/SamtoolsBasedDbi.h +++ b/src/plugins/dbi_bam/src/SamtoolsBasedDbi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/VirtualOffset.cpp b/src/plugins/dbi_bam/src/VirtualOffset.cpp index 82430bca43565b9043c185f23dd5e7117b1749c0..b453961ea9d731d83e88b6b6e31af0491a69ab1a 100644 --- a/src/plugins/dbi_bam/src/VirtualOffset.cpp +++ b/src/plugins/dbi_bam/src/VirtualOffset.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dbi_bam/src/VirtualOffset.h b/src/plugins/dbi_bam/src/VirtualOffset.h index 70946ea6e8aaaa53e79ab9352a32a6de902cf9bc..bca0a7192ca752f8708ae41645256c3becfaac36 100644 --- a/src/plugins/dbi_bam/src/VirtualOffset.h +++ b/src/plugins/dbi_bam/src/VirtualOffset.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/diamond_support/diamond_support.pri b/src/plugins/diamond_support/diamond_support.pri index ddd9736cfc8c2536640a6a68a90cf39fdadb22e9..109eb0514135dbfa859f5ce29d52cf60efb3fe53 100644 --- a/src/plugins/diamond_support/diamond_support.pri +++ b/src/plugins/diamond_support/diamond_support.pri @@ -1,21 +1,12 @@ # include (diamond_support.pri) -include (../../ugene_version.pri) +include (../../ugene_globals.pri) PLUGIN_ID=diamond_support PLUGIN_NAME=DIAMOND external tool support PLUGIN_VENDOR=Unipro -PLUGIN_DEPENDS=ngs_reads_classification:$${UGENE_VERSION};external_tool_support:$${UGENE_VERSION} - -LIBS += -L../../_release/plugins -lngs_reads_classification - -!debug_and_release|build_pass { - CONFIG(debug, debug|release) { - PLUGIN_DEPENDS -= ngs_reads_classification:$${UGENE_VERSION};external_tool_support:$${UGENE_VERSION} - PLUGIN_DEPENDS += ngs_reads_classificationd:$${UGENE_VERSION};external_tool_supportd:$${UGENE_VERSION} - - LIBS -= -L../../_release/plugins -lngs_reads_classification - LIBS += -L../../_debug/plugins -lngs_reads_classificationd - } -} +PLUGIN_DEPENDS=ngs_reads_classification$${D}:$${UGENE_VERSION};external_tool_support$${D}:$${UGENE_VERSION} include( ../../ugene_plugin_common.pri ) + +LIBS += -L../../$$out_dir()/plugins +LIBS += -lngs_reads_classification$$D diff --git a/src/plugins/diamond_support/src/DiamondBuildPrompter.cpp b/src/plugins/diamond_support/src/DiamondBuildPrompter.cpp index e3c3f7d6a53d10102da6886e0a92becbe77e0911..46946fef96c613d267a93eb32d4e523ec25283a6 100644 --- a/src/plugins/diamond_support/src/DiamondBuildPrompter.cpp +++ b/src/plugins/diamond_support/src/DiamondBuildPrompter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/diamond_support/src/DiamondBuildPrompter.h b/src/plugins/diamond_support/src/DiamondBuildPrompter.h index cb7cc2c60d986338b5bff8491b535b089e7861ec..ed4f7cbbdc21e555e1ddb9ae80c32a5d0a36daa0 100644 --- a/src/plugins/diamond_support/src/DiamondBuildPrompter.h +++ b/src/plugins/diamond_support/src/DiamondBuildPrompter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/diamond_support/src/DiamondBuildTask.cpp b/src/plugins/diamond_support/src/DiamondBuildTask.cpp index a8e5cf136846561175b44f6d8d2b091a8a97410c..727441c7815c4bb314c8de7b8f247ef5c9308f2e 100644 --- a/src/plugins/diamond_support/src/DiamondBuildTask.cpp +++ b/src/plugins/diamond_support/src/DiamondBuildTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -51,7 +51,7 @@ QList<Task *> DiamondBuildTask::onSubTaskFinished(Task *subTask) { CHECK_OP(stateInfo, newSubTasks); if (genomesPreparationTask == subTask) { - ExternalToolRunTask *buildTask = new ExternalToolRunTask(DiamondSupport::TOOL_NAME, getArguments(genomesPreparationTask->getPreparedGenomesFileUrl()), new ExternalToolLogParser); + ExternalToolRunTask *buildTask = new ExternalToolRunTask(DiamondSupport::TOOL_ID, getArguments(genomesPreparationTask->getPreparedGenomesFileUrl()), new ExternalToolLogParser); setListenerForTask(buildTask); newSubTasks << buildTask; } diff --git a/src/plugins/diamond_support/src/DiamondBuildTask.h b/src/plugins/diamond_support/src/DiamondBuildTask.h index d1b7c033e08cc7a7453a48125b586f07e13e0f8c..a42b47e4cdced4068e6b64da8f3b72e30b2e04be 100644 --- a/src/plugins/diamond_support/src/DiamondBuildTask.h +++ b/src/plugins/diamond_support/src/DiamondBuildTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/diamond_support/src/DiamondBuildValidator.cpp b/src/plugins/diamond_support/src/DiamondBuildValidator.cpp index 5cb5dee071afb6a59327695d86a758f9d5c49734..b23986f3e0a090fdb3a68a7946ba60b17f301574 100644 --- a/src/plugins/diamond_support/src/DiamondBuildValidator.cpp +++ b/src/plugins/diamond_support/src/DiamondBuildValidator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/diamond_support/src/DiamondBuildValidator.h b/src/plugins/diamond_support/src/DiamondBuildValidator.h index dec806ee5adbb66b161b179a641f5e1a1fe620a7..97f6f658d0604736a293118e0ac5a65036ba7c6f 100644 --- a/src/plugins/diamond_support/src/DiamondBuildValidator.h +++ b/src/plugins/diamond_support/src/DiamondBuildValidator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/diamond_support/src/DiamondBuildWorker.cpp b/src/plugins/diamond_support/src/DiamondBuildWorker.cpp index 1abc828bd6dbdbf9455a8cff24c52ae0c3a930ec..5079d038c0391dc7e4ba91048e24bc485e6ee493 100644 --- a/src/plugins/diamond_support/src/DiamondBuildWorker.cpp +++ b/src/plugins/diamond_support/src/DiamondBuildWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/diamond_support/src/DiamondBuildWorker.h b/src/plugins/diamond_support/src/DiamondBuildWorker.h index 31881e6d141f6dba265f00e4195e72a42886c6ca..3d402ae5223fdeecbd0b1c64ee067287d7763159 100644 --- a/src/plugins/diamond_support/src/DiamondBuildWorker.h +++ b/src/plugins/diamond_support/src/DiamondBuildWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/diamond_support/src/DiamondBuildWorkerFactory.cpp b/src/plugins/diamond_support/src/DiamondBuildWorkerFactory.cpp index d59aeab52748456b7ae61b61220ac813943c9c8d..0e97e3713d23bb1262ee4e72bb19d58e21de3130 100644 --- a/src/plugins/diamond_support/src/DiamondBuildWorkerFactory.cpp +++ b/src/plugins/diamond_support/src/DiamondBuildWorkerFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -60,21 +60,21 @@ Worker *DiamondBuildWorkerFactory::createWorker(Actor *actor) { void DiamondBuildWorkerFactory::init() { QList<PortDescriptor *> ports; { - const Descriptor outSlotDesc(BaseSlots::URL_SLOT().getId(), DiamondBuildPrompter::tr("Output URL"), DiamondBuildPrompter::tr("Output URL.")); + Descriptor outSlotDesc(BaseSlots::URL_SLOT().getId(), DiamondBuildPrompter::tr("Output URL"), DiamondBuildPrompter::tr("Output URL.")); QMap<Descriptor, DataTypePtr> outType; outType[outSlotDesc] = BaseTypes::STRING_TYPE(); - const Descriptor outPortDesc(OUTPUT_PORT_ID, DiamondBuildPrompter::tr("Output DIAMOND database"), DiamondBuildPrompter::tr("URL to the DIAMOND database file.")); + Descriptor outPortDesc(OUTPUT_PORT_ID, DiamondBuildPrompter::tr("Output DIAMOND database"), DiamondBuildPrompter::tr("URL to the DIAMOND database file.")); ports << new PortDescriptor(outPortDesc, DataTypePtr(new MapDataType(ACTOR_ID + "-out", outType)), false /*input*/, true /*multi*/); } QList<Attribute *> attributes; { - const Descriptor databaseDesc(DATABASE_ATTR_ID, DiamondBuildPrompter::tr("Database"), + Descriptor databaseDesc(DATABASE_ATTR_ID, DiamondBuildPrompter::tr("Database"), DiamondBuildPrompter::tr("A name of the binary DIAMOND database file that should be created.")); - const Descriptor genomicLibraryDesc(GENOMIC_LIBRARY_ATTR_ID, DiamondBuildPrompter::tr("Genomic library"), + Descriptor genomicLibraryDesc(GENOMIC_LIBRARY_ATTR_ID, DiamondBuildPrompter::tr("Genomic library"), DiamondBuildPrompter::tr("Genomes that should be used to build the database.")); Attribute *databaseAttribute = new Attribute(databaseDesc, BaseTypes::STRING_TYPE(), true); @@ -86,7 +86,7 @@ void DiamondBuildWorkerFactory::init() { QMap<QString, PropertyDelegate *> delegates; { - const URLDelegate::Options options = URLDelegate::SelectFileToSave | URLDelegate::DoNotUseWorkflowOutputFolder; + URLDelegate::Options options = URLDelegate::SelectFileToSave | URLDelegate::DoNotUseWorkflowOutputFolder; DelegateTags tags; tags.set(DelegateTags::FILTER, DialogUtils::prepareFileFilter("DIAMOND database", QStringList("dmnd"), false, QStringList())); delegates[DATABASE_ATTR_ID] = new URLDelegate(tags, "diamond/database", options); @@ -94,13 +94,13 @@ void DiamondBuildWorkerFactory::init() { delegates[GENOMIC_LIBRARY_ATTR_ID] = new GenomicLibraryDelegate(); } - const Descriptor desc(ACTOR_ID, DiamondBuildPrompter::tr("Build DIAMOND Database"), + Descriptor desc(ACTOR_ID, DiamondBuildPrompter::tr("Build DIAMOND Database"), DiamondBuildPrompter::tr("Build a DIAMOND formatted database from a FASTA input file.")); ActorPrototype *proto = new IntegralBusActorPrototype(desc, ports, attributes); proto->setEditor(new DelegateEditor(delegates)); proto->setPrompter(new DiamondBuildPrompter(NULL)); - proto->addExternalTool(DiamondSupport::TOOL_NAME); + proto->addExternalTool(DiamondSupport::TOOL_ID); proto->setValidator(new DiamondBuildValidator()); WorkflowEnv::getProtoRegistry()->registerProto(NgsReadsClassificationPlugin::WORKFLOW_ELEMENTS_GROUP, proto); diff --git a/src/plugins/diamond_support/src/DiamondBuildWorkerFactory.h b/src/plugins/diamond_support/src/DiamondBuildWorkerFactory.h index afa6d343471c6d74d912c20c7fe99d36a8b357e9..9ae7a8318556a762c6ffc72e5140183df7331102 100644 --- a/src/plugins/diamond_support/src/DiamondBuildWorkerFactory.h +++ b/src/plugins/diamond_support/src/DiamondBuildWorkerFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/diamond_support/src/DiamondClassifyPrompter.cpp b/src/plugins/diamond_support/src/DiamondClassifyPrompter.cpp index 2f7d4cd32fea93e85698c33bc59ef6e10e6632a1..88d0d16c62a8ac36e0be5f53632e58708bff7b97 100644 --- a/src/plugins/diamond_support/src/DiamondClassifyPrompter.cpp +++ b/src/plugins/diamond_support/src/DiamondClassifyPrompter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/diamond_support/src/DiamondClassifyPrompter.h b/src/plugins/diamond_support/src/DiamondClassifyPrompter.h index 163ee430dbbce484ce05e92cd6f83480f1c14fe8..d77028bd9a32f3583c58754e5dba9402d947536d 100644 --- a/src/plugins/diamond_support/src/DiamondClassifyPrompter.h +++ b/src/plugins/diamond_support/src/DiamondClassifyPrompter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/diamond_support/src/DiamondClassifyTask.cpp b/src/plugins/diamond_support/src/DiamondClassifyTask.cpp index efc9edecc5e33abfcb0fe80f57c80354a3839b5e..d1d0a1c019c883e0b72352b8cbcecbcb906d8548 100644 --- a/src/plugins/diamond_support/src/DiamondClassifyTask.cpp +++ b/src/plugins/diamond_support/src/DiamondClassifyTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -60,7 +60,7 @@ DiamondClassifyTaskSettings::DiamondClassifyTaskSettings() const QString DiamondClassifyTask::TAXONOMIC_CLASSIFICATION_OUTPUT_FORMAT = "102"; // from the DIAMOND manual DiamondClassifyTask::DiamondClassifyTask(const DiamondClassifyTaskSettings &settings) - : ExternalToolSupportTask(tr("Classify sequences with DIAMOND"), TaskFlags_NR_FOSE_COSC), + : ExternalToolSupportTask(tr("Classify sequences with DIAMOND"), TaskFlags_FOSE_COSC), settings(settings) { GCOUNTER(cvar, tvar, "DiamondClassifyTask"); @@ -72,8 +72,46 @@ const QString &DiamondClassifyTask::getClassificationUrl() const { return settings.classificationUrl; } +const LocalWorkflow::TaxonomyClassificationResult & DiamondClassifyTask::getParsedReport() const { + return parsedReport; +} + +void DiamondClassifyTask::run() { + QFile reportFile(settings.classificationUrl); + if (!reportFile.open(QIODevice::ReadOnly)) { + setError(tr("Cannot open classification report: %1").arg(settings.classificationUrl)); + } else { + QByteArray line; + + while ((line = reportFile.readLine()).size() != 0) { + + QList<QByteArray> row = line.split('\t'); + if (row.size() == 3) { + QString objID = row[0]; + QByteArray &assStr = row[1]; + algoLog.trace(QString("Found Diamond classification: %1=%2").arg(objID).arg(QString(assStr))); + + bool ok = true; + LocalWorkflow::TaxID assID = assStr.toUInt(&ok); + if (ok) { + if (parsedReport.contains(objID)) { + QString msg = tr("Duplicate sequence name '%1' have been detected in the classification output.").arg(objID); + algoLog.info(msg); + } else { + parsedReport.insert(objID, assID); + } + continue; + } + } + setError(tr("Broken Diamond report : %1").arg(settings.classificationUrl)); + break; + } + reportFile.close(); + } +} + void DiamondClassifyTask::prepare() { - ExternalToolRunTask *classifyTask = new ExternalToolRunTask(DiamondSupport::TOOL_NAME, getArguments(), new ExternalToolLogParser()); + ExternalToolRunTask *classifyTask = new ExternalToolRunTask(DiamondSupport::TOOL_ID, getArguments(), new ExternalToolLogParser()); setListenerForTask(classifyTask); addSubTask(classifyTask); } diff --git a/src/plugins/diamond_support/src/DiamondClassifyTask.h b/src/plugins/diamond_support/src/DiamondClassifyTask.h index 66eb5c3b1683088be1074416dca76af7fd414e95..d48b2c6d7d75d656e344bbc8d7eeac0a980fcfb0 100644 --- a/src/plugins/diamond_support/src/DiamondClassifyTask.h +++ b/src/plugins/diamond_support/src/DiamondClassifyTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,6 +24,8 @@ #include <U2Core/ExternalToolRunTask.h> +#include "../ngs_reads_classification/src/TaxonomySupport.h" + namespace U2 { struct DiamondClassifyTaskSettings { @@ -69,16 +71,17 @@ public: DiamondClassifyTask(const DiamondClassifyTaskSettings &settings); const QString &getClassificationUrl() const; + const LocalWorkflow::TaxonomyClassificationResult &getParsedReport() const; private: void prepare(); - + void run() override; void checkSettings(); QStringList getArguments() const; const DiamondClassifyTaskSettings settings; - static const QString TAXONOMIC_CLASSIFICATION_OUTPUT_FORMAT; + LocalWorkflow::TaxonomyClassificationResult parsedReport; }; } // namespace U2 diff --git a/src/plugins/diamond_support/src/DiamondClassifyWorker.cpp b/src/plugins/diamond_support/src/DiamondClassifyWorker.cpp index 3b6a292e6344175e266551ee2b8ec853967bf844..41be92a058260617271d957d971557b3722cd25d 100644 --- a/src/plugins/diamond_support/src/DiamondClassifyWorker.cpp +++ b/src/plugins/diamond_support/src/DiamondClassifyWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -38,7 +38,7 @@ namespace U2 { namespace LocalWorkflow { -const QString DiamondClassifyWorker::DIAMOND_DIR = "diamond"; +const QString DiamondClassifyWorker::DIAMOND_DIR = "DIAMOND"; DiamondClassifyWorker::DiamondClassifyWorker(Actor *actor) : BaseWorker(actor, false), @@ -94,7 +94,7 @@ void DiamondClassifyWorker::sl_taskFinished(Task *task) { const QString classificationUrl = diamondTask->getClassificationUrl(); QVariantMap data; - TaxonomyClassificationResult classificationResult = parseReport(classificationUrl); + const TaxonomyClassificationResult &classificationResult = diamondTask->getParsedReport(); data[TaxonomySupport::TAXONOMY_CLASSIFICATION_SLOT_ID] = QVariant::fromValue<U2::LocalWorkflow::TaxonomyClassificationResult>(classificationResult); output->put(Message(output->getBusType(), data)); context->getMonitor()->addOutputFile(classificationUrl, getActor()->getId()); @@ -102,7 +102,7 @@ void DiamondClassifyWorker::sl_taskFinished(Task *task) { LocalWorkflow::TaxonomyClassificationResult::const_iterator it; int classifiedCount = NgsReadsClassificationUtils::countClassified(classificationResult); context->getMonitor()->addInfo(tr("There were %1 input reads, %2 reads were classified.").arg(QString::number(classificationResult.size())).arg(QString::number(classifiedCount)) - , getActor()->getId(), WorkflowNotification::U2_INFO); + , getActor()->getId(), WorkflowNotification::U2_INFO); } DiamondClassifyTaskSettings DiamondClassifyWorker::getSettings(U2OpStatus &os) { @@ -118,7 +118,10 @@ DiamondClassifyTaskSettings DiamondClassifyWorker::getSettings(U2OpStatus &os) { settings.classificationUrl = getValue<QString>(DiamondClassifyWorkerFactory::OUTPUT_URL_ATTR_ID); if (settings.classificationUrl.isEmpty()) { const MessageMetadata metadata = context->getMetadataStorage().get(message.getMetadataId()); - settings.classificationUrl = tmpDir + "/" + NgsReadsClassificationUtils::getClassificationFileName(metadata.getFileUrl(), "DIAMOND", "txt", false); + QString fileUrl = metadata.getFileUrl(); + settings.classificationUrl = tmpDir + "/" + (fileUrl.isEmpty() ? QString("DIAMOND_%1.txt").arg(NgsReadsClassificationUtils::CLASSIFICATION_SUFFIX) + : NgsReadsClassificationUtils::getBaseFileNameWithSuffixes(fileUrl,QStringList() << "DIAMOND" + << NgsReadsClassificationUtils::CLASSIFICATION_SUFFIX,"txt", false)); } settings.classificationUrl = GUrlUtils::rollFileName(settings.classificationUrl, "_"); @@ -137,43 +140,5 @@ DiamondClassifyTaskSettings DiamondClassifyWorker::getSettings(U2OpStatus &os) { return settings; } -TaxonomyClassificationResult DiamondClassifyWorker::parseReport(const QString &url) -{ - TaxonomyClassificationResult result; - QFile reportFile(url); - if (!reportFile.open(QIODevice::ReadOnly)) { - reportError(tr("Cannot open classification report: %1").arg(url)); - } else { - QByteArray line; - - while ((line = reportFile.readLine()).size() != 0) { - - QList<QByteArray> row = line.split('\t'); - if (row.size() == 3) { - QString objID = row[0]; - QByteArray &assStr = row[1]; - algoLog.trace(QString("Found Diamond classification: %1=%2").arg(objID).arg(QString(assStr))); - - bool ok = true; - TaxID assID = assStr.toUInt(&ok); - if (ok) { - if (result.contains(objID)) { - QString msg = tr("Duplicate sequence name '%1' have been detected in the classification output.").arg(objID); - monitor()->addInfo(msg, getActorId(), WorkflowNotification::U2_WARNING); - algoLog.info(msg); - } else { - result[objID] = assID; - } - continue; - } - } - reportError(tr("Broken Diamond report : %1").arg(url)); - break; - } - reportFile.close(); - } - return result; -} - } // namespace LocalWorkflow } // namespace U2 diff --git a/src/plugins/diamond_support/src/DiamondClassifyWorker.h b/src/plugins/diamond_support/src/DiamondClassifyWorker.h index 94f78c293b6445d1bc9383b0ac1a2bf7ecb35f4b..bf54f0f4a2591850104896a363e113f4a045746f 100644 --- a/src/plugins/diamond_support/src/DiamondClassifyWorker.h +++ b/src/plugins/diamond_support/src/DiamondClassifyWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -44,7 +44,6 @@ private slots: private: DiamondClassifyTaskSettings getSettings(U2OpStatus &os); - TaxonomyClassificationResult parseReport(const QString &url); IntegralBus *input; IntegralBus *output; diff --git a/src/plugins/diamond_support/src/DiamondClassifyWorkerFactory.cpp b/src/plugins/diamond_support/src/DiamondClassifyWorkerFactory.cpp index 754db6dacf3c174f12abe503cb217a526758bee5..2312cdf9931ef9cbe25f48b6fa756aaca6fbe048 100644 --- a/src/plugins/diamond_support/src/DiamondClassifyWorkerFactory.cpp +++ b/src/plugins/diamond_support/src/DiamondClassifyWorkerFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -112,25 +112,25 @@ void DiamondClassifyWorkerFactory::init() { QList<Attribute *> attributes; { - const Descriptor databaseDesc(DATABASE_ATTR_ID, DiamondClassifyPrompter::tr("Database"), + Descriptor databaseDesc(DATABASE_ATTR_ID, DiamondClassifyPrompter::tr("Database"), DiamondClassifyPrompter::tr("Input a binary DIAMOND database file.")); - const Descriptor code(GENCODE_ATTR_ID, DiamondClassifyPrompter::tr("Genetic code"), DiamondClassifyPrompter::tr("Genetic code used for translation of query sequences (--query-gencode).")); - const Descriptor sense(SENSITIVE_ATTR_ID, DiamondClassifyPrompter::tr("Sensitive mode"), DiamondClassifyPrompter::tr("The sensitive modes (--sensitive, --more-sensitive) are generally recommended for aligning longer sequences. The default mode is mainly designed for short read alignment, i.e. finding significant matches of >50 bits on 30-40aa fragments.")); - const Descriptor topAlignmentsPercentage(TOP_ALIGNMENTS_PERCENTAGE_ATTR_ID, + Descriptor code(GENCODE_ATTR_ID, DiamondClassifyPrompter::tr("Genetic code"), DiamondClassifyPrompter::tr("Genetic code used for translation of query sequences (--query-gencode).")); + Descriptor sense(SENSITIVE_ATTR_ID, DiamondClassifyPrompter::tr("Sensitive mode"), DiamondClassifyPrompter::tr("The sensitive modes (--sensitive, --more-sensitive) are generally recommended for aligning longer sequences. The default mode is mainly designed for short read alignment, i.e. finding significant matches of >50 bits on 30-40aa fragments.")); + Descriptor topAlignmentsPercentage(TOP_ALIGNMENTS_PERCENTAGE_ATTR_ID, DiamondClassifyPrompter::tr("Top alignments percentage"), DiamondClassifyPrompter::tr("DIAMOND uses the lowest common ancestor (LCA) algorithm for taxonomy classification of the input sequences. This parameter specifies what alignments should be taken into account during the calculations (--top)." "<br><br>" "For example, the default value \"10\" means to take top 10% of the best hits (i.e. sort all query/subject-alignments by score, take top 10% of the alignments with the best score, calculate the lowest common ancestor for them).")); - const Descriptor fshift(FSHIFT_ATTR_ID, DiamondClassifyPrompter::tr("Frameshift"), DiamondClassifyPrompter::tr("Penalty for frameshift in DNA-vs-protein alignments. Values around 15 are reasonable for this parameter. Enabling this feature will have the aligner tolerate missing bases in DNA sequences and is most recommended for long, error-prone sequences like MinION reads.")); - const Descriptor evalue(EVALUE_ATTR_ID, DiamondClassifyPrompter::tr("Expected value"), DiamondClassifyPrompter::tr("Maximum expected value to report an alignment (--evalue/-e).")); - const Descriptor matrix(MATRIX_ATTR_ID, DiamondClassifyPrompter::tr("Matrix"), DiamondClassifyPrompter::tr("Scoring matrix (--matrix).")); - const Descriptor gapopen(GO_PEN_ATTR_ID, DiamondClassifyPrompter::tr("Gap open penalty"), DiamondClassifyPrompter::tr("Gap open penalty (--gapopen).")); - const Descriptor gapextend(GE_PEN_ATTR_ID, DiamondClassifyPrompter::tr("Gap extension penalty"), DiamondClassifyPrompter::tr("Gap extension penalty (--gapextend).")); - const Descriptor threads(THREADS_ATTR_ID, DiamondClassifyPrompter::tr("Number of threads"), DiamondClassifyPrompter::tr("Number of CPU threads (--treads).")); - const Descriptor bsize(BSIZE_ATTR_ID, DiamondClassifyPrompter::tr("Block size"), DiamondClassifyPrompter::tr("Block size in billions of sequence letters to be processed at a time (--block-size). This is the main parameter for controlling the program’s memory usage. Bigger numbers will increase the use of memory and temporary disk space, but also improve performance. The program can be expected to use roughly six times this number of memory (in GB).")); - const Descriptor chunks(CHUNKS_ATTR_ID, DiamondClassifyPrompter::tr("Index chunks"), DiamondClassifyPrompter::tr("The number of chunks for processing the seed index (--index-chunks). This option can be additionally used to tune the performance. It is recommended to set this to 1 on a high memory server, which will increase performance and memory usage, but not the usage of temporary disk space.")); - const Descriptor outputUrlDesc(OUTPUT_URL_ATTR_ID, DiamondClassifyPrompter::tr("Output file"), + Descriptor fshift(FSHIFT_ATTR_ID, DiamondClassifyPrompter::tr("Frameshift"), DiamondClassifyPrompter::tr("Penalty for frameshift in DNA-vs-protein alignments. Values around 15 are reasonable for this parameter. Enabling this feature will have the aligner tolerate missing bases in DNA sequences and is most recommended for long, error-prone sequences like MinION reads.")); + Descriptor evalue(EVALUE_ATTR_ID, DiamondClassifyPrompter::tr("Expected value"), DiamondClassifyPrompter::tr("Maximum expected value to report an alignment (--evalue/-e).")); + Descriptor matrix(MATRIX_ATTR_ID, DiamondClassifyPrompter::tr("Matrix"), DiamondClassifyPrompter::tr("Scoring matrix (--matrix).")); + Descriptor gapopen(GO_PEN_ATTR_ID, DiamondClassifyPrompter::tr("Gap open penalty"), DiamondClassifyPrompter::tr("Gap open penalty (--gapopen).")); + Descriptor gapextend(GE_PEN_ATTR_ID, DiamondClassifyPrompter::tr("Gap extension penalty"), DiamondClassifyPrompter::tr("Gap extension penalty (--gapextend).")); + Descriptor threads(THREADS_ATTR_ID, DiamondClassifyPrompter::tr("Number of threads"), DiamondClassifyPrompter::tr("Number of CPU threads (--treads).")); + Descriptor bsize(BSIZE_ATTR_ID, DiamondClassifyPrompter::tr("Block size"), DiamondClassifyPrompter::tr("Block size in billions of sequence letters to be processed at a time (--block-size). This is the main parameter for controlling the program’s memory usage. Bigger numbers will increase the use of memory and temporary disk space, but also improve performance. The program can be expected to use roughly six times this number of memory (in GB).")); + Descriptor chunks(CHUNKS_ATTR_ID, DiamondClassifyPrompter::tr("Index chunks"), DiamondClassifyPrompter::tr("The number of chunks for processing the seed index (--index-chunks). This option can be additionally used to tune the performance. It is recommended to set this to 1 on a high memory server, which will increase performance and memory usage, but not the usage of temporary disk space.")); + Descriptor outputUrlDesc(OUTPUT_URL_ATTR_ID, DiamondClassifyPrompter::tr("Output file"), DiamondClassifyPrompter::tr("Specify the output file name." "<br><br>" "The output file is a tab-delimited file with the following fields:" @@ -140,7 +140,7 @@ void DiamondClassifyWorkerFactory::init() { "<li>E-value of the best alignment with a known taxonomy ID found for the query (0 if unclassified)</li>" "</ul>")); - const Descriptor classifyToolDesc(NgsReadsClassificationPlugin::WORKFLOW_CLASSIFY_TOOL_ID, + Descriptor classifyToolDesc(NgsReadsClassificationPlugin::WORKFLOW_CLASSIFY_TOOL_ID, WORKFLOW_CLASSIFY_TOOL_DIAMOND, "Classify tool. Hidden attribute"); @@ -293,7 +293,7 @@ void DiamondClassifyWorkerFactory::init() { ActorPrototype *proto = new IntegralBusActorPrototype(desc, ports, attributes); proto->setEditor(new DelegateEditor(delegates)); proto->setPrompter(new DiamondClassifyPrompter(NULL)); - proto->addExternalTool(DiamondSupport::TOOL_NAME); + proto->addExternalTool(DiamondSupport::TOOL_ID); WorkflowEnv::getProtoRegistry()->registerProto(NgsReadsClassificationPlugin::WORKFLOW_ELEMENTS_GROUP, proto); DomainFactory *localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID); diff --git a/src/plugins/diamond_support/src/DiamondClassifyWorkerFactory.h b/src/plugins/diamond_support/src/DiamondClassifyWorkerFactory.h index 9841fed32d6f421473e7ea73fd24e381e0c254d3..72b38d5a41d8482e2312ad4ae9f2ef986cc0f182 100644 --- a/src/plugins/diamond_support/src/DiamondClassifyWorkerFactory.h +++ b/src/plugins/diamond_support/src/DiamondClassifyWorkerFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/diamond_support/src/DiamondSupport.cpp b/src/plugins/diamond_support/src/DiamondSupport.cpp index e8129c81f8c535d0124f01ca95b1597ab6a5d0e0..45b2cf8e3592ed0fe04257094b31580fd91b9592 100644 --- a/src/plugins/diamond_support/src/DiamondSupport.cpp +++ b/src/plugins/diamond_support/src/DiamondSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,9 +24,10 @@ namespace U2 { const QString DiamondSupport::TOOL_NAME = "DIAMOND"; +const QString DiamondSupport::TOOL_ID = "USUPP_DIAMOND"; -DiamondSupport::DiamondSupport(const QString &name) - : ExternalTool(name) +DiamondSupport::DiamondSupport(const QString& id, const QString &name) + : ExternalTool(id, name, "") { validationArguments << "--version"; validMessage = "diamond version "; diff --git a/src/plugins/diamond_support/src/DiamondSupport.h b/src/plugins/diamond_support/src/DiamondSupport.h index 5c0df3f0b1d681a6ee48c3e728895ee1c83dffed..a234fdcd035a5d8ce40d9a7e526e9f4f1b416af9 100644 --- a/src/plugins/diamond_support/src/DiamondSupport.h +++ b/src/plugins/diamond_support/src/DiamondSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,14 +26,13 @@ namespace U2 { -#define ET_DIAMOND DiamondSupport::DIAMOND_TOOL - class DiamondSupport : public ExternalTool { Q_OBJECT public: - DiamondSupport(const QString &name); + DiamondSupport(const QString& id, const QString &name); static const QString TOOL_NAME; + static const QString TOOL_ID; }; } // namespace U2 diff --git a/src/plugins/diamond_support/src/DiamondSupportPlugin.cpp b/src/plugins/diamond_support/src/DiamondSupportPlugin.cpp index 43981246f4a57bfb27b965aba7e6cdfd9d8575fc..f25b6bca7ec95cf3ebfa59608fdb54b37fb4b387 100644 --- a/src/plugins/diamond_support/src/DiamondSupportPlugin.cpp +++ b/src/plugins/diamond_support/src/DiamondSupportPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -45,7 +45,7 @@ DiamondSupportPlugin::DiamondSupportPlugin() ExternalToolRegistry *etRegistry = AppContext::getExternalToolRegistry(); CHECK(NULL != etRegistry, ); - etRegistry->registerEntry(new DiamondSupport(DiamondSupport::TOOL_NAME)); + etRegistry->registerEntry(new DiamondSupport(DiamondSupport::TOOL_ID, DiamondSupport::TOOL_NAME)); LocalWorkflow::DiamondBuildWorkerFactory::init(); LocalWorkflow::DiamondClassifyWorkerFactory::init(); @@ -54,7 +54,7 @@ DiamondSupportPlugin::DiamondSupportPlugin() DiamondSupportPlugin::~DiamondSupportPlugin() { ExternalToolRegistry *etRegistry = AppContext::getExternalToolRegistry(); CHECK(NULL != etRegistry, ); - etRegistry->unregisterEntry(DiamondSupport::TOOL_NAME); + etRegistry->unregisterEntry(DiamondSupport::TOOL_ID); } } // namespace U2 diff --git a/src/plugins/diamond_support/src/DiamondSupportPlugin.h b/src/plugins/diamond_support/src/DiamondSupportPlugin.h index cd162c8b53fa92a1bed78703a93dfd3b0da38f9e..c79c2fbd314c9e2a01951f1eabe8cbc2f453aa84 100644 --- a/src/plugins/diamond_support/src/DiamondSupportPlugin.h +++ b/src/plugins/diamond_support/src/DiamondSupportPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/diamond_support/src/GenomesPreparationTask.cpp b/src/plugins/diamond_support/src/GenomesPreparationTask.cpp index b1eca4c9ed563b179554c6b0f76f96fb708547b6..d6562f775a6da8863e029c0454d8751067ad69d2 100644 --- a/src/plugins/diamond_support/src/GenomesPreparationTask.cpp +++ b/src/plugins/diamond_support/src/GenomesPreparationTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/diamond_support/src/GenomesPreparationTask.h b/src/plugins/diamond_support/src/GenomesPreparationTask.h index 832f17d00380a9c66b6ec05c0534421382fe0294..d1419a56ca98d7a7b1a31db3f918f10a74517357 100644 --- a/src/plugins/diamond_support/src/GenomesPreparationTask.h +++ b/src/plugins/diamond_support/src/GenomesPreparationTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/diamond_support/transl/russian.ts b/src/plugins/diamond_support/transl/russian.ts index 217446494b59749c81a0dc9fb868d805708150f3..e7db43c7ea6f9df75351a5daa2050e422d38d941 100644 --- a/src/plugins/diamond_support/transl/russian.ts +++ b/src/plugins/diamond_support/transl/russian.ts @@ -2,15 +2,18 @@ <!DOCTYPE TS> <TS version="2.1" language="ru_RU"> <context> - <name>QObject</name> + <name>DiamondBuildValidator</name> <message> - <source>SE reads or contigs</source> + <source>Taxonomy classification data from NCBI are not available.</source> <translation type="unfinished"></translation> </message> <message> - <source>PE reads</source> + <source>Taxonomy classification data from NCBI are not full: file '%1' is missing.</source> <translation type="unfinished"></translation> </message> +</context> +<context> + <name>QObject</name> <message> <source>DIAMOND external tool support</source> <translation type="unfinished"></translation> @@ -30,6 +33,14 @@ <source>There is no input files to build the database from</source> <translation type="unfinished"></translation> </message> + <message> + <source>Taxon map URL is empty</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Taxon nodes URL is empty</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>U2::DiamondClassifyTask</name> @@ -41,10 +52,6 @@ <source>Reads URL is empty</source> <translation type="unfinished"></translation> </message> - <message> - <source>Paired reads URL is empty, but the 'paired reads' option is set</source> - <translation type="unfinished"></translation> - </message> <message> <source>DIAMOND database URL is empty</source> <translation type="unfinished"></translation> @@ -54,23 +61,23 @@ <translation type="unfinished"></translation> </message> <message> - <source>URL to paired DIAMOND classification is empty</source> + <source>Invalid genetic code: %1</source> <translation type="unfinished"></translation> </message> <message> - <source>Taxon map URL is empty</source> + <source>Unknown sensitivity value: %1, ignored.</source> <translation type="unfinished"></translation> </message> <message> - <source>Taxon nodes URL is empty</source> + <source>Cannot open classification report: %1</source> <translation type="unfinished"></translation> </message> <message> - <source>Invalid genetic code: %1</source> + <source>Duplicate sequence name '%1' have been detected in the classification output.</source> <translation type="unfinished"></translation> </message> <message> - <source>Unknown sensitivity value: %1, ignored.</source> + <source>Broken Diamond report : %1</source> <translation type="unfinished"></translation> </message> </context> @@ -143,6 +150,13 @@ <translation type="unfinished"></translation> </message> </context> +<context> + <name>U2::LocalWorkflow::DiamondBuildWorker</name> + <message> + <source>Taxonomy classification data from NCBI are not available.</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>U2::LocalWorkflow::DiamondClassifyPrompter</name> <message> @@ -211,10 +225,6 @@ The input files may contain single-end reads, contigs, or "left" reads <source>Expected value</source> <translation type="unfinished"></translation> </message> - <message> - <source>Maximum expected value to report an alignment.</source> - <translation type="unfinished"></translation> - </message> <message> <source>Matrix</source> <translation type="unfinished"></translation> @@ -267,10 +277,6 @@ The input files may contain single-end reads, contigs, or "left" reads <source>Output file</source> <translation type="unfinished"></translation> </message> - <message> - <source>Specify the output file name.</source> - <translation type="unfinished"></translation> - </message> <message> <source>Default</source> <translation type="unfinished"></translation> @@ -292,42 +298,30 @@ The input files may contain single-end reads, contigs, or "left" reads <translation type="unfinished"></translation> </message> <message> - <source>In general, DIAMOND is a sequence aligner for protein and translated DNA searches similar to the NCBI BLAST software tools. However, it provides a speedup of BLAST ranging up to x20,000.<br>Using this workflow element one can use DIAMOND for taxonomic classification of short DNA reads and longer sequences such as contigs.</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Taxonomy data is not set.</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Taxonomy file '%1' is not found.</source> + <source>Top alignments percentage</source> <translation type="unfinished"></translation> </message> -</context> -<context> - <name>U2::LocalWorkflow::DiamondClassifyWorker</name> <message> - <source>Not enough downstream reads datasets</source> + <source>DIAMOND uses the lowest common ancestor (LCA) algorithm for taxonomy classification of the input sequences. This parameter specifies what alignments should be taken into account during the calculations (--top).<br><br>For example, the default value "10" means to take top 10% of the best hits (i.e. sort all query/subject-alignments by score, take top 10% of the alignments with the best score, calculate the lowest common ancestor for them).</source> <translation type="unfinished"></translation> </message> <message> - <source>Not enough upstream reads datasets</source> + <source>Maximum expected value to report an alignment (--evalue/-e).</source> <translation type="unfinished"></translation> </message> <message> - <source>Taxonomy data is missed</source> + <source>Specify the output file name.<br><br>The output file is a tab-delimited file with the following fields:<ul><li>Query ID</li><li>NCBI taxonomy ID (0 if unclassified)</li><li>E-value of the best alignment with a known taxonomy ID found for the query (0 if unclassified)</li></ul></source> <translation type="unfinished"></translation> </message> <message> - <source>Cannot open classification report: %1</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Duplicate sequence name '%1' have been detected in the classification output.</source> + <source>In general, DIAMOND is a sequence aligner for protein and translated DNA searches similar to the NCBI BLAST software tools. However, it provides a speedup of BLAST ranging up to x20,000.<br><br>Using this workflow element one can use DIAMOND for taxonomic classification of short DNA reads and longer sequences such as contigs. The lowest common ancestor (LCA) algorithm is used for the classification.</source> <translation type="unfinished"></translation> </message> +</context> +<context> + <name>U2::LocalWorkflow::DiamondClassifyWorker</name> <message> - <source>Broken Diamond report : %1</source> + <source>There were %1 input reads, %2 reads were classified.</source> <translation type="unfinished"></translation> </message> </context> diff --git a/src/plugins/dna_export/src/CSVColumnConfiguration.h b/src/plugins/dna_export/src/CSVColumnConfiguration.h index 57703f18a8a21f208e64cdfdee7cc1461299efbb..f6339c8583636d9857ccf993e861d2ca437a3e6e 100644 --- a/src/plugins/dna_export/src/CSVColumnConfiguration.h +++ b/src/plugins/dna_export/src/CSVColumnConfiguration.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/CSVColumnConfigurationDialog.cpp b/src/plugins/dna_export/src/CSVColumnConfigurationDialog.cpp index 0dfb46ca859c7260e7054f75dafcc8e2946bbe66..86f710d424b719657d7630371c59ae9ac7ee5347 100644 --- a/src/plugins/dna_export/src/CSVColumnConfigurationDialog.cpp +++ b/src/plugins/dna_export/src/CSVColumnConfigurationDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,7 +34,7 @@ CSVColumnConfigurationDialog::CSVColumnConfigurationDialog(QWidget* w, const Col : QDialog(w), config(_config) { setupUi(this); - new HelpButton(this, buttonBox, "22055865"); + new HelpButton(this, buttonBox, "24742400"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/dna_export/src/CSVColumnConfigurationDialog.h b/src/plugins/dna_export/src/CSVColumnConfigurationDialog.h index 0a2b3b03ccbd6305a694e1decd0ba64667239fc7..ec1ecdf8845f7ce9840a41e3b5ba68228fba7c9d 100644 --- a/src/plugins/dna_export/src/CSVColumnConfigurationDialog.h +++ b/src/plugins/dna_export/src/CSVColumnConfigurationDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/DNAExportPlugin.cpp b/src/plugins/dna_export/src/DNAExportPlugin.cpp index 4e970b7d82081fa1df09bcffb28ff27d52ce6c54..4d789464c7f0b4591ac548ed0abefaebf97fc755 100644 --- a/src/plugins/dna_export/src/DNAExportPlugin.cpp +++ b/src/plugins/dna_export/src/DNAExportPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/DNAExportPlugin.h b/src/plugins/dna_export/src/DNAExportPlugin.h index 5d4ca0766ddefac1104fbc32845a2fea454bcf9d..c08958f045b9197cfe9377d9f91055099d1cedf0 100644 --- a/src/plugins/dna_export/src/DNAExportPlugin.h +++ b/src/plugins/dna_export/src/DNAExportPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/DNAExportPluginTests.cpp b/src/plugins/dna_export/src/DNAExportPluginTests.cpp index fdec49ad78c1c262c29cd2dbf5df93ed4a1bc55a..48735ca628c0d64815eb1c3eafd2e8f3a5a3ef1d 100644 --- a/src/plugins/dna_export/src/DNAExportPluginTests.cpp +++ b/src/plugins/dna_export/src/DNAExportPluginTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/DNAExportPluginTests.h b/src/plugins/dna_export/src/DNAExportPluginTests.h index f12a1975b75638fe54f53b1b41719f58ac40e1bc..7809f21a972de44f36e0b00123a9dadd6223b3de 100644 --- a/src/plugins/dna_export/src/DNAExportPluginTests.h +++ b/src/plugins/dna_export/src/DNAExportPluginTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,7 +34,7 @@ namespace U2 { class U2SequenceObject; class MultipleSequenceAlignmentObject; -class GTest_ImportPhredQualityScoresTask : public GTest { +class GTest_ImportPhredQualityScoresTask : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_ImportPhredQualityScoresTask, "import-phred-qualities", TaskFlags_NR_FOSCOE); @@ -47,7 +47,7 @@ public: }; -class GTest_ExportNucleicToAminoAlignmentTask : public GTest { +class GTest_ExportNucleicToAminoAlignmentTask : public XmlTest { Q_OBJECT diff --git a/src/plugins/dna_export/src/DNASequenceGenerator.cpp b/src/plugins/dna_export/src/DNASequenceGenerator.cpp index 72a35f583584af7ee763ff7d13ceadff6ae2c368..8960d4b5da5172f0736c62df3ad7d5acb062310c 100644 --- a/src/plugins/dna_export/src/DNASequenceGenerator.cpp +++ b/src/plugins/dna_export/src/DNASequenceGenerator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/DNASequenceGenerator.h b/src/plugins/dna_export/src/DNASequenceGenerator.h index f247e50fb6a256b9051acbb92b88ca3e200cdad5..d218acd2fd190dd609acda71808348ea08d326dc 100644 --- a/src/plugins/dna_export/src/DNASequenceGenerator.h +++ b/src/plugins/dna_export/src/DNASequenceGenerator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/DNASequenceGeneratorDialog.cpp b/src/plugins/dna_export/src/DNASequenceGeneratorDialog.cpp index af58bf1fbf4667be1057ac497a8c45304c388fc6..350d44f1c88cb4ef9cfbe1b2f0b6d469f37d62a3 100644 --- a/src/plugins/dna_export/src/DNASequenceGeneratorDialog.cpp +++ b/src/plugins/dna_export/src/DNASequenceGeneratorDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -66,7 +66,7 @@ DNASequenceGeneratorDialog::DNASequenceGeneratorDialog(QWidget* p) gcSkew(0) { setupUi(this); - new HelpButton(this, buttonBox, "22056092"); + new HelpButton(this, buttonBox, "24742627"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Generate")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/dna_export/src/DNASequenceGeneratorDialog.h b/src/plugins/dna_export/src/DNASequenceGeneratorDialog.h index 94130e6c5760b40962fa3cccb620bc9dff3da4c9..aa9ce602c40a7090c5966dc55e3cd421228d9b1f 100644 --- a/src/plugins/dna_export/src/DNASequenceGeneratorDialog.h +++ b/src/plugins/dna_export/src/DNASequenceGeneratorDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ExportAlignmentViewItems.cpp b/src/plugins/dna_export/src/ExportAlignmentViewItems.cpp index ad085a9ed06185bff14a101ed23fbec93b39fc3b..7f7892b3f781e0873c026f7cd8e325f7bf868863 100644 --- a/src/plugins/dna_export/src/ExportAlignmentViewItems.cpp +++ b/src/plugins/dna_export/src/ExportAlignmentViewItems.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ExportAlignmentViewItems.h b/src/plugins/dna_export/src/ExportAlignmentViewItems.h index 83d5d246d1a7c2d108e858db78d110b0ca682edb..751671172286b69107c75953bdb9c96487663648 100644 --- a/src/plugins/dna_export/src/ExportAlignmentViewItems.h +++ b/src/plugins/dna_export/src/ExportAlignmentViewItems.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ExportBlastResultDialog.cpp b/src/plugins/dna_export/src/ExportBlastResultDialog.cpp index 161acd26f29edbe5bafec3462fa2b45f2366ae38..808739f81662922bca2e25ef031b3729f77d2cdd 100644 --- a/src/plugins/dna_export/src/ExportBlastResultDialog.cpp +++ b/src/plugins/dna_export/src/ExportBlastResultDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -39,7 +39,7 @@ ExportBlastResultDialog::ExportBlastResultDialog(QWidget* p, const QString& defa : QDialog(p), saveController(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22056020"); + new HelpButton(this, buttonBox, "24742555"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Export")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/dna_export/src/ExportBlastResultDialog.h b/src/plugins/dna_export/src/ExportBlastResultDialog.h index 70bd56b425a8827a612ccab211e94aadbfb555cf..b36798d981868a10c6b87415edce31d7b65e8104 100644 --- a/src/plugins/dna_export/src/ExportBlastResultDialog.h +++ b/src/plugins/dna_export/src/ExportBlastResultDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ExportChromatogramDialog.cpp b/src/plugins/dna_export/src/ExportChromatogramDialog.cpp index ec61200a626f241cdb0cc0d5a1fcc71e842d5060..baceb2d5f0849a45897dddbbd2877fcd459edb7d 100644 --- a/src/plugins/dna_export/src/ExportChromatogramDialog.cpp +++ b/src/plugins/dna_export/src/ExportChromatogramDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -45,7 +45,7 @@ ExportChromatogramDialog::ExportChromatogramDialog(QWidget* p, const GUrl& fileU saveController(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22055888"); + new HelpButton(this, buttonBox, "24742423"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Export")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/dna_export/src/ExportChromatogramDialog.h b/src/plugins/dna_export/src/ExportChromatogramDialog.h index 580cd006c767aa8612858312dd3afcbb28777981..1f3a4e479d71378bb968336ceba83476c4b7e397 100644 --- a/src/plugins/dna_export/src/ExportChromatogramDialog.h +++ b/src/plugins/dna_export/src/ExportChromatogramDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ExportMSA2MSADialog.cpp b/src/plugins/dna_export/src/ExportMSA2MSADialog.cpp index 4485e52a5568bec5c74023c4eb706f01bcce04a1..fc95caf7913aefc63ce59f577f850985703482e6 100644 --- a/src/plugins/dna_export/src/ExportMSA2MSADialog.cpp +++ b/src/plugins/dna_export/src/ExportMSA2MSADialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -42,7 +42,7 @@ ExportMSA2MSADialog::ExportMSA2MSADialog(const QString& defaultFileName, const D : QDialog(p), saveController(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22055798"); + new HelpButton(this, buttonBox, "24742333"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Export")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/dna_export/src/ExportMSA2MSADialog.h b/src/plugins/dna_export/src/ExportMSA2MSADialog.h index 498ecd52e1d33d8ae17daccea244f91d855eacbc..27c4d5cf2243d6af83fd7753ab02b0f6c85dc0bd 100644 --- a/src/plugins/dna_export/src/ExportMSA2MSADialog.h +++ b/src/plugins/dna_export/src/ExportMSA2MSADialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ExportMSA2SequencesDialog.cpp b/src/plugins/dna_export/src/ExportMSA2SequencesDialog.cpp index 3491677e0e85d35cae8ae7531fb150a94959eea0..e426a5964234b16247fdf19c89c73a629ab113fd 100644 --- a/src/plugins/dna_export/src/ExportMSA2SequencesDialog.cpp +++ b/src/plugins/dna_export/src/ExportMSA2SequencesDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -41,7 +41,7 @@ ExportMSA2SequencesDialog::ExportMSA2SequencesDialog(const QString &defaultDir, defaultFileName(defaultFileName), saveController(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22055797"); + new HelpButton(this, buttonBox, "24742332"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Export")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/dna_export/src/ExportMSA2SequencesDialog.h b/src/plugins/dna_export/src/ExportMSA2SequencesDialog.h index f2fe34b4fb3534628001a39d957bd54453c4edff..22e8adad771b5e1bde771014a735e962c089dbf6 100644 --- a/src/plugins/dna_export/src/ExportMSA2SequencesDialog.h +++ b/src/plugins/dna_export/src/ExportMSA2SequencesDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ExportProjectViewItems.cpp b/src/plugins/dna_export/src/ExportProjectViewItems.cpp index 9de749562d562b6cd07f378a3568e333fea0ddbe..20cb58686fb60c2456ef1ef2396baa0492ed7ff3 100644 --- a/src/plugins/dna_export/src/ExportProjectViewItems.cpp +++ b/src/plugins/dna_export/src/ExportProjectViewItems.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -360,8 +360,14 @@ void ExportProjectViewItemsContoller::exportSequences(const QList<GObject *> &se defaultFileNameDir, fileBaseName); QString defaultFileName = defaultFileNameDir + QDir::separator() + fileBaseName + "_new.fa"; - QObjectScopedPointer<ExportSequencesDialog> d = new ExportSequencesDialog(allowMerge, allowComplement, allowTranslate, allowBackTranslate, defaultFileName, fileBaseName, - BaseDocumentFormats::FASTA, AppContext::getMainWindow()->getQMainWindow()); + QObjectScopedPointer<ExportSequencesDialog> d = new ExportSequencesDialog(allowMerge, + allowComplement, + allowTranslate, + allowBackTranslate, + defaultFileName, + fileBaseName, + BaseDocumentFormats::FASTA, + AppContext::getMainWindow()->getQMainWindow()); const int rc = d->exec(); CHECK(!d.isNull(), ); diff --git a/src/plugins/dna_export/src/ExportProjectViewItems.h b/src/plugins/dna_export/src/ExportProjectViewItems.h index 72aad72c83a4d9bd33628e0ec6662616e866c9c7..ede0453f8c9d29785cdb1cd906d3a9cc305b099a 100644 --- a/src/plugins/dna_export/src/ExportProjectViewItems.h +++ b/src/plugins/dna_export/src/ExportProjectViewItems.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ExportQualityScoresTask.cpp b/src/plugins/dna_export/src/ExportQualityScoresTask.cpp index 8b3fb1d9eeddbba28a78d8ed07ed48c22d21be80..7dfb5e8b9995672f821da1c957c0d1d6b400b737 100644 --- a/src/plugins/dna_export/src/ExportQualityScoresTask.cpp +++ b/src/plugins/dna_export/src/ExportQualityScoresTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ExportQualityScoresTask.h b/src/plugins/dna_export/src/ExportQualityScoresTask.h index 62b42687393dddd6a4b14a8e41e7c5571d77a1b3..7bd07541e15c838f0d8165cc490e5ab8973e5782 100644 --- a/src/plugins/dna_export/src/ExportQualityScoresTask.h +++ b/src/plugins/dna_export/src/ExportQualityScoresTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ExportQualityScoresWorker.cpp b/src/plugins/dna_export/src/ExportQualityScoresWorker.cpp index ad890e0bc248707b8b32d16f22de448c194edf84..b9f89469ebc518c322389d30828c2ca3de70d78c 100644 --- a/src/plugins/dna_export/src/ExportQualityScoresWorker.cpp +++ b/src/plugins/dna_export/src/ExportQualityScoresWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ExportQualityScoresWorker.h b/src/plugins/dna_export/src/ExportQualityScoresWorker.h index c1057345f06853d0d0677ec8e573ec2e2e6a518b..0409b8eacc6de47d2e00fb71578f8344e1074b95 100644 --- a/src/plugins/dna_export/src/ExportQualityScoresWorker.h +++ b/src/plugins/dna_export/src/ExportQualityScoresWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ExportSelectedSeqRegionsTask.cpp b/src/plugins/dna_export/src/ExportSelectedSeqRegionsTask.cpp index af7544a01c54999856cf025847a10cd81041868c..c285b2cb5dfd9e9e94f03170fef258afbd6a8bcf 100644 --- a/src/plugins/dna_export/src/ExportSelectedSeqRegionsTask.cpp +++ b/src/plugins/dna_export/src/ExportSelectedSeqRegionsTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -110,6 +110,8 @@ void CreateExportItemsFromSeqRegionsTask::run() { DbiOperationsBlock dbiBlock(dbiRef, stateInfo); Q_UNUSED(dbiBlock); + ExportSequenceItem startItem; + ExportSequenceItem endItem; int regionCount = 0; QSet<QString> usedNames; foreach (const U2Region &r, regions) { @@ -125,7 +127,7 @@ void CreateExportItemsFromSeqRegionsTask::run() { ExportSequenceItem ei; U2SequenceImporter seqImporter(QVariantMap(), true); - seqImporter.startSequence(stateInfo, dbiRef, U2ObjectDbi::ROOT_FOLDER, name, false); + seqImporter.startSequence(stateInfo, dbiRef, U2ObjectDbi::ROOT_FOLDER, name, seqObject->isCircular()); SAFE_POINT_OP(stateInfo, ); for (qint64 pos = r.startPos; pos < r.endPos(); pos += sequenceChunkMaxLength) { const qint64 currentChunkSize = qMin(sequenceChunkMaxLength, r.endPos() - pos); @@ -152,6 +154,21 @@ void CreateExportItemsFromSeqRegionsTask::run() { exportSettings.items.append(ei); stateInfo.setProgress(100 * ++regionCount / regions.size()); + + const qint64 endPos = r.endPos(); + const qint64 seqLength = seqObject->getSequenceLength(); + CHECK_CONTINUE(!(r.startPos == 0 && endPos == seqLength)); + CHECK_OPERATIONS(r.startPos != 0, startItem = ei, continue); + CHECK_OPERATIONS(endPos != seqLength, endItem = ei, continue); + } + + if (!startItem.isEmpty() && !endItem.isEmpty() && seqObject->isCircular()) { + const ExportSequenceItem circularItem = ExportSequenceTask::mergedCircularItem(endItem, startItem, stateInfo); + CHECK_OP(stateInfo, ); + + exportSettings.items.removeOne(startItem); + exportSettings.items.removeOne(endItem); + exportSettings.items.append(circularItem); } } diff --git a/src/plugins/dna_export/src/ExportSelectedSeqRegionsTask.h b/src/plugins/dna_export/src/ExportSelectedSeqRegionsTask.h index e09e6cee3326a7ef9f6c5d7ea237c5cdda3ddef3..11db6c89c9dba660cd0e1c307d9e72c26ea0252f 100644 --- a/src/plugins/dna_export/src/ExportSelectedSeqRegionsTask.h +++ b/src/plugins/dna_export/src/ExportSelectedSeqRegionsTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ExportSequenceTask.cpp b/src/plugins/dna_export/src/ExportSequenceTask.cpp index 21dc0520d91f9a02c8795597cc0a1ea707b415ec..f1254b1bf0e329b9e0800e9082d7abca89348144 100644 --- a/src/plugins/dna_export/src/ExportSequenceTask.cpp +++ b/src/plugins/dna_export/src/ExportSequenceTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -84,6 +84,18 @@ ExportSequenceItem & ExportSequenceItem::operator =(const ExportSequenceItem &ot return *this; } +bool ExportSequenceItem::operator==(const ExportSequenceItem& other) const { + return seqRef == other.seqRef && + name == other.name && + circular == other.circular && + alphabet == other.alphabet && + length == other.length && + annotations == other.annotations && + complTT == other.complTT && + aminoTT == other.aminoTT && + backTT == other.backTT; +} + ExportSequenceItem::~ExportSequenceItem() { releaseOwnedSeq(); } @@ -149,6 +161,11 @@ bool ExportSequenceItem::ownsSeq() const { return sequencesRefCounts.contains(seqRef); } +bool ExportSequenceItem::isEmpty() const { + static const ExportSequenceItem empty; + return *this == empty; +} + void ExportSequenceItem::setSequenceInfo(U2SequenceObject *seqObj) { SAFE_POINT(NULL != seqObj, L10N::nullPointerError("sequence object"), ); @@ -160,11 +177,14 @@ void ExportSequenceItem::setSequenceInfo(U2SequenceObject *seqObj) { } ExportSequenceTaskSettings::ExportSequenceTaskSettings() - : merge(false), mergeGap(0), strand(TriState_Yes), allAminoFrames(false), mostProbable(true), saveAnnotations(false), - formatId(BaseDocumentFormats::FASTA) -{ - -} + : merge(false), + mergeGap(0), + strand(TriState_Yes), + allAminoFrames(false), + mostProbable(true), + saveAnnotations(false), + formatId(BaseDocumentFormats::FASTA), + sequenceLength(0) {} ////////////////////////////////////////////////////////////////////////// //ExportSequenceTask @@ -480,6 +500,9 @@ void ExportSequenceTask::run() { f->storeDocument(resultDocument, stateInfo); } +ExportSequenceItem ExportSequenceTask::mergedCircularItem(const ExportSequenceItem &first, const ExportSequenceItem &second, U2OpStatus &os) { + return mergeExportItems(QList<ExportSequenceItem>() << first << second, 0, os); +} ////////////////////////////////////////////////////////////////////////// // Export sequence under annotations diff --git a/src/plugins/dna_export/src/ExportSequenceTask.h b/src/plugins/dna_export/src/ExportSequenceTask.h index 5f7bc35003fbd34e8da9866f7ed0f1ecb79d682c..7057ba2aa07d14bade4f9cdf6e3bb90c1c16ad51 100644 --- a/src/plugins/dna_export/src/ExportSequenceTask.h +++ b/src/plugins/dna_export/src/ExportSequenceTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -46,8 +46,10 @@ public: // after calling this method the client code takes responsibility for correct release the sequence from the database U2SequenceObject * takeOwnedSeq(); bool ownsSeq() const; + bool isEmpty() const; ExportSequenceItem & operator =(const ExportSequenceItem &other); + bool operator==(const ExportSequenceItem& other) const; U2EntityRef seqRef; // sequence to copy QString name; @@ -90,7 +92,9 @@ public: DocumentFormatId formatId; - QString sequenceName; // custom sequence name + QString sequenceName; // custom sequence name + + qint64 sequenceLength; // length of the sequence if there is the only source sequence }; /** Exports sequences a file */ @@ -101,6 +105,10 @@ public: void run(); + static ExportSequenceItem mergedCircularItem(const ExportSequenceItem &first, + const ExportSequenceItem &second, + U2OpStatus &os); + private: ExportSequenceTaskSettings config; }; diff --git a/src/plugins/dna_export/src/ExportSequenceViewItems.cpp b/src/plugins/dna_export/src/ExportSequenceViewItems.cpp index da0762d3f4a786385b06e944cdb4396c00f31538..d071b24e87942dda82c5b397c9979ad25b563496 100644 --- a/src/plugins/dna_export/src/ExportSequenceViewItems.cpp +++ b/src/plugins/dna_export/src/ExportSequenceViewItems.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -157,7 +157,11 @@ ADVExportContext::ADVExportContext(AnnotatedDNAView* v) : view(v) { connect(view->getAnnotationsSelection(), SIGNAL(si_selectionChanged(AnnotationSelection *, const QList<Annotation *> &, const QList<Annotation *> &)), - SLOT(sl_onAnnotationSelectionChanged(AnnotationSelection *, const QList<Annotation *> &, const QList<Annotation *> &))); + SLOT(updateActions())); + + connect(view->getAnnotationsGroupSelection(), + SIGNAL(si_selectionChanged(AnnotationGroupSelection *, const QList<AnnotationGroup *> &, const QList<AnnotationGroup *> &)), + SLOT(updateActions())); connect(view, SIGNAL(si_sequenceAdded(ADVSequenceObjectContext*)), SLOT(sl_onSequenceContextAdded(ADVSequenceObjectContext*))); connect(view, SIGNAL(si_sequenceRemoved(ADVSequenceObjectContext*)), SLOT(sl_onSequenceContextRemoved(ADVSequenceObjectContext*))); @@ -169,25 +173,16 @@ ADVExportContext::ADVExportContext(AnnotatedDNAView* v) : view(v) { void ADVExportContext::sl_onSequenceContextAdded(ADVSequenceObjectContext* c) { connect(c->getSequenceSelection(), SIGNAL(si_selectionChanged(LRegionsSelection*, const QVector<U2Region>&, const QVector<U2Region>&)), - SLOT(sl_onSequenceSelectionChanged(LRegionsSelection*, const QVector<U2Region>&, const QVector<U2Region>&))); + SLOT(updateActions())); updateActions(); } void ADVExportContext::sl_onSequenceContextRemoved(ADVSequenceObjectContext* c) { - c->disconnect(this); - updateActions(); -} - -void ADVExportContext::sl_onAnnotationSelectionChanged(AnnotationSelection *, const QList<Annotation *> &, const QList<Annotation *> &) { - updateActions(); -} - -void ADVExportContext::sl_onSequenceSelectionChanged(LRegionsSelection* , const QVector<U2Region>& , const QVector<U2Region>&) { + c->getSequenceSelection()->disconnect(this); updateActions(); } - static bool allNucleic(const QList<ADVSequenceObjectContext*>& seqs) { foreach(const ADVSequenceObjectContext* s, seqs) { if (!s->getAlphabet()->isNucleic()) { @@ -199,7 +194,7 @@ static bool allNucleic(const QList<ADVSequenceObjectContext*>& seqs) { void ADVExportContext::updateActions() { bool hasSelectedAnnotations = !view->getAnnotationsSelection()->isEmpty(); - bool hasSelectedGroups = view->getAnnotationsGroupSelection(); + bool hasSelectedGroups = !view->getAnnotationsGroupSelection()->isEmpty(); int nSequenceSelections = 0; foreach(ADVSequenceObjectContext* c, view->getSequenceContexts()) { nSequenceSelections += c->getSequenceSelection()->getSelectedRegions().count(); @@ -312,6 +307,7 @@ void ADVExportContext::sl_saveSelectedAnnotationsSequence() { if (seqCtx == NULL) { continue; } + QList<SharedAnnotationData> &annsPerSeq = annotationsPerSeq[seqCtx]; annsPerSeq.append(a->getData()); if (annsPerSeq.size() > 1) { @@ -337,9 +333,14 @@ void ADVExportContext::sl_saveSelectedAnnotationsSequence() { GUrlUtils::getLocalPathFromUrl(seqUrl, view->getSequenceInFocus()->getSequenceGObject()->getGObjectName(), dirPath, fileBaseName); GUrl defaultUrl = GUrlUtils::rollFileName(dirPath + QDir::separator() + fileBaseName + "_annotation." + fileExt, DocumentUtils::getNewDocFileNameExcludesHint()); - QObjectScopedPointer<ExportSequencesDialog> d = new ExportSequencesDialog(true, allowComplement, allowTranslation, allowBackTranslation, - defaultUrl.getURLString(), fileBaseName, BaseDocumentFormats::FASTA, - AppContext::getMainWindow()->getQMainWindow()); + QObjectScopedPointer<ExportSequencesDialog> d = new ExportSequencesDialog(true, + allowComplement, + allowTranslation, + allowBackTranslation, + defaultUrl.getURLString(), + fileBaseName, + BaseDocumentFormats::FASTA, + AppContext::getMainWindow()->getQMainWindow()); d->setWindowTitle("Export Sequence of Selected Annotations"); d->disableAllFramesOption(true); // only 1 frame is suitable d->disableStrandOption(true); // strand is already recorded in annotation @@ -394,11 +395,16 @@ void ADVExportContext::sl_saveSelectedSequences() { GUrl seqUrl = seqCtx->getSequenceGObject()->getDocument()->getURL(); GUrlUtils::getLocalPathFromUrl(seqUrl, seqCtx->getSequenceGObject()->getGObjectName(), dirPath, fileBaseName); - GUrl defaultUrl = GUrlUtils::rollFileName(dirPath + QDir::separator() + fileBaseName + "_region." + fileExt, DocumentUtils::getNewDocFileNameExcludesHint()); - QObjectScopedPointer<ExportSequencesDialog> d = new ExportSequencesDialog(merge, complement, amino, nucleic, defaultUrl.getURLString(), fileBaseName, BaseDocumentFormats::FASTA, - AppContext::getMainWindow()->getQMainWindow()); + QObjectScopedPointer<ExportSequencesDialog> d = new ExportSequencesDialog(merge, + complement, + amino, + nucleic, + defaultUrl.getURLString(), + fileBaseName, + BaseDocumentFormats::FASTA, + AppContext::getMainWindow()->getQMainWindow()); d->setWindowTitle("Export Selected Sequence Region"); const int rc = d->exec(); CHECK(!d.isNull(), ); diff --git a/src/plugins/dna_export/src/ExportSequenceViewItems.h b/src/plugins/dna_export/src/ExportSequenceViewItems.h index 1262aadb038931635aec105ca69f4fb2c8ba3017..94afb088c0481aa4c52908db95c003ba3d8c9ddd 100644 --- a/src/plugins/dna_export/src/ExportSequenceViewItems.h +++ b/src/plugins/dna_export/src/ExportSequenceViewItems.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -72,9 +72,6 @@ protected slots: void sl_onSequenceContextRemoved(ADVSequenceObjectContext* c); void sl_exportBlastResultToAlignment(); - void sl_onAnnotationSelectionChanged(AnnotationSelection *, const QList<Annotation *> &added, const QList<Annotation *> &removed); - void sl_onSequenceSelectionChanged(LRegionsSelection* thiz, const QVector<U2Region>& added, const QVector<U2Region>& removed); - void updateActions(); private: @@ -82,7 +79,6 @@ private: void prepareMAFromAnnotations(MultipleSequenceAlignment& ma, bool translate, U2OpStatus& os); void prepareMAFromSequences(MultipleSequenceAlignment& ma, bool translate, U2OpStatus& os); void fetchSequencesFromRemoteDB(const QString & listId); - void selectionToAlignment(const QString& title, bool annotations, bool translate); AnnotatedDNAView* view; diff --git a/src/plugins/dna_export/src/ExportSequences2MSADialog.cpp b/src/plugins/dna_export/src/ExportSequences2MSADialog.cpp index d3672873091563ba713a7b2cdec8582e91cf0905..bfe7c2ea9870ca6e4aa5df8a971d1bd67cf06861 100644 --- a/src/plugins/dna_export/src/ExportSequences2MSADialog.cpp +++ b/src/plugins/dna_export/src/ExportSequences2MSADialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -39,7 +39,7 @@ ExportSequences2MSADialog::ExportSequences2MSADialog(QWidget* p, const QString& : QDialog(p), saveController(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22055796"); + new HelpButton(this, buttonBox, "24742331"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Export")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); okButton = buttonBox->button(QDialogButtonBox::Ok); diff --git a/src/plugins/dna_export/src/ExportSequences2MSADialog.h b/src/plugins/dna_export/src/ExportSequences2MSADialog.h index 29cdca2198e4669aeb34324f2fbdabefa2409da7..a6c256a150d6f510abda050926e30725060abd38 100644 --- a/src/plugins/dna_export/src/ExportSequences2MSADialog.h +++ b/src/plugins/dna_export/src/ExportSequences2MSADialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ExportSequencesDialog.cpp b/src/plugins/dna_export/src/ExportSequencesDialog.cpp index 2f7f4d058f3603cee2e8472e103527db3497a854..eedd30339e9d42049649dff71c3c8aec7e18f919 100644 --- a/src/plugins/dna_export/src/ExportSequencesDialog.cpp +++ b/src/plugins/dna_export/src/ExportSequencesDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -51,7 +51,7 @@ ExportSequencesDialog::ExportSequencesDialog( bool m, bool allowComplement, bool saveController(NULL), defaultFileName(defaultFileName) { setupUi(this); - new HelpButton(this, buttonBox, "22055795"); + new HelpButton(this, buttonBox, "24742330"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Export")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/dna_export/src/ExportSequencesDialog.h b/src/plugins/dna_export/src/ExportSequencesDialog.h index a63f17d679762df3cd9e4d61b61de02dc714d5e3..6102ebaf988b256ea831698e24680b88a2073ef2 100644 --- a/src/plugins/dna_export/src/ExportSequencesDialog.h +++ b/src/plugins/dna_export/src/ExportSequencesDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -36,8 +36,9 @@ class ExportSequencesDialog : public QDialog, Ui_ExportSequencesDialog { Q_OBJECT public: ExportSequencesDialog(bool multiMode, bool allowComplement, bool allowTranslation, - bool allowBackTranslation, const QString &defaultFileName, const QString &sourceFileBaseName, - const DocumentFormatId &f, QWidget *p); + bool allowBackTranslation, const QString &defaultFileName, + const QString &sourceFileBaseName, + const DocumentFormatId &f, QWidget *p); void updateModel(); bool multiMode; diff --git a/src/plugins/dna_export/src/ExportTasks.cpp b/src/plugins/dna_export/src/ExportTasks.cpp index e2953f7c6b5e78b4d5898c7ab75d081e481b21e4..4f102afbf6f5a808a7e8ee5038925548fd117466 100644 --- a/src/plugins/dna_export/src/ExportTasks.cpp +++ b/src/plugins/dna_export/src/ExportTasks.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ExportTasks.h b/src/plugins/dna_export/src/ExportTasks.h index 24a0d5bbfa8a2905feb4c324ea465a5bf1f0dff6..42a8564f645d45cdd4c227aa24e96fc6fc34df86 100644 --- a/src/plugins/dna_export/src/ExportTasks.h +++ b/src/plugins/dna_export/src/ExportTasks.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ExportUtils.cpp b/src/plugins/dna_export/src/ExportUtils.cpp index 87c5869388f511892f4555d60e77375ef2d81508..85eec41d810a7a9d04db9f6d2338c43b1608963f 100644 --- a/src/plugins/dna_export/src/ExportUtils.cpp +++ b/src/plugins/dna_export/src/ExportUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ExportUtils.h b/src/plugins/dna_export/src/ExportUtils.h index 53854626d5875cb0cde2b0cb4a8cddaf0ad27982..ba120ce02e201f187187e6daf323deed2c87c0d8 100644 --- a/src/plugins/dna_export/src/ExportUtils.h +++ b/src/plugins/dna_export/src/ExportUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/GenerateDNAWorker.cpp b/src/plugins/dna_export/src/GenerateDNAWorker.cpp index ec8eb0a0d3204faf9ed80dfe5710bc7be7f216a0..e3063a66a85e693f0e2fd3f76e6ffffaf4f37e75 100644 --- a/src/plugins/dna_export/src/GenerateDNAWorker.cpp +++ b/src/plugins/dna_export/src/GenerateDNAWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -227,27 +227,26 @@ Task* GenerateDNAWorker::tick() { } } else { if(actor->getParameter(ALGORITHM)->getAttributeValue<QString>(context) == "GC Skew") { - int percentA = qrand(); - int percentC = qrand(); - int percentT = qrand(); - int percentG = qrand(); - int sum = percentA + percentC + percentG + percentT; - percentA = (float)percentA / sum * 100; - percentG = (float)percentG / sum * 100; - percentC = (float)percentC / sum * 100; - percentT = (float)percentT / sum * 100; - int CG = percentG + percentG; - float gcSkew = actor->getParameter(GC_SKEW)->getAttributeValue<float>(context); - percentC = (1 - gcSkew)* CG / 2; + double percentA = qrand(); + double percentC = qrand(); + double percentG = qrand(); + double percentT = qrand(); + double sum = percentA + percentC + percentG + percentT; + percentA = percentA / sum * 100; + percentC = percentC / sum * 100; + percentG = percentG / sum * 100; + percentT = percentT / sum * 100; + double CG = percentC + percentG; + double gcSkew = actor->getParameter(GC_SKEW)->getAttributeValue<float>(context); + percentC = (1 - gcSkew) * CG / 2; percentG = percentC + gcSkew * CG; - if(percentC < 0 || percentC > 100 || percentG < 0 || percentG > 100) { + if (percentC < 0 || percentC > 100 || percentG < 0 || percentG > 100) { return new FailTask("Wrong GC Skew value"); } - - cfg.content['A'] = percentA / 100.0; - cfg.content['C'] = percentC / 100.0; - cfg.content['G'] = percentG / 100.0; - cfg.content['T'] = percentT / 100.0; + cfg.content['A'] = percentA / 100; + cfg.content['C'] = percentC / 100; + cfg.content['G'] = percentG / 100; + cfg.content['T'] = percentT / 100; } else { int percentA = actor->getParameter(A_PERCENT_ATTR)->getAttributeValue<int>(context); int percentC = actor->getParameter(C_PERCENT_ATTR)->getAttributeValue<int>(context); diff --git a/src/plugins/dna_export/src/GenerateDNAWorker.h b/src/plugins/dna_export/src/GenerateDNAWorker.h index 34a9312044d4f0e2d8b0ec06608abb21ec9c1201..baf45eaaa8c9d4835e77abd18dbdf6bff555e62e 100644 --- a/src/plugins/dna_export/src/GenerateDNAWorker.h +++ b/src/plugins/dna_export/src/GenerateDNAWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/GetSequenceByIdDialog.cpp b/src/plugins/dna_export/src/GetSequenceByIdDialog.cpp index b57eda16ffe421ddb2d569836ce9e9787481ae3d..1f3317c188f3e72e05d0c64a4048736927286e3e 100644 --- a/src/plugins/dna_export/src/GetSequenceByIdDialog.cpp +++ b/src/plugins/dna_export/src/GetSequenceByIdDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ namespace U2 { GetSequenceByIdDialog::GetSequenceByIdDialog(QWidget *w): QDialog(w) { setupUi(this); - new HelpButton(this, buttonBox, "22056019"); + new HelpButton(this, buttonBox, "24742554"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/dna_export/src/GetSequenceByIdDialog.h b/src/plugins/dna_export/src/GetSequenceByIdDialog.h index fc7ffcc3acbf953fb6f87f0001aa83af59f41727..17fec12e85f5aff39166dbbb1275020ddb1578f5 100644 --- a/src/plugins/dna_export/src/GetSequenceByIdDialog.h +++ b/src/plugins/dna_export/src/GetSequenceByIdDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ImportAnnotationsFromCSVDialog.cpp b/src/plugins/dna_export/src/ImportAnnotationsFromCSVDialog.cpp index 94491d796ed70225f844eea4fb4c1cfbf9fc3c3f..13f7a1357327b9ce723f4c236f68a24a7dbae5e9 100644 --- a/src/plugins/dna_export/src/ImportAnnotationsFromCSVDialog.cpp +++ b/src/plugins/dna_export/src/ImportAnnotationsFromCSVDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -62,7 +62,7 @@ ImportAnnotationsFromCSVDialog::ImportAnnotationsFromCSVDialog(QWidget* w) : QDialog (w), saveController(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22055865"); + new HelpButton(this, buttonBox, "24742400"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Run")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/dna_export/src/ImportAnnotationsFromCSVDialog.h b/src/plugins/dna_export/src/ImportAnnotationsFromCSVDialog.h index 4be0c931102564dd5dc717ab2fa48cbf39977b20..67e276afab78512e1035ee2bcc13c2e6d6d4063a 100644 --- a/src/plugins/dna_export/src/ImportAnnotationsFromCSVDialog.h +++ b/src/plugins/dna_export/src/ImportAnnotationsFromCSVDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ImportAnnotationsFromCSVTask.cpp b/src/plugins/dna_export/src/ImportAnnotationsFromCSVTask.cpp index 57e8e730dd3bda67894c600e8de6fc7761e085d1..ca76f0463d7006e9266960e11cc5a769a62c41dc 100644 --- a/src/plugins/dna_export/src/ImportAnnotationsFromCSVTask.cpp +++ b/src/plugins/dna_export/src/ImportAnnotationsFromCSVTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ImportAnnotationsFromCSVTask.h b/src/plugins/dna_export/src/ImportAnnotationsFromCSVTask.h index 3968cfb3ab2536b28d0c13f783b1e9cd044117dc..ed1815fff0b09bb6faf4b60f59c8249ce25fc7c6 100644 --- a/src/plugins/dna_export/src/ImportAnnotationsFromCSVTask.h +++ b/src/plugins/dna_export/src/ImportAnnotationsFromCSVTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ImportQualityScoresTask.cpp b/src/plugins/dna_export/src/ImportQualityScoresTask.cpp index 6bea44710878c0c0c53a89e534f64ab396bcd164..c4397d4a73d1c54a1973d8db186872db82aa737b 100644 --- a/src/plugins/dna_export/src/ImportQualityScoresTask.cpp +++ b/src/plugins/dna_export/src/ImportQualityScoresTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ImportQualityScoresTask.h b/src/plugins/dna_export/src/ImportQualityScoresTask.h index 273f810740d94ac4908b5478a065f2d1c3306222..e118b6e6ff0bae3f4de6f2f738f74e5e4b0e4961 100644 --- a/src/plugins/dna_export/src/ImportQualityScoresTask.h +++ b/src/plugins/dna_export/src/ImportQualityScoresTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ImportQualityScoresWorker.cpp b/src/plugins/dna_export/src/ImportQualityScoresWorker.cpp index 2aa6d7ac5de0d8eebaa8ef44877d7d4e53e33ce7..04a439fcdf298b7809bb7b140249a16ae7055b1a 100644 --- a/src/plugins/dna_export/src/ImportQualityScoresWorker.cpp +++ b/src/plugins/dna_export/src/ImportQualityScoresWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/ImportQualityScoresWorker.h b/src/plugins/dna_export/src/ImportQualityScoresWorker.h index c7d3ec91fab3481034807b758813fd8ca9fda45e..9230e7d497b608ce64d20bd7703555e8b6d56f5c 100644 --- a/src/plugins/dna_export/src/ImportQualityScoresWorker.h +++ b/src/plugins/dna_export/src/ImportQualityScoresWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/McaEditorContext.cpp b/src/plugins/dna_export/src/McaEditorContext.cpp index 344b51f602e3b12b8b3f9bdb1e16a4cc8b58b49f..c37c1ac77f3ed89e69b5ecd3c4b7a3cd0053abe8 100644 --- a/src/plugins/dna_export/src/McaEditorContext.cpp +++ b/src/plugins/dna_export/src/McaEditorContext.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/McaEditorContext.h b/src/plugins/dna_export/src/McaEditorContext.h index 9d105d7205970a3bdc7e4c23ec0d4184dcec61c7..1f3f4ccffd85284c403b233d6366e2f005ff7768 100644 --- a/src/plugins/dna_export/src/McaEditorContext.h +++ b/src/plugins/dna_export/src/McaEditorContext.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/dialogs/ExportMca2MsaDialog.cpp b/src/plugins/dna_export/src/dialogs/ExportMca2MsaDialog.cpp index dcb1e766fa2d062d5ac3d4b85c89c7a88e0c7ddf..dc1d090e4fe0f6cc5cea982aef845e5dc165a533 100644 --- a/src/plugins/dna_export/src/dialogs/ExportMca2MsaDialog.cpp +++ b/src/plugins/dna_export/src/dialogs/ExportMca2MsaDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -38,7 +38,7 @@ ExportMca2MsaDialog::ExportMca2MsaDialog(const QString &defaultFilePath, QWidget setupUi(this); GCOUNTER(cvar, tvar, "'Export Alignment without Chromatograms' dialog opening"); - new HelpButton(this, buttonBox, "22055798"); + new HelpButton(this, buttonBox, "24742333"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Export")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/dna_export/src/dialogs/ExportMca2MsaDialog.h b/src/plugins/dna_export/src/dialogs/ExportMca2MsaDialog.h index 82953bfe756d079550735467bdc65a6fcfa8aaeb..cde80057cf87864f47b5b926c08f2a5478e3dadb 100644 --- a/src/plugins/dna_export/src/dialogs/ExportMca2MsaDialog.h +++ b/src/plugins/dna_export/src/dialogs/ExportMca2MsaDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/tasks/ConvertMca2MsaTask.cpp b/src/plugins/dna_export/src/tasks/ConvertMca2MsaTask.cpp index a14d0d0aadf71b3e9dca89de11a132774172ff8e..b145287fb61febf93d6e94cf94a45ff48c09148f 100644 --- a/src/plugins/dna_export/src/tasks/ConvertMca2MsaTask.cpp +++ b/src/plugins/dna_export/src/tasks/ConvertMca2MsaTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/tasks/ConvertMca2MsaTask.h b/src/plugins/dna_export/src/tasks/ConvertMca2MsaTask.h index 05b98240489bdf9760bce54471d270d25321d401..3f80e7a3c80c88c6ed1847c793211c19c84fa66c 100644 --- a/src/plugins/dna_export/src/tasks/ConvertMca2MsaTask.h +++ b/src/plugins/dna_export/src/tasks/ConvertMca2MsaTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/tasks/ExportMca2MsaTask.cpp b/src/plugins/dna_export/src/tasks/ExportMca2MsaTask.cpp index 98cc6274c8b325ae9b61e5ebcd4386473d6cf90b..dc863c87660395221d888ab5de575a609bd2c504 100644 --- a/src/plugins/dna_export/src/tasks/ExportMca2MsaTask.cpp +++ b/src/plugins/dna_export/src/tasks/ExportMca2MsaTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/src/tasks/ExportMca2MsaTask.h b/src/plugins/dna_export/src/tasks/ExportMca2MsaTask.h index f76cedc1c81cb16ebaaf6e98fd868063df39260a..7a7f490aec42869e7175b4d9cd321e89d350a50d 100644 --- a/src/plugins/dna_export/src/tasks/ExportMca2MsaTask.h +++ b/src/plugins/dna_export/src/tasks/ExportMca2MsaTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_export/transl/russian.ts b/src/plugins/dna_export/transl/russian.ts index 1f988b678d48cc096c4d55bb33bf942d9db9df0a..a791848d26311fd08e3f179b2bd2e70d5862be2f 100644 --- a/src/plugins/dna_export/transl/russian.ts +++ b/src/plugins/dna_export/transl/russian.ts @@ -523,108 +523,108 @@ <translation>ÐкÑпорт результатов BLAST в множеÑтвенное выравнивание</translation> </message> <message> - <location filename="../src/ExportSequenceViewItems.cpp" line="263"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="258"/> <source>from '</source> <translation>из '</translation> </message> <message> - <location filename="../src/ExportSequenceViewItems.cpp" line="264"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="259"/> <source>Fetch sequences from remote database</source> <translation>Загрузить поÑледовательноÑти из удаленной базы данных</translation> </message> <message> - <location filename="../src/ExportSequenceViewItems.cpp" line="267"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="262"/> <source>Fetch sequences by 'id' %1</source> <translation>Загрузить по 'id' %1</translation> </message> <message> - <location filename="../src/ExportSequenceViewItems.cpp" line="271"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="266"/> <source>Fetch sequences by 'accession' %1</source> <translation>Загрузить по 'accsession' %1</translation> </message> <message> - <location filename="../src/ExportSequenceViewItems.cpp" line="275"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="270"/> <source>Fetch sequences by 'db_xref' %1</source> <translation>Загрузить по 'db_xref' %1</translation> </message> <message> - <location filename="../src/ExportSequenceViewItems.cpp" line="484"/> - <location filename="../src/ExportSequenceViewItems.cpp" line="538"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="490"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="544"/> <source>Illegal parameter: input alignment is not empty!</source> <translation>Ðекорректный параметр: входное выравнивание не пуÑто!</translation> </message> <message> - <location filename="../src/ExportSequenceViewItems.cpp" line="496"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="502"/> <source>%1 is not a BLAST annotation</source> <translation>%1 не ÑвлÑетÑÑ BLAST аннотацией</translation> </message> <message> - <location filename="../src/ExportSequenceViewItems.cpp" line="501"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="507"/> <source>Can not export BLAST annotations from different sequences</source> <translation>Ðевозможно ÑкÑпортировать BLAST аннотации из разных поÑледовательноÑтей</translation> </message> <message> - <location filename="../src/ExportSequenceViewItems.cpp" line="504"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="510"/> <source>Can not find qualifier to set as a name for BLAST sequence</source> <translation>Ðевозможно найти квалификатор, чтобы уÑтановить в качеÑтве имени Ð´Ð»Ñ BLAST поÑледовательноÑти</translation> </message> <message> - <location filename="../src/ExportSequenceViewItems.cpp" line="584"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="590"/> <source>Illegal parameter: Input alignment is not empty!</source> <translation>Ðекорректный параметр: входное выравнивание не пуÑто!</translation> </message> <message> - <location filename="../src/ExportSequenceViewItems.cpp" line="659"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="665"/> <source>Create alignment</source> <translation>Создать выравнивание</translation> </message> <message> - <location filename="../src/ExportSequenceViewItems.cpp" line="660"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="666"/> <source>Save alignment to file</source> <translation>Сохранить выравнивание в файл</translation> </message> <message> - <location filename="../src/ExportSequenceViewItems.cpp" line="301"/> - <location filename="../src/ExportSequenceViewItems.cpp" line="434"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="296"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="440"/> <source>No annotations selected!</source> <translation>Сначала выберите аннотации!</translation> </message> <message> - <location filename="../src/ExportSequenceViewItems.cpp" line="381"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="382"/> <source>No sequence regions selected!</source> <translation>Ðет выбранных учаÑтков!</translation> </message> <message> - <location filename="../src/ExportSequenceViewItems.cpp" line="486"/> - <location filename="../src/ExportSequenceViewItems.cpp" line="540"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="492"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="546"/> <source>At least 2 annotations are required</source> <translation>Ðужно выбрать Ñ…Ð¾Ñ‚Ñ Ð±Ñ‹ 2 аннотации</translation> </message> <message> - <location filename="../src/ExportSequenceViewItems.cpp" line="555"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="561"/> <source>Different sequence alphabets</source> <translation>ÐеÑопоÑтавимые алфавиты</translation> </message> <message> - <location filename="../src/ExportSequenceViewItems.cpp" line="612"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="618"/> <source>At least 2 sequences required</source> <translation>Ðеобходимо как минимум 2 поÑледовательноÑти</translation> </message> <message> - <location filename="../src/ExportSequenceViewItems.cpp" line="500"/> - <location filename="../src/ExportSequenceViewItems.cpp" line="548"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="506"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="554"/> <source>No sequence object found</source> <translation>ПоÑледовательноÑÑ‚ÑŒ недоÑтупна</translation> </message> <message> - <location filename="../src/ExportSequenceViewItems.cpp" line="510"/> - <location filename="../src/ExportSequenceViewItems.cpp" line="569"/> - <location filename="../src/ExportSequenceViewItems.cpp" line="626"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="516"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="575"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="632"/> <source>Alignment is too large</source> <translation>Слишком большой размер выравниваниÑ</translation> </message> <message> - <location filename="../src/ExportSequenceViewItems.cpp" line="606"/> + <location filename="../src/ExportSequenceViewItems.cpp" line="612"/> <source>Can't derive alignment alphabet</source> <translation>Ðевозможно определить алфавит выравниваниÑ</translation> </message> @@ -845,17 +845,17 @@ <context> <name>U2::ExportAnnotationSequenceSubTask</name> <message> - <location filename="../src/ExportSequenceTask.cpp" line="515"/> + <location filename="../src/ExportSequenceTask.cpp" line="538"/> <source>Extract annotation regions</source> <translation>Извлечь регионы аннотаций</translation> </message> <message> - <location filename="../src/ExportSequenceTask.cpp" line="567"/> + <location filename="../src/ExportSequenceTask.cpp" line="590"/> <source>Sequences of the selected annotations can't be exported. At least one of the annotations is out of boundaries</source> <translation>ПоÑледовательноÑти выбранных аннотаций не могут быть ÑкÑпортированы. Как минимум одна Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð¸Ñ‚ за границы</translation> </message> <message> - <location filename="../src/ExportSequenceTask.cpp" line="585"/> + <location filename="../src/ExportSequenceTask.cpp" line="608"/> <source>Exported sequence has been deleted unexpectedly</source> <translation>Exported sequence has been deleted unexpectedly</translation> </message> @@ -863,7 +863,7 @@ <context> <name>U2::ExportAnnotationSequenceTask</name> <message> - <location filename="../src/ExportSequenceTask.cpp" line="494"/> + <location filename="../src/ExportSequenceTask.cpp" line="517"/> <source>Export annotations</source> <translation>ÐкÑпортировать аннотации</translation> </message> @@ -1179,39 +1179,39 @@ <translation>There is no associated sequence found.</translation> </message> <message> - <location filename="../src/ExportProjectViewItems.cpp" line="389"/> - <location filename="../src/ExportProjectViewItems.cpp" line="587"/> + <location filename="../src/ExportProjectViewItems.cpp" line="395"/> + <location filename="../src/ExportProjectViewItems.cpp" line="593"/> <source>No sequence objects selected!</source> <translation>Выделите один или более объектов!</translation> </message> <message> - <location filename="../src/ExportProjectViewItems.cpp" line="416"/> + <location filename="../src/ExportProjectViewItems.cpp" line="422"/> <source>Not enough memory</source> <translation>ÐедоÑтаточно памÑти</translation> </message> <message> - <location filename="../src/ExportProjectViewItems.cpp" line="438"/> - <location filename="../src/ExportProjectViewItems.cpp" line="482"/> + <location filename="../src/ExportProjectViewItems.cpp" line="444"/> + <location filename="../src/ExportProjectViewItems.cpp" line="488"/> <source>Select one alignment object to export</source> <translation>Выберите один объект выравниваниÑ</translation> </message> <message> - <location filename="../src/ExportProjectViewItems.cpp" line="466"/> + <location filename="../src/ExportProjectViewItems.cpp" line="472"/> <source>Select one chromatogram alignment object to export</source> <translation>Выберите одну хроматограмму Ð´Ð»Ñ ÑкÑпорта</translation> </message> <message> - <location filename="../src/ExportProjectViewItems.cpp" line="529"/> + <location filename="../src/ExportProjectViewItems.cpp" line="535"/> <source>Select one chromatogram object to export</source> <translation>Выберите один объект Ð´Ð»Ñ ÑкÑпорта</translation> </message> <message> - <location filename="../src/ExportProjectViewItems.cpp" line="565"/> + <location filename="../src/ExportProjectViewItems.cpp" line="571"/> <source>Select one annotation object to export</source> <translation>Выберите один объект аннотации</translation> </message> <message> - <location filename="../src/ExportProjectViewItems.cpp" line="592"/> + <location filename="../src/ExportProjectViewItems.cpp" line="598"/> <source>Set output quality file</source> <translation>Укажите качеÑтво выходного файла</translation> </message> @@ -1219,12 +1219,12 @@ <context> <name>U2::ExportSelectedSeqRegionsTask</name> <message> - <location filename="../src/ExportSelectedSeqRegionsTask.cpp" line="165"/> + <location filename="../src/ExportSelectedSeqRegionsTask.cpp" line="182"/> <source>Export selected regions from a sequence task</source> <translation>Export selected regions from a sequence task</translation> </message> <message> - <location filename="../src/ExportSelectedSeqRegionsTask.cpp" line="172"/> + <location filename="../src/ExportSelectedSeqRegionsTask.cpp" line="189"/> <source>Invalid annotation table detected</source> <translation>Invalid annotation table detected</translation> </message> @@ -1232,32 +1232,32 @@ <context> <name>U2::ExportSequenceTask</name> <message> - <location filename="../src/ExportSequenceTask.cpp" line="175"/> + <location filename="../src/ExportSequenceTask.cpp" line="195"/> <source>Export sequence to '%1'</source> <translation>ÐкÑпорт поÑледовательноÑтей в '%1'</translation> </message> <message> - <location filename="../src/ExportSequenceTask.cpp" line="192"/> + <location filename="../src/ExportSequenceTask.cpp" line="212"/> <source>Complement translation not found</source> <translation>Ðе найдена ÐºÐ¾Ð¼Ð¿Ð»ÐµÐ¼ÐµÐ½Ñ‚Ð°Ñ€Ð½Ð°Ñ Ñ‚Ñ€Ð°Ð½ÑлÑциÑ</translation> </message> <message> - <location filename="../src/ExportSequenceTask.cpp" line="233"/> + <location filename="../src/ExportSequenceTask.cpp" line="253"/> <source>Amino translation not found</source> <translation>Amino translation not found</translation> </message> <message> - <location filename="../src/ExportSequenceTask.cpp" line="278"/> + <location filename="../src/ExportSequenceTask.cpp" line="298"/> <source>The "%1" translation is empty due to small source sequence length</source> <translation>The "%1" translation is empty due to small source sequence length</translation> </message> <message> - <location filename="../src/ExportSequenceTask.cpp" line="466"/> + <location filename="../src/ExportSequenceTask.cpp" line="486"/> <source>No sequences have been produced.</source> <translation>No sequences have been produced.</translation> </message> <message> - <location filename="../src/ExportSequenceTask.cpp" line="302"/> + <location filename="../src/ExportSequenceTask.cpp" line="322"/> <source>Back-translation not found</source> <translation>ÐžÐ±Ñ€Ð°Ñ‚Ð½Ð°Ñ Ñ‚Ñ€Ð°Ð½ÑлÑÑ†Ð¸Ñ Ð½Ðµ найдена</translation> </message> @@ -1348,9 +1348,8 @@ <translation>Ð˜Ð¼Ñ Ð¿Ð¾ÑледовательноÑти</translation> </message> <message> - <location filename="../src/ExportSequencesDialog.ui" line="103"/> - <source>Convertion options</source> - <translation>ÐаÑтройки транÑлÑции</translation> + <source>Conversion options</source> + <translation type="vanished">ÐаÑтройки транÑлÑции</translation> </message> <message> <location filename="../src/ExportSequencesDialog.ui" line="109"/> @@ -1407,6 +1406,11 @@ <source>Frequency distribution</source> <translation>ЧаÑтотное раÑпределение</translation> </message> + <message> + <location filename="../src/ExportSequencesDialog.ui" line="103"/> + <source>Convertion options</source> + <translation type="unfinished"></translation> + </message> <message> <location filename="../src/ExportSequencesDialog.ui" line="163"/> <source>Use custom translation table</source> @@ -1949,12 +1953,12 @@ var %2; //parsed line number</translation> <translation>Ðе указан путь до референÑа.</translation> </message> <message> - <location filename="../src/GenerateDNAWorker.cpp" line="257"/> + <location filename="../src/GenerateDNAWorker.cpp" line="256"/> <source>Base content must be between 0 and 100</source> <translation>Базовый ÑоÑтав должен быть между 0 и 100</translation> </message> <message> - <location filename="../src/GenerateDNAWorker.cpp" line="262"/> + <location filename="../src/GenerateDNAWorker.cpp" line="261"/> <source>Total content percentage is more than 100</source> <translation>Суммарный процентный ÑоÑтав больше 100</translation> </message> diff --git a/src/plugins/dna_flexibility/src/DNAFlexDialog.cpp b/src/plugins/dna_flexibility/src/DNAFlexDialog.cpp index 4cacfe5d93914be2e62bac1d0fc830e4deb33c35..07dd27af137cfc51a9659e3393973822c83c57f3 100644 --- a/src/plugins/dna_flexibility/src/DNAFlexDialog.cpp +++ b/src/plugins/dna_flexibility/src/DNAFlexDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -41,7 +41,7 @@ DNAFlexDialog::DNAFlexDialog(ADVSequenceObjectContext* _ctx) : QDialog(_ctx->getAnnotatedDNAView()->getWidget()) { setupUi(this); - new HelpButton(this, buttonBox, "22056013"); + new HelpButton(this, buttonBox, "24742548"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Search")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -167,7 +167,7 @@ void DNAFlexDialog::updateHighFlexValues() void DNAFlexDialog::sl_updateSizes(int index) { Q_UNUSED(index); - + for (int i=0; i < tabWidget->count(); i++) { tabWidget->widget(i)->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); } diff --git a/src/plugins/dna_flexibility/src/DNAFlexDialog.h b/src/plugins/dna_flexibility/src/DNAFlexDialog.h index d6de4e2cfe815a8d7d42d8822a1fe0ef925e560e..f9cf2a132972626802e7e08fe134929a8c1602a9 100644 --- a/src/plugins/dna_flexibility/src/DNAFlexDialog.h +++ b/src/plugins/dna_flexibility/src/DNAFlexDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_flexibility/src/DNAFlexGraph.cpp b/src/plugins/dna_flexibility/src/DNAFlexGraph.cpp index 27244d13eec12b8970d67de03ac0797bd624ce1b..b6b15859afbc746b91abcadaa80d82d47727e485 100644 --- a/src/plugins/dna_flexibility/src/DNAFlexGraph.cpp +++ b/src/plugins/dna_flexibility/src/DNAFlexGraph.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_flexibility/src/DNAFlexGraph.h b/src/plugins/dna_flexibility/src/DNAFlexGraph.h index e6c9e1a4ce1aff4ed833eff083b957ff946d0c37..1f51e5775eb65c5ef00f086d5b7023d17ef933e2 100644 --- a/src/plugins/dna_flexibility/src/DNAFlexGraph.h +++ b/src/plugins/dna_flexibility/src/DNAFlexGraph.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_flexibility/src/DNAFlexGraphAlgorithm.cpp b/src/plugins/dna_flexibility/src/DNAFlexGraphAlgorithm.cpp index d8ffc919d2b7cf095775257a7ea9a6cfd62f76b3..4d9904c20bdb9f6dd6987f85424da2aeeb30182b 100644 --- a/src/plugins/dna_flexibility/src/DNAFlexGraphAlgorithm.cpp +++ b/src/plugins/dna_flexibility/src/DNAFlexGraphAlgorithm.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_flexibility/src/DNAFlexGraphAlgorithm.h b/src/plugins/dna_flexibility/src/DNAFlexGraphAlgorithm.h index 943ac1d255f83e604a4d3589401d26cb3b3c8d25..a68304c8125b2c67f975dc75bb4fea3db67e82e0 100644 --- a/src/plugins/dna_flexibility/src/DNAFlexGraphAlgorithm.h +++ b/src/plugins/dna_flexibility/src/DNAFlexGraphAlgorithm.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_flexibility/src/DNAFlexPlugin.cpp b/src/plugins/dna_flexibility/src/DNAFlexPlugin.cpp index fc48ed97ce0ff2d75c0ddf272e275ed8bc8ccb66..85544a42c1b76d280c6b8b7bb8f25ce4c440dd0f 100644 --- a/src/plugins/dna_flexibility/src/DNAFlexPlugin.cpp +++ b/src/plugins/dna_flexibility/src/DNAFlexPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_flexibility/src/DNAFlexPlugin.h b/src/plugins/dna_flexibility/src/DNAFlexPlugin.h index 2f5b5c88af2f474d88e68f28ecf0ef8959feeaa5..823129e7f75a89994784cc6d400bc911eaf1a171 100644 --- a/src/plugins/dna_flexibility/src/DNAFlexPlugin.h +++ b/src/plugins/dna_flexibility/src/DNAFlexPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_flexibility/src/DNAFlexTask.cpp b/src/plugins/dna_flexibility/src/DNAFlexTask.cpp index 5b23639d1fc34aaafde683d2809a4a54083f056c..fbe264bbf1a014c0ee38b4fdcee200118a6f15b1 100644 --- a/src/plugins/dna_flexibility/src/DNAFlexTask.cpp +++ b/src/plugins/dna_flexibility/src/DNAFlexTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_flexibility/src/DNAFlexTask.h b/src/plugins/dna_flexibility/src/DNAFlexTask.h index 00be6851336d923dd5e742240881d69d2a353e21..5c458c5a3e296ff50a73bd87303e1195f95673dd 100644 --- a/src/plugins/dna_flexibility/src/DNAFlexTask.h +++ b/src/plugins/dna_flexibility/src/DNAFlexTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_flexibility/src/FindHighFlexRegions.cpp b/src/plugins/dna_flexibility/src/FindHighFlexRegions.cpp index 9f1613c5ee21af37a42852a4adf8dc5520883875..922b325a9500c8a4a2b062ced6b6f0a35a218f8b 100644 --- a/src/plugins/dna_flexibility/src/FindHighFlexRegions.cpp +++ b/src/plugins/dna_flexibility/src/FindHighFlexRegions.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_flexibility/src/FindHighFlexRegions.h b/src/plugins/dna_flexibility/src/FindHighFlexRegions.h index 336dffd3df2761d012c76699be24268723b26ff8..c79bfdcb28e6b55d7a7a851b64a0d084d0216272 100644 --- a/src/plugins/dna_flexibility/src/FindHighFlexRegions.h +++ b/src/plugins/dna_flexibility/src/FindHighFlexRegions.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_flexibility/src/FindHighFlexRegionsAlgorithm.cpp b/src/plugins/dna_flexibility/src/FindHighFlexRegionsAlgorithm.cpp index 5f479e573ce7f347adffd9622f2a3a25df7a6dc8..2584460b840f151cf97455ce3f13980c5cab7d5c 100644 --- a/src/plugins/dna_flexibility/src/FindHighFlexRegionsAlgorithm.cpp +++ b/src/plugins/dna_flexibility/src/FindHighFlexRegionsAlgorithm.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_flexibility/src/FindHighFlexRegionsAlgorithm.h b/src/plugins/dna_flexibility/src/FindHighFlexRegionsAlgorithm.h index fc14806a9a0e4c6cd4a964aaeadff6dbd3d6db28..4a9357560be8ff1dc641c3aa714b7286f676d630 100644 --- a/src/plugins/dna_flexibility/src/FindHighFlexRegionsAlgorithm.h +++ b/src/plugins/dna_flexibility/src/FindHighFlexRegionsAlgorithm.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_flexibility/src/HighFlexResult.h b/src/plugins/dna_flexibility/src/HighFlexResult.h index 77d9aa8b725bab649da03b124175d18d4d28db60..27c27fa99be63fc05fb0b7932861b94838eee855 100644 --- a/src/plugins/dna_flexibility/src/HighFlexResult.h +++ b/src/plugins/dna_flexibility/src/HighFlexResult.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_flexibility/src/HighFlexSettings.cpp b/src/plugins/dna_flexibility/src/HighFlexSettings.cpp index c39ec69e120aa5a807c4fed726fd6742410f1442..8d33ada55dee01fa40b2fd4c530409b2f0187a55 100644 --- a/src/plugins/dna_flexibility/src/HighFlexSettings.cpp +++ b/src/plugins/dna_flexibility/src/HighFlexSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_flexibility/src/HighFlexSettings.h b/src/plugins/dna_flexibility/src/HighFlexSettings.h index a105b2c2139379173cdb18df1be4301f5b2fac22..496c5e1fc74f69249debadf3d9bda4eb67d5cf6e 100644 --- a/src/plugins/dna_flexibility/src/HighFlexSettings.h +++ b/src/plugins/dna_flexibility/src/HighFlexSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_graphpack/src/BaseContentGraph.cpp b/src/plugins/dna_graphpack/src/BaseContentGraph.cpp index 14c13a29e5e0071610b45488e4631498c84547dd..ee6002e51d238588d3fd972151abba324895022b 100644 --- a/src/plugins/dna_graphpack/src/BaseContentGraph.cpp +++ b/src/plugins/dna_graphpack/src/BaseContentGraph.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_graphpack/src/BaseContentGraph.h b/src/plugins/dna_graphpack/src/BaseContentGraph.h index 2458b56ef211f116f427e09e5bccef38012d49bc..4f557a5cdf1a2d94d3a8a65a393cf2714c14d85b 100644 --- a/src/plugins/dna_graphpack/src/BaseContentGraph.h +++ b/src/plugins/dna_graphpack/src/BaseContentGraph.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_graphpack/src/CumulativeSkew.cpp b/src/plugins/dna_graphpack/src/CumulativeSkew.cpp index 64e6933655649389e26de248b2b195e47b329aa4..38dce3256f154ace2f1c97de03db13b43fc2df5e 100644 --- a/src/plugins/dna_graphpack/src/CumulativeSkew.cpp +++ b/src/plugins/dna_graphpack/src/CumulativeSkew.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_graphpack/src/CumulativeSkew.h b/src/plugins/dna_graphpack/src/CumulativeSkew.h index 1fa79c11b4e34f7a3b14280684098e9d10485192..89d72dc95215244a39bcb11a49124e7ea28d5dcd 100644 --- a/src/plugins/dna_graphpack/src/CumulativeSkew.h +++ b/src/plugins/dna_graphpack/src/CumulativeSkew.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_graphpack/src/DNAGraphPackPlugin.cpp b/src/plugins/dna_graphpack/src/DNAGraphPackPlugin.cpp index 094257d732bfe19db068f6bdf03c5d7cb79b96ef..1c400dbd32b4138804d4bb357e1ebec00168e7fd 100644 --- a/src/plugins/dna_graphpack/src/DNAGraphPackPlugin.cpp +++ b/src/plugins/dna_graphpack/src/DNAGraphPackPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_graphpack/src/DNAGraphPackPlugin.h b/src/plugins/dna_graphpack/src/DNAGraphPackPlugin.h index 0050c12108a6678253d88033367fec7d608f4ce5..9ccf10482631caf308f5005209b2f73fc64a833b 100644 --- a/src/plugins/dna_graphpack/src/DNAGraphPackPlugin.h +++ b/src/plugins/dna_graphpack/src/DNAGraphPackPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_graphpack/src/DeviationGraph.cpp b/src/plugins/dna_graphpack/src/DeviationGraph.cpp index e821af76fc036c15bdfa8929ae14462bb2195993..a3cc2219dd34ecd731eadec63b4ef8c4941d1091 100644 --- a/src/plugins/dna_graphpack/src/DeviationGraph.cpp +++ b/src/plugins/dna_graphpack/src/DeviationGraph.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_graphpack/src/DeviationGraph.h b/src/plugins/dna_graphpack/src/DeviationGraph.h index 8491ea010cea8b9d92aaade68b754aab62fe7d60..250544ae683de41b2e603da286801b2b762fca7a 100644 --- a/src/plugins/dna_graphpack/src/DeviationGraph.h +++ b/src/plugins/dna_graphpack/src/DeviationGraph.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_graphpack/src/EntropyAlgorithm.cpp b/src/plugins/dna_graphpack/src/EntropyAlgorithm.cpp index 657da3e3e40dfbddd2daa5baecd37afc5ffe58ee..8d21f4cbef8cb8aee05161a59a71cabd427a4251 100644 --- a/src/plugins/dna_graphpack/src/EntropyAlgorithm.cpp +++ b/src/plugins/dna_graphpack/src/EntropyAlgorithm.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_graphpack/src/EntropyAlgorithm.h b/src/plugins/dna_graphpack/src/EntropyAlgorithm.h index 09f98c2a64d1431fa45ea602966e9aed9e4d707a..19ac854d71741cc459aefb80b09c7ccc80d32d1c 100644 --- a/src/plugins/dna_graphpack/src/EntropyAlgorithm.h +++ b/src/plugins/dna_graphpack/src/EntropyAlgorithm.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_graphpack/src/GCFramePlot.cpp b/src/plugins/dna_graphpack/src/GCFramePlot.cpp index 044374ddb19de868c608b0cf5b0c664cc65ba4e9..f73c0184c20eb91e07418c65ecff7d20332d7a6a 100644 --- a/src/plugins/dna_graphpack/src/GCFramePlot.cpp +++ b/src/plugins/dna_graphpack/src/GCFramePlot.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_graphpack/src/GCFramePlot.h b/src/plugins/dna_graphpack/src/GCFramePlot.h index 40386548b354776633f5a3294aad3284a7dbc229..36649b41f6cea62e2708b5a9ca343618252db0f1 100644 --- a/src/plugins/dna_graphpack/src/GCFramePlot.h +++ b/src/plugins/dna_graphpack/src/GCFramePlot.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_graphpack/src/KarlinSignatureDifferenceGraph.cpp b/src/plugins/dna_graphpack/src/KarlinSignatureDifferenceGraph.cpp index c1097c0ae93853c41838990dd42c91f428e10c71..77fafc6de7dcc96b18c3220729a3e378c9da7b18 100644 --- a/src/plugins/dna_graphpack/src/KarlinSignatureDifferenceGraph.cpp +++ b/src/plugins/dna_graphpack/src/KarlinSignatureDifferenceGraph.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_graphpack/src/KarlinSignatureDifferenceGraph.h b/src/plugins/dna_graphpack/src/KarlinSignatureDifferenceGraph.h index c5da6cde7997449c8a041945fe517ad737c26240..abd6c4d0be9d7a6f722471407a7c57637c0888eb 100644 --- a/src/plugins/dna_graphpack/src/KarlinSignatureDifferenceGraph.h +++ b/src/plugins/dna_graphpack/src/KarlinSignatureDifferenceGraph.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_stat/dna_stat.pri b/src/plugins/dna_stat/dna_stat.pri index 44d9b5c218195916dce28cdc59ea8d4dbbd4e382..260dee67add2a3a7757bca420cb7ca42088f19a7 100644 --- a/src/plugins/dna_stat/dna_stat.pri +++ b/src/plugins/dna_stat/dna_stat.pri @@ -6,5 +6,3 @@ PLUGIN_VENDOR=Unipro PLUGIN_MODE=ui include( ../../ugene_plugin_common.pri ) - -QT += webkitwidgets diff --git a/src/plugins/dna_stat/dna_stat.pro b/src/plugins/dna_stat/dna_stat.pro index 1c4fe61052e0aa563465e0b1ad7ae0ab0133b2fe..df8b0d0176b02d9fde700b7f1fd166ecd55989ba 100644 --- a/src/plugins/dna_stat/dna_stat.pro +++ b/src/plugins/dna_stat/dna_stat.pro @@ -4,13 +4,11 @@ include (dna_stat.pri) HEADERS += src/DistanceMatrixMSAProfileDialog.h \ src/DNAStatMSAProfileDialog.h \ src/DNAStatPlugin.h \ - src/DNAStatProfileTask.h \ - src/DNAStatsWindow.h + src/DNAStatProfileTask.h FORMS += src/DistanceMatrixMSAProfileDialog.ui \ src/DNAStatMSAProfileDialog.ui SOURCES += src/DistanceMatrixMSAProfileDialog.cpp \ src/DNAStatMSAProfileDialog.cpp \ src/DNAStatPlugin.cpp \ - src/DNAStatProfileTask.cpp \ - src/DNAStatsWindow.cpp + src/DNAStatProfileTask.cpp TRANSLATIONS += transl/russian.ts diff --git a/src/plugins/dna_stat/src/DNAStatMSAProfileDialog.cpp b/src/plugins/dna_stat/src/DNAStatMSAProfileDialog.cpp index 2154fa13e4d3036378bae6c7f920bf7fa272437f..3426d0ba7ff5468dc6d453241f69fe64bfdee2da 100644 --- a/src/plugins/dna_stat/src/DNAStatMSAProfileDialog.cpp +++ b/src/plugins/dna_stat/src/DNAStatMSAProfileDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -50,7 +50,7 @@ DNAStatMSAProfileDialog::DNAStatMSAProfileDialog(QWidget* p, MSAEditor* _c) ctx(_c), saveController(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22055957"); + new HelpButton(this, buttonBox, "24742492"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); initSaveController(); diff --git a/src/plugins/dna_stat/src/DNAStatMSAProfileDialog.h b/src/plugins/dna_stat/src/DNAStatMSAProfileDialog.h index f272018a091c306843d766fefdf7a57f8b43d055..34f543cb030889fd64a732f649fbf6b1f40dacc9 100644 --- a/src/plugins/dna_stat/src/DNAStatMSAProfileDialog.h +++ b/src/plugins/dna_stat/src/DNAStatMSAProfileDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_stat/src/DNAStatPlugin.cpp b/src/plugins/dna_stat/src/DNAStatPlugin.cpp index 0a08c08619b4d8b69278aa81ceb8b3d6bb4c96b7..4373a96b16a5258190c51d67d2f351ca35086348 100644 --- a/src/plugins/dna_stat/src/DNAStatPlugin.cpp +++ b/src/plugins/dna_stat/src/DNAStatPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -36,7 +36,6 @@ #include "DNAStatMSAProfileDialog.h" #include "DNAStatPlugin.h" -#include "DNAStatsWindow.h" #include "DistanceMatrixMSAProfileDialog.h" namespace U2 { diff --git a/src/plugins/dna_stat/src/DNAStatPlugin.h b/src/plugins/dna_stat/src/DNAStatPlugin.h index 7f101c6db390f3530f2d16b725ebb3f6a623fded..c442cb910edf3ef266df8ba3068cce81c4894e74 100644 --- a/src/plugins/dna_stat/src/DNAStatPlugin.h +++ b/src/plugins/dna_stat/src/DNAStatPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_stat/src/DNAStatProfileTask.cpp b/src/plugins/dna_stat/src/DNAStatProfileTask.cpp index a5b1f7cd99131018845aec9ab4ac16e00839886a..08d5bdfd5b9ab4e0b8547ebf11d614557a3ab560 100644 --- a/src/plugins/dna_stat/src/DNAStatProfileTask.cpp +++ b/src/plugins/dna_stat/src/DNAStatProfileTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_stat/src/DNAStatProfileTask.h b/src/plugins/dna_stat/src/DNAStatProfileTask.h index 4fd67f80caa687370a63af9ad73990744dfc45b7..f911559eba9e701a8d4300ec00f8f938df399eeb 100644 --- a/src/plugins/dna_stat/src/DNAStatProfileTask.h +++ b/src/plugins/dna_stat/src/DNAStatProfileTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_stat/src/DNAStatsWindow.cpp b/src/plugins/dna_stat/src/DNAStatsWindow.cpp deleted file mode 100644 index 1d93a5e53e4db0ba582236011e80c0d1f9c69ab2..0000000000000000000000000000000000000000 --- a/src/plugins/dna_stat/src/DNAStatsWindow.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/** - * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> - * http://ugene.net - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ -#include <U2Core/AppContext.h> -#include <U2Core/DNASequenceObject.h> -#include <U2View/ADVSequenceObjectContext.h> - -#include "DNAStatsWindow.h" -#include "DNAStatProfileTask.h" - -#include <QLabel> -#include <QHBoxLayout> -#include <QVBoxLayout> -#include <QDoubleSpinBox> -#include <QContextMenuEvent> - -namespace U2 { - -DNAStatsWindow::DNAStatsWindow(ADVSequenceObjectContext* context) -: MWMDIWindow(tr("Statistics for %1").arg(context->getSequenceObject()->getGObjectName())), - ctx(context), updateTask(NULL) -{ - QVBoxLayout* l = new QVBoxLayout(this); - l->setMargin(0); - setLayout(l); - - webView = new DNAStatsWebView(this); - webView->addAction(new QAction("New action!", this)); - webView->setObjectName("DNAStatWebView" + context->getSequenceObject()->getGObjectName()); - l->addWidget(webView); - connect(AppContext::getTaskScheduler(), SIGNAL(si_stateChanged(Task*)), SLOT(sl_onTaskStateChanged(Task*))); - - update(); -} - -void DNAStatsWindow::update() -{ - if (updateTask == NULL) { - updateTask = new DNAStatProfileTask(ctx); - AppContext::getTaskScheduler()->registerTopLevelTask(updateTask); - } - -} - -void DNAStatsWindow::sl_onTaskStateChanged( Task* task ) -{ - if (task == updateTask && task->getState() == Task::State_Finished) { - webView->setHtml(updateTask->getResult()); - updateTask = NULL; - } -} - - -void DNAStatsWebView::contextMenuEvent( QContextMenuEvent* event ) -{ - QMenu menu; - menu.addAction(new QAction("Settings", this)); - - menu.exec(event->globalPos()); -} - -} //namespace diff --git a/src/plugins/dna_stat/src/DistanceMatrixMSAProfileDialog.cpp b/src/plugins/dna_stat/src/DistanceMatrixMSAProfileDialog.cpp index bd7d7cb29b21988d69e58719131214ff21b65148..21c30d87ee91b85f0ec0cf9eacfa5af400858793 100644 --- a/src/plugins/dna_stat/src/DistanceMatrixMSAProfileDialog.cpp +++ b/src/plugins/dna_stat/src/DistanceMatrixMSAProfileDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -56,7 +56,7 @@ DistanceMatrixMSAProfileDialog::DistanceMatrixMSAProfileDialog(QWidget* p, MSAEd ctx(_c), saveController(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22055958"); + new HelpButton(this, buttonBox, "24742493"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Generate")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/dna_stat/src/DistanceMatrixMSAProfileDialog.h b/src/plugins/dna_stat/src/DistanceMatrixMSAProfileDialog.h index 389cad7d314545eb0e5d5a83a088ef9456fa1dff..3178d02bd7876c03d554c40084bc4be385545bf6 100644 --- a/src/plugins/dna_stat/src/DistanceMatrixMSAProfileDialog.h +++ b/src/plugins/dna_stat/src/DistanceMatrixMSAProfileDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dna_stat/transl/russian.ts b/src/plugins/dna_stat/transl/russian.ts index f7937799b351ce642f0f49f1e12db75eadeeea0a..b3ed0a36fbf65466764582b93128989512aae8fc 100644 --- a/src/plugins/dna_stat/transl/russian.ts +++ b/src/plugins/dna_stat/transl/russian.ts @@ -155,7 +155,7 @@ <translation type="vanished">ПредÑтавить выравнивание в виде таблицы чаÑтот</translation> </message> <message> - <location filename="../src/DNAStatPlugin.cpp" line="71"/> + <location filename="../src/DNAStatPlugin.cpp" line="70"/> <source>Generate grid profile...</source> <translation>ПредÑтавить выравнивание в виде таблицы чаÑтот...</translation> </message> @@ -287,12 +287,12 @@ <context> <name>U2::DNAStatPlugin</name> <message> - <location filename="../src/DNAStatPlugin.cpp" line="52"/> + <location filename="../src/DNAStatPlugin.cpp" line="51"/> <source>DNA Statistics</source> <translation>ДÐК ÑтатиÑтика</translation> </message> <message> - <location filename="../src/DNAStatPlugin.cpp" line="52"/> + <location filename="../src/DNAStatPlugin.cpp" line="51"/> <source>Provides statistical reports for sequences and alignments</source> <translation>Ðабор ÑтатиÑтичеÑких отчетов</translation> </message> @@ -378,9 +378,8 @@ <context> <name>U2::DNAStatsWindow</name> <message> - <location filename="../src/DNAStatsWindow.cpp" line="37"/> <source>Statistics for %1</source> - <translation>СтатиÑтика Ð´Ð»Ñ %1</translation> + <translation type="vanished">СтатиÑтика Ð´Ð»Ñ %1</translation> </message> </context> <context> @@ -390,7 +389,7 @@ <translation type="vanished">РаÑÑчитать матрицу раÑÑтоÑний</translation> </message> <message> - <location filename="../src/DNAStatPlugin.cpp" line="108"/> + <location filename="../src/DNAStatPlugin.cpp" line="107"/> <source>Generate distance matrix...</source> <translation>РаÑÑчитать матрицу раÑÑтоÑний...</translation> </message> diff --git a/src/plugins/dotplot/src/DotPlotClasses.cpp b/src/plugins/dotplot/src/DotPlotClasses.cpp index ec721b42aa982369f772361ec281db05d2e90790..29d4a939e013e36a6aa3978bc24ccc03c300d475 100644 --- a/src/plugins/dotplot/src/DotPlotClasses.cpp +++ b/src/plugins/dotplot/src/DotPlotClasses.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dotplot/src/DotPlotClasses.h b/src/plugins/dotplot/src/DotPlotClasses.h index 3448fa888b4899752317fbbe6fbc142cc88f8a60..eeef6d8e877a4bbd54a818419296b0e6fed99fec 100644 --- a/src/plugins/dotplot/src/DotPlotClasses.h +++ b/src/plugins/dotplot/src/DotPlotClasses.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dotplot/src/DotPlotDialog.cpp b/src/plugins/dotplot/src/DotPlotDialog.cpp index 0bd96ad9abd462945a90503756d5e23aa5e8fb20..5e2f13cf641928b54583fc97535263df3b2abb77 100644 --- a/src/plugins/dotplot/src/DotPlotDialog.cpp +++ b/src/plugins/dotplot/src/DotPlotDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -55,7 +55,7 @@ DotPlotDialog::DotPlotDialog(QWidget *parent, AnnotatedDNAView* currentADV, int { setupUi(this); - new HelpButton(this, buttonBox, "22055895"); + new HelpButton(this, buttonBox, "24742430"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/dotplot/src/DotPlotDialog.h b/src/plugins/dotplot/src/DotPlotDialog.h index 88ea415459b64c523bba0a3c092ede05240f6653..feb580c1246c7defc66f62e533f4294e291b98df 100644 --- a/src/plugins/dotplot/src/DotPlotDialog.h +++ b/src/plugins/dotplot/src/DotPlotDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dotplot/src/DotPlotFilesDialog.cpp b/src/plugins/dotplot/src/DotPlotFilesDialog.cpp index 0d2096c06673f7e5c5257ab3eb538c09a64069f7..62a28ce2ab72b671ac44255b0f7bf799b1f77b41 100644 --- a/src/plugins/dotplot/src/DotPlotFilesDialog.cpp +++ b/src/plugins/dotplot/src/DotPlotFilesDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -40,7 +40,7 @@ DotPlotFilesDialog::DotPlotFilesDialog(QWidget *parent) : QDialog(parent) { setupUi(this); - new HelpButton(this, buttonBox, "22055895"); + new HelpButton(this, buttonBox, "24742430"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Next")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/dotplot/src/DotPlotFilesDialog.h b/src/plugins/dotplot/src/DotPlotFilesDialog.h index 9a6858d8ea51d07f74ba259eb04655753fd499b4..9ece616405b3ff4f83b3c34383d07ae27b0916bd 100644 --- a/src/plugins/dotplot/src/DotPlotFilesDialog.h +++ b/src/plugins/dotplot/src/DotPlotFilesDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dotplot/src/DotPlotFilterDialog.cpp b/src/plugins/dotplot/src/DotPlotFilterDialog.cpp index a32727aa4f06f260e2c14b9be57779c7d5bd741e..30dfbc548b66ebadb5d659771f6cc17903bc20e9 100644 --- a/src/plugins/dotplot/src/DotPlotFilterDialog.cpp +++ b/src/plugins/dotplot/src/DotPlotFilterDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -48,7 +48,7 @@ DotPlotFilterDialog::DotPlotFilterDialog(QWidget *parent, ADVSequenceObjectConte ,seqYItem(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22055905"); + new HelpButton(this, buttonBox, "24742440"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/dotplot/src/DotPlotFilterDialog.h b/src/plugins/dotplot/src/DotPlotFilterDialog.h index e20b6e516ecbaebf2cc3b456f3dd401178c70196..7f6a4b8f07dff610da983f2d045efd52a47ab8bf 100644 --- a/src/plugins/dotplot/src/DotPlotFilterDialog.h +++ b/src/plugins/dotplot/src/DotPlotFilterDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dotplot/src/DotPlotImageExportTask.cpp b/src/plugins/dotplot/src/DotPlotImageExportTask.cpp index b1853ad982f94b7a460c5f6968d163b84a21984e..02a645b45c798aabd250152d6c86066346c9dd4c 100644 --- a/src/plugins/dotplot/src/DotPlotImageExportTask.cpp +++ b/src/plugins/dotplot/src/DotPlotImageExportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -45,7 +45,7 @@ void DotPlotImageExportToBitmapTask::run() { tmp.fill(Qt::white); defaultDpm = tmp.dotsPerMeterX(); } - SAFE_POINT(dpm != 0, tr("Incorrect DPI paramter"), ); + SAFE_POINT(dpm != 0, tr("Incorrect DPI parameter"), ); float fontScale = (float)defaultDpm / dpm; dotplotWidget->drawAll(painter, settings.imageSize, fontScale, dpExportSettings); diff --git a/src/plugins/dotplot/src/DotPlotImageExportTask.h b/src/plugins/dotplot/src/DotPlotImageExportTask.h index d5d3c552cb61321b36e9cb27e14b5dea0bf7c8fc..f41095db689f14514f9af8cbbe41ffe9590770f1 100644 --- a/src/plugins/dotplot/src/DotPlotImageExportTask.h +++ b/src/plugins/dotplot/src/DotPlotImageExportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dotplot/src/DotPlotPlugin.cpp b/src/plugins/dotplot/src/DotPlotPlugin.cpp index 0dc19faedf0bebd38bb06f5965b198fed68214a4..764da61721e28c3a4cfb960ffc43b30f46616e2d 100644 --- a/src/plugins/dotplot/src/DotPlotPlugin.cpp +++ b/src/plugins/dotplot/src/DotPlotPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dotplot/src/DotPlotPlugin.h b/src/plugins/dotplot/src/DotPlotPlugin.h index 6833038142e01f73963f04c33741f3ca0a31212d..c882f172706fa04a3a79a6c9a5b9fb25f01e4ef3 100644 --- a/src/plugins/dotplot/src/DotPlotPlugin.h +++ b/src/plugins/dotplot/src/DotPlotPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dotplot/src/DotPlotSplitter.cpp b/src/plugins/dotplot/src/DotPlotSplitter.cpp index 28ced89784cc17964f132fabefed907c96058762..4904ed43bd8c08c83e7c28489d2781042e1eb04e 100644 --- a/src/plugins/dotplot/src/DotPlotSplitter.cpp +++ b/src/plugins/dotplot/src/DotPlotSplitter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -306,11 +306,8 @@ void DotPlotSplitter::sl_dotPlotChanged(ADVSequenceObjectContext* sequenceX, ADV } void DotPlotSplitter::sl_dotPlotSelecting() { - bool selecting = false; foreach (DotPlotWidget* w, dotPlotList) { - selecting = w->hasSelection(); - - if (selecting) { + if (w->hasSelection()) { break; } } diff --git a/src/plugins/dotplot/src/DotPlotSplitter.h b/src/plugins/dotplot/src/DotPlotSplitter.h index eb52f6d5be5ca0c1f1c4c4388f5110fc6b6227cc..1885cfd7f01cb6997fb493417e997db8768f3544 100644 --- a/src/plugins/dotplot/src/DotPlotSplitter.h +++ b/src/plugins/dotplot/src/DotPlotSplitter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dotplot/src/DotPlotTasks.cpp b/src/plugins/dotplot/src/DotPlotTasks.cpp index 15fe8a9351326771ddde226591d2697160d655f6..257d2cce94a7fef065f2da604aed9e167c17118e 100644 --- a/src/plugins/dotplot/src/DotPlotTasks.cpp +++ b/src/plugins/dotplot/src/DotPlotTasks.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dotplot/src/DotPlotTasks.h b/src/plugins/dotplot/src/DotPlotTasks.h index 5576cf3284d1b8ceabe063873b1f60422ab95653..d4fa54f30d9e32c4a27c270848e99dd24f8fc6a7 100644 --- a/src/plugins/dotplot/src/DotPlotTasks.h +++ b/src/plugins/dotplot/src/DotPlotTasks.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dotplot/src/DotPlotWidget.cpp b/src/plugins/dotplot/src/DotPlotWidget.cpp index e21d794cc836af0021bf40b814582cb819db3f0e..15a20b0248b7722e6185892f5bccb7100b0c5c77 100644 --- a/src/plugins/dotplot/src/DotPlotWidget.cpp +++ b/src/plugins/dotplot/src/DotPlotWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -41,6 +41,7 @@ #include <U2Core/U2OpStatusUtils.h> #include <U2Core/U2SafePoints.h> #include <U2Core/GUrlUtils.h> +#include <U2Core/AppResources.h> #include <U2Gui/DialogUtils.h> #include <U2Gui/ExportImageDialog.h> @@ -428,8 +429,8 @@ void DotPlotWidget::cancelRepeatFinderTask() { MultiTask *mTask = qobject_cast<MultiTask*>(dotPlotTask); if (mTask) { mTask->cancel(); - foreach(Task *t, mTask->getSubtasks()) { - factory->setRFResultsListener(t, NULL); + foreach(const QPointer<Task> &t, mTask->getSubtasks()) { + factory->setRFResultsListener(t.data(), NULL); } } } @@ -650,6 +651,11 @@ bool DotPlotWidget::sl_showLoadFileDialog() { return true; } +// This is maximum sequence size (X+Y) we allow to use with dot plots +// W is 100% match algorithm, it uses less memory that WK which is a <100% algorithm and requires more memory. +#define MAX_DOT_PLOT_W_SUM_SEQUENCE_LENGTH_32_BIT_OS (600 * 1000 * 1000) +#define MAX_DOT_PLOT_WK_SUM_SEQUENCE_LENGTH_32_BIT_OS (200 * 1000 * 1000) + // creating new dotplot or changing settings bool DotPlotWidget::sl_showSettingsDialog(bool disableLoad) { @@ -680,6 +686,16 @@ bool DotPlotWidget::sl_showSettingsDialog(bool disableLoad) { sequenceX = d->getXSeq(); sequenceY = d->getYSeq(); + if (AppResourcePool::is32BitBuild()) { + quint64 sumSeqLen = sequenceX->getSequenceLength() + sequenceY->getSequenceLength(); + bool wkMode = identity < 100; + if ((wkMode && sumSeqLen > MAX_DOT_PLOT_WK_SUM_SEQUENCE_LENGTH_32_BIT_OS)|| + (!wkMode && sumSeqLen > MAX_DOT_PLOT_W_SUM_SEQUENCE_LENGTH_32_BIT_OS)) { + QMessageBox::warning(this, L10N::warningTitle(), tr("Sequence size is too large!")); + return false; + } + } + if (res){ resetZooming(); } @@ -1054,7 +1070,7 @@ void DotPlotWidget::drawNames(QPainter &p) const { // If nameX doesn't fit, it should be aligned left instead of center int flags = (nameXWidth < w) ? Qt::AlignCenter : Qt::AlignVCenter | Qt::AlignLeft; - p.drawText(textSpace, h + textSpace, w, textSpace, Qt::AlignCenter, nameX); + p.drawText(textSpace, h + textSpace, w, textSpace, flags, nameX); p.save(); diff --git a/src/plugins/dotplot/src/DotPlotWidget.h b/src/plugins/dotplot/src/DotPlotWidget.h index c726498119c35718cae940bc4cbbe84510c83f6d..b661a70f10457127fd079846189b709b73404f99 100644 --- a/src/plugins/dotplot/src/DotPlotWidget.h +++ b/src/plugins/dotplot/src/DotPlotWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/dotplot/transl/russian.ts b/src/plugins/dotplot/transl/russian.ts index b86448f5c03c6f0cb1ec62605a3c73a9acecf558..d3eb7b5221649e1bd9ef7c09be4ed5cbfa6a072a 100644 --- a/src/plugins/dotplot/transl/russian.ts +++ b/src/plugins/dotplot/transl/russian.ts @@ -261,17 +261,17 @@ <translation>Диагональный</translation> </message> <message> - <location filename="../src/DotPlotDialog.cpp" line="286"/> + <location filename="../src/DotPlotDialog.cpp" line="291"/> <source>Open file</source> <translation>Открыть файл</translation> </message> <message> - <location filename="../src/DotPlotDialog.cpp" line="318"/> + <location filename="../src/DotPlotDialog.cpp" line="323"/> <source>Error</source> <translation>Ошибка</translation> </message> <message> - <location filename="../src/DotPlotDialog.cpp" line="318"/> + <location filename="../src/DotPlotDialog.cpp" line="323"/> <source>Error opening files</source> <translation>Ошибка Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²</translation> </message> @@ -393,8 +393,8 @@ <name>U2::DotPlotImageExportToBitmapTask</name> <message> <location filename="../src/DotPlotImageExportTask.cpp" line="48"/> - <source>Incorrect DPI paramter</source> - <translation>Incorrect DPI paramter</translation> + <source>Incorrect DPI parameter</source> + <translation>Incorrect DPI parameter</translation> </message> </context> <context> @@ -500,165 +500,170 @@ <context> <name>U2::DotPlotWidget</name> <message> - <location filename="../src/DotPlotWidget.cpp" line="120"/> + <location filename="../src/DotPlotWidget.cpp" line="121"/> <source>Parameters</source> <translation>Параметры</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="123"/> + <location filename="../src/DotPlotWidget.cpp" line="124"/> <source>Save as image</source> <translation>Сохранить как изображение</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="127"/> + <location filename="../src/DotPlotWidget.cpp" line="128"/> <source>Save</source> <translation>Сохранить</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="131"/> + <location filename="../src/DotPlotWidget.cpp" line="132"/> <source>Load</source> <translation>Загрузить</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="134"/> + <location filename="../src/DotPlotWidget.cpp" line="135"/> <source>Remove</source> <translation>Удалить</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="138"/> + <location filename="../src/DotPlotWidget.cpp" line="139"/> <source>Filter Results</source> <translation>Ð¤Ð¸Ð»ÑŒÑ‚Ñ€Ð°Ñ†Ð¸Ñ Ñ€ÐµÐ·ÑƒÐ»ÑŒÑ‚Ð°Ñ‚Ð¾Ð²</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="212"/> + <location filename="../src/DotPlotWidget.cpp" line="213"/> <source>Save/Load</source> <translation>Сохранить/Загрузить</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="394"/> + <location filename="../src/DotPlotWidget.cpp" line="395"/> <source>Too many results</source> <translation>Слишком много результатов</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="394"/> + <location filename="../src/DotPlotWidget.cpp" line="395"/> <source>Too many results. Try to increase minimum repeat length</source> <translation>Слишком много результатов. Попробуйте уменьшить минимальную длину повтора</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="549"/> - <location filename="../src/DotPlotWidget.cpp" line="609"/> + <location filename="../src/DotPlotWidget.cpp" line="550"/> + <location filename="../src/DotPlotWidget.cpp" line="610"/> <source>File opening error</source> <translation>Ошибка Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð°</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="549"/> - <location filename="../src/DotPlotWidget.cpp" line="609"/> + <location filename="../src/DotPlotWidget.cpp" line="550"/> + <location filename="../src/DotPlotWidget.cpp" line="610"/> <source>Error opening file %1</source> <translation>Ошибка Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð° %1</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="557"/> - <location filename="../src/DotPlotWidget.cpp" line="590"/> - <location filename="../src/DotPlotWidget.cpp" line="657"/> + <location filename="../src/DotPlotWidget.cpp" line="558"/> + <location filename="../src/DotPlotWidget.cpp" line="591"/> + <location filename="../src/DotPlotWidget.cpp" line="663"/> <source>Task is already running</source> <translation>Задача уже запущена</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="557"/> - <location filename="../src/DotPlotWidget.cpp" line="590"/> - <location filename="../src/DotPlotWidget.cpp" line="657"/> + <location filename="../src/DotPlotWidget.cpp" line="558"/> + <location filename="../src/DotPlotWidget.cpp" line="591"/> + <location filename="../src/DotPlotWidget.cpp" line="663"/> <source>Build or Load DotPlot task is already running</source> <translation>Задача поÑÑ‚Ñ€Ð¾ÐµÐ½Ð¸Ñ Ð¸Ð»Ð¸ загрузки dotplot уже запущена</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="613"/> + <location filename="../src/DotPlotWidget.cpp" line="614"/> <source>Sequences are different</source> <translation>ПоÑледовательноÑти отличаютÑÑ</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="613"/> + <location filename="../src/DotPlotWidget.cpp" line="614"/> <source>Current and loading sequences are different. Continue loading dot-plot anyway?</source> <translation>Ð¢ÐµÐºÑƒÑ‰Ð°Ñ Ð¸ Ð·Ð°Ð³Ñ€ÑƒÐ¶Ð°ÐµÐ¼Ð°Ñ Ð¿Ð¾ÑледовательноÑÑ‚ÑŒ различаютÑÑ. Продолжить загрузку?</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="712"/> - <location filename="../src/DotPlotWidget.cpp" line="717"/> + <location filename="../src/DotPlotWidget.cpp" line="694"/> + <source>Sequence size is too large!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/DotPlotWidget.cpp" line="728"/> + <location filename="../src/DotPlotWidget.cpp" line="733"/> <source>Invalid sequence</source> <translation>ÐÐµÐºÐ¾Ñ€Ñ€ÐµÐºÑ‚Ð½Ð°Ñ Ð¿Ð¾ÑледовательноÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="712"/> + <location filename="../src/DotPlotWidget.cpp" line="728"/> <source>First selected sequence is invalid</source> <translation>ÐŸÐµÑ€Ð²Ð°Ñ Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð½Ð°Ñ Ð¿Ð¾ÑледовательноÑÑ‚ÑŒ некорректна</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="717"/> + <location filename="../src/DotPlotWidget.cpp" line="733"/> <source>Second selected sequence is invalid</source> <translation>Ð’Ñ‚Ð¾Ñ€Ð°Ñ Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð½Ð°Ñ Ð¿Ð¾ÑледовательноÑÑ‚ÑŒ некорректна</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="727"/> + <location filename="../src/DotPlotWidget.cpp" line="743"/> <source>Wrong alphabet types</source> <translation>Ðеправильные типы алфавитов</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="727"/> + <location filename="../src/DotPlotWidget.cpp" line="743"/> <source>Both sequence must have the same alphabet</source> <translation>Обе поÑледовательноÑти должны иметь одинаковый алфавит</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="806"/> + <location filename="../src/DotPlotWidget.cpp" line="822"/> <source>Save dot-plot</source> <translation>Сохранить dotplot</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="806"/> + <location filename="../src/DotPlotWidget.cpp" line="822"/> <source>Save dot-plot data before closing?</source> <translation>Сохранить данные dotplot перед закрытием?</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="952"/> + <location filename="../src/DotPlotWidget.cpp" line="968"/> <source>Invalid weight and height parameters!</source> <translation>Ðекорректные параметры!</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="1004"/> + <location filename="../src/DotPlotWidget.cpp" line="1020"/> <source>Dotplot is calculating...</source> <translation>ВыполнÑетÑÑ Ñ€Ð°Ñчёт...</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="1052"/> + <location filename="../src/DotPlotWidget.cpp" line="1068"/> <source> (min length %1, identity %2%)</source> <translation>(мин. длина %1, идентичноÑÑ‚ÑŒ %2%)</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="210"/> + <location filename="../src/DotPlotWidget.cpp" line="211"/> <source>Dotplot</source> <translation>Dotplot</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="534"/> + <location filename="../src/DotPlotWidget.cpp" line="535"/> <source>Error Saving Dotplot</source> <translation>Ошибка ÑохранениÑ</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="534"/> + <location filename="../src/DotPlotWidget.cpp" line="535"/> <source>The dotplot can't be saved as it is empty.</source> <translation>Дотплот не может быть Ñохранён, Ñ‚.к. он пуÑÑ‚.</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="538"/> + <location filename="../src/DotPlotWidget.cpp" line="539"/> <source>Save Dotplot</source> <translation>Сохранить dotplot</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="538"/> - <location filename="../src/DotPlotWidget.cpp" line="583"/> + <location filename="../src/DotPlotWidget.cpp" line="539"/> + <location filename="../src/DotPlotWidget.cpp" line="584"/> <source>Dotplot files (*.dpt)</source> <translation>Файлы dotplot (*.dpt)</translation> </message> <message> - <location filename="../src/DotPlotWidget.cpp" line="583"/> + <location filename="../src/DotPlotWidget.cpp" line="584"/> <source>Load Dotplot</source> <translation>Загрузить dotplot</translation> </message> diff --git a/src/plugins/enzymes/src/CloningUtilTasks.cpp b/src/plugins/enzymes/src/CloningUtilTasks.cpp index dfb4dca38789d387896c278e551901d76f97500a..89b27e552d02675d0b7fae55756ca61c26528198 100644 --- a/src/plugins/enzymes/src/CloningUtilTasks.cpp +++ b/src/plugins/enzymes/src/CloningUtilTasks.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -63,7 +63,7 @@ DigestSequenceTask::DigestSequenceTask(U2SequenceObject* so, AnnotationTableObje SAFE_POINT_EXT(sourceObj != NULL, setError(L10N::nullPointerError("source object")), ); SAFE_POINT_EXT(destObj != NULL, setError(L10N::nullPointerError("destination object")), ); SAFE_POINT_EXT(dnaObj != NULL, setError(L10N::nullPointerError("sequence object")), ); - isCircular = dnaObj->isCircular() || cfg.forceCircular; + isCircular = cfg.forceCircular; } void DigestSequenceTask::prepare() { @@ -81,11 +81,27 @@ void DigestSequenceTask::prepare() { SharedAnnotationData DigestSequenceTask::createFragment(int pos1, const DNAFragmentTerm& leftTerm, int pos2, const DNAFragmentTerm& rightTerm) { SharedAnnotationData ad(new AnnotationData); - if (pos1 < pos2) { - ad->location->regions.append(U2Region(pos1, pos2 - pos1)); + if (pos1 < pos2) { + U2Region reg(pos1, pos2 - pos1); + assert(reg.length > 0); + + ad->location->regions.append(reg); } else { - ad->location->regions.append(U2Region(pos1, seqRange.endPos() - pos1)); - ad->location->regions.append(U2Region(seqRange.startPos, pos2 - seqRange.startPos)); + U2Region reg1(pos1, seqRange.endPos() - pos1); + if (pos2 < 0) { + reg1.length += pos2; + pos2 = 0; + } + U2Region reg2(seqRange.startPos, pos2 - seqRange.startPos); + assert(reg1.length >= 0 && reg2.length >= 0); + assert(!reg1.isEmpty() || !reg2.isEmpty()); + + if (!reg1.isEmpty()){ + ad->location->regions.append(reg1); + } + if (!reg2.isEmpty()) { + ad->location->regions.append(reg2); + } } ad->qualifiers.append(U2Qualifier(QUALIFIER_LEFT_TERM, leftTerm.enzymeId)); @@ -222,9 +238,9 @@ void DigestSequenceTask::run() bool leftStrandDirect = prev.key().directStrand; int leftCutDirect = leftStrandDirect ? enzyme1->cutDirect : len1 - enzyme1->cutDirect; int leftCutCompl = leftStrandDirect ? len1 - enzyme1->cutComplement : enzyme1->cutComplement; - int leftCutPos = pos1 + qMax(leftCutDirect, leftCutCompl); - int leftOverhangStart = pos1 + qMin(leftCutDirect, leftCutCompl); - leftTerm.overhang = dnaObj->getSequenceData(U2Region(leftOverhangStart, leftCutPos - leftOverhangStart)); + int leftCutPos = correctPos(pos1 + qMax(leftCutDirect, leftCutCompl)); + int leftOverhangStart = correctPos(pos1 + qMin(leftCutDirect, leftCutCompl)); + leftTerm.overhang = getOverhang(U2Region(leftOverhangStart, leftCutPos - leftOverhangStart)); leftTerm.enzymeId = enzyme1->id.toLatin1(); leftTerm.isDirect = leftStrandDirect ? leftCutDirect < leftCutCompl : leftCutDirect > leftCutCompl; @@ -232,14 +248,14 @@ void DigestSequenceTask::run() bool rightStrandDirect = current.key().directStrand; int rightCutDirect = rightStrandDirect ? enzyme2->cutDirect : len2 - enzyme2->cutDirect; int rightCutCompl = rightStrandDirect ? len2 - enzyme2->cutComplement : enzyme2->cutComplement; - int rightCutPos = pos2 + qMin(rightCutDirect, rightCutCompl); - int rightOverhangStart = pos2 + qMax(rightCutDirect, rightCutCompl); - rightTerm.overhang = dnaObj->getSequenceData(U2Region(rightCutPos, rightOverhangStart - rightCutPos)); + int rightCutPos = correctPos(pos2 + qMin(rightCutDirect, rightCutCompl)); + int rightOverhangStart = correctPos(pos2 + qMax(rightCutDirect, rightCutCompl)); + rightTerm.overhang = getOverhang(U2Region(rightCutPos, rightOverhangStart - rightCutPos)); rightTerm.enzymeId = enzyme2->id.toLatin1(); rightTerm.isDirect = rightStrandDirect ? rightCutDirect > rightCutCompl : rightCutDirect < rightCutCompl; if (rightOverhangStart > seqLen) { int leftCutPos = rightOverhangStart - seqLen; - rightTerm.overhang += dnaObj->getSequenceData(U2Region(0, leftCutPos)); + rightTerm.overhang += getOverhang(U2Region(0, leftCutPos)); } SharedAnnotationData ad = createFragment(leftCutPos, leftTerm, rightCutPos, rightTerm); results.append(ad); @@ -255,45 +271,50 @@ void DigestSequenceTask::run() bool fcStrandDirect = first.key().directStrand; int fcDirectStrandCut = fcStrandDirect ? firstCutter->cutDirect : fcLen - firstCutter->cutDirect; int fcComplementStrandCut = fcStrandDirect ? fcLen - firstCutter->cutComplement : firstCutter->cutComplement; - int firstCutPos = first.key().coord + qMin(fcDirectStrandCut, fcComplementStrandCut); - int rightOverhangStart = first.key().coord + qMax(fcDirectStrandCut, fcComplementStrandCut); + int firstCutPos = correctPos(first.key().coord + qMin(fcDirectStrandCut, fcComplementStrandCut)); + int rightOverhangStart = correctPos(first.key().coord + qMax(fcDirectStrandCut, fcComplementStrandCut)); bool rightOverhangIsDirect = fcStrandDirect ? fcDirectStrandCut > fcComplementStrandCut : fcDirectStrandCut < fcComplementStrandCut; - QByteArray firstRightOverhang = dnaObj->getSequenceData(U2Region(firstCutPos, rightOverhangStart - firstCutPos)); + QByteArray firstRightOverhang = getOverhang(U2Region(firstCutPos, rightOverhangStart - firstCutPos)); const SEnzymeData& lastCutter = prev.value(); int lcLen = lastCutter->seq.length(); bool lcStrandDirect = prev.key().directStrand; int lcDirectStrandCut = lcStrandDirect ? lastCutter->cutDirect : lcLen - lastCutter->cutDirect; int lcComplementStrandCut = lcStrandDirect ? lcLen - lastCutter->cutComplement : lastCutter->cutComplement; - int lastCutPos = prev.key().coord + qMax(lcDirectStrandCut, lcComplementStrandCut); - int leftOverhangStart = prev.key().coord + qMin(lcDirectStrandCut, lcComplementStrandCut); + int lastCutPos = correctPos(prev.key().coord + qMax(lcDirectStrandCut, lcComplementStrandCut)); + int leftOverhangStart = correctPos(prev.key().coord + qMin(lcDirectStrandCut, lcComplementStrandCut)); bool leftOverhangIsDirect = lcStrandDirect ? lcDirectStrandCut < lcComplementStrandCut : lcDirectStrandCut > lcComplementStrandCut; - if (lastCutPos >= seqLen) { + if (lastCutPos > seqLen) { // last restriction site is situated between sequence start and end assert(isCircular); int leftCutPos = lastCutPos - seqLen; - QByteArray leftOverhang = dnaObj->getSequenceData(U2Region(leftOverhangStart, seqLen - leftOverhangStart)) - + dnaObj->getSequenceData(U2Region(0, leftCutPos)); + QByteArray leftOverhang = getOverhang(U2Region(leftOverhangStart, seqLen - leftOverhangStart)) + + getOverhang(U2Region(0, leftCutPos)); QByteArray rightOverhang = first == prev ? leftOverhang : firstRightOverhang; SharedAnnotationData ad1 = createFragment(leftCutPos, DNAFragmentTerm(lastCutter->id, leftOverhang, leftOverhangIsDirect), firstCutPos, DNAFragmentTerm(firstCutter->id, rightOverhang, rightOverhangIsDirect)); results.append(ad1); } else { - QByteArray lastLeftOverhang = dnaObj->getSequenceData(U2Region(leftOverhangStart, lastCutPos - leftOverhangStart)); + QByteArray lastLeftOverhang = getOverhang(U2Region(leftOverhangStart, lastCutPos - leftOverhangStart)); if (isCircular) { SharedAnnotationData ad = createFragment(lastCutPos, DNAFragmentTerm(lastCutter->id, lastLeftOverhang, leftOverhangIsDirect), firstCutPos, DNAFragmentTerm(firstCutter->id, firstRightOverhang,rightOverhangIsDirect)); + results.append(ad); } else { - SharedAnnotationData ad1 = createFragment(seqRange.startPos, DNAFragmentTerm(), - firstCutPos, DNAFragmentTerm(firstCutter->id, firstRightOverhang, rightOverhangIsDirect)); - SharedAnnotationData ad2 = createFragment(lastCutPos, DNAFragmentTerm(lastCutter->id, lastLeftOverhang, leftOverhangIsDirect), - seqRange.endPos(), DNAFragmentTerm()); - results.append(ad1); - results.append(ad2); + if (firstCutPos != 0) { + SharedAnnotationData ad1 = createFragment(seqRange.startPos, DNAFragmentTerm(), + firstCutPos, DNAFragmentTerm(firstCutter->id, firstRightOverhang, rightOverhangIsDirect)); + results.append(ad1); + } + if (lastCutPos != dnaObj->getSequenceLength()) { + SharedAnnotationData ad2 = createFragment(lastCutPos, DNAFragmentTerm(lastCutter->id, lastLeftOverhang, leftOverhangIsDirect), + seqRange.endPos(), DNAFragmentTerm()); + results.append(ad2); + } } } qSort(results.begin(), results.end(), compareAnnotationsbyLength); @@ -360,6 +381,26 @@ void DigestSequenceTask::checkForConservedAnnotations() } } +qint64 DigestSequenceTask::correctPos(const qint64 pos) const { + qint64 res = pos; + if (!isCircular) { + res = qBound<qint64>(0, pos, dnaObj->getSequenceLength()); + } + return res; +} + +QByteArray DigestSequenceTask::getOverhang(const U2Region& region) const { + QByteArray result; + if (region.startPos < 0 && isCircular) { + result = dnaObj->getSequenceData(U2Region(dnaObj->getSequenceLength() + region.startPos, qAbs(region.startPos))); + result += dnaObj->getSequenceData(U2Region(0, region.length + region.startPos)); + } else { + result = dnaObj->getSequenceData(region); + } + + return result; +} + ////////////////////////////////////////////////////////////////////////// LigateFragmentsTask::LigateFragmentsTask(const QList<DNAFragment>& fragments, const LigateFragmentsTaskConfig& config) @@ -420,6 +461,13 @@ void LigateFragmentsTask::prepare() DNAFragment prevFragment; assert(prevFragment.isEmpty()); + + if (!cfg.makeCircular && cfg.checkOverhangs) { + const DNAFragment& first = fragmentList.first(); + QByteArray leftOverhangAddition = first.getLeftTerminus().overhang; + resultSeq.append(leftOverhangAddition); + } + foreach (const DNAFragment& dnaFragment, fragmentList) { QVector<U2Region> location = dnaFragment.getFragmentRegions(); @@ -467,15 +515,21 @@ void LigateFragmentsTask::prepare() CHECK_OP(stateInfo, ); } - if (cfg.makeCircular && cfg.checkOverhangs) { - const DNAFragment& first = fragmentList.first(); - const DNAFragment& last = fragmentList.last(); - QByteArray overhangAddition; - processOverhangs(last, first, overhangAddition); - if (stateInfo.hasError()) { - return; + if (cfg.checkOverhangs) { + if (cfg.makeCircular) { + const DNAFragment& first = fragmentList.first(); + const DNAFragment& last = fragmentList.last(); + QByteArray overhangAddition; + processOverhangs(last, first, overhangAddition); + if (stateInfo.hasError()) { + return; + } + resultSeq.append(overhangAddition); + } else { + const DNAFragment& last = fragmentList.last(); + QByteArray rightOverhangAddition = last.getRightTerminus().overhang; + resultSeq.append(rightOverhangAddition); } - resultSeq.append(overhangAddition); } // create comment @@ -568,8 +622,7 @@ static bool fragmentContainsRegion(const DNAFragment& fragment, const U2Region r return result; } -static int getRelativeStartPos(const DNAFragment& fragment, const U2Region region) -{ +static int getRelativeStartPos(const DNAFragment& fragment, const U2Region region) { QVector<U2Region> fragmentRegions = fragment.getFragmentRegions(); int offset = 0; diff --git a/src/plugins/enzymes/src/CloningUtilTasks.h b/src/plugins/enzymes/src/CloningUtilTasks.h index 0630d3540619bbda1f5b002e5f9dd8bc643a5596..5edef2ca63daca8acc7dec616a49276d3b40fd1a 100644 --- a/src/plugins/enzymes/src/CloningUtilTasks.h +++ b/src/plugins/enzymes/src/CloningUtilTasks.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -75,6 +75,8 @@ private: void saveResults(); SharedAnnotationData createFragment(int pos1, const DNAFragmentTerm& leftTerm, int pos2, const DNAFragmentTerm& rightTerm); void checkForConservedAnnotations(); + qint64 correctPos(const qint64 pos) const; + QByteArray getOverhang(const U2Region& region) const; bool isCircular; U2Region seqRange; AnnotationTableObject *sourceObj, *destObj; diff --git a/src/plugins/enzymes/src/ConstructMoleculeDialog.cpp b/src/plugins/enzymes/src/ConstructMoleculeDialog.cpp index f3b5117080719fb51ebf535aacc8bf7213b25691..3fcf5e8ca09b7186a3bd3701b0059639aa1e4235 100644 --- a/src/plugins/enzymes/src/ConstructMoleculeDialog.cpp +++ b/src/plugins/enzymes/src/ConstructMoleculeDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,10 +23,12 @@ #include <QScopedPointer> #include <U2Core/AppContext.h> +#include <U2Core/AppResources.h> #include <U2Core/BaseDocumentFormats.h> #include <U2Core/DNASequenceObject.h> #include <U2Core/DocumentUtils.h> #include <U2Core/GUrlUtils.h> +#include <U2Core/L10n.h> #include <U2Core/QObjectScopedPointer.h> #include <U2Core/U2SafePoints.h> @@ -40,6 +42,10 @@ #include "CreateFragmentDialog.h" #include "EditFragmentDialog.h" +// This is maximum sequence size we allow to use with construct molecule task on 32-bit OSes: 300Mb. +// UGENE has 2Gb limitation on 32-bit systems and cloning algorithm is not optimized for memory limits. +#define MAX_MOLECULE_SEQUENCE_LENGTH_32_BIT_OS (300 * 1000 * 1000) + namespace U2 { ConstructMoleculeDialog::ConstructMoleculeDialog(const QList<DNAFragment>& fragmentList, QWidget* p) @@ -47,12 +53,12 @@ ConstructMoleculeDialog::ConstructMoleculeDialog(const QList<DNAFragment>& fragm fragments(fragmentList), saveController(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22056035"); + new HelpButton(this, buttonBox, "24742570"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); tabWidget->setCurrentIndex(0); - const QString coreLengthStr = ConstructMoleculeDialog::tr("core length"); + QString coreLengthStr = ConstructMoleculeDialog::tr("core length"); foreach(const DNAFragment& frag, fragments) { QString fragItem = QString("%1 (%2) %3 [%4 - %5 bp]") @@ -93,9 +99,17 @@ void ConstructMoleculeDialog::accept() } QList<DNAFragment> toLigate; - foreach(int idx, selected) - { - toLigate.append(fragments[idx]); + qint64 resultSequenceSize = 0; + foreach(int idx, selected) { + const DNAFragment& fragment = fragments[idx]; + foreach (const U2Region& region, fragment.getFragmentRegions()) { + resultSequenceSize += region.length; + } + toLigate.append(fragment); + } + if (AppResourcePool::is32BitBuild() && resultSequenceSize > MAX_MOLECULE_SEQUENCE_LENGTH_32_BIT_OS) { + QMessageBox::warning(this->window(), L10N::warningTitle(), tr("Selected region is too large to proceed!")); + return; } LigateFragmentsTaskConfig cfg; diff --git a/src/plugins/enzymes/src/ConstructMoleculeDialog.h b/src/plugins/enzymes/src/ConstructMoleculeDialog.h index 9d0263ee6c6db833ca12fefa587c9281e2695d6f..2bff64ceb96c5b23042ea64de6a93b3c38ed4f8a 100644 --- a/src/plugins/enzymes/src/ConstructMoleculeDialog.h +++ b/src/plugins/enzymes/src/ConstructMoleculeDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/enzymes/src/CreateFragmentDialog.cpp b/src/plugins/enzymes/src/CreateFragmentDialog.cpp index 19ef2a089e9b6fe2e0ecbaa9e972e102575b299f..4eb04a52cbb64ba5fddd48bddb294333816e45c1 100644 --- a/src/plugins/enzymes/src/CreateFragmentDialog.cpp +++ b/src/plugins/enzymes/src/CreateFragmentDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -31,6 +31,7 @@ #include <U2Core/DNASequenceSelection.h> #include <U2Core/GObjectRelationRoles.h> #include <U2Core/GObjectUtils.h> +#include <U2Core/GObjectTypes.h> #include <U2Core/Settings.h> #include <U2Core/U1AnnotationUtils.h> #include <U2Core/U2AlphabetUtils.h> @@ -46,12 +47,11 @@ namespace U2 { -CreateFragmentDialog::CreateFragmentDialog(ADVSequenceObjectContext* ctx, QWidget* p) -: QDialog(p), seqCtx(ctx) -{ +CreateFragmentDialog::CreateFragmentDialog(ADVSequenceObjectContext* ctx, QWidget* p) + : QDialog(p), seqCtx(ctx) { setupUi(this); - new HelpButton(this, buttonBox, "22056034"); + new HelpButton(this, buttonBox, "24742569"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -59,7 +59,7 @@ CreateFragmentDialog::CreateFragmentDialog(ADVSequenceObjectContext* ctx, QWidg seqObj = ctx->getSequenceObject(); - rs=new RegionSelector(this, ctx->getSequenceLength(), false, ctx->getSequenceSelection()); + rs = new RegionSelector(this, ctx->getSequenceLength(), false, ctx->getSequenceSelection()); rangeSelectorLayout->addWidget(rs); relatedAnnotations = ctx->getAnnotationObjects(true).toList(); @@ -70,40 +70,38 @@ CreateFragmentDialog::CreateFragmentDialog(ADVSequenceObjectContext* ctx, QWidg } CreateFragmentDialog::CreateFragmentDialog(U2SequenceObject* obj, const U2Region& region, QWidget* p) - : QDialog(p), seqCtx(NULL) -{ + : QDialog(p), seqCtx(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22056034"); + new HelpButton(this, buttonBox, "24742569"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); seqObj = obj; - QList<GObject*> aObjects = GObjectUtils::findAllObjects(UOF_LoadedOnly,GObjectTypes::ANNOTATION_TABLE); + QList<GObject*> aObjects = GObjectUtils::findAllObjects(UOF_LoadedOnly, GObjectTypes::ANNOTATION_TABLE); QList<GObject*> related = GObjectUtils::findObjectsRelatedToObjectByRole(seqObj, GObjectTypes::ANNOTATION_TABLE, ObjectRole_Sequence, aObjects, UOF_LoadedOnly); - foreach (GObject* obj, related) { + foreach(GObject* obj, related) { AnnotationTableObject *aObj = qobject_cast<AnnotationTableObject *>(obj); assert(aObj != NULL); relatedAnnotations.append(aObj); } - rs=new RegionSelector(this, seqObj->getSequenceLength(), false); + rs = new RegionSelector(this, seqObj->getSequenceLength(), false); rs->setCustomRegion(region); rangeSelectorLayout->addWidget(rs); setupAnnotationsWidget(); } -void CreateFragmentDialog::accept() -{ +void CreateFragmentDialog::accept() { QString leftOverhang, rightOverhang; if (leftEndBox->isChecked()) { leftOverhang = lCustomOverhangEdit->text(); const DNAAlphabet* alph = U2AlphabetUtils::findBestAlphabet(leftOverhang.toLatin1()); if (!alph->isNucleic()) { - QMessageBox::warning(this, windowTitle(),tr("Left end contains unsupported symbols!")); + QMessageBox::warning(this, windowTitle(), tr("Left end contains unsupported symbols!")); return; } @@ -113,18 +111,18 @@ void CreateFragmentDialog::accept() rightOverhang = rCustomOverhangEdit->text(); const DNAAlphabet* alph = U2AlphabetUtils::findBestAlphabet(rightOverhang.toLatin1()); if (!alph->isNucleic()) { - QMessageBox::warning(this, windowTitle(),tr("Right end contains unsupported symbols!")); + QMessageBox::warning(this, windowTitle(), tr("Right end contains unsupported symbols!")); return; } } - bool isRegionOk=false; - U2Region reg=rs->getRegion(&isRegionOk); - if(!isRegionOk){ + bool isRegionOk = false; + U2Region reg = rs->getRegion(&isRegionOk); + if (!isRegionOk) { rs->showErrorMessage(); return; } if (reg.length <= 0) { - QMessageBox::warning(this, windowTitle(),tr("Invalid fragment region!\nChoose another region.")); + QMessageBox::warning(this, windowTitle(), tr("Invalid fragment region!\nChoose another region.")); return; } QString err = ac->validate(); @@ -133,14 +131,14 @@ void CreateFragmentDialog::accept() return; } bool objectPrepared = ac->prepareAnnotationObject(); - if (!objectPrepared){ + if (!objectPrepared) { QMessageBox::warning(this, tr("Error"), tr("Cannot create an annotation object. Please check settings")); return; } const CreateAnnotationModel& m = ac->getModel(); AnnotationTableObject *obj = m.getAnnotationObject(); QString groupName = m.groupName; - SAFE_POINT(!groupName.isEmpty() && obj != NULL, "Invalid annotation data!",); + SAFE_POINT(!groupName.isEmpty() && obj != NULL, "Invalid annotation data!", ); SharedAnnotationData ad(new AnnotationData); ad->location->regions.append(reg); @@ -167,12 +165,12 @@ void CreateFragmentDialog::accept() QString rightOverhangType = rightOverhang.isEmpty() ? OVERHANG_TYPE_BLUNT : OVERHANG_TYPE_STICKY; ad->qualifiers.append(U2Qualifier(QUALIFIER_RIGHT_TYPE, rightOverhangType)); ad->qualifiers.append(U2Qualifier(QUALIFIER_SOURCE, seqObj->getGObjectName())); - ad->name = QString("Fragment (%1-%2)").arg(reg.startPos+1).arg(reg.endPos()); + ad->name = QString("Fragment (%1-%2)").arg(reg.startPos + 1).arg(reg.endPos()); obj->addAnnotations(QList<SharedAnnotationData>() << ad, groupName); dnaFragment = DNAFragment(ad, seqObj, relatedAnnotations); - if(seqCtx != NULL){ + if (seqCtx != NULL) { seqCtx->getAnnotatedDNAView()->tryAddObject(obj); } diff --git a/src/plugins/enzymes/src/CreateFragmentDialog.h b/src/plugins/enzymes/src/CreateFragmentDialog.h index 10a42df7bea8b296a8c6d86c8b94717c143b5feb..e835bd3fabd422f1cb95c48327b149a91be03156 100644 --- a/src/plugins/enzymes/src/CreateFragmentDialog.h +++ b/src/plugins/enzymes/src/CreateFragmentDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/enzymes/src/DNAFragment.cpp b/src/plugins/enzymes/src/DNAFragment.cpp index f7978594107f9f5d57dc7a6a9d63d866fd5af847..059a03d251d44804ca6e8ff403e7531e4c13d37d 100644 --- a/src/plugins/enzymes/src/DNAFragment.cpp +++ b/src/plugins/enzymes/src/DNAFragment.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/enzymes/src/DNAFragment.h b/src/plugins/enzymes/src/DNAFragment.h index 795a009f63026f6f2cbda0fddc54f42503f2c92f..539e50f9bce4335a051c3dad35004e153ea46b59 100644 --- a/src/plugins/enzymes/src/DNAFragment.h +++ b/src/plugins/enzymes/src/DNAFragment.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/enzymes/src/DigestSequenceDialog.cpp b/src/plugins/enzymes/src/DigestSequenceDialog.cpp index 0d1131e20e18f8eb0a1a82ed90efee06548e1ff2..f878738818ae5e140314a01685bfc85c22581fdb 100644 --- a/src/plugins/enzymes/src/DigestSequenceDialog.cpp +++ b/src/plugins/enzymes/src/DigestSequenceDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -59,7 +59,7 @@ DigestSequenceDialog::DigestSequenceDialog(ADVSequenceObjectContext* ctx, QWidge : QDialog(p),seqCtx(ctx), timer(NULL), animationCounter(0) { setupUi(this); - new HelpButton(this, buttonBox, "22056033"); + new HelpButton(this, buttonBox, "24742568"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/enzymes/src/DigestSequenceDialog.h b/src/plugins/enzymes/src/DigestSequenceDialog.h index deda1462cb47b7986ffc51630e367bae9bb07e17..ab1d450b2e941ae19d692d5deb8af73b65a640dd 100644 --- a/src/plugins/enzymes/src/DigestSequenceDialog.h +++ b/src/plugins/enzymes/src/DigestSequenceDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/enzymes/src/EditFragmentDialog.cpp b/src/plugins/enzymes/src/EditFragmentDialog.cpp index a67c2029d2aa7ef566e1d6a13558532702093b90..885061a6e2ff54e7648c91731593ddfbfca9cfa0 100644 --- a/src/plugins/enzymes/src/EditFragmentDialog.cpp +++ b/src/plugins/enzymes/src/EditFragmentDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -44,7 +44,7 @@ EditFragmentDialog::EditFragmentDialog( DNAFragment& fragment, QWidget* p ) { setupUi(this); - new HelpButton(this, buttonBox, "22056040"); + new HelpButton(this, buttonBox, "24742575"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/enzymes/src/EditFragmentDialog.h b/src/plugins/enzymes/src/EditFragmentDialog.h index 11e945d288ec7f66a11d9ceb863c366ed5d1f875..732cf4f8cc228287398854e1f40b13bb4adfbf88 100644 --- a/src/plugins/enzymes/src/EditFragmentDialog.h +++ b/src/plugins/enzymes/src/EditFragmentDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/enzymes/src/EnzymesIO.cpp b/src/plugins/enzymes/src/EnzymesIO.cpp index f2b7e635ab5b572120c7dd3443d08f9da425180c..39c72dbe18d3b937f6afc26e1bdc03b4d960e336 100644 --- a/src/plugins/enzymes/src/EnzymesIO.cpp +++ b/src/plugins/enzymes/src/EnzymesIO.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/enzymes/src/EnzymesIO.h b/src/plugins/enzymes/src/EnzymesIO.h index 2527ca292a559a8faed3e04a6533d1d22eac3c52..61f8c4bb53214533bcfd36a095d32315bac49ace 100644 --- a/src/plugins/enzymes/src/EnzymesIO.h +++ b/src/plugins/enzymes/src/EnzymesIO.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/enzymes/src/EnzymesPlugin.cpp b/src/plugins/enzymes/src/EnzymesPlugin.cpp index 926a6e3682afec3bb1c5a53a3bca944e036b8ef6..ef8d0ce482ef61b7654e03c5e890a2c9d78f9c2c 100644 --- a/src/plugins/enzymes/src/EnzymesPlugin.cpp +++ b/src/plugins/enzymes/src/EnzymesPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/enzymes/src/EnzymesPlugin.h b/src/plugins/enzymes/src/EnzymesPlugin.h index ffa152f13c35a8fcb11b312103b62547926f7f4e..1c6aeda86f1549ad4f5fa9545fc01d460ea4b3f8 100644 --- a/src/plugins/enzymes/src/EnzymesPlugin.h +++ b/src/plugins/enzymes/src/EnzymesPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/enzymes/src/EnzymesQuery.cpp b/src/plugins/enzymes/src/EnzymesQuery.cpp index 0f88c7f83c8840886b85e3b51b74d353b2577716..52e585c3689c07ee85118b3aef88442ceb03c44d 100644 --- a/src/plugins/enzymes/src/EnzymesQuery.cpp +++ b/src/plugins/enzymes/src/EnzymesQuery.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -111,7 +111,7 @@ QDEnzymesActorPrototype::QDEnzymesActorPrototype() { descriptor.setDocumentation(QDEnzymesActor::tr("Finds restriction cut sites in supplied DNA sequence.")); Descriptor ed(ENZYMES_ATTR, QDEnzymesActor::tr("Enzymes"), QDEnzymesActor::tr("Restriction enzymes used to recognize the restriction sites.")); - Descriptor cd(CIRC_ATTR, QDEnzymesActor::tr("Circular"), QDEnzymesActor::tr("If <i>True</i> considers the sequence circular. That allows to search for restriction sites between the end and the beginning of the sequence.")); + Descriptor cd(CIRC_ATTR, QDEnzymesActor::tr("Circular"), QDEnzymesActor::tr("If <i>True</i> considers the sequence circular. That allows one to search for restriction sites between the end and the beginning of the sequence.")); attributes << new Attribute(ed, BaseTypes::STRING_TYPE(), false); attributes << new Attribute(cd, BaseTypes::BOOL_TYPE(), false, false); @@ -140,7 +140,7 @@ QString EnzymesSelectorDialogHandler::getSelectedString(QDialog* dlg) { EnzymesSelectorDialog::EnzymesSelectorDialog(EnzymesSelectorDialogHandler* parent) : factory(parent) { setupUi(this); - new HelpButton(this, buttonBox, "22056025"); + new HelpButton(this, buttonBox, "24742560"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/enzymes/src/EnzymesQuery.h b/src/plugins/enzymes/src/EnzymesQuery.h index 8153b87f57664555b4dbf30404ff751f6887e180..15540560c1841ae9f89094d4e56794059febf026 100644 --- a/src/plugins/enzymes/src/EnzymesQuery.h +++ b/src/plugins/enzymes/src/EnzymesQuery.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/enzymes/src/EnzymesTests.cpp b/src/plugins/enzymes/src/EnzymesTests.cpp index 563b7d194e2ba614d61afa02ad0c0060a2e925f6..4f143e6b09d45e50c375827385934582dfc42c2a 100644 --- a/src/plugins/enzymes/src/EnzymesTests.cpp +++ b/src/plugins/enzymes/src/EnzymesTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -228,6 +228,8 @@ void GTest_FindEnzymes::cleanup() { } delete aObj; } + + XmlTest::cleanup(); } ////////////////////////////////////////////////////////////////////////// @@ -242,6 +244,9 @@ void GTest_DigestIntoFragments::init(XMLTestFormat *tf, const QDomElement& el) { return; } + QString isCircularBuf = el.attribute("circular"); + isCircular = isCircularBuf == "true" ? true : false; + aObjCtx = el.attribute("annotation-table"); if (aObjCtx.isEmpty()) { stateInfo.setError( "Annotation object context not specified"); @@ -313,6 +318,7 @@ QList<Task*> GTest_DigestIntoFragments::onSubTaskFinished(Task* subTask) { DigestSequenceTaskConfig cfg; cfg.searchForRestrictionSites = searchForEnzymes; cfg.enzymeData = enzymesToSearch; + cfg.forceCircular = isCircular; DigestSequenceTask* t = new DigestSequenceTask(seqObj, aObj, aObj, cfg); res.append(t); @@ -453,6 +459,8 @@ void GTest_LigateFragments::cleanup() if (contextAdded) { removeContext(resultDocName); } + + XmlTest::cleanup(); } diff --git a/src/plugins/enzymes/src/EnzymesTests.h b/src/plugins/enzymes/src/EnzymesTests.h index 055fd00fb0b4de7890f87ab583b9c876a2e0ee49..c61c90bcecdc520e4f1e9801b01c7b52c9787718 100644 --- a/src/plugins/enzymes/src/EnzymesTests.h +++ b/src/plugins/enzymes/src/EnzymesTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -38,7 +38,7 @@ class LoadEnzymeFileTask; class U2SequenceObject; //cppcheck-suppress noConstructor -class GTest_FindEnzymes : public GTest { +class GTest_FindEnzymes : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_FindEnzymes, "find-enzymes"); @@ -63,7 +63,7 @@ private: }; //cppcheck-suppress noConstructor -class GTest_DigestIntoFragments : public GTest { +class GTest_DigestIntoFragments : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DigestIntoFragments, "digest-into-fragments"); @@ -76,7 +76,8 @@ private: QString enzymesUrl; QStringList enzymeNames; bool searchForEnzymes; - AnnotationTableObject* aObj; + bool isCircular; + AnnotationTableObject* aObj; U2SequenceObject* seqObj; LoadEnzymeFileTask* loadTask; }; @@ -84,7 +85,7 @@ private: class LigateFragmentsTask; //cppcheck-suppress noConstructor -class GTest_LigateFragments : public GTest { +class GTest_LigateFragments : public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_LigateFragments, "ligate-fragments"); diff --git a/src/plugins/enzymes/src/FindEnzymesAlgorithm.h b/src/plugins/enzymes/src/FindEnzymesAlgorithm.h index 6e57f9204f365bf120300c63d14ec174581e9f23..cd674f93b2bd856c781166d71f51c4632d10b195 100644 --- a/src/plugins/enzymes/src/FindEnzymesAlgorithm.h +++ b/src/plugins/enzymes/src/FindEnzymesAlgorithm.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/enzymes/src/FindEnzymesDialog.cpp b/src/plugins/enzymes/src/FindEnzymesDialog.cpp index faf98e097ec6a4b04788aeb42cd589e572223a51..b6e5755b7e02e962f4cf3474e70731be66893cb5 100644 --- a/src/plugins/enzymes/src/FindEnzymesDialog.cpp +++ b/src/plugins/enzymes/src/FindEnzymesDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -516,7 +516,7 @@ void EnzymesSelectorWidget::sl_saveEnzymesFile() FindEnzymesDialog::FindEnzymesDialog(ADVSequenceObjectContext* sctx) : QDialog(sctx->getAnnotatedDNAView()->getWidget()), seqCtx(sctx) { setupUi(this); - new HelpButton(this, buttonBox, "22056025"); + new HelpButton(this, buttonBox, "24742560"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/enzymes/src/FindEnzymesDialog.h b/src/plugins/enzymes/src/FindEnzymesDialog.h index 70a115e9a1cac65a6c80ec5ebfa8b050f44caceb..eb93207e0768f0ee7ba90f9917dfa62b150de8bf 100644 --- a/src/plugins/enzymes/src/FindEnzymesDialog.h +++ b/src/plugins/enzymes/src/FindEnzymesDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/enzymes/src/FindEnzymesTask.cpp b/src/plugins/enzymes/src/FindEnzymesTask.cpp index 0c8d86e742b57937b7c33620d0dab6979e05cee4..8564aa42110c1197e87b25b0d4bf0f0d76912f88 100644 --- a/src/plugins/enzymes/src/FindEnzymesTask.cpp +++ b/src/plugins/enzymes/src/FindEnzymesTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/enzymes/src/FindEnzymesTask.h b/src/plugins/enzymes/src/FindEnzymesTask.h index 85e7e7ad4e457bb255cacf7b2f7e1a47d4377d7d..f39f5b7c12f39683a553c664ac57b49496d9c802 100644 --- a/src/plugins/enzymes/src/FindEnzymesTask.h +++ b/src/plugins/enzymes/src/FindEnzymesTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/enzymes/transl/russian.ts b/src/plugins/enzymes/transl/russian.ts index 0f2cabf9eaeaa1de6a23d6ba832bf467ef168f0d..f7071ac7e22b2cfe284153e2611bb8a8f52e74a7 100644 --- a/src/plugins/enzymes/transl/russian.ts +++ b/src/plugins/enzymes/transl/russian.ts @@ -582,71 +582,76 @@ p, li { white-space: pre-wrap; } <context> <name>U2::ConstructMoleculeDialog</name> <message> - <location filename="../src/ConstructMoleculeDialog.cpp" line="91"/> + <location filename="../src/ConstructMoleculeDialog.cpp" line="97"/> <source>No fragments are selected! Please construct molecule from available fragments.</source> <translation>Выберите фрагменты, ÑоÑтавлÑющие новую молекулу.</translation> </message> <message> - <location filename="../src/ConstructMoleculeDialog.cpp" line="285"/> + <location filename="../src/ConstructMoleculeDialog.cpp" line="299"/> <source>Set new molecule file name</source> <translation>Задайте Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°</translation> </message> <message> - <location filename="../src/ConstructMoleculeDialog.cpp" line="55"/> + <location filename="../src/ConstructMoleculeDialog.cpp" line="61"/> <source>core length</source> <translation>длина Ñдра</translation> </message> <message> - <location filename="../src/ConstructMoleculeDialog.cpp" line="210"/> - <location filename="../src/ConstructMoleculeDialog.cpp" line="219"/> + <location filename="../src/ConstructMoleculeDialog.cpp" line="224"/> + <location filename="../src/ConstructMoleculeDialog.cpp" line="233"/> <source>Blunt</source> <translation>"Срез"</translation> </message> <message> - <location filename="../src/ConstructMoleculeDialog.cpp" line="208"/> - <location filename="../src/ConstructMoleculeDialog.cpp" line="217"/> + <location filename="../src/ConstructMoleculeDialog.cpp" line="222"/> + <location filename="../src/ConstructMoleculeDialog.cpp" line="231"/> <source>Fwd</source> <translation>ПрÑм</translation> </message> <message> - <location filename="../src/ConstructMoleculeDialog.cpp" line="51"/> + <location filename="../src/ConstructMoleculeDialog.cpp" line="57"/> <source>OK</source> <translation>OK</translation> </message> <message> - <location filename="../src/ConstructMoleculeDialog.cpp" line="52"/> + <location filename="../src/ConstructMoleculeDialog.cpp" line="58"/> <source>Cancel</source> <translation>Отмена</translation> </message> <message> - <location filename="../src/ConstructMoleculeDialog.cpp" line="208"/> - <location filename="../src/ConstructMoleculeDialog.cpp" line="217"/> + <location filename="../src/ConstructMoleculeDialog.cpp" line="111"/> + <source>Selected region is too large to proceed!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/ConstructMoleculeDialog.cpp" line="222"/> + <location filename="../src/ConstructMoleculeDialog.cpp" line="231"/> <source>Rev</source> <translation>Обр</translation> </message> <message> - <location filename="../src/ConstructMoleculeDialog.cpp" line="212"/> + <location filename="../src/ConstructMoleculeDialog.cpp" line="226"/> <source>Left end</source> <translation>Левый конец</translation> </message> <message> - <location filename="../src/ConstructMoleculeDialog.cpp" line="221"/> + <location filename="../src/ConstructMoleculeDialog.cpp" line="235"/> <source>Right end</source> <translation>Правый конец</translation> </message> <message> - <location filename="../src/ConstructMoleculeDialog.cpp" line="223"/> + <location filename="../src/ConstructMoleculeDialog.cpp" line="237"/> <source>yes</source> <translation>да</translation> </message> <message> - <location filename="../src/ConstructMoleculeDialog.cpp" line="223"/> + <location filename="../src/ConstructMoleculeDialog.cpp" line="237"/> <source>no</source> <translation>нет</translation> </message> <message> - <location filename="../src/ConstructMoleculeDialog.cpp" line="224"/> + <location filename="../src/ConstructMoleculeDialog.cpp" line="238"/> <source>Make fragment reverse complement</source> <translation>Сделать фрагмент обратно-комплементарным</translation> </message> @@ -655,41 +660,41 @@ p, li { white-space: pre-wrap; } <name>U2::CreateFragmentDialog</name> <message> <location filename="../src/CreateFragmentDialog.cpp" line="55"/> - <location filename="../src/CreateFragmentDialog.cpp" line="77"/> + <location filename="../src/CreateFragmentDialog.cpp" line="76"/> <source>OK</source> <translation>OK</translation> </message> <message> <location filename="../src/CreateFragmentDialog.cpp" line="56"/> - <location filename="../src/CreateFragmentDialog.cpp" line="78"/> + <location filename="../src/CreateFragmentDialog.cpp" line="77"/> <source>Cancel</source> <translation>Отмена</translation> </message> <message> - <location filename="../src/CreateFragmentDialog.cpp" line="106"/> + <location filename="../src/CreateFragmentDialog.cpp" line="104"/> <source>Left end contains unsupported symbols!</source> <translation>Левый конец Ñодержит неподдерживаемые Ñимволы!</translation> </message> <message> - <location filename="../src/CreateFragmentDialog.cpp" line="116"/> + <location filename="../src/CreateFragmentDialog.cpp" line="114"/> <source>Right end contains unsupported symbols!</source> <translation>Правый конец Ñодержит неподдерживаемые Ñимволы!</translation> </message> <message> - <location filename="../src/CreateFragmentDialog.cpp" line="127"/> + <location filename="../src/CreateFragmentDialog.cpp" line="125"/> <source>Invalid fragment region! Choose another region.</source> <translation>Invalid fragment region! Choose another region.</translation> </message> <message> - <location filename="../src/CreateFragmentDialog.cpp" line="132"/> - <location filename="../src/CreateFragmentDialog.cpp" line="137"/> + <location filename="../src/CreateFragmentDialog.cpp" line="130"/> + <location filename="../src/CreateFragmentDialog.cpp" line="135"/> <source>Error</source> <translation>Проблема</translation> </message> <message> - <location filename="../src/CreateFragmentDialog.cpp" line="137"/> + <location filename="../src/CreateFragmentDialog.cpp" line="135"/> <source>Cannot create an annotation object. Please check settings</source> <translation>Ðевозможно Ñоздать аннотацию. Проверьте наÑтройки</translation> </message> @@ -745,42 +750,42 @@ Choose another region.</translation> <context> <name>U2::DigestSequenceTask</name> <message> - <location filename="../src/CloningUtilTasks.cpp" line="131"/> + <location filename="../src/CloningUtilTasks.cpp" line="147"/> <source>Can't use restriction site %1 for digestion, cleavage site is unknown </source> <translation>Ðевозможно иÑпользовать Ñайт %1 Ð´Ð»Ñ Ñ€Ð°Ð·Ð±Ð¸ÐµÐ½Ð¸Ñ Ð½Ð° фрагменты, точка разреза неопределена</translation> </message> <message> - <location filename="../src/CloningUtilTasks.cpp" line="213"/> + <location filename="../src/CloningUtilTasks.cpp" line="229"/> <source>Unable to digest into fragments: intersecting restriction sites %1 (%2..%3) and %4 (%5..%6)</source> <translation>Ðе удалоÑÑ‚ÑŒ разбить на фрагменты переÑкающиеÑÑ Ñайты реÑтрикции %1 (%2..%3) и %4 (%5..%6)</translation> </message> <message> - <location filename="../src/CloningUtilTasks.cpp" line="319"/> + <location filename="../src/CloningUtilTasks.cpp" line="340"/> <source>circular</source> <translation>круговаÑ</translation> </message> <message> - <location filename="../src/CloningUtilTasks.cpp" line="319"/> + <location filename="../src/CloningUtilTasks.cpp" line="340"/> <source>linear</source> <translation>линейнаÑ</translation> </message> <message> - <location filename="../src/CloningUtilTasks.cpp" line="320"/> + <location filename="../src/CloningUtilTasks.cpp" line="341"/> <source><h3><br>Digest into fragments %1 (%2)</h3></source> <translation><h3><br>Разбиение на фрагменты %1 (%2)</h3></translation> </message> <message> - <location filename="../src/CloningUtilTasks.cpp" line="321"/> + <location filename="../src/CloningUtilTasks.cpp" line="342"/> <source><br>Generated %1 fragments.</source> <translation><br>Создано %1 фрагментов.</translation> </message> <message> - <location filename="../src/CloningUtilTasks.cpp" line="330"/> + <location filename="../src/CloningUtilTasks.cpp" line="351"/> <source><br><br>&nbsp;&nbsp;&nbsp;&nbsp;%1:&nbsp;&nbsp;&nbsp;&nbsp;From %3 (%2) To %5 (%4) - %6 bp </source> <translation><br><br>&nbsp;&nbsp;&nbsp;&nbsp;%1:&nbsp;&nbsp;&nbsp;&nbsp;От %3 (%2) До %5 (%4) - %6 bp </translation> </message> <message> - <location filename="../src/CloningUtilTasks.cpp" line="356"/> + <location filename="../src/CloningUtilTasks.cpp" line="377"/> <source>Conserved annotation %1 (%2) is disrupted by the digestion. Try changing the restriction sites.</source> <translation>Conserved annotation %1 (%2) is disrupted by the digestion. Try changing the restriction sites.</translation> </message> @@ -1206,22 +1211,22 @@ To start ligation create a project or open an existing.</source> <context> <name>U2::LigateFragmentsTask</name> <message> - <location filename="../src/CloningUtilTasks.cpp" line="378"/> + <location filename="../src/CloningUtilTasks.cpp" line="419"/> <source>Fragments %1 and %2 are inconsistent. Blunt and sticky ends incompatibility</source> <translation>Фрагменты %1 и %2 неÑопоÑтавимы. Липкий конец и Ñрез невозможно Ñоединить</translation> </message> <message> - <location filename="../src/CloningUtilTasks.cpp" line="388"/> + <location filename="../src/CloningUtilTasks.cpp" line="429"/> <source>Right overhang from %1 and left overhang from %2 are inconsistent.</source> <translation>Правый липкий конец фрагмента %1 неÑовмеÑтим Ñ Ð»ÐµÐ²Ñ‹Ð¼ липким концом фрагмента %2.</translation> </message> <message> - <location filename="../src/CloningUtilTasks.cpp" line="434"/> + <location filename="../src/CloningUtilTasks.cpp" line="482"/> <source>Unknown DNA alphabet in fragment %1 of %2</source> <translation>ÐеизвеÑтный алфавит у фрагмента %1 поÑледовательноÑти %2</translation> </message> <message> - <location filename="../src/CloningUtilTasks.cpp" line="501"/> + <location filename="../src/CloningUtilTasks.cpp" line="555"/> <source>Add constructed molecule</source> <translation>Добавить Ñозданную молекулу</translation> </message> @@ -1273,7 +1278,7 @@ To start ligation create a project or open an existing.</source> </message> <message> <location filename="../src/EnzymesQuery.cpp" line="114"/> - <source>If <i>True</i> considers the sequence circular. That allows to search for restriction sites between the end and the beginning of the sequence.</source> + <source>If <i>True</i> considers the sequence circular. That allows one to search for restriction sites between the end and the beginning of the sequence.</source> <translation>ЕÑли<i>ИÑтина</i> то поÑледовательноÑÑ‚ÑŒ раÑÑматриваетÑÑ ÐºÐ°Ðº круговаÑ. Сайты будут иÑкатьÑÑ Ð¼ÐµÐ¶Ð´Ñƒ началом и концом поÑледовательноÑти.</translation> </message> </context> diff --git a/src/plugins/external_tool_support/external_tool_support.pro b/src/plugins/external_tool_support/external_tool_support.pro index f8fd42c786082e1878e57ed18bab283c7faef02e..3a2f8dfa57e1cf52a22edeb755a218dfbc3b9d43 100644 --- a/src/plugins/external_tool_support/external_tool_support.pro +++ b/src/plugins/external_tool_support/external_tool_support.pro @@ -8,6 +8,7 @@ HEADERS += src/ETSProjectViewItemsContoller.h \ src/ExternalToolSupportSettings.h \ src/ExternalToolSupportSettingsController.h \ src/RnaSeqCommon.h \ + src/RunnerTool.h \ src/TaskLocalStorage.h \ src/bedtools/BedtoolsIntersectTask.h \ src/bedtools/BedToolsWorkersLibrary.h \ @@ -49,6 +50,7 @@ HEADERS += src/ETSProjectViewItemsContoller.h \ src/bowtie/BowtieSupport.h \ src/bowtie/BowtieTask.h \ src/bowtie/BowtieWorker.h \ + src/bowtie2/bowtie2_tests/Bowtie2Tests.h \ src/bowtie2/Bowtie2Support.h \ src/bowtie2/Bowtie2Task.h \ src/bowtie2/Bowtie2SettingsWidget.h \ @@ -93,6 +95,11 @@ HEADERS += src/ETSProjectViewItemsContoller.h \ src/cufflinks/CuffmergeWorker.h \ src/cufflinks/GffreadSupportTask.h \ src/cufflinks/GffreadWorker.h \ + src/custom_tools/CustomToolConfigParser.h \ + src/custom_tools/ImportCustomToolsTask.h \ + src/custom_tools/ImportExternalToolDialog.h \ + src/custom_tools/LoadCustomExternalToolsTask.h \ + src/custom_tools/RegisterCustomToolTask.h \ src/cutadapt/CutadaptSupport.h \ src/cutadapt/CutadaptWorker.h \ src/fastqc/FastqcSupport.h \ @@ -165,6 +172,7 @@ HEADERS += src/ETSProjectViewItemsContoller.h \ src/spades/SpadesSlotRelationDescriptor.h \ src/spades/SpadesSupport.h \ src/spades/SpadesTask.h \ + src/spades/SpadesTaskTest.h \ src/spades/SpadesWorker.h \ src/spidey/SpideySupport.h \ src/spidey/SpideySupportTask.h \ @@ -223,7 +231,8 @@ HEADERS += src/ETSProjectViewItemsContoller.h \ src/vcftools/VcfConsensusWorker.h \ src/vcfutils/VcfutilsSupport.h -FORMS += src/blast/FormatDBSupportRunDialog.ui \ +FORMS += src/ETSSettingsWidget.ui \ + src/blast/FormatDBSupportRunDialog.ui \ src/blast_plus/AlignToReferenceBlastDialog.ui \ src/blast_plus/BlastDBCmdDialog.ui \ src/bowtie/BowtieBuildSettings.ui \ @@ -236,7 +245,7 @@ FORMS += src/blast/FormatDBSupportRunDialog.ui \ src/cap3/CAP3SupportDialog.ui \ src/clustalo/ClustalOSupportRunDialog.ui \ src/clustalw/ClustalWSupportRunDialog.ui \ - src/ETSSettingsWidget.ui \ + src/custom_tools/ImportExternalToolDialog.ui \ src/hmmer/HmmerBuildDialog.ui \ src/hmmer/HmmerSearchDialog.ui \ src/hmmer/PhmmerSearchDialog.ui \ @@ -263,6 +272,7 @@ SOURCES += src/ETSProjectViewItemsContoller.cpp \ src/ExternalToolSupportSettings.cpp \ src/ExternalToolSupportSettingsController.cpp \ src/RnaSeqCommon.cpp \ + src/RunnerTool.cpp \ src/TaskLocalStorage.cpp \ src/bedtools/BedtoolsIntersectTask.cpp \ src/bedtools/BedToolsWorkersLibrary.cpp \ @@ -304,6 +314,7 @@ SOURCES += src/ETSProjectViewItemsContoller.cpp \ src/bowtie/BowtieSupport.cpp \ src/bowtie/BowtieTask.cpp \ src/bowtie/BowtieWorker.cpp \ + src/bowtie2/bowtie2_tests/Bowtie2Tests.cpp \ src/bowtie2/Bowtie2Support.cpp \ src/bowtie2/Bowtie2Task.cpp \ src/bowtie2/Bowtie2SettingsWidget.cpp \ @@ -348,6 +359,11 @@ SOURCES += src/ETSProjectViewItemsContoller.cpp \ src/cufflinks/CuffmergeWorker.cpp \ src/cufflinks/GffreadSupportTask.cpp \ src/cufflinks/GffreadWorker.cpp \ + src/custom_tools/CustomToolConfigParser.cpp \ + src/custom_tools/ImportCustomToolsTask.cpp \ + src/custom_tools/ImportExternalToolDialog.cpp \ + src/custom_tools/LoadCustomExternalToolsTask.cpp \ + src/custom_tools/RegisterCustomToolTask.cpp \ src/cutadapt/CutadaptSupport.cpp \ src/cutadapt/CutadaptWorker.cpp \ src/fastqc/FastqcSupport.cpp \ @@ -419,6 +435,7 @@ SOURCES += src/ETSProjectViewItemsContoller.cpp \ src/spades/SpadesSlotRelationDescriptor.cpp \ src/spades/SpadesSupport.cpp \ src/spades/SpadesTask.cpp \ + src/spades/SpadesTaskTest.cpp \ src/spades/SpadesWorker.cpp \ src/spidey/SpideySupport.cpp \ src/spidey/SpideySupportTask.cpp \ diff --git a/src/plugins/external_tool_support/external_tool_support.qrc b/src/plugins/external_tool_support/external_tool_support.qrc index 24fe11de4bd59db6dbc9abb7af860504f29de790..4ad6001ff8a33dd3bf3771611f950674c7936a77 100644 --- a/src/plugins/external_tool_support/external_tool_support.qrc +++ b/src/plugins/external_tool_support/external_tool_support.qrc @@ -32,5 +32,6 @@ <file>images/add.png</file> <file>images/down.png</file> <file>images/up.png</file> + <file>schemas/CustomExternalToolConfig.xsd</file> </qresource> </RCC> diff --git a/src/plugins/external_tool_support/schemas/CustomExternalToolConfig.xsd b/src/plugins/external_tool_support/schemas/CustomExternalToolConfig.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c1cd36778e66cbc8ebc0d75c61220f6fec0e30b0 --- /dev/null +++ b/src/plugins/external_tool_support/schemas/CustomExternalToolConfig.xsd @@ -0,0 +1,19 @@ +<?xml version = "1.0" encoding = "UTF-8"?> +<xs:schema xmlns:xs = "http://www.w3.org/2001/XMLSchema"> + <xs:element name = "ugeneExternalToolConfig"> + <xs:complexType> + <xs:sequence> + <xs:element name = "id" type = "xs:string" /> + <xs:element name = "name" type = "xs:string" /> + <xs:element name = "executableName" type = "xs:string" /> + <xs:element name = "executableFullPath" type = "xs:string" minOccurs ="0" /> + <xs:element name = "description" type = "xs:string" minOccurs ="0" /> + <xs:element name = "version" type = "xs:string" minOccurs ="0" /> + <xs:element name = "launcherId" type = "xs:string" minOccurs ="0" /> + <xs:element name = "dependencies" type = "xs:string" minOccurs ="0" /> + </xs:sequence> + <xs:attribute name = "version" type = "xs:string" use="required" /> + </xs:complexType> + </xs:element> + +</xs:schema> diff --git a/src/plugins/external_tool_support/src/ETSProjectViewItemsContoller.cpp b/src/plugins/external_tool_support/src/ETSProjectViewItemsContoller.cpp index f57e1ce7cae9a93fb114a390984a7975c263b098..5bd301c67eb1d13f214511cc9f44ceb820cf47b2 100644 --- a/src/plugins/external_tool_support/src/ETSProjectViewItemsContoller.cpp +++ b/src/plugins/external_tool_support/src/ETSProjectViewItemsContoller.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -49,9 +49,9 @@ namespace U2 { ETSProjectViewItemsContoller::ETSProjectViewItemsContoller(QObject* p) : QObject(p) { - formatDBOnSelectionAction=new ExternalToolSupportAction(tr("FormatDB..."), this, QStringList(ET_FORMATDB)); - makeBLASTDBOnSelectionAction=new ExternalToolSupportAction(tr("BLAST+ make DB..."), this, QStringList(ET_MAKEBLASTDB)); - formatDBOnSelectionAction->setObjectName(ET_FORMATDB); + formatDBOnSelectionAction = new ExternalToolSupportAction(tr("FormatDB..."), this, QStringList(FormatDBSupport::ET_FORMATDB_ID)); + makeBLASTDBOnSelectionAction = new ExternalToolSupportAction(tr("BLAST+ make DB..."), this, QStringList(FormatDBSupport::ET_MAKEBLASTDB_ID)); + formatDBOnSelectionAction->setObjectName(FormatDBSupport::ET_FORMATDB_ID); connect(formatDBOnSelectionAction,SIGNAL(triggered()), SLOT(sl_runFormatDBOnSelection())); connect(makeBLASTDBOnSelectionAction,SIGNAL(triggered()), SLOT(sl_runFormatDBOnSelection())); @@ -87,16 +87,17 @@ void ETSProjectViewItemsContoller::sl_addToProjectViewMenu(QMenu& m) { void ETSProjectViewItemsContoller::sl_runFormatDBOnSelection(){ ExternalToolSupportAction* s = qobject_cast<ExternalToolSupportAction*>(sender()); assert(s != NULL); - assert((s->getToolNames().contains(ET_FORMATDB))||(s->getToolNames().contains(ET_MAKEBLASTDB))); + assert((s->getToolIds().contains(FormatDBSupport::ET_FORMATDB_ID))||(s->getToolIds().contains(FormatDBSupport::ET_MAKEBLASTDB_ID))); //Check that formatDB and temporary folder path defined - if (AppContext::getExternalToolRegistry()->getByName(s->getToolNames().at(0))->getPath().isEmpty()){ + if (AppContext::getExternalToolRegistry()->getById(s->getToolIds().at(0))->getPath().isEmpty()){ QObjectScopedPointer<QMessageBox> msgBox = new QMessageBox; - if(s->getToolNames().at(0) == ET_FORMATDB){ - msgBox->setWindowTitle("BLAST "+s->getToolNames().at(0)); - msgBox->setText(tr("Path for BLAST %1 tool not selected.").arg(s->getToolNames().at(0))); + QString toolName = AppContext::getExternalToolRegistry()->getById(s->getToolIds().at(0))->getName(); + if(s->getToolIds().at(0) == FormatDBSupport::ET_FORMATDB_ID){ + msgBox->setWindowTitle("BLAST " + toolName); + msgBox->setText(tr("Path for BLAST %1 tool not selected.").arg(toolName)); }else{ - msgBox->setWindowTitle("BLAST+ "+s->getToolNames().at(0)); - msgBox->setText(tr("Path for BLAST+ %1 tool not selected.").arg(s->getToolNames().at(0))); + msgBox->setWindowTitle("BLAST+ "+s->getToolIds().at(0)); + msgBox->setText(tr("Path for BLAST+ %1 tool not selected.").arg(toolName)); } msgBox->setInformativeText(tr("Do you want to select it now?")); msgBox->setStandardButtons(QMessageBox::Yes | QMessageBox::No); @@ -116,7 +117,7 @@ void ETSProjectViewItemsContoller::sl_runFormatDBOnSelection(){ break; } } - if (AppContext::getExternalToolRegistry()->getByName(s->getToolNames().at(0))->getPath().isEmpty()){ + if (AppContext::getExternalToolRegistry()->getById(s->getToolIds().at(0))->getPath().isEmpty()){ return; } U2OpStatus2Log os(LogLevel_DETAILS); @@ -145,14 +146,16 @@ void ETSProjectViewItemsContoller::sl_runFormatDBOnSelection(){ } } } - QObjectScopedPointer<FormatDBSupportRunDialog> formatDBRunDialog = new FormatDBSupportRunDialog(s->getToolNames().at(0), settings, AppContext::getMainWindow()->getQMainWindow()); + QString toolId = s->getToolIds().at(0); + QString toolName = AppContext::getExternalToolRegistry()->getById(toolId)->getName(); + QObjectScopedPointer<FormatDBSupportRunDialog> formatDBRunDialog = new FormatDBSupportRunDialog(toolName, settings, AppContext::getMainWindow()->getQMainWindow()); formatDBRunDialog->exec(); CHECK(!formatDBRunDialog.isNull(), ); if (formatDBRunDialog->result() != QDialog::Accepted){ return; } - FormatDBSupportTask* formatDBSupportTask=new FormatDBSupportTask(s->getToolNames().at(0), settings); + FormatDBSupportTask* formatDBSupportTask = new FormatDBSupportTask(toolId, settings); AppContext::getTaskScheduler()->registerTopLevelTask(formatDBSupportTask); } diff --git a/src/plugins/external_tool_support/src/ETSProjectViewItemsContoller.h b/src/plugins/external_tool_support/src/ETSProjectViewItemsContoller.h index 632acae680efc813f611d6a219d130ebae004432..e00a5e39fac107b0a44e0d03972166f2fb4ead83 100644 --- a/src/plugins/external_tool_support/src/ETSProjectViewItemsContoller.h +++ b/src/plugins/external_tool_support/src/ETSProjectViewItemsContoller.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/ETSSettingsWidget.ui b/src/plugins/external_tool_support/src/ETSSettingsWidget.ui index dd9dbf86961d88366ce780dd4581031a48c2a41f..ede383588688beac62f6e3b53724c1c6bf42e713 100644 --- a/src/plugins/external_tool_support/src/ETSSettingsWidget.ui +++ b/src/plugins/external_tool_support/src/ETSSettingsWidget.ui @@ -6,12 +6,12 @@ <rect> <x>0</x> <y>0</y> - <width>499</width> - <height>621</height> + <width>455</width> + <height>777</height> </rect> </property> <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> @@ -19,201 +19,417 @@ <property name="minimumSize"> <size> <width>0</width> - <height>0</height> + <height>400</height> </size> </property> <property name="windowTitle"> <string>Resource settings</string> </property> <layout class="QVBoxLayout" name="verticalLayout"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> <item> - <layout class="QVBoxLayout" name="verticalLayout_4" stretch="0,3,1"> - <item> - <widget class="QGroupBox" name="groupBox_2"> - <property name="title"> - <string/> - </property> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QLabel" name="selectToolPackLabel"> - <property name="text"> - <string>You can select path for</string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="linkLabel"> - <property name="toolTip"> - <string>Check lastest version of external tools package</string> - </property> - <property name="text"> - <string><a href="http://ugene.net/external.html">external tools package</a></string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QPushButton" name="selectToolPackButton"> - <property name="text"> - <string>Browse...</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QGroupBox" name="groupBox"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="title"> - <string>Supported tools</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <property name="sizeConstraint"> - <enum>QLayout::SetMinimumSize</enum> + <widget class="QWidget" name="integratedToolsContainerWidget" native="true"> + <layout class="QVBoxLayout" name="verticalLayout_8"> + <property name="sizeConstraint"> + <enum>QLayout::SetMinAndMaxSize</enum> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QWidget" name="integratedToolsInnerWidget" native="true"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> </property> - <item> - <widget class="QTreeWidget" name="treeWidget"> - <property name="minimumSize"> - <size> - <width>200</width> - <height>0</height> - </size> - </property> - <column> - <property name="text"> - <string>Name</string> - </property> - </column> - <column> - <property name="text"> - <string>Path</string> - </property> - </column> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QGroupBox" name="infoGroupBox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> - </property> - <property name="baseSize"> - <size> - <width>0</width> - <height>140</height> - </size> - </property> - <property name="title"> - <string>Additional information</string> - </property> - <property name="alignment"> - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> - </property> - <layout class="QVBoxLayout" name="verticalLayout_3"> - <item> - <layout class="QVBoxLayout" name="verticalLayout_5"> - <property name="sizeConstraint"> - <enum>QLayout::SetDefaultConstraint</enum> - </property> - <item> - <widget class="QTextBrowser" name="descriptionTextBrowser"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="sizeConstraint"> + <enum>QLayout::SetMinimumSize</enum> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QWidget" name="externalToolPackLabelContainer" native="true"> + <layout class="QHBoxLayout" name="horizontalLayout"> + <property name="leftMargin"> + <number>0</number> </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>75</height> - </size> + <property name="topMargin"> + <number>0</number> </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>16777215</height> - </size> + <property name="rightMargin"> + <number>0</number> </property> - <property name="readOnly"> - <bool>true</bool> + <property name="bottomMargin"> + <number>0</number> </property> - <property name="html"> - <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Select an external tool to view more information about it.</p></body></html></string> + <item> + <widget class="QLabel" name="selectToolPackLabel"> + <property name="text"> + <string>Download link</string> + </property> + </widget> + </item> + <item alignment="Qt::AlignLeft"> + <widget class="QLabel" name="label"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="selectToolPackButton"> + <property name="text"> + <string>...</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QTreeWidget" name="twIntegratedTools"> + <property name="minimumSize"> + <size> + <width>200</width> + <height>0</height> + </size> + </property> + <property name="sizeAdjustPolicy"> + <enum>QAbstractScrollArea::AdjustToContents</enum> + </property> + <column> + <property name="text"> + <string>Name</string> </property> - </widget> - </item> - <item> - <widget class="QLabel" name="binaryPathLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> + </column> + <column> + <property name="text"> + <string>Path</string> </property> - <property name="frameShape"> - <enum>QFrame::NoFrame</enum> + </column> + </widget> + </item> + <item> + <spacer name="integratedToolsVerticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>0</width> + <height>4</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QWidget" name="customToolsContainerWidget" native="true"> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <property name="sizeConstraint"> + <enum>QLayout::SetMinAndMaxSize</enum> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QWidget" name="customToolsInnerWidget" native="true"> + <layout class="QVBoxLayout" name="verticalLayout_6"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QTreeWidget" name="twCustomTools"> + <property name="sizeAdjustPolicy"> + <enum>QAbstractScrollArea::AdjustToContents</enum> + </property> + <property name="columnCount"> + <number>2</number> + </property> + <column> + <property name="text"> + <string>Name</string> </property> + </column> + <column> <property name="text"> - <string>Binary path:</string> + <string>Path</string> </property> - <property name="scaledContents"> - <bool>true</bool> + </column> + </widget> + </item> + <item> + <widget class="QWidget" name="buttonsContainer" native="true"> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <property name="leftMargin"> + <number>0</number> </property> - </widget> - </item> - <item> - <widget class="QLabel" name="versionLabel"> - <property name="text"> - <string>Version info</string> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - </layout> + <item> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="pbImport"> + <property name="text"> + <string>Import</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="pbDelete"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Delete</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QWidget" name="infoContainerWidget" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <layout class="QVBoxLayout" name="verticalLayout_7"> + <property name="sizeConstraint"> + <enum>QLayout::SetMinAndMaxSize</enum> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QWidget" name="infoInnerWidget" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <property name="baseSize"> + <size> + <width>0</width> + <height>140</height> + </size> + </property> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <layout class="QVBoxLayout" name="verticalLayout_5"> + <property name="sizeConstraint"> + <enum>QLayout::SetDefaultConstraint</enum> + </property> + <item> + <widget class="QTextBrowser" name="descriptionTextBrowser"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>75</height> + </size> + </property> + <property name="sizeAdjustPolicy"> + <enum>QAbstractScrollArea::AdjustToContentsOnFirstShow</enum> + </property> + <property name="readOnly"> + <bool>true</bool> + </property> + <property name="html"> + <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Select an external tool to view more information about it.</p></body></html></string> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="binaryPathLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="frameShape"> + <enum>QFrame::NoFrame</enum> + </property> + <property name="text"> + <string>Binary path:</string> + </property> + <property name="scaledContents"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="versionLabel"> + <property name="text"> + <string>Version info</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + </spacer> </item> </layout> </widget> diff --git a/src/plugins/external_tool_support/src/ExternalToolManager.cpp b/src/plugins/external_tool_support/src/ExternalToolManager.cpp index eda4932c917c173839e3abccc5214e179955a10a..028b831f9bdaf1b4d88047e34c3008748633aa9e 100644 --- a/src/plugins/external_tool_support/src/ExternalToolManager.cpp +++ b/src/plugins/external_tool_support/src/ExternalToolManager.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,14 +23,17 @@ #include <QSet> #include <U2Core/AppContext.h> +#include <U2Core/CustomExternalTool.h> +#include <U2Core/MultiTask.h> #include <U2Core/PluginModel.h> +#include <U2Core/TaskSignalMapper.h> #include <U2Core/U2SafePoints.h> -#include <U2Core/MultiTask.h> +#include "ExternalToolManager.h" +#include "ExternalToolSupportSettings.h" +#include "custom_tools/LoadCustomExternalToolsTask.h" #include "utils/ExternalToolSearchTask.h" #include "utils/ExternalToolValidateTask.h" -#include "ExternalToolSupportSettings.h" -#include "ExternalToolManager.h" namespace U2 { @@ -40,16 +43,18 @@ ExternalToolManagerImpl::ExternalToolManagerImpl() : etRegistry = AppContext::getExternalToolRegistry(); } -ExternalToolManagerImpl::~ExternalToolManagerImpl() { -} - void ExternalToolManagerImpl::start() { + if (nullptr != etRegistry && !startupChecks) { + connect(etRegistry, SIGNAL(si_toolAdded(const QString &)), SLOT(sl_customToolImported(const QString &))); + connect(etRegistry, SIGNAL(si_toolIsAboutToBeRemoved(const QString &)), SLOT(sl_customToolRemoved(const QString &))); + } + if (AppContext::getPluginSupport()->isAllPluginsLoaded()) { sl_pluginsLoaded(); } else { connect(AppContext::getPluginSupport(), - SIGNAL(si_allStartUpPluginsLoaded()), - SLOT(sl_pluginsLoaded())); + SIGNAL(si_allStartUpPluginsLoaded()), + SLOT(sl_pluginsLoaded())); } } @@ -61,20 +66,7 @@ void ExternalToolManagerImpl::innerStart() { searchList.clear(); toolStates.clear(); - // Read settings - ExternalToolSupportSettings::getExternalTools(); - - QList<ExternalTool*> toolsList = etRegistry->getAllEntries(); - StrStrMap toolPaths; - foreach (ExternalTool* tool, toolsList) { - SAFE_POINT(tool, "Tool is NULL", ); - QString toolPath = addTool(tool); - if (!toolPath.isEmpty()) { - toolPaths.insert(tool->getName(), toolPath); - } - } - - validateTools(toolPaths); + loadCustomTools(); } void ExternalToolManagerImpl::checkStartupTasksState() { @@ -82,35 +74,41 @@ void ExternalToolManagerImpl::checkStartupTasksState() { CHECK(!toolStates.values().contains(ValidationIsInProcess) && !toolStates.values().contains(SearchingIsInProcess), ); startupChecks = false; ExternalToolSupportSettings::setExternalTools(); + + connect(etRegistry, SIGNAL(si_toolAdded(const QString &)), SLOT(sl_customToolImported(const QString &))); + connect(etRegistry, SIGNAL(si_toolIsAboutToBeRemoved(const QString &)), SLOT(sl_customToolRemoved(const QString &))); + emit si_startupChecksFinish(); } void ExternalToolManagerImpl::stop() { CHECK(etRegistry, ); - foreach (ExternalTool* tool, etRegistry->getAllEntries()) { + foreach(ExternalTool* tool, etRegistry->getAllEntries()) { disconnect(tool, NULL, this, NULL); } + disconnect(etRegistry, SIGNAL(si_toolAdded(const QString &)), this, SLOT(sl_customToolImported(const QString &))); + disconnect(etRegistry, SIGNAL(si_toolIsAboutToBeRemoved(const QString &)), this, SLOT(sl_customToolRemoved(const QString &))); } -void ExternalToolManagerImpl::check(const QString& toolName, const QString& toolPath, ExternalToolValidationListener* listener) { +void ExternalToolManagerImpl::check(const QString& toolId, const QString& toolPath, ExternalToolValidationListener* listener) { StrStrMap toolPaths; - toolPaths.insert(toolName, toolPath); - check(QStringList() << toolName, toolPaths, listener); + toolPaths.insert(toolId, toolPath); + check(QStringList() << toolId, toolPaths, listener); } -void ExternalToolManagerImpl::check(const QStringList& toolNames, const StrStrMap& toolPaths, ExternalToolValidationListener* listener) { +void ExternalToolManagerImpl::check(const QStringList& toolIds, const StrStrMap& toolPaths, ExternalToolValidationListener* listener) { SAFE_POINT(etRegistry, "The external tool registry is NULL", ); SAFE_POINT(listener, "Listener is NULL", ); QList<Task*> taskList; - foreach (const QString& toolName, toolNames) { - QString toolPath = toolPaths.value(toolName); - if (dependenciesAreOk(toolName) && !toolPath.isEmpty()) { - ExternalToolValidateTask* task = new ExternalToolJustValidateTask(toolName, toolPath); + foreach(const QString& toolId, toolIds) { + QString toolPath = toolPaths.value(toolId); + if (dependenciesAreOk(toolId) && !toolPath.isEmpty()) { + ExternalToolValidateTask* task = new ExternalToolJustValidateTask(toolId, AppContext::getExternalToolRegistry()->getToolNameById(toolId), toolPath); taskList << task; } else { - listener->setToolState(toolName, false); + listener->setToolState(toolId, false); } } @@ -127,30 +125,31 @@ void ExternalToolManagerImpl::check(const QStringList& toolNames, const StrStrMa } } -void ExternalToolManagerImpl::validate(const QString& toolName, ExternalToolValidationListener* listener) { - validate(QStringList() << toolName, listener); +void ExternalToolManagerImpl::validate(const QString& toolId, ExternalToolValidationListener* listener) { + validate(QStringList() << toolId, listener); } -void ExternalToolManagerImpl::validate(const QString& toolName, const QString& path, ExternalToolValidationListener* listener) { +void ExternalToolManagerImpl::validate(const QString& toolId, const QString& path, ExternalToolValidationListener* listener) { StrStrMap toolPaths; - toolPaths.insert(toolName, path); - validate(QStringList() << toolName, toolPaths, listener); + toolPaths.insert(toolId, path); + validate(QStringList() << toolId, toolPaths, listener); } -void ExternalToolManagerImpl::validate(const QStringList& toolNames, ExternalToolValidationListener* listener) { - validate(toolNames, StrStrMap(), listener); +void ExternalToolManagerImpl::validate(const QStringList& toolIds, ExternalToolValidationListener* listener) { + validate(toolIds, StrStrMap(), listener); } -void ExternalToolManagerImpl::validate(const QStringList& toolNames, const StrStrMap& toolPaths, ExternalToolValidationListener* listener) { +void ExternalToolManagerImpl::validate(const QStringList& toolIds, const StrStrMap& toolPaths, ExternalToolValidationListener* listener) { SAFE_POINT(etRegistry, "The external tool registry is NULL", ); - foreach (const QString& toolName, toolNames) { - if (dependenciesAreOk(toolName)) { - validateList << toolName; + foreach(const QString& toolId, toolIds) { + etRegistry->getById(toolId)->setAdditionalErrorMessage(QString()); + if (dependenciesAreOk(toolId)) { + validateList << toolId; } else { - toolStates.insert(toolName, NotValidByDependency); - if (toolPaths.contains(toolName)) { - setToolPath(toolName, toolPaths.value(toolName)); + toolStates.insert(toolId, NotValidByDependency); + if (toolPaths.contains(toolId)) { + setToolPath(toolId, toolPaths.value(toolId)); } } } @@ -162,14 +161,14 @@ void ExternalToolManagerImpl::validate(const QStringList& toolNames, const StrSt validateTools(toolPaths, listener); } -bool ExternalToolManagerImpl::isValid(const QString& toolName) const { +bool ExternalToolManagerImpl::isValid(const QString& toolId) const { SAFE_POINT(etRegistry, "The external tool registry is NULL", false); - return (Valid == toolStates.value(toolName, NotDefined)); + return (Valid == toolStates.value(toolId, NotDefined)); } -ExternalToolManager::ExternalToolState ExternalToolManagerImpl::getToolState(const QString& toolName) const { - return toolStates.value(toolName, NotDefined); +ExternalToolManager::ExternalToolState ExternalToolManagerImpl::getToolState(const QString& toolId) const { + return toolStates.value(toolId, NotDefined); } QString ExternalToolManagerImpl::addTool(ExternalTool* tool) { @@ -177,39 +176,42 @@ QString ExternalToolManagerImpl::addTool(ExternalTool* tool) { QString toolPath; if (tool->isValid()) { - toolStates.insert(tool->getName(), Valid); + toolStates.insert(tool->getId(), Valid); } else { - toolStates.insert(tool->getName(), NotDefined); + toolStates.insert(tool->getId(), NotDefined); } connect(tool, - SIGNAL(si_toolValidationStatusChanged(bool)), - SLOT(sl_toolValidationStatusChanged(bool))); + SIGNAL(si_toolValidationStatusChanged(bool)), + SLOT(sl_toolValidationStatusChanged(bool))); QStringList toolDependencies = tool->getDependencies(); if (!toolDependencies.isEmpty()) { - foreach (const QString& dependency, toolDependencies) { - dependencies.insertMulti(dependency, tool->getName()); + foreach(const QString& dependency, toolDependencies) { + dependencies.insertMulti(dependency, tool->getId()); } - if (dependenciesAreOk(tool->getName()) && !tool->isValid()) { + if (dependenciesAreOk(tool->getId()) && !tool->isValid()) { if (tool->isModule()) { - QString masterName = tool->getDependencies().first(); - ExternalTool* masterTool = etRegistry->getByName(masterName); - SAFE_POINT(masterTool, QString("An external tool '%1' isn't found in the registry").arg(masterName), ""); + QString masterId = tool->getDependencies().first(); + ExternalTool* masterTool = etRegistry->getById(masterId); + SAFE_POINT(masterTool, QString("An external tool '%1' isn't found in the registry").arg(masterId), ""); toolPath = masterTool->getPath(); + } else { + toolPath = tool->getPath(); } - validateList << tool->getName(); + validateList << tool->getId(); } } else { if (!tool->isValid()) { - validateList << tool->getName(); + validateList << tool->getId(); + toolPath = tool->getPath(); } } - if (!validateList.contains(tool->getName()) && !tool->isModule() && !tool->isValid()) { - searchList << tool->getName(); + if (!validateList.contains(tool->getId()) && !tool->isModule() && !tool->isValid()) { + searchList << tool->getId(); } return toolPath; @@ -224,12 +226,11 @@ void ExternalToolManagerImpl::sl_checkTaskStateChanged() { if (listener) { listeners.remove(masterTask); - QList<Task*> subTasks = masterTask->getSubtasks(); - foreach (Task* subTask, subTasks) { - ExternalToolValidateTask* task = qobject_cast<ExternalToolValidateTask*>(subTask); + foreach(const QPointer<Task> &subTask, masterTask->getSubtasks()) { + ExternalToolValidateTask* task = qobject_cast<ExternalToolValidateTask*>(subTask.data()); SAFE_POINT(task, "Unexpected task", ); - listener->setToolState(task->getToolName(), task->isValidTool()); + listener->setToolState(task->getToolId(), task->isValidTool()); } listener->validationFinished(); } @@ -243,20 +244,20 @@ void ExternalToolManagerImpl::sl_validationTaskStateChanged() { if (task->isFinished()) { if (task->isValidTool()) { - toolStates.insert(task->getToolName(), Valid); + toolStates.insert(task->getToolId(), Valid); } else { - toolStates.insert(task->getToolName(), NotValid); + toolStates.insert(task->getToolId(), NotValid); } - ExternalTool* tool = etRegistry->getByName(task->getToolName()); + ExternalTool* tool = etRegistry->getById(task->getToolId()); SAFE_POINT(tool, QString("An external tool '%1' isn't found in the registry").arg(task->getToolName()), ); if (tool->isModule()) { QStringList toolDependencies = tool->getDependencies(); SAFE_POINT(!toolDependencies.isEmpty(), QString("Tool's dependencies list is unexpectedly empty: " - "a master tool for the module '%1' is not defined").arg(tool->getName()), ); - QString masterName = toolDependencies.first(); - ExternalTool* masterTool = etRegistry->getByName(masterName); - SAFE_POINT(tool, QString("An external tool '%1' isn't found in the registry").arg(masterName), ); + "a master tool for the module '%1' is not defined").arg(tool->getId()), ); + QString masterId = toolDependencies.first(); + ExternalTool* masterTool = etRegistry->getById(masterId); + SAFE_POINT(tool, QString("An external tool '%1' isn't found in the registry").arg(masterId), ); SAFE_POINT(masterTool->getPath() == task->getToolPath(), "Module tool should have the same path as it's master tool", ); } @@ -265,6 +266,7 @@ void ExternalToolManagerImpl::sl_validationTaskStateChanged() { tool->setValid(task->isValidTool()); searchTools(); + ExternalToolSupportSettings::setExternalTools(); } checkStartupTasksState(); @@ -278,10 +280,10 @@ void ExternalToolManagerImpl::sl_searchTaskStateChanged() { if (task->isFinished()) { QStringList toolPaths = task->getPaths(); if (!toolPaths.isEmpty()) { - setToolPath(task->getToolName(), toolPaths.first()); - toolStates.insert(task->getToolName(), dependenciesAreOk(task->getToolName()) ? NotValidByDependency : NotValid); + setToolPath(task->getToolId(), toolPaths.first()); + toolStates.insert(task->getToolId(), dependenciesAreOk(task->getToolId()) ? NotValidByDependency : NotValid); } else { - toolStates.insert(task->getToolName(), NotValid); + toolStates.insert(task->getToolId(), NotValid); } } @@ -294,29 +296,29 @@ void ExternalToolManagerImpl::sl_toolValidationStatusChanged(bool isValid) { SAFE_POINT(tool, "Unexpected message sender", ); if (isValid) { - toolStates.insert(tool->getName(), Valid); + toolStates.insert(tool->getId(), Valid); } else { - toolStates.insert(tool->getName(), NotValid); + toolStates.insert(tool->getId(), NotValid); } StrStrMap toolPaths; - foreach (const QString& vassalName, dependencies.values(tool->getName())) { - ExternalTool* vassalTool = etRegistry->getByName(vassalName); - SAFE_POINT(vassalTool, QString("An external tool '%1' isn't found in the registry").arg(vassalName), ); + foreach(const QString& vassalId, dependencies.values(tool->getId())) { + ExternalTool* vassalTool = etRegistry->getById(vassalId); + SAFE_POINT(vassalTool, QString("An external tool '%1' isn't found in the registry").arg(vassalId), ); if (vassalTool->isModule()) { - toolPaths.insert(vassalName, tool->getPath()); - setToolPath(vassalName, tool->getPath()); + toolPaths.insert(vassalId, tool->getPath()); + setToolPath(vassalId, tool->getPath()); } if (isValid && - dependenciesAreOk(vassalName) && - ValidationIsInProcess != toolStates.value(vassalName, NotDefined)) { - validateList << vassalName; - searchList.removeAll(vassalName); - } else if (ValidationIsInProcess != toolStates.value(vassalName, NotDefined)) { + dependenciesAreOk(vassalId) && + ValidationIsInProcess != toolStates.value(vassalId, NotDefined)) { + validateList << vassalId; + searchList.removeAll(vassalId); + } else if (ValidationIsInProcess != toolStates.value(vassalId, NotDefined)) { vassalTool->setValid(false); - toolStates.insert(vassalName, NotValidByDependency); + toolStates.insert(vassalId, NotValidByDependency); } } @@ -327,45 +329,93 @@ void ExternalToolManagerImpl::sl_pluginsLoaded() { innerStart(); } -bool ExternalToolManagerImpl::dependenciesAreOk(const QString& toolName) { +void ExternalToolManagerImpl::sl_customToolsLoaded(Task *task) { + LoadCustomExternalToolsTask *loadTask = qobject_cast<LoadCustomExternalToolsTask *>(task); + SAFE_POINT(nullptr != loadTask, "Unexpected task, can't cast it to LoadCustomExternalToolsTask *", ); + + ExternalToolSupportSettings::loadExternalTools(); + + QList<ExternalTool*> toolsList = etRegistry->getAllEntries(); + StrStrMap toolPaths; + foreach(ExternalTool * tool, toolsList) { + SAFE_POINT(tool, "Tool is NULL", ); + QString toolPath = addTool(tool); + if (!toolPath.isEmpty()) { + toolPaths.insert(tool->getId(), toolPath); + } + } + + validateTools(toolPaths); +} + +void ExternalToolManagerImpl::sl_customToolImported(const QString &toolId) { + SAFE_POINT(nullptr != etRegistry, "The external tool registry is nullptr", ); + ExternalTool *tool = etRegistry->getById(toolId); + SAFE_POINT(nullptr != tool, "Tool is nullptr", ); + + StrStrMap toolPaths; + const QString toolPath = addTool(tool); + if (!toolPath.isEmpty()) { + toolPaths.insert(tool->getId(), toolPath); + } + + validateTools(toolPaths); +} + +void ExternalToolManagerImpl::sl_customToolRemoved(const QString &toolId) { + toolStates.remove(toolId); + QMutableMapIterator<QString, QString> iterator(dependencies); + while (iterator.hasNext()) { + auto item = iterator.next(); + if (toolId == item.key() || toolId == item.value()) { + iterator.remove(); + } + } +} + +bool ExternalToolManagerImpl::dependenciesAreOk(const QString& toolId) { bool result = true; - foreach (const QString& masterName, dependencies.keys(toolName)) { - result &= (Valid == toolStates.value(masterName, NotDefined)); + QStringList dependencyList = dependencies.keys(toolId); + foreach(const QString& masterId, dependencyList) { + CHECK_OPERATIONS(toolStates.keys().contains(masterId), + coreLog.details(tr("A dependency tool isn't represented in the general tool list. Skip dependency \"%1\"").arg(masterId)), + continue); + + result &= (Valid == toolStates.value(masterId, NotDefined)); } return result; } void ExternalToolManagerImpl::validateTools(const StrStrMap& toolPaths, ExternalToolValidationListener* listener) { QList<Task*> taskList; - - foreach (QString toolName, validateList) { - validateList.removeAll(toolName); - toolStates.insert(toolName, ValidationIsInProcess); + foreach(QString toolId, validateList) { + validateList.removeAll(toolId); + toolStates.insert(toolId, ValidationIsInProcess); QString toolPath; - bool pathSpecified = toolPaths.contains(toolName); + bool pathSpecified = toolPaths.contains(toolId); if (pathSpecified) { - toolPath = toolPaths.value(toolName); + toolPath = toolPaths.value(toolId); if (toolPath.isEmpty()) { - toolStates.insert(toolName, NotValid); - setToolPath(toolName, toolPath); + toolStates.insert(toolId, NotValid); + setToolPath(toolId, toolPath); if (listener) { - listener->setToolState(toolName, false); + listener->setToolState(toolId, false); } - setToolValid(toolName, false); + setToolValid(toolId, false); continue; } } ExternalToolValidateTask* task; if (pathSpecified) { - task = new ExternalToolJustValidateTask(toolName, toolPath); + task = new ExternalToolJustValidateTask(toolId, AppContext::getExternalToolRegistry()->getToolNameById(toolId), toolPath); } else { - task = new ExternalToolSearchAndValidateTask(toolName); + task = new ExternalToolSearchAndValidateTask(toolId, AppContext::getExternalToolRegistry()->getToolNameById(toolId)); } connect(task, - SIGNAL(si_stateChanged()), - SLOT(sl_validationTaskStateChanged())); + SIGNAL(si_stateChanged()), + SLOT(sl_validationTaskStateChanged())); taskList << task; } @@ -379,7 +429,7 @@ void ExternalToolManagerImpl::validateTools(const StrStrMap& toolPaths, External TaskScheduler* scheduler = AppContext::getTaskScheduler(); SAFE_POINT(scheduler, "Task scheduler is NULL", ); scheduler->registerTopLevelTask(validationTask); - } else { + } else { if (listener) { listener->validationFinished(); } @@ -388,16 +438,22 @@ void ExternalToolManagerImpl::validateTools(const StrStrMap& toolPaths, External checkStartupTasksState(); } +void ExternalToolManagerImpl::loadCustomTools() { + LoadCustomExternalToolsTask *loadTask = new LoadCustomExternalToolsTask(); + connect(new TaskSignalMapper(loadTask), SIGNAL(si_taskSucceeded(Task *)), SLOT(sl_customToolsLoaded(Task *))); + AppContext::getTaskScheduler()->registerTopLevelTask(loadTask); +} + void ExternalToolManagerImpl::searchTools() { QList<Task*> taskList; - foreach (const QString& toolName, searchList) { - searchList.removeAll(toolName); - toolStates.insert(toolName, SearchingIsInProcess); - ExternalToolSearchTask* task = new ExternalToolSearchTask(toolName); + foreach(const QString& toolId, searchList) { + searchList.removeAll(toolId); + toolStates.insert(toolId, SearchingIsInProcess); + ExternalToolSearchTask* task = new ExternalToolSearchTask(toolId); connect(task, - SIGNAL(si_stateChanged()), - SLOT(sl_searchTaskStateChanged())); + SIGNAL(si_stateChanged()), + SLOT(sl_searchTaskStateChanged())); taskList << task; } @@ -411,17 +467,17 @@ void ExternalToolManagerImpl::searchTools() { checkStartupTasksState(); } -void ExternalToolManagerImpl::setToolPath(const QString& toolName, const QString& toolPath) { +void ExternalToolManagerImpl::setToolPath(const QString& toolId, const QString& toolPath) { SAFE_POINT(etRegistry, "The external tool registry is NULL", ); - ExternalTool* tool = etRegistry->getByName(toolName); - SAFE_POINT(tool, QString("An external tool '%1' isn't found in the registry").arg(toolName), ); + ExternalTool* tool = etRegistry->getById(toolId); + SAFE_POINT(tool, QString("An external tool '%1' isn't found in the registry").arg(toolId), ); tool->setPath(toolPath); } -void ExternalToolManagerImpl::setToolValid(const QString& toolName, bool isValid) { +void ExternalToolManagerImpl::setToolValid(const QString& toolId, bool isValid) { SAFE_POINT(etRegistry, "The external tool registry is NULL", ); - ExternalTool* tool = etRegistry->getByName(toolName); - SAFE_POINT(tool, QString("An external tool '%1' isn't found in the registry").arg(toolName), ); + ExternalTool* tool = etRegistry->getById(toolId); + SAFE_POINT(tool, QString("An external tool '%1' isn't found in the registry").arg(toolId), ); tool->setValid(isValid); } diff --git a/src/plugins/external_tool_support/src/ExternalToolManager.h b/src/plugins/external_tool_support/src/ExternalToolManager.h index b36113dc62d948456a28e858b3d22bd50186dd92..150ba70428f838a26604feb87ba4969dbdd9d9c1 100644 --- a/src/plugins/external_tool_support/src/ExternalToolManager.h +++ b/src/plugins/external_tool_support/src/ExternalToolManager.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,8 +22,9 @@ #ifndef _U2_EXTERNAL_TOOL_VALIDATION_MANAGER_H_ #define _U2_EXTERNAL_TOOL_VALIDATION_MANAGER_H_ -#include <QObject> #include <QEventLoop> +#include <QList> +#include <QObject> #include <U2Core/global.h> #include <U2Core/ExternalToolRegistry.h> @@ -31,6 +32,7 @@ namespace U2 { class ExternalToolsValidateTask; +class Task; /** * Manager can sort an external tools list by their dependencies, @@ -41,24 +43,23 @@ class ExternalToolManagerImpl : public ExternalToolManager { Q_OBJECT public: ExternalToolManagerImpl(); - virtual ~ExternalToolManagerImpl(); virtual void start(); virtual void stop(); - virtual void check(const QString& toolName, const QString& toolPath, ExternalToolValidationListener* listener); - virtual void check(const QStringList& toolNames, const StrStrMap& toolPaths, ExternalToolValidationListener* listener); + virtual void check(const QString& toolId, const QString& toolPath, ExternalToolValidationListener* listener); + virtual void check(const QStringList& toolId, const StrStrMap& toolPaths, ExternalToolValidationListener* listener); - virtual void validate(const QString& toolName, ExternalToolValidationListener* listener = NULL); - virtual void validate(const QString& toolName, const QString& path, ExternalToolValidationListener* listener = NULL); - virtual void validate(const QStringList& toolNames, ExternalToolValidationListener* listener = NULL); - virtual void validate(const QStringList& toolNames, const StrStrMap& toolPaths, ExternalToolValidationListener* listener = NULL); + virtual void validate(const QString& toolId, ExternalToolValidationListener* listener = nullptr); + virtual void validate(const QString& toolId, const QString& path, ExternalToolValidationListener* listener = nullptr); + virtual void validate(const QStringList& toolIds, ExternalToolValidationListener* listener = nullptr); + virtual void validate(const QStringList& toolIds, const StrStrMap& toolPaths, ExternalToolValidationListener* listener = nullptr); - virtual bool isValid(const QString& toolName) const; - virtual ExternalToolState getToolState(const QString& toolName) const; + virtual bool isValid(const QString& toolIds) const; + virtual ExternalToolState getToolState(const QString& toolId) const; signals: - void si_validationComplete(const QStringList& toolNames, QObject* receiver = NULL, const char* slot = NULL); + void si_validationComplete(const QStringList& toolIds, QObject* receiver = nullptr, const char* slot = nullptr); private slots: void sl_checkTaskStateChanged(); @@ -66,16 +67,20 @@ private slots: void sl_searchTaskStateChanged(); void sl_toolValidationStatusChanged(bool isValid); void sl_pluginsLoaded(); + void sl_customToolsLoaded(Task *loadTask); + void sl_customToolImported(const QString &toolId); + void sl_customToolRemoved(const QString &toolId); private: void innerStart(); void checkStartupTasksState(); QString addTool(ExternalTool* tool); - bool dependenciesAreOk(const QString& toolName); - void validateTools(const StrStrMap& toolPaths = StrStrMap(), ExternalToolValidationListener* listener = NULL); + bool dependenciesAreOk(const QString& toolId); + void validateTools(const StrStrMap& toolPaths = StrStrMap(), ExternalToolValidationListener* listener = nullptr); + void loadCustomTools(); void searchTools(); - void setToolPath(const QString& toolName, const QString& toolPath); - void setToolValid(const QString& toolName, bool isValid); + void setToolPath(const QString& toolId, const QString& toolPath); + void setToolValid(const QString& toolId, bool isValid); ExternalToolRegistry* etRegistry; QList<QString> validateList; diff --git a/src/plugins/external_tool_support/src/ExternalToolSupportL10N.h b/src/plugins/external_tool_support/src/ExternalToolSupportL10N.h index cb200f216a08c7afc3b6589e764b2c039ef0635a..d595701e302af05dc6464fd554abd4693f144c96 100644 --- a/src/plugins/external_tool_support/src/ExternalToolSupportL10N.h +++ b/src/plugins/external_tool_support/src/ExternalToolSupportL10N.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/ExternalToolSupportPlugin.cpp b/src/plugins/external_tool_support/src/ExternalToolSupportPlugin.cpp index ffbe1e7f8de39fb3aa909feb2384b0141d7e2f7b..90590b891c05e237f3a59332dd7d873f20ed1a19 100644 --- a/src/plugins/external_tool_support/src/ExternalToolSupportPlugin.cpp +++ b/src/plugins/external_tool_support/src/ExternalToolSupportPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -80,6 +80,7 @@ #include "bowtie2/Bowtie2Support.h" #include "bowtie2/Bowtie2Task.h" #include "bowtie2/Bowtie2Worker.h" +#include "bowtie2/bowtie2_tests/Bowtie2Tests.h" #include "bwa/BwaMemWorker.h" #include "bwa/BwaSettingsWidget.h" #include "bwa/BwaSupport.h" @@ -135,6 +136,7 @@ #include "spades/SpadesSettingsWidget.h" #include "spades/SpadesSupport.h" #include "spades/SpadesTask.h" +#include "spades/SpadesTaskTest.h" #include "spades/SpadesWorker.h" #include "spidey/SpideySupport.h" #include "spidey/SpideySupportTask.h" @@ -188,7 +190,7 @@ public: foreach(ExternalTool* curTool, AppContext::getExternalToolRegistry()->getAllEntries()){ // UGENE-1781: Remove python external tool search in PATH // It should be fixed without crutches. - if (curTool->getName() == ET_PYTHON) { + if (curTool->getId() == PythonSupport::ET_PYTHON_ID) { continue; } @@ -199,7 +201,7 @@ public: QString exePath = curPath+"/"+curTool->getExecutableFileName(); QFileInfo fileExe(exePath); if(fileExe.exists() && (curTool->getPath()=="")){ - ExternalToolJustValidateTask* validateTask=new ExternalToolJustValidateTask(curTool->getName(), exePath); + ExternalToolJustValidateTask* validateTask = new ExternalToolJustValidateTask(curTool->getId(), curTool->getName(), exePath); connect(validateTask, SIGNAL(si_stateChanged()), plugin, SLOT(sl_validateTaskStateChanged())); addSubTask(validateTask); } @@ -223,66 +225,67 @@ ExternalToolSupportPlugin::ExternalToolSupportPlugin() : CHECK(NULL != etRegistry, ); // python with modules - etRegistry->registerEntry(new PythonSupport(ET_PYTHON)); - etRegistry->registerEntry(new PythonModuleDjangoSupport(ET_PYTHON_DJANGO)); - etRegistry->registerEntry(new PythonModuleNumpySupport(ET_PYTHON_NUMPY)); + etRegistry->registerEntry(new PythonSupport(PythonSupport::ET_PYTHON_ID, PythonSupport::ET_PYTHON)); + etRegistry->registerEntry(new PythonModuleDjangoSupport(PythonModuleDjangoSupport::ET_PYTHON_DJANGO_ID, PythonModuleDjangoSupport::ET_PYTHON_DJANGO)); + etRegistry->registerEntry(new PythonModuleNumpySupport(PythonModuleNumpySupport::ET_PYTHON_NUMPY_ID, PythonModuleNumpySupport::ET_PYTHON_NUMPY)); + etRegistry->registerEntry(new PythonModuleBioSupport(PythonModuleBioSupport::ET_PYTHON_BIO_ID, PythonModuleBioSupport::ET_PYTHON_BIO)); // Rscript with modules - etRegistry->registerEntry(new RSupport(ET_R)); - etRegistry->registerEntry(new RModuleGostatsSupport(ET_R_GOSTATS)); - etRegistry->registerEntry(new RModuleGodbSupport(ET_R_GO_DB)); - etRegistry->registerEntry(new RModuleHgu133adbSupport(ET_R_HGU133A_DB)); - etRegistry->registerEntry(new RModuleHgu133bdbSupport(ET_R_HGU133B_DB)); - etRegistry->registerEntry(new RModuleHgu133plus2dbSupport(ET_R_HGU1333PLUS2_DB)); - etRegistry->registerEntry(new RModuleHgu95av2dbSupport(ET_R_HGU95AV2_DB)); - etRegistry->registerEntry(new RModuleMouse430a2dbSupport(ET_R_MOUSE430A2_DB)); - etRegistry->registerEntry(new RModuleCelegansdbSupport(ET_R_CELEGANS_DB)); - etRegistry->registerEntry(new RModuleDrosophila2dbSupport(ET_R_DROSOPHILA2_DB)); - etRegistry->registerEntry(new RModuleOrghsegdbSupport(ET_R_ORG_HS_EG_DB)); - etRegistry->registerEntry(new RModuleOrgmmegdbSupport(ET_R_ORG_MM_EG_DB)); - etRegistry->registerEntry(new RModuleOrgceegdbSupport(ET_R_ORG_CE_EG_DB)); - etRegistry->registerEntry(new RModuleOrgdmegdbSupport(ET_R_ORG_DM_EG_DB)); - etRegistry->registerEntry(new RModuleSeqlogoSupport(ET_R_SEQLOGO)); + etRegistry->registerEntry(new RSupport(RSupport::ET_R_ID, RSupport::ET_R)); + etRegistry->registerEntry(new RModuleGostatsSupport(RModuleGostatsSupport::ET_R_GOSTATS_ID, RModuleGostatsSupport::ET_R_GOSTATS)); + etRegistry->registerEntry(new RModuleGodbSupport(RModuleGodbSupport::ET_R_GO_DB_ID, RModuleGodbSupport::ET_R_GO_DB)); + etRegistry->registerEntry(new RModuleHgu133adbSupport(RModuleHgu133adbSupport::ET_R_HGU133A_DB_ID, RModuleHgu133adbSupport::ET_R_HGU133A_DB)); + etRegistry->registerEntry(new RModuleHgu133bdbSupport(RModuleHgu133bdbSupport::ET_R_HGU133B_DB_ID, RModuleHgu133bdbSupport::ET_R_HGU133B_DB)); + etRegistry->registerEntry(new RModuleHgu133plus2dbSupport(RModuleHgu133plus2dbSupport::ET_R_HGU1333PLUS2_DB_ID, RModuleHgu133plus2dbSupport::ET_R_HGU1333PLUS2_DB)); + etRegistry->registerEntry(new RModuleHgu95av2dbSupport(RModuleHgu95av2dbSupport::ET_R_HGU95AV2_DB_ID, RModuleHgu95av2dbSupport::ET_R_HGU95AV2_DB)); + etRegistry->registerEntry(new RModuleMouse430a2dbSupport(RModuleMouse430a2dbSupport::ET_R_MOUSE430A2_DB_ID, RModuleMouse430a2dbSupport::ET_R_MOUSE430A2_DB)); + etRegistry->registerEntry(new RModuleCelegansdbSupport(RModuleCelegansdbSupport::ET_R_CELEGANS_DB_ID, RModuleCelegansdbSupport::ET_R_CELEGANS_DB)); + etRegistry->registerEntry(new RModuleDrosophila2dbSupport(RModuleDrosophila2dbSupport::ET_R_DROSOPHILA2_DB_ID, RModuleDrosophila2dbSupport::ET_R_DROSOPHILA2_DB)); + etRegistry->registerEntry(new RModuleOrghsegdbSupport(RModuleOrghsegdbSupport::ET_R_ORG_HS_EG_DB_ID, RModuleOrghsegdbSupport::ET_R_ORG_HS_EG_DB)); + etRegistry->registerEntry(new RModuleOrgmmegdbSupport(RModuleOrgmmegdbSupport::ET_R_ORG_MM_EG_DB_ID, RModuleOrgmmegdbSupport::ET_R_ORG_MM_EG_DB)); + etRegistry->registerEntry(new RModuleOrgceegdbSupport(RModuleOrgceegdbSupport::ET_R_ORG_CE_EG_DB_ID, RModuleOrgceegdbSupport::ET_R_ORG_CE_EG_DB)); + etRegistry->registerEntry(new RModuleOrgdmegdbSupport(RModuleOrgdmegdbSupport::ET_R_ORG_DM_EG_DB_ID, RModuleOrgdmegdbSupport::ET_R_ORG_DM_EG_DB)); + etRegistry->registerEntry(new RModuleSeqlogoSupport(RModuleSeqlogoSupport::ET_R_SEQLOGO_ID, RModuleSeqlogoSupport::ET_R_SEQLOGO)); //perl - PerlSupport *perlSupport = new PerlSupport(ET_PERL); + PerlSupport *perlSupport = new PerlSupport(PerlSupport::ET_PERL_ID, PerlSupport::ET_PERL); etRegistry->registerEntry(perlSupport); //java - JavaSupport *javaSupport = new JavaSupport(ET_JAVA); + JavaSupport *javaSupport = new JavaSupport(JavaSupport::ET_JAVA_ID, JavaSupport::ET_JAVA); etRegistry->registerEntry(javaSupport); //Fill ExternalToolRegistry with supported tools //ClustalW - ClustalWSupport* clustalWTool=new ClustalWSupport(ET_CLUSTAL); + ClustalWSupport* clustalWTool=new ClustalWSupport(ClustalWSupport::ET_CLUSTAL_ID, ClustalWSupport::ET_CLUSTAL); etRegistry->registerEntry(clustalWTool); //ClustalO - ClustalOSupport* clustalOTool=new ClustalOSupport(ET_CLUSTALO); + ClustalOSupport* clustalOTool=new ClustalOSupport(ClustalOSupport::ET_CLUSTALO_ID, ClustalOSupport::ET_CLUSTALO); etRegistry->registerEntry(clustalOTool); //MAFFT - MAFFTSupport* mAFFTTool=new MAFFTSupport(ET_MAFFT); + MAFFTSupport* mAFFTTool=new MAFFTSupport(MAFFTSupport::ET_MAFFT_ID, MAFFTSupport::ET_MAFFT); etRegistry->registerEntry(mAFFTTool); //T-Coffee - TCoffeeSupport* tCoffeeTool=new TCoffeeSupport(ET_TCOFFEE); + TCoffeeSupport* tCoffeeTool=new TCoffeeSupport(TCoffeeSupport::ET_TCOFFEE_ID, TCoffeeSupport::ET_TCOFFEE); etRegistry->registerEntry(tCoffeeTool); //MrBayes - MrBayesSupport* mrBayesTool = new MrBayesSupport(ET_MRBAYES); + MrBayesSupport* mrBayesTool = new MrBayesSupport(MrBayesSupport::ET_MRBAYES_ID, MrBayesSupport::ET_MRBAYES); etRegistry->registerEntry(mrBayesTool); //PhyML - PhyMLSupport* phyMlTool = new PhyMLSupport(PhyMLSupport::PhyMlRegistryId); + PhyMLSupport* phyMlTool = new PhyMLSupport(PhyMLSupport::PHYML_ID, PhyMLSupport::PHYML); etRegistry->registerEntry(phyMlTool); if (AppContext::getMainWindow()) { clustalWTool->getViewContext()->setParent(this); clustalWTool->getViewContext()->init(); - ExternalToolSupportAction* clustalWAction = new ExternalToolSupportAction(tr("Align with ClustalW..."), this, QStringList(ET_CLUSTAL)); + ExternalToolSupportAction* clustalWAction = new ExternalToolSupportAction(tr("Align with ClustalW..."), this, QStringList(ClustalWSupport::ET_CLUSTAL_ID)); clustalWAction->setObjectName(ToolsMenu::MALIGN_CLUSTALW); connect(clustalWAction, SIGNAL(triggered()), clustalWTool, SLOT(sl_runWithExtFileSpecify())); ToolsMenu::addAction(ToolsMenu::MALIGN_MENU, clustalWAction); @@ -290,7 +293,7 @@ ExternalToolSupportPlugin::ExternalToolSupportPlugin() : clustalOTool->getViewContext()->setParent(this); clustalOTool->getViewContext()->init(); - ExternalToolSupportAction* clustalOAction = new ExternalToolSupportAction(tr("Align with ClustalO..."), this, QStringList(ET_CLUSTALO)); + ExternalToolSupportAction* clustalOAction = new ExternalToolSupportAction(tr("Align with ClustalO..."), this, QStringList(ClustalOSupport::ET_CLUSTALO_ID)); clustalOAction->setObjectName(ToolsMenu::MALIGN_CLUSTALO); connect(clustalOAction, SIGNAL(triggered()), clustalOTool, SLOT(sl_runWithExtFileSpecify())); ToolsMenu::addAction(ToolsMenu::MALIGN_MENU, clustalOAction); @@ -298,7 +301,7 @@ ExternalToolSupportPlugin::ExternalToolSupportPlugin() : mAFFTTool->getViewContext()->setParent(this); mAFFTTool->getViewContext()->init(); - ExternalToolSupportAction* mAFFTAction= new ExternalToolSupportAction(tr("Align with MAFFT..."), this, QStringList(ET_MAFFT)); + ExternalToolSupportAction* mAFFTAction= new ExternalToolSupportAction(tr("Align with MAFFT..."), this, QStringList(MAFFTSupport::ET_MAFFT_ID)); mAFFTAction->setObjectName(ToolsMenu::MALIGN_MAFFT); connect(mAFFTAction, SIGNAL(triggered()), mAFFTTool, SLOT(sl_runWithExtFileSpecify())); ToolsMenu::addAction(ToolsMenu::MALIGN_MENU, mAFFTAction); @@ -306,160 +309,160 @@ ExternalToolSupportPlugin::ExternalToolSupportPlugin() : tCoffeeTool->getViewContext()->setParent(this); tCoffeeTool->getViewContext()->init(); - ExternalToolSupportAction* tCoffeeAction= new ExternalToolSupportAction(tr("Align with T-Coffee..."), this, QStringList(ET_TCOFFEE)); + ExternalToolSupportAction* tCoffeeAction= new ExternalToolSupportAction(tr("Align with T-Coffee..."), this, QStringList(TCoffeeSupport::ET_TCOFFEE_ID)); tCoffeeAction->setObjectName(ToolsMenu::MALIGN_TCOFFEE); connect(tCoffeeAction, SIGNAL(triggered()), tCoffeeTool, SLOT(sl_runWithExtFileSpecify())); ToolsMenu::addAction(ToolsMenu::MALIGN_MENU, tCoffeeAction); } //FormatDB - FormatDBSupport* formatDBTool = new FormatDBSupport(ET_FORMATDB); + FormatDBSupport* formatDBTool = new FormatDBSupport(FormatDBSupport::ET_FORMATDB_ID, FormatDBSupport::ET_FORMATDB); etRegistry->registerEntry(formatDBTool); //MakeBLASTDB from BLAST+ - FormatDBSupport* makeBLASTDBTool = new FormatDBSupport(ET_MAKEBLASTDB); + FormatDBSupport* makeBLASTDBTool = new FormatDBSupport(FormatDBSupport::ET_MAKEBLASTDB_ID, FormatDBSupport::ET_MAKEBLASTDB); etRegistry->registerEntry(makeBLASTDBTool); //BlastAll - BlastAllSupport* blastallTool = new BlastAllSupport(ET_BLASTALL); + BlastAllSupport* blastallTool = new BlastAllSupport(BlastAllSupport::ET_BLASTALL_ID, BlastAllSupport::ET_BLASTALL); etRegistry->registerEntry(blastallTool); - BlastPlusSupport* blastNPlusTool = new BlastPlusSupport(ET_BLASTN); + BlastPlusSupport* blastNPlusTool = new BlastPlusSupport(BlastPlusSupport::ET_BLASTN_ID, BlastPlusSupport::ET_BLASTN); etRegistry->registerEntry(blastNPlusTool); - BlastPlusSupport* blastPPlusTool = new BlastPlusSupport(ET_BLASTP); + BlastPlusSupport* blastPPlusTool = new BlastPlusSupport(BlastPlusSupport::ET_BLASTP_ID, BlastPlusSupport::ET_BLASTP); etRegistry->registerEntry(blastPPlusTool); - BlastPlusSupport* blastXPlusTool = new BlastPlusSupport(ET_BLASTX); + BlastPlusSupport* blastXPlusTool = new BlastPlusSupport(BlastPlusSupport::ET_BLASTX_ID, BlastPlusSupport::ET_BLASTX); etRegistry->registerEntry(blastXPlusTool); - BlastPlusSupport* tBlastNPlusTool = new BlastPlusSupport(ET_TBLASTN); + BlastPlusSupport* tBlastNPlusTool = new BlastPlusSupport(BlastPlusSupport::ET_TBLASTN_ID, BlastPlusSupport::ET_TBLASTN); etRegistry->registerEntry(tBlastNPlusTool); - BlastPlusSupport* tBlastXPlusTool = new BlastPlusSupport(ET_TBLASTX); + BlastPlusSupport* tBlastXPlusTool = new BlastPlusSupport(BlastPlusSupport::ET_TBLASTX_ID, BlastPlusSupport::ET_TBLASTX); etRegistry->registerEntry(tBlastXPlusTool); - BlastPlusSupport* rpsblastTool = new BlastPlusSupport(ET_RPSBLAST); + BlastPlusSupport* rpsblastTool = new BlastPlusSupport(BlastPlusSupport::ET_RPSBLAST_ID, BlastPlusSupport::ET_RPSBLAST); etRegistry->registerEntry(rpsblastTool); BlastDbCmdSupport* blastDbCmdSupport = new BlastDbCmdSupport(); etRegistry->registerEntry(blastDbCmdSupport); // CAP3 - CAP3Support* cap3Tool = new CAP3Support(ET_CAP3); + CAP3Support* cap3Tool = new CAP3Support(CAP3Support::ET_CAP3_ID, CAP3Support::ET_CAP3); etRegistry->registerEntry(cap3Tool); // Bowtie - BowtieSupport* bowtieSupport = new BowtieSupport(ET_BOWTIE); + BowtieSupport* bowtieSupport = new BowtieSupport(BowtieSupport::ET_BOWTIE_ID, BowtieSupport::ET_BOWTIE); etRegistry->registerEntry(bowtieSupport); - BowtieSupport* bowtieBuildSupport = new BowtieSupport(ET_BOWTIE_BUILD); + BowtieSupport* bowtieBuildSupport = new BowtieSupport(BowtieSupport::ET_BOWTIE_BUILD_ID, BowtieSupport::ET_BOWTIE_BUILD); etRegistry->registerEntry(bowtieBuildSupport); // Bowtie 2 - Bowtie2Support* bowtie2AlignSupport = new Bowtie2Support(ET_BOWTIE2_ALIGN); - Bowtie2Support* bowtie2BuildSupport = new Bowtie2Support(ET_BOWTIE2_BUILD); - Bowtie2Support* bowtie2InspectSupport = new Bowtie2Support(ET_BOWTIE2_INSPECT); + Bowtie2Support* bowtie2AlignSupport = new Bowtie2Support(Bowtie2Support::ET_BOWTIE2_ALIGN_ID, Bowtie2Support::ET_BOWTIE2_ALIGN); + Bowtie2Support* bowtie2BuildSupport = new Bowtie2Support(Bowtie2Support::ET_BOWTIE2_BUILD_ID, Bowtie2Support::ET_BOWTIE2_BUILD); + Bowtie2Support* bowtie2InspectSupport = new Bowtie2Support(Bowtie2Support::ET_BOWTIE2_INSPECT_ID, Bowtie2Support::ET_BOWTIE2_INSPECT); etRegistry->registerEntry(bowtie2AlignSupport); etRegistry->registerEntry(bowtie2BuildSupport); etRegistry->registerEntry(bowtie2InspectSupport); // BWA - BwaSupport* bwaSupport = new BwaSupport(ET_BWA); + BwaSupport* bwaSupport = new BwaSupport(BwaSupport::ET_BWA_ID, BwaSupport::ET_BWA); etRegistry->registerEntry(bwaSupport); // SPAdes - SpadesSupport* spadesSupport = new SpadesSupport(ET_SPADES); + SpadesSupport* spadesSupport = new SpadesSupport(SpadesSupport::ET_SPADES_ID, SpadesSupport::ET_SPADES); etRegistry->registerEntry(spadesSupport); // SAMtools (external tool) - SamToolsExtToolSupport* samToolsExtToolSupport = new SamToolsExtToolSupport(ET_SAMTOOLS_EXT); + SamToolsExtToolSupport* samToolsExtToolSupport = new SamToolsExtToolSupport(SamToolsExtToolSupport::ET_SAMTOOLS_EXT_ID, SamToolsExtToolSupport::ET_SAMTOOLS_EXT); etRegistry->registerEntry(samToolsExtToolSupport); // BCFtools (external tool) - BcfToolsSupport* bcfToolsSupport = new BcfToolsSupport(ET_BCFTOOLS); + BcfToolsSupport* bcfToolsSupport = new BcfToolsSupport(BcfToolsSupport::ET_BCFTOOLS_ID, BcfToolsSupport::ET_BCFTOOLS); etRegistry->registerEntry(bcfToolsSupport); // Tabix - TabixSupport* tabixSupport = new TabixSupport(ET_TABIX); + TabixSupport* tabixSupport = new TabixSupport(TabixSupport::ET_TABIX_ID, TabixSupport::ET_TABIX); etRegistry->registerEntry(tabixSupport); // VcfConsensus - VcfConsensusSupport* vcfConsSupport = new VcfConsensusSupport(ET_VCF_CONSENSUS); + VcfConsensusSupport* vcfConsSupport = new VcfConsensusSupport(VcfConsensusSupport::ET_VCF_CONSENSUS_ID, VcfConsensusSupport::ET_VCF_CONSENSUS); etRegistry->registerEntry(vcfConsSupport); // Spidey - SpideySupport* spideySupport = new SpideySupport(ET_SPIDEY); + SpideySupport* spideySupport = new SpideySupport(SpideySupport::ET_SPIDEY_ID, SpideySupport::ET_SPIDEY); etRegistry->registerEntry(spideySupport); //bedtools - BedtoolsSupport* bedtoolsSupport = new BedtoolsSupport(ET_BEDTOOLS); + BedtoolsSupport* bedtoolsSupport = new BedtoolsSupport(BedtoolsSupport::ET_BEDTOOLS_ID, BedtoolsSupport::ET_BEDTOOLS); etRegistry->registerEntry(bedtoolsSupport); //cutadapt - CutadaptSupport* cutadaptSupport = new CutadaptSupport(ET_CUTADAPT); + CutadaptSupport* cutadaptSupport = new CutadaptSupport(CutadaptSupport::ET_CUTADAPT_ID, CutadaptSupport::ET_CUTADAPT); etRegistry->registerEntry(cutadaptSupport); //bigwig - BigWigSupport* bigwigSupport = new BigWigSupport(ET_BIGWIG); + BigWigSupport* bigwigSupport = new BigWigSupport(BigWigSupport::ET_BIGWIG_ID, BigWigSupport::ET_BIGWIG); etRegistry->registerEntry(bigwigSupport); // TopHat - TopHatSupport* tophatTool = new TopHatSupport(ET_TOPHAT); + TopHatSupport* tophatTool = new TopHatSupport(TopHatSupport::ET_TOPHAT_ID, TopHatSupport::ET_TOPHAT); etRegistry->registerEntry(tophatTool); // Cufflinks external tools - CufflinksSupport *cuffcompareTool = new CufflinksSupport(ET_CUFFCOMPARE); + CufflinksSupport *cuffcompareTool = new CufflinksSupport(CufflinksSupport::ET_CUFFCOMPARE_ID, CufflinksSupport::ET_CUFFCOMPARE); etRegistry->registerEntry(cuffcompareTool); - CufflinksSupport *cuffdiffTool = new CufflinksSupport(ET_CUFFDIFF); + CufflinksSupport *cuffdiffTool = new CufflinksSupport(CufflinksSupport::ET_CUFFDIFF_ID, CufflinksSupport::ET_CUFFDIFF); etRegistry->registerEntry(cuffdiffTool); - CufflinksSupport *cufflinksTool = new CufflinksSupport(ET_CUFFLINKS); + CufflinksSupport *cufflinksTool = new CufflinksSupport(CufflinksSupport::ET_CUFFLINKS_ID, CufflinksSupport::ET_CUFFLINKS); etRegistry->registerEntry(cufflinksTool); - CufflinksSupport *cuffmergeTool = new CufflinksSupport(ET_CUFFMERGE); + CufflinksSupport *cuffmergeTool = new CufflinksSupport(CufflinksSupport::ET_CUFFMERGE_ID, CufflinksSupport::ET_CUFFMERGE); etRegistry->registerEntry(cuffmergeTool); - CufflinksSupport *gffreadTool = new CufflinksSupport(ET_GFFREAD); + CufflinksSupport *gffreadTool = new CufflinksSupport(CufflinksSupport::ET_GFFREAD_ID, CufflinksSupport::ET_GFFREAD); etRegistry->registerEntry(gffreadTool); // CEAS - CEASSupport *ceasTool = new CEASSupport(ET_CEAS); + CEASSupport *ceasTool = new CEASSupport(CEASSupport::ET_CEAS_ID, CEASSupport::ET_CEAS); etRegistry->registerEntry(ceasTool); // MACS - MACSSupport *macs = new MACSSupport(ET_MACS); + MACSSupport *macs = new MACSSupport(MACSSupport::ET_MACS_ID, MACSSupport::ET_MACS); etRegistry->registerEntry(macs); // peak2gene - Peak2GeneSupport *peak2gene = new Peak2GeneSupport(ET_PEAK2GENE); + Peak2GeneSupport *peak2gene = new Peak2GeneSupport(Peak2GeneSupport::ET_PEAK2GENE_ID, Peak2GeneSupport::ET_PEAK2GENE); etRegistry->registerEntry(peak2gene); //ConservationPlot - ConservationPlotSupport *conservationPlot = new ConservationPlotSupport(ET_CONSERVATION_PLOT); + ConservationPlotSupport *conservationPlot = new ConservationPlotSupport(ConservationPlotSupport::ET_CONSERVATION_PLOT_ID, ConservationPlotSupport::ET_CONSERVATION_PLOT); etRegistry->registerEntry(conservationPlot); //SeqPos - SeqPosSupport *seqPos = new SeqPosSupport(ET_SEQPOS); + SeqPosSupport *seqPos = new SeqPosSupport(SeqPosSupport::ET_SEQPOS_ID, SeqPosSupport::ET_SEQPOS); etRegistry->registerEntry(seqPos); //ConductGO - ConductGOSupport *conductGO = new ConductGOSupport(ET_GO_ANALYSIS); + ConductGOSupport *conductGO = new ConductGOSupport(ConductGOSupport::ET_GO_ANALYSIS_ID, ConductGOSupport::ET_GO_ANALYSIS); etRegistry->registerEntry(conductGO); //Vcfutils - VcfutilsSupport *vcfutils = new VcfutilsSupport(VcfutilsSupport::TOOL_NAME); + VcfutilsSupport *vcfutils = new VcfutilsSupport(VcfutilsSupport::VCF_UTILS_ID, VcfutilsSupport::VCF_UTILS); etRegistry->registerEntry(vcfutils); //SnpEff - SnpEffSupport *snpeff = new SnpEffSupport(ET_SNPEFF); + SnpEffSupport *snpeff = new SnpEffSupport(SnpEffSupport::ET_SNPEFF_ID, SnpEffSupport::ET_SNPEFF); etRegistry->registerEntry(snpeff); //FastQC - FastQCSupport *fastqc = new FastQCSupport(ET_FASTQC); + FastQCSupport *fastqc = new FastQCSupport(FastQCSupport::ET_FASTQC_ID, FastQCSupport::ET_FASTQC); etRegistry->registerEntry(fastqc); // StringTie - StringTieSupport *stringTie = new StringTieSupport(ET_STRINGTIE); + StringTieSupport *stringTie = new StringTieSupport(StringTieSupport::ET_STRINGTIE_ID, StringTieSupport::ET_STRINGTIE); etRegistry->registerEntry(stringTie); //HMMER - etRegistry->registerEntry(new HmmerSupport(HmmerSupport::BUILD_TOOL)); - etRegistry->registerEntry(new HmmerSupport(HmmerSupport::SEARCH_TOOL)); - etRegistry->registerEntry(new HmmerSupport(HmmerSupport::PHMMER_TOOL)); + etRegistry->registerEntry(new HmmerSupport(HmmerSupport::BUILD_TOOL_ID, HmmerSupport::BUILD_TOOL)); + etRegistry->registerEntry(new HmmerSupport(HmmerSupport::SEARCH_TOOL_ID, HmmerSupport::SEARCH_TOOL)); + etRegistry->registerEntry(new HmmerSupport(HmmerSupport::PHMMER_TOOL_ID, HmmerSupport::PHMMER_TOOL)); //Trimmomatic - TrimmomaticSupport *trimmomaticSupport = new TrimmomaticSupport(ET_TRIMMOMATIC); + TrimmomaticSupport *trimmomaticSupport = new TrimmomaticSupport(TrimmomaticSupport::ET_TRIMMOMATIC_ID, TrimmomaticSupport::ET_TRIMMOMATIC); etRegistry->registerEntry(trimmomaticSupport); if (AppContext::getMainWindow()) { @@ -497,11 +500,11 @@ ExternalToolSupportPlugin::ExternalToolSupportPlugin() : etRegistry->setToolkitDescription("Cistrome", tr("<i>Cistrome</i> is a UGENE version of Cistrome pipeline which also includes some tools useful for ChIP-seq analysis" "This pipeline is aimed to provide the following analysis steps: peak calling and annotating, motif search and gene ontology.")); - ExternalToolSupportAction* formatDBAction= new ExternalToolSupportAction(tr("BLAST make database..."), this, QStringList(ET_FORMATDB)); + ExternalToolSupportAction* formatDBAction= new ExternalToolSupportAction(tr("BLAST make database..."), this, QStringList(FormatDBSupport::ET_FORMATDB_ID)); formatDBAction->setObjectName(ToolsMenu::BLAST_DB); connect(formatDBAction, SIGNAL(triggered()), formatDBTool, SLOT(sl_runWithExtFileSpecify())); - ExternalToolSupportAction* makeBLASTDBAction= new ExternalToolSupportAction(tr("BLAST+ make database..."), this, QStringList(ET_MAKEBLASTDB)); + ExternalToolSupportAction* makeBLASTDBAction= new ExternalToolSupportAction(tr("BLAST+ make database..."), this, QStringList(FormatDBSupport::ET_MAKEBLASTDB_ID)); makeBLASTDBAction->setObjectName(ToolsMenu::BLAST_DBP); connect(makeBLASTDBAction, SIGNAL(triggered()), makeBLASTDBTool, SLOT(sl_runWithExtFileSpecify())); @@ -509,12 +512,12 @@ ExternalToolSupportPlugin::ExternalToolSupportPlugin() : blastAllViewContext->setParent(this); blastAllViewContext->init(); - ExternalToolSupportAction* blastallAction= new ExternalToolSupportAction(tr("BLAST search..."), this, QStringList(ET_BLASTALL)); + ExternalToolSupportAction* blastallAction= new ExternalToolSupportAction(tr("BLAST search..."), this, QStringList(BlastAllSupport::ET_BLASTALL_ID)); blastallAction->setObjectName(ToolsMenu::BLAST_SEARCH); connect(blastallAction, SIGNAL(triggered()), blastallTool, SLOT(sl_runWithExtFileSpecify())); ExternalToolSupportAction* alignToRefBlastAction = new ExternalToolSupportAction(tr("Map reads to reference..."), - this, QStringList() << ET_FORMATDB << ET_BLASTALL); + this, QStringList() << FormatDBSupport::ET_FORMATDB_ID << BlastAllSupport::ET_BLASTALL_ID); alignToRefBlastAction->setObjectName(ToolsMenu::SANGER_ALIGN); connect(alignToRefBlastAction, SIGNAL(triggered(bool)), blastNPlusTool, SLOT(sl_runAlign())); @@ -522,12 +525,12 @@ ExternalToolSupportPlugin::ExternalToolSupportPlugin() : blastPlusViewCtx->setParent(this);//may be problems??? blastPlusViewCtx->init(); QStringList toolList; - toolList << ET_BLASTN << ET_BLASTP << ET_BLASTX << ET_TBLASTN << ET_TBLASTX << ET_RPSBLAST; + toolList << BlastPlusSupport::ET_BLASTN_ID << BlastPlusSupport::ET_BLASTP_ID << BlastPlusSupport::ET_BLASTX_ID << BlastPlusSupport::ET_TBLASTN_ID << BlastPlusSupport::ET_TBLASTX_ID << BlastPlusSupport::ET_RPSBLAST_ID; ExternalToolSupportAction* blastPlusAction= new ExternalToolSupportAction(tr("BLAST+ search..."), this, toolList); blastPlusAction->setObjectName(ToolsMenu::BLAST_SEARCHP); connect(blastPlusAction, SIGNAL(triggered()), blastNPlusTool, SLOT(sl_runWithExtFileSpecify())); - ExternalToolSupportAction* blastPlusCmdAction= new ExternalToolSupportAction(tr("BLAST+ query database..."), this, QStringList(ET_BLASTDBCMD)); + ExternalToolSupportAction* blastPlusCmdAction= new ExternalToolSupportAction(tr("BLAST+ query database..."), this, QStringList(BlastDbCmdSupport::ET_BLASTDBCMD_ID)); blastPlusCmdAction->setObjectName(ToolsMenu::BLAST_QUERYP); connect(blastPlusCmdAction, SIGNAL(triggered()), blastDbCmdSupport, SLOT(sl_runWithExtFileSpecify())); @@ -538,7 +541,7 @@ ExternalToolSupportPlugin::ExternalToolSupportPlugin() : ToolsMenu::addAction(ToolsMenu::BLAST_MENU, blastPlusAction); ToolsMenu::addAction(ToolsMenu::BLAST_MENU, blastPlusCmdAction); - ExternalToolSupportAction* cap3Action = new ExternalToolSupportAction(QString(tr("Reads de novo assembly (with %1)...")).arg(cap3Tool->getName()), this, QStringList(cap3Tool->getName())); + ExternalToolSupportAction* cap3Action = new ExternalToolSupportAction(QString(tr("Reads de novo assembly (with %1)...")).arg(cap3Tool->getName()), this, QStringList(cap3Tool->getId())); cap3Action->setObjectName(ToolsMenu::SANGER_DENOVO); connect(cap3Action, SIGNAL(triggered()), cap3Tool, SLOT(sl_runWithExtFileSpecify())); ToolsMenu::addAction(ToolsMenu::SANGER_MENU, cap3Action); @@ -579,7 +582,7 @@ ExternalToolSupportPlugin::ExternalToolSupportPlugin() : genomeReadsFormats << BaseDocumentFormats::FASTA; genomeReadsFormats << BaseDocumentFormats::FASTQ; - AppContext::getGenomeAssemblyAlgRegistry()->registerAlgorithm(new GenomeAssemblyAlgorithmEnv(ET_SPADES, new SpadesTaskFactory(), + AppContext::getGenomeAssemblyAlgRegistry()->registerAlgorithm(new GenomeAssemblyAlgorithmEnv(SpadesSupport::ET_SPADES, new SpadesTaskFactory(), new SpadesGUIExtensionsFactory(), genomeReadsFormats)); { @@ -589,6 +592,7 @@ ExternalToolSupportPlugin::ExternalToolSupportPlugin() : GAutoDeleteList<XMLTestFactory> *l = new GAutoDeleteList<XMLTestFactory>(this); l->qlist = BowtieTests::createTestFactories(); + l->qlist << Bowtie2Tests::createTestFactories(); foreach(XMLTestFactory *f, l->qlist) { bool res = xmlTestFormat->registerTestFactory(f); @@ -655,6 +659,21 @@ ExternalToolSupportPlugin::ExternalToolSupportPlugin() : assert(res); } } + { + + GTestFormatRegistry* tfr = AppContext::getTestFramework()->getTestFormatRegistry(); + XMLTestFormat *xmlTestFormat = qobject_cast<XMLTestFormat*>(tfr->findFormat("XML")); + assert(xmlTestFormat != NULL); + + GAutoDeleteList<XMLTestFactory>* l = new GAutoDeleteList<XMLTestFactory>(this); + l->qlist = SpadesTaskTest::createTestFactories(); + + foreach(XMLTestFactory* f, l->qlist) { + bool res = xmlTestFormat->registerTestFactory(f); + Q_UNUSED(res); + assert(res); + } + } etRegistry->setManager(&validationManager); validationManager.start(); diff --git a/src/plugins/external_tool_support/src/ExternalToolSupportPlugin.h b/src/plugins/external_tool_support/src/ExternalToolSupportPlugin.h index 637a058283467b5116337713ff365b829f4f1be8..f742ce33fa604b2301ebd75a0e9449fe1b6304ea 100644 --- a/src/plugins/external_tool_support/src/ExternalToolSupportPlugin.h +++ b/src/plugins/external_tool_support/src/ExternalToolSupportPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/ExternalToolSupportSettings.cpp b/src/plugins/external_tool_support/src/ExternalToolSupportSettings.cpp index f8334ea7053a620de142504fae21ea94d77ba449..4562f42c821b25a43dce8a50c1b4b17d3964a8f8 100644 --- a/src/plugins/external_tool_support/src/ExternalToolSupportSettings.cpp +++ b/src/plugins/external_tool_support/src/ExternalToolSupportSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -42,7 +42,8 @@ namespace U2 { #define NUMBER_EXTERNAL_TOOL SETTINGS + "numberExternalTools" -#define PREFIX_EXTERNAL_TOOL_NAME SETTINGS + "exToolName" +#define PREFIX_EXTERNAL_TOOL_ID SETTINGS + "exToolId" +#define PREFIX_EXTERNAL_TOOL_NAME_OBSOLETE SETTINGS + "exToolName" #define PREFIX_EXTERNAL_TOOL_PATH SETTINGS + "exToolPath" #define PREFIX_EXTERNAL_TOOL_IS_VALID SETTINGS + "exToolIsValid" #define PREFIX_EXTERNAL_TOOL_VERSION SETTINGS + "exToolVersion" @@ -62,15 +63,19 @@ void ExternalToolSupportSettings::setNumberExternalTools( int v ) { emit watcher->changed(); } -bool ExternalToolSupportSettings::getExternalTools() { +void ExternalToolSupportSettings::loadExternalTools() { int numberExternalTools = getNumberExternalTools(); + QString id; QString name; QString path; bool isValid = false; QString version; StrStrMap additionalInfo; for (int i = 0; i < numberExternalTools; i++) { - name = AppContext::getSettings()->getValue(PREFIX_EXTERNAL_TOOL_NAME + QString::number(i), QVariant(""), true).toString(); + id = AppContext::getSettings()->getValue(PREFIX_EXTERNAL_TOOL_ID + QString::number(i), QVariant(""), true).toString(); + if (id.isEmpty()) { + name = AppContext::getSettings()->getValue(PREFIX_EXTERNAL_TOOL_NAME_OBSOLETE + QString::number(i), QVariant(""), true).toString(); + } path = AppContext::getSettings()->getValue(PREFIX_EXTERNAL_TOOL_PATH + QString::number(i), QVariant(""), true).toString(); if (!QFile::exists(path)) { // executable is not found -> leave this tool alone @@ -79,23 +84,23 @@ bool ExternalToolSupportSettings::getExternalTools() { isValid = AppContext::getSettings()->getValue(PREFIX_EXTERNAL_TOOL_IS_VALID + QString::number(i), QVariant(false), true).toBool(); version = AppContext::getSettings()->getValue(PREFIX_EXTERNAL_TOOL_VERSION + QString::number(i), QVariant("unknown"), true).toString(); additionalInfo = AppContext::getSettings()->getValue(PREFIX_EXTERNAL_TOOL_ADDITIONAL_INFO + QString::number(i), QVariant::fromValue<StrStrMap>(StrStrMap()), true).value<StrStrMap>(); - if (AppContext::getExternalToolRegistry()->getByName(name) != NULL) { - AppContext::getExternalToolRegistry()->getByName(name)->setPath(path); - AppContext::getExternalToolRegistry()->getByName(name)->setVersion(version); - AppContext::getExternalToolRegistry()->getByName(name)->setValid(isValid); - AppContext::getExternalToolRegistry()->getByName(name)->setAdditionalInfo(additionalInfo); + ExternalTool* tool = !id.isEmpty() ? AppContext::getExternalToolRegistry()->getById(id) : AppContext::getExternalToolRegistry()->getByName(name); + if (tool != nullptr) { + tool->setPath(path); + tool->setVersion(version); + tool->setValid(isValid); + tool->setAdditionalInfo(additionalInfo); } } prevNumberExternalTools = numberExternalTools; ExternalToolSupportSettings::setExternalTools(); - return true;//bad code } void ExternalToolSupportSettings::setExternalTools() { QList<ExternalTool*> ExternalToolList = AppContext::getExternalToolRegistry()->getAllEntries(); int numberExternalTools = ExternalToolList.length(); setNumberExternalTools(numberExternalTools); - QString name; + QString id; QString path; bool isValid = false; QString version; @@ -103,12 +108,12 @@ void ExternalToolSupportSettings::setExternalTools() { int numberIterations = numberExternalTools >= prevNumberExternalTools ? numberExternalTools : prevNumberExternalTools; for (int i = 0; i < numberIterations; i++) { if (i < numberExternalTools) { - name = ExternalToolList.at(i)->getName(); + id = ExternalToolList.at(i)->getId(); path = ExternalToolList.at(i)->getPath(); isValid = ExternalToolList.at(i)->isValid(); version = ExternalToolList.at(i)->getVersion(); additionalInfo = ExternalToolList.at(i)->getAdditionalInfo(); - AppContext::getSettings()->setValue(PREFIX_EXTERNAL_TOOL_NAME + QString::number(i), name, true); + AppContext::getSettings()->setValue(PREFIX_EXTERNAL_TOOL_ID + QString::number(i), id, true); AppContext::getSettings()->setValue(PREFIX_EXTERNAL_TOOL_PATH + QString::number(i), path, true); AppContext::getSettings()->setValue(PREFIX_EXTERNAL_TOOL_IS_VALID + QString::number(i), isValid, true); AppContext::getSettings()->setValue(PREFIX_EXTERNAL_TOOL_VERSION + QString::number(i), version, true); @@ -116,7 +121,7 @@ void ExternalToolSupportSettings::setExternalTools() { AppContext::getSettings()->setValue(PREFIX_EXTERNAL_TOOL_ADDITIONAL_INFO + QString::number(i), QVariant::fromValue<StrStrMap>(additionalInfo), true); } } else { - AppContext::getSettings()->remove(PREFIX_EXTERNAL_TOOL_NAME + QString::number(i)); + AppContext::getSettings()->remove(PREFIX_EXTERNAL_TOOL_ID + QString::number(i)); AppContext::getSettings()->remove(PREFIX_EXTERNAL_TOOL_PATH + QString::number(i)); AppContext::getSettings()->remove(PREFIX_EXTERNAL_TOOL_IS_VALID + QString::number(i)); AppContext::getSettings()->remove(PREFIX_EXTERNAL_TOOL_VERSION + QString::number(i)); diff --git a/src/plugins/external_tool_support/src/ExternalToolSupportSettings.h b/src/plugins/external_tool_support/src/ExternalToolSupportSettings.h index 23daf1e9936e418cd95aa8959d60c699c3d2dd3d..485369146dd1affeaeebe4a580c00ef869d52c5f 100644 --- a/src/plugins/external_tool_support/src/ExternalToolSupportSettings.h +++ b/src/plugins/external_tool_support/src/ExternalToolSupportSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -48,7 +48,7 @@ public: static int getNumberExternalTools(); static void setNumberExternalTools(int value); - static bool getExternalTools(); + static void loadExternalTools(); static void setExternalTools(); static void checkTemporaryDir(U2OpStatus& os); diff --git a/src/plugins/external_tool_support/src/ExternalToolSupportSettingsController.cpp b/src/plugins/external_tool_support/src/ExternalToolSupportSettingsController.cpp index 1309816902fc72bc3fffa7a53f79bf79902c6e32..23ec002a97abf6940282e602c6a3803e48f5401c 100644 --- a/src/plugins/external_tool_support/src/ExternalToolSupportSettingsController.cpp +++ b/src/plugins/external_tool_support/src/ExternalToolSupportSettingsController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,20 +23,23 @@ #include <QToolButton> #include <U2Core/AppContext.h> +#include <U2Core/AppSettings.h> +#include <U2Core/CustomExternalTool.h> #include <U2Core/L10n.h> -#include <U2Core/MultiTask.h> -#include <U2Core/ScriptingToolRegistry.h> +#include <U2Core/QObjectScopedPointer.h> +#include <U2Core/Settings.h> #include <U2Core/U2SafePoints.h> +#include <U2Core/UserApplicationsSettings.h> -#include <U2Gui/LastUsedDirHelper.h> +#include <U2Gui/DialogUtils.h> #include <U2Gui/GUIUtils.h> +#include <U2Gui/LastUsedDirHelper.h> +#include <U2Gui/ShowHideSubgroupWidget.h> #include "ExternalToolSupportSettings.h" #include "ExternalToolSupportSettingsController.h" -#include "blast/BlastAllSupport.h" -#include "blast/FormatDBSupport.h" -#include "blast_plus/BlastPlusSupport.h" -#include "utils/ExternalToolValidateTask.h" +#include "custom_tools/ImportCustomToolsTask.h" +#include "custom_tools/ImportExternalToolDialog.h" namespace U2 { @@ -45,13 +48,11 @@ static const int TOOLKIT_TYPE = QTreeWidgetItem::UserType + 1; ///////////////////////////////////////////// ////ExternalToolSupportSettingsPageController ExternalToolSupportSettingsPageController::ExternalToolSupportSettingsPageController(QObject* p) -: AppSettingsGUIPageController(tr("External Tools"), ExternalToolSupportSettingsPageId, p) {} + : AppSettingsGUIPageController(tr("External Tools"), ExternalToolSupportSettingsPageId, p) {} AppSettingsGUIPageState* ExternalToolSupportSettingsPageController::getSavedState() { - ExternalToolSupportSettingsPageState* state = new ExternalToolSupportSettingsPageState(); - state->externalTools = AppContext::getExternalToolRegistry()->getAllEntries(); - return state; + return new ExternalToolSupportSettingsPageState(AppContext::getExternalToolRegistry()->getAllEntries()); } void ExternalToolSupportSettingsPageController::saveState(AppSettingsGUIPageState* s) { @@ -65,37 +66,89 @@ AppSettingsGUIPageWidget* ExternalToolSupportSettingsPageController::createWidge return r; } -const QString ExternalToolSupportSettingsPageController::helpPageId = QString(""); +const QString &ExternalToolSupportSettingsPageController::getHelpPageId() const { + return helpPageId; +} + +const QString ExternalToolSupportSettingsPageController::helpPageId = QString("24742348"); + +////////////////////////////////////////////// +////ExternalToolSupportSettingsPageState + +ExternalToolSupportSettingsPageState::ExternalToolSupportSettingsPageState(const QList<ExternalTool*>& ets) : + externalTools(ets) {} + +QList<ExternalTool*> ExternalToolSupportSettingsPageState::getExternalTools() const { + return externalTools; +} ///////////////////////////////////////////// ////ExternalToolSupportSettingsPageWidget + const QString ExternalToolSupportSettingsPageWidget::INSTALLED = QObject::tr("Installed"); const QString ExternalToolSupportSettingsPageWidget::NOT_INSTALLED = QObject::tr("Not installed"); +const QString ExternalToolSupportSettingsPageWidget::ET_DOWNLOAD_INFO = QObject::tr("<html><head/><body><p>Download <a href=\"http://ugene.net/download-all_html#en_data_analysis_tools\"><span style=\" text-decoration: underline; color:#1866af;\">tools executables</span></a> and configure the tools paths. </p></body></html>"); + +const QString ExternalToolSupportSettingsPageWidget::SUPPORTED_ID = "integrated tools"; +const QString ExternalToolSupportSettingsPageWidget::CUSTOM_ID = "custom tools"; +const QString ExternalToolSupportSettingsPageWidget::INFORMATION_ID = "info"; ExternalToolSupportSettingsPageWidget::ExternalToolSupportSettingsPageWidget(ExternalToolSupportSettingsPageController* ctrl) { Q_UNUSED(ctrl); setupUi(this); + defaultDescriptionText = descriptionTextBrowser->toPlainText(); + + selectToolPackLabel->setText(ET_DOWNLOAD_INFO); versionLabel->hide(); binaryPathLabel->hide(); + + supportedToolsShowHideWidget = new ShowHideSubgroupWidget(SUPPORTED_ID, tr("Supported tools"), integratedToolsInnerWidget, true); + integratedToolsContainerWidget->layout()->addWidget(supportedToolsShowHideWidget); + + customToolsShowHideWidget = new ShowHideSubgroupWidget(CUSTOM_ID, tr("Custom tools"), customToolsInnerWidget, false); + customToolsContainerWidget->layout()->addWidget(customToolsShowHideWidget); + + infoShowHideWidget = new ShowHideSubgroupWidget(INFORMATION_ID, tr("Additional information"), infoInnerWidget, true); + infoContainerWidget->layout()->addWidget(infoShowHideWidget); + + twIntegratedTools->setColumnWidth(0, this->geometry().width() / 3); + twCustomTools->setColumnWidth(0, this->geometry().width() / 3); + + twIntegratedTools->installEventFilter(this); + twCustomTools->installEventFilter(this); + + connect(pbImport, SIGNAL(clicked()), SLOT(sl_importCustomToolButtonClicked())); + connect(pbDelete, SIGNAL(clicked()), SLOT(sl_deleteCustomToolButtonClicked())); + connect(selectToolPackButton, SIGNAL(clicked()), this, SLOT(sl_onBrowseToolPackPath())); + connect(selectToolPackLabel, SIGNAL(linkActivated(QString)), this, SLOT(sl_linkActivated(QString))); + connect(twCustomTools, SIGNAL(itemSelectionChanged()), SLOT(sl_itemSelectionChanged())); + connect(twIntegratedTools, SIGNAL(itemSelectionChanged()), SLOT(sl_itemSelectionChanged())); + + ExternalToolRegistry *etRegistry = AppContext::getExternalToolRegistry(); + connect(etRegistry, SIGNAL(si_toolAdded(const QString &)), SLOT(sl_externalToolAdded(const QString &))); + connect(etRegistry, SIGNAL(si_toolIsAboutToBeRemoved(const QString &)), SLOT(sl_externalToolIsAboutToBeRemoved(const QString &))); +} + +ExternalToolSupportSettingsPageWidget::~ExternalToolSupportSettingsPageWidget() { + saveShowHideSubgroupsState(); } QWidget* ExternalToolSupportSettingsPageWidget::createPathEditor(QWidget* parent, const QString& path) const { QWidget* widget = new QWidget(parent); - PathLineEdit* toolPathEdit = new PathLineEdit("" ,"executable", false, widget); + PathLineEdit* toolPathEdit = new PathLineEdit("", "executable", false, widget); toolPathEdit->setObjectName("PathLineEdit"); toolPathEdit->setFrame(false); toolPathEdit->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred)); toolPathEdit->setText(QDir::toNativeSeparators(path)); widget->setFocusProxy(toolPathEdit); - connect(toolPathEdit, SIGNAL(cursorPositionChanged(int,int)), this, SLOT(sl_onPathEditWidgetClick())); - connect(toolPathEdit, SIGNAL(textEdited(QString)), this, SLOT(sl_onPathEditWidgetClick())); - connect(toolPathEdit, SIGNAL(selectionChanged()), this, SLOT(sl_onPathEditWidgetClick())); + connect(toolPathEdit, SIGNAL(si_focusIn()), this, SLOT(sl_onPathEditWidgetClick())); connect(toolPathEdit, SIGNAL(editingFinished()), this, SLOT(sl_toolPathChanged())); QToolButton* selectToolPathButton = new QToolButton(widget); + selectToolPathButton->setObjectName("ResetExternalTool"); selectToolPathButton->setVisible(true); selectToolPathButton->setText("..."); selectToolPathButton->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred)); @@ -131,126 +184,234 @@ QWidget* ExternalToolSupportSettingsPageWidget::createPathEditor(QWidget* parent return widget; } +QTreeWidgetItem *ExternalToolSupportSettingsPageWidget::findToolkitItem(QTreeWidget *treeWidget, const QString &toolkitName) { + // It is acceptable until there are not so many tools and the method is called seldom + for (int i = 0, n = treeWidget->topLevelItemCount(); i < n; i++) { + QTreeWidgetItem *item = treeWidget->topLevelItem(i); + if (TOOLKIT_TYPE == item->type() && toolkitName == item->text(0)) { + return item; + } + } + return nullptr; +} + +QTreeWidgetItem *ExternalToolSupportSettingsPageWidget::createToolkitItem(QTreeWidget *treeWidget, const QString &toolkitName, const QIcon &icon) { + QTreeWidgetItem *toolkitItem = new QTreeWidgetItem({ toolkitName }, TOOLKIT_TYPE); + toolkitItem->setData(0, Qt::ItemDataRole::UserRole, toolkitName); + toolkitItem->setIcon(0, icon); + treeWidget->insertTopLevelItem(0, toolkitItem); + + //draw widget for path select button + QWidget *widget = new QWidget(treeWidget); + QToolButton *selectToolKitPathButton = new QToolButton(widget); + selectToolKitPathButton->setVisible(true); + selectToolKitPathButton->setText("..."); + selectToolKitPathButton->setMinimumWidth(buttonsWidth); + selectToolKitPathButton->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred)); + + connect(selectToolKitPathButton, SIGNAL(clicked()), this, SLOT(sl_onPathEditWidgetClick())); + connect(selectToolKitPathButton, SIGNAL(clicked()), this, SLOT(sl_onBrowseToolKitPath())); + + QHBoxLayout *layout = new QHBoxLayout(widget); + layout->setSpacing(0); + layout->setMargin(0); + layout->addStretch(); + layout->addWidget(selectToolKitPathButton); + treeWidget->setItemWidget(toolkitItem, 1, widget); + + toolkitItem->setExpanded(true); + return toolkitItem; +} + void ExternalToolSupportSettingsPageWidget::sl_onClickLink(const QUrl& url) { - const QAbstractItemModel* model = treeWidget->selectionModel()->model(); + const QAbstractItemModel* model = twIntegratedTools->selectionModel()->model(); QModelIndexList items = model->match(model->index(0, 0), Qt::DisplayRole, QVariant::fromValue(url.toEncoded()), 2, Qt::MatchRecursive); - if (items.isEmpty()){ + if (items.isEmpty()) { return; } - treeWidget->setCurrentIndex(items[0]); + twIntegratedTools->setCurrentIndex(items[0]); +} + +void ExternalToolSupportSettingsPageWidget::sl_importCustomToolButtonClicked() { + //UGENE-6553 temporary removed + //QObjectScopedPointer<ImportExternalToolDialog> dialog = new ImportExternalToolDialog(this); + //dialog->exec(); + + LastUsedDirHelper lod("import external tool"); + const QString filter = DialogUtils::prepareFileFilter("UGENE external tool config file", { "xml" }, true, {}); + lod.url = U2FileDialog::getOpenFileName(this, tr("Select configuration file to import"), lod.dir, filter); + if (!lod.url.isEmpty()) { + AppContext::getTaskScheduler()->registerTopLevelTask(new ImportCustomToolsTask(QDir::toNativeSeparators(lod.url))); + } +} + +void ExternalToolSupportSettingsPageWidget::sl_deleteCustomToolButtonClicked() { + QList<QTreeWidgetItem *> selectedItems = twCustomTools->selectedItems(); + CHECK(!selectedItems.isEmpty(), ); + const QString toolId = externalToolsItems.key(selectedItems.first()); + CHECK(!toolId.isEmpty(), ); + + CustomExternalTool *tool = qobject_cast<CustomExternalTool *>(AppContext::getExternalToolRegistry()->getById(toolId)); + SAFE_POINT(nullptr != tool, "Can't get CustomExternalTool from the registry", ); + const QString configFilePath = tool->getConfigFilePath(); + + AppContext::getExternalToolRegistry()->unregisterEntry(toolId); + QFile configFile(configFilePath); + const bool fileRemoved = configFile.remove(); + + if (!fileRemoved) { + coreLog.details(tr("Can't remove custom external tool config file from the storage folder: %1").arg(configFilePath)); + } +} + +void ExternalToolSupportSettingsPageWidget::sl_externalToolAdded(const QString &id) { + ExternalTool *tool = AppContext::getExternalToolRegistry()->getById(id); + + ExternalToolInfo info; + info.id = id; + info.name = tool->getName(); + info.path = tool->getPath(); + info.description = tool->getDescription(); + info.valid = tool->isValid(); + info.version = tool->getVersion(); + info.isModule = tool->isModule(); + externalToolsInfo.insert(info.id, info); + + connect(tool, SIGNAL(si_toolValidationStatusChanged(bool)), SLOT(sl_toolValidationStatusChanged(bool))); + + QTreeWidget *treeWidget = tool->isCustom() ? twCustomTools : twIntegratedTools; + insertChild(treeWidget->invisibleRootItem(), tool->getId(), treeWidget->topLevelItemCount()); +} + +void ExternalToolSupportSettingsPageWidget::sl_externalToolIsAboutToBeRemoved(const QString &id) { + externalToolsInfo.remove(id); + + ExternalTool *tool = AppContext::getExternalToolRegistry()->getById(id); + disconnect(tool, SIGNAL(si_toolValidationStatusChanged(bool)), this, SLOT(sl_toolValidationStatusChanged(bool))); + + QTreeWidgetItem *item = externalToolsItems.value(id, nullptr); + if (nullptr != item) { + QTreeWidgetItem *parentItem = item->parent(); + if (nullptr == parentItem) { + parentItem = item->treeWidget()->invisibleRootItem(); + } + parentItem->takeChild(parentItem->indexOfChild(item)); + delete item; + + if (TOOLKIT_TYPE == parentItem->type() && 0 == parentItem->childCount()) { + QTreeWidgetItem *grandParentItem = parentItem->treeWidget()->invisibleRootItem(); + grandParentItem->takeChild(grandParentItem->indexOfChild(parentItem)); + } + externalToolsItems.remove(id); + } } void ExternalToolSupportSettingsPageWidget::sl_linkActivated(const QString& url) { GUIUtils::runWebBrowser(url); } +namespace { + +void extractCustomTools(QList<QList<ExternalTool *> > &toolkits, QList<ExternalTool *> &customTools) { + customTools.clear(); + for (int i = 0, n = toolkits.size(); i < n; ++i) { + foreach (ExternalTool *tool, toolkits[i]) { + if (tool->isCustom()) { + customTools << tool; + toolkits[i].removeAll(tool); + } + } + } +} + +} + void ExternalToolSupportSettingsPageWidget::setState(AppSettingsGUIPageState* s) { ExternalToolSupportSettingsPageState* state = qobject_cast<ExternalToolSupportSettingsPageState*>(s); - connect(selectToolPackButton, SIGNAL(clicked()), this, SLOT(sl_onBrowseToolPackPath())); - connect(linkLabel, SIGNAL(linkActivated(QString)), this, SLOT(sl_linkActivated(QString))); + SAFE_POINT(nullptr != state, "ExternalToolSupportSettingsPageState is absent", ); - foreach (ExternalTool* tool, state->externalTools) { + foreach(ExternalTool* tool, state->getExternalTools()) { ExternalToolInfo info; + info.id = tool->getId(); info.name = tool->getName(); info.path = tool->getPath(); info.description = tool->getDescription(); info.valid = tool->isValid(); info.version = tool->getVersion(); info.isModule = tool->isModule(); - externalToolsInfo.insert(info.name, info); + externalToolsInfo.insert(info.id, info); connect(tool, SIGNAL(si_toolValidationStatusChanged(bool)), SLOT(sl_toolValidationStatusChanged(bool))); } - treeWidget->setColumnWidth(0, this->geometry().width() / 3); - QList<QList<ExternalTool*> > listToolKits = AppContext::getExternalToolRegistry()->getAllEntriesSortedByToolKits(); - foreach (QList<ExternalTool*> toolsList, listToolKits) { + QList<QList<ExternalTool *> > listToolKits = AppContext::getExternalToolRegistry()->getAllEntriesSortedByToolKits(); + QList<ExternalTool *> customTools; + extractCustomTools(listToolKits, customTools); + + foreach(QList<ExternalTool*> toolsList, listToolKits) { + CHECK_CONTINUE(!toolsList.isEmpty()); + if (toolsList.length() > 1) { ExternalTool* masterOfGroup = isMasterWithModules(toolsList); if (NULL != masterOfGroup) { - QTreeWidgetItem* rootItem = insertChild(treeWidget->invisibleRootItem(), masterOfGroup->getName(), treeWidget->topLevelItemCount()); + QTreeWidgetItem* masterItem = insertChild(twIntegratedTools->invisibleRootItem(), masterOfGroup->getId(), twIntegratedTools->topLevelItemCount()); + masterItem->setExpanded(false); - foreach (ExternalTool* tool, toolsList) { - if (tool != masterOfGroup) { - insertChild(rootItem, tool->getName(), 0, true); - } + toolsList.removeAll(masterOfGroup); + foreach(ExternalTool* tool, toolsList) { + insertChild(masterItem, tool->getId(), 0, true); } - rootItem->setExpanded(false); } else { - QTreeWidgetItem* rootItem = new QTreeWidgetItem((QStringList)toolsList.first()->getToolKitName(), TOOLKIT_TYPE); - - rootItem->setIcon(0, toolsList.first()->getIcon()); - treeWidget->insertTopLevelItem(0, rootItem); - foreach (ExternalTool* tool, toolsList) { - insertChild(rootItem, tool->getName(), 0); + QTreeWidgetItem *toolkitItem = createToolkitItem(twIntegratedTools, toolsList.first()->getToolKitName(), toolsList.first()->getIcon()); + foreach (ExternalTool *tool, toolsList) { + insertChild(toolkitItem, tool->getId(), 0); } - rootItem->setExpanded(true); - - //draw widget for path select button - QWidget* widget = new QWidget(treeWidget); - QToolButton* selectToolKitPathButton = new QToolButton(widget); - selectToolKitPathButton->setVisible(true); - selectToolKitPathButton->setText("..."); - selectToolKitPathButton->setMinimumWidth(buttonsWidth); - selectToolKitPathButton->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred)); - - connect(selectToolKitPathButton, SIGNAL(clicked()), this, SLOT(sl_onPathEditWidgetClick())); - connect(selectToolKitPathButton, SIGNAL(clicked()), this, SLOT(sl_onBrowseToolKitPath())); - - QHBoxLayout* layout = new QHBoxLayout(widget); - layout->setSpacing(0); - layout->setMargin(0); - layout->addStretch(); - layout->addWidget(selectToolKitPathButton); - treeWidget->setItemWidget(rootItem, 1, widget); } - } else { - QTreeWidgetItem* item = new QTreeWidgetItem((QStringList) toolsList.first()->getName()); - externalToolsItems.insert(toolsList.first()->getName(), item); - treeWidget->addTopLevelItem(item); - treeWidget->setItemWidget(item, 1, createPathEditor(treeWidget, toolsList.first()->getPath())); - - if (toolsList.first()->getPath().isEmpty()) { - item->setIcon(0, toolsList.first()->getGrayIcon()); - } else if (toolsList.first()->isValid()) { - item->setIcon(0, toolsList.first()->getIcon()); - } else { - item->setIcon(0, toolsList.first()->getWarnIcon()); - } + insertChild(twIntegratedTools->invisibleRootItem(), { toolsList.first()->getId() }, twIntegratedTools->invisibleRootItem()->childCount()); } } - connect(treeWidget, SIGNAL(itemSelectionChanged()), SLOT(sl_itemSelectionChanged())); + + foreach (ExternalTool *tool, customTools) { + insertChild(twCustomTools->invisibleRootItem(), { tool->getId() }, twCustomTools->invisibleRootItem()->childCount()); + } + + supportedToolsShowHideWidget->setSubgroupOpened(AppContext::getSettings()->getValue(ExternalToolSupportSettingsPageWidget::SUPPORTED_ID, QVariant(true)).toBool()); + customToolsShowHideWidget->setSubgroupOpened(AppContext::getSettings()->getValue(ExternalToolSupportSettingsPageWidget::CUSTOM_ID, QVariant(false)).toBool()); + infoShowHideWidget->setSubgroupOpened(AppContext::getSettings()->getValue(ExternalToolSupportSettingsPageWidget::INFORMATION_ID, QVariant(true)).toBool()); } -QTreeWidgetItem* ExternalToolSupportSettingsPageWidget::insertChild(QTreeWidgetItem* rootItem, const QString& name, int pos, bool isModule) { - QTreeWidgetItem* item = new QTreeWidgetItem((QStringList)name); - externalToolsItems.insert(name, item); +QTreeWidgetItem* ExternalToolSupportSettingsPageWidget::insertChild(QTreeWidgetItem* rootItem, const QString& id, int pos, bool isModule) { + QTreeWidgetItem* item = new QTreeWidgetItem(QStringList() << AppContext::getExternalToolRegistry()->getToolNameById(id)); + item->setData(0, Qt::ItemDataRole::UserRole, id); + QTreeWidget *treeWidget = rootItem->treeWidget(); + + externalToolsItems.insert(id, item); rootItem->insertChild(pos, item); if (isModule) { - QString toolStatus = externalToolsInfo.value(name).valid ? INSTALLED : NOT_INSTALLED; + QString toolStatus = externalToolsInfo.value(id).valid ? INSTALLED : NOT_INSTALLED; treeWidget->setItemWidget(item, 1, new QLabel(toolStatus)); } else { - treeWidget->setItemWidget(item, 1, createPathEditor(treeWidget, externalToolsInfo[name].path)); + treeWidget->setItemWidget(item, 1, createPathEditor(treeWidget, externalToolsInfo[id].path)); } - if (externalToolsInfo.value(name).path.isEmpty()) { - item->setIcon(0, AppContext::getExternalToolRegistry()->getByName(name)->getGrayIcon()); - } else if (externalToolsInfo.value(name).valid) { - item->setIcon(0, AppContext::getExternalToolRegistry()->getByName(name)->getIcon()); + if (externalToolsInfo.value(id).path.isEmpty()) { + item->setIcon(0, AppContext::getExternalToolRegistry()->getById(id)->getGrayIcon()); + } else if (externalToolsInfo.value(id).valid) { + item->setIcon(0, AppContext::getExternalToolRegistry()->getById(id)->getIcon()); } else { - item->setIcon(0, AppContext::getExternalToolRegistry()->getByName(name)->getWarnIcon()); + item->setIcon(0, AppContext::getExternalToolRegistry()->getById(id)->getWarnIcon()); } return item; } -ExternalTool* ExternalToolSupportSettingsPageWidget::isMasterWithModules(const QList<ExternalTool*>& toolsList) const { +ExternalTool* ExternalToolSupportSettingsPageWidget::isMasterWithModules(const QList<ExternalTool*>& toolsList) { ExternalTool* master = NULL; - foreach (ExternalTool* tool, toolsList) { + foreach(ExternalTool* tool, toolsList) { if (tool->isModule()) { continue; } @@ -264,23 +425,23 @@ ExternalTool* ExternalToolSupportSettingsPageWidget::isMasterWithModules(const Q } void ExternalToolSupportSettingsPageWidget::setToolState(ExternalTool* tool) { - QTreeWidgetItem* item = externalToolsItems.value(tool->getName(), NULL); - SAFE_POINT(NULL != item, QString("Tree item for the tool %1 not found").arg(tool->getName()), ); + QTreeWidgetItem* item = externalToolsItems.value(tool->getId(), nullptr); + SAFE_POINT(nullptr != item, QString("Tree item for the tool %1 not found").arg(tool->getName()), ); - externalToolsInfo[tool->getName()].valid = tool->isValid(); - QLabel* moduleToolLabel = qobject_cast<QLabel*>(treeWidget->itemWidget(item, 1)); + externalToolsInfo[tool->getId()].valid = tool->isValid(); + QLabel* moduleToolLabel = qobject_cast<QLabel*>(twIntegratedTools->itemWidget(item, 1)); QString moduleToolState; QString toolStateDesc; if (tool->isValid()) { - item->setIcon(0, AppContext::getExternalToolRegistry()->getByName(tool->getName())->getIcon()); + item->setIcon(0, AppContext::getExternalToolRegistry()->getById(tool->getId())->getIcon()); moduleToolState = INSTALLED; } else if (!tool->getPath().isEmpty()) { toolStateDesc = getToolStateDescription(tool); - item->setIcon(0, AppContext::getExternalToolRegistry()->getByName(tool->getName())->getWarnIcon()); + item->setIcon(0, AppContext::getExternalToolRegistry()->getById(tool->getId())->getWarnIcon()); moduleToolState = NOT_INSTALLED; } else { - item->setIcon(0, AppContext::getExternalToolRegistry()->getByName(tool->getName())->getGrayIcon()); + item->setIcon(0, AppContext::getExternalToolRegistry()->getById(tool->getId())->getGrayIcon()); moduleToolState = ""; } @@ -288,14 +449,14 @@ void ExternalToolSupportSettingsPageWidget::setToolState(ExternalTool* tool) { moduleToolLabel->setText(moduleToolState); } - externalToolsInfo[tool->getName()].path = tool->getPath(); + externalToolsInfo[tool->getId()].path = tool->getPath(); if (!tool->getVersion().isEmpty()) { - externalToolsInfo[tool->getName()].version = tool->getVersion(); + externalToolsInfo[tool->getId()].version = tool->getVersion(); } else { - externalToolsInfo[tool->getName()].version = "unknown"; + externalToolsInfo[tool->getId()].version = "unknown"; } - QList<QTreeWidgetItem*> selectedItems = treeWidget->selectedItems(); + QList<QTreeWidgetItem*> selectedItems = twIntegratedTools->selectedItems(); CHECK(selectedItems.length() > 0, ); QString selectedName = selectedItems.at(0)->text(0); @@ -317,20 +478,21 @@ QString ExternalToolSupportSettingsPageWidget::getToolStateDescription(ExternalT ExternalToolManager* etManager = etRegistry->getManager(); SAFE_POINT(etManager, "External tool manager is NULL", result); - ExternalToolManager::ExternalToolState state = etManager->getToolState(tool->getName()); + ExternalToolManager::ExternalToolState state = etManager->getToolState(tool->getId()); if (state == ExternalToolManager::NotValidByDependency) { QString text = tr("External tool '%1' cannot be validated as it " - "depends on other tools, some of which are not valid. " - "The list of tools is the following: ").arg(tool->getName()); + "depends on other tools, some of which are not valid. " + "The list of tools is the following: ").arg(tool->getName()); QStringList invalidDependencies; QStringList dependencies = tool->getDependencies(); - foreach (const QString& masterName, dependencies) { - if (ExternalToolManager::Valid != etManager->getToolState(masterName)) { - if (tool->getName() != masterName && tool->getToolKitName() != masterName) { + foreach(const QString& masterId, dependencies) { + if (ExternalToolManager::Valid != etManager->getToolState(masterId)) { + QString masterName = AppContext::getExternalToolRegistry()->getToolNameById(masterId); + if (tool->getId() != masterId && tool->getToolKitName() != masterName) { invalidDependencies << getToolLink(masterName); - }else { + } else { invalidDependencies << masterName; } } @@ -342,61 +504,101 @@ QString ExternalToolSupportSettingsPageWidget::getToolStateDescription(ExternalT if (tool->isModule()) { QStringList toolDependencies = tool->getDependencies(); SAFE_POINT(!toolDependencies.isEmpty(), QString("Empty dependency list for " - "the '%1' module tool").arg(tool->getName()), result); - QString masterName = toolDependencies.first(); + "the '%1' module tool").arg(tool->getName()), result); + QString masterId = toolDependencies.first(); QString text = tr("'%1' is %2 module and it is not installed. " - "Install it and restart UGENE or set another " - "%2 with already installed '%1' module.") - .arg(tool->getName()).arg(masterName); + "Install it and restart UGENE or set another " + "%2 with already installed '%1' module.") + .arg(tool->getName()).arg(AppContext::getExternalToolRegistry()->getToolNameById(masterId)); result = warn(text) + "<br><br>"; } - } + if (tool->hasAdditionalErrorMessage()) { + result += warn(tool->getAdditionalErrorMessage()) + "<br><br>"; + } + } return result; } +void ExternalToolSupportSettingsPageWidget::resetDescription() { + descriptionTextBrowser->setPlainText(defaultDescriptionText); +} + void ExternalToolSupportSettingsPageWidget::setDescription(ExternalTool* tool) { QString desc = tr("No description"); - if (tool) { desc = getToolStateDescription(tool); - if (desc.size() == 0){ + if (desc.size() == 0) { desc = tool->getDescription(); - }else{ + } else { desc += tool->getDescription(); } if (tool->isValid()) { desc += tr("<br><br>Version: "); - if (!externalToolsInfo[tool->getName()].version.isEmpty()) { - desc += externalToolsInfo[tool->getName()].version; + if (!externalToolsInfo[tool->getId()].version.isEmpty()) { + desc += externalToolsInfo[tool->getId()].version; } else { desc += tr("unknown"); } } - if (!externalToolsInfo[tool->getName()].path.isEmpty()) { + if (!externalToolsInfo[tool->getId()].path.isEmpty()) { desc += tr("<br><br>Binary path: "); - desc += externalToolsInfo[tool->getName()].path; + desc += externalToolsInfo[tool->getId()].path; } } descriptionTextBrowser->setText(desc + "<a href='1'></a>"); } QString ExternalToolSupportSettingsPageWidget::warn(const QString& text) const { - return "<span style=\"color:" + L10N::errorColorLabelStr( ) + "; font:bold;\">" + text + "</span>"; + return "<span style=\"color:" + L10N::errorColorLabelStr() + "; font:bold;\">" + text + "</span>"; +} + +bool ExternalToolSupportSettingsPageWidget::eventFilter(QObject *watched, QEvent *event) { + CHECK(QEvent::FocusIn == event->type(), false); + + QTreeWidgetItem *item = nullptr; + QList<QTreeWidgetItem *> selectedItems; + if (twIntegratedTools == watched) { + selectedItems = twIntegratedTools->selectedItems(); + } else if (twCustomTools == watched) { + selectedItems = twCustomTools->selectedItems(); + } + + if (!selectedItems.isEmpty()) { + item = selectedItems.first(); + } + + const bool itemSelected = (nullptr != item); + if (itemSelected) { + const QString toolId = externalToolsItems.key(item); + setDescription(AppContext::getExternalToolRegistry()->getById(toolId)); + } else { + resetDescription(); + } + + return false; +} + +void ExternalToolSupportSettingsPageWidget::saveShowHideSubgroupsState() const { + Settings* settings = AppContext::getSettings(); + settings->setValue(ExternalToolSupportSettingsPageWidget::SUPPORTED_ID, QVariant(supportedToolsShowHideWidget->isSubgroupOpened())); + settings->setValue(ExternalToolSupportSettingsPageWidget::CUSTOM_ID, QVariant(customToolsShowHideWidget->isSubgroupOpened())); + settings->setValue(ExternalToolSupportSettingsPageWidget::INFORMATION_ID, QVariant(infoShowHideWidget->isSubgroupOpened())); } AppSettingsGUIPageState* ExternalToolSupportSettingsPageWidget::getState(QString& err) const { Q_UNUSED(err); - ExternalToolSupportSettingsPageState* state = new ExternalToolSupportSettingsPageState(); - foreach (ExternalToolInfo info, externalToolsInfo){ - ExternalTool* externalTool = new ExternalTool(info.name, info.path); + QList<ExternalTool*> externalTools; + foreach(ExternalToolInfo info, externalToolsInfo) { + ExternalTool* externalTool = new ExternalTool(info.id, info.name, info.path); externalTool->setValid(info.valid); externalTool->setVersion(info.version); - state->externalTools.append(externalTool); + externalTools.append(externalTool); } + ExternalToolSupportSettingsPageState* state = new ExternalToolSupportSettingsPageState(externalTools); return state; } @@ -411,24 +613,26 @@ void ExternalToolSupportSettingsPageWidget::sl_toolPathChanged() { QString path = s->text(); s->setModified(false); - QList<QTreeWidgetItem*> listOfItems = treeWidget->findItems("", Qt::MatchContains | Qt::MatchRecursive); + QList<QTreeWidgetItem*> listOfItems = twIntegratedTools->findItems("", Qt::MatchContains | Qt::MatchRecursive) << + twCustomTools->findItems("", Qt::MatchContains | Qt::MatchRecursive); SAFE_POINT(listOfItems.length() != 0, "ExternalToolSupportSettings, NO items are selected", ); - treeWidget->clearSelection(); - foreach (QTreeWidgetItem* item, listOfItems) { - QWidget* itemWid = treeWidget->itemWidget(item, 1); + twIntegratedTools->clearSelection(); + foreach(QTreeWidgetItem* item, listOfItems) { + QWidget* itemWid = item->treeWidget()->itemWidget(item, 1); if (par == itemWid) { //may be no good method for check QTreeWidgetItem - QString toolName = item->text(0); + emit si_setLockState(true); + QString toolId = item->data(0, Qt::ItemDataRole::UserRole).toString(); if (path.isEmpty()) { - item->setIcon(0, AppContext::getExternalToolRegistry()->getByName(toolName)->getGrayIcon()); + item->setIcon(0, AppContext::getExternalToolRegistry()->getById(toolId)->getGrayIcon()); } ExternalToolManager* etManager = AppContext::getExternalToolRegistry()->getManager(); SAFE_POINT(NULL != etManager, "External tool manager is null", ); - ExternalToolValidationListener* listener = new ExternalToolValidationListener(toolName); + ExternalToolValidationListener* listener = new ExternalToolValidationListener(toolId); connect(listener, SIGNAL(si_validationComplete()), SLOT(sl_validationComplete())); - etManager->validate(toolName, path, listener); + etManager->validate(toolId, path, listener); } } } @@ -442,11 +646,12 @@ void ExternalToolSupportSettingsPageWidget::sl_validationComplete() { ExternalToolRegistry* etRegistry = AppContext::getExternalToolRegistry(); CHECK(etRegistry, ); - foreach (const QString& toolName, listener->getToolNames()){ - ExternalTool* tool = etRegistry->getByName(toolName); - SAFE_POINT(NULL != tool, QString("External tool %1 not found in the registry.").arg(toolName), ); + foreach(const QString& toolId, listener->getToolIds()) { + ExternalTool* tool = etRegistry->getById(toolId); + SAFE_POINT(NULL != tool, QString("External tool %1 not found in the registry.").arg(toolId), ); setToolState(tool); } + emit si_setLockState(false); } void ExternalToolSupportSettingsPageWidget::sl_toolValidationStatusChanged(bool isValid) { @@ -459,17 +664,21 @@ void ExternalToolSupportSettingsPageWidget::sl_toolValidationStatusChanged(bool } void ExternalToolSupportSettingsPageWidget::sl_itemSelectionChanged() { + QTreeWidget *treeWidget = qobject_cast<QTreeWidget *>(sender()); QList<QTreeWidgetItem*> selectedItems = treeWidget->selectedItems(); + + pbDelete->setEnabled(!twCustomTools->selectedItems().isEmpty()); + if (selectedItems.length() == 0) { descriptionTextBrowser->setText(tr("Select an external tool to view more information about it.")); return; } SAFE_POINT(selectedItems.length() != 0, "ExternalToolSupportSettings, NO items're selected", ); - QString name = selectedItems.at(0)->text(0); + QString id = selectedItems.at(0)->data(0, Qt::ItemDataRole::UserRole).toString(); if (selectedItems.at(0)->type() == TOOLKIT_TYPE) { - QString text = AppContext::getExternalToolRegistry()->getToolkitDescription(name); + QString text = AppContext::getExternalToolRegistry()->getToolkitDescription(id); if (!text.isEmpty()) { descriptionTextBrowser->setText(text); return; @@ -477,7 +686,8 @@ void ExternalToolSupportSettingsPageWidget::sl_itemSelectionChanged() { } //no description or tool custom description - ExternalTool* tool = AppContext::getExternalToolRegistry()->getByName(name); + ExternalTool* tool = AppContext::getExternalToolRegistry()->getById(id); + setDescription(tool); } @@ -485,13 +695,15 @@ void ExternalToolSupportSettingsPageWidget::sl_onPathEditWidgetClick() { QWidget* s = qobject_cast<QWidget*>(sender()); SAFE_POINT(NULL != s, "Unexpected message sender", ); - QList<QTreeWidgetItem*> listOfItems = treeWidget->findItems("", Qt::MatchContains | Qt::MatchRecursive); + QList<QTreeWidgetItem*> listOfItems = twIntegratedTools->findItems("", Qt::MatchContains | Qt::MatchRecursive); + listOfItems << twCustomTools->findItems("", Qt::MatchContains | Qt::MatchRecursive); SAFE_POINT(listOfItems.length() != 0, "No items were found in the tree", ); - treeWidget->clearSelection(); - foreach (QTreeWidgetItem* item, listOfItems) { + twIntegratedTools->clearSelection(); + twCustomTools->clearSelection(); + foreach(QTreeWidgetItem* item, listOfItems) { QWidget* par = s->parentWidget(); - QWidget* itemWid = treeWidget->itemWidget(item, 1); + QWidget* itemWid = item->treeWidget()->itemWidget(item, 1); if (par == itemWid) { item->setSelected(true); } @@ -499,31 +711,31 @@ void ExternalToolSupportSettingsPageWidget::sl_onPathEditWidgetClick() { } //looks in selected folder +1 level 1 subfolders -void ExternalToolSupportSettingsPageWidget::sl_onBrowseToolKitPath(){ +void ExternalToolSupportSettingsPageWidget::sl_onBrowseToolKitPath() { LastUsedDirHelper lod("toolkit path"); QString dir; lod.url = dir = U2FileDialog::getExistingDirectory(this, tr("Choose Folder With Executables"), lod.dir, QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); if (!dir.isEmpty()) { - assert(treeWidget->selectedItems().isEmpty() == 0); - QString toolKitName = treeWidget->selectedItems().first()->text(0); - QList<QTreeWidgetItem*> listOfItems = treeWidget->findItems("", Qt::MatchContains | Qt::MatchRecursive); + assert(twIntegratedTools->selectedItems().isEmpty() == 0); + QString toolKitName = twIntegratedTools->selectedItems().first()->text(0); + QList<QTreeWidgetItem*> listOfItems = twIntegratedTools->findItems("", Qt::MatchContains | Qt::MatchRecursive); assert(listOfItems.length() != 0); - QStringList toolNames; + QStringList toolIds; StrStrMap toolPaths; - foreach (QTreeWidgetItem* item, listOfItems) { + foreach(QTreeWidgetItem* item, listOfItems) { if (!externalToolsItems.values().contains(item)) { continue; } - QString toolItemText = item->text(0); - if (AppContext::getExternalToolRegistry()->getByName(toolItemText) != NULL) { - if (AppContext::getExternalToolRegistry()->getByName(item->text(0))->getToolKitName() == toolKitName) { - QWidget* itemWid = treeWidget->itemWidget(item, 1); + QString itemId = item->data(0, Qt::UserRole).toString(); + if (AppContext::getExternalToolRegistry()->getById(itemId) != nullptr) { + if (AppContext::getExternalToolRegistry()->getById(itemId)->getToolKitName() == toolKitName) { + QWidget* itemWid = twIntegratedTools->itemWidget(item, 1); PathLineEdit* lineEdit = itemWid->findChild<PathLineEdit*>("PathLineEdit"); LimitedDirIterator it(dir); bool fileNotFound = true; - QString executableFileName = AppContext::getExternalToolRegistry()->getByName(item->text(0))->getExecutableFileName(); + QString executableFileName = AppContext::getExternalToolRegistry()->getById(itemId)->getExecutableFileName(); while (it.hasNext() && fileNotFound) { it.next(); QString fpath = it.filePath() + QDir::separator() + executableFileName; @@ -533,23 +745,24 @@ void ExternalToolSupportSettingsPageWidget::sl_onBrowseToolKitPath(){ QString path = QDir::toNativeSeparators(fpath); lineEdit->setText(path); lineEdit->setModified(false); - externalToolsInfo[item->text(0)].path = path; + externalToolsInfo[itemId].path = path; QToolButton* clearToolPathButton = itemWid->findChild<QToolButton*>("ClearToolPathButton"); assert(clearToolPathButton); clearToolPathButton->setEnabled(true); - toolNames << item->text(0); - toolPaths.insert(item->text(0), path); + toolIds << itemId; + toolPaths.insert(itemId, path); fileNotFound = false; } } } } } - if (!toolNames.isEmpty()) { + if (!toolIds.isEmpty()) { + emit si_setLockState(true); ExternalToolManager* etManager = AppContext::getExternalToolRegistry()->getManager(); - ExternalToolValidationListener* listener = new ExternalToolValidationListener(toolNames); + ExternalToolValidationListener* listener = new ExternalToolValidationListener(toolIds); connect(listener, SIGNAL(si_validationComplete()), SLOT(sl_validationComplete())); - etManager->validate(toolNames, toolPaths, listener); + etManager->validate(toolIds, toolPaths, listener); } } } @@ -561,31 +774,31 @@ void ExternalToolSupportSettingsPageWidget::sl_onBrowseToolPackPath() { if (!dirPath.isEmpty()) { QDir dir = QDir(dirPath); - QList<QTreeWidgetItem*> listOfItems = treeWidget->findItems("" , Qt::MatchContains | Qt::MatchRecursive); + QList<QTreeWidgetItem*> listOfItems = twIntegratedTools->findItems("", Qt::MatchContains | Qt::MatchRecursive); assert(listOfItems.length() != 0); - QStringList toolNames; + QStringList toolIds; StrStrMap toolPaths; bool isPathValid = false; - foreach (ExternalTool* et, AppContext::getExternalToolRegistry()->getAllEntries()) { + foreach(ExternalTool* et, AppContext::getExternalToolRegistry()->getAllEntries()) { if (et->isModule()) { continue; } - QTreeWidgetItem* item = externalToolsItems.value(et->getName(), NULL); + QTreeWidgetItem* item = externalToolsItems.value(et->getId(), nullptr); SAFE_POINT(NULL != item, QString("Tree item not found for the tool %1").arg(et->getName()), ); - foreach (QString dirName, dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot)) { + foreach(QString dirName, dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot)) { QString toolKitName = et->getToolKitName(); if (dirName.contains(toolKitName, Qt::CaseInsensitive)) { isPathValid = true; - QWidget* itemWid = treeWidget->itemWidget(item, 1); + QWidget* itemWid = twIntegratedTools->itemWidget(item, 1); PathLineEdit* lineEdit = itemWid->findChild<PathLineEdit*>("PathLineEdit"); QString toolPath = dirPath + QDir::separator() + dirName; QDir toolDir(toolPath); LimitedDirIterator it(toolDir); bool fileNotFound = true; - QString executableFileName = AppContext::getExternalToolRegistry()->getByName(item->text(0))->getExecutableFileName(); + QString executableFileName = AppContext::getExternalToolRegistry()->getById(et->getId())->getExecutableFileName(); while (it.hasNext() && fileNotFound) { it.next(); QString fName = it.filePath() + QDir::separator() + executableFileName; @@ -594,14 +807,14 @@ void ExternalToolSupportSettingsPageWidget::sl_onBrowseToolPackPath() { QString path = QDir::toNativeSeparators(fName); lineEdit->setText(path); lineEdit->setModified(false); - externalToolsInfo[item->text(0)].path = path; + externalToolsInfo[item->data(0, Qt::UserRole).toString()].path = path; QToolButton* clearToolPathButton = itemWid->findChild<QToolButton*>("ClearToolPathButton"); assert(clearToolPathButton); clearToolPathButton->setEnabled(true); - QString toolName = item->text(0); - toolNames << toolName; - toolPaths.insert(toolName, path); + QString toolId = et->getId(); + toolIds << toolId; + toolPaths.insert(toolId, path); fileNotFound = false; } } @@ -611,14 +824,15 @@ void ExternalToolSupportSettingsPageWidget::sl_onBrowseToolPackPath() { if (!isPathValid) { QMessageBox::warning(this, L10N::warningTitle(), - tr("Not a valid external tools folder"), - QMessageBox::Ok); + tr("Not a valid external tools folder"), + QMessageBox::Ok); } - if (!toolNames.isEmpty()) { + if (!toolIds.isEmpty()) { + emit si_setLockState(true); ExternalToolManager* etManager = AppContext::getExternalToolRegistry()->getManager(); - ExternalToolValidationListener* listener = new ExternalToolValidationListener(toolNames); + ExternalToolValidationListener* listener = new ExternalToolValidationListener(toolIds); connect(listener, SIGNAL(si_validationComplete()), SLOT(sl_validationComplete())); - etManager->validate(toolNames, toolPaths, listener); + etManager->validate(toolIds, toolPaths, listener); } } } @@ -645,7 +859,7 @@ void PathLineEdit::sl_onBrowse() { setFocus(); } -void PathLineEdit::sl_clear(){ +void PathLineEdit::sl_clear() { QToolButton* s = qobject_cast<QToolButton*>(sender()); assert(s); setText(""); @@ -654,5 +868,9 @@ void PathLineEdit::sl_clear(){ emit editingFinished(); } +void PathLineEdit::focusInEvent(QFocusEvent * /*event*/) { + emit si_focusIn(); +} + } //namespace diff --git a/src/plugins/external_tool_support/src/ExternalToolSupportSettingsController.h b/src/plugins/external_tool_support/src/ExternalToolSupportSettingsController.h index f7405cb5d342702b49d16f7e3ec835c622e6de62..192f4ca7d71cdad2d1ee044e54f6d7eacfb6d691 100644 --- a/src/plugins/external_tool_support/src/ExternalToolSupportSettingsController.h +++ b/src/plugins/external_tool_support/src/ExternalToolSupportSettingsController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -28,10 +28,13 @@ #include <QLineEdit> -namespace U2 -{ +namespace U2 { + +class ShowHideSubgroupWidget; + #define ExternalToolSupportSettingsPageId QString("ets") -struct ExternalToolInfo{ +struct ExternalToolInfo { + QString id; QString name; QString path; QString description; @@ -48,7 +51,8 @@ public: AppSettingsGUIPageState* getSavedState(); void saveState(AppSettingsGUIPageState* s); AppSettingsGUIPageWidget* createWidget(AppSettingsGUIPageState* state); - const QString& getHelpPageId() const {return helpPageId;}; + const QString& getHelpPageId() const; + private: static const QString helpPageId; }; @@ -56,26 +60,37 @@ private: class ExternalToolSupportSettingsPageState : public AppSettingsGUIPageState { Q_OBJECT public: - QList<ExternalTool*> externalTools; + ExternalToolSupportSettingsPageState(const QList<ExternalTool*>& ets); + + QList<ExternalTool*> getExternalTools() const; + +private: + QList<ExternalTool *> externalTools; }; -class ExternalToolSupportSettingsPageWidget: public AppSettingsGUIPageWidget, public Ui_ETSSettingsWidget { +class ExternalToolSupportSettingsPageWidget : public AppSettingsGUIPageWidget, public Ui_ETSSettingsWidget { Q_OBJECT public: ExternalToolSupportSettingsPageWidget(ExternalToolSupportSettingsPageController* ctrl); + ~ExternalToolSupportSettingsPageWidget() override; - virtual void setState(AppSettingsGUIPageState* state); + virtual void setState(AppSettingsGUIPageState* state) override; - virtual AppSettingsGUIPageState* getState(QString& err) const; + virtual AppSettingsGUIPageState* getState(QString& err) const override; private: QWidget* createPathEditor(QWidget *parent, const QString& path) const; - QTreeWidgetItem* insertChild(QTreeWidgetItem* rootItem, const QString& name, int pos, bool isModule = false); - ExternalTool* isMasterWithModules(const QList<ExternalTool*>& toolsList) const; + QTreeWidgetItem *findToolkitItem(QTreeWidget *treeWidget, const QString &toolkitName); + QTreeWidgetItem *createToolkitItem(QTreeWidget *treeWidget, const QString &toolkitName, const QIcon &icon); + QTreeWidgetItem* insertChild(QTreeWidgetItem* rootItem, const QString& id, int pos, bool isModule = false); + static ExternalTool* isMasterWithModules(const QList<ExternalTool*>& toolsList); void setToolState(ExternalTool* tool); QString getToolStateDescription(ExternalTool* tool) const; + void resetDescription(); void setDescription(ExternalTool* tool); QString warn(const QString& text) const; + bool eventFilter(QObject *watched, QEvent *event) override; + void saveShowHideSubgroupsState() const; private slots: void sl_toolPathChanged(); @@ -87,15 +102,27 @@ private slots: void sl_toolValidationStatusChanged(bool isValid); void sl_validationComplete(); void sl_onClickLink(const QUrl& url); + void sl_importCustomToolButtonClicked(); + void sl_deleteCustomToolButtonClicked(); + void sl_externalToolAdded(const QString &id); + void sl_externalToolIsAboutToBeRemoved(const QString &id); private: QMap<QString, ExternalToolInfo> externalToolsInfo; - QMap<QString, QTreeWidgetItem*> externalToolsItems; + QMap<QString, QTreeWidgetItem *> externalToolsItems; QString getToolLink(const QString &toolName) const; mutable int buttonsWidth; + QString defaultDescriptionText; + ShowHideSubgroupWidget* supportedToolsShowHideWidget; + ShowHideSubgroupWidget* customToolsShowHideWidget; + ShowHideSubgroupWidget* infoShowHideWidget; static const QString INSTALLED; static const QString NOT_INSTALLED; + static const QString ET_DOWNLOAD_INFO; + static const QString SUPPORTED_ID; + static const QString CUSTOM_ID; + static const QString INFORMATION_ID; }; class PathLineEdit : public QLineEdit { @@ -104,16 +131,22 @@ public: PathLineEdit(const QString& filter, const QString& type, bool multi, QWidget *parent) : QLineEdit(parent), FileFilter(filter), type(type), multi(multi) {} +signals: + void si_focusIn(); + private slots: void sl_onBrowse(); void sl_clear(); private: + void focusInEvent(QFocusEvent *event) override; + QString FileFilter; QString type; bool multi; QString path; }; + }//namespace #endif // _U2_EXTERNAL_TOOL_SUPPORT_SETTINGS_CONTROLLER_H diff --git a/src/plugins/external_tool_support/src/R/RSupport.cpp b/src/plugins/external_tool_support/src/R/RSupport.cpp index 8c96289840f1a64ef152dca4581e139f04d458e8..5d925bbc5c3f384813ccb367dba7dd045ab206cc 100644 --- a/src/plugins/external_tool_support/src/R/RSupport.cpp +++ b/src/plugins/external_tool_support/src/R/RSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -35,7 +35,40 @@ namespace U2 { -RSupport::RSupport(const QString& name, const QString& path) : ExternalTool(name, path) { +const QString RSupport::ET_R = "Rscript"; +const QString RSupport::ET_R_ID = "USUPP_RSCRIPT"; +const QString RModuleGostatsSupport::ET_R_GOSTATS = "GOstats"; +const QString RModuleGostatsSupport::ET_R_GOSTATS_ID = "USUPP_GOSTATS"; +const QString RModuleGodbSupport::ET_R_GO_DB = "GO.db"; +const QString RModuleGodbSupport::ET_R_GO_DB_ID = "USUPP_GO_DB"; +const QString RModuleHgu133adbSupport::ET_R_HGU133A_DB = "hgu133a.db"; +const QString RModuleHgu133adbSupport::ET_R_HGU133A_DB_ID = "USUPP_HGU133A_DB"; +const QString RModuleHgu133bdbSupport::ET_R_HGU133B_DB = "hgu133b.db"; +const QString RModuleHgu133bdbSupport::ET_R_HGU133B_DB_ID = "USUPP_HGU133B_DB"; +const QString RModuleHgu133plus2dbSupport::ET_R_HGU1333PLUS2_DB = "hgu133plus2.db"; +const QString RModuleHgu133plus2dbSupport::ET_R_HGU1333PLUS2_DB_ID = "USUPP_HGU133PLUS2_DB"; +const QString RModuleHgu95av2dbSupport::ET_R_HGU95AV2_DB = "hgu95av2.db"; +const QString RModuleHgu95av2dbSupport::ET_R_HGU95AV2_DB_ID = "USUPP_HGU95AV2_DB"; +const QString RModuleMouse430a2dbSupport::ET_R_MOUSE430A2_DB = "mouse430a2.db"; +const QString RModuleMouse430a2dbSupport::ET_R_MOUSE430A2_DB_ID = "USUPP_MOUSE430A2_DB"; +const QString RModuleCelegansdbSupport::ET_R_CELEGANS_DB = "celegans.db"; +const QString RModuleCelegansdbSupport::ET_R_CELEGANS_DB_ID = "USUPP_CELEGANS_DB"; +const QString RModuleDrosophila2dbSupport::ET_R_DROSOPHILA2_DB = "drosophila2.db"; +const QString RModuleDrosophila2dbSupport::ET_R_DROSOPHILA2_DB_ID = "USUPP_DROSOPHILA2_DB"; +const QString RModuleOrghsegdbSupport::ET_R_ORG_HS_EG_DB = "org.Hs.eg.db"; +const QString RModuleOrghsegdbSupport::ET_R_ORG_HS_EG_DB_ID = "USUPP_ORG_HS_EG_DB"; +const QString RModuleOrgmmegdbSupport::ET_R_ORG_MM_EG_DB = "org.Mm.eg.db"; +const QString RModuleOrgmmegdbSupport::ET_R_ORG_MM_EG_DB_ID = "USUPP_ORG_MM_EG_DB"; +const QString RModuleOrgceegdbSupport::ET_R_ORG_CE_EG_DB = "org.Ce.eg.db"; +const QString RModuleOrgceegdbSupport::ET_R_ORG_CE_EG_DB_ID = "USUPP_ORG_CE_EG_DB"; +const QString RModuleOrgdmegdbSupport::ET_R_ORG_DM_EG_DB = "org.Dm.eg.db"; +const QString RModuleOrgdmegdbSupport::ET_R_ORG_DM_EG_DB_ID = "USUPP_ORG_DM_EG_DB"; +const QString RModuleSeqlogoSupport::ET_R_SEQLOGO = "seqLogo"; +const QString RModuleSeqlogoSupport::ET_R_SEQLOGO_ID = "USUPP_SEQLOGO"; + +RSupport::RSupport(const QString& id, const QString& name, const QString& path) + : RunnerTool(QStringList(), id, name, path) +{ if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/R.png"); grayIcon = QIcon(":external_tool_support/images/R_gray.png"); @@ -57,16 +90,9 @@ RSupport::RSupport(const QString& name, const QString& path) : ExternalTool(name toolKitName = "R"; muted = true; - - connect(this, SIGNAL(si_toolValidationStatusChanged(bool)), SLOT(sl_toolValidationStatusChanged(bool))); -} - -void RSupport::sl_toolValidationStatusChanged(bool isValid) { - Q_UNUSED(isValid); - ScriptingTool::onPathChanged(this); } -RModuleSupport::RModuleSupport(const QString& name) : ExternalToolModule(name) { +RModuleSupport::RModuleSupport(const QString& id, const QString& name) : ExternalToolModule(id, name) { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/R.png"); grayIcon = QIcon(":external_tool_support/images/R_gray.png"); @@ -86,7 +112,7 @@ RModuleSupport::RModuleSupport(const QString& name) : ExternalToolModule(name) { validationArguments << "-e"; toolKitName = "R"; - dependencies << ET_R; + dependencies << RSupport::ET_R_ID; errorDescriptions.insert("character(0)", tr("R module is not installed. " "Install module or set path " @@ -101,86 +127,86 @@ QString RModuleSupport::getScript() const { return QString("list <- installed.packages();list[grep('%1',rownames(list))];list['%1','Version'];"); } -RModuleGostatsSupport::RModuleGostatsSupport(const QString &name) : RModuleSupport(name) { - description += ET_R_GOSTATS + tr(": Rscript module for the %1 tool").arg(ET_GO_ANALYSIS); +RModuleGostatsSupport::RModuleGostatsSupport(const QString &id, const QString &name) : RModuleSupport(id, name) { + description += ET_R_GOSTATS + tr(": Rscript module for the %1 tool").arg(ConductGOSupport::ET_GO_ANALYSIS); validationArguments << getScript().arg(ET_R_GOSTATS); validMessage = QString("\"%1\"").arg(ET_R_GOSTATS); } -RModuleGodbSupport::RModuleGodbSupport(const QString &name) : RModuleSupport(name) { - description += ET_R_GO_DB + tr(": Rscript module for the %1 tool").arg(ET_GO_ANALYSIS); +RModuleGodbSupport::RModuleGodbSupport(const QString &id, const QString &name) : RModuleSupport(id, name) { + description += ET_R_GO_DB + tr(": Rscript module for the %1 tool").arg(ConductGOSupport::ET_GO_ANALYSIS); validationArguments << getScript().arg(ET_R_GO_DB); validMessage = QString("\"%1\"").arg(ET_R_GO_DB); } -RModuleHgu133adbSupport::RModuleHgu133adbSupport(const QString &name) : RModuleSupport(name) { - description += ET_R_HGU133A_DB + tr(": Rscript module for the %1 tool").arg(ET_GO_ANALYSIS); +RModuleHgu133adbSupport::RModuleHgu133adbSupport(const QString &id, const QString &name) : RModuleSupport(id, name) { + description += ET_R_HGU133A_DB + tr(": Rscript module for the %1 tool").arg(ConductGOSupport::ET_GO_ANALYSIS); validationArguments << getScript().arg(ET_R_HGU133A_DB); validMessage = QString("\"%1\"").arg(ET_R_HGU133A_DB); } -RModuleHgu133bdbSupport::RModuleHgu133bdbSupport(const QString &name) : RModuleSupport(name) { - description += ET_R_HGU133B_DB + tr(": Rscript module for the %1 tool").arg(ET_GO_ANALYSIS); +RModuleHgu133bdbSupport::RModuleHgu133bdbSupport(const QString &id, const QString &name) : RModuleSupport(id, name) { + description += ET_R_HGU133B_DB + tr(": Rscript module for the %1 tool").arg(ConductGOSupport::ET_GO_ANALYSIS); validationArguments << getScript().arg(ET_R_HGU133B_DB); validMessage = QString("\"%1\"").arg(ET_R_HGU133B_DB); } -RModuleHgu133plus2dbSupport::RModuleHgu133plus2dbSupport(const QString &name) : RModuleSupport(name) { - description += ET_R_HGU1333PLUS2_DB + tr(": Rscript module for the %1 tool").arg(ET_GO_ANALYSIS); +RModuleHgu133plus2dbSupport::RModuleHgu133plus2dbSupport(const QString &id, const QString &name) : RModuleSupport(id, name) { + description += ET_R_HGU1333PLUS2_DB + tr(": Rscript module for the %1 tool").arg(ConductGOSupport::ET_GO_ANALYSIS); validationArguments << getScript().arg(ET_R_HGU1333PLUS2_DB); validMessage = QString("\"%1\"").arg(ET_R_HGU1333PLUS2_DB); } -RModuleHgu95av2dbSupport::RModuleHgu95av2dbSupport(const QString &name) : RModuleSupport(name) { - description += ET_R_HGU95AV2_DB + tr(": Rscript module for the %1 tool").arg(ET_GO_ANALYSIS); +RModuleHgu95av2dbSupport::RModuleHgu95av2dbSupport(const QString &id, const QString &name) : RModuleSupport(id, name) { + description += ET_R_HGU95AV2_DB + tr(": Rscript module for the %1 tool").arg(ConductGOSupport::ET_GO_ANALYSIS); validationArguments << getScript().arg(ET_R_HGU95AV2_DB); validMessage = QString("\"%1\"").arg(ET_R_HGU95AV2_DB); } -RModuleMouse430a2dbSupport::RModuleMouse430a2dbSupport(const QString &name) : RModuleSupport(name) { - description += ET_R_MOUSE430A2_DB + tr(": Rscript module for the %1 tool").arg(ET_GO_ANALYSIS); +RModuleMouse430a2dbSupport::RModuleMouse430a2dbSupport(const QString &id, const QString &name) : RModuleSupport(id, name) { + description += ET_R_MOUSE430A2_DB + tr(": Rscript module for the %1 tool").arg(ConductGOSupport::ET_GO_ANALYSIS); validationArguments << getScript().arg(ET_R_MOUSE430A2_DB); validMessage = QString("\"%1\"").arg(ET_R_MOUSE430A2_DB); } -RModuleCelegansdbSupport::RModuleCelegansdbSupport(const QString &name) : RModuleSupport(name) { - description += ET_R_CELEGANS_DB + tr(": Rscript module for the %1 tool").arg(ET_GO_ANALYSIS); +RModuleCelegansdbSupport::RModuleCelegansdbSupport(const QString &id, const QString &name) : RModuleSupport(id, name) { + description += ET_R_CELEGANS_DB + tr(": Rscript module for the %1 tool").arg(ConductGOSupport::ET_GO_ANALYSIS); validationArguments << getScript().arg(ET_R_CELEGANS_DB); validMessage = QString("\"%1\"").arg(ET_R_CELEGANS_DB); } -RModuleDrosophila2dbSupport::RModuleDrosophila2dbSupport(const QString &name) : RModuleSupport(name) { - description += ET_R_DROSOPHILA2_DB + tr(": Rscript module for the %1 tool").arg(ET_GO_ANALYSIS); +RModuleDrosophila2dbSupport::RModuleDrosophila2dbSupport(const QString &id, const QString &name) : RModuleSupport(id, name) { + description += ET_R_DROSOPHILA2_DB + tr(": Rscript module for the %1 tool").arg(ConductGOSupport::ET_GO_ANALYSIS); validationArguments << getScript().arg(ET_R_DROSOPHILA2_DB); validMessage = QString("\"%1\"").arg(ET_R_DROSOPHILA2_DB); } -RModuleOrghsegdbSupport::RModuleOrghsegdbSupport(const QString &name) : RModuleSupport(name) { - description += ET_R_ORG_HS_EG_DB + tr(": Rscript module for the %1 tool").arg(ET_GO_ANALYSIS); +RModuleOrghsegdbSupport::RModuleOrghsegdbSupport(const QString &id, const QString &name) : RModuleSupport(id, name) { + description += ET_R_ORG_HS_EG_DB + tr(": Rscript module for the %1 tool").arg(ConductGOSupport::ET_GO_ANALYSIS); validationArguments << getScript().arg(ET_R_ORG_HS_EG_DB); validMessage = QString("\"%1\"").arg(ET_R_ORG_HS_EG_DB); } -RModuleOrgmmegdbSupport::RModuleOrgmmegdbSupport(const QString &name) : RModuleSupport(name) { - description += ET_R_ORG_MM_EG_DB + tr(": Rscript module for the %1 tool").arg(ET_GO_ANALYSIS); +RModuleOrgmmegdbSupport::RModuleOrgmmegdbSupport(const QString &id, const QString &name) : RModuleSupport(id, name) { + description += ET_R_ORG_MM_EG_DB + tr(": Rscript module for the %1 tool").arg(ConductGOSupport::ET_GO_ANALYSIS); validationArguments << getScript().arg(ET_R_ORG_MM_EG_DB); validMessage = QString("\"%1\"").arg(ET_R_ORG_MM_EG_DB); } -RModuleOrgceegdbSupport::RModuleOrgceegdbSupport(const QString &name) : RModuleSupport(name) { - description += ET_R_ORG_CE_EG_DB + tr(": Rscript module for the %1 tool").arg(ET_GO_ANALYSIS); +RModuleOrgceegdbSupport::RModuleOrgceegdbSupport(const QString &id, const QString &name) : RModuleSupport(id, name) { + description += ET_R_ORG_CE_EG_DB + tr(": Rscript module for the %1 tool").arg(ConductGOSupport::ET_GO_ANALYSIS); validationArguments << getScript().arg(ET_R_ORG_CE_EG_DB); validMessage = QString("\"%1\"").arg(ET_R_ORG_CE_EG_DB); } -RModuleOrgdmegdbSupport::RModuleOrgdmegdbSupport(const QString &name) : RModuleSupport(name) { - description += ET_R_ORG_DM_EG_DB + tr(": Rscript module for the %1 tool").arg(ET_GO_ANALYSIS); +RModuleOrgdmegdbSupport::RModuleOrgdmegdbSupport(const QString &id, const QString &name) : RModuleSupport(id, name) { + description += ET_R_ORG_DM_EG_DB + tr(": Rscript module for the %1 tool").arg(ConductGOSupport::ET_GO_ANALYSIS); validationArguments << getScript().arg(ET_R_ORG_DM_EG_DB); validMessage = QString("\"%1\"").arg(ET_R_ORG_DM_EG_DB); } -RModuleSeqlogoSupport::RModuleSeqlogoSupport(const QString &name) : RModuleSupport(name) { - description += ET_R_SEQLOGO + tr(": Rscript module for the %1 tool").arg(ET_SEQPOS); +RModuleSeqlogoSupport::RModuleSeqlogoSupport(const QString &id, const QString &name) : RModuleSupport(id, name) { + description += ET_R_SEQLOGO + tr(": Rscript module for the %1 tool").arg(SeqPosSupport::ET_SEQPOS); validationArguments << getScript().arg(ET_R_SEQLOGO); validMessage = QString("\"%1\"").arg(ET_R_SEQLOGO); } diff --git a/src/plugins/external_tool_support/src/R/RSupport.h b/src/plugins/external_tool_support/src/R/RSupport.h index ac4137c11552af6a6f5fe034fec65ed8ed5cb7ca..02bc79479e1b2ab885785b4ffd489c111fe88fb7 100644 --- a/src/plugins/external_tool_support/src/R/RSupport.h +++ b/src/plugins/external_tool_support/src/R/RSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,38 +23,25 @@ #define _U2_R_SUPPORT_H_ #include <U2Core/ExternalToolRegistry.h> -#include "utils/ExternalToolSupportAction.h" -#define ET_R "Rscript" -#define ET_R_GOSTATS "GOstats" -#define ET_R_GO_DB "GO.db" -#define ET_R_HGU133A_DB "hgu133a.db" -#define ET_R_HGU133B_DB "hgu133b.db" -#define ET_R_HGU1333PLUS2_DB "hgu133plus2.db" -#define ET_R_HGU95AV2_DB "hgu95av2.db" -#define ET_R_MOUSE430A2_DB "mouse430a2.db" -#define ET_R_CELEGANS_DB "celegans.db" -#define ET_R_DROSOPHILA2_DB "drosophila2.db" -#define ET_R_ORG_HS_EG_DB "org.Hs.eg.db" -#define ET_R_ORG_MM_EG_DB "org.Mm.eg.db" -#define ET_R_ORG_CE_EG_DB "org.Ce.eg.db" -#define ET_R_ORG_DM_EG_DB "org.Dm.eg.db" -#define ET_R_SEQLOGO "seqLogo" +#include "RunnerTool.h" +#include "utils/ExternalToolSupportAction.h" namespace U2 { -class RSupport : public ExternalTool { +class RSupport : public RunnerTool { Q_OBJECT public: - RSupport(const QString& name, const QString& path = ""); -private slots: - void sl_toolValidationStatusChanged(bool isValid); + RSupport(const QString& id, const QString& name, const QString& path = ""); + + static const QString ET_R; + static const QString ET_R_ID; }; class RModuleSupport : public ExternalToolModule { Q_OBJECT public: - RModuleSupport(const QString& name); + RModuleSupport(const QString& id, const QString& name); protected: QString getScript() const; }; @@ -62,85 +49,127 @@ protected: class RModuleGostatsSupport : public RModuleSupport { Q_OBJECT public: - RModuleGostatsSupport(const QString& name); + RModuleGostatsSupport(const QString& id, const QString& name); + + static const QString ET_R_GOSTATS; + static const QString ET_R_GOSTATS_ID; }; class RModuleGodbSupport : public RModuleSupport { Q_OBJECT public: - RModuleGodbSupport(const QString& name); + RModuleGodbSupport(const QString& id, const QString& name); + + static const QString ET_R_GO_DB; + static const QString ET_R_GO_DB_ID; }; class RModuleHgu133adbSupport : public RModuleSupport { Q_OBJECT public: - RModuleHgu133adbSupport(const QString& name); + RModuleHgu133adbSupport(const QString& id, const QString& name); + + static const QString ET_R_HGU133A_DB; + static const QString ET_R_HGU133A_DB_ID; }; class RModuleHgu133bdbSupport : public RModuleSupport { Q_OBJECT public: - RModuleHgu133bdbSupport(const QString& name); + RModuleHgu133bdbSupport(const QString& id, const QString& name); + + static const QString ET_R_HGU133B_DB; + static const QString ET_R_HGU133B_DB_ID; }; class RModuleHgu133plus2dbSupport : public RModuleSupport { Q_OBJECT public: - RModuleHgu133plus2dbSupport(const QString& name); + RModuleHgu133plus2dbSupport(const QString& id, const QString& name); + + static const QString ET_R_HGU1333PLUS2_DB; + static const QString ET_R_HGU1333PLUS2_DB_ID; }; class RModuleHgu95av2dbSupport : public RModuleSupport { Q_OBJECT public: - RModuleHgu95av2dbSupport(const QString& name); + RModuleHgu95av2dbSupport(const QString& id, const QString& name); + + static const QString ET_R_HGU95AV2_DB; + static const QString ET_R_HGU95AV2_DB_ID; }; class RModuleMouse430a2dbSupport : public RModuleSupport { Q_OBJECT public: - RModuleMouse430a2dbSupport(const QString& name); + RModuleMouse430a2dbSupport(const QString& id, const QString& name); + + static const QString ET_R_MOUSE430A2_DB; + static const QString ET_R_MOUSE430A2_DB_ID; }; class RModuleCelegansdbSupport : public RModuleSupport { Q_OBJECT public: - RModuleCelegansdbSupport(const QString& name); + RModuleCelegansdbSupport(const QString& id, const QString& name); + + static const QString ET_R_CELEGANS_DB; + static const QString ET_R_CELEGANS_DB_ID; }; class RModuleDrosophila2dbSupport : public RModuleSupport { Q_OBJECT public: - RModuleDrosophila2dbSupport(const QString& name); + RModuleDrosophila2dbSupport(const QString& id, const QString& name); + + static const QString ET_R_DROSOPHILA2_DB; + static const QString ET_R_DROSOPHILA2_DB_ID; }; class RModuleOrghsegdbSupport : public RModuleSupport { Q_OBJECT public: - RModuleOrghsegdbSupport(const QString& name); + RModuleOrghsegdbSupport(const QString& id, const QString& name); + + static const QString ET_R_ORG_HS_EG_DB; + static const QString ET_R_ORG_HS_EG_DB_ID; }; class RModuleOrgmmegdbSupport : public RModuleSupport { Q_OBJECT public: - RModuleOrgmmegdbSupport(const QString& name); + RModuleOrgmmegdbSupport(const QString& id, const QString& name); + + static const QString ET_R_ORG_MM_EG_DB; + static const QString ET_R_ORG_MM_EG_DB_ID; }; class RModuleOrgceegdbSupport : public RModuleSupport { Q_OBJECT public: - RModuleOrgceegdbSupport(const QString& name); + RModuleOrgceegdbSupport(const QString& id, const QString& name); + + static const QString ET_R_ORG_CE_EG_DB; + static const QString ET_R_ORG_CE_EG_DB_ID; }; class RModuleOrgdmegdbSupport : public RModuleSupport { Q_OBJECT public: - RModuleOrgdmegdbSupport(const QString& name); + RModuleOrgdmegdbSupport(const QString& id, const QString& name); + + static const QString ET_R_ORG_DM_EG_DB; + static const QString ET_R_ORG_DM_EG_DB_ID; }; class RModuleSeqlogoSupport : public RModuleSupport { Q_OBJECT public: - RModuleSeqlogoSupport(const QString& name); + RModuleSeqlogoSupport(const QString& id, const QString& name); + + static const QString ET_R_SEQLOGO; + static const QString ET_R_SEQLOGO_ID; }; } // namespace diff --git a/src/plugins/external_tool_support/src/RnaSeqCommon.cpp b/src/plugins/external_tool_support/src/RnaSeqCommon.cpp index e856a7e7680fafe5caee38670c156ce5feaa17d0..b098139282dbca303c7aa5733b9b2ada805feab1 100644 --- a/src/plugins/external_tool_support/src/RnaSeqCommon.cpp +++ b/src/plugins/external_tool_support/src/RnaSeqCommon.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/RnaSeqCommon.h b/src/plugins/external_tool_support/src/RnaSeqCommon.h index 8856760a17330fe3567cfd9e0bc933df4e69f98e..da2cba1d8d1d45efe079baec5307a63f6e1013d8 100644 --- a/src/plugins/external_tool_support/src/RnaSeqCommon.h +++ b/src/plugins/external_tool_support/src/RnaSeqCommon.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/RunnerTool.cpp b/src/plugins/external_tool_support/src/RunnerTool.cpp new file mode 100644 index 0000000000000000000000000000000000000000..daf7ce262d74d7cfc6f2656eb161256c895a142f --- /dev/null +++ b/src/plugins/external_tool_support/src/RunnerTool.cpp @@ -0,0 +1,44 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <U2Core/ScriptingToolRegistry.h> + +#include "RunnerTool.h" + +namespace U2 { + +RunnerTool::RunnerTool(const QStringList& _runParameters, const QString& id, const QString& name, const QString& path) + : ExternalTool(id, name, path), runParameters(_runParameters) +{ + isRunnerTool = true; + connect(this, SIGNAL(si_toolValidationStatusChanged(bool)), SLOT(sl_toolValidationStatusChanged(bool))); +} + +QStringList RunnerTool::getRunParameters() const { + return runParameters; +} + +void RunnerTool::sl_toolValidationStatusChanged(bool isValid) { + Q_UNUSED(isValid); + ScriptingTool::onPathChanged(this, runParameters); +} + +} \ No newline at end of file diff --git a/src/ugeneui/src/utils/MultilingualHtmlView.h b/src/plugins/external_tool_support/src/RunnerTool.h similarity index 61% rename from src/ugeneui/src/utils/MultilingualHtmlView.h rename to src/plugins/external_tool_support/src/RunnerTool.h index c895890e740b8e90f31da360257bc029e61c9564..b398eb26203c0f4c4fd87d57d41257210e9091bd 100644 --- a/src/ugeneui/src/utils/MultilingualHtmlView.h +++ b/src/plugins/external_tool_support/src/RunnerTool.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,31 +19,27 @@ * MA 02110-1301, USA. */ -#ifndef _U2_MULTILINGUAL_HTML_VIEW_H_ -#define _U2_MULTILINGUAL_HTML_VIEW_H_ -#include <QWebView> +#ifndef _U2_RUNNER_TOOL_H_ +#define _U2_RUNNER_TOOL_H_ + +#include <U2Core/ExternalToolRegistry.h> namespace U2 { -class MultilingualHtmlView : public QWebView { +class RunnerTool : public ExternalTool { Q_OBJECT public: - MultilingualHtmlView(const QString& htmlPath, QWidget* parent = NULL); - bool isLoaded() const; + RunnerTool(const QStringList& runParameters, const QString& id, const QString& name, const QString& path); -protected slots: - virtual void sl_loaded(bool ok); - virtual void sl_linkActivated(const QUrl& url); + QStringList getRunParameters() const override; -signals: - void si_loaded(bool ok); +protected slots: + void sl_toolValidationStatusChanged(bool isValid); private: - void loadPage(const QString& htmlPath); - bool loaded; + QStringList runParameters; }; -} // namespace - -#endif // _U2_MULTILINGUAL_HTML_VIEW_H_ +} +#endif \ No newline at end of file diff --git a/src/plugins/external_tool_support/src/TaskLocalStorage.cpp b/src/plugins/external_tool_support/src/TaskLocalStorage.cpp index 99ebaef1b6eb92af4b5c9b501c53b149a10e6f7c..7cdc49d0c9061c300f571685ac696d15659aae02 100644 --- a/src/plugins/external_tool_support/src/TaskLocalStorage.cpp +++ b/src/plugins/external_tool_support/src/TaskLocalStorage.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/TaskLocalStorage.h b/src/plugins/external_tool_support/src/TaskLocalStorage.h index 50c6f377520635f9757a53c9231325a63f710e68..1a3fe1240093ec599c2b5616ba62fc50021b84ec 100644 --- a/src/plugins/external_tool_support/src/TaskLocalStorage.h +++ b/src/plugins/external_tool_support/src/TaskLocalStorage.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/bedtools/BedToolsWorkersLibrary.cpp b/src/plugins/external_tool_support/src/bedtools/BedToolsWorkersLibrary.cpp index c595bd26b6974bb399951987676c548c9179bef3..cbdb3af61c8867f181e7995d5a3051a3f383cdf0 100644 --- a/src/plugins/external_tool_support/src/bedtools/BedToolsWorkersLibrary.cpp +++ b/src/plugins/external_tool_support/src/bedtools/BedToolsWorkersLibrary.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -84,7 +84,7 @@ void SlopbedWorkerFactory::init() { U2DataPath* dataPath = NULL; U2DataPathRegistry* dpr = AppContext::getDataPathRegistry(); if (dpr){ - U2DataPath* dp = dpr->getDataPathByName(GENOMES_DATA_NAME); + U2DataPath* dp = dpr->getDataPathByName(BedtoolsSupport::GENOMES_DATA_NAME); if (dp && dp->isValid()){ dataPath = dp; } @@ -119,7 +119,7 @@ void SlopbedWorkerFactory::init() { SlopbedWorker::tr("Select the custom output folder.")); Descriptor outName(BaseNGSWorker::OUT_NAME_ID, SlopbedWorker::tr("Output file name"), - SlopbedWorker::tr("A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extention.")); + SlopbedWorker::tr("A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extension.")); Descriptor genomeAttrDesc(GENOME_ID, SlopbedWorker::tr("Genome"), SlopbedWorker::tr("In order to prevent the extension of intervals beyond chromosome boundaries, bedtools slop requires a genome file defining the length of each chromosome or contig. The format of the file is: <chromName><TAB><chromSize> (-g).")); @@ -127,7 +127,7 @@ void SlopbedWorkerFactory::init() { Descriptor bAttr(B_ID, SlopbedWorker::tr("Each direction increase"), SlopbedWorker::tr("Increase the BED/GFF/VCF entry by the same number base pairs in each direction. If this parameter is used -l and -l are ignored. Enter 0 to disable. (-b)")); - Descriptor lAttr(L_ID, SlopbedWorker::tr("Substract from start"), + Descriptor lAttr(L_ID, SlopbedWorker::tr("Subtract from start"), SlopbedWorker::tr("The number of base pairs to subtract from the start coordinate. Enter 0 to disable. (-l)")); Descriptor rAttr(R_ID, SlopbedWorker::tr("Add to end"), @@ -143,7 +143,7 @@ void SlopbedWorkerFactory::init() { SlopbedWorker::tr("Print the header from the input file prior to results. (-header)")); Descriptor filterAttr(FILTER_ID, SlopbedWorker::tr("Filter start>end fields"), - SlopbedWorker::tr("Remove lines with start postion greater than end position")); + SlopbedWorker::tr("Remove lines with start position greater than end position")); a << new Attribute(outDir, BaseTypes::NUM_TYPE(), false, QVariant(FileAndDirectoryUtils::WORKFLOW_INTERNAL)); @@ -202,7 +202,7 @@ void SlopbedWorkerFactory::init() { ActorPrototype* proto = new IntegralBusActorPrototype(desc, p, a); proto->setEditor(new DelegateEditor(delegates)); proto->setPrompter(new SlopbedPrompter()); - proto->addExternalTool(ET_BEDTOOLS); + proto->addExternalTool(BedtoolsSupport::ET_BEDTOOLS_ID); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_NGS_BASIC(), proto); DomainFactory *localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID); @@ -270,7 +270,7 @@ SlopbedTask::SlopbedTask(const BaseNGSSetting &settings) } void SlopbedTask::prepareStep(){ - Task* etTask = getExternalToolTask(ET_BEDTOOLS); + Task* etTask = getExternalToolTask(BedtoolsSupport::ET_BEDTOOLS_ID); CHECK(etTask != NULL, ); addSubTask(etTask); @@ -472,7 +472,7 @@ void GenomecovWorkerFactory::init() { U2DataPath* dataPath = NULL; U2DataPathRegistry* dpr = AppContext::getDataPathRegistry(); if (dpr){ - U2DataPath* dp = dpr->getDataPathByName(GENOMES_DATA_NAME); + U2DataPath* dp = dpr->getDataPathByName(BedtoolsSupport::GENOMES_DATA_NAME); if (dp && dp->isValid()){ dataPath = dp; } @@ -507,7 +507,7 @@ void GenomecovWorkerFactory::init() { GenomecovWorker::tr("Select the custom output folder.")); Descriptor outName(BaseNGSWorker::OUT_NAME_ID, GenomecovWorker::tr("Output file name"), - GenomecovWorker::tr("A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extention.")); + GenomecovWorker::tr("A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extension.")); Descriptor genomeAttrDesc(GENOME_ID, GenomecovWorker::tr("Genome"), GenomecovWorker::tr("In order to prevent the extension of intervals beyond chromosome boundaries, bedtools slop requires a genome file defining the length of each chromosome or contig. The format of the file is: <chromName><TAB><chromSize>. (-g)")); @@ -616,7 +616,7 @@ void GenomecovWorkerFactory::init() { ActorPrototype* proto = new IntegralBusActorPrototype(desc, p, a); proto->setEditor(new DelegateEditor(delegates)); proto->setPrompter(new GenomecovPrompter()); - proto->addExternalTool(ET_BEDTOOLS); + proto->addExternalTool(BedtoolsSupport::ET_BEDTOOLS_ID); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_NGS_BASIC(), proto); DomainFactory *localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID); @@ -690,7 +690,7 @@ GenomecovTask::GenomecovTask(const BaseNGSSetting &settings) } void GenomecovTask::prepareStep(){ - Task* etTask = getExternalToolTask(ET_BEDTOOLS); + Task* etTask = getExternalToolTask(BedtoolsSupport::ET_BEDTOOLS_ID); CHECK(etTask != NULL, ); addSubTask(etTask); @@ -862,7 +862,8 @@ Task* BedtoolsIntersectWorker::createTask() { settings.entitiesA = getAnnotationsEntityRefFromMessages(storeA, IN_PORT_A_ID); settings.entitiesB = getAnnotationsEntityRefFromMessages(storeB, IN_PORT_B_ID); - Task* t = new BedtoolsIntersectAnnotationsByEntityTask(settings); + BedtoolsIntersectAnnotationsByEntityTask* t = new BedtoolsIntersectAnnotationsByEntityTask(settings); + t->addListeners(createLogListeners()); connect(new TaskSignalMapper(t), SIGNAL(si_taskFinished(Task*)), SLOT(sl_taskFinished(Task*))); return t; } @@ -981,7 +982,7 @@ void BedtoolsIntersectWorkerFactory::init() { ActorPrototype * proto = new IntegralBusActorPrototype( desc, portDescs, attribs ); proto->setPrompter( new BedtoolsIntersectPrompter() ); proto->setEditor(new DelegateEditor(delegates)); - proto->addExternalTool(ET_BEDTOOLS); + proto->addExternalTool(BedtoolsSupport::ET_BEDTOOLS_ID); WorkflowEnv::getProtoRegistry()->registerProto( BaseActorCategories::CATEGORY_BASIC(), proto ); DomainFactory* localDomain = WorkflowEnv::getDomainRegistry()->getById( LocalDomainFactory::ID ); diff --git a/src/plugins/external_tool_support/src/bedtools/BedToolsWorkersLibrary.h b/src/plugins/external_tool_support/src/bedtools/BedToolsWorkersLibrary.h index 4a73bd800ae1a89bfd017f63718aa393039ed3f1..cd8da44fecf3ffa5fa0240cf484db09af8c36bd0 100644 --- a/src/plugins/external_tool_support/src/bedtools/BedToolsWorkersLibrary.h +++ b/src/plugins/external_tool_support/src/bedtools/BedToolsWorkersLibrary.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/bedtools/BedtoolsIntersectTask.cpp b/src/plugins/external_tool_support/src/bedtools/BedtoolsIntersectTask.cpp index 7e519c9f482beb70bdf2ec030549d034a58837aa..8a152a10d95a7fbc495afc54f6887d9fa91420b0 100644 --- a/src/plugins/external_tool_support/src/bedtools/BedtoolsIntersectTask.cpp +++ b/src/plugins/external_tool_support/src/bedtools/BedtoolsIntersectTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -61,7 +61,7 @@ void BedtoolsIntersectLogParser::parseOutput(const QString &partOfLog) { } BedtoolsIntersectTask::BedtoolsIntersectTask(const BedtoolsIntersectFilesSettings &settings) - : Task(tr("BedtoolsIntersect task"), TaskFlags_NR_FOSE_COSC), + : ExternalToolSupportTask(tr("BedtoolsIntersect task"), TaskFlags_NR_FOSE_COSC), settings(settings) {} @@ -78,7 +78,8 @@ void BedtoolsIntersectTask::prepare() { } const QStringList args = getParameters(); - ExternalToolRunTask* etTask = new ExternalToolRunTask(ET_BEDTOOLS, args, new BedtoolsIntersectLogParser(settings.out)); + ExternalToolRunTask* etTask = new ExternalToolRunTask(BedtoolsSupport::ET_BEDTOOLS_ID, args, new BedtoolsIntersectLogParser(settings.out)); + setListenerForTask(etTask); addSubTask(etTask); } @@ -111,7 +112,7 @@ const QStringList BedtoolsIntersectTask::getParameters() const { ////////////////////////////////////////////////////////////////////////// // BedtoolsIntersectAnnotationsByEntityTask BedtoolsIntersectAnnotationsByEntityTask::BedtoolsIntersectAnnotationsByEntityTask(const BedtoolsIntersectByEntityRefSettings &settings) - : Task(tr("Intersect annotations task"), TaskFlags_NR_FOSE_COSC), + : ExternalToolSupportTask(tr("Intersect annotations task"), TaskFlags_NR_FOSE_COSC), settings(settings), saveAnnotationsTask(NULL), intersectTask(NULL), @@ -165,6 +166,7 @@ QList<Task*> BedtoolsIntersectAnnotationsByEntityTask::onSubTaskFinished(Task *s settings.unique, settings.report); intersectTask = new BedtoolsIntersectTask(stngs); + intersectTask->addListeners(getListeners()); res << intersectTask; } diff --git a/src/plugins/external_tool_support/src/bedtools/BedtoolsIntersectTask.h b/src/plugins/external_tool_support/src/bedtools/BedtoolsIntersectTask.h index d5742f5d9b14f73fcd6ae3ac52e1d9ff53d86cbf..3608ea5a2e282cb9be7f62d42f3e8b62dacceff5 100644 --- a/src/plugins/external_tool_support/src/bedtools/BedtoolsIntersectTask.h +++ b/src/plugins/external_tool_support/src/bedtools/BedtoolsIntersectTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -84,7 +84,7 @@ public: //////////////////////////////////////////////////////////////////////////////////////////////////////////////// // BedToolsIntersectTask & BedtoolsIntersectLogParser -class BedtoolsIntersectTask : public Task { +class BedtoolsIntersectTask : public ExternalToolSupportTask { Q_OBJECT public: BedtoolsIntersectTask(const BedtoolsIntersectFilesSettings &settings); @@ -112,7 +112,7 @@ private: class SaveMultipleDocuments; class LoadDocumentTask; -class BedtoolsIntersectAnnotationsByEntityTask : public Task { +class BedtoolsIntersectAnnotationsByEntityTask : public ExternalToolSupportTask { Q_OBJECT public: BedtoolsIntersectAnnotationsByEntityTask(const BedtoolsIntersectByEntityRefSettings& settings); diff --git a/src/plugins/external_tool_support/src/bedtools/BedtoolsSupport.cpp b/src/plugins/external_tool_support/src/bedtools/BedtoolsSupport.cpp index 7a0591a6ac933c6de2a7e996851be7824a81d672..a82cc5da79f52c65f3d2a851ebaeda89ae8da808 100644 --- a/src/plugins/external_tool_support/src/bedtools/BedtoolsSupport.cpp +++ b/src/plugins/external_tool_support/src/bedtools/BedtoolsSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,7 +22,6 @@ #include "BedtoolsSupport.h" #include "BedtoolsSupportTask.h" - #include <U2Core/AppContext.h> #include <U2Core/AppSettings.h> #include <U2Core/DataPathRegistry.h> @@ -33,8 +32,12 @@ namespace U2 { +const QString BedtoolsSupport::ET_BEDTOOLS = "bedtools"; +const QString BedtoolsSupport::ET_BEDTOOLS_ID = "USUPP_BEDTOOLS"; +const QString BedtoolsSupport::GENOMES_DIR_NAME = "genome_lengths"; +const QString BedtoolsSupport::GENOMES_DATA_NAME = "Genome files"; -BedtoolsSupport::BedtoolsSupport(const QString& name, const QString& path) : ExternalTool(name, path) +BedtoolsSupport::BedtoolsSupport(const QString& id, const QString& name, const QString& path) : ExternalTool(id, name, path) { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/cmdline.png"); diff --git a/src/plugins/external_tool_support/src/bedtools/BedtoolsSupport.h b/src/plugins/external_tool_support/src/bedtools/BedtoolsSupport.h index d995d92bb31a79d04830e408b4375b6d805537ae..192a35aaef49db365f7476d1f5ecbb1c2f8bf0f4 100644 --- a/src/plugins/external_tool_support/src/bedtools/BedtoolsSupport.h +++ b/src/plugins/external_tool_support/src/bedtools/BedtoolsSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,20 +24,19 @@ #include <U2Core/ExternalToolRegistry.h> -#define ET_BEDTOOLS "bedtools" -#define GENOMES_DIR_NAME "genome_lengths" -#define GENOMES_DATA_NAME "Genome files" - namespace U2 { class BedtoolsSupport : public ExternalTool { Q_OBJECT public: - BedtoolsSupport(const QString& name, const QString& path = ""); + BedtoolsSupport(const QString& id, const QString& name, const QString& path = ""); + static const QString ET_BEDTOOLS; + static const QString ET_BEDTOOLS_ID; + static const QString GENOMES_DATA_NAME; + static const QString GENOMES_DIR_NAME; private slots: void sl_validationStatusChanged(bool newStatus); - }; }//namespace diff --git a/src/plugins/external_tool_support/src/bedtools/BedtoolsSupportTask.cpp b/src/plugins/external_tool_support/src/bedtools/BedtoolsSupportTask.cpp index a35f20959c57a77551306132e222f61becc6f02c..65b598c820139d169a15465ede3627ea1ec91cfb 100644 --- a/src/plugins/external_tool_support/src/bedtools/BedtoolsSupportTask.cpp +++ b/src/plugins/external_tool_support/src/bedtools/BedtoolsSupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -59,7 +59,7 @@ void BamBedConversionTask::prepare(){ args << "-i"; args << sourceURL.getURLString(); - ExternalToolRunTask* etTask = new ExternalToolRunTask(ET_BEDTOOLS, args, new ExternalToolLogParser(), workingDir); + ExternalToolRunTask* etTask = new ExternalToolRunTask(BedtoolsSupport::ET_BEDTOOLS_ID, args, new ExternalToolLogParser(), workingDir); etTask->setStandartOutputFile(targetUrl); addSubTask(etTask); } diff --git a/src/plugins/external_tool_support/src/bedtools/BedtoolsSupportTask.h b/src/plugins/external_tool_support/src/bedtools/BedtoolsSupportTask.h index 59effe1532616827d0a38e31c50c71624dc749a7..060d30aa611d4a51981c4af9efe1a498456a3b9c 100644 --- a/src/plugins/external_tool_support/src/bedtools/BedtoolsSupportTask.h +++ b/src/plugins/external_tool_support/src/bedtools/BedtoolsSupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/bigWigTools/BedGraphToBigWigTask.cpp b/src/plugins/external_tool_support/src/bigWigTools/BedGraphToBigWigTask.cpp index 6dcac607156c8b0b3604fa147af12c2a44628c22..e37260377dd1c81f3003088efb8c0710b43186d1 100644 --- a/src/plugins/external_tool_support/src/bigWigTools/BedGraphToBigWigTask.cpp +++ b/src/plugins/external_tool_support/src/bigWigTools/BedGraphToBigWigTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -84,7 +84,7 @@ void BedGraphToBigWigTask::prepare(){ const QStringList args = getParameters(stateInfo); CHECK_OP(stateInfo, ); - ExternalToolRunTask* etTask = new ExternalToolRunTask(ET_BIGWIG, args, new BedGraphToBigWigParser(), settings.outDir); + ExternalToolRunTask* etTask = new ExternalToolRunTask(BigWigSupport::ET_BIGWIG_ID, args, new BedGraphToBigWigParser(), settings.outDir); setListenerForTask(etTask); addSubTask(etTask); } diff --git a/src/plugins/external_tool_support/src/bigWigTools/BedGraphToBigWigTask.h b/src/plugins/external_tool_support/src/bigWigTools/BedGraphToBigWigTask.h index cd369a47ea1c4f01347f09eb3b65d6184a4ff5ed..34fe93ade9c019a6775533faac19e265fe1f1108 100644 --- a/src/plugins/external_tool_support/src/bigWigTools/BedGraphToBigWigTask.h +++ b/src/plugins/external_tool_support/src/bigWigTools/BedGraphToBigWigTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/bigWigTools/BedGraphToBigWigWorker.cpp b/src/plugins/external_tool_support/src/bigWigTools/BedGraphToBigWigWorker.cpp index b8510d9e6f7bab4d0e6a9330c082114ed6f2fd17..8ded731b8b3352336382782bf3f037025740a7e2 100644 --- a/src/plugins/external_tool_support/src/bigWigTools/BedGraphToBigWigWorker.cpp +++ b/src/plugins/external_tool_support/src/bigWigTools/BedGraphToBigWigWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -90,7 +90,7 @@ void BedGraphToBigWigFactory::init() { U2DataPath* dataPath = NULL; U2DataPathRegistry* dpr = AppContext::getDataPathRegistry(); if (dpr){ - U2DataPath* dp = dpr->getDataPathByName(GENOMES_DATA_NAME); + U2DataPath* dp = dpr->getDataPathByName(BigWigSupport::GENOMES_DATA_NAME); if (dp && dp->isValid()){ dataPath = dp; } @@ -126,7 +126,7 @@ void BedGraphToBigWigFactory::init() { BedGraphToBigWigWorker::tr("Select the custom output folder.")); Descriptor outName(BedGraphToBigWigWorker::OUT_NAME_ID, BedGraphToBigWigWorker::tr("Output name"), - BedGraphToBigWigWorker::tr("A name of an output file. If default of empty value is provided the output name is the name of the first BAM file with an extention.")); + BedGraphToBigWigWorker::tr("A name of an output file. If default of empty value is provided the output name is the name of the first BAM file with an extension.")); Descriptor blockSize(BedGraphToBigWigWorker::BLOCK_SIZE, BedGraphToBigWigWorker::tr("Block size"), BedGraphToBigWigWorker::tr("Number of items to bundle in r-tree (-blockSize).")); @@ -192,7 +192,7 @@ void BedGraphToBigWigFactory::init() { ActorPrototype* proto = new IntegralBusActorPrototype(desc, p, a); proto->setEditor(new DelegateEditor(delegates)); proto->setPrompter(new BedGraphToBigWigPrompter()); - proto->addExternalTool(ET_BIGWIG); + proto->addExternalTool(BigWigSupport::ET_BIGWIG_ID); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_CONVERTERS(), proto); DomainFactory *localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID); diff --git a/src/plugins/external_tool_support/src/bigWigTools/BedGraphToBigWigWorker.h b/src/plugins/external_tool_support/src/bigWigTools/BedGraphToBigWigWorker.h index 8f432cb1734a9e7f15352d1699da10291040d834..05621ad0b0c0febe5e704e95372cb074ed2d65f4 100644 --- a/src/plugins/external_tool_support/src/bigWigTools/BedGraphToBigWigWorker.h +++ b/src/plugins/external_tool_support/src/bigWigTools/BedGraphToBigWigWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/bigWigTools/BigWigSupport.cpp b/src/plugins/external_tool_support/src/bigWigTools/BigWigSupport.cpp index 0ee047317cc6ded5e753484fd3a90e2e7be74b81..d66546c57fac4b92a76e251d42ce36222f3fe957 100644 --- a/src/plugins/external_tool_support/src/bigWigTools/BigWigSupport.cpp +++ b/src/plugins/external_tool_support/src/bigWigTools/BigWigSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -31,8 +31,12 @@ namespace U2 { +const QString BigWigSupport::ET_BIGWIG = "bigwig"; +const QString BigWigSupport::ET_BIGWIG_ID = "USUPP_BED_GRAPH_TO_BIG_WIG"; +const QString BigWigSupport::GENOMES_DATA_NAME = "Genome files"; +const QString BigWigSupport::GENOMES_DIR_NAME = "genome_lengths"; -BigWigSupport::BigWigSupport(const QString& name, const QString& path) : ExternalTool(name, path) +BigWigSupport::BigWigSupport(const QString& id, const QString& name, const QString& path) : ExternalTool(id, name, path) { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/cmdline.png"); diff --git a/src/plugins/external_tool_support/src/bigWigTools/BigWigSupport.h b/src/plugins/external_tool_support/src/bigWigTools/BigWigSupport.h index 8a8b7a397e06d15d8e5942f993ecea933b430602..e8ef673379d10228898beb65c6dd18ab6d73bab0 100644 --- a/src/plugins/external_tool_support/src/bigWigTools/BigWigSupport.h +++ b/src/plugins/external_tool_support/src/bigWigTools/BigWigSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,17 +24,17 @@ #include <U2Core/ExternalToolRegistry.h> -#define ET_BIGWIG "bigwig" -#define GENOMES_DIR_NAME "genome_lengths" -#define GENOMES_DATA_NAME "Genome files" - namespace U2 { class BigWigSupport : public ExternalTool { Q_OBJECT public: - BigWigSupport(const QString& name, const QString& path = ""); + BigWigSupport(const QString& id, const QString& name, const QString& path = ""); + static const QString ET_BIGWIG; + static const QString ET_BIGWIG_ID; + static const QString GENOMES_DATA_NAME; + static const QString GENOMES_DIR_NAME; }; }//namespace diff --git a/src/plugins/external_tool_support/src/blast/BlastAllSupport.cpp b/src/plugins/external_tool_support/src/blast/BlastAllSupport.cpp index b67691f03335b1eb94fe5721507537be57099221..c01d03800075eb6988c6ec16b0686dece57cb57c 100644 --- a/src/plugins/external_tool_support/src/blast/BlastAllSupport.cpp +++ b/src/plugins/external_tool_support/src/blast/BlastAllSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -52,7 +52,11 @@ namespace U2 { -BlastAllSupport::BlastAllSupport(const QString& name, const QString& path) : ExternalTool(name, path) + const QString BlastAllSupport::ET_BLASTALL = "BlastAll"; + const QString BlastAllSupport::ET_BLASTALL_ID = "USUPP_BLAST_ALL"; + const QString BlastAllSupport::BLASTALL_TMP_DIR = "blast_all"; + +BlastAllSupport::BlastAllSupport(const QString& id, const QString& name, const QString& path) : ExternalTool(id, name, path) { if (AppContext::getMainWindow()) { viewCtx = NULL; // new BlastAllSupportContext(this); @@ -81,7 +85,7 @@ BlastAllSupport::BlastAllSupport(const QString& name, const QString& path) : Ext void BlastAllSupport::sl_runWithExtFileSpecify(){ //Check that blastall and tempory folder path defined - ExternalToolUtils::checkExtToolsPath(QStringList() << ET_BLASTALL); + ExternalToolUtils::checkExtToolsPath(QStringList() << ET_BLASTALL_ID); if (path.isEmpty()){ return; @@ -115,7 +119,7 @@ void BlastAllSupportContext::initViewContext(GObjectView* view) { assert(av!=NULL); Q_UNUSED(av); - ExternalToolSupportAction* queryAction = new ExternalToolSupportAction(this, view, tr("Query with local BLAST..."), 2000, QStringList(ET_BLASTALL)); + ExternalToolSupportAction* queryAction = new ExternalToolSupportAction(this, view, tr("Query with local BLAST..."), 2000, QStringList(BlastAllSupport::ET_BLASTALL_ID)); addViewAction(queryAction); connect(queryAction, SIGNAL(triggered()), SLOT(sl_showDialog())); @@ -132,9 +136,9 @@ void BlastAllSupportContext::buildMenu(GObjectView* view, QMenu* m) { void BlastAllSupportContext::sl_showDialog() { //Checking the BlastAll path and temporary folder path are defined - ExternalToolUtils::checkExtToolsPath(QStringList() << ET_BLASTALL); + ExternalToolUtils::checkExtToolsPath(QStringList() << BlastAllSupport::ET_BLASTALL_ID); - if (AppContext::getExternalToolRegistry()->getByName(ET_BLASTALL)->getPath().isEmpty()){ + if (AppContext::getExternalToolRegistry()->getById(BlastAllSupport::ET_BLASTALL_ID)->getPath().isEmpty()){ return; } U2OpStatus2Log os; diff --git a/src/plugins/external_tool_support/src/blast/BlastAllSupport.h b/src/plugins/external_tool_support/src/blast/BlastAllSupport.h index 8cbb5b9419df007fc8ee269fe76135c9af217e50..b9949f71b92461609cfdaad40e863045c347ab4e 100644 --- a/src/plugins/external_tool_support/src/blast/BlastAllSupport.h +++ b/src/plugins/external_tool_support/src/blast/BlastAllSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,17 +25,17 @@ #include <U2Core/ExternalToolRegistry.h> #include <U2Gui/ObjectViewModel.h> -#define ET_BLASTALL "BlastAll" -#define BLASTALL_TMP_DIR "blast_all" - namespace U2 { class BlastAllSupport : public ExternalTool { Q_OBJECT public: - BlastAllSupport(const QString& name, const QString& path = ""); + BlastAllSupport(const QString& id, const QString& name, const QString& path = ""); GObjectViewWindowContext* getViewContext(){ return viewCtx; } + static const QString ET_BLASTALL; + static const QString ET_BLASTALL_ID; + static const QString BLASTALL_TMP_DIR; private slots: void sl_runWithExtFileSpecify(); diff --git a/src/plugins/external_tool_support/src/blast/BlastAllSupportRunDialog.cpp b/src/plugins/external_tool_support/src/blast/BlastAllSupportRunDialog.cpp index 4e427f1bf20da7d11860a70029fd0ea5eb1fe3c8..41e393b74837f12d9de9ffe75ef6a2322aa470e6 100644 --- a/src/plugins/external_tool_support/src/blast/BlastAllSupportRunDialog.cpp +++ b/src/plugins/external_tool_support/src/blast/BlastAllSupportRunDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/blast/BlastAllSupportRunDialog.h b/src/plugins/external_tool_support/src/blast/BlastAllSupportRunDialog.h index 8cd419fd748d43872d553b85b37c3087f20bf1cb..14d966899dc9adaa6a4f0752a1a918bf1244383b 100644 --- a/src/plugins/external_tool_support/src/blast/BlastAllSupportRunDialog.h +++ b/src/plugins/external_tool_support/src/blast/BlastAllSupportRunDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/blast/BlastAllSupportTask.cpp b/src/plugins/external_tool_support/src/blast/BlastAllSupportTask.cpp index bceb070c39dd164bef57db8abc8296a4a986bf3e..8277cb244a6d97fca1a1ea27a643aa9cfed35867 100644 --- a/src/plugins/external_tool_support/src/blast/BlastAllSupportTask.cpp +++ b/src/plugins/external_tool_support/src/blast/BlastAllSupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -71,7 +71,7 @@ void BlastAllSupportTask::prepare(){ QTime::currentTime().toString("hh.mm.ss.zzz")+"_"+ QString::number(QCoreApplication::applicationPid())+"/"; //Check and remove subdir for temporary files - QString blastTmpDir = AppContext::getAppSettings()->getUserAppsSettings()->getCurrentProcessTemporaryDirPath(BLASTALL_TMP_DIR); + QString blastTmpDir = AppContext::getAppSettings()->getUserAppsSettings()->getCurrentProcessTemporaryDirPath(BlastAllSupport::BLASTALL_TMP_DIR); QDir tmpDir(blastTmpDir + "/"+ tmpDirName); if(tmpDir.exists()){ foreach(const QString& file, tmpDir.entryList()){ @@ -199,19 +199,19 @@ QList<Task*> BlastAllSupportTask::onSubTaskFinished(Task* subTask) { } QString workingDirectory=QFileInfo(url).absolutePath(); - blastAllTask = new ExternalToolRunTask(ET_BLASTALL, arguments, new ExternalToolLogParser(), workingDirectory); + blastAllTask = new ExternalToolRunTask(BlastAllSupport::ET_BLASTALL_ID, arguments, new ExternalToolLogParser(), workingDirectory); setListenerForTask(blastAllTask); blastAllTask->setSubtaskProgressWeight(95); res.append(blastAllTask); } else if(subTask == blastAllTask) { if (settings.outputType == 7 || settings.outputType == 8) { if (!QFileInfo(settings.outputOriginalFile).exists()) { - if (AppContext::getExternalToolRegistry()->getByName(ET_BLASTALL)->isValid()) { + if (AppContext::getExternalToolRegistry()->getById(BlastAllSupport::ET_BLASTALL_ID)->isValid()) { stateInfo.setError(tr("Output file not found")); } else { stateInfo.setError(tr("Output file not found. May be %1 tool path '%2' not valid?") - .arg(AppContext::getExternalToolRegistry()->getByName(ET_BLASTALL)->getName()) - .arg(AppContext::getExternalToolRegistry()->getByName(ET_BLASTALL)->getPath())); + .arg(AppContext::getExternalToolRegistry()->getById(BlastAllSupport::ET_BLASTALL_ID)->getName()) + .arg(AppContext::getExternalToolRegistry()->getById(BlastAllSupport::ET_BLASTALL_ID)->getPath())); } emit si_stateChanged(); return res; @@ -482,12 +482,26 @@ void BlastAllSupportTask::parseXMLHsp(const QDomNode &xml,const QString &id, con ad->qualifiers.push_back(U2Qualifier("hit_frame", frame_txt)); } - elem = xml.lastChildElement("Hsp_query-frame"); + QString strandTag; + switch (settings.strandSource) { + case BlastTaskSettings::HitFrame: + strandTag = "Hsp_hit-frame"; + break; + case BlastTaskSettings::QueryFrame: + strandTag = "Hsp_query-frame"; + break; + default: + SAFE_POINT_EXT(false, stateInfo.setError(tr("Unknown strand source setting")), ); + break; + } + + elem = xml.lastChildElement(strandTag); int frame = elem.text().toInt(&isOk); - if(!isOk) { - stateInfo.setError(tr("Can't get location. Hsp_query-frame[%1]").arg(elem.text())); + if (!isOk) { + stateInfo.setError(tr("Can't get location. %1[%2]").arg(strandTag).arg(elem.text())); return; } + QString frame_txt = (frame < 0) ? "complement" : "direct"; ad->qualifiers.push_back(U2Qualifier("source_frame", frame_txt)); ad->setStrand(frame < 0 ? U2Strand::Complementary : U2Strand::Direct); @@ -658,7 +672,7 @@ QString BlastAllSupportMultiTask::generateReport() const { res+="<table>"; res+="<tr><td width=200><b>" + tr("Source file") + "</b></td><td>" + settingsList.at(0).queryFile + "</td></tr>"; - res+="<tr><td width=200><b>" + tr("Used databse") + "</b></td><td>" + settingsList.at(0).databaseNameAndPath + "</td></tr>"; + res+="<tr><td width=200><b>" + tr("Used database") + "</b></td><td>" + settingsList.at(0).databaseNameAndPath + "</td></tr>"; res+="<tr></tr>"; res+="<tr><td width=200><b>" + tr("No any results found") + "</b></td><td></td></tr>"; res+="</table>"; diff --git a/src/plugins/external_tool_support/src/blast/BlastAllSupportTask.h b/src/plugins/external_tool_support/src/blast/BlastAllSupportTask.h index 8dad4e60b54da07b9e095674317cb9ccb9c4b049..89307a6bcc9d7853bcf86476b9898c73c829f09b 100644 --- a/src/plugins/external_tool_support/src/blast/BlastAllSupportTask.h +++ b/src/plugins/external_tool_support/src/blast/BlastAllSupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/blast/BlastAllWorker.cpp b/src/plugins/external_tool_support/src/blast/BlastAllWorker.cpp index 640b3bdf6f776d3aa6ec9e95e8dcef81b7d53121..6ecd279a1fef377a29e1712c9c369c51c783ae2e 100644 --- a/src/plugins/external_tool_support/src/blast/BlastAllWorker.cpp +++ b/src/plugins/external_tool_support/src/blast/BlastAllWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -324,7 +324,7 @@ void BlastAllWorkerFactory::init() { proto->setEditor(new DelegateEditor(delegates)); proto->setPrompter(new BlastAllPrompter()); proto->setIconPath(":external_tool_support/images/ncbi.png"); - proto->addExternalTool(ET_BLASTALL, BLASTALL_EXT_TOOL_PATH); + proto->addExternalTool(BlastAllSupport::ET_BLASTALL_ID, BLASTALL_EXT_TOOL_PATH); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_BASIC(), proto); DomainFactory* localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID); @@ -380,7 +380,7 @@ Task* BlastAllWorker::tick() { QString path = actor->getParameter(BLASTALL_EXT_TOOL_PATH)->getAttributeValue<QString>(context); if(QString::compare(path, "default", Qt::CaseInsensitive) != 0){ - AppContext::getExternalToolRegistry()->getByName(ET_BLASTALL)->setPath(path); + AppContext::getExternalToolRegistry()->getById(BlastAllSupport::ET_BLASTALL_ID)->setPath(path); } path = actor->getParameter(BLASTALL_TMP_DIR_PATH)->getAttributeValue<QString>(context); if(QString::compare(path, "default", Qt::CaseInsensitive) != 0){ diff --git a/src/plugins/external_tool_support/src/blast/BlastAllWorker.h b/src/plugins/external_tool_support/src/blast/BlastAllWorker.h index bf4f48f2fd0196abc63c80b68d6e1b27e538ab23..0445a897d216685d2daef10608fb3e3bcda7ba3c 100644 --- a/src/plugins/external_tool_support/src/blast/BlastAllWorker.h +++ b/src/plugins/external_tool_support/src/blast/BlastAllWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/blast/FormatDBSupport.cpp b/src/plugins/external_tool_support/src/blast/FormatDBSupport.cpp index a642c0c42b915644d9ac0314b06edfbbff99d442..262cbfdf4cf647b6e31919fd48c15dbaeb8472f2 100644 --- a/src/plugins/external_tool_support/src/blast/FormatDBSupport.cpp +++ b/src/plugins/external_tool_support/src/blast/FormatDBSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -44,16 +44,23 @@ namespace U2 { +const QString FormatDBSupport::ET_FORMATDB = "FormatDB"; +const QString FormatDBSupport::ET_FORMATDB_ID = "USUPP_FORMAT_DB"; +const QString FormatDBSupport::ET_MAKEBLASTDB = "MakeBLASTDB"; +const QString FormatDBSupport::ET_MAKEBLASTDB_ID = "USUPP_MAKE_BLAST_DB"; +const QString FormatDBSupport::ET_GPU_MAKEBLASTDB = "GPU-MakeBLASTDB"; +const QString FormatDBSupport::ET_GPU_MAKEBLASTDB_ID = "UGENE_GPU_MAKE_BLAST_DB"; +const QString FormatDBSupport::FORMATDB_TMP_DIR = "FormatDB"; -FormatDBSupport::FormatDBSupport(const QString& name, const QString& path) : ExternalTool(name, path) +FormatDBSupport::FormatDBSupport(const QString& id, const QString& name, const QString& path) : ExternalTool(id, name, path) { if (AppContext::getMainWindow() != NULL) { icon = QIcon(":external_tool_support/images/ncbi.png"); grayIcon = QIcon(":external_tool_support/images/ncbi_gray.png"); warnIcon = QIcon(":external_tool_support/images/ncbi_warn.png"); } - assert((name == ET_FORMATDB)||(name == ET_MAKEBLASTDB)||(name == ET_GPU_MAKEBLASTDB)); - if(name == ET_FORMATDB){ + assert((id == ET_FORMATDB_ID)||(id == ET_MAKEBLASTDB_ID)||(id == ET_GPU_MAKEBLASTDB_ID)); + if(id == ET_FORMATDB_ID){ #ifdef Q_OS_WIN executableFileName="formatdb.exe"; #else @@ -69,7 +76,7 @@ FormatDBSupport::FormatDBSupport(const QString& name, const QString& path) : Ext versionRegExp=QRegExp("formatdb (\\d+\\.\\d+\\.\\d+)"); toolKitName="BLAST"; - }else if(name == ET_MAKEBLASTDB){ + } else if(id == ET_MAKEBLASTDB_ID) { #ifdef Q_OS_WIN executableFileName="makeblastdb.exe"; #else @@ -84,7 +91,7 @@ FormatDBSupport::FormatDBSupport(const QString& name, const QString& path) : Ext " can be searched by other BLAST+ tools."); versionRegExp=QRegExp("Application to create BLAST databases, version (\\d+\\.\\d+\\.\\d+\\+?)"); toolKitName="BLAST+"; - }else if(name == ET_GPU_MAKEBLASTDB){ + } else if(id == ET_GPU_MAKEBLASTDB_ID) { #ifdef Q_OS_WIN executableFileName="makeblastdb.exe"; #else @@ -106,10 +113,10 @@ void FormatDBSupport::sl_runWithExtFileSpecify(){ //Check that formatDB or makeblastdb and tempory folder path defined if (path.isEmpty()){ QObjectScopedPointer<QMessageBox> msgBox = new QMessageBox; - if(name == ET_FORMATDB){ + if(id == ET_FORMATDB_ID) { msgBox->setWindowTitle("BLAST "+name); msgBox->setText(tr("Path for BLAST %1 tool not selected.").arg(name)); - }else{ + } else { msgBox->setWindowTitle("BLAST+ "+name); msgBox->setText(tr("Path for BLAST+ %1 tool not selected.").arg(name)); } @@ -147,7 +154,7 @@ void FormatDBSupport::sl_runWithExtFileSpecify(){ if (formatDBRunDialog->result() != QDialog::Accepted){ return; } - FormatDBSupportTask* formatDBSupportTask = new FormatDBSupportTask(name, settings); + FormatDBSupportTask* formatDBSupportTask = new FormatDBSupportTask(id, settings); AppContext::getTaskScheduler()->registerTopLevelTask(formatDBSupportTask); } }//namespace diff --git a/src/plugins/external_tool_support/src/blast/FormatDBSupport.h b/src/plugins/external_tool_support/src/blast/FormatDBSupport.h index f4d7d7d3703fe08122abfa5d7723610e2e5a37bd..df4d7b609431b0568b133e3d99869b75905c9c4f 100644 --- a/src/plugins/external_tool_support/src/blast/FormatDBSupport.h +++ b/src/plugins/external_tool_support/src/blast/FormatDBSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,17 +25,20 @@ #include <U2Core/ExternalToolRegistry.h> #include "utils/ExternalToolSupportAction.h" -#define ET_FORMATDB "FormatDB" -#define ET_MAKEBLASTDB "MakeBLASTDB" -#define ET_GPU_MAKEBLASTDB "GPU-MakeBLASTDB" -#define FORMATDB_TMP_DIR "FormatDB" namespace U2 { class FormatDBSupport : public ExternalTool { Q_OBJECT public: - FormatDBSupport(const QString& name, const QString& path = ""); + FormatDBSupport(const QString& id, const QString& name, const QString& path = ""); + static const QString ET_FORMATDB; + static const QString ET_FORMATDB_ID; + static const QString ET_MAKEBLASTDB; + static const QString ET_MAKEBLASTDB_ID; + static const QString ET_GPU_MAKEBLASTDB; + static const QString ET_GPU_MAKEBLASTDB_ID; + static const QString FORMATDB_TMP_DIR; public slots: void sl_runWithExtFileSpecify(); }; diff --git a/src/plugins/external_tool_support/src/blast/FormatDBSupportRunDialog.cpp b/src/plugins/external_tool_support/src/blast/FormatDBSupportRunDialog.cpp index 4d881bbc687610156634436e6f494c3c975e8231..f00043ce7b3d768dee44c508d9bfc24ad7fda450 100644 --- a/src/plugins/external_tool_support/src/blast/FormatDBSupportRunDialog.cpp +++ b/src/plugins/external_tool_support/src/blast/FormatDBSupportRunDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -39,7 +39,7 @@ FormatDBSupportRunDialog::FormatDBSupportRunDialog(const QString &_name, FormatD QDialog(_parent), name(_name), settings(_settings) { setupUi(this); - new HelpButton(this, buttonBox, "22056085"); + new HelpButton(this, buttonBox, "24742620"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Format")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); formatButton = buttonBox->button(QDialogButtonBox::Ok); @@ -115,7 +115,7 @@ void FormatDBSupportRunDialog::sl_onBrowseDatabasePath(){ void FormatDBSupportRunDialog::sl_lineEditChanged(){ bool hasSpacesInInputFiles=false; bool hasSpacesInOutputDBPath=false; - if(name == ET_FORMATDB){ + if(name == FormatDBSupport::ET_FORMATDB){ if(inputFilesRadioButton->isChecked()){ bool warning = inputFilesLineEdit->text().contains(' '); QString tooltip = warning ? tr("Input files paths contain space characters.") : ""; @@ -130,7 +130,7 @@ void FormatDBSupportRunDialog::sl_lineEditChanged(){ hasSpacesInInputFiles |= warning; } } - if(name == ET_MAKEBLASTDB){ + if(name == FormatDBSupport::ET_MAKEBLASTDB) { bool pathWarning = databasePathLineEdit->text().contains(' '); QString pathTooltip = pathWarning ? tr("Output database path contain space characters.") : ""; GUIUtils::setWidgetWarning(databasePathLineEdit, pathWarning); diff --git a/src/plugins/external_tool_support/src/blast/FormatDBSupportRunDialog.h b/src/plugins/external_tool_support/src/blast/FormatDBSupportRunDialog.h index 590ca51483d6e7c194149ee5f5e6abdca6c6a456..4db2a037cd9c82f28e7fd8a0908d11208413a12b 100644 --- a/src/plugins/external_tool_support/src/blast/FormatDBSupportRunDialog.h +++ b/src/plugins/external_tool_support/src/blast/FormatDBSupportRunDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/blast/FormatDBSupportTask.cpp b/src/plugins/external_tool_support/src/blast/FormatDBSupportTask.cpp index 3d163629bf339cdd623636c564af3b6645eb5eda..c2940113c79947ecde9445edc7ccee1b03bf5917 100644 --- a/src/plugins/external_tool_support/src/blast/FormatDBSupportTask.cpp +++ b/src/plugins/external_tool_support/src/blast/FormatDBSupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -48,14 +48,14 @@ void FormatDBSupportTaskSettings::reset() { outputPath = ""; databaseTitle = ""; isInputAmino = true; - tempDirPath = AppContext::getAppSettings()->getUserAppsSettings()->getCurrentProcessTemporaryDirPath(FORMATDB_TMP_DIR); + tempDirPath = AppContext::getAppSettings()->getUserAppsSettings()->getCurrentProcessTemporaryDirPath(FormatDBSupport::FORMATDB_TMP_DIR); } -FormatDBSupportTask::FormatDBSupportTask(const QString& name, const FormatDBSupportTaskSettings& _settings) : +FormatDBSupportTask::FormatDBSupportTask(const QString& id, const FormatDBSupportTaskSettings& _settings) : Task(tr("Run NCBI FormatDB task"), TaskFlags_NR_FOSE_COSC | TaskFlag_ReportingIsSupported | TaskFlag_ReportingIsEnabled), prepareTask(NULL), formatDBTask(NULL), - toolName(name), + toolId(id), settings(_settings) { GCOUNTER(cvar, tvar, "FormatDBSupportTask"); @@ -168,8 +168,8 @@ void FormatDBSupportTask::createFormatDbTask() { SAFE_POINT_EXT(formatDBTask == NULL, setError(tr("Trying to initialize Format DB task second time")), ); QStringList arguments; - assert((toolName == ET_FORMATDB)||(toolName == ET_MAKEBLASTDB)); - if(toolName == ET_FORMATDB){ + assert((toolId == FormatDBSupport::ET_FORMATDB_ID)||(toolId == FormatDBSupport::ET_MAKEBLASTDB_ID)); + if(toolId == FormatDBSupport::ET_FORMATDB_ID) { for (int i = 0; i < inputFastaFiles.length(); i++){ if (inputFastaFiles[i].contains(" ")) { stateInfo.setError(tr("Input files paths contain space characters.")); @@ -181,7 +181,7 @@ void FormatDBSupportTask::createFormatDbTask() { arguments <<"-n"<< settings.outputPath; arguments <<"-p"<< (settings.isInputAmino ? "T" : "F"); externalToolLog = settings.outputPath + "formatDB.log"; - }else if (toolName == ET_MAKEBLASTDB){ + } else if (toolId == FormatDBSupport::ET_MAKEBLASTDB_ID) { for (int i = 0; i < inputFastaFiles.length(); i++){ inputFastaFiles[i] = "\"" + inputFastaFiles[i] + "\""; } @@ -196,7 +196,7 @@ void FormatDBSupportTask::createFormatDbTask() { arguments <<"-dbtype"<< (settings.isInputAmino ? "prot" : "nucl"); } - formatDBTask = new ExternalToolRunTask(toolName, arguments, new ExternalToolLogParser()); + formatDBTask = new ExternalToolRunTask(toolId, arguments, new ExternalToolLogParser()); formatDBTask->setSubtaskProgressWeight(95); } diff --git a/src/plugins/external_tool_support/src/blast/FormatDBSupportTask.h b/src/plugins/external_tool_support/src/blast/FormatDBSupportTask.h index 0f1b5046fdb39e3135a41449513bac64a4c0225e..8fb1903762d5aceb14030919766e40681821c198 100644 --- a/src/plugins/external_tool_support/src/blast/FormatDBSupportTask.h +++ b/src/plugins/external_tool_support/src/blast/FormatDBSupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -94,7 +94,7 @@ public: class FormatDBSupportTask : public Task { Q_OBJECT public: - FormatDBSupportTask(const QString& name, const FormatDBSupportTaskSettings& settings); + FormatDBSupportTask(const QString& id, const FormatDBSupportTaskSettings& settings); private: void prepare(); @@ -109,7 +109,7 @@ private: QString externalToolLog; PrepareInputFastaFilesTask *prepareTask; ExternalToolRunTask* formatDBTask; - QString toolName; + QString toolId; FormatDBSupportTaskSettings settings; QStringList inputFastaFiles; diff --git a/src/plugins/external_tool_support/src/blast/PrepareInputFastaFilesTask.cpp b/src/plugins/external_tool_support/src/blast/PrepareInputFastaFilesTask.cpp index 159478accf1050aed3eb78b6fab6f5a002c714da..dfed72197fd91f50ef056ca3d1df9b57c3d6e33a 100644 --- a/src/plugins/external_tool_support/src/blast/PrepareInputFastaFilesTask.cpp +++ b/src/plugins/external_tool_support/src/blast/PrepareInputFastaFilesTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/blast/PrepareInputFastaFilesTask.h b/src/plugins/external_tool_support/src/blast/PrepareInputFastaFilesTask.h index 3910d788eacdab4f8b1b8cd542abf7e0ef33da26..6f320f8334ffc2290d2449c5f9e95cc8581f7a2e 100644 --- a/src/plugins/external_tool_support/src/blast/PrepareInputFastaFilesTask.h +++ b/src/plugins/external_tool_support/src/blast/PrepareInputFastaFilesTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/blast_plus/AlignToReferenceBlastDialog.cpp b/src/plugins/external_tool_support/src/blast_plus/AlignToReferenceBlastDialog.cpp index 908384ff9ff40c253cadcc18dea2cd578e0914db..6849455d943adce06d315e313c272a180e7fcd6b 100644 --- a/src/plugins/external_tool_support/src/blast_plus/AlignToReferenceBlastDialog.cpp +++ b/src/plugins/external_tool_support/src/blast_plus/AlignToReferenceBlastDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -193,6 +193,15 @@ QList<Task*> AlignToReferenceBlastCmdlineTask::onSubTaskFinished(Task *subTask) CHECK(subTask != NULL, result); CHECK(!subTask->isCanceled() && !subTask->hasError(), result); if (loadRef == subTask) { + QFileInfo resultFile(settings.resultAlignmentFile); + QDir resultDir = resultFile.dir(); + if (!resultDir.exists()) { + bool mkDirResult = QDir().mkpath(resultDir.absolutePath()); + if (!mkDirResult) { + setError(tr("Failed to create output folder: %1.").arg(resultDir.absolutePath())); + return result; + } + } CmdlineInOutTaskConfig config; config.command = "--task=" + ALIGN_TO_REF_CMDLINE; @@ -204,23 +213,25 @@ QList<Task*> AlignToReferenceBlastCmdlineTask::onSubTaskFinished(Task *subTask) config.arguments << argString.arg(MIN_LEN_ARG).arg(settings.minLength); config.arguments << argString.arg(THRESHOLD_ARG).arg(settings.qualityThreshold); config.arguments << argString.arg(TRIM_ARG).arg(true); - config.arguments << argString.arg(RESULT_ALIGNMENT_ARG).arg(QFileInfo(settings.outAlignment).absoluteFilePath()); + config.arguments << argString.arg(RESULT_ALIGNMENT_ARG).arg(QFileInfo(settings.resultAlignmentFile).absoluteFilePath()); config.reportFile = reportFile.fileName(); config.emptyOutputPossible = true; + config.logLevel = LogLevel_TRACE; + cmdlineTask = new CmdlineInOutTaskRunner(config); result.append(cmdlineTask); } else if (subTask == cmdlineTask && settings.addResultToProject) { // add load document task FormatDetectionConfig config; - QList<FormatDetectionResult> formats = DocumentUtils::detectFormat(settings.outAlignment, config); + QList<FormatDetectionResult> formats = DocumentUtils::detectFormat(settings.resultAlignmentFile, config); CHECK_EXT(!formats.isEmpty() && (NULL != formats.first().format), setError(tr("wrong output format")), result); DocumentFormat *format = formats.first().format; CHECK_EXT(format->getSupportedObjectTypes().contains(GObjectTypes::MULTIPLE_CHROMATOGRAM_ALIGNMENT), setError(tr("wrong output format")), result); - Task *loadTask = AppContext::getProjectLoader()->openWithProjectTask(settings.outAlignment); + Task *loadTask = AppContext::getProjectLoader()->openWithProjectTask(settings.resultAlignmentFile); AppContext::getTaskScheduler()->registerTopLevelTask(loadTask); } @@ -248,7 +259,7 @@ AlignToReferenceBlastDialog::AlignToReferenceBlastDialog(QWidget *parent) setupUi(this); GCOUNTER(cvar, tvar, "'Map reads to reference' dialog opening"); - new HelpButton(this, buttonBox, "22056187"); + new HelpButton(this, buttonBox, "24742722"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Map")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -314,11 +325,10 @@ void AlignToReferenceBlastDialog::accept() { settings.rowNaming = static_cast<AlignToReferenceBlastCmdlineTask::Settings::RowNaming>(cbRowNaming->currentData().toInt()); if (outputLineEdit->text().isEmpty()) { - QMessageBox::warning(this, tr("Error"), - tr("Output file is not set.")); + QMessageBox::warning(this, tr("Error"), tr("Output file is not set.")); return; } - settings.outAlignment = outputLineEdit->text(); + settings.resultAlignmentFile = outputLineEdit->text(); settings.addResultToProject = addToProjectCheckbox->isChecked(); QString outUrl = saveController->getSaveFileName(); diff --git a/src/plugins/external_tool_support/src/blast_plus/AlignToReferenceBlastDialog.h b/src/plugins/external_tool_support/src/blast_plus/AlignToReferenceBlastDialog.h index 9949f2dc5bde498da3dcd4fe42b81d80e8f488d5..c2078b2dd61f97847f739d1b0cfe573cbc9dcfe4 100644 --- a/src/plugins/external_tool_support/src/blast_plus/AlignToReferenceBlastDialog.h +++ b/src/plugins/external_tool_support/src/blast_plus/AlignToReferenceBlastDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -57,7 +57,7 @@ public: int minLength; int qualityThreshold; RowNaming rowNaming; - QString outAlignment; + QString resultAlignmentFile; bool addResultToProject; }; diff --git a/src/plugins/external_tool_support/src/blast_plus/AlignToReferenceBlastWorker.cpp b/src/plugins/external_tool_support/src/blast_plus/AlignToReferenceBlastWorker.cpp index b069102a0178be698ea162275f7bf2edd36d9ec9..fe891ca88ed02cae3545128ad94b2b6998df4655 100644 --- a/src/plugins/external_tool_support/src/blast_plus/AlignToReferenceBlastWorker.cpp +++ b/src/plugins/external_tool_support/src/blast_plus/AlignToReferenceBlastWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -137,8 +137,8 @@ void AlignToReferenceBlastWorkerFactory::init() { ActorPrototype *proto = new IntegralBusActorPrototype(desc, ports, attributes); proto->setEditor(new DelegateEditor(delegates)); proto->setPrompter(new AlignToReferenceBlastPrompter(NULL)); - proto->addExternalTool(ET_BLASTN); - proto->addExternalTool(ET_MAKEBLASTDB); + proto->addExternalTool(BlastPlusSupport::ET_BLASTN_ID); + proto->addExternalTool(FormatDBSupport::ET_MAKEBLASTDB_ID); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_ALIGNMENT(), proto); DomainFactory *localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID); diff --git a/src/plugins/external_tool_support/src/blast_plus/AlignToReferenceBlastWorker.h b/src/plugins/external_tool_support/src/blast_plus/AlignToReferenceBlastWorker.h index ef2e526b3ec51afd8547a6f083846cdc8d36dc17..d09591a2d49e80e56e5e4879e31170ebf7ae0638 100644 --- a/src/plugins/external_tool_support/src/blast_plus/AlignToReferenceBlastWorker.h +++ b/src/plugins/external_tool_support/src/blast_plus/AlignToReferenceBlastWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -96,11 +96,12 @@ public: AlignToReferenceBlastWorker(Actor *a); protected: - Task * createPrepareTask(U2OpStatus &os) const; - void onPrepared(Task *task, U2OpStatus &os); - Task * createTask(const QList<Message> &messages) const; - QVariantMap getResult(Task *task, U2OpStatus &os) const; - MessageMetadata generateMetadata(const QString &datasetName) const; + Task * createPrepareTask(U2OpStatus &os) const override; + void onPrepared(Task *task, U2OpStatus &os) override; + + Task * createTask(const QList<Message> &messages) const override; + QVariantMap getResult(Task *task, U2OpStatus &os) const override; + MessageMetadata generateMetadata(const QString &datasetName) const override; private: QString getReadName(const Message &message) const; diff --git a/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdDialog.cpp b/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdDialog.cpp index cb67a246afd24d6b40d2a77f602e361509d22a1d..3521961ecc0dfbcd89748e11b6773579cbbd9536 100644 --- a/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdDialog.cpp +++ b/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -38,7 +38,7 @@ BlastDBCmdDialog::BlastDBCmdDialog(BlastDBCmdSupportTaskSettings &_settings, QWi settings(_settings) { setupUi(this); - new HelpButton(this, buttonBox, "22056087"); + new HelpButton(this, buttonBox, "24742622"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Fetch")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdDialog.h b/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdDialog.h index 50ef8e766ea45a31a7de3ac2373db7d136ad4f6a..43aedc2008f0ef9b82acb067838c76adbcc5b563 100644 --- a/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdDialog.h +++ b/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdSupport.cpp b/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdSupport.cpp index 09f0d7fe0f22e3304c06d2482f95ef82358e7489..5d2e04f6c996510e0574b6444f9fd868ef08595c 100644 --- a/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdSupport.cpp +++ b/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -44,7 +44,10 @@ namespace U2 { -BlastDbCmdSupport::BlastDbCmdSupport(const QString& path) : ExternalTool(ET_BLASTDBCMD, path) +const QString BlastDbCmdSupport::ET_BLASTDBCMD = "BlastDBCmd"; +const QString BlastDbCmdSupport::ET_BLASTDBCMD_ID = "USUPP_BLAST_DB_CMD"; + +BlastDbCmdSupport::BlastDbCmdSupport(const QString& path) : ExternalTool(ET_BLASTDBCMD_ID, ET_BLASTDBCMD, path) { if (AppContext::getMainWindow() != NULL) { icon = QIcon(":external_tool_support/images/ncbi.png"); diff --git a/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdSupport.h b/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdSupport.h index 449f94736d524eb71972b48cb2504bc700eb8f84..abe1b3aeb1f7f2a1dff39fe285da861fe4aa2c3b 100644 --- a/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdSupport.h +++ b/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,8 +25,6 @@ #include <U2Core/ExternalToolRegistry.h> #include "utils/ExternalToolSupportAction.h" -#define ET_BLASTDBCMD "BlastDBCmd" - namespace U2 { class BlastDbCmdSupport : public ExternalTool { @@ -34,6 +32,8 @@ class BlastDbCmdSupport : public ExternalTool { public: BlastDbCmdSupport(const QString& path = ""); + static const QString ET_BLASTDBCMD; + static const QString ET_BLASTDBCMD_ID; public slots: void sl_runWithExtFileSpecify(); }; diff --git a/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdSupportTask.cpp b/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdSupportTask.cpp index 86b80331cb002541af551f1cb733a8d736322fae..c0b069e53f2ce66d233101516bf0e8004ea6bbc1 100644 --- a/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdSupportTask.cpp +++ b/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdSupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -47,8 +47,8 @@ BlastDBCmdSupportTask::BlastDBCmdSupportTask(const BlastDBCmdSupportTaskSettings Task("Run NCBI BlastDBCmd task", TaskFlags_NR_FOSCOE),settings(_settings) { GCOUNTER( cvar, tvar, "BlastDBCmdSupportTask" ); - blastDBCmdTask=NULL; - toolName = ET_BLASTDBCMD; + blastDBCmdTask = nullptr; + toolId = BlastDbCmdSupport::ET_BLASTDBCMD_ID; } void BlastDBCmdSupportTask::prepare(){ @@ -61,7 +61,7 @@ void BlastDBCmdSupportTask::prepare(){ arguments << "-logfile" << settings.outputPath+".BlastDBCmd.log"; arguments << "-out" << settings.outputPath; - blastDBCmdTask = new ExternalToolRunTask(toolName, arguments, new ExternalToolLogParser()); + blastDBCmdTask = new ExternalToolRunTask(toolId, arguments, new ExternalToolLogParser()); blastDBCmdTask->setSubtaskProgressWeight(95); addSubTask(blastDBCmdTask); } diff --git a/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdSupportTask.h b/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdSupportTask.h index 89507eea2a89b4a01282b821a13d039b5a82108b..ff984da8aca0daecf41dd843456773562dbb0a2d 100644 --- a/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdSupportTask.h +++ b/src/plugins/external_tool_support/src/blast_plus/BlastDBCmdSupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -55,7 +55,7 @@ public: private: ExternalToolRunTask* blastDBCmdTask; BlastDBCmdSupportTaskSettings settings; - QString toolName; + QString toolId; }; diff --git a/src/plugins/external_tool_support/src/blast_plus/BlastNPlusSupportTask.cpp b/src/plugins/external_tool_support/src/blast_plus/BlastNPlusSupportTask.cpp index 296f4026ea7c2dca4f5250086654983fa7cae3e0..917a37d32ffe2fda03cf530f25d4c7d15aa611d2 100644 --- a/src/plugins/external_tool_support/src/blast_plus/BlastNPlusSupportTask.cpp +++ b/src/plugins/external_tool_support/src/blast_plus/BlastNPlusSupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -109,7 +109,7 @@ ExternalToolRunTask* BlastNPlusSupportTask::createBlastPlusTask(){ algoLog.trace("BlastN+ arguments: "+arguments.join(" ")); QString workingDirectory=QFileInfo(url).absolutePath(); - ExternalToolRunTask* toolRunTask = new ExternalToolRunTask(ET_BLASTN, arguments, new ExternalToolLogParser(), workingDirectory); + ExternalToolRunTask* toolRunTask = new ExternalToolRunTask(BlastPlusSupport::ET_BLASTN_ID, arguments, new ExternalToolLogParser(), workingDirectory); setListenerForTask(toolRunTask); return toolRunTask; } diff --git a/src/plugins/external_tool_support/src/blast_plus/BlastNPlusSupportTask.h b/src/plugins/external_tool_support/src/blast_plus/BlastNPlusSupportTask.h index 713ab5b7b9288cd4d2973cd7eb7756fc6dcc104f..678bde1815e53b0dd303fc14783e7d8d692a7054 100644 --- a/src/plugins/external_tool_support/src/blast_plus/BlastNPlusSupportTask.h +++ b/src/plugins/external_tool_support/src/blast_plus/BlastNPlusSupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/blast_plus/BlastPPlusSupportTask.cpp b/src/plugins/external_tool_support/src/blast_plus/BlastPPlusSupportTask.cpp index e9130e22d06a4ac47436130eac3a6510aad39a89..5227e342f0d34dc22c039174657e222d08ab68c0 100644 --- a/src/plugins/external_tool_support/src/blast_plus/BlastPPlusSupportTask.cpp +++ b/src/plugins/external_tool_support/src/blast_plus/BlastPPlusSupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -112,7 +112,7 @@ ExternalToolRunTask* BlastPPlusSupportTask::createBlastPlusTask(){ algoLog.trace("BlastP+ arguments: "+arguments.join(" ")); QString workingDirectory = QFileInfo(url).absolutePath(); - ExternalToolRunTask* runTask = new ExternalToolRunTask(ET_BLASTP, arguments, new ExternalToolLogParser(), workingDirectory); + ExternalToolRunTask* runTask = new ExternalToolRunTask(BlastPlusSupport::ET_BLASTP_ID, arguments, new ExternalToolLogParser(), workingDirectory); setListenerForTask(runTask); return runTask; } diff --git a/src/plugins/external_tool_support/src/blast_plus/BlastPPlusSupportTask.h b/src/plugins/external_tool_support/src/blast_plus/BlastPPlusSupportTask.h index 11ba9d8e467985d5241fce03c632dafb6bd6dfd5..cc0bda23db9f11d0093d0716fe68e6fc911f59aa 100644 --- a/src/plugins/external_tool_support/src/blast_plus/BlastPPlusSupportTask.h +++ b/src/plugins/external_tool_support/src/blast_plus/BlastPPlusSupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupport.cpp b/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupport.cpp index c96df229aa4b32d7ee1d4f32a2db62bf95bcf043..be9dfc363bd371fed4aa0eddf6af8c57142b9079 100644 --- a/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupport.cpp +++ b/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -62,7 +62,23 @@ namespace U2 { -BlastPlusSupport::BlastPlusSupport(const QString& name, const QString& path) : ExternalTool(name, path) +const QString BlastPlusSupport::ET_BLASTN = "BlastN"; +const QString BlastPlusSupport::ET_BLASTN_ID = "USUPP_BLASTN"; +const QString BlastPlusSupport::ET_BLASTP = "BlastP"; +const QString BlastPlusSupport::ET_BLASTP_ID = "USUPP_BLASTP"; +const QString BlastPlusSupport::ET_GPU_BLASTP = "GPU-BlastP"; +const QString BlastPlusSupport::ET_GPU_BLASTP_ID = "UGENE_GPU_BLASTP"; +const QString BlastPlusSupport::ET_BLASTX = "BlastX"; +const QString BlastPlusSupport::ET_BLASTX_ID = "USUPP_BLASTX"; +const QString BlastPlusSupport::ET_TBLASTN = "TBlastN"; +const QString BlastPlusSupport::ET_TBLASTN_ID = "USUPP_TBLASTN"; +const QString BlastPlusSupport::ET_TBLASTX = "TBlastX"; +const QString BlastPlusSupport::ET_TBLASTX_ID = "USUPP_TBLASTX"; +const QString BlastPlusSupport::ET_RPSBLAST = "RPSBlast"; +const QString BlastPlusSupport::ET_RPSBLAST_ID = "USUPP_RPS_BLAST"; +const QString BlastPlusSupport::BLASTPLUS_TMP_DIR = "blast_plus"; + +BlastPlusSupport::BlastPlusSupport(const QString& id, const QString& name, const QString& path) : ExternalTool(id, name, path) { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/ncbi.png"); @@ -71,7 +87,7 @@ BlastPlusSupport::BlastPlusSupport(const QString& name, const QString& path) : E } validationArguments<<"-h"; - if(name == ET_BLASTN){ + if(id == ET_BLASTN_ID) { #ifdef Q_OS_WIN executableFileName="blastn.exe"; #else @@ -83,7 +99,7 @@ BlastPlusSupport::BlastPlusSupport(const QString& name, const QString& path) : E description="The <i>blastn</i> tool searches a nucleotide database \ using a nucleotide query."; versionRegExp=QRegExp("Nucleotide-Nucleotide BLAST (\\d+\\.\\d+\\.\\d+\\+?)"); - }else if(name == ET_BLASTP){ + }else if(id == ET_BLASTP_ID) { #ifdef Q_OS_WIN executableFileName="blastp.exe"; #else @@ -96,7 +112,7 @@ BlastPlusSupport::BlastPlusSupport(const QString& name, const QString& path) : E using a protein query."; versionRegExp=QRegExp("Protein-Protein BLAST (\\d+\\.\\d+\\.\\d+\\+?)"); // https://ugene.net/tracker/browse/UGENE-945 -// }else if(name == GPU_BLASTP_TOOL_NAME){ +// }else if(name == GPU_BLASTP_TOOL_NAME) { // #ifdef Q_OS_WIN // executableFileName="blastp.exe"; // #else @@ -107,7 +123,7 @@ BlastPlusSupport::BlastPlusSupport(const QString& name, const QString& path) : E // validMessage="[-gpu boolean]"; // description="The <i>blastp</i> tool searches a protein database using a protein query."; // versionRegExp=QRegExp("Protein-Protein BLAST (\\d+\\.\\d+\\.\\d+\\+?)"); - }else if(name == ET_BLASTX){ + }else if(id == ET_BLASTX_ID) { #ifdef Q_OS_WIN executableFileName="blastx.exe"; #else @@ -119,7 +135,7 @@ BlastPlusSupport::BlastPlusSupport(const QString& name, const QString& path) : E description="The <i>blastx</i> tool searches a protein database \ using a translated nucleotide query."; versionRegExp=QRegExp("Translated Query-Protein Subject BLAST (\\d+\\.\\d+\\.\\d+\\+?)"); - }else if(name == ET_TBLASTN){ + }else if(id == ET_TBLASTN_ID) { #ifdef Q_OS_WIN executableFileName="tblastn.exe"; #else @@ -131,7 +147,7 @@ BlastPlusSupport::BlastPlusSupport(const QString& name, const QString& path) : E description="The <i>tblastn</i> compares a protein query against \ a translated nucleotide database"; versionRegExp=QRegExp("Protein Query-Translated Subject BLAST (\\d+\\.\\d+\\.\\d+\\+?)"); - }else if(name == ET_TBLASTX){ + }else if(id == ET_TBLASTX_ID) { #ifdef Q_OS_WIN executableFileName="tblastx.exe"; #else @@ -145,7 +161,7 @@ BlastPlusSupport::BlastPlusSupport(const QString& name, const QString& path) : E against the six-frame translations of a nucleotide \ sequence database."; versionRegExp=QRegExp("Translated Query-Translated Subject BLAST (\\d+\\.\\d+\\.\\d+\\+?)"); - }else if(name == ET_RPSBLAST) { + }else if(id == ET_RPSBLAST_ID) { #ifdef Q_OS_WIN executableFileName="rpsblast.exe"; #else @@ -157,7 +173,7 @@ BlastPlusSupport::BlastPlusSupport(const QString& name, const QString& path) : E description=""; versionRegExp=QRegExp("Reverse Position Specific BLAST (\\d+\\.\\d+\\.\\d+\\+?)"); } - if(name == ET_GPU_BLASTP) { + if(id == ET_GPU_BLASTP_ID) { toolKitName="GPU-BLAST+"; } else { toolKitName="BLAST+"; @@ -166,17 +182,17 @@ BlastPlusSupport::BlastPlusSupport(const QString& name, const QString& path) : E lastDBPath=""; } -void BlastPlusSupport::sl_runWithExtFileSpecify(){ +void BlastPlusSupport::sl_runWithExtFileSpecify() { //Check that blastal and tempory folder path defined QStringList toolList; - toolList << ET_BLASTN << ET_BLASTP << ET_BLASTX << ET_TBLASTN << ET_TBLASTX << ET_RPSBLAST; + toolList << ET_BLASTN_ID << ET_BLASTP_ID << ET_BLASTX_ID << ET_TBLASTN_ID << ET_TBLASTX_ID << ET_RPSBLAST_ID; bool isOneOfToolConfigured=false; - foreach(QString toolName, toolList){ - if(!AppContext::getExternalToolRegistry()->getByName(toolName)->getPath().isEmpty()){ + foreach(QString id, toolList) { + if(!AppContext::getExternalToolRegistry()->getById(id)->getPath().isEmpty()) { isOneOfToolConfigured=true; } } - if (!isOneOfToolConfigured){ + if (!isOneOfToolConfigured) { QObjectScopedPointer<QMessageBox> msgBox = new QMessageBox; msgBox->setWindowTitle("BLAST+ Search"); msgBox->setText(tr("Path for BLAST+ tools not selected.")); @@ -198,12 +214,12 @@ void BlastPlusSupport::sl_runWithExtFileSpecify(){ break; } bool isOneOfToolConfigured=false; - foreach(QString toolName, toolList){ - if(!AppContext::getExternalToolRegistry()->getByName(toolName)->getPath().isEmpty()){ + foreach(QString id, toolList) { + if(!AppContext::getExternalToolRegistry()->getById(id)->getPath().isEmpty()) { isOneOfToolConfigured=true; } } - if (!isOneOfToolConfigured){ + if (!isOneOfToolConfigured) { return; } } @@ -216,7 +232,7 @@ void BlastPlusSupport::sl_runWithExtFileSpecify(){ blastPlusRunDialog->exec(); CHECK(!blastPlusRunDialog.isNull(), ); - if(blastPlusRunDialog->result() != QDialog::Accepted){ + if(blastPlusRunDialog->result() != QDialog::Accepted) { return; } QList<BlastTaskSettings> settingsList = blastPlusRunDialog->getSettingsList(); @@ -225,10 +241,10 @@ void BlastPlusSupport::sl_runWithExtFileSpecify(){ } void BlastPlusSupport::sl_runAlign() { - ExternalToolUtils::checkExtToolsPath(QStringList() << ET_BLASTN << ET_MAKEBLASTDB); + ExternalToolUtils::checkExtToolsPath(QStringList() << ET_BLASTN_ID << FormatDBSupport::ET_MAKEBLASTDB_ID); - if (AppContext::getExternalToolRegistry()->getByName(ET_BLASTN)->getPath().isEmpty() - || AppContext::getExternalToolRegistry()->getByName(ET_MAKEBLASTDB)->getPath().isEmpty()){ + if (AppContext::getExternalToolRegistry()->getById(ET_BLASTN_ID)->getPath().isEmpty() + || AppContext::getExternalToolRegistry()->getById(FormatDBSupport::ET_MAKEBLASTDB_ID)->getPath().isEmpty()) { return; } @@ -248,14 +264,13 @@ void BlastPlusSupport::sl_runAlign() { #define BLAST_ANNOTATION_NAME "blast result" BlastPlusSupportContext::BlastPlusSupportContext(QObject* p) : GObjectViewWindowContext(p, ANNOTATED_DNA_VIEW_FACTORY_ID) { - toolList << ET_BLASTN << ET_BLASTP << ET_BLASTX << ET_TBLASTN << ET_TBLASTX << ET_RPSBLAST; + toolIdList << BlastPlusSupport::ET_BLASTN_ID << BlastPlusSupport::ET_BLASTP_ID << BlastPlusSupport::ET_BLASTX_ID << BlastPlusSupport::ET_TBLASTN_ID << BlastPlusSupport::ET_TBLASTX_ID << BlastPlusSupport::ET_RPSBLAST_ID; lastDBName=""; lastDBPath=""; fetchSequenceByIdAction = new QAction(tr("Fetch sequences by 'id'"), this); fetchSequenceByIdAction->setObjectName("fetchSequenceById"); connect(fetchSequenceByIdAction, SIGNAL(triggered()), SLOT(sl_fetchSequenceById())); - } void BlastPlusSupportContext::initViewContext(GObjectView* view) { @@ -263,7 +278,7 @@ void BlastPlusSupportContext::initViewContext(GObjectView* view) { assert(av!=NULL); Q_UNUSED(av); - ExternalToolSupportAction* queryAction = new ExternalToolSupportAction(this, view, tr("Query with local BLAST+..."), 2000, toolList); + ExternalToolSupportAction* queryAction = new ExternalToolSupportAction(this, view, tr("Query with local BLAST+..."), 2000, toolIdList); queryAction->setObjectName("query_with_blast+"); addViewAction(queryAction); @@ -313,7 +328,7 @@ void BlastPlusSupportContext::buildMenu(GObjectView* view, QMenu* m) { SAFE_POINT(exportMenu != NULL, "exportMenu", ); m->insertMenu(exportMenu->menuAction(), fetchMenu); fetchSequenceByIdAction->setText(tr("Fetch sequences by 'id' %1").arg(name)); - bool emptyToolPath = AppContext::getExternalToolRegistry()->getByName(ET_BLASTDBCMD)->getPath().isEmpty(); + bool emptyToolPath = AppContext::getExternalToolRegistry()->getById(BlastDbCmdSupport::ET_BLASTDBCMD_ID)->getPath().isEmpty(); setActionFontItalic(fetchSequenceByIdAction, emptyToolPath); fetchMenu->addAction(fetchSequenceByIdAction); } @@ -322,12 +337,12 @@ void BlastPlusSupportContext::buildMenu(GObjectView* view, QMenu* m) { void BlastPlusSupportContext::sl_showDialog() { //Check that any of BLAST+ tools and tempory folder path defined bool isOneOfToolConfigured=false; - foreach(QString toolName, toolList){ - if(!AppContext::getExternalToolRegistry()->getByName(toolName)->getPath().isEmpty()){ + foreach(QString id, toolIdList) { + if(!AppContext::getExternalToolRegistry()->getById(id)->getPath().isEmpty()) { isOneOfToolConfigured=true; } } - if (!isOneOfToolConfigured){ + if (!isOneOfToolConfigured) { QObjectScopedPointer<QMessageBox> msgBox = new QMessageBox; msgBox->setWindowTitle("BLAST+ Search"); msgBox->setText(tr("Path for BLAST+ tools not selected.")); @@ -349,12 +364,12 @@ void BlastPlusSupportContext::sl_showDialog() { break; } bool isOneOfToolConfigured=false; - foreach(QString toolName, toolList){ - if(!AppContext::getExternalToolRegistry()->getByName(toolName)->getPath().isEmpty()){ + foreach(QString id, toolIdList) { + if(!AppContext::getExternalToolRegistry()->getById(id)->getPath().isEmpty()) { isOneOfToolConfigured=true; } } - if (!isOneOfToolConfigured){ + if (!isOneOfToolConfigured) { return; } } @@ -383,17 +398,17 @@ void BlastPlusSupportContext::sl_showDialog() { settings.isSequenceCircular = seqCtx->getSequenceObject()->isCircular(); settings.querySequenceObject = seqCtx->getSequenceObject(); Task * t=NULL; - if (settings.programName == "blastn"){ + if (settings.programName == "blastn") { t = new BlastNPlusSupportTask(settings); - } else if(settings.programName == "blastp" || settings.programName == "gpu-blastp"){ + } else if(settings.programName == "blastp" || settings.programName == "gpu-blastp") { t = new BlastPPlusSupportTask(settings); - } else if(settings.programName == "blastx"){ + } else if(settings.programName == "blastx") { t = new BlastXPlusSupportTask(settings); - } else if(settings.programName == "tblastn"){ + } else if(settings.programName == "tblastn") { t = new TBlastNPlusSupportTask(settings); - } else if(settings.programName == "tblastx"){ + } else if(settings.programName == "tblastx") { t = new TBlastXPlusSupportTask(settings); - } else if(settings.programName == "rpsblast"){ + } else if(settings.programName == "rpsblast") { t = new RPSBlastSupportTask(settings); } assert(t); @@ -403,10 +418,10 @@ void BlastPlusSupportContext::sl_showDialog() { void BlastPlusSupportContext::sl_fetchSequenceById() { - if (AppContext::getExternalToolRegistry()->getByName(ET_BLASTDBCMD)->getPath().isEmpty()){ + if (AppContext::getExternalToolRegistry()->getById(BlastDbCmdSupport::ET_BLASTDBCMD_ID)->getPath().isEmpty()) { QObjectScopedPointer<QMessageBox> msgBox = new QMessageBox; - msgBox->setWindowTitle("BLAST+ " + QString(ET_BLASTDBCMD)); - msgBox->setText(tr("Path for BLAST+ %1 tool not selected.").arg(ET_BLASTDBCMD)); + msgBox->setWindowTitle("BLAST+ " + QString(BlastDbCmdSupport::ET_BLASTDBCMD)); + msgBox->setText(tr("Path for BLAST+ %1 tool not selected.").arg(BlastDbCmdSupport::ET_BLASTDBCMD)); msgBox->setInformativeText(tr("Do you want to select it now?")); msgBox->setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox->setDefaultButton(QMessageBox::Yes); @@ -432,7 +447,7 @@ void BlastPlusSupportContext::sl_fetchSequenceById() blastDBCmdDialog->exec(); CHECK(!blastDBCmdDialog.isNull(), ); - if (blastDBCmdDialog->result() != QDialog::Accepted){ + if (blastDBCmdDialog->result() != QDialog::Accepted) { return; } diff --git a/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupport.h b/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupport.h index d7b2931d92c15ac44b6cacfa2ab6f5f9d01af812..c74f080253c37bb6a3dcb53d9a4bae9b78e77109 100644 --- a/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupport.h +++ b/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,22 +25,28 @@ #include <U2Core/ExternalToolRegistry.h> #include <U2Gui/ObjectViewModel.h> -#define ET_BLASTN "BlastN" -#define ET_BLASTP "BlastP" -#define ET_GPU_BLASTP "GPU-BlastP" -#define ET_BLASTX "BlastX" -#define ET_TBLASTN "TBlastN" -#define ET_TBLASTX "TBlastX" -#define ET_RPSBLAST "RPSBlast" -#define BLASTPLUS_TMP_DIR "blast_plus" - namespace U2 { class BlastPlusSupport : public ExternalTool { Q_OBJECT public: - BlastPlusSupport(const QString& name, const QString& path = ""); + BlastPlusSupport(const QString& id, const QString& name, const QString& path = ""); + static const QString ET_BLASTN; + static const QString ET_BLASTN_ID; + static const QString ET_BLASTP; + static const QString ET_BLASTP_ID; + static const QString ET_GPU_BLASTP; + static const QString ET_GPU_BLASTP_ID; + static const QString ET_BLASTX; + static const QString ET_BLASTX_ID; + static const QString ET_TBLASTN; + static const QString ET_TBLASTN_ID; + static const QString ET_TBLASTX; + static const QString ET_TBLASTX_ID; + static const QString ET_RPSBLAST; + static const QString ET_RPSBLAST_ID; + static const QString BLASTPLUS_TMP_DIR; private slots: void sl_runWithExtFileSpecify(); void sl_runAlign(); @@ -63,7 +69,7 @@ protected: virtual void initViewContext(GObjectView* view); virtual void buildMenu(GObjectView* view, QMenu* m); private: - QStringList toolList; + QStringList toolIdList; QString lastDBPath; QString lastDBName; QString selectedId; diff --git a/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupportCommonTask.cpp b/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupportCommonTask.cpp index fcb655499f8b3f729052183633b95859c8676804..0c670e44bdf636d7798d1b03da30209d1b68e53f 100644 --- a/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupportCommonTask.cpp +++ b/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupportCommonTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -137,7 +137,7 @@ QString BlastPlusSupportCommonTask::getAcceptableTempDir() const { QTime::currentTime().toString("hh.mm.ss.zzz") + "_" + QString::number(QCoreApplication::applicationPid()) + "/"; - QString tmpDirPath = AppContext::getAppSettings()->getUserAppsSettings()->getCurrentProcessTemporaryDirPath(BLASTPLUS_TMP_DIR); + QString tmpDirPath = AppContext::getAppSettings()->getUserAppsSettings()->getCurrentProcessTemporaryDirPath(BlastPlusSupport::BLASTPLUS_TMP_DIR); if (!GUrlUtils::containSpaces(tmpDirPath)) { return tmpDirPath + "/" + tmpDirName; } @@ -162,13 +162,13 @@ QList<Task*> BlastPlusSupportCommonTask::onSubTaskFinished(Task* subTask) { else if(subTask==blastPlusTask){ if(settings.outputType == 5 || settings.outputType == 6){ if(!QFileInfo(settings.outputOriginalFile).exists()){ - QString curToolName = toolNameByProgram(settings.programName); - if(AppContext::getExternalToolRegistry()->getByName(curToolName)->isValid()){ + QString curToolId = toolIdByProgram(settings.programName); + if(AppContext::getExternalToolRegistry()->getById(curToolId)->isValid()){ stateInfo.setError(tr("Output file not found")); }else{ stateInfo.setError(tr("Output file not found. May be %1 tool path '%2' not valid?") - .arg(AppContext::getExternalToolRegistry()->getByName(curToolName)->getName()) - .arg(AppContext::getExternalToolRegistry()->getByName(curToolName)->getPath())); + .arg(AppContext::getExternalToolRegistry()->getById(curToolId)->getName()) + .arg(AppContext::getExternalToolRegistry()->getById(curToolId)->getPath())); } return res; } @@ -439,12 +439,25 @@ void BlastPlusSupportCommonTask::parseXMLHsp(const QDomNode &xml,const QString & ad->qualifiers.push_back(U2Qualifier("hit-to", elem.text())); } - elem = xml.lastChildElement("Hsp_hit-frame"); + QString strandTag; + switch (settings.strandSource) { + case BlastTaskSettings::HitFrame: + strandTag = "Hsp_hit-frame"; + break; + case BlastTaskSettings::QueryFrame: + strandTag = "Hsp_query-frame"; + break; + default: + SAFE_POINT_EXT(false, stateInfo.setError(tr("Unknown strand source setting")), ); + break; + } + elem = xml.lastChildElement(strandTag); int frame = elem.text().toInt(&isOk); - if(!isOk) { - stateInfo.setError(tr("Can't get location")); + if (!isOk) { + stateInfo.setError(tr("Can't get location. %1[%2]").arg(strandTag).arg(elem.text())); return; } + QString frame_txt = (frame < 0) ? "complement" : "direct"; ad->qualifiers.push_back(U2Qualifier("source_frame", frame_txt)); ad->setStrand(frame < 0 ? U2Strand::Complementary: U2Strand::Direct); @@ -623,27 +636,27 @@ QString BlastPlusSupportMultiTask::generateReport() const { res+="<table>"; res+="<tr><td width=200><b>" + tr("Source file") + "</b></td><td>" + settingsList.at(0).queryFile + "</td></tr>"; - res+="<tr><td width=200><b>" + tr("Used databse") + "</b></td><td>" + settingsList.at(0).databaseNameAndPath + "</td></tr>"; + res+="<tr><td width=200><b>" + tr("Used database") + "</b></td><td>" + settingsList.at(0).databaseNameAndPath + "</td></tr>"; res+="<tr></tr>"; res+="<tr><td width=200><b>" + tr("No any results found") + "</b></td><td></td></tr>"; res+="</table>"; return res; } -QString BlastPlusSupportCommonTask::toolNameByProgram(const QString &program) { +QString BlastPlusSupportCommonTask::toolIdByProgram(const QString &program) { QString result; if("blastn" == program){ - result = ET_BLASTN; + result = BlastPlusSupport::ET_BLASTN_ID; } else if ("blastp" == program){ - result = ET_BLASTP; + result = BlastPlusSupport::ET_BLASTP_ID; } else if ("blastx" == program){ - result = ET_BLASTX; + result = BlastPlusSupport::ET_BLASTX_ID; } else if ("tblastn" == program){ - result = ET_TBLASTN; + result = BlastPlusSupport::ET_TBLASTN_ID; } else if ("tblastx" == program){ - result = ET_TBLASTX; + result = BlastPlusSupport::ET_TBLASTX_ID; } else if ("rpsblast" == program) { - result = ET_RPSBLAST; + result = BlastPlusSupport::ET_RPSBLAST_ID; } return result; } diff --git a/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupportCommonTask.h b/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupportCommonTask.h index 704e8ab268a82768b4b679389ced260a4290c510..99d744d2c9b0186d144ce0ea118a748b00e1cc73 100644 --- a/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupportCommonTask.h +++ b/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupportCommonTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -49,7 +49,7 @@ public: virtual ExternalToolRunTask* createBlastPlusTask() = 0; - static QString toolNameByProgram(const QString &program); + static QString toolIdByProgram(const QString &program); protected: BlastTaskSettings settings; diff --git a/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupportRunDialog.cpp b/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupportRunDialog.cpp index 04b9677206d21627113acd373eb0dc53e40a9ac0..49f73444795575dd533e657d0b91129da289db41 100644 --- a/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupportRunDialog.cpp +++ b/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupportRunDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -116,20 +116,23 @@ void BlastPlusSupportRunDialog::sl_lineEditChanged(){ bool BlastPlusSupportRunDialog::checkToolPath(){ bool needSetToolPath=false; QString toolName; + QString toolId; QObjectScopedPointer<QMessageBox> msgBox = new QMessageBox; msgBox->setWindowTitle("BLAST+ Search"); msgBox->setInformativeText(tr("Do you want to select it now?")); msgBox->setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox->setDefaultButton(QMessageBox::Yes); if((programName->currentText() == "blastn") && - (AppContext::getExternalToolRegistry()->getByName(ET_BLASTN)->getPath().isEmpty())){ + (AppContext::getExternalToolRegistry()->getById(BlastPlusSupport::ET_BLASTN_ID)->getPath().isEmpty())){ needSetToolPath=true; - toolName=ET_BLASTN; + toolName= BlastPlusSupport::ET_BLASTN; + toolId = BlastPlusSupport::ET_BLASTN_ID; }else if((programName->currentText() == "blastp") && - (AppContext::getExternalToolRegistry()->getByName(ET_BLASTP)->getPath().isEmpty())){ + (AppContext::getExternalToolRegistry()->getById(BlastPlusSupport::ET_BLASTP_ID)->getPath().isEmpty())){ needSetToolPath=true; - toolName=ET_BLASTP; + toolName= BlastPlusSupport::ET_BLASTP; + toolId = BlastPlusSupport::ET_BLASTP_ID; // https://ugene.net/tracker/browse/UGENE-945 // }else if((programName->currentText() == "gpu-blastp") && @@ -138,19 +141,22 @@ bool BlastPlusSupportRunDialog::checkToolPath(){ // toolName=GPU_BLASTP_TOOL_NAME; }else if((programName->currentText() == "blastx") && - (AppContext::getExternalToolRegistry()->getByName(ET_BLASTX)->getPath().isEmpty())){ + (AppContext::getExternalToolRegistry()->getById(BlastPlusSupport::ET_TBLASTX_ID)->getPath().isEmpty())){ needSetToolPath=true; - toolName=ET_BLASTX; + toolName= BlastPlusSupport::ET_BLASTX; + toolId = BlastPlusSupport::ET_BLASTX_ID; }else if((programName->currentText() == "tblastn") && - (AppContext::getExternalToolRegistry()->getByName(ET_TBLASTN)->getPath().isEmpty())){ + (AppContext::getExternalToolRegistry()->getById(BlastPlusSupport::ET_TBLASTN_ID)->getPath().isEmpty())){ needSetToolPath=true; - toolName=ET_TBLASTN; + toolName= BlastPlusSupport::ET_TBLASTN; + toolId = BlastPlusSupport::ET_TBLASTN_ID; }else if((programName->currentText() == "tblastx") && - (AppContext::getExternalToolRegistry()->getByName(ET_TBLASTX)->getPath().isEmpty())){ + (AppContext::getExternalToolRegistry()->getById(BlastPlusSupport::ET_TBLASTX_ID)->getPath().isEmpty())){ needSetToolPath=true; - toolName=ET_TBLASTX; + toolName= BlastPlusSupport::ET_TBLASTX; + toolId = BlastPlusSupport::ET_TBLASTX_ID; } if(needSetToolPath){ msgBox->setText(tr("Path for <i>BLAST+ %1</i> tool not selected.").arg(toolName)); @@ -168,7 +174,7 @@ bool BlastPlusSupportRunDialog::checkToolPath(){ assert(false); break; } - if(!AppContext::getExternalToolRegistry()->getByName(toolName)->getPath().isEmpty()){ + if(!AppContext::getExternalToolRegistry()->getById(toolId)->getPath().isEmpty()){ return true; }else{ return false; @@ -391,23 +397,22 @@ void BlastPlusWithExtFileSpecifySupportRunDialog::tryApplyDoc(Document *doc) { } bool BlastPlusWithExtFileSpecifySupportRunDialog::checkToolPath(){ - bool needSetToolPath=false; - QString toolName; + QString toolId; QObjectScopedPointer<QMessageBox> msgBox = new QMessageBox; msgBox->setWindowTitle("BLAST+ Search"); msgBox->setInformativeText(tr("Do you want to select it now?")); msgBox->setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox->setDefaultButton(QMessageBox::Yes); if((programName->currentText() == "blastn") && - (AppContext::getExternalToolRegistry()->getByName(ET_BLASTN)->getPath().isEmpty())){ + (AppContext::getExternalToolRegistry()->getById(BlastPlusSupport::ET_TBLASTN_ID)->getPath().isEmpty())){ needSetToolPath=true; - toolName=ET_BLASTN; + toolId= BlastPlusSupport::ET_BLASTN_ID; }else if((programName->currentText() == "blastp") && - (AppContext::getExternalToolRegistry()->getByName(ET_BLASTP)->getPath().isEmpty())){ + (AppContext::getExternalToolRegistry()->getById(BlastPlusSupport::ET_BLASTP_ID)->getPath().isEmpty())){ needSetToolPath=true; - toolName=ET_BLASTP; + toolId= BlastPlusSupport::ET_BLASTP_ID; // https://ugene.net/tracker/browse/UGENE-945 // }else if((programName->currentText() == "gpu-blastp") && @@ -416,22 +421,22 @@ bool BlastPlusWithExtFileSpecifySupportRunDialog::checkToolPath(){ // toolName=GPU_BLASTP_TOOL_NAME; }else if((programName->currentText() == "blastx") && - (AppContext::getExternalToolRegistry()->getByName(ET_BLASTX)->getPath().isEmpty())){ + (AppContext::getExternalToolRegistry()->getById(BlastPlusSupport::ET_BLASTX_ID)->getPath().isEmpty())){ needSetToolPath=true; - toolName=ET_BLASTX; + toolId= BlastPlusSupport::ET_BLASTX_ID; }else if((programName->currentText() == "tblastn") && - (AppContext::getExternalToolRegistry()->getByName(ET_TBLASTN)->getPath().isEmpty())){ + (AppContext::getExternalToolRegistry()->getById(BlastPlusSupport::ET_TBLASTN_ID)->getPath().isEmpty())){ needSetToolPath=true; - toolName=ET_TBLASTN; + toolId= BlastPlusSupport::ET_TBLASTN_ID; }else if((programName->currentText() == "tblastx") && - (AppContext::getExternalToolRegistry()->getByName(ET_TBLASTX)->getPath().isEmpty())){ + (AppContext::getExternalToolRegistry()->getById(BlastPlusSupport::ET_TBLASTX_ID)->getPath().isEmpty())){ needSetToolPath=true; - toolName=ET_TBLASTX; + toolId= BlastPlusSupport::ET_TBLASTX_ID; } if(needSetToolPath){ - msgBox->setText(tr("Path for <i>BLAST+ %1</i> tool not selected.").arg(toolName)); + msgBox->setText(tr("Path for <i>BLAST+ %1</i> tool not selected.").arg(AppContext::getExternalToolRegistry()->getById(toolId)->getName())); const int ret = msgBox->exec(); CHECK(!msgBox.isNull(), false); @@ -446,7 +451,7 @@ bool BlastPlusWithExtFileSpecifySupportRunDialog::checkToolPath(){ assert(false); break; } - if(!AppContext::getExternalToolRegistry()->getByName(toolName)->getPath().isEmpty()){ + if(!AppContext::getExternalToolRegistry()->getById(toolId)->getPath().isEmpty()){ return true; }else{ return false; diff --git a/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupportRunDialog.h b/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupportRunDialog.h index 177d85ba9bac6f20fbf2a8a41226279d52b2e2d5..9aedd5152683f74c0d40df424bf35de16863fe9c 100644 --- a/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupportRunDialog.h +++ b/src/plugins/external_tool_support/src/blast_plus/BlastPlusSupportRunDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/blast_plus/BlastPlusWorker.cpp b/src/plugins/external_tool_support/src/blast_plus/BlastPlusWorker.cpp index 0f5db11e45809f201eeb404eb6bc63b1a9c227cb..df9a41a68bf4fc6d3277c4014d01fcfc188b2d88 100644 --- a/src/plugins/external_tool_support/src/blast_plus/BlastPlusWorker.cpp +++ b/src/plugins/external_tool_support/src/blast_plus/BlastPlusWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -294,15 +294,15 @@ Task* BlastPlusWorker::tick() { QString path = actor->getParameter(BLASTPLUS_EXT_TOOL_PATH)->getAttributeValue<QString>(context); if(QString::compare(path, "default", Qt::CaseInsensitive) != 0){ if(cfg.programName == "blastn"){ - AppContext::getExternalToolRegistry()->getByName(ET_BLASTN)->setPath(path); + AppContext::getExternalToolRegistry()->getById(BlastPlusSupport::ET_TBLASTN_ID)->setPath(path); }else if(cfg.programName == "blastp"){ - AppContext::getExternalToolRegistry()->getByName(ET_BLASTP)->setPath(path); + AppContext::getExternalToolRegistry()->getById(BlastPlusSupport::ET_BLASTP_ID)->setPath(path); }else if(cfg.programName == "blastx"){ - AppContext::getExternalToolRegistry()->getByName(ET_BLASTX)->setPath(path); + AppContext::getExternalToolRegistry()->getById(BlastPlusSupport::ET_BLASTX_ID)->setPath(path); }else if(cfg.programName == "tblastn"){ - AppContext::getExternalToolRegistry()->getByName(ET_TBLASTN)->setPath(path); + AppContext::getExternalToolRegistry()->getById(BlastPlusSupport::ET_TBLASTN_ID)->setPath(path); }else if(cfg.programName == "tblastx"){ - AppContext::getExternalToolRegistry()->getByName(ET_TBLASTX)->setPath(path); + AppContext::getExternalToolRegistry()->getById(BlastPlusSupport::ET_TBLASTX)->setPath(path); } } path = actor->getParameter(BLASTPLUS_TMP_DIR_PATH)->getAttributeValue<QString>(context); @@ -376,20 +376,22 @@ Task* BlastPlusWorker::tick() { cfg.matchReward = matchScores.split(" ").at(0).toInt(); cfg.mismatchPenalty = matchScores.split(" ").at(1).toInt(); - Task * t=NULL; - if(cfg.programName == "blastn"){ - t = new BlastNPlusSupportTask(cfg); - }else if(cfg.programName == "blastp"){ - t = new BlastPPlusSupportTask(cfg); - }else if(cfg.programName == "blastx"){ - t = new BlastXPlusSupportTask(cfg); - }else if(cfg.programName == "tblastn"){ - t = new TBlastNPlusSupportTask(cfg); - }else if(cfg.programName == "tblastx"){ - t = new TBlastXPlusSupportTask(cfg); + ExternalToolSupportTask *task = nullptr; + if (cfg.programName == "blastn") { + task = new BlastNPlusSupportTask(cfg); + } else if (cfg.programName == "blastp") { + task = new BlastPPlusSupportTask(cfg); + } else if (cfg.programName == "blastx") { + task = new BlastXPlusSupportTask(cfg); + } else if (cfg.programName == "tblastn") { + task = new TBlastNPlusSupportTask(cfg); + } else if (cfg.programName == "tblastx") { + task = new TBlastXPlusSupportTask(cfg); } - connect(t, SIGNAL(si_stateChanged()), SLOT(sl_taskFinished())); - return t; + SAFE_POINT(nullptr != task, QString("An unknown program name: %1").arg(cfg.programName), new FailTask(QString("An unknown program name: %1").arg(cfg.programName))); + task->addListeners(createLogListeners()); + connect(task, SIGNAL(si_stateChanged()), SLOT(sl_taskFinished())); + return task; } else if (input->isEnded()) { setDone(); output->setEnded(); @@ -439,8 +441,8 @@ bool ToolsValidator::validate(const Actor *actor, NotificationsList ¬ificatio } ExternalTool * ToolsValidator::getTool(const QString &program) const { - QString toolId = BlastPlusSupportCommonTask::toolNameByProgram(program); - return AppContext::getExternalToolRegistry()->getByName(toolId); + QString toolId = BlastPlusSupportCommonTask::toolIdByProgram(program); + return AppContext::getExternalToolRegistry()->getById(toolId); } } //namespace LocalWorkflow diff --git a/src/plugins/external_tool_support/src/blast_plus/BlastPlusWorker.h b/src/plugins/external_tool_support/src/blast_plus/BlastPlusWorker.h index da27ab5775ca443d363b489cff26b3b7a5244614..2c9ced58abf481e462398aad778bae64db5fa01c 100644 --- a/src/plugins/external_tool_support/src/blast_plus/BlastPlusWorker.h +++ b/src/plugins/external_tool_support/src/blast_plus/BlastPlusWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/blast_plus/BlastXPlusSupportTask.cpp b/src/plugins/external_tool_support/src/blast_plus/BlastXPlusSupportTask.cpp index 175e20546b4c8ed97ce810f1a7414ce91415c8b3..405171e400fab737a2c62964721cae5986d1d0cf 100644 --- a/src/plugins/external_tool_support/src/blast_plus/BlastXPlusSupportTask.cpp +++ b/src/plugins/external_tool_support/src/blast_plus/BlastXPlusSupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -115,7 +115,7 @@ ExternalToolRunTask* BlastXPlusSupportTask::createBlastPlusTask(){ algoLog.trace("BlastX+ arguments: "+arguments.join(" ")); QString workingDirectory = QFileInfo(url).absolutePath(); - ExternalToolRunTask* runTask = new ExternalToolRunTask(ET_BLASTX, arguments, new ExternalToolLogParser(), workingDirectory); + ExternalToolRunTask* runTask = new ExternalToolRunTask(BlastPlusSupport::ET_BLASTX_ID, arguments, new ExternalToolLogParser(), workingDirectory); setListenerForTask(runTask); return runTask; } diff --git a/src/plugins/external_tool_support/src/blast_plus/BlastXPlusSupportTask.h b/src/plugins/external_tool_support/src/blast_plus/BlastXPlusSupportTask.h index fca964e518d2c8325fa48069dbb91eaade1e6e95..cefed2e8d7c9142b42454022aaed59520b5c77ac 100644 --- a/src/plugins/external_tool_support/src/blast_plus/BlastXPlusSupportTask.h +++ b/src/plugins/external_tool_support/src/blast_plus/BlastXPlusSupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/blast_plus/RPSBlastSupportTask.cpp b/src/plugins/external_tool_support/src/blast_plus/RPSBlastSupportTask.cpp index 065b12dca96ca8ab5d1e3f7bae4d9d22c29b52c3..715a9738353126cc367496b7e51854fc9af2b09f 100644 --- a/src/plugins/external_tool_support/src/blast_plus/RPSBlastSupportTask.cpp +++ b/src/plugins/external_tool_support/src/blast_plus/RPSBlastSupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ ExternalToolRunTask* RPSBlastSupportTask::createBlastPlusTask() { algoLog.trace("RPSBlast arguments: "+arguments.join(" ")); QString workingDirectory = QFileInfo(url).absolutePath(); - ExternalToolRunTask* runTask = new ExternalToolRunTask(ET_RPSBLAST, arguments, new ExternalToolLogParser(), workingDirectory); + ExternalToolRunTask* runTask = new ExternalToolRunTask(BlastPlusSupport::ET_RPSBLAST_ID, arguments, new ExternalToolLogParser(), workingDirectory); setListenerForTask(runTask); return runTask; } diff --git a/src/plugins/external_tool_support/src/blast_plus/RPSBlastSupportTask.h b/src/plugins/external_tool_support/src/blast_plus/RPSBlastSupportTask.h index 2f078a4d58c1fce5f7c763995fb5dc249cc03287..7e7a0cc7785997d7ed36099f62c1aeec99cfdb63 100644 --- a/src/plugins/external_tool_support/src/blast_plus/RPSBlastSupportTask.h +++ b/src/plugins/external_tool_support/src/blast_plus/RPSBlastSupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/blast_plus/TBlastNPlusSupportTask.cpp b/src/plugins/external_tool_support/src/blast_plus/TBlastNPlusSupportTask.cpp index 126614f130132ca6e96eb11b27bde0d1b386d0b4..ccb0621448510550bdfd162225aa36fd3b9de86d 100644 --- a/src/plugins/external_tool_support/src/blast_plus/TBlastNPlusSupportTask.cpp +++ b/src/plugins/external_tool_support/src/blast_plus/TBlastNPlusSupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -106,7 +106,7 @@ ExternalToolRunTask* TBlastNPlusSupportTask::createBlastPlusTask(){ algoLog.trace("TBlastN+ arguments: "+arguments.join(" ")); QString workingDirectory = QFileInfo(url).absolutePath(); - ExternalToolRunTask* runTask = new ExternalToolRunTask(ET_TBLASTN, arguments, new ExternalToolLogParser(), workingDirectory); + ExternalToolRunTask* runTask = new ExternalToolRunTask(BlastPlusSupport::ET_TBLASTN_ID, arguments, new ExternalToolLogParser(), workingDirectory); setListenerForTask(runTask); return runTask; } diff --git a/src/plugins/external_tool_support/src/blast_plus/TBlastNPlusSupportTask.h b/src/plugins/external_tool_support/src/blast_plus/TBlastNPlusSupportTask.h index 8616ebab94933e9dbb2dacb8185ad20f92dacce3..e9a1aaa7a7d5878d6281af8c8a694e49b13baf73 100644 --- a/src/plugins/external_tool_support/src/blast_plus/TBlastNPlusSupportTask.h +++ b/src/plugins/external_tool_support/src/blast_plus/TBlastNPlusSupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/blast_plus/TBlastXPlusSupportTask.cpp b/src/plugins/external_tool_support/src/blast_plus/TBlastXPlusSupportTask.cpp index e1ecb42f59ba54264d0e0ea8a0f61d4bb299d45b..41ee241711bb851a226f81f9fbdaaf17715e192f 100644 --- a/src/plugins/external_tool_support/src/blast_plus/TBlastXPlusSupportTask.cpp +++ b/src/plugins/external_tool_support/src/blast_plus/TBlastXPlusSupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -93,7 +93,7 @@ ExternalToolRunTask* TBlastXPlusSupportTask::createBlastPlusTask(){ algoLog.trace("TBlastX+ arguments: "+arguments.join(" ")); QString workingDirectory=QFileInfo(url).absolutePath(); - ExternalToolRunTask* runTask = new ExternalToolRunTask(ET_TBLASTX, arguments, new ExternalToolLogParser(), workingDirectory); + ExternalToolRunTask* runTask = new ExternalToolRunTask(BlastPlusSupport::ET_TBLASTX_ID, arguments, new ExternalToolLogParser(), workingDirectory); setListenerForTask(runTask); return runTask; } diff --git a/src/plugins/external_tool_support/src/blast_plus/TBlastXPlusSupportTask.h b/src/plugins/external_tool_support/src/blast_plus/TBlastXPlusSupportTask.h index 25485839451822a46f09019703a40f6b7a8e1c79..c4f585bb8f130a288ab9e91d09a5d7df8017c441 100644 --- a/src/plugins/external_tool_support/src/blast_plus/TBlastXPlusSupportTask.h +++ b/src/plugins/external_tool_support/src/blast_plus/TBlastXPlusSupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/BlastReadsSubTask.cpp b/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/BlastReadsSubTask.cpp index 62a1f6e5ae477f49edd844141e292d5b977251ec..7082ecbf41b233e3dcf5f3034b345c7c14091891 100644 --- a/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/BlastReadsSubTask.cpp +++ b/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/BlastReadsSubTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -264,6 +264,7 @@ BlastNPlusSupportTask *BlastAndSwReadTask::getBlastTask() { settings.outputResFile = GUrlUtils::prepareTmpFileLocation(blastResultDir, "read_sequence", "gb", stateInfo); settings.outputType = 5; + settings.strandSource = BlastTaskSettings::HitFrame; return new BlastNPlusSupportTask(settings); } diff --git a/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/BlastReadsSubTask.h b/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/BlastReadsSubTask.h index 71fbaae2abf956d085f7d6d8f2a8f6a2d4cc81fd..d008f0c0bb03bfa76d0887fbcb62a28a7ba01014 100644 --- a/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/BlastReadsSubTask.h +++ b/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/BlastReadsSubTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/ComposeResultSubTask.cpp b/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/ComposeResultSubTask.cpp index 4f5b72cb48b5638912a6303fe03ce223e3035f75..0a5c75b970eef9188063822a566da46224e4928a 100644 --- a/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/ComposeResultSubTask.cpp +++ b/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/ComposeResultSubTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/ComposeResultSubTask.h b/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/ComposeResultSubTask.h index ccb4bd887556b93b163d9dabc49cc451e0eba464..884eb6ce1abd4d5feec4734fbe83827c16a6fc70 100644 --- a/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/ComposeResultSubTask.h +++ b/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/ComposeResultSubTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/FormatDBSubTask.cpp b/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/FormatDBSubTask.cpp index a7ada3c206543011acf1e079952c4bc5d3186364..3619ef6eee42b1689b47a36addb7d6c4ca8d3afa 100644 --- a/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/FormatDBSubTask.cpp +++ b/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/FormatDBSubTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -71,7 +71,7 @@ void FormatDBSubTask::prepare() { settings.outputPath = workingDir + QFileInfo(referenceUrl).completeBaseName(); CHECK_OP(stateInfo, ); - FormatDBSupportTask* formatTask = new FormatDBSupportTask(ET_MAKEBLASTDB, settings); + FormatDBSupportTask* formatTask = new FormatDBSupportTask(FormatDBSupport::ET_MAKEBLASTDB_ID, settings); addSubTask(formatTask); databaseNameAndPath = settings.outputPath; diff --git a/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/FormatDBSubTask.h b/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/FormatDBSubTask.h index ff40304b6107c631fa837d3b6f9c38ca68c32493..3eaa10658cf660dcde931952bb75a61652390a99 100644 --- a/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/FormatDBSubTask.h +++ b/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/FormatDBSubTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/PrepareReferenceSequenceTask.cpp b/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/PrepareReferenceSequenceTask.cpp index 6f72ab9e62fb91a16f3ee08d59522c40e25b1d42..8cfa32f8aed4f663e25d33ddd558f82236da7fd8 100644 --- a/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/PrepareReferenceSequenceTask.cpp +++ b/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/PrepareReferenceSequenceTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -99,7 +99,8 @@ QList<Task *> PrepareReferenceSequenceTask::onSubTaskFinished(Task *subTask) { DocumentFormat *fastaFormat = AppContext::getDocumentFormatRegistry()->getFormatById(BaseDocumentFormats::FASTA); IOAdapterFactory *ioAdapterFactory = AppContext::getIOAdapterRegistry()->getIOAdapterFactoryById(IOAdapterUtils::url2io(doc->getURL())); - Document *fastaDoc = doc->getSimpleCopy(fastaFormat, ioAdapterFactory, doc->getURL()); + preparedReferenceUrl = GUrlUtils::rollFileName(doc->getURL().getURLString(), "_"); // we roll the URL here because there was a strange problem when UGENE couldn't overwrite the file (UTI-242) + Document *fastaDoc = doc->getSimpleCopy(fastaFormat, ioAdapterFactory, preparedReferenceUrl); SaveDocumentTask* saveTask = new SaveDocumentTask(fastaDoc, SaveDoc_Overwrite | SaveDoc_DestroyButDontUnload); newSubTasks << saveTask; } diff --git a/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/PrepareReferenceSequenceTask.h b/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/PrepareReferenceSequenceTask.h index d5ca68f79cc69e5923098734e7f415f29e712712..1eebe15d74366c90509d06a0a90bb554a6a87426 100644 --- a/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/PrepareReferenceSequenceTask.h +++ b/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/PrepareReferenceSequenceTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/RemoveGapsFromSequenceTask.cpp b/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/RemoveGapsFromSequenceTask.cpp index 26dbe9fe69cfd83ac74c6c328f8e32c868a88a94..2fcf6eb637de48547e36b599f592abe3339c8a5a 100644 --- a/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/RemoveGapsFromSequenceTask.cpp +++ b/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/RemoveGapsFromSequenceTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/RemoveGapsFromSequenceTask.h b/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/RemoveGapsFromSequenceTask.h index c06c954a7a0941a61d94a927f0897760bc52f301..d7962e541c2d9d628c766cd5013d1e5cde676ae5 100644 --- a/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/RemoveGapsFromSequenceTask.h +++ b/src/plugins/external_tool_support/src/blast_plus/align_worker_subtasks/RemoveGapsFromSequenceTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/bowtie/BowtieSettingsWidget.cpp b/src/plugins/external_tool_support/src/bowtie/BowtieSettingsWidget.cpp index 9a3cc0743b4c7aec6b24082140a381e412943827..3e09b89540428f4d461d06cd0633863ea07259c0 100644 --- a/src/plugins/external_tool_support/src/bowtie/BowtieSettingsWidget.cpp +++ b/src/plugins/external_tool_support/src/bowtie/BowtieSettingsWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -51,7 +51,7 @@ BowtieSettingsWidget::BowtieSettingsWidget(QWidget *parent): indexSuffixes << BowtieTask::indexSuffixes; indexSuffixes << BowtieTask::largeIndexSuffixes; - requiredExtToolNames << ET_BOWTIE << ET_BOWTIE_BUILD; + requiredExtToolIds << BowtieSupport::ET_BOWTIE_ID << BowtieSupport::ET_BOWTIE_BUILD_ID; } QMap<QString,QVariant> BowtieSettingsWidget::getDnaAssemblyCustomSettings() const { diff --git a/src/plugins/external_tool_support/src/bowtie/BowtieSettingsWidget.h b/src/plugins/external_tool_support/src/bowtie/BowtieSettingsWidget.h index 8514611e35d475b9fd2021d69c1ffaca5ecd0761..c4cea91127084787774e335264b396e1762a281a 100644 --- a/src/plugins/external_tool_support/src/bowtie/BowtieSettingsWidget.h +++ b/src/plugins/external_tool_support/src/bowtie/BowtieSettingsWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/bowtie/BowtieSupport.cpp b/src/plugins/external_tool_support/src/bowtie/BowtieSupport.cpp index 2f3aa6c6ba6564235defcf897135d94f0925840a..444b0206429cba75800eaef6229bbb248590d0e3 100644 --- a/src/plugins/external_tool_support/src/bowtie/BowtieSupport.cpp +++ b/src/plugins/external_tool_support/src/bowtie/BowtieSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,9 +26,13 @@ namespace U2 { // BowtieSupport +const QString BowtieSupport::ET_BOWTIE = "Bowtie aligner"; +const QString BowtieSupport::ET_BOWTIE_ID = "USUPP_BOWTIE"; +const QString BowtieSupport::ET_BOWTIE_BUILD = "Bowtie build indexer"; +const QString BowtieSupport::ET_BOWTIE_BUILD_ID = "USUPP_BOWTIE_BUILD"; -BowtieSupport::BowtieSupport(const QString &name, const QString &path): - ExternalTool(name, path) +BowtieSupport::BowtieSupport(const QString& id, const QString &name, const QString &path): + ExternalTool(id, name, path) { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/cmdline.png"); diff --git a/src/plugins/external_tool_support/src/bowtie/BowtieSupport.h b/src/plugins/external_tool_support/src/bowtie/BowtieSupport.h index 11466b67a103db99a557cdccecd60f45e1110911..55273ef5e1b4e2c6f3c6d1011a0c14ef1f116448 100644 --- a/src/plugins/external_tool_support/src/bowtie/BowtieSupport.h +++ b/src/plugins/external_tool_support/src/bowtie/BowtieSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,13 +26,15 @@ namespace U2 { -#define ET_BOWTIE "Bowtie aligner" -#define ET_BOWTIE_BUILD "Bowtie build indexer" - class BowtieSupport : public ExternalTool { Q_OBJECT public: - BowtieSupport(const QString &name, const QString &path = ""); + BowtieSupport(const QString& id, const QString &name, const QString &path = ""); + + static const QString ET_BOWTIE; + static const QString ET_BOWTIE_BUILD; + static const QString ET_BOWTIE_BUILD_ID; + static const QString ET_BOWTIE_ID; }; } // namespace U2 diff --git a/src/plugins/external_tool_support/src/bowtie/BowtieTask.cpp b/src/plugins/external_tool_support/src/bowtie/BowtieTask.cpp index 773039be29d6f5d53b0d2ea5e90d54afb9e9ecbd..831f32cbc4fc3a1f306de19716f422ce382dcbef 100644 --- a/src/plugins/external_tool_support/src/bowtie/BowtieTask.cpp +++ b/src/plugins/external_tool_support/src/bowtie/BowtieTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -59,7 +59,7 @@ void BowtieBuildIndexTask::prepare() { arguments.append("--color"); } - ExternalToolRunTask *task = new ExternalToolRunTask(ET_BOWTIE_BUILD, arguments, new LogParser()); + ExternalToolRunTask *task = new ExternalToolRunTask(BowtieSupport::ET_BOWTIE_BUILD_ID, arguments, new LogParser()); setListenerForTask(task); addSubTask(task); } @@ -285,7 +285,7 @@ void BowtieAssembleTask::prepare() { } arguments.append(settings.resultFileName.getURLString()); logParser = new LogParser(); - ExternalToolRunTask *task = new ExternalToolRunTask(ET_BOWTIE, arguments, logParser, NULL); + ExternalToolRunTask *task = new ExternalToolRunTask(BowtieSupport::ET_BOWTIE_ID, arguments, logParser, NULL); setListenerForTask(task); addSubTask(task); } diff --git a/src/plugins/external_tool_support/src/bowtie/BowtieTask.h b/src/plugins/external_tool_support/src/bowtie/BowtieTask.h index 9af10a67976e5f0966be1cbdf2be21caac79fcdd..f895b3bf5f8897e5ca193f9cd7b8cf7142caab47 100644 --- a/src/plugins/external_tool_support/src/bowtie/BowtieTask.h +++ b/src/plugins/external_tool_support/src/bowtie/BowtieTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/bowtie/BowtieWorker.cpp b/src/plugins/external_tool_support/src/bowtie/BowtieWorker.cpp index 880a44ea90f249545b9d8f6da790d842e3605461..d80bf91b0836460b5a8ab043efe3efd9d7d3cede 100644 --- a/src/plugins/external_tool_support/src/bowtie/BowtieWorker.cpp +++ b/src/plugins/external_tool_support/src/bowtie/BowtieWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -260,7 +260,7 @@ void BowtieWorkerFactory::init() { proto->setPrompter(new ShortReadsAlignerPrompter()); proto->setEditor(new DelegateEditor(delegates)); proto->setPortValidator(IN_PORT_DESCR, new ShortReadsAlignerSlotsValidator); - proto->addExternalTool(ET_BOWTIE); + proto->addExternalTool(BowtieSupport::ET_BOWTIE_ID); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_NGS_MAP_ASSEMBLE_READS(), proto); WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID)->registerEntry(new BowtieWorkerFactory()); } diff --git a/src/plugins/external_tool_support/src/bowtie/BowtieWorker.h b/src/plugins/external_tool_support/src/bowtie/BowtieWorker.h index dff1c75260a82c2e3f80e49526b619cbc9afe717..706c559a93f62e13f465b302171842f6356e5982 100644 --- a/src/plugins/external_tool_support/src/bowtie/BowtieWorker.h +++ b/src/plugins/external_tool_support/src/bowtie/BowtieWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/bowtie/bowtie_tests/bowtieTests.cpp b/src/plugins/external_tool_support/src/bowtie/bowtie_tests/bowtieTests.cpp index 2c76b9657cca0133ffeee145b145c964f7529f30..c6bd9061a5c41b0f0edf2690ec7281c2337f7ddc 100644 --- a/src/plugins/external_tool_support/src/bowtie/bowtie_tests/bowtieTests.cpp +++ b/src/plugins/external_tool_support/src/bowtie/bowtie_tests/bowtieTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -270,7 +270,7 @@ void GTest_Bowtie::cleanup() { // delete index - if(!usePrebuildIndex) { + if(!hasError() && !usePrebuildIndex) { QString prefix = env->getVar("TEMP_DATA_DIR")+"/"+QString::number(getTaskId()); QStringList files(QStringList() << prefix+".1.ebwt" << prefix+".2.ebwt" << prefix+".3.ebwt" << prefix+".4.ebwt" << prefix+".rev.1.ebwt" << prefix+".rev.2.ebwt"); @@ -284,15 +284,12 @@ void GTest_Bowtie::cleanup() } //delete tmp result QFileInfo tmpResult(config.resultFileName.getURLString()); - if (tmpResult.exists()) { + if (!hasError() && tmpResult.exists()) { ioLog.trace(QString("Deleting tmp result file :%1").arg(tmpResult.absoluteFilePath())); QFile::remove(tmpResult.absoluteFilePath()); } -} -GTest_Bowtie::~GTest_Bowtie() -{ - cleanup(); + XmlTest::cleanup(); } QString GTest_Bowtie::getTempDataDir() diff --git a/src/plugins/external_tool_support/src/bowtie/bowtie_tests/bowtieTests.h b/src/plugins/external_tool_support/src/bowtie/bowtie_tests/bowtieTests.h index bff145a18bf6f3919d3d2b2474be008fc634ae0b..506c2624b6351f5da022d4ba9af536b558b5486f 100644 --- a/src/plugins/external_tool_support/src/bowtie/bowtie_tests/bowtieTests.h +++ b/src/plugins/external_tool_support/src/bowtie/bowtie_tests/bowtieTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -37,11 +37,11 @@ class BowtieGObjectTask; class DnaAssemblyMultiTask; class MultipleSequenceAlignmentObject; -class GTest_Bowtie : public GTest { +class GTest_Bowtie : public XmlTest { Q_OBJECT public: - SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_Bowtie, "bowtie", TaskFlag_FailOnSubtaskCancel); - ~GTest_Bowtie(); + SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_Bowtie, "bowtie", TaskFlag_FailOnSubtaskCancel) + void prepare(); void run(); Task::ReportResult report(); diff --git a/src/plugins/external_tool_support/src/bowtie2/Bowtie2SettingsWidget.cpp b/src/plugins/external_tool_support/src/bowtie2/Bowtie2SettingsWidget.cpp index 4588721d26ffeea7d722d31b8905ff6cfc060129..2285d166e5779a16a2fdc11b644cfce3d34a5d80 100644 --- a/src/plugins/external_tool_support/src/bowtie2/Bowtie2SettingsWidget.cpp +++ b/src/plugins/external_tool_support/src/bowtie2/Bowtie2SettingsWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -50,7 +50,7 @@ Bowtie2SettingsWidget::Bowtie2SettingsWidget(QWidget *parent): indexSuffixes << Bowtie2Task::indexSuffixes; indexSuffixes << Bowtie2Task::largeIndexSuffixes; - requiredExtToolNames << ET_BOWTIE2_ALIGN << ET_BOWTIE2_BUILD; + requiredExtToolIds << Bowtie2Support::ET_BOWTIE2_ALIGN_ID << Bowtie2Support::ET_BOWTIE2_BUILD_ID; } QMap<QString,QVariant> Bowtie2SettingsWidget::getDnaAssemblyCustomSettings() const { diff --git a/src/plugins/external_tool_support/src/bowtie2/Bowtie2SettingsWidget.h b/src/plugins/external_tool_support/src/bowtie2/Bowtie2SettingsWidget.h index 776de905e8bfa269ae65e1792b8f9248b5804ab0..d91e0651f3d46de677312a6b1a398f97b82282fb 100644 --- a/src/plugins/external_tool_support/src/bowtie2/Bowtie2SettingsWidget.h +++ b/src/plugins/external_tool_support/src/bowtie2/Bowtie2SettingsWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/bowtie2/Bowtie2Support.cpp b/src/plugins/external_tool_support/src/bowtie2/Bowtie2Support.cpp index a6c05c9191d84c05030f77a08e9df5d70d2366f6..e14afdb42bd8529e55b29f12be9ba9b193e61b24 100644 --- a/src/plugins/external_tool_support/src/bowtie2/Bowtie2Support.cpp +++ b/src/plugins/external_tool_support/src/bowtie2/Bowtie2Support.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,11 +25,21 @@ #include <U2Gui/MainWindow.h> +#include "perl/PerlSupport.h" +#include "python/PythonSupport.h" namespace U2 { -Bowtie2Support::Bowtie2Support(const QString& name, const QString& path /* = */ ) - : ExternalTool(name, path) +const QString Bowtie2Support::BOWTIE2_TMP_DIR = "bowtie2"; +const QString Bowtie2Support::ET_BOWTIE2_ALIGN = "Bowtie 2 aligner"; +const QString Bowtie2Support::ET_BOWTIE2_ALIGN_ID = "USUPP_BOWTIE2"; +const QString Bowtie2Support::ET_BOWTIE2_BUILD = "Bowtie 2 build indexer"; +const QString Bowtie2Support::ET_BOWTIE2_BUILD_ID = "USUPP_BOWTIE2_BUILD"; +const QString Bowtie2Support::ET_BOWTIE2_INSPECT = "Bowtie 2 index inspector"; +const QString Bowtie2Support::ET_BOWTIE2_INSPECT_ID = "USUPP_BOWTIE2_INSPECT"; + +Bowtie2Support::Bowtie2Support(const QString& id, const QString& name, const QString& path /* = */ ) + : ExternalTool(id, name, path) { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/cmdline.png"); @@ -38,59 +48,38 @@ Bowtie2Support::Bowtie2Support(const QString& name, const QString& path /* = */ } toolKitName = "Bowtie2"; - versionRegExp=QRegExp("(\\d+\\.\\d+\\.\\d+)"); + versionRegExp = QRegExp("version (\\d+\\.\\d+\\.\\d+[.]{0,1}[\\d+]{0,1})"); - // Bowtie2-align - if (name == ET_BOWTIE2_ALIGN) { -#ifdef Q_OS_WIN - executableFileName = "bowtie2-align.exe"; -#else -#if defined(Q_OS_UNIX) - executableFileName = "bowtie2-align"; -#endif -#endif + if (id == ET_BOWTIE2_ALIGN_ID) { // Bowtie2-align + toolRunnerProgram = PerlSupport::ET_PERL_ID; + dependencies << PerlSupport::ET_PERL_ID; + executableFileName = "bowtie2"; validationArguments << "--help"; - validMessage = "bowtie2-align"; - description = Bowtie2Support::tr("<i>Bowtie 2 aligner</i> takes a Bowtie 2 index" - " and a set of sequencing read files and outputs a set of alignments."); - } - - - // Bowtie2-build - else if (name == ET_BOWTIE2_BUILD) { -#ifdef Q_OS_WIN - executableFileName = "bowtie2-build.exe"; -#else -#if defined(Q_OS_UNIX) + validMessage = "bowtie2"; + description = tr("<i>Bowtie 2 aligner</i> takes a Bowtie 2 index" + " and a set of sequencing read files and outputs a set of alignments."); + } else if (id == ET_BOWTIE2_BUILD_ID) { // Bowtie2-build + toolRunnerProgram = PythonSupport::ET_PYTHON_ID; + dependencies << PythonSupport::ET_PYTHON_ID; executableFileName = "bowtie2-build"; -#endif -#endif - validationArguments << "--help"; + validationArguments << "--version"; validMessage = "bowtie2-build"; - description = Bowtie2Support::tr("<i>Bowtie 2 build indexer</i> " - " builds a Bowtie index from a set of DNA sequences. It outputs" - " a set of 6 files with suffixes .1.bt2, .2.bt2, .3.bt2, .4.bt2," - " .rev.1.bt2, and .rev.2.bt2. These files together constitute the index:" - " they are all that is needed to align reads to that reference." - " The original sequence files are no longer used by <i>Bowtie 2</i>" - " once the index is built."); - } - - - // Bowtie2-inspect - else if (name == ET_BOWTIE2_INSPECT) { -#ifdef Q_OS_WIN - executableFileName = "bowtie2-inspect.exe"; -#else -#if defined(Q_OS_UNIX) + description = tr("<i>Bowtie 2 build indexer</i> " + " builds a Bowtie index from a set of DNA sequences. It outputs" + " a set of 6 files with suffixes .1.bt2, .2.bt2, .3.bt2, .4.bt2," + " .rev.1.bt2, and .rev.2.bt2. These files together constitute the index:" + " they are all that is needed to align reads to that reference." + " The original sequence files are no longer used by <i>Bowtie 2</i>" + " once the index is built."); + } else if (id == ET_BOWTIE2_INSPECT_ID) { // Bowtie2-inspect + toolRunnerProgram = PythonSupport::ET_PYTHON_ID; + dependencies << PythonSupport::ET_PYTHON_ID; executableFileName = "bowtie2-inspect"; -#endif -#endif - validationArguments << "--help"; + validationArguments << "--version"; validMessage = "bowtie2-inspect"; - description = Bowtie2Support::tr("<i>Bowtie 2 index inspector</i>" - " extracts information from a Bowtie index about what kind" - " of index it is and what reference sequence were used to build it."); + description = tr("<i>Bowtie 2 index inspector</i>" + " extracts information from a Bowtie index about what kind" + " of index it is and what reference sequence were used to build it."); } } diff --git a/src/plugins/external_tool_support/src/bowtie2/Bowtie2Support.h b/src/plugins/external_tool_support/src/bowtie2/Bowtie2Support.h index 8c8e1782a06a5ce3f25f06ca44245b545594f8d3..06f591079a1525ad7191e0f212876ae424f4b116 100644 --- a/src/plugins/external_tool_support/src/bowtie2/Bowtie2Support.h +++ b/src/plugins/external_tool_support/src/bowtie2/Bowtie2Support.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,20 +24,21 @@ #include <U2Core/ExternalToolRegistry.h> -#define ET_BOWTIE2_ALIGN "Bowtie 2 aligner" -#define ET_BOWTIE2_BUILD "Bowtie 2 build indexer" -#define ET_BOWTIE2_INSPECT "Bowtie 2 index inspector" - -#define BOWTIE2_TMP_DIR "bowtie2" - namespace U2 { -class Bowtie2Support : public ExternalTool -{ +class Bowtie2Support : public ExternalTool { Q_OBJECT - public: - Bowtie2Support(const QString& name, const QString& path = ""); + Bowtie2Support(const QString& id, const QString& name, const QString& path = ""); + + static const QString ET_BOWTIE2_ALIGN; + static const QString ET_BOWTIE2_ALIGN_ID; + static const QString ET_BOWTIE2_BUILD; + static const QString ET_BOWTIE2_BUILD_ID; + static const QString ET_BOWTIE2_INSPECT; + static const QString ET_BOWTIE2_INSPECT_ID; + + static const QString BOWTIE2_TMP_DIR; }; } // namespace U2 diff --git a/src/plugins/external_tool_support/src/bowtie2/Bowtie2Task.cpp b/src/plugins/external_tool_support/src/bowtie2/Bowtie2Task.cpp index 69bb6fef8434100dfd7928ece1ee9b0f3d91b4b0..971461faa7a68370e3c8b09e4eb928bccbd6a68f 100644 --- a/src/plugins/external_tool_support/src/bowtie2/Bowtie2Task.cpp +++ b/src/plugins/external_tool_support/src/bowtie2/Bowtie2Task.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -52,7 +52,7 @@ void Bowtie2BuildIndexTask::prepare() { arguments.append(referencePath); arguments.append(indexPath); - ExternalToolRunTask *task = new ExternalToolRunTask(ET_BOWTIE2_BUILD, arguments, new ExternalToolLogParser()); + ExternalToolRunTask *task = new ExternalToolRunTask(Bowtie2Support::ET_BOWTIE2_BUILD_ID, arguments, new ExternalToolLogParser()); setListenerForTask(task); addSubTask(task); } @@ -153,7 +153,9 @@ void Bowtie2AlignTask::prepare() { return; } + arguments.append("-x"); arguments.append(settings.indexFileName); + { // we assume that all datasets have same library type ShortReadSet::LibraryType libType = settings.shortReadSets.at(0).type; @@ -194,7 +196,7 @@ void Bowtie2AlignTask::prepare() { arguments.append("-S"); arguments.append(settings.resultFileName.getURLString()); - ExternalToolRunTask *task = new ExternalToolRunTask(ET_BOWTIE2_ALIGN, arguments, new ExternalToolLogParser()); + ExternalToolRunTask *task = new ExternalToolRunTask(Bowtie2Support::ET_BOWTIE2_ALIGN_ID, arguments, new ExternalToolLogParser()); setListenerForTask(task); addSubTask(task); } diff --git a/src/plugins/external_tool_support/src/bowtie2/Bowtie2Task.h b/src/plugins/external_tool_support/src/bowtie2/Bowtie2Task.h index 760d4d44fe726123e3ff9f85356640076ec6fb14..afbaabf8bd23d8b01f8c5a8095f03ac0ca61d700 100644 --- a/src/plugins/external_tool_support/src/bowtie2/Bowtie2Task.h +++ b/src/plugins/external_tool_support/src/bowtie2/Bowtie2Task.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/src/plugins/external_tool_support/src/bowtie2/Bowtie2Worker.cpp b/src/plugins/external_tool_support/src/bowtie2/Bowtie2Worker.cpp index 8a57a8b2e10257f12b2cc388abd69e348266211a..16ed7a2e5559eeebffa5778aca9d48c13d58180b 100644 --- a/src/plugins/external_tool_support/src/bowtie2/Bowtie2Worker.cpp +++ b/src/plugins/external_tool_support/src/bowtie2/Bowtie2Worker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,6 +32,9 @@ #include "Bowtie2Worker.h" #include "Bowtie2Task.h" +#include "perl/PerlSupport.h" +#include "python/PythonSupport.h" + namespace U2 { namespace LocalWorkflow { @@ -234,7 +237,9 @@ void Bowtie2WorkerFactory::init() { proto->setPrompter(new ShortReadsAlignerPrompter()); proto->setEditor(new DelegateEditor(delegates)); proto->setPortValidator(IN_PORT_DESCR, new ShortReadsAlignerSlotsValidator()); - proto->addExternalTool(ET_BOWTIE2_ALIGN); + proto->addExternalTool(Bowtie2Support::ET_BOWTIE2_ALIGN_ID); + proto->addExternalTool(PythonSupport::ET_PYTHON_ID); + proto->addExternalTool(PerlSupport::ET_PERL_ID); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_NGS_MAP_ASSEMBLE_READS(), proto); WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID)->registerEntry(new Bowtie2WorkerFactory()); } diff --git a/src/plugins/external_tool_support/src/bowtie2/Bowtie2Worker.h b/src/plugins/external_tool_support/src/bowtie2/Bowtie2Worker.h index 8eed329ac9677859bcd33fe00b588ceb6027675e..468b9a0719cc95b756e727381e251654d6d70dfb 100644 --- a/src/plugins/external_tool_support/src/bowtie2/Bowtie2Worker.h +++ b/src/plugins/external_tool_support/src/bowtie2/Bowtie2Worker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/bowtie2/bowtie2_tests/Bowtie2Tests.cpp b/src/plugins/external_tool_support/src/bowtie2/bowtie2_tests/Bowtie2Tests.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fc0d7e6142faa695e7cc7c257a3ba465b3ea52e4 --- /dev/null +++ b/src/plugins/external_tool_support/src/bowtie2/bowtie2_tests/Bowtie2Tests.cpp @@ -0,0 +1,81 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "Bowtie2Tests.h" + +#include <U2Formats/BAMUtils.h> + +namespace U2 { + +#define FILE1_ATTR "file1" +#define FILE2_ATTR "file2" +#define FILE3_ATTR "file3" +#define IS_BAM_ATTR "isbam" + +void GTest_Bowtie2::init(XMLTestFormat *tf, const QDomElement& el) { + Q_UNUSED(tf); + + file1Url = el.attribute(FILE1_ATTR); + if (file1Url.isEmpty()) { + failMissingValue(FILE1_ATTR); + return; + } + file1Url = env->getVar("TEMP_DATA_DIR") + "/" + file1Url; + + file2Url = el.attribute(FILE2_ATTR); + if (file2Url.isEmpty()) { + failMissingValue(FILE2_ATTR); + return; + } + file2Url = env->getVar("COMMON_DATA_DIR") + "/" + file2Url; + + file3Url = el.attribute(FILE3_ATTR); + if (file3Url.isEmpty()) { + failMissingValue(FILE3_ATTR); + return; + } + file3Url = env->getVar("COMMON_DATA_DIR") + "/" + file3Url; + + QString isBamAtr = el.attribute(IS_BAM_ATTR); + if (!isBamAtr.isEmpty()) { + isBam = true; + }else{ + isBam = false; + } +} + +Task::ReportResult GTest_Bowtie2::report() { + bool res = BAMUtils::isEqualByLength(file1Url, file2Url, stateInfo, isBam); + if (!res) { + stateInfo.setError(""); + BAMUtils::isEqualByLength(file1Url, file3Url, stateInfo, isBam); + } + + return ReportResult_Finished; +} + +QList<XMLTestFactory*> Bowtie2Tests::createTestFactories() { + QList<XMLTestFactory*> res; + res.append(GTest_Bowtie2::createFactory()); + return res; +} +} + diff --git a/src/plugins/external_tool_support/src/bowtie2/bowtie2_tests/Bowtie2Tests.h b/src/plugins/external_tool_support/src/bowtie2/bowtie2_tests/Bowtie2Tests.h new file mode 100644 index 0000000000000000000000000000000000000000..a349cf7bc414bb1c667ed28f6e37151ffdd326d4 --- /dev/null +++ b/src/plugins/external_tool_support/src/bowtie2/bowtie2_tests/Bowtie2Tests.h @@ -0,0 +1,51 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_BOWTIE2_TESTS_H_ +#define _U2_BOWTIE2_TESTS_H_ + +#include <QDomElement> + +#include <U2Core/GObject.h> + +#include <U2Test/XMLTestUtils.h> + +namespace U2 { + +class GTest_Bowtie2 : public XmlTest { + Q_OBJECT +public: + SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_Bowtie2, "compare-two-sams-by-length"); + + ReportResult report(); + QString file1Url; + QString file2Url; + QString file3Url; + bool isBam; +}; + +class Bowtie2Tests { +public: + static QList<XMLTestFactory*> createTestFactories(); +}; +} //namespace U2 + +#endif //_U2_BOWTIE2_TESTS_H_ diff --git a/src/plugins/external_tool_support/src/bwa/BwaMemWorker.cpp b/src/plugins/external_tool_support/src/bwa/BwaMemWorker.cpp index 1b7c2286b44a927783226debad43d18ca3f22234..1cc77640cb2c5756141a558062ee856e34888e0f 100644 --- a/src/plugins/external_tool_support/src/bwa/BwaMemWorker.cpp +++ b/src/plugins/external_tool_support/src/bwa/BwaMemWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -285,7 +285,7 @@ void BwaMemWorkerFactory::init() { proto->setPrompter(new ShortReadsAlignerPrompter()); proto->setEditor(new DelegateEditor(delegates)); proto->setPortValidator(IN_PORT_DESCR, new ShortReadsAlignerSlotsValidator()); - proto->addExternalTool(ET_BWA); + proto->addExternalTool(BwaSupport::ET_BWA_ID); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_NGS_MAP_ASSEMBLE_READS(), proto); WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID)->registerEntry(new BwaMemWorkerFactory()); } diff --git a/src/plugins/external_tool_support/src/bwa/BwaMemWorker.h b/src/plugins/external_tool_support/src/bwa/BwaMemWorker.h index d56d7e9158d7e3a81a845cdd8b914dc8141b40d6..a4511fb42f6313a2dc32d4479c83d49c5080b3de 100644 --- a/src/plugins/external_tool_support/src/bwa/BwaMemWorker.h +++ b/src/plugins/external_tool_support/src/bwa/BwaMemWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/bwa/BwaSettingsWidget.cpp b/src/plugins/external_tool_support/src/bwa/BwaSettingsWidget.cpp index 750f5a5fcda2fb3f5fbd3577471423dc3ee29e11..0a6e218f492c632247dbbe8962800624926370bc 100644 --- a/src/plugins/external_tool_support/src/bwa/BwaSettingsWidget.cpp +++ b/src/plugins/external_tool_support/src/bwa/BwaSettingsWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -37,17 +37,8 @@ const QString STYLE_SHEET_FONT_WEIGHT_ATTRIBUTE = "font-weight"; const QString INFO_MESSAGE_FONT = "bold"; const QString STYLE_SHEET_ATTRIBUTE_EQUALS_SIGN = ": "; const QString STYLE_SHEET_ATTRIBUTES_SEPARATOR = ";"; -const QString IS_BUILD_INDEX_ALGO_WARNING = QObject::tr( "NOTE: \"is\" index algorithm " - "is not supposed to work with reference sequences having size larger than 2 GB. In order " - "to achieve stable BWA performance it is strongly recommend to set the index algorithm to " - "\"bwtsw\"" ); -const QString BWTSW_BUILD_INDEX_ALGO_WARNING = QObject::tr( "NOTE: \"bwtsw\" index algorithm" - " is not supposed to work with reference sequences having size smaller than 10 MB.\nIn order " - "to achieve stable BWA performance it is strongly recommend to set the index algorithm to " - "\"is\"" ); - -void setStylesheetAttributeValue( const QString &attributeName, const QString &attributeValue, +static void setStylesheetAttributeValue( const QString &attributeName, const QString &attributeValue, QString &stylesheet ) { int attributeDescriptionStart = stylesheet.indexOf( attributeName ); @@ -87,11 +78,17 @@ void BwaIndexAlgorithmWarningReporter::sl_IndexAlgorithmChanged( int index ) { QString infoText = QString( ); if ( 3 == index ) { if ( MAX_REFERENCE_SIZE_FOR_IS_METHOD < referenceSequenceFile.size( ) ) { - infoText = IS_BUILD_INDEX_ALGO_WARNING; + infoText = tr( "NOTE: \"is\" index algorithm " + "is not supposed to work with reference sequences having size larger than 2 GB. In order " + "to achieve stable BWA performance it is strongly recommend to set the index algorithm to " + "\"bwtsw\"" ); } } else if ( 1 == index ) { if ( MIN_REFERENCE_SIZE_FOR_BWTSW_METHOD > referenceSequenceFile.size( ) ) { - infoText = BWTSW_BUILD_INDEX_ALGO_WARNING; + infoText = tr( "NOTE: \"bwtsw\" index algorithm" + " is not supposed to work with reference sequences having size smaller than 10 MB.\nIn order " + "to achieve stable BWA performance it is strongly recommend to set the index algorithm to " + "\"is\"" ); } } using namespace U2; @@ -126,7 +123,7 @@ BwaSettingsWidget::BwaSettingsWidget(QWidget *parent) warningReporter->setReportingLabel(infoLabel); connect(indexAlgorithmComboBox, SIGNAL(currentIndexChanged(int)), warningReporter, SLOT(sl_IndexAlgorithmChanged(int))); indexSuffixes << BwaTask::indexSuffixes; - requiredExtToolNames << ET_BWA; + requiredExtToolIds << BwaSupport::ET_BWA_ID; } QMap<QString,QVariant> BwaSettingsWidget::getDnaAssemblyCustomSettings() const { @@ -234,7 +231,7 @@ BwaSwSettingsWidget::BwaSwSettingsWidget(QWidget *parent): warningReporter->setReportingLabel(warningLabel); connect(indexAlgorithmComboBox, SIGNAL(currentIndexChanged(int)), warningReporter, SLOT(sl_IndexAlgorithmChanged(int))); - requiredExtToolNames << ET_BWA; + requiredExtToolIds << BwaSupport::ET_BWA_ID; } QMap<QString,QVariant> BwaSwSettingsWidget::getDnaAssemblyCustomSettings() const { @@ -301,7 +298,7 @@ BwaMemSettingsWidget::BwaMemSettingsWidget(QWidget *parent): warningReporter->setReportingLabel(warningLabel); connect(indexAlgorithmComboBox, SIGNAL(currentIndexChanged(int)), warningReporter, SLOT(sl_IndexAlgorithmChanged(int))); - requiredExtToolNames << ET_BWA; + requiredExtToolIds << BwaSupport::ET_BWA_ID; } QMap<QString,QVariant> BwaMemSettingsWidget::getDnaAssemblyCustomSettings() const { diff --git a/src/plugins/external_tool_support/src/bwa/BwaSettingsWidget.h b/src/plugins/external_tool_support/src/bwa/BwaSettingsWidget.h index a2f14eb950c502cacaafa6fe513466c08d6d486a..4f34f070c01796e76594e578a7441b8806953c29 100644 --- a/src/plugins/external_tool_support/src/bwa/BwaSettingsWidget.h +++ b/src/plugins/external_tool_support/src/bwa/BwaSettingsWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/bwa/BwaSupport.cpp b/src/plugins/external_tool_support/src/bwa/BwaSupport.cpp index 34029121073deca6fb5f18bb0a6122049c853e34..766cdbbee8150bd8ce42a58fa3dbc0d490440e50 100644 --- a/src/plugins/external_tool_support/src/bwa/BwaSupport.cpp +++ b/src/plugins/external_tool_support/src/bwa/BwaSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,10 +25,13 @@ namespace U2 { +const QString BwaSupport::ET_BWA = "BWA"; +const QString BwaSupport::ET_BWA_ID = "USUPP_BWA"; + // BwaSupport -BwaSupport::BwaSupport(const QString &name, const QString &path): - ExternalTool(name, path) +BwaSupport::BwaSupport(const QString& id, const QString& name, const QString &path): + ExternalTool(id, name, path) { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/cmdline.png"); diff --git a/src/plugins/external_tool_support/src/bwa/BwaSupport.h b/src/plugins/external_tool_support/src/bwa/BwaSupport.h index 7166930dec0119f4957262be02a99b52a566e6cc..95c2dd9c3817a0ee10df79e002fbba22e4a6e547 100644 --- a/src/plugins/external_tool_support/src/bwa/BwaSupport.h +++ b/src/plugins/external_tool_support/src/bwa/BwaSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,12 +26,13 @@ namespace U2 { -#define ET_BWA "BWA" - class BwaSupport : public ExternalTool { Q_OBJECT public: - BwaSupport(const QString &name, const QString &path = ""); + BwaSupport(const QString& id, const QString &name, const QString &path = ""); + + static const QString ET_BWA; + static const QString ET_BWA_ID; }; } // namespace U2 diff --git a/src/plugins/external_tool_support/src/bwa/BwaTask.cpp b/src/plugins/external_tool_support/src/bwa/BwaTask.cpp index 8f122a6dc27ea032fe289ae62cb6526ffdffe2ee..994af1262d268ae720c228009ceb1f54a50f93d0 100644 --- a/src/plugins/external_tool_support/src/bwa/BwaTask.cpp +++ b/src/plugins/external_tool_support/src/bwa/BwaTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -59,7 +59,7 @@ void BwaBuildIndexTask::prepare() { arguments.append("-p"); arguments.append(indexPath); arguments.append(referencePath); - ExternalToolRunTask *task = new ExternalToolRunTask(ET_BWA, arguments, new LogParser()); + ExternalToolRunTask *task = new ExternalToolRunTask(BwaSupport::ET_BWA_ID, arguments, new LogParser()); setListenerForTask(task); addSubTask(task); } @@ -193,7 +193,7 @@ void BwaAlignTask::prepare() { arguments.append( getSAIPath(currentReadSet.url.getURLString())); arguments.append(indexPath); arguments.append(currentReadSet.url.getURLString()); - ExternalToolRunTask* alignTask = new ExternalToolRunTask(ET_BWA, arguments, new LogParser(), NULL); + ExternalToolRunTask* alignTask = new ExternalToolRunTask(BwaSupport::ET_BWA_ID, arguments, new LogParser(), NULL); setListenerForTask(alignTask); alignTasks.append(alignTask); } @@ -234,7 +234,7 @@ QList<Task *> BwaAlignTask::onSubTaskFinished(Task *subTask) { arguments.append(getSAIPath(currentReadsSet.url.getURLString())); arguments.append(currentReadsSet.url.getURLString()); } - ExternalToolRunTask *task = new ExternalToolRunTask(ET_BWA, arguments, new LogParser(), NULL); + ExternalToolRunTask *task = new ExternalToolRunTask(BwaSupport::ET_BWA_ID, arguments, new LogParser(), NULL); setListenerForTask(task); samTasks.append(task); } @@ -405,7 +405,7 @@ void BwaMemAlignTask::prepare() { } arguments.append(upStreamList[pairedReadsCounter].url.getURLString()); arguments.append(downStreamList[pairedReadsCounter].url.getURLString()); - ExternalToolRunTask* alignTask = new ExternalToolRunTask(ET_BWA, arguments, new BwaAlignTask::LogParser(), NULL); + ExternalToolRunTask* alignTask = new ExternalToolRunTask(BwaSupport::ET_BWA_ID, arguments, new BwaAlignTask::LogParser(), NULL); if (upStreamList.size() == 1) { alignTask->setStandartOutputFile(settings.resultFileName.getURLString()); } else { @@ -417,7 +417,7 @@ void BwaMemAlignTask::prepare() { alignTasks.append(alignTask); } else if (settings.shortReadSets.size() > 1) { arguments.append(currentReadSet.url.getURLString()); - ExternalToolRunTask* alignTask = new ExternalToolRunTask(ET_BWA, arguments, new BwaAlignTask::LogParser(), NULL); + ExternalToolRunTask* alignTask = new ExternalToolRunTask(BwaSupport::ET_BWA_ID, arguments, new BwaAlignTask::LogParser(), NULL); QString resultFilePathWithpartNumber = settings.tmpDirPath + "/" + resultFileInfo.baseName() + "_" + QString::number(resultPartsCounter) + "." + resultFileInfo.completeSuffix(); alignTask->setStandartOutputFile(resultFilePathWithpartNumber); @@ -425,7 +425,7 @@ void BwaMemAlignTask::prepare() { alignTasks.append(alignTask); } else { arguments.append(currentReadSet.url.getURLString()); - ExternalToolRunTask* alignTask = new ExternalToolRunTask(ET_BWA, arguments, new BwaAlignTask::LogParser(), NULL); + ExternalToolRunTask* alignTask = new ExternalToolRunTask(BwaSupport::ET_BWA_ID, arguments, new BwaAlignTask::LogParser(), NULL); alignTask->setStandartOutputFile(settings.resultFileName.getURLString()); setListenerForTask(alignTask); alignTasks.append(alignTask); @@ -544,7 +544,7 @@ void BwaSwAlignTask::prepare() { arguments.append( readSet.url.getURLString() ); - Task* alignTask = new ExternalToolRunTask(ET_BWA, arguments, new BwaAlignTask::LogParser(), NULL); + Task* alignTask = new ExternalToolRunTask(BwaSupport::ET_BWA_ID, arguments, new BwaAlignTask::LogParser(), NULL); addSubTask(alignTask); } @@ -609,15 +609,15 @@ BwaTask::BwaTask(const DnaAssemblyToRefTaskSettings &settings, bool justBuildInd } void BwaTask::prepare() { + if (!justBuildIndex) { + setUpIndexBuilding(indexSuffixes); + } QString indexFileName = settings.indexFileName; + if (indexFileName.isEmpty()) { + indexFileName = settings.refSeqUrl.getURLString(); + } if (!settings.prebuiltIndex) { - if (!justBuildIndex) { - setUpIndexBuilding(indexSuffixes); - } - if (indexFileName.isEmpty()) { - indexFileName = settings.refSeqUrl.getURLString(); - } buildIndexTask = new BwaBuildIndexTask(settings.refSeqUrl.getURLString(), indexFileName, settings); buildIndexTask->addListeners(QList <ExternalToolListener*>() << getListener(0)); } diff --git a/src/plugins/external_tool_support/src/bwa/BwaTask.h b/src/plugins/external_tool_support/src/bwa/BwaTask.h index 136ef439411b73fcd0bde0bd24bcca6b520d3356..8204d7471f6ea498dbd2482be9f5e6e46fff2426 100644 --- a/src/plugins/external_tool_support/src/bwa/BwaTask.h +++ b/src/plugins/external_tool_support/src/bwa/BwaTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/bwa/BwaWorker.cpp b/src/plugins/external_tool_support/src/bwa/BwaWorker.cpp index d077850e48f4162d8916c37879695408378a4b2f..ba90eb2186bd5b7f8ed9a5d777fc0892699a375f 100644 --- a/src/plugins/external_tool_support/src/bwa/BwaWorker.cpp +++ b/src/plugins/external_tool_support/src/bwa/BwaWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -294,7 +294,7 @@ void BwaWorkerFactory::init() { proto->setPrompter(new ShortReadsAlignerPrompter()); proto->setEditor(new DelegateEditor(delegates)); proto->setPortValidator(IN_PORT_DESCR, new ShortReadsAlignerSlotsValidator()); - proto->addExternalTool(ET_BWA); + proto->addExternalTool(BwaSupport::ET_BWA_ID); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_NGS_MAP_ASSEMBLE_READS(), proto); WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID)->registerEntry(new BwaWorkerFactory()); } diff --git a/src/plugins/external_tool_support/src/bwa/BwaWorker.h b/src/plugins/external_tool_support/src/bwa/BwaWorker.h index 097ce9b294e1174594ae6c8c7ca478a4423c4446..6b6340089c345e3bdfa6f9378c696e21b2815abe 100644 --- a/src/plugins/external_tool_support/src/bwa/BwaWorker.h +++ b/src/plugins/external_tool_support/src/bwa/BwaWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/bwa/bwa_tests/bwaTests.cpp b/src/plugins/external_tool_support/src/bwa/bwa_tests/bwaTests.cpp index 8f42d062744cee1627f954c5c28e321249ecaba6..b37e73a66a36451316a892e6ab19d7f87b2dbc47 100644 --- a/src/plugins/external_tool_support/src/bwa/bwa_tests/bwaTests.cpp +++ b/src/plugins/external_tool_support/src/bwa/bwa_tests/bwaTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -351,7 +351,7 @@ Task::ReportResult GTest_Bwa::report() { void GTest_Bwa::cleanup() { // delete index - if(!usePrebuildIndex) { + if(!hasError() && !usePrebuildIndex) { QString prefix = env->getVar("TEMP_DATA_DIR")+"/"+QString::number(getTaskId()); QStringList files(QStringList() << prefix+".amb" << prefix+".ann" << prefix+".bwt" << prefix+".pac" << prefix+".rbwt" << prefix+".rpac" @@ -366,16 +366,12 @@ void GTest_Bwa::cleanup() { } //delete tmp result - if (QFileInfo(resultDirPath).exists()) { + if (!hasError() && QFileInfo(resultDirPath).exists()) { ioLog.trace(QString("Deleting tmp result dir %1").arg(resultDirPath)); GUrlUtils::removeDir(resultDirPath, stateInfo); } -} - - -GTest_Bwa::~GTest_Bwa() { - cleanup(); + XmlTest::cleanup(); } QString GTest_Bwa::getTempDataDir() diff --git a/src/plugins/external_tool_support/src/bwa/bwa_tests/bwaTests.h b/src/plugins/external_tool_support/src/bwa/bwa_tests/bwaTests.h index 90a3b17c947f9b4ceaea3bed002ad9c9dcfe3331..3b1d25ced6a6de4ff96e379251ae96143e7beebb 100644 --- a/src/plugins/external_tool_support/src/bwa/bwa_tests/bwaTests.h +++ b/src/plugins/external_tool_support/src/bwa/bwa_tests/bwaTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -37,11 +37,11 @@ class BwaGObjectTask; class DnaAssemblyMultiTask; class MultipleSequenceAlignmentObject; -class GTest_Bwa : public GTest { +class GTest_Bwa : public XmlTest { Q_OBJECT public: - SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_Bwa, "bwa", TaskFlag_FailOnSubtaskCancel); - ~GTest_Bwa(); + SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_Bwa, "bwa", TaskFlag_FailOnSubtaskCancel) + void prepare(); void run(); Task::ReportResult report(); diff --git a/src/plugins/external_tool_support/src/cap3/CAP3Support.cpp b/src/plugins/external_tool_support/src/cap3/CAP3Support.cpp index 0c292f61e929230f130895564fba61170740fd91..cd11bcfc8685055e5746243d27d47a5f818f39b3 100644 --- a/src/plugins/external_tool_support/src/cap3/CAP3Support.cpp +++ b/src/plugins/external_tool_support/src/cap3/CAP3Support.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -46,7 +46,11 @@ namespace U2 { -CAP3Support::CAP3Support(const QString& name, const QString& path) : ExternalTool(name, path) +const QString CAP3Support::ET_CAP3 = "CAP3"; +const QString CAP3Support::ET_CAP3_ID = "USUPP_CAP3"; +const QString CAP3Support::CAP3_TMP_DIR = "cap3"; + +CAP3Support::CAP3Support(const QString& id, const QString& name, const QString& path) : ExternalTool(id, name, path) { if (AppContext::getMainWindow()) { viewCtx = NULL; //new CAP3SupportContext(this); @@ -63,7 +67,7 @@ CAP3Support::CAP3Support(const QString& name, const QString& path) : ExternalToo #endif validMessage="cap3 File_of_reads \\[options\\]"; description=tr("<i>CAP3</i> is a contig assembly program. \ - <br>It allows to assembly long DNA reads (up to 1000 bp). \ + <br>It allows one to assembly long DNA reads (up to 1000 bp). \ <br>Binaries can be downloaded from http://seq.cs.iastate.edu/cap3.html"); description+=tr("<br><br> Huang, X. and Madan, A. (1999)"); description+=tr("<br>CAP3: A DNA Sequence Assembly Program,"); diff --git a/src/plugins/external_tool_support/src/cap3/CAP3Support.h b/src/plugins/external_tool_support/src/cap3/CAP3Support.h index 9f998d79bf30e4b04ba906c5429e84cd4ad87481..af7d1de7f395cc740d1a0c5aac5cc91e27e9b07b 100644 --- a/src/plugins/external_tool_support/src/cap3/CAP3Support.h +++ b/src/plugins/external_tool_support/src/cap3/CAP3Support.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,16 +26,17 @@ #include <U2View/MSAEditor.h> #include "utils/ExternalToolSupportAction.h" -#define ET_CAP3 "CAP3" -#define CAP3_TMP_DIR "cap3" namespace U2 { class CAP3Support : public ExternalTool { Q_OBJECT public: - CAP3Support(const QString& name, const QString& path = ""); + CAP3Support(const QString& id, const QString& name, const QString& path = ""); GObjectViewWindowContext* getViewContext(){ return viewCtx; } + static const QString ET_CAP3; + static const QString ET_CAP3_ID; + static const QString CAP3_TMP_DIR; public slots: void sl_runWithExtFileSpecify(); private: diff --git a/src/plugins/external_tool_support/src/cap3/CAP3SupportDialog.cpp b/src/plugins/external_tool_support/src/cap3/CAP3SupportDialog.cpp index 19a2ba54b9f41af720fab32af3948203e6e2aa25..5a679f75cbcf209f6bc23c92bacbdacae6485e76 100644 --- a/src/plugins/external_tool_support/src/cap3/CAP3SupportDialog.cpp +++ b/src/plugins/external_tool_support/src/cap3/CAP3SupportDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -40,7 +40,7 @@ CAP3SupportDialog::CAP3SupportDialog(CAP3SupportTaskSettings& s, QWidget* parent saveController(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22056075"); + new HelpButton(this, buttonBox, "24742610"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Run")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/external_tool_support/src/cap3/CAP3SupportDialog.h b/src/plugins/external_tool_support/src/cap3/CAP3SupportDialog.h index 275555428fae12fac382e2cda5c5926bd1e926c9..b5032d1cb23f79ce12cc78650a73194eb8c95a48 100644 --- a/src/plugins/external_tool_support/src/cap3/CAP3SupportDialog.h +++ b/src/plugins/external_tool_support/src/cap3/CAP3SupportDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/cap3/CAP3SupportTask.cpp b/src/plugins/external_tool_support/src/cap3/CAP3SupportTask.cpp index 7e683e96039103b2f3487a66fe592be62e82f4d8..e9a6cf754271db44cf06e3b98e0979a29f1e9f27 100644 --- a/src/plugins/external_tool_support/src/cap3/CAP3SupportTask.cpp +++ b/src/plugins/external_tool_support/src/cap3/CAP3SupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -59,7 +59,7 @@ CAP3SupportTask::CAP3SupportTask(const CAP3SupportTaskSettings& _settings) : void CAP3SupportTask::prepare(){ - tmpDirUrl = ExternalToolSupportUtils::createTmpDir(CAP3_TMP_DIR, stateInfo); + tmpDirUrl = ExternalToolSupportUtils::createTmpDir(CAP3Support::CAP3_TMP_DIR, stateInfo); CHECK_OP(stateInfo, ); prepareDataForCAP3Task = new PrepareInputForCAP3Task(settings.inputFiles, tmpDirUrl); @@ -85,19 +85,19 @@ QList<Task*> CAP3SupportTask::onSubTaskFinished(Task* subTask) { QStringList arguments = settings.getArgumentsList(); arguments.prepend( inputUrl.getURLString() ); - cap3Task = new ExternalToolRunTask(ET_CAP3, arguments, new CAP3LogParser()); + cap3Task = new ExternalToolRunTask(CAP3Support::ET_CAP3_ID, arguments, new CAP3LogParser()); setListenerForTask(cap3Task); cap3Task->setSubtaskProgressWeight(95); res.append(cap3Task); } else if (subTask == cap3Task) { if (!QFile::exists(tmpOutputUrl)) { - if(AppContext::getExternalToolRegistry()->getByName(ET_CAP3)->isValid()){ + if(AppContext::getExternalToolRegistry()->getById(CAP3Support::ET_CAP3_ID)->isValid()){ stateInfo.setError(tr("Output file not found")); }else{ stateInfo.setError(tr("Output file not found. May be %1 tool path '%2' not valid?") - .arg(AppContext::getExternalToolRegistry()->getByName(ET_CAP3)->getName()) - .arg(AppContext::getExternalToolRegistry()->getByName(ET_CAP3)->getPath())); + .arg(AppContext::getExternalToolRegistry()->getById(CAP3Support::ET_CAP3_ID)->getName()) + .arg(AppContext::getExternalToolRegistry()->getById(CAP3Support::ET_CAP3_ID)->getPath())); } return res; } diff --git a/src/plugins/external_tool_support/src/cap3/CAP3SupportTask.h b/src/plugins/external_tool_support/src/cap3/CAP3SupportTask.h index 45f3acd379c17be8871bf797a5914e2427aa72d6..f1917f0cc55aabe53cf39f83a01a380859084e30 100644 --- a/src/plugins/external_tool_support/src/cap3/CAP3SupportTask.h +++ b/src/plugins/external_tool_support/src/cap3/CAP3SupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/cap3/CAP3Worker.cpp b/src/plugins/external_tool_support/src/cap3/CAP3Worker.cpp index 13f676d230fba74222b0a698469a3e81dd6791e5..da5de2b9a8a815f6420925b6dfc2615ec0bbc5fe 100644 --- a/src/plugins/external_tool_support/src/cap3/CAP3Worker.cpp +++ b/src/plugins/external_tool_support/src/cap3/CAP3Worker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -102,7 +102,7 @@ void CAP3WorkerFactory::init() { true /* input */); // Description of the element - QString cap3Description = AppContext::getExternalToolRegistry()->getByName(ET_CAP3)->getDescription(); + QString cap3Description = AppContext::getExternalToolRegistry()->getById(CAP3Support::ET_CAP3_ID)->getDescription(); Descriptor desc(ACTOR_ID, CAP3Worker::tr("Assembly Sequences with CAP3"), cap3Description); // Define parameters of the element @@ -357,7 +357,7 @@ void CAP3WorkerFactory::init() { // Init and register the actor prototype proto->setEditor(new DelegateEditor(delegates)); proto->setPrompter(new CAP3Prompter()); - proto->addExternalTool(ET_CAP3, CAP3_EXT_TOOL_PATH); + proto->addExternalTool(CAP3Support::ET_CAP3_ID, CAP3_EXT_TOOL_PATH); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_ASSEMBLY(), proto); DomainFactory* localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID); @@ -415,7 +415,7 @@ void CAP3Worker::initPaths() { QString extToolPath = actor->getParameter(CAP3_EXT_TOOL_PATH)->getAttributeValue<QString>(context); if (QString::compare(extToolPath, "default", Qt::CaseInsensitive) != 0) { - AppContext::getExternalToolRegistry()->getByName(ET_CAP3)->setPath(extToolPath); + AppContext::getExternalToolRegistry()->getById(CAP3Support::ET_CAP3_ID)->setPath(extToolPath); } } diff --git a/src/plugins/external_tool_support/src/cap3/CAP3Worker.h b/src/plugins/external_tool_support/src/cap3/CAP3Worker.h index 9433f28f0c95eceb331d9511730573e739ac383b..2fe3d0e6414af3c7215452534662eec264e29b77 100644 --- a/src/plugins/external_tool_support/src/cap3/CAP3Worker.h +++ b/src/plugins/external_tool_support/src/cap3/CAP3Worker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/ceas/CEASReportWorker.cpp b/src/plugins/external_tool_support/src/ceas/CEASReportWorker.cpp index 2d166595ab4fc104b1b6f04dde6459296fb5b6b5..aac3c825cffe71dc3e736d540ccfd987d306297c 100644 --- a/src/plugins/external_tool_support/src/ceas/CEASReportWorker.cpp +++ b/src/plugins/external_tool_support/src/ceas/CEASReportWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -183,11 +183,11 @@ CEASSettings CEASReportWorker::createCEASSettings(U2OpStatus &/*os*/) { /* CeasComboBoxWithUrlsDelegate */ /************************************************************************/ void CeasComboBoxWithUrlsDelegate::updateUgeneSettings() { - updateDataPath(getDataPathName(), REFGENE_DIR_NAME); + updateDataPath(getDataPathName(), CEASSupport::REFGENE_DIR_NAME); } QString CeasComboBoxWithUrlsDelegate::getDataPathName() { - return REF_GENES_DATA_NAME; + return CEASSupport::REF_GENES_DATA_NAME; } QString CeasComboBoxWithUrlsDelegate::getAttributeName() { @@ -203,7 +203,7 @@ void CEASReportWorkerFactory::init() { U2DataPath* dataPath = NULL; U2DataPathRegistry* dpr = AppContext::getDataPathRegistry(); if (dpr){ - U2DataPath* dp = dpr->getDataPathByName(REF_GENES_DATA_NAME); + U2DataPath* dp = dpr->getDataPathByName(CEASSupport::REF_GENES_DATA_NAME); if (dp && dp->isValid()){ dataPath = dp; } @@ -359,7 +359,7 @@ void CEASReportWorkerFactory::init() { ActorPrototype *proto = new IntegralBusActorPrototype(protoDesc, portDescs, attrs); proto->setPrompter(new CEASReportPrompter()); proto->setEditor(new DelegateEditor(delegates)); - proto->addExternalTool(ET_CEAS); + proto->addExternalTool(CEASSupport::ET_CEAS_ID); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_CHIP_SEQ(), proto); WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID)->registerEntry(new CEASReportWorkerFactory()); } diff --git a/src/plugins/external_tool_support/src/ceas/CEASReportWorker.h b/src/plugins/external_tool_support/src/ceas/CEASReportWorker.h index 5a938513b98b5545147942370438768e9c9f5c10..f4551ca9b9efc2719afb7ca7209cff8d145704ea 100644 --- a/src/plugins/external_tool_support/src/ceas/CEASReportWorker.h +++ b/src/plugins/external_tool_support/src/ceas/CEASReportWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/ceas/CEASSettings.cpp b/src/plugins/external_tool_support/src/ceas/CEASSettings.cpp index 1ccabfe465edef3c07660949c54e53884febf39d..3cd075bf8b5ed2660b070770a3bb278444726e37 100644 --- a/src/plugins/external_tool_support/src/ceas/CEASSettings.cpp +++ b/src/plugins/external_tool_support/src/ceas/CEASSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/ceas/CEASSettings.h b/src/plugins/external_tool_support/src/ceas/CEASSettings.h index c20283147414296984af4ec6e9c4f9dad17f1bc4..b8952d5f8689db5aa5088a44e278d9c891c33d5b 100644 --- a/src/plugins/external_tool_support/src/ceas/CEASSettings.h +++ b/src/plugins/external_tool_support/src/ceas/CEASSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/ceas/CEASSupport.cpp b/src/plugins/external_tool_support/src/ceas/CEASSupport.cpp index 4dad612e2a905a0d8dff396e6274fbe694a81ba9..551d71d5df15a44380f0061a7d1180fb85cb8cd7 100644 --- a/src/plugins/external_tool_support/src/ceas/CEASSupport.cpp +++ b/src/plugins/external_tool_support/src/ceas/CEASSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -29,8 +29,13 @@ namespace U2 { -CEASSupport::CEASSupport(const QString &name) -: ExternalTool(name) +const QString CEASSupport::ET_CEAS = "CEAS Tools"; +const QString CEASSupport::ET_CEAS_ID = "USUPP_CEAS"; +const QString CEASSupport::REFGENE_DIR_NAME = "refGene"; +const QString CEASSupport::REF_GENES_DATA_NAME = "Gene annotation table"; + +CEASSupport::CEASSupport(const QString &id, const QString& name, const QString& path) +: ExternalTool(id, name, path) { initialize(); } @@ -52,9 +57,9 @@ void CEASSupport::initialize() { executableFileName = "ceas.py"; - toolRunnerProgramm = ET_PYTHON; - dependencies << ET_PYTHON - << ET_R; + toolRunnerProgram = PythonSupport::ET_PYTHON_ID; + dependencies << PythonSupport::ET_PYTHON_ID + << RSupport::ET_R_ID; validMessage = "ceas.py -- 0.9.9.7 \\(package version 1.0.2\\)"; validationArguments << "--version"; diff --git a/src/plugins/external_tool_support/src/ceas/CEASSupport.h b/src/plugins/external_tool_support/src/ceas/CEASSupport.h index 2eaf1d6ac9b25c038ed625d6887c293eacb58986..1fb8276018aeb05173cd6a86afa1a29c7882eba7 100644 --- a/src/plugins/external_tool_support/src/ceas/CEASSupport.h +++ b/src/plugins/external_tool_support/src/ceas/CEASSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,15 +26,15 @@ namespace U2 { -#define ET_CEAS "CEAS Tools" -#define REFGENE_DIR_NAME "refGene" -#define REF_GENES_DATA_NAME "Gene annotation table" - class CEASSupport : public ExternalTool { Q_OBJECT public: - CEASSupport(const QString &name); + CEASSupport(const QString& id, const QString& name, const QString& path = ""); + static const QString ET_CEAS; + static const QString ET_CEAS_ID; + static const QString REFGENE_DIR_NAME; + static const QString REF_GENES_DATA_NAME; private: void initialize(); }; diff --git a/src/plugins/external_tool_support/src/ceas/CEASSupportTask.cpp b/src/plugins/external_tool_support/src/ceas/CEASSupportTask.cpp index 344ccacd091d4dcdee6a82da78cd8f4fbaef48dd..8cff7d2018f94d4c89de3f1b33c7afb772527ccf 100644 --- a/src/plugins/external_tool_support/src/ceas/CEASSupportTask.cpp +++ b/src/plugins/external_tool_support/src/ceas/CEASSupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -171,11 +171,11 @@ Task* CEASSupportTask::createETTask(){ settings.getCeasSettings().setWigFile(settings.getWigData()); QStringList args = settings.getCeasSettings().getArgumentList(); - ExternalTool* rTool = AppContext::getExternalToolRegistry()->getByName(ET_R); + ExternalTool* rTool = AppContext::getExternalToolRegistry()->getById(RSupport::ET_R_ID); SAFE_POINT(NULL != rTool, "R script tool wasn't found in the registry", new FailTask("R script tool wasn't found in the registry")); const QString rDir = QFileInfo(rTool->getPath()).dir().absolutePath(); - ExternalToolRunTask* runTask = new ExternalToolRunTask(ET_CEAS, args, new CEASLogParser(), workingDir, QStringList() << rDir); + ExternalToolRunTask* runTask = new ExternalToolRunTask(CEASSupport::ET_CEAS_ID, args, new CEASLogParser(), workingDir, QStringList() << rDir); setListenerForTask(runTask); res = runTask; diff --git a/src/plugins/external_tool_support/src/ceas/CEASSupportTask.h b/src/plugins/external_tool_support/src/ceas/CEASSupportTask.h index 9043907098149e6e69af74a7654da66c540c12b0..363b86c041c8aae9c73ba9bbaac814b1f9e9dcfa 100644 --- a/src/plugins/external_tool_support/src/ceas/CEASSupportTask.h +++ b/src/plugins/external_tool_support/src/ceas/CEASSupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/clustalo/ClustalOSupport.cpp b/src/plugins/external_tool_support/src/clustalo/ClustalOSupport.cpp index 9c1fc6990a028f18e9aecf2f63c510a8e935178a..5563aff1ed1ad43485476e4ce4bd8826e5d933b0 100644 --- a/src/plugins/external_tool_support/src/clustalo/ClustalOSupport.cpp +++ b/src/plugins/external_tool_support/src/clustalo/ClustalOSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -47,7 +47,11 @@ namespace U2 { -ClustalOSupport::ClustalOSupport(const QString& name, const QString& path) : ExternalTool(name, path) +const QString ClustalOSupport::ET_CLUSTALO = "ClustalO"; +const QString ClustalOSupport::ET_CLUSTALO_ID = "USUPP_CLUSTALO"; +const QString ClustalOSupport::CLUSTALO_TMP_DIR = "clustalo"; + +ClustalOSupport::ClustalOSupport(const QString& id, const QString& name, const QString& path) : ExternalTool(id, name, path) { if (AppContext::getMainWindow()) { viewCtx = new ClustalOSupportContext(this); @@ -129,7 +133,7 @@ void ClustalOSupportContext::initViewContext(GObjectView* view) { bool objLocked = msaed->getMaObject()->isStateLocked(); bool isMsaEmpty = msaed->isAlignmentEmpty(); - AlignMsaAction* alignAction = new AlignMsaAction(this, ET_CLUSTALO, view, tr("Align with ClustalO..."), 2000); + AlignMsaAction* alignAction = new AlignMsaAction(this, ClustalOSupport::ET_CLUSTALO_ID, view, tr("Align with ClustalO..."), 2000); alignAction->setObjectName("Align with ClustalO"); addViewAction(alignAction); @@ -151,10 +155,10 @@ void ClustalOSupportContext::buildMenu(GObjectView* view, QMenu* m) { void ClustalOSupportContext::sl_align_with_ClustalO() { //Check that Clustal and tempory folder path defined - if (AppContext::getExternalToolRegistry()->getByName(ET_CLUSTALO)->getPath().isEmpty()){ + if (AppContext::getExternalToolRegistry()->getById(ClustalOSupport::ET_CLUSTALO_ID)->getPath().isEmpty()){ QObjectScopedPointer<QMessageBox> msgBox = new QMessageBox; - msgBox->setWindowTitle(ET_CLUSTALO); - msgBox->setText(tr("Path for %1 tool not selected.").arg(ET_CLUSTALO)); + msgBox->setWindowTitle(ClustalOSupport::ET_CLUSTALO); + msgBox->setText(tr("Path for %1 tool not selected.").arg(ClustalOSupport::ET_CLUSTALO)); msgBox->setInformativeText(tr("Do you want to select it now?")); msgBox->setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox->setDefaultButton(QMessageBox::Yes); @@ -173,7 +177,7 @@ void ClustalOSupportContext::sl_align_with_ClustalO() { break; } } - if (AppContext::getExternalToolRegistry()->getByName(ET_CLUSTALO)->getPath().isEmpty()){ + if (AppContext::getExternalToolRegistry()->getById(ClustalOSupport::ET_CLUSTALO_ID)->getPath().isEmpty()){ return; } U2OpStatus2Log os(LogLevel_DETAILS); diff --git a/src/plugins/external_tool_support/src/clustalo/ClustalOSupport.h b/src/plugins/external_tool_support/src/clustalo/ClustalOSupport.h index 9b3cad9ac33e0c01619287af35d77e290416caaa..6622281858156ae38975d11b44a584808e806818 100644 --- a/src/plugins/external_tool_support/src/clustalo/ClustalOSupport.h +++ b/src/plugins/external_tool_support/src/clustalo/ClustalOSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -28,17 +28,17 @@ #include "utils/AlignMsaAction.h" -#define ET_CLUSTALO "ClustalO" -#define CLUSTALO_TMP_DIR "clustalo" - namespace U2 { class ClustalOSupport : public ExternalTool { Q_OBJECT public: - ClustalOSupport(const QString& name, const QString& path = ""); + ClustalOSupport(const QString& id, const QString& name, const QString& path = ""); GObjectViewWindowContext* getViewContext(){ return viewCtx; } + static const QString ET_CLUSTALO; + static const QString ET_CLUSTALO_ID; + static const QString CLUSTALO_TMP_DIR; public slots: void sl_runWithExtFileSpecify(); private: diff --git a/src/plugins/external_tool_support/src/clustalo/ClustalOSupportRunDialog.cpp b/src/plugins/external_tool_support/src/clustalo/ClustalOSupportRunDialog.cpp index 09791ed0ac311e0459d8894d91037e0ec0895a32..f38cdae18f7f3a1a5e6656cbee801110a8d4b27b 100644 --- a/src/plugins/external_tool_support/src/clustalo/ClustalOSupportRunDialog.cpp +++ b/src/plugins/external_tool_support/src/clustalo/ClustalOSupportRunDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -45,7 +45,7 @@ ClustalOSupportRunDialog::ClustalOSupportRunDialog(const MultipleSequenceAlignme QDialog(_parent), ma(_ma->getCopy()), settings(_settings) { setupUi(this); - new HelpButton(this, buttonBox, "22056099"); + new HelpButton(this, buttonBox, "24742634"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Align")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -79,7 +79,7 @@ ClustalOWithExtFileSpecifySupportRunDialog::ClustalOWithExtFileSpecifySupportRun saveController(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22055813"); + new HelpButton(this, buttonBox, "24742348"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Align")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/external_tool_support/src/clustalo/ClustalOSupportRunDialog.h b/src/plugins/external_tool_support/src/clustalo/ClustalOSupportRunDialog.h index 87d3cb5e90851de1fdb8a94d59a2fc0290238452..f75839fed65af7cd34c6ca562dad71a77bf1499f 100644 --- a/src/plugins/external_tool_support/src/clustalo/ClustalOSupportRunDialog.h +++ b/src/plugins/external_tool_support/src/clustalo/ClustalOSupportRunDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/clustalo/ClustalOSupportTask.cpp b/src/plugins/external_tool_support/src/clustalo/ClustalOSupportTask.cpp index 38c59e6b74c8fb4e20fe15527d97bf95e5d0a5e3..069a43a8875cb378b4778d838255e11ea587c5c2 100644 --- a/src/plugins/external_tool_support/src/clustalo/ClustalOSupportTask.cpp +++ b/src/plugins/external_tool_support/src/clustalo/ClustalOSupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -113,7 +113,7 @@ void ClustalOSupportTask::prepare(){ QDate::currentDate().toString("dd.MM.yyyy")+"_"+ QTime::currentTime().toString("hh.mm.ss.zzz")+"_"+ QString::number(QCoreApplication::applicationPid())+"/"; - QString tmpDirPath = AppContext::getAppSettings()->getUserAppsSettings()->getCurrentProcessTemporaryDirPath(CLUSTALO_TMP_DIR) + "/" + tmpDirName; + QString tmpDirPath = AppContext::getAppSettings()->getUserAppsSettings()->getCurrentProcessTemporaryDirPath(ClustalOSupport::CLUSTALO_TMP_DIR) + "/" + tmpDirName; url= tmpDirPath + "tmp.aln"; ioLog.details(tr("Saving data to temporary file '%1'").arg(url)); @@ -168,19 +168,19 @@ QList<Task*> ClustalOSupportTask::onSubTaskFinished(Task* subTask) { } arguments <<"--threads="+QString::number(settings.numberOfProcessors); - clustalOTask = new ExternalToolRunTask(ET_CLUSTALO, arguments, new ClustalOLogParser()); + clustalOTask = new ExternalToolRunTask(ClustalOSupport::ET_CLUSTALO_ID, arguments, new ClustalOLogParser()); setListenerForTask(clustalOTask); clustalOTask->setSubtaskProgressWeight(95); res.append(clustalOTask); } else if(subTask == clustalOTask){ if(!QFileInfo(outputUrl).exists()){ - if(AppContext::getExternalToolRegistry()->getByName(ET_CLUSTALO)->isValid()){ + if(AppContext::getExternalToolRegistry()->getById(ClustalOSupport::ET_CLUSTALO_ID)->isValid()){ stateInfo.setError(tr("Output file %1 not found").arg(outputUrl)); }else{ stateInfo.setError(tr("Output file %3 not found. May be %1 tool path '%2' not valid?") - .arg(AppContext::getExternalToolRegistry()->getByName(ET_CLUSTALO)->getName()) - .arg(AppContext::getExternalToolRegistry()->getByName(ET_CLUSTALO)->getPath()) + .arg(AppContext::getExternalToolRegistry()->getById(ClustalOSupport::ET_CLUSTALO_ID)->getName()) + .arg(AppContext::getExternalToolRegistry()->getById(ClustalOSupport::ET_CLUSTALO_ID)->getPath()) .arg(outputUrl)); } emit si_stateChanged(); diff --git a/src/plugins/external_tool_support/src/clustalo/ClustalOSupportTask.h b/src/plugins/external_tool_support/src/clustalo/ClustalOSupportTask.h index 93bca59f2a69a95754bab8e1eb69ce4263e8508e..06f9e73cda7b41c87087378d9e6bb7e8417fbb18 100644 --- a/src/plugins/external_tool_support/src/clustalo/ClustalOSupportTask.h +++ b/src/plugins/external_tool_support/src/clustalo/ClustalOSupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/clustalo/ClustalOWorker.cpp b/src/plugins/external_tool_support/src/clustalo/ClustalOWorker.cpp index ca6b694f508c95cfca1ae3b695fe21bbd1b62ea7..dd6cc1ee892beb2a15277eb2a46aad5e98943b98 100644 --- a/src/plugins/external_tool_support/src/clustalo/ClustalOWorker.cpp +++ b/src/plugins/external_tool_support/src/clustalo/ClustalOWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -121,7 +121,7 @@ void ClustalOWorkerFactory::init() { proto->setEditor(new DelegateEditor(delegates)); proto->setPrompter(new ClustalOPrompter()); proto->setIconPath(":external_tool_support/images/clustalo.png"); - proto->addExternalTool(ET_CLUSTALO, EXT_TOOL_PATH); + proto->addExternalTool(ClustalOSupport::ET_CLUSTALO_ID, EXT_TOOL_PATH); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_ALIGNMENT(), proto); DomainFactory* localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID); @@ -168,7 +168,7 @@ Task* ClustalOWorker::tick() { QString path=actor->getParameter(EXT_TOOL_PATH)->getAttributeValue<QString>(context); if(QString::compare(path, "default", Qt::CaseInsensitive) != 0){ - AppContext::getExternalToolRegistry()->getByName(ET_CLUSTALO)->setPath(path); + AppContext::getExternalToolRegistry()->getById(ClustalOSupport::ET_CLUSTALO_ID)->setPath(path); } path=actor->getParameter(TMP_DIR_PATH)->getAttributeValue<QString>(context); if(QString::compare(path, "default", Qt::CaseInsensitive) != 0){ diff --git a/src/plugins/external_tool_support/src/clustalo/ClustalOWorker.h b/src/plugins/external_tool_support/src/clustalo/ClustalOWorker.h index e6ed3e6b95f66d5868db96ad1d07efa726f381d2..b9d1fbff59053ad4984dd74c6f6bf499a4177acb 100644 --- a/src/plugins/external_tool_support/src/clustalo/ClustalOWorker.h +++ b/src/plugins/external_tool_support/src/clustalo/ClustalOWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/clustalw/ClustalWSupport.cpp b/src/plugins/external_tool_support/src/clustalw/ClustalWSupport.cpp index 9c44c46f2da05aec292bd7dd372720120f2ef84e..a6b143491065d6fa52baef3fdda5f9707dca04a6 100644 --- a/src/plugins/external_tool_support/src/clustalw/ClustalWSupport.cpp +++ b/src/plugins/external_tool_support/src/clustalw/ClustalWSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -47,7 +47,11 @@ namespace U2 { -ClustalWSupport::ClustalWSupport(const QString& name, const QString& path) : ExternalTool(name, path) +const QString ClustalWSupport::ET_CLUSTAL = "ClustalW"; +const QString ClustalWSupport::ET_CLUSTAL_ID = "USUPP_CLUSTALW"; +const QString ClustalWSupport::CLUSTAL_TMP_DIR = "clustal"; + +ClustalWSupport::ClustalWSupport(const QString& id, const QString& name, const QString& path) : ExternalTool(id, name, path) { if (AppContext::getMainWindow()) { viewCtx = new ClustalWSupportContext(this); @@ -129,7 +133,7 @@ void ClustalWSupportContext::initViewContext(GObjectView* view) { bool objLocked = msaed->getMaObject()->isStateLocked(); bool isMsaEmpty = msaed->isAlignmentEmpty(); - AlignMsaAction *alignAction = new AlignMsaAction(this, ET_CLUSTAL, view, tr("Align with ClustalW..."), 2000); + AlignMsaAction *alignAction = new AlignMsaAction(this, ClustalWSupport::ET_CLUSTAL_ID, view, tr("Align with ClustalW..."), 2000); alignAction->setObjectName("Align with ClustalW"); addViewAction(alignAction); @@ -151,10 +155,10 @@ void ClustalWSupportContext::buildMenu(GObjectView* view, QMenu* m) { void ClustalWSupportContext::sl_align_with_ClustalW() { //Check that Clustal and tempory folder path defined - if (AppContext::getExternalToolRegistry()->getByName(ET_CLUSTAL)->getPath().isEmpty()){ + if (AppContext::getExternalToolRegistry()->getById(ClustalWSupport::ET_CLUSTAL_ID)->getPath().isEmpty()){ QObjectScopedPointer<QMessageBox> msgBox = new QMessageBox; - msgBox->setWindowTitle(ET_CLUSTAL); - msgBox->setText(tr("Path for %1 tool not selected.").arg(ET_CLUSTAL)); + msgBox->setWindowTitle(ClustalWSupport::ET_CLUSTAL); + msgBox->setText(tr("Path for %1 tool not selected.").arg(ClustalWSupport::ET_CLUSTAL)); msgBox->setInformativeText(tr("Do you want to select it now?")); msgBox->setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox->setDefaultButton(QMessageBox::Yes); @@ -173,7 +177,7 @@ void ClustalWSupportContext::sl_align_with_ClustalW() { break; } } - if (AppContext::getExternalToolRegistry()->getByName(ET_CLUSTAL)->getPath().isEmpty()){ + if (AppContext::getExternalToolRegistry()->getById(ClustalWSupport::ET_CLUSTAL_ID)->getPath().isEmpty()){ return; } U2OpStatus2Log os(LogLevel_DETAILS); diff --git a/src/plugins/external_tool_support/src/clustalw/ClustalWSupport.h b/src/plugins/external_tool_support/src/clustalw/ClustalWSupport.h index 5d6ca3d28d322bd8582a46fe7d6c4142684cdfeb..f62606572c489fed19723ae2a5e21b22509ff1f1 100644 --- a/src/plugins/external_tool_support/src/clustalw/ClustalWSupport.h +++ b/src/plugins/external_tool_support/src/clustalw/ClustalWSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,17 +26,17 @@ #include <U2View/MSAEditor.h> #include "utils/ExternalToolSupportAction.h" -#define ET_CLUSTAL "ClustalW" -#define CLUSTAL_TMP_DIR "clustal" - namespace U2 { class ClustalWSupport : public ExternalTool { Q_OBJECT public: - ClustalWSupport(const QString& name, const QString& path = ""); + ClustalWSupport(const QString& id, const QString& name, const QString& path = ""); GObjectViewWindowContext* getViewContext(){ return viewCtx; } + static const QString ET_CLUSTAL; + static const QString ET_CLUSTAL_ID; + static const QString CLUSTAL_TMP_DIR; public slots: void sl_runWithExtFileSpecify(); private: diff --git a/src/plugins/external_tool_support/src/clustalw/ClustalWSupportRunDialog.cpp b/src/plugins/external_tool_support/src/clustalw/ClustalWSupportRunDialog.cpp index d35b299e3b800d52bfc0d3cd52cad7396a96277c..349d4095c8fc571c2f9479f9d6ae23bf189e0b76 100644 --- a/src/plugins/external_tool_support/src/clustalw/ClustalWSupportRunDialog.cpp +++ b/src/plugins/external_tool_support/src/clustalw/ClustalWSupportRunDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -42,7 +42,7 @@ ClustalWSupportRunDialog::ClustalWSupportRunDialog(const MultipleSequenceAlignme QDialog(_parent), ma(_ma->getCopy()), settings(_settings) { setupUi(this); - new HelpButton(this, buttonBox, "22056088"); + new HelpButton(this, buttonBox, "24742623"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Align")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -119,7 +119,7 @@ ClustalWWithExtFileSpecifySupportRunDialog::ClustalWWithExtFileSpecifySupportRun saveController(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22056088"); + new HelpButton(this, buttonBox, "24742623"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Align")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/external_tool_support/src/clustalw/ClustalWSupportRunDialog.h b/src/plugins/external_tool_support/src/clustalw/ClustalWSupportRunDialog.h index 3a6686cf4f022ad18310860215db28a450d72e62..2444ef5d28001eee8975899409b7a125d4b09867 100644 --- a/src/plugins/external_tool_support/src/clustalw/ClustalWSupportRunDialog.h +++ b/src/plugins/external_tool_support/src/clustalw/ClustalWSupportRunDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/clustalw/ClustalWSupportTask.cpp b/src/plugins/external_tool_support/src/clustalw/ClustalWSupportTask.cpp index 77cd2f203852f14c21dee3e2db4a27de9ee70728..1d18315077534bf0b030a170402c63404b49ce60 100644 --- a/src/plugins/external_tool_support/src/clustalw/ClustalWSupportTask.cpp +++ b/src/plugins/external_tool_support/src/clustalw/ClustalWSupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -125,7 +125,7 @@ void ClustalWSupportTask::prepare(){ QDate::currentDate().toString("dd.MM.yyyy")+"_"+ QTime::currentTime().toString("hh.mm.ss.zzz")+"_"+ QString::number(QCoreApplication::applicationPid())+"/"; - QString tmpDirPath = AppContext::getAppSettings()->getUserAppsSettings()->getCurrentProcessTemporaryDirPath(CLUSTAL_TMP_DIR) + "/" + tmpDirName; + QString tmpDirPath = AppContext::getAppSettings()->getUserAppsSettings()->getCurrentProcessTemporaryDirPath(ClustalWSupport::CLUSTAL_TMP_DIR) + "/" + tmpDirName; url= tmpDirPath + "tmp.aln"; ioLog.details(tr("Saving data to temporary file '%1'").arg(url)); @@ -194,18 +194,18 @@ QList<Task*> ClustalWSupportTask::onSubTaskFinished(Task* subTask) { if(settings.noPGaps) arguments<<"-NOPGAP"; if(settings.noHGaps) arguments<<"-NOHGAP"; arguments << "-OUTFILE="+outputUrl; - clustalWTask = new ExternalToolRunTask(ET_CLUSTAL, arguments, new ClustalWLogParser(inputMsa->getNumRows())); + clustalWTask = new ExternalToolRunTask(ClustalWSupport::ET_CLUSTAL_ID, arguments, new ClustalWLogParser(inputMsa->getNumRows())); setListenerForTask(clustalWTask); clustalWTask->setSubtaskProgressWeight(95); res.append(clustalWTask); }else if(subTask==clustalWTask){ if(!QFileInfo(outputUrl).exists()){ - if(AppContext::getExternalToolRegistry()->getByName(ET_CLUSTAL)->isValid()){ + if(AppContext::getExternalToolRegistry()->getById(ClustalWSupport::ET_CLUSTAL_ID)->isValid()){ stateInfo.setError(tr("Output file %1 not found").arg(outputUrl)); }else{ stateInfo.setError(tr("Output file %3 not found. May be %1 tool path '%2' not valid?") - .arg(AppContext::getExternalToolRegistry()->getByName(ET_CLUSTAL)->getName()) - .arg(AppContext::getExternalToolRegistry()->getByName(ET_CLUSTAL)->getPath()) + .arg(AppContext::getExternalToolRegistry()->getById(ClustalWSupport::ET_CLUSTAL_ID)->getName()) + .arg(AppContext::getExternalToolRegistry()->getById(ClustalWSupport::ET_CLUSTAL_ID)->getPath()) .arg(outputUrl)); } emit si_stateChanged(); diff --git a/src/plugins/external_tool_support/src/clustalw/ClustalWSupportTask.h b/src/plugins/external_tool_support/src/clustalw/ClustalWSupportTask.h index bcaa845fe0b6cc51a3c3d3953a845ba163b70aca..f220409ef69180208e60e9cfd3e59613c252c40d 100644 --- a/src/plugins/external_tool_support/src/clustalw/ClustalWSupportTask.h +++ b/src/plugins/external_tool_support/src/clustalw/ClustalWSupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/clustalw/ClustalWWorker.cpp b/src/plugins/external_tool_support/src/clustalw/ClustalWWorker.cpp index 4550de88612d9968a0b592610bd6db2395b28062..4f96f8dd4ebba3589093f79de25a2fbe8bbdb12c 100644 --- a/src/plugins/external_tool_support/src/clustalw/ClustalWWorker.cpp +++ b/src/plugins/external_tool_support/src/clustalw/ClustalWWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -173,7 +173,7 @@ void ClustalWWorkerFactory::init() { proto->setEditor(new DelegateEditor(delegates)); proto->setPrompter(new ClustalWPrompter()); proto->setIconPath(":external_tool_support/images/clustalx.png"); - proto->addExternalTool(ET_CLUSTAL, EXT_TOOL_PATH); + proto->addExternalTool(ClustalWSupport::ET_CLUSTAL_ID, EXT_TOOL_PATH); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_ALIGNMENT(), proto); DomainFactory* localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID); @@ -246,7 +246,7 @@ Task* ClustalWWorker::tick() { QString path=actor->getParameter(EXT_TOOL_PATH)->getAttributeValue<QString>(context); if(QString::compare(path, "default", Qt::CaseInsensitive) != 0){ - AppContext::getExternalToolRegistry()->getByName(ET_CLUSTAL)->setPath(path); + AppContext::getExternalToolRegistry()->getById(ClustalWSupport::ET_CLUSTAL_ID)->setPath(path); } path=actor->getParameter(TMP_DIR_PATH)->getAttributeValue<QString>(context); if(QString::compare(path, "default", Qt::CaseInsensitive) != 0){ diff --git a/src/plugins/external_tool_support/src/clustalw/ClustalWWorker.h b/src/plugins/external_tool_support/src/clustalw/ClustalWWorker.h index e18a87f81178b252fd4e2f9230e68884abe5fc2a..af37b57d5e0b4783fa22b01e0e494853c4c56507 100644 --- a/src/plugins/external_tool_support/src/clustalw/ClustalWWorker.h +++ b/src/plugins/external_tool_support/src/clustalw/ClustalWWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/conduct_go/ConductGOSettings.cpp b/src/plugins/external_tool_support/src/conduct_go/ConductGOSettings.cpp index 671c032a0661d15709082d2974b32659bab2e899..645396363e6f05974a93700552a1aba3fdc4e167 100644 --- a/src/plugins/external_tool_support/src/conduct_go/ConductGOSettings.cpp +++ b/src/plugins/external_tool_support/src/conduct_go/ConductGOSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/conduct_go/ConductGOSettings.h b/src/plugins/external_tool_support/src/conduct_go/ConductGOSettings.h index 62912485f460bd37c4c553eb9bfc42b3c3cadb12..50cae79db87050ced341d7d5ad06f99b9c93c536 100644 --- a/src/plugins/external_tool_support/src/conduct_go/ConductGOSettings.h +++ b/src/plugins/external_tool_support/src/conduct_go/ConductGOSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/conduct_go/ConductGOSupport.cpp b/src/plugins/external_tool_support/src/conduct_go/ConductGOSupport.cpp index 491fb12d2bcc98f5411a7a480dca59f95b9b2521..5a288243f36ea0382b651b752cea1bb6eba3d2ec 100644 --- a/src/plugins/external_tool_support/src/conduct_go/ConductGOSupport.cpp +++ b/src/plugins/external_tool_support/src/conduct_go/ConductGOSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -28,8 +28,11 @@ namespace U2 { -ConductGOSupport::ConductGOSupport(const QString &name) -: ExternalTool(name) +const QString ConductGOSupport::ET_GO_ANALYSIS = "go_analysis"; +const QString ConductGOSupport::ET_GO_ANALYSIS_ID = "USUPP_CONDUCT_GO_ANALYSIS"; + +ConductGOSupport::ConductGOSupport(const QString& id, const QString &name) +: ExternalTool(id, name, "") { initialize(); } @@ -46,22 +49,22 @@ void ConductGOSupport::initialize() { executableFileName = "go_analysis.py"; - toolRunnerProgramm = ET_PYTHON; - dependencies << ET_PYTHON - << ET_R - << ET_R_GOSTATS - << ET_R_GO_DB - << ET_R_HGU133A_DB - << ET_R_HGU133B_DB - << ET_R_HGU1333PLUS2_DB - << ET_R_HGU95AV2_DB - << ET_R_MOUSE430A2_DB - << ET_R_CELEGANS_DB - << ET_R_DROSOPHILA2_DB - << ET_R_ORG_HS_EG_DB - << ET_R_ORG_MM_EG_DB - << ET_R_ORG_CE_EG_DB - << ET_R_ORG_DM_EG_DB; + toolRunnerProgram = PythonSupport::ET_PYTHON_ID; + dependencies << PythonSupport::ET_PYTHON_ID + << RSupport::ET_R_ID + << RModuleGostatsSupport::ET_R_GOSTATS_ID + << RModuleGodbSupport::ET_R_GO_DB_ID + << RModuleHgu133adbSupport::ET_R_HGU133A_DB_ID + << RModuleHgu133bdbSupport::ET_R_HGU133B_DB_ID + << RModuleHgu133plus2dbSupport::ET_R_HGU1333PLUS2_DB_ID + << RModuleHgu95av2dbSupport::ET_R_HGU95AV2_DB_ID + << RModuleMouse430a2dbSupport::ET_R_MOUSE430A2_DB_ID + << RModuleCelegansdbSupport::ET_R_CELEGANS_DB_ID + << RModuleDrosophila2dbSupport::ET_R_DROSOPHILA2_DB_ID + << RModuleOrghsegdbSupport::ET_R_ORG_HS_EG_DB_ID + << RModuleOrgmmegdbSupport::ET_R_ORG_MM_EG_DB_ID + << RModuleOrgceegdbSupport::ET_R_ORG_CE_EG_DB_ID + << RModuleOrgdmegdbSupport::ET_R_ORG_DM_EG_DB_ID; validMessage = "Conduct GO"; validationArguments << "--version"; diff --git a/src/plugins/external_tool_support/src/conduct_go/ConductGOSupport.h b/src/plugins/external_tool_support/src/conduct_go/ConductGOSupport.h index 63c818d590d01a573019274601d131e8f1feb7e9..6e65ad653bea1335d268e1b271ae52be254fbd94 100644 --- a/src/plugins/external_tool_support/src/conduct_go/ConductGOSupport.h +++ b/src/plugins/external_tool_support/src/conduct_go/ConductGOSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,13 +26,13 @@ namespace U2 { -#define ET_GO_ANALYSIS "go_analysis" - class ConductGOSupport : public ExternalTool { Q_OBJECT public: - ConductGOSupport(const QString &name); + ConductGOSupport(const QString& id, const QString &name); + static const QString ET_GO_ANALYSIS; + static const QString ET_GO_ANALYSIS_ID; private: void initialize(); }; diff --git a/src/plugins/external_tool_support/src/conduct_go/ConductGOTask.cpp b/src/plugins/external_tool_support/src/conduct_go/ConductGOTask.cpp index fcb49b047c60c914cdf44061d43a041a6eab0fc1..5e3d626f3146e9ee89812b4fefe748bcc744a4e6 100644 --- a/src/plugins/external_tool_support/src/conduct_go/ConductGOTask.cpp +++ b/src/plugins/external_tool_support/src/conduct_go/ConductGOTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -83,11 +83,11 @@ void ConductGOTask::prepare() { copyFile(settings.treatUrl, workingDir + "/" + QFileInfo(settings.treatUrl).fileName()); settings.treatUrl = workingDir + "/" + QFileInfo(settings.treatUrl).fileName(); - ExternalTool* rTool = AppContext::getExternalToolRegistry()->getByName(ET_R); + ExternalTool* rTool = AppContext::getExternalToolRegistry()->getById(RSupport::ET_R_ID); SAFE_POINT_EXT(NULL != rTool, setError("R script tool wasn't found in the registry"), ); const QString rDir = QFileInfo(rTool->getPath()).dir().absolutePath(); - etTask = new ExternalToolRunTask(ET_GO_ANALYSIS, settings.getArguments(), new ExternalToolLogParser(), getSettings().outDir, QStringList() << rDir); + etTask = new ExternalToolRunTask(ConductGOSupport::ET_GO_ANALYSIS_ID, settings.getArguments(), new ExternalToolLogParser(), getSettings().outDir, QStringList() << rDir); setListenerForTask(etTask); addSubTask(etTask); } diff --git a/src/plugins/external_tool_support/src/conduct_go/ConductGOTask.h b/src/plugins/external_tool_support/src/conduct_go/ConductGOTask.h index 410fbf1e1a72f71d00574d68bd4b931b7453fb74..7d066517e6bb9af27ce3021d3310019696e95468 100644 --- a/src/plugins/external_tool_support/src/conduct_go/ConductGOTask.h +++ b/src/plugins/external_tool_support/src/conduct_go/ConductGOTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/conduct_go/ConductGOWorker.cpp b/src/plugins/external_tool_support/src/conduct_go/ConductGOWorker.cpp index 3bd6b151e08ca7424440e0fc0b67505cf71d8349..d2ac13fd53ba5475c2b3e528d3f8d463d8999d1d 100644 --- a/src/plugins/external_tool_support/src/conduct_go/ConductGOWorker.cpp +++ b/src/plugins/external_tool_support/src/conduct_go/ConductGOWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -200,7 +200,7 @@ void ConductGOWorkerFactory::init() { ActorPrototype *proto = new IntegralBusActorPrototype(protoDesc, portDescs, attrs); proto->setPrompter(new ConductGOPrompter()); proto->setEditor(new DelegateEditor(delegates)); - proto->addExternalTool(ET_GO_ANALYSIS); + proto->addExternalTool(ConductGOSupport::ET_GO_ANALYSIS_ID); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_CHIP_SEQ(), proto); WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID)->registerEntry(new ConductGOWorkerFactory()); } diff --git a/src/plugins/external_tool_support/src/conduct_go/ConductGOWorker.h b/src/plugins/external_tool_support/src/conduct_go/ConductGOWorker.h index bdba5006606ed0b748b40dc5327913140d0b50a9..ce5c88425a5a014422bc6adc51f91ed91b5b539b 100644 --- a/src/plugins/external_tool_support/src/conduct_go/ConductGOWorker.h +++ b/src/plugins/external_tool_support/src/conduct_go/ConductGOWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotSettings.cpp b/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotSettings.cpp index 8e2d630cfa3aaa2efd37e7d6ada1b557904095ab..3eb5336c50ea90f236c8c6b7a4dc1fc73efeac7c 100644 --- a/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotSettings.cpp +++ b/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotSettings.h b/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotSettings.h index 4f34cee18845b1587b179ee00423c43f83886d29..d89f2ea5239ebbeb9ebc38063b15156b30b42aab 100644 --- a/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotSettings.h +++ b/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotSupport.cpp b/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotSupport.cpp index 7bf4569bf734e6cadeac054575791e41a9eaead4..993745bd86f56f44d09f78e57fe19ebfdc79e243 100644 --- a/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotSupport.cpp +++ b/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -29,8 +29,13 @@ namespace U2 { -ConservationPlotSupport::ConservationPlotSupport(const QString &name) -: ExternalTool(name) +const QString ConservationPlotSupport::ET_CONSERVATION_PLOT = "conservation_plot"; +const QString ConservationPlotSupport::ET_CONSERVATION_PLOT_ID = "USUPP_CONSERVATION_PLOT"; +const QString ConservationPlotSupport::CONSERVATION_DIR_NAME = "phastCons"; +const QString ConservationPlotSupport::CONSERVATION_DATA_NAME = "conservation_data"; + +ConservationPlotSupport::ConservationPlotSupport(const QString& id, const QString &name) +: ExternalTool(id, name, "") { initialize(); } @@ -47,9 +52,9 @@ void ConservationPlotSupport::initialize() { executableFileName = "conservation_plot.py"; - toolRunnerProgramm = ET_PYTHON; - dependencies << ET_PYTHON - << ET_R; + toolRunnerProgram = PythonSupport::ET_PYTHON_ID; + dependencies << PythonSupport::ET_PYTHON_ID + << RSupport::ET_R_ID; validMessage = "conservation_plot.py "; validationArguments << "--version"; diff --git a/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotSupport.h b/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotSupport.h index 9d88b6199b58d588f780a4f7c574d48616740416..8e41e0b769d58792b5ea1227e2cd076ba1f714ae 100644 --- a/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotSupport.h +++ b/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,15 +26,15 @@ namespace U2 { -#define ET_CONSERVATION_PLOT "conservation_plot" -#define CONSERVATION_DIR_NAME "phastCons" -#define CONSERVATION_DATA_NAME "conservation_data" - class ConservationPlotSupport : public ExternalTool { Q_OBJECT public: - ConservationPlotSupport(const QString &name); + ConservationPlotSupport(const QString& id, const QString &name); + static const QString ET_CONSERVATION_PLOT; + static const QString ET_CONSERVATION_PLOT_ID; + static const QString CONSERVATION_DIR_NAME; + static const QString CONSERVATION_DATA_NAME; private: void initialize(); }; diff --git a/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotTask.cpp b/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotTask.cpp index 1102be8089df4d133b749058edb387fc02be363d..0b5a5f2d3c99253c297e57134e78157b9f221976 100644 --- a/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotTask.cpp +++ b/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -154,11 +154,11 @@ QList<Task*> ConservationPlotTask::onSubTaskFinished(Task* subTask) { QStringList args = settings.getArguments(docNames); - ExternalTool* rTool = AppContext::getExternalToolRegistry()->getByName(ET_R); + ExternalTool* rTool = AppContext::getExternalToolRegistry()->getById(RSupport::ET_R_ID); SAFE_POINT(NULL != rTool, "R script tool wasn't found in the registry", result); const QString rDir = QFileInfo(rTool->getPath()).dir().absolutePath(); - etTask = new ExternalToolRunTask(ET_CONSERVATION_PLOT, args, new ConservationPlotLogParser(), workingDir, QStringList() << rDir); + etTask = new ExternalToolRunTask(ConservationPlotSupport::ET_CONSERVATION_PLOT_ID, args, new ConservationPlotLogParser(), workingDir, QStringList() << rDir); setListenerForTask(etTask); result << etTask; } diff --git a/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotTask.h b/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotTask.h index 9e1ae469a1815cc97a42f61440ba47d5d96df1be..446a80fce37391be177f48bdc5f118a499513f42 100644 --- a/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotTask.h +++ b/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotWorker.cpp b/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotWorker.cpp index 482e4052960dd71ce3d996f503949c00459cdc26..5df314d902ac410bdeea916e03629a6c1d141ac4 100644 --- a/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotWorker.cpp +++ b/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -150,11 +150,11 @@ U2::ConservationPlotSettings ConservationPlotWorker::createConservationPlotSetti /* ConservationPlotComboBoxWithUrlsDelegate */ /************************************************************************/ void ConservationPlotComboBoxWithUrlsDelegate::updateUgeneSettings() { - updateDataPath(getDataPathName(), CONSERVATION_DIR_NAME, true); + updateDataPath(getDataPathName(), ConservationPlotSupport::CONSERVATION_DIR_NAME, true); } QString ConservationPlotComboBoxWithUrlsDelegate::getDataPathName() { - return CONSERVATION_DATA_NAME; + return ConservationPlotSupport::CONSERVATION_DATA_NAME; } QString ConservationPlotComboBoxWithUrlsDelegate::getAttributeName() { @@ -171,7 +171,7 @@ void ConservationPlotWorkerFactory::init() { U2DataPath* dataPath = NULL; U2DataPathRegistry* dpr = AppContext::getDataPathRegistry(); if (dpr){ - U2DataPath* dp = dpr->getDataPathByName(CONSERVATION_DATA_NAME); + U2DataPath* dp = dpr->getDataPathByName(ConservationPlotSupport::CONSERVATION_DATA_NAME); if (dp && dp->isValid()){ dataPath = dp; } @@ -268,7 +268,7 @@ void ConservationPlotWorkerFactory::init() { ActorPrototype *proto = new IntegralBusActorPrototype(protoDesc, portDescs, attrs); proto->setPrompter(new ConservationPlotPrompter()); proto->setEditor(new DelegateEditor(delegates)); - proto->addExternalTool(ET_CONSERVATION_PLOT); + proto->addExternalTool(ConservationPlotSupport::ET_CONSERVATION_PLOT_ID); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_CHIP_SEQ(), proto); WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID)->registerEntry(new ConservationPlotWorkerFactory()); } diff --git a/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotWorker.h b/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotWorker.h index 8b6ff6b520ee7a9f1cff12440ad6e805fcd6ba46..3dc3e095394c3b74db18b2b0f3a21826b4c4549f 100644 --- a/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotWorker.h +++ b/src/plugins/external_tool_support/src/conservation_plot/ConservationPlotWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/cufflinks/CuffdiffSupportTask.cpp b/src/plugins/external_tool_support/src/cufflinks/CuffdiffSupportTask.cpp index 9f83db920d0fb4036a03db17fe0da7311fbe4143..f3623d92e4cee6ad0648fa8b45f8577eeef27ebe 100644 --- a/src/plugins/external_tool_support/src/cufflinks/CuffdiffSupportTask.cpp +++ b/src/plugins/external_tool_support/src/cufflinks/CuffdiffSupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -97,9 +97,9 @@ void CuffdiffSupportTask::prepare() { void CuffdiffSupportTask::setupWorkingDir() { if (0 == QString::compare(settings.workingDir, "default", Qt::CaseInsensitive)) { - workingDir = ExternalToolSupportUtils::createTmpDir(CUFFDIFF_TMP_DIR, stateInfo); + workingDir = ExternalToolSupportUtils::createTmpDir(CufflinksSupport::CUFFDIFF_TMP_DIR, stateInfo); } else { - workingDir = ExternalToolSupportUtils::createTmpDir(settings.workingDir, CUFFDIFF_TMP_DIR, stateInfo); + workingDir = ExternalToolSupportUtils::createTmpDir(settings.workingDir, CufflinksSupport::CUFFDIFF_TMP_DIR, stateInfo); } } @@ -179,7 +179,7 @@ Task * CuffdiffSupportTask::createCuffdiffTask() { arguments << prepareAssemblyUrlsArgs(settings.groupBySamples, settings.assemblyUrls); // create task - diffTask = new ExternalToolRunTask(ET_CUFFDIFF, + diffTask = new ExternalToolRunTask(CufflinksSupport::ET_CUFFDIFF_ID, arguments, new LogParser(), workingDir); diff --git a/src/plugins/external_tool_support/src/cufflinks/CuffdiffSupportTask.h b/src/plugins/external_tool_support/src/cufflinks/CuffdiffSupportTask.h index a5bdaa247b5c24f8da70ea29a0fb58c3ff6eb32b..563f294cb691071bff75e1093bf7e0f95732f1e0 100644 --- a/src/plugins/external_tool_support/src/cufflinks/CuffdiffSupportTask.h +++ b/src/plugins/external_tool_support/src/cufflinks/CuffdiffSupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/cufflinks/CuffdiffWorker.cpp b/src/plugins/external_tool_support/src/cufflinks/CuffdiffWorker.cpp index e36cc35e92b88b4ac91a771fe03603fff243769f..046dbf8b99ffafa4f4a68f775e77a99d5ea99adc 100644 --- a/src/plugins/external_tool_support/src/cufflinks/CuffdiffWorker.cpp +++ b/src/plugins/external_tool_support/src/cufflinks/CuffdiffWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -273,7 +273,7 @@ void CuffdiffWorkerFactory::init() proto->setPortValidator(BasePorts::IN_ASSEMBLY_PORT_ID(), new InputSlotValidator()); { // external tools - proto->addExternalTool(ET_CUFFDIFF, EXT_TOOL_PATH); + proto->addExternalTool(CufflinksSupport::ET_CUFFDIFF_ID, EXT_TOOL_PATH); } WorkflowEnv::getProtoRegistry()->registerProto( @@ -321,7 +321,7 @@ void CuffdiffWorker::initSlotsState() { } void CuffdiffWorker::init() { - WorkflowUtils::updateExternalToolPath(ET_CUFFDIFF, getValue<QString>(EXT_TOOL_PATH)); + WorkflowUtils::updateExternalToolPath(CufflinksSupport::ET_CUFFDIFF_ID, getValue<QString>(EXT_TOOL_PATH)); inAssembly = ports[BasePorts::IN_ASSEMBLY_PORT_ID()]; inTranscript = ports[BasePorts::IN_ANNOTATIONS_PORT_ID()]; diff --git a/src/plugins/external_tool_support/src/cufflinks/CuffdiffWorker.h b/src/plugins/external_tool_support/src/cufflinks/CuffdiffWorker.h index 9a981cc2e202c1ba9012e9241f5fdeb3db25dc78..126fd97e20635942d19bf9b32ee8f1be4c0b5e73 100644 --- a/src/plugins/external_tool_support/src/cufflinks/CuffdiffWorker.h +++ b/src/plugins/external_tool_support/src/cufflinks/CuffdiffWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/cufflinks/CufflinksSettings.cpp b/src/plugins/external_tool_support/src/cufflinks/CufflinksSettings.cpp index abc3974360ff20744f4bda336e2b7a2fa396bde3..b89002c36d4b498f1f46efea1dc28344fe7e202a 100644 --- a/src/plugins/external_tool_support/src/cufflinks/CufflinksSettings.cpp +++ b/src/plugins/external_tool_support/src/cufflinks/CufflinksSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/cufflinks/CufflinksSettings.h b/src/plugins/external_tool_support/src/cufflinks/CufflinksSettings.h index c8404874b94f856fab3bc05ed4b6755686466597..4aecbb342e99c83afb108c9482af3a071769dedb 100644 --- a/src/plugins/external_tool_support/src/cufflinks/CufflinksSettings.h +++ b/src/plugins/external_tool_support/src/cufflinks/CufflinksSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/cufflinks/CufflinksSupport.cpp b/src/plugins/external_tool_support/src/cufflinks/CufflinksSupport.cpp index b87e094432cc6bbd6324a419e1a7212c56c1e3d5..7cbf247fefe7bdebf47f3672db2fc77d9252c0ab 100644 --- a/src/plugins/external_tool_support/src/cufflinks/CufflinksSupport.cpp +++ b/src/plugins/external_tool_support/src/cufflinks/CufflinksSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,11 +25,25 @@ #include <U2Gui/MainWindow.h> - namespace U2 { -CufflinksSupport::CufflinksSupport(const QString& name, const QString& path) - : ExternalTool(name, path) +const QString CufflinksSupport::ET_CUFFCOMPARE = "Cuffcompare"; +const QString CufflinksSupport::ET_CUFFCOMPARE_ID = "USUPP_CUFFCOMPARE"; +const QString CufflinksSupport::ET_CUFFDIFF = "Cuffdiff"; +const QString CufflinksSupport::ET_CUFFDIFF_ID = "USUPP_CUFFDIFF"; +const QString CufflinksSupport::ET_CUFFLINKS = "Cufflinks"; +const QString CufflinksSupport::ET_CUFFLINKS_ID = "USUPP_CUFFLINKS"; +const QString CufflinksSupport::ET_CUFFMERGE = "Cuffmerge"; +const QString CufflinksSupport::ET_CUFFMERGE_ID = "USUPP_CUFFMERGE"; +const QString CufflinksSupport::ET_GFFREAD = "Gffread"; +const QString CufflinksSupport::ET_GFFREAD_ID = "USUPP_GFFREAD"; + +const QString CufflinksSupport::CUFFLINKS_TMP_DIR = "cufflinks"; +const QString CufflinksSupport::CUFFDIFF_TMP_DIR = "cuffdiff"; +const QString CufflinksSupport::CUFFMERGE_TMP_DIR = "cuffmerge"; + +CufflinksSupport::CufflinksSupport(const QString& id, const QString& name, const QString& path) + : ExternalTool(id, name, path) { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/cmdline.png"); diff --git a/src/plugins/external_tool_support/src/cufflinks/CufflinksSupport.h b/src/plugins/external_tool_support/src/cufflinks/CufflinksSupport.h index 2b4a40e1f559166fd127dc0a6c76c2789bdab65e..eaa7a92b5c2dd11b41ebb5b472431981abbba492 100644 --- a/src/plugins/external_tool_support/src/cufflinks/CufflinksSupport.h +++ b/src/plugins/external_tool_support/src/cufflinks/CufflinksSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,17 +24,6 @@ #include <U2Core/ExternalToolRegistry.h> -#define ET_CUFFCOMPARE "Cuffcompare" -#define ET_CUFFDIFF "Cuffdiff" -#define ET_CUFFLINKS "Cufflinks" -#define ET_CUFFMERGE "Cuffmerge" -#define ET_GFFREAD "Gffread" - -#define CUFFLINKS_TMP_DIR "cufflinks" -#define CUFFDIFF_TMP_DIR "cuffdiff" -#define CUFFMERGE_TMP_DIR "cuffmerge" - - namespace U2 { class CufflinksSupport : public ExternalTool @@ -42,7 +31,22 @@ class CufflinksSupport : public ExternalTool Q_OBJECT public: - CufflinksSupport(const QString& name, const QString& path = ""); + CufflinksSupport(const QString& id, const QString& name, const QString& path = ""); + + static const QString ET_CUFFCOMPARE; + static const QString ET_CUFFCOMPARE_ID; + static const QString ET_CUFFDIFF; + static const QString ET_CUFFDIFF_ID; + static const QString ET_CUFFLINKS; + static const QString ET_CUFFLINKS_ID; + static const QString ET_CUFFMERGE; + static const QString ET_CUFFMERGE_ID; + static const QString ET_GFFREAD; + static const QString ET_GFFREAD_ID; + + static const QString CUFFLINKS_TMP_DIR; + static const QString CUFFDIFF_TMP_DIR; + static const QString CUFFMERGE_TMP_DIR; }; diff --git a/src/plugins/external_tool_support/src/cufflinks/CufflinksSupportTask.cpp b/src/plugins/external_tool_support/src/cufflinks/CufflinksSupportTask.cpp index ce17fca7d5c25cd34d4c41b26a05d9bdad2bd457..f12937b718716f960ff1a261bb66afe2074cc8f1 100644 --- a/src/plugins/external_tool_support/src/cufflinks/CufflinksSupportTask.cpp +++ b/src/plugins/external_tool_support/src/cufflinks/CufflinksSupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -75,7 +75,7 @@ QString CufflinksSupportTask::initTmpDir() { QString::number(QCoreApplication::applicationPid())+"/"; QString cufflinksTmpDirName = - AppContext::getAppSettings()->getUserAppsSettings()->getCurrentProcessTemporaryDirPath(CUFFLINKS_TMP_DIR); + AppContext::getAppSettings()->getUserAppsSettings()->getCurrentProcessTemporaryDirPath(CufflinksSupport::CUFFLINKS_TMP_DIR); QDir tmpDir(cufflinksTmpDirName + "/" + tmpDirName); @@ -168,7 +168,7 @@ ExternalToolRunTask * CufflinksSupportTask::runCufflinks() { arguments << settings.url; // Create the Cufflinks task - ExternalToolRunTask* runTask = new ExternalToolRunTask(ET_CUFFLINKS, + ExternalToolRunTask* runTask = new ExternalToolRunTask(CufflinksSupport::ET_CUFFLINKS_ID, arguments, new ExternalToolLogParser(), workingDirectory); @@ -232,7 +232,7 @@ void CufflinksSupportTask::initLoadIsoformAnnotationsTask(const QString &fileNam const QString filePath = settings.outDir + "/" + fileName; IOAdapterFactory *iof = AppContext::getIOAdapterRegistry()->getIOAdapterFactoryById(BaseIOAdapters::LOCAL_FILE); - SAFE_POINT_EXT(NULL != iof, setError(tr("An internal error occurred during getting annotations from a %1 output file!").arg(ET_CUFFLINKS)), ); + SAFE_POINT_EXT(NULL != iof, setError(tr("An internal error occurred during getting annotations from a %1 output file!").arg(CufflinksSupport::ET_CUFFLINKS)), ); QVariantMap hints; hints[DocumentFormat::DBI_REF_HINT] = QVariant::fromValue(settings.storage->getDbiRef()); diff --git a/src/plugins/external_tool_support/src/cufflinks/CufflinksSupportTask.h b/src/plugins/external_tool_support/src/cufflinks/CufflinksSupportTask.h index 38680353f01816e75121d4324696c8992aa073ad..05f1e8cbeb828905999cdb8c6ce51073f8398713 100644 --- a/src/plugins/external_tool_support/src/cufflinks/CufflinksSupportTask.h +++ b/src/plugins/external_tool_support/src/cufflinks/CufflinksSupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/cufflinks/CufflinksWorker.cpp b/src/plugins/external_tool_support/src/cufflinks/CufflinksWorker.cpp index 4d352ca9c37748a30187d362501b2555ae7d6d55..b906cd264223b38cb1f50578acece5825d7b5abd 100644 --- a/src/plugins/external_tool_support/src/cufflinks/CufflinksWorker.cpp +++ b/src/plugins/external_tool_support/src/cufflinks/CufflinksWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -266,7 +266,7 @@ void CufflinksWorkerFactory::init() proto->setPortValidator(BasePorts::IN_ASSEMBLY_PORT_ID(), new InputSlotValidator()); { // external tools - proto->addExternalTool(ET_CUFFLINKS, EXT_TOOL_PATH); + proto->addExternalTool(CufflinksSupport::ET_CUFFLINKS_ID, EXT_TOOL_PATH); } WorkflowEnv::getProtoRegistry()->registerProto( @@ -322,7 +322,7 @@ void CufflinksWorker::init() { settingsAreCorrect = true; QString extToolPath = getValue<QString>(CufflinksWorkerFactory::EXT_TOOL_PATH); if (QString::compare(extToolPath, "default", Qt::CaseInsensitive) != 0) { - AppContext::getExternalToolRegistry()->getByName(ET_CUFFLINKS)->setPath(extToolPath); + AppContext::getExternalToolRegistry()->getById(CufflinksSupport::ET_CUFFLINKS_ID)->setPath(extToolPath); } QString tmpDirPath = getValue<QString>(CufflinksWorkerFactory::TMP_DIR_PATH); diff --git a/src/plugins/external_tool_support/src/cufflinks/CufflinksWorker.h b/src/plugins/external_tool_support/src/cufflinks/CufflinksWorker.h index 4276ebda7042a9c7fa59dda964228c5a28a6b54f..2465c962c92dfe0c3a02beebe4cce9514ec1f076 100644 --- a/src/plugins/external_tool_support/src/cufflinks/CufflinksWorker.h +++ b/src/plugins/external_tool_support/src/cufflinks/CufflinksWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/cufflinks/CuffmergeSupportTask.cpp b/src/plugins/external_tool_support/src/cufflinks/CuffmergeSupportTask.cpp index 1814d1d6c5b0e035fe8bdf0b216b4df841208546..b4532431b400486009396c85baa5ba9eb38971f8 100644 --- a/src/plugins/external_tool_support/src/cufflinks/CuffmergeSupportTask.cpp +++ b/src/plugins/external_tool_support/src/cufflinks/CuffmergeSupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -109,9 +109,9 @@ void CuffmergeSupportTask::run() { void CuffmergeSupportTask::setupWorkingDirPath() { if (0 == QString::compare(settings.workingDir, "default", Qt::CaseInsensitive)) { - workingDir = ExternalToolSupportUtils::createTmpDir(CUFFMERGE_TMP_DIR, stateInfo); + workingDir = ExternalToolSupportUtils::createTmpDir(CufflinksSupport::CUFFMERGE_TMP_DIR, stateInfo); } else { - workingDir = ExternalToolSupportUtils::createTmpDir(settings.workingDir, CUFFMERGE_TMP_DIR, stateInfo); + workingDir = ExternalToolSupportUtils::createTmpDir(settings.workingDir, CufflinksSupport::CUFFMERGE_TMP_DIR, stateInfo); } } @@ -171,8 +171,8 @@ Task * CuffmergeSupportTask::createCuffmergeTask() { { ExternalToolRegistry *registry = AppContext::getExternalToolRegistry(); - ExternalTool *cm =registry->getByName(ET_CUFFMERGE); - ExternalTool *cc =registry->getByName(ET_CUFFCOMPARE); + ExternalTool *cm =registry->getById(CufflinksSupport::ET_CUFFMERGE_ID); + ExternalTool *cc =registry->getById(CufflinksSupport::ET_CUFFCOMPARE_ID); QFileInfo cmInfo(cm->getPath()); QFileInfo ccInfo(cc->getPath()); @@ -180,7 +180,7 @@ Task * CuffmergeSupportTask::createCuffmergeTask() { addPaths << ccInfo.dir().absolutePath(); } - mergeTask = new ExternalToolRunTask(ET_CUFFMERGE, args, new ExternalToolLogParser(), workingDir, addPaths); + mergeTask = new ExternalToolRunTask(CufflinksSupport::ET_CUFFMERGE_ID, args, new ExternalToolLogParser(), workingDir, addPaths); setListenerForTask(mergeTask); return mergeTask; } @@ -189,7 +189,7 @@ LoadDocumentTask *CuffmergeSupportTask::createLoadResultDocumentTask(const QStri const QString filePath = settings.outDir + "/" + fileName; IOAdapterFactory *iof = AppContext::getIOAdapterRegistry()->getIOAdapterFactoryById(BaseIOAdapters::LOCAL_FILE); - SAFE_POINT_EXT(NULL != iof, setError(tr("An internal error occurred during getting annotations from a %1 output file!").arg(ET_CUFFMERGE)), NULL); + SAFE_POINT_EXT(NULL != iof, setError(tr("An internal error occurred during getting annotations from a %1 output file!").arg(CufflinksSupport::ET_CUFFMERGE)), NULL); QVariantMap hints; hints[DocumentFormat::DBI_REF_HINT] = QVariant::fromValue(settings.storage->getDbiRef()); diff --git a/src/plugins/external_tool_support/src/cufflinks/CuffmergeSupportTask.h b/src/plugins/external_tool_support/src/cufflinks/CuffmergeSupportTask.h index dcff10366da5fd45b4f898c72e74b74bea0b72c3..64986f905db1a776f18b5cea0415ff48580e7894 100644 --- a/src/plugins/external_tool_support/src/cufflinks/CuffmergeSupportTask.h +++ b/src/plugins/external_tool_support/src/cufflinks/CuffmergeSupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/cufflinks/CuffmergeWorker.cpp b/src/plugins/external_tool_support/src/cufflinks/CuffmergeWorker.cpp index a4dfcaa59739efc91dc7f97f0ed0d3a9c9786e43..380a3aea766bd73a5fe981493dcfffcb477a7b41 100644 --- a/src/plugins/external_tool_support/src/cufflinks/CuffmergeWorker.cpp +++ b/src/plugins/external_tool_support/src/cufflinks/CuffmergeWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -157,8 +157,8 @@ void CuffmergeWorkerFactory::init() proto->setPrompter(new CuffmergePrompter()); { // external tools - proto->addExternalTool(ET_CUFFMERGE, EXT_TOOL_PATH); - proto->addExternalTool(ET_CUFFCOMPARE, CUFFCOMPARE_TOOL_PATH); + proto->addExternalTool(CufflinksSupport::ET_CUFFMERGE_ID, EXT_TOOL_PATH); + proto->addExternalTool(CufflinksSupport::ET_CUFFCOMPARE_ID, CUFFCOMPARE_TOOL_PATH); } WorkflowEnv::getProtoRegistry()->registerProto( @@ -199,8 +199,8 @@ CuffmergeWorker::CuffmergeWorker(Actor* actor) } void CuffmergeWorker::init() { - WorkflowUtils::updateExternalToolPath(ET_CUFFMERGE, getValue<QString>(EXT_TOOL_PATH)); - WorkflowUtils::updateExternalToolPath(ET_CUFFCOMPARE, getValue<QString>(CUFFCOMPARE_TOOL_PATH)); + WorkflowUtils::updateExternalToolPath(CufflinksSupport::ET_CUFFMERGE_ID, getValue<QString>(EXT_TOOL_PATH)); + WorkflowUtils::updateExternalToolPath(CufflinksSupport::ET_CUFFCOMPARE_ID, getValue<QString>(CUFFCOMPARE_TOOL_PATH)); input = ports[BasePorts::IN_ANNOTATIONS_PORT_ID()]; output = ports[BasePorts::OUT_ANNOTATIONS_PORT_ID()]; diff --git a/src/plugins/external_tool_support/src/cufflinks/CuffmergeWorker.h b/src/plugins/external_tool_support/src/cufflinks/CuffmergeWorker.h index a9eaca78c6bd696b7312f696f3bf0607a0173cc1..7fb23cc92fb77e3dbf81f2b135a73c4667333ee6 100644 --- a/src/plugins/external_tool_support/src/cufflinks/CuffmergeWorker.h +++ b/src/plugins/external_tool_support/src/cufflinks/CuffmergeWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/cufflinks/GffreadSupportTask.cpp b/src/plugins/external_tool_support/src/cufflinks/GffreadSupportTask.cpp index 5e93999f04d6acd2482dc45e5e5f267260e8146f..95c5f67c720e069f1679eaac3fb6355d053f0c5b 100644 --- a/src/plugins/external_tool_support/src/cufflinks/GffreadSupportTask.cpp +++ b/src/plugins/external_tool_support/src/cufflinks/GffreadSupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -42,7 +42,7 @@ void GffreadSupportTask::prepare() { checkFormat(settings.transcriptsUrl, BaseDocumentFormats::GTF); CHECK_OP(stateInfo, ); - ExternalToolRunTask* runTask = new ExternalToolRunTask(ET_GFFREAD, settings.getArguments(), new ExternalToolLogParser()); + ExternalToolRunTask* runTask = new ExternalToolRunTask(CufflinksSupport::ET_GFFREAD_ID, settings.getArguments(), new ExternalToolLogParser()); setListenerForTask(runTask); addSubTask(runTask); } diff --git a/src/plugins/external_tool_support/src/cufflinks/GffreadSupportTask.h b/src/plugins/external_tool_support/src/cufflinks/GffreadSupportTask.h index 32828fd6fe91d4957061fece2238e3d168834232..b31515d3f2016ccd093627a8de3859d137f5c3ff 100644 --- a/src/plugins/external_tool_support/src/cufflinks/GffreadSupportTask.h +++ b/src/plugins/external_tool_support/src/cufflinks/GffreadSupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/cufflinks/GffreadWorker.cpp b/src/plugins/external_tool_support/src/cufflinks/GffreadWorker.cpp index 50837658921997ed179495b844a4e9960de489c1..02ded59190bb57cd2a23b147aab982e7db3ce289 100644 --- a/src/plugins/external_tool_support/src/cufflinks/GffreadWorker.cpp +++ b/src/plugins/external_tool_support/src/cufflinks/GffreadWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -221,7 +221,7 @@ void GffreadWorkerFactory::init() { proto->setPrompter(new GffreadPrompter()); proto->setEditor(new DelegateEditor(delegates)); proto->setPortValidator(IN_PORT_ID, new GffreadInputSlotsValidator()); - proto->addExternalTool(ET_GFFREAD); + proto->addExternalTool(CufflinksSupport::ET_GFFREAD_ID); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_RNA_SEQ(), proto); DomainFactory *localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID); diff --git a/src/plugins/external_tool_support/src/cufflinks/GffreadWorker.h b/src/plugins/external_tool_support/src/cufflinks/GffreadWorker.h index acdbee6afb4733a75590de6d3700ecca53fded03..132883b67fa20c64027ed0fbc2dfc5c0d166e103 100644 --- a/src/plugins/external_tool_support/src/cufflinks/GffreadWorker.h +++ b/src/plugins/external_tool_support/src/cufflinks/GffreadWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/custom_tools/CustomToolConfigParser.cpp b/src/plugins/external_tool_support/src/custom_tools/CustomToolConfigParser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..908964e591936cd63ab88e1d60e973a20ae8d9e2 --- /dev/null +++ b/src/plugins/external_tool_support/src/custom_tools/CustomToolConfigParser.cpp @@ -0,0 +1,186 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QDomDocument> +#include <QDir> +#include <QFile> +#include <QFileInfo> +#include <QRegularExpression> + +#include <U2Core/CustomExternalTool.h> +#include <U2Core/U2OpStatus.h> +#include <U2Core/U2SafePoints.h> + +#include "CustomToolConfigParser.h" + +namespace U2 { + +const QString CustomToolConfigParser::ELEMENT_CONFIG = "ugeneExternalToolConfig"; +const QString CustomToolConfigParser::ATTRIBUTE_VERSION = "version"; +const QString CustomToolConfigParser::HARDCODED_EXPECTED_VERSION = "1.0"; + +const QString CustomToolConfigParser::ID = "id"; +const QString CustomToolConfigParser::NAME = "name"; +const QString CustomToolConfigParser::PATH = "executableFullPath"; +const QString CustomToolConfigParser::DESCRIPTION = "description"; +const QString CustomToolConfigParser::TOOLKIT_NAME = "toolkitName"; +const QString CustomToolConfigParser::TOOL_VERSION = "version"; +const QString CustomToolConfigParser::LAUNCHER_ID = "launcherId"; +const QString CustomToolConfigParser::DEPENDENCIES = "dependencies"; +const QString CustomToolConfigParser::BINARY_NAME = "executableName"; + +namespace { +bool compareCaseInsensetive(const QString& first, const QString& second) { + return QString::compare(first, second, Qt::CaseInsensitive) == 0; +} +} + +CustomExternalTool *CustomToolConfigParser::parse(U2OpStatus &os, const QString &url) { + QFile file(url); + CHECK_EXT(file.open(QIODevice::ReadOnly), os.setError(tr("Invalid config file format: file %1 cann not be opened").arg(url)), nullptr); + + QDomDocument doc; + doc.setContent(&file); + file.close(); + + QScopedPointer<CustomExternalTool> tool(new CustomExternalTool()); + + const QDomNodeList nodesList = doc.elementsByTagName(ELEMENT_CONFIG); + CHECK_EXT(!nodesList.isEmpty(), os.setError(tr("Invalid config file format: custom tool description not found")), nullptr); + CHECK_EXT(1 == nodesList.count(), os.setError(tr("Invalid config file format: there are too many entities in the file")), nullptr); + + QDomElement configElement = nodesList.item(0).toElement(); + CHECK_EXT(!configElement.isNull(), os.setError(tr("Can't parse the config file")), nullptr); + + const QString &version = configElement.attribute(ATTRIBUTE_VERSION); + CHECK_EXT(HARDCODED_EXPECTED_VERSION == version, os.setError(tr("Can't parse config with version %1").arg(version)), nullptr); + + const QDomNodeList toolConfigElements = configElement.childNodes(); + QFileInfo urlFi(url); + for (int i = 0, n = toolConfigElements.count(); i < n; ++i) { + const QDomElement element = toolConfigElements.item(i).toElement(); + CHECK_CONTINUE(!element.isNull()); + const QString tagName = element.tagName(); + + if (compareCaseInsensetive(ID, tagName)) { + tool->setId(element.text()); + } else if (compareCaseInsensetive(NAME, tagName)) { + tool->setName(element.text()); + } else if (compareCaseInsensetive(PATH, tagName)) { + if (!element.text().isEmpty()) { + QString text = element.text(); + QFileInfo pathFi(element.text()); + QString absPath; + if (pathFi.isRelative()) { + QString newPath = urlFi.absoluteDir().absolutePath() + "/" + element.text(); + pathFi = QFileInfo(newPath); + } + absPath = pathFi.absoluteFilePath(); + tool->setPath(absPath); + } + } else if (compareCaseInsensetive(DESCRIPTION, tagName)) { + tool->setDescription(element.text().replace(QRegularExpression("\\r?\\n"), "<br>")); + } else if (compareCaseInsensetive(TOOLKIT_NAME, tagName)) { + tool->setToolkitName(element.text()); + } else if (compareCaseInsensetive(TOOL_VERSION, tagName)) { + tool->setPredefinedVersion(element.text()); + } else if (compareCaseInsensetive(LAUNCHER_ID, tagName)) { + tool->setLauncher(element.text()); + } else if (compareCaseInsensetive(DEPENDENCIES, tagName)) { + QStringList dependencies; + foreach (const QString &dependency, element.text().split(",", QString::SkipEmptyParts)) { + dependencies << dependency.trimmed(); + } + tool->setDependencies(dependencies); + } else if (compareCaseInsensetive(BINARY_NAME, tagName)) { + tool->setBinaryName(element.text()); + } else { + os.addWarning(tr("Unknown element: '%1', skipping").arg(tagName)); + } + } + + if (tool->getPath().isEmpty()) { + QString expectedExecutableUrl = urlFi.absoluteDir().absolutePath() + "/" + tool->getExecutableFileName(); + QFile expectedExecutable(expectedExecutableUrl); + if (expectedExecutable.exists()) { + tool->setPath(expectedExecutableUrl); + } + } + + if (tool->getToolKitName().isEmpty()) { + tool->setToolkitName(tool->getName()); + } + + const bool valid = validate(os, tool.data()); + CHECK(valid, nullptr); + + return tool.take(); +} + +QDomDocument CustomToolConfigParser::serialize(CustomExternalTool *tool) { + QDomDocument doc; + QDomProcessingInstruction xmlHeader = doc.createProcessingInstruction("xml", "version = \"1.0\" encoding = \"UTF-8\""); + doc.appendChild(xmlHeader); + + QDomElement configElement = doc.createElement(ELEMENT_CONFIG); + configElement.setAttribute(ATTRIBUTE_VERSION, HARDCODED_EXPECTED_VERSION); + configElement.appendChild(addChildElement(doc, ID, tool->getId())); + configElement.appendChild(addChildElement(doc, NAME, tool->getName())); + configElement.appendChild(addChildElement(doc, PATH, tool->getPath())); + configElement.appendChild(addChildElement(doc, DESCRIPTION, tool->getDescription())); + configElement.appendChild(addChildElement(doc, TOOLKIT_NAME, tool->getToolKitName())); + configElement.appendChild(addChildElement(doc, TOOL_VERSION, tool->getPredefinedVersion())); + configElement.appendChild(addChildElement(doc, LAUNCHER_ID, tool->getToolRunnerProgramId())); + configElement.appendChild(addChildElement(doc, DEPENDENCIES, tool->getDependencies().join(","))); + configElement.appendChild(addChildElement(doc, BINARY_NAME, tool->getExecutableFileName())); + doc.appendChild(configElement); + return doc; +} + +bool CustomToolConfigParser::validate(U2OpStatus &os, CustomExternalTool *tool) { + CHECK(nullptr != tool, false); + CHECK_EXT(!tool->getId().isEmpty(), os.setError(tr("The tool id is not specified in the config file.")), false); + CHECK_EXT(!tool->getId().contains(QRegularExpression("[^A-Za-z0-9_\\-]")), os.setError(tr("The tool id contains unexpected characters, the only letters, numbers, underlines and dashes are allowed.")), false); + CHECK_EXT(!tool->getId().startsWith("USUPP_"), os.setError(tr("The custom tool's ID shouldn't start with \"USUPP_\", this is a distinguishing feature of the supported tools.")), false); + CHECK_EXT(!tool->getId().startsWith("UCUST_"), os.setError(tr("The custom tool's ID shouldn't start with \"UCUST_\", this is a distinguishing feature of the supported tools.")), false); + CHECK_EXT(!tool->getName().isEmpty(), os.setError(tr("The tool name is not specified in the config file.")), false); + + CHECK_EXT(!tool->getExecutableFileName().isEmpty(), os.setError(tr("The imported custom tool \"%1\" does not have an executable file. Make sure to set up a valid executable file before you use the tool.").arg(tool->getName())), false) + if (tool->getPath().isEmpty()) { + os.addWarning(tr("The imported custom tool \"%1\" does not have an executable file. Make sure to set up a valid executable file before you use the tool.").arg(tool->getName())); + } else { + QFileInfo pathFi(tool->getPath()); + if (!pathFi.exists()) { + os.addWarning(tr("The executable file \"%1\" specified for the imported custom tool \"%2\" doesn't exist. Make sure to set up a valid executable file before you use the tool.").arg(tool->getPath()).arg(tool->getName())); + } + } + + return true; +} + +QDomElement CustomToolConfigParser::addChildElement(QDomDocument &doc, const QString &elementName, const QString &elementData) { + QDomElement element = doc.createElement(elementName); + QDomText elementDataNode = doc.createTextNode(elementData); + element.appendChild(elementDataNode); + return element; +} + +} // namespace U2 diff --git a/src/plugins/external_tool_support/src/custom_tools/CustomToolConfigParser.h b/src/plugins/external_tool_support/src/custom_tools/CustomToolConfigParser.h new file mode 100644 index 0000000000000000000000000000000000000000..05d225c571a051ed636009eac4befc1373db3b98 --- /dev/null +++ b/src/plugins/external_tool_support/src/custom_tools/CustomToolConfigParser.h @@ -0,0 +1,64 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_CUSTOM_TOOL_CONFIG_PARSER_H_ +#define _U2_CUSTOM_TOOL_CONFIG_PARSER_H_ + +#include <QCoreApplication> +#include <QDomElement> + +class QDomDocument; + +namespace U2 { + +class CustomExternalTool; +class U2OpStatus; + +class CustomToolConfigParser { + Q_DECLARE_TR_FUNCTIONS(CustomToolConfigParser) +public: + + static CustomExternalTool *parse(U2OpStatus &os, const QString& url); + static QDomDocument serialize(CustomExternalTool *tool); + +private: + static bool validate(U2OpStatus &os, CustomExternalTool *tool); + static QDomElement addChildElement(QDomDocument &doc, const QString &elementName, const QString &elementData); + + static const QString ELEMENT_CONFIG; + static const QString ATTRIBUTE_VERSION; + static const QString HARDCODED_EXPECTED_VERSION; + + static const QString ID; + static const QString NAME; + static const QString PATH; + static const QString DESCRIPTION; + static const QString TOOLKIT_NAME; + static const QString TOOL_VERSION; + static const QString LAUNCHER_ID; + static const QString DEPENDENCIES; + static const QString DEPENDENCY_ID; + static const QString BINARY_NAME; +}; + +} // namespace U2 + +#endif // _U2_CUSTOM_TOOL_CONFIG_PARSER_H_ diff --git a/src/plugins/external_tool_support/src/custom_tools/ImportCustomToolsTask.cpp b/src/plugins/external_tool_support/src/custom_tools/ImportCustomToolsTask.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b91eee5221467d8a1c5a5038bcd46aaf97fd1df7 --- /dev/null +++ b/src/plugins/external_tool_support/src/custom_tools/ImportCustomToolsTask.cpp @@ -0,0 +1,81 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QDir> +#include <QDomDocument> +#include <QFile> +#include <QFileInfo> +#include <QXmlInputSource> +#include <QXmlSimpleReader> + +#include <U2Core/AppContext.h> +#include <U2Core/AppSettings.h> +#include <U2Core/Counter.h> +#include <U2Core/CustomExternalTool.h> +#include <U2Core/GUrl.h> +#include <U2Core/GUrlUtils.h> +#include <U2Core/U2SafePoints.h> +#include <U2Core/UserApplicationsSettings.h> + +#include "CustomToolConfigParser.h" +#include "ImportCustomToolsTask.h" +#include "RegisterCustomToolTask.h" + +namespace U2 { + +const QString ImportCustomToolsTask::SETTINGS_PATH = "external_tools/custom_tool_configs"; + +ImportCustomToolsTask::ImportCustomToolsTask(const QString &_url) + : Task(tr("Import custom external tools configuration"), TaskFlags_FOSE_COSC|TaskFlag_CollectChildrenWarnings), + url(_url), + registerTask(nullptr) +{ + GCOUNTER(cvar, tvar, "ImportCustomToolsTask"); +} + +void ImportCustomToolsTask::prepare() { + registerTask = new RegisterCustomToolTask(url); + addSubTask(registerTask); +} + +void ImportCustomToolsTask::run() { + CustomExternalTool *tool = registerTask->getTool(); + CHECK(nullptr != tool, ); + saveToolConfig(tool); +} + +void ImportCustomToolsTask::saveToolConfig(CustomExternalTool *tool) { + QDomDocument doc = CustomToolConfigParser::serialize(tool); + + const QString storagePath = AppContext::getAppSettings()->getUserAppsSettings()->getCustomToolsConfigsDirPath(); + QDir().mkpath(storagePath); + + const QString url = GUrlUtils::rollFileName(storagePath + "/" + GUrlUtils::fixFileName(tool->getId()) + ".xml", "_"); + QFile configFile(url); + configFile.open(QIODevice::WriteOnly); + QTextStream stream(&configFile); + stream << doc.toString(4); + configFile.close(); + + tool->setConfigFilePath(url); +} + +} // namespace U2 diff --git a/src/plugins/external_tool_support/src/custom_tools/ImportCustomToolsTask.h b/src/plugins/external_tool_support/src/custom_tools/ImportCustomToolsTask.h new file mode 100644 index 0000000000000000000000000000000000000000..cd3ed424d00f7fbbc3dcf10784ae358d56fde65c --- /dev/null +++ b/src/plugins/external_tool_support/src/custom_tools/ImportCustomToolsTask.h @@ -0,0 +1,53 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_IMPORT_CUSTOM_TOOLS_TASK_H_ +#define _U2_IMPORT_CUSTOM_TOOLS_TASK_H_ + +#include <QScopedPointer> + +#include <U2Core/ExternalToolRegistry.h> +#include <U2Core/Task.h> + +namespace U2 { + +class CustomExternalTool; +class RegisterCustomToolTask; + +class ImportCustomToolsTask : public Task { +public: + ImportCustomToolsTask(const QString &url); + + static const QString SETTINGS_PATH; + +private: + void prepare() override; + void run() override; + + void saveToolConfig(CustomExternalTool *tool); + + const QString url; + RegisterCustomToolTask *registerTask; +}; + +} // namespace U2 + +#endif // _U2_IMPORT_CUSTOM_TOOLS_TASK_H_ diff --git a/src/plugins/external_tool_support/src/custom_tools/ImportExternalToolDialog.cpp b/src/plugins/external_tool_support/src/custom_tools/ImportExternalToolDialog.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d8c83becec0f11d84ccbcb9a6aaea5acd1e0e6db --- /dev/null +++ b/src/plugins/external_tool_support/src/custom_tools/ImportExternalToolDialog.cpp @@ -0,0 +1,68 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QDir> +#include <QPushButton> + +#include <U2Core/AppContext.h> + +#include <U2Gui/DialogUtils.h> +#include <U2Gui/HelpButton.h> +#include <U2Gui/LastUsedDirHelper.h> +#include <U2Gui/U2FileDialog.h> + +#include "ImportCustomToolsTask.h" +#include "ImportExternalToolDialog.h" + +namespace U2 { + +ImportExternalToolDialog::ImportExternalToolDialog(QWidget *_parent) + : QDialog(_parent) +{ + setupUi(this); + + new HelpButton(this, buttonBox, HelpButton::INVALID_VALUE); + + connect(lePath, SIGNAL(textChanged(const QString &)), SLOT(sl_pathChanged())); + connect(tbBrowse, SIGNAL(clicked()), SLOT(sl_browse())); + + sl_pathChanged(); +} + +void ImportExternalToolDialog::sl_browse() { + LastUsedDirHelper lod("import external tool"); + const QString filter = DialogUtils::prepareFileFilter("UGENE external tool config file", { "xml" }, true, {}); + lod.url = U2FileDialog::getOpenFileName(this, tr("Select configuration file to import"), lod.dir, filter); + if (!lod.url.isEmpty()) { + lePath->setText(QDir::toNativeSeparators(lod.url)); + } +} + +void ImportExternalToolDialog::sl_pathChanged() { + buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!lePath->text().isEmpty()); +} + +void ImportExternalToolDialog::accept() { + AppContext::getTaskScheduler()->registerTopLevelTask(new ImportCustomToolsTask(lePath->text())); + QDialog::accept(); +} + +} // namespace U2 diff --git a/src/plugins/external_tool_support/src/custom_tools/ImportExternalToolDialog.h b/src/plugins/external_tool_support/src/custom_tools/ImportExternalToolDialog.h new file mode 100644 index 0000000000000000000000000000000000000000..d190f10d633c56290dddf47c5cb1a2b4ce76209e --- /dev/null +++ b/src/plugins/external_tool_support/src/custom_tools/ImportExternalToolDialog.h @@ -0,0 +1,42 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_IMPORT_EXTERNAL_TOOL_DIALOG_H_ +#define _U2_IMPORT_EXTERNAL_TOOL_DIALOG_H_ + +#include "ui_ImportExternalToolDialog.h" + +namespace U2 { + +class ImportExternalToolDialog : public QDialog, public Ui_ImportExternalToolDialog { + Q_OBJECT +public: + ImportExternalToolDialog(QWidget *parent); + +private slots: + void sl_browse(); + void sl_pathChanged(); + void accept(); +}; + +} // namespace U2 + +#endif // _U2_IMPORT_EXTERNAL_TOOL_DIALOG_H_ diff --git a/src/plugins/external_tool_support/src/custom_tools/ImportExternalToolDialog.ui b/src/plugins/external_tool_support/src/custom_tools/ImportExternalToolDialog.ui new file mode 100644 index 0000000000000000000000000000000000000000..1bd96a9c78d4e7d50ede8945cfc439074772a423 --- /dev/null +++ b/src/plugins/external_tool_support/src/custom_tools/ImportExternalToolDialog.ui @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>ImportExternalToolDialog</class> + <widget class="QDialog" name="ImportExternalToolDialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>544</width> + <height>90</height> + </rect> + </property> + <property name="windowTitle"> + <string>Import External Tool</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="sizeConstraint"> + <enum>QLayout::SetMinAndMaxSize</enum> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QLabel" name="lblPath"> + <property name="text"> + <string>External tool config</string> + </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <property name="leftMargin"> + <number>0</number> + </property> + <item> + <widget class="QLineEdit" name="lePath"/> + </item> + <item> + <widget class="QToolButton" name="tbBrowse"> + <property name="text"> + <string>...</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </item> + <item> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>buttonBox</sender> + <signal>accepted()</signal> + <receiver>ImportExternalToolDialog</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel"> + <x>248</x> + <y>254</y> + </hint> + <hint type="destinationlabel"> + <x>157</x> + <y>274</y> + </hint> + </hints> + </connection> + <connection> + <sender>buttonBox</sender> + <signal>rejected()</signal> + <receiver>ImportExternalToolDialog</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel"> + <x>316</x> + <y>260</y> + </hint> + <hint type="destinationlabel"> + <x>286</x> + <y>274</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/src/plugins/external_tool_support/src/custom_tools/LoadCustomExternalToolsTask.cpp b/src/plugins/external_tool_support/src/custom_tools/LoadCustomExternalToolsTask.cpp new file mode 100644 index 0000000000000000000000000000000000000000..38b12bbaf7196e18c36107605adea575292403c1 --- /dev/null +++ b/src/plugins/external_tool_support/src/custom_tools/LoadCustomExternalToolsTask.cpp @@ -0,0 +1,72 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QDir> + +#include <U2Core/AppContext.h> +#include <U2Core/AppSettings.h> +#include <U2Core/Settings.h> +#include <U2Core/U2SafePoints.h> +#include <U2Core/UserApplicationsSettings.h> + +#include "ImportCustomToolsTask.h" +#include "LoadCustomExternalToolsTask.h" +#include "RegisterCustomToolTask.h" + +namespace U2 { + +LoadCustomExternalToolsTask::LoadCustomExternalToolsTask() + : Task(tr("Load custom external tools"), TaskFlag_NoRun | TaskFlag_CancelOnSubtaskCancel) +{ + +} + +const QList<CustomExternalTool *> &LoadCustomExternalToolsTask::getTools() const { + return tools; +} + +void LoadCustomExternalToolsTask::prepare() { + QList<Task *> registerTask; + + const QString storagePath = AppContext::getAppSettings()->getUserAppsSettings()->getCustomToolsConfigsDirPath(); + + QDir dir(storagePath); + CHECK(dir.exists(), ); + + dir.setNameFilters(QStringList() << "*.xml"); + QFileInfoList fileList = dir.entryInfoList(); + + foreach (const QFileInfo &fileInfo, fileList) { + addSubTask(new RegisterCustomToolTask(fileInfo.filePath())); + } +} + +QList<Task *> LoadCustomExternalToolsTask::onSubTaskFinished(Task *subTask) { + QList<Task *> result; + RegisterCustomToolTask *registerTask = qobject_cast<RegisterCustomToolTask *>(subTask); + SAFE_POINT_EXT(nullptr != registerTask, setError("Unexpected task, can't cast it to RegisterCustomToolTask *"), result); + CustomExternalTool *tool = registerTask->getTool(); + CHECK(nullptr != tool, result); + tools << tool; + return result; +} + +} // namespace U2 diff --git a/src/plugins/external_tool_support/src/custom_tools/LoadCustomExternalToolsTask.h b/src/plugins/external_tool_support/src/custom_tools/LoadCustomExternalToolsTask.h new file mode 100644 index 0000000000000000000000000000000000000000..9859f670b5823e84ccf9e6cf8f602d0c19730945 --- /dev/null +++ b/src/plugins/external_tool_support/src/custom_tools/LoadCustomExternalToolsTask.h @@ -0,0 +1,47 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_LOAD_CUSTOM_EXTERNAL_TOOLS_TASK_H_ +#define _U2_LOAD_CUSTOM_EXTERNAL_TOOLS_TASK_H_ + +#include <U2Core/Task.h> + +namespace U2 { + +class CustomExternalTool; + +class LoadCustomExternalToolsTask : public Task { + Q_OBJECT +public: + LoadCustomExternalToolsTask(); + + const QList<CustomExternalTool *> &getTools() const; + +private: + void prepare() override; + QList<Task *> onSubTaskFinished(Task *subTask) override; + + QList<CustomExternalTool *> tools; +}; + +} // namespace U2 + +#endif // _U2_LOAD_CUSTOM_EXTERNAL_TOOLS_TASK_H_ diff --git a/src/plugins/external_tool_support/src/custom_tools/RegisterCustomToolTask.cpp b/src/plugins/external_tool_support/src/custom_tools/RegisterCustomToolTask.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8b0e10781419f0ceef3c04852fed30e83b9b1093 --- /dev/null +++ b/src/plugins/external_tool_support/src/custom_tools/RegisterCustomToolTask.cpp @@ -0,0 +1,60 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QScopedPointer> + +#include <U2Core/AppContext.h> +#include <U2Core/CustomExternalTool.h> +#include <U2Core/ExternalToolRegistry.h> +#include <U2Core/U2SafePoints.h> + +#include "CustomToolConfigParser.h" +#include "RegisterCustomToolTask.h" + +namespace U2 { + +RegisterCustomToolTask::RegisterCustomToolTask(const QString &_url) + : Task(tr("Register custom external tool"), TaskFlag_None), + url(_url), + registeredTool(nullptr) +{ + +} + +CustomExternalTool *RegisterCustomToolTask::getTool() const { + return registeredTool; +} + +void RegisterCustomToolTask::run() { + QScopedPointer<CustomExternalTool> tool(CustomToolConfigParser::parse(stateInfo, url)); + CHECK_OP(stateInfo, ); + + tool->setConfigFilePath(url); + + const bool registered = AppContext::getExternalToolRegistry()->registerEntry(tool.data()); + if (registered) { + registeredTool = tool.take(); + } else { + setError(tr("Can't register a custom external tool '%1'").arg(tool->getName())); + } +} + +} // namespace U2 diff --git a/src/plugins/external_tool_support/src/custom_tools/RegisterCustomToolTask.h b/src/plugins/external_tool_support/src/custom_tools/RegisterCustomToolTask.h new file mode 100644 index 0000000000000000000000000000000000000000..3f15458bd4e18e8cbf25663cd52d4468fb701055 --- /dev/null +++ b/src/plugins/external_tool_support/src/custom_tools/RegisterCustomToolTask.h @@ -0,0 +1,50 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_REGISTER_CUSTOM_TOOL_TASK_H_ +#define _U2_REGISTER_CUSTOM_TOOL_TASK_H_ + +#include <QDomDocument> + +#include <U2Core/Task.h> + +namespace U2 { + +class CustomExternalTool; + +class RegisterCustomToolTask : public Task { + Q_OBJECT +public: + RegisterCustomToolTask(const QString &url); + + CustomExternalTool *getTool() const; + +private: + void run() override; + + const QDomDocument config; + const QString url; + CustomExternalTool *registeredTool; +}; + +} // namespace U2 + +#endif // _U2_REGISTER_CUSTOM_TOOL_TASK_H_ diff --git a/src/plugins/external_tool_support/src/cutadapt/CutadaptSupport.cpp b/src/plugins/external_tool_support/src/cutadapt/CutadaptSupport.cpp index ec9f33d6de2ffa64cd3754c58833bed9798f977d..87cfec80fb497d1506ecd20e7852511f52a667da 100644 --- a/src/plugins/external_tool_support/src/cutadapt/CutadaptSupport.cpp +++ b/src/plugins/external_tool_support/src/cutadapt/CutadaptSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,8 +30,13 @@ namespace U2 { -CutadaptSupport::CutadaptSupport(const QString& name, const QString& path) - : ExternalTool(name, path) +const QString CutadaptSupport::ET_CUTADAPT = "cutadapt"; +const QString CutadaptSupport::ET_CUTADAPT_ID = "USUPP_CUTADAPT"; +const QString CutadaptSupport::ADAPTERS_DIR_NAME = "adapters"; +const QString CutadaptSupport::ADAPTERS_DATA_NAME = "Adapters file"; + +CutadaptSupport::CutadaptSupport(const QString& id, const QString& name, const QString& path) + : ExternalTool(id, name, path) { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/cmdline.png"); @@ -52,8 +57,8 @@ CutadaptSupport::CutadaptSupport(const QString& name, const QString& path) dpr->registerEntry(dp); } - toolRunnerProgramm = ET_PYTHON; - dependencies << ET_PYTHON; + toolRunnerProgram = PythonSupport::ET_PYTHON_ID; + dependencies << PythonSupport::ET_PYTHON_ID; } } //namespace U2 diff --git a/src/plugins/external_tool_support/src/cutadapt/CutadaptSupport.h b/src/plugins/external_tool_support/src/cutadapt/CutadaptSupport.h index 980eb6799ecf7906cf79852601b2f8a5dccd7f7f..fc0bfa8d42fc96ca5ee43c692a0df1547aebd013 100644 --- a/src/plugins/external_tool_support/src/cutadapt/CutadaptSupport.h +++ b/src/plugins/external_tool_support/src/cutadapt/CutadaptSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,16 +24,17 @@ #include <U2Core/ExternalToolRegistry.h> -#define ET_CUTADAPT "cutadapt" -#define ADAPTERS_DIR_NAME "adapters" -#define ADAPTERS_DATA_NAME "Adapters file" - namespace U2 { class CutadaptSupport : public ExternalTool { Q_OBJECT public: - CutadaptSupport(const QString& name, const QString& path = ""); + CutadaptSupport(const QString& id, const QString& name, const QString& path = ""); + + static const QString ET_CUTADAPT; + static const QString ET_CUTADAPT_ID; + static const QString ADAPTERS_DIR_NAME; + static const QString ADAPTERS_DATA_NAME; }; }//namespace diff --git a/src/plugins/external_tool_support/src/cutadapt/CutadaptWorker.cpp b/src/plugins/external_tool_support/src/cutadapt/CutadaptWorker.cpp index 4b71a98f24300cffd879d8cc05f1a15288c650dc..fa45a097d6411fb47d009d4b0ef716e1b0dbf73b 100644 --- a/src/plugins/external_tool_support/src/cutadapt/CutadaptWorker.cpp +++ b/src/plugins/external_tool_support/src/cutadapt/CutadaptWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -86,7 +86,7 @@ void CutAdaptFastqWorkerFactory::init() { U2DataPath* dataPath = NULL; U2DataPathRegistry* dpr = AppContext::getDataPathRegistry(); if (dpr){ - U2DataPath* dp = dpr->getDataPathByName(ADAPTERS_DATA_NAME); + U2DataPath* dp = dpr->getDataPathByName(CutadaptSupport::ADAPTERS_DATA_NAME); if (dp && dp->isValid()){ dataPath = dp; } @@ -122,7 +122,7 @@ void CutAdaptFastqWorkerFactory::init() { CutAdaptFastqWorker::tr("Select the custom output folder.")); Descriptor outName(BaseNGSWorker::OUT_NAME_ID, CutAdaptFastqWorker::tr("Output file name"), - CutAdaptFastqWorker::tr("A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extention.")); + CutAdaptFastqWorker::tr("A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extension.")); Descriptor adapters(ADAPTERS_URL, CutAdaptFastqWorker::tr("FASTA file with 3' adapters"), CutAdaptFastqWorker::tr("A FASTA file with one or multiple sequences of adapter that were ligated to the 3' end. " @@ -192,7 +192,7 @@ void CutAdaptFastqWorkerFactory::init() { ActorPrototype* proto = new IntegralBusActorPrototype(desc, p, a); proto->setEditor(new DelegateEditor(delegates)); proto->setPrompter(new CutAdaptFastqPrompter()); - proto->addExternalTool(ET_CUTADAPT); + proto->addExternalTool(CutadaptSupport::ET_CUTADAPT_ID); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_NGS_BASIC(), proto); DomainFactory *localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID); @@ -247,7 +247,7 @@ void CutAdaptFastqTask::prepareStep(){ algoLog.error(tr("Can not copy the result file to: %1").arg(settings.outDir + settings.outName)); } }else{ - ExternalToolRunTask* etTask = getExternalToolTask(ET_CUTADAPT, new CutAdaptParser()); + ExternalToolRunTask* etTask = getExternalToolTask(CutadaptSupport::ET_CUTADAPT_ID, new CutAdaptParser()); CHECK(etTask != NULL, ); addSubTask(etTask); diff --git a/src/plugins/external_tool_support/src/cutadapt/CutadaptWorker.h b/src/plugins/external_tool_support/src/cutadapt/CutadaptWorker.h index ba2e7526763afd551cad2e6bdb752f8f08202844..a9cb8ad448016154a23930285afc19452fa0f850 100644 --- a/src/plugins/external_tool_support/src/cutadapt/CutadaptWorker.h +++ b/src/plugins/external_tool_support/src/cutadapt/CutadaptWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/fastqc/FastqcSupport.cpp b/src/plugins/external_tool_support/src/fastqc/FastqcSupport.cpp index 59d7b1500d91ea1dac434eeeb8af6c51c314ae43..791d7900f20127e83bf10371fac82db22a5772f7 100644 --- a/src/plugins/external_tool_support/src/fastqc/FastqcSupport.cpp +++ b/src/plugins/external_tool_support/src/fastqc/FastqcSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -35,8 +35,10 @@ namespace U2 { +const QString FastQCSupport::ET_FASTQC = "FastQC"; +const QString FastQCSupport::ET_FASTQC_ID = "USUPP_FASTQC"; -FastQCSupport::FastQCSupport(const QString& name, const QString& path) : ExternalTool(name, path) +FastQCSupport::FastQCSupport(const QString& id, const QString& name, const QString& path) : ExternalTool(id, name, path) { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/cmdline.png"); @@ -52,9 +54,9 @@ FastQCSupport::FastQCSupport(const QString& name, const QString& path) : Externa versionRegExp = QRegExp("FastQC v(\\d+.\\d+.\\d+)"); toolKitName = "FastQC"; - toolRunnerProgramm = ET_PERL; - dependencies << ET_JAVA; - dependencies << ET_PERL; + toolRunnerProgram = PerlSupport::ET_PERL_ID; + dependencies << JavaSupport::ET_JAVA_ID; + dependencies << PerlSupport::ET_PERL_ID; ExternalTool *java = getJava(); CHECK(NULL != java, ); @@ -75,7 +77,7 @@ void FastQCSupport::sl_javaPathChanged() { ExternalTool * FastQCSupport::getJava() { ExternalToolRegistry *registry = AppContext::getExternalToolRegistry(); SAFE_POINT(NULL != registry, L10N::nullPointerError("External tool registry"), NULL); - ExternalTool *java = registry->getByName(ET_JAVA); + ExternalTool *java = registry->getById(JavaSupport::ET_JAVA_ID); SAFE_POINT(NULL != java, L10N::nullPointerError("Java tool"), NULL); return java; } diff --git a/src/plugins/external_tool_support/src/fastqc/FastqcSupport.h b/src/plugins/external_tool_support/src/fastqc/FastqcSupport.h index 0ca75d538a1cc0462d1673eccfd153d3a5369633..89dfa077e767cadeb4d96d2780dc141d934b8215 100644 --- a/src/plugins/external_tool_support/src/fastqc/FastqcSupport.h +++ b/src/plugins/external_tool_support/src/fastqc/FastqcSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,17 +24,18 @@ #include <U2Core/ExternalToolRegistry.h> -#define ET_FASTQC "FastQC" - namespace U2 { class FastQCSupport : public ExternalTool { Q_OBJECT public: - FastQCSupport(const QString& name, const QString& path = ""); + FastQCSupport(const QString& id, const QString& name, const QString& path = ""); static ExternalTool * getJava(); + static const QString ET_FASTQC; + static const QString ET_FASTQC_ID; + private slots: void sl_javaPathChanged(); }; diff --git a/src/plugins/external_tool_support/src/fastqc/FastqcTask.cpp b/src/plugins/external_tool_support/src/fastqc/FastqcTask.cpp index 566238bdc6102aac90d1f1b1748743afff27c7cd..6f3099af1b5da249851921fdf108c27441c4488e 100644 --- a/src/plugins/external_tool_support/src/fastqc/FastqcTask.cpp +++ b/src/plugins/external_tool_support/src/fastqc/FastqcTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -37,50 +37,84 @@ namespace U2 { ////////////////////////////////////////////////////////////////////////// //FastQCParser -FastQCParser::FastQCParser() - :ExternalToolLogParser(),progress(-1) -{ +const QMap<FastQCParser::ErrorType, QString> FastQCParser::initWellKnownErrors() { + QMap<ErrorType, QString> errors; + errors.insertMulti(Common, "ERROR"); + errors.insertMulti(Common, "Failed to process file"); + errors.insertMulti(Multiline, "uk.ac.babraham.FastQC.Sequence.SequenceFormatException"); + errors.insertMulti(Multiline, "didn't start with '+'"); + return errors; } -void FastQCParser::parseOutput( const QString& partOfLog ){ - ExternalToolLogParser::parseOutput(partOfLog); -} +const QMap<FastQCParser::ErrorType, QString> FastQCParser::WELL_KNOWN_ERRORS = initWellKnownErrors(); + +FastQCParser::FastQCParser(const QString& _inputFile) + : ExternalToolLogParser(), + inputFile(_inputFile), + progress(-1) +{ -void FastQCParser::parseErrOutput( const QString& partOfLog ){ - lastPartOfLog=partOfLog.split(QRegExp("(\n|\r)")); - lastPartOfLog.first()=lastErrLine+lastPartOfLog.first(); - lastErrLine=lastPartOfLog.takeLast(); - foreach(const QString& buf, lastPartOfLog){ - if(buf.contains("ERROR", Qt::CaseInsensitive) || buf.contains("Failed to process file", Qt::CaseInsensitive)){ - coreLog.error("FastQC: " + buf); - } - } } -int FastQCParser::getProgress(){ +int FastQCParser::getProgress() { //parsing Approx 20% complete for filename - if(!lastPartOfLog.isEmpty()){ - QString lastMessage=lastPartOfLog.last(); + if(!lastPartOfLog.isEmpty()) { + QString lastMessage = lastPartOfLog.last(); QRegExp rx("Approx (\\d+)% complete"); - if(lastMessage.contains(rx)){ + if(lastMessage.contains(rx)) { SAFE_POINT(rx.indexIn(lastMessage) > -1, "bad progress index", 0); int step = rx.cap(1).toInt(); - if(step > progress){ - return progress = step; + if(step > progress) { + return progress = step; } } } return progress; } +void FastQCParser::processErrLine(const QString &line) { + if (isCommonError(line)){ + ExternalToolLogParser::setLastError(tr("FastQC: %1").arg(line)); + } else if (isMultiLineError(line)) { + setLastError(tr("FastQC failed to process input file '%1'. Make sure each read takes exactly four lines.") + .arg(inputFile)); + } +} + +void FastQCParser::setLastError(const QString &value) { + ExternalToolLogParser::setLastError(value); + foreach(const QString& buf, lastPartOfLog) { + CHECK_CONTINUE(!buf.isEmpty()); + + ioLog.trace(buf); + } +} +bool FastQCParser::isCommonError(const QString& err) const { + foreach(const QString& commonError, WELL_KNOWN_ERRORS.values(Common)) { + CHECK_CONTINUE(err.contains(commonError, Qt::CaseInsensitive)); + + return true; + } + + return false; +} + +bool FastQCParser::isMultiLineError(const QString& err) { + QStringList multiLineErrors = WELL_KNOWN_ERRORS.values(Multiline); + if (err.contains(multiLineErrors.first()) && err.contains(multiLineErrors.last())) { + return true; + } + + return false; +} ////////////////////////////////////////////////////////////////////////// //FastQCTask FastQCTask::FastQCTask(const FastQCSetting &settings) -:ExternalToolSupportTask(QString("FastQC for %1").arg(settings.inputUrl), TaskFlags_FOSE_COSC) -,settings(settings) +:ExternalToolSupportTask(QString("FastQC for %1").arg(settings.inputUrl), TaskFlags_FOSE_COSC | TaskFlag_MinimizeSubtaskErrorText) +, settings(settings), temporaryDir(AppContext::getAppSettings()->getUserAppsSettings()->getUserTemporaryDirPath() + "/") { } @@ -104,8 +138,7 @@ void FastQCTask::prepare(){ const QStringList args = getParameters(stateInfo); CHECK_OP(stateInfo, ); - - ExternalToolRunTask* etTask = new ExternalToolRunTask(ET_FASTQC, args, new FastQCParser(), settings.outDir); + ExternalToolRunTask* etTask = new ExternalToolRunTask(FastQCSupport::ET_FASTQC_ID, args, new FastQCParser(settings.inputUrl), temporaryDir.path()); setListenerForTask(etTask); addSubTask(etTask); } @@ -113,12 +146,23 @@ void FastQCTask::prepare(){ void FastQCTask::run(){ CHECK_OP(stateInfo, ); - const QFileInfo resFile(getResFileUrl()); + QString resFileUrl = getResFileUrl(); + const QFileInfo resFile(resFileUrl); if (!resFile.exists()) { setError(tr("Result file does not exist: %1. See the log for details.").arg(resFile.absoluteFilePath())); return ; } - resultUrl = getResFileUrl(); + if (!settings.fileName.isEmpty()) { + QFileInfo fi(settings.fileName); + resultUrl = GUrlUtils::rollFileName(settings.outDir + QDir::separator() + fi.baseName() + ".html", "_"); + } else { + QFileInfo fi(settings.inputUrl); + resultUrl = GUrlUtils::rollFileName(settings.outDir + QDir::separator() + fi.baseName() + "_fastqc.html", "_"); + } + QFile result(resFileUrl); + if (!result.rename(resultUrl)) { + setError(tr("Unable to move result file from temporary directory to desired location: %1.").arg(resultUrl)); + } } QString FastQCTask::getResFileUrl() const{ @@ -137,7 +181,7 @@ QString FastQCTask::getResFileUrl() const{ .replace(QRegExp(".bam$"), ""); name += "_fastqc.html"; - res = settings.outDir + QDir::separator() + name; + res = temporaryDir.path() + QDir::separator() + name; return res; } @@ -145,7 +189,7 @@ QStringList FastQCTask::getParameters(U2OpStatus & /*os*/) const{ QStringList res; res << QString("-o"); - res << settings.outDir; + res << temporaryDir.path(); if(!settings.conts.isEmpty()){ diff --git a/src/plugins/external_tool_support/src/fastqc/FastqcTask.h b/src/plugins/external_tool_support/src/fastqc/FastqcTask.h index a03eaf22cea9aa724acd342151c42877e833ed0c..ce33deb35be1d336995534499a2010defb947e8b 100644 --- a/src/plugins/external_tool_support/src/fastqc/FastqcTask.h +++ b/src/plugins/external_tool_support/src/fastqc/FastqcTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,6 +22,8 @@ #ifndef _U2_FASTQC_TASK_H_ #define _U2_FASTQC_TASK_H_ +#include <QTemporaryDir> + #include <U2Core/Task.h> #include <U2Core/ExternalToolRunTask.h> @@ -36,6 +38,7 @@ public: QString outDir; QString adapters; QString conts; + QString fileName; }; class FastQCTask : public ExternalToolSupportTask { @@ -55,20 +58,37 @@ protected: protected: FastQCSetting settings; QString resultUrl; +private: + QTemporaryDir temporaryDir; }; class FastQCParser : public ExternalToolLogParser { public: - FastQCParser(); + FastQCParser(const QString& inputFile); - void parseOutput(const QString& partOfLog); - void parseErrOutput(const QString& partOfLog); - int getProgress(); + int getProgress() override; + +protected: + void processErrLine(const QString &line) override; + void setLastError(const QString &value) override; private: + enum ErrorType { + Common, + Multiline + }; + + bool isCommonError(const QString& err) const; + bool isMultiLineError(const QString& err); + + static const QMap<ErrorType, QString> initWellKnownErrors(); + QString lastErrLine; + QString inputFile; int progress; + + static const QMap<ErrorType, QString> WELL_KNOWN_ERRORS; }; }//namespace diff --git a/src/plugins/external_tool_support/src/fastqc/FastqcWorker.cpp b/src/plugins/external_tool_support/src/fastqc/FastqcWorker.cpp index 153eeb1ae232f2f6e93bde387c58dfb2a5cf1248..07bdb982315350d9429fe699f13779113121b184 100644 --- a/src/plugins/external_tool_support/src/fastqc/FastqcWorker.cpp +++ b/src/plugins/external_tool_support/src/fastqc/FastqcWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -38,6 +38,8 @@ #include <U2Designer/DelegateEditors.h> +#include <U2Gui/DialogUtils.h> + #include <U2Formats/BAMUtils.h> #include <U2Lang/ActorPrototypeRegistry.h> @@ -63,6 +65,7 @@ const QString FastQCWorker::BASE_FASTQC_SUBDIR = "FastQC"; const QString FastQCWorker::INPUT_PORT = "in-file"; const QString FastQCWorker::OUT_MODE_ID = "out-mode"; const QString FastQCWorker::CUSTOM_DIR_ID = "custom-dir"; +const QString FastQCWorker::OUT_FILE = "out-file"; const QString FastQCWorker::ADAPTERS = "adapter"; const QString FastQCWorker::CONTAMINANTS = "contaminants"; @@ -107,11 +110,14 @@ void FastQCFactory::init() { "<b>Workflow</b> - internal workflow folder. " "<b>Input file</b> - the folder of the input file.")); + Descriptor outFile(FastQCWorker::OUT_FILE, FastQCWorker::tr("Output file"), + FastQCWorker::tr("Specify the output file name.")); + Descriptor customDir(FastQCWorker::CUSTOM_DIR_ID, FastQCWorker::tr("Custom folder"), FastQCWorker::tr("Select the custom output folder.")); Descriptor adapters(FastQCWorker::ADAPTERS, FastQCWorker::tr("List of adapters"), - FastQCWorker::tr("Specifies a non-default file which contains the list of adapter sequences which will be explicity searched against " + FastQCWorker::tr("Specifies a non-default file which contains the list of adapter sequences which will be explicitly searched against " "the library. The file must contain sets of named adapters " "in the form name[tab]sequence. Lines prefixed with a hash " "will be ignored.")); @@ -123,14 +129,14 @@ void FastQCFactory::init() { "form name[tab]sequence. Lines prefixed with a hash will " "be ignored.")); - - a << new Attribute(outDir, BaseTypes::NUM_TYPE(), false, QVariant(FileAndDirectoryUtils::WORKFLOW_INTERNAL)); + a << new Attribute(outDir, BaseTypes::NUM_TYPE(), (Attribute::Flags) Attribute::Hidden, QVariant(FileAndDirectoryUtils::WORKFLOW_INTERNAL)); Attribute* customDirAttr = new Attribute(customDir, BaseTypes::STRING_TYPE(), false, QVariant("")); customDirAttr->addRelation(new VisibilityRelation(FastQCWorker::OUT_MODE_ID, FileAndDirectoryUtils::CUSTOM)); a << customDirAttr; a << new Attribute( adapters, BaseTypes::STRING_TYPE(), false, ""); a << new Attribute( conts, BaseTypes::STRING_TYPE(), false, ""); + a << new Attribute(outFile, BaseTypes::STRING_TYPE(), Attribute::Required | Attribute::NeedValidateEncoding | Attribute::CanBeEmpty); } QMap<QString, PropertyDelegate*> delegates; @@ -149,14 +155,19 @@ void FastQCFactory::init() { delegates[FastQCWorker::ADAPTERS] = new URLDelegate("", "", false, false, false); delegates[FastQCWorker::CONTAMINANTS] = new URLDelegate("", "", false, false, false); + + DelegateTags outputUrlTags; + outputUrlTags.set(DelegateTags::PLACEHOLDER_TEXT, FastQCWorker::tr("Auto")); + outputUrlTags.set(DelegateTags::FILTER, DialogUtils::prepareFileFilter("HTML", QStringList("html"), false, QStringList())); + delegates[FastQCWorker::OUT_FILE] = new URLDelegate(outputUrlTags, "fastqc/output"); } ActorPrototype* proto = new IntegralBusActorPrototype(desc, p, a); proto->setEditor(new DelegateEditor(delegates)); proto->setPrompter(new FastQCPrompter()); - proto->addExternalTool(ET_JAVA); - proto->addExternalTool(ET_FASTQC); - proto->addExternalTool(ET_PERL); + proto->addExternalTool(JavaSupport::ET_JAVA_ID); + proto->addExternalTool(FastQCSupport::ET_FASTQC_ID); + proto->addExternalTool(PerlSupport::ET_PERL_ID); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_NGS_BASIC(), proto); DomainFactory *localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID); @@ -180,18 +191,27 @@ Task * FastQCWorker::tick() { if (inputUrlPort->hasMessage()) { const QString url = takeUrl(); CHECK(!url.isEmpty(), NULL); + QString outFile = getValue<QString>(OUT_FILE); + FastQCSetting settings; + if (outFile.isEmpty()) { + QString outputDir = FileAndDirectoryUtils::createWorkingDir(url, getValue<int>(OUT_MODE_ID), "", context->workingDir()); + settings.outDir = outputDir + FastQCWorker::BASE_FASTQC_SUBDIR; + QDir outQDir(settings.outDir); + if (!outQDir.exists()) { + U2OpStatusImpl os; + GUrlUtils::createDirectory(settings.outDir, "_", os); + } + settings.fileName = ""; + } else { + QFileInfo outFileFi(outFile); + settings.outDir = outFileFi.absoluteDir().absolutePath(); + settings.fileName = outFileFi.fileName(); + } + settings.inputUrl = url; + settings.adapters = getValue<QString>(ADAPTERS); + settings.conts = getValue<QString>(CONTAMINANTS); - QString outputDir = FileAndDirectoryUtils::createWorkingDir(url, getValue<int>(OUT_MODE_ID), getValue<QString>(CUSTOM_DIR_ID), context->workingDir()); - U2OpStatusImpl os; - outputDir = GUrlUtils::createDirectory(outputDir + FastQCWorker::BASE_FASTQC_SUBDIR, "_", os); - - FastQCSetting setting; - setting.inputUrl = url; - setting.outDir = outputDir; - setting.adapters = getValue<QString>(ADAPTERS); - setting.conts = getValue<QString>(CONTAMINANTS); - - FastQCTask *t = new FastQCTask (setting); + FastQCTask *t = new FastQCTask (settings); t->addListeners(createLogListeners()); connect(new TaskSignalMapper(t), SIGNAL(si_taskFinished(Task*)), SLOT(sl_taskFinished(Task*))); return t; diff --git a/src/plugins/external_tool_support/src/fastqc/FastqcWorker.h b/src/plugins/external_tool_support/src/fastqc/FastqcWorker.h index 499663ec1104cd1908b7720eacaa9b2b4eaa9ee0..3543f0499afd312f258be8e7e03f21c5fc641d11 100644 --- a/src/plugins/external_tool_support/src/fastqc/FastqcWorker.h +++ b/src/plugins/external_tool_support/src/fastqc/FastqcWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -54,6 +54,7 @@ public: static const QString INPUT_PORT; static const QString OUT_MODE_ID; static const QString CUSTOM_DIR_ID; + static const QString OUT_FILE; static const QString ADAPTERS; static const QString CONTAMINANTS; diff --git a/src/plugins/external_tool_support/src/hmmer/ConvertAlignment2StockholmTask.cpp b/src/plugins/external_tool_support/src/hmmer/ConvertAlignment2StockholmTask.cpp index 26de4741b204ddc1c67c322681bfecd7a7bf24ce..24510bc9e93d42d90df059deb3be241dde7cde42 100644 --- a/src/plugins/external_tool_support/src/hmmer/ConvertAlignment2StockholmTask.cpp +++ b/src/plugins/external_tool_support/src/hmmer/ConvertAlignment2StockholmTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/hmmer/ConvertAlignment2StockholmTask.h b/src/plugins/external_tool_support/src/hmmer/ConvertAlignment2StockholmTask.h index 22fffd2ec170e637bf47d40880072b129a8e6259..60a2689e4f7f97f69776989010d6a74f5a195f6f 100644 --- a/src/plugins/external_tool_support/src/hmmer/ConvertAlignment2StockholmTask.h +++ b/src/plugins/external_tool_support/src/hmmer/ConvertAlignment2StockholmTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerBuildDialog.cpp b/src/plugins/external_tool_support/src/hmmer/HmmerBuildDialog.cpp index 3348999095dcb980dfb6a400e37de82301e7d971..5b5e1a154cdfb7658d36d38fb975a6494382c489 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerBuildDialog.cpp +++ b/src/plugins/external_tool_support/src/hmmer/HmmerBuildDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -66,7 +66,7 @@ void HmmerBuildDialog::setSignalsAndSlots() { void HmmerBuildDialog::initialize() { setupUi(this); - new HelpButton(this, buttonBox, "22056058"); + new HelpButton(this, buttonBox, "24742593"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Build")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerBuildDialog.h b/src/plugins/external_tool_support/src/hmmer/HmmerBuildDialog.h index 9fc26902266b824b9260c88746b3f9345125e492..a1999849e7b2c00c60164d593171286374a8bbeb 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerBuildDialog.h +++ b/src/plugins/external_tool_support/src/hmmer/HmmerBuildDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerBuildFromFileTask.cpp b/src/plugins/external_tool_support/src/hmmer/HmmerBuildFromFileTask.cpp index 796573b41e47b28567296900bb37b9943d961791..7611957a43507bc59ee1f443c1f096942beb7a23 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerBuildFromFileTask.cpp +++ b/src/plugins/external_tool_support/src/hmmer/HmmerBuildFromFileTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerBuildFromFileTask.h b/src/plugins/external_tool_support/src/hmmer/HmmerBuildFromFileTask.h index a561602968d6637b16cb331430d38a7db693d3dd..5eebc9674ea05864e075e1f935bec8957e057f5a 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerBuildFromFileTask.h +++ b/src/plugins/external_tool_support/src/hmmer/HmmerBuildFromFileTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerBuildFromMsaTask.cpp b/src/plugins/external_tool_support/src/hmmer/HmmerBuildFromMsaTask.cpp index af49637415d043205aca4eab15f1087839eafb1e..f42ce202d980181bbef41751f7ff0dbafbb392df 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerBuildFromMsaTask.cpp +++ b/src/plugins/external_tool_support/src/hmmer/HmmerBuildFromMsaTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerBuildFromMsaTask.h b/src/plugins/external_tool_support/src/hmmer/HmmerBuildFromMsaTask.h index dc12454857e78e62613fb4f40e4e7c53efa970f2..141a9c905bdc431f8805df56b644c735445e6279 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerBuildFromMsaTask.h +++ b/src/plugins/external_tool_support/src/hmmer/HmmerBuildFromMsaTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerBuildSettings.cpp b/src/plugins/external_tool_support/src/hmmer/HmmerBuildSettings.cpp index f621f920f6211de58037755fff6f67631c4f09d9..51347e1ba1dee597495bd17495e135d3447dede5 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerBuildSettings.cpp +++ b/src/plugins/external_tool_support/src/hmmer/HmmerBuildSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerBuildSettings.h b/src/plugins/external_tool_support/src/hmmer/HmmerBuildSettings.h index 8c69fef2f08d094653611a1796c6397af50bd2b6..41f75837cdf40a9a505bc2bde992863434cee012 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerBuildSettings.h +++ b/src/plugins/external_tool_support/src/hmmer/HmmerBuildSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerBuildTask.cpp b/src/plugins/external_tool_support/src/hmmer/HmmerBuildTask.cpp index a031e6b833cba449156f5f74d1d3bb9bf2ea664d..b1ff58992b4322d397d48a22eb0c57bd4ce0ffa6 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerBuildTask.cpp +++ b/src/plugins/external_tool_support/src/hmmer/HmmerBuildTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -31,7 +31,7 @@ namespace U2 { HmmerBuildTask::HmmerBuildTask(const HmmerBuildSettings &settings, const QString &msaUrl) - : ExternalToolRunTask(HmmerSupport::BUILD_TOOL, getArguments(settings, msaUrl), new Hmmer3LogParser()), + : ExternalToolRunTask(HmmerSupport::BUILD_TOOL_ID, getArguments(settings, msaUrl), new Hmmer3LogParser()), settings(settings), stockholmMsaUrl(msaUrl) { diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerBuildTask.h b/src/plugins/external_tool_support/src/hmmer/HmmerBuildTask.h index 2e60f5f1640bef634897c5dbcf8ef518849b5a2f..005106752c1cb4011dc98e1d6ce17c532b700b6a 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerBuildTask.h +++ b/src/plugins/external_tool_support/src/hmmer/HmmerBuildTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerBuildTaskTest.cpp b/src/plugins/external_tool_support/src/hmmer/HmmerBuildTaskTest.cpp index 39d41b01f936a07358305d2126762fbc701c97ed..bb0f93cffbcfb9d74b367b4432af0644d35283e8 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerBuildTaskTest.cpp +++ b/src/plugins/external_tool_support/src/hmmer/HmmerBuildTaskTest.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -296,13 +296,11 @@ Task::ReportResult GTest_UHMMER3Build::report() { } void GTest_UHMMER3Build::cleanup() { - if (delOutFile) { + if (!hasError() && delOutFile) { QFile::remove(outFile); } -} -GTest_UHMMER3Build::~GTest_UHMMER3Build() { - cleanup(); + XmlTest::cleanup(); } /************************** diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerBuildTaskTest.h b/src/plugins/external_tool_support/src/hmmer/HmmerBuildTaskTest.h index bdbbe8bab80db0e3af6ef7f926df0e8eb965787b..d2d47a5c96767ac7badf532438731157b3cc7f31 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerBuildTaskTest.h +++ b/src/plugins/external_tool_support/src/hmmer/HmmerBuildTaskTest.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,7 +33,7 @@ namespace U2 { /***************************************** * Builds hmm profile from input file *****************************************/ -class GTest_UHMMER3Build : public GTest { +class GTest_UHMMER3Build : public XmlTest { Q_OBJECT public: static const QString INPUT_FILE_TAG; @@ -54,8 +54,7 @@ public: static void setBuildSettings(HmmerBuildSettings & settings, const QDomElement& el, TaskStateInfo & ti); public: - SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_UHMMER3Build, "uhmmer3-build"); - ~GTest_UHMMER3Build(); + SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_UHMMER3Build, "uhmmer3-build") virtual void prepare(); ReportResult report(); @@ -77,7 +76,7 @@ private: /***************************************** * Totally compares two hmm files *****************************************/ -class GTest_CompareHmmFiles : public GTest { +class GTest_CompareHmmFiles : public XmlTest { Q_OBJECT public: static const QString FILE1_NAME_TAG; @@ -102,4 +101,4 @@ private: } -#endif \ No newline at end of file +#endif diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerBuildWorker.cpp b/src/plugins/external_tool_support/src/hmmer/HmmerBuildWorker.cpp index 3c005f39d7b1b33e62189020c21df442ca03557e..694ee4321ac2a8e8a32011f140c8eada3f5fd3c5 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerBuildWorker.cpp +++ b/src/plugins/external_tool_support/src/hmmer/HmmerBuildWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -90,7 +90,7 @@ void HmmerBuildWorkerFactory::init() { proto->setEditor(new DelegateEditor(delegates)); proto->setIconPath(":/external_tool_support/images/hmmer.png"); proto->setPrompter(new HmmerBuildPrompter()); - proto->addExternalTool(HmmerSupport::BUILD_TOOL); + proto->addExternalTool(HmmerSupport::BUILD_TOOL_ID); WorkflowEnv::getProtoRegistry()->registerProto(Descriptor("hmmer3", HmmerBuildWorker::tr("HMMER3 Tools"), ""), proto); DomainFactory* localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID); diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerBuildWorker.h b/src/plugins/external_tool_support/src/hmmer/HmmerBuildWorker.h index dca78f92dbe0c674f5fec626431ac5641cf07d06..723cac3df8fb45195cdefad80fb81e6e0d290830 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerBuildWorker.h +++ b/src/plugins/external_tool_support/src/hmmer/HmmerBuildWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerParseSearchResultsTask.cpp b/src/plugins/external_tool_support/src/hmmer/HmmerParseSearchResultsTask.cpp index 3bdca57eb51e83d189f0252d24e157fe0bb98092..7460797358085f1d1f04242ace3275d9431cd2a1 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerParseSearchResultsTask.cpp +++ b/src/plugins/external_tool_support/src/hmmer/HmmerParseSearchResultsTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerParseSearchResultsTask.h b/src/plugins/external_tool_support/src/hmmer/HmmerParseSearchResultsTask.h index 74eba8102956825734851a3ba08b52f6b8a862ee..e7a4920cd552aeaff8ce040370b61e82e33f6bd3 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerParseSearchResultsTask.h +++ b/src/plugins/external_tool_support/src/hmmer/HmmerParseSearchResultsTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerSearchDialog.cpp b/src/plugins/external_tool_support/src/hmmer/HmmerSearchDialog.cpp index 277871ecc4f7c2fee0bb7fff2ec3e8357d40ad8b..12e3d93975fedffe20dc336ed8c5ad9f86e1114c 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerSearchDialog.cpp +++ b/src/plugins/external_tool_support/src/hmmer/HmmerSearchDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -67,7 +67,7 @@ void HmmerSearchDialog::init(U2SequenceObject *seqObj){ setupUi(this); SAFE_POINT(NULL != seqObj, L10N::nullPointerError("sequence object"), ); - new HelpButton(this, buttonBox, "22056059"); + new HelpButton(this, buttonBox, "24742594"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Run")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerSearchDialog.h b/src/plugins/external_tool_support/src/hmmer/HmmerSearchDialog.h index 01f5770bd7703d69e6e71a0d582632f735fe59b0..a3a0b6a0707cac13cff0b202a086cbd6409440c2 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerSearchDialog.h +++ b/src/plugins/external_tool_support/src/hmmer/HmmerSearchDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerSearchSettings.cpp b/src/plugins/external_tool_support/src/hmmer/HmmerSearchSettings.cpp index cf111eae556ec3706832ea30475ce47e8abba548..4eb3893c9ef0f4bc27cd8ea3905016f48a25868f 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerSearchSettings.cpp +++ b/src/plugins/external_tool_support/src/hmmer/HmmerSearchSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerSearchSettings.h b/src/plugins/external_tool_support/src/hmmer/HmmerSearchSettings.h index c5f6e2925962c23e358a758f53a37920cef49245..5634ef4e575ad3cab5a311060601bdaf287c4fff 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerSearchSettings.h +++ b/src/plugins/external_tool_support/src/hmmer/HmmerSearchSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -43,10 +43,10 @@ public: bool validate() const; - double e; // -E: report sequences <= this e-value treshold in output - double t; // -T: report sequences >= this score treshold in output + double e; // -E: report sequences <= this e-value threshold in output + double t; // -T: report sequences >= this score threshold in output double z; // -Z: set # of camparisons done, for e-value calculation - double domE; // --domE: report domains <= this e-value treshold in output + double domE; // --domE: report domains <= this e-value threshold in output double domT; // --domT: report domains >= this score cutoff in output double domZ; // --domZ: set number of significant seqs, for domain e-value calibration BitCutoffs useBitCutoffs; // --cut_ga: use profile's GA gathering cutoffs to set -T, --domT diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerSearchTask.cpp b/src/plugins/external_tool_support/src/hmmer/HmmerSearchTask.cpp index 9e2324523a48ee9d7aab46d77b4272351ff074d2..7427e829150871b6fffa4452dfee443798a8b5cb 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerSearchTask.cpp +++ b/src/plugins/external_tool_support/src/hmmer/HmmerSearchTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -29,6 +29,7 @@ #include <U2Core/CreateAnnotationTask.h> #include <U2Core/DNASequenceObject.h> #include <U2Core/GUrlUtils.h> +#include <U2Core/IOAdapterUtils.h> #include <U2Core/L10n.h> #include <U2Core/U2OpStatusUtils.h> #include <U2Core/U2SafePoints.h> @@ -50,7 +51,8 @@ HmmerSearchTask::HmmerSearchTask(const HmmerSearchSettings &settings) saveSequenceTask(NULL), hmmerTask(NULL), parseTask(NULL), - removeWorkingDir(false) + removeWorkingDir(false), + hmm2Mode(false) { GCOUNTER(cvar, tvar, "HMMER Search"); SAFE_POINT_EXT(settings.validate(), setError("Settings are invalid"), ); @@ -99,7 +101,11 @@ QList<Task *> HmmerSearchTask::onSubTaskFinished(Task *subTask) { QString HmmerSearchTask::generateReport() const { QString res; res += "<table>"; - res += "<tr><td><b>" + tr("HMM profile used: ") + "</b></td><td>" + QFileInfo(settings.hmmProfileUrl).absoluteFilePath() + "</td></tr>"; + res += "<tr><td><b>" + tr("HMM profile used: ") + "</b></td><td>" + QFileInfo(settings.hmmProfileUrl).absoluteFilePath() + + ( hmm2Mode + ? " <br>Warning: it is not recommended to use HMMER2 models with HMMER3. Details: https://cryptogenomicon.org/2009/03/25/using-hmmer2-models-with-hmmer3-dont-do-that/" + : "") + + "</td></tr>"; if (hasError() || isCanceled()) { res += "<tr><td><b>" + tr("Task was not finished") + "</b></td><td></td></tr>"; @@ -227,10 +233,19 @@ void HmmerSearchTask::prepareSequenceSaveTask() { saveSequenceTask->setSubtaskProgressWeight(5); } +static bool isHmm2Profile(const QString& url) { + QByteArray header = IOAdapterUtils::readFileHeader(GUrl(url), 6); + return header.startsWith("HMMER2"); +} + void HmmerSearchTask::prepareHmmerTask() { - hmmerTask = new ExternalToolRunTask(HmmerSupport::SEARCH_TOOL, getArguments(), new Hmmer3LogParser()); + hmmerTask = new ExternalToolRunTask(HmmerSupport::SEARCH_TOOL_ID, getArguments(), new Hmmer3LogParser()); setListenerForTask(hmmerTask); hmmerTask->setSubtaskProgressWeight(85); + hmm2Mode = isHmm2Profile(settings.hmmProfileUrl); + if (hmm2Mode) { + stateInfo.addWarning(tr("Warning: it is not recommended to use HMMER2 models with HMMER3")); + } } void HmmerSearchTask::prepareParseTask() { diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerSearchTask.h b/src/plugins/external_tool_support/src/hmmer/HmmerSearchTask.h index 74079a3c3ca5b10b0b4d6acc5c2f32386287d3f1..5267a134c88e7e4f299edc80931d7910ac5e657e 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerSearchTask.h +++ b/src/plugins/external_tool_support/src/hmmer/HmmerSearchTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -57,6 +57,7 @@ private: ExternalToolRunTask *hmmerTask; HmmerParseSearchResultsTask *parseTask; bool removeWorkingDir; + bool hmm2Mode; static const QString INPUT_SEQUENCE_FILENAME; static const QString PER_DOMAIN_HITS_FILENAME; diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerSearchTaskTest.cpp b/src/plugins/external_tool_support/src/hmmer/HmmerSearchTaskTest.cpp index a9718859496651ee4f07661eb90cd61599008a0d..59a03bcf3bec516676a28d121a9d6c2b2d2a2330 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerSearchTaskTest.cpp +++ b/src/plugins/external_tool_support/src/hmmer/HmmerSearchTaskTest.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerSearchTaskTest.h b/src/plugins/external_tool_support/src/hmmer/HmmerSearchTaskTest.h index f98fcd7e1584ffcae359df3105a140217d057c57..4cdafe2ccce3f7b070db525f35292ffec5145cc6 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerSearchTaskTest.h +++ b/src/plugins/external_tool_support/src/hmmer/HmmerSearchTaskTest.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,7 +32,7 @@ namespace U2 { class HmmerSearchTask; -class GTest_UHMM3Search : public GTest { +class GTest_UHMM3Search : public XmlTest { Q_OBJECT public: static const QString SEQ_DOC_CTX_NAME_TAG; /* loaded sequence document */ @@ -122,7 +122,7 @@ public: QList< UHMM3SearchSeqDomainResult > domainResList; }; // UHMM3SearchResult -class GTest_UHMM3SearchCompare : public GTest { +class GTest_UHMM3SearchCompare : public XmlTest { Q_OBJECT public: static const QString ACTUAL_OUT_FILE_TAG; diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerSearchWorker.cpp b/src/plugins/external_tool_support/src/hmmer/HmmerSearchWorker.cpp index 05dea8eaadff4d59d9d11e451b58aba6d1ef4c26..b3191837de27b09ae4b3bd134e4fd41a3199a6cb 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerSearchWorker.cpp +++ b/src/plugins/external_tool_support/src/hmmer/HmmerSearchWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -156,7 +156,7 @@ void HmmerSearchWorkerFactory::init() { proto->setEditor(new DelegateEditor(delegates)); proto->setIconPath(":/external_tool_support/images/hmmer.png"); proto->setPrompter(new HmmerSearchPrompter()); - proto->addExternalTool(HmmerSupport::SEARCH_TOOL); + proto->addExternalTool(HmmerSupport::SEARCH_TOOL_ID); WorkflowEnv::getProtoRegistry()->registerProto(Descriptor("hmmer3", HmmerSearchWorker::tr("HMMER3 Tools"), ""), proto); DomainFactory *localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID); @@ -309,8 +309,8 @@ void HmmerSearchWorker::sl_taskFinished(Task *task) { if (NULL != output) { QList<SharedAnnotationData> list; - foreach(Task *sub, task->getSubtasks()) { - HmmerSearchTask *searchTask = qobject_cast<HmmerSearchTask *>(sub); + foreach(const QPointer<Task> &sub, task->getSubtasks()) { + HmmerSearchTask *searchTask = qobject_cast<HmmerSearchTask *>(sub.data()); if (searchTask == NULL){ continue; } diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerSearchWorker.h b/src/plugins/external_tool_support/src/hmmer/HmmerSearchWorker.h index efaa3f1960bdd0b92faff1ab87c5b6564ab700ee..a40f03485a1281136a85ad395d737b9053ef52bb 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerSearchWorker.h +++ b/src/plugins/external_tool_support/src/hmmer/HmmerSearchWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerSupport.cpp b/src/plugins/external_tool_support/src/hmmer/HmmerSupport.cpp index 5c49ec7090a82ed587c516fc40e242212a3b21a6..5d72424ba080f6b073a1fc206e43ec2e2f07e9c5 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerSupport.cpp +++ b/src/plugins/external_tool_support/src/hmmer/HmmerSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -49,11 +49,14 @@ namespace U2 { const QString HmmerSupport::BUILD_TOOL = "HMMER build"; +const QString HmmerSupport::BUILD_TOOL_ID = "USUPP_HMMBUILD"; const QString HmmerSupport::SEARCH_TOOL = "HMMER search"; +const QString HmmerSupport::SEARCH_TOOL_ID = "USUPP_HMMSEARCH"; const QString HmmerSupport::PHMMER_TOOL = "PHMMER search"; +const QString HmmerSupport::PHMMER_TOOL_ID = "USUPP_PHMMER"; -HmmerSupport::HmmerSupport(const QString &name) - : ExternalTool(name) +HmmerSupport::HmmerSupport(const QString& id, const QString &name) + : ExternalTool(id, name, "") { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/cmdline.png"); @@ -64,15 +67,15 @@ HmmerSupport::HmmerSupport(const QString &name) toolKitName = "HMMER"; versionRegExp = QRegExp("HMMER (\\d+.\\d+.\\d+\\w?)"); - if (name == BUILD_TOOL) { + if (id == BUILD_TOOL_ID) { initBuild(); } - if (name == SEARCH_TOOL) { + if (id == SEARCH_TOOL_ID) { initSearch(); } - if (name == PHMMER_TOOL) { + if (id == PHMMER_TOOL_ID) { initPhmmer(); } } diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerSupport.h b/src/plugins/external_tool_support/src/hmmer/HmmerSupport.h index 46321dc4eb75f0d29f2a35eb1c240b8f218625ac..f3e439914cef5a6c688746619ba1eccf03296ee7 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerSupport.h +++ b/src/plugins/external_tool_support/src/hmmer/HmmerSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,12 +34,14 @@ class U2SequenceObject; class HmmerSupport : public ExternalTool { Q_OBJECT public: - HmmerSupport(const QString &name); + HmmerSupport(const QString& id, const QString &name); static const QString BUILD_TOOL; + static const QString BUILD_TOOL_ID; static const QString SEARCH_TOOL; + static const QString SEARCH_TOOL_ID; static const QString PHMMER_TOOL; - + static const QString PHMMER_TOOL_ID; private slots: void sl_buildProfile(); void sl_search(); @@ -50,7 +52,7 @@ private: void initSearch(); void initPhmmer(); - bool isToolSet(const QString &name) const; + bool isToolSet(const QString &id) const; }; class HmmerMsaEditorContext : public GObjectViewWindowContext { diff --git a/src/plugins/external_tool_support/src/hmmer/HmmerTests.h b/src/plugins/external_tool_support/src/hmmer/HmmerTests.h index 9e991123cf1eacb01df11810827e3a86b53358df..5031adce98bbd42794df4b5f542cde4e3f071584 100644 --- a/src/plugins/external_tool_support/src/hmmer/HmmerTests.h +++ b/src/plugins/external_tool_support/src/hmmer/HmmerTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/hmmer/PhmmerSearchDialog.cpp b/src/plugins/external_tool_support/src/hmmer/PhmmerSearchDialog.cpp index bdddd25e28162405ad743911e141f0cca00c2890..fe8b46b8860ecebdcbcd1a6e387243544ea2c69e 100644 --- a/src/plugins/external_tool_support/src/hmmer/PhmmerSearchDialog.cpp +++ b/src/plugins/external_tool_support/src/hmmer/PhmmerSearchDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -65,7 +65,7 @@ void PhmmerSearchDialog::init(U2SequenceObject *seqObj){ assert(NULL != seqObj); setupUi(this); - new HelpButton(this, buttonBox, "22056060"); + new HelpButton(this, buttonBox, "24742595"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Search")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/external_tool_support/src/hmmer/PhmmerSearchDialog.h b/src/plugins/external_tool_support/src/hmmer/PhmmerSearchDialog.h index 8704d029f8c2fe68a684f306839527b031df08c3..9ba5905c9533854026af9128105913f9ad53822e 100644 --- a/src/plugins/external_tool_support/src/hmmer/PhmmerSearchDialog.h +++ b/src/plugins/external_tool_support/src/hmmer/PhmmerSearchDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/hmmer/PhmmerSearchDialog.ui b/src/plugins/external_tool_support/src/hmmer/PhmmerSearchDialog.ui index c4eae79a9de61d83c145d025dde8aa98469e0697..90b3dfe889cc7c99915b18a9dc7293966d0a8f33 100644 --- a/src/plugins/external_tool_support/src/hmmer/PhmmerSearchDialog.ui +++ b/src/plugins/external_tool_support/src/hmmer/PhmmerSearchDialog.ui @@ -84,7 +84,7 @@ </widget> <widget class="QWidget" name="reportingTresholdsTab"> <attribute name="title"> - <string>Reporting tresholds</string> + <string>Reporting thresholds</string> </attribute> <layout class="QVBoxLayout" name="verticalLayout_11"> <item> @@ -335,7 +335,7 @@ </sizepolicy> </property> <property name="text"> - <string>Viterbi filter treshold</string> + <string>Viterbi filter threshold</string> </property> </widget> </item> @@ -365,7 +365,7 @@ </sizepolicy> </property> <property name="text"> - <string>MSV filter treshold</string> + <string>MSV filter threshold</string> </property> </widget> </item> @@ -398,7 +398,7 @@ </sizepolicy> </property> <property name="text"> - <string>Forward filter treshold</string> + <string>Forward filter threshold</string> </property> </widget> </item> diff --git a/src/plugins/external_tool_support/src/hmmer/PhmmerSearchSettings.cpp b/src/plugins/external_tool_support/src/hmmer/PhmmerSearchSettings.cpp index 8926c766dd733d4191c577dc1a5ea26fe5d17a42..427d8bef1767d2b4afed06a1c2dca532bf4f1736 100644 --- a/src/plugins/external_tool_support/src/hmmer/PhmmerSearchSettings.cpp +++ b/src/plugins/external_tool_support/src/hmmer/PhmmerSearchSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/hmmer/PhmmerSearchSettings.h b/src/plugins/external_tool_support/src/hmmer/PhmmerSearchSettings.h index deec532bed0e38b9f4bb83fea53c673274e971df..5a5f836cdff00d693b4d1a32918bc765a794e8b8 100644 --- a/src/plugins/external_tool_support/src/hmmer/PhmmerSearchSettings.h +++ b/src/plugins/external_tool_support/src/hmmer/PhmmerSearchSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,10 +34,10 @@ public: bool validate() const; - double e; // -E: report sequences <= this e-value treshold in output - double t; // -T: report sequences >= this score treshold in output + double e; // -E: report sequences <= this e-value threshold in output + double t; // -T: report sequences >= this score threshold in output double z; // -Z: set # of camparisons done, for e-value calculation - double domE; // --domE: report domains <= this e-value treshold in output + double domE; // --domE: report domains <= this e-value threshold in output double domT; // --domT: report domains >= this score cutoff in output double domZ; // --domZ: set number of significant seqs, for domain e-value calibration diff --git a/src/plugins/external_tool_support/src/hmmer/PhmmerSearchTask.cpp b/src/plugins/external_tool_support/src/hmmer/PhmmerSearchTask.cpp index 2edcd26a5e19870e202087ad2318811c6902c446..494a42214c48c459d854da0593de25ed3c37eb58 100644 --- a/src/plugins/external_tool_support/src/hmmer/PhmmerSearchTask.cpp +++ b/src/plugins/external_tool_support/src/hmmer/PhmmerSearchTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -228,8 +228,7 @@ void PhmmerSearchTask::prepareSequenceSaveTask() { } void PhmmerSearchTask::preparePhmmerTask() { - //phmmerTask = new ExternalToolRunTask(HmmerSupport::PHMMER_TOOL, getArguments(), new Hmmer3LogParser()); - phmmerTask = new ExternalToolRunTask(HmmerSupport::PHMMER_TOOL, getArguments(), new ExternalToolLogParser()); + phmmerTask = new ExternalToolRunTask(HmmerSupport::PHMMER_TOOL_ID, getArguments(), new ExternalToolLogParser()); setListenerForTask(phmmerTask); phmmerTask->setSubtaskProgressWeight(85); } diff --git a/src/plugins/external_tool_support/src/hmmer/PhmmerSearchTask.h b/src/plugins/external_tool_support/src/hmmer/PhmmerSearchTask.h index b01590c2c8aa521eada19397a50bdac45a364e4f..784f676b87bdc47227d102a5451000ad1ce2b67b 100644 --- a/src/plugins/external_tool_support/src/hmmer/PhmmerSearchTask.h +++ b/src/plugins/external_tool_support/src/hmmer/PhmmerSearchTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/hmmer/PhmmerSearchTaskTest.cpp b/src/plugins/external_tool_support/src/hmmer/PhmmerSearchTaskTest.cpp index aa95d9c50668fe03871eaa00e89840711ad3d8b3..e8c71ffe8719c6c87dadf1f11f57c00b79242f5b 100644 --- a/src/plugins/external_tool_support/src/hmmer/PhmmerSearchTaskTest.cpp +++ b/src/plugins/external_tool_support/src/hmmer/PhmmerSearchTaskTest.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/hmmer/PhmmerSearchTaskTest.h b/src/plugins/external_tool_support/src/hmmer/PhmmerSearchTaskTest.h index d7da3e4e5c8e3fef414fda51a2ce30a2b50497b7..d05e1b689244bcc2298be8eea9f36285bafd6dc6 100644 --- a/src/plugins/external_tool_support/src/hmmer/PhmmerSearchTaskTest.h +++ b/src/plugins/external_tool_support/src/hmmer/PhmmerSearchTaskTest.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -35,7 +35,7 @@ namespace U2 { * settings set by same tags from hmm3-search and hmm3-build tests + gaps probab. options and subst. matr * we test here 1<->1 queries *****************************************/ -class GTest_UHMM3Phmmer : public GTest { +class GTest_UHMM3Phmmer : public XmlTest { Q_OBJECT public: static const QString QUERY_FILENAME_TAG; @@ -73,7 +73,7 @@ private: * Note, that you should make original hmmer3 to show results in academic version (e.g. 1.01e-23) *****************************************/ -class GTest_UHMM3PhmmerCompare : public GTest { +class GTest_UHMM3PhmmerCompare : public XmlTest { Q_OBJECT public: static const QString ACTUAL_OUT_FILE_TAG; diff --git a/src/plugins/external_tool_support/src/java/JavaSupport.cpp b/src/plugins/external_tool_support/src/java/JavaSupport.cpp index 1c998179c3b69162ad117817dfc65f76bd024b78..a96c568da82ddf30ce68275504636a8d2448a000 100644 --- a/src/plugins/external_tool_support/src/java/JavaSupport.cpp +++ b/src/plugins/external_tool_support/src/java/JavaSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -27,12 +27,17 @@ namespace U2 { +const QString JavaSupport::ET_JAVA = "java"; +const QString JavaSupport::ET_JAVA_ID = "USUPP_JAVA"; + const QString JavaSupport::ARCHITECTURE = "architecture"; const QString JavaSupport::ARCHITECTURE_X32 = "x32"; const QString JavaSupport::ARCHITECTURE_X64 = "x64"; +const QStringList JavaSupport::RUN_PARAMETERS = { "-jar" }; + -JavaSupport::JavaSupport(const QString &name, const QString &path) - : ExternalTool(name, path) +JavaSupport::JavaSupport(const QString& id, const QString &name, const QString &path) + : RunnerTool(RUN_PARAMETERS, id, name, path) { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/cmdline.png"); @@ -55,11 +60,9 @@ JavaSupport::JavaSupport(const QString &name, const QString &path) toolKitName="Java"; muted = true; - - connect(this, SIGNAL(si_toolValidationStatusChanged(bool)), SLOT(sl_toolValidationStatusChanged(bool))); } -void JavaSupport::getAdditionalParameters(const QString& output) { +void JavaSupport::extractAdditionalParameters(const QString& output) { Architecture architecture = x32; if (output.contains("64-Bit")) { architecture = x64; @@ -71,11 +74,6 @@ JavaSupport::Architecture JavaSupport::getArchitecture() const { return string2architecture(additionalInfo.value(ARCHITECTURE)); } -void JavaSupport::sl_toolValidationStatusChanged(bool isValid) { - Q_UNUSED(isValid); - ScriptingTool::onPathChanged(this, QStringList() << "-jar"); -} - QString JavaSupport::architecture2string(Architecture architecture) { switch (architecture) { case JavaSupport::x32: diff --git a/src/plugins/external_tool_support/src/java/JavaSupport.h b/src/plugins/external_tool_support/src/java/JavaSupport.h index 118a6d8ca4ca5716def0048ec1ca0ef3ad565ccf..ab9747f12b29356ceb6f737bcab61893745c42e0 100644 --- a/src/plugins/external_tool_support/src/java/JavaSupport.h +++ b/src/plugins/external_tool_support/src/java/JavaSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,23 +24,23 @@ #include <U2Core/ExternalToolRegistry.h> -#define ET_JAVA "java" +#include "RunnerTool.h" namespace U2 { -class JavaSupport : public ExternalTool { +class JavaSupport : public RunnerTool { Q_OBJECT public: enum Architecture { x32, x64 }; - JavaSupport(const QString &name, const QString &path = ""); - void getAdditionalParameters(const QString& output); + JavaSupport(const QString& id, const QString &name, const QString &path = ""); + void extractAdditionalParameters(const QString& output); Architecture getArchitecture() const; -private slots: - void sl_toolValidationStatusChanged(bool isValid); + static const QString ET_JAVA; + static const QString ET_JAVA_ID; private: static QString architecture2string(Architecture architecture); @@ -49,6 +49,7 @@ private: static const QString ARCHITECTURE; static const QString ARCHITECTURE_X32; static const QString ARCHITECTURE_X64; + static const QStringList RUN_PARAMETERS; }; } // U2 diff --git a/src/plugins/external_tool_support/src/macs/MACSSettings.cpp b/src/plugins/external_tool_support/src/macs/MACSSettings.cpp index 475f39a92628461c7ff6b19c2f6b6bf62f3df6a8..d94276b810565428192cc49b3589f9d86e027136 100644 --- a/src/plugins/external_tool_support/src/macs/MACSSettings.cpp +++ b/src/plugins/external_tool_support/src/macs/MACSSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/macs/MACSSettings.h b/src/plugins/external_tool_support/src/macs/MACSSettings.h index d25f30c81236fabbb15a143fb81667f4a5785f4d..90ab2fdc480fe6b10abf53dac497f1859d0c75b5 100644 --- a/src/plugins/external_tool_support/src/macs/MACSSettings.h +++ b/src/plugins/external_tool_support/src/macs/MACSSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/macs/MACSSupport.cpp b/src/plugins/external_tool_support/src/macs/MACSSupport.cpp index c04ab5a2cd858686670a8c65dc6c16e3ffd575bf..dd414cb8a71fe66785a748e7f4e0de291a9f5d3f 100644 --- a/src/plugins/external_tool_support/src/macs/MACSSupport.cpp +++ b/src/plugins/external_tool_support/src/macs/MACSSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -27,8 +27,11 @@ namespace U2 { -MACSSupport::MACSSupport(const QString &name) -: ExternalTool(name) +const QString MACSSupport::ET_MACS = "MACS"; +const QString MACSSupport::ET_MACS_ID = "USUPP_MACS"; + +MACSSupport::MACSSupport(const QString& id, const QString &name) +: ExternalTool(id, name, "") { initialize(); } @@ -49,8 +52,8 @@ void MACSSupport::initialize() { executableFileName = "macs14.py"; - toolRunnerProgramm = ET_PYTHON; - dependencies << ET_PYTHON; + toolRunnerProgram = PythonSupport::ET_PYTHON_ID; + dependencies << PythonSupport::ET_PYTHON_ID; validMessage = "macs14.py 1.4.2 20120305"; validationArguments << "--version"; diff --git a/src/plugins/external_tool_support/src/macs/MACSSupport.h b/src/plugins/external_tool_support/src/macs/MACSSupport.h index 074da187dece0bccf8d57693ec07116ef44d99fb..11d281d4bfb3d65e94702e3d98d57602f89e8e44 100644 --- a/src/plugins/external_tool_support/src/macs/MACSSupport.h +++ b/src/plugins/external_tool_support/src/macs/MACSSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,13 +26,13 @@ namespace U2 { -#define ET_MACS "MACS" - class MACSSupport : public ExternalTool { Q_OBJECT public: - MACSSupport(const QString &name); + MACSSupport(const QString& id, const QString &name); + static const QString ET_MACS; + static const QString ET_MACS_ID; private: void initialize(); }; diff --git a/src/plugins/external_tool_support/src/macs/MACSTask.cpp b/src/plugins/external_tool_support/src/macs/MACSTask.cpp index 082823f98811b3abb6156eb20decbe26f3847e8c..ba47f25d6b0c441f94562ccc14e10d8e8a80f0ea 100644 --- a/src/plugins/external_tool_support/src/macs/MACSTask.cpp +++ b/src/plugins/external_tool_support/src/macs/MACSTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -95,7 +95,7 @@ void MACSTask::prepare() { QStringList args = settings.getArguments(treatUrl.getURLString(), conUrl.isEmpty() ? "" : conUrl.getURLString()); - etTask = new ExternalToolRunTask(ET_MACS, args, new MACSLogParser(), getSettings().outDir); + etTask = new ExternalToolRunTask(MACSSupport::ET_MACS_ID, args, new MACSLogParser(), getSettings().outDir); setListenerForTask(etTask); addSubTask(etTask); } diff --git a/src/plugins/external_tool_support/src/macs/MACSTask.h b/src/plugins/external_tool_support/src/macs/MACSTask.h index 5960b240d2cd888df454545c98fab51e0fea2276..e5fe724d582b9e449697f7735c1fff5ac47bb07a 100644 --- a/src/plugins/external_tool_support/src/macs/MACSTask.h +++ b/src/plugins/external_tool_support/src/macs/MACSTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/macs/MACSWorker.cpp b/src/plugins/external_tool_support/src/macs/MACSWorker.cpp index 8e553729ba502ada5b31c5d212ad8a17181c1a04..274b600ebb7e33636d1e39a7a10ec42f5bc01f2d 100644 --- a/src/plugins/external_tool_support/src/macs/MACSWorker.cpp +++ b/src/plugins/external_tool_support/src/macs/MACSWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -553,7 +553,7 @@ void MACSWorkerFactory::init() { proto->setPrompter(new MACSPrompter()); proto->setEditor(new DelegateEditor(delegates)); proto->setPortValidator(IN_PORT_DESCR, new MACSInputSlotsValidator()); - proto->addExternalTool(ET_MACS); + proto->addExternalTool(MACSSupport::ET_MACS_ID); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_CHIP_SEQ(), proto); WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID)->registerEntry(new MACSWorkerFactory()); } diff --git a/src/plugins/external_tool_support/src/macs/MACSWorker.h b/src/plugins/external_tool_support/src/macs/MACSWorker.h index 9736d0869a0d00a2d7f80f8be5487f21c56ec5e8..2470623782e5ed2a68b0120904f402d5006f084a 100644 --- a/src/plugins/external_tool_support/src/macs/MACSWorker.h +++ b/src/plugins/external_tool_support/src/macs/MACSWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/mafft/MAFFTSupport.cpp b/src/plugins/external_tool_support/src/mafft/MAFFTSupport.cpp index 0473596a373df6a795d08808db752bd411c6ff81..a70627416fd72e389ebfe111a6642cfe82512073 100644 --- a/src/plugins/external_tool_support/src/mafft/MAFFTSupport.cpp +++ b/src/plugins/external_tool_support/src/mafft/MAFFTSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -47,7 +47,11 @@ namespace U2 { -MAFFTSupport::MAFFTSupport(const QString& name, const QString& path) : ExternalTool(name, path) +const QString MAFFTSupport::ET_MAFFT = "MAFFT"; +const QString MAFFTSupport::ET_MAFFT_ID = "USUPP_MAFFT"; +const QString MAFFTSupport::MAFFT_TMP_DIR = "mafft"; + +MAFFTSupport::MAFFTSupport(const QString& id, const QString& name, const QString& path) : ExternalTool(id, name, path) { if (AppContext::getMainWindow()) { viewCtx = new MAFFTSupportContext(this); @@ -126,7 +130,7 @@ void MAFFTSupportContext::initViewContext(GObjectView* view) { bool objLocked = msaed->getMaObject()->isStateLocked(); bool isMsaEmpty = msaed->isAlignmentEmpty(); - AlignMsaAction* alignAction = new AlignMsaAction(this, ET_MAFFT, view, tr("Align with MAFFT..."), 2000); + AlignMsaAction* alignAction = new AlignMsaAction(this, MAFFTSupport::ET_MAFFT_ID, view, tr("Align with MAFFT..."), 2000); alignAction->setObjectName("Align with MAFFT"); addViewAction(alignAction); @@ -148,10 +152,10 @@ void MAFFTSupportContext::buildMenu(GObjectView* view, QMenu* m) { void MAFFTSupportContext::sl_align_with_MAFFT() { //Check that MAFFT and tempory folder path defined - if (AppContext::getExternalToolRegistry()->getByName(ET_MAFFT)->getPath().isEmpty()){ + if (AppContext::getExternalToolRegistry()->getById(MAFFTSupport::ET_MAFFT_ID)->getPath().isEmpty()){ QObjectScopedPointer<QMessageBox> msgBox = new QMessageBox; - msgBox->setWindowTitle(ET_MAFFT); - msgBox->setText(tr("Path for %1 tool not selected.").arg(ET_MAFFT)); + msgBox->setWindowTitle(MAFFTSupport::ET_MAFFT); + msgBox->setText(tr("Path for %1 tool not selected.").arg(MAFFTSupport::ET_MAFFT)); msgBox->setInformativeText(tr("Do you want to select it now?")); msgBox->setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox->setDefaultButton(QMessageBox::Yes); @@ -170,7 +174,7 @@ void MAFFTSupportContext::sl_align_with_MAFFT() { break; } } - if (AppContext::getExternalToolRegistry()->getByName(ET_MAFFT)->getPath().isEmpty()){ + if (AppContext::getExternalToolRegistry()->getById(MAFFTSupport::ET_MAFFT_ID)->getPath().isEmpty()){ return; } U2OpStatus2Log os(LogLevel_DETAILS); diff --git a/src/plugins/external_tool_support/src/mafft/MAFFTSupport.h b/src/plugins/external_tool_support/src/mafft/MAFFTSupport.h index 2667bf802333262dbf388abc997e067d5249652e..b3643f970a3f7d686edac80ca6d41248e5ee9df1 100644 --- a/src/plugins/external_tool_support/src/mafft/MAFFTSupport.h +++ b/src/plugins/external_tool_support/src/mafft/MAFFTSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,16 +26,17 @@ #include <U2View/MSAEditor.h> #include "utils/ExternalToolSupportAction.h" -#define ET_MAFFT "MAFFT" -#define MAFFT_TMP_DIR "mafft" - namespace U2 { class MAFFTSupport : public ExternalTool { Q_OBJECT public: - MAFFTSupport(const QString& name, const QString& path = ""); + MAFFTSupport(const QString& id, const QString& name, const QString& path = ""); GObjectViewWindowContext* getViewContext(){ return viewCtx; } + + static const QString ET_MAFFT; + static const QString ET_MAFFT_ID; + static const QString MAFFT_TMP_DIR; public slots: void sl_runWithExtFileSpecify(); private: diff --git a/src/plugins/external_tool_support/src/mafft/MAFFTSupportRunDialog.cpp b/src/plugins/external_tool_support/src/mafft/MAFFTSupportRunDialog.cpp index 8c1748bcc416a64b323f8ca20b7e2900b22e9fd1..085e1359eedbfe7b2c0872a6bcc68399380e93eb 100644 --- a/src/plugins/external_tool_support/src/mafft/MAFFTSupportRunDialog.cpp +++ b/src/plugins/external_tool_support/src/mafft/MAFFTSupportRunDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -42,7 +42,7 @@ MAFFTSupportRunDialog::MAFFTSupportRunDialog(MAFFTSupportTaskSettings& _settings QDialog(_parent), settings(_settings) { setupUi(this); - new HelpButton(this, buttonBox, "22056089"); + new HelpButton(this, buttonBox, "24742624"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Align")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -71,7 +71,7 @@ MAFFTWithExtFileSpecifySupportRunDialog::MAFFTWithExtFileSpecifySupportRunDialog saveController(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22056089"); + new HelpButton(this, buttonBox, "24742624"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Align")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/external_tool_support/src/mafft/MAFFTSupportRunDialog.h b/src/plugins/external_tool_support/src/mafft/MAFFTSupportRunDialog.h index 377c63af9dc899c4fe47dc876fd1f371db85e47b..137b4704d4378feecdfe06caa054b91c16e97634 100644 --- a/src/plugins/external_tool_support/src/mafft/MAFFTSupportRunDialog.h +++ b/src/plugins/external_tool_support/src/mafft/MAFFTSupportRunDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/mafft/MAFFTSupportTask.cpp b/src/plugins/external_tool_support/src/mafft/MAFFTSupportTask.cpp index 4076e32734bcb7d96631ec6339c3a979df85bb66..eddea986a8202b09776ca9d9db82112767b85e74 100644 --- a/src/plugins/external_tool_support/src/mafft/MAFFTSupportTask.cpp +++ b/src/plugins/external_tool_support/src/mafft/MAFFTSupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -113,7 +113,7 @@ void MAFFTSupportTask::prepare(){ QDate::currentDate().toString("dd.MM.yyyy")+"_"+ QTime::currentTime().toString("hh.mm.ss.zzz")+"_"+ QString::number(QCoreApplication::applicationPid())+"/"; - QString tmpDirPath = AppContext::getAppSettings()->getUserAppsSettings()->getCurrentProcessTemporaryDirPath(MAFFT_TMP_DIR) + "/" + tmpDirName; + QString tmpDirPath = AppContext::getAppSettings()->getUserAppsSettings()->getCurrentProcessTemporaryDirPath(MAFFTSupport::MAFFT_TMP_DIR) + "/" + tmpDirName; url= tmpDirPath + "tmp.fa"; ioLog.details(tr("Saving data to temporary file '%1'").arg(url)); @@ -141,13 +141,13 @@ QList<Task*> MAFFTSupportTask::onSubTaskFinished(Task* subTask) { QList<Task*> res; if(subTask->hasError()) { if(subTask==loadTmpDocumentTask){ - if(AppContext::getExternalToolRegistry()->getByName(ET_MAFFT)->isValid()){ + if(AppContext::getExternalToolRegistry()->getById(MAFFTSupport::ET_MAFFT_ID)->isValid()){ stateInfo.setError(tr("Can not open output file: ")+subTask->getError()); }else{ stateInfo.setError(tr("Can not open output file: ")+subTask->getError() +tr(" May be %1 tool path '%2' not valid?") - .arg(AppContext::getExternalToolRegistry()->getByName(ET_MAFFT)->getName()) - .arg(AppContext::getExternalToolRegistry()->getByName(ET_MAFFT)->getPath())); + .arg(AppContext::getExternalToolRegistry()->getById(MAFFTSupport::ET_MAFFT_ID)->getName()) + .arg(AppContext::getExternalToolRegistry()->getById(MAFFTSupport::ET_MAFFT_ID)->getPath())); } }else{ @@ -173,7 +173,7 @@ QList<Task*> MAFFTSupportTask::onSubTaskFinished(Task* subTask) { arguments <<url; logParser = new MAFFTLogParser(inputMsa->getNumRows(), settings.maxNumberIterRefinement, outputUrl); connect(logParser, SIGNAL(si_progressUndefined()), SLOT(sl_progressUndefined())); - mAFFTTask = new ExternalToolRunTask(ET_MAFFT, arguments, logParser); + mAFFTTask = new ExternalToolRunTask(MAFFTSupport::ET_MAFFT_ID, arguments, logParser); setListenerForTask(mAFFTTask); mAFFTTask->setSubtaskProgressWeight(95); res.append(mAFFTTask); @@ -181,12 +181,12 @@ QList<Task*> MAFFTSupportTask::onSubTaskFinished(Task* subTask) { assert(logParser); logParser->cleanup(); if (!QFileInfo(outputUrl).exists()) { - if (AppContext::getExternalToolRegistry()->getByName(ET_MAFFT)->isValid()){ + if (AppContext::getExternalToolRegistry()->getById(MAFFTSupport::ET_MAFFT_ID)->isValid()){ stateInfo.setError(tr("Output file '%1' not found").arg(outputUrl)); } else { stateInfo.setError(tr("Output file '%3' not found. May be %1 tool path '%2' not valid?") - .arg(AppContext::getExternalToolRegistry()->getByName(ET_MAFFT)->getName()) - .arg(AppContext::getExternalToolRegistry()->getByName(ET_MAFFT)->getPath()) + .arg(AppContext::getExternalToolRegistry()->getById(MAFFTSupport::ET_MAFFT_ID)->getName()) + .arg(AppContext::getExternalToolRegistry()->getById(MAFFTSupport::ET_MAFFT_ID)->getPath()) .arg(outputUrl)); } emit si_stateChanged(); diff --git a/src/plugins/external_tool_support/src/mafft/MAFFTSupportTask.h b/src/plugins/external_tool_support/src/mafft/MAFFTSupportTask.h index 6e9b4477297d17016e6cab397471467a5fc94cbe..f7073eb441683d026eecffdbfbcac36dccb6f4b8 100644 --- a/src/plugins/external_tool_support/src/mafft/MAFFTSupportTask.h +++ b/src/plugins/external_tool_support/src/mafft/MAFFTSupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/mafft/MAFFTWorker.cpp b/src/plugins/external_tool_support/src/mafft/MAFFTWorker.cpp index 863d2083c9e5d4c781f8d4da27743c4e43af3962..823c72e39bfd2d0baa53f7981b5b4655224538f8 100644 --- a/src/plugins/external_tool_support/src/mafft/MAFFTWorker.cpp +++ b/src/plugins/external_tool_support/src/mafft/MAFFTWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -112,7 +112,7 @@ void MAFFTWorkerFactory::init() { proto->setEditor(new DelegateEditor(delegates)); proto->setPrompter(new MAFFTPrompter()); proto->setIconPath(":external_tool_support/images/cmdline.png"); - proto->addExternalTool(ET_MAFFT, EXT_TOOL_PATH); + proto->addExternalTool(MAFFTSupport::ET_MAFFT_ID, EXT_TOOL_PATH); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_ALIGNMENT(), proto); DomainFactory* localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID); @@ -157,7 +157,7 @@ Task* MAFFTWorker::tick() { cfg.maxNumberIterRefinement=actor->getParameter(NUM_ITER)->getAttributeValue<int>(context); QString path=actor->getParameter(EXT_TOOL_PATH)->getAttributeValue<QString>(context); if(QString::compare(path, "default", Qt::CaseInsensitive) != 0){ - AppContext::getExternalToolRegistry()->getByName(ET_MAFFT)->setPath(path); + AppContext::getExternalToolRegistry()->getById(MAFFTSupport::ET_MAFFT_ID)->setPath(path); } path=actor->getParameter(TMP_DIR_PATH)->getAttributeValue<QString>(context); if(QString::compare(path, "default", Qt::CaseInsensitive) != 0){ diff --git a/src/plugins/external_tool_support/src/mafft/MAFFTWorker.h b/src/plugins/external_tool_support/src/mafft/MAFFTWorker.h index 2d570359dc8968b5f4881ee0cb1a78224b155bab..d0b304b31635619ccd0acc8c609c4424cb711b8f 100644 --- a/src/plugins/external_tool_support/src/mafft/MAFFTWorker.h +++ b/src/plugins/external_tool_support/src/mafft/MAFFTWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/mafft/MafftAddToAlignmentTask.cpp b/src/plugins/external_tool_support/src/mafft/MafftAddToAlignmentTask.cpp index af680850b1f2100087f2d62f4a7226dd39048cde..19073a371ab334fb839f25747fe74a47b32c4104 100644 --- a/src/plugins/external_tool_support/src/mafft/MafftAddToAlignmentTask.cpp +++ b/src/plugins/external_tool_support/src/mafft/MafftAddToAlignmentTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -166,7 +166,7 @@ QList<Task*> MafftAddToAlignmentTask::onSubTaskFinished(Task* subTask) { QString outputUrl = resultFilePath + ".out.fa"; logParser = new MAFFTLogParser(inputMsa->getNumRows(), 1, outputUrl); - mafftTask = new ExternalToolRunTask(ET_MAFFT, arguments, logParser); + mafftTask = new ExternalToolRunTask(MAFFTSupport::ET_MAFFT_ID, arguments, logParser); mafftTask->setStandartOutputFile(resultFilePath); mafftTask->setSubtaskProgressWeight(65); subTasks.append(mafftTask); @@ -174,12 +174,12 @@ QList<Task*> MafftAddToAlignmentTask::onSubTaskFinished(Task* subTask) { SAFE_POINT(logParser != NULL, "logParser is null", subTasks); logParser->cleanup(); if (!QFileInfo(resultFilePath).exists()) { - if (AppContext::getExternalToolRegistry()->getByName(ET_MAFFT)->isValid()){ + if (AppContext::getExternalToolRegistry()->getById(MAFFTSupport::ET_MAFFT_ID)->isValid()){ stateInfo.setError(tr("Output file '%1' not found").arg(resultFilePath)); } else { stateInfo.setError(tr("Output file '%3' not found. May be %1 tool path '%2' not valid?") - .arg(AppContext::getExternalToolRegistry()->getByName(ET_MAFFT)->getName()) - .arg(AppContext::getExternalToolRegistry()->getByName(ET_MAFFT)->getPath()) + .arg(AppContext::getExternalToolRegistry()->getById(MAFFTSupport::ET_MAFFT_ID)->getName()) + .arg(AppContext::getExternalToolRegistry()->getById(MAFFTSupport::ET_MAFFT_ID)->getPath()) .arg(resultFilePath)); } return subTasks; @@ -301,7 +301,7 @@ AlignmentAlgorithm(AddToAlignment, BaseAlignmentAlgorithmsIds::ALIGN_SEQUENCES_T } bool MafftAddToAligmnentAlgorithm::isAlgorithmAvailable() const { - return AppContext::getExternalToolRegistry()->getByName("MAFFT")->isValid(); + return AppContext::getExternalToolRegistry()->getById(MAFFTSupport::ET_MAFFT_ID)->isValid(); } } diff --git a/src/plugins/external_tool_support/src/mafft/MafftAddToAlignmentTask.h b/src/plugins/external_tool_support/src/mafft/MafftAddToAlignmentTask.h index 6b008950512a5cf1a2532b7c0a2da0529a27def8..936940b5ba0cfed79d8362ce0ae51d14b342ee33 100644 --- a/src/plugins/external_tool_support/src/mafft/MafftAddToAlignmentTask.h +++ b/src/plugins/external_tool_support/src/mafft/MafftAddToAlignmentTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/mrbayes/MrBayesDialogWidget.cpp b/src/plugins/external_tool_support/src/mrbayes/MrBayesDialogWidget.cpp index e7bf100112d89b438b932fed697ac0405d7561dd..7aa14badb5d4498804f2e4b5202737fdaea877c6 100644 --- a/src/plugins/external_tool_support/src/mrbayes/MrBayesDialogWidget.cpp +++ b/src/plugins/external_tool_support/src/mrbayes/MrBayesDialogWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -170,7 +170,7 @@ int MrBayesWidget::getRandomSeed(){ bool MrBayesWidget::checkSettings(QString &messsage, const CreatePhyTreeSettings &settings) { //Check that MrBayes and tempory folder path defined ExternalToolRegistry* reg = AppContext::getExternalToolRegistry(); - ExternalTool* mb= reg->getByName(ET_MRBAYES); + ExternalTool* mb= reg->getById(MrBayesSupport::ET_MRBAYES_ID); assert(mb); const QString& path = mb->getPath(); const QString& name = mb->getName(); diff --git a/src/plugins/external_tool_support/src/mrbayes/MrBayesDialogWidget.h b/src/plugins/external_tool_support/src/mrbayes/MrBayesDialogWidget.h index c2efbb99db0c2ea1c5aadcfe78435faf65bd0a41..4e0b50e16fc0df74c6cb54fe38a25c874c2568da 100644 --- a/src/plugins/external_tool_support/src/mrbayes/MrBayesDialogWidget.h +++ b/src/plugins/external_tool_support/src/mrbayes/MrBayesDialogWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/mrbayes/MrBayesSupport.cpp b/src/plugins/external_tool_support/src/mrbayes/MrBayesSupport.cpp index 580506b51ff92bb091d45748269c9b282ac9bad3..70a88829d63b3c63f3ef97c9564166e6f808c179 100644 --- a/src/plugins/external_tool_support/src/mrbayes/MrBayesSupport.cpp +++ b/src/plugins/external_tool_support/src/mrbayes/MrBayesSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -38,7 +38,11 @@ namespace U2 { -MrBayesSupport::MrBayesSupport(const QString& name, const QString& path) : ExternalTool(name, path) +const QString MrBayesSupport::ET_MRBAYES = "MrBayes"; +const QString MrBayesSupport::ET_MRBAYES_ID = "USUPP_MRBAYES"; +const QString MrBayesSupport::MRBAYES_TMP_DIR ="mrbayes"; + +MrBayesSupport::MrBayesSupport(const QString& id, const QString& name, const QString& path) : ExternalTool(id, name, path) { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/mrbayes.png"); diff --git a/src/plugins/external_tool_support/src/mrbayes/MrBayesSupport.h b/src/plugins/external_tool_support/src/mrbayes/MrBayesSupport.h index 40e9a87c2d89862a90fe79ceec3b8b7894b9ec41..a9f5cdcecec6d4deec67343720a93e69c1832b88 100644 --- a/src/plugins/external_tool_support/src/mrbayes/MrBayesSupport.h +++ b/src/plugins/external_tool_support/src/mrbayes/MrBayesSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -29,15 +29,16 @@ #include <U2View/CreatePhyTreeDialogController.h> -#define ET_MRBAYES "MrBayes" -#define MRBAYES_TMP_DIR "mrbayes" - namespace U2 { class MrBayesSupport : public ExternalTool { Q_OBJECT public: - MrBayesSupport(const QString& name, const QString& path = ""); + MrBayesSupport(const QString& id, const QString& name, const QString& path = ""); + + static const QString ET_MRBAYES; + static const QString ET_MRBAYES_ID; + static const QString MRBAYES_TMP_DIR; }; class MrBayesAdapter : public PhyTreeGenerator{ diff --git a/src/plugins/external_tool_support/src/mrbayes/MrBayesTask.cpp b/src/plugins/external_tool_support/src/mrbayes/MrBayesTask.cpp index 370d08c77e2c5d22de546a74f441c72039aa07e7..5ed79b243e88aeed0d16adf3c4377e1427e85cec 100644 --- a/src/plugins/external_tool_support/src/mrbayes/MrBayesTask.cpp +++ b/src/plugins/external_tool_support/src/mrbayes/MrBayesTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -101,7 +101,7 @@ MrBayesSupportTask::MrBayesSupportTask(const MultipleSequenceAlignment& _ma, con void MrBayesSupportTask::prepare(){ //Add new subdir for temporary files - tmpDirUrl = ExternalToolSupportUtils::createTmpDir(MRBAYES_TMP_DIR, stateInfo); + tmpDirUrl = ExternalToolSupportUtils::createTmpDir(MrBayesSupport::MRBAYES_TMP_DIR, stateInfo); CHECK_OP(stateInfo, ); prepareDataTask = new MrBayesPrepareDataForCalculation(inputMA, settings, tmpDirUrl); @@ -129,7 +129,7 @@ QList<Task*> MrBayesSupportTask::onSubTaskFinished(Task* subTask){ tmpNexusFile = prepareDataTask->getInputFileUrl(); QStringList arguments; arguments << tmpNexusFile; - mrBayesTask = new ExternalToolRunTask(ET_MRBAYES, arguments, new MrBayesLogParser(settings.mb_ngen)); + mrBayesTask = new ExternalToolRunTask(MrBayesSupport::ET_MRBAYES_ID, arguments, new MrBayesLogParser(settings.mb_ngen)); mrBayesTask->setSubtaskProgressWeight(95); res.append(mrBayesTask); }else if(subTask == mrBayesTask){ diff --git a/src/plugins/external_tool_support/src/mrbayes/MrBayesTask.h b/src/plugins/external_tool_support/src/mrbayes/MrBayesTask.h index 1a61cdc3770e03bb3b8cb526a1140d2eb97e1159..704238c03893d81617653c1c4ea7a2fd668de87e 100644 --- a/src/plugins/external_tool_support/src/mrbayes/MrBayesTask.h +++ b/src/plugins/external_tool_support/src/mrbayes/MrBayesTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/mrbayes/MrBayesTests.cpp b/src/plugins/external_tool_support/src/mrbayes/MrBayesTests.cpp index ae2cfe26ee65a74f19bd22d8ead278c97e7bf48b..77328eb3a5c83c6579ea683b54f366f74d9fd85e 100644 --- a/src/plugins/external_tool_support/src/mrbayes/MrBayesTests.cpp +++ b/src/plugins/external_tool_support/src/mrbayes/MrBayesTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -121,7 +121,7 @@ void GTest_MrBayes::prepare() { assert( obj != NULL); CreatePhyTreeSettings settings; - settings.algorithmId = ET_MRBAYES; + settings.algorithm = MrBayesSupport::ET_MRBAYES; settings.mb_ngen = 1000; settings.mrBayesSettingsScript = QString("Begin MrBayes;\n" "lset Nst=2 rates=gamma ngammacat=4;\n" diff --git a/src/plugins/external_tool_support/src/mrbayes/MrBayesTests.h b/src/plugins/external_tool_support/src/mrbayes/MrBayesTests.h index cf27933d293d4ae36f2bb2286e47d35347d4dab4..d033b7179157342593392eceebc770dd9161ffd3 100644 --- a/src/plugins/external_tool_support/src/mrbayes/MrBayesTests.h +++ b/src/plugins/external_tool_support/src/mrbayes/MrBayesTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -35,7 +35,7 @@ namespace U2{ class PhyTreeObject; class MultipleSequenceAlignmentObject; -class GTest_MrBayes : public GTest { +class GTest_MrBayes : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_MrBayes, "test-mrbayes"); diff --git a/src/plugins/external_tool_support/src/peak2gene/Gene2PeakFormatLoader.cpp b/src/plugins/external_tool_support/src/peak2gene/Gene2PeakFormatLoader.cpp index 904120fddd98f24ff633531d4da971a4fad0a9d8..aa2accff81f37c6927386dc615afa6629e6c67e9 100644 --- a/src/plugins/external_tool_support/src/peak2gene/Gene2PeakFormatLoader.cpp +++ b/src/plugins/external_tool_support/src/peak2gene/Gene2PeakFormatLoader.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/peak2gene/Gene2PeakFormatLoader.h b/src/plugins/external_tool_support/src/peak2gene/Gene2PeakFormatLoader.h index aabe08c798034d6a1b20a47708574c7afe04e94d..b092e2a0580acfcf5b35d01eb7e676ffec8c95aa 100644 --- a/src/plugins/external_tool_support/src/peak2gene/Gene2PeakFormatLoader.h +++ b/src/plugins/external_tool_support/src/peak2gene/Gene2PeakFormatLoader.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/peak2gene/Peak2GeneFormatLoader.cpp b/src/plugins/external_tool_support/src/peak2gene/Peak2GeneFormatLoader.cpp index 2ae7622a402268aa66795a034226c111defcc0b1..d57daf862add8340b00c836f9ae2db8e1ce3f697 100644 --- a/src/plugins/external_tool_support/src/peak2gene/Peak2GeneFormatLoader.cpp +++ b/src/plugins/external_tool_support/src/peak2gene/Peak2GeneFormatLoader.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/peak2gene/Peak2GeneFormatLoader.h b/src/plugins/external_tool_support/src/peak2gene/Peak2GeneFormatLoader.h index 560c48abb307f4d5411f390f488d730125a8f88c..043359e9d71b975eb5215ba31aa29b681f7e61d6 100644 --- a/src/plugins/external_tool_support/src/peak2gene/Peak2GeneFormatLoader.h +++ b/src/plugins/external_tool_support/src/peak2gene/Peak2GeneFormatLoader.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/peak2gene/Peak2GeneSettings.cpp b/src/plugins/external_tool_support/src/peak2gene/Peak2GeneSettings.cpp index 3ac132ebb98c2147d5a3241352c73ea5d07d4977..853f2061137474870a38c86c38417f6e7a5b20b6 100644 --- a/src/plugins/external_tool_support/src/peak2gene/Peak2GeneSettings.cpp +++ b/src/plugins/external_tool_support/src/peak2gene/Peak2GeneSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -52,7 +52,7 @@ QStringList Peak2GeneSettings::getArguments( const QString& treatFilePath){ U2DataPathRegistry* dpr = AppContext::getDataPathRegistry(); if (dpr){ - U2DataPath* dp = dpr->getDataPathByName(ENTREZ_TRANSLATION_DATA_NAME); + U2DataPath* dp = dpr->getDataPathByName(Peak2GeneSupport::ENTREZ_TRANSLATION_DATA_NAME); if (dp && dp->isValid()){ if(!dp->getDataNames().isEmpty()){ entrezPath = dp->getPathByName(dp->getDataNames().first()); diff --git a/src/plugins/external_tool_support/src/peak2gene/Peak2GeneSettings.h b/src/plugins/external_tool_support/src/peak2gene/Peak2GeneSettings.h index a162d94784929d7c04b9b761aced07d48e2c0673..5f77f56df969ae1e2739b1c35208fd850a2889a8 100644 --- a/src/plugins/external_tool_support/src/peak2gene/Peak2GeneSettings.h +++ b/src/plugins/external_tool_support/src/peak2gene/Peak2GeneSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/peak2gene/Peak2GeneSupport.cpp b/src/plugins/external_tool_support/src/peak2gene/Peak2GeneSupport.cpp index ef56d876e1c7bde31f1c4cc633c12de2439ffd2c..4993f65130242d1edb3cb01b62872adb81f33f38 100644 --- a/src/plugins/external_tool_support/src/peak2gene/Peak2GeneSupport.cpp +++ b/src/plugins/external_tool_support/src/peak2gene/Peak2GeneSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -28,8 +28,15 @@ namespace U2 { -Peak2GeneSupport::Peak2GeneSupport(const QString &name) -: ExternalTool(name) +const QString Peak2GeneSupport::ET_PEAK2GENE = "peak2gene"; +const QString Peak2GeneSupport::ET_PEAK2GENE_ID = "USUPP_PEAK2GENE"; +const QString Peak2GeneSupport::REFGENE_DIR_NAME = "refGene"; +const QString Peak2GeneSupport::REF_GENES_DATA_NAME = "Gene annotation table"; +const QString Peak2GeneSupport::TRANSLATIONS_DIR_NAME = "geneIdTranslations"; +const QString Peak2GeneSupport::ENTREZ_TRANSLATION_DATA_NAME = "Entrez ID translations"; + +Peak2GeneSupport::Peak2GeneSupport(const QString& id, const QString &name) +: ExternalTool(id, name, "") { initialize(); } @@ -46,8 +53,8 @@ void Peak2GeneSupport::initialize() { executableFileName = "peak2gene.py"; - toolRunnerProgramm = ET_PYTHON; - dependencies << ET_PYTHON; + toolRunnerProgram = PythonSupport::ET_PYTHON_ID; + dependencies << PythonSupport::ET_PYTHON_ID; validMessage = "peak2gene.py v"; validationArguments << "--version"; diff --git a/src/plugins/external_tool_support/src/peak2gene/Peak2GeneSupport.h b/src/plugins/external_tool_support/src/peak2gene/Peak2GeneSupport.h index 7c32adab2b9c8ec3a71e3d16045778523eded65e..b96ed0db86db4f7f017d8ccc90a580674bc1c034 100644 --- a/src/plugins/external_tool_support/src/peak2gene/Peak2GeneSupport.h +++ b/src/plugins/external_tool_support/src/peak2gene/Peak2GeneSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,17 +26,17 @@ namespace U2 { -#define ET_PEAK2GENE "peak2gene" -#define REFGENE_DIR_NAME "refGene" -#define REF_GENES_DATA_NAME "Gene annotation table" -#define TRANSLATIONS_DIR_NAME "geneIdTranslations" -#define ENTREZ_TRANSLATION_DATA_NAME "Entrez ID translations" - class Peak2GeneSupport : public ExternalTool { Q_OBJECT public: - Peak2GeneSupport(const QString &name); - + Peak2GeneSupport(const QString& id, const QString &name); + + static const QString ET_PEAK2GENE; + static const QString ET_PEAK2GENE_ID; + static const QString REFGENE_DIR_NAME; + static const QString REF_GENES_DATA_NAME; + static const QString TRANSLATIONS_DIR_NAME; + static const QString ENTREZ_TRANSLATION_DATA_NAME; private: void initialize(); }; diff --git a/src/plugins/external_tool_support/src/peak2gene/Peak2GeneTask.cpp b/src/plugins/external_tool_support/src/peak2gene/Peak2GeneTask.cpp index 816e986ea05721ff20357d12a34b920250a00454..9731c8ae74035e2691d5ff980071c0f198a710ae 100644 --- a/src/plugins/external_tool_support/src/peak2gene/Peak2GeneTask.cpp +++ b/src/plugins/external_tool_support/src/peak2gene/Peak2GeneTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -132,7 +132,7 @@ QList<Task*> Peak2GeneTask::onSubTaskFinished(Task* subTask) { if (treatTask == subTask) { QStringList args = settings.getArguments(treatDoc->getURLString()); - etTask = new ExternalToolRunTask(ET_PEAK2GENE, args, new ExternalToolLogParser(), workingDir); + etTask = new ExternalToolRunTask(Peak2GeneSupport::ET_PEAK2GENE_ID, args, new ExternalToolLogParser(), workingDir); setListenerForTask(etTask); result << etTask; } diff --git a/src/plugins/external_tool_support/src/peak2gene/Peak2GeneTask.h b/src/plugins/external_tool_support/src/peak2gene/Peak2GeneTask.h index 4ec075fef7fdd6783fed59a5cab344936c46e1be..7817ba2b45680dc1a4e0d8ca970e76605685a8d4 100644 --- a/src/plugins/external_tool_support/src/peak2gene/Peak2GeneTask.h +++ b/src/plugins/external_tool_support/src/peak2gene/Peak2GeneTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/peak2gene/Peak2GeneWorker.cpp b/src/plugins/external_tool_support/src/peak2gene/Peak2GeneWorker.cpp index f4538959199687a27bb1e8fe0f53277d4fc94c29..96ad3cce5d1a067a42935baa4abc3a06b57cbd71 100644 --- a/src/plugins/external_tool_support/src/peak2gene/Peak2GeneWorker.cpp +++ b/src/plugins/external_tool_support/src/peak2gene/Peak2GeneWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -161,12 +161,12 @@ Peak2GeneSettings Peak2GeneWorker::createPeak2GeneSettings(U2OpStatus &os) { /* Peak2GeneComboBoxWithUrlsDelegate */ /************************************************************************/ void Peak2GeneComboBoxWithUrlsDelegate::updateUgeneSettings() { - updateDataPath(getDataPathName(), REFGENE_DIR_NAME); - updateDataPath(ENTREZ_TRANSLATION_DATA_NAME, TRANSLATIONS_DIR_NAME); + updateDataPath(getDataPathName(), Peak2GeneSupport::REFGENE_DIR_NAME); + updateDataPath(Peak2GeneSupport::ENTREZ_TRANSLATION_DATA_NAME, Peak2GeneSupport::TRANSLATIONS_DIR_NAME); } QString Peak2GeneComboBoxWithUrlsDelegate::getDataPathName() { - return REF_GENES_DATA_NAME; + return Peak2GeneSupport::REF_GENES_DATA_NAME; } QString Peak2GeneComboBoxWithUrlsDelegate::getAttributeName() { @@ -184,7 +184,7 @@ void Peak2GeneWorkerFactory::init() { U2DataPath* dataPath = NULL; U2DataPathRegistry* dpr = AppContext::getDataPathRegistry(); if (dpr){ - U2DataPath* dp = dpr->getDataPathByName(REF_GENES_DATA_NAME); + U2DataPath* dp = dpr->getDataPathByName(Peak2GeneSupport::REF_GENES_DATA_NAME); if (dp && dp->isValid()){ dataPath = dp; } @@ -310,7 +310,7 @@ void Peak2GeneWorkerFactory::init() { ActorPrototype *proto = new IntegralBusActorPrototype(protoDesc, portDescs, attrs); proto->setPrompter(new Peak2GenePrompter()); proto->setEditor(new DelegateEditor(delegates)); - proto->addExternalTool(ET_PEAK2GENE); + proto->addExternalTool(Peak2GeneSupport::ET_PEAK2GENE_ID); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_CHIP_SEQ(), proto); WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID)->registerEntry(new Peak2GeneWorkerFactory()); } diff --git a/src/plugins/external_tool_support/src/peak2gene/Peak2GeneWorker.h b/src/plugins/external_tool_support/src/peak2gene/Peak2GeneWorker.h index 8c9b2ed31d1eb256f9be3fa5a086e2286cce503b..30ddc40db64da6c53594571f8157bd9f1196820f 100644 --- a/src/plugins/external_tool_support/src/peak2gene/Peak2GeneWorker.h +++ b/src/plugins/external_tool_support/src/peak2gene/Peak2GeneWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/perl/PerlSupport.cpp b/src/plugins/external_tool_support/src/perl/PerlSupport.cpp index b9b9d1d16ffab2d513b06e64c0cf154b8b698287..f7f858974cf9e461d56bf7c4b4fdc7f4df7e9f18 100644 --- a/src/plugins/external_tool_support/src/perl/PerlSupport.cpp +++ b/src/plugins/external_tool_support/src/perl/PerlSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,8 +26,11 @@ namespace U2 { -PerlSupport::PerlSupport(const QString &name, const QString &path) -: ExternalTool(name, path) +const QString PerlSupport::ET_PERL = "perl"; +const QString PerlSupport::ET_PERL_ID = "USUPP_PERL"; + +PerlSupport::PerlSupport(const QString& id, const QString &name, const QString &path) +: RunnerTool(QStringList(), id, name, path) { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/perl.png"); @@ -47,13 +50,6 @@ PerlSupport::PerlSupport(const QString &name, const QString &path) toolKitName="perl"; muted = true; - - connect(this, SIGNAL(si_toolValidationStatusChanged(bool)), SLOT(sl_toolValidationStatusChanged(bool))); -} - -void PerlSupport::sl_toolValidationStatusChanged(bool isValid) { - Q_UNUSED(isValid); - ScriptingTool::onPathChanged(this); } } // U2 diff --git a/src/plugins/external_tool_support/src/perl/PerlSupport.h b/src/plugins/external_tool_support/src/perl/PerlSupport.h index 3f0faf5c9358950157c309de5311c88fba8e3e76..b11dc4a4ac816532f75f94a5701d93bc2404f1ac 100644 --- a/src/plugins/external_tool_support/src/perl/PerlSupport.h +++ b/src/plugins/external_tool_support/src/perl/PerlSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,18 +23,17 @@ #define _U2_PERLSUPPORT_H_ #include <U2Core/ExternalToolRegistry.h> - -#define ET_PERL "perl" +#include "RunnerTool.h" namespace U2 { -class PerlSupport : public ExternalTool { +class PerlSupport : public RunnerTool { Q_OBJECT public: - PerlSupport(const QString &name, const QString &path = ""); + PerlSupport(const QString& id, const QString &name, const QString &path = ""); -private slots: - void sl_toolValidationStatusChanged(bool isValid); + static const QString ET_PERL; + static const QString ET_PERL_ID; }; } // U2 diff --git a/src/plugins/external_tool_support/src/phyml/PhyMLDialogWidget.cpp b/src/plugins/external_tool_support/src/phyml/PhyMLDialogWidget.cpp index 6dd0853f4ce07c74a03b0031a76f3bb16215cd82..5454c71c73e0b5c8bb5cd07e4b5929a7be37091e 100644 --- a/src/plugins/external_tool_support/src/phyml/PhyMLDialogWidget.cpp +++ b/src/plugins/external_tool_support/src/phyml/PhyMLDialogWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -293,7 +293,7 @@ bool PhyMlWidget::checkSettings(QString &message, const CreatePhyTreeSettings &s //Check that PhyMl and tempory folder path defined ExternalToolRegistry* reg = AppContext::getExternalToolRegistry(); - ExternalTool* phyml = reg->getByName(PhyMLSupport::PhyMlRegistryId); + ExternalTool* phyml = reg->getById(PhyMLSupport::PHYML_ID); SAFE_POINT(NULL != phyml, "External tool PHyML is not registered", false); const QString& path = phyml->getPath(); diff --git a/src/plugins/external_tool_support/src/phyml/PhyMLDialogWidget.h b/src/plugins/external_tool_support/src/phyml/PhyMLDialogWidget.h index ecf4387d0746b8025c4d0cdee31c81b5a16b8a2f..8f92130be082376e2fb1a5365cfc8371ca682b8d 100644 --- a/src/plugins/external_tool_support/src/phyml/PhyMLDialogWidget.h +++ b/src/plugins/external_tool_support/src/phyml/PhyMLDialogWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/phyml/PhyMLSupport.cpp b/src/plugins/external_tool_support/src/phyml/PhyMLSupport.cpp index d476a0fcc798120beee7675815e0901869ff32ee..e63d8242bc9382bfb1f631746b2eb20ae9862d7d 100644 --- a/src/plugins/external_tool_support/src/phyml/PhyMLSupport.cpp +++ b/src/plugins/external_tool_support/src/phyml/PhyMLSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -27,10 +27,11 @@ #include <U2Algorithm/PhyTreeGeneratorRegistry.h> namespace U2 { -const QString PhyMLSupport::PhyMlRegistryId("PhyML Maximum Likelihood"); -const QString PhyMLSupport::PhyMlTempDir("phyml"); +const QString PhyMLSupport::PHYML("PhyML Maximum Likelihood"); +const QString PhyMLSupport::PHYML_ID("USUPP_PHYML"); +const QString PhyMLSupport::PHYML_TEMP_DIR("phyml"); -PhyMLSupport::PhyMLSupport(const QString& name) : ExternalTool(name) +PhyMLSupport::PhyMLSupport(const QString& id, const QString& name) : ExternalTool(id, name, "") { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/cmdline.png"); @@ -52,7 +53,7 @@ PhyMLSupport::PhyMLSupport(const QString& name) : ExternalTool(name) //register the method PhyTreeGeneratorRegistry* registry = AppContext::getPhyTreeGeneratorRegistry(); - registry->registerPhyTreeGenerator(new PhyMLAdapter(), PhyMLSupport::PhyMlRegistryId); + registry->registerPhyTreeGenerator(new PhyMLAdapter(), PhyMLSupport::PHYML); } //////////////////////////////////////// diff --git a/src/plugins/external_tool_support/src/phyml/PhyMLSupport.h b/src/plugins/external_tool_support/src/phyml/PhyMLSupport.h index 63626fcb24e0806a9e9f81b598e1e126f7e115a0..bfef983229b990a654e41376f5de66a5217d8a34 100644 --- a/src/plugins/external_tool_support/src/phyml/PhyMLSupport.h +++ b/src/plugins/external_tool_support/src/phyml/PhyMLSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,10 +34,11 @@ namespace U2 { class PhyMLSupport : public ExternalTool { Q_OBJECT public: - PhyMLSupport(const QString& name); + PhyMLSupport(const QString& id, const QString& name); - static const QString PhyMlRegistryId; - static const QString PhyMlTempDir; + static const QString PHYML; + static const QString PHYML_ID; + static const QString PHYML_TEMP_DIR; }; class PhyMLAdapter : public PhyTreeGenerator { diff --git a/src/plugins/external_tool_support/src/phyml/PhyMLTask.cpp b/src/plugins/external_tool_support/src/phyml/PhyMLTask.cpp index 78ce2e9938a8f9574a1b844146dcec73ea095a8c..77e11fea7950b04612086c615da54122b73801b3 100644 --- a/src/plugins/external_tool_support/src/phyml/PhyMLTask.cpp +++ b/src/plugins/external_tool_support/src/phyml/PhyMLTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -102,7 +102,7 @@ PhyMLSupportTask::PhyMLSupportTask(const MultipleSequenceAlignment& ma, const Cr void PhyMLSupportTask::prepare(){ //Add new subdir for temporary files - tmpDirUrl = ExternalToolSupportUtils::createTmpDir(PhyMLSupport::PhyMlTempDir, stateInfo); + tmpDirUrl = ExternalToolSupportUtils::createTmpDir(PhyMLSupport::PHYML_TEMP_DIR, stateInfo); CHECK_OP(stateInfo, ); prepareDataTask = new PhyMLPrepareDataForCalculation(inputMA, settings, tmpDirUrl); @@ -133,7 +133,7 @@ QList<Task*> PhyMLSupportTask::onSubTaskFinished(Task* subTask){ arguments << tmpPhylipFile; arguments << "--no_memory_check"; arguments << settings.extToolArguments; - phyMlTask = new ExternalToolRunTask(PhyMLSupport::PhyMlRegistryId, arguments, new PhyMLLogParser(this, sequencesNumber)); + phyMlTask = new ExternalToolRunTask(PhyMLSupport::PHYML_ID, arguments, new PhyMLLogParser(this, sequencesNumber)); phyMlTask->setSubtaskProgressWeight(95); res.append(phyMlTask); }else if(subTask == phyMlTask){ diff --git a/src/plugins/external_tool_support/src/phyml/PhyMLTask.h b/src/plugins/external_tool_support/src/phyml/PhyMLTask.h index 55c27e47b6e52fa3877d7c9cfdeb2b31111ff6b9..8a884a8ee4c8c9f62d53ce8b6754906e6d4b346a 100644 --- a/src/plugins/external_tool_support/src/phyml/PhyMLTask.h +++ b/src/plugins/external_tool_support/src/phyml/PhyMLTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/phyml/PhyMLTests.cpp b/src/plugins/external_tool_support/src/phyml/PhyMLTests.cpp index 6e96dfbee87c716628880b380a7c25473a89054a..9200b500219afc1b708c21f654d79ecee15caf23 100644 --- a/src/plugins/external_tool_support/src/phyml/PhyMLTests.cpp +++ b/src/plugins/external_tool_support/src/phyml/PhyMLTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -158,7 +158,7 @@ void GTest_PhyML::prepare() { assert( obj != NULL); - settings.algorithmId = PhyMLSupport::PhyMlRegistryId; + settings.algorithm = PhyMLSupport::PHYML; task = new PhyTreeGeneratorLauncherTask(input->getMultipleAlignment(), settings); addSubTask(task); diff --git a/src/plugins/external_tool_support/src/phyml/PhyMLTests.h b/src/plugins/external_tool_support/src/phyml/PhyMLTests.h index 02c583538c63dcf5308b95b166f928f2f5c031fd..5a915803883b97ff7a5a9e08f9f6ac3f9d9904fa 100644 --- a/src/plugins/external_tool_support/src/phyml/PhyMLTests.h +++ b/src/plugins/external_tool_support/src/phyml/PhyMLTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -35,7 +35,7 @@ namespace U2{ class PhyTreeObject; class MultipleSequenceAlignmentObject; -class GTest_PhyML : public GTest { +class GTest_PhyML : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_PhyML, "test-PHYML"); diff --git a/src/plugins/external_tool_support/src/python/PythonSupport.cpp b/src/plugins/external_tool_support/src/python/PythonSupport.cpp index 8f4421b601dee2694b08279938bde8e6a3857455..ea200beb49c250c07d78be961f8b0d3d60cce973 100644 --- a/src/plugins/external_tool_support/src/python/PythonSupport.cpp +++ b/src/plugins/external_tool_support/src/python/PythonSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,8 +34,17 @@ namespace U2 { - -PythonSupport::PythonSupport(const QString& name, const QString& path) : ExternalTool(name, path) +const QString PythonSupport::ET_PYTHON = "python"; +const QString PythonSupport::ET_PYTHON_ID = "USUPP_PYTHON2"; +const QString PythonModuleDjangoSupport::ET_PYTHON_DJANGO = "django"; +const QString PythonModuleDjangoSupport::ET_PYTHON_DJANGO_ID = "DJANGO"; +const QString PythonModuleNumpySupport::ET_PYTHON_NUMPY = "numpy"; +const QString PythonModuleNumpySupport::ET_PYTHON_NUMPY_ID = "NUMPY"; +const QString PythonModuleBioSupport::ET_PYTHON_BIO = "Bio"; +const QString PythonModuleBioSupport::ET_PYTHON_BIO_ID = "BIO"; + +PythonSupport::PythonSupport(const QString& id, const QString& name, const QString& path) + : RunnerTool(QStringList(), id, name, path) { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/python.png"); @@ -57,18 +66,10 @@ PythonSupport::PythonSupport(const QString& name, const QString& path) : Externa toolKitName = "python"; muted = true; - - connect(this, SIGNAL(si_toolValidationStatusChanged(bool)), SLOT(sl_toolValidationStatusChanged(bool))); } -void PythonSupport::sl_toolValidationStatusChanged(bool isValid) { - Q_UNUSED(isValid); - ScriptingTool::onPathChanged(this); -} - - -PythonModuleSupport::PythonModuleSupport(const QString &name) : - ExternalToolModule(name) { +PythonModuleSupport::PythonModuleSupport(const QString& id, const QString &name) : + ExternalToolModule(id, name) { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/python.png"); grayIcon = QIcon(":external_tool_support/images/python_gray.png"); @@ -85,7 +86,7 @@ PythonModuleSupport::PythonModuleSupport(const QString &name) : validationArguments << "-c"; toolKitName = "python"; - dependencies << ET_PYTHON; + dependencies << PythonSupport::ET_PYTHON_ID; errorDescriptions.insert("No module named", tr("Python module is not installed. " "Install module or set path " @@ -96,23 +97,36 @@ PythonModuleSupport::PythonModuleSupport(const QString &name) : muted = true; } -PythonModuleDjangoSupport::PythonModuleDjangoSupport(const QString &name) : - PythonModuleSupport(name) { - description += ET_PYTHON_DJANGO + tr(": Python module for the %1 tool").arg(ET_SEQPOS); +PythonModuleDjangoSupport::PythonModuleDjangoSupport(const QString& id, const QString &name) : + PythonModuleSupport(id, name) { + description += ET_PYTHON_DJANGO + tr(": Python module for the %1 tool").arg(SeqPosSupport::ET_SEQPOS); validationArguments << "import django;print(\"django version: \", django.VERSION);"; validMessage = "django version:"; - versionRegExp = QRegExp("(\\d+,\\d+,\\d+)"); + versionRegExp = QRegExp("(\\d+,\\s\\d+,\\s\\d+)"); } -PythonModuleNumpySupport::PythonModuleNumpySupport(const QString &name) : - PythonModuleSupport(name) { - description += ET_PYTHON_NUMPY + tr(": Python module for the %1 tool").arg(ET_SEQPOS); +PythonModuleNumpySupport::PythonModuleNumpySupport(const QString& id, const QString &name) : + PythonModuleSupport(id, name) { + description += ET_PYTHON_NUMPY + tr(": Python module for the %1 tool").arg(SeqPosSupport::ET_SEQPOS); validationArguments << "import numpy;print(\"numpy version: \", numpy.__version__);"; validMessage = "numpy version:"; versionRegExp = QRegExp("(\\d+.\\d+.\\d+)"); } +namespace { + const QString ET_METAPHLAN = "MetaPhlAn2"; +} + +PythonModuleBioSupport::PythonModuleBioSupport(const QString& id, const QString& name) : + PythonModuleSupport(id, name) { + description += ET_PYTHON_BIO + tr(" (or biopython) is a python module for biological computations."); + + validationArguments << "import Bio;print(\"Bio version: \", Bio.__version__);"; + validMessage = "Bio version:"; + versionRegExp = QRegExp("(\\d+.\\d+)"); +} + }//namespace diff --git a/src/plugins/external_tool_support/src/python/PythonSupport.h b/src/plugins/external_tool_support/src/python/PythonSupport.h index 4264cc763a990314f77158641a44e02f46ccea66..0626b68448dd8ec3283b19fdb39d3294f988c8af 100644 --- a/src/plugins/external_tool_support/src/python/PythonSupport.h +++ b/src/plugins/external_tool_support/src/python/PythonSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,39 +23,54 @@ #define _U2_PYTHON_SUPPORT_H_ #include <U2Core/ExternalToolRegistry.h> -#include "utils/ExternalToolSupportAction.h" -#define ET_PYTHON "python" -#define ET_PYTHON_DJANGO "django" -#define ET_PYTHON_NUMPY "numpy" +#include "RunnerTool.h" +#include "utils/ExternalToolSupportAction.h" namespace U2 { -class PythonSupport : public ExternalTool { +class PythonSupport : public RunnerTool { Q_OBJECT public: - PythonSupport(const QString& name, const QString& path = ""); -private slots: - void sl_toolValidationStatusChanged(bool isValid); + PythonSupport(const QString& id, const QString& name, const QString& path = ""); + + static const QString ET_PYTHON; + static const QString ET_PYTHON_ID; }; class PythonModuleSupport : public ExternalToolModule { Q_OBJECT public: - PythonModuleSupport(const QString& name); + PythonModuleSupport(const QString& id, const QString& name); }; class PythonModuleDjangoSupport : public PythonModuleSupport { Q_OBJECT public: - PythonModuleDjangoSupport(const QString& name); + PythonModuleDjangoSupport(const QString& id, const QString& name); + + static const QString ET_PYTHON_DJANGO; + static const QString ET_PYTHON_DJANGO_ID; }; class PythonModuleNumpySupport : public PythonModuleSupport { Q_OBJECT public: - PythonModuleNumpySupport(const QString& name); + PythonModuleNumpySupport(const QString& id, const QString& name); + + static const QString ET_PYTHON_NUMPY; + static const QString ET_PYTHON_NUMPY_ID; }; +class PythonModuleBioSupport : public PythonModuleSupport { + Q_OBJECT +public: + PythonModuleBioSupport(const QString& id, const QString& name); + + static const QString ET_PYTHON_BIO; + static const QString ET_PYTHON_BIO_ID; +}; + + }//namespace #endif // _U2_PYTHON_SUPPORT_H_ diff --git a/src/plugins/external_tool_support/src/samtools/BcfToolsSupport.cpp b/src/plugins/external_tool_support/src/samtools/BcfToolsSupport.cpp index 880d1ae1e53a2391109bfac6b0c2d4c36c5f962f..17b4d53a879b3ad9cebdc532b47a16563546e2f0 100644 --- a/src/plugins/external_tool_support/src/samtools/BcfToolsSupport.cpp +++ b/src/plugins/external_tool_support/src/samtools/BcfToolsSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,8 +25,11 @@ namespace U2 { -BcfToolsSupport::BcfToolsSupport(const QString &name) -: ExternalTool(name) +const QString BcfToolsSupport::ET_BCFTOOLS = "BCFtools"; +const QString BcfToolsSupport::ET_BCFTOOLS_ID = "USUPP_BCFTOOLS"; + +BcfToolsSupport::BcfToolsSupport(const QString& id, const QString &name) +: ExternalTool(id, name, "") { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/cmdline.png"); diff --git a/src/plugins/external_tool_support/src/samtools/BcfToolsSupport.h b/src/plugins/external_tool_support/src/samtools/BcfToolsSupport.h index 92c7a6724f0703f48406e07702919d6fcdef0862..7e8a436c428d2af61be8897fdfdd337f2c86443f 100644 --- a/src/plugins/external_tool_support/src/samtools/BcfToolsSupport.h +++ b/src/plugins/external_tool_support/src/samtools/BcfToolsSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,14 +24,15 @@ #include <U2Core/ExternalToolRegistry.h> -#define ET_BCFTOOLS "BCFtools" - namespace U2 { class BcfToolsSupport : public ExternalTool { Q_OBJECT public: - BcfToolsSupport(const QString &name); + BcfToolsSupport(const QString& id, const QString &name); + + static const QString ET_BCFTOOLS; + static const QString ET_BCFTOOLS_ID; }; } // U2 diff --git a/src/plugins/external_tool_support/src/samtools/SamToolsExtToolSupport.cpp b/src/plugins/external_tool_support/src/samtools/SamToolsExtToolSupport.cpp index 03d91ae6120acd854c3d18d6e9bb9997120cdd1e..6a103bc39dfb17ef566fe6f4ac3284b3b8c4b143 100644 --- a/src/plugins/external_tool_support/src/samtools/SamToolsExtToolSupport.cpp +++ b/src/plugins/external_tool_support/src/samtools/SamToolsExtToolSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -28,8 +28,11 @@ namespace U2 { -SamToolsExtToolSupport::SamToolsExtToolSupport(const QString& name, const QString& path) - : ExternalTool(name, path) +const QString SamToolsExtToolSupport::ET_SAMTOOLS_EXT = "SAMtools"; +const QString SamToolsExtToolSupport::ET_SAMTOOLS_EXT_ID = "USUPP_SAMTOOLS"; + +SamToolsExtToolSupport::SamToolsExtToolSupport(const QString& id, const QString& name, const QString& path) + : ExternalTool(id, name, path) { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/cmdline.png"); diff --git a/src/plugins/external_tool_support/src/samtools/SamToolsExtToolSupport.h b/src/plugins/external_tool_support/src/samtools/SamToolsExtToolSupport.h index 8f05a973f913125ebdaee6b75d5bed17abed26f3..416a91247d6adef4f2dec4c9f0ea7359994d9476 100644 --- a/src/plugins/external_tool_support/src/samtools/SamToolsExtToolSupport.h +++ b/src/plugins/external_tool_support/src/samtools/SamToolsExtToolSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,17 +24,16 @@ #include <U2Core/ExternalToolRegistry.h> -#define ET_SAMTOOLS_EXT "SAMtools" - - namespace U2 { -class SamToolsExtToolSupport : public ExternalTool -{ +class SamToolsExtToolSupport : public ExternalTool { Q_OBJECT public: - SamToolsExtToolSupport(const QString& name, const QString& path = ""); + SamToolsExtToolSupport(const QString& id, const QString& name, const QString& path = ""); + + static const QString ET_SAMTOOLS_EXT; + static const QString ET_SAMTOOLS_EXT_ID; }; } // namespace diff --git a/src/plugins/external_tool_support/src/samtools/TabixSupport.cpp b/src/plugins/external_tool_support/src/samtools/TabixSupport.cpp index 15a65a8f7f773a945cbdcfddeca284ff736d3792..f9d2fb75b6458acdc16e69da8d909825e1b1b2e1 100644 --- a/src/plugins/external_tool_support/src/samtools/TabixSupport.cpp +++ b/src/plugins/external_tool_support/src/samtools/TabixSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,8 +26,11 @@ namespace U2 { -TabixSupport::TabixSupport(const QString &name, const QString &path) - : ExternalTool(name, path) +const QString TabixSupport::ET_TABIX = "Tabix"; +const QString TabixSupport::ET_TABIX_ID = "USUPP_TABIX"; + +TabixSupport::TabixSupport(const QString& id, const QString &name, const QString &path) + : ExternalTool(id, name, path) { if (AppContext::getMainWindow() != NULL) { icon = QIcon(":external_tool_support/images/cmdline.png"); diff --git a/src/plugins/external_tool_support/src/samtools/TabixSupport.h b/src/plugins/external_tool_support/src/samtools/TabixSupport.h index 5ab95d37782b5e0e37dd7353cb3d0ba1af423c0e..254b6a08b5306ab447a6ba3a81fb46ea83fbbf38 100644 --- a/src/plugins/external_tool_support/src/samtools/TabixSupport.h +++ b/src/plugins/external_tool_support/src/samtools/TabixSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,15 +24,15 @@ #include <U2Core/ExternalToolRegistry.h> -#define ET_TABIX "Tabix" - - namespace U2 { class TabixSupport : public ExternalTool { Q_OBJECT public: - TabixSupport(const QString& name, const QString& path = ""); + TabixSupport(const QString& id, const QString& name, const QString& path = ""); + + static const QString ET_TABIX; + static const QString ET_TABIX_ID; }; } // namespace diff --git a/src/plugins/external_tool_support/src/samtools/TabixSupportTask.cpp b/src/plugins/external_tool_support/src/samtools/TabixSupportTask.cpp index 7f3f67a8c49a02b6effe769794baddcb803856e1..f049a7d470208571fcc6f604ae8df87045720ee6 100644 --- a/src/plugins/external_tool_support/src/samtools/TabixSupportTask.cpp +++ b/src/plugins/external_tool_support/src/samtools/TabixSupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -96,7 +96,7 @@ void TabixSupportTask::initTabixTask() { QStringList arguments; arguments << "-f"; arguments << bgzfUrl.getURLString(); - tabixTask = new ExternalToolRunTask(ET_TABIX, arguments, new ExternalToolLogParser()); + tabixTask = new ExternalToolRunTask(TabixSupport::ET_TABIX_ID, arguments, new ExternalToolLogParser()); setListenerForTask(tabixTask); } diff --git a/src/plugins/external_tool_support/src/samtools/TabixSupportTask.h b/src/plugins/external_tool_support/src/samtools/TabixSupportTask.h index c9f0c24e1eed1d34d0325bf6a5191b82b46ca8c4..7048dfd12263bf86c9493ca7fac1a73c45e11d8c 100644 --- a/src/plugins/external_tool_support/src/samtools/TabixSupportTask.h +++ b/src/plugins/external_tool_support/src/samtools/TabixSupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/seqpos/SeqPosSettings.cpp b/src/plugins/external_tool_support/src/seqpos/SeqPosSettings.cpp index 6bc62dff87af45d459708fffbccbbfa85908f9a5..1fb0cf7f15601e0543d6e1b9e8fb67a1c0f7bf3f 100644 --- a/src/plugins/external_tool_support/src/seqpos/SeqPosSettings.cpp +++ b/src/plugins/external_tool_support/src/seqpos/SeqPosSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/seqpos/SeqPosSettings.h b/src/plugins/external_tool_support/src/seqpos/SeqPosSettings.h index b4f918db07c62f1e3c261a3c111130596237b1fe..cc21cd1bc291b95d0987930c6c3c11eedea18434 100644 --- a/src/plugins/external_tool_support/src/seqpos/SeqPosSettings.h +++ b/src/plugins/external_tool_support/src/seqpos/SeqPosSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/seqpos/SeqPosSupport.cpp b/src/plugins/external_tool_support/src/seqpos/SeqPosSupport.cpp index 9b20a8c3e706ae305737f3d6d618599e262a75b9..ad58bc2d019df10da1b6f80ae75fc7b2f3c774c1 100644 --- a/src/plugins/external_tool_support/src/seqpos/SeqPosSupport.cpp +++ b/src/plugins/external_tool_support/src/seqpos/SeqPosSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -29,8 +29,13 @@ namespace U2 { -SeqPosSupport::SeqPosSupport(const QString &name) -: ExternalTool(name) +const QString SeqPosSupport::ET_SEQPOS = "seqpos"; +const QString SeqPosSupport::ET_SEQPOS_ID = "USUPP_SEQPOS"; +const QString SeqPosSupport::ASSEMBLY_DIR_NAME = "genomes"; +const QString SeqPosSupport::ASSEMBLY_DIR = "Assembly dir"; + +SeqPosSupport::SeqPosSupport(const QString& id, const QString &name) +: ExternalTool(id, name, "") { initialize(); } @@ -47,12 +52,12 @@ void SeqPosSupport::initialize() { executableFileName = "MDSeqPos.py"; - toolRunnerProgramm = ET_PYTHON; - dependencies << ET_PYTHON - << ET_PYTHON_DJANGO - << ET_PYTHON_NUMPY - << ET_R - << ET_R_SEQLOGO; + toolRunnerProgram = PythonSupport::ET_PYTHON_ID; + dependencies << PythonSupport::ET_PYTHON_ID + << PythonModuleDjangoSupport::ET_PYTHON_DJANGO_ID + << PythonModuleNumpySupport::ET_PYTHON_NUMPY_ID + << RSupport::ET_R_ID + << RModuleSeqlogoSupport::ET_R_SEQLOGO_ID; validMessage = "mdseqpos \\(official trunk\\):"; validationArguments << "-v"; diff --git a/src/plugins/external_tool_support/src/seqpos/SeqPosSupport.h b/src/plugins/external_tool_support/src/seqpos/SeqPosSupport.h index cf12b8309f3b36ff06ef4d1b9f396aa4d3f35f5f..398eef7d60d7a37fa9dcf7d8f5202560dca58b04 100644 --- a/src/plugins/external_tool_support/src/seqpos/SeqPosSupport.h +++ b/src/plugins/external_tool_support/src/seqpos/SeqPosSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,15 +26,15 @@ namespace U2 { -#define ET_SEQPOS "seqpos" -#define ASSEMBLY_DIR_NAME "genomes" -#define ASSEMBLY_DIR "Assembly dir" - class SeqPosSupport : public ExternalTool { Q_OBJECT public: - SeqPosSupport(const QString &name); + SeqPosSupport(const QString& id, const QString &name); + static const QString ET_SEQPOS; + static const QString ET_SEQPOS_ID; + static const QString ASSEMBLY_DIR_NAME; + static const QString ASSEMBLY_DIR; private: void initialize(); }; diff --git a/src/plugins/external_tool_support/src/seqpos/SeqPosTask.cpp b/src/plugins/external_tool_support/src/seqpos/SeqPosTask.cpp index 5ed7ef59a4ecfcfc68c886de2fd49ea1b0997a60..f9954494d44958fa3dfb4d16ef71c86ff5303f56 100644 --- a/src/plugins/external_tool_support/src/seqpos/SeqPosTask.cpp +++ b/src/plugins/external_tool_support/src/seqpos/SeqPosTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -131,11 +131,11 @@ QList<Task*> SeqPosTask::onSubTaskFinished(Task* subTask) { if (treatTask == subTask) { QStringList args = settings.getArguments(treatDoc->getURLString()); - ExternalTool* rTool = AppContext::getExternalToolRegistry()->getByName(ET_R); + ExternalTool* rTool = AppContext::getExternalToolRegistry()->getById(RSupport::ET_R_ID); SAFE_POINT(NULL != rTool, "R script tool wasn't found in the registry", result); const QString rDir = QFileInfo(rTool->getPath()).dir().absolutePath(); - etTask = new ExternalToolRunTask(ET_SEQPOS, args, new ExternalToolLogParser(), getSettings().outDir, QStringList() << rDir); + etTask = new ExternalToolRunTask(SeqPosSupport::ET_SEQPOS_ID, args, new ExternalToolLogParser(), getSettings().outDir, QStringList() << rDir); setListenerForTask(etTask); result << etTask; } diff --git a/src/plugins/external_tool_support/src/seqpos/SeqPosTask.h b/src/plugins/external_tool_support/src/seqpos/SeqPosTask.h index 1af06f675d9e45a911948e15eb75eb7dde90edfc..ba41637be72d08508e28c49fa495222e878fc13e 100644 --- a/src/plugins/external_tool_support/src/seqpos/SeqPosTask.h +++ b/src/plugins/external_tool_support/src/seqpos/SeqPosTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/seqpos/SeqPosWorker.cpp b/src/plugins/external_tool_support/src/seqpos/SeqPosWorker.cpp index 98c774793c5f98065db1ec524bf67cc188f586e5..3e3fe7325430276e677b51b6e1d85067963cea3f 100644 --- a/src/plugins/external_tool_support/src/seqpos/SeqPosWorker.cpp +++ b/src/plugins/external_tool_support/src/seqpos/SeqPosWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -198,11 +198,11 @@ void SeqPosComboBoxWithChecksWidget::checkHint() { /* SeqPosComboBoxWithUrlsDelegate */ /************************************************************************/ void SeqPosComboBoxWithUrlsDelegate::updateUgeneSettings() { - updateDataPath(getDataPathName(), ASSEMBLY_DIR_NAME, true); + updateDataPath(getDataPathName(), SeqPosSupport::ASSEMBLY_DIR_NAME, true); } QString SeqPosComboBoxWithUrlsDelegate::getDataPathName() { - return ASSEMBLY_DIR; + return SeqPosSupport::ASSEMBLY_DIR; } QString SeqPosComboBoxWithUrlsDelegate::getAttributeName() { @@ -219,7 +219,7 @@ void SeqPosWorkerFactory::init() { U2DataPath* dataPath = NULL; U2DataPathRegistry* dpr = AppContext::getDataPathRegistry(); if (dpr){ - U2DataPath* dp = dpr->getDataPathByName(ASSEMBLY_DIR); + U2DataPath* dp = dpr->getDataPathByName(SeqPosSupport::ASSEMBLY_DIR); if (dp && dp->isValid()){ dataPath = dp; } @@ -333,7 +333,7 @@ void SeqPosWorkerFactory::init() { ActorPrototype *proto = new IntegralBusActorPrototype(protoDesc, portDescs, attrs); proto->setPrompter(new SeqPosPrompter()); proto->setEditor(new DelegateEditor(delegates)); - proto->addExternalTool(ET_SEQPOS); + proto->addExternalTool(SeqPosSupport::ET_SEQPOS_ID); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_CHIP_SEQ(), proto); WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID)->registerEntry(new SeqPosWorkerFactory()); } diff --git a/src/plugins/external_tool_support/src/seqpos/SeqPosWorker.h b/src/plugins/external_tool_support/src/seqpos/SeqPosWorker.h index df767bc6d1447bfce070103c3f2a79fb592b0606..39a4c7c66fb133624c1a0059751d76751191a123 100644 --- a/src/plugins/external_tool_support/src/seqpos/SeqPosWorker.h +++ b/src/plugins/external_tool_support/src/seqpos/SeqPosWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseDelegate.cpp b/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseDelegate.cpp index c0e01bcd03b1326facaa6d617c6ccbe47a8b6886..2a0fddef52c8a3bf613b3209c4ebf887895c7777 100644 --- a/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseDelegate.cpp +++ b/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseDelegate.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -45,7 +45,7 @@ namespace LocalWorkflow { SnpEffDatabaseDialog::SnpEffDatabaseDialog(QWidget* parent) : QDialog(parent) { setupUi(this); - new HelpButton(this, buttonBox, "22056354"); + new HelpButton(this, buttonBox, "24740244"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Select")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -113,8 +113,8 @@ void SnpEffDatabasePropertyWidget::setValue(const QVariant &value) { void SnpEffDatabasePropertyWidget::sl_showDialog() { // snpEff database list is available only if there is a valid tool! - ExternalTool *java = AppContext::getExternalToolRegistry()->getByName(ET_JAVA); - ExternalTool *snpEff = AppContext::getExternalToolRegistry()->getByName(ET_SNPEFF); + ExternalTool *java = AppContext::getExternalToolRegistry()->getById(JavaSupport::ET_JAVA_ID); + ExternalTool *snpEff = AppContext::getExternalToolRegistry()->getById(SnpEffSupport::ET_SNPEFF_ID); CHECK(java != NULL, ); CHECK(snpEff != NULL, ); if (!(java->isValid() && snpEff->isValid())) { diff --git a/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseDelegate.h b/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseDelegate.h index 41a31c42c023bddf5cfad59fd8a655e11f97bb8b..a10975c005488e361c05fdf063faedcb0dd8145f 100644 --- a/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseDelegate.h +++ b/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseDelegate.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseListModel.cpp b/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseListModel.cpp index 7b72e3e51e100e80deee10be5442d0a6122b7700..e6432c732616d5e1d83a39a9cba521777031f01f 100644 --- a/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseListModel.cpp +++ b/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseListModel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseListModel.h b/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseListModel.h index 22dfdbf17bae213171d61da3e20dd481e9c8e029..8ff7bd9eb8ab64d5fac0f290942980b1047c45a8 100644 --- a/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseListModel.h +++ b/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseListModel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseListTask.cpp b/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseListTask.cpp index a966ce347517752d82fb2a9362187db5afba1e18..56e97c51e5e2317dfa45ad98fc02f710ea2675a0 100644 --- a/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseListTask.cpp +++ b/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseListTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -35,7 +35,7 @@ namespace U2 { SnpEffDatabaseListTask::SnpEffDatabaseListTask() : ExternalToolSupportTask(tr("SnpEff Database List task"), TaskFlags_FOSE_COSC) { - snpEffVersion = AppContext::getExternalToolRegistry()->getByName(ET_SNPEFF)->getVersion(); + snpEffVersion = AppContext::getExternalToolRegistry()->getById(SnpEffSupport::ET_SNPEFF_ID)->getVersion(); dbListFilePath = AppContext::getSettings()->getValue(SNPEFF_DATABASE_LIST_SETTINGS + snpEffVersion, QVariant(""), true).toString(); } @@ -49,7 +49,7 @@ void SnpEffDatabaseListTask::prepare() { dbListFilePath += QString(QDir::separator()) + "SnpEff_DB_" + snpEffVersion + ".list"; const QStringList args("databases"); - ExternalToolRunTask* etTask = new ExternalToolRunTask(ET_SNPEFF, args, new SnpEffParser(), + ExternalToolRunTask* etTask = new ExternalToolRunTask(SnpEffSupport::ET_SNPEFF_ID, args, new SnpEffParser(), "", QStringList(), QString(), true); setListenerForTask(etTask); etTask->setStandartOutputFile(dbListFilePath); diff --git a/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseListTask.h b/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseListTask.h index 2a5f03549c1e4211137f7a7178beb0d775cae295..4bf2c2c256d8b76f9d50502b910b0e2df219752e 100644 --- a/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseListTask.h +++ b/src/plugins/external_tool_support/src/snpeff/SnpEffDatabaseListTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/snpeff/SnpEffSupport.cpp b/src/plugins/external_tool_support/src/snpeff/SnpEffSupport.cpp index 1f629ce68299e6a208c79e40279b57294060f547..ce02fec5ae8843d6100f244e9af7cf5be92160ee 100644 --- a/src/plugins/external_tool_support/src/snpeff/SnpEffSupport.cpp +++ b/src/plugins/external_tool_support/src/snpeff/SnpEffSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -38,8 +38,10 @@ namespace U2 { SnpEffDatabaseListModel* SnpEffSupport::databaseModel = new SnpEffDatabaseListModel(); +const QString SnpEffSupport::ET_SNPEFF = "SnpEff"; +const QString SnpEffSupport::ET_SNPEFF_ID = "USUPP_SNPEFF"; -SnpEffSupport::SnpEffSupport(const QString& name, const QString& path) : ExternalTool(name, path) +SnpEffSupport::SnpEffSupport(const QString& id, const QString& name, const QString& path) : ExternalTool(id, name, path) { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/cmdline.png"); @@ -56,13 +58,13 @@ SnpEffSupport::SnpEffSupport(const QString& name, const QString& path) : Externa validationArguments << "-h"; toolKitName = "SnpEff"; - toolRunnerProgramm = ET_JAVA; - dependencies << ET_JAVA; + toolRunnerProgram = JavaSupport::ET_JAVA_ID; + dependencies << JavaSupport::ET_JAVA_ID; connect(this, SIGNAL(si_toolValidationStatusChanged(bool)), SLOT(sl_validationStatusChanged(bool))); } -const QStringList SnpEffSupport::getToolRunnerAdditionalOptions() { +QStringList SnpEffSupport::getToolRunnerAdditionalOptions() const { QStringList result; AppResourcePool* s = AppContext::getAppSettings()->getAppResourcePool(); CHECK(s != NULL, result); @@ -70,7 +72,7 @@ const QStringList SnpEffSupport::getToolRunnerAdditionalOptions() { int memSize = s->getMaxMemorySizeInMB(); #if (defined(Q_OS_WIN) || defined(Q_OS_LINUX)) ExternalToolRegistry* etRegistry = AppContext::getExternalToolRegistry(); - JavaSupport* java = qobject_cast<JavaSupport*>(etRegistry->getByName(ET_JAVA)); + JavaSupport* java = qobject_cast<JavaSupport*>(etRegistry->getById(JavaSupport::ET_JAVA_ID)); CHECK(java != NULL, result); if (java->getArchitecture() == JavaSupport::x32) { memSize = memSize > 1212 ? 1212 : memSize; diff --git a/src/plugins/external_tool_support/src/snpeff/SnpEffSupport.h b/src/plugins/external_tool_support/src/snpeff/SnpEffSupport.h index 3fce206e265f9dd5ae6b3b6002e5949b77ada4be..97e15fc059bf2ed857bd0d92bc9b917b94efb69e 100644 --- a/src/plugins/external_tool_support/src/snpeff/SnpEffSupport.h +++ b/src/plugins/external_tool_support/src/snpeff/SnpEffSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,8 +24,6 @@ #include <U2Core/ExternalToolRegistry.h> -#define ET_SNPEFF "SnpEff" - namespace U2 { class SnpEffDatabaseListModel; @@ -33,12 +31,13 @@ class SnpEffDatabaseListModel; class SnpEffSupport : public ExternalTool { Q_OBJECT public: - SnpEffSupport(const QString& name, const QString& path = ""); + SnpEffSupport(const QString& id, const QString& name, const QString& path = ""); - const QStringList getToolRunnerAdditionalOptions(); + QStringList getToolRunnerAdditionalOptions() const; static SnpEffDatabaseListModel* databaseModel; - + static const QString ET_SNPEFF; + static const QString ET_SNPEFF_ID; private slots: void sl_validationStatusChanged(bool isValid); void sl_databaseListIsReady(); diff --git a/src/plugins/external_tool_support/src/snpeff/SnpEffTask.cpp b/src/plugins/external_tool_support/src/snpeff/SnpEffTask.cpp index 918e4f0e1ed8971374779b003482acf29d0a4780..b4ea7b5af7ed0733bbc962595a45b84097fb0efb 100644 --- a/src/plugins/external_tool_support/src/snpeff/SnpEffTask.cpp +++ b/src/plugins/external_tool_support/src/snpeff/SnpEffTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -149,7 +149,7 @@ void SnpEffTask::prepare(){ const QStringList args = getParameters(stateInfo); CHECK_OP(stateInfo, ); - ExternalToolRunTask* etTask = new ExternalToolRunTask(ET_SNPEFF, args, new SnpEffParser(settings.genome), settings.outDir, QStringList(), QString(), true); + ExternalToolRunTask* etTask = new ExternalToolRunTask(SnpEffSupport::ET_SNPEFF_ID, args, new SnpEffParser(settings.genome), settings.outDir, QStringList(), QString(), true); setListenerForTask(etTask); etTask->setStandartOutputFile( getResFileUrl() ); addSubTask(etTask); @@ -186,15 +186,15 @@ QString SnpEffTask::getDataPath() const{ CHECK(NULL != AppContext::getAppSettings(), QString()); CHECK(NULL != AppContext::getAppSettings()->getUserAppsSettings(), QString()); CHECK(NULL != AppContext::getExternalToolRegistry(), QString()); - CHECK(NULL != AppContext::getExternalToolRegistry()->getByName(ET_SNPEFF), QString()); + CHECK(NULL != AppContext::getExternalToolRegistry()->getById(SnpEffSupport::ET_SNPEFF_ID), QString()); // The next part is for VEME conferention // It is done instead of UGENE-5318 resolving // Remove it after 1.24 version release if (settings.genome == "NC_002549") { - return QFileInfo(AppContext::getExternalToolRegistry()->getByName(ET_SNPEFF)->getPath()).dir().absolutePath() + "/data"; + return QFileInfo(AppContext::getExternalToolRegistry()->getById(SnpEffSupport::ET_SNPEFF_ID)->getPath()).dir().absolutePath() + "/data"; } - return AppContext::getAppSettings()->getUserAppsSettings()->getDownloadDirPath() + "/" + "snpeff_data_" + AppContext::getExternalToolRegistry()->getByName(ET_SNPEFF)->getVersion(); + return AppContext::getAppSettings()->getUserAppsSettings()->getDownloadDirPath() + "/" + "snpeff_data_" + AppContext::getExternalToolRegistry()->getById(SnpEffSupport::ET_SNPEFF_ID)->getVersion(); } QStringList SnpEffTask::getParameters(U2OpStatus & os) const{ diff --git a/src/plugins/external_tool_support/src/snpeff/SnpEffTask.h b/src/plugins/external_tool_support/src/snpeff/SnpEffTask.h index 4d735f3e9ed205108acaf328bfe4a8b9a3cc3bc3..010088588665aed9300fa7dd8ffe62758d5017c8 100644 --- a/src/plugins/external_tool_support/src/snpeff/SnpEffTask.h +++ b/src/plugins/external_tool_support/src/snpeff/SnpEffTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/snpeff/SnpEffWorker.cpp b/src/plugins/external_tool_support/src/snpeff/SnpEffWorker.cpp index 5ca27fa8eb9bd591eb0d7305b43596c485962e8f..3e99bbb4d7ec604c4d7a1503e8a671337e50b418 100644 --- a/src/plugins/external_tool_support/src/snpeff/SnpEffWorker.cpp +++ b/src/plugins/external_tool_support/src/snpeff/SnpEffWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -211,8 +211,8 @@ void SnpEffFactory::init() { ActorPrototype* proto = new IntegralBusActorPrototype(desc, p, a); proto->setEditor(new DelegateEditor(delegates)); proto->setPrompter(new SnpEffPrompter()); - proto->addExternalTool(ET_JAVA); - proto->addExternalTool(ET_SNPEFF); + proto->addExternalTool(JavaSupport::ET_JAVA_ID); + proto->addExternalTool(SnpEffSupport::ET_SNPEFF_ID); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_VARIATION_ANALYSIS(), proto); DomainFactory *localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID); diff --git a/src/plugins/external_tool_support/src/snpeff/SnpEffWorker.h b/src/plugins/external_tool_support/src/snpeff/SnpEffWorker.h index 14879460dee2bb1e0f640bfccf827cedace22a6c..d0ff7700945371642f3c9798ffeb17cd3192a529 100644 --- a/src/plugins/external_tool_support/src/snpeff/SnpEffWorker.h +++ b/src/plugins/external_tool_support/src/snpeff/SnpEffWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/spades/SpadesDelegate.cpp b/src/plugins/external_tool_support/src/spades/SpadesDelegate.cpp index d70db7a97b0b9de4a67f2f8985bab458c20de799..d7ac907cf24b8d9ff54b860aa172816d3eca4ac4 100644 --- a/src/plugins/external_tool_support/src/spades/SpadesDelegate.cpp +++ b/src/plugins/external_tool_support/src/spades/SpadesDelegate.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -139,21 +139,18 @@ void SpadesPropertyWidget::sl_showDialog() { /*SpadesPropertyDialog*/ /********************************************************************/ -static const QString MESSAGE_BOX_ERROR = QApplication::translate("SpadesPropertyDialog", "At least one of the required input ports should be set in the \"Input data\" parameter."); -static const QString INCORRECT_PARAMETERS_ERROR = QApplication::translate("SpadesPropertyDialog", "Incorrect parameters, can't parse"); - SpadesPropertyDialog::SpadesPropertyDialog(const QMap<QString, QVariant> &value, QWidget *parent) : QDialog(parent) { setupUi(this); - new HelpButton(this, buttonBox, "22056378"); + new HelpButton(this, buttonBox, "24740271"); setItemsData(); setValue(value); } void SpadesPropertyDialog::accept() { CHECK_EXT(isSomeRequiredParemeterChecked(), - QMessageBox::critical(this, windowTitle(), MESSAGE_BOX_ERROR), ); + QMessageBox::critical(this, windowTitle(), QApplication::translate("SpadesPropertyDialog", "At least one of the required input ports should be set in the \"Input data\" parameter.")), ); QDialog::accept(); } @@ -169,7 +166,7 @@ QVariantMap SpadesPropertyDialog::getValue() const { if (pairEndCheckBox->isChecked()) { QStringList params = getDataFromComboBoxes(pairEndReadsDirectionComboBox, pairEndReadsTypeComboBox); - SAFE_POINT(params.size() == 2, INCORRECT_PARAMETERS_ERROR, QVariantMap()); + SAFE_POINT(params.size() == 2, QApplication::translate("SpadesPropertyDialog", "Incorrect parameters, can't parse"), QVariantMap()); result.insert(SpadesWorkerFactory::IN_PORT_PAIRED_ID_LIST[0], QString("%1:%2").arg(params.first()).arg(params.last())); @@ -177,7 +174,7 @@ QVariantMap SpadesPropertyDialog::getValue() const { if (hightQualityCheckBox->isChecked()) { QStringList params = getDataFromComboBoxes(hightQualityReadsDirectionComboBox, hightQualityReadsTypeComboBox); - SAFE_POINT(params.size() == 2, INCORRECT_PARAMETERS_ERROR, QVariantMap()); + SAFE_POINT(params.size() == 2, QApplication::translate("SpadesPropertyDialog", "Incorrect parameters, can't parse"), QVariantMap()); result.insert(SpadesWorkerFactory::IN_PORT_PAIRED_ID_LIST[2], QString("%1:%2").arg(params.first()).arg(params.last())); @@ -199,7 +196,7 @@ QVariantMap SpadesPropertyDialog::getValue() const { if (matePairsCheckBox->isChecked()) { QStringList params = getDataFromComboBoxes(matePairsReadsDirectionComboBox, matePairsTypeComboBox); - SAFE_POINT(params.size() == 2, INCORRECT_PARAMETERS_ERROR, QVariantMap()); + SAFE_POINT(params.size() == 2, QApplication::translate("SpadesPropertyDialog", "Incorrect parameters, can't parse"), QVariantMap()); result.insert(SpadesWorkerFactory::IN_PORT_PAIRED_ID_LIST[1], QString("%1:%2").arg(params.first()).arg(params.last())); @@ -229,7 +226,7 @@ void SpadesPropertyDialog::setValue(const QMap<QString, QVariant> &value) { //required if (value.contains(SpadesWorkerFactory::SEQUENCING_PLATFORM_ID)) { const QVariant platformVariant = value.value(SpadesWorkerFactory::SEQUENCING_PLATFORM_ID); - SAFE_POINT(platformVariant.canConvert<QString>(), INCORRECT_PARAMETERS_ERROR, ); + SAFE_POINT(platformVariant.canConvert<QString>(), QApplication::translate("SpadesPropertyDialog", "Incorrect parameters, can't parse"), ); sequencingPlatformComboBox->setCurrentIndex(sequencingPlatformComboBox->findData(platformVariant.toString())); @@ -312,11 +309,11 @@ QStringList SpadesPropertyDialog::getDataFromComboBoxes(QComboBox* directionComb } void SpadesPropertyDialog::setDataForComboBoxes(QComboBox* directionComboBox, QComboBox* typeComboBox, const QVariant& value) { - SAFE_POINT(value.canConvert<QString>(), INCORRECT_PARAMETERS_ERROR, ); + SAFE_POINT(value.canConvert<QString>(), QApplication::translate("SpadesPropertyDialog", "Incorrect parameters, can't parse"), ); const QString stringValue = value.toString(); const QStringList valueList = stringValue.split(":"); - SAFE_POINT(valueList.size() == 2, INCORRECT_PARAMETERS_ERROR, ); + SAFE_POINT(valueList.size() == 2, QApplication::translate("SpadesPropertyDialog", "Incorrect parameters, can't parse"), ); directionComboBox->setCurrentIndex(directionComboBox->findData(valueList.first())); typeComboBox->setCurrentIndex(typeComboBox->findData(valueList.last())); diff --git a/src/plugins/external_tool_support/src/spades/SpadesDelegate.h b/src/plugins/external_tool_support/src/spades/SpadesDelegate.h index e6621fdf06928b493f1cd531a38a2c45d8963771..852ee4f10e9710874b179cf42185eae67b0cbdc0 100644 --- a/src/plugins/external_tool_support/src/spades/SpadesDelegate.h +++ b/src/plugins/external_tool_support/src/spades/SpadesDelegate.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/spades/SpadesPortRelationDescriptor.cpp b/src/plugins/external_tool_support/src/spades/SpadesPortRelationDescriptor.cpp index 623c15e86c8508582df43f5462f41c9e6e052cb8..2590fe7160331cd7d7d233c1c586739e77e25d48 100644 --- a/src/plugins/external_tool_support/src/spades/SpadesPortRelationDescriptor.cpp +++ b/src/plugins/external_tool_support/src/spades/SpadesPortRelationDescriptor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/spades/SpadesPortRelationDescriptor.h b/src/plugins/external_tool_support/src/spades/SpadesPortRelationDescriptor.h index 8d3c7d19cf81714e9d4d80ab3beda801eb7e5881..8d02a6a493a2b453bf3b0ab1d1b825f6acd1e1ba 100644 --- a/src/plugins/external_tool_support/src/spades/SpadesPortRelationDescriptor.h +++ b/src/plugins/external_tool_support/src/spades/SpadesPortRelationDescriptor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/spades/SpadesSettingsWidget.cpp b/src/plugins/external_tool_support/src/spades/SpadesSettingsWidget.cpp index c237942c2842f6d0f42aed1a02c55166689e362f..237441ca3292c34563bdc85825decac338c23ce8 100644 --- a/src/plugins/external_tool_support/src/spades/SpadesSettingsWidget.cpp +++ b/src/plugins/external_tool_support/src/spades/SpadesSettingsWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/spades/SpadesSettingsWidget.h b/src/plugins/external_tool_support/src/spades/SpadesSettingsWidget.h index 24bc6c090f45a55b5690dfd1bf949a09e00eb859..8307a9f3b5c441e3d4ecfaffb05686dd349b8d31 100644 --- a/src/plugins/external_tool_support/src/spades/SpadesSettingsWidget.h +++ b/src/plugins/external_tool_support/src/spades/SpadesSettingsWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/spades/SpadesSlotRelationDescriptor.cpp b/src/plugins/external_tool_support/src/spades/SpadesSlotRelationDescriptor.cpp index 3c626e255f13633beb71fd2c1a54a9400aa9e2e7..52c3e0b688f146dda90dc5b855f1441e8b5d3a61 100644 --- a/src/plugins/external_tool_support/src/spades/SpadesSlotRelationDescriptor.cpp +++ b/src/plugins/external_tool_support/src/spades/SpadesSlotRelationDescriptor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/spades/SpadesSlotRelationDescriptor.h b/src/plugins/external_tool_support/src/spades/SpadesSlotRelationDescriptor.h index 08eb60e1b19eccc9f08a0dbfaaef26f7d3191c19..8ee825a889618235e314c7908480e16035774a1c 100644 --- a/src/plugins/external_tool_support/src/spades/SpadesSlotRelationDescriptor.h +++ b/src/plugins/external_tool_support/src/spades/SpadesSlotRelationDescriptor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/spades/SpadesSupport.cpp b/src/plugins/external_tool_support/src/spades/SpadesSupport.cpp index 553359aebdbc99e5f718189da1c0673352dbd02e..83c0c51cb71e88f452a0eefc51002dbfa73daaf3 100644 --- a/src/plugins/external_tool_support/src/spades/SpadesSupport.cpp +++ b/src/plugins/external_tool_support/src/spades/SpadesSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -28,9 +28,11 @@ namespace U2 { // SpadesSupport +const QString SpadesSupport::ET_SPADES = "SPAdes"; +const QString SpadesSupport::ET_SPADES_ID = "USUPP_SPADES"; -SpadesSupport::SpadesSupport(const QString &name, const QString &path): - ExternalTool(name, path) +SpadesSupport::SpadesSupport(const QString& id, const QString &name, const QString &path): + ExternalTool(id, name, path) { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/cmdline.png"); @@ -38,14 +40,15 @@ SpadesSupport::SpadesSupport(const QString &name, const QString &path): warnIcon = QIcon(":external_tool_support/images/cmdline_warn.png"); } - executableFileName="spades.py"; - validMessage="SPAdes genome assembler"; - description=tr("<i>SPAdes</i> - St. Petersburg genome assembler - is intended for both standard isolates and single-cell MDA bacteria assemblies. Official site: http://bioinf.spbau.ru/spades"); - versionRegExp=QRegExp("v.(\\d+\\.\\d+\\.\\d+)"); - toolKitName="SPAdes"; + executableFileName = "spades.py"; + validMessage = "SPAdes"; + description = tr("<i>SPAdes</i> - St. Petersburg genome assembler - is intended for both standard isolates and single-cell MDA bacteria assemblies. Official site: http://bioinf.spbau.ru/spades"); + validationArguments << "--version"; + versionRegExp = QRegExp("SPAdes v(\\d+.\\d+.\\d+)"); + toolKitName = "SPAdes"; - toolRunnerProgramm = ET_PYTHON; - dependencies << ET_PYTHON; + toolRunnerProgram = PythonSupport::ET_PYTHON_ID; + dependencies << PythonSupport::ET_PYTHON_ID; } } // namespace U2 diff --git a/src/plugins/external_tool_support/src/spades/SpadesSupport.h b/src/plugins/external_tool_support/src/spades/SpadesSupport.h index 77cc262a1e2b12a123e467ec51974feced43c990..86c97100858c199fe5a499a68cca67c6f121d02a 100644 --- a/src/plugins/external_tool_support/src/spades/SpadesSupport.h +++ b/src/plugins/external_tool_support/src/spades/SpadesSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,12 +26,13 @@ namespace U2 { -#define ET_SPADES "SPAdes" - class SpadesSupport : public ExternalTool { Q_OBJECT public: - SpadesSupport(const QString &name, const QString &path = ""); + SpadesSupport(const QString& id, const QString &name, const QString &path = ""); + + static const QString ET_SPADES; + static const QString ET_SPADES_ID; }; } // namespace U2 diff --git a/src/plugins/external_tool_support/src/spades/SpadesTask.cpp b/src/plugins/external_tool_support/src/spades/SpadesTask.cpp index 49a4374dcae16021892dc8843d8718c117dafb2f..b7e8ab4039bdd7fe56e0c3823b052865dadf09ef 100644 --- a/src/plugins/external_tool_support/src/spades/SpadesTask.cpp +++ b/src/plugins/external_tool_support/src/spades/SpadesTask.cpp @@ -1,7 +1,7 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -105,7 +105,7 @@ void SpadesTask::prepare() { //it uses system call gzip. it might not be installed arguments.append("--disable-gzip-output"); - assemblyTask = new ExternalToolRunTask(ET_SPADES, arguments, new SpadesLogParser(), settings.outDir.getURLString()); + assemblyTask = new ExternalToolRunTask(SpadesSupport::ET_SPADES_ID, arguments, new SpadesLogParser(), settings.outDir.getURLString()); if (!settings.listeners.isEmpty()) { assemblyTask->addOutputListener(settings.listeners.first()); } diff --git a/src/plugins/external_tool_support/src/spades/SpadesTask.h b/src/plugins/external_tool_support/src/spades/SpadesTask.h index a8edd3fcb378fde7babe6ccf9d3f03a1fc893a27..9de5ef6b6cedd520266d815e98db718caab575cd 100644 --- a/src/plugins/external_tool_support/src/spades/SpadesTask.h +++ b/src/plugins/external_tool_support/src/spades/SpadesTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/spades/SpadesTaskTest.cpp b/src/plugins/external_tool_support/src/spades/SpadesTaskTest.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7b5b7aa90d6337fae48b659ed45be2205894536a --- /dev/null +++ b/src/plugins/external_tool_support/src/spades/SpadesTaskTest.cpp @@ -0,0 +1,337 @@ +/** +* UGENE - Integrated Bioinformatics Tools. +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> +* http://ugene.net +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +* MA 02110-1301, USA. +*/ + +#include <QDomElement> +#include <QFile> + +#include <U2Core/L10n.h> + +#include "SpadesTaskTest.h" +#include "SpadesWorker.h" +#include "utils/OutputCollector.h" + +namespace U2 { + +const QString GTest_SpadesTaskTest::SEQUENCING_PLATFORM = "platform"; + +const QString GTest_SpadesTaskTest::PAIRED_END_READS = "pe_reads"; +const QString GTest_SpadesTaskTest::PAIRED_END_READS_ORIENTATION = "pe_reads_orientation"; +const QString GTest_SpadesTaskTest::PAIRED_END_READS_TYPE = "pe_reads_type"; + +const QString GTest_SpadesTaskTest::HIGH_QUALITY_MATE_PAIRS = "hq_mp"; +const QString GTest_SpadesTaskTest::HIGH_QUALITY_MATE_PAIRS_ORIENTATION = "hq_mp_orientation"; +const QString GTest_SpadesTaskTest::HIGH_QUALITY_MATE_PAIRS_TYPE = "hq_mp_type"; + +const QString GTest_SpadesTaskTest::UNPAIRED_READS = "unpaired_reads"; +const QString GTest_SpadesTaskTest::PACBIO_CCS_READS = "pbccs_reads"; + +const QString GTest_SpadesTaskTest::MATE_PAIRS = "mp"; +const QString GTest_SpadesTaskTest::MATE_PAIRS_ORIENTATION = "mp_orientation"; +const QString GTest_SpadesTaskTest::MATE_PAIRS_TYPE = "mp_type"; + +const QString GTest_SpadesTaskTest::PACBIO_CLR_READS = "pbclr_reads"; +const QString GTest_SpadesTaskTest::OXFORD_NANOPORE_READS = "onp_reads"; +const QString GTest_SpadesTaskTest::SANGER_READS = "sanger_reads"; +const QString GTest_SpadesTaskTest::TRUSTED_CONTIGS = "trusted_contigs"; +const QString GTest_SpadesTaskTest::UNTRUSTED_CONTIGS = "untrusted_contigs"; + +const QString GTest_SpadesTaskTest::OUTPUT_DIR = "out"; +const QString GTest_SpadesTaskTest::DESIRED_PARAMETERS = "desired_parameters"; + +void GTest_SpadesTaskTest::init(XMLTestFormat *tf, const QDomElement& el) { + QVariantMap inputDataSettings; + QString elementStr = el.attribute(SEQUENCING_PLATFORM); + if (elementStr == "iontorrent") { + inputDataSettings.insert(LocalWorkflow::SpadesWorkerFactory::SEQUENCING_PLATFORM_ID, QVariant(PLATFORM_ION_TORRENT)); + } + + elementStr = el.attribute(OUTPUT_DIR); + if (elementStr.isEmpty()) { + stateInfo.setError("output_dir_is_empty"); + return; + } + taskSettings.outDir = env->getVar("TEMP_DATA_DIR") + "/" + elementStr; + + elementStr = el.attribute(PAIRED_END_READS); + if (elementStr == "true") { + AssemblyReads reads; + reads.libName = LIB_PAIR_DEFAULT; + elementStr = el.attribute(PAIRED_END_READS_ORIENTATION); + if (elementStr.isEmpty()) { + failMissingValue(PAIRED_END_READS_ORIENTATION); + return; + } + + if (elementStr == "fr") { + reads.orientation = ORIENTATION_FR; + } else if (elementStr == "rf") { + reads.orientation = ORIENTATION_RF; + } else if (elementStr == "ff") { + reads.orientation = ORIENTATION_FF; + } else { + wrongValue(PAIRED_END_READS_ORIENTATION); + return; + } + + elementStr = el.attribute(PAIRED_END_READS_TYPE); + if (elementStr.isEmpty()) { + failMissingValue(PAIRED_END_READS_TYPE); + return; + } + + if (elementStr == "single") { + reads.readType = TYPE_SINGLE; + } else if (elementStr == "interlaced") { + reads.readType = TYPE_INTERLACED; + } else { + wrongValue(PAIRED_END_READS_TYPE); + return; + } + taskSettings.reads.append(reads); + } + + elementStr = el.attribute(HIGH_QUALITY_MATE_PAIRS); + if (elementStr == "true") { + AssemblyReads reads; + reads.libName = LIB_PAIR_MATE_HQ; + elementStr = el.attribute(HIGH_QUALITY_MATE_PAIRS_ORIENTATION); + if (elementStr.isEmpty()) { + failMissingValue(HIGH_QUALITY_MATE_PAIRS_ORIENTATION); + return; + } + + if (elementStr == "fr") { + reads.orientation = ORIENTATION_FR; + } else if (elementStr == "rf") { + reads.orientation = ORIENTATION_RF; + } else if (elementStr == "ff") { + reads.orientation = ORIENTATION_FF; + } else { + wrongValue(HIGH_QUALITY_MATE_PAIRS_ORIENTATION); + return; + } + + elementStr = el.attribute(HIGH_QUALITY_MATE_PAIRS_TYPE); + if (elementStr.isEmpty()) { + failMissingValue(HIGH_QUALITY_MATE_PAIRS_TYPE); + return; + } + + if (elementStr == "single") { + reads.readType = TYPE_SINGLE; + } else if (elementStr == "interlaced") { + reads.readType = TYPE_INTERLACED; + } else { + wrongValue(HIGH_QUALITY_MATE_PAIRS_TYPE); + return; + } + taskSettings.reads.append(reads); + } + + elementStr = el.attribute(MATE_PAIRS); + if (elementStr == "true") { + AssemblyReads reads; + reads.libName = LIB_PAIR_MATE; + elementStr = el.attribute(MATE_PAIRS_ORIENTATION); + if (elementStr.isEmpty()) { + failMissingValue(MATE_PAIRS_ORIENTATION); + return; + } + + if (elementStr == "fr") { + reads.orientation = ORIENTATION_FR; + } else if (elementStr == "rf") { + reads.orientation = ORIENTATION_RF; + } else if (elementStr == "ff") { + reads.orientation = ORIENTATION_FF; + } else { + wrongValue(MATE_PAIRS_ORIENTATION); + return; + } + + elementStr = el.attribute(MATE_PAIRS_TYPE); + if (elementStr.isEmpty()) { + failMissingValue(MATE_PAIRS_TYPE); + return; + } + + if (elementStr == "single") { + reads.readType = TYPE_SINGLE; + } else if (elementStr == "interlaced") { + reads.readType = TYPE_INTERLACED; + } else { + wrongValue(MATE_PAIRS_TYPE); + return; + } + taskSettings.reads.append(reads); + } + + elementStr = el.attribute(UNPAIRED_READS); + if (elementStr == "true") { + AssemblyReads reads; + reads.libName = LIB_SINGLE_UNPAIRED; + taskSettings.reads.append(reads); + } + + elementStr = el.attribute(PACBIO_CCS_READS); + if (elementStr == "true") { + AssemblyReads reads; + reads.libName = LIB_SINGLE_CSS; + taskSettings.reads.append(reads); + } + + elementStr = el.attribute(PACBIO_CLR_READS); + if (elementStr == "true") { + AssemblyReads reads; + reads.libName = LIB_SINGLE_CLR; + taskSettings.reads.append(reads); + } + + elementStr = el.attribute(OXFORD_NANOPORE_READS); + if (elementStr == "true") { + AssemblyReads reads; + reads.libName = LIB_SINGLE_NANOPORE; + taskSettings.reads.append(reads); + } + + elementStr = el.attribute(SANGER_READS); + if (elementStr == "true") { + AssemblyReads reads; + reads.libName = LIB_SINGLE_SANGER; + taskSettings.reads.append(reads); + } + + elementStr = el.attribute(TRUSTED_CONTIGS); + if (elementStr == "true") { + AssemblyReads reads; + reads.libName = LIB_SINGLE_TRUSTED; + taskSettings.reads.append(reads); + } + + elementStr = el.attribute(UNTRUSTED_CONTIGS); + if (elementStr == "true") { + AssemblyReads reads; + reads.libName = LIB_SINGLE_UNTRUSTED; + taskSettings.reads.append(reads); + } + + elementStr = el.attribute(DESIRED_PARAMETERS); + if (elementStr.isEmpty()) { + failMissingValue(DESIRED_PARAMETERS); + return; + } else { + desiredParameters = elementStr.split(";"); + } + + //generate read urls + int counter = 1; + QList<AssemblyReads>::iterator it(taskSettings.reads.begin()); + for (;it != taskSettings.reads.end(); it++) { + AssemblyReads &reads = *it; + if ((reads.libName.contains("mate") || reads.libName.contains("pair")) && reads.readType != TYPE_INTERLACED) { + reads.left.append(GUrl(QString::number(counter++) + "_left_" + reads.libName + "_read")); + reads.right.append(GUrl(QString::number(counter++) + "_right_" + reads.libName + "_read")); + } else { + reads.left.append(GUrl(QString::number(counter++) + "_" + reads.libName + "_read")); + } + } + taskSettings.setCustomValue(SpadesTask::OPTION_INPUT_DATA, inputDataSettings); +} + +void GTest_SpadesTaskTest::prepare() { + collector = new OutputCollector(false); + taskSettings.listeners = QList<ExternalToolListener*>() << collector; + spadesTask = new SpadesTask(taskSettings); + addSubTask(spadesTask); +} + +QList<Task*> GTest_SpadesTaskTest::onSubTaskFinished(Task* subTask) { + QList<Task*> res; + if (subTask == spadesTask) { + QString log = collector->getLog(); + delete collector; + foreach(const QString& el, desiredParameters) { + if (!log.contains(el)) { + stateInfo.setError(QString("Desired parameter %1 not found").arg(el)); + return res; + } + } + } + return res; +} + +const QString GTest_CheckYAMLFile::STRINGS_TO_CHECK = "strings_to_check"; +const QString GTest_CheckYAMLFile::INPUT_DIR = "input_dir"; + +void GTest_CheckYAMLFile::init(XMLTestFormat *tf, const QDomElement& el) { + QVariantMap inputDataSettings; + QString elementStr = el.attribute(STRINGS_TO_CHECK); + if (elementStr.isEmpty()) { + failMissingValue(STRINGS_TO_CHECK); + return; + } else { + desiredStrings = elementStr.split(";"); + } + + elementStr = el.attribute(INPUT_DIR); + if (elementStr.isEmpty()) { + failMissingValue(INPUT_DIR); + return; + } + fileToCheck = env->getVar("TEMP_DATA_DIR") + "/" + elementStr + "datasets.yaml"; +} + +void GTest_CheckYAMLFile::prepare() { + QFile f(fileToCheck); + if (!f.open(QIODevice::ReadOnly)) { + setError(QString("Cannot open file '%1'!").arg(fileToCheck)); + return; + } + + QStringList fileLines; + while (!f.atEnd()) { + QByteArray bytes = f.readLine(); + fileLines.append(bytes); + } + f.close(); + + foreach(const QString& el, desiredStrings) { + foreach(const QString& fileLane, fileLines) { + if (fileLane.contains(el.trimmed())) { + desiredStrings.removeAll(el); + } + } + } + if (desiredStrings.size() != 0) { + setError(QString("Line '%1' not found in yaml file!").arg(desiredStrings.first())); + } +} + +QList<XMLTestFactory*> SpadesTaskTest::createTestFactories() { + QList<XMLTestFactory*> res; + res.append(GTest_SpadesTaskTest::createFactory()); + res.append(GTest_CheckYAMLFile::createFactory()); + + return res; +} + + +} diff --git a/src/plugins/external_tool_support/src/spades/SpadesTaskTest.h b/src/plugins/external_tool_support/src/spades/SpadesTaskTest.h new file mode 100644 index 0000000000000000000000000000000000000000..482d7af313d2dd5af052d9863b3e954261f74b76 --- /dev/null +++ b/src/plugins/external_tool_support/src/spades/SpadesTaskTest.h @@ -0,0 +1,101 @@ +/** +* UGENE - Integrated Bioinformatics Tools. +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> +* http://ugene.net +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +* MA 02110-1301, USA. +*/ + +#ifndef _U2_SPADES_TEST_TASK_ +#define _U2_SPADES_TEST_TASK_ + +#include <U2Algorithm/GenomeAssemblyRegistry.h> + +#include <U2Test/GTest.h> +#include <U2Test/XMLTestFormat.h> +#include <U2Test/XMLTestUtils.h> + +#include "SpadesTask.h" + +namespace U2 { + +class OutputCollector; + +class GTest_SpadesTaskTest : public XmlTest { + Q_OBJECT +public: + static const QString SEQUENCING_PLATFORM; + + static const QString PAIRED_END_READS; + static const QString PAIRED_END_READS_ORIENTATION; + static const QString PAIRED_END_READS_TYPE; + + static const QString HIGH_QUALITY_MATE_PAIRS; + static const QString HIGH_QUALITY_MATE_PAIRS_ORIENTATION; + static const QString HIGH_QUALITY_MATE_PAIRS_TYPE; + + static const QString UNPAIRED_READS; + static const QString PACBIO_CCS_READS; + + static const QString MATE_PAIRS; + static const QString MATE_PAIRS_ORIENTATION; + static const QString MATE_PAIRS_TYPE; + + static const QString PACBIO_CLR_READS; + static const QString OXFORD_NANOPORE_READS; + static const QString SANGER_READS; + static const QString TRUSTED_CONTIGS; + static const QString UNTRUSTED_CONTIGS; + + static const QString DESIRED_PARAMETERS; + static const QString OUTPUT_DIR; +public: + SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_SpadesTaskTest, "spades-task-input-type", TaskFlags(TaskFlag_NoRun) | TaskFlag_FailOnSubtaskCancel); + //SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_SpadesTaskTest, "spades-task-input-type"); + + void prepare(); + QList<Task*> onSubTaskFinished(Task* subTask); + +private: + void setAndCheckArgs(); + + GenomeAssemblyTaskSettings taskSettings; + SpadesTask *spadesTask; + OutputCollector *collector; + QStringList desiredParameters; +}; + +class GTest_CheckYAMLFile : public XmlTest { + Q_OBJECT +public: + static const QString STRINGS_TO_CHECK; + static const QString INPUT_DIR; + + SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CheckYAMLFile, "check-yaml-file"); + + void prepare(); +private: + QStringList desiredStrings; + QString fileToCheck; +}; + +class SpadesTaskTest { +public: + static QList<XMLTestFactory*> createTestFactories(); +}; + +} +#endif diff --git a/src/plugins/external_tool_support/src/spades/SpadesWorker.cpp b/src/plugins/external_tool_support/src/spades/SpadesWorker.cpp index 0fedbfb20d9399e8ef9ad1a0a8adddc4e8e3d770..2921eff80feba163ba33cc8430cc39946e05d560 100644 --- a/src/plugins/external_tool_support/src/spades/SpadesWorker.cpp +++ b/src/plugins/external_tool_support/src/spades/SpadesWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -226,6 +226,8 @@ Task *SpadesWorker::tick() { QVariantMap unitedPortContext; + int messageCounter = 0; + int messageId = MessageMetadata::INVALID_ID; for (int i = 0; i < readsFetchers.size(); i++) { const bool isPortEnabled = readsFetchers[i].hasFullDataset(); CHECK_CONTINUE(isPortEnabled); @@ -241,6 +243,9 @@ Task *SpadesWorker::tick() { QList<Message> fullDataset = readsFetchers[i].takeFullDataset(); foreach(const Message& m, fullDataset) { + messageCounter++; + messageId = m.getMetadataId(); + QVariantMap data = m.getData().toMap(); const QString urlSlotId = SpadesWorkerFactory::READS_URL_SLOT_ID_LIST[index]; @@ -270,7 +275,8 @@ Task *SpadesWorker::tick() { } CHECK(!settings.reads.isEmpty(), NULL); - output->setContext(unitedPortContext, MessageMetadata::INVALID_ID); + int currentMetadataId = messageCounter == 1 ? messageId : MessageMetadata::INVALID_ID; + output->setContext(unitedPortContext, currentMetadataId); settings.listeners = createLogListeners(); GenomeAssemblyMultiTask* t = new GenomeAssemblyMultiTask(settings); @@ -370,7 +376,7 @@ void SpadesWorker::sl_taskFinished() { GenomeAssemblyTaskSettings SpadesWorker::getSettings(U2OpStatus &os) { GenomeAssemblyTaskSettings settings; - settings.algName = ET_SPADES; + settings.algName = SpadesSupport::ET_SPADES; settings.openView = false; QString outDir = getValue<QString>(SpadesWorkerFactory::OUTPUT_DIR); if (outDir.isEmpty()) { @@ -401,23 +407,6 @@ GenomeAssemblyTaskSettings SpadesWorker::getSettings(U2OpStatus &os) { /* Factory */ /************************************************************************/ -static const QString INPUT_DATA_DESCRIPTION = QCoreApplication::tr("<html>" - "Select the type of input for SPAdes. URL(s) to the input files of the selected type(s) should be provided to the corresponding port(s) of the workflow element." - "<p>At least one library of the following types is required:" - "<ul>" - "<li>Illumina paired-end/high-quality mate-pairs/unpaired reads</li>" - "<li>IonTorrent paired-end/high-quality mate-pairs/unpaired reads</li>" - "<li>PacBio CCS reads (at least 5 reads coverage is recommended)</li>" - "</ul></p>" - "<p>It is strongly suggested to provide multiple paired-end and mate-pair libraries according to their insert size (from smallest to longest).</p>" - "<p>Additionally, one may input Oxford Nanopore reads, Sanger reads, contigs generated by other assembler(s), etc." - "Note that Illumina and IonTorrent libraries should not be assembled together. All other types of input data are compatible.</p>" - "<p>It is also possible to set up reads orientation (forward-reverse (fr), reverse-forward (rf), forward-forward (ff)) and specify whether paired reads are separate or interlaced.</p>" - "<p>Illumina, IonTorrent or PacBio CCS reads should be provided in FASTQ format.<br>" - "Illumina or PacBio read may also be provided in FASTA format. Error correction should be skipped in this case (see the \"Running mode\" parameter).<br>" - "Sanger, Oxford Nanopore and PacBio CLR reads can be provided in both formats since SPAdes does not run error correction for these types of data.</p>" - "</html>"); - void SpadesWorkerFactory::init() { QList<PortDescriptor*> portDescs; @@ -487,7 +476,22 @@ void SpadesWorkerFactory::init() { { Descriptor inputData(SpadesTask::OPTION_INPUT_DATA, SpadesWorker::tr("Input data"), - INPUT_DATA_DESCRIPTION); + QCoreApplication::tr("<html>" + "Select the type of input for SPAdes. URL(s) to the input files of the selected type(s) should be provided to the corresponding port(s) of the workflow element." + "<p>At least one library of the following types is required:" + "<ul>" + "<li>Illumina paired-end/high-quality mate-pairs/unpaired reads</li>" + "<li>IonTorrent paired-end/high-quality mate-pairs/unpaired reads</li>" + "<li>PacBio CCS reads (at least 5 reads coverage is recommended)</li>" + "</ul></p>" + "<p>It is strongly suggested to provide multiple paired-end and mate-pair libraries according to their insert size (from smallest to longest).</p>" + "<p>Additionally, one may input Oxford Nanopore reads, Sanger reads, contigs generated by other assembler(s), etc." + "Note that Illumina and IonTorrent libraries should not be assembled together. All other types of input data are compatible.</p>" + "<p>It is also possible to set up reads orientation (forward-reverse (fr), reverse-forward (rf), forward-forward (ff)) and specify whether paired reads are separate or interlaced.</p>" + "<p>Illumina, IonTorrent or PacBio CCS reads should be provided in FASTQ format.<br>" + "Illumina or PacBio read may also be provided in FASTA format. Error correction should be skipped in this case (see the \"Running mode\" parameter).<br>" + "Sanger, Oxford Nanopore and PacBio CLR reads can be provided in both formats since SPAdes does not run error correction for these types of data.</p>" + "</html>")); Descriptor outDir(OUTPUT_DIR, SpadesWorker::tr("Output folder"), @@ -586,7 +590,7 @@ void SpadesWorkerFactory::init() { for (int i = 0; i < IN_PORT_PAIRED_ID_LIST.size(); i++) { proto->setPortValidator(IN_PORT_PAIRED_ID_LIST[i], new PairedReadsPortValidator(READS_URL_SLOT_ID_LIST[i], READS_PAIRED_URL_SLOT_ID_LIST[i])); } - proto->addExternalTool(ET_SPADES); + proto->addExternalTool(SpadesSupport::ET_SPADES_ID); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_NGS_MAP_ASSEMBLE_READS(), proto); WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID)->registerEntry(new SpadesWorkerFactory()); } diff --git a/src/plugins/external_tool_support/src/spades/SpadesWorker.h b/src/plugins/external_tool_support/src/spades/SpadesWorker.h index 70765ead28b963baf918927921cb8cde23cb9c6a..e0de2137aaeca5db3776ffd8c14c8b4bc9b19977 100644 --- a/src/plugins/external_tool_support/src/spades/SpadesWorker.h +++ b/src/plugins/external_tool_support/src/spades/SpadesWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/spidey/SpideySupport.cpp b/src/plugins/external_tool_support/src/spidey/SpideySupport.cpp index ef803466a50746da02f6167e70aea38eacb74db0..5c018684866ffcd7032e6ea26d5545fe6cd305b0 100644 --- a/src/plugins/external_tool_support/src/spidey/SpideySupport.cpp +++ b/src/plugins/external_tool_support/src/spidey/SpideySupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,6 +25,7 @@ #include <U2Algorithm/SplicedAlignmentTaskRegistry.h> #include <U2Core/AppContext.h> +#include <U2Core/AppResources.h> #include <U2Core/AppSettings.h> #include <U2Core/U2OpStatusUtils.h> #include <U2Core/U2SafePoints.h> @@ -53,7 +54,11 @@ namespace U2 { -SpideySupport::SpideySupport(const QString& name, const QString& path) : ExternalTool(name, path) +const QString SpideySupport::ET_SPIDEY = "Spidey"; +const QString SpideySupport::ET_SPIDEY_ID = "USUPP_SPIDEY"; +const QString SpideySupport::SPIDEY_TMP_DIR = "spidey"; + +SpideySupport::SpideySupport(const QString& id, const QString& name, const QString& path) : ExternalTool(id, name, path) { if (AppContext::getMainWindow()) { viewCtx = new SpideySupportContext(this); @@ -88,11 +93,11 @@ void SpideySupport::sl_validationStatusChanged( bool isValid ) SplicedAlignmentTaskRegistry* registry = AppContext::getSplicedAlignmentTaskRegistry(); if (isValid) { - if (!registry->hadRegistered(ET_SPIDEY)) { - registry->registerTaskFactory(new SpideyAlignmentTaskFactory, ET_SPIDEY); + if (!registry->hadRegistered(ET_SPIDEY_ID)) { + registry->registerTaskFactory(new SpideyAlignmentTaskFactory, ET_SPIDEY_ID); } } else { - registry->unregisterTaskFactory(ET_SPIDEY); + registry->unregisterTaskFactory(ET_SPIDEY_ID); } } @@ -130,16 +135,20 @@ void SpideySupportContext::buildMenu(GObjectView* view, QMenu* m) { } } +// This is maximum sequence size we allow to use with Spidey task on 32-bit OSes +// 100Mb sequence size will result to ~1.5Gb memory usage by Spidey process. +#define MAX_SPIDEY_SEQUENCE_LENGTH_32_BIT_OS (100 * 1000 * 1000) + void SpideySupportContext::sl_align_with_Spidey() { QWidget* parent = QApplication::activeWindow(); //Check that Spidey and tempory folder path defined - if (AppContext::getExternalToolRegistry()->getByName(ET_SPIDEY)->getPath().isEmpty()){ + if (AppContext::getExternalToolRegistry()->getById(SpideySupport::ET_SPIDEY_ID)->getPath().isEmpty()){ QObjectScopedPointer<QMessageBox> msgBox = new QMessageBox(parent); - msgBox->setWindowTitle(ET_SPIDEY); - msgBox->setText(tr("Path for %1 tool not selected.").arg(ET_SPIDEY)); + msgBox->setWindowTitle(SpideySupport::ET_SPIDEY); + msgBox->setText(tr("Path for %1 tool not selected.").arg(SpideySupport::ET_SPIDEY)); msgBox->setInformativeText(tr("Do you want to select it now?")); msgBox->setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox->setDefaultButton(QMessageBox::Yes); @@ -156,6 +165,9 @@ void SpideySupportContext::sl_align_with_Spidey() { settings.allowMultipleSelection = false; settings.objectTypesToShow.insert(GObjectTypes::SEQUENCE); QScopedPointer<U2SequenceObjectConstraints> seqConstraints(new U2SequenceObjectConstraints()); + if (AppResourcePool::is32BitBuild()) { + seqConstraints->sequenceSize = MAX_SPIDEY_SEQUENCE_LENGTH_32_BIT_OS; + } seqConstraints->alphabetType = DNAAlphabet_NUCL; settings.objectConstraints.insert(seqConstraints.data()); diff --git a/src/plugins/external_tool_support/src/spidey/SpideySupport.h b/src/plugins/external_tool_support/src/spidey/SpideySupport.h index 1d6188def761955d4f997618ad1439b64a21744a..987853cb014fc0af70d9f7442f7dbebcab3cd74a 100644 --- a/src/plugins/external_tool_support/src/spidey/SpideySupport.h +++ b/src/plugins/external_tool_support/src/spidey/SpideySupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,19 +25,19 @@ #include <U2Core/ExternalToolRegistry.h> #include "utils/ExternalToolSupportAction.h" -#define ET_SPIDEY "Spidey" -#define SPIDEY_TMP_DIR "spidey" - namespace U2 { class SpideySupport : public ExternalTool { Q_OBJECT public: - SpideySupport(const QString& name, const QString& path = ""); + SpideySupport(const QString& id, const QString& name, const QString& path = ""); GObjectViewWindowContext* getViewContext(){ return viewCtx; } + + static const QString ET_SPIDEY; + static const QString ET_SPIDEY_ID; + static const QString SPIDEY_TMP_DIR; private slots: void sl_validationStatusChanged(bool newStatus); - private: GObjectViewWindowContext* viewCtx; }; diff --git a/src/plugins/external_tool_support/src/spidey/SpideySupportTask.cpp b/src/plugins/external_tool_support/src/spidey/SpideySupportTask.cpp index ef00e65ca02aeaf7aea04569f50f2f22e918f23b..bfc9dda4cfbca5a69f606d2a66772e2c3d96f634 100644 --- a/src/plugins/external_tool_support/src/spidey/SpideySupportTask.cpp +++ b/src/plugins/external_tool_support/src/spidey/SpideySupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -49,7 +49,7 @@ SpideyAlignmentTask::SpideyAlignmentTask(const SplicedAlignmentTaskConfig &setti void SpideyAlignmentTask::prepare() { //Add new subdir for temporary files - tmpDirUrl = ExternalToolSupportUtils::createTmpDir(SPIDEY_TMP_DIR, stateInfo); + tmpDirUrl = ExternalToolSupportUtils::createTmpDir(SpideySupport::SPIDEY_TMP_DIR, stateInfo); CHECK_OP(stateInfo,); prepareDataForSpideyTask = @@ -74,15 +74,15 @@ QList<Task *> SpideyAlignmentTask::onSubTaskFinished(Task *subTask) { tmpOutputUrl = prepareDataForSpideyTask->getResultPath(); const QStringList &arguments = prepareDataForSpideyTask->getArgumentsList(); - spideyTask = new ExternalToolRunTask(ET_SPIDEY, arguments, new SpideyLogParser()); + spideyTask = new ExternalToolRunTask(SpideySupport::ET_SPIDEY_ID, arguments, new SpideyLogParser()); spideyTask->setSubtaskProgressWeight(95); res.append(spideyTask); } else if (subTask == spideyTask) { if (!QFile::exists(tmpOutputUrl)) { - if (AppContext::getExternalToolRegistry()->getByName(ET_SPIDEY)->isValid()) { + if (AppContext::getExternalToolRegistry()->getById(SpideySupport::ET_SPIDEY_ID)->isValid()) { stateInfo.setError(tr("Output file not found")); } else { - ExternalTool *spideyTool = AppContext::getExternalToolRegistry()->getByName(ET_SPIDEY); + ExternalTool *spideyTool = AppContext::getExternalToolRegistry()->getById(SpideySupport::ET_SPIDEY_ID); SAFE_POINT(NULL != spideyTool, "Invalid Spidey tool!", res); stateInfo.setError( tr("Output file not found. May be %1 tool path '%2' not valid?") diff --git a/src/plugins/external_tool_support/src/spidey/SpideySupportTask.h b/src/plugins/external_tool_support/src/spidey/SpideySupportTask.h index 369e78e69141f818251f43e43666cce9b006bcdd..5fded52233da9d7cf087717d21b9b1cf69597b9b 100644 --- a/src/plugins/external_tool_support/src/spidey/SpideySupportTask.h +++ b/src/plugins/external_tool_support/src/spidey/SpideySupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/stringtie/StringTieSupport.cpp b/src/plugins/external_tool_support/src/stringtie/StringTieSupport.cpp index 04361cb7bd1ca3c9782baedc580524b966eeacbb..f37adce1abe861ed1b2ac336a4300e2bdaf9a7ee 100644 --- a/src/plugins/external_tool_support/src/stringtie/StringTieSupport.cpp +++ b/src/plugins/external_tool_support/src/stringtie/StringTieSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,8 +23,11 @@ namespace U2 { -StringTieSupport::StringTieSupport(const QString &name, const QString &path) - : ExternalTool(name, path) { +const QString StringTieSupport::ET_STRINGTIE = "StringTie"; +const QString StringTieSupport::ET_STRINGTIE_ID = "USUPP_STRINGTIE"; + +StringTieSupport::StringTieSupport(const QString& id, const QString &name, const QString &path) + : ExternalTool(id, name, path) { executableFileName = "stringtie"; diff --git a/src/plugins/external_tool_support/src/stringtie/StringTieSupport.h b/src/plugins/external_tool_support/src/stringtie/StringTieSupport.h index 0e2843181e619ba45babe4f69c62635083d9cdd9..1f8910945cc6aef83db0f341a3d694d18eecb19d 100644 --- a/src/plugins/external_tool_support/src/stringtie/StringTieSupport.h +++ b/src/plugins/external_tool_support/src/stringtie/StringTieSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,14 +24,15 @@ #include <U2Core/ExternalToolRegistry.h> -#define ET_STRINGTIE "StringTie" - namespace U2 { class StringTieSupport : public ExternalTool { Q_OBJECT public: - StringTieSupport(const QString& name, const QString& path = ""); + StringTieSupport(const QString& id, const QString& name, const QString& path = ""); + + static const QString ET_STRINGTIE; + static const QString ET_STRINGTIE_ID; }; } // namespace diff --git a/src/plugins/external_tool_support/src/stringtie/StringTieTask.cpp b/src/plugins/external_tool_support/src/stringtie/StringTieTask.cpp index 82386dd3bbcc34cc248f5d45c1136756bd3c152d..7e3a30d78155fb7a6742c1cd033198820e9d91b8 100644 --- a/src/plugins/external_tool_support/src/stringtie/StringTieTask.cpp +++ b/src/plugins/external_tool_support/src/stringtie/StringTieTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -53,7 +53,7 @@ StringTieTask::StringTieTask(const StringTieTaskSettings& settings) } void StringTieTask::prepare() { - stringTieTask = new ExternalToolRunTask(ET_STRINGTIE, getArguments(), new ExternalToolLogParser()); + stringTieTask = new ExternalToolRunTask(StringTieSupport::ET_STRINGTIE_ID, getArguments(), new ExternalToolLogParser()); setListenerForTask(stringTieTask); addSubTask(stringTieTask); } diff --git a/src/plugins/external_tool_support/src/stringtie/StringTieTask.h b/src/plugins/external_tool_support/src/stringtie/StringTieTask.h index 68f6304a79adfb7f1e0733c03a4772ce6fdd9dbc..9cc87ca627033b390c828cb445515e18a75381be 100644 --- a/src/plugins/external_tool_support/src/stringtie/StringTieTask.h +++ b/src/plugins/external_tool_support/src/stringtie/StringTieTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/stringtie/StringTieWorker.cpp b/src/plugins/external_tool_support/src/stringtie/StringTieWorker.cpp index 6d044959a1fffc9b466b873049d312d432dfa1f7..a0d02d9c23a998fbcb62c510ec431fe183e94cb8 100644 --- a/src/plugins/external_tool_support/src/stringtie/StringTieWorker.cpp +++ b/src/plugins/external_tool_support/src/stringtie/StringTieWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -550,7 +550,7 @@ void StringTieWorkerFactory::init() { // Description of the element - const Descriptor desc(ACTOR_ID, StringTieWorker::tr("Assemble Transcripts with StringTie"), + Descriptor desc(ACTOR_ID, StringTieWorker::tr("Assemble Transcripts with StringTie"), StringTieWorker::tr("StringTie is a fast and highly efficient assembler of RNA-Seq alignments into potential transcripts. " "It uses a novel network flow algorithm as well as an optional de novo assembly step to assemble " "and quantitate full-length transcripts representing multiple splice variants for each gene locus.")); @@ -561,7 +561,7 @@ void StringTieWorkerFactory::init() { // Init and register the actor prototype proto->setEditor(new DelegateEditor(delegates)); proto->setPrompter(new StringTiePrompter()); - proto->addExternalTool(ET_STRINGTIE, "STRINGTIE_EXT_TOOL_PATH"); + proto->addExternalTool(StringTieSupport::ET_STRINGTIE_ID, "STRINGTIE_EXT_TOOL_PATH"); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_RNA_SEQ(), proto); DomainFactory* localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID); diff --git a/src/plugins/external_tool_support/src/stringtie/StringTieWorker.h b/src/plugins/external_tool_support/src/stringtie/StringTieWorker.h index 65f140f6fcdf254f384650a67c04dec9b1ebea95..f41c3c6eb369b347293a03e177763aca5ca1621c 100644 --- a/src/plugins/external_tool_support/src/stringtie/StringTieWorker.h +++ b/src/plugins/external_tool_support/src/stringtie/StringTieWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportPrompter.cpp b/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportPrompter.cpp index ae9573b5d0e76ba8a41d749a4d89926c7fa9f117..54416c49f288f84e275a21ceb95fee7486b1d3b0 100644 --- a/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportPrompter.cpp +++ b/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportPrompter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportPrompter.h b/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportPrompter.h index 4579685b5a0a226bb9f58d72509f41f5e8350744..1667ce415bc20dc197849d7666e9ca3d1d1785f5 100644 --- a/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportPrompter.h +++ b/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportPrompter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportTask.cpp b/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportTask.cpp index 0a08e98580903fcc58b9faf09a37a224c2b997eb..0e9bcee05f442d11ead3ee20cdf29b7771c35802 100644 --- a/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportTask.cpp +++ b/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportTask.h b/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportTask.h index ce9e96aa400f7908313229aa81c5384cd52b0548..0b488777e83e56cf1a41772986101074530f94d8 100644 --- a/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportTask.h +++ b/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportWorker.cpp b/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportWorker.cpp index 828a8f54bffaba351bdd4c18a20082ec16b7855b..3d7df7dd89716f31c3d40b1a2d591d13b4b87067 100644 --- a/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportWorker.cpp +++ b/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportWorker.h b/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportWorker.h index e53fa48d33239bf54dae5576a96e2952e9dab874..94e5a06d8127787639f5c60b370bd7de408ee2a0 100644 --- a/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportWorker.h +++ b/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportWorkerFactory.cpp b/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportWorkerFactory.cpp index 0b04ef3d241b90a76973bc4843dabe0d773bd5bb..be3800f8ceecc384083de8d5d3569705660518b6 100644 --- a/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportWorkerFactory.cpp +++ b/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportWorkerFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportWorkerFactory.h b/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportWorkerFactory.h index 65b0420423381dc8a994044bb88832847c141baa..240ae2e106fbe0061c560829fa38fb96b6d9635a 100644 --- a/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportWorkerFactory.h +++ b/src/plugins/external_tool_support/src/stringtie/StringtieGeneAbundanceReportWorkerFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupport.cpp b/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupport.cpp index cec29eeb4edeedb5447f752c755b463a5ceebb88..4b7e25735f0a44b1009071a806f038127b412013 100644 --- a/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupport.cpp +++ b/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -46,7 +46,11 @@ namespace U2 { -TCoffeeSupport::TCoffeeSupport(const QString& name, const QString& path) : ExternalTool(name, path) +const QString TCoffeeSupport::ET_TCOFFEE = "T-Coffee"; +const QString TCoffeeSupport::ET_TCOFFEE_ID = "USUPP_T_COFFEE"; +const QString TCoffeeSupport::TCOFFEE_TMP_DIR = "tcoffee"; + +TCoffeeSupport::TCoffeeSupport(const QString& id, const QString& name, const QString& path) : ExternalTool(id, name, path) { if (AppContext::getMainWindow()) { viewCtx = new TCoffeeSupportContext(this); @@ -129,7 +133,7 @@ void TCoffeeSupportContext::initViewContext(GObjectView* view) { bool objLocked = msaed->getMaObject()->isStateLocked(); bool isMsaEmpty = msaed->isAlignmentEmpty(); - AlignMsaAction* alignAction = new AlignMsaAction(this, ET_TCOFFEE, view, tr("Align with T-Coffee..."), 2000); + AlignMsaAction* alignAction = new AlignMsaAction(this, TCoffeeSupport::ET_TCOFFEE_ID, view, tr("Align with T-Coffee..."), 2000); alignAction->setObjectName("Align with T-Coffee"); addViewAction(alignAction); @@ -151,10 +155,10 @@ void TCoffeeSupportContext::buildMenu(GObjectView* view, QMenu* m) { void TCoffeeSupportContext::sl_align_with_TCoffee() { //Check that T-Coffee and temporary folder path defined - if (AppContext::getExternalToolRegistry()->getByName(ET_TCOFFEE)->getPath().isEmpty()){ + if (AppContext::getExternalToolRegistry()->getById(TCoffeeSupport::ET_TCOFFEE_ID)->getPath().isEmpty()){ QObjectScopedPointer<QMessageBox> msgBox = new QMessageBox; - msgBox->setWindowTitle(ET_TCOFFEE); - msgBox->setText(tr("Path for %1 tool not selected.").arg(ET_TCOFFEE)); + msgBox->setWindowTitle(TCoffeeSupport::ET_TCOFFEE); + msgBox->setText(tr("Path for %1 tool not selected.").arg(TCoffeeSupport::ET_TCOFFEE)); msgBox->setInformativeText(tr("Do you want to select it now?")); msgBox->setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox->setDefaultButton(QMessageBox::Yes); @@ -173,7 +177,7 @@ void TCoffeeSupportContext::sl_align_with_TCoffee() { break; } } - if (AppContext::getExternalToolRegistry()->getByName(ET_TCOFFEE)->getPath().isEmpty()){ + if (AppContext::getExternalToolRegistry()->getById(TCoffeeSupport::ET_TCOFFEE_ID)->getPath().isEmpty()){ return; } U2OpStatus2Log os(LogLevel_DETAILS); diff --git a/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupport.h b/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupport.h index 8da16213f7ef789fb051599daa7ea88df09c6359..a0ce1af0b1f408e5b82431df0137a7170a9ea395 100644 --- a/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupport.h +++ b/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,16 +26,17 @@ #include <U2View/MSAEditor.h> #include "utils/ExternalToolSupportAction.h" -#define ET_TCOFFEE "T-Coffee" -#define TCOFFEE_TMP_DIR "tcoffee" - namespace U2 { class TCoffeeSupport : public ExternalTool { Q_OBJECT public: - TCoffeeSupport(const QString& name, const QString& path = ""); + TCoffeeSupport(const QString& id, const QString& name, const QString& path = ""); GObjectViewWindowContext* getViewContext(){ return viewCtx; } + + static const QString ET_TCOFFEE; + static const QString ET_TCOFFEE_ID; + static const QString TCOFFEE_TMP_DIR; public slots: void sl_runWithExtFileSpecify(); private: diff --git a/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupportRunDialog.cpp b/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupportRunDialog.cpp index 643fe0fb0484596fab0f3a292a227a45d7fd6d49..f408b520ce675dfa38a1f3eaa30ee00ce3284c66 100644 --- a/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupportRunDialog.cpp +++ b/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupportRunDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -42,7 +42,7 @@ TCoffeeSupportRunDialog::TCoffeeSupportRunDialog(TCoffeeSupportTaskSettings& _se QDialog(_parent), settings(_settings) { setupUi(this); - new HelpButton(this, buttonBox, "22056090"); + new HelpButton(this, buttonBox, "24742625"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Align")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -71,7 +71,7 @@ TCoffeeWithExtFileSpecifySupportRunDialog::TCoffeeWithExtFileSpecifySupportRunDi saveController(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22056090"); + new HelpButton(this, buttonBox, "24742625"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Align")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupportRunDialog.h b/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupportRunDialog.h index 74d0e045a5c7dfcefdc3691896d4db782d777e37..6f1b83bb3e56fe94bace2c53b0a12ebdf7395fe5 100644 --- a/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupportRunDialog.h +++ b/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupportRunDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupportTask.cpp b/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupportTask.cpp index 63682f6164a8e8d928ee774596b8cf0dcb32923a..a48d55e8650b98791e7d2da79a5c2a8cccaac207 100644 --- a/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupportTask.cpp +++ b/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -118,7 +118,7 @@ void TCoffeeSupportTask::prepare(){ QDate::currentDate().toString("dd.MM.yyyy")+"_"+ QTime::currentTime().toString("hh.mm.ss.zzz")+"_"+ QString::number(QCoreApplication::applicationPid())+"/"; - QString tmpDirPath = AppContext::getAppSettings()->getUserAppsSettings()->getCurrentProcessTemporaryDirPath(TCOFFEE_TMP_DIR) + "/" + tmpDirName; + QString tmpDirPath = AppContext::getAppSettings()->getUserAppsSettings()->getCurrentProcessTemporaryDirPath(TCoffeeSupport::TCOFFEE_TMP_DIR) + "/" + tmpDirName; url = tmpDirPath + "tmp.fa"; ioLog.details(tr("Saving data to temporary file '%1'").arg(url)); @@ -172,18 +172,18 @@ QList<Task*> TCoffeeSupportTask::onSubTaskFinished(Task* subTask) { } arguments <<"-outfile"<<outputUrl; arguments <<"-newtree"<<outputDNDUrl; - tCoffeeTask = new ExternalToolRunTask(ET_TCOFFEE, arguments, new TCoffeeLogParser(), "", QStringList(), "t_coffee.orig.exe"); + tCoffeeTask = new ExternalToolRunTask(TCoffeeSupport::ET_TCOFFEE_ID, arguments, new TCoffeeLogParser(), "", QStringList(), "t_coffee.orig.exe"); setListenerForTask(tCoffeeTask); tCoffeeTask->setSubtaskProgressWeight(95); res.append(tCoffeeTask); }else if(subTask==tCoffeeTask){ if(!QFileInfo(outputUrl).exists()){ - if(AppContext::getExternalToolRegistry()->getByName(ET_TCOFFEE)->isValid()){ + if(AppContext::getExternalToolRegistry()->getById(TCoffeeSupport::ET_TCOFFEE_ID)->isValid()){ stateInfo.setError(tr("Output file %1 not found").arg(outputUrl)); }else{ stateInfo.setError(tr("Output file %3 not found. May be %1 tool path '%2' not valid?") - .arg(AppContext::getExternalToolRegistry()->getByName(ET_TCOFFEE)->getName()) - .arg(AppContext::getExternalToolRegistry()->getByName(ET_TCOFFEE)->getPath()) + .arg(AppContext::getExternalToolRegistry()->getById(TCoffeeSupport::ET_TCOFFEE_ID)->getName()) + .arg(AppContext::getExternalToolRegistry()->getById(TCoffeeSupport::ET_TCOFFEE_ID)->getPath()) .arg(outputUrl)); } emit si_stateChanged(); diff --git a/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupportTask.h b/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupportTask.h index a8b0d2b88d7870cbeed4337d18c93245712e6bff..99d1594fc21c9d672e6d5cd855c95949b3fa46b1 100644 --- a/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupportTask.h +++ b/src/plugins/external_tool_support/src/tcoffee/TCoffeeSupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/tcoffee/TCoffeeWorker.cpp b/src/plugins/external_tool_support/src/tcoffee/TCoffeeWorker.cpp index af0c88507cc38f79fa0600f8b043c5fc949bb629..95ebdad17cd05221c6290ab368a28b0b089f62db 100644 --- a/src/plugins/external_tool_support/src/tcoffee/TCoffeeWorker.cpp +++ b/src/plugins/external_tool_support/src/tcoffee/TCoffeeWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -109,7 +109,7 @@ void TCoffeeWorkerFactory::init() { proto->setEditor(new DelegateEditor(delegates)); proto->setPrompter(new TCoffeePrompter()); proto->setIconPath(":external_tool_support/images/tcoffee.png"); - proto->addExternalTool(ET_TCOFFEE, EXT_TOOL_PATH); + proto->addExternalTool(TCoffeeSupport::ET_TCOFFEE_ID, EXT_TOOL_PATH); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_ALIGNMENT(), proto); DomainFactory* localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID); @@ -155,7 +155,7 @@ Task* TCoffeeWorker::tick() { QString path=actor->getParameter(EXT_TOOL_PATH)->getAttributeValue<QString>(context); if(QString::compare(path, "default", Qt::CaseInsensitive) != 0){ - AppContext::getExternalToolRegistry()->getByName(ET_TCOFFEE)->setPath(path); + AppContext::getExternalToolRegistry()->getById(TCoffeeSupport::ET_TCOFFEE_ID)->setPath(path); } path=actor->getParameter(TMP_DIR_PATH)->getAttributeValue<QString>(context); if(QString::compare(path, "default", Qt::CaseInsensitive) != 0){ diff --git a/src/plugins/external_tool_support/src/tcoffee/TCoffeeWorker.h b/src/plugins/external_tool_support/src/tcoffee/TCoffeeWorker.h index 3a228859357064a4345de6522d8ce28df0fcbc46..6b3002dfdc1176685858b441c137a5b084ea24a8 100644 --- a/src/plugins/external_tool_support/src/tcoffee/TCoffeeWorker.h +++ b/src/plugins/external_tool_support/src/tcoffee/TCoffeeWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/tophat/TopHatSettings.cpp b/src/plugins/external_tool_support/src/tophat/TopHatSettings.cpp index 850072b0b21542296545b0b946f4ed5e8eddd5d2..745ad85f02a0044250e8a87b9142a8638cff1817 100644 --- a/src/plugins/external_tool_support/src/tophat/TopHatSettings.cpp +++ b/src/plugins/external_tool_support/src/tophat/TopHatSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/tophat/TopHatSettings.h b/src/plugins/external_tool_support/src/tophat/TopHatSettings.h index a71bef72c79f77d8a6069a56d2da790ab791dc83..1ef46d7c41239d05259bb8c74254d188479638d2 100644 --- a/src/plugins/external_tool_support/src/tophat/TopHatSettings.h +++ b/src/plugins/external_tool_support/src/tophat/TopHatSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/tophat/TopHatSupport.cpp b/src/plugins/external_tool_support/src/tophat/TopHatSupport.cpp index 6657846f62b24b2813e25647d0517ae37d57c845..5c715eb458b6f4f30b5561e1be1ca631063d3c30 100644 --- a/src/plugins/external_tool_support/src/tophat/TopHatSupport.cpp +++ b/src/plugins/external_tool_support/src/tophat/TopHatSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -28,9 +28,12 @@ namespace U2 { +const QString TopHatSupport::ET_TOPHAT = "TopHat"; +const QString TopHatSupport::ET_TOPHAT_ID ="USUPP_TOPHAT"; +const QString TopHatSupport::TOPHAT_TMP_DIR = "tophat"; -TopHatSupport::TopHatSupport(const QString& name, const QString& path) - : ExternalTool(name, path) +TopHatSupport::TopHatSupport(const QString& id, const QString& name, const QString& path) + : ExternalTool(id, name, path) { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/cmdline.png"); @@ -47,7 +50,7 @@ TopHatSupport::TopHatSupport(const QString& name, const QString& path) #endif validationArguments << "--version"; - dependencies << ET_PYTHON; + dependencies << PythonSupport::ET_PYTHON_ID; validMessage = "TopHat "; description = "<i>TopHat</i> is a program that aligns RNA-Seq reads to a genome" diff --git a/src/plugins/external_tool_support/src/tophat/TopHatSupport.h b/src/plugins/external_tool_support/src/tophat/TopHatSupport.h index c4909c984bb1e0ecce60a2d730cfdb188585d52a..be4532d469b9e9bf5579ae86837a7ac1a13f66ad 100644 --- a/src/plugins/external_tool_support/src/tophat/TopHatSupport.h +++ b/src/plugins/external_tool_support/src/tophat/TopHatSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,18 +24,16 @@ #include <U2Core/ExternalToolRegistry.h> -#define ET_TOPHAT "TopHat" -#define TOPHAT_TMP_DIR "tophat" - - namespace U2 { -class TopHatSupport : public ExternalTool -{ +class TopHatSupport : public ExternalTool { Q_OBJECT - public: - TopHatSupport(const QString& name, const QString& path = ""); + TopHatSupport(const QString& id, const QString& name, const QString& path = ""); + + static const QString ET_TOPHAT; + static const QString ET_TOPHAT_ID; + static const QString TOPHAT_TMP_DIR; }; diff --git a/src/plugins/external_tool_support/src/tophat/TopHatSupportTask.cpp b/src/plugins/external_tool_support/src/tophat/TopHatSupportTask.cpp index f59615626cea884bb52d7e16704c9f41c78fc1b3..c66ee5e66f664890bb371152c86be3ec49770ff2 100644 --- a/src/plugins/external_tool_support/src/tophat/TopHatSupportTask.cpp +++ b/src/plugins/external_tool_support/src/tophat/TopHatSupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -77,7 +77,7 @@ QString TopHatSupportTask::setupTmpDir() { QString::number(QCoreApplication::applicationPid()) + "/"; QString topHatTmpDirName = - AppContext::getAppSettings()->getUserAppsSettings()->getCurrentProcessTemporaryDirPath(TOPHAT_TMP_DIR); + AppContext::getAppSettings()->getUserAppsSettings()->getCurrentProcessTemporaryDirPath(TopHatSupport::TOPHAT_TMP_DIR); // Create the tmp dir QDir tmpDir(topHatTmpDirName + "/" + tmpDirName); @@ -253,7 +253,7 @@ ExternalToolRunTask * TopHatSupportTask::runTophat() { // Add Bowtie, samtools an python to the PATH environment variable QStringList additionalPaths; - ExternalTool *pythonTool = AppContext::getExternalToolRegistry()->getByName(ET_PYTHON); + ExternalTool *pythonTool = AppContext::getExternalToolRegistry()->getById(PythonSupport::ET_PYTHON_ID); if (NULL != pythonTool) { additionalPaths << QFileInfo(pythonTool->getPath()).dir().absolutePath(); } @@ -261,7 +261,7 @@ ExternalToolRunTask * TopHatSupportTask::runTophat() { additionalPaths << QFileInfo(settings.bowtiePath).dir().absolutePath(); additionalPaths << QFileInfo(settings.samtoolsPath).dir().absolutePath(); - ExternalToolRunTask* runTask = new ExternalToolRunTask(ET_TOPHAT, + ExternalToolRunTask* runTask = new ExternalToolRunTask(TopHatSupport::ET_TOPHAT_ID, arguments, new ExternalToolLogParser(), workingDirectory, diff --git a/src/plugins/external_tool_support/src/tophat/TopHatSupportTask.h b/src/plugins/external_tool_support/src/tophat/TopHatSupportTask.h index 6a2818b9cb38dfaab7d0825954d9c58da672ec58..b46d95f806eba593581c03cc701cfe81eae4b6d5 100644 --- a/src/plugins/external_tool_support/src/tophat/TopHatSupportTask.h +++ b/src/plugins/external_tool_support/src/tophat/TopHatSupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/tophat/TopHatWorker.cpp b/src/plugins/external_tool_support/src/tophat/TopHatWorker.cpp index cbe876da754fbd23758a0f8349f5fe2d7d3ede2b..fb670f3c3d0d7e8ebba7f958d4b568b423159a69 100644 --- a/src/plugins/external_tool_support/src/tophat/TopHatWorker.cpp +++ b/src/plugins/external_tool_support/src/tophat/TopHatWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -517,8 +517,8 @@ void TopHatWorkerFactory::init() proto->setValidator(new BowtieToolsValidator()); { // external tools - proto->addExternalTool(ET_SAMTOOLS_EXT, SAMTOOLS_TOOL_PATH); - proto->addExternalTool(ET_TOPHAT, EXT_TOOL_PATH); + proto->addExternalTool(SamToolsExtToolSupport::ET_SAMTOOLS_EXT_ID, SAMTOOLS_TOOL_PATH); + proto->addExternalTool(TopHatSupport::ET_TOPHAT_ID, EXT_TOOL_PATH); } WorkflowEnv::getProtoRegistry()->registerProto( @@ -662,13 +662,13 @@ void TopHatWorker::initSettings() { QString bowtieExtToolPath = getValue<QString>(TopHatWorkerFactory::BOWTIE_TOOL_PATH); if (0 != bowtieVersionVal) { settings.useBowtie1 = true; - settings.bowtiePath = WorkflowUtils::updateExternalToolPath(ET_BOWTIE, bowtieExtToolPath); + settings.bowtiePath = WorkflowUtils::updateExternalToolPath(BowtieSupport::ET_BOWTIE_ID, bowtieExtToolPath); } else { - settings.bowtiePath = WorkflowUtils::updateExternalToolPath(ET_BOWTIE2_ALIGN, bowtieExtToolPath); + settings.bowtiePath = WorkflowUtils::updateExternalToolPath(Bowtie2Support::ET_BOWTIE2_ALIGN_ID, bowtieExtToolPath); } QString samtools = getValue<QString>(TopHatWorkerFactory::SAMTOOLS_TOOL_PATH); - settings.samtoolsPath = WorkflowUtils::updateExternalToolPath(ET_SAMTOOLS_EXT, samtools); + settings.samtoolsPath = WorkflowUtils::updateExternalToolPath(SamToolsExtToolSupport::ET_SAMTOOLS_EXT_ID, samtools); } void TopHatWorker::initPathes() { @@ -679,7 +679,7 @@ void TopHatWorker::initPathes() { QString extToolPath = actor->getParameter(TopHatWorkerFactory::EXT_TOOL_PATH)->getAttributeValue<QString>(context); if (QString::compare(extToolPath, "default", Qt::CaseInsensitive) != 0) { - AppContext::getExternalToolRegistry()->getByName(ET_TOPHAT)->setPath(extToolPath); + AppContext::getExternalToolRegistry()->getById(TopHatSupport::ET_TOPHAT_ID)->setPath(extToolPath); } } @@ -808,17 +808,17 @@ bool BowtieToolsValidator::validateBowtie(const Actor *actor, NotificationsList { int version = getValue<int>( actor, TopHatWorkerFactory::BOWTIE_VERSION ); if ( 1 == version ) { - bowTieTool = AppContext::getExternalToolRegistry( )->getByName( ET_BOWTIE ); + bowTieTool = AppContext::getExternalToolRegistry( )->getById(BowtieSupport::ET_BOWTIE_ID); SAFE_POINT( NULL != bowTieTool, "NULL bowtie tool", false ); - ExternalTool *topHatTool = AppContext::getExternalToolRegistry()->getByName( ET_TOPHAT ); + ExternalTool *topHatTool = AppContext::getExternalToolRegistry()->getById(TopHatSupport::ET_TOPHAT_ID); SAFE_POINT( NULL != topHatTool, "NULL tophat tool", false ); Version bowtieVersion = Version::parseVersion(bowTieTool->getVersion( )); Version topHatVersion = Version::parseVersion(topHatTool->getVersion( )); if ( topHatVersion.text.isEmpty( ) || bowtieVersion.text.isEmpty( ) ) { - const QString toolName = topHatVersion.text.isEmpty( ) ? "TopHat" : "Bowtie"; - const QString message = QObject::tr( "%1 tool's version is undefined, " + QString toolName = topHatVersion.text.isEmpty( ) ? "TopHat" : "Bowtie"; + QString message = QObject::tr( "%1 tool's version is undefined, " "this may cause some compatibility issues" ).arg( toolName ); WorkflowNotification warning( message, actor->getLabel( ), WorkflowNotification::U2_WARNING ); @@ -827,7 +827,7 @@ bool BowtieToolsValidator::validateBowtie(const Actor *actor, NotificationsList } else if ( !( Version::parseVersion("0.12.9") > bowtieVersion && Version::parseVersion("2.0.8") >= topHatVersion ) && !( Version::parseVersion("0.12.9") <= bowtieVersion && Version::parseVersion("2.0.8b") <= topHatVersion ) ) { - const QString message = QObject::tr( "Bowtie and TopHat tools have incompatible " + QString message = QObject::tr( "Bowtie and TopHat tools have incompatible " "versions. Your TopHat's version is %1, Bowtie's one is %2. The following are " "considered to be compatible: Bowtie < \"0.12.9\" and TopHat <= \"2.0.8\" or " "Bowtie >= \"0.12.9\" and TopHat >= \"2.0.8.b\"" ).arg( topHatVersion.text, @@ -838,7 +838,7 @@ bool BowtieToolsValidator::validateBowtie(const Actor *actor, NotificationsList return false; } } else { - bowTieTool = AppContext::getExternalToolRegistry( )->getByName( ET_BOWTIE2_ALIGN ); + bowTieTool = AppContext::getExternalToolRegistry( )->getById(Bowtie2Support::ET_BOWTIE2_ALIGN_ID); } SAFE_POINT( NULL != bowTieTool, "NULL bowtie tool", false ); } diff --git a/src/plugins/external_tool_support/src/tophat/TopHatWorker.h b/src/plugins/external_tool_support/src/tophat/TopHatWorker.h index ec77be8dd198cc9fd40eeeb213b45967c56fd846..6a2d47262eebafd164567e67483a2aa6663168f0 100644 --- a/src/plugins/external_tool_support/src/tophat/TopHatWorker.h +++ b/src/plugins/external_tool_support/src/tophat/TopHatWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticDelegate.cpp b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticDelegate.cpp index fc66b03d786dd51b531d23216dff8a07fbbaa549..2759dd36712a01cb41c3e826926b9f194eea8dbf 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticDelegate.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticDelegate.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -134,6 +134,8 @@ QVariant TrimmomaticPropertyWidget::value() { steps << step; } } + CHECK(!steps.isEmpty(), QVariant::Invalid); + return steps; } @@ -179,7 +181,7 @@ const QString TrimmomaticPropertyDialog::DEFAULT_SETTINGS_TEXT = QObject::tr("Ad TrimmomaticPropertyDialog::TrimmomaticPropertyDialog(const QString &value, QWidget *parent) : QDialog(parent) { setupUi(this); - new HelpButton(this, buttonBox, "22059547"); + new HelpButton(this, buttonBox, "24740268"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Apply")); @@ -209,6 +211,7 @@ TrimmomaticPropertyDialog::TrimmomaticPropertyDialog(const QString &value, connect(buttonRemove, SIGNAL(pressed()), SLOT(sl_removeStep())); parseCommand(value); + sl_valuesChanged(); } QString TrimmomaticPropertyDialog::getValue() const { @@ -237,6 +240,7 @@ void TrimmomaticPropertyDialog::sl_currentRowChanged() { const int currentStepNumber = listSteps->currentRow(); CHECK(-1 != currentStepNumber, ); SAFE_POINT(0 <= currentStepNumber && currentStepNumber < listSteps->count(), "Unexpected selected item", ); + SAFE_POINT(currentStepNumber < steps.size(), "Unexpected selected row", ); TrimmomaticStep *selectedStep = steps[currentStepNumber]; diff --git a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticDelegate.h b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticDelegate.h index c678922b3bb4ef9971333cb2599b7c02f3adc5d5..66e356fbac2eaec047db0fec73d583a2f59cea89 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticDelegate.h +++ b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticDelegate.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticLogParser.cpp b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticLogParser.cpp index 7b7bbf84973dd4eab1b4aa8a23f498daad2d77f1..92390aa943416c5186076399d8abaf8e9bfff44c 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticLogParser.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticLogParser.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticLogParser.h b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticLogParser.h index d0201aa8959dbd7937611f16e10acfdbcdf12180..fce39dcc7a4e2b0afca0e26b3575c7c09aacc265 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticLogParser.h +++ b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticLogParser.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticPrompter.cpp b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticPrompter.cpp index 6e52dcac8d8281b4c486f1b65363fce2899bd825..78b5d1c0b6a428bae28612f2f31ce5d338f79a86 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticPrompter.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticPrompter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticPrompter.h b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticPrompter.h index bae90644fbe85cf387ccbb1178197c22e351b2df..17a8fdc60aaa290f0db427081d42e57f7a4c4eb5 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticPrompter.h +++ b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticPrompter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticPropertyDialog.ui b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticPropertyDialog.ui index 16563a271e07b05d6d575dcc83da2c1416764a28..a41a35609475a307e768e9ff48f8beabe51f9b9b 100755 --- a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticPropertyDialog.ui +++ b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticPropertyDialog.ui @@ -55,6 +55,9 @@ <height>119</height> </size> </property> + <property name="movement"> + <enum>QListView::Static</enum> + </property> </widget> </item> <item> @@ -66,7 +69,7 @@ <enum>QLayout::SetFixedSize</enum> </property> <item> - <widget class="QPushButton" name="buttonAdd"> + <widget class="QToolButton" name="buttonAdd"> <property name="sizePolicy"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <horstretch>0</horstretch> @@ -104,6 +107,9 @@ <iconset resource="../../external_tool_support.qrc"> <normaloff>:/external_tool_support/images/add.png</normaloff>:/external_tool_support/images/add.png</iconset> </property> + <property name="popupMode"> + <enum>QToolButton::InstantPopup</enum> + </property> </widget> </item> <item> @@ -123,7 +129,7 @@ </spacer> </item> <item> - <widget class="QPushButton" name="buttonUp"> + <widget class="QToolButton" name="buttonUp"> <property name="sizePolicy"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <horstretch>0</horstretch> @@ -183,7 +189,7 @@ </spacer> </item> <item> - <widget class="QPushButton" name="buttonDown"> + <widget class="QToolButton" name="buttonDown"> <property name="sizePolicy"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <horstretch>0</horstretch> @@ -240,7 +246,7 @@ </spacer> </item> <item> - <widget class="QPushButton" name="buttonRemove"> + <widget class="QToolButton" name="buttonRemove"> <property name="sizePolicy"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <horstretch>0</horstretch> @@ -318,6 +324,20 @@ <height>160</height> </size> </property> + <property name="styleSheet"> + <string notr="true">QGroupBox { + font: bold; + border: 1px solid silver; + border-radius: 6px; + margin-top: 6px; +} + +QGroupBox::title { + subcontrol-origin: margin; + left: 7px; + padding: 0px 5px 0px 5px; +}</string> + </property> <layout class="QVBoxLayout" name="verticalLayout_2"> <property name="spacing"> <number>0</number> diff --git a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticStep.cpp b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticStep.cpp index b542ce9caf536358861976b4b45c0ba756c1b778..7806c63b9f148e1c80eafefc369fa2b90c793c72 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticStep.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticStep.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticStep.h b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticStep.h index 78bfb5533367f03104533fc6b82d247b4b7c361c..42d3c8a0f938a60a0bb3002021f958582d257adb 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticStep.h +++ b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticStep.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticSupport.cpp b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticSupport.cpp index 251d87e36e4d160bc28b340c7a15472827b4da4d..2024fe665a2d90e422add8302c501464a4a0e17a 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticSupport.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -40,8 +40,11 @@ namespace U2 { -TrimmomaticSupport::TrimmomaticSupport(const QString &name, const QString &path) - : ExternalTool(name, path) +const QString TrimmomaticSupport::ET_TRIMMOMATIC = "Trimmomatic"; +const QString TrimmomaticSupport::ET_TRIMMOMATIC_ID = "USUPP_TRIMMOMATIC"; + +TrimmomaticSupport::TrimmomaticSupport(const QString& id, const QString &name, const QString &path) + : ExternalTool(id, name, path) { toolKitName = "Trimmomatic"; description = tr("<i>Trimmomatic</i> is a flexible read trimming tool for Illumina NGS data."); @@ -50,8 +53,8 @@ TrimmomaticSupport::TrimmomaticSupport(const QString &name, const QString &path) validationArguments << "-h"; validMessage = "PE \\[-version\\] \\[-threads <threads>\\] \\[-phred33|-phred64\\] \\[-trimlog <trimLogFile>\\]"; - toolRunnerProgramm = ET_JAVA; - dependencies << ET_JAVA; + toolRunnerProgram = JavaSupport::ET_JAVA_ID; + dependencies << JavaSupport::ET_JAVA_ID; initTrimmomaticSteps(); } diff --git a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticSupport.h b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticSupport.h index 7e909ff8769387a7d6ae3cf912c074972afad5e4..6f0a215ccd2c4019e2c88215f21be12521fad575 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticSupport.h +++ b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,16 +24,16 @@ #include <U2Core/ExternalToolRegistry.h> -#define ET_TRIMMOMATIC "Trimmomatic" - namespace U2 { class TrimmomaticSupport : public ExternalTool { Q_OBJECT public: - TrimmomaticSupport(const QString &name, const QString& path = ""); + TrimmomaticSupport(const QString& id, const QString &name, const QString& path = ""); ~TrimmomaticSupport(); + static const QString ET_TRIMMOMATIC; + static const QString ET_TRIMMOMATIC_ID; private: void initTrimmomaticSteps(); }; diff --git a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticTask.cpp b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticTask.cpp index 45eb736db6367609a9d17b2c8b5a19dec2c65a21..d450a3d11a9f3158ca79ad59e98044665352e337 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticTask.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,7 +33,7 @@ const QString TrimmomaticTaskSettings::SINGLE_END = "single-end"; const QString TrimmomaticTaskSettings::PAIRED_END = "paired-end"; TrimmomaticTaskSettings::TrimmomaticTaskSettings() - : readsArePaired(false), + : pairedReadsInput(false), generateLog(false), numberOfThreads(1) { @@ -46,7 +46,7 @@ TrimmomaticTask::TrimmomaticTask(const TrimmomaticTaskSettings &settings) { GCOUNTER(cvar, tvar, "TrimmomaticTask"); - if (settings.readsArePaired) { + if (settings.pairedReadsInput) { SAFE_POINT_EXT(!settings.pairedOutputUrl1.isEmpty() && !settings.pairedOutputUrl2.isEmpty() && !settings.unpairedOutputUrl1.isEmpty() && !settings.unpairedOutputUrl2.isEmpty(), setError("At least one of the four output files is not set!"), ); @@ -58,7 +58,7 @@ TrimmomaticTask::TrimmomaticTask(const TrimmomaticTaskSettings &settings) } void TrimmomaticTask::prepare() { - trimmomaticToolRunTask = new ExternalToolRunTask(ET_TRIMMOMATIC, getArguments(), new TrimmomaticLogParser(), settings.workingDirectory); + trimmomaticToolRunTask = new ExternalToolRunTask(TrimmomaticSupport::ET_TRIMMOMATIC_ID, getArguments(), new TrimmomaticLogParser(), settings.workingDirectory); setListenerForTask(trimmomaticToolRunTask); addSubTask(trimmomaticToolRunTask); } @@ -66,7 +66,7 @@ void TrimmomaticTask::prepare() { QStringList TrimmomaticTask::getArguments() { QStringList arguments; - if (!settings.readsArePaired) { + if (!settings.pairedReadsInput) { arguments << "SE"; } else { arguments << "PE"; @@ -79,7 +79,7 @@ QStringList TrimmomaticTask::getArguments() { GUrlUtils::prepareFileLocation(settings.logUrl, stateInfo); } - if (!settings.readsArePaired) { + if (!settings.pairedReadsInput) { arguments << settings.inputUrl1; arguments << settings.seOutputUrl; GUrlUtils::prepareFileLocation(settings.seOutputUrl, stateInfo); @@ -104,6 +104,10 @@ QStringList TrimmomaticTask::getArguments() { return arguments; } +const QString &TrimmomaticTask::getInputUrl1() const { + return settings.inputUrl1; +} + const QString &TrimmomaticTask::getSeOutputUrl() const { return settings.seOutputUrl; } diff --git a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticTask.h b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticTask.h index 6e3352642f5f79dee5b2efcb7998d3a90c64a605..8f890d253c688c0965b704d27440b8461c1f5346 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticTask.h +++ b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -31,7 +31,7 @@ struct TrimmomaticTaskSettings { QString inputUrl1; QString inputUrl2; - bool readsArePaired; + bool pairedReadsInput; QStringList trimmingSteps; QString seOutputUrl; QString pairedOutputUrl1; @@ -52,6 +52,7 @@ class TrimmomaticTask : public ExternalToolSupportTask { public: TrimmomaticTask(const TrimmomaticTaskSettings &settings); + const QString &getInputUrl1() const; const QString &getSeOutputUrl() const; const QString &getPairedOutputUrl1() const; const QString &getPairedOutputUrl2() const; diff --git a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticWorker.cpp b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticWorker.cpp index 9adb04c8d5350069a46edebc37edf0297f5b64a5..f064995e4c52c42e8006682b8efb6ffc41f1ab23 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticWorker.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,10 +22,10 @@ #include <QFileInfo> #include <U2Core/CopyFileTask.h> -#include <U2Core/GUrlUtils.h> #include <U2Core/FailTask.h> #include <U2Core/FileAndDirectoryUtils.h> #include <U2Core/GUrlUtils.h> +#include <U2Core/L10n.h> #include <U2Core/MultiTask.h> #include <U2Core/TaskSignalMapper.h> #include <U2Core/U2OpStatusUtils.h> @@ -40,32 +40,26 @@ namespace U2 { namespace LocalWorkflow { -const QString TrimmomaticWorker::TRIMMOMATIC_DIR = "trimmomatic"; +const QString TrimmomaticWorker::TRIMMOMATIC_DIR = "Trimmomatic"; const QString TrimmomaticWorker::SE_OUTPUT_FILE_NAME_SUFFIX = "_trim"; const QString TrimmomaticWorker::PE_OUTPUT_PAIRED_FILE_NAME_SUFFIX = "P"; const QString TrimmomaticWorker::PE_OUTPUT_UNPAIRED_FILE_NAME_SUFFIX = "U"; const QString TrimmomaticWorker::LOG_FILE_NAME_ENDING = "_trimlog.txt"; TrimmomaticWorker::TrimmomaticWorker(Actor *actor) - : BaseWorker(actor), - input(NULL), - output(NULL), - pairedReadsInput(false), - generateLog(false), - prepared(false) -{ - -} + : BaseDatasetWorker(actor, + TrimmomaticWorkerFactory::INPUT_PORT_ID, + TrimmomaticWorkerFactory::OUTPUT_PORT_ID), + pairedReadsInput(false), + generateLog(false), + numberOfThreads(0) {} void TrimmomaticWorker::init() { - input = ports.value(TrimmomaticWorkerFactory::INPUT_PORT_ID); - output = ports.value(TrimmomaticWorkerFactory::OUTPUT_PORT_ID); - - SAFE_POINT(NULL != input, QString("Port with ID '%1' is NULL!").arg(TrimmomaticWorkerFactory::INPUT_PORT_ID), ); - SAFE_POINT(NULL != output, QString("Port with ID '%1' is NULL!").arg(TrimmomaticWorkerFactory::OUTPUT_PORT_ID), ); - + BaseDatasetWorker::init(); pairedReadsInput = (getValue<QString>(TrimmomaticWorkerFactory::INPUT_DATA_ATTR_ID) == TrimmomaticTaskSettings::PAIRED_END); generateLog = getValue<bool>(TrimmomaticWorkerFactory::GENERATE_LOG_ATTR_ID); + trimmingSteps = getValue<QStringList>(TrimmomaticWorkerFactory::TRIMMING_STEPS_ATTR_ID); + numberOfThreads = getValue<int>(TrimmomaticWorkerFactory::THREADS_NUMBER_ATTR_ID); } QPair<QString, QString> TrimmomaticWorker::getAbsoluteAndCopiedPathFromStep(const QString& trimmingStep) const { @@ -77,162 +71,173 @@ QPair<QString, QString> TrimmomaticWorker::getAbsoluteAndCopiedPathFromStep(cons return QPair<QString, QString>(absoluteFilePath, QString(context->workingDir() + "/" + fi.fileName())); } -Task *TrimmomaticWorker::tick() { - if (!prepared) { - QList<Task*> tasks; - QStringList trimmingSteps = getValue<QStringList>(TrimmomaticWorkerFactory::TRIMMING_STEPS_ATTR_ID); - QSet<QString> takenNames; - foreach(const QString& trimmingStep, trimmingSteps) { - if (!trimmingStep.startsWith(IlluminaClipStepFactory::ID)) { - continue; - } - QPair<QString, QString> paths = getAbsoluteAndCopiedPathFromStep(trimmingStep); - QFile destFile(paths.second); - paths.second = GUrlUtils::rollFileName(paths.second, "_", takenNames); - takenNames.insert(paths.second); - tasks.append(new CopyFileTask(paths.first, paths.second)); - QFileInfo copy(paths.second); - copiedAdapters.append(copy.fileName()); - } - if (!tasks.isEmpty()) { - Task *copyFiles = new MultiTask(tr("Copy adapters to working folder"), tasks); - connect(new TaskSignalMapper(copyFiles), SIGNAL(si_taskFinished(Task *)), SLOT(sl_taskPrepareFinished(Task *))); - return copyFiles; +void TrimmomaticWorker::changeAdapters() { + for (int i = 0, adaptersCounter = 0; i < trimmingSteps.size(); i++) { + QString &step = trimmingSteps[i]; + if (step.startsWith(IlluminaClipStepFactory::ID)) { + int indexOfFirstQuote = step.indexOf("'"); + int indexOfSecondQuote = step.indexOf("'", indexOfFirstQuote + 1); + QString firstPart = step.left(indexOfFirstQuote); + QString secondPart = step.right(step.size() - (indexOfSecondQuote + 1)); + step = firstPart + QFileInfo(copiedAdapters[adaptersCounter++]).fileName() + secondPart; } - prepared = true; } - if (isDone()) { - return NULL; +} + +void TrimmomaticWorker::processMetadata(QList<Task*> tasks) const { + metaFileUrl.clear(); + CHECK(1 == tasks.size(), ); + + TrimmomaticTask* trimTask = qobject_cast<TrimmomaticTask*>(tasks.first()); + metaFileUrl = trimTask->getInputUrl1(); +} + +void TrimmomaticWorker::cleanup() { + foreach(const QString& name, copiedAdapters) { + QFile adapter(name); + adapter.remove(); } - if (input->hasMessage()) { - U2OpStatus2Log os; - TrimmomaticTaskSettings settings = getSettings(os); - if (os.hasError()) { - return new FailTask(os.getError()); +} + +Task* TrimmomaticWorker::createPrepareTask(U2OpStatus& os) const { + QList<Task*> tasks; + QSet<QString> takenNames; + foreach(const QString& trimmingStep, trimmingSteps) { + if (!trimmingStep.startsWith(IlluminaClipStepFactory::ID)) { + continue; } - settings.workingDirectory = context->workingDir(); - TrimmomaticTask *task = new TrimmomaticTask(settings); - task->addListeners(createLogListeners()); - connect(new TaskSignalMapper(task), SIGNAL(si_taskFinished(Task *)), SLOT(sl_taskFinished(Task *))); - return task; + QPair<QString, QString> paths = getAbsoluteAndCopiedPathFromStep(trimmingStep); + paths.second = GUrlUtils::rollFileName(paths.second, "_", takenNames); + takenNames.insert(paths.second); + tasks.append(new CopyFileTask(paths.first, paths.second)); + copiedAdapters.append(paths.second); } - if (input->isEnded()) { - setDone(); - output->setEnded(); + Task* copyFiles = nullptr; + if (!tasks.isEmpty()) { + copyFiles = new MultiTask(tr("Copy adapters to working folder"), tasks); } - return NULL; + return copyFiles; } -void TrimmomaticWorker::cleanup() { +void TrimmomaticWorker::onPrepared(Task* task, U2OpStatus& os) { + MultiTask *prepareTask = qobject_cast<MultiTask *>(task); + CHECK_EXT(nullptr != prepareTask, os.setError(L10N::internalError("Unexpected prepare task")), ); + changeAdapters(); } -void TrimmomaticWorker::sl_taskFinished(Task *task) { - TrimmomaticTask *trimTask = qobject_cast<TrimmomaticTask *>(task); - if (!trimTask->isFinished() || trimTask->hasError() || trimTask->isCanceled()) { - return; +Task* TrimmomaticWorker::createTask(const QList<Message>& messages) const { + U2OpStatus2Log os; + const QString workingDirectory = FileAndDirectoryUtils::createWorkingDir(context->workingDir(), FileAndDirectoryUtils::WORKFLOW_INTERNAL, "", context->workingDir()); + const QString trimmomaticWorkingDir = GUrlUtils::createDirectory(workingDirectory + TRIMMOMATIC_DIR, "_", os); + CHECK_OP(os, nullptr); + + QList<Task*> trimmomaticTasks; + foreach(const Message& message, messages) { + const TrimmomaticTaskSettings settings = getSettings(message, trimmomaticWorkingDir); + TrimmomaticTask* task = new TrimmomaticTask(settings); + task->addListeners(createLogListeners()); + trimmomaticTasks << task; } + excludedUrls.clear(); + processMetadata(trimmomaticTasks); - if (!pairedReadsInput) { - const QString seOutputUrl = trimTask->getSeOutputUrl(); + Task* processTrimmomatic = nullptr; + if (!trimmomaticTasks.isEmpty()) { + processTrimmomatic = new MultiTask(tr("Process \"Trimmomatic\" with one dataset"), trimmomaticTasks); + } - QVariantMap data; - data[TrimmomaticWorkerFactory::OUT_SLOT] = seOutputUrl; - output->put(Message(output->getBusType(), data)); + return processTrimmomatic; +} - context->getMonitor()->addOutputFile(seOutputUrl, getActor()->getId()); - } - else { - const QString pairedOutputUrl1 = trimTask->getPairedOutputUrl1(); - const QString pairedOutputUrl2 = trimTask->getPairedOutputUrl2(); - const QString unpairedOutputUrl1 = trimTask->getUnpairedOutputUrl1(); - const QString unpairedOutputUrl2 = trimTask->getUnpairedOutputUrl2(); - - QVariantMap data; - data[TrimmomaticWorkerFactory::OUT_SLOT] = pairedOutputUrl1; - data[TrimmomaticWorkerFactory::PAIRED_OUT_SLOT] = pairedOutputUrl2; - output->put(Message(output->getBusType(), data)); - - context->getMonitor()->addOutputFile(pairedOutputUrl1, getActor()->getId()); - context->getMonitor()->addOutputFile(pairedOutputUrl2, getActor()->getId()); - context->getMonitor()->addOutputFile(unpairedOutputUrl1, getActor()->getId()); - context->getMonitor()->addOutputFile(unpairedOutputUrl2, getActor()->getId()); - } +QVariantMap TrimmomaticWorker::getResult(Task* task, U2OpStatus& os) const { + MultiTask* multiTask = qobject_cast<MultiTask*>(task); + CHECK_EXT(nullptr != multiTask, os.setError(L10N::internalError("Unexpected task")), QVariantMap()); + + QVariantMap result; + foreach(Task* task, multiTask->getTasks()) { + TrimmomaticTask* trimTask = qobject_cast<TrimmomaticTask*>(task); + CHECK_CONTINUE(trimTask != nullptr); + + if (!pairedReadsInput) { + const QString seOutputUrl = trimTask->getSeOutputUrl(); + + result[TrimmomaticWorkerFactory::OUT_SLOT] = seOutputUrl; + + context->getMonitor()->addOutputFile(seOutputUrl, getActor()->getId()); + } else { + const QString pairedOutputUrl1 = trimTask->getPairedOutputUrl1(); + const QString pairedOutputUrl2 = trimTask->getPairedOutputUrl2(); + const QString unpairedOutputUrl1 = trimTask->getUnpairedOutputUrl1(); + const QString unpairedOutputUrl2 = trimTask->getUnpairedOutputUrl2(); - if (generateLog) { - const QString logUrl = trimTask->getLogUrl(); - context->getMonitor()->addOutputFile(logUrl, getActor()->getId()); + result[TrimmomaticWorkerFactory::OUT_SLOT] = pairedOutputUrl1; + result[TrimmomaticWorkerFactory::PAIRED_OUT_SLOT] = pairedOutputUrl2; + + context->getMonitor()->addOutputFile(pairedOutputUrl1, getActor()->getId()); + context->getMonitor()->addOutputFile(pairedOutputUrl2, getActor()->getId()); + context->getMonitor()->addOutputFile(unpairedOutputUrl1, getActor()->getId()); + context->getMonitor()->addOutputFile(unpairedOutputUrl2, getActor()->getId()); + } + + if (generateLog) { + const QString logUrl = trimTask->getLogUrl(); + context->getMonitor()->addOutputFile(logUrl, getActor()->getId()); + } } + + return result; } -void TrimmomaticWorker::sl_taskPrepareFinished(Task *task) { - MultiTask *copyFilesTask = qobject_cast<MultiTask *>(task); - if (!copyFilesTask->isFinished() || copyFilesTask->hasError() || copyFilesTask->isCanceled()) { - setDone(); - output->setEnded(); - return; - } - prepared = true; +MessageMetadata TrimmomaticWorker::generateMetadata(const QString &datasetName) const { + CHECK(!metaFileUrl.isEmpty(), BaseDatasetWorker::generateMetadata(datasetName)); + + return MessageMetadata(metaFileUrl, datasetName); } -QString TrimmomaticWorker::setAutoUrl(const QString ¶mId, const QString &inputFileUrl, const QString &workingDir, const QString &fileNameSuffix) { +QString TrimmomaticWorker::setAutoUrl(const QString ¶mId, const QString &inputFileUrl, const QString &workingDir, const QString &fileNameSuffix) const { QString value = getValue<QString>(paramId); if (value.isEmpty()) { QString outputFileName = GUrlUtils::insertSuffix(QUrl(inputFileUrl).fileName(), fileNameSuffix); value = workingDir + "/" + outputFileName; } - GUrlUtils::rollFileName(value, "_"); + value = GUrlUtils::rollFileName(value, "_", excludedUrls); + excludedUrls.insert(value); return value; } -TrimmomaticTaskSettings TrimmomaticWorker::getSettings(U2OpStatus &os) { +TrimmomaticTaskSettings TrimmomaticWorker::getSettings(const Message& message, const QString& dirForResults) const { TrimmomaticTaskSettings settings; + settings.pairedReadsInput = pairedReadsInput; + settings.generateLog = generateLog; + settings.trimmingSteps = trimmingSteps; + settings.numberOfThreads = numberOfThreads; + settings.workingDirectory = context->workingDir(); - QString workingDir = FileAndDirectoryUtils::createWorkingDir(context->workingDir(), FileAndDirectoryUtils::WORKFLOW_INTERNAL, "", context->workingDir()); - workingDir = GUrlUtils::createDirectory(workingDir + TRIMMOMATIC_DIR , "_", os); - - const Message message = getMessageAndSetupScriptValues(input); settings.inputUrl1 = message.getData().toMap()[TrimmomaticWorkerFactory::INPUT_SLOT].toString(); - if (!pairedReadsInput) { - settings.seOutputUrl = setAutoUrl(TrimmomaticWorkerFactory::OUTPUT_URL_ATTR_ID, settings.inputUrl1, workingDir, SE_OUTPUT_FILE_NAME_SUFFIX); + if (!settings.pairedReadsInput) { + settings.seOutputUrl = setAutoUrl(TrimmomaticWorkerFactory::OUTPUT_URL_ATTR_ID, settings.inputUrl1, dirForResults, SE_OUTPUT_FILE_NAME_SUFFIX); } else { settings.inputUrl2 = message.getData().toMap()[TrimmomaticWorkerFactory::PAIRED_INPUT_SLOT].toString(); - settings.readsArePaired = true; - - settings.pairedOutputUrl1 = setAutoUrl(TrimmomaticWorkerFactory::PAIRED_URL_1_ATTR_ID, settings.inputUrl1, workingDir, PE_OUTPUT_PAIRED_FILE_NAME_SUFFIX); - settings.pairedOutputUrl2 = setAutoUrl(TrimmomaticWorkerFactory::PAIRED_URL_2_ATTR_ID, settings.inputUrl2, workingDir, PE_OUTPUT_PAIRED_FILE_NAME_SUFFIX); - settings.unpairedOutputUrl1 = setAutoUrl(TrimmomaticWorkerFactory::UNPAIRED_URL_1_ATTR_ID, settings.inputUrl1, workingDir, PE_OUTPUT_UNPAIRED_FILE_NAME_SUFFIX); - settings.unpairedOutputUrl2 = setAutoUrl(TrimmomaticWorkerFactory::UNPAIRED_URL_2_ATTR_ID, settings.inputUrl2, workingDir, PE_OUTPUT_UNPAIRED_FILE_NAME_SUFFIX); - } - - settings.trimmingSteps = getValue<QStringList>(TrimmomaticWorkerFactory::TRIMMING_STEPS_ATTR_ID); - for (int i = 0, adaptersCounter = 0; i < settings.trimmingSteps.size(); i++) { - QString &step = settings.trimmingSteps[i]; - if (step.startsWith(IlluminaClipStepFactory::ID)) { - int indexOfFirstQuote = step.indexOf("'"); - int indexOfSecondQuote = step.indexOf("'", indexOfFirstQuote + 1); - QString firstPart = step.left(indexOfFirstQuote); - QString secondPart = step.right(step.size() - (indexOfSecondQuote + 1)); - step = firstPart + copiedAdapters[adaptersCounter++] + secondPart; - } + settings.pairedOutputUrl1 = setAutoUrl(TrimmomaticWorkerFactory::PAIRED_URL_1_ATTR_ID, settings.inputUrl1, dirForResults, PE_OUTPUT_PAIRED_FILE_NAME_SUFFIX); + settings.pairedOutputUrl2 = setAutoUrl(TrimmomaticWorkerFactory::PAIRED_URL_2_ATTR_ID, settings.inputUrl2, dirForResults, PE_OUTPUT_PAIRED_FILE_NAME_SUFFIX); + settings.unpairedOutputUrl1 = setAutoUrl(TrimmomaticWorkerFactory::UNPAIRED_URL_1_ATTR_ID, settings.inputUrl1, dirForResults, PE_OUTPUT_UNPAIRED_FILE_NAME_SUFFIX); + settings.unpairedOutputUrl2 = setAutoUrl(TrimmomaticWorkerFactory::UNPAIRED_URL_2_ATTR_ID, settings.inputUrl2, dirForResults, PE_OUTPUT_UNPAIRED_FILE_NAME_SUFFIX); } - if (generateLog) { - settings.generateLog = true; + if (settings.generateLog) { settings.logUrl = getValue<QString>(TrimmomaticWorkerFactory::LOG_URL_ATTR_ID); if (settings.logUrl.isEmpty()) { - QString baseName = GUrlUtils::getPairedFastqFilesBaseName(settings.inputUrl1, settings.readsArePaired); - settings.logUrl = workingDir + "/" + baseName + LOG_FILE_NAME_ENDING; + QString baseName = GUrlUtils::getPairedFastqFilesBaseName(settings.inputUrl1, settings.pairedReadsInput); + settings.logUrl = dirForResults + "/" + baseName + LOG_FILE_NAME_ENDING; } settings.logUrl = GUrlUtils::rollFileName(settings.logUrl, "_"); } - settings.numberOfThreads = getValue<int>(TrimmomaticWorkerFactory::THREADS_NUMBER_ATTR_ID); - return settings; } diff --git a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticWorker.h b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticWorker.h index cb7bf0aaffbac625988aa11cf15be2fcfd53c88f..3e7d250c2f2fa90162369dd505e9e9712b76e47b 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticWorker.h +++ b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,6 +22,7 @@ #ifndef _U2_TRIMMOMATIC_WORKER_H_ #define _U2_TRIMMOMATIC_WORKER_H_ +#include <U2Lang/BaseDatasetWorker.h> #include <U2Lang/LocalDomain.h> #include "TrimmomaticTask.h" @@ -29,37 +30,43 @@ namespace U2 { namespace LocalWorkflow { -class TrimmomaticWorker : public BaseWorker { +class TrimmomaticWorker : public BaseDatasetWorker { Q_OBJECT public: TrimmomaticWorker(Actor *actor); - void init(); - Task *tick(); - void cleanup(); + void init() override; + void cleanup() override; -private slots: - void sl_taskFinished(Task *task); - void sl_taskPrepareFinished(Task *task); +protected: + Task* createPrepareTask(U2OpStatus& os) const override; + void onPrepared(Task* task, U2OpStatus& os) override; + + Task* createTask(const QList<Message> &messages) const override; + QVariantMap getResult(Task* task, U2OpStatus& os) const override; + MessageMetadata generateMetadata(const QString &datasetName) const override; private: - TrimmomaticTaskSettings getSettings(U2OpStatus &os); + TrimmomaticTaskSettings getSettings(const Message& message, const QString& dirForResults) const; // Set a value of an URL parameter that can be "Auto": // use the specified value if available or, if it is empty, // generate the value autoamtically as follows: // working_dir/input_file_name+suffix.input_file_extension // Roll the file name, if required. - QString setAutoUrl(const QString ¶mId, const QString &inputFile, const QString &workingDir, const QString &fileNameSuffix); + QString setAutoUrl(const QString ¶mId, const QString &inputFile, const QString &workingDir, const QString &fileNameSuffix) const; QPair<QString, QString> getAbsoluteAndCopiedPathFromStep(const QString& trimmingStep) const; - QStringList copiedAdapters; + void changeAdapters(); + void processMetadata(QList<Task*> tasks) const; - IntegralBus *input; - IntegralBus *output; + mutable QStringList copiedAdapters; + mutable QSet<QString> excludedUrls; + mutable QString metaFileUrl; bool pairedReadsInput; bool generateLog; - bool prepared; + QStringList trimmingSteps; + int numberOfThreads; static const QString TRIMMOMATIC_DIR; static const QString SE_OUTPUT_FILE_NAME_SUFFIX; diff --git a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticWorkerFactory.cpp b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticWorkerFactory.cpp index b8d999dceb43b4042e17db00a342c21e0eac9a79..38aecc494ea3491913a9744ffca89d704ead3d86 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticWorkerFactory.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticWorkerFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -70,8 +70,8 @@ const QString TrimmomaticWorkerFactory::GENERATE_LOG_ATTR_ID = "generate-log"; const QString TrimmomaticWorkerFactory::LOG_URL_ATTR_ID = "log-url"; const QString TrimmomaticWorkerFactory::THREADS_NUMBER_ATTR_ID = "threads"; -const QString TrimmomaticWorkerFactory::SINGLE_END_TEXT = QObject::tr("SE reads"); -const QString TrimmomaticWorkerFactory::PAIRED_END_TEXT = QObject::tr("PE reads"); +const QString TrimmomaticWorkerFactory::SINGLE_END_TEXT = "SE reads"; +const QString TrimmomaticWorkerFactory::PAIRED_END_TEXT = "PE reads"; TrimmomaticWorkerFactory::TrimmomaticWorkerFactory() : DomainFactory(ACTOR_ID) @@ -190,7 +190,7 @@ void TrimmomaticWorkerFactory::init() { TrimmomaticPrompter::tr("Use multiple threads (-threads).")); Attribute *inputDataAttribute = new Attribute(inputDataDesc, BaseTypes::STRING_TYPE(), false, TrimmomaticTaskSettings::SINGLE_END); - Attribute *trimmingStepsAttribute = new Attribute(trimmingStepsDesc, BaseTypes::STRING_LIST_TYPE(), Attribute::Required); + Attribute *trimmingStepsAttribute = new Attribute(trimmingStepsDesc, BaseTypes::STRING_LIST_TYPE(), true); Attribute *seOutputUrlAttribute = new Attribute(seOutputUrlDesc, BaseTypes::STRING_TYPE(), Attribute::Required | Attribute::CanBeEmpty); Attribute *pairedOutputUrl1Attribute = new Attribute(pairedOutputUrl1Desc, BaseTypes::STRING_TYPE(), Attribute::Required | Attribute::CanBeEmpty); Attribute *pairedOutputUrl2Attribute = new Attribute(pairedOutputUrl2Desc, BaseTypes::STRING_TYPE(), Attribute::Required | Attribute::CanBeEmpty); @@ -266,8 +266,8 @@ void TrimmomaticWorkerFactory::init() { ActorPrototype *proto = new IntegralBusActorPrototype(desc, ports, attributes); proto->setEditor(new DelegateEditor(delegates)); proto->setPrompter(new TrimmomaticPrompter(NULL)); - proto->addExternalTool(ET_JAVA); - proto->addExternalTool(ET_TRIMMOMATIC); + proto->addExternalTool(JavaSupport::ET_JAVA_ID); + proto->addExternalTool(TrimmomaticSupport::ET_TRIMMOMATIC_ID); proto->setPortValidator(INPUT_PORT_ID, new PairedReadsPortValidator(INPUT_SLOT, PAIRED_INPUT_SLOT)); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_NGS_BASIC(), proto); diff --git a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticWorkerFactory.h b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticWorkerFactory.h index eccf7cfae52a7cd98d650910935bb9f19a7cfea3..5d5531f46b9e04eda2bf0b4415c3dce78d04a5dc 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticWorkerFactory.h +++ b/src/plugins/external_tool_support/src/trimmomatic/TrimmomaticWorkerFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/steps/AvgQualStep.cpp b/src/plugins/external_tool_support/src/trimmomatic/steps/AvgQualStep.cpp index 46c87541a1e580717384257680cf0a44a2da6fb0..632ae71c7b08cbd724c2bd46f3411819da4da434 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/steps/AvgQualStep.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/steps/AvgQualStep.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/steps/AvgQualStep.h b/src/plugins/external_tool_support/src/trimmomatic/steps/AvgQualStep.h index d1621d3a46a554cb02718b69b9ae15d6d87ff8a7..149e0a995181716c5f93d9ca2eb202e994ca6b38 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/steps/AvgQualStep.h +++ b/src/plugins/external_tool_support/src/trimmomatic/steps/AvgQualStep.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/steps/CropStep.cpp b/src/plugins/external_tool_support/src/trimmomatic/steps/CropStep.cpp index 5584631d5a6793997ce4ec45faf6c86c4f2aa10b..81f1ec1377a285455a3fa775a711d01ab83887a2 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/steps/CropStep.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/steps/CropStep.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/steps/CropStep.h b/src/plugins/external_tool_support/src/trimmomatic/steps/CropStep.h index 77362553f3bb1db6bdd9d47bb9920b7394e278e1..1224755e4c8a71aade3b19da33773de44c5ade4c 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/steps/CropStep.h +++ b/src/plugins/external_tool_support/src/trimmomatic/steps/CropStep.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/steps/HeadCropStep.cpp b/src/plugins/external_tool_support/src/trimmomatic/steps/HeadCropStep.cpp index 9f2b3b6fd7dba0545faed5158ecdaa8625d8e0e6..7f884c02cb330f3980ff1c880194f548da8c3aa6 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/steps/HeadCropStep.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/steps/HeadCropStep.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/steps/HeadCropStep.h b/src/plugins/external_tool_support/src/trimmomatic/steps/HeadCropStep.h index d6d6c8e2aee25a8751f231b01cab5561735eecc6..c8f5e0ac1937419cb23863f223d6021cab76ae88 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/steps/HeadCropStep.h +++ b/src/plugins/external_tool_support/src/trimmomatic/steps/HeadCropStep.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/steps/IlluminaClipStep.cpp b/src/plugins/external_tool_support/src/trimmomatic/steps/IlluminaClipStep.cpp index 4b899560e580fa7550191c387f881da442325d1e..75f914f623b13d84801a1a1132ca7dcbc76be801 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/steps/IlluminaClipStep.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/steps/IlluminaClipStep.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -261,7 +261,7 @@ const QString IlluminaClipAdditionalSettingsDialog::KEEP_BOTH_READS = "keepBothR IlluminaClipAdditionalSettingsDialog::IlluminaClipAdditionalSettingsDialog(const QVariantMap &widgetState, QWidget* parent) : QDialog(parent) { setupUi(this); - new HelpButton(this, buttonBox, "22059547"); + new HelpButton(this, buttonBox, "24740268"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Apply")); diff --git a/src/plugins/external_tool_support/src/trimmomatic/steps/IlluminaClipStep.h b/src/plugins/external_tool_support/src/trimmomatic/steps/IlluminaClipStep.h index 49f6b8954fb4d058b9a8501e14ba51a06f736f12..63d324b11017739caa45bbab28669329aa504398 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/steps/IlluminaClipStep.h +++ b/src/plugins/external_tool_support/src/trimmomatic/steps/IlluminaClipStep.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/steps/LeadingStep.cpp b/src/plugins/external_tool_support/src/trimmomatic/steps/LeadingStep.cpp index 4cb0b15abc52acc61a4e4bddb9e79d6e33a1c50e..691c4b86019f38afa82a1432bd0b8b0ec07e0ed7 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/steps/LeadingStep.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/steps/LeadingStep.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/steps/LeadingStep.h b/src/plugins/external_tool_support/src/trimmomatic/steps/LeadingStep.h index b34b2b39dac78bf5acb2a5ee2ef3c8261279c986..8bdbab9e4ea56c7eef91f5b86bff002015efa70c 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/steps/LeadingStep.h +++ b/src/plugins/external_tool_support/src/trimmomatic/steps/LeadingStep.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/steps/MaxInfoStep.cpp b/src/plugins/external_tool_support/src/trimmomatic/steps/MaxInfoStep.cpp index f902257296c5775075a32e522cfead9ebcecf1b2..b85f4eb41979002730098ba703b10cf76c136cae 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/steps/MaxInfoStep.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/steps/MaxInfoStep.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/steps/MaxInfoStep.h b/src/plugins/external_tool_support/src/trimmomatic/steps/MaxInfoStep.h index 67dac55ee4da6d15826b70ad0b70d87d74cc31b2..0eaa5030b70f9ff00bbfaf4de8b1ca7d8b8c331d 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/steps/MaxInfoStep.h +++ b/src/plugins/external_tool_support/src/trimmomatic/steps/MaxInfoStep.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/steps/MinLenStep.cpp b/src/plugins/external_tool_support/src/trimmomatic/steps/MinLenStep.cpp index 4e4321583ce0454b8c8477c6e4b3646f34e98a38..02a9500c1f24761da2087813e4f85531bd67fdcb 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/steps/MinLenStep.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/steps/MinLenStep.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/steps/MinLenStep.h b/src/plugins/external_tool_support/src/trimmomatic/steps/MinLenStep.h index 90c9d9daeda3025cfd28e8af6d088d660c70b226..ccf07ebacd0f71466f3d04dd88950855d35005f3 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/steps/MinLenStep.h +++ b/src/plugins/external_tool_support/src/trimmomatic/steps/MinLenStep.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/steps/SlidingWindowStep.cpp b/src/plugins/external_tool_support/src/trimmomatic/steps/SlidingWindowStep.cpp index 869fecf397a4f9693acfad49ff21c68654b0be8d..67c46f8af56f721068a239b2da9a5d0453b12311 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/steps/SlidingWindowStep.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/steps/SlidingWindowStep.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/steps/SlidingWindowStep.h b/src/plugins/external_tool_support/src/trimmomatic/steps/SlidingWindowStep.h index ccef98ef3882f34d882abc36582f03ed69be52ee..56214ae7e967150a64d184937f78feade2d2a7d3 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/steps/SlidingWindowStep.h +++ b/src/plugins/external_tool_support/src/trimmomatic/steps/SlidingWindowStep.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/steps/ToPhred33Step.cpp b/src/plugins/external_tool_support/src/trimmomatic/steps/ToPhred33Step.cpp index 6f745842e8a5f280c6de838e44f026e029f5c5b0..ef854f8b0828296229bceca571761a15e0936cec 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/steps/ToPhred33Step.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/steps/ToPhred33Step.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/steps/ToPhred33Step.h b/src/plugins/external_tool_support/src/trimmomatic/steps/ToPhred33Step.h index f5d95e4485264f50b979aef138d52874ae5b2226..ddbeb3ab7c4b3029f45df2d90140a3d23d7fb05d 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/steps/ToPhred33Step.h +++ b/src/plugins/external_tool_support/src/trimmomatic/steps/ToPhred33Step.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/steps/ToPhred64Step.cpp b/src/plugins/external_tool_support/src/trimmomatic/steps/ToPhred64Step.cpp index a0bb90e2d73eb101c00447eb5dbfbae5133e664d..666fe4160c058d6dd923dfd26af2764fda8de6be 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/steps/ToPhred64Step.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/steps/ToPhred64Step.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/steps/ToPhred64Step.h b/src/plugins/external_tool_support/src/trimmomatic/steps/ToPhred64Step.h index 14d5c24cb6e7f09553667cfd73fd0073b8ecc931..22ef3410a59a40ac31488d41e5615c7880197f54 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/steps/ToPhred64Step.h +++ b/src/plugins/external_tool_support/src/trimmomatic/steps/ToPhred64Step.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/steps/TrailingStep.cpp b/src/plugins/external_tool_support/src/trimmomatic/steps/TrailingStep.cpp index 064938efe08bff24422c0697fb6d7efef8dd3a5a..c287476769652b33c7559fcc017af7e9c5e0a4b6 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/steps/TrailingStep.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/steps/TrailingStep.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/steps/TrailingStep.h b/src/plugins/external_tool_support/src/trimmomatic/steps/TrailingStep.h index 06be70e3f413a2c6e88f135e1d85054b80e2be19..111943e081c7594f532f40120161cbfc715058cd 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/steps/TrailingStep.h +++ b/src/plugins/external_tool_support/src/trimmomatic/steps/TrailingStep.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/util/LengthSettingsWidget.cpp b/src/plugins/external_tool_support/src/trimmomatic/util/LengthSettingsWidget.cpp index a2541b880d77233a4fe3269f256fd3ac2b9cee5d..eee3efe4566d2bb5263a09c77ec327e3ca1516bd 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/util/LengthSettingsWidget.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/util/LengthSettingsWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ */ #include <U2Core/U2SafePoints.h> +#include <QIntValidator> #include "LengthSettingsWidget.h" #include "LineEditHighlighter.h" diff --git a/src/plugins/external_tool_support/src/trimmomatic/util/LengthSettingsWidget.h b/src/plugins/external_tool_support/src/trimmomatic/util/LengthSettingsWidget.h index 7bfcbc7d83c99dc038e5798926e8bc0eed3f2d6c..e4730ff113c0e66a7c1e98cf4c887ba62747dfb8 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/util/LengthSettingsWidget.h +++ b/src/plugins/external_tool_support/src/trimmomatic/util/LengthSettingsWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/util/LineEditHighlighter.cpp b/src/plugins/external_tool_support/src/trimmomatic/util/LineEditHighlighter.cpp index a19f8817bc4815e915f52ee4de6f54060d5b2aaa..242628807f5b476a6ac980a80c58c2772e501fc0 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/util/LineEditHighlighter.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/util/LineEditHighlighter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/util/LineEditHighlighter.h b/src/plugins/external_tool_support/src/trimmomatic/util/LineEditHighlighter.h index d8f9ec99ac60641e4cb6d3574c5ae65363b1e020..e47b5870418f8093a204b37e1518620750cac3bc 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/util/LineEditHighlighter.h +++ b/src/plugins/external_tool_support/src/trimmomatic/util/LineEditHighlighter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/util/NoSettingsWidget.cpp b/src/plugins/external_tool_support/src/trimmomatic/util/NoSettingsWidget.cpp index 02a203e4fb45b10eb16fe54c6cba5a40a451cf21..c35918e2c0fc431176034671bbff1b2155c9091a 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/util/NoSettingsWidget.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/util/NoSettingsWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/util/NoSettingsWidget.h b/src/plugins/external_tool_support/src/trimmomatic/util/NoSettingsWidget.h index dfacd2d53f787629a4a5f0a1083d01795503ee2a..d4eebe58c58324c50bbc0d551817085c24647984 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/util/NoSettingsWidget.h +++ b/src/plugins/external_tool_support/src/trimmomatic/util/NoSettingsWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/trimmomatic/util/QualitySettingsWidget.cpp b/src/plugins/external_tool_support/src/trimmomatic/util/QualitySettingsWidget.cpp index 00ecfef095dbb8c3bdae004eb7666e5a12072280..bbe73cce0711e56c72c9e9ef28c852c0f5dd3ed2 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/util/QualitySettingsWidget.cpp +++ b/src/plugins/external_tool_support/src/trimmomatic/util/QualitySettingsWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,6 +19,7 @@ * MA 02110-1301, USA. */ +#include <QIntValidator> #include <U2Core/U2SafePoints.h> #include "QualitySettingsWidget.h" diff --git a/src/plugins/external_tool_support/src/trimmomatic/util/QualitySettingsWidget.h b/src/plugins/external_tool_support/src/trimmomatic/util/QualitySettingsWidget.h index 6b8bb190e0455e533f2cb0246902cd7ef1fa0334..44e11e4f7f0c16a2b21d18594749e5542a8a2fcc 100644 --- a/src/plugins/external_tool_support/src/trimmomatic/util/QualitySettingsWidget.h +++ b/src/plugins/external_tool_support/src/trimmomatic/util/QualitySettingsWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/utils/AlignMsaAction.cpp b/src/plugins/external_tool_support/src/utils/AlignMsaAction.cpp index 8438a7ef877d5c81fb46e862456ab0cd08d1e793..f214a6670919de34fe829639cfd07f3cab732799 100644 --- a/src/plugins/external_tool_support/src/utils/AlignMsaAction.cpp +++ b/src/plugins/external_tool_support/src/utils/AlignMsaAction.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/utils/AlignMsaAction.h b/src/plugins/external_tool_support/src/utils/AlignMsaAction.h index 53d7b8b9dce71a464780f4c495f432b46261b80f..80cffe2ecc2ec8e0bf40c47f2de79c85d13a70f0 100644 --- a/src/plugins/external_tool_support/src/utils/AlignMsaAction.h +++ b/src/plugins/external_tool_support/src/utils/AlignMsaAction.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -31,8 +31,8 @@ class MSAEditor; class AlignMsaAction : public ExternalToolSupportAction { Q_OBJECT public: - AlignMsaAction(QObject *parent, const QString &toolName, GObjectView *view, const QString &text, int order) : - ExternalToolSupportAction(parent, view, text, order, QStringList(toolName)) {} + AlignMsaAction(QObject *parent, const QString &toolId, GObjectView *view, const QString &text, int order) : + ExternalToolSupportAction(parent, view, text, order, QStringList(toolId)) {} MSAEditor* getMsaEditor() const; diff --git a/src/plugins/external_tool_support/src/utils/BaseShortReadsAlignerWorker.cpp b/src/plugins/external_tool_support/src/utils/BaseShortReadsAlignerWorker.cpp index e7603eb69f5f3e9f894726f9ed78f112700b2d63..707981d77d9b8be7d63602e38fcb665f082df447 100644 --- a/src/plugins/external_tool_support/src/utils/BaseShortReadsAlignerWorker.cpp +++ b/src/plugins/external_tool_support/src/utils/BaseShortReadsAlignerWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/utils/BaseShortReadsAlignerWorker.h b/src/plugins/external_tool_support/src/utils/BaseShortReadsAlignerWorker.h index 9625fc091b1bc4d2ab19733ddbfe05d7a407ac62..13cb5a49cb4ea1d40e77ccee8dbcc57ea023f11b 100644 --- a/src/plugins/external_tool_support/src/utils/BaseShortReadsAlignerWorker.h +++ b/src/plugins/external_tool_support/src/utils/BaseShortReadsAlignerWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/utils/BlastDBSelectorWidgetController.cpp b/src/plugins/external_tool_support/src/utils/BlastDBSelectorWidgetController.cpp index ae4f123c230f2207bcc054696eeeba0660efe53d..d26cb5dc4f61e6a923bf7a6fff2ae04d9ddacc5a 100644 --- a/src/plugins/external_tool_support/src/utils/BlastDBSelectorWidgetController.cpp +++ b/src/plugins/external_tool_support/src/utils/BlastDBSelectorWidgetController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/utils/BlastDBSelectorWidgetController.h b/src/plugins/external_tool_support/src/utils/BlastDBSelectorWidgetController.h index 2f15ed2906839e845e20b037f2d279b825203a68..e4fb16a65dd0cb5c0062989d65588af1face7357 100644 --- a/src/plugins/external_tool_support/src/utils/BlastDBSelectorWidgetController.h +++ b/src/plugins/external_tool_support/src/utils/BlastDBSelectorWidgetController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/utils/BlastRunCommonDialog.cpp b/src/plugins/external_tool_support/src/utils/BlastRunCommonDialog.cpp index ae3627faeba55e56a78b8d845fcc499205db37b9..df6d9903a14f7132fbf949292d05131459ce6dfd 100644 --- a/src/plugins/external_tool_support/src/utils/BlastRunCommonDialog.cpp +++ b/src/plugins/external_tool_support/src/utils/BlastRunCommonDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -53,7 +53,7 @@ BlastRunCommonDialog::BlastRunCommonDialog(QWidget *parent, BlastType blastType, : QDialog(parent), ca_c(NULL), useCompValues(useCompValues), compValues(compValues) { setupUi(this); - new HelpButton(this, buttonBox, "22056086"); + new HelpButton(this, buttonBox, "24742621"); buttonBox->button(QDialogButtonBox::Yes)->setText(tr("Restore to default")); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Search")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/external_tool_support/src/utils/BlastRunCommonDialog.h b/src/plugins/external_tool_support/src/utils/BlastRunCommonDialog.h index b0de2a302380d7c121a9af0653e8befb6ebc175c..2ada6340c3df989b29fe1cf56b806ffa9622efeb 100644 --- a/src/plugins/external_tool_support/src/utils/BlastRunCommonDialog.h +++ b/src/plugins/external_tool_support/src/utils/BlastRunCommonDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/utils/BlastTaskSettings.cpp b/src/plugins/external_tool_support/src/utils/BlastTaskSettings.cpp index 0f524e0a102a23c7630d9b656e1dbc37cc4fc650..c02f8c0b9dc53d18597bbee537ec088f1259270b 100644 --- a/src/plugins/external_tool_support/src/utils/BlastTaskSettings.cpp +++ b/src/plugins/external_tool_support/src/utils/BlastTaskSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,45 +24,46 @@ namespace U2 { BlastTaskSettings::BlastTaskSettings() { - offsInGlobalSeq=0; - aobj=NULL; - alphabet=NULL; - isNucleotideSeq=false; - numberOfHits=0; - isDefaultMatrix=true; - isDefautScores=true; - isDefaultCosts=true; - isGappedAlignment=true; - isDefaultThreshold=true; - isSequenceCircular=false; + offsInGlobalSeq = 0; + aobj = NULL; + alphabet = NULL; + isNucleotideSeq = false; + numberOfHits = 0; + isDefaultMatrix = true; + isDefautScores = true; + isDefaultCosts = true; + isGappedAlignment = true; + isDefaultThreshold = true; + isSequenceCircular = false; reset(); } void BlastTaskSettings::reset() { - programName=""; - databaseNameAndPath=""; - expectValue=10.0; - megablast=false; - wordSize=11; - gapOpenCost=0; - gapExtendCost=0; - mismatchPenalty=0; - matchReward=0; - matrix=""; - queryFile=""; - outputType=0; - outputResFile=""; - numberOfProcessors=1; - needCreateAnnotations=true; - filter=""; - isGappedAlignment=true; - xDropoffGA=0; - xDropoffUnGA=0; - xDropoffFGA=0; - windowSize=0; - threshold=0; - isDefaultThreshold=true; - isSequenceCircular=false; + programName = ""; + databaseNameAndPath = ""; + expectValue = 10.0; + megablast = false; + wordSize = 11; + gapOpenCost = 0; + gapExtendCost = 0; + mismatchPenalty = 0; + matchReward = 0; + matrix = ""; + queryFile = ""; + outputType = 0; + outputResFile = ""; + numberOfProcessors = 1; + needCreateAnnotations = true; + strandSource = QueryFrame; + filter = ""; + isGappedAlignment = true; + xDropoffGA = 0; + xDropoffUnGA = 0; + xDropoffFGA = 0; + windowSize = 0; + threshold = 0; + isDefaultThreshold = true; + isSequenceCircular = false; directStrand = TriState_Unknown; querySequenceObject = NULL; } diff --git a/src/plugins/external_tool_support/src/utils/BlastTaskSettings.h b/src/plugins/external_tool_support/src/utils/BlastTaskSettings.h index 4b562845f932cc847a812cbf07c509dfd2e573fb..6595d0624a6cc483def3e72523375591c21dab72 100644 --- a/src/plugins/external_tool_support/src/utils/BlastTaskSettings.h +++ b/src/plugins/external_tool_support/src/utils/BlastTaskSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -88,6 +88,11 @@ blastall 2.2.21 not included arguments: class BlastTaskSettings { public: + enum StrandSource { + HitFrame, + QueryFrame + }; + BlastTaskSettings(); void reset(); @@ -137,6 +142,7 @@ public: const DNAAlphabet* alphabet; //settings for annotations bool needCreateAnnotations; + StrandSource strandSource; AnnotationTableObject * aobj; QString groupName; QString annDescription; diff --git a/src/plugins/external_tool_support/src/utils/CistromeDelegate.cpp b/src/plugins/external_tool_support/src/utils/CistromeDelegate.cpp index ac6c420dc7ed19d75ba20195b7fa16d5ef02da44..bba730833c80e6d01088a7035328955b7b119ddb 100644 --- a/src/plugins/external_tool_support/src/utils/CistromeDelegate.cpp +++ b/src/plugins/external_tool_support/src/utils/CistromeDelegate.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/utils/CistromeDelegate.h b/src/plugins/external_tool_support/src/utils/CistromeDelegate.h index 95e7438ffc4cf268944fe9cd0ff1deaaf5f716de..9335ea1f5f5ca31e208cf027f2c4f7efecc9321e 100644 --- a/src/plugins/external_tool_support/src/utils/CistromeDelegate.h +++ b/src/plugins/external_tool_support/src/utils/CistromeDelegate.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/utils/ExportTasks.cpp b/src/plugins/external_tool_support/src/utils/ExportTasks.cpp index 6740bcfa62badd3ae00994fa76473945499916a0..05e4bd5aa951e5eb86cc9873897415b0ac057cbe 100644 --- a/src/plugins/external_tool_support/src/utils/ExportTasks.cpp +++ b/src/plugins/external_tool_support/src/utils/ExportTasks.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/utils/ExportTasks.h b/src/plugins/external_tool_support/src/utils/ExportTasks.h index 135b0470fc70a556ea481afc95dc80cd61a246a4..a85c2b6524c187a2c7ae575d58ca9485c257b8cc 100644 --- a/src/plugins/external_tool_support/src/utils/ExportTasks.h +++ b/src/plugins/external_tool_support/src/utils/ExportTasks.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/utils/ExternalToolSearchTask.cpp b/src/plugins/external_tool_support/src/utils/ExternalToolSearchTask.cpp index 9a4c1684a7e9bd0fea014efc54d9b9a57e2fea19..79e99065cc9cf1941aaeceb450d318ab7cc69e43 100644 --- a/src/plugins/external_tool_support/src/utils/ExternalToolSearchTask.cpp +++ b/src/plugins/external_tool_support/src/utils/ExternalToolSearchTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,16 +34,16 @@ namespace U2 { const QString ExternalToolSearchTask::TOOLS = "tools"; -ExternalToolSearchTask::ExternalToolSearchTask(const QString& _toolName) : - Task(tr("'%1' external tool search task").arg(_toolName), TaskFlag_None), - toolName(_toolName) { +ExternalToolSearchTask::ExternalToolSearchTask(const QString& _toolId) : + Task(tr("'%1' external tool search task").arg(AppContext::getExternalToolRegistry()->getToolNameById(_toolId)), TaskFlag_None), + toolId(_toolId) { } void ExternalToolSearchTask::run() { ExternalToolRegistry* etRegistry = AppContext::getExternalToolRegistry(); SAFE_POINT(etRegistry, "External tool registry is NULL", ); - ExternalTool* tool = etRegistry->getByName(toolName); - CHECK_EXT(tool, setError(tr("An external tool '%1' isn't found in the registry").arg(toolName)), ); + ExternalTool* tool = etRegistry->getById(toolId); + CHECK_EXT(tool, setError(tr("An external tool '%1' isn't found in the registry").arg(toolId)), ); // 1. Search for the tool in the tools folder QDir appDir(QCoreApplication::applicationDirPath()); @@ -123,7 +123,7 @@ QString ExternalToolSearchTask::getExeName(ExternalTool* tool) { SAFE_POINT_EXT(!dependencies.isEmpty(), setError(tr("External tool module hasn't any dependencies: it hasn't master tool")), ""); ExternalToolRegistry* etRegistry = AppContext::getExternalToolRegistry(); SAFE_POINT_EXT(etRegistry, setError(tr("External tool registry is NULL")), ""); - ExternalTool* masterTool = etRegistry->getByName(dependencies.first()); + ExternalTool* masterTool = etRegistry->getById(dependencies.first()); SAFE_POINT_EXT(masterTool, setError(tr("An external tool '%1' isn't found in the registry").arg(dependencies.first())), ""); return masterTool->getExecutableFileName(); } @@ -144,8 +144,8 @@ QList<Task*> ExternalToolsSearchTask::onSubTaskFinished(Task* subTask) { if (searchTask) { ExternalToolRegistry* etRegistry = AppContext::getExternalToolRegistry(); SAFE_POINT(etRegistry, "External tool registry is NULL", subTasks); - ExternalTool* tool = etRegistry->getByName(searchTask->getToolName()); - SAFE_POINT(tool, QString("An external tool '%1' isn't found in the registry").arg(searchTask->getToolName()), subTasks); + ExternalTool* tool = etRegistry->getById(searchTask->getToolId()); + SAFE_POINT(tool, QString("An external tool '%1' isn't found in the registry").arg(searchTask->getToolId()), subTasks); muted = tool->isMuted(); } diff --git a/src/plugins/external_tool_support/src/utils/ExternalToolSearchTask.h b/src/plugins/external_tool_support/src/utils/ExternalToolSearchTask.h index 784f9a7de35e2eae95c5e78e7413bd60c3e2db70..bfc5139876504f3b1e171e625226e7e820fdec39 100644 --- a/src/plugins/external_tool_support/src/utils/ExternalToolSearchTask.h +++ b/src/plugins/external_tool_support/src/utils/ExternalToolSearchTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -39,16 +39,16 @@ namespace U2 { class ExternalToolSearchTask : public Task { Q_OBJECT public: - ExternalToolSearchTask(const QString& toolName); + ExternalToolSearchTask(const QString& toolId); virtual void run(); - QString getToolName() const { return toolName; } + QString getToolId() const { return toolId; } QStringList getPaths() const { return toolPaths; } private: QString getExeName(ExternalTool *tool); - QString toolName; + QString toolId; QStringList toolPaths; static const QString TOOLS; diff --git a/src/plugins/external_tool_support/src/utils/ExternalToolSupportAction.cpp b/src/plugins/external_tool_support/src/utils/ExternalToolSupportAction.cpp index 9956615cd5da8653e5404a7424913c5d592a1ef1..68aa56b6b5d208bc373627c37f10f347d8dc60c9 100644 --- a/src/plugins/external_tool_support/src/utils/ExternalToolSupportAction.cpp +++ b/src/plugins/external_tool_support/src/utils/ExternalToolSupportAction.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -28,16 +28,16 @@ namespace U2 { -ExternalToolSupportAction::ExternalToolSupportAction(QObject* p, GObjectView* v, const QString& _text, int order, const QStringList& _toolNames) +ExternalToolSupportAction::ExternalToolSupportAction(QObject* p, GObjectView* v, const QString& _text, int order, const QStringList& _toolIds) : GObjectViewAction(p,v,_text,order), - toolNames(_toolNames) { + toolIds(_toolIds) { bool isAnyToolConfigured = checkTools(true); setState(isAnyToolConfigured); } -ExternalToolSupportAction::ExternalToolSupportAction(const QString& _text, QObject* p, const QStringList& _toolNames) +ExternalToolSupportAction::ExternalToolSupportAction(const QString& _text, QObject* p, const QStringList& _toolIds) : GObjectViewAction(p, NULL, _text), - toolNames(_toolNames) { + toolIds(_toolIds) { bool isAnyToolConfigured = checkTools(true); setState(isAnyToolConfigured); } @@ -49,11 +49,11 @@ void ExternalToolSupportAction::sl_pathChanged() { bool ExternalToolSupportAction::checkTools(bool connectSignals) { bool result = false; - foreach (QString toolName, toolNames) { - if (!AppContext::getExternalToolRegistry()->getByName(toolName)->getPath().isEmpty()) { + foreach (QString toolId, toolIds) { + if (!AppContext::getExternalToolRegistry()->getById(toolId)->getPath().isEmpty()) { result = true; } - ExternalTool* exTool=AppContext::getExternalToolRegistry()->getByName(toolName); + ExternalTool* exTool=AppContext::getExternalToolRegistry()->getById(toolId); if (connectSignals == true) { connect(exTool, SIGNAL(si_pathChanged()), SLOT(sl_pathChanged())); connect(exTool, SIGNAL(si_toolValidationStatusChanged(bool)), SLOT(sl_toolStateChanged(bool))); @@ -73,13 +73,13 @@ void ExternalToolSupportAction::setState(bool isAnyToolConfigured) { if (!isAnyToolConfigured || (AppContext::getAppSettings()->getUserAppsSettings()->getUserTemporaryDirPath().isEmpty())) { isConfiguredToolFont.setItalic(true); - setIcon(AppContext::getExternalToolRegistry()->getByName(toolNames.at(0))->getGrayIcon()); + setIcon(AppContext::getExternalToolRegistry()->getById(toolIds.at(0))->getGrayIcon()); } else { isConfiguredToolFont.setItalic(false); - if (AppContext::getExternalToolRegistry()->getByName(toolNames.at(0))->isValid()) { - setIcon(AppContext::getExternalToolRegistry()->getByName(toolNames.at(0))->getIcon()); + if (AppContext::getExternalToolRegistry()->getById(toolIds.at(0))->isValid()) { + setIcon(AppContext::getExternalToolRegistry()->getById(toolIds.at(0))->getIcon()); } else { - setIcon(AppContext::getExternalToolRegistry()->getByName(toolNames.at(0))->getWarnIcon()); + setIcon(AppContext::getExternalToolRegistry()->getById(toolIds.at(0))->getWarnIcon()); } } diff --git a/src/plugins/external_tool_support/src/utils/ExternalToolSupportAction.h b/src/plugins/external_tool_support/src/utils/ExternalToolSupportAction.h index 9049dd38c0dcde5387ea17c1a64b324e04c7aa8c..807ee361ba4f35a919d54d6545e9af8ada2b975c 100644 --- a/src/plugins/external_tool_support/src/utils/ExternalToolSupportAction.h +++ b/src/plugins/external_tool_support/src/utils/ExternalToolSupportAction.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,10 +30,10 @@ namespace U2 { class ExternalToolSupportAction : public GObjectViewAction { Q_OBJECT public: - ExternalToolSupportAction(QObject* p, GObjectView* v, const QString& _text, int order, const QStringList& _toolNames); - ExternalToolSupportAction(const QString& text, QObject* p, const QStringList& _toolNames); + ExternalToolSupportAction(QObject* p, GObjectView* v, const QString& _text, int order, const QStringList& _toolIds); + ExternalToolSupportAction(const QString& text, QObject* p, const QStringList& _toolIds); - const QStringList getToolNames() const {return toolNames;} + const QStringList getToolIds() const {return toolIds;} private slots: void sl_pathChanged(); @@ -43,7 +43,7 @@ private: bool checkTools(bool connectSignals = false); void setState(bool isAnyToolConfigured); - QStringList toolNames; + QStringList toolIds; }; }//namespace diff --git a/src/plugins/external_tool_support/src/utils/ExternalToolUtils.cpp b/src/plugins/external_tool_support/src/utils/ExternalToolUtils.cpp index 17aa2672bf72fd29e748018642666950625240d3..3015138bddf8daf05def9c6bee0a36013ab30c11 100644 --- a/src/plugins/external_tool_support/src/utils/ExternalToolUtils.cpp +++ b/src/plugins/external_tool_support/src/utils/ExternalToolUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -39,11 +39,13 @@ namespace U2 { const QString ExternalToolUtils::CISTROME_DATA_DIR = "CISTROME_DATA_DIR"; -void ExternalToolUtils::checkExtToolsPath(const QStringList &names) { +void ExternalToolUtils::checkExtToolsPath(const QStringList &ids) { QStringList missingTools; - foreach (QString name, names) { - if (AppContext::getExternalToolRegistry()->getByName(name)->getPath().isEmpty()) { - missingTools << name; + foreach (const QString &id, ids) { + ExternalTool *tool = AppContext::getExternalToolRegistry()->getById(id); + SAFE_POINT(nullptr != tool, QString("External tool with ID '%1' not found in the registry").arg(id), ); + if (tool->getPath().isEmpty()) { + missingTools << tool->getName(); } } if (!missingTools.isEmpty()){ diff --git a/src/plugins/external_tool_support/src/utils/ExternalToolUtils.h b/src/plugins/external_tool_support/src/utils/ExternalToolUtils.h index b25556f4d7037c1e1be33905240499370d990e19..5e1613e57d2e799b3c0546f0292e47d504f5aad3 100644 --- a/src/plugins/external_tool_support/src/utils/ExternalToolUtils.h +++ b/src/plugins/external_tool_support/src/utils/ExternalToolUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ namespace U2 { class ExternalToolUtils : public QObject { Q_OBJECT public: - static void checkExtToolsPath(const QStringList &names); + static void checkExtToolsPath(const QStringList &ids); static void addDefaultCistromeDirToSettings(); static void addCistromeDataPath(const QString& dataName, const QString& dirName, bool entriesAreFolders = false); diff --git a/src/plugins/external_tool_support/src/utils/ExternalToolValidateTask.cpp b/src/plugins/external_tool_support/src/utils/ExternalToolValidateTask.cpp index 042e133899b0baaea2e25deccf55387ed8883367..846cd4a4337425b9465ef21135695a971d482f4c 100644 --- a/src/plugins/external_tool_support/src/utils/ExternalToolValidateTask.cpp +++ b/src/plugins/external_tool_support/src/utils/ExternalToolValidateTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,6 +23,7 @@ #include <U2Core/AppContext.h> #include <U2Core/AppResources.h> +#include <U2Core/CmdlineTaskRunner.h> #include <U2Core/ExternalToolRegistry.h> #include <U2Core/Log.h> #include <U2Core/ScriptingToolRegistry.h> @@ -37,14 +38,15 @@ namespace U2 { -ExternalToolValidateTask::ExternalToolValidateTask(const QString& _toolName, TaskFlags flags) : +ExternalToolValidateTask::ExternalToolValidateTask(const QString& _toolId, const QString& _toolName, TaskFlags flags) : Task(tr("%1 validate task").arg(_toolName), flags), + toolId(_toolId), toolName(_toolName), isValid(false) { } -ExternalToolJustValidateTask::ExternalToolJustValidateTask(const QString& _toolName, const QString& path) : - ExternalToolValidateTask(_toolName, TaskFlag_None), +ExternalToolJustValidateTask::ExternalToolJustValidateTask(const QString& _toolId, const QString& _toolName, const QString& path) : + ExternalToolValidateTask(_toolId, _toolName, TaskFlag_None), externalToolProcess(NULL), tool(NULL) { @@ -60,7 +62,7 @@ ExternalToolJustValidateTask::~ExternalToolJustValidateTask() { void ExternalToolJustValidateTask::run() { ExternalToolRegistry* etRegistry = AppContext::getExternalToolRegistry(); SAFE_POINT(etRegistry, "An external tool registry is NULL", ); - tool = etRegistry->getByName(toolName); + tool = etRegistry->getById(toolId); SAFE_POINT(tool, QString("External tool '%1' isn't found in the registry").arg(toolName), ); QFileInfo info(toolPath); @@ -72,9 +74,9 @@ void ExternalToolJustValidateTask::run() { if (!originalValidation.toolRunnerProgram.isEmpty()) { ScriptingToolRegistry* stRegistry = AppContext::getScriptingToolRegistry(); - SAFE_POINT_EXT(stRegistry, setError(tr("Scripting tool registry is NULL")), ); - ScriptingTool* stool = stRegistry->getByName(originalValidation.toolRunnerProgram); - SAFE_POINT_EXT(stool, setError(tr("Scripting tool '%1' isn't found in the registry")), ); + SAFE_POINT_EXT(nullptr != stRegistry, setError(tr("Scripting tool registry is NULL")), ); + ScriptingTool* stool = stRegistry->getById(originalValidation.toolRunnerProgram); + CHECK_EXT(nullptr != stool, setError(tr("Scripting tool '%1' isn't found in the registry").arg(originalValidation.toolRunnerProgram)), ); if(stool->getPath().isEmpty()) { stateInfo.setError(QString("The tool %1 that runs %2 is not installed. " @@ -136,21 +138,20 @@ void ExternalToolJustValidateTask::run() { } int elapsedTime = 0; + const int timeout = tool->isCustom() ? 0 : TIMEOUT_MS; // Custom tools can't be validated properly now, there is no need to wait them while (!externalToolProcess->waitForFinished(CHECK_PERIOD_MS)) { elapsedTime += CHECK_PERIOD_MS; - if (isCanceled() || elapsedTime >= TIMEOUT_MS) { + if (isCanceled() || elapsedTime >= timeout) { cancelProcess(); } } - if (!parseLog(validation)) { - return; - } - - if (!isValid) { - return; - } + CHECK(parseLog(validation), ); + CHECK(isValid, ); } + + performAdditionalChecks(); + CHECK_OP(stateInfo, ); } Task::ReportResult ExternalToolJustValidateTask::report() { @@ -173,13 +174,13 @@ Task::ReportResult ExternalToolJustValidateTask::report() { } void ExternalToolJustValidateTask::cancelProcess() { - externalToolProcess->kill(); + CmdlineTaskRunner::killProcessTree(externalToolProcess); } void ExternalToolJustValidateTask::setEnvironment(ExternalTool *tool) { QStringList additionalPaths; - foreach (const QString &toolName, tool->getDependencies()) { - ExternalTool *masterTool = AppContext::getExternalToolRegistry()->getByName(toolName); + foreach (const QString &toolId, tool->getDependencies()) { + ExternalTool *masterTool = AppContext::getExternalToolRegistry()->getById(toolId); if (NULL != masterTool) { additionalPaths << QFileInfo(masterTool->getPath()).dir().absolutePath(); } @@ -210,7 +211,7 @@ bool ExternalToolJustValidateTask::parseLog(const ExternalToolValidation& valida if (errLog.contains(QRegExp(validation.expectedMsg))) { isValid = true; checkVersion(errLog); - tool->getAdditionalParameters(errLog); + tool->extractAdditionalParameters(errLog); } else { isValid = false; foreach (const QString& errStr, validation.possibleErrorsDescr.keys()) { @@ -227,7 +228,7 @@ bool ExternalToolJustValidateTask::parseLog(const ExternalToolValidation& valida if (log.contains(QRegExp(validation.expectedMsg))) { isValid = true; checkVersion(log); - tool->getAdditionalParameters(log); + tool->extractAdditionalParameters(log); } else { isValid = false; foreach (const QString& errStr, validation.possibleErrorsDescr.keys()) { @@ -239,17 +240,24 @@ bool ExternalToolJustValidateTask::parseLog(const ExternalToolValidation& valida } } + if (errLog.isEmpty() && log.isEmpty() && validation.expectedMsg.isEmpty()) { + isValid = true; + } + return true; } void ExternalToolJustValidateTask::checkVersion(const QString &partOfLog) { - QStringList lastPartOfLog=partOfLog.split(QRegExp("(\n|\r)")); - - foreach (QString buf, lastPartOfLog) { - if (buf.contains(checkVersionRegExp)) { - checkVersionRegExp.indexIn(buf); - version = checkVersionRegExp.cap(1); - return; + if (checkVersionRegExp.isEmpty()) { + version = tool->getPredefinedVersion(); + } else { + QStringList lastPartOfLog = partOfLog.split(QRegExp("(\n|\r)")); + foreach (QString buf, lastPartOfLog) { + if (buf.contains(checkVersionRegExp)) { + checkVersionRegExp.indexIn(buf); + version = checkVersionRegExp.cap(1); + return; + } } } } @@ -289,8 +297,17 @@ void ExternalToolJustValidateTask::checkArchitecture(const QString &toolPath) { #endif } -ExternalToolSearchAndValidateTask::ExternalToolSearchAndValidateTask(const QString& _toolName) : - ExternalToolValidateTask(_toolName, TaskFlags(TaskFlag_CancelOnSubtaskCancel | TaskFlag_NoRun)), +void ExternalToolJustValidateTask::performAdditionalChecks() { + tool->performAdditionalChecks(toolPath); + + if (tool->hasAdditionalErrorMessage()) { + isValid = false; + stateInfo.setError(tool->getAdditionalErrorMessage()); + } +} + +ExternalToolSearchAndValidateTask::ExternalToolSearchAndValidateTask(const QString& _toolId, const QString& _toolName) : + ExternalToolValidateTask(_toolId, _toolName, TaskFlags(TaskFlag_CancelOnSubtaskCancel | TaskFlag_NoRun)), toolIsFound(false), searchTask(NULL), validateTask(NULL) @@ -298,7 +315,7 @@ ExternalToolSearchAndValidateTask::ExternalToolSearchAndValidateTask(const QStri } void ExternalToolSearchAndValidateTask::prepare() { - searchTask = new ExternalToolSearchTask(toolName); + searchTask = new ExternalToolSearchTask(toolId); addSubTask(searchTask); } @@ -315,7 +332,7 @@ QList<Task*> ExternalToolSearchAndValidateTask::onSubTaskFinished(Task *subTask) toolIsFound = false; } else { toolIsFound = true; - validateTask = new ExternalToolJustValidateTask(toolName, toolPaths.first()); + validateTask = new ExternalToolJustValidateTask(toolId, toolName, toolPaths.first()); subTasks << validateTask; } } @@ -332,7 +349,7 @@ QList<Task*> ExternalToolSearchAndValidateTask::onSubTaskFinished(Task *subTask) toolPaths.removeFirst(); if (!toolPaths.isEmpty()) { - validateTask = new ExternalToolJustValidateTask(toolName, toolPaths.first()); + validateTask = new ExternalToolJustValidateTask(toolId, toolName, toolPaths.first()); subTasks << validateTask; } } @@ -344,7 +361,7 @@ QList<Task*> ExternalToolSearchAndValidateTask::onSubTaskFinished(Task *subTask) Task::ReportResult ExternalToolSearchAndValidateTask::report() { ExternalToolRegistry* etRegistry = AppContext::getExternalToolRegistry(); SAFE_POINT(etRegistry, "An external tool registry is NULL", ReportResult_Finished); - ExternalTool* tool = etRegistry->getByName(toolName); + ExternalTool* tool = etRegistry->getById(toolId); SAFE_POINT(tool, QString("An external tool '%1' isn't found in the registry").arg(toolName), ReportResult_Finished); if (!isValid && toolIsFound && !toolPath.isEmpty()) { @@ -375,7 +392,7 @@ QList<Task*> ExternalToolsValidateTask::onSubTaskFinished(Task* subTask) { if (validateTask) { ExternalToolRegistry* etRegistry = AppContext::getExternalToolRegistry(); SAFE_POINT(etRegistry, "An external tool registry is NULL", subTasks); - ExternalTool* tool = etRegistry->getByName(validateTask->getToolName()); + ExternalTool* tool = etRegistry->getById(validateTask->getToolId()); SAFE_POINT(tool, QString("An external tool '%1' isn't found in the registry").arg(validateTask->getToolName()), subTasks); muted = tool->isMuted(); } diff --git a/src/plugins/external_tool_support/src/utils/ExternalToolValidateTask.h b/src/plugins/external_tool_support/src/utils/ExternalToolValidateTask.h index 4301017e43a718397c51d7cab49d298b89b87225..b171833ee767ef4e600b443dab5ebc638b326f01 100644 --- a/src/plugins/external_tool_support/src/utils/ExternalToolValidateTask.h +++ b/src/plugins/external_tool_support/src/utils/ExternalToolValidateTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -36,17 +36,19 @@ class ExternalToolSearchTask; class ExternalToolValidateTask : public Task { Q_OBJECT public: - ExternalToolValidateTask(const QString& toolName, TaskFlags flags = TaskFlag_None); + ExternalToolValidateTask(const QString& toolId, const QString& toolName, TaskFlags flags = TaskFlag_None); virtual ~ExternalToolValidateTask() {} virtual Task::ReportResult report() = 0; bool isValidTool() { return isValid; } - QString getToolName() { return toolName; } + QString getToolId() { return toolId; } + QString getToolName() { return toolName; } QString getToolPath() { return toolPath; } QString getToolVersion() { return version; } protected: + QString toolId; QString toolName; QString toolPath; QString version; @@ -57,7 +59,7 @@ class ExternalToolJustValidateTask: public ExternalToolValidateTask { Q_OBJECT Q_DISABLE_COPY(ExternalToolJustValidateTask) public: - ExternalToolJustValidateTask(const QString& toolName, const QString& path); + ExternalToolJustValidateTask(const QString& toolId, const QString& toolName, const QString& path); virtual ~ExternalToolJustValidateTask(); virtual void run(); @@ -70,6 +72,7 @@ private: bool parseLog(const ExternalToolValidation& validation); void checkVersion(const QString& partOfLog); void checkArchitecture(const QString &toolPath); + void performAdditionalChecks(); QString errorMsg; @@ -90,7 +93,7 @@ private: class ExternalToolSearchAndValidateTask : public ExternalToolValidateTask { Q_OBJECT public: - ExternalToolSearchAndValidateTask(const QString& toolName); + ExternalToolSearchAndValidateTask(const QString& toolId, const QString& toolName); void prepare(); virtual QList<Task*> onSubTaskFinished(Task *subTask); diff --git a/src/plugins/external_tool_support/src/utils/OutputCollector.cpp b/src/plugins/external_tool_support/src/utils/OutputCollector.cpp index 3017ddf3115e4ad3f387d95abc8113348f9acde6..3dfbccb424c25872ed60f061b221eff32f005e63 100644 --- a/src/plugins/external_tool_support/src/utils/OutputCollector.cpp +++ b/src/plugins/external_tool_support/src/utils/OutputCollector.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,11 +23,17 @@ namespace U2 { -OutputCollector::OutputCollector() : ExternalToolListener(), firstLineSkipped(false) {} +OutputCollector::OutputCollector(bool _skipMessageWithCommand) + : ExternalToolListener(), + skipMessageWithCommand(_skipMessageWithCommand), + firstLineSkipped(false) +{ + +} void OutputCollector::addNewLogMessage(const QString& message, int /*messageType*/) { //skip first line of the output with tool calling string - if (collectedLog.isEmpty() && !firstLineSkipped) { + if (skipMessageWithCommand && collectedLog.isEmpty() && !firstLineSkipped) { firstLineSkipped = true; return; } diff --git a/src/plugins/external_tool_support/src/utils/OutputCollector.h b/src/plugins/external_tool_support/src/utils/OutputCollector.h index 5d423094ea7af4a4c26e42f11dd7d5724f9c5d1a..2612662821f71f9b7bc65fb8a43f98389bf46cf1 100644 --- a/src/plugins/external_tool_support/src/utils/OutputCollector.h +++ b/src/plugins/external_tool_support/src/utils/OutputCollector.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,10 +30,13 @@ namespace U2 { class OutputCollector : public ExternalToolListener { public: - OutputCollector(); + OutputCollector(bool skipMessageWithCommand = true); + void addNewLogMessage(const QString& message, int messageType); const QString& getLog() const; + private: + const bool skipMessageWithCommand; bool firstLineSkipped; QString collectedLog; }; diff --git a/src/plugins/external_tool_support/src/vcftools/VcfConsensusSupport.cpp b/src/plugins/external_tool_support/src/vcftools/VcfConsensusSupport.cpp index bc68b39aef3fbbc2294388f3200ca26bc5738bea..45f6715db0df805e68183f8462e2311abcce04b1 100644 --- a/src/plugins/external_tool_support/src/vcftools/VcfConsensusSupport.cpp +++ b/src/plugins/external_tool_support/src/vcftools/VcfConsensusSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -28,8 +28,12 @@ namespace U2 { -VcfConsensusSupport::VcfConsensusSupport(const QString &name, const QString &path) - : ExternalTool(name, path) +const QString VcfConsensusSupport::ET_VCF_CONSENSUS = "vcf-consensus"; +const QString VcfConsensusSupport::ET_VCF_CONSENSUS_ID = "USUPP_VCF_CONSENSUS"; +const QString VcfConsensusSupport::VCF_CONSENSUS_TMP_DIR = "vcf-consensus"; + +VcfConsensusSupport::VcfConsensusSupport(const QString& id, const QString &name, const QString &path) + : ExternalTool(id, name, path) { if (AppContext::getMainWindow() != NULL) { icon = QIcon(":external_tool_support/images/cmdline.png"); @@ -46,8 +50,8 @@ VcfConsensusSupport::VcfConsensusSupport(const QString &name, const QString &pat versionRegExp = QRegExp("Version: (\\d+.\\d+.\\d+)"); toolKitName = "VCFtools"; - toolRunnerProgramm = ET_PERL; - dependencies << ET_PERL << ET_TABIX; + toolRunnerProgram = PerlSupport::ET_PERL_ID; + dependencies << PerlSupport::ET_PERL_ID << TabixSupport::ET_TABIX_ID; } } // namespace U2 diff --git a/src/plugins/external_tool_support/src/vcftools/VcfConsensusSupport.h b/src/plugins/external_tool_support/src/vcftools/VcfConsensusSupport.h index cd1d6107ec9e577351ad8eef870c90df9cee15e2..2895cd508affff6f0a532cbf5e232ace11ac2056 100644 --- a/src/plugins/external_tool_support/src/vcftools/VcfConsensusSupport.h +++ b/src/plugins/external_tool_support/src/vcftools/VcfConsensusSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,15 +24,16 @@ #include <U2Core/ExternalToolRegistry.h> -#define ET_VCF_CONSENSUS "vcf-consensus" -#define VCF_CONSENSUS_TMP_DIR "vcf-consensus" - namespace U2 { class VcfConsensusSupport : public ExternalTool { Q_OBJECT public: - VcfConsensusSupport(const QString& name, const QString& path = ""); + VcfConsensusSupport(const QString& id, const QString& name, const QString& path = ""); + + static const QString ET_VCF_CONSENSUS; + static const QString ET_VCF_CONSENSUS_ID; + static const QString VCF_CONSENSUS_TMP_DIR; }; } // namespace U2 diff --git a/src/plugins/external_tool_support/src/vcftools/VcfConsensusSupportTask.cpp b/src/plugins/external_tool_support/src/vcftools/VcfConsensusSupportTask.cpp index d16ff2bab7ae09e8e37322b2e0ed9b0a07122ecc..de0c8c6ecd1ea03ae44f3680038a5e91efae7e6c 100644 --- a/src/plugins/external_tool_support/src/vcftools/VcfConsensusSupportTask.cpp +++ b/src/plugins/external_tool_support/src/vcftools/VcfConsensusSupportTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -51,7 +51,7 @@ void VcfConsensusSupportTask::prepare() { SAFE_POINT_EXT(AppContext::getAppSettings() != NULL, setError(tr("AppSettings is NULL")), ); const UserAppsSettings* userAS = AppContext::getAppSettings()->getUserAppsSettings(); SAFE_POINT_EXT(userAS != NULL, setError(tr("UserAppsSettings is NULL")), ); - QString tmpDirPath( userAS->getCurrentProcessTemporaryDirPath(VCF_CONSENSUS_TMP_DIR) ); + QString tmpDirPath( userAS->getCurrentProcessTemporaryDirPath(VcfConsensusSupport::VCF_CONSENSUS_TMP_DIR) ); SAFE_POINT_EXT(!tmpDirPath.isEmpty(), setError(tr("Temporary folder is not set!")), ); GUrl tmp( tmpDirPath + "/" + inputVcf.fileName() + ".gz"); @@ -82,15 +82,15 @@ QList<Task*> VcfConsensusSupportTask::onSubTaskFinished(Task *subTask) { ExternalToolRegistry* extToolReg = AppContext::getExternalToolRegistry(); SAFE_POINT_EXT(extToolReg, setError(tr("ExternalToolRegistry is NULL")), res); - ExternalTool *vcfToolsET = extToolReg->getByName(ET_VCF_CONSENSUS); - ExternalTool *tabixET = extToolReg->getByName(ET_TABIX); + ExternalTool *vcfToolsET = extToolReg->getById(VcfConsensusSupport::ET_VCF_CONSENSUS_ID); + ExternalTool *tabixET = extToolReg->getById(TabixSupport::ET_TABIX_ID); SAFE_POINT_EXT(vcfToolsET, setError(tr("There is no VcfConsensus external tool registered")), res); SAFE_POINT_EXT(tabixET, setError(tr("There is no Tabix external tool registered")), res); QMap <QString, QString> envVariables; envVariables["PERL5LIB"] = getPath(vcfToolsET); - vcfTask = new ExternalToolRunTask(ET_VCF_CONSENSUS, QStringList() << tabixTask->getOutputBgzf().getURLString(), + vcfTask = new ExternalToolRunTask(VcfConsensusSupport::ET_VCF_CONSENSUS_ID, QStringList() << tabixTask->getOutputBgzf().getURLString(), new ExternalToolLogParser(), "", QStringList() << getPath(tabixET)); vcfTask->setStandartInputFile( inputFA.getURLString() ); vcfTask->setStandartOutputFile( output.getURLString() ); diff --git a/src/plugins/external_tool_support/src/vcftools/VcfConsensusSupportTask.h b/src/plugins/external_tool_support/src/vcftools/VcfConsensusSupportTask.h index b9aac00e4c41c234ecafd8bd851521aa381bcd80..14dc8dd91b0b1348a2dd70bcc78658d7f56a2586 100644 --- a/src/plugins/external_tool_support/src/vcftools/VcfConsensusSupportTask.h +++ b/src/plugins/external_tool_support/src/vcftools/VcfConsensusSupportTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/vcftools/VcfConsensusWorker.cpp b/src/plugins/external_tool_support/src/vcftools/VcfConsensusWorker.cpp index f578056234b113bf1f53eb8df7a9616437458f0d..a3fb08f55757250123869779bf4143df808242a5 100644 --- a/src/plugins/external_tool_support/src/vcftools/VcfConsensusWorker.cpp +++ b/src/plugins/external_tool_support/src/vcftools/VcfConsensusWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -157,8 +157,8 @@ void VcfConsensusWorkerFactory::init() { ActorPrototype *proto = new IntegralBusActorPrototype(desc, ports, attrs); proto->setPrompter(new VcfConsensusPrompter()); proto->setEditor(new DelegateEditor(delegates)); - proto->addExternalTool(ET_VCF_CONSENSUS); - proto->addExternalTool(ET_TABIX); + proto->addExternalTool(VcfConsensusSupport::ET_VCF_CONSENSUS_ID); + proto->addExternalTool(TabixSupport::ET_TABIX_ID); SAFE_POINT(WorkflowEnv::getProtoRegistry() != NULL, "Workflow proto registry is NULL", ); diff --git a/src/plugins/external_tool_support/src/vcftools/VcfConsensusWorker.h b/src/plugins/external_tool_support/src/vcftools/VcfConsensusWorker.h index 8e314b65c4d10477531fc0fec8348e5373bef370..1c8007afa864b8849394cd113f12c2d760f48bb3 100644 --- a/src/plugins/external_tool_support/src/vcftools/VcfConsensusWorker.h +++ b/src/plugins/external_tool_support/src/vcftools/VcfConsensusWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/external_tool_support/src/vcfutils/VcfutilsSupport.cpp b/src/plugins/external_tool_support/src/vcfutils/VcfutilsSupport.cpp index d908ce2fb08a81c382b5ec0e32750ad2cc984f82..1952bcf1477a6a1605bb208a1b0de45a59d23251 100644 --- a/src/plugins/external_tool_support/src/vcfutils/VcfutilsSupport.cpp +++ b/src/plugins/external_tool_support/src/vcfutils/VcfutilsSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -27,10 +27,11 @@ namespace U2 { -const QString VcfutilsSupport::TOOL_NAME("vcfutils"); +const QString VcfutilsSupport::VCF_UTILS("vcfutils"); +const QString VcfutilsSupport::VCF_UTILS_ID("USUPP_VCFUTILS"); -VcfutilsSupport::VcfutilsSupport(const QString &name) -: ExternalTool(name) +VcfutilsSupport::VcfutilsSupport(const QString& id, const QString &name) +: ExternalTool(id, name, "") { if (AppContext::getMainWindow()) { icon = QIcon(":external_tool_support/images/cmdline.png"); @@ -41,8 +42,8 @@ VcfutilsSupport::VcfutilsSupport(const QString &name) executableFileName = "vcfutils.pl"; description = "The set of utilities for VCF format operations"; - toolRunnerProgramm = ET_PERL; - dependencies << ET_PERL; + toolRunnerProgram = PerlSupport::ET_PERL_ID; + dependencies << PerlSupport::ET_PERL_ID; validMessage = "varFilter"; toolKitName = "SAMtools"; diff --git a/src/plugins/external_tool_support/src/vcfutils/VcfutilsSupport.h b/src/plugins/external_tool_support/src/vcfutils/VcfutilsSupport.h index df401aa83b1e6928ab5f0deaa9c82f5115a86dd2..a7ba5fe74634f58f550371a44d102acc6c2e2e58 100644 --- a/src/plugins/external_tool_support/src/vcfutils/VcfutilsSupport.h +++ b/src/plugins/external_tool_support/src/vcfutils/VcfutilsSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -29,9 +29,10 @@ namespace U2 { class VcfutilsSupport : public ExternalTool { Q_OBJECT public: - VcfutilsSupport(const QString &name); + VcfutilsSupport(const QString& id, const QString &name); - static const QString TOOL_NAME; + static const QString VCF_UTILS; + static const QString VCF_UTILS_ID; }; } // U2 diff --git a/src/plugins/external_tool_support/transl/russian.ts b/src/plugins/external_tool_support/transl/russian.ts index c4f8bf293e02cd0212940b4f41202fc67498b335..3cb39ab2e28eba3721cec5ffef02af37235d2ec3 100644 --- a/src/plugins/external_tool_support/transl/russian.ts +++ b/src/plugins/external_tool_support/transl/russian.ts @@ -988,6 +988,20 @@ bowtie медленнее, когда указан режим --best.</translati <translation>is</translation> </message> </context> +<context> + <name>BwaIndexAlgorithmWarningReporter</name> + <message> + <location filename="../src/bwa/BwaSettingsWidget.cpp" line="81"/> + <source>NOTE: "is" index algorithm is not supposed to work with reference sequences having size larger than 2 GB. In order to achieve stable BWA performance it is strongly recommend to set the index algorithm to "bwtsw"</source> + <translation type="unfinished">NOTE: "is" алгоритм не поддерживаетÑÑ Ð´Ð»Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ Ñ Ñ€ÐµÐ²ÐµÑ€ÐµÐ½Ñными поÑледовательноÑÑ‚Ñми, размер которых превышает 2 GB. Ð’ таком Ñлучае рекомендуетÑÑ Ð²Ñ‹Ð±Ñ€Ð°Ñ‚ÑŒ алгоритм "bwtsw"</translation> + </message> + <message> + <location filename="../src/bwa/BwaSettingsWidget.cpp" line="88"/> + <source>NOTE: "bwtsw" index algorithm is not supposed to work with reference sequences having size smaller than 10 MB. +In order to achieve stable BWA performance it is strongly recommend to set the index algorithm to "is"</source> + <translation type="unfinished">NOTE: "bwtsw" алгоритм не поддерживаетÑÑ Ð´Ð»Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ Ñ Ñ€ÐµÑ„ÐµÑ€ÐµÑными поÑледовательноÑÑ‚Ñми, размер которых меньше 10 MB. Ð’ таком Ñлучае рекомендуетÑÑ Ð¸Ð·Ð¼ÐµÐ½Ð¸Ñ‚ÑŒ алгоритм на "is"</translation> + </message> +</context> <context> <name>BwaMemSettings</name> <message> @@ -1059,9 +1073,8 @@ bowtie медленнее, когда указан режим --best.</translati <translation>Штраф за отÑечение (-L)</translation> </message> <message> - <location filename="../src/bwa/BwaMemSettings.ui" line="580"/> - <source>Gap extention penalty (-E)</source> - <translation>Штраф за раÑширение пробела (-E)</translation> + <source>Gap extension penalty (-E)</source> + <translation type="vanished">Штраф за раÑширение пробела (-E)</translation> </message> <message> <location filename="../src/bwa/BwaMemSettings.ui" line="730"/> @@ -1152,6 +1165,11 @@ bowtie медленнее, когда указан режим --best.</translati <source>Scoring Options</source> <translation>ÐаÑтройки веÑов</translation> </message> + <message> + <location filename="../src/bwa/BwaMemSettings.ui" line="580"/> + <source>Gap extention penalty (-E)</source> + <translation type="unfinished"></translation> + </message> <message> <location filename="../src/bwa/BwaMemSettings.ui" line="654"/> <source>Other</source> @@ -1417,9 +1435,8 @@ p, li { white-space: pre-wrap; } <translation>ВеÑа Ñовпадений (-a)</translation> </message> <message> - <location filename="../src/bwa/BwaSwSettings.ui" line="159"/> - <source>Gap extention penalty (-r)</source> - <translation>Штраф за раÑширение пробела (-r)</translation> + <source>Gap extension penalty (-r)</source> + <translation type="vanished">Штраф за раÑширение пробела (-r)</translation> </message> <message> <location filename="../src/bwa/BwaSwSettings.ui" line="113"/> @@ -1451,6 +1468,11 @@ p, li { white-space: pre-wrap; } <source>Gap open penalty (-q)</source> <translation>Штраф за открытие пробела (-q)</translation> </message> + <message> + <location filename="../src/bwa/BwaSwSettings.ui" line="159"/> + <source>Gap extention penalty (-r)</source> + <translation type="unfinished"></translation> + </message> <message> <location filename="../src/bwa/BwaSwSettings.ui" line="182"/> <source>Band width (-w)</source> @@ -1836,6 +1858,49 @@ p, li { white-space: pre-wrap; } <translation>Ðе вводить штраф за разделение пробелов</translation> </message> </context> +<context> + <name>CustomToolConfigParser</name> + <message> + <location filename="../src/custom_tools/CustomToolConfigParser.cpp" line="50"/> + <source>Invalid config file format: file %1 cann not be opened</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/custom_tools/CustomToolConfigParser.cpp" line="59"/> + <source>Invalid config file format: custom tool description not found</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/custom_tools/CustomToolConfigParser.cpp" line="60"/> + <source>Invalid config file format: there are too many entities in the file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/custom_tools/CustomToolConfigParser.cpp" line="63"/> + <source>Can't parse the config file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/custom_tools/CustomToolConfigParser.cpp" line="66"/> + <source>Can't parse config with version %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/custom_tools/CustomToolConfigParser.cpp" line="106"/> + <source>Unknown element: '%1', skipping</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/custom_tools/CustomToolConfigParser.cpp" line="149"/> + <source>The tool name is not specified in the config file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/custom_tools/CustomToolConfigParser.cpp" line="150"/> + <source>The tool's binary name is not specified in the config file</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>ETSSettingsWidget</name> <message> @@ -1844,65 +1909,89 @@ p, li { white-space: pre-wrap; } <translation>ÐаÑтройки реÑурÑов</translation> </message> <message> - <location filename="../src/ETSSettingsWidget.ui" line="40"/> <source>You can select path for</source> - <translation>Ð’Ñ‹ можете выбрать путь длÑ</translation> + <translation type="vanished">Ð’Ñ‹ можете выбрать путь длÑ</translation> </message> <message> - <location filename="../src/ETSSettingsWidget.ui" line="47"/> <source>Check lastest version of external tools package</source> - <translation>Проверить наличие новой верÑии пакета внешних инÑтрументов</translation> + <translation type="vanished">Проверить наличие новой верÑии пакета внешних инÑтрументов</translation> </message> <message> - <location filename="../src/ETSSettingsWidget.ui" line="50"/> <source><a href="http://ugene.net/external.html">external tools package</a></source> - <translation><a href="http://ugene.net/external.html">пакет внешних инÑтрументов</a></translation> + <translation type="vanished"><a href="http://ugene.net/external.html">пакет внешних инÑтрументов</a></translation> </message> <message> - <location filename="../src/ETSSettingsWidget.ui" line="70"/> <source>Browse...</source> - <translation>Открыть...</translation> + <translation type="vanished">Открыть...</translation> + </message> + <message> + <location filename="../src/ETSSettingsWidget.ui" line="131"/> + <source>...</source> + <translation type="unfinished">...</translation> </message> <message> - <location filename="../src/ETSSettingsWidget.ui" line="86"/> <source>Supported tools</source> - <translation>Поддерживаемые программы</translation> + <translation type="vanished">Поддерживаемые программы</translation> + </message> + <message> + <location filename="../src/ETSSettingsWidget.ui" line="104"/> + <source>Download link</source> + <translation type="unfinished"></translation> </message> <message> - <location filename="../src/ETSSettingsWidget.ui" line="102"/> + <location filename="../src/ETSSettingsWidget.ui" line="151"/> + <location filename="../src/ETSSettingsWidget.ui" line="226"/> <source>Name</source> <translation>ИмÑ</translation> </message> <message> - <location filename="../src/ETSSettingsWidget.ui" line="107"/> + <location filename="../src/ETSSettingsWidget.ui" line="156"/> + <location filename="../src/ETSSettingsWidget.ui" line="231"/> <source>Path</source> <translation>Путь</translation> </message> <message> - <location filename="../src/ETSSettingsWidget.ui" line="142"/> + <location filename="../src/ETSSettingsWidget.ui" line="267"/> + <source>Import</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/ETSSettingsWidget.ui" line="277"/> + <source>Delete</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/ETSSettingsWidget.ui" line="379"/> + <source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Select an external tool to view more information about it.</p></body></html></source> + <translation type="unfinished"></translation> + </message> + <message> <source>Additional information</source> - <translation>Ð”Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ</translation> + <translation type="vanished">Ð”Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ</translation> </message> <message> - <location filename="../src/ETSSettingsWidget.ui" line="177"/> <source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Select an external tool to view more information about it.</p></body></html></source> - <translation><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <translation type="vanished"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Выберите внешний инÑтрумент, чтобы проÑмотреть дополнительную информацию о нем.</p></body></html></translation> </message> <message> - <location filename="../src/ETSSettingsWidget.ui" line="197"/> + <location filename="../src/ETSSettingsWidget.ui" line="399"/> <source>Binary path:</source> <translation>Путь:</translation> </message> <message> - <location filename="../src/ETSSettingsWidget.ui" line="207"/> + <location filename="../src/ETSSettingsWidget.ui" line="409"/> <source>Version info</source> <translation>Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ верÑии</translation> </message> @@ -2316,22 +2405,22 @@ p, li { white-space: pre-wrap; } <context> <name>IlluminaClipAdditionalSettingsDialog</name> <message> - <location filename="../src/trimmomatic/steps/IlluminaClipAdditionalSettingsDialog.ui" line="14"/> + <location filename="../src/trimmomatic/steps/IlluminaClipAdditionalSettingsDialog.ui" line="32"/> <source>Configure ILLUMINACLIP Optional Settings</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/trimmomatic/steps/IlluminaClipAdditionalSettingsDialog.ui" line="23"/> + <location filename="../src/trimmomatic/steps/IlluminaClipAdditionalSettingsDialog.ui" line="44"/> <source>Provide optional settings</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/trimmomatic/steps/IlluminaClipAdditionalSettingsDialog.ui" line="44"/> + <location filename="../src/trimmomatic/steps/IlluminaClipAdditionalSettingsDialog.ui" line="68"/> <source>Min adapter length</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/trimmomatic/steps/IlluminaClipAdditionalSettingsDialog.ui" line="57"/> + <location filename="../src/trimmomatic/steps/IlluminaClipAdditionalSettingsDialog.ui" line="81"/> <source>Keep both reads</source> <translation type="unfinished"></translation> </message> @@ -2399,6 +2488,24 @@ p, li { white-space: pre-wrap; } <translation type="unfinished"></translation> </message> </context> +<context> + <name>ImportExternalToolDialog</name> + <message> + <location filename="../src/custom_tools/ImportExternalToolDialog.ui" line="14"/> + <source>Import External Tool</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/custom_tools/ImportExternalToolDialog.ui" line="25"/> + <source>External tool config</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/custom_tools/ImportExternalToolDialog.ui" line="40"/> + <source>...</source> + <translation type="unfinished">...</translation> + </message> +</context> <context> <name>IntegralBusPort</name> <message> @@ -2608,9 +2715,13 @@ p, li { white-space: pre-wrap; } <translation>...</translation> </message> <message> - <location filename="../src/hmmer/PhmmerSearchDialog.ui" line="87"/> <source>Reporting tresholds</source> - <translation>ДопуÑтимые результаты</translation> + <translation type="vanished">ДопуÑтимые результаты</translation> + </message> + <message> + <location filename="../src/hmmer/PhmmerSearchDialog.ui" line="87"/> + <source>Reporting thresholds</source> + <translation type="unfinished">ДопуÑтимые результаты</translation> </message> <message> <location filename="../src/hmmer/PhmmerSearchDialog.ui" line="103"/> @@ -2669,17 +2780,17 @@ p, li { white-space: pre-wrap; } </message> <message> <location filename="../src/hmmer/PhmmerSearchDialog.ui" line="338"/> - <source>Viterbi filter treshold</source> + <source>Viterbi filter threshold</source> <translation>Порог фильтрации Viterbi</translation> </message> <message> <location filename="../src/hmmer/PhmmerSearchDialog.ui" line="368"/> - <source>MSV filter treshold</source> + <source>MSV filter threshold</source> <translation>Порог фильтрации MSV</translation> </message> <message> <location filename="../src/hmmer/PhmmerSearchDialog.ui" line="401"/> - <source>Forward filter treshold</source> + <source>Forward filter threshold</source> <translation>Порог фильтрации Forward</translation> </message> <message> @@ -2885,6 +2996,14 @@ Uncheck to get the maximum likelihood estimate.</source> <translation>Опции отображениÑ</translation> </message> </context> +<context> + <name>QCoreApplication</name> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="479"/> + <source><html>Select the type of input for SPAdes. URL(s) to the input files of the selected type(s) should be provided to the corresponding port(s) of the workflow element.<p>At least one library of the following types is required:<ul><li>Illumina paired-end/high-quality mate-pairs/unpaired reads</li><li>IonTorrent paired-end/high-quality mate-pairs/unpaired reads</li><li>PacBio CCS reads (at least 5 reads coverage is recommended)</li></ul></p><p>It is strongly suggested to provide multiple paired-end and mate-pair libraries according to their insert size (from smallest to longest).</p><p>Additionally, one may input Oxford Nanopore reads, Sanger reads, contigs generated by other assembler(s), etc.Note that Illumina and IonTorrent libraries should not be assembled together. All other types of input data are compatible.</p><p>It is also possible to set up reads orientation (forward-reverse (fr), reverse-forward (rf), forward-forward (ff)) and specify whether paired reads are separate or interlaced.</p><p>Illumina, IonTorrent or PacBio CCS reads should be provided in FASTQ format.<br>Illumina or PacBio read may also be provided in FASTA format. Error correction should be skipped in this case (see the "Running mode" parameter).<br>Sanger, Oxford Nanopore and PacBio CLR reads can be provided in both formats since SPAdes does not run error correction for these types of data.</p></html></source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>QObject</name> <message> @@ -2963,55 +3082,58 @@ Uncheck to get the maximum likelihood estimate.</source> <translation>извлекает поÑледовательноÑти транÑкриптов из геномных поÑледовательноÑтей при помощи gffread.</translation> </message> <message> - <location filename="../src/ExternalToolSupportSettingsController.cpp" line="72"/> + <location filename="../src/ExternalToolSupportSettingsController.cpp" line="79"/> <source>Installed</source> <translation>УÑтановлено</translation> </message> <message> - <location filename="../src/ExternalToolSupportSettingsController.cpp" line="73"/> + <location filename="../src/ExternalToolSupportSettingsController.cpp" line="80"/> <source>Not installed</source> <translation>Ðе уÑтановлено</translation> </message> + <message> + <location filename="../src/ExternalToolSupportSettingsController.cpp" line="81"/> + <source><html><head/><body><p>Download <a href="http://ugene.net/download-all_html#en_data_analysis_tools"><span style=" text-decoration: underline; color:#1866af;">tools executables</span></a> and configure the tools paths. </p></body></html></source> + <translation><html><head/><body><p>Скачать <a href="http://ugene.net/ru/download-all_html#ru_data_analysis_tools"><span style=" text-decoration: underline; color:#1866af;">инÑтрументы</span></a> и Ñконфигурировать пути до файлов. </p></body></html></translation> + </message> <message> <location filename="../src/RnaSeqCommon.cpp" line="62"/> <source>Unexpected value '%1' of the library type</source> <translation>Unexpected value '%1' of the library type</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="816"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="821"/> <source>%1 tool's version is undefined, this may cause some compatibility issues</source> <translation>%1 верÑÐ¸Ñ Ð¸Ð½Ñтрумента не определена, Ñто может вызвать некоторые проблемы ÑовмеÑтимоÑти</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="825"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="830"/> <source>Bowtie and TopHat tools have incompatible versions. Your TopHat's version is %1, Bowtie's one is %2. The following are considered to be compatible: Bowtie < "0.12.9" and TopHat <= "2.0.8" or Bowtie >= "0.12.9" and TopHat >= "2.0.8.b"</source> <translation>Bowtie и TopHat инÑтрументы имеют неÑовмеÑтимые верÑии. ВерÑÐ¸Ñ TopHat %1, верÑÐ¸Ñ Bowtie %2. Ð”Ð»Ñ ÑовмеÑтимоÑти необходимо: Bowtie < "0.12.9" and TopHat <= "2.0.8" or Bowtie >= "0.12.9" and TopHat >= "2.0.8.b"</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="861"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="866"/> <source>At least two samples are required</source> <translation>Ðеобходимо как минимум два примера</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="868"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="873"/> <source>Duplicate sample name: </source> <translation>ПовторÑющееÑÑ Ð¸Ð¼Ñ Ð¿Ñ€Ð¸Ð¼ÐµÑ€Ð°: </translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="873"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="878"/> <source>No datasets in the sample: </source> <translation>Ð’ примере нет данных: </translation> </message> <message> - <location filename="../src/bwa/BwaSettingsWidget.cpp" line="40"/> <source>NOTE: "is" index algorithm is not supposed to work with reference sequences having size larger than 2 GB. In order to achieve stable BWA performance it is strongly recommend to set the index algorithm to "bwtsw"</source> - <translation>NOTE: "is" алгоритм не поддерживаетÑÑ Ð´Ð»Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ Ñ Ñ€ÐµÐ²ÐµÑ€ÐµÐ½Ñными поÑледовательноÑÑ‚Ñми, размер которых превышает 2 GB. Ð’ таком Ñлучае рекомендуетÑÑ Ð²Ñ‹Ð±Ñ€Ð°Ñ‚ÑŒ алгоритм "bwtsw"</translation> + <translation type="vanished">NOTE: "is" алгоритм не поддерживаетÑÑ Ð´Ð»Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ Ñ Ñ€ÐµÐ²ÐµÑ€ÐµÐ½Ñными поÑледовательноÑÑ‚Ñми, размер которых превышает 2 GB. Ð’ таком Ñлучае рекомендуетÑÑ Ð²Ñ‹Ð±Ñ€Ð°Ñ‚ÑŒ алгоритм "bwtsw"</translation> </message> <message> - <location filename="../src/bwa/BwaSettingsWidget.cpp" line="44"/> <source>NOTE: "bwtsw" index algorithm is not supposed to work with reference sequences having size smaller than 10 MB. In order to achieve stable BWA performance it is strongly recommend to set the index algorithm to "is"</source> - <translation>NOTE: "bwtsw" алгоритм не поддерживаетÑÑ Ð´Ð»Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ Ñ Ñ€ÐµÑ„ÐµÑ€ÐµÑными поÑледовательноÑÑ‚Ñми, размер которых меньше 10 MB. Ð’ таком Ñлучае рекомендуетÑÑ Ð¸Ð·Ð¼ÐµÐ½Ð¸Ñ‚ÑŒ алгоритм на "is"</translation> + <translation type="vanished">NOTE: "bwtsw" алгоритм не поддерживаетÑÑ Ð´Ð»Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹ Ñ Ñ€ÐµÑ„ÐµÑ€ÐµÑными поÑледовательноÑÑ‚Ñми, размер которых меньше 10 MB. Ð’ таком Ñлучае рекомендуетÑÑ Ð¸Ð·Ð¼ÐµÐ½Ð¸Ñ‚ÑŒ алгоритм на "is"</translation> </message> <message> <source>NOTE: "bwtsw" index algorithm is not supposed to work with reference sequences having size smaller than 10 MB. In order to achieve stable BWA performance it is strongly recommend to set the index algorithm to "is"</source> @@ -3028,25 +3150,15 @@ In order to achieve stable BWA performance it is strongly recommend to set the i <translation>Ð˜Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°</translation> </message> <message> - <location filename="../src/trimmomatic/TrimmomaticDelegate.cpp" line="161"/> + <location filename="../src/trimmomatic/TrimmomaticDelegate.cpp" line="164"/> <source><html><head></head><body><p>Click the "Add new step" button and select a step. The following options are available:</p><ul><li>ILLUMINACLIP: Cut adapter and other illumina-specific sequences from the read.</li><li>SLIDINGWINDOW: Perform a sliding window trimming, cutting once the average quality within the window falls below a threshold.</li><li>LEADING: Cut bases off the start of a read, if below a threshold quality.</li><li>TRAILING: Cut bases off the end of a read, if below a threshold quality.</li><li>CROP: Cut the read to a specified length.</li><li>HEADCROP: Cut the specified number of bases from the start of the read.</li><li>MINLEN: Drop the read if it is below a specified length.</li><li>AVGQUAL: Drop the read if the average quality is below the specified level.</li><li>TOPHRED33: Convert quality scores to Phred-33.</li><li>TOPHRED64: Convert quality scores to Phred-64.</li></ul></body></html></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/trimmomatic/TrimmomaticDelegate.cpp" line="176"/> + <location filename="../src/trimmomatic/TrimmomaticDelegate.cpp" line="179"/> <source>Add a step.</source> <translation type="unfinished"></translation> </message> - <message> - <location filename="../src/trimmomatic/TrimmomaticWorkerFactory.cpp" line="73"/> - <source>SE reads</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../src/trimmomatic/TrimmomaticWorkerFactory.cpp" line="74"/> - <source>PE reads</source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>QualitySettingsWidget</name> @@ -3104,6 +3216,156 @@ In order to achieve stable BWA performance it is strongly recommend to set the i <translation>ПоиÑк...</translation> </message> </context> +<context> + <name>SpadesDelegate</name> + <message> + <location filename="../src/spades/SpadesDelegate.cpp" line="42"/> + <source>Configure input type</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>SpadesInputData</name> + <message> + <location filename="../src/spades/SpadesInputData.ui" line="14"/> + <source>Configure SPAdes Input Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesInputData.ui" line="32"/> + <source>Required input (at least one)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesInputData.ui" line="53"/> + <location filename="../src/spades/SpadesInputData.ui" line="337"/> + <source>Illumina/Ion Torrent reads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesInputData.ui" line="97"/> + <source>Sequencing platform</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesInputData.ui" line="105"/> + <source>Illumina</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesInputData.ui" line="110"/> + <source>Ion Torrent</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesInputData.ui" line="141"/> + <source>Paired-end reads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesInputData.ui" line="157"/> + <location filename="../src/spades/SpadesInputData.ui" line="214"/> + <location filename="../src/spades/SpadesInputData.ui" line="379"/> + <source>fr</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesInputData.ui" line="162"/> + <location filename="../src/spades/SpadesInputData.ui" line="219"/> + <location filename="../src/spades/SpadesInputData.ui" line="384"/> + <source>rf</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesInputData.ui" line="167"/> + <location filename="../src/spades/SpadesInputData.ui" line="224"/> + <location filename="../src/spades/SpadesInputData.ui" line="389"/> + <source>ff</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesInputData.ui" line="179"/> + <location filename="../src/spades/SpadesInputData.ui" line="236"/> + <location filename="../src/spades/SpadesInputData.ui" line="401"/> + <source>Separate reads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesInputData.ui" line="184"/> + <location filename="../src/spades/SpadesInputData.ui" line="241"/> + <location filename="../src/spades/SpadesInputData.ui" line="406"/> + <source>Interlaced reads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesInputData.ui" line="198"/> + <source>High-quality mate-pairs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesInputData.ui" line="263"/> + <source>Unpaired reads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesInputData.ui" line="288"/> + <source>PacBio CCS reads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesInputData.ui" line="316"/> + <source>Additional input</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesInputData.ui" line="363"/> + <source>Mate-pairs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesInputData.ui" line="438"/> + <source>PacBio CLR reads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesInputData.ui" line="445"/> + <source>Oxford Nanopore reads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesInputData.ui" line="452"/> + <source>Sanger reads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesInputData.ui" line="459"/> + <source>Trusted contigs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesInputData.ui" line="466"/> + <source>Untrusted contigs</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>SpadesPropertyDialog</name> + <message> + <location filename="../src/spades/SpadesDelegate.cpp" line="153"/> + <source>At least one of the required input ports should be set in the "Input data" parameter.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesDelegate.cpp" line="169"/> + <location filename="../src/spades/SpadesDelegate.cpp" line="177"/> + <location filename="../src/spades/SpadesDelegate.cpp" line="199"/> + <location filename="../src/spades/SpadesDelegate.cpp" line="229"/> + <location filename="../src/spades/SpadesDelegate.cpp" line="312"/> + <location filename="../src/spades/SpadesDelegate.cpp" line="316"/> + <source>Incorrect parameters, can't parse</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>SpadesSettings</name> <message> @@ -3177,6 +3439,107 @@ In order to achieve stable BWA performance it is strongly recommend to set the i <translation>чиÑло потоков (-t)</translation> </message> </context> +<context> + <name>SpadesWorkerFactory</name> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="131"/> + <source>unpaired reads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="133"/> + <source>PacBio CCS reads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="135"/> + <source>PacBio CLR reads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="137"/> + <source>Oxford Nanopore reads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="139"/> + <source>Sanger reads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="141"/> + <source>trusted contigs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="143"/> + <source>untrusted contigs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="145"/> + <source>paired-end reads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="147"/> + <source>mate-pairs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="149"/> + <source>high-quality mate-pairs</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>StringtieGeneAbundanceReportWorkerFactory</name> + <message> + <location filename="../src/stringtie/StringtieGeneAbundanceReportWorkerFactory.cpp" line="60"/> + <source>Input URL url</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/stringtie/StringtieGeneAbundanceReportWorkerFactory.cpp" line="61"/> + <source>Input URL.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/stringtie/StringtieGeneAbundanceReportWorkerFactory.cpp" line="67"/> + <source>Input StringTie gene abundance file(s) url</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/stringtie/StringtieGeneAbundanceReportWorkerFactory.cpp" line="68"/> + <source>URL(s) to sorted gene abundance file(s), produced by StringTie.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/stringtie/StringtieGeneAbundanceReportWorkerFactory.cpp" line="79"/> + <source>Output file</source> + <translation type="unfinished">Выходной файл</translation> + </message> + <message> + <location filename="../src/stringtie/StringtieGeneAbundanceReportWorkerFactory.cpp" line="80"/> + <source>Specify the name of the output tab-delimited text file.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/stringtie/StringtieGeneAbundanceReportWorkerFactory.cpp" line="89"/> + <source>Auto</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/stringtie/StringtieGeneAbundanceReportWorkerFactory.cpp" line="99"/> + <source>StringTie Gene Abundance Report</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/stringtie/StringtieGeneAbundanceReportWorkerFactory.cpp" line="100"/> + <source>The element summarizes gene abundance output of StringTie and saves the result into a common tab-delimited text file. The first two columns of the file are "Gene ID" and "Gene name". Each other column contains "FPKM" values for the genes from an input gene abundance file.<br><br>Provide URL(s) to the StringTie gene abundance file(s) to the input port of the element.</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>TCoffeeSupportRunDialog</name> <message> @@ -3412,37 +3775,37 @@ In order to achieve stable BWA performance it is strongly recommend to set the i <translation type="unfinished"></translation> </message> <message> - <location filename="../src/trimmomatic/TrimmomaticPropertyDialog.ui" line="35"/> + <location filename="../src/trimmomatic/TrimmomaticPropertyDialog.ui" line="38"/> <source>Steps</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/trimmomatic/TrimmomaticPropertyDialog.ui" line="67"/> + <location filename="../src/trimmomatic/TrimmomaticPropertyDialog.ui" line="98"/> <source><html><head/><body><p>Add new step</p></body></html></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/trimmomatic/TrimmomaticPropertyDialog.ui" line="112"/> + <location filename="../src/trimmomatic/TrimmomaticPropertyDialog.ui" line="158"/> <source><html><head/><body><p>Move selected step above</p></body></html></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/trimmomatic/TrimmomaticPropertyDialog.ui" line="160"/> + <location filename="../src/trimmomatic/TrimmomaticPropertyDialog.ui" line="218"/> <source><html><head/><body><p>Move selected step below</p></body></html></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/trimmomatic/TrimmomaticPropertyDialog.ui" line="205"/> + <location filename="../src/trimmomatic/TrimmomaticPropertyDialog.ui" line="275"/> <source><html><head/><body><p>Remove selected step</p></body></html></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/trimmomatic/TrimmomaticPropertyDialog.ui" line="236"/> + <location filename="../src/trimmomatic/TrimmomaticPropertyDialog.ui" line="309"/> <source>Step settings</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/trimmomatic/TrimmomaticPropertyDialog.ui" line="306"/> + <location filename="../src/trimmomatic/TrimmomaticPropertyDialog.ui" line="393"/> <source>Description</source> <translation type="unfinished"></translation> </message> @@ -3471,8 +3834,13 @@ In order to achieve stable BWA performance it is strongly recommend to set the i <translation><u>ПрочтениÑ, отфильтрованные по качеÑтву (%1):</u></translation> </message> <message> - <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="218"/> - <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="221"/> + <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="201"/> + <source>Failed to create output folder: %1.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="229"/> + <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="232"/> <source>wrong output format</source> <translation>wrong output format</translation> </message> @@ -3484,75 +3852,75 @@ In order to achieve stable BWA performance it is strongly recommend to set the i <translation type="obsolete">ВыровнÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="252"/> + <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="263"/> <source>Map</source> <translation>ВыровнÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="253"/> + <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="264"/> <source>Cancel</source> <translation>Отмена</translation> </message> <message> - <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="259"/> + <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="270"/> <source>File name</source> <translation>Ð˜Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°</translation> </message> <message> - <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="260"/> + <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="271"/> <source>Sequence name from file</source> <translation>Ð˜Ð¼Ñ Ð¿Ð¾ÑледовательноÑти в файле</translation> </message> <message> - <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="278"/> + <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="289"/> <source>Select Output File...</source> <translation>Укажите выходной файл...</translation> </message> <message> - <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="291"/> - <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="298"/> - <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="317"/> - <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="340"/> + <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="302"/> + <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="309"/> + <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="328"/> + <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="350"/> <source>Error</source> <translation>Ошибка</translation> </message> <message> - <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="292"/> + <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="303"/> <source>Reference sequence is not set.</source> <translation>РеференÑÐ½Ð°Ñ Ð¿Ð¾ÑледовательноÑÑ‚ÑŒ не задана.</translation> </message> <message> - <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="299"/> + <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="310"/> <source>No reads provided.</source> <translation>Риды не заданы.</translation> </message> <message> - <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="318"/> + <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="328"/> <source>Output file is not set.</source> <translation>Выходной файл не указан.</translation> </message> <message> - <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="329"/> + <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="339"/> <source>Overwrite the file?</source> <translation>ПерепиÑать Ñтот файл?</translation> </message> <message> - <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="330"/> + <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="340"/> <source>The result file already exists. Would you like to overwrite it?</source> <translation>Такой файл уже ÑущеÑтвует. ПерепиÑать его?</translation> </message> <message> - <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="340"/> + <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="350"/> <source>Unable to delete the file.</source> <translation>Ðевозможно удалить Ñтот файл.</translation> </message> <message> - <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="352"/> + <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="362"/> <source>Open Reference Sequence</source> <translation>Выбрать референÑную поÑледовательноÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="363"/> + <location filename="../src/blast_plus/AlignToReferenceBlastDialog.cpp" line="373"/> <source>Select File(s) with Read(s)</source> <translation>Выбрать прочтениÑ</translation> </message> @@ -3560,23 +3928,23 @@ In order to achieve stable BWA performance it is strongly recommend to set the i <context> <name>U2::BedtoolsIntersectAnnotationsByEntityTask</name> <message> - <location filename="../src/bedtools/BedtoolsIntersectTask.cpp" line="114"/> + <location filename="../src/bedtools/BedtoolsIntersectTask.cpp" line="115"/> <source>Intersect annotations task</source> <translation>Intersect annotations task</translation> </message> <message> - <location filename="../src/bedtools/BedtoolsIntersectTask.cpp" line="173"/> - <location filename="../src/bedtools/BedtoolsIntersectTask.cpp" line="193"/> + <location filename="../src/bedtools/BedtoolsIntersectTask.cpp" line="175"/> + <location filename="../src/bedtools/BedtoolsIntersectTask.cpp" line="195"/> <source>Failed to get IOAdapterFactory</source> <translation>Failed to get IOAdapterFactory</translation> </message> <message> - <location filename="../src/bedtools/BedtoolsIntersectTask.cpp" line="180"/> + <location filename="../src/bedtools/BedtoolsIntersectTask.cpp" line="182"/> <source>Result document is NULL</source> <translation>Result document is NULL</translation> </message> <message> - <location filename="../src/bedtools/BedtoolsIntersectTask.cpp" line="190"/> + <location filename="../src/bedtools/BedtoolsIntersectTask.cpp" line="192"/> <source>Failed to get BED format</source> <translation>Failed to get BED format</translation> </message> @@ -3660,17 +4028,17 @@ In order to achieve stable BWA performance it is strongly recommend to set the i <context> <name>U2::BlastAllSupportMultiTask</name> <message> - <location filename="../src/blast/BlastAllSupportTask.cpp" line="660"/> + <location filename="../src/blast/BlastAllSupportTask.cpp" line="674"/> <source>Source file</source> <translation>ИÑходный файл</translation> </message> <message> - <location filename="../src/blast/BlastAllSupportTask.cpp" line="661"/> - <source>Used databse</source> + <location filename="../src/blast/BlastAllSupportTask.cpp" line="675"/> + <source>Used database</source> <translation>ИÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÐµÐ¼Ð°Ñ Ð±Ð°Ð·Ð° данных</translation> </message> <message> - <location filename="../src/blast/BlastAllSupportTask.cpp" line="663"/> + <location filename="../src/blast/BlastAllSupportTask.cpp" line="677"/> <source>No any results found</source> <translation>Результатов не найдено</translation> </message> @@ -3798,27 +4166,36 @@ In order to achieve stable BWA performance it is strongly recommend to set the i <translation>Can't get Hsp_query-to element</translation> </message> <message> - <location filename="../src/blast/BlastAllSupportTask.cpp" line="488"/> + <location filename="../src/blast/BlastAllSupportTask.cpp" line="494"/> + <source>Unknown strand source setting</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/blast/BlastAllSupportTask.cpp" line="501"/> + <source>Can't get location. %1[%2]</source> + <translation type="unfinished"></translation> + </message> + <message> <source>Can't get location. Hsp_query-frame[%1]</source> - <translation>Can't get location. Hsp_query-frame[%1]</translation> + <translation type="vanished">Can't get location. Hsp_query-frame[%1]</translation> </message> <message> - <location filename="../src/blast/BlastAllSupportTask.cpp" line="498"/> + <location filename="../src/blast/BlastAllSupportTask.cpp" line="512"/> <source>Can't get identity</source> <translation>Can't get identity</translation> </message> <message> - <location filename="../src/blast/BlastAllSupportTask.cpp" line="506"/> + <location filename="../src/blast/BlastAllSupportTask.cpp" line="520"/> <source>Can't get gaps</source> <translation>Can't get gaps</translation> </message> <message> - <location filename="../src/blast/BlastAllSupportTask.cpp" line="514"/> + <location filename="../src/blast/BlastAllSupportTask.cpp" line="528"/> <source>Can't get align length</source> <translation>Can't get align length</translation> </message> <message> - <location filename="../src/blast/BlastAllSupportTask.cpp" line="527"/> + <location filename="../src/blast/BlastAllSupportTask.cpp" line="541"/> <source>Can't evaluate location</source> <translation>Can't evaluate location</translation> </message> @@ -3994,7 +4371,6 @@ In order to achieve stable BWA performance it is strongly recommend to set the i <location filename="../src/blast_plus/BlastPlusSupportCommonTask.cpp" line="266"/> <location filename="../src/blast_plus/BlastPlusSupportCommonTask.cpp" line="421"/> <location filename="../src/blast_plus/BlastPlusSupportCommonTask.cpp" line="428"/> - <location filename="../src/blast_plus/BlastPlusSupportCommonTask.cpp" line="445"/> <source>Can't get location</source> <translation>Can't get location</translation> </message> @@ -4016,19 +4392,19 @@ In order to achieve stable BWA performance it is strongly recommend to set the i </message> <message> <location filename="../src/blast_plus/BlastPlusSupportCommonTask.cpp" line="319"/> - <location filename="../src/blast_plus/BlastPlusSupportCommonTask.cpp" line="471"/> + <location filename="../src/blast_plus/BlastPlusSupportCommonTask.cpp" line="484"/> <source>Can't get align length</source> <translation>Can't get align length</translation> </message> <message> <location filename="../src/blast_plus/BlastPlusSupportCommonTask.cpp" line="324"/> - <location filename="../src/blast_plus/BlastPlusSupportCommonTask.cpp" line="463"/> + <location filename="../src/blast_plus/BlastPlusSupportCommonTask.cpp" line="476"/> <source>Can't get gaps</source> <translation>Can't get gaps</translation> </message> <message> <location filename="../src/blast_plus/BlastPlusSupportCommonTask.cpp" line="329"/> - <location filename="../src/blast_plus/BlastPlusSupportCommonTask.cpp" line="455"/> + <location filename="../src/blast_plus/BlastPlusSupportCommonTask.cpp" line="468"/> <source>Can't get identity</source> <translation>Can't get identity</translation> </message> @@ -4042,6 +4418,16 @@ In order to achieve stable BWA performance it is strongly recommend to set the i <source>Can't read output file</source> <translation>Can't read output file</translation> </message> + <message> + <location filename="../src/blast_plus/BlastPlusSupportCommonTask.cpp" line="451"/> + <source>Unknown strand source setting</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/blast_plus/BlastPlusSupportCommonTask.cpp" line="457"/> + <source>Can't get location. %1[%2]</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>U2::BlastPlusSupportContext</name> @@ -4090,17 +4476,17 @@ In order to achieve stable BWA performance it is strongly recommend to set the i <context> <name>U2::BlastPlusSupportMultiTask</name> <message> - <location filename="../src/blast_plus/BlastPlusSupportCommonTask.cpp" line="625"/> + <location filename="../src/blast_plus/BlastPlusSupportCommonTask.cpp" line="638"/> <source>Source file</source> <translation>ИÑходный файл</translation> </message> <message> - <location filename="../src/blast_plus/BlastPlusSupportCommonTask.cpp" line="626"/> - <source>Used databse</source> + <location filename="../src/blast_plus/BlastPlusSupportCommonTask.cpp" line="639"/> + <source>Used database</source> <translation>ИÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÐµÐ¼Ð°Ñ Ð±Ð°Ð·Ð° данных</translation> </message> <message> - <location filename="../src/blast_plus/BlastPlusSupportCommonTask.cpp" line="628"/> + <location filename="../src/blast_plus/BlastPlusSupportCommonTask.cpp" line="641"/> <source>No any results found</source> <translation>Результатов не найдено</translation> </message> @@ -4259,17 +4645,17 @@ In order to achieve stable BWA performance it is strongly recommend to set the i <context> <name>U2::Bowtie2Support</name> <message> - <location filename="../src/bowtie2/Bowtie2Support.cpp" line="54"/> + <location filename="../src/bowtie2/Bowtie2Support.cpp" line="50"/> <source><i>Bowtie 2 aligner</i> takes a Bowtie 2 index and a set of sequencing read files and outputs a set of alignments.</source> <translation><i>Выравнивание при помощи Bowtie 2 </i> принимает индекÑный файл и набор ридов, в качеÑтве результата работы выдает выравнивание.</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Support.cpp" line="70"/> + <location filename="../src/bowtie2/Bowtie2Support.cpp" line="57"/> <source><i>Bowtie 2 build indexer</i> builds a Bowtie index from a set of DNA sequences. It outputs a set of 6 files with suffixes .1.bt2, .2.bt2, .3.bt2, .4.bt2, .rev.1.bt2, and .rev.2.bt2. These files together constitute the index: they are all that is needed to align reads to that reference. The original sequence files are no longer used by <i>Bowtie 2</i> once the index is built.</source> <translation><i>ПоÑтроение индекÑа при помощи Bowtie 2</i> Ñтроит Ð¸Ð½Ð´ÐµÐºÑ Ð¸Ð· набора ДÐК поÑледовательноÑтей. Результатом работы ÑвлÑÑŽÑ‚ÑÑ 6 файлов Ñ ÑуффикÑами .1.bt2, .2.bt2, .3.bt2, .4.bt2, .rev.1.bt2, и .rev.2.bt2. Ðти файлы вмеÑте образуют индекÑ: они вÑе необходимы Ð´Ð»Ñ Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ Ñ€Ð¸Ð´Ð¾Ð² на референÑную поÑледовательноÑÑ‚ÑŒ.</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Support.cpp" line="91"/> + <location filename="../src/bowtie2/Bowtie2Support.cpp" line="69"/> <source><i>Bowtie 2 index inspector</i> extracts information from a Bowtie index about what kind of index it is and what reference sequence were used to build it.</source> <translation><i>Проверка индекÑа, поÑтроенного Bowtie 2</i> извлекает информацию из индекÑа о его типе и ÐºÐ°ÐºÐ°Ñ Ñ€ÐµÑ„ÐµÑ€ÐµÐ½ÑÐ½Ð°Ñ Ð¿Ð¾ÑледовательноÑÑ‚ÑŒ была иÑпользована Ð´Ð»Ñ ÐµÐ³Ð¾ поÑтроениÑ.</translation> </message> @@ -4370,7 +4756,7 @@ In order to achieve stable BWA performance it is strongly recommend to set the i <context> <name>U2::BwaMemSettingsWidget</name> <message> - <location filename="../src/bwa/BwaSettingsWidget.cpp" line="298"/> + <location filename="../src/bwa/BwaSettingsWidget.cpp" line="295"/> <source>NOTE: bwa mem accepts reads only in FASTA or FASTQ format. Reads should be compiled into a single file for each mate end.</source> <translation>NOTE: bwa mem принимает риды только в формате FASTA или FASTQ формате.</translation> </message> @@ -4399,7 +4785,7 @@ In order to achieve stable BWA performance it is strongly recommend to set the i <context> <name>U2::BwaSwSettingsWidget</name> <message> - <location filename="../src/bwa/BwaSettingsWidget.cpp" line="230"/> + <location filename="../src/bwa/BwaSettingsWidget.cpp" line="227"/> <source>NOTE: bwa-sw performs alignment of long sequencing reads (Sanger or 454). It accepts reads only in FASTA or FASTQ format. Reads should be compiled into single file.</source> <translation>NOTE: bwa-sw выравнивает длинные риды. Принимает риды только в формате FASTA или FASTQ формате.</translation> </message> @@ -4407,12 +4793,12 @@ In order to achieve stable BWA performance it is strongly recommend to set the i <context> <name>U2::BwaTask</name> <message> - <location filename="../src/bwa/BwaTask.cpp" line="636"/> + <location filename="../src/bwa/BwaTask.cpp" line="639"/> <source>Multiple read files are not supported by bwa-sw. Please combine your reads into single FASTA file.</source> <translation>Multiple read files are not supported by bwa-sw. Please combine your reads into single FASTA file.</translation> </message> <message> - <location filename="../src/bwa/BwaTask.cpp" line="643"/> + <location filename="../src/bwa/BwaTask.cpp" line="647"/> <source>Please, provide same number of files with downstream and upstream reads.</source> <translation>Укажите одинаковое количеÑтво файлов Ñ Ð¿Ð°Ñ€Ð½Ñ‹Ð¼Ð¸ ридами.</translation> </message> @@ -4428,9 +4814,13 @@ In order to achieve stable BWA performance it is strongly recommend to set the i <context> <name>U2::CAP3Support</name> <message> - <location filename="../src/cap3/CAP3Support.cpp" line="65"/> <source><i>CAP3</i> is a contig assembly program. <br>It allows to assembly long DNA reads (up to 1000 bp). <br>Binaries can be downloaded from http://seq.cs.iastate.edu/cap3.html</source> - <translation><i>CAP3</i>Ñто программа Ð´Ð»Ñ Ñборки контигов. <br>Она позволÑет Ñобирать длинные ДÐК риды (более 1000 нуклеотидов). <br>Бинарный пакет может быть Ñкачан отÑюда http://seq.cs.iastate.edu/cap3.html</translation> + <translation type="vanished"><i>CAP3</i>Ñто программа Ð´Ð»Ñ Ñборки контигов. <br>Она позволÑет Ñобирать длинные ДÐК риды (более 1000 нуклеотидов). <br>Бинарный пакет может быть Ñкачан отÑюда http://seq.cs.iastate.edu/cap3.html</translation> + </message> + <message> + <location filename="../src/cap3/CAP3Support.cpp" line="65"/> + <source><i>CAP3</i> is a contig assembly program. <br>It allows one to assembly long DNA reads (up to 1000 bp). <br>Binaries can be downloaded from http://seq.cs.iastate.edu/cap3.html</source> + <translation type="unfinished"></translation> </message> <message> <location filename="../src/cap3/CAP3Support.cpp" line="68"/> @@ -5087,32 +5477,32 @@ To save under other name press 'Cancel' and change name in 'Resul <context> <name>U2::ExternalToolJustValidateTask</name> <message> - <location filename="../src/utils/ExternalToolValidateTask.cpp" line="52"/> + <location filename="../src/utils/ExternalToolValidateTask.cpp" line="53"/> <source>Tool's path is empty</source> <translation>Tool's path is empty</translation> </message> <message> - <location filename="../src/utils/ExternalToolValidateTask.cpp" line="67"/> + <location filename="../src/utils/ExternalToolValidateTask.cpp" line="68"/> <source>Tool's executable isn't exists</source> <translation>Tool's executable isn't exists</translation> </message> <message> - <location filename="../src/utils/ExternalToolValidateTask.cpp" line="75"/> + <location filename="../src/utils/ExternalToolValidateTask.cpp" line="76"/> <source>Scripting tool registry is NULL</source> <translation>Scripting tool registry is NULL</translation> </message> <message> - <location filename="../src/utils/ExternalToolValidateTask.cpp" line="77"/> + <location filename="../src/utils/ExternalToolValidateTask.cpp" line="78"/> <source>Scripting tool '%1' isn't found in the registry</source> <translation>Scripting tool '%1' isn't found in the registry</translation> </message> <message> - <location filename="../src/utils/ExternalToolValidateTask.cpp" line="126"/> + <location filename="../src/utils/ExternalToolValidateTask.cpp" line="127"/> <source>Tool does not start.<br>It is possible that the specified executable file <i>%1</i> for %2 tool is invalid. You can change the path to the executable file in the external tool settings in the global preferences.</source> <translation>Tool does not start.<br>It is possible that the specified executable file <i>%1</i> for %2 tool is invalid. You can change the path to the executable file in the external tool settings in the global preferences.</translation> </message> <message> - <location filename="../src/utils/ExternalToolValidateTask.cpp" line="159"/> + <location filename="../src/utils/ExternalToolValidateTask.cpp" line="158"/> <source>Can not find expected message.<br>It is possible that the specified executable file <i>%1</i> for %2 tool is invalid. You can change the path to the executable file in the external tool settings in the global preferences.</source> <translation>Can not find expected message.<br>It is possible that the specified executable file <i>%1</i> for %2 tool is invalid. You can change the path to the executable file in the external tool settings in the global preferences.</translation> </message> @@ -5120,7 +5510,7 @@ To save under other name press 'Cancel' and change name in 'Resul <context> <name>U2::ExternalToolSearchAndValidateTask</name> <message> - <location filename="../src/utils/ExternalToolValidateTask.cpp" line="352"/> + <location filename="../src/utils/ExternalToolValidateTask.cpp" line="363"/> <source>Can not find expected message.<br>It is possible that the specified executable file <i>%1</i> for %2 tool is invalid. You can change the path to the executable file in the external tool settings in the global preferences.</source> <translation>Can not find expected message.<br>It is possible that the specified executable file <i>%1</i> for %2 tool is invalid. You can change the path to the executable file in the external tool settings in the global preferences.</translation> </message> @@ -5162,98 +5552,98 @@ To save under other name press 'Cancel' and change name in 'Resul <context> <name>U2::ExternalToolSupportPlugin</name> <message> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="171"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="174"/> <source>Search tools in PATH</source> <translation>Search tools in PATH</translation> </message> <message> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="218"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="221"/> <source>External tool support</source> <translation>Поддержка внешних инÑтрументов</translation> </message> <message> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="218"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="221"/> <source>Runs other external tools</source> <translation>Модуль позволÑет иÑпользовать внешние программы</translation> </message> <message> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="284"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="288"/> <source>Align with ClustalW...</source> <translation>Выравнивание Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ ClustalW...</translation> </message> <message> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="292"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="296"/> <source>Align with ClustalO...</source> <translation>Выравнивание Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ ClustalO...</translation> </message> <message> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="300"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="304"/> <source>Align with MAFFT...</source> <translation>Выравнивание Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ MAFFT...</translation> </message> <message> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="308"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="312"/> <source>Align with T-Coffee...</source> <translation>Выравнивание Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ T-Coffee...</translation> </message> <message> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="466"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="470"/> <source>The <i>Basic Local Alignment Search Tool</i> (BLAST) finds regions of local similarity between sequences. The program compares nucleotide or protein sequences to sequence databases and calculates the statistical significance of matches. BLAST can be used to infer functional and evolutionary relationships between sequences as well as help identify members of gene families.</source> <translation type="unfinished">The <i>Basic Local Alignment Search Tool</i> (BLAST) ищет регионы локального ÑходÑтва между поÑледовательноÑÑ‚Ñми. Программа Ñравнивает нуклеотидные или белковые поÑледовательноÑти в базах данных поÑледовательноÑтей и вычиÑлÑет ÑтатиÑтичеÑкую значимоÑÑ‚ÑŒ Ñовпадений. BLAST может иÑпользоватьÑÑ Ð´Ð»Ñ Ð²Ñ‹ÑÐ²Ð»ÐµÐ½Ð¸Ñ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ð¾Ð½Ð°Ð»ÑŒÐ½Ñ‹Ñ… и Ñволюционных взаимоÑвÑзей между поÑледовательноÑÑ‚Ñми, а также Ð´Ð»Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ Ñ‡Ð»ÐµÐ½Ð¾Ð² ÑемейÑтв гена.</translation> </message> <message> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="470"/> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="472"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="474"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="476"/> <source><i>BLAST+</i> is a new version of the BLAST package from the NCBI.</source> <translation type="unfinished"><i>BLAST+</i> Ñто Ð½Ð¾Ð²Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ Ð¿Ð°ÐºÐµÑ‚Ð° BLAST от NCBI.</translation> </message> <message> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="474"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="478"/> <source><i>Bowtie<i> is an ultrafast, memory-efficient short read aligner. It aligns short DNA sequences (reads) to the human genome at a rate of over 25 million 35-bp reads per hour. Bowtie indexes the genome with a Burrows-Wheeler index to keep its memory footprint small: typically about 2.2 GB for the human genome (2.9 GB for paired-end). <a href='http://qt-project.org/doc/qt-4.8/qtextbrowser.html#anchorClicked'>Link text</a> </source> <translation type="unfinished"><i>Bowtie<i>один из Ñамых быÑтрых и Ñффективных инÑтрументов Ð´Ð»Ñ Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ… ÑÐµÐºÐ²ÐµÐ½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð½Ð° референÑную поÑледовательноÑÑ‚ÑŒ. Так, например, он ÑпоÑобен выравнивать короткие (35 нукл.) поÑледовательноÑти ДÐК на геном человека Ñо ÑкороÑтью более 25 миллионов поÑледовательноÑтей / чаÑ. <a href='http://qt-project.org/doc/qt-4.8/qtextbrowser.html#anchorClicked'>Link text</a></translation> </message> <message> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="481"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="485"/> <source><i>Cufflinks</i> assembles transcripts, estimates their abundances, and tests for differential expression and regulation in RNA-Seq samples. It accepts aligned RNA-Seq reads and assembles the alignments into a parsimonious set of transcripts. It also estimates the relative abundances of these transcripts based on how many reads support each one, taking into account biases in library preparation protocols. </source> <translation type="unfinished"><i>Cufflinks</i> Ñобирает транÑкрипции и оценивает их раÑпроÑтраненноÑÑ‚ÑŒ. </translation> </message> <message> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="488"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="492"/> <source><i>Bowtie 2</i> is an ultrafast and memory-efficient tool for aligning sequencing reads to long reference sequences. It is particularly good at aligning reads of about 50 up to 100s or 1000s of characters, and particularly good at aligning to relatively long (e.g. mammalian) genomes. <br/><br/>It indexes the genome with an FM index to keep its memory footprint small: for the human genome, its memory footprint is typically around 3.2Gb. <br/><br/><i>Bowtie 2</i> supports gapped, local, and paired-end alignment modes.</source> <translation type="unfinished"><i>Bowtie 2</i> один из Ñамых быÑтрых и Ñффективных инÑтрументов Ð´Ð»Ñ Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ… ÑÐµÐºÐ²ÐµÐ½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð½Ð° большие референÑные поÑледовательноÑти. ОÑобенно Ñффективно применение инÑтрумента Ð´Ð»Ñ Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ Ñ€Ð¸Ð´Ð¾Ð² Ð½Ð°Ñ‡Ð¸Ð½Ð°Ñ Ð¾Ñ‚ 50 и до Ñотен и Ñ‚Ñ‹ÑÑч Ñимволов, и больших геномов (например млекопитающих).</translation> </message> <message> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="496"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="500"/> <source><i>Cistrome</i> is a UGENE version of Cistrome pipeline which also includes some tools useful for ChIP-seq analysisThis pipeline is aimed to provide the following analysis steps: peak calling and annotating, motif search and gene ontology.</source> <translation type="unfinished"><i>Cistrome</i> Ñто верÑÐ¸Ñ UGENE пайплайна Cistrome, который включает некоторые инÑтрументы, иÑпользуемые в ChIP-seq анализе.</translation> </message> <message> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="499"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="503"/> <source>BLAST make database...</source> <translation>Создание базы данных BLAST...</translation> </message> <message> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="503"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="507"/> <source>BLAST+ make database...</source> <translation>Создание базы данных BLAST+...</translation> </message> <message> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="515"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="519"/> <source>Map reads to reference...</source> <translation>Выравнивание прочтений на референÑную поÑледовательноÑÑ‚ÑŒ...</translation> </message> <message> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="540"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="544"/> <source>Reads de novo assembly (with %1)...</source> <translation>Сборка прочтений de novo (при помощи %1)...</translation> </message> <message> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="525"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="529"/> <source>BLAST+ search...</source> <translation>ПоиÑк Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ BLAST+...</translation> </message> <message> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="529"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="533"/> <source>BLAST+ query database...</source> <translation>Ð—Ð°Ð¿Ñ€Ð¾Ñ Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ BLAST+...</translation> </message> @@ -5262,7 +5652,7 @@ To save under other name press 'Cancel' and change name in 'Resul <translation type="vanished">Сборка контигов Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ %1...</translation> </message> <message> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="511"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="515"/> <source>BLAST search...</source> <translation>ПоиÑк Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ BLAST...</translation> </message> @@ -5280,12 +5670,12 @@ To save under other name press 'Cancel' and change name in 'Resul <context> <name>U2::ExternalToolSupportService</name> <message> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="725"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="746"/> <source>External tools support</source> <translation>Поддержка внешних инÑтрументов</translation> </message> <message> - <location filename="../src/ExternalToolSupportPlugin.cpp" line="725"/> + <location filename="../src/ExternalToolSupportPlugin.cpp" line="746"/> <source>Provides support to run external tools from UGENE</source> <translation>ПозволÑет запуÑкать внешние инÑтрументы из UGENE</translation> </message> @@ -5293,7 +5683,7 @@ To save under other name press 'Cancel' and change name in 'Resul <context> <name>U2::ExternalToolSupportSettingsPageController</name> <message> - <location filename="../src/ExternalToolSupportSettingsController.cpp" line="48"/> + <location filename="../src/ExternalToolSupportSettingsController.cpp" line="51"/> <source>External Tools</source> <translation>Внешние инÑтрументы</translation> </message> @@ -5301,7 +5691,7 @@ To save under other name press 'Cancel' and change name in 'Resul <context> <name>U2::ExternalToolSupportSettingsPageWidget</name> <message> - <location filename="../src/ExternalToolSupportSettingsController.cpp" line="464"/> + <location filename="../src/ExternalToolSupportSettingsController.cpp" line="624"/> <source>Select an external tool to view more information about it.</source> <translation>Выберите инÑтрумент, чтобы увидеть дополнительную информацию о нем.</translation> </message> @@ -5326,32 +5716,52 @@ To save under other name press 'Cancel' and change name in 'Resul <translation type="vanished"><i>Cistrome</i> Ñто верÑÐ¸Ñ UGENE пайплайна Cistrome, который включает некоторые инÑтрументы, иÑпользуемые в ChIP-seq анализе.</translation> </message> <message> - <location filename="../src/ExternalToolSupportSettingsController.cpp" line="360"/> + <location filename="../src/ExternalToolSupportSettingsController.cpp" line="493"/> <source>No description</source> <translation>Ðет опиÑаниÑ</translation> </message> <message> - <location filename="../src/ExternalToolSupportSettingsController.cpp" line="323"/> + <location filename="../src/ExternalToolSupportSettingsController.cpp" line="448"/> <source>External tool '%1' cannot be validated as it depends on other tools, some of which are not valid. The list of tools is the following: </source> <translation>ИнÑтрумент '%1' не может быть проверен, Ñ‚.к. он завиÑит от других инÑтрументов, которые не проверены. Ðто Ñледующие инÑтрументы: </translation> </message> <message> - <location filename="../src/ExternalToolSupportSettingsController.cpp" line="347"/> + <location filename="../src/ExternalToolSupportSettingsController.cpp" line="93"/> + <source>Supported tools</source> + <translation type="unfinished">Поддерживаемые программы</translation> + </message> + <message> + <location filename="../src/ExternalToolSupportSettingsController.cpp" line="96"/> + <source>Custom tools</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/ExternalToolSupportSettingsController.cpp" line="99"/> + <source>Additional information</source> + <translation type="unfinished">Ð”Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ</translation> + </message> + <message> + <location filename="../src/ExternalToolSupportSettingsController.cpp" line="235"/> + <source>Can't remove custom external tool config file from the storage folder: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/ExternalToolSupportSettingsController.cpp" line="472"/> <source>'%1' is %2 module and it is not installed. Install it and restart UGENE or set another %2 with already installed '%1' module.</source> <translation>'%1' Ñто %2 модуль и он не уÑтановлен. УÑтановите его и перезапуÑтите UGENE или выберите другой %2 Ñ ÑƒÐ¶Ðµ уÑтановленным модулем '%1'.</translation> </message> <message> - <location filename="../src/ExternalToolSupportSettingsController.cpp" line="370"/> + <location filename="../src/ExternalToolSupportSettingsController.cpp" line="503"/> <source><br><br>Version: </source> <translation><br><br>ВерÑиÑ: </translation> </message> <message> - <location filename="../src/ExternalToolSupportSettingsController.cpp" line="374"/> + <location filename="../src/ExternalToolSupportSettingsController.cpp" line="507"/> <source>unknown</source> <translation>неизвеÑтный</translation> </message> <message> - <location filename="../src/ExternalToolSupportSettingsController.cpp" line="379"/> + <location filename="../src/ExternalToolSupportSettingsController.cpp" line="512"/> <source><br><br>Binary path: </source> <translation><br><br>Путь: </translation> </message> @@ -5360,17 +5770,17 @@ To save under other name press 'Cancel' and change name in 'Resul <translation type="vanished"><i>Bowtie<i>один из Ñамых быÑтрых и Ñффективных инÑтрументов Ð´Ð»Ñ Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ… ÑÐµÐºÐ²ÐµÐ½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð½Ð° референÑную поÑледовательноÑÑ‚ÑŒ. Так, например, он ÑпоÑобен выравнивать короткие (35 нукл.) поÑледовательноÑти ДÐК на геном человека Ñо ÑкороÑтью более 25 миллионов поÑледовательноÑтей / чаÑ. <a href='http://qt-project.org/doc/qt-4.8/qtextbrowser.html#anchorClicked'>Link text</a></translation> </message> <message> - <location filename="../src/ExternalToolSupportSettingsController.cpp" line="506"/> + <location filename="../src/ExternalToolSupportSettingsController.cpp" line="668"/> <source>Choose Folder With Executables</source> <translation>Выберите папку Ñ Ð¸ÑполнÑемыми файлами</translation> </message> <message> - <location filename="../src/ExternalToolSupportSettingsController.cpp" line="560"/> + <location filename="../src/ExternalToolSupportSettingsController.cpp" line="723"/> <source>Choose Folder With External Tools Pack</source> <translation>Выберите папку пакетом внешних инÑтрументов</translation> </message> <message> - <location filename="../src/ExternalToolSupportSettingsController.cpp" line="614"/> + <location filename="../src/ExternalToolSupportSettingsController.cpp" line="777"/> <source>Not a valid external tools folder</source> <translation>Ðет подходÑщей папки внешних инÑтрументов</translation> </message> @@ -5391,7 +5801,7 @@ To save under other name press 'Cancel' and change name in 'Resul <context> <name>U2::ExternalToolValidateTask</name> <message> - <location filename="../src/utils/ExternalToolValidateTask.cpp" line="41"/> + <location filename="../src/utils/ExternalToolValidateTask.cpp" line="42"/> <source>%1 validate task</source> <translation>%1 validate task</translation> </message> @@ -5399,12 +5809,12 @@ To save under other name press 'Cancel' and change name in 'Resul <context> <name>U2::ExternalToolsInstallTask</name> <message> - <location filename="../src/utils/ExternalToolValidateTask.cpp" line="396"/> + <location filename="../src/utils/ExternalToolValidateTask.cpp" line="407"/> <source>Installing external tools</source> <translation>Installing external tools</translation> </message> <message> - <location filename="../src/utils/ExternalToolValidateTask.cpp" line="401"/> + <location filename="../src/utils/ExternalToolValidateTask.cpp" line="412"/> <source> failed: </source> <translation> failed: </translation> </message> @@ -5426,17 +5836,30 @@ To save under other name press 'Cancel' and change name in 'Resul <context> <name>U2::ExternalToolsValidateTask</name> <message> - <location filename="../src/utils/ExternalToolValidateTask.cpp" line="367"/> + <location filename="../src/utils/ExternalToolValidateTask.cpp" line="378"/> <source>Checking external tools</source> <translation>Checking external tools</translation> </message> <message> - <location filename="../src/utils/ExternalToolValidateTask.cpp" line="385"/> - <location filename="../src/utils/ExternalToolValidateTask.cpp" line="387"/> + <location filename="../src/utils/ExternalToolValidateTask.cpp" line="396"/> + <location filename="../src/utils/ExternalToolValidateTask.cpp" line="398"/> <source> failed: </source> <translation> failed: </translation> </message> </context> +<context> + <name>U2::FastQCParser</name> + <message> + <location filename="../src/fastqc/FastqcTask.cpp" line="78"/> + <source>FastQC: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/fastqc/FastqcTask.cpp" line="80"/> + <source>FastQC failed to process input file '%1'. Make sure each read takes exactly four lines.</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>U2::FastQCSupport</name> <message> @@ -5448,25 +5871,30 @@ To save under other name press 'Cancel' and change name in 'Resul <context> <name>U2::FastQCTask</name> <message> - <location filename="../src/fastqc/FastqcTask.cpp" line="90"/> + <location filename="../src/fastqc/FastqcTask.cpp" line="124"/> <source>No input URL</source> <translation>No input URL</translation> </message> <message> - <location filename="../src/fastqc/FastqcTask.cpp" line="95"/> + <location filename="../src/fastqc/FastqcTask.cpp" line="129"/> <source>The input file '%1' is empty.</source> <translation>The input file '%1' is empty.</translation> </message> <message> - <location filename="../src/fastqc/FastqcTask.cpp" line="101"/> + <location filename="../src/fastqc/FastqcTask.cpp" line="135"/> <source>Folder does not exist: %1</source> <translation>Folder does not exist: %1</translation> </message> <message> - <location filename="../src/fastqc/FastqcTask.cpp" line="118"/> + <location filename="../src/fastqc/FastqcTask.cpp" line="152"/> <source>Result file does not exist: %1. See the log for details.</source> <translation>Result file does not exist: %1. See the log for details.</translation> </message> + <message> + <location filename="../src/fastqc/FastqcTask.cpp" line="164"/> + <source>Unable to move result file from temporary directory to desired location: %1.</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>U2::FormatDBSupport</name> @@ -5609,47 +6037,47 @@ To save under other name press 'Cancel' and change name in 'Resul <context> <name>U2::GTest_CompareHmmFiles</name> <message> - <location filename="../src/hmmer/HmmerBuildTaskTest.cpp" line="339"/> + <location filename="../src/hmmer/HmmerBuildTaskTest.cpp" line="337"/> <source>File #1 not set</source> <translation>File #1 not set</translation> </message> <message> - <location filename="../src/hmmer/HmmerBuildTaskTest.cpp" line="345"/> + <location filename="../src/hmmer/HmmerBuildTaskTest.cpp" line="343"/> <source>File #2 not set</source> <translation>File #2 not set</translation> </message> <message> - <location filename="../src/hmmer/HmmerBuildTaskTest.cpp" line="405"/> + <location filename="../src/hmmer/HmmerBuildTaskTest.cpp" line="403"/> <source>Error creating ioadapter for first file</source> <translation>Error creating ioadapter for first file</translation> </message> <message> - <location filename="../src/hmmer/HmmerBuildTaskTest.cpp" line="409"/> + <location filename="../src/hmmer/HmmerBuildTaskTest.cpp" line="407"/> <source>Error opening 1 file</source> <translation>Error opening 1 file</translation> </message> <message> - <location filename="../src/hmmer/HmmerBuildTaskTest.cpp" line="416"/> + <location filename="../src/hmmer/HmmerBuildTaskTest.cpp" line="414"/> <source>Error creating ioadapter for second file</source> <translation>Error creating ioadapter for second file</translation> </message> <message> - <location filename="../src/hmmer/HmmerBuildTaskTest.cpp" line="420"/> + <location filename="../src/hmmer/HmmerBuildTaskTest.cpp" line="418"/> <source>Error opening second file</source> <translation>Error opening second file</translation> </message> <message> - <location filename="../src/hmmer/HmmerBuildTaskTest.cpp" line="445"/> + <location filename="../src/hmmer/HmmerBuildTaskTest.cpp" line="443"/> <source>Names of aligments not matched</source> <translation>Names of aligments not matched</translation> </message> <message> - <location filename="../src/hmmer/HmmerBuildTaskTest.cpp" line="449"/> + <location filename="../src/hmmer/HmmerBuildTaskTest.cpp" line="447"/> <source>Comparing files length not matched</source> <translation>Comparing files length not matched</translation> </message> <message> - <location filename="../src/hmmer/HmmerBuildTaskTest.cpp" line="456"/> + <location filename="../src/hmmer/HmmerBuildTaskTest.cpp" line="454"/> <source>Files parts not equal:'%1' and '%2'</source> <translation>Files parts not equal:'%1' and '%2'</translation> </message> @@ -5974,50 +6402,55 @@ To save under other name press 'Cancel' and change name in 'Resul <context> <name>U2::HmmerSearchTask</name> <message> - <location filename="../src/hmmer/HmmerSearchTask.cpp" line="48"/> + <location filename="../src/hmmer/HmmerSearchTask.cpp" line="49"/> <source>HMMER search</source> <translation>HMMER поиÑк</translation> </message> <message> - <location filename="../src/hmmer/HmmerSearchTask.cpp" line="102"/> + <location filename="../src/hmmer/HmmerSearchTask.cpp" line="104"/> <source>HMM profile used: </source> <translation>ИÑпользовать HMM профиль:</translation> </message> <message> - <location filename="../src/hmmer/HmmerSearchTask.cpp" line="105"/> + <location filename="../src/hmmer/HmmerSearchTask.cpp" line="111"/> <source>Task was not finished</source> <translation>Task was not finished</translation> </message> <message> - <location filename="../src/hmmer/HmmerSearchTask.cpp" line="111"/> + <location filename="../src/hmmer/HmmerSearchTask.cpp" line="117"/> <source>Result annotation table: </source> <translation>Таблица аннотаций:</translation> </message> <message> - <location filename="../src/hmmer/HmmerSearchTask.cpp" line="113"/> + <location filename="../src/hmmer/HmmerSearchTask.cpp" line="119"/> <source>Result annotation group: </source> <translation>Группа аннотаций:</translation> </message> <message> - <location filename="../src/hmmer/HmmerSearchTask.cpp" line="114"/> + <location filename="../src/hmmer/HmmerSearchTask.cpp" line="120"/> <source>Result annotation name: </source> <translation>Ð˜Ð¼Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ð¸:</translation> </message> <message> - <location filename="../src/hmmer/HmmerSearchTask.cpp" line="116"/> + <location filename="../src/hmmer/HmmerSearchTask.cpp" line="122"/> <source>Results count: </source> <translation>КоличеÑтво:</translation> </message> <message> - <location filename="../src/hmmer/HmmerSearchTask.cpp" line="143"/> + <location filename="../src/hmmer/HmmerSearchTask.cpp" line="149"/> <source>Cannot create a folder for temporary files.</source> <translation>Cannot create a folder for temporary files.</translation> </message> <message> - <location filename="../src/hmmer/HmmerSearchTask.cpp" line="191"/> + <location filename="../src/hmmer/HmmerSearchTask.cpp" line="197"/> <source>Unknown option controlling model-specific thresholding</source> <translation>Unknown option controlling model-specific thresholding</translation> </message> + <message> + <location filename="../src/hmmer/HmmerSearchTask.cpp" line="247"/> + <source>Warning: it is not recommended to use HMMER2 models with HMMER3</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>U2::HmmerSupport</name> @@ -6074,6 +6507,27 @@ To save under other name press 'Cancel' and change name in 'Resul <translation>Выбрать ÑейчаÑ?</translation> </message> </context> +<context> + <name>U2::ImportCustomToolsTask</name> + <message> + <location filename="../src/custom_tools/ImportCustomToolsTask.cpp" line="46"/> + <source>Import custom external tools configuration</source> + <translation>Импорт конфигурации внешних инÑтрументов</translation> + </message> + <message> + <location filename="../src/custom_tools/ImportCustomToolsTask.cpp" line="72"/> + <source>Can't register the tool '%1': there is another tool with the same name</source> + <translation>Ðевозможно зарегиÑтрировать инÑтрумент '%1': ÑущеÑтвует другой инÑтрумент Ñ Ñ‚Ð°ÐºÐ¸Ð¼ же названием</translation> + </message> +</context> +<context> + <name>U2::ImportExternalToolDialog</name> + <message> + <location filename="../src/custom_tools/ImportExternalToolDialog.cpp" line="53"/> + <source>Select configuration file to import</source> + <translation>Выберите файл Ð´Ð»Ñ Ð¸Ð¼Ð¿Ð¾Ñ€Ñ‚Ð°</translation> + </message> +</context> <context> <name>U2::JavaSupport</name> <message> @@ -6082,6 +6536,14 @@ To save under other name press 'Cancel' and change name in 'Resul <translation>Java позволÑет разрабатывать Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Java на компьютерах и Ñерверах <br> <i> (ТребуетÑÑ Java 1.7 или выше) </i> <br> Java можно Ñвободно Ñкачать на официальном веб-Ñайте:. HTTPS: / /www.java.com/en/download/</translation> </message> </context> +<context> + <name>U2::LoadCustomExternalToolsTask</name> + <message> + <location filename="../src/custom_tools/LoadCustomExternalToolsTask.cpp" line="37"/> + <source>Load custom external tools</source> + <translation>Загрузить внешние инÑтрументы</translation> + </message> +</context> <context> <name>U2::LocalWorkflow::AlignToReferenceBlastPrompter</name> <message> @@ -6223,118 +6685,148 @@ To save under other name press 'Cancel' and change name in 'Resul <context> <name>U2::LocalWorkflow::BaseShortReadsAlignerWorker</name> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="253"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="252"/> <source>Not enough upstream reads datasets</source> <translation>ÐедоÑтаточно upstream ридов</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="256"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="255"/> <source>Not enough downstream reads datasets</source> <translation>ÐедоÑтаточно downstream ридов</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="295"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="318"/> <source>Output folder</source> <translation>Ð’Ñ‹Ñ…Ð¾Ð´Ð½Ð°Ñ Ð¿Ð°Ð¿ÐºÐ°</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="296"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="319"/> <source>Folder to save output files.</source> <translation>Папка Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ñ‹Ñ… файлов.</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="299"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="302"/> <source>Reference genome</source> <translation>РеференÑный геном</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="300"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="303"/> <source>Path to indexed reference genome.</source> <translation>Путь до индекÑированного референÑного генома.</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="303"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="322"/> <source>Library</source> <translation>Библиотека</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="304"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="323"/> <source>Is this library mate-paired?</source> <translation>Ðто Ð¿Ð°Ñ€Ð½Ð°Ñ Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ‚ÐµÐºÐ°?</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="307"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="326"/> <source>Filter unpaired reads</source> <translation>Фильтровать непарные риды</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="308"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="327"/> <source>Should the reads be checked for incomplete pairs?</source> <translation>ПроверÑÑ‚ÑŒ риды Ð´Ð»Ñ Ð½ÐµÐ¿Ð¾Ð»Ð½Ñ‹Ñ… пар?</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="311"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="314"/> <source>Output file name</source> <translation>Ð˜Ð¼Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ файла</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="312"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="295"/> + <source>Reference input type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="296"/> + <source>Select "Sequence" to input a reference genome as a sequence file. <br/>Note that any sequence file format, supported by UGENE, is allowed (FASTA, GenBank, etc.). <br/>The index will be generated automatically in this case. <br/>Select "Index" to input already generated index files, specific for the tool.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="307"/> + <source>The folder with the index for the reference sequence.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="311"/> + <source>The basename of the index for the reference sequence.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="315"/> <source>Base name of the output file. 'out.sam' by default</source> <translation>Базовое Ð¸Ð¼Ñ Ð´Ð»Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ñ‹Ñ… файлов. По умолчанию 'out.sam'</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="350"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="355"/> + <source>Sequence</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="356"/> + <source>Index</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="381"/> <source>URL of a file with reads</source> <translation>Путь до файла Ñ Ñ€Ð¸Ð´Ð°Ð¼Ð¸</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="351"/> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="361"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="382"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="392"/> <source>Input reads to be aligned.</source> <translation>Входные риды будут выровнены.</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="353"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="384"/> <source>URL of a file with mate reads</source> <translation>Путь до файла Ñ Ñ€Ð¸Ð´Ð°Ð¼Ð¸</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="354"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="385"/> <source>Input mate reads to be aligned.</source> <translation>Входные риды будут выровнены.</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="360"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="391"/> <source>Input data</source> <translation>Входные данные</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="364"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="395"/> <source>Reverse FASTQ file</source> <translation>Обратный FASTQ файл</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="365"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="396"/> <source>Reverse paired reads to be aligned.</source> <translation>Обратные парные риды будут выровнены.</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="377"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="408"/> <source>Assembly URL</source> <translation>Путь до Ñборки</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="378"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="409"/> <source>Output assembly URL.</source> <translation>Путь выходной Ñборки.</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="381"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="412"/> <source>Output data</source> <translation>Выходные данные</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="382"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="413"/> <source>Output assembly files.</source> <translation>Выходные файлы Ñборки.</translation> </message> @@ -6412,7 +6904,7 @@ To save under other name press 'Cancel' and change name in 'Resul </message> <message> <location filename="../src/bigWigTools/BedGraphToBigWigWorker.cpp" line="129"/> - <source>A name of an output file. If default of empty value is provided the output name is the name of the first BAM file with an extention.</source> + <source>A name of an output file. If default of empty value is provided the output name is the name of the first BAM file with an extension.</source> <translation>Ð˜Ð¼Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ файла. По умолчанию будет взÑто Ð¸Ð¼Ñ Ð¿ÐµÑ€Ð²Ð¾Ð³Ð¾ файла Ñ ÑоответÑтвующим раÑширением.</translation> </message> <message> @@ -6474,7 +6966,7 @@ To save under other name press 'Cancel' and change name in 'Resul <context> <name>U2::LocalWorkflow::BedtoolsIntersectPrompter</name> <message> - <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="995"/> + <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="996"/> <source>Intersect annotations from <u>%1</u> (<b>set A</b>) with annotations from <u>%2</u> (<b>set B</b>). Report </source> <translation>ПереÑечение аннотаций из <u>%1</u> (<b>набор A</b>) Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ñми из <u>%2</u> (<b>набор B</b>). Отчет </translation> </message> @@ -6482,68 +6974,68 @@ To save under other name press 'Cancel' and change name in 'Resul <context> <name>U2::LocalWorkflow::BedtoolsIntersectWorker</name> <message> - <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="884"/> + <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="885"/> <source>Data not found by %1 id</source> <translation>Data not found by %1 id</translation> </message> <message> - <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="888"/> + <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="889"/> <source>Can not get annotation table object</source> <translation>Can not get annotation table object</translation> </message> <message> - <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="902"/> + <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="903"/> <source>Annotations A</source> <translation>Ðннотации A</translation> </message> <message> - <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="907"/> + <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="908"/> <source>Annotations B</source> <translation>Ðннотации B</translation> </message> <message> - <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="912"/> + <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="913"/> <source>Annotations</source> <translation>Ðннотации</translation> </message> <message> - <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="912"/> - <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="928"/> + <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="913"/> + <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="929"/> <source>Result annotations</source> <translation>Выходные аннотации</translation> </message> <message> - <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="921"/> + <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="922"/> <source>Minimum overlap</source> <translation>Минимальное перекрытие</translation> </message> <message> - <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="922"/> + <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="923"/> <source>Minimum overlap required as a fraction of an annotation from set A.<br/>By default, even 1 bp overlap between annotations from set A and set B is taken into account. Yet sometimes you may want to restrict reported overlaps to cases where the annotations in B overlaps at least X% (e.g. 50%) of the A annotation. </source> <translation>Минимальное переÑечение, требуемое как Ñ„Ñ€Ð°ÐºÑ†Ð¸Ñ Ð¸Ð· набора A.<br/>По умолчанию, Ñто Ñвыше 1 нуклеотида переÑечений между аннотациÑми из набора Ри аннотациÑми набора Ð’.</translation> </message> <message> - <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="929"/> + <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="930"/> <source>Select one of the following:<ul><li><i>Shared interval</i> to report intervals shared between overlapped annotations from set A and set B.</li><li><i>Overlapped annotations from A</i> to report annotations from set A that have an overlap with annotations from set B.</li><li><i>Non-overlapped annotations from A</i> to report annotations from set A that have NO overlap with annotations from set B.</li></ul></source> <translation>Выберите одно из Ñледующего:<ul><li><i>Общий интервал</i> включить в отчет общие интервалы переÑекающихÑÑ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ð¹ набора Ри набора Ð’.</li><li><i>ПереÑекающиеÑÑ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ð¸ из A</i> включить в отчетаннотации из набора A, которые имеют переÑÐµÑ‡ÐµÐ½Ð¸Ñ Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ñми набора B.</li><li><i>Ðе переÑекающиеÑÑ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ð¸ из набора Ð</i> включить в отчет аннотации из набора A, которые не переÑекаютÑÑ Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ñми из набора B.</li></ul></translation> </message> <message> - <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="941"/> + <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="942"/> <source>Unique overlaps</source> <translation>Уникальное перекрытие</translation> </message> <message> - <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="942"/> + <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="943"/> <source>If the parameter value is "True", write original A entry once if any overlaps found in B. In other words, just report the fact at least one overlap was found in B.<br/>The minimum overlap number is ignored in this case.<br/><br/>If the parameter value is "False", the A annotation is reported for every overlap found.</source> <translation>ЕÑли значение параметра "ИÑтина", запишетÑÑ Ð¾Ñ€Ð¸Ð³Ð¸Ð½Ð°Ð»ÑŒÐ½Ð°Ñ Ð·Ð°Ð¿Ð¸ÑÑŒ Родин раз, еÑли еÑÑ‚ÑŒ какие-либо ÑÐ¾Ð²Ð¿Ð°Ð´ÐµÐ½Ð¸Ñ Ð² Ð’. ЕÑли значение параметра "Ложь", Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ñ Ð Ñообщает о вÑех ÑовпадениÑÑ….</translation> </message> <message> - <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="979"/> + <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="980"/> <source>Intersect Annotations</source> <translation>ПереÑечение аннотаций</translation> </message> <message> - <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="980"/> + <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="981"/> <source>Intersects two sets of annotations denoted as A and B.</source> <translation>Перечение двух наборов аннотаций, обозначенных как Ри Ð’.</translation> </message> @@ -6963,12 +7455,22 @@ To save under other name press 'Cancel' and change name in 'Resul <context> <name>U2::LocalWorkflow::Bowtie2Worker</name> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="112"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="113"/> + <source>Bowtie index folder</source> + <translation type="unfinished">Папка Ð´Ð»Ñ Ð¸Ð½Ð´ÐµÐºÑа Bowtie</translation> + </message> + <message> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="114"/> + <source>Bowtie index basename</source> + <translation type="unfinished">Базовое Ð¸Ð¼Ñ Ð´Ð»Ñ Ð¸Ð½Ð´ÐµÐºÑа Bowtie</translation> + </message> + <message> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="117"/> <source>Mode</source> <translation>Режим</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="113"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="118"/> <source>When the -n option is specified (which is the default), bowtie determines which alignments are valid according to the following policy, which is similar to Maq's default policy. In -v mode, alignments may have no more than V mismatches, where V may be a number from 0 @@ -6978,139 +7480,139 @@ through 3 set using the -v option. Quality values are ignored. The -v option is Ð’ -v режиме, выравнивание может иметь не больше чем V неÑоответÑтвий, где V может быть чиÑло от 0. ÐžÐ¿Ñ†Ð¸Ñ -v ÑвлÑетÑÑ Ð²Ð·Ð°Ð¸Ð¼Ð¾Ð¸Ñключающим Ñ Ð¾Ð¿Ñ†Ð¸ÐµÐ¹ -n.</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="119"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="124"/> <source>Number of mismatches</source> <translation>ЧиÑло неÑоответÑтвий</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="120"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="125"/> <source>Sets the number of mismatches to allowed in a seed alignment. Can be set to 0 or 1. Setting this higher makes alignment slower (often much slower) but increases sensitivity.</source> <translation>Задает количеÑтво неÑовпадений Ñ Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð½Ñ‹Ð¼ в выравнивании. Может быть 0 или 1. Повышение Ñтого параметра делает выранивание более медленным (чаще вÑего очень медленным) но повышает точноÑÑ‚ÑŒ.</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="124"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="129"/> <source>Seed length (--L)</source> <translation>Длина затравки (--L)</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="125"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="130"/> <source>Sets the length of the seed substrings to align. Smaller values make alignment slower but more senstive.</source> <translation>Задает длину затравок Ð´Ð»Ñ Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ. Меньшие Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð·Ð°Ð¼ÐµÐ´Ð»ÑÑŽÑ‚ выравнивание, но повышают точноÑÑ‚ÑŒ.</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="128"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="133"/> <source>Add columns to allow gaps (--dpad)</source> <translation>Добавить Ñтолбцы, чтобы допуÑтить пробелы (--dpad)</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="129"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="134"/> <source>"Pads" dynamic programming problems by specified number of columns on either side to allow gaps.</source> <translation>ДобавлÑет Ñтолбцы, чтобы допуÑтить пробелы.</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="132"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="137"/> <source>Disallow gaps (--gbar)</source> <translation>Запретить пробелы (--gbar)</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="133"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="138"/> <source>Disallow gaps within specified number of positions of the beginning or end of the read.</source> <translation>Запрещает пробелы в указанных позициÑÑ… в начале или в конце рида.</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="136"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="141"/> <source>Seed (--seed)</source> <translation>Затравка (--seed)</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="137"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="142"/> <source>Use specified value as the seed for pseudo-random number generator.</source> <translation>ИÑпользует указанное значение в качеÑтве затравки Ð´Ð»Ñ Ð¿Ñевдо-Ñлучайного генератора.</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="140"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="145"/> <source>Threads</source> <translation>Потоки</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="141"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="146"/> <source>Launch specified number of parallel search threads. Threads will run on separate processors/cores and synchronize when parsing reads and outputting alignments. Searching for alignments is highly parallel, and speedup is close to linear.</source> <translation>ЗапуÑк определенного количеÑтво параллельных потоков поиÑка. Потоки будут работать на отдельных процеÑÑорах/ Ñдрах и ÑинхронизоватьÑÑ Ð¿Ñ€Ð¸ разборе ридов и выводе выравниваниÑ.</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="145"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="150"/> <source>No unpaired alignments (--no-mixed)</source> <translation>Только парное выравнивание (--no-mixed)</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="146"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="151"/> <source>If Bowtie2 cannot find a paired-end alignment for a pair, by default it will go on to look for unpaired alignments for the constituent mates. This is called "mixed mode." To disable mixed mode, set this option. Bowtie2 runs a little faster in the mixed mode, but will only consider alignment status of pairs per se, not individual mates.</source> <translation>ЕÑли Bowtie2 не Ñможет найти пару Ð´Ð»Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ð¿Ð°Ñ€Ð½Ð¾Ð³Ð¾ Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ Ð¿Ð¾ умолчанию будет Ñделано непарное выравнивание. Ðто называетÑÑ &quot;Ñмешанным режимом.&quot; Чтобы отключить Ñмешанный режим, уÑтановите Ñту опцию. Bowtie2 запуÑтитÑÑ Ð½ÐµÐ¼Ð½Ð¾Ð³Ð¾ быÑтрее в Ñмешанном режиме чем Ð´Ð»Ñ Ð¿Ð°Ñ€Ð½Ð¾Ð³Ð¾ выравниваниÑ.</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="151"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="156"/> <source>No discordant alignments (--no-discordant)</source> <translation>Только ÑоглаÑованные Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ (--no-discordant)</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="152"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="157"/> <source>By default, Bowtie2 looks for discordant alignments if it cannot find any concordant alignments. A discordant alignment is an alignment where both mates align uniquely, but that does not satisfy the paired-end constraints. This option disables that behavior.</source> <translation>По умолчанию, Bowtie2 ищет неÑоглаÑованные выравниваниÑ, еÑли он не может найти какие-либо ÑоглаÑованные выравниваниÑ. ÐеÑоглаÑованное выравнивание Ñто выравнивание, в котором оба рида выровнены однозначно, но они не удовлетворÑÑŽÑ‚ уÑловию парноÑти. Ðто Ð¾Ð¿Ñ†Ð¸Ñ Ð¾Ñ‚ÐºÐ»ÑŽÑ‡Ð°ÐµÑ‚ Ñто поведение.</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="156"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="161"/> <source>No forward orientation (--nofw)</source> <translation>Ðе прÑÐ¼Ð°Ñ Ð¾Ñ€Ð¸ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ñ (--nofw)</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="157"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="162"/> <source>If --nofw is specified, bowtie will not attempt to align against the forward reference strand.</source> <translation>ЕÑли уÑтановлена Ð¾Ð¿Ñ†Ð¸Ñ --nofw, bowtie не будет пытатьÑÑ Ð²Ñ‹Ñ€Ð¾Ð²Ð½ÑÑ‚ÑŒ прÑмую цепь.</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="160"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="165"/> <source>No reverse-complement orientation (--norc)</source> <translation>Ðе обратно-ÐºÐ¾Ð¼Ð¿Ð»ÐµÐ¼ÐµÐ½Ñ‚Ð°Ñ€Ð½Ð°Ñ Ð¾Ñ€Ð¸ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ñ (--norc)</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="161"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="166"/> <source>If --norc is specified, bowtie will not attempt to align against the reverse-complement reference strand.</source> <translation>ЕÑли уÑтановлена Ð¾Ð¿Ñ†Ð¸Ñ --norc, bowtie не будет пытатьÑÑ Ð²Ñ‹Ñ€Ð¾Ð²Ð½ÑÑ‚ÑŒ обратно-комплементарную цепь.</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="164"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="169"/> <source>No overlapping mates (--no-overlap)</source> <translation>Без перекрытий (--no-overlap)</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="165"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="170"/> <source>If one mate alignment overlaps the other at all, consider that to be non-concordant. Default: mates can overlap in a concordant alignment.</source> <translation>ЕÑли один учаÑтник Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ Ð¿ÐµÑ€ÐµÐºÑ€Ñ‹Ð²Ð°ÐµÑ‚ÑÑ Ñ Ð´Ñ€ÑƒÐ³Ð¸Ð¼, то Ñто неÑоглаÑованное выравнивание. По умолчанию: учаÑтники могут перекрыватьÑÑ Ð² ÑоглаÑованном выравнивании.</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="169"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="174"/> <source>No mates containing one another (--no-contain)</source> <translation>Без вложений (--no-contain)</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="170"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="175"/> <source>If one mate alignment contains the other, consider that to be non-concordant. Default: a mate can contain the other in a concordant alignment.</source> <translation>ЕÑли один учаÑтник Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ Ñодержит другой, то Ñто неÑоглаÑованное выравнивание. По умолчанию одна чаÑÑ‚ÑŒ Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ Ð¼Ð¾Ð¶ÐµÑ‚ Ñодержать другую в ÑоглаÑованном выравнивании.</translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="220"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="225"/> <source>Map Reads with Bowtie2</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="221"/> + <location filename="../src/bowtie2/Bowtie2Worker.cpp" line="226"/> <source>Bowtie2 is a program for mapping short DNA sequence reads to a long reference sequence. In addition to to the Burrows-Wheeler transform, Bowtie2 uses an FM-index (similar to a suffix array) to keep its memory footprint small.<br/><br/>Bowtie2 is more suited to finding longer, gapped alignments than the first version Bowtie, it supports ambiguous characters in the reference (e.g. 'N'), etc.<br/><br/>Provide URL(s) to FASTA or FASTQ file(s) with NGS reads to the input port of the element, set up the reference sequence in the parameters. The result is saved to the specified SAM file, URL to the file is passed to the output port.</source> <translation type="unfinished"></translation> </message> @@ -7130,73 +7632,83 @@ other in a concordant alignment.</source> <translation type="vanished">Режим:</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="138"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="119"/> + <source>Bowtie index folder</source> + <translation type="unfinished">Папка Ð´Ð»Ñ Ð¸Ð½Ð´ÐµÐºÑа Bowtie</translation> + </message> + <message> + <location filename="../src/bowtie/BowtieWorker.cpp" line="120"/> + <source>Bowtie index basename</source> + <translation type="unfinished">Базовое Ð¸Ð¼Ñ Ð´Ð»Ñ Ð¸Ð½Ð´ÐµÐºÑа Bowtie</translation> + </message> + <message> + <location filename="../src/bowtie/BowtieWorker.cpp" line="140"/> <source>Mode</source> <translation type="unfinished">Режим</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="139"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="141"/> <source>When the -n option is specified (which is the default), bowtie determines which alignments are valid according to the following policy, which is similar to Maq's default policy. In -v mode, alignments may have no more than V mismatches, where V may be a number from 0 through 3 set using the -v option. Quality values are ignored. The -v option is mutually exclusive with the -n option.</source> <translation>Когда задана Ð¾Ð¿Ñ†Ð¸Ñ -n, bowtie определÑет, какие Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ Ð´ÐµÐ¹Ñтвительны в ÑоответÑтвии Ñо Ñледующей политикой, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ð¿Ð¾Ñ…Ð¾Ð¶Ð° на политику Maq по умолчанию. Ð’ -v режиме, выравнивание может иметь не больше чем V неÑоответÑтвий, где V может быть чиÑло от 0. ÐžÐ¿Ñ†Ð¸Ñ -v ÑвлÑетÑÑ Ð²Ð·Ð°Ð¸Ð¼Ð¾Ð¸Ñключающим Ñ Ð¾Ð¿Ñ†Ð¸ÐµÐ¹ -n.</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="145"/> - <location filename="../src/bowtie/BowtieWorker.cpp" line="149"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="147"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="151"/> <source>Mismatches number</source> <translation>ЧиÑло неÑоответÑтвий</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="146"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="148"/> <source>Mismatches number.</source> <translation>ЧиÑло неÑоответÑтвий.</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="150"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="152"/> <source>Maximum permitted total of quality values at all mismatched read positions throughout the entire alignment, not just in the seed. The default is 70. Like Maq, bowtie rounds quality values to the nearest 10 and saturates at 30; rounding can be disabled with --nomaqround.</source> <translation>МакÑимальн допуÑтимое общее значение качеÑтва вÑех неÑоглаÑованных позиций ридов на протÑжении вÑего выравниваниÑ. По умолчанию 70. Подобно Maq, Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ ÐºÐ°Ñ‡ÐµÑтва близки к 10 и макÑимальны к значению 30, округление может быть отключено при помощи --nomaqround.</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="155"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="157"/> <source>Seed length</source> <translation>Длина затравки</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="156"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="158"/> <source>The seed length; i.e., the number of bases on the high-quality end of the read to which the -n ceiling applies. The lowest permitted setting is 5 and the default is 28. bowtie is faster for larger values of -l.</source> <translation>&quot;Длина затравки&quot; Ñ‚.е., чиÑло оÑнований в выÑококачеÑтвенном конце рида, Ð´Ð»Ñ ÐºÐ¾Ñ‚Ð¾Ñ€Ð¾Ð³Ð¾ применÑетÑÑ -n. Ðаименьшее допуÑтимое значение 5, по умолчанию 28. Большие Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ -l увеличивают ÑкороÑÑ‚ÑŒ.</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="160"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="162"/> <source>No forward orientation</source> <translation>Ðе прÑÐ¼Ð°Ñ Ð¾Ñ€Ð¸ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ñ</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="161"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="163"/> <source>If --nofw is specified, bowtie will not attempt to align against the forward reference strand.</source> <translation>ЕÑли уÑтановлена Ð¾Ð¿Ñ†Ð¸Ñ --nofw, bowtie не будет пытатьÑÑ Ð²Ñ‹Ñ€Ð¾Ð²Ð½ÑÑ‚ÑŒ прÑмую цепь.</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="164"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="166"/> <source>No reverse-complement orientation</source> <translation>Ðе обратно-ÐºÐ¾Ð¼Ð¿Ð»ÐµÐ¼ÐµÐ½Ñ‚Ð°Ñ€Ð½Ð°Ñ Ð¾Ñ€Ð¸ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ñ</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="165"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="167"/> <source>If --norc is specified, bowtie will not attempt to align against the reverse-complement reference strand.</source> <translation>ЕÑли уÑтановлена Ð¾Ð¿Ñ†Ð¸Ñ --norc, bowtie не будет пытатьÑÑ Ð²Ñ‹Ñ€Ð¾Ð²Ð½ÑÑ‚ÑŒ обратно-комплементарную цепь.</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="168"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="170"/> <source>Maximum of backtracks</source> <translation>МакÑимальное чиÑло отÑтупов</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="169"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="171"/> <source>The maximum insert size for valid paired-end alignments. E.g. if -X 100 is specified and a paired-end alignment consists of two 20-bp alignments in the proper orientation with a 60-bp gap between them, that alignment is considered valid (as long as -I is also satisfied). A 61-bp gap would not be valid in that case. If trimming options -3 or -5 are also used, the -X constraint is applied with respect to the untrimmed mates, not the trimmed mates. Default: 250.</source> <translation>МакÑимальный размер вÑтавки Ð´Ð»Ñ Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ paired-end. ЕÑли -X 100 и выравнивание ÑоÑтоит из учаÑтков по 20 нуклеотидов и раÑÑтоÑнием между ними в 60 нуклеотидов, @@ -7207,12 +7719,12 @@ other in a concordant alignment.</source> По умолчанию: 250.</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="176"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="178"/> <source>Try as hard</source> <translation>Упорно пытатьÑÑ</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="177"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="179"/> <source>Try as hard as possible to find valid alignments when they exist, including paired-end alignments. This is equivalent to specifying very high values for the --maxbts and --pairtries options. This mode is generally much slower than the default settings, but can be useful for certain problems. This mode is slower when (a) the reference is very repetitive, (b) the reads are low quality, or (c) not many reads have valid alignments.</source> <translation>ПытатьÑÑ Ð¿Ð¾ÐºÐ° Ñто возможно найти подходÑщее выравнивание, когда они еÑÑ‚ÑŒ, Ð²ÐºÐ»ÑŽÑ‡Ð°Ñ paired-end выравниваниÑ. Ðто равноÑильно очень выÑоким значениÑм параметров --maxbts и --pairtries. @@ -7223,12 +7735,12 @@ other in a concordant alignment.</source> или (c) не очень много ридов имеют подходÑщее выравнивание.</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="183"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="185"/> <source>Best hits</source> <translation>Лучшие попытки</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="184"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="186"/> <source>The number of megabytes of memory a given thread is given to store path descriptors in --best mode. Best-first search must keep track of many paths at once to ensure it is always extending the path with the lowest cumulative cost. Bowtie tries to minimize the memory impact of the descriptors, but they can still grow very large in some cases. If you receive an error message saying that chunk memory has been exhausted in --best mode, try adjusting this parameter up to dedicate more memory to the descriptors. Default: 64.</source> <translation>КоличеÑтво мегабайт памÑти Ð´Ð»Ñ Ð´Ð°Ð½Ð½Ð¾Ð³Ð¾ потока задаетÑÑ Ð´Ð»Ñ Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð´ÐµÑкрипторов пути в --best режиме. ПоиÑк по первому наилучшему Ñовпадению должен отÑлеживать множеÑтво путей одновременно, убедитеÑÑŒ, что раÑширение пути проиÑходит Ñ Ð½Ð°Ð¸Ð¼ÐµÐ½ÑŒÑˆÐµÐ¹ ÑтоимоÑтью. @@ -7238,12 +7750,12 @@ Bowtie пытаетÑÑ ÑвеÑти к минимуму воздейÑтвие Значение по умолчанию: 64.</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="191"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="193"/> <source>No Maq rounding</source> <translation>Без Ð¾ÐºÑ€ÑƒÐ³Ð»ÐµÐ½Ð¸Ñ Maq</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="192"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="194"/> <source>Maq accepts quality values in the Phred quality scale, but internally rounds values to the nearest 10, with a maximum of 30. By default, bowtie also rounds this way. --nomaqround prevents this rounding in bowtie.</source> <translation>Maq принимает Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ ÐºÐ°Ñ‡ÐµÑтва в маÑштабе качеÑтва Phred, но внутренние Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð±Ð»Ð¸Ð·ÐºÐ¸ к 10, @@ -7251,22 +7763,22 @@ Bowtie пытаетÑÑ ÑвеÑти к минимуму воздейÑтвие По умолчанию, bowtie также вокруг Ñтих значений. --nomaqround препÑÑ‚Ñтвует Ñтому округлению в bowtie.</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="196"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="198"/> <source>Seed</source> <translation>Затравка</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="197"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="199"/> <source>Use <int> as the seed for pseudo-random number generator.</source> <translation>ИÑпользуйте <int> в качеÑтве затравки Ð´Ð»Ñ Ð¿Ñевдо-Ñлучайного генератора.</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="200"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="202"/> <source>Best alignments</source> <translation>Лучшие выравниваниÑ</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="201"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="203"/> <source>Make Bowtie guarantee that reported singleton alignments are best in terms of stratum (i.e. number of mismatches, or mismatches in the seed in the case of -n mode) and in terms of the quality values at the mismatched position(s). bowtie is somewhat slower when --best is specified.</source> <translation>Создать Bowtie гарантию того, что одиночные Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ ÑвлÑÑŽÑ‚ÑÑ "лучшими" в плане ÑÐ»Ð¾Ñ (Ñ‚.е. чиÑло неÑовпадений, или неÑоответÑÑ‚Ð²Ð¸Ñ Ð² затравке в -n режиме) @@ -7274,32 +7786,32 @@ Bowtie пытаетÑÑ ÑвеÑти к минимуму воздейÑтвие bowtie медленнее, когда указан режим --best.</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="206"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="208"/> <source>All alignments</source> <translation>Ð’Ñе выравниваниÑ</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="207"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="209"/> <source>Report all valid alignments per read or pair.</source> <translation>Сообщить о вÑех допуÑтимых выравниваниÑÑ… Ð´Ð»Ñ Ñ€Ð¸Ð´Ð° или пары.</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="210"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="212"/> <source>Colorspace</source> <translation>Цвета</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="211"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="213"/> <source>When -C is specified, read sequences are treated as colors. Colors may be encoded either as numbers (0=blue, 1=green, 2=orange, 3=red) or as characters A/C/G/T (A=blue, C=green, G=orange, T=red).</source> <translation>Когда -С указано, поÑледовательноÑти раÑÑматриваютÑÑ ÐºÐ°Ðº цвета. Цвета могут быть закодированы либо как номера (0 = Ñиний, 1 = зеленый, 2 = оранжевый, 3 = краÑный) или Ñимволов A / C / G / T (A = Ñиний, С = зеленый, G = оранжевый, Т = краÑный).</translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="248"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="250"/> <source>Map Reads with Bowtie</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/bowtie/BowtieWorker.cpp" line="249"/> + <location filename="../src/bowtie/BowtieWorker.cpp" line="251"/> <source>Bowtie is a program for mapping short DNA sequence reads to a long reference sequence. It uses Burrows-Wheeler techniques extended with quality-aware backtracking algorithm that permits mismatches.<br/><br/>Provide URL(s) to FASTA or FASTQ file(s) with NGS reads to the input port of the element, set up the reference sequence in the parameters. The result is saved to the specified SAM file, URL to the file is passed to the output port.</source> <translation type="unfinished"></translation> </message> @@ -7315,192 +7827,202 @@ bowtie медленнее, когда указан режим --best.</translati <context> <name>U2::LocalWorkflow::BwaMemWorker</name> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="139"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="156"/> <source>Number of threads</source> <translation>ЧиÑло потоков</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="140"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="157"/> <source>Number of threads (-t).</source> <translation>чиÑло потоков (-t).</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="143"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="160"/> <source>Min seed length</source> <translation>ÐœÐ¸Ð½Ð¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ Ð´Ð»Ð¸Ð½Ð° затравки</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="144"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="161"/> <source>Path to indexed reference genome (-k).</source> <translation>Путь до индекÑированного референÑного генома (-k).</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="147"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="164"/> <source>Index algorithm</source> <translation>Ðлгоритм</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="148"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="165"/> <source>Index algorithm (-a).</source> <translation>Ðлгоритм (-а).</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="151"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="168"/> <source>Band width</source> <translation>Ширина полоÑÑ‹</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="152"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="169"/> <source>Band width for banded alignment (-w).</source> <translation>Ширина полоÑÑ‹ Ð´Ð»Ñ Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ (-w).</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="155"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="172"/> <source>Dropoff</source> <translation>Снижение</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="156"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="173"/> <source>Off-diagonal X-dropoff (-d).</source> <translation>Снижение (-d).</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="159"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="176"/> <source>Internal seed length</source> <translation>ВнутреннÑÑ Ð´Ð»Ð¸Ð½Ð° затравки</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="160"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="177"/> <source>Look for internal seeds inside a seed longer than {-k} (-r).</source> <translation>ПоиÑк внутренние затравки внутри затравки длиннее чем {-k} * (-r).</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="163"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="180"/> <source>Skip seed threshold</source> <translation>Порог затравки</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="164"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="181"/> <source>Skip seeds with more than INT occurrences (-c).</source> <translation>ПропуÑкает затравки Ñ Ð±Ð¾Ð»ÐµÐµ чем Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð½Ñ‹Ð¼ количеÑтвом вхождений (-c).</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="167"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="184"/> <source>Drop chain threshold</source> <translation>Порог ÑÐ½Ð¸Ð¶ÐµÐ½Ð¸Ñ Ñ†ÐµÐ¿Ð¸</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="168"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="185"/> <source>Drop chains shorter than FLOAT fraction of the longest overlapping chain (-D).</source> <translation>Снижение цепи короче FLOAT фракции Ñамого длинного Ð¿ÐµÑ€ÐµÐºÑ€Ñ‹Ñ‚Ð¸Ñ Ñ†ÐµÐ¿Ð¸ (-D).</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="171"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="188"/> <source>Rounds of mate rescues</source> <translation>Округление за оÑвобождение учаÑтника</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="172"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="189"/> <source>Perform at most INT rounds of mate rescues for each read (-m).</source> <translation>ВыполнÑет Ð´Ð»Ñ Ð±Ð¾Ð»ÑŒÑˆÐ¸Ð½Ñтва INT округлений оÑвобождений учаÑтников Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ рида (-m).</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="175"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="192"/> <source>Skip mate rescue</source> <translation>ПропуÑтить оÑвобождение учаÑтника</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="176"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="193"/> <source>Skip mate rescue (-S).</source> <translation>ПропуÑтить оÑвобождение учаÑтника (-S).</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="179"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="196"/> <source>Skip pairing</source> <translation>ПропуÑтить Ñпаривание</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="180"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="197"/> <source>Skip pairing; mate rescue performed unless -S also in use (-P).</source> <translation>ПропуÑтить Ñпаривание; учаÑтник оÑвобождаетÑÑ ÐºÑ€Ð¾Ð¼Ðµ ÑÐ»ÑƒÑ‡Ð°Ñ ÐºÐ¾Ð³Ð´Ð° -S также иÑпользуетÑÑ (-P).</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="183"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="200"/> <source>Matching score</source> <translation>ВеÑа Ñовпадений</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="187"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="204"/> <source>Mismatch penalty</source> <translation>Штраф за неÑовпадение</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="258"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="275"/> <source>Map Reads with BWA-MEM</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="259"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="276"/> <source>Burrows-Wheeler Alignment (BWA) is a program for mapping short DNA sequence reads to a long reference sequence. This element runs "BWA-MEM" algorithm of the program. The algorithm is designed for sequence reads from 70bp to 1Mbp.<br/><br/>Provide URL(s) to FASTA or FASTQ file(s) with NGS reads to the input port of the element, set up the reference sequence in the parameters. The result is saved to the specified SAM file, URL to the file is passed to the output port.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="184"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="201"/> <source>Score for a sequence match (-A).</source> <translation>Ð’ÐµÑ ÑÐ¾Ð²Ð¿Ð°Ð´ÐµÐ½Ð¸Ñ (-A).</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="188"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="152"/> + <source>BWA index folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/bwa/BwaMemWorker.cpp" line="153"/> + <source>BWA index basename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/bwa/BwaMemWorker.cpp" line="205"/> <source>Penalty for a mismatch (-B).</source> <translation>Штраф за неÑовпадение (-B).</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="191"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="208"/> <source>Gap open penalty</source> <translation>Штраф за открытие пробела</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="192"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="209"/> <source>Gap open penalty (-O).</source> <translation>Штраф за открытие пробела (-O).</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="195"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="212"/> <source>Gap extension penalty</source> <translation>Штраф за промежуточный пробел</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="196"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="213"/> <source>Gap extension penalty; a gap of size k cost {-O} (-E).</source> <translation>Штраф за раÑширение пробела; пробел размера k Ñтоит {-O} (-E).</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="199"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="216"/> <source>Penalty for clipping</source> <translation>Штраф за отÑечение</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="200"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="217"/> <source>Penalty for clipping (-L).</source> <translation>Штраф за отÑечение (-L).</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="203"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="220"/> <source>Penalty unpaired</source> <translation>Штраф за непарные риды</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="204"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="221"/> <source>Penalty for an unpaired read pair (-U).</source> <translation>Штраф за непарные риды (-U).</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="207"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="224"/> <source>Score threshold</source> <translation>Порог оценки</translation> </message> <message> - <location filename="../src/bwa/BwaMemWorker.cpp" line="208"/> + <location filename="../src/bwa/BwaMemWorker.cpp" line="225"/> <source>Minimum score to output (-T).</source> <translation>ÐœÐ¸Ð½Ð¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ Ð¾Ñ†ÐµÐ½ÐºÐ° Ð´Ð»Ñ Ð²Ñ‹Ð²Ð¾Ð´Ð° (-T).</translation> </message> @@ -7516,218 +8038,228 @@ bowtie медленнее, когда указан режим --best.</translati <context> <name>U2::LocalWorkflow::BwaWorker</name> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="135"/> + <location filename="../src/bwa/BwaWorker.cpp" line="133"/> + <source>BWA index folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/bwa/BwaWorker.cpp" line="134"/> + <source>BWA index basename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/bwa/BwaWorker.cpp" line="137"/> <source>Use missing prob</source> <translation>ИÑпользовать долю потери</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="136"/> + <location filename="../src/bwa/BwaWorker.cpp" line="138"/> <source>Use missing prob instead maximum edit distance.</source> <translation>ИÑпользовать долю потери вмеÑто макÑимального раÑÑтоÑÐ½Ð¸Ñ Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ.</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="139"/> + <location filename="../src/bwa/BwaWorker.cpp" line="141"/> <source>Max #diff</source> <translation>МакÑимальное раÑÑтоÑние редактированиÑ</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="140"/> + <location filename="../src/bwa/BwaWorker.cpp" line="142"/> <source>Max #diff (-n)</source> <translation>МакÑимальное раÑÑтоÑние Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ (-n)</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="143"/> + <location filename="../src/bwa/BwaWorker.cpp" line="145"/> <source>Missing prob</source> <translation>Ð”Ð¾Ð»Ñ Ð¿Ð¾Ñ‚ÐµÑ€Ð¸</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="144"/> + <location filename="../src/bwa/BwaWorker.cpp" line="146"/> <source>Missing prob (-n)</source> <translation>Ð”Ð¾Ð»Ñ Ð¿Ð¾Ñ‚ÐµÑ€Ð¸ (-n)</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="147"/> + <location filename="../src/bwa/BwaWorker.cpp" line="149"/> <source>Seed length</source> <translation>Длина затравки</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="148"/> + <location filename="../src/bwa/BwaWorker.cpp" line="150"/> <source>Seed length (-l).</source> <translation>Длина затравки (-l).</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="151"/> + <location filename="../src/bwa/BwaWorker.cpp" line="153"/> <source>Max gap opens</source> <translation>МакÑимальное чиÑло пробелов</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="152"/> + <location filename="../src/bwa/BwaWorker.cpp" line="154"/> <source>Max gap opens (-o).</source> <translation>МакÑимальное чиÑло пробелов (-o).</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="155"/> + <location filename="../src/bwa/BwaWorker.cpp" line="157"/> <source>Index algorithm</source> <translation>Ðлгоритм</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="156"/> + <location filename="../src/bwa/BwaWorker.cpp" line="158"/> <source>Index algorithm (-a).</source> <translation>Ðлгоритм (-а).</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="159"/> + <location filename="../src/bwa/BwaWorker.cpp" line="161"/> <source>Best hits</source> <translation>Лучшие попытки</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="160"/> + <location filename="../src/bwa/BwaWorker.cpp" line="162"/> <source>Best hits (-R).</source> <translation>Лучшие попытки (-R).</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="163"/> + <location filename="../src/bwa/BwaWorker.cpp" line="165"/> <source>Long-scaled gap penalty for long deletions</source> <translation>ДолгоÑрочный штраф за длительный пробел</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="164"/> + <location filename="../src/bwa/BwaWorker.cpp" line="166"/> <source>Long-scaled gap penalty for long deletions (-L)</source> <translation>ДолгоÑрочный штраф за длительный пробел (-L)</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="167"/> + <location filename="../src/bwa/BwaWorker.cpp" line="169"/> <source>Non iterative mode</source> <translation>Ðеитеративный режим</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="168"/> + <location filename="../src/bwa/BwaWorker.cpp" line="170"/> <source>Non iterative mode (-N).</source> <translation>Ðеитеративный режим (-N).</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="171"/> - <location filename="../src/bwa/BwaWorker.cpp" line="172"/> + <location filename="../src/bwa/BwaWorker.cpp" line="173"/> + <location filename="../src/bwa/BwaWorker.cpp" line="174"/> <source>Enable long gaps</source> <translation>ДопуÑтимы длинные пробелы</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="175"/> + <location filename="../src/bwa/BwaWorker.cpp" line="177"/> <source>Max gap extensions</source> <translation>МакÑимальное раÑширение пробела</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="176"/> + <location filename="../src/bwa/BwaWorker.cpp" line="178"/> <source>Max gap extensions (-e)</source> <translation>МакÑимальное раÑширение пробела (-e)</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="179"/> + <location filename="../src/bwa/BwaWorker.cpp" line="181"/> <source>Indel offset</source> <translation>Смещение</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="180"/> + <location filename="../src/bwa/BwaWorker.cpp" line="182"/> <source>Indel offset (-i)</source> <translation>Смещение (-i)</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="183"/> + <location filename="../src/bwa/BwaWorker.cpp" line="185"/> <source>Max long deletions extensions</source> <translation>МакÑÐ¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ Ð´Ð»Ð¸Ð½Ð° ÑÐ¾ÐºÑ€Ð°ÑˆÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¾Ð¿ÑƒÑка</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="184"/> + <location filename="../src/bwa/BwaWorker.cpp" line="186"/> <source>Max long deletions extensions(-d)</source> <translation>МакÑÐ¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ Ð´Ð»Ð¸Ð½Ð° ÑÐ¾ÐºÑ€Ð°ÑˆÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¾Ð¿ÑƒÑка (-d)</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="187"/> + <location filename="../src/bwa/BwaWorker.cpp" line="189"/> <source>Max queue entries</source> <translation>МакÑимальное чиÑло запиÑей в очереди</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="188"/> + <location filename="../src/bwa/BwaWorker.cpp" line="190"/> <source>Max queue entries (-m)</source> <translation>МакÑимальное чиÑло запиÑей в очереди (-m)</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="191"/> + <location filename="../src/bwa/BwaWorker.cpp" line="193"/> <source>Barcode length</source> <translation>Длина штрих-кода</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="192"/> + <location filename="../src/bwa/BwaWorker.cpp" line="194"/> <source>Barcode length (-B)</source> <translation>Длина штрих-кода (-B)</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="195"/> + <location filename="../src/bwa/BwaWorker.cpp" line="197"/> <source>Threads</source> <translation>Потоки</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="196"/> + <location filename="../src/bwa/BwaWorker.cpp" line="198"/> <source>Threads (-t)</source> <translation>Потоки (-t)</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="199"/> + <location filename="../src/bwa/BwaWorker.cpp" line="201"/> <source>Max seed differencies</source> <translation>МакÑимальное различие затравок</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="200"/> + <location filename="../src/bwa/BwaWorker.cpp" line="202"/> <source>Max seed differencies (-k)</source> <translation>МакÑимальное различие затравок (-k)</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="203"/> + <location filename="../src/bwa/BwaWorker.cpp" line="205"/> <source>Mismatch penalty</source> <translation>Штраф за неÑовпадение</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="204"/> + <location filename="../src/bwa/BwaWorker.cpp" line="206"/> <source>Mismatch penalty (-M)</source> <translation>Штраф за неÑовпадение (-M)</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="207"/> + <location filename="../src/bwa/BwaWorker.cpp" line="209"/> <source>Gap open penalty</source> <translation>Штраф за открытие пробела</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="208"/> + <location filename="../src/bwa/BwaWorker.cpp" line="210"/> <source>Gap open penalty (-O).</source> <translation>Штраф за открытие пробела (-O).</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="211"/> + <location filename="../src/bwa/BwaWorker.cpp" line="213"/> <source>Gap extension penalty</source> <translation>Штраф за промежуточный пробел</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="212"/> + <location filename="../src/bwa/BwaWorker.cpp" line="214"/> <source>Gap extension penalty; a gap of size k cost (-E).</source> <translation>Штраф за раÑширение пробела; пробел размера k Ñтоит (-E).</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="215"/> + <location filename="../src/bwa/BwaWorker.cpp" line="217"/> <source>Quolity threshold</source> <translation>Порог качеÑтва</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="216"/> + <location filename="../src/bwa/BwaWorker.cpp" line="218"/> <source>Quolity threshold (-q).</source> <translation>Порог качеÑтва (-q).</translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="282"/> + <location filename="../src/bwa/BwaWorker.cpp" line="284"/> <source>Map Reads with BWA</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/bwa/BwaWorker.cpp" line="283"/> + <location filename="../src/bwa/BwaWorker.cpp" line="285"/> <source>Burrows-Wheeler Alignment (BWA) is a program for mapping short DNA sequence reads to a long reference sequence. This element runs "BWA-backtrack" algorithm of the program. The algorithm is designed for Illumina sequence reads up to 100bp.<br/><br/>Provide URL(s) to FASTA or FASTQ file(s) with NGS reads to the input port of the element, set up the reference sequence in the parameters. The result is saved to the specified SAM file, URL to the file is passed to the output port.</source> <translation type="unfinished"></translation> </message> @@ -8007,9 +8539,13 @@ bowtie медленнее, когда указан режим --best.</translati <translation>Выходной файл Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ñми</translation> </message> <message> - <location filename="../src/ceas/CEASReportWorker.cpp" line="242"/> <source>Name of tab-delimited output text file, containing a row of annotations for every RefSeq gene. (file is not generated if no peak location data is supplied).</source> - <translation>Ðазвание Ð´Ð»Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ текÑтового файла, Ñодержащего Ñтроки аннотации Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ гена RefSeq. (файл не генерируетÑÑ, еÑли нет пиков).</translation> + <translation type="vanished">Ðазвание Ð´Ð»Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ текÑтового файла, Ñодержащего Ñтроки аннотации Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ гена RefSeq. (файл не генерируетÑÑ, еÑли нет пиков).</translation> + </message> + <message> + <location filename="../src/ceas/CEASReportWorker.cpp" line="242"/> + <source>Name of tab-delimited output text file, containing a row of annotations for every RefSeq gene. (file is not generated if no peak location data are supplied).</source> + <translation type="unfinished"></translation> </message> <message> <location filename="../src/ceas/CEASReportWorker.cpp" line="245"/> @@ -9169,7 +9705,7 @@ bowtie медленнее, когда указан режим --best.</translati </message> <message> <location filename="../src/cutadapt/CutadaptWorker.cpp" line="125"/> - <source>A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extention.</source> + <source>A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extension.</source> <translation>Ð˜Ð¼Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ файла. По умолчанию будет иÑпользовано Ð¸Ð¼Ñ Ð¿ÐµÑ€Ð²Ð¾Ð³Ð¾ файла Ñ ÑоответÑтвующим раÑширением.</translation> </message> <message> @@ -9233,17 +9769,17 @@ bowtie медленнее, когда указан режим --best.</translati <context> <name>U2::LocalWorkflow::FastQCPrompter</name> <message> - <location filename="../src/fastqc/FastqcWorker.cpp" line="78"/> + <location filename="../src/fastqc/FastqcWorker.cpp" line="81"/> <source>unset</source> <translation>не указан</translation> </message> <message> - <location filename="../src/fastqc/FastqcWorker.cpp" line="79"/> + <location filename="../src/fastqc/FastqcWorker.cpp" line="82"/> <source> from <u>%1</u></source> <translation> из <u>%1</u></translation> </message> <message> - <location filename="../src/fastqc/FastqcWorker.cpp" line="81"/> + <location filename="../src/fastqc/FastqcWorker.cpp" line="84"/> <source>Builds FastQC report for file(s) %1.</source> <translation>Строит отчет FastQC Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð² %1.</translation> </message> @@ -9251,80 +9787,95 @@ bowtie медленнее, когда указан режим --best.</translati <context> <name>U2::LocalWorkflow::FastQCWorker</name> <message> - <location filename="../src/fastqc/FastqcWorker.cpp" line="88"/> + <location filename="../src/fastqc/FastqcWorker.cpp" line="91"/> <source>FastQC Quality Control</source> <translation>Контроль качеÑтва (FastQC)</translation> </message> <message> - <location filename="../src/fastqc/FastqcWorker.cpp" line="89"/> + <location filename="../src/fastqc/FastqcWorker.cpp" line="92"/> <source>Builds quality control reports.</source> <translation>Ñтот Ñлемент Ñоздаёт отчёты по результатам ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»Ñ ÐºÐ°Ñ‡ÐµÑтва.</translation> </message> <message> - <location filename="../src/fastqc/FastqcWorker.cpp" line="93"/> + <location filename="../src/fastqc/FastqcWorker.cpp" line="96"/> <source>Short reads</source> <translation>Короткие риды</translation> </message> <message> - <location filename="../src/fastqc/FastqcWorker.cpp" line="94"/> + <location filename="../src/fastqc/FastqcWorker.cpp" line="97"/> <source>Short read data</source> <translation>Короткие риды</translation> </message> <message> - <location filename="../src/fastqc/FastqcWorker.cpp" line="105"/> + <location filename="../src/fastqc/FastqcWorker.cpp" line="108"/> <source>Output folder</source> <translation>Ð’Ñ‹Ñ…Ð¾Ð´Ð½Ð°Ñ Ð¿Ð°Ð¿ÐºÐ°</translation> </message> <message> - <location filename="../src/fastqc/FastqcWorker.cpp" line="106"/> + <location filename="../src/fastqc/FastqcWorker.cpp" line="109"/> <source>Select an output folder. <b>Custom</b> - specify the output folder in the 'Custom folder' parameter. <b>Workflow</b> - internal workflow folder. <b>Input file</b> - the folder of the input file.</source> <translation>выберите выходную папку. <b>ЧаÑтнаÑ</b> - укажите папку в параметре 'ЧаÑÑ‚Ð½Ð°Ñ Ð¿Ð°Ð¿ÐºÐ°'. <b>ЗаданнаÑ</b> - внутреннÑÑ Ð¿Ð°Ð¿ÐºÐ° дизайнера. <b>Входной файл</b> - папка входного файла.</translation> </message> <message> - <location filename="../src/fastqc/FastqcWorker.cpp" line="110"/> + <location filename="../src/fastqc/FastqcWorker.cpp" line="113"/> + <source>Output file</source> + <translation type="unfinished">Выходной файл</translation> + </message> + <message> + <location filename="../src/fastqc/FastqcWorker.cpp" line="114"/> + <source>Specify the output file name.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/fastqc/FastqcWorker.cpp" line="116"/> <source>Custom folder</source> <translation>ЧаÑÑ‚Ð½Ð°Ñ Ð¿Ð°Ð¿ÐºÐ°</translation> </message> <message> - <location filename="../src/fastqc/FastqcWorker.cpp" line="111"/> + <location filename="../src/fastqc/FastqcWorker.cpp" line="117"/> <source>Select the custom output folder.</source> <translation>Укажите чаÑтную выходную папку.</translation> </message> <message> - <location filename="../src/fastqc/FastqcWorker.cpp" line="113"/> + <location filename="../src/fastqc/FastqcWorker.cpp" line="119"/> <source>List of adapters</source> <translation>СпиÑок адаптеров</translation> </message> <message> - <location filename="../src/fastqc/FastqcWorker.cpp" line="114"/> - <source>Specifies a non-default file which contains the list of adapter sequences which will be explicity searched against the library. The file must contain sets of named adapters in the form name[tab]sequence. Lines prefixed with a hash will be ignored.</source> + <location filename="../src/fastqc/FastqcWorker.cpp" line="120"/> + <source>Specifies a non-default file which contains the list of adapter sequences which will be explicitly searched against the library. The file must contain sets of named adapters in the form name[tab]sequence. Lines prefixed with a hash will be ignored.</source> <translation>добавить произвольный файл Ñо ÑпиÑком адаптеров, Ð´Ð»Ñ ÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ñ… будет проведён поиÑк в данных.</translation> </message> <message> - <location filename="../src/fastqc/FastqcWorker.cpp" line="119"/> + <location filename="../src/fastqc/FastqcWorker.cpp" line="125"/> <source>List of contaminants</source> <translation>СпиÑок контаминирующих поÑледовательноÑтей</translation> </message> <message> - <location filename="../src/fastqc/FastqcWorker.cpp" line="120"/> + <location filename="../src/fastqc/FastqcWorker.cpp" line="126"/> <source>Specifies a non-default file which contains the list of contaminants to screen overrepresented sequences against. The file must contain sets of named contaminants in the form name[tab]sequence. Lines prefixed with a hash will be ignored.</source> <translation>добавить произвольный файл Ñо контаминирующих поÑледовательноÑтей, в которых будет проведён поиÑк ÑверхпредÑтваленных поÑледовательноÑтей.</translation> </message> <message> - <location filename="../src/fastqc/FastqcWorker.cpp" line="140"/> + <location filename="../src/fastqc/FastqcWorker.cpp" line="146"/> <source>Input file</source> <translation>Входной файл</translation> </message> <message> - <location filename="../src/fastqc/FastqcWorker.cpp" line="141"/> + <location filename="../src/fastqc/FastqcWorker.cpp" line="147"/> <source>Workflow</source> <translation>Схема</translation> </message> <message> - <location filename="../src/fastqc/FastqcWorker.cpp" line="142"/> + <location filename="../src/fastqc/FastqcWorker.cpp" line="148"/> <source>Custom</source> <translation>ЧаÑтный</translation> </message> + <message> + <location filename="../src/fastqc/FastqcWorker.cpp" line="160"/> + <source>Auto</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>U2::LocalWorkflow::GenomecovPrompter</name> @@ -9411,7 +9962,7 @@ bowtie медленнее, когда указан режим --best.</translati </message> <message> <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="510"/> - <source>A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extention.</source> + <source>A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extension.</source> <translation>Ð˜Ð¼Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ файла. По умолчанию будет иÑпользовано Ð¸Ð¼Ñ Ð¿ÐµÑ€Ð²Ð¾Ð³Ð¾ файла Ñ ÑоответÑтвующим раÑширением.</translation> </message> <message> @@ -9777,17 +10328,17 @@ bowtie медленнее, когда указан режим --best.</translati <context> <name>U2::LocalWorkflow::IlluminaClipAdditionalSettingsDialog</name> <message> - <location filename="../src/trimmomatic/steps/IlluminaClipStep.cpp" line="261"/> + <location filename="../src/trimmomatic/steps/IlluminaClipStep.cpp" line="266"/> <source>Apply</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/trimmomatic/steps/IlluminaClipStep.cpp" line="263"/> + <location filename="../src/trimmomatic/steps/IlluminaClipStep.cpp" line="268"/> <source>True</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/trimmomatic/steps/IlluminaClipStep.cpp" line="264"/> + <location filename="../src/trimmomatic/steps/IlluminaClipStep.cpp" line="269"/> <source>False</source> <translation type="unfinished"></translation> </message> @@ -9795,7 +10346,7 @@ bowtie медленнее, когда указан режим --best.</translati <context> <name>U2::LocalWorkflow::IlluminaClipSettingsWidget</name> <message> - <location filename="../src/trimmomatic/steps/IlluminaClipStep.cpp" line="236"/> + <location filename="../src/trimmomatic/steps/IlluminaClipStep.cpp" line="241"/> <source>Open FASTA with adapters</source> <translation type="unfinished"></translation> </message> @@ -9803,7 +10354,7 @@ bowtie медленнее, когда указан режим --best.</translati <context> <name>U2::LocalWorkflow::IlluminaClipStep</name> <message> - <location filename="../src/trimmomatic/steps/IlluminaClipStep.cpp" line="43"/> + <location filename="../src/trimmomatic/steps/IlluminaClipStep.cpp" line="47"/> <source><html><head></head><body><h4>ILLUMINACLIP</h4><p>This step is used to find and remove Illumina adapters.</p><p>Trimmomatic first compares short sections of an adapter and a read. If they match enough, the entire alignment between the read and adapter is scored. For paired-end reads, the "palindrome" approach is also used to improve the result. See Trimmomatic manual for details.</p><p>Input the following values:</p><ul><li><b>Adapter sequences</b>: a FASTA file with the adapter sequences. Files for TruSeq2 (GAII machines), TruSeq3 (HiSeq and MiSeq machines) and Nextera kits for SE and PE reads are now available by default. The naming of the various sequences within the specified file determines how they are used.</li><li><b>Seed mismatches</b>: the maximum mismatch count in short sections which will still allow a full match to be performed.</li><li><b>Simple clip threshold</b>: a threshold for simple alignment mode. Values between 7 and 15 are recommended. A perfect match of a 12 base sequence will score just over 7, while 25 bases are needed to score 15.</li><li><b>Palindrome clip threshold</b>: a threshold for palindrome alignment mode. For palindromic matches, a longer alignment is possible. Therefore the threshold can be in the range of 30. Even though this threshold is very high (requiring a match of almost 50 bases) Trimmomatic is still able to identify very, very short adapter fragments.</li></ul><p>There are also two optional parameters for palindrome mode: <b>Min adapter length</b> and <b>Keep both reads</b>.</body></html></source> <translation type="unfinished"></translation> </message> @@ -10618,22 +11169,27 @@ bowtie медленнее, когда указан режим --best.</translati <context> <name>U2::LocalWorkflow::ShortReadsAlignerPrompter</name> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="398"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="429"/> <source>unset</source> <translation>не указан</translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="404"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="435"/> <source>Aligns upstream oriented reads from <u>%1</u> and downstream oriented reads from <u>%2</u> </source> <translation>Выравнивает верховые риды из <u>%1</u> и низовые риды из <u>%2</u> </translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="406"/> - <source>Maps reads from <u>%1</u> </source> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="437"/> + <source>Maps input reads from <u>%1</u> </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="443"/> + <source> to reference sequence with index <u>%1</u>.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="410"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="446"/> <source> to reference sequence <u>%1</u>.</source> <translation type="unfinished"></translation> </message> @@ -10731,7 +11287,7 @@ bowtie медленнее, когда указан режим --best.</translati </message> <message> <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="122"/> - <source>A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extention.</source> + <source>A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extension.</source> <translation>Ð˜Ð¼Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ файла. По умолчанию будет иÑпользовано Ð¸Ð¼Ñ Ð¿ÐµÑ€Ð²Ð¾Ð³Ð¾ файла Ñ ÑоответÑтвующим раÑширением.</translation> </message> <message> @@ -10756,7 +11312,7 @@ bowtie медленнее, когда указан режим --best.</translati </message> <message> <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="130"/> - <source>Substract from start</source> + <source>Subtract from start</source> <translation>ВычеÑÑ‚ÑŒ из начала</translation> </message> <message> @@ -10810,7 +11366,7 @@ bowtie медленнее, когда указан режим --best.</translati </message> <message> <location filename="../src/bedtools/BedToolsWorkersLibrary.cpp" line="146"/> - <source>Remove lines with start postion greater than end position</source> + <source>Remove lines with start position greater than end position</source> <translation>УдалÑет линии, в которых ÑÑ‚Ð°Ñ€Ñ‚Ð¾Ð²Ð°Ñ Ð¿Ð¾Ð·Ð¸Ñ†Ð¸Ñ Ð±Ð¾Ð»ÑŒÑˆÐ¸ конечной позиции</translation> </message> <message> @@ -10855,32 +11411,24 @@ bowtie медленнее, когда указан режим --best.</translati <translation>Выбрать геном</translation> </message> <message> - <location filename="../src/snpeff/SnpEffDatabaseDelegate.cpp" line="123"/> + <location filename="../src/snpeff/SnpEffDatabaseDelegate.cpp" line="122"/> <source>%1 and %2</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/snpeff/SnpEffDatabaseDelegate.cpp" line="124"/> - <source>The list of %1 genomes is not available. -Path for %1 and %2 tools are not selected.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../src/snpeff/SnpEffDatabaseDelegate.cpp" line="125"/> - <source>Do you want to select them now?</source> + <location filename="../src/snpeff/SnpEffDatabaseDelegate.cpp" line="123"/> + <source>The list of genomes is not available. +Make sure %1 and %2 tools are set in the UGENE Application Settings and can be validated.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/snpeff/SnpEffDatabaseDelegate.cpp" line="129"/> - <location filename="../src/snpeff/SnpEffDatabaseDelegate.cpp" line="132"/> - <source>The list of %1 genomes is not available. -Path for %1 tool is not selected.</source> + <location filename="../src/snpeff/SnpEffDatabaseDelegate.cpp" line="124"/> + <source>Do you want to do it now?</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/snpeff/SnpEffDatabaseDelegate.cpp" line="134"/> <source>Do you want to select it now?</source> - <translation>Выбрать ÑейчаÑ?</translation> + <translation type="vanished">Выбрать ÑейчаÑ?</translation> </message> </context> <context> @@ -11048,60 +11596,56 @@ Path for %1 tool is not selected.</source> <context> <name>U2::LocalWorkflow::SpadesPrompter</name> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="342"/> <source>unset</source> - <translation>не указан</translation> + <translation type="vanished">не указан</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="345"/> <source>Assemble reads from <u>%1</u>.</source> - <translation>Собирает риды из <u>%1</u>.</translation> + <translation type="vanished">Собирает риды из <u>%1</u>.</translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="615"/> + <source>Assemble de novo the input data into contigs and scaffolds.</source> + <translation type="unfinished"></translation> </message> </context> <context> <name>U2::LocalWorkflow::SpadesWorker</name> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="216"/> <source>SPAdes cannot recognize read pairs from the same file. Please, perform demultiplexing first.</source> - <translation>SPAdes cannot recognize read pairs from the same file. Please, perform demultiplexing first.</translation> + <translation type="vanished">SPAdes cannot recognize read pairs from the same file. Please, perform demultiplexing first.</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="230"/> <source>URL of a file with reads</source> - <translation>Путь до файла Ñ Ñ€Ð¸Ð´Ð°Ð¼Ð¸</translation> + <translation type="vanished">Путь до файла Ñ Ñ€Ð¸Ð´Ð°Ð¼Ð¸</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="231"/> <source>Input reads to be assembled.</source> - <translation>Входные риды будут Ñобраны.</translation> + <translation type="vanished">Входные риды будут Ñобраны.</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="233"/> <source>URL of a file with right pair reads</source> - <translation>Путь до файла Ñ Ñ€Ð¸Ð´Ð°Ð¼Ð¸ правой пары</translation> + <translation type="vanished">Путь до файла Ñ Ñ€Ð¸Ð´Ð°Ð¼Ð¸ правой пары</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="234"/> <source>Input right pair reads to be assembled.</source> - <translation>Выходные риды правой пары будут Ñобраны.</translation> + <translation type="vanished">Выходные риды правой пары будут Ñобраны.</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="240"/> <source>SPAdes data</source> - <translation>Данные SPAdes</translation> + <translation type="vanished">Данные SPAdes</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="241"/> <source>Input reads to be assembled with Spades.</source> - <translation>Входные риды будут Ñобраны при помощи Spades.</translation> + <translation type="vanished">Входные риды будут Ñобраны при помощи Spades.</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="249"/> + <location filename="../src/spades/SpadesWorker.cpp" line="457"/> <source>Scaffolds URL</source> <translation>Путь до Scaffolds</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="250"/> + <location filename="../src/spades/SpadesWorker.cpp" line="458"/> <source>Output scaffolds URL.</source> <translation>Путь до выходногог scaffolds.</translation> </message> @@ -11110,81 +11654,193 @@ Path for %1 tool is not selected.</source> <translation type="vanished">Выходные данные SPAdes</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="254"/> + <location filename="../src/spades/SpadesWorker.cpp" line="264"/> + <source>Incorrect input data</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="268"/> + <source>Incorrect port values</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="346"/> + <source>Some input data elements sent data while some elements already finished their work. Check that all input data elements have the same datasets quantity.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="418"/> + <source>Input %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="419"/> + <source>Input %1 to be assembled with SPAdes.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="425"/> + <source>File URL 1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="426"/> + <source>File URL 1.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="434"/> + <source>File URL 2</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="435"/> + <source>File URL 2.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="461"/> + <source>Contigs URL</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="462"/> + <source>Output contigs URL.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="466"/> <source>Output assembly files.</source> <translation>Выходные файлы Ñборки.</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="265"/> + <location filename="../src/spades/SpadesWorker.cpp" line="478"/> + <source>Input data</source> + <translation type="unfinished">Входные данные</translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="497"/> <source>Output folder</source> <translation>Ð’Ñ‹Ñ…Ð¾Ð´Ð½Ð°Ñ Ð¿Ð°Ð¿ÐºÐ°</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="266"/> + <location filename="../src/spades/SpadesWorker.cpp" line="498"/> <source>Folder to save Spades output files.</source> <translation>Папка Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ñ‹Ñ… файлов Spades.</translation> </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="505"/> + <source>Memory limit</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="510"/> + <source>Select the input dataset type: standard isolate (the default value) or multiple displacement amplification (corresponds to --sc).</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="514"/> + <source>By default, SPAdes performs both read error correction and assembly. You can select leave one of only (corresponds to --only-assembler, --only-error-correction).<br><br> Error correction is performed using BayesHammer module in case of Illumina input reads and IonHammer in case of IonTorrent data. Note that you should not use error correction in case input reads do not have quality information(e.g. FASTA input files are provided).</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="581"/> + <source>In general, SPAdes (St. Petersburg genome assembler) is an assembly toolkit containing various assembly pipelines. This workflow element provides GUI for the main SPAdes executable script. One can specify Illumina, IonTorrent or PacBio reads as input. Hybrid assemblies are also possible, for example, with Oxford Nanopore or Sanger reads.<br><br> To use the element, configure the type of input in the "Input data" parameter. The corresponding input ports will appear on the element. Provide URL(s) to the corresponding FASTA or FASTQ file(s) to these ports.</source> + <translation type="unfinished"></translation> + </message> <message> <source>folder to save Spades output files.</source> <translation type="vanished">Папка Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ñ‹Ñ… файлов Spades.</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="253"/> + <location filename="../src/spades/SpadesWorker.cpp" line="465"/> <source>Output File</source> <translation type="unfinished">Выходной файл</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="269"/> + <location filename="../src/spades/SpadesWorker.cpp" line="501"/> <source>Number of threads</source> <translation>ЧиÑло потоков</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="270"/> + <location filename="../src/spades/SpadesWorker.cpp" line="502"/> <source>Number of threads (-t).</source> <translation>чиÑло потоков (-t).</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="273"/> <source>Memory limit (GB)</source> - <translation>Предел памÑти (GB)</translation> + <translation type="vanished">Предел памÑти (GB)</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="274"/> + <location filename="../src/spades/SpadesWorker.cpp" line="506"/> <source>Memory limit (-m).</source> <translation>Предел памÑти (-m).</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="277"/> + <location filename="../src/spades/SpadesWorker.cpp" line="509"/> <source>Dataset type</source> <translation>Тип набора данных</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="278"/> <source>Input dataset type.</source> - <translation>Тип входного набора данных.</translation> + <translation type="vanished">Тип входного набора данных.</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="281"/> + <location filename="../src/spades/SpadesWorker.cpp" line="513"/> <source>Running mode</source> <translation>Режим запуÑка</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="282"/> <source>Running mode.</source> - <translation>режим запуÑка.</translation> + <translation type="vanished">режим запуÑка.</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="285"/> + <location filename="../src/spades/SpadesWorker.cpp" line="519"/> <source>K-mers</source> <translation>K-mers</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="286"/> + <location filename="../src/spades/SpadesWorker.cpp" line="520"/> <source>k-mer sizes (-k).</source> <translation>Размеры k-mer (-k).</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="321"/> + <location filename="../src/spades/SpadesWorker.cpp" line="552"/> + <source>Auto</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="560"/> + <source> Gb</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="566"/> + <source>Standard isolate</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="567"/> + <source>MDA single-cell</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="571"/> + <source>Error correction and assembly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="572"/> + <source>Assembly only</source> + <translation type="unfinished">Только Ñборка</translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="573"/> + <source>Error correction only</source> + <translation type="unfinished">Только иÑправление ошибок</translation> + </message> + <message> + <location filename="../src/spades/SpadesWorker.cpp" line="580"/> <source>Assemble Reads with SPAdes</source> <translation type="unfinished"></translation> </message> @@ -11193,9 +11849,8 @@ Path for %1 tool is not selected.</source> <translation type="vanished">Сборка геномов Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ SPAdes</translation> </message> <message> - <location filename="../src/spades/SpadesWorker.cpp" line="322"/> <source>Performes assembly of input short reads.</source> - <translation>Производит Ñборку входных коротких ридов.</translation> + <translation type="vanished">Производит Ñборку входных коротких ридов.</translation> </message> </context> <context> @@ -11521,6 +12176,69 @@ Path for %1 tool is not selected.</source> <translation type="unfinished"></translation> </message> </context> +<context> + <name>U2::LocalWorkflow::StringtieGeneAbundanceReportPrompter</name> + <message> + <location filename="../src/stringtie/StringtieGeneAbundanceReportPrompter.cpp" line="34"/> + <source>Create a general report for several StringTie gene abundance output files.</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>U2::LocalWorkflow::StringtieGeneAbundanceReportTask</name> + <message> + <location filename="../src/stringtie/StringtieGeneAbundanceReportTask.cpp" line="53"/> + <source>StringTie Gene Abundance Report Task</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/stringtie/StringtieGeneAbundanceReportTask.cpp" line="77"/> + <location filename="../src/stringtie/StringtieGeneAbundanceReportTask.cpp" line="95"/> + <source>The directory "%1" did not created</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/stringtie/StringtieGeneAbundanceReportTask.cpp" line="138"/> + <location filename="../src/stringtie/StringtieGeneAbundanceReportTask.cpp" line="145"/> + <source>Too long line while reading a file: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/stringtie/StringtieGeneAbundanceReportTask.cpp" line="150"/> + <location filename="../src/stringtie/StringtieGeneAbundanceReportTask.cpp" line="262"/> + <source>Bad line format of input: "%1"</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/stringtie/StringtieGeneAbundanceReportTask.cpp" line="172"/> + <source>Cannot open a file: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/stringtie/StringtieGeneAbundanceReportTask.cpp" line="231"/> + <source>Unexpected error while parsing input data</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/stringtie/StringtieGeneAbundanceReportTask.cpp" line="238"/> + <source>Bad file format, there is no %2 column: "%1"</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/stringtie/StringtieGeneAbundanceReportTask.cpp" line="256"/> + <source>Cannot open a file: %1 +Error is :</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>U2::LocalWorkflow::StringtieGeneAbundanceReportWorker</name> + <message> + <location filename="../src/stringtie/StringtieGeneAbundanceReportWorker.cpp" line="60"/> + <source>An empty URL to StringTie report passed to the '%1'</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>U2::LocalWorkflow::TCoffeePrompter</name> <message> @@ -11647,102 +12365,115 @@ Path for %1 tool is not selected.</source> <translation type="unfinished"></translation> </message> </context> +<context> + <name>U2::LocalWorkflow::TopHatPrompter</name> + <message> + <location filename="../src/tophat/TopHatWorker.cpp" line="549"/> + <source> to reference sequence with index <u>%1</u>.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/tophat/TopHatWorker.cpp" line="552"/> + <source> to reference sequence <u>%1</u>.</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>U2::LocalWorkflow::TopHatWorker</name> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="111"/> - <location filename="../src/tophat/TopHatWorker.cpp" line="122"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="114"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="125"/> <source>Input reads</source> <translation>Входные риды</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="112"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="115"/> <source>Input RNA-Seq reads</source> <translation>Входные риды RNA-Seq</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="116"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="119"/> <source>TopHat output</source> <translation>Выходные данные TopHat</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="117"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="120"/> <source>Accepted hits, junctions, insertions and deletions</source> <translation>ДопуÑтимы хиты, переходы, вÑтавки и удалениÑ</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="123"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="126"/> <source>TopHat input reads. Set this slot empty if you want to align reads directly from a file and specify the "Input reads url" slot. When running TopHat with paired-end reads, this should be the *_1 ("left") set of reads.</source> <translation>Входные риды TopHat. ОÑтавьте Ñтот Ñлот пуÑтым еÑли вы хотите выровнÑÑ‚ÑŒ риды напрÑмую из файла и укажите Ñлот "Путь Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ð½Ñ‹Ñ… ридов".</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="128"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="131"/> <source>Input reads url</source> <translation>Путь Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ð½Ñ‹Ñ… ридов</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="129"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="132"/> <source>TopHat input reads url. When running TopHat with paired-end reads, this should be the *_1 ("left") set of reads.</source> <translation>Путь Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ð½Ñ‹Ñ… ридов TopHat.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="133"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="136"/> <source>Input paired reads</source> <translation>Входные парные риды</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="134"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="137"/> <source> Set this slot empty if you want to align reads directly from a file and specify the "Input reads url" slot. Only used when running TopHat with paired end reads, and contains the *_2 ("right") set of reads. Reads MUST appear in the same order as the *_1 reads.</source> <translation>ОÑтавьте Ñтот Ñлот пуÑтым еÑли вы хотите выровнÑÑ‚ÑŒ риды напрÑмую из файла и укажите Ñлот "Путь Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ð½Ñ‹Ñ… ридов".</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="141"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="144"/> <source>Input paired reads url</source> <translation>Путь Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ð½Ñ‹Ñ… парных ридов</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="142"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="145"/> <source>Only used when running TopHat with paired end reads, and contains the *_2 ("right") set of reads.</source> <translation>ИÑпользуетÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ когда TopHat запуÑкаетÑÑ Ð´Ð»Ñ Ð¿Ð°Ñ€Ð½Ñ‹Ñ… ридов, и Ñодержит набор ридов *_2 ("right").</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="147"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="150"/> <source>Dataset name</source> <translation>Ð˜Ð¼Ñ Ð½Ð°Ð±Ð¾Ñ€Ð° данных</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="148"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="151"/> <source>Use it only when sequences slot(or slots) is specified. Group input reads into chunks for several Tophat runs. Set it empty if you want to run Tophat once for all input reads</source> <translation>ИÑпользуйте Ñтот параметр только когда указан Ñлот типа поÑледовательноÑÑ‚ÑŒ. ОÑтавьте его пуÑтым еÑли хотите запуÑтить задачу Ð´Ð»Ñ Ð²Ñех входных ридов</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="165"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="168"/> <source>Accepted hits</source> <translation>Принимаемые хиты</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="166"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="169"/> <source>Accepted hits found by TopHat</source> <translation>Принимаемые хиты найденные TopHat</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="168"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="171"/> <source>Sample name</source> <translation>Пример имени</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="169"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="172"/> <source>Sample name for running Cuffdiff</source> <translation>Пример имени Ð´Ð»Ñ Ð·Ð°Ð¿ÑƒÑка Cuffdiff</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="171"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="174"/> <source>Accepted hits url</source> <translation>Путь до принимаемых хитов</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="172"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="175"/> <source>The url to the assembly file with the accepted hits</source> <translation>Путь до файла Ñборки Ñ Ð¿Ñ€Ð¸Ð½Ð¸Ð¼Ð°ÐµÐ¼Ñ‹Ð¼Ð¸ хитами</translation> </message> @@ -11755,298 +12486,333 @@ Set it empty if you want to run Tophat once for all input reads</source> <translation type="vanished">TopHat ÑвлÑетÑÑ Ð±Ñ‹Ñтрым инÑтрументом Ð´Ð»Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ ÑплайÑинга по данным ÑÐµÐºÐ²ÐµÐ½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð ÐК. TopHat выравнивает риды Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ Bowtie и затем анализирует результаты Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ Ð´Ð»Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ Ð³Ñ€Ð°Ð½Ð¸Ñ† Ñкзонов.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="183"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="186"/> <source>Map RNA-Seq Reads with TopHat</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="184"/> - <source>TopHat is a program for mapping RNA-Seq reads to a long reference sequence. It uses Bowtie or Bowtie2 to map the reads and then analyzes the mapping results to identify splice junctions between exons.<br/><br/>Provide URL(s) to FASTA or FASTQ file(s) with NGS RNA-Seq reads to the input port of the element, set up the reference sequence in the parameters. The result is saved to the specified SAM file, URL to the file is passed to the output port. Several UCSC BED tracks are also produced: junctions, insertions, and deletions.</source> + <location filename="../src/tophat/TopHatWorker.cpp" line="187"/> + <source>TopHat is a program for mapping RNA-Seq reads to a long reference sequence. It uses Bowtie or Bowtie2 to map the reads and then analyzes the mapping results to identify splice junctions between exons.<br/><br/>Provide URL(s) to FASTA or FASTQ file(s) with NGS RNA-Seq reads to the input port of the element, set up the reference sequence in the parameters. The result is saved to the specified BAM file, URL to the file is passed to the output port. Several UCSC BED tracks are also produced: junctions, insertions, and deletions.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="195"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="198"/> <source>Output folder</source> <translation>Ð’Ñ‹Ñ…Ð¾Ð´Ð½Ð°Ñ Ð¿Ð°Ð¿ÐºÐ°</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="196"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="199"/> <source>The base name of output folder. It could be modified with a suffix.</source> <translation>Базовое Ð¸Ð¼Ñ Ð´Ð»Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ð¾Ð¹ папки.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="199"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="202"/> <source>Samples map</source> <translation>Карта образцов</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="200"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="203"/> <source>The map which divide all input datasets into samples. Every sample has the unique name.</source> <translation>карта, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ñ€Ð°Ð·Ð´ÐµÐ»Ñет вÑе входные наборы данных на образцы. Каждый образец имеет уникальное название.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="203"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="206"/> + <source>Reference input type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/tophat/TopHatWorker.cpp" line="207"/> + <source>Select "Sequence" to input a reference genome as a sequence file. <br/>Note that any sequence file format, supported by UGENE, is allowed (FASTA, GenBank, etc.). <br/>The index will be generated automatically in this case. <br/>Select "Index" to input already generated index files, specific for the tool.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/tophat/TopHatWorker.cpp" line="213"/> + <source>Reference genome</source> + <translation type="unfinished">РеференÑный геном</translation> + </message> + <message> + <location filename="../src/tophat/TopHatWorker.cpp" line="214"/> + <source>Path to indexed reference genome.</source> + <translation type="unfinished">Путь до индекÑированного референÑного генома.</translation> + </message> + <message> + <location filename="../src/tophat/TopHatWorker.cpp" line="217"/> <source>Bowtie index folder</source> <translation>Папка Ð´Ð»Ñ Ð¸Ð½Ð´ÐµÐºÑа Bowtie</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="204"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="218"/> <source>The folder with the Bowtie index for the reference sequence.</source> <translation>папка, в которой раÑположен Ð¸Ð½Ð´ÐµÐºÑ Bowtie Ð´Ð»Ñ Ñ€ÐµÑ„ÐµÑ€ÐµÐ½Ñной поÑледовательноÑти.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="212"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="226"/> <source>Bowtie index basename</source> <translation>Базовое Ð¸Ð¼Ñ Ð´Ð»Ñ Ð¸Ð½Ð´ÐµÐºÑа Bowtie</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="213"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="227"/> <source>The basename of the Bowtie index for the reference sequence.</source> <translation>базовое Ð¸Ð¼Ñ Ð´Ð»Ñ Ð¸Ð½Ð´ÐµÐºÑа Bowtie Ð´Ð»Ñ Ñ€ÐµÑ„ÐµÑ€ÐµÐ½Ñной поÑледовательноÑти.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="226"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="240"/> <source>Mate inner distance</source> <translation>ВнутреннÑÑ Ð´Ð¸ÑÑ‚Ð°Ð½Ñ†Ð¸Ñ Ð² паре</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="227"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="241"/> <source>The expected (mean) inner distance between mate pairs.</source> <translation>Ð¾Ð¶Ð¸Ð´Ð°ÐµÐ¼Ð°Ñ (ÑреднÑÑ) внутреннÑÑ Ð´Ð¸ÑÑ‚Ð°Ð½Ñ†Ð¸Ñ Ð¼ÐµÐ¶Ð´Ñƒ ридами в паре (mate pair).</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="230"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="244"/> <source>Mate standard deviation</source> <translation>Стандартное отклонение в паре</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="231"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="245"/> <source>The standard deviation for the distribution on inner distances between mate pairs.</source> <translation>Ñтандартное отклонение Ð´Ð»Ñ Ñ€Ð°ÑÐ¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ Ð² внутренних диÑтанций между ридами в паре (mate pair).</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="234"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="248"/> <source>Library type</source> <translation>Тип библиотеки</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="235"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="249"/> <source>Specifies RNA-Seq protocol.</source> <translation>задает протокол ÑÐµÐºÐ²ÐµÐ½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð ÐК.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="238"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="252"/> <source>No novel junctions</source> <translation>Ðе иÑкать новые Ñайты ÑплайÑинга</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="239"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="253"/> <source>Only look for reads across junctions indicated in the supplied GFF or junctions file. This parameter is ignored if <i>Raw junctions</i> or <i>Known transcript file</i> is not set.</source> <translation>ИÑкать только такие ÑплайÑированные риды, которые ÑоответÑтвуют информации в приложенном файле (GFF или файле Ñ Ð¾Ð¿Ð¸Ñанием Ñайтов ÑплайÑинга). ЕÑли ни один из Ñтих файлов не указан, параметр будет проигнорирован.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="244"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="258"/> <source>Raw junctions</source> <translation>Ðовые Ñайты ÑплайÑинга</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="245"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="259"/> <source>The list of raw junctions.</source> <translation>ÑпиÑок обнаруженных Ñайтов ÑплайÑинга.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="248"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="262"/> <source>Known transcript file</source> <translation>Файл Ñ Ð¸Ð·Ð²ÐµÑтными транÑкриптами</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="249"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="263"/> <source>A set of gene model annotations and/or known transcripts.</source> <translation>файл Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸ÐµÐ¹ моделей генов и/или извеÑтными транÑкриптами.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="252"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="266"/> <source>Max multihits</source> <translation>МакÑимальное количеÑтво множеÑтвенных выравниваний</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="253"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="267"/> <source>Instructs TopHat to allow up to this many alignments to the reference for a given read, and suppresses all alignments for reads with more than this many alignments.</source> <translation>Tophat не будет анализировать вÑе Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ Ð´Ð»Ñ Ñ€Ð¸Ð´Ð¾Ð² Ñ Ð±Ð¾Ð»ÑŒÑˆÐ¸Ð¼ количеÑтвом выравниваний, чем указанный параметр.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="258"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="272"/> <source>Segment length</source> <translation>Длина Ñегмента</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="259"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="273"/> <source>Each read is cut up into segments, each at least this long. These segments are mapped independently.</source> <translation>каждый рид разрезаетÑÑ Ð½Ð° Ñегменты указанной длины. Ðти Ñегменты выравниваютÑÑ Ð½ÐµÐ·Ð°Ð²Ð¸Ñимо.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="271"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="285"/> <source>Fusion search</source> <translation>ПоиÑк химер</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="272"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="286"/> <source>Turn on fusion mapping.</source> <translation>иÑкать выравнивание Ð´Ð»Ñ Ñ…Ð¸Ð¼ÐµÑ€Ð½Ñ‹Ñ… ридов.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="275"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="289"/> <source>Transcriptome only</source> <translation>Только транÑкриптом</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="276"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="290"/> <source>Only align the reads to the transcriptome and report only those mappings as genomic mappings.</source> <translation>выравнивать риды только на транÑкриптом и выдавать только Ñти Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ Ð¿Ñ€Ð¸ выравнивании на геном.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="280"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="294"/> <source>Transcriptome max hits</source> <translation>МакÑимальное чиÑло выравниваний</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="281"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="295"/> <source>Maximum number of mappings allowed for a read, when aligned to the transcriptome (any reads found with more than this number of mappings will be discarded).</source> <translation>макÑимальное чиÑло выравниваний, разрешенных Ð´Ð»Ñ Ñ€Ð¸Ð´Ð° при выравнивании на транÑкриптом (риды Ñ Ð±Ð¾Ð»ÑŒÑˆÐ¸Ð¼ чиÑлом выравниваний будут иÑключены из дальнейшего анализа).</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="286"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="300"/> <source>Prefilter multihits</source> <translation>Предварительный фильтр множеÑтвенных выравниваний</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="287"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="301"/> <source>When mapping reads on the transcriptome, some repetitive or low complexity reads that would be discarded in the context of the genome may appear to align to the transcript sequences and thus may end up reported as mapped to those genes only. This option directs TopHat to first align the reads to the whole genome in order to determine and exclude such multi-mapped reads (according to the value of the <i>Max multihits</i> option).</source> <translation>при выравнивании ридов на транÑкриптом, некоторые повторÑющиеÑÑ Ñ€Ð¸Ð´Ñ‹ или риды, Ñодержащие повторы, могут быть выÑвлены как выровненные, Ñ…Ð¾Ñ‚Ñ Ð¿Ñ€Ð¸ выравнивании на геном они были бы отброшены. При выборе Ñтой опции TopHat Ñначала выравнивает риды на веÑÑŒ геном, чтобы определить и иÑключить риды, которые выравниваютÑÑ Ð½ÐµÑколько раз (чиÑло выравниваний определÑетÑÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸ÐµÐ¼ опции).</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="296"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="310"/> <source>Min anchor length</source> <translation>ÐœÐ¸Ð½Ð¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ Ð´Ð»Ð¸Ð½Ð° ÑкорÑ</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="297"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="311"/> <source>The <i>anchor length</i>. TopHat will report junctions spanned by reads with at least this many bases on each side of the junction. Note that individual spliced alignments may span a junction with fewer than this many bases on one side. However, every junction involved in spliced alignments is supported by at least one read with this many bases on each side.</source> <translation><i>длина ÑкорÑ</i>. TopHat будет указывать в отчете Ñайты ÑплайÑинга в том Ñлучае, еÑли Ñ ÐºÐ°Ð¶Ð´Ð¾Ð¹ Ñтороны от Ñтыка прочитано не менее указанного чиÑла нуклеотидов. Ð’ отдельных выравниваниÑÑ… чиÑло нуклеотидов может быть меньше, однако Ð´Ð»Ñ Ð»ÑŽÐ±Ð¾Ð³Ð¾ указанного в отчете Ñайта ÑплайÑинга будет ÑущеÑтвовать Ñ…Ð¾Ñ‚Ñ Ð±Ñ‹ одно выравнивание Ñ Ð½Ðµ менее чем указанным чиÑлом нуклеотидов Ñ ÐºÐ°Ð¶Ð´Ð¾Ð¹ Ñтороны.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="305"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="319"/> <source>Splice mismatches</source> <translation>Замены около Ñайтов ÑплайÑинга</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="306"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="320"/> <source>The maximum number of mismatches that may appear in the <i>anchor</i> region of a spliced alignment.</source> <translation>макÑимально допуÑтимое чиÑло неÑоответÑтвий в нуклеотидах около Ñайтов ÑплайÑинга..</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="310"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="324"/> <source>Read mismatches</source> <translation>Замены в ридах</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="311"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="325"/> <source>Final read alignments having more than these many mismatches are discarded.</source> <translation>финальные выравниваниÑ, чиÑло неÑоответÑтвий в которых больше указанного, будут отброшены.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="315"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="329"/> <source>Segment mismatches</source> <translation>Замены в Ñегментах</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="316"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="330"/> <source>Read segments are mapped independently, allowing up to this many mismatches in each segment alignment.</source> <translation>Ñегменты рида выравниваютÑÑ Ð½ÐµÐ·Ð°Ð²Ð¸Ñимо, и при Ñтом при выравнивании каждого Ñегмента допуÑкаетÑÑ ÑƒÐºÐ°Ð·Ð°Ð½Ð½Ð¾Ðµ макÑимальное чиÑло неÑоответÑтвий.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="321"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="335"/> <source>Solexa 1.3 quals</source> <translation>КачеÑтво в шкале Solexa 1.3</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="322"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="336"/> <source>As of the Illumina GA pipeline version 1.3, quality scores are encoded in Phred-scaled base-64. Use this option for FASTQ files from pipeline 1.3 or later.</source> <translation>в пайплайне Illumina GA верÑии 1.3 показатели качеÑтва кодируютÑÑ Ð² шкале Phred64. ИÑпользуйте Ñту опцию Ð´Ð»Ñ FASTQ файлов из пайплайна 1.3 или более поздних верÑии.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="327"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="341"/> <source>Bowtie version</source> <translation>ВерÑÐ¸Ñ Bowtie</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="328"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="342"/> <source>Specifies which Bowtie version should be used.</source> <translation>указывает, какую верÑию Bowtie необходимо иÑпользовать.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="331"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="345"/> <source>Bowtie -n mode</source> <translation>Режим Bowtie -n</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="332"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="346"/> <source>TopHat uses <i>-v</i> in Bowtie for initial read mapping (the default), but with this option, <i>-n</i> is used instead. Read segments are always mapped using <i>-v</i> option.</source> <translation>по умолчанию TopHat иÑпользует -v в Bowtie Ð´Ð»Ñ Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ Ñ€Ð¸Ð´Ð¾Ð², но при выборе Ñтой опции будет иÑпользован параметр -n. Выравнивание Ñегментов ридов вÑегда оÑущеÑтвлÑетÑÑ Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð¼ -v.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="338"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="352"/> <source>Bowtie tool path</source> <translation>Путь</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="339"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="353"/> <source>The path to the Bowtie external tool.</source> <translation>Путь до внешнего инÑтрумента Bowtie в UGENE.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="342"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="356"/> <source>SAMtools tool path</source> <translation>Путь</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="343"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="357"/> <source>The path to the SAMtools tool. Note that the tool is available in the UGENE External Tool Package.</source> <translation>Путь до инÑтрумента SAMtools. Обратите внимание, что Ñтот доÑтупен в пакете внешних инÑтрументов UGENE.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="347"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="361"/> <source>TopHat tool path</source> <translation>Путь</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="348"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="362"/> <source>The path to the TopHat external tool in UGENE.</source> <translation>Путь до внешнего инÑтрумента TopHat в UGENE.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="351"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="365"/> <source>Temporary folder</source> <translation>Ð’Ñ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ Ð¿Ð°Ð¿ÐºÐ°</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="352"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="366"/> <source>The folder for temporary files.</source> <translation>Папка Ð´Ð»Ñ Ð²Ñ€ÐµÐ¼ÐµÐ½Ð½Ñ‹Ñ… файлов.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="399"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="420"/> + <source>Sequence</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/tophat/TopHatWorker.cpp" line="421"/> + <source>Index</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/tophat/TopHatWorker.cpp" line="428"/> <source>Use -n mode</source> <translation>ИÑпользовать -n моду</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="400"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="429"/> <source>Use -v mode</source> <translation>ИÑпользовать -v моду</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="515"/> - <source>Maps RNA-seq reads to a reference and finds splice junctions.</source> + <location filename="../src/tophat/TopHatWorker.cpp" line="544"/> + <source>Maps RNA-seq reads</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/tophat/TopHatWorker.cpp" line="555"/> + <source> and finds splice junctions.</source> <translation type="unfinished"></translation> </message> <message> @@ -12054,12 +12820,12 @@ Set it empty if you want to run Tophat once for all input reads</source> <translation type="vanished">Выравнивает риды RNA-seq на референÑную поÑледовательноÑÑ‚ÑŒ и ищет регионы ÑплайÑинга.</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="579"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="627"/> <source>Incorrect value of the library type parameter for Cufflinks!</source> <translation>Incorrect value of the library type parameter for Cufflinks!</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="608"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="656"/> <source>Unrecognized value of the Bowtie mode option!</source> <translation>Unrecognized value of the Bowtie mode option!</translation> </message> @@ -12080,11 +12846,24 @@ Set it empty if you want to run Tophat once for all input reads</source> <context> <name>U2::LocalWorkflow::TrimmomaticPropertyDialog</name> <message> - <location filename="../src/trimmomatic/TrimmomaticDelegate.cpp" line="183"/> + <location filename="../src/trimmomatic/TrimmomaticDelegate.cpp" line="186"/> <source>Apply</source> <translation type="unfinished"></translation> </message> </context> +<context> + <name>U2::LocalWorkflow::TrimmomaticWorker</name> + <message> + <location filename="../src/trimmomatic/TrimmomaticWorker.cpp" line="118"/> + <source>Copy adapters to working folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/trimmomatic/TrimmomaticWorker.cpp" line="149"/> + <source>Process "Trimmomatic" with one dataset</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>U2::LocalWorkflow::VcfConsensusPrompter</name> <message> @@ -12441,8 +13220,8 @@ Set it empty if you want to run Tophat once for all input reads</source> <context> <name>U2::PathLineEdit</name> <message> - <location filename="../src/ExternalToolSupportSettingsController.cpp" line="633"/> - <location filename="../src/ExternalToolSupportSettingsController.cpp" line="635"/> + <location filename="../src/ExternalToolSupportSettingsController.cpp" line="797"/> + <location filename="../src/ExternalToolSupportSettingsController.cpp" line="799"/> <source>Select a file</source> <translation>Выберите файл</translation> </message> @@ -12735,10 +13514,18 @@ Set it empty if you want to run Tophat once for all input reads</source> <translation>The input reference sequence '%1' contains characters that don't belong to DNA alphabet.</translation> </message> </context> +<context> + <name>U2::PythonModuleBioSupport</name> + <message> + <location filename="../src/python/PythonSupport.cpp" line="124"/> + <source> (or biopython) is a python module for biological computations.</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>U2::PythonModuleDjangoSupport</name> <message> - <location filename="../src/python/PythonSupport.cpp" line="101"/> + <location filename="../src/python/PythonSupport.cpp" line="102"/> <source>: Python module for the %1 tool</source> <translation>: Python модуль Ð´Ð»Ñ Ð¸Ð½Ñтрумента %1</translation> </message> @@ -12746,7 +13533,7 @@ Set it empty if you want to run Tophat once for all input reads</source> <context> <name>U2::PythonModuleNumpySupport</name> <message> - <location filename="../src/python/PythonSupport.cpp" line="110"/> + <location filename="../src/python/PythonSupport.cpp" line="111"/> <source>: Python module for the %1 tool</source> <translation>: Python модуль Ð´Ð»Ñ Ð¸Ð½Ñтрумента %1</translation> </message> @@ -12754,7 +13541,7 @@ Set it empty if you want to run Tophat once for all input reads</source> <context> <name>U2::PythonModuleSupport</name> <message> - <location filename="../src/python/PythonSupport.cpp" line="90"/> + <location filename="../src/python/PythonSupport.cpp" line="91"/> <source>Python module is not installed. Install module or set path to another Python scripts interpreter with installed module in the External Tools settings</source> <translation>Python модуль не уÑтановлен. УÑтановите модель или укажите другой путь Ñ ÑƒÑтановленным модулем в наÑтройках внешних инÑтрументов</translation> </message> @@ -12770,7 +13557,7 @@ Set it empty if you want to run Tophat once for all input reads</source> <context> <name>U2::RModuleCelegansdbSupport</name> <message> - <location filename="../src/R/RSupport.cpp" line="147"/> + <location filename="../src/R/RSupport.cpp" line="148"/> <source>: Rscript module for the %1 tool</source> <translation>: Rscript модуль Ð´Ð»Ñ Ð¸Ð½Ñтрумента %1</translation> </message> @@ -12778,7 +13565,7 @@ Set it empty if you want to run Tophat once for all input reads</source> <context> <name>U2::RModuleDrosophila2dbSupport</name> <message> - <location filename="../src/R/RSupport.cpp" line="153"/> + <location filename="../src/R/RSupport.cpp" line="154"/> <source>: Rscript module for the %1 tool</source> <translation>: Rscript модуль Ð´Ð»Ñ Ð¸Ð½Ñтрумента %1</translation> </message> @@ -12786,7 +13573,7 @@ Set it empty if you want to run Tophat once for all input reads</source> <context> <name>U2::RModuleGodbSupport</name> <message> - <location filename="../src/R/RSupport.cpp" line="111"/> + <location filename="../src/R/RSupport.cpp" line="112"/> <source>: Rscript module for the %1 tool</source> <translation>: Rscript модуль Ð´Ð»Ñ Ð¸Ð½Ñтрумента %1</translation> </message> @@ -12794,7 +13581,7 @@ Set it empty if you want to run Tophat once for all input reads</source> <context> <name>U2::RModuleGostatsSupport</name> <message> - <location filename="../src/R/RSupport.cpp" line="105"/> + <location filename="../src/R/RSupport.cpp" line="106"/> <source>: Rscript module for the %1 tool</source> <translation>: Rscript модуль Ð´Ð»Ñ Ð¸Ð½Ñтрумента %1</translation> </message> @@ -12802,7 +13589,7 @@ Set it empty if you want to run Tophat once for all input reads</source> <context> <name>U2::RModuleHgu133adbSupport</name> <message> - <location filename="../src/R/RSupport.cpp" line="117"/> + <location filename="../src/R/RSupport.cpp" line="118"/> <source>: Rscript module for the %1 tool</source> <translation>: Rscript модуль Ð´Ð»Ñ Ð¸Ð½Ñтрумента %1</translation> </message> @@ -12810,7 +13597,7 @@ Set it empty if you want to run Tophat once for all input reads</source> <context> <name>U2::RModuleHgu133bdbSupport</name> <message> - <location filename="../src/R/RSupport.cpp" line="123"/> + <location filename="../src/R/RSupport.cpp" line="124"/> <source>: Rscript module for the %1 tool</source> <translation>: Rscript модуль Ð´Ð»Ñ Ð¸Ð½Ñтрумента %1</translation> </message> @@ -12818,7 +13605,7 @@ Set it empty if you want to run Tophat once for all input reads</source> <context> <name>U2::RModuleHgu133plus2dbSupport</name> <message> - <location filename="../src/R/RSupport.cpp" line="129"/> + <location filename="../src/R/RSupport.cpp" line="130"/> <source>: Rscript module for the %1 tool</source> <translation>: Rscript модуль Ð´Ð»Ñ Ð¸Ð½Ñтрумента %1</translation> </message> @@ -12826,7 +13613,7 @@ Set it empty if you want to run Tophat once for all input reads</source> <context> <name>U2::RModuleHgu95av2dbSupport</name> <message> - <location filename="../src/R/RSupport.cpp" line="135"/> + <location filename="../src/R/RSupport.cpp" line="136"/> <source>: Rscript module for the %1 tool</source> <translation>: Rscript модуль Ð´Ð»Ñ Ð¸Ð½Ñтрумента %1</translation> </message> @@ -12834,7 +13621,7 @@ Set it empty if you want to run Tophat once for all input reads</source> <context> <name>U2::RModuleMouse430a2dbSupport</name> <message> - <location filename="../src/R/RSupport.cpp" line="141"/> + <location filename="../src/R/RSupport.cpp" line="142"/> <source>: Rscript module for the %1 tool</source> <translation>: Rscript модуль Ð´Ð»Ñ Ð¸Ð½Ñтрумента %1</translation> </message> @@ -12842,7 +13629,7 @@ Set it empty if you want to run Tophat once for all input reads</source> <context> <name>U2::RModuleOrgceegdbSupport</name> <message> - <location filename="../src/R/RSupport.cpp" line="171"/> + <location filename="../src/R/RSupport.cpp" line="172"/> <source>: Rscript module for the %1 tool</source> <translation>: Rscript модуль Ð´Ð»Ñ Ð¸Ð½Ñтрумента %1</translation> </message> @@ -12850,7 +13637,7 @@ Set it empty if you want to run Tophat once for all input reads</source> <context> <name>U2::RModuleOrgdmegdbSupport</name> <message> - <location filename="../src/R/RSupport.cpp" line="177"/> + <location filename="../src/R/RSupport.cpp" line="178"/> <source>: Rscript module for the %1 tool</source> <translation>: Rscript модуль Ð´Ð»Ñ Ð¸Ð½Ñтрумента %1</translation> </message> @@ -12858,7 +13645,7 @@ Set it empty if you want to run Tophat once for all input reads</source> <context> <name>U2::RModuleOrghsegdbSupport</name> <message> - <location filename="../src/R/RSupport.cpp" line="159"/> + <location filename="../src/R/RSupport.cpp" line="160"/> <source>: Rscript module for the %1 tool</source> <translation>: Rscript модуль Ð´Ð»Ñ Ð¸Ð½Ñтрумента %1</translation> </message> @@ -12866,7 +13653,7 @@ Set it empty if you want to run Tophat once for all input reads</source> <context> <name>U2::RModuleOrgmmegdbSupport</name> <message> - <location filename="../src/R/RSupport.cpp" line="165"/> + <location filename="../src/R/RSupport.cpp" line="166"/> <source>: Rscript module for the %1 tool</source> <translation>: Rscript модуль Ð´Ð»Ñ Ð¸Ð½Ñтрумента %1</translation> </message> @@ -12874,7 +13661,7 @@ Set it empty if you want to run Tophat once for all input reads</source> <context> <name>U2::RModuleSeqlogoSupport</name> <message> - <location filename="../src/R/RSupport.cpp" line="183"/> + <location filename="../src/R/RSupport.cpp" line="184"/> <source>: Rscript module for the %1 tool</source> <translation>: Rscript модуль Ð´Ð»Ñ Ð¸Ð½Ñтрумента %1</translation> </message> @@ -12882,7 +13669,7 @@ Set it empty if you want to run Tophat once for all input reads</source> <context> <name>U2::RModuleSupport</name> <message> - <location filename="../src/R/RSupport.cpp" line="91"/> + <location filename="../src/R/RSupport.cpp" line="92"/> <source>R module is not installed. Install module or set path to another R scripts interpreter with installed module in the External Tools settings</source> <translation>R модуль не уÑтановлен. УÑтановите модель или укажите другой путь Ñ ÑƒÑтановленным модулем в наÑтройках внешних инÑтрументов</translation> </message> @@ -12895,6 +13682,19 @@ Set it empty if you want to run Tophat once for all input reads</source> <translation>Rscript интерпретатор</translation> </message> </context> +<context> + <name>U2::RegisterCustomToolTask</name> + <message> + <location filename="../src/custom_tools/RegisterCustomToolTask.cpp" line="35"/> + <source>Register custom external tool</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/custom_tools/RegisterCustomToolTask.cpp" line="56"/> + <source>Can't register a custom external tool '%1'</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>U2::RemoveGapsFromSequenceTask</name> <message> @@ -13045,10 +13845,16 @@ Set it empty if you want to run Tophat once for all input reads</source> <context> <name>U2::SpadesTask</name> <message> - <location filename="../src/spades/SpadesTask.cpp" line="61"/> + <location filename="../src/spades/SpadesTask.cpp" line="60"/> <source>Folder does not exist: </source> <translation>Folder does not exist: </translation> </message> + <message> + <location filename="../src/spades/SpadesTask.cpp" line="123"/> + <location filename="../src/spades/SpadesTask.cpp" line="130"/> + <source>File %1 has not been found in output folder %2</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>U2::SpideyAlignmentTask</name> @@ -13071,22 +13877,22 @@ Set it empty if you want to run Tophat once for all input reads</source> <context> <name>U2::SpideySupport</name> <message> - <location filename="../src/spidey/SpideySupport.cpp" line="72"/> + <location filename="../src/spidey/SpideySupport.cpp" line="73"/> <source><i>Spidey</i> is mRNA-to-DNA alignment program. <br>Binaries can be downloaded from http://www.ncbi.nlm.nih.gov/spidey/spideyexec.html</source> <translation><i>Spidey</i>Ñто программа Ð´Ð»Ñ Ð²Ñ‹Ñ€Ð°Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ mRNA-to-DNA. <br>Программа может быть Ñкачана http://www.ncbi.nlm.nih.gov/spidey/spideyexec.html</translation> </message> <message> - <location filename="../src/spidey/SpideySupport.cpp" line="74"/> + <location filename="../src/spidey/SpideySupport.cpp" line="75"/> <source><br><br> Wheelan SJ, Church DM, Ostell JM.</source> <translation><br><br> Wheelan SJ, Church DM, Ostell JM.</translation> </message> <message> - <location filename="../src/spidey/SpideySupport.cpp" line="75"/> + <location filename="../src/spidey/SpideySupport.cpp" line="76"/> <source><br>Spidey: a tool for mRNA-to-genomic alignments</source> <translation><br>Spidey: a tool for mRNA-to-genomic alignments</translation> </message> <message> - <location filename="../src/spidey/SpideySupport.cpp" line="76"/> + <location filename="../src/spidey/SpideySupport.cpp" line="77"/> <source><br>Genome Res. 2001 Nov;11(11):1952-7.</source> <translation><br>Genome Res. 2001 Nov;11(11):1952-7.</translation> </message> @@ -13094,17 +13900,17 @@ Set it empty if you want to run Tophat once for all input reads</source> <context> <name>U2::SpideySupportContext</name> <message> - <location filename="../src/spidey/SpideySupport.cpp" line="115"/> + <location filename="../src/spidey/SpideySupport.cpp" line="116"/> <source>Align sequence to mRNA</source> <translation>ВыровнÑÑ‚ÑŒ поÑледовательноÑÑ‚ÑŒ на мРÐК</translation> </message> <message> - <location filename="../src/spidey/SpideySupport.cpp" line="142"/> + <location filename="../src/spidey/SpideySupport.cpp" line="147"/> <source>Path for %1 tool not selected.</source> <translation>Путь Ð´Ð»Ñ %1 не уÑтановлен.</translation> </message> <message> - <location filename="../src/spidey/SpideySupport.cpp" line="143"/> + <location filename="../src/spidey/SpideySupport.cpp" line="148"/> <source>Do you want to select it now?</source> <translation>Выбрать ÑейчаÑ?</translation> </message> @@ -13334,22 +14140,27 @@ Set it empty if you want to run Tophat once for all input reads</source> <translation>Running TopHat task</translation> </message> <message> - <location filename="../src/tophat/TopHatSupportTask.cpp" line="143"/> + <location filename="../src/tophat/TopHatSupportTask.cpp" line="115"/> + <source>Can't create directory for index files </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/tophat/TopHatSupportTask.cpp" line="185"/> <source>An unexpected error has occurred during preparing the TopHat task!</source> <translation>An unexpected error has occurred during preparing the TopHat task!</translation> </message> <message> - <location filename="../src/tophat/TopHatSupportTask.cpp" line="144"/> + <location filename="../src/tophat/TopHatSupportTask.cpp" line="186"/> <source>Preparing TopHatSupportTask internal error: unable to get a sequence object!</source> <translation>Preparing TopHatSupportTask internal error: unable to get a sequence object!</translation> </message> <message> - <location filename="../src/tophat/TopHatSupportTask.cpp" line="262"/> + <location filename="../src/tophat/TopHatSupportTask.cpp" line="314"/> <source>TopHat was not able to map reads to the reference.</source> <translation>TopHat was not able to map reads to the reference.</translation> </message> <message> - <location filename="../src/tophat/TopHatSupportTask.cpp" line="284"/> + <location filename="../src/tophat/TopHatSupportTask.cpp" line="336"/> <source>There are no accepted hits in the result</source> <translation>There are no accepted hits in the result</translation> </message> @@ -13472,17 +14283,17 @@ Set it empty if you want to run Tophat once for all input reads</source> <translation>%1 was skipped. Low similarity: %2. Minimum similarity was set to %3</translation> </message> <message> - <location filename="../src/blast_plus/align_worker_subtasks/BlastReadsSubTask.cpp" line="275"/> + <location filename="../src/blast_plus/align_worker_subtasks/BlastReadsSubTask.cpp" line="276"/> <source>Read doesn't contain meaningful data</source> <translation>Read doesn't contain meaningful data</translation> </message> <message> - <location filename="../src/blast_plus/align_worker_subtasks/BlastReadsSubTask.cpp" line="356"/> + <location filename="../src/blast_plus/align_worker_subtasks/BlastReadsSubTask.cpp" line="357"/> <source>The %1 algorithm is not found. Add the %1 plugin.</source> <translation>The %1 algorithm is not found. Add the %1 plugin.</translation> </message> <message> - <location filename="../src/blast_plus/align_worker_subtasks/BlastReadsSubTask.cpp" line="359"/> + <location filename="../src/blast_plus/align_worker_subtasks/BlastReadsSubTask.cpp" line="360"/> <source>The %1 algorithm is not found. Check that the %1 plugin is up to date.</source> <translation>The %1 algorithm is not found. Check that the %1 plugin is up to date.</translation> </message> @@ -13550,18 +14361,17 @@ Set it empty if you want to run Tophat once for all input reads</source> </message> <message> <location filename="../src/macs/MACSWorker.cpp" line="236"/> - <location filename="../src/spades/SpadesWorker.cpp" line="190"/> - <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="272"/> + <location filename="../src/utils/BaseShortReadsAlignerWorker.cpp" line="271"/> <source>The slot must be not empty: '%1'</source> <translation>Слот не должен быть пуÑтым: '%1'</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="784"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="789"/> <source>Error! One of these slots must be not empty: '%1', '%2'</source> <translation>Ошибка! Один из Ñтих Ñлотов не должен быть пуÑтым: '%1', '%2'</translation> </message> <message> - <location filename="../src/tophat/TopHatWorker.cpp" line="790"/> + <location filename="../src/tophat/TopHatWorker.cpp" line="795"/> <source>Error! You can not bind one of sequences slots and one of url slots simultaneously</source> <translation>Ошибка! Ð’Ñ‹ не можете ÑвÑзать Ñлот поÑледовательноÑти и Ñлот пути одновременно</translation> </message> diff --git a/src/plugins/genome_aligner/src/BuildSArraySettingsWidget.cpp b/src/plugins/genome_aligner/src/BuildSArraySettingsWidget.cpp index 272062c9504a76ff137a2c2b54582a5e7b492bcf..e5d92648fe113bde3299ed1e6fb25f201c57be48 100644 --- a/src/plugins/genome_aligner/src/BuildSArraySettingsWidget.cpp +++ b/src/plugins/genome_aligner/src/BuildSArraySettingsWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/BuildSArraySettingsWidget.h b/src/plugins/genome_aligner/src/BuildSArraySettingsWidget.h index 90df3f398847847dc3a3d3ae4d9cc821100324da..ac72dd33959e75512a345b686b204c36f61b68ac 100644 --- a/src/plugins/genome_aligner/src/BuildSArraySettingsWidget.h +++ b/src/plugins/genome_aligner/src/BuildSArraySettingsWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/DataBunch.cpp b/src/plugins/genome_aligner/src/DataBunch.cpp index dee0e01f72487079c33f0011682c4df3a4e4e385..0d40831377a71e46bd4cb4d87e07067856b77266 100644 --- a/src/plugins/genome_aligner/src/DataBunch.cpp +++ b/src/plugins/genome_aligner/src/DataBunch.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/DataBunch.h b/src/plugins/genome_aligner/src/DataBunch.h index 2dd5171991b8b6c11c7f081044d68fdaea0e6016..4c906776009d7a3105a6f8bf4800b2ce06dd570f 100644 --- a/src/plugins/genome_aligner/src/DataBunch.h +++ b/src/plugins/genome_aligner/src/DataBunch.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/GenomeAlignerCMDLineTask.cpp b/src/plugins/genome_aligner/src/GenomeAlignerCMDLineTask.cpp index 569aad182a0fd52e2d839e5fedf14f35cc1ba1c6..5cad131744bce4443befa8d23dcf38aaf080aada 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerCMDLineTask.cpp +++ b/src/plugins/genome_aligner/src/GenomeAlignerCMDLineTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/GenomeAlignerCMDLineTask.h b/src/plugins/genome_aligner/src/GenomeAlignerCMDLineTask.h index b304dd8fd42bff29cba8ee6017021d16fe770cf5..ed41f1196cc8d86981e2b22f3e4e055c2591f563 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerCMDLineTask.h +++ b/src/plugins/genome_aligner/src/GenomeAlignerCMDLineTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/GenomeAlignerFindTask.cpp b/src/plugins/genome_aligner/src/GenomeAlignerFindTask.cpp index d5417fc5f57885617f87b91f239357801ab12b58..09ec06cf7ecad899ae221e3946d37e49350deeed 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerFindTask.cpp +++ b/src/plugins/genome_aligner/src/GenomeAlignerFindTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/GenomeAlignerFindTask.h b/src/plugins/genome_aligner/src/GenomeAlignerFindTask.h index a9ff28ad54da3b80d06f0ea4daf44b4ffc750734..f6ca35964caa7504a30af739b0f115099dac605b 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerFindTask.h +++ b/src/plugins/genome_aligner/src/GenomeAlignerFindTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/GenomeAlignerIO.cpp b/src/plugins/genome_aligner/src/GenomeAlignerIO.cpp index ee8acba66c3fedb00ace1be3f4c0f607fd0c215c..947b41810febffda8fab3091a4c8283920bc68bd 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerIO.cpp +++ b/src/plugins/genome_aligner/src/GenomeAlignerIO.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -31,6 +31,7 @@ #include <U2Core/U2AlphabetUtils.h> #include <U2Core/U2ObjectDbi.h> #include <U2Core/U2OpStatusUtils.h> +#include <U2Core/U2CrossDatabaseReferenceDbi.h> #include <U2Lang/BaseSlots.h> #include <U2Lang/BasePorts.h> @@ -62,6 +63,10 @@ SearchQuery *GenomeAlignerUrlReader::read() { return new SearchQuery(reader.getNextSequenceObject()); } +QString GenomeAlignerUrlReader::getMemberError() { + return reader.getErrorMessage(); +} + /************************************************************************/ /* GenomeAlignerUrlWriter */ /************************************************************************/ @@ -208,7 +213,11 @@ inline void checkOperationStatus(const U2OpStatus &status) { } } -GenomeAlignerDbiWriter::GenomeAlignerDbiWriter(const QString &dbiFilePath, const QString &refName, int refLength) : +GenomeAlignerDbiWriter::GenomeAlignerDbiWriter(const QString &dbiFilePath, + const QString &assemblyName, + int refLength, + const QString& referenceObjectName, + const QString& referenceUrlForCrossLink) : importer(status) { //TODO: support several assemblies. @@ -217,8 +226,23 @@ GenomeAlignerDbiWriter::GenomeAlignerDbiWriter(const QString &dbiFilePath, const sqliteDbi = dbiHandle->dbi; wDbi = sqliteDbi->getAssemblyDbi(); - assembly.visualName = refName; - importer.createAssembly(sqliteDbi->getDbiRef(), U2ObjectDbi::ROOT_FOLDER, assembly); + const QString folder = U2ObjectDbi::ROOT_FOLDER; + if (!referenceObjectName.isEmpty() && !referenceUrlForCrossLink.isEmpty()) { + U2CrossDatabaseReference crossDbRef; + crossDbRef.dataRef.dbiRef.dbiId = referenceUrlForCrossLink; + crossDbRef.dataRef.dbiRef.dbiFactoryId = "document"; + crossDbRef.dataRef.entityId = referenceObjectName.toUtf8(); + crossDbRef.visualName = "cross_database_reference: " + referenceObjectName; + crossDbRef.dataRef.version = 1; + sqliteDbi->getCrossDatabaseReferenceDbi()->createCrossReference(crossDbRef, folder, status); + checkOperationStatus(status); + + assembly.referenceId = crossDbRef.id; + } + + assembly.visualName = assemblyName; + + importer.createAssembly(sqliteDbi->getDbiRef(), folder, assembly); checkOperationStatus(status); U2IntegerAttribute lenAttr; @@ -226,7 +250,7 @@ GenomeAlignerDbiWriter::GenomeAlignerDbiWriter(const QString &dbiFilePath, const lenAttr.name = U2BaseAttributeName::reference_length; lenAttr.version = 1; lenAttr.value = refLength; - dbiHandle->dbi->getAttributeDbi()->createIntegerAttribute(lenAttr, status); + sqliteDbi->getAttributeDbi()->createIntegerAttribute(lenAttr, status); } void GenomeAlignerDbiWriter::write(SearchQuery *seq, SAType offset) { diff --git a/src/plugins/genome_aligner/src/GenomeAlignerIO.h b/src/plugins/genome_aligner/src/GenomeAlignerIO.h index 37d1a098c37c159475b1a463c3704516566e0544..e7050c70abfa2e5177871f0c9cde2cabb45cc43e 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerIO.h +++ b/src/plugins/genome_aligner/src/GenomeAlignerIO.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -53,6 +53,10 @@ public: virtual SearchQuery *read() = 0; virtual bool isEnd() = 0; virtual int getProgress() = 0; + //It's better to make this function pure virtual, + //so if you need it in an inherited class, where it isn't overloaded yet, + //you need to overload the needed func + virtual QString getMemberError() { assert(false); return QString(); } }; class GenomeAlignerWriter { @@ -98,6 +102,8 @@ public: inline SearchQuery *read(); inline bool isEnd(); int getProgress(); + QString getMemberError(); + private: bool initOk; StreamSequenceReader reader; @@ -169,7 +175,9 @@ private: class GenomeAlignerDbiWriter : public GenomeAlignerWriter { public: - GenomeAlignerDbiWriter(const QString &dbiFilePath, const QString &refName, int refLength); + GenomeAlignerDbiWriter(const QString &dbiFilePath, const QString &assemblyName, int refLength, + const QString& referenceObjectName = QString(), + const QString& referenceUrlForCrossLink = QString()); inline void write(SearchQuery *seq, SAType offset); void close(); void setReferenceName(const QString &) {} @@ -181,6 +189,7 @@ private: U2AssemblyDbi *wDbi; U2Assembly assembly; QList<U2AssemblyRead> reads; + QMutex writeLock; static const qint64 readBunchSize; }; diff --git a/src/plugins/genome_aligner/src/GenomeAlignerIndex.cpp b/src/plugins/genome_aligner/src/GenomeAlignerIndex.cpp index a6b17382bd3d08171f6b8b9d21f42de6ec1d6a69..9f0d1858d932d88ebe8501b944a64de0368f20e0 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerIndex.cpp +++ b/src/plugins/genome_aligner/src/GenomeAlignerIndex.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -79,7 +79,7 @@ void GenomeAlignerIndex::serialize(const QString &refFileName) { data += QByteArray::number(bitCharLen, 10) + ", "; data += QByteArray::number(seqPartSize, 10) + ", "; data += QByteArray::number(objCount, 10) + "\n"; - data += seqObjName + "\n"; + data += firstSequenceObjectName + "\n"; for (qint64 i=0; i < objCount; i++) { data += QByteArray::number(objLens[i], 10); if (objCount-1 == i) { @@ -154,7 +154,7 @@ bool GenomeAlignerIndex::deserialize(QByteArray &error) { return false; } - seqObjName = file.readLine().trimmed(); + firstSequenceObjectName = file.readLine().trimmed(); data = file.readLine().trimmed(); objLens = new quint32[objCount]; eol = false; diff --git a/src/plugins/genome_aligner/src/GenomeAlignerIndex.h b/src/plugins/genome_aligner/src/GenomeAlignerIndex.h index becf13c4d05e0131c818ad38d864ee395b117f0b..0dcd6e75f6d169ee00aba82d67207d5ca77ffa74 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerIndex.h +++ b/src/plugins/genome_aligner/src/GenomeAlignerIndex.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -50,7 +50,8 @@ public: #ifdef OPENCL_SUPPORT BinarySearchResult *bitMaskBinarySearchOpenCL(const BMType *bitValues, int size, const int *windowSizes); #endif - QString getSeqName() const {return seqObjName;} + const QString& getFirstSequenceObjectName() const {return firstSequenceObjectName;} + int getNumberOfSequencesInIndex() const {return objCount;} int getPartCount() const {return indexPart.partCount;} SAType getSArraySize() const {return indexPart.saLengths[currentPart];} SAType getSeqLength() const {return seqLength;} @@ -72,7 +73,8 @@ private: int partsInMemCache; quint32 *objLens; int objCount; - QString seqObjName; + QString firstSequenceObjectName; + QString sequenceObjectName; int currentPart; IndexPart indexPart; bool build; diff --git a/src/plugins/genome_aligner/src/GenomeAlignerIndexPart.cpp b/src/plugins/genome_aligner/src/GenomeAlignerIndexPart.cpp index caf3a2587ab212f6ec90bb571401bc2464ab1ade..b0e5f49f8aa95bf60fced85e1f1a94b38b342509 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerIndexPart.cpp +++ b/src/plugins/genome_aligner/src/GenomeAlignerIndexPart.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/GenomeAlignerIndexPart.h b/src/plugins/genome_aligner/src/GenomeAlignerIndexPart.h index 14bb6853663268db1ccda02079b5d57a7e9f7e5d..a86b6b4d48da36d6fa8042628df324bab959e195 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerIndexPart.h +++ b/src/plugins/genome_aligner/src/GenomeAlignerIndexPart.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/GenomeAlignerIndexTask.cpp b/src/plugins/genome_aligner/src/GenomeAlignerIndexTask.cpp index 1d8f0bd525776265e89854558902df1d0e88c591..96d13f0bca62714245f016bfbb639ee81bdf0bef 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerIndexTask.cpp +++ b/src/plugins/genome_aligner/src/GenomeAlignerIndexTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -207,7 +207,7 @@ void GenomeAlignerIndexTask::reformatSequence() { seqLens.append(seq->length()); newRefFile.write(seq->constData()); if (firstSeq) { - index->seqObjName = seq->getName() + QString("_and_others"); + index->firstSequenceObjectName = seq->getName();// + QString("_and_others"); firstSeq = false; } CHECK_OP_EXT(stateInfo, newRefFile.close(), ); diff --git a/src/plugins/genome_aligner/src/GenomeAlignerIndexTask.h b/src/plugins/genome_aligner/src/GenomeAlignerIndexTask.h index 5c132708525b189ebbb52bc67a9f3d963def2957..17329c340a767a6091ed3f19821e4e91ecb33bee 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerIndexTask.h +++ b/src/plugins/genome_aligner/src/GenomeAlignerIndexTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/GenomeAlignerIndexWorker.cpp b/src/plugins/genome_aligner/src/GenomeAlignerIndexWorker.cpp index 6de79b350c9bc2171420c6bca3c7397fdf847631..77d1e070f250e4fd1f6a2c535a7e139baae5288c 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerIndexWorker.cpp +++ b/src/plugins/genome_aligner/src/GenomeAlignerIndexWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/GenomeAlignerIndexWorker.h b/src/plugins/genome_aligner/src/GenomeAlignerIndexWorker.h index 58590af150678f1f238e4e7b424554747021f985..da1f6757403ba2e64cdcdff642ec1ebfc849b449 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerIndexWorker.h +++ b/src/plugins/genome_aligner/src/GenomeAlignerIndexWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/GenomeAlignerPlugin.cpp b/src/plugins/genome_aligner/src/GenomeAlignerPlugin.cpp index 4d4c2cc4eb4caee5640516d8b4aa465de2ce8a44..692f63b06a0f01f1d41c8e56282cf93b8f768b27 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerPlugin.cpp +++ b/src/plugins/genome_aligner/src/GenomeAlignerPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/GenomeAlignerPlugin.h b/src/plugins/genome_aligner/src/GenomeAlignerPlugin.h index b82f288505c96f8c712856ea67aab0c2d1477df6..0bc63b8b6ed6a70f21b7f87fcb7ef333428fbd01 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerPlugin.h +++ b/src/plugins/genome_aligner/src/GenomeAlignerPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/GenomeAlignerSearchQuery.cpp b/src/plugins/genome_aligner/src/GenomeAlignerSearchQuery.cpp index 8a89ed93fd0d06f14155c3c074823f1eb02219b7..ff6533e39faf26a7b7d429bb9b06d086f329dcf5 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerSearchQuery.cpp +++ b/src/plugins/genome_aligner/src/GenomeAlignerSearchQuery.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -147,12 +147,12 @@ bool SearchQuery::haveMCount() const { } void SearchQuery::addResult(SAType result, quint32 mCount) { - results.append(result); results.squeeze(); - mismatchCounts.append(mCount); mismatchCounts.squeeze(); + results.append(result); + mismatchCounts.append(mCount); } void SearchQuery::addOveplapResult(SAType result) { - overlapResults.append(result); overlapResults.squeeze(); + overlapResults.append(result); } void SearchQuery::onPartChanged() { @@ -162,8 +162,10 @@ void SearchQuery::onPartChanged() { } void SearchQuery::clear() { - results.clear(); results.squeeze(); - mismatchCounts.clear(); mismatchCounts.squeeze(); + results.clear(); + results.squeeze(); + mismatchCounts.clear(); + mismatchCounts.squeeze(); } SAType SearchQuery::firstResult() const { @@ -181,7 +183,7 @@ bool SearchQuery::contains(SAType result) const { return (results.contains(result) || overlapResults.contains(result)); } -QVector<SAType> &SearchQuery::getResults() { +const QVector<SAType>& SearchQuery::getResults() const { return results; } diff --git a/src/plugins/genome_aligner/src/GenomeAlignerSearchQuery.h b/src/plugins/genome_aligner/src/GenomeAlignerSearchQuery.h index bfca1bfb29f24e7d44d41bd640dc678b433d592c..0b11b8b97f2ca8d498360708c55fb61618493f38 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerSearchQuery.h +++ b/src/plugins/genome_aligner/src/GenomeAlignerSearchQuery.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,6 +22,8 @@ #ifndef _U2_GENOME_ALIGNER_SEARCH_QUERY_H_ #define _U2_GENOME_ALIGNER_SEARCH_QUERY_H_ +#include <QVector> + #include <U2Core/DNASequence.h> #include <U2Core/U2AssemblyUtils.h> #include "GenomeAlignerIndexPart.h" @@ -64,11 +66,11 @@ public: SAType firstResult() const; quint32 firstMCount() const; bool contains(SAType result) const; - QVector<SAType> &getResults(); - bool isWroteResult() const {return wroteResult;} - void writeResult() {wroteResult = true;} - SearchQuery *getRevCompl() {return revCompl;} - void setRevCompl(SearchQuery *rc) {revCompl = rc;} + const QVector<SAType>& getResults() const; + bool isWroteResult() const { return wroteResult; } + void writeResult() { wroteResult = true; } + SearchQuery *getRevCompl() { return revCompl; } + void setRevCompl(SearchQuery *rc) { revCompl = rc; } qint64 memoryHint() const; private: diff --git a/src/plugins/genome_aligner/src/GenomeAlignerSettingsController.cpp b/src/plugins/genome_aligner/src/GenomeAlignerSettingsController.cpp index 15b2b873836b235833cf11b0b9581ccb8868b382..9aded93973515952fc35c0b00006996627f55ff0 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerSettingsController.cpp +++ b/src/plugins/genome_aligner/src/GenomeAlignerSettingsController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/GenomeAlignerSettingsController.h b/src/plugins/genome_aligner/src/GenomeAlignerSettingsController.h index 2bd9b3177e9716ba79fd52f3eb60b66c7c497601..3a61af440ec129d4dcf158bfb2cf1d5451a3cbbc 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerSettingsController.h +++ b/src/plugins/genome_aligner/src/GenomeAlignerSettingsController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/GenomeAlignerSettingsWidget.cpp b/src/plugins/genome_aligner/src/GenomeAlignerSettingsWidget.cpp index 68cd56fe26850e72b814e7d2c245b87a4a9fa096..4c4e51dcedea35d0670b15a8f435bfb6b7c83769 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerSettingsWidget.cpp +++ b/src/plugins/genome_aligner/src/GenomeAlignerSettingsWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/GenomeAlignerSettingsWidget.h b/src/plugins/genome_aligner/src/GenomeAlignerSettingsWidget.h index eb873cfb61b6eb873469a64eb1068cac53d8e00f..8533dec6a2bf09f2992a2e6090c0fe82702930b9 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerSettingsWidget.h +++ b/src/plugins/genome_aligner/src/GenomeAlignerSettingsWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/GenomeAlignerTask.cpp b/src/plugins/genome_aligner/src/GenomeAlignerTask.cpp index c04f0313ca245c914963057bcf90fceb26c4e656..86fc223205c2ddb77b618974949703d705fc4fba 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerTask.cpp +++ b/src/plugins/genome_aligner/src/GenomeAlignerTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -203,7 +203,12 @@ QList<Task*> GenomeAlignerTask::onSubTaskFinished( Task* subTask ) { if (seqReader->isEnd()) { if (!hasError()){ - setError(tr("Can not init short reads loader.")); + QString error = seqReader->getMemberError(); + if (error.isEmpty()) { + setError(tr("Can not init short reads loader.")); + } else { + setError(error); + } if (NULL != pWriteTask) { pWriteTask->setFinished(); } @@ -211,11 +216,19 @@ QList<Task*> GenomeAlignerTask::onSubTaskFinished( Task* subTask ) { return subTasks; } + QString assemblyObjectName = settings.resultFileName.baseFileName(); + bool nonMergedReference = index->getNumberOfSequencesInIndex(); + QString referenceSequenceName = nonMergedReference ? index->getFirstSequenceObjectName() : QString(); if (settings.samOutput) { - seqWriter = new GenomeAlignerUrlWriter(settings.resultFileName, index->getSeqName(), index->getSeqLength()); + seqWriter = new GenomeAlignerUrlWriter(settings.resultFileName, assemblyObjectName, index->getSeqLength()); } else { + QString referenceSequenceUrl = nonMergedReference ? settings.refSeqUrl.getURLString() : QString(); try { - seqWriter = new GenomeAlignerDbiWriter(settings.resultFileName.getURLString(), index->getSeqName(), index->getSeqLength()); + seqWriter = new GenomeAlignerDbiWriter(settings.resultFileName.getURLString(), + assemblyObjectName, + index->getSeqLength(), + referenceSequenceName, + referenceSequenceUrl); } catch (const QString &exeptionMessage) { setError(exeptionMessage); if (NULL != pWriteTask) { @@ -224,7 +237,9 @@ QList<Task*> GenomeAlignerTask::onSubTaskFinished( Task* subTask ) { return subTasks; } } - seqWriter->setReferenceName(index->getSeqName()); + if (!referenceSequenceName.isEmpty()) { + seqWriter->setReferenceName(index->getFirstSequenceObjectName()); + } if (!alignContext.bestMode) { pWriteTask->setSeqWriter(seqWriter); } @@ -237,7 +252,7 @@ QList<Task*> GenomeAlignerTask::onSubTaskFinished( Task* subTask ) { if (alignContext.bestMode) { // ReadShortReadsSubTask can add new data what can lead to realloc. Noone can touch these vectors without sync - writeTask = new WriteAlignedReadsSubTask(alignContext.listM, seqWriter, alignContext.data, readsAligned); + writeTask = new WriteAlignedReadsSubTask(alignContext.listM, writeLock, seqWriter, alignContext.data, readsAligned); writeTask->setSubtaskProgressWeight(0.0f); subTasks.append(writeTask); return subTasks; diff --git a/src/plugins/genome_aligner/src/GenomeAlignerTask.h b/src/plugins/genome_aligner/src/GenomeAlignerTask.h index eff145c83eedcd63fafc9055375c1a48f527478d..2e81d4d62cdef1c08c4a3a48c6a34604ea0d804b 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerTask.h +++ b/src/plugins/genome_aligner/src/GenomeAlignerTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,6 +24,7 @@ #include <QSharedPointer> #include <QTemporaryFile> +#include <QMutex> #include <U2Algorithm/DnaAssemblyTask.h> #include <U2Formats/StreamSequenceReader.h> @@ -108,6 +109,8 @@ private: qint64 shortreadIOTime; float currentProgress; + QMutex writeLock; + void setupCreateIndexTask(); void createGenomeAlignerWriteTask(); }; diff --git a/src/plugins/genome_aligner/src/GenomeAlignerWorker.cpp b/src/plugins/genome_aligner/src/GenomeAlignerWorker.cpp index 01cde32707cb8ca722526cc613a557bb2a13ee79..c2394eeaeda344eea495acde7407dfc847ca6948 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerWorker.cpp +++ b/src/plugins/genome_aligner/src/GenomeAlignerWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/GenomeAlignerWorker.h b/src/plugins/genome_aligner/src/GenomeAlignerWorker.h index b6004f097a22a183748e118ef27e057ea0d85799..a67c0a0ddfcf223a865f6ed261c6789d6125f5d3 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerWorker.h +++ b/src/plugins/genome_aligner/src/GenomeAlignerWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/GenomeAlignerWriteTask.cpp b/src/plugins/genome_aligner/src/GenomeAlignerWriteTask.cpp index 8a560435fc1314a18ad847ce9135d0f2504513de..0dd8597b72cd8894f578f2e62f6ba42fcbcc569c 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerWriteTask.cpp +++ b/src/plugins/genome_aligner/src/GenomeAlignerWriteTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/GenomeAlignerWriteTask.h b/src/plugins/genome_aligner/src/GenomeAlignerWriteTask.h index 0ef2dd4b85b8cbfd356113f1545821c1b718e685..252938fe4131b863b72a2611aeee555d7d26cc89 100644 --- a/src/plugins/genome_aligner/src/GenomeAlignerWriteTask.h +++ b/src/plugins/genome_aligner/src/GenomeAlignerWriteTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * diff --git a/src/plugins/genome_aligner/src/ReadShortReadsSubTask.cpp b/src/plugins/genome_aligner/src/ReadShortReadsSubTask.cpp index 07be09037e3386a0b972c851d0e97af376f2e0d3..a8b722e61ad37df1cbfd8a12fcc92f35519d34e6 100644 --- a/src/plugins/genome_aligner/src/ReadShortReadsSubTask.cpp +++ b/src/plugins/genome_aligner/src/ReadShortReadsSubTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/ReadShortReadsSubTask.h b/src/plugins/genome_aligner/src/ReadShortReadsSubTask.h index 5258724675e7a35da8dda1b5a48f769028e9bb7e..97b86f5f6638826c9d87289fa3277f87a3dd9477 100644 --- a/src/plugins/genome_aligner/src/ReadShortReadsSubTask.h +++ b/src/plugins/genome_aligner/src/ReadShortReadsSubTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/genome_aligner/src/WriteAlignedReadsSubTask.cpp b/src/plugins/genome_aligner/src/WriteAlignedReadsSubTask.cpp index 28fea73002b5d9e718b601584e94ab74b56559c0..6f4a1995d18fdabd8b496c23acd442b3cff29498 100644 --- a/src/plugins/genome_aligner/src/WriteAlignedReadsSubTask.cpp +++ b/src/plugins/genome_aligner/src/WriteAlignedReadsSubTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,8 +23,8 @@ namespace U2 { -WriteAlignedReadsSubTask::WriteAlignedReadsSubTask(QReadWriteLock &_listM, GenomeAlignerWriter *_seqWriter, QList<DataBunch*> &_data, quint64 &r) -: Task("WriteAlignedReadsSubTask", TaskFlag_None), seqWriter(_seqWriter), data(_data), readsAligned(r), listM(_listM) +WriteAlignedReadsSubTask::WriteAlignedReadsSubTask(QReadWriteLock &_listM, QMutex& _writeLock, GenomeAlignerWriter *_seqWriter, QList<DataBunch*> &_data, quint64 &r) +: Task("WriteAlignedReadsSubTask", TaskFlag_None), seqWriter(_seqWriter), data(_data), readsAligned(r), listM(_listM), writeLock(_writeLock) { } @@ -42,6 +42,7 @@ void WriteAlignedReadsSubTask::setReadWritten(SearchQuery *read, SearchQuery *re void WriteAlignedReadsSubTask::run() { // ReadShortReadsSubTask can add new data what can lead to realloc. Noone can touch these vectors without sync QReadLocker locker(&listM); + QMutexLocker writeLockLocker(&writeLock); stateInfo.setProgress(0); diff --git a/src/plugins/genome_aligner/src/WriteAlignedReadsSubTask.h b/src/plugins/genome_aligner/src/WriteAlignedReadsSubTask.h index a14c5eaabce43e1d4f7024728d902bd3b57ed2ec..191dc927d48e8d5ad2507bdfc2a032973ff9b885 100644 --- a/src/plugins/genome_aligner/src/WriteAlignedReadsSubTask.h +++ b/src/plugins/genome_aligner/src/WriteAlignedReadsSubTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,7 +33,7 @@ namespace U2 { class WriteAlignedReadsSubTask : public Task { Q_OBJECT public: - WriteAlignedReadsSubTask(QReadWriteLock &listM, GenomeAlignerWriter *seqWriter, QList<DataBunch*> &data, quint64 &readsAligned); + WriteAlignedReadsSubTask(QReadWriteLock &listM, QMutex& _writeLock, GenomeAlignerWriter *seqWriter, QList<DataBunch*> &data, quint64 &readsAligned); virtual void run(); private: GenomeAlignerWriter *seqWriter; @@ -42,6 +42,9 @@ private: inline void setReadWritten(SearchQuery *read, SearchQuery *revCompl); QReadWriteLock &listM; + + // lock to use when data is written to output. + QMutex& writeLock; }; } //namespace diff --git a/src/plugins/genome_aligner/transl/russian.ts b/src/plugins/genome_aligner/transl/russian.ts index a22cd4e7befbcbd63039407ff69fc3d0bd89084a..caf7e8bcc87b69ce21ba74f11e8c0074294802ea 100644 --- a/src/plugins/genome_aligner/transl/russian.ts +++ b/src/plugins/genome_aligner/transl/russian.ts @@ -520,42 +520,42 @@ Press "Cancel" to change this parameter or the index folder.</source> <translation>ИÑпользовать индекÑ: %2</translation> </message> <message> - <location filename="../src/GenomeAlignerTask.cpp" line="206"/> + <location filename="../src/GenomeAlignerTask.cpp" line="208"/> <source>Can not init short reads loader.</source> <translation>Ðевозможно загрузить короткие риды.</translation> </message> <message> - <location filename="../src/GenomeAlignerTask.cpp" line="333"/> + <location filename="../src/GenomeAlignerTask.cpp" line="348"/> <source>The aligning is finished.</source> <translation>Выравнивание завершено.</translation> </message> <message> - <location filename="../src/GenomeAlignerTask.cpp" line="334"/> + <location filename="../src/GenomeAlignerTask.cpp" line="349"/> <source>Whole working time = %1.</source> <translation>Ð’Ñ€ÐµÐ¼Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ = %1.</translation> </message> <message> - <location filename="../src/GenomeAlignerTask.cpp" line="335"/> + <location filename="../src/GenomeAlignerTask.cpp" line="350"/> <source>%1% reads aligned.</source> <translation>%1% ридов было выровнено.</translation> </message> <message> - <location filename="../src/GenomeAlignerTask.cpp" line="337"/> + <location filename="../src/GenomeAlignerTask.cpp" line="352"/> <source>Short-reads loading time = %1</source> <translation>Ð’Ñ€ÐµÐ¼Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ ридов = %1</translation> </message> <message> - <location filename="../src/GenomeAlignerTask.cpp" line="338"/> + <location filename="../src/GenomeAlignerTask.cpp" line="353"/> <source>Results writing time = %1</source> <translation>Ð’Ñ€ÐµÐ¼Ñ Ð·Ð°Ð¿Ð¸Ñи результатов = %1</translation> </message> <message> - <location filename="../src/GenomeAlignerTask.cpp" line="340"/> + <location filename="../src/GenomeAlignerTask.cpp" line="355"/> <source>Index loading time = %1</source> <translation>Ð’Ñ€ÐµÐ¼Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ индекÑа = %1</translation> </message> <message> - <location filename="../src/GenomeAlignerTask.cpp" line="341"/> + <location filename="../src/GenomeAlignerTask.cpp" line="356"/> <source>Short-reads IO time = %1</source> <translation>Ð’Ñ€ÐµÐ¼Ñ IO коротких ридов = %1</translation> </message> @@ -680,17 +680,22 @@ Press "Cancel" to change this parameter or the index folder.</source> <context> <name>U2::LocalWorkflow::GenomeAlignerPrompter</name> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="198"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="216"/> <source>unset</source> <translation>не указан</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="202"/> - <source>Maps reads from <u>%1</u> </source> + <location filename="../src/GenomeAlignerWorker.cpp" line="219"/> + <source>Maps input reads from <u>%1</u> </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="203"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="224"/> + <source> to reference sequence with index <u>%1</u>.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/GenomeAlignerWorker.cpp" line="227"/> <source> to reference sequence <u>%1</u>.</source> <translation type="unfinished"></translation> </message> @@ -706,177 +711,217 @@ Press "Cancel" to change this parameter or the index folder.</source> <context> <name>U2::LocalWorkflow::GenomeAlignerWorker</name> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="305"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="346"/> <source>Is absolute mismatches values?</source> <translation>Ðто абÑолютное чиÑло неÑоответÑтвий?</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="247"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="272"/> <source>Bowtie2 cannot recognize read pairs from the same file. Please, perform demultiplexing first.</source> <translation>Bowtie2 не может раÑпознать пары ридов из того же файла. ПожалуйÑта, выполните демультиплекÑирование в первую очередь.</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="222"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="247"/> <source>The slot must be not empty: '%1'</source> <translation>Слот не может быть пуÑтым: '%1'</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="260"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="285"/> <source>URL of a file with reads</source> <translation>Путь до файла Ñ Ñ€Ð¸Ð´Ð°Ð¼Ð¸</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="261"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="286"/> <source>Input reads to be aligned.</source> <translation>Входные риды будут выровнены.</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="263"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="288"/> <source>URL of a file with mate reads</source> <translation>Путь до файла Ñо вÑпомогательными ридами</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="264"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="289"/> <source>Input mate reads to be aligned.</source> <translation>Ð’Ñпомогательные риды будут выровнены.</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="270"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="295"/> <source>Genome aligner data</source> <translation>Данные Ð¼Ð¾Ð´ÑƒÐ»Ñ Ñборки контигов</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="271"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="296"/> <source>Input reads to be aligned with Bowtie2.</source> <translation>Входные риды будут выровнены при помощи Bowtie2.</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="278"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="303"/> <source>Assembly URL</source> <translation>Путь до Ñборки</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="279"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="304"/> <source>Output assembly URL.</source> <translation>Выходной путь Ð´Ð»Ñ Ñборки.</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="282"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="307"/> <source>Genome aligner output data</source> <translation>Выходные данные Ð¼Ð¾Ð´ÑƒÐ»Ñ Ñборки контигов</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="283"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="308"/> <source>Output assembly files.</source> <translation>Выходные файлы Ñборки.</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="294"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="319"/> <source>Output folder</source> <translation>Ð’Ñ‹Ñ…Ð¾Ð´Ð½Ð°Ñ Ð¿Ð°Ð¿ÐºÐ°</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="295"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="320"/> <source>Folder to save UGENE genome aligner output files.</source> <translation>Папка Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ñ‹Ñ… файлов Ð¼Ð¾Ð´ÑƒÐ»Ñ Ñборки контигов.</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="298"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="323"/> <source>Output file name</source> <translation>Ð˜Ð¼Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ файла</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="299"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="324"/> <source>Base name of the output file. 'out.sam' by default</source> <translation>Базовое Ð¸Ð¼Ñ Ð´Ð»Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ñ‹Ñ… файлов. По умолчанию 'out.sam'</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="302"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="327"/> + <source>Reference input type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/GenomeAlignerWorker.cpp" line="328"/> + <source>Select "Sequence" to input a reference genome as a sequence file. <br/>Note that any sequence file format, supported by UGENE, is allowed (FASTA, GenBank, etc.). <br/>The index will be generated automatically in this case. <br/>Select "Index" to input already generated index files, specific for the tool.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/GenomeAlignerWorker.cpp" line="334"/> <source>Reference genome</source> <translation>РеференÑÐ½Ð°Ñ Ð¿Ð¾ÑледовательноÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="303"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="335"/> <source>Path to indexed reference genome.</source> <translation>Путь до индекÑированной референÑной поÑледовательноÑти.</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="306"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="338"/> + <source>Genome Aligner index folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/GenomeAlignerWorker.cpp" line="339"/> + <source>The folder with the index for the reference sequence.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/GenomeAlignerWorker.cpp" line="342"/> + <source>Genome Aligner index basename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/GenomeAlignerWorker.cpp" line="343"/> + <source>The basename of the index for the reference sequence.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/GenomeAlignerWorker.cpp" line="347"/> <source><html><body><p><b>true</b> - absolute mismatches mode is used</p><p><b>false</b> - percentage mismatches mode is used</p> You can choose absolute or percentage mismatches values mode.</body></html></source> <translation><html><body><p><b>true</b> - иÑпользуетÑÑ Ð°Ð±Ñолютное значение неÑоответÑтвий</p><p><b>false</b> - иÑпользуетÑÑ Ð¿Ñ€Ð¾Ñ†ÐµÐ½Ñ‚Ð½Ð¾Ðµ значение неÑоответÑтвий</p> Ð’Ñ‹ можете выбрать абÑолютный или процентный режим.</body></html></translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="309"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="350"/> <source>Absolute mismatches</source> <translation>ÐбÑолютное чиÑло неÑоответÑтвий</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="310"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="351"/> <source><html><body>Number of mismatches allowed while aligning reads.</body></html></source> <translation><html><body>ЧиÑло неÑоответÑтвий, допуÑтимое при Ñборке контигов из Ñчитываемых поÑледовательноÑтей.</body></html></translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="312"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="353"/> <source>Percentage mismatches</source> <translation>Процентное чиÑло неÑоответÑтвий</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="313"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="354"/> <source><html><body>Percentage of mismatches allowed while aligning reads.</body></html></source> <translation><html><body>Процентное чиÑло неÑоответÑтвий, допуÑтимое при Ñобрке контигов из Ñчитываемых поÑледовательноÑтей.</body></html></translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="315"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="356"/> <source>Align reverse complement reads</source> <translation>ВыровнÑÑ‚ÑŒ обратно-комплементарные риды</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="316"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="357"/> <source><html><body>Set this option to align both direct and reverse complement reads.</body></html></source> <translation><html><body>Выбрать Ñту опцию, чтобы выровнÑÑ‚ÑŒ риды и обратно комплементарные риды.</body></html></translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="318"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="359"/> <source>Use "best"-mode</source> <translation>ИÑпользовать "best" режим</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="319"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="360"/> <source><html><body>Report only the best alignment for each read (in terms of mismatches).</body></html></source> <translation><html><body>Включить в отчет только наилучшее выравнивание (в терминах неÑовпадений)</body></html> </translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="321"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="362"/> <source>Omit reads with qualities lower than</source> <translation>ПропуÑтить риды Ñ ÐºÐ°Ñ‡ÐµÑтвом менее чем</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="322"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="363"/> <source><html><body>Omit reads with qualities lower than the specified value. Reads that have no qualities are not omited. <p>Set <b>"0"</b> to switch off this option.</p></body></html></source> <translation><html><body>ПропуÑтить риды Ñ ÐºÐ°Ñ‡ÐµÑтвом ниже указанного значениÑ. Риды, которые не имеют оценки качеÑтва не пропуÑкаютÑÑ. <p>УÑтановите <b>"0"</b> чтобы переключить Ñту опцию.</p></body></html></translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="350"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="401"/> <source>Map Reads with UGENE Genome Aligner</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="351"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="402"/> <source>Genome Aligner is a program for mapping short DNA sequence reads to a long reference sequence, developed by the UGENE team.<br/><br/>Provide URL(s) to FASTA or FASTQ file(s) with NGS reads to the input port of the element, set up the reference sequence in the parameters. The result is saved to the specified SAM file, URL to the file is passed to the output port.</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../src/GenomeAlignerWorker.cpp" line="414"/> + <source>Sequence</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/GenomeAlignerWorker.cpp" line="415"/> + <source>Index</source> + <translation type="unfinished">ИндекÑ</translation> + </message> <message> <source>Align Reads with UGENE Genome Aligner</source> <translation type="vanished">Выравнивание Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ Ð¼Ð¾Ð´ÑƒÐ»Ñ Ñборки контигов UGENE</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="329"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="370"/> <source>Use GPU-optimization</source> <translation>ИÑпользовать GPU оптимизацию</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="330"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="371"/> <source><html><body>Use GPU-calculatings while aligning reads. This option requires OpenCL-enable GPU-device.</body></html></source> <translation><html><body>ИÑпользовать GPU-вычиÑÐ»ÐµÐ½Ð¸Ñ Ð² процеÑÑе выравниваниÑ. Ðта Ð¾Ð¿Ñ†Ð¸Ñ Ñ‚Ñ€ÐµÐ±ÑƒÐµÑ‚ наличие уÑтройÑтва OpenCL GPU.</body></html></translation> </message> @@ -885,7 +930,7 @@ Press "Cancel" to change this parameter or the index folder.</source> <translation type="vanished">Уникальный алгоритм UGENE Ð´Ð»Ñ Ñборки контигов из Ñчитываемых поÑледовательноÑтей по референÑному геному</translation> </message> <message> - <location filename="../src/GenomeAlignerWorker.cpp" line="95"/> + <location filename="../src/GenomeAlignerWorker.cpp" line="98"/> <source>Short reads list is empty.</source> <translation>СпиÑок Ñчитываемых поÑледовательноÑтей пуÑÑ‚.</translation> </message> diff --git a/src/plugins/kraken_support/kraken_support.pri b/src/plugins/kraken_support/kraken_support.pri index a4c7b3930a9d6af0fa13febe5fb71f00a4fb6962..24dd6c180ee8f890c8a2b65f9d0ef98e467cd047 100644 --- a/src/plugins/kraken_support/kraken_support.pri +++ b/src/plugins/kraken_support/kraken_support.pri @@ -1,21 +1,12 @@ # include (kraken_support.pri) -include (../../ugene_version.pri) +include (../../ugene_globals.pri) PLUGIN_ID=kraken_support PLUGIN_NAME=Kraken external tool support PLUGIN_VENDOR=Unipro -PLUGIN_DEPENDS=ngs_reads_classification:$${UGENE_VERSION};external_tool_support:$${UGENE_VERSION} - -LIBS += -L../../_release/plugins -lngs_reads_classification - -!debug_and_release|build_pass { - CONFIG(debug, debug|release) { - PLUGIN_DEPENDS -= ngs_reads_classification:$${UGENE_VERSION};external_tool_support:$${UGENE_VERSION} - PLUGIN_DEPENDS += ngs_reads_classificationd:$${UGENE_VERSION};external_tool_supportd:$${UGENE_VERSION} - - LIBS -= -L../../_release/plugins -lngs_reads_classification - LIBS += -L../../_debug/plugins -lngs_reads_classificationd - } -} +PLUGIN_DEPENDS=ngs_reads_classification$${D}:$${UGENE_VERSION};external_tool_support$${D}:$${UGENE_VERSION} include( ../../ugene_plugin_common.pri ) + +LIBS += -L../../$$out_dir()/plugins +LIBS += -lngs_reads_classification$$D diff --git a/src/plugins/kraken_support/src/DatabaseSizeRelation.cpp b/src/plugins/kraken_support/src/DatabaseSizeRelation.cpp index e318f27a4dc491ba753ecb958229f4b94c92ba95..aa4c113a77d8387d3f0a8116bf8eb8f30acc0aa7 100644 --- a/src/plugins/kraken_support/src/DatabaseSizeRelation.cpp +++ b/src/plugins/kraken_support/src/DatabaseSizeRelation.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/kraken_support/src/DatabaseSizeRelation.h b/src/plugins/kraken_support/src/DatabaseSizeRelation.h index 5c086ce7d02085881f25529bacc4e28bd641d2f7..04c2b37f18f891d41301cc679eecca87492b8bb8 100644 --- a/src/plugins/kraken_support/src/DatabaseSizeRelation.h +++ b/src/plugins/kraken_support/src/DatabaseSizeRelation.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/kraken_support/src/KrakenBuildPrompter.cpp b/src/plugins/kraken_support/src/KrakenBuildPrompter.cpp index 85c8258ee1a03e5ec0f3591b632e1264bfddf37d..a6a8ef27ff4daa2c9f221249a9d0f96bb0a49bea 100644 --- a/src/plugins/kraken_support/src/KrakenBuildPrompter.cpp +++ b/src/plugins/kraken_support/src/KrakenBuildPrompter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/kraken_support/src/KrakenBuildPrompter.h b/src/plugins/kraken_support/src/KrakenBuildPrompter.h index 902d1f74caecf652e9da15e9d1848fcaa19580b2..a209d6e6c54dd31cf26f54228f6ffcaa09abf0a5 100644 --- a/src/plugins/kraken_support/src/KrakenBuildPrompter.h +++ b/src/plugins/kraken_support/src/KrakenBuildPrompter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/kraken_support/src/KrakenBuildTask.cpp b/src/plugins/kraken_support/src/KrakenBuildTask.cpp index 65187c355cbab76fb2d6c7ab73dcc977ec1bc34f..99cba4417afd4ffbfa9cab671ea598e7847464bd 100644 --- a/src/plugins/kraken_support/src/KrakenBuildTask.cpp +++ b/src/plugins/kraken_support/src/KrakenBuildTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -83,22 +83,22 @@ void KrakenBuildTask::prepare() { CHECK_OP(stateInfo, ); foreach (const QString &additionalGenome, settings.additionalGenomesUrls) { - ExternalToolRunTask *addToLibraryTask = new ExternalToolRunTask(KrakenSupport::BUILD_TOOL, getAddToLibraryArguments(additionalGenome), new ExternalToolLogParser()); + ExternalToolRunTask *addToLibraryTask = new ExternalToolRunTask(KrakenSupport::BUILD_TOOL_ID, getAddToLibraryArguments(additionalGenome), new ExternalToolLogParser()); setListenerForTask(addToLibraryTask, listenerNumber++); newSubTasks << addToLibraryTask; } - ExternalToolRunTask *buildTask = new ExternalToolRunTask(KrakenSupport::BUILD_TOOL, getBuildArguments(), new ExternalToolLogParser()); + ExternalToolRunTask *buildTask = new ExternalToolRunTask(KrakenSupport::BUILD_TOOL_ID, getBuildArguments(), new ExternalToolLogParser()); setListenerForTask(buildTask, listenerNumber++); newSubTasks << buildTask; if (settings.clean) { - ExternalToolRunTask *cleanTask = new ExternalToolRunTask(KrakenSupport::BUILD_TOOL, getCleanArguments(), new ExternalToolLogParser()); + ExternalToolRunTask *cleanTask = new ExternalToolRunTask(KrakenSupport::BUILD_TOOL_ID, getCleanArguments(), new ExternalToolLogParser()); setListenerForTask(cleanTask, listenerNumber++); newSubTasks << cleanTask; } } else if (settings.mode == KrakenBuildTaskSettings::SHRINK) { - ExternalToolRunTask *shrinkTask = new ExternalToolRunTask(KrakenSupport::BUILD_TOOL, getShrinkArguments(), new ExternalToolLogParser()); + ExternalToolRunTask *shrinkTask = new ExternalToolRunTask(KrakenSupport::BUILD_TOOL_ID, getShrinkArguments(), new ExternalToolLogParser()); setListenerForTask(shrinkTask); newSubTasks << shrinkTask; } else { diff --git a/src/plugins/kraken_support/src/KrakenBuildTask.h b/src/plugins/kraken_support/src/KrakenBuildTask.h index 967b99d174cb5cde9dde9411152a3ae91bdc94aa..9b4434162fb182f89894e86a3ec8619276d42985 100644 --- a/src/plugins/kraken_support/src/KrakenBuildTask.h +++ b/src/plugins/kraken_support/src/KrakenBuildTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/kraken_support/src/KrakenBuildValidator.cpp b/src/plugins/kraken_support/src/KrakenBuildValidator.cpp index d03429a2403d79092877d1498a42f966770bb1cd..f0f93fc6efcd916229ac991cb9348def681c4227 100644 --- a/src/plugins/kraken_support/src/KrakenBuildValidator.cpp +++ b/src/plugins/kraken_support/src/KrakenBuildValidator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/kraken_support/src/KrakenBuildValidator.h b/src/plugins/kraken_support/src/KrakenBuildValidator.h index 5f68d972708e0dd9877823a9f8233bcdc3cf8d68..62ff3a5f74ab1071e6d9ef4964f07d6b1536c67c 100644 --- a/src/plugins/kraken_support/src/KrakenBuildValidator.h +++ b/src/plugins/kraken_support/src/KrakenBuildValidator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/kraken_support/src/KrakenBuildWorker.cpp b/src/plugins/kraken_support/src/KrakenBuildWorker.cpp index c09e01d30132ece4123f00c4f0fb7fd40d1de77a..77bd3fe3e8f89853cf100683e5b708b2901b3ed7 100644 --- a/src/plugins/kraken_support/src/KrakenBuildWorker.cpp +++ b/src/plugins/kraken_support/src/KrakenBuildWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/kraken_support/src/KrakenBuildWorker.h b/src/plugins/kraken_support/src/KrakenBuildWorker.h index aac1382e86bb36e9f0080408c05dda461f54a67c..0f4016361b8cc4412019b4c0038adc3718d62e5d 100644 --- a/src/plugins/kraken_support/src/KrakenBuildWorker.h +++ b/src/plugins/kraken_support/src/KrakenBuildWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/kraken_support/src/KrakenBuildWorkerFactory.cpp b/src/plugins/kraken_support/src/KrakenBuildWorkerFactory.cpp index 22556795900e0464427ec280c645e5066572563f..6dc7e7c4fac3d88a0e5da5e65ada2d8c7757649e 100644 --- a/src/plugins/kraken_support/src/KrakenBuildWorkerFactory.cpp +++ b/src/plugins/kraken_support/src/KrakenBuildWorkerFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -64,13 +64,9 @@ const QString KrakenBuildWorkerFactory::WORK_ON_DISK_ATTR_ID = "work-on-disk"; const QString KrakenBuildWorkerFactory::JELLYFISH_HASH_SIZE_ATTR_ID = "jellyfish-hash-size"; const QString KrakenBuildWorkerFactory::THREADS_NUMBER_ATTR_ID = "threads"; -const QString KrakenBuildWorkerFactory::BUILD_MODE_TEXT = QObject::tr("Build"); -const QString KrakenBuildWorkerFactory::SHRINK_MODE_TEXT = QObject::tr("Shrink"); - KrakenBuildWorkerFactory::KrakenBuildWorkerFactory() : DomainFactory(ACTOR_ID) { - } Worker *KrakenBuildWorkerFactory::createWorker(Actor *actor) { @@ -80,63 +76,63 @@ Worker *KrakenBuildWorkerFactory::createWorker(Actor *actor) { void KrakenBuildWorkerFactory::init() { QList<PortDescriptor *> ports; { - const Descriptor outSlotDesc(BaseSlots::URL_SLOT().getId(), KrakenBuildPrompter::tr("Output URL"), KrakenBuildPrompter::tr("Output URL.")); + Descriptor outSlotDesc(BaseSlots::URL_SLOT().getId(), KrakenBuildPrompter::tr("Output URL"), KrakenBuildPrompter::tr("Output URL.")); QMap<Descriptor, DataTypePtr> outType; outType[outSlotDesc] = BaseTypes::STRING_TYPE(); - const Descriptor outPortDesc(OUTPUT_PORT_ID, KrakenBuildPrompter::tr("Output Kraken database"), KrakenBuildPrompter::tr("URL to the folder with the Kraken database.")); + Descriptor outPortDesc(OUTPUT_PORT_ID, KrakenBuildPrompter::tr("Output Kraken database"), KrakenBuildPrompter::tr("URL to the folder with the Kraken database.")); ports << new PortDescriptor(outPortDesc, DataTypePtr(new MapDataType(ACTOR_ID + "-out", outType)), false /*input*/, true /*multi*/); } QList<Attribute *> attributes; { - const Descriptor modeDesc(MODE_ATTR_ID, KrakenBuildPrompter::tr("Mode"), + Descriptor modeDesc(MODE_ATTR_ID, KrakenBuildPrompter::tr("Mode"), KrakenBuildPrompter::tr("Select \"Build\" to create a new database from a genomic library (--build).<br><br>" "Select \"Shrink\" to shrink an existing database to have only specified number of k-mers (--shrink).")); - const Descriptor inputDatabaseNameDesc(INPUT_DATABASE_NAME_ATTR_ID, KrakenBuildPrompter::tr("Input database"), + Descriptor inputDatabaseNameDesc(INPUT_DATABASE_NAME_ATTR_ID, KrakenBuildPrompter::tr("Input database"), KrakenBuildPrompter::tr("Name of the input database that should be shrunk (corresponds to --db that is used with --shrink).")); - const Descriptor newDatabaseNameDesc(NEW_DATABASE_NAME_ATTR_ID, KrakenBuildPrompter::tr("Database"), + Descriptor newDatabaseNameDesc(NEW_DATABASE_NAME_ATTR_ID, KrakenBuildPrompter::tr("Database"), KrakenBuildPrompter::tr("Name of the output Kraken database (corresponds to --db that is used with --build, and to --new-db that is used with --shrink).")); - const Descriptor genomicLibraryDesc(GENOMIC_LIBRARY_ATTR_ID, KrakenBuildPrompter::tr("Genomic library"), + Descriptor genomicLibraryDesc(GENOMIC_LIBRARY_ATTR_ID, KrakenBuildPrompter::tr("Genomic library"), KrakenBuildPrompter::tr("Genomes that should be used to build the database.<br><br>" "The genomes should be specified in FASTA format. The sequence IDs must contain either a GI number or a taxonomy ID (see documentation for details).")); - const Descriptor numberOfKmersDesc(NUMBER_OF_K_MERS_ATTR_ID, KrakenBuildPrompter::tr("Number of k-mers"), + Descriptor numberOfKmersDesc(NUMBER_OF_K_MERS_ATTR_ID, KrakenBuildPrompter::tr("Number of k-mers"), KrakenBuildPrompter::tr("The new database will contain the specified number of k-mers selected from across the input database.")); - const Descriptor kMerLengthDesc(K_MER_LENGTH_ATTR_ID, KrakenBuildPrompter::tr("K-mer length"), + Descriptor kMerLengthDesc(K_MER_LENGTH_ATTR_ID, KrakenBuildPrompter::tr("K-mer length"), KrakenBuildPrompter::tr("K-mer length in bp (--kmer-len).")); - const Descriptor minimizerLengthDesc(MINIMIZER_LENGTH_ATTR_ID, KrakenBuildPrompter::tr("Minimizer length"), + Descriptor minimizerLengthDesc(MINIMIZER_LENGTH_ATTR_ID, KrakenBuildPrompter::tr("Minimizer length"), KrakenBuildPrompter::tr("Minimizer length in bp (--minimizer-len).<br><br>" "The minimizers serve to keep k-mers that are adjacent in query sequences close to each other in the database, which allows Kraken to exploit the CPU cache.<br><br>" "Changing the value of the parameter can significantly affect the speed of Kraken, and neither increasing nor decreasing of the value will guarantee faster or slower speed.")); - const Descriptor maximumDatabaseSizeDesc(MAXIMUM_DATABASE_SIZE_ATTR_ID, KrakenBuildPrompter::tr("Maximum database size"), + Descriptor maximumDatabaseSizeDesc(MAXIMUM_DATABASE_SIZE_ATTR_ID, KrakenBuildPrompter::tr("Maximum database size"), KrakenBuildPrompter::tr("By default, a full database build is done.<br><br>" "To shrink the database before the full build, input the size of the database in Mb " "(this corresponds to the --max-db-size parameter, but Mb is used instead of Gb). " "The size is specified together for the database and the index.")); - const Descriptor shrinkBlockOffsetDesc(SHRINK_BLOCK_OFFSET_ATTR_ID, KrakenBuildPrompter::tr("Shrink block offset"), + Descriptor shrinkBlockOffsetDesc(SHRINK_BLOCK_OFFSET_ATTR_ID, KrakenBuildPrompter::tr("Shrink block offset"), KrakenBuildPrompter::tr("When shrinking, select the k-mer that is NUM positions from the end of a block of k-mers (--shrink-block-offset).")); - const Descriptor cleanDesc(CLEAN_ATTR_ID, KrakenBuildPrompter::tr("Clean"), + Descriptor cleanDesc(CLEAN_ATTR_ID, KrakenBuildPrompter::tr("Clean"), KrakenBuildPrompter::tr("Remove unneeded files from a built database to reduce the disk usage (--clean).")); - const Descriptor workOnDiskDesc(WORK_ON_DISK_ATTR_ID, KrakenBuildPrompter::tr("Work on disk"), + Descriptor workOnDiskDesc(WORK_ON_DISK_ATTR_ID, KrakenBuildPrompter::tr("Work on disk"), KrakenBuildPrompter::tr("Perform most operations on disk rather than in RAM (this will slow down build in most cases).")); - const Descriptor jellyfishHashSizeDesc(JELLYFISH_HASH_SIZE_ATTR_ID, KrakenBuildPrompter::tr("Jellyfish hash size"), + Descriptor jellyfishHashSizeDesc(JELLYFISH_HASH_SIZE_ATTR_ID, KrakenBuildPrompter::tr("Jellyfish hash size"), KrakenBuildPrompter::tr("The \"kraken-build\" tool uses the \"jellyfish\" tool. This parameter specifies the hash size for Jellyfish.<br><br>" "Supply a smaller hash size to Jellyfish, if you encounter problems with allocating enough memory during the build process (--jellyfish-hash-size).<br><br>" "By default, the parameter is not used.")); - const Descriptor threadNumberDesc(THREADS_NUMBER_ATTR_ID, KrakenBuildPrompter::tr("Number of threads"), + Descriptor threadNumberDesc(THREADS_NUMBER_ATTR_ID, KrakenBuildPrompter::tr("Number of threads"), KrakenBuildPrompter::tr("Use multiple threads (--threads).")); Attribute *modeAttribute = new Attribute(modeDesc, BaseTypes::STRING_TYPE(), false, KrakenBuildTaskSettings::BUILD); @@ -179,8 +175,8 @@ void KrakenBuildWorkerFactory::init() { QMap<QString, PropertyDelegate *> delegates; { QVariantMap modeValues; - modeValues[BUILD_MODE_TEXT] = KrakenBuildTaskSettings::BUILD; - modeValues[SHRINK_MODE_TEXT] = KrakenBuildTaskSettings::SHRINK; + modeValues[KrakenSupport::tr("Build")] = KrakenBuildTaskSettings::BUILD; + modeValues[KrakenSupport::tr("Shrink")] = KrakenBuildTaskSettings::SHRINK; delegates[MODE_ATTR_ID] = new ComboBoxDelegate(modeValues); delegates[INPUT_DATABASE_NAME_ATTR_ID] = new URLDelegate("", "kraken/database", false, true, false); @@ -235,13 +231,13 @@ void KrakenBuildWorkerFactory::init() { delegates[THREADS_NUMBER_ATTR_ID] = new SpinBoxDelegate(threadsNumberProperties); } - const Descriptor desc(ACTOR_ID, KrakenBuildPrompter::tr("Build Kraken Database"), + Descriptor desc(ACTOR_ID, KrakenBuildPrompter::tr("Build Kraken Database"), KrakenBuildPrompter::tr("Build a Kraken database from a genomic library or shrink a Kraken database.")); ActorPrototype *proto = new IntegralBusActorPrototype(desc, ports, attributes); proto->setEditor(new DelegateEditor(delegates)); proto->setPrompter(new KrakenBuildPrompter(NULL)); - proto->addExternalTool(KrakenSupport::BUILD_TOOL); + proto->addExternalTool(KrakenSupport::BUILD_TOOL_ID); proto->setValidator(new KrakenBuildValidator()); WorkflowEnv::getProtoRegistry()->registerProto(NgsReadsClassificationPlugin::WORKFLOW_ELEMENTS_GROUP, proto); diff --git a/src/plugins/kraken_support/src/KrakenBuildWorkerFactory.h b/src/plugins/kraken_support/src/KrakenBuildWorkerFactory.h index cb5255a0da35ac717ad3d41b89e24064961f87e7..1defe17ba55c1b9716cb218ff8f4cb270ef19099 100644 --- a/src/plugins/kraken_support/src/KrakenBuildWorkerFactory.h +++ b/src/plugins/kraken_support/src/KrakenBuildWorkerFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -53,9 +53,6 @@ public: static const QString WORK_ON_DISK_ATTR_ID; static const QString JELLYFISH_HASH_SIZE_ATTR_ID; static const QString THREADS_NUMBER_ATTR_ID; - - static const QString BUILD_MODE_TEXT; - static const QString SHRINK_MODE_TEXT; }; } // namespace LocalWorkflow diff --git a/src/plugins/kraken_support/src/KrakenClassifyLogParser.cpp b/src/plugins/kraken_support/src/KrakenClassifyLogParser.cpp index 10579e98e43218e78ed2db72237935e5f851fa69..7f2a0b5e8306d2b41ab9fb12b185e63df300a788 100644 --- a/src/plugins/kraken_support/src/KrakenClassifyLogParser.cpp +++ b/src/plugins/kraken_support/src/KrakenClassifyLogParser.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/kraken_support/src/KrakenClassifyLogParser.h b/src/plugins/kraken_support/src/KrakenClassifyLogParser.h index 62e69996b5796faa00b8e6f35336fa25639382ab..14ddb9463e72acec92163a6dc9d07513310aa288 100644 --- a/src/plugins/kraken_support/src/KrakenClassifyLogParser.h +++ b/src/plugins/kraken_support/src/KrakenClassifyLogParser.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/kraken_support/src/KrakenClassifyPrompter.cpp b/src/plugins/kraken_support/src/KrakenClassifyPrompter.cpp index d88f696c868028188d5eb12343ec16d237638dfb..f87a7125113c45ab3b772f8c80513e2242761431 100644 --- a/src/plugins/kraken_support/src/KrakenClassifyPrompter.cpp +++ b/src/plugins/kraken_support/src/KrakenClassifyPrompter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/kraken_support/src/KrakenClassifyPrompter.h b/src/plugins/kraken_support/src/KrakenClassifyPrompter.h index c2385d1bccaa7b6a4d17592e5513cbcef8eb893a..f5a4b6ed3bc798a9d365392911c87afb654c6c42 100644 --- a/src/plugins/kraken_support/src/KrakenClassifyPrompter.h +++ b/src/plugins/kraken_support/src/KrakenClassifyPrompter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/kraken_support/src/KrakenClassifyTask.cpp b/src/plugins/kraken_support/src/KrakenClassifyTask.cpp index 6d7a03aa25db2df2acae9bd59a806a739cb07afb..4aac5de70245eb9947b7ae564ccc8a48511f2311 100644 --- a/src/plugins/kraken_support/src/KrakenClassifyTask.cpp +++ b/src/plugins/kraken_support/src/KrakenClassifyTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -44,7 +44,7 @@ KrakenClassifyTaskSettings::KrakenClassifyTaskSettings() } KrakenClassifyTask::KrakenClassifyTask(const KrakenClassifyTaskSettings &settings) - : ExternalToolSupportTask(tr("Classify reads with Kraken"), TaskFlags_NR_FOSE_COSC), + : ExternalToolSupportTask(tr("Classify reads with Kraken"), TaskFlags_FOSE_COSC), settings(settings), classifyTask(NULL) { @@ -60,8 +60,12 @@ const QString &KrakenClassifyTask::getClassificationUrl() const { return settings.classificationUrl; } +const LocalWorkflow::TaxonomyClassificationResult & KrakenClassifyTask::getParsedReport() const { + return parsedReport; +} + void KrakenClassifyTask::prepare() { - classifyTask = new ExternalToolRunTask(KrakenSupport::CLASSIFY_TOOL, getArguments(), new KrakenClassifyLogParser()); + classifyTask = new ExternalToolRunTask(KrakenSupport::CLASSIFY_TOOL_ID, getArguments(), new KrakenClassifyLogParser()); setListenerForTask(classifyTask); addSubTask(classifyTask); } @@ -94,4 +98,39 @@ QStringList KrakenClassifyTask::getArguments() { return arguments; } +void KrakenClassifyTask::run() { + QFile reportFile(settings.classificationUrl); + if (!reportFile.open(QIODevice::ReadOnly)) { + setError(tr("Cannot open classification report: %1").arg(settings.classificationUrl)); + } else { + QByteArray line; + + while ((line = reportFile.readLine()).size() != 0) { + if (line.startsWith("C\t") || line.startsWith("U\t")) { + QList<QByteArray> row = line.split('\t'); + if (row.size() >= 5) { + QString objID = row[1]; + QByteArray &assStr = row[2]; + algoLog.trace(QString("Found Kraken classification: %1=%2").arg(objID).arg(QString(assStr))); + + bool ok = true; + LocalWorkflow::TaxID assID = assStr.toUInt(&ok); + if (ok) { + if (parsedReport.contains(objID)) { + QString msg = tr("Duplicate sequence name '%1' have been detected in the classification output.").arg(objID); + algoLog.info(msg); + } else { + parsedReport.insert(objID, assID); + } + continue; + } + } + } + setError(tr("Broken Kraken report : %1").arg(settings.classificationUrl)); + break; + } + reportFile.close(); + } +} + } // namespace U2 diff --git a/src/plugins/kraken_support/src/KrakenClassifyTask.h b/src/plugins/kraken_support/src/KrakenClassifyTask.h index 8f84a7e5d6218927e671502e8690f72f9b5c40c8..2739e9e7065bc3671f1e146b99aa385735e7c43c 100644 --- a/src/plugins/kraken_support/src/KrakenClassifyTask.h +++ b/src/plugins/kraken_support/src/KrakenClassifyTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,6 +24,8 @@ #include <U2Core/ExternalToolRunTask.h> +#include "../ngs_reads_classification/src/TaxonomySupport.h" + namespace U2 { struct KrakenClassifyTaskSettings { @@ -50,16 +52,16 @@ public: KrakenClassifyTask(const KrakenClassifyTaskSettings &settings); const QString &getClassificationUrl() const; - const QString &getTranslatedClassificationUrl() const; + const LocalWorkflow::TaxonomyClassificationResult &getParsedReport() const; private: void prepare(); - + void run() override; QStringList getArguments(); const KrakenClassifyTaskSettings settings; - ExternalToolRunTask *classifyTask; + LocalWorkflow::TaxonomyClassificationResult parsedReport; }; } // namespace U2 diff --git a/src/plugins/kraken_support/src/KrakenClassifyValidator.cpp b/src/plugins/kraken_support/src/KrakenClassifyValidator.cpp index 89375b4bd414476b1d21ef27796dc653d6fd3097..a6b0aa50b3c21af9411759ed8f2202d50796f73b 100644 --- a/src/plugins/kraken_support/src/KrakenClassifyValidator.cpp +++ b/src/plugins/kraken_support/src/KrakenClassifyValidator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/kraken_support/src/KrakenClassifyValidator.h b/src/plugins/kraken_support/src/KrakenClassifyValidator.h index c12b3df8b9e90a1aaa29d5ee706758a12a605b6b..838ed2217beaf4b2168e2a82f3a97fac291c056f 100644 --- a/src/plugins/kraken_support/src/KrakenClassifyValidator.h +++ b/src/plugins/kraken_support/src/KrakenClassifyValidator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/kraken_support/src/KrakenClassifyWorker.cpp b/src/plugins/kraken_support/src/KrakenClassifyWorker.cpp index 360f969fbfdbb8ad7e15c3d780096f4dec10176a..4ff0010c2260a592396fd62f9f837c963cfbe078 100644 --- a/src/plugins/kraken_support/src/KrakenClassifyWorker.cpp +++ b/src/plugins/kraken_support/src/KrakenClassifyWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -37,7 +37,7 @@ namespace U2 { namespace LocalWorkflow { -const QString KrakenClassifyWorker::KRAKEN_DIR = "kraken"; +const QString KrakenClassifyWorker::KRAKEN_DIR = "Kraken"; KrakenClassifyWorker::KrakenClassifyWorker(Actor *actor) : BaseWorker(actor, false), @@ -51,11 +51,9 @@ KrakenClassifyWorker::KrakenClassifyWorker(Actor *actor) void KrakenClassifyWorker::init() { input = ports.value(KrakenClassifyWorkerFactory::INPUT_PORT_ID); -// pairedInput = ports.value(KrakenClassifyWorkerFactory::INPUT_PAIRED_PORT_ID); output = ports.value(KrakenClassifyWorkerFactory::OUTPUT_PORT_ID); SAFE_POINT(NULL != input, QString("Port with id '%1' is NULL").arg(KrakenClassifyWorkerFactory::INPUT_PORT_ID), ); -// SAFE_POINT(NULL != pairedInput, QString("Port with id '%1' is NULL").arg(KrakenClassifyWorkerFactory::INPUT_PAIRED_PORT_ID), ); SAFE_POINT(NULL != output, QString("Port with id '%1' is NULL").arg(KrakenClassifyWorkerFactory::OUTPUT_PORT_ID), ); pairedReadsInput = (getValue<QString>(KrakenClassifyWorkerFactory::INPUT_DATA_ATTR_ID) == KrakenClassifyTaskSettings::PAIRED_END); @@ -74,7 +72,7 @@ Task *KrakenClassifyWorker::tick() { } KrakenClassifyTask *task = new KrakenClassifyTask(settings); - task->addListeners(createLogListeners(2)); + task->addListeners(createLogListeners()); connect(new TaskSignalMapper(task), SIGNAL(si_taskFinished(Task *)), SLOT(sl_taskFinished(Task *))); return task; } @@ -84,13 +82,6 @@ Task *KrakenClassifyWorker::tick() { output->setEnded(); } -// if (pairedReadsInput) { -// const QString error = checkPairedReads(); -// if (!error.isEmpty()) { -// return new FailTask(error); -// } -// } - return NULL; } @@ -98,32 +89,6 @@ void KrakenClassifyWorker::cleanup() { } -bool KrakenClassifyWorker::isReady() const { - if (isDone()) { - return false; - } - - const int hasMessage1 = input->hasMessage(); - const bool ended1 = input->isEnded(); -// if (!pairedReadsInput) - { - return hasMessage1 || ended1; - } -/* - const int hasMessage2 = pairedInput->hasMessage(); - const bool ended2 = pairedInput->isEnded(); - - if (hasMessage1 && hasMessage2) { - return true; - } else if (hasMessage1) { - return ended2; - } else if (hasMessage2) { - return ended1; - } - - return ended1 && ended2;*/ -} - void KrakenClassifyWorker::sl_taskFinished(Task *task) { KrakenClassifyTask *krakenTask = qobject_cast<KrakenClassifyTask *>(task); if (!krakenTask->isFinished() || krakenTask->hasError() || krakenTask->isCanceled()) { @@ -133,7 +98,7 @@ void KrakenClassifyWorker::sl_taskFinished(Task *task) { const QString rawClassificationUrl = krakenTask->getClassificationUrl(); QVariantMap data; - TaxonomyClassificationResult classificationResult = parseReport(rawClassificationUrl); + const TaxonomyClassificationResult &classificationResult = krakenTask->getParsedReport(); data[TaxonomySupport::TAXONOMY_CLASSIFICATION_SLOT_ID] = QVariant::fromValue<U2::LocalWorkflow::TaxonomyClassificationResult>(classificationResult); output->put(Message(output->getBusType(), data)); context->getMonitor()->addOutputFile(rawClassificationUrl, getActor()->getId()); @@ -141,26 +106,15 @@ void KrakenClassifyWorker::sl_taskFinished(Task *task) { LocalWorkflow::TaxonomyClassificationResult::const_iterator it; int classifiedCount = NgsReadsClassificationUtils::countClassified(classificationResult); context->getMonitor()->addInfo(tr("There were %1 input reads, %2 reads were classified.").arg(QString::number(classificationResult.size())).arg(QString::number(classifiedCount)) - , getActor()->getId(), WorkflowNotification::U2_INFO); + , getActor()->getId(), WorkflowNotification::U2_INFO); } bool KrakenClassifyWorker::isReadyToRun() const { - return input->hasMessage()/* && (!pairedReadsInput || pairedInput->hasMessage())*/; + return input->hasMessage(); } bool KrakenClassifyWorker::dataFinished() const { - return input->isEnded() /*|| (pairedReadsInput && pairedInput->isEnded())*/; -} - -QString KrakenClassifyWorker::checkPairedReads() const { - /*CHECK(pairedReadsInput, ""); - if (input->isEnded() && (!pairedInput->isEnded() || pairedInput->hasMessage())) { - return tr("Not enough downstream reads datasets"); - } - if (pairedInput->isEnded() && (!input->isEnded() || input->hasMessage())) { - return tr("Not enough upstream reads datasets"); - }*/ - return ""; + return input->isEnded(); } KrakenClassifyTaskSettings KrakenClassifyWorker::getSettings(U2OpStatus &os) { @@ -176,8 +130,7 @@ KrakenClassifyTaskSettings KrakenClassifyWorker::getSettings(U2OpStatus &os) { if (pairedReadsInput) { settings.pairedReads = true; - //const Message pairedMessage = getMessageAndSetupScriptValues(pairedInput); - settings.pairedReadsUrl = message.getData().toMap()[KrakenClassifyWorkerFactory::PAIRED_INPUT_SLOT].toString();//pairedMessage.getData().toMap()[BaseSlots::URL_SLOT().getId()].toString(); + settings.pairedReadsUrl = message.getData().toMap()[KrakenClassifyWorkerFactory::PAIRED_INPUT_SLOT].toString(); } QString tmpDir = FileAndDirectoryUtils::createWorkingDir(context->workingDir(), FileAndDirectoryUtils::WORKFLOW_INTERNAL, "", context->workingDir()); @@ -186,51 +139,15 @@ KrakenClassifyTaskSettings KrakenClassifyWorker::getSettings(U2OpStatus &os) { settings.classificationUrl = getValue<QString>(KrakenClassifyWorkerFactory::OUTPUT_URL_ATTR_ID); if (settings.classificationUrl.isEmpty()) { const MessageMetadata metadata = context->getMetadataStorage().get(message.getMetadataId()); - settings.classificationUrl = tmpDir + "/" + NgsReadsClassificationUtils::getClassificationFileName(metadata.getFileUrl(), "Kraken", "txt", pairedReadsInput); + QString fileUrl = metadata.getFileUrl(); + settings.classificationUrl = tmpDir + "/" + (fileUrl.isEmpty() ? QString("Kraken_%1.txt").arg(NgsReadsClassificationUtils::CLASSIFICATION_SUFFIX) + : NgsReadsClassificationUtils::getBaseFileNameWithSuffixes(metadata.getFileUrl(), QStringList() << "Kraken" << NgsReadsClassificationUtils::CLASSIFICATION_SUFFIX, + "txt", pairedReadsInput)); } settings.classificationUrl = GUrlUtils::rollFileName(settings.classificationUrl, "_"); return settings; } -TaxonomyClassificationResult KrakenClassifyWorker::parseReport(const QString &url) -{ - TaxonomyClassificationResult result; - QFile reportFile(url); - if (!reportFile.open(QIODevice::ReadOnly)) { - reportError(tr("Cannot open classification report: %1").arg(url)); - } else { - QByteArray line; - - while ((line = reportFile.readLine()).size() != 0) { - if (line.startsWith("C\t") || line.startsWith("U\t")) { - QList<QByteArray> row = line.split('\t'); - if (row.size() >= 5) { - QString objID = row[1]; - QByteArray &assStr = row[2]; - algoLog.trace(QString("Found Kraken classification: %1=%2").arg(objID).arg(QString(assStr))); - - bool ok = true; - TaxID assID = assStr.toUInt(&ok); - if (ok) { - if (result.contains(objID)) { - QString msg = tr("Duplicate sequence name '%1' have been detected in the classification output.").arg(objID); - monitor()->addInfo(msg, getActorId(), WorkflowNotification::U2_WARNING); - algoLog.info(msg); - } else { - result[objID] = assID; - } - continue; - } - } - } - reportError(tr("Broken Kraken report : %1").arg(url)); - break; - } - reportFile.close(); - } - return result; -} - } // namespace LocalWorkflow } // namespace U2 diff --git a/src/plugins/kraken_support/src/KrakenClassifyWorker.h b/src/plugins/kraken_support/src/KrakenClassifyWorker.h index 1b17bbbe2cb37343a350ab14adb54c9c86af4ff7..b937fbe84683cd8b393d436aaad17c1e77620aeb 100644 --- a/src/plugins/kraken_support/src/KrakenClassifyWorker.h +++ b/src/plugins/kraken_support/src/KrakenClassifyWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -38,7 +38,6 @@ public: void init(); Task *tick(); void cleanup(); - bool isReady() const; private slots: void sl_taskFinished(Task *task); @@ -46,13 +45,9 @@ private slots: private: bool isReadyToRun() const; bool dataFinished() const; - QString checkPairedReads() const; KrakenClassifyTaskSettings getSettings(U2OpStatus &os); - TaxonomyClassificationResult parseReport(const QString &url); - IntegralBus *input; -// IntegralBus *pairedInput; IntegralBus *output; bool pairedReadsInput; diff --git a/src/plugins/kraken_support/src/KrakenClassifyWorkerFactory.cpp b/src/plugins/kraken_support/src/KrakenClassifyWorkerFactory.cpp index 2683d8267e7c98a9a1df2a3caf5b68079bb48d50..3c5ec23223b9d8587d7e0b77bb864ead798b27ca 100644 --- a/src/plugins/kraken_support/src/KrakenClassifyWorkerFactory.cpp +++ b/src/plugins/kraken_support/src/KrakenClassifyWorkerFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -67,8 +67,8 @@ const QString KrakenClassifyWorkerFactory::MIN_HITS_NUMBER_ATTR_ID = "min-hits"; const QString KrakenClassifyWorkerFactory::THREADS_NUMBER_ATTR_ID = "threads"; const QString KrakenClassifyWorkerFactory::PRELOAD_DATABASE_ATTR_ID = "preload"; -const QString KrakenClassifyWorkerFactory::SINGLE_END_TEXT = QObject::tr("SE reads or contigs"); -const QString KrakenClassifyWorkerFactory::PAIRED_END_TEXT = QObject::tr("PE reads"); +const QString KrakenClassifyWorkerFactory::SINGLE_END_TEXT = "SE reads or contigs"; +const QString KrakenClassifyWorkerFactory::PAIRED_END_TEXT = "PE reads"; const QString KrakenClassifyWorkerFactory::WORKFLOW_CLASSIFY_TOOL_KRAKEN = "Kraken"; @@ -106,7 +106,7 @@ void KrakenClassifyWorkerFactory::init() { "In case of SE reads or contigs use the \"Input URL 1\" slot only.\n\n" "In case of PE reads input \"left\" reads to \"Input URL 1\", \"right\" reads to \"Input URL 2\".\n\n" "See also the \"Input data\" parameter of the element.")); - const Descriptor outPortDesc(OUTPUT_PORT_ID, KrakenClassifyPrompter::tr("Kraken Classification"), KrakenClassifyPrompter::tr("A map of sequence names with the associated taxonomy IDs, classified by Kraken.")); + Descriptor outPortDesc(OUTPUT_PORT_ID, KrakenClassifyPrompter::tr("Kraken Classification"), KrakenClassifyPrompter::tr("A map of sequence names with the associated taxonomy IDs, classified by Kraken.")); ports << new PortDescriptor(inPortDesc, DataTypePtr(new MapDataType(ACTOR_ID + "-in", inType)), true /*input*/); ports << new PortDescriptor(outPortDesc, DataTypePtr(new MapDataType(ACTOR_ID + "-out", outType)), false /*input*/, true /*multi*/); @@ -114,35 +114,35 @@ void KrakenClassifyWorkerFactory::init() { QList<Attribute *> attributes; { - const Descriptor inputDataDesc(INPUT_DATA_ATTR_ID, KrakenClassifyPrompter::tr("Input data"), + Descriptor inputDataDesc(INPUT_DATA_ATTR_ID, KrakenClassifyPrompter::tr("Input data"), KrakenClassifyPrompter::tr("To classify single-end (SE) reads or contigs, received by reads de novo assembly, set this parameter to \"SE reads or contigs\".<br><br>" "To classify paired-end (PE) reads, set the value to \"PE reads\".<br><br>" "One or two slots of the input port are used depending on the value of the parameter. Pass URL(s) to data to these slots.<br><br>" "The input files should be in FASTA or FASTQ formats.")); - const Descriptor databaseDesc(DATABASE_ATTR_ID, KrakenClassifyPrompter::tr("Database"), + Descriptor databaseDesc(DATABASE_ATTR_ID, KrakenClassifyPrompter::tr("Database"), KrakenClassifyPrompter::tr("A path to the folder with the Kraken database files.")); - const Descriptor outputUrlDesc(OUTPUT_URL_ATTR_ID, KrakenClassifyPrompter::tr("Output file"), + Descriptor outputUrlDesc(OUTPUT_URL_ATTR_ID, KrakenClassifyPrompter::tr("Output file"), KrakenClassifyPrompter::tr("Specify the output file name.")); - const Descriptor quickOperationDesc(QUICK_OPERATION_ATTR_ID, KrakenClassifyPrompter::tr("Quick operation"), + Descriptor quickOperationDesc(QUICK_OPERATION_ATTR_ID, KrakenClassifyPrompter::tr("Quick operation"), KrakenClassifyPrompter::tr("Stop classification of an input read after the certain number of hits.<br><br>" "The value can be specified in the \"Minimum number of hits\" parameter.")); - const Descriptor minHitsDesc(MIN_HITS_NUMBER_ATTR_ID, KrakenClassifyPrompter::tr("Minimum number of hits"), + Descriptor minHitsDesc(MIN_HITS_NUMBER_ATTR_ID, KrakenClassifyPrompter::tr("Minimum number of hits"), KrakenClassifyPrompter::tr("The number of hits that are required to declare an input sequence classified.<br><br>" "This can be especially useful with custom databases when testing to see if sequences either do or do not belong to a particular genome.")); - const Descriptor threadsDesc(THREADS_NUMBER_ATTR_ID, KrakenClassifyPrompter::tr("Number of threads"), + Descriptor threadsDesc(THREADS_NUMBER_ATTR_ID, KrakenClassifyPrompter::tr("Number of threads"), KrakenClassifyPrompter::tr("Use multiple threads (--threads).")); - const Descriptor preloadDatabaseDesc(PRELOAD_DATABASE_ATTR_ID, KrakenClassifyPrompter::tr("Load database into memory"), + Descriptor preloadDatabaseDesc(PRELOAD_DATABASE_ATTR_ID, KrakenClassifyPrompter::tr("Load database into memory"), KrakenClassifyPrompter::tr("Load the Kraken database into RAM (--preload).<br><br>" "This can be useful to improve the speed. The database size should be less than the RAM size.<br><br>" "The other option to improve the speed is to store the database on ramdisk. Set this parameter to \"False\" in this case.")); - const Descriptor classifyToolDesc(NgsReadsClassificationPlugin::WORKFLOW_CLASSIFY_TOOL_ID, + Descriptor classifyToolDesc(NgsReadsClassificationPlugin::WORKFLOW_CLASSIFY_TOOL_ID, WORKFLOW_CLASSIFY_TOOL_KRAKEN, "Classify tool. Hidden attribute"); @@ -205,13 +205,13 @@ void KrakenClassifyWorkerFactory::init() { delegates[PRELOAD_DATABASE_ATTR_ID] = new ComboBoxWithBoolsDelegate(); } - const Descriptor desc(ACTOR_ID, KrakenClassifyPrompter::tr("Classify Sequences with Kraken"), + Descriptor desc(ACTOR_ID, KrakenClassifyPrompter::tr("Classify Sequences with Kraken"), KrakenClassifyPrompter::tr("Kraken is a taxonomic sequence classifier that assigns taxonomic labels to short DNA reads. " "It does this by examining the k-mers within a read and querying a database with those.")); ActorPrototype *proto = new IntegralBusActorPrototype(desc, ports, attributes); proto->setEditor(new DelegateEditor(delegates)); proto->setPrompter(new KrakenClassifyPrompter(NULL)); - proto->addExternalTool(KrakenSupport::CLASSIFY_TOOL); + proto->addExternalTool(KrakenSupport::CLASSIFY_TOOL_ID); proto->setValidator(new KrakenClassifyValidator()); proto->setPortValidator(INPUT_PORT_ID, new PairedReadsPortValidator(INPUT_SLOT, PAIRED_INPUT_SLOT)); WorkflowEnv::getProtoRegistry()->registerProto(NgsReadsClassificationPlugin::WORKFLOW_ELEMENTS_GROUP, proto); diff --git a/src/plugins/kraken_support/src/KrakenClassifyWorkerFactory.h b/src/plugins/kraken_support/src/KrakenClassifyWorkerFactory.h index 3943a70721f848c2b868291b081d6ccc769310df..ee125f9d65f9fdd1a8951bbbf7b8e6afc6563d33 100644 --- a/src/plugins/kraken_support/src/KrakenClassifyWorkerFactory.h +++ b/src/plugins/kraken_support/src/KrakenClassifyWorkerFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/kraken_support/src/KrakenSupport.cpp b/src/plugins/kraken_support/src/KrakenSupport.cpp index b2c9d1963ce1911e28a6163e9750f560ed2e2349..acd094673bc89c88c90a71d8b6bb1a7f8fe34aa2 100644 --- a/src/plugins/kraken_support/src/KrakenSupport.cpp +++ b/src/plugins/kraken_support/src/KrakenSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -28,21 +28,22 @@ namespace U2 { -const QString KrakenSupport::GROUP_NAME = "Kraken"; const QString KrakenSupport::BUILD_TOOL = "kraken-build"; +const QString KrakenSupport::BUILD_TOOL_ID = "USUPP_KRAKEN_BUILD"; const QString KrakenSupport::CLASSIFY_TOOL = "kraken"; -const QString KrakenSupport::TRANSLATE_TOOL = "kraken-translate"; +const QString KrakenSupport::CLASSIFY_TOOL_ID = "USUPP_KRAKEN"; +const QString KrakenSupport::GROUP_NAME = "Kraken"; -KrakenSupport::KrakenSupport(const QString &name) - : ExternalTool(name) +KrakenSupport::KrakenSupport(const QString& id, const QString &name) + : ExternalTool(id, name, "") { toolKitName = GROUP_NAME; validationArguments << "--version"; validMessage = "Kraken version "; versionRegExp = QRegExp("Kraken version (\\d+\\.\\d+(\\.\\d+)?(\\-[a-zA-Z]*)?)"); - dependencies << "perl"; - toolRunnerProgramm = "perl"; + dependencies << "USUPP_PERL"; + toolRunnerProgram = "USUPP_PERL"; if (BUILD_TOOL == name) { initBuild(); @@ -51,10 +52,6 @@ KrakenSupport::KrakenSupport(const QString &name) if (CLASSIFY_TOOL == name) { initClassify(); } - - if (TRANSLATE_TOOL == name) { - initTranslate(); - } } QStringList KrakenSupport::getAdditionalPaths() const { @@ -75,9 +72,4 @@ void KrakenSupport::initClassify() { description = tr("The tool is used to classify a set of sequences. It does this by examining the k-mers within a read and querying a database with those k-mers."); } -void KrakenSupport::initTranslate() { - executableFileName = "kraken-translate"; - description = tr("The \"<i>kraken-translate</i>\" executable is used to translate the Kraken classification to make it more readable."); -} - } // namespace U2 diff --git a/src/plugins/kraken_support/src/KrakenSupport.h b/src/plugins/kraken_support/src/KrakenSupport.h index 5f5314bc500ff4dd4b2e48f126a2e93017fd6855..5a9054c7cd40f21d3d332095ba1f5176c94e30b5 100644 --- a/src/plugins/kraken_support/src/KrakenSupport.h +++ b/src/plugins/kraken_support/src/KrakenSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,26 +26,22 @@ namespace U2 { -#define ET_KRAKEN_CLASSIFY KrakenSupport::CLASSIFY_TOOL -#define ET_KRAKEN_BUILD KrakenSupport::BUILD_TOOL -#define ET_KRAKEN_TRANSLATE KrakenSupport::TRANSLATE_TOOL - class KrakenSupport : public ExternalTool { Q_OBJECT public: - KrakenSupport(const QString &name); + KrakenSupport(const QString& id, const QString &name); QStringList getAdditionalPaths() const; static const QString GROUP_NAME; static const QString BUILD_TOOL; + static const QString BUILD_TOOL_ID; static const QString CLASSIFY_TOOL; - static const QString TRANSLATE_TOOL; + static const QString CLASSIFY_TOOL_ID; private: void initBuild(); void initClassify(); - void initTranslate(); }; } // namespace U2 diff --git a/src/plugins/kraken_support/src/KrakenSupportPlugin.cpp b/src/plugins/kraken_support/src/KrakenSupportPlugin.cpp index f114dd7106fb046fb132791e2169c47124003be6..b9abc7f2b0403ccef200bd2123f9c8a7edb9aec3 100644 --- a/src/plugins/kraken_support/src/KrakenSupportPlugin.cpp +++ b/src/plugins/kraken_support/src/KrakenSupportPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -43,8 +43,8 @@ KrakenSupportPlugin::KrakenSupportPlugin() ExternalToolRegistry *etRegistry = AppContext::getExternalToolRegistry(); CHECK(NULL != etRegistry, ); - etRegistry->registerEntry(new KrakenSupport(KrakenSupport::BUILD_TOOL)); - etRegistry->registerEntry(new KrakenSupport(KrakenSupport::CLASSIFY_TOOL)); + etRegistry->registerEntry(new KrakenSupport(KrakenSupport::BUILD_TOOL_ID, KrakenSupport::BUILD_TOOL)); + etRegistry->registerEntry(new KrakenSupport(KrakenSupport::CLASSIFY_TOOL_ID, KrakenSupport::CLASSIFY_TOOL)); etRegistry->setToolkitDescription(KrakenSupport::GROUP_NAME, tr("Kraken is a taxonomic sequence classifier that assigns taxonomic labels to short DNA reads.")); LocalWorkflow::KrakenBuildWorkerFactory::init(); @@ -54,8 +54,8 @@ KrakenSupportPlugin::KrakenSupportPlugin() KrakenSupportPlugin::~KrakenSupportPlugin() { ExternalToolRegistry *etRegistry = AppContext::getExternalToolRegistry(); CHECK(NULL != etRegistry, ); - etRegistry->unregisterEntry(KrakenSupport::BUILD_TOOL); - etRegistry->unregisterEntry(KrakenSupport::CLASSIFY_TOOL); + etRegistry->unregisterEntry(KrakenSupport::BUILD_TOOL_ID); + etRegistry->unregisterEntry(KrakenSupport::CLASSIFY_TOOL_ID); } } // namespace U2 diff --git a/src/plugins/kraken_support/src/KrakenSupportPlugin.h b/src/plugins/kraken_support/src/KrakenSupportPlugin.h index 40b5e486114f9bd86521cad447030402bed70931..fc2244323feb442bc17fd27a78858ee7d391839b 100644 --- a/src/plugins/kraken_support/src/KrakenSupportPlugin.h +++ b/src/plugins/kraken_support/src/KrakenSupportPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/kraken_support/src/KrakenTranslateLogParser.cpp b/src/plugins/kraken_support/src/KrakenTranslateLogParser.cpp index e3174d36b9389e9bf8e984e1d94a9c79739f6d60..1e0fa8980be3c4999eeb45b40686371f448b73ce 100644 --- a/src/plugins/kraken_support/src/KrakenTranslateLogParser.cpp +++ b/src/plugins/kraken_support/src/KrakenTranslateLogParser.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/kraken_support/src/KrakenTranslateLogParser.h b/src/plugins/kraken_support/src/KrakenTranslateLogParser.h index 622d727c35a3576679d482d62194b34c31375f55..1ac1d37144a555653b9dee105794386750652a1c 100644 --- a/src/plugins/kraken_support/src/KrakenTranslateLogParser.h +++ b/src/plugins/kraken_support/src/KrakenTranslateLogParser.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/kraken_support/transl/russian.ts b/src/plugins/kraken_support/transl/russian.ts index a63cc108b6dd597ab9d6731ff131534055347a28..23621e3c71f810ad24e3c5a2ae15e1f151595b26 100644 --- a/src/plugins/kraken_support/transl/russian.ts +++ b/src/plugins/kraken_support/transl/russian.ts @@ -2,23 +2,33 @@ <!DOCTYPE TS> <TS version="2.1" language="ru_RU"> <context> - <name>QObject</name> + <name>KrakenClassifyValidator</name> <message> - <source>Build</source> + <source>The database folder "%1" doesn't exist.</source> <translation type="unfinished"></translation> </message> <message> - <source>Shrink</source> + <source>The mandatory database file "%1" doesn't exist.</source> <translation type="unfinished"></translation> </message> +</context> +<context> + <name>MinimizerLengthValidator</name> <message> - <source>SE reads or contigs</source> + <source>Minimizer length has to be less than K-mer length</source> <translation type="unfinished"></translation> </message> <message> - <source>PE reads</source> + <source>Taxonomy classification data from NCBI are not available.</source> <translation type="unfinished"></translation> </message> + <message> + <source>Taxonomy classification data from NCBI are not full: file '%1' is missing.</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QObject</name> <message> <source>Kraken external tool support</source> <translation type="unfinished"></translation> @@ -63,15 +73,15 @@ <translation type="unfinished"></translation> </message> <message> - <source>Taxonomy data is not set</source> + <source>Cannot find taxonomy data</source> <translation type="unfinished"></translation> </message> <message> - <source>Cannot find taxonomy data</source> + <source>Can't create a symbolic link to the taxonomy file: %1</source> <translation type="unfinished"></translation> </message> <message> - <source>Can't create a symbolic link to the taxonomy file: %1</source> + <source>Taxonomy data are not set</source> <translation type="unfinished"></translation> </message> </context> @@ -81,6 +91,18 @@ <source>Classify reads with Kraken</source> <translation type="unfinished"></translation> </message> + <message> + <source>Cannot open classification report: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Duplicate sequence name '%1' have been detected in the classification output.</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Broken Kraken report : %1</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>U2::KrakenSupport</name> @@ -96,6 +118,14 @@ <source>The "<i>kraken-translate</i>" executable is used to translate the Kraken classification to make it more readable.</source> <translation type="unfinished"></translation> </message> + <message> + <source>Build</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Shrink</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>U2::KrakenSupportPlugin</name> @@ -250,29 +280,9 @@ <source>Build a Kraken database from a genomic library or shrink a Kraken database.</source> <translation type="unfinished"></translation> </message> - <message> - <source>Minimizer length has to be less than K-mer length</source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>U2::LocalWorkflow::KrakenClassifyPrompter</name> - <message> - <source>The database folder "%1" doesn't exist.</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>The mandatory database file "%1" doesn't exist.</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>The mandatory "Input URL 1" slot is not connected.</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>The mandatory "Input URL 2" slot is not connected.</source> - <translation type="unfinished"></translation> - </message> <message> <source>Classify sequences from <u>%1</u> with Kraken, use %2 database.</source> <translation type="unfinished"></translation> @@ -387,15 +397,7 @@ See also the "Input data" parameter of the element.</source> <context> <name>U2::LocalWorkflow::KrakenClassifyWorker</name> <message> - <source>Cannot open classification report: %1</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Duplicate sequence name '%1' have been detected in the classification output.</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Broken Kraken report : %1</source> + <source>There were %1 input reads, %2 reads were classified.</source> <translation type="unfinished"></translation> </message> </context> diff --git a/src/plugins/linkdata_support/src/LinkDataScriptLibrary.cpp b/src/plugins/linkdata_support/src/LinkDataScriptLibrary.cpp index 084f8e1661c7595a2e07304684e737a2fb59adec..3958ef980f124f122e781df885f3422f1cc36eb1 100644 --- a/src/plugins/linkdata_support/src/LinkDataScriptLibrary.cpp +++ b/src/plugins/linkdata_support/src/LinkDataScriptLibrary.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/linkdata_support/src/LinkDataScriptLibrary.h b/src/plugins/linkdata_support/src/LinkDataScriptLibrary.h index 159869f2c73ad7c1ec21a79811281665900d24c1..344a69369b504ec9ef9143c89a9b1ab2b261ef4d 100644 --- a/src/plugins/linkdata_support/src/LinkDataScriptLibrary.h +++ b/src/plugins/linkdata_support/src/LinkDataScriptLibrary.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/linkdata_support/src/LinkDataSupportPlugin.cpp b/src/plugins/linkdata_support/src/LinkDataSupportPlugin.cpp index dba685a18985ec5f0094f5eb760de34827a63aea..cfb34816d84f4f5ad6c48c3c1fa9d65bb3f27219 100644 --- a/src/plugins/linkdata_support/src/LinkDataSupportPlugin.cpp +++ b/src/plugins/linkdata_support/src/LinkDataSupportPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/linkdata_support/src/LinkDataSupportPlugin.h b/src/plugins/linkdata_support/src/LinkDataSupportPlugin.h index 260ddeeae191ba8b831ee844bfcf73a4eee79109..c650abd879e68f5175230cbe5e65de23e4e8b88e 100644 --- a/src/plugins/linkdata_support/src/LinkDataSupportPlugin.h +++ b/src/plugins/linkdata_support/src/LinkDataSupportPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/metaphlan2_support/metaphlan2_support.license b/src/plugins/metaphlan2_support/metaphlan2_support.license new file mode 100644 index 0000000000000000000000000000000000000000..d159169d1050894d3ea3b98e1c965c4058208fe1 --- /dev/null +++ b/src/plugins/metaphlan2_support/metaphlan2_support.license @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/src/plugins/metaphlan2_support/metaphlan2_support.pri b/src/plugins/metaphlan2_support/metaphlan2_support.pri new file mode 100644 index 0000000000000000000000000000000000000000..49b2f8eb79ec6110969b3c227359ac4e8c8b91e0 --- /dev/null +++ b/src/plugins/metaphlan2_support/metaphlan2_support.pri @@ -0,0 +1,12 @@ +# include (metaphlan2_support.pri) +include (../../ugene_globals.pri) + +PLUGIN_ID=metaphlan2_support +PLUGIN_NAME=MetaPhLan2 external tool support +PLUGIN_VENDOR=Unipro +PLUGIN_DEPENDS=ngs_reads_classification$${D}:$${UGENE_VERSION};external_tool_support$${D}:$${UGENE_VERSION} + +include( ../../ugene_plugin_common.pri ) + +LIBS += -L../../$$out_dir()/plugins +LIBS += -lngs_reads_classification$$D diff --git a/src/plugins/metaphlan2_support/metaphlan2_support.pro b/src/plugins/metaphlan2_support/metaphlan2_support.pro new file mode 100644 index 0000000000000000000000000000000000000000..456114277ca8e2d4a860a9060040f785d25688d4 --- /dev/null +++ b/src/plugins/metaphlan2_support/metaphlan2_support.pro @@ -0,0 +1,20 @@ +include (metaphlan2_support.pri) + +# Input +HEADERS += src/Metaphlan2LogParser.h \ + src/Metaphlan2Prompter.h \ + src/Metaphlan2Support.h \ + src/Metaphlan2SupportPlugin.h \ + src/Metaphlan2Task.h \ + src/Metaphlan2Validator.h \ + src/Metaphlan2Worker.h \ + src/Metaphlan2WorkerFactory.h + +SOURCES += src/Metaphlan2LogParser.cpp \ + src/Metaphlan2Prompter.cpp \ + src/Metaphlan2Support.cpp \ + src/Metaphlan2SupportPlugin.cpp \ + src/Metaphlan2Task.cpp \ + src/Metaphlan2Validator.cpp \ + src/Metaphlan2Worker.cpp \ + src/Metaphlan2WorkerFactory.cpp \ No newline at end of file diff --git a/src/plugins/metaphlan2_support/src/Metaphlan2LogParser.cpp b/src/plugins/metaphlan2_support/src/Metaphlan2LogParser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7e34c7293b19b79e204fc77242564f30f608eb87 --- /dev/null +++ b/src/plugins/metaphlan2_support/src/Metaphlan2LogParser.cpp @@ -0,0 +1,43 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "Metaphlan2LogParser.h" + +namespace U2 { + +const QStringList Metaphlan2LogParser::wellKnownErrors = Metaphlan2LogParser::initWellKnownErrors(); + +bool Metaphlan2LogParser::isError(const QString &line) const { + foreach(const QString &wellKnownError, wellKnownErrors) { + if (line.contains(wellKnownError)) { + return true; + } + } + return false; +} + +QStringList Metaphlan2LogParser::initWellKnownErrors() { + QStringList result; + result << "ImportError: No module"; + return result; +} + +} // namespace U2 diff --git a/src/plugins/metaphlan2_support/src/Metaphlan2LogParser.h b/src/plugins/metaphlan2_support/src/Metaphlan2LogParser.h new file mode 100644 index 0000000000000000000000000000000000000000..f1cc1604033c7cf647567a926a27620edd75a319 --- /dev/null +++ b/src/plugins/metaphlan2_support/src/Metaphlan2LogParser.h @@ -0,0 +1,39 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_METAPHLAN2_LOG_PARSER_H_ +#define _U2_METAPHLAN2_LOG_PARSER_H_ + +#include <U2Core/ExternalToolRunTask.h> + +namespace U2 { + +class Metaphlan2LogParser : public ExternalToolLogParser { +private: + bool isError(const QString &line) const override; + + static const QStringList wellKnownErrors; + static QStringList initWellKnownErrors(); +}; + +} // namespace U2 + +#endif // _U2_METAPHLAN2_LOG_PARSER_H_ \ No newline at end of file diff --git a/src/plugins/metaphlan2_support/src/Metaphlan2Prompter.cpp b/src/plugins/metaphlan2_support/src/Metaphlan2Prompter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3d7adad0601969e5d1a78c5aad53e43d1b8c511a --- /dev/null +++ b/src/plugins/metaphlan2_support/src/Metaphlan2Prompter.cpp @@ -0,0 +1,41 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "Metaphlan2Prompter.h" +#include "Metaphlan2WorkerFactory.h" + +namespace U2 { +namespace LocalWorkflow { + +Metaphlan2Prompter::Metaphlan2Prompter(Actor *actor) + : PrompterBase<Metaphlan2Prompter>(actor) {} + +QString Metaphlan2Prompter::composeRichDoc() { + const QString readsProducerName = getProducersOrUnset(Metaphlan2WorkerFactory::INPUT_PORT_ID, + Metaphlan2WorkerFactory::INPUT_SLOT); + const QString databaseUrl = getHyperlink(Metaphlan2WorkerFactory::DB_URL, + getURL(Metaphlan2WorkerFactory::DB_URL)); + return tr("Classify sequences from <u>%1</u> with MetaPhlAn2, " + "use %2 database.").arg(readsProducerName).arg(databaseUrl); +} + +} // namespace LocalWorkflow +} // namespace U2 diff --git a/src/plugins/metaphlan2_support/src/Metaphlan2Prompter.h b/src/plugins/metaphlan2_support/src/Metaphlan2Prompter.h new file mode 100644 index 0000000000000000000000000000000000000000..b6cdd24ca6e98ac2b74343bbe2aa1b5fdf29611f --- /dev/null +++ b/src/plugins/metaphlan2_support/src/Metaphlan2Prompter.h @@ -0,0 +1,42 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_METAPHLAN2_PROMPTER_H_ +#define _U2_METAPHLAN2_PROMPTER_H_ + +#include <U2Lang/WorkflowUtils.h> + +namespace U2 { +namespace LocalWorkflow { + +class Metaphlan2Prompter : public PrompterBase<Metaphlan2Prompter> { + Q_OBJECT +public: + Metaphlan2Prompter(Actor *actor = nullptr); + +private: + QString composeRichDoc(); +}; + +} // namespace LocalWorkflow +} // namespace U2 + +#endif // _U2_METAPHLAN2_PROMPTER_H_ diff --git a/src/plugins/metaphlan2_support/src/Metaphlan2Support.cpp b/src/plugins/metaphlan2_support/src/Metaphlan2Support.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5460e305ac20753c37194f5ea8d6c8e5eccd84da --- /dev/null +++ b/src/plugins/metaphlan2_support/src/Metaphlan2Support.cpp @@ -0,0 +1,63 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "Metaphlan2Support.h" + +#include <U2Core/U2SafePoints.h> + +#include <QFileInfo> + +namespace U2 { + +const QString Metaphlan2Support::TOOL_ID = "USUPP_METAPHLAN2"; +const QString Metaphlan2Support::TOOL_NAME = "MetaPhlAn2"; +const QString Metaphlan2Support::UTIL_SCRIPT = "utils/read_fastx.py"; + +//These constants are taken from the 'external_tool_support' project +const QString Metaphlan2Support::ET_BOWTIE_2_ALIGNER_ID = "USUPP_BOWTIE2"; +const QString Metaphlan2Support::ET_PYTHON_ID = "USUPP_PYTHON2"; +const QString Metaphlan2Support::ET_PYTHON_BIO_ID = "BIO"; +const QString Metaphlan2Support::ET_PYTHON_NUMPY_ID = "NUMPY"; + +Metaphlan2Support::Metaphlan2Support(const QString& id, const QString& name, const QString& path) : ExternalTool(id, name, path) { + validationArguments << "--version"; + + toolKitName = TOOL_NAME; + description = tr("<i>MetaPhlAn2 (METAgenomic PHyLogenetic ANalysis)</i> is a tool for profiling the composition of microbial communities (bacteria, archaea, eukaryotes, and viruses) from whole-metagenome shotgun sequencing data."); + + executableFileName = "metaphlan2.py"; + + toolRunnerProgram = ET_PYTHON_ID; + dependencies << ET_PYTHON_ID << ET_PYTHON_BIO_ID << ET_PYTHON_NUMPY_ID << ET_BOWTIE_2_ALIGNER_ID; + + validMessage = "MetaPhlAn version "; + versionRegExp = QRegExp("MetaPhlAn version (\\d+\\.\\d+(\\.\\d+)?(\\-[a-zA-Z]*)?)"); +} + +void Metaphlan2Support::performAdditionalChecks(const QString& toolPath) { + QFileInfo file(toolPath); + QString utilScriptFullPath = QString("%1/%2").arg(file.absolutePath()).arg(UTIL_SCRIPT); + if (!QFileInfo::exists(utilScriptFullPath)) { + additionalErrorMesage = tr("%1 script \"%2\" is not present!").arg(TOOL_NAME).arg(UTIL_SCRIPT); + } +} + +}//namespace diff --git a/src/plugins/metaphlan2_support/src/Metaphlan2Support.h b/src/plugins/metaphlan2_support/src/Metaphlan2Support.h new file mode 100644 index 0000000000000000000000000000000000000000..418eaa2b47d479b186b5be1b9c980c17b380caee --- /dev/null +++ b/src/plugins/metaphlan2_support/src/Metaphlan2Support.h @@ -0,0 +1,46 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_METAPHLAN_SUPPORT_H_ +#define _U2_METAPHLAN_SUPPORT_H_ + +#include <U2Core/ExternalToolRegistry.h> + +namespace U2 { + +class Metaphlan2Support : public ExternalTool { + Q_OBJECT +public: + Metaphlan2Support(const QString& id, const QString& name, const QString& path = ""); + void performAdditionalChecks(const QString& toolPath); + + static const QString TOOL_NAME; + static const QString TOOL_ID; + static const QString UTIL_SCRIPT; + + static const QString ET_BOWTIE_2_ALIGNER_ID; + static const QString ET_PYTHON_ID; + static const QString ET_PYTHON_BIO_ID; + static const QString ET_PYTHON_NUMPY_ID; +}; + +}//namespace +#endif // _U2_METAPHLAN_SUPPORT_H_ diff --git a/src/plugins/metaphlan2_support/src/Metaphlan2SupportPlugin.cpp b/src/plugins/metaphlan2_support/src/Metaphlan2SupportPlugin.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2d1c73d14b371ec53905c92d05018baac3736a27 --- /dev/null +++ b/src/plugins/metaphlan2_support/src/Metaphlan2SupportPlugin.cpp @@ -0,0 +1,57 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <U2Core/AppContext.h> +#include <U2Core/U2SafePoints.h> + +#include "Metaphlan2Support.h" +#include "Metaphlan2SupportPlugin.h" +#include "Metaphlan2WorkerFactory.h" + +namespace U2 { + +const QString MetaphlanSupportPlugin::PLUGIN_NAME = QCoreApplication::translate("MetaphlanSupportPlugin", "MetaPhlAn2 external tool support"); +const QString MetaphlanSupportPlugin::PLUGIN_DESCRIPRION = QCoreApplication::translate("MetaphlanSupportPlugin", "MetaPhlAn2 (METAgenomic PHyLogenetic ANalysis) is a tool for profiling the composition of microbial communities (bacteria, archaea, eukaryotes, and viruses) from whole-metagenome shotgun sequencing data."); + +extern "C" Q_DECL_EXPORT Plugin* U2_PLUGIN_INIT_FUNC() { + MetaphlanSupportPlugin *plugin = new MetaphlanSupportPlugin(); + return plugin; +} + +MetaphlanSupportPlugin::MetaphlanSupportPlugin() + : Plugin(PLUGIN_NAME, PLUGIN_DESCRIPRION) { + ExternalToolRegistry *etRegistry = AppContext::getExternalToolRegistry(); + CHECK(nullptr != etRegistry, ); + + etRegistry->registerEntry(new Metaphlan2Support(Metaphlan2Support::TOOL_ID, Metaphlan2Support::TOOL_NAME)); + + LocalWorkflow::Metaphlan2WorkerFactory::init(); +} + +MetaphlanSupportPlugin::~MetaphlanSupportPlugin() { + ExternalToolRegistry *etRegistry = AppContext::getExternalToolRegistry(); + CHECK(nullptr != etRegistry, ); + + etRegistry->unregisterEntry(Metaphlan2Support::TOOL_ID); +} + + +} // namespace U2 diff --git a/src/plugins/metaphlan2_support/src/Metaphlan2SupportPlugin.h b/src/plugins/metaphlan2_support/src/Metaphlan2SupportPlugin.h new file mode 100644 index 0000000000000000000000000000000000000000..37d84e150741448496b7bd34c4894b1766032fbc --- /dev/null +++ b/src/plugins/metaphlan2_support/src/Metaphlan2SupportPlugin.h @@ -0,0 +1,41 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_METAPHLAN_SUPPORT_PLUGIN_H_ +#define _U2_METAPHLAN_SUPPORT_PLUGIN_H_ + +#include <U2Core/PluginModel.h> + +namespace U2 { + +class MetaphlanSupportPlugin : public Plugin { +Q_OBJECT +public: + MetaphlanSupportPlugin(); + ~MetaphlanSupportPlugin(); + + static const QString PLUGIN_NAME; + static const QString PLUGIN_DESCRIPRION; +}; + +} // namespace U2 + +#endif // _U2_KRAKEN_SUPPORT_PLUGIN_H_ diff --git a/src/plugins/metaphlan2_support/src/Metaphlan2Task.cpp b/src/plugins/metaphlan2_support/src/Metaphlan2Task.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6c4b40bf3c702e21b97aa99f107795836de07284 --- /dev/null +++ b/src/plugins/metaphlan2_support/src/Metaphlan2Task.cpp @@ -0,0 +1,179 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QDir> +#include <QFileInfo> + +#include <U2Core/BaseDocumentFormats.h> +#include <U2Core/Counter.h> +#include <U2Core/DocumentUtils.h> +#include <U2Core/GUrlUtils.h> + +#include <U2Formats/CalculateSequencesNumberTask.h> +#include <U2Formats/StreamSequenceReader.h> + +#include "Metaphlan2LogParser.h" +#include "Metaphlan2Support.h" +#include "Metaphlan2Task.h" +#include "Metaphlan2WorkerFactory.h" + +namespace U2 { + +using namespace LocalWorkflow; + +Metaphlan2TaskSettings::Metaphlan2TaskSettings() : isPairedEnd(false), + numberOfThreads(1), + normalizeByMetagenomeSize(false), + presenceThreshold(1) {} + +Metaphlan2ClassifyTask::Metaphlan2ClassifyTask(const Metaphlan2TaskSettings& _settings) : + ExternalToolSupportTask(tr("Classify reads with Metaphlan2"), + TaskFlags_NR_FOSE_COSC | TaskFlag_MinimizeSubtaskErrorText), + settings(_settings), + classifyTask(nullptr), + calculateSequencesNumberTask(nullptr) { + GCOUNTER(cvar, tvar, "Metaphlan2ClassifyTask"); + + needToCountSequences = settings.analysisType == Metaphlan2WorkerFactory::ANALYSIS_TYPE_MARKER_AB_TABLE_VALUE && + settings.normalizeByMetagenomeSize; + sequencesNumber = 0; + + SAFE_POINT_EXT(!settings.databaseUrl.isEmpty(), setError(tr("Metaphlan2 database URL is empty.")), ); + SAFE_POINT_EXT(!settings.bowtie2OutputFile.isEmpty(), setError(tr("Bowtie2 output file URL is empty.")), ); + SAFE_POINT_EXT(!settings.outputFile.isEmpty(), setError(tr("Metaphlan2 output file URL is empty.")), ); + + SAFE_POINT_EXT(!settings.tmpDir.isEmpty(), setError("Temporary folder URL is empty."), ); + SAFE_POINT_EXT(!settings.readsUrl.isEmpty(), setError(tr("Reads URL is empty.")), ); + SAFE_POINT_EXT(!settings.isPairedEnd || + !settings.readsUrl.isEmpty(), + setError(tr("Paired reads URL is empty, but the 'paired reads' option is set.")), ); +} + +const QString& Metaphlan2ClassifyTask::getBowtie2OutputUrl() const { + return settings.bowtie2OutputFile; +} + +const QString& Metaphlan2ClassifyTask::getOutputUrl() const { + return settings.outputFile; +} + +void Metaphlan2ClassifyTask::prepare() { + if (needToCountSequences) { + calculateSequencesNumberTask = new CalculateSequencesNumberTask(settings.readsUrl); + addSubTask(calculateSequencesNumberTask); + } else { + prepareClassifyTask(); + addSubTask(classifyTask); + } +} + +QList<Task*> Metaphlan2ClassifyTask::onSubTaskFinished(Task* subTask) { + QList<Task*> result; + CHECK(!hasError() && !isCanceled(), result); + CHECK(calculateSequencesNumberTask == subTask, result); + + sequencesNumber = calculateSequencesNumberTask->getSequencesNumber(); + prepareClassifyTask(); + result << classifyTask; + + return result; +} + +QStringList Metaphlan2ClassifyTask::getArguments() { + QStringList arguments; + if (!settings.isPairedEnd) { + arguments << QDir::toNativeSeparators(settings.readsUrl); + } else { + arguments << QString("%1,%2").arg(QDir::toNativeSeparators(settings.readsUrl)).arg(QDir::toNativeSeparators(settings.pairedReadsUrl)); + } + + arguments << "--nproc" << QString::number(settings.numberOfThreads); + QString analysisType = settings.analysisType; + arguments << "-t" << analysisType.replace("-", "_"); + + if (settings.analysisType == Metaphlan2WorkerFactory::ANALYSIS_TYPE_REL_AB_VALUE || + settings.analysisType == Metaphlan2WorkerFactory::ANALYSIS_TYPE_REL_AB_W_READ_STATS_VALUE) { + arguments << "--tax_lev" << settings.taxLevel; + } else if (needToCountSequences) { + arguments << "--nreads" << QString::number(sequencesNumber); + } else if (settings.analysisType == Metaphlan2WorkerFactory::ANALYSIS_TYPE_MARKER_PRES_TABLE_VALUE) { + arguments << "--pres_th" << QString::number(settings.presenceThreshold); + } + + arguments << "--tmp_dir" << QDir::toNativeSeparators(settings.tmpDir); + DocumentFormatId formatId = detectInputFormats(); + CHECK_OP(stateInfo, QStringList()); + + arguments << "--input_type" << (BaseDocumentFormats::FASTA == formatId ? "fasta" : "fastq"); + arguments << "--bowtie2out" << QDir::toNativeSeparators(settings.bowtie2OutputFile); + + QDir databaseDir(QDir::toNativeSeparators(settings.databaseUrl)); + QStringList filters = QStringList() << "*.pkl"; + QStringList pklFiles = databaseDir.entryList(filters); + CHECK_EXT(!pklFiles.isEmpty(), stateInfo.setError(tr(".pkl file is absent in the database folder.")), QStringList()); + CHECK_EXT(pklFiles.size() == 1, stateInfo.setError(tr("There is 1 .pkl file in the database folder expected.")), QStringList()); + + arguments << "--mpa_pkl" << QDir::toNativeSeparators(QString("%1/%2").arg(settings.databaseUrl).arg(pklFiles.first())); + arguments << "--bowtie2db" << QDir::toNativeSeparators(settings.databaseUrl); + arguments << "-o" << QDir::toNativeSeparators(settings.outputFile); + + return arguments; +} + + +void Metaphlan2ClassifyTask::prepareClassifyTask() { + classifyTask = new ExternalToolRunTask(Metaphlan2Support::TOOL_ID, + getArguments(), + new Metaphlan2LogParser(), + QString(), + QStringList() << settings.bowtie2ExternalToolPath + << settings.pythonExternalToolPath); + setListenerForTask(classifyTask); +} + +DocumentFormatId Metaphlan2ClassifyTask::detectInputFormats() { + DocumentFormatId formatId = detectFormat(GUrl(settings.readsUrl)); + if (settings.isPairedEnd) { + DocumentFormatId pairedFormatId = detectFormat(GUrl(settings.pairedReadsUrl)); + CHECK_EXT(formatId == pairedFormatId, + stateInfo.setError(tr("Input files with PE reads have different format.")), + DocumentFormatId()); + } + + return formatId; +} + +DocumentFormatId Metaphlan2ClassifyTask::detectFormat(const GUrl& url) { + DocumentFormatId resultFormatId; + DocumentUtils::Detection detection = DocumentUtils::detectFormat(url, resultFormatId); + CHECK_EXT(detection == DocumentUtils::FORMAT, + stateInfo.setError(tr("Input file format couldn't be detected.")), + DocumentFormatId()); + + CHECK_EXT(resultFormatId == BaseDocumentFormats::FASTA || resultFormatId == BaseDocumentFormats::FASTQ, + stateInfo.setError(tr("Unexpected input file format detected. It should be FASTA or FASTQ.")), + DocumentFormatId()); + + return resultFormatId; +} + +} // namespace U2 + diff --git a/src/plugins/metaphlan2_support/src/Metaphlan2Task.h b/src/plugins/metaphlan2_support/src/Metaphlan2Task.h new file mode 100644 index 0000000000000000000000000000000000000000..89e6d5998e82bfbb71e6adf8dca6395952825d0b --- /dev/null +++ b/src/plugins/metaphlan2_support/src/Metaphlan2Task.h @@ -0,0 +1,76 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_METAPHLAN2_TASK_H_ +#define _U2_METAPHLAN2_TASK_H_ + +#include <U2Core/ExternalToolRunTask.h> + +namespace U2 { + +class CalculateSequencesNumberTask; + +struct Metaphlan2TaskSettings { + Metaphlan2TaskSettings(); + + bool isPairedEnd; + QString databaseUrl; + int numberOfThreads; + QString analysisType; + QString taxLevel; + bool normalizeByMetagenomeSize; + int presenceThreshold; + QString bowtie2OutputFile; + QString outputFile; + + QString bowtie2ExternalToolPath; + QString pythonExternalToolPath; + QString tmpDir; + QString readsUrl; + QString pairedReadsUrl; +}; + +class Metaphlan2ClassifyTask : public ExternalToolSupportTask { + Q_OBJECT +public: + Metaphlan2ClassifyTask(const Metaphlan2TaskSettings& settings); + + const QString& getBowtie2OutputUrl() const; + const QString& getOutputUrl() const; + +private: + void prepare() override; + QList<Task*> onSubTaskFinished(Task* subTask) override; + QStringList getArguments(); + void prepareClassifyTask(); + DocumentFormatId detectInputFormats(); + DocumentFormatId detectFormat(const GUrl& url); + + bool needToCountSequences; + int sequencesNumber; + const Metaphlan2TaskSettings settings; + ExternalToolRunTask* classifyTask; + CalculateSequencesNumberTask* calculateSequencesNumberTask; +}; + +} + +#endif // _U2_METAPHLAN2_TASK_H_ diff --git a/src/plugins/metaphlan2_support/src/Metaphlan2Validator.cpp b/src/plugins/metaphlan2_support/src/Metaphlan2Validator.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d5d989a2403c626e938776e5ea702bfae1c4d1b0 --- /dev/null +++ b/src/plugins/metaphlan2_support/src/Metaphlan2Validator.cpp @@ -0,0 +1,64 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QDir> + +#include <U2Core/AppContext.h> +#include <U2Core/DataPathRegistry.h> + +#include "Metaphlan2Validator.h" +#include "Metaphlan2WorkerFactory.h" + +#include "../ngs_reads_classification/src/NgsReadsClassificationPlugin.h" + +namespace U2 { +namespace Workflow { + +bool Metaphlan2Validator::validate(const Actor *actor, NotificationsList ¬ificationList, const QMap<QString, QString> &) const { + return validateDatabase(actor, notificationList); +} + +bool Metaphlan2Validator::validateDatabase(const Actor *actor, NotificationsList ¬ificationList) const { + const QString dbUrl = actor->getParameter(LocalWorkflow::Metaphlan2WorkerFactory::DB_URL)->getAttributeValueWithoutScript<QString>(); + CHECK(!dbUrl.isEmpty(), false); + + bool result = true; + QDir dbDir(dbUrl); + QStringList filterPkl = QStringList() << "*.pkl"; + QStringList dbPklEntries = dbDir.entryList(filterPkl); + if (dbPklEntries.size() != 1) { + notificationList << WorkflowNotification(tr("The database folder should contain a single \"*.pkl\" file."), actor->getId()); + result = false; + } + + QStringList filterBt2 = QStringList() << "*.bt2"; + QStringList dbBt2Entries = dbDir.entryList(filterBt2); + if (dbBt2Entries.size() != 6) { + notificationList << WorkflowNotification(tr("The database folder should contain six Bowtie2 index files (\"*.bt2\")."), actor->getId()); + result = false; + } + + return result; +} + +} + +} \ No newline at end of file diff --git a/src/plugins/metaphlan2_support/src/Metaphlan2Validator.h b/src/plugins/metaphlan2_support/src/Metaphlan2Validator.h new file mode 100644 index 0000000000000000000000000000000000000000..239a0ccd38fc5237f5a91b135a02a1d2b2efa5ae --- /dev/null +++ b/src/plugins/metaphlan2_support/src/Metaphlan2Validator.h @@ -0,0 +1,44 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_METAPHLAN2_VALIDATOR_H_ +#define _U2_METAPHLAN2_VALIDATOR_H_ + +#include <QCoreApplication> + +#include <U2Lang/ActorValidator.h> + +namespace U2 { +namespace Workflow { + +class Metaphlan2Validator : public ActorValidator { + Q_DECLARE_TR_FUNCTIONS(Metaphlan2Validator) +public: + bool validate(const Actor *actor, NotificationsList ¬ificationList, const QMap<QString, QString> &options) const; + +private: + bool validateDatabase(const Actor *actor, NotificationsList ¬ificationList) const; +}; + +} // namespace Workflow +} // namespace U2 + +#endif //_U2_METAPHLAN2_VALIDATOR_H_ diff --git a/src/plugins/metaphlan2_support/src/Metaphlan2Worker.cpp b/src/plugins/metaphlan2_support/src/Metaphlan2Worker.cpp new file mode 100644 index 0000000000000000000000000000000000000000..efa14a4f03d0a3905a621983aec21c49ef94b6a9 --- /dev/null +++ b/src/plugins/metaphlan2_support/src/Metaphlan2Worker.cpp @@ -0,0 +1,194 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <U2Core/AppContext.h> +#include <U2Core/AppSettings.h> +#include <U2Core/FailTask.h> +#include <U2Core/FileAndDirectoryUtils.h> +#include <U2Core/GUrlUtils.h> +#include <U2Core/TaskSignalMapper.h> +#include <U2Core/U2OpStatusUtils.h> +#include <U2Core/UserApplicationsSettings.h> + +#include <U2Lang/WorkflowContext.h> +#include <U2Lang/WorkflowMonitor.h> +#include <U2Lang/WorkflowUtils.h> + +#include "Metaphlan2Support.h" +#include "Metaphlan2Worker.h" +#include "Metaphlan2WorkerFactory.h" +#include "../ngs_reads_classification/src/NgsReadsClassificationUtils.h" + +namespace U2 { +namespace LocalWorkflow { + +const QString Metaphlan2Worker::METAPHLAN2_ROOT_DIR = "MetaPhlAn2"; +const QString Metaphlan2Worker::BOWTIE2OUT_DIR = "bowtie2out"; +const QString Metaphlan2Worker::BOWTIE2OUT_SUFFIX = "bowtie2out"; +const QString Metaphlan2Worker::PROFILE_DIR = "profiles"; +const QString Metaphlan2Worker::PROFILE_SUFFIX = "profile"; + +Metaphlan2Worker::Metaphlan2Worker(Actor* actor) : + BaseWorker(actor), + input(nullptr) {} + +void Metaphlan2Worker::init() { + input = ports.value(Metaphlan2WorkerFactory::INPUT_PORT_ID); + SAFE_POINT(nullptr != input, QString("Port with id '%1' is nullptr") + .arg(Metaphlan2WorkerFactory::INPUT_PORT_ID), ); +} + +Task* Metaphlan2Worker::tick() { + if (isReadyToRun()) { + U2OpStatus2Log os; + Metaphlan2TaskSettings settings = getSettings(os); + CHECK(!os.hasError(), new FailTask(os.getError())); + + Metaphlan2ClassifyTask* task = new Metaphlan2ClassifyTask(settings); + task->addListeners(createLogListeners()); + connect(new TaskSignalMapper(task), SIGNAL(si_taskFinished(Task*)), SLOT(sl_taskFinished(Task*))); + return task; + } + + if (dataFinished()) { + setDone(); + } + + return nullptr; +} + +void Metaphlan2Worker::cleanup() { + +} + +void Metaphlan2Worker::sl_taskFinished(Task* task) { + Metaphlan2ClassifyTask* metaphlan2Task = qobject_cast<Metaphlan2ClassifyTask*>(task); + if (!metaphlan2Task->isFinished() || metaphlan2Task->hasError() || metaphlan2Task->isCanceled()) { + return; + } + + addOutputToDashboard(metaphlan2Task->getBowtie2OutputUrl(), "Bowtie2"); + addOutputToDashboard(metaphlan2Task->getOutputUrl(), "MetaPhlAn2"); +} + +bool Metaphlan2Worker::isReadyToRun() const { + return input->hasMessage(); +} + +bool Metaphlan2Worker::dataFinished() const { + return input->isEnded(); +} + +Metaphlan2TaskSettings Metaphlan2Worker::getSettings(U2OpStatus &os) { + Metaphlan2TaskSettings settings; + settings.isPairedEnd = getValue<QString>(Metaphlan2WorkerFactory::SEQUENCING_READS) == Metaphlan2WorkerFactory::PAIRED_END; + + const Message message = getMessageAndSetupScriptValues(input); + settings.readsUrl = message.getData().toMap()[Metaphlan2WorkerFactory::INPUT_SLOT].toString(); + if (settings.isPairedEnd) { + settings.pairedReadsUrl = message.getData().toMap()[Metaphlan2WorkerFactory::PAIRED_INPUT_SLOT].toString(); + } + + settings.databaseUrl = getValue<QString>(Metaphlan2WorkerFactory::DB_URL); + settings.numberOfThreads = getValue<int>(Metaphlan2WorkerFactory::NUM_THREADS); + settings.analysisType = getValue<QString>(Metaphlan2WorkerFactory::ANALYSIS_TYPE); + settings.taxLevel = getValue<QString>(Metaphlan2WorkerFactory::TAX_LEVEL); + settings.normalizeByMetagenomeSize = getValue<QString>(Metaphlan2WorkerFactory::NORMALIZE) == Metaphlan2WorkerFactory::NOT_SKIP_NORMILIZE_BY_SIZE; + settings.presenceThreshold = getValue<int>(Metaphlan2WorkerFactory::PRESENCE_THRESHOLD); + + const QString defaultOutputDirectory = getDefaultOutputDir(); + + settings.bowtie2OutputFile = getValue<QString>(Metaphlan2WorkerFactory::BOWTIE2_OUTPUT_URL); + if (settings.bowtie2OutputFile.isEmpty()) { + settings.bowtie2OutputFile = createOutputToolDirectory(defaultOutputDirectory, message, settings.isPairedEnd, Bowtie2); + } else { + const bool dirCreated = QDir().mkpath(QFileInfo(settings.bowtie2OutputFile).absoluteDir().path()); + CHECK_EXT(dirCreated, os.setError(tr("Can't create a folder for the output file: %1").arg(settings.bowtie2OutputFile)), settings); + } + settings.bowtie2OutputFile = GUrlUtils::rollFileName(settings.bowtie2OutputFile, "_"); + + settings.outputFile = getValue<QString>(Metaphlan2WorkerFactory::OUTPUT_URL); + if (settings.outputFile.isEmpty()) { + settings.outputFile = createOutputToolDirectory(defaultOutputDirectory, message, settings.isPairedEnd, MetaPhlAn2); + } else { + const bool dirCreated = QDir().mkpath(QFileInfo(settings.outputFile).absoluteDir().path()); + CHECK_EXT(dirCreated, os.setError(tr("Can't create a folder for the output file: %1").arg(settings.outputFile)), settings); + } + settings.outputFile = GUrlUtils::rollFileName(settings.outputFile, "_"); + + QString bowtie2AlignerPath = WorkflowUtils::getExternalToolPath(Metaphlan2Support::ET_BOWTIE_2_ALIGNER_ID); + CHECK_EXT(!bowtie2AlignerPath.isEmpty(), os.setError("Bowtie2 aligner isn't found"), settings); + + settings.bowtie2ExternalToolPath = QFileInfo(bowtie2AlignerPath).dir().path(); + QString pythonPath = WorkflowUtils::getExternalToolPath(Metaphlan2Support::ET_PYTHON_BIO_ID); + CHECK_EXT(!pythonPath.isEmpty(), os.setError("Python isn't found"), settings); + + settings.pythonExternalToolPath = QFileInfo(pythonPath).dir().path(); + settings.tmpDir = AppContext::getAppSettings()->getUserAppsSettings()->createCurrentProcessTemporarySubDir(os, METAPHLAN2_ROOT_DIR); + CHECK_OP(os, settings); + + return settings; +} + +QString Metaphlan2Worker::getDefaultOutputDir() const { + QString defaultOutputDirectory = FileAndDirectoryUtils::getWorkingDir(context->workingDir(), FileAndDirectoryUtils::WORKFLOW_INTERNAL, "", context->workingDir()); + defaultOutputDirectory += METAPHLAN2_ROOT_DIR; + return GUrlUtils::rollFileName(defaultOutputDirectory, "_"); +} + +QString Metaphlan2Worker::createOutputToolDirectory(const QString& outputDirectory, const Message& message, const bool isPairedEnd, const Output out) const { + QStringList suffix; + QString folder; + switch (out) { + case Bowtie2: + suffix << BOWTIE2OUT_SUFFIX; + folder = BOWTIE2OUT_DIR; + break; + case MetaPhlAn2: + suffix << PROFILE_SUFFIX; + folder = PROFILE_DIR; + break; + } + QString outputToolDirectory = QString("%1/%2").arg(outputDirectory).arg(folder); + createDirectory(outputToolDirectory); + + const MessageMetadata metadata = context->getMetadataStorage().get(message.getMetadataId()); + QString result = QString("%1/%2").arg(outputToolDirectory).arg(NgsReadsClassificationUtils::getBaseFileNameWithSuffixes(metadata.getFileUrl(), suffix, "txt", isPairedEnd)); + + return result; +} + +void Metaphlan2Worker::createDirectory(QString& dir) const { + dir = GUrlUtils::rollFileName(dir, "_"); + QDir outDir(dir); + outDir.mkpath(dir); +} + +void Metaphlan2Worker::addOutputToDashboard(const QString& outputUrl, const QString& outputName) const { + if (QFileInfo::exists(outputUrl)) { + context->getMonitor()->addOutputFile(outputUrl, getActor()->getId()); + } else { + coreLog.error(tr("%1 output file doesn't exist").arg(outputName)); + } +} + +} +} diff --git a/src/plugins/metaphlan2_support/src/Metaphlan2Worker.h b/src/plugins/metaphlan2_support/src/Metaphlan2Worker.h new file mode 100644 index 0000000000000000000000000000000000000000..d9ad6967d443578c1d13bcaaf14361887a1f1670 --- /dev/null +++ b/src/plugins/metaphlan2_support/src/Metaphlan2Worker.h @@ -0,0 +1,72 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_METAPHLAN2_WORKER_H_ +#define _U2_METAPHLAN2_WORKER_H_ + +#include <U2Lang/LocalDomain.h> + +#include "Metaphlan2Task.h" + +namespace U2 { +namespace LocalWorkflow { + +class Metaphlan2Worker : public BaseWorker { + Q_OBJECT +public: + Metaphlan2Worker(Actor* actor); + + void init(); + Task* tick(); + void cleanup(); + +private slots: + void sl_taskFinished(Task* task); + +private: + enum Output{ + Bowtie2, + MetaPhlAn2 + }; + bool isReadyToRun() const; + bool dataFinished() const; + Metaphlan2TaskSettings getSettings(U2OpStatus &os); + QString getDefaultOutputDir() const; + QString createOutputToolDirectory(const QString& tmpDir, + const Message& message, + const bool isPairedEnd, + const Output out) const; + void createDirectory(QString& dir) const; + void addOutputToDashboard(const QString& outputUrl, const QString& outputName) const; + + IntegralBus *input; + + static const QString METAPHLAN2_ROOT_DIR; + static const QString BOWTIE2OUT_DIR; + static const QString BOWTIE2OUT_SUFFIX; + static const QString PROFILE_DIR; + static const QString PROFILE_SUFFIX; +}; + +} // namespace LocalWorkflow +} // namespace U2 + +#endif // _U2_METAPHLAN2_WORKER_H_ diff --git a/src/plugins/metaphlan2_support/src/Metaphlan2WorkerFactory.cpp b/src/plugins/metaphlan2_support/src/Metaphlan2WorkerFactory.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6896c90cc5784ee7b646e2648fd6fa625a3ef5d2 --- /dev/null +++ b/src/plugins/metaphlan2_support/src/Metaphlan2WorkerFactory.cpp @@ -0,0 +1,376 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QThread> + +#include "Metaphlan2Prompter.h" +#include "Metaphlan2Support.h" +#include "Metaphlan2Validator.h" +#include "Metaphlan2Worker.h" +#include "Metaphlan2WorkerFactory.h" +#include "Metaphlan2Task.h" + +#include <U2Core/AppContext.h> +#include <U2Core/AppResources.h> +#include <U2Core/AppSettings.h> +#include <U2Core/BaseDocumentFormats.h> +#include <U2Core/DataPathRegistry.h> + +#include <U2Gui/DialogUtils.h> + +#include <U2Lang/ActorPrototypeRegistry.h> +#include <U2Lang/BaseSlots.h> +#include <U2Lang/BaseTypes.h> +#include <U2Lang/PairedReadsPortValidator.h> +#include <U2Lang/WorkflowEnv.h> + +#include <../ngs_reads_classification/src/DatabaseDelegate.h> + +namespace U2 { +namespace LocalWorkflow { + +const QString Metaphlan2WorkerFactory::ACTOR_ID = "metaphlan2-classify"; + +const QString Metaphlan2WorkerFactory::INPUT_PORT_ID = "in"; + +// Slots should be the same as in GetReadsListWorkerFactory +const QString Metaphlan2WorkerFactory::INPUT_SLOT = "reads-url1"; +const QString Metaphlan2WorkerFactory::PAIRED_INPUT_SLOT = "reads-url2"; + +const QString Metaphlan2WorkerFactory::SEQUENCING_READS = "input-data"; +const QString Metaphlan2WorkerFactory::DB_URL = "database"; +const QString Metaphlan2WorkerFactory::NUM_THREADS = "threads"; +const QString Metaphlan2WorkerFactory::ANALYSIS_TYPE = "analysis-type"; +const QString Metaphlan2WorkerFactory::TAX_LEVEL = "tax-level"; +const QString Metaphlan2WorkerFactory::NORMALIZE = "normalize-by-size"; +const QString Metaphlan2WorkerFactory::PRESENCE_THRESHOLD = "presence-threshold"; +const QString Metaphlan2WorkerFactory::BOWTIE2_OUTPUT_URL = "bowtie2-output-url"; +const QString Metaphlan2WorkerFactory::OUTPUT_URL = "output-url"; + +const QString Metaphlan2WorkerFactory::SINGLE_END_TEXT = QCoreApplication::translate("Metaphlan2WorkerFactory", "SE reads or contigs"); +const QString Metaphlan2WorkerFactory::PAIRED_END_TEXT = QCoreApplication::translate("Metaphlan2WorkerFactory", "PE reads"); + +const QString Metaphlan2WorkerFactory::ANALYSIS_TYPE_REL_AB_TEXT = QCoreApplication::translate("Metaphlan2WorkerFactory", "Relative abundance"); +const QString Metaphlan2WorkerFactory::ANALYSIS_TYPE_REL_AB_W_READ_STATS_TEXT = QCoreApplication::translate("Metaphlan2WorkerFactory", "Relative abundance with reads statistics"); +const QString Metaphlan2WorkerFactory::ANALYSIS_TYPE_READS_MAP_TEXT = QCoreApplication::translate("Metaphlan2WorkerFactory", "Reads mapping"); +const QString Metaphlan2WorkerFactory::ANALYSIS_TYPE_CLADE_PROFILES_TEXT = QCoreApplication::translate("Metaphlan2WorkerFactory", "Clade profiles"); +const QString Metaphlan2WorkerFactory::ANALYSIS_TYPE_MARKER_AB_TABLE_TEXT = QCoreApplication::translate("Metaphlan2WorkerFactory", "Marker abundance table"); +const QString Metaphlan2WorkerFactory::ANALYSIS_TYPE_MARKER_PRES_TABLE_TEXT = QCoreApplication::translate("Metaphlan2WorkerFactory", "Marker presence table"); + +const QString Metaphlan2WorkerFactory::ANALYSIS_TYPE_REL_AB_VALUE = "rel-ab"; +const QString Metaphlan2WorkerFactory::ANALYSIS_TYPE_REL_AB_W_READ_STATS_VALUE = "rel-ab-w-read-stats"; +const QString Metaphlan2WorkerFactory::ANALYSIS_TYPE_READS_MAP_VALUE = "reads-map"; +const QString Metaphlan2WorkerFactory::ANALYSIS_TYPE_CLADE_PROFILES_VALUE = "clade-profiles"; +const QString Metaphlan2WorkerFactory::ANALYSIS_TYPE_MARKER_AB_TABLE_VALUE = "marker-ab-table"; +const QString Metaphlan2WorkerFactory::ANALYSIS_TYPE_MARKER_PRES_TABLE_VALUE = "marker-pres-table"; + +const QString Metaphlan2WorkerFactory::TAX_LEVEL_ALL_TEXT = "All"; +const QString Metaphlan2WorkerFactory::TAX_LEVEL_KINGDOMS_TEXT = "Kingdoms"; +const QString Metaphlan2WorkerFactory::TAX_LEVEL_PHYLA_TEXT = "Phyla"; +const QString Metaphlan2WorkerFactory::TAX_LEVEL_CLASSES_TEXT = "Classes"; +const QString Metaphlan2WorkerFactory::TAX_LEVEL_ORDERS_TEXT = "Orders"; +const QString Metaphlan2WorkerFactory::TAX_LEVEL_FAMILIES_TEXT = "Families"; +const QString Metaphlan2WorkerFactory::TAX_LEVEL_GENERA_TEXT = "Genera"; +const QString Metaphlan2WorkerFactory::TAX_LEVEL_SPECIES_TEXT = "Species"; + +const QString Metaphlan2WorkerFactory::TAX_LEVEL_ALL_VALUE = "a"; +const QString Metaphlan2WorkerFactory::TAX_LEVEL_KINGDOMS_VALUE = "k"; +const QString Metaphlan2WorkerFactory::TAX_LEVEL_PHYLA_VALUE = "p"; +const QString Metaphlan2WorkerFactory::TAX_LEVEL_CLASSES_VALUE = "c"; +const QString Metaphlan2WorkerFactory::TAX_LEVEL_ORDERS_VALUE = "o"; +const QString Metaphlan2WorkerFactory::TAX_LEVEL_FAMILIES_VALUE = "f"; +const QString Metaphlan2WorkerFactory::TAX_LEVEL_GENERA_VALUE = "g"; +const QString Metaphlan2WorkerFactory::TAX_LEVEL_SPECIES_VALUE = "s"; + +const QString Metaphlan2WorkerFactory::SKIP_NORMILIZE_BY_SIZE = "skip"; +const QString Metaphlan2WorkerFactory::NOT_SKIP_NORMILIZE_BY_SIZE = "normalize"; + +const QString Metaphlan2WorkerFactory::SINGLE_END = "single-end"; +const QString Metaphlan2WorkerFactory::PAIRED_END = "paired-end"; + +Metaphlan2WorkerFactory::Metaphlan2WorkerFactory() : + DomainFactory(ACTOR_ID) {} + +Worker* Metaphlan2WorkerFactory::createWorker(Actor *actor) { + return new Metaphlan2Worker(actor); +} + +void Metaphlan2WorkerFactory::init() { + QList<PortDescriptor *> ports; + { + const Descriptor inPortDescriptor(INPUT_PORT_ID, + tr("Input sequences"), + tr("URL(s) to FASTQ or FASTA file(s) should be provided. " + "In case of SE reads or contigs use the \"Input URL 1\" slot only. " + "In case of PE reads input \"left\" reads to \"Input URL 1\", " + "\"right\" reads to \"Input URL 2\". " + "See also the \"Input data\" parameter of the element.")); + + Descriptor inSlot1Descriptor(INPUT_SLOT, + tr("Input URL 1"), + tr("Input URL 1.")); + Descriptor inSlot2Descriptor(PAIRED_INPUT_SLOT, + tr("Input URL 2"), + tr("Input URL 2.")); + + QMap<Descriptor, DataTypePtr> inType; + inType[inSlot1Descriptor] = BaseTypes::STRING_TYPE(); + inType[inSlot2Descriptor] = BaseTypes::STRING_TYPE(); + ports << new PortDescriptor(inPortDescriptor, DataTypePtr(new MapDataType(ACTOR_ID + "-in", inType)), true); + } + + QList<Attribute*> attributes; + { + Descriptor sequencingReadsDescriptor(SEQUENCING_READS, + tr("Input data"), + tr("To classify single-end (SE) reads or contigs, received by reads de novo assembly, " + "set this parameter to \"SE reads or contigs\".<br><br>" + "To classify paired-end (PE) reads, set the value to \"PE reads\".<br><br>" + "One or two slots of the input port are used depending on the value of the parameter. " + "Pass URL(s) to data to these slots.<br><br>" + "The input files should be in FASTA or FASTQ formats. See \"Input file format\" parameter.")); + + + Descriptor databaseDescriptor(DB_URL, + tr("Database"), + tr("A path to a folder with MetaPhlAn2 database: " + "BowTie2 index files, built from reference genomes, " + "and *.pkl file (--mpa-pkl, --bowtie2db).<br><br>" + "By default, \"mpa_v20_m200\" database is provided (if it has been downloaded). " + "The database was built on ~1M unique clade-specific marker genes identified from ~17,000 " + "reference genomes (~13,500 bacterial and archaeal, ~3,500 viral, and ~110 eukaryotic).")); + + Descriptor numberOfThreadsDescriptor(NUM_THREADS, + tr("Number of threads"), + tr("The number of CPUs to use for parallelizing the mapping (--nproc).")); + + Descriptor analysisTypeDescriptor(ANALYSIS_TYPE, + tr("Analysis type"), + tr("Specify type of analysis to perform:" + "<ul>" + "<li>Relative abundance - profiling of metagenomes in terms of " + "relative abundances (corresponds to \"-t rel_ab\")</li>" + "<li>Relative abundance with reads statistics - " + "profiling of metagenomes in terms of relative abundances and " + "estimate the number of reads coming from each clade (\"-t rel_ab_w_read_stats\")</li>" + "<li>Reads mapping - mapping from reads to clades, " + "the output contains reads that hit a marker only (\"-t reads_map\")</li>" + "<li>Clade profiles - normalized marker counts for clades with at least a non-null marker(\"-t clade_profiles\")</li>" + "<li>Marker abundance table - normalized marker counts: " + "only when > 0.0 and optionally normalized by metagenome size " + "(\"-t marker_ab_table\"), see also \"Normalize by metagenome size\" parameter</li>" + "<li>Marker presence table - list of markers present in the sample " + "(\"-t marker_pres_table\"), see also \"Presence threshold\" parameter<li>" + "</ul>")); + + Descriptor taxLevelDescriptor(TAX_LEVEL, + tr("Tax level"), + tr("The taxonomic level for the relative abundance output: " + "all, kingdoms (Bacteria and Archaea) only, phyla only, etc. (--tax_lev).")); + + Descriptor normalizeBySizeDescriptor(NORMALIZE, + tr("Normalize by metagenome size"), + tr("If \"Normalize\" is selected, " + "the total number of reads in the original metagenome is taken into account for normlization: " + "UGENE calculates the number of reads in an input " + "FASTA/FASTQ file and passes \"--nreads\" parameter to MetaPhlAn2.")); + + Descriptor precenceThresholdDescriptor(PRESENCE_THRESHOLD, + tr("Presence threshold"), + tr("Specify a threshold for calling a marker.")); + + Descriptor bowtie2OutputDescriptor(BOWTIE2_OUTPUT_URL, + tr("Bowtie2 output file"), + tr("The file for saving the output of BowTie2 (--bowtie2out). " + "In case of PE reads one file is created per each pair of files.")); + Descriptor outputUrlDescriptor(OUTPUT_URL, + tr("Output file"), + tr("MetaPhlAn2 output depends on the \"Analysis type\" parameter. " + "By default, it is a tab-delimited file with the predicted taxon relative abundances.")); + + Attribute* sequencingReadsAttribute = new Attribute(sequencingReadsDescriptor, + BaseTypes::STRING_TYPE(), + Attribute::None, + SINGLE_END); + sequencingReadsAttribute->addSlotRelation(new SlotRelationDescriptor(INPUT_PORT_ID, + PAIRED_INPUT_SLOT, + QVariantList() << PAIRED_END)); + + QString databasePath; + U2DataPath* metaphlan2DataPath = AppContext::getDataPathRegistry()->getDataPathByName(NgsReadsClassificationPlugin::METAPHLAN2_DATABASE_DATA_ID); + if (NULL != metaphlan2DataPath && metaphlan2DataPath->isValid()) { + databasePath = metaphlan2DataPath->getPathByName(NgsReadsClassificationPlugin::METAPHLAN2_DATABASE_ITEM_ID); + } + Attribute* databaseAttribute = new Attribute(databaseDescriptor, + BaseTypes::STRING_TYPE(), + Attribute::Required | Attribute::NeedValidateEncoding, + databasePath); + + Attribute* numberOfThreadsAttribute = new Attribute(numberOfThreadsDescriptor, + BaseTypes::NUM_TYPE(), + Attribute::None, + AppContext::getAppSettings()->getAppResourcePool()->getIdealThreadCount()); + + Attribute* analysisTypeAttribute = new Attribute(analysisTypeDescriptor, + BaseTypes::STRING_TYPE(), + Attribute::None, + ANALYSIS_TYPE_REL_AB_VALUE); + + Attribute* taxLevelAttribute = new Attribute(taxLevelDescriptor, + BaseTypes::STRING_TYPE(), + Attribute::None, + TAX_LEVEL_ALL_VALUE); + + Attribute* normalizeBySizeAttribute = new Attribute(normalizeBySizeDescriptor, + BaseTypes::STRING_TYPE(), + Attribute::None, + SKIP_NORMILIZE_BY_SIZE); + + Attribute* precenceThresholdAttribute = new Attribute(precenceThresholdDescriptor, + BaseTypes::NUM_TYPE(), + Attribute::None, + 1); + + + Attribute* bowtie2OutputAttribute = new Attribute(bowtie2OutputDescriptor, + BaseTypes::STRING_TYPE(), + Attribute::Required | Attribute::NeedValidateEncoding | Attribute::CanBeEmpty); + + Attribute* outputUrlAttribute = new Attribute(outputUrlDescriptor, + BaseTypes::STRING_TYPE(), + Attribute::Required | Attribute::NeedValidateEncoding | Attribute::CanBeEmpty); + + taxLevelAttribute->addRelation(new VisibilityRelation(ANALYSIS_TYPE, QVariantList() << ANALYSIS_TYPE_REL_AB_VALUE << ANALYSIS_TYPE_REL_AB_W_READ_STATS_VALUE)); + normalizeBySizeAttribute->addRelation(new VisibilityRelation(ANALYSIS_TYPE, QVariantList() << ANALYSIS_TYPE_MARKER_AB_TABLE_VALUE)); + precenceThresholdAttribute->addRelation(new VisibilityRelation(ANALYSIS_TYPE, QVariantList() << ANALYSIS_TYPE_MARKER_PRES_TABLE_VALUE)); + + attributes << sequencingReadsAttribute; + attributes << databaseAttribute; + attributes << numberOfThreadsAttribute; + attributes << analysisTypeAttribute; + attributes << taxLevelAttribute; + attributes << normalizeBySizeAttribute; + attributes << precenceThresholdAttribute; + attributes << bowtie2OutputAttribute; + attributes << outputUrlAttribute; + } + + QMap<QString, PropertyDelegate*> delegates; + { + QVariantMap sequencingReadsMap; + sequencingReadsMap[SINGLE_END_TEXT] = SINGLE_END; + sequencingReadsMap[PAIRED_END_TEXT] = PAIRED_END; + delegates[SEQUENCING_READS] = new ComboBoxDelegate(sequencingReadsMap); + + QList<StrStrPair> databaseMap; + databaseMap << StrStrPair(NgsReadsClassificationPlugin::METAPHLAN2_DATABASE_DATA_ID, + NgsReadsClassificationPlugin::METAPHLAN2_DATABASE_ITEM_ID); + delegates[DB_URL] = new DatabaseDelegate(ACTOR_ID, DB_URL, databaseMap, "metaphlan2/database", true); + + QVariantMap threadsProperties; + threadsProperties["minimum"] = 1; + threadsProperties["maximum"] = QThread::idealThreadCount(); + delegates[NUM_THREADS] = new SpinBoxDelegate(threadsProperties); + + QVariantMap analysisTypeMap; + analysisTypeMap[ANALYSIS_TYPE_REL_AB_TEXT] = ANALYSIS_TYPE_REL_AB_VALUE; + analysisTypeMap[ANALYSIS_TYPE_REL_AB_W_READ_STATS_TEXT] = ANALYSIS_TYPE_REL_AB_W_READ_STATS_VALUE; + analysisTypeMap[ANALYSIS_TYPE_READS_MAP_TEXT] = ANALYSIS_TYPE_READS_MAP_VALUE; + analysisTypeMap[ANALYSIS_TYPE_CLADE_PROFILES_TEXT] = ANALYSIS_TYPE_CLADE_PROFILES_VALUE; + analysisTypeMap[ANALYSIS_TYPE_MARKER_AB_TABLE_TEXT] = ANALYSIS_TYPE_MARKER_AB_TABLE_VALUE; + analysisTypeMap[ANALYSIS_TYPE_MARKER_PRES_TABLE_TEXT] = ANALYSIS_TYPE_MARKER_PRES_TABLE_VALUE; + delegates[ANALYSIS_TYPE] = new ComboBoxDelegate(analysisTypeMap); + + QVariantMap taxLevelMap; + taxLevelMap[TAX_LEVEL_ALL_TEXT] = TAX_LEVEL_ALL_VALUE; + taxLevelMap[TAX_LEVEL_KINGDOMS_TEXT] = TAX_LEVEL_KINGDOMS_VALUE; + taxLevelMap[TAX_LEVEL_PHYLA_TEXT] = TAX_LEVEL_PHYLA_VALUE; + taxLevelMap[TAX_LEVEL_CLASSES_TEXT] = TAX_LEVEL_CLASSES_VALUE; + taxLevelMap[TAX_LEVEL_ORDERS_TEXT] = TAX_LEVEL_ORDERS_VALUE; + taxLevelMap[TAX_LEVEL_FAMILIES_TEXT] = TAX_LEVEL_FAMILIES_VALUE; + taxLevelMap[TAX_LEVEL_GENERA_TEXT] = TAX_LEVEL_GENERA_VALUE; + taxLevelMap[TAX_LEVEL_SPECIES_TEXT] = TAX_LEVEL_SPECIES_VALUE; + delegates[TAX_LEVEL] = new ComboBoxDelegate(taxLevelMap); + + QVariantMap normalizeBySizeMap; + normalizeBySizeMap[tr("Skip")] = SKIP_NORMILIZE_BY_SIZE; + normalizeBySizeMap[tr("Normalize")] = NOT_SKIP_NORMILIZE_BY_SIZE; + delegates[NORMALIZE] = new ComboBoxDelegate(normalizeBySizeMap); + + QVariantMap precenceThresholdMap; + precenceThresholdMap["minimum"] = 0; + precenceThresholdMap["maximum"] = std::numeric_limits<int>::max(); + delegates[PRESENCE_THRESHOLD] = new SpinBoxDelegate(precenceThresholdMap); + + DelegateTags bowtie2OutputTags; + bowtie2OutputTags.set(DelegateTags::PLACEHOLDER_TEXT, + tr("Auto")); + bowtie2OutputTags.set(DelegateTags::FILTER, + DialogUtils::prepareDocumentsFileFilter(BaseDocumentFormats::PLAIN_TEXT, + true, + QStringList())); + bowtie2OutputTags.set(DelegateTags::FORMAT, + BaseDocumentFormats::PLAIN_TEXT); + delegates[BOWTIE2_OUTPUT_URL] = new URLDelegate(bowtie2OutputTags, "metaphlan2/bowtie2Output"); + + DelegateTags outputUrlTags; + outputUrlTags.set(DelegateTags::PLACEHOLDER_TEXT, + tr("Auto")); + outputUrlTags.set(DelegateTags::FILTER, + DialogUtils::prepareDocumentsFileFilter(BaseDocumentFormats::PLAIN_TEXT, + true, + QStringList())); + outputUrlTags.set(DelegateTags::FORMAT, + BaseDocumentFormats::PLAIN_TEXT); + delegates[OUTPUT_URL] = new URLDelegate(outputUrlTags, "metaphlan2/output"); + } + + const Descriptor actorDescription(ACTOR_ID, + tr("Classify Sequences with MetaPhlAn2"), + tr("MetaPhlAn2 (METAgenomic PHyLogenetic ANalysis) is a tool " + "for profiling the composition of microbial communities " + "(bacteria, archaea, eukaryotes, and viruses) from " + "whole-metagenome shotgun sequencing data.<br><br>" + "The tool relies on ~1M unique clade - specific marker genes " + "identified from ~17,000 reference genomes " + "(~13,500 bacterial and archaeal, ~3,500 viral, and ~110 eukaryotic)")); + ActorPrototype *proto = new IntegralBusActorPrototype(actorDescription, + ports, attributes); + proto->setEditor(new DelegateEditor(delegates)); + proto->setPrompter(new Metaphlan2Prompter(nullptr)); + proto->addExternalTool(Metaphlan2Support::TOOL_ID); + proto->setPortValidator(INPUT_PORT_ID, new PairedReadsPortValidator(INPUT_SLOT, PAIRED_INPUT_SLOT)); + proto->setValidator(new Metaphlan2Validator()); + WorkflowEnv::getProtoRegistry()->registerProto(NgsReadsClassificationPlugin::WORKFLOW_ELEMENTS_GROUP, proto); + + DomainFactory *localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID); + localDomain->registerEntry(new Metaphlan2WorkerFactory()); +} + +void Metaphlan2WorkerFactory::cleanup() { + delete WorkflowEnv::getProtoRegistry()->unregisterProto(ACTOR_ID); + + DomainFactory *localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID); + delete localDomain->unregisterEntry(ACTOR_ID); +} + +} +} diff --git a/src/plugins/metaphlan2_support/src/Metaphlan2WorkerFactory.h b/src/plugins/metaphlan2_support/src/Metaphlan2WorkerFactory.h new file mode 100644 index 0000000000000000000000000000000000000000..363f5bfa8b5481e824bb9814ad71481923af6b36 --- /dev/null +++ b/src/plugins/metaphlan2_support/src/Metaphlan2WorkerFactory.h @@ -0,0 +1,102 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_METAPHLAN2_WORKER_FACTORY_H_ +#define _U2_METAPHLAN2_WORKER_FACTORY_H_ + +#include <U2Lang/LocalDomain.h> + +namespace U2 { +namespace LocalWorkflow { + +class Metaphlan2WorkerFactory : public DomainFactory { + Q_DECLARE_TR_FUNCTIONS(Metaphlan2WorkerFactory) +public: + Metaphlan2WorkerFactory(); + + Worker *createWorker(Actor *actor); + + static void init(); + static void cleanup(); + + static const QString ACTOR_ID; + + static const QString INPUT_PORT_ID; + + static const QString INPUT_SLOT; + static const QString PAIRED_INPUT_SLOT; + + static const QString SEQUENCING_READS; + static const QString DB_URL; + static const QString NUM_THREADS; + static const QString ANALYSIS_TYPE; + static const QString TAX_LEVEL; + static const QString NORMALIZE; + static const QString PRESENCE_THRESHOLD; + static const QString BOWTIE2_OUTPUT_URL; + static const QString OUTPUT_URL; + + static const QString SINGLE_END_TEXT; + static const QString PAIRED_END_TEXT; + + static const QString ANALYSIS_TYPE_REL_AB_TEXT; + static const QString ANALYSIS_TYPE_REL_AB_W_READ_STATS_TEXT; + static const QString ANALYSIS_TYPE_READS_MAP_TEXT; + static const QString ANALYSIS_TYPE_CLADE_PROFILES_TEXT; + static const QString ANALYSIS_TYPE_MARKER_AB_TABLE_TEXT; + static const QString ANALYSIS_TYPE_MARKER_PRES_TABLE_TEXT; + + static const QString ANALYSIS_TYPE_REL_AB_VALUE; + static const QString ANALYSIS_TYPE_REL_AB_W_READ_STATS_VALUE; + static const QString ANALYSIS_TYPE_READS_MAP_VALUE; + static const QString ANALYSIS_TYPE_CLADE_PROFILES_VALUE; + static const QString ANALYSIS_TYPE_MARKER_AB_TABLE_VALUE; + static const QString ANALYSIS_TYPE_MARKER_PRES_TABLE_VALUE; + + static const QString TAX_LEVEL_ALL_TEXT; + static const QString TAX_LEVEL_KINGDOMS_TEXT; + static const QString TAX_LEVEL_PHYLA_TEXT; + static const QString TAX_LEVEL_CLASSES_TEXT; + static const QString TAX_LEVEL_ORDERS_TEXT; + static const QString TAX_LEVEL_FAMILIES_TEXT; + static const QString TAX_LEVEL_GENERA_TEXT; + static const QString TAX_LEVEL_SPECIES_TEXT; + + static const QString TAX_LEVEL_ALL_VALUE; + static const QString TAX_LEVEL_KINGDOMS_VALUE; + static const QString TAX_LEVEL_PHYLA_VALUE; + static const QString TAX_LEVEL_CLASSES_VALUE; + static const QString TAX_LEVEL_ORDERS_VALUE; + static const QString TAX_LEVEL_FAMILIES_VALUE; + static const QString TAX_LEVEL_GENERA_VALUE; + static const QString TAX_LEVEL_SPECIES_VALUE; + + static const QString SKIP_NORMILIZE_BY_SIZE; + static const QString NOT_SKIP_NORMILIZE_BY_SIZE; + + static const QString SINGLE_END; + static const QString PAIRED_END; +}; + +} // namespace LocalWorkflow +} // namespace U2 + +#endif // _U2_METAPHLAN2_WORKER_FACTORY_H_ \ No newline at end of file diff --git a/src/plugins/ngs_reads_classification/src/ClassificationFilterWorker.cpp b/src/plugins/ngs_reads_classification/src/ClassificationFilterWorker.cpp index 13e45e4675cb3dc55bf296949539399f126fbdb0..ddd83863a9d491d2d52d9eb0570830c5c5c160cd 100644 --- a/src/plugins/ngs_reads_classification/src/ClassificationFilterWorker.cpp +++ b/src/plugins/ngs_reads_classification/src/ClassificationFilterWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -433,7 +433,7 @@ void ClassificationFilterTask::run() algoLog.trace(QString("Going to filter file: %1").arg(readsUrl)); - dir = GUrlUtils::createDirectory(cfg.workingDir + "filter", "_", stateInfo); + dir = GUrlUtils::createDirectory(cfg.workingDir + "Filter", "_", stateInfo); CHECK_OP(stateInfo, ); while(reader.hasNext()) { diff --git a/src/plugins/ngs_reads_classification/src/ClassificationFilterWorker.h b/src/plugins/ngs_reads_classification/src/ClassificationFilterWorker.h index 14258b7a6636c3005a8fcb734feb9d8d7a085888..055e9a643da14017008e927822e77f9b3bd79ab8 100644 --- a/src/plugins/ngs_reads_classification/src/ClassificationFilterWorker.h +++ b/src/plugins/ngs_reads_classification/src/ClassificationFilterWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/ngs_reads_classification/src/ClassificationReportWorker.cpp b/src/plugins/ngs_reads_classification/src/ClassificationReportWorker.cpp index 5b04a512ffacc155f39b32158d7cca4a9f656ca1..865c746f8178a18cf7e780d4c1fabaaa5a3058a4 100644 --- a/src/plugins/ngs_reads_classification/src/ClassificationReportWorker.cpp +++ b/src/plugins/ngs_reads_classification/src/ClassificationReportWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -215,12 +215,15 @@ Task * ClassificationReportWorker::tick() { QString outputFileUrl = getValue<QString>(OUT_FILE); if (outputFileUrl.isEmpty()) { QString reportFilePrefix = getReportFilePrefix(message); - outputFileUrl = context->workingDir() + - "/classification_report/" + - reportFilePrefix + - "_" + producerClassifyToolName + + outputFileUrl = FileAndDirectoryUtils::createWorkingDir(context->workingDir(), + FileAndDirectoryUtils::WORKFLOW_INTERNAL_CUSTOM, + "Classification_Report/", + context->workingDir()); + if (!reportFilePrefix.isEmpty()) { + outputFileUrl += reportFilePrefix + "_"; + } + outputFileUrl += producerClassifyToolName + "_report.txt"; - FileAndDirectoryUtils::createWorkingDir(outputFileUrl, FileAndDirectoryUtils::FILE_DIRECTORY, "", ""); } outputFileUrl = GUrlUtils::rollFileName(QFileInfo(outputFileUrl).absoluteFilePath(), "_"); diff --git a/src/plugins/ngs_reads_classification/src/ClassificationReportWorker.h b/src/plugins/ngs_reads_classification/src/ClassificationReportWorker.h index 9f084415fc8de989036b0f7934a782cc455d74a8..a2e5eb93254e91f9bc11085fbd152602195b7389 100644 --- a/src/plugins/ngs_reads_classification/src/ClassificationReportWorker.h +++ b/src/plugins/ngs_reads_classification/src/ClassificationReportWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/ngs_reads_classification/src/DatabaseDelegate.cpp b/src/plugins/ngs_reads_classification/src/DatabaseDelegate.cpp index b5cd6ba790b461f55f2ee2cf1f769c6995b34726..3f7fbad3ec549b966aeaf7cad7999ddc8d9eab9c 100644 --- a/src/plugins/ngs_reads_classification/src/DatabaseDelegate.cpp +++ b/src/plugins/ngs_reads_classification/src/DatabaseDelegate.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/ngs_reads_classification/src/DatabaseDelegate.h b/src/plugins/ngs_reads_classification/src/DatabaseDelegate.h index 7a1e94cc91df668db73c83dd153c2624d116a02f..035cf694ef0389db0f5b65f1cd97c2b7ea15c303 100644 --- a/src/plugins/ngs_reads_classification/src/DatabaseDelegate.h +++ b/src/plugins/ngs_reads_classification/src/DatabaseDelegate.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/ngs_reads_classification/src/EnsembleClassificationWorker.cpp b/src/plugins/ngs_reads_classification/src/EnsembleClassificationWorker.cpp index 0d818f776748e763709cb573dec6e7d9b19dac42..7d68fd6f9f39333aaaecf7d301b532b78085df17 100644 --- a/src/plugins/ngs_reads_classification/src/EnsembleClassificationWorker.cpp +++ b/src/plugins/ngs_reads_classification/src/EnsembleClassificationWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -40,6 +40,8 @@ #include <U2Designer/DelegateEditors.h> +#include <U2Gui/DialogUtils.h> + #include <U2Lang/ActorPrototypeRegistry.h> #include <U2Lang/ActorValidator.h> #include <U2Lang/BaseActorCategories.h> @@ -73,8 +75,12 @@ static const QString OUTPUT_SLOT = BaseSlots::URL_SLOT().getId(); static const QString NUMBER_OF_TOOLS("number-tools"); static const QString OUT_FILE("out-file"); +static const QString DEFAULT_OUT_FILE_BASE_NAME("ensemble"); +static const QString DEFAULT_OUT_FILE_EXTENSION("csv"); +static const QString DEFAULT_OUT_FILE_NAME(DEFAULT_OUT_FILE_BASE_NAME + "." + DEFAULT_OUT_FILE_EXTENSION); + QString EnsembleClassificationPrompter::composeRichDoc() { - const QString outFile = getHyperlink(OUT_FILE, getURL(OUT_FILE)); + const QString outFile = getHyperlink(OUT_FILE, getURL(OUT_FILE, (bool*)0, "", DEFAULT_OUT_FILE_NAME)); return tr("Ensemble classification data from other elements into %1").arg(outFile); } @@ -141,8 +147,7 @@ void EnsembleClassificationWorkerFactory::init() { )); Attribute *numberOfTools = new Attribute(numberOfToolsDescriptor, BaseTypes::NUM_TYPE(), Attribute::None, 2); - Attribute *outFileAttribute = new Attribute(outFileDesc, BaseTypes::STRING_TYPE(), true, "ensemble.csv"); - + Attribute *outFileAttribute = new Attribute(outFileDesc, BaseTypes::STRING_TYPE(), Attribute::Required | Attribute::NeedValidateEncoding | Attribute::CanBeEmpty); a << numberOfTools; a << outFileAttribute; @@ -156,7 +161,12 @@ void EnsembleClassificationWorkerFactory::init() { numberOfToolsMap["3"] = 3; delegates[NUMBER_OF_TOOLS] = new ComboBoxDelegate(numberOfToolsMap); - delegates[OUT_FILE] = new URLDelegate(".csv", "classification/ensemble"); + const URLDelegate::Options options = URLDelegate::SelectFileToSave; + DelegateTags tags; + tags.set(DelegateTags::PLACEHOLDER_TEXT, EnsembleClassificationWorker::tr("Auto")); + tags.set(DelegateTags::FILTER, DialogUtils::prepareFileFilter("CSV", QStringList("csv"), false, QStringList())); + + delegates[OUT_FILE] = new URLDelegate(tags, "classification/ensemble", options); } ActorPrototype* proto = new IntegralBusActorPrototype(desc, p, a); @@ -235,7 +245,6 @@ void EnsembleClassificationWorker::init() { SAFE_POINT(NULL != input3, QString("Port with id '%1' is NULL").arg(INPUT_PORT3), ); SAFE_POINT(NULL != output, QString("Port with id '%1' is NULL").arg(OUTPUT_PORT), ); - outputFile = getValue<QString>(OUT_FILE); tripleInput = getValue<int>(NUMBER_OF_TOOLS) == 3; } @@ -259,10 +268,10 @@ Task * EnsembleClassificationWorker::tick() { if (isReadyToRun()) { QList<TaxonomyClassificationResult> taxData; - QString sourceFileUrl = NULL; - QString sourceFileUrl1 = NULL; - QString sourceFileUrl2 = NULL; - QString sourceFileUrl3 = NULL; + QString sourceFileUrl; + QString sourceFileUrl1; + QString sourceFileUrl2; + QString sourceFileUrl3; const Message message1 = getMessageAndSetupScriptValues(input1); taxData << message1.getData().toMap()[INPUT_SLOT1].value<TaxonomyClassificationResult>(); @@ -297,6 +306,20 @@ Task * EnsembleClassificationWorker::tick() { } output->setContext(unitedContext, metadataId); + outputFile = getValue<QString>(OUT_FILE); + if (outputFile.isEmpty()) { + outputFile = DEFAULT_OUT_FILE_NAME; + if (!sourceFileUrl.isEmpty()) { + QString prefix = GUrlUtils::getPairedFastqFilesBaseName(sourceFileUrl, true); + if (!prefix.isEmpty()) { + outputFile = NgsReadsClassificationUtils::getBaseFileNameWithPrefixes(outputFile, + QStringList() << prefix, + DEFAULT_OUT_FILE_EXTENSION, + false); + } + } + } + Task* t = new EnsembleClassificationTask(taxData, tripleInput, outputFile, context->workingDir()); connect(new TaskSignalMapper(t), SIGNAL(si_taskFinished(Task *)), SLOT(sl_taskFinished(Task *))); return t; @@ -390,51 +413,50 @@ void EnsembleClassificationTask::run() { seqs.removeDuplicates(); CHECK_OP(stateInfo, ); seqs.sort(); - QString csv; - csv.reserve(seqs.size() * 64); int counter = 0; - foreach (QString seq, seqs) { - CHECK_OP(stateInfo, ); - stateInfo.setProgress(++counter * 100 /seqs.size()); - - TaxID id1 = taxData[0].value(seq, TaxonomyTree::UNDEFINED_ID); - TaxID id2 = taxData[1].value(seq, TaxonomyTree::UNDEFINED_ID); - TaxID id3 = taxData[2].value(seq, TaxonomyTree::UNDEFINED_ID); - if (id1 == TaxonomyTree::UNDEFINED_ID) { - QString msg = tr("Taxonomy classification for '%1' is missing from %2 slot").arg(seq).arg(INPUT_SLOT1); - algoLog.trace(msg); - hasMissing = true; - continue; - } - if (id2 == TaxonomyTree::UNDEFINED_ID) { - QString msg = tr("Taxonomy classification for '%1' is missing from %2 slot").arg(seq).arg(INPUT_SLOT2); - algoLog.trace(msg); - hasMissing = true; - continue; - } - if (tripleInput && id3 == TaxonomyTree::UNDEFINED_ID) { - QString msg = tr("Taxonomy classification for '%1' is missing from %2 slot").arg(seq).arg(INPUT_SLOT3); - algoLog.trace(msg); - hasMissing = true; - continue; - } - csv.append(seq).append(',').append(QString::number(id1)).append(',').append(QString::number(id2)); - if (tripleInput) { - csv.append(',').append(QString::number(id3)); - } - csv.append('\n'); - } + outputFile = GUrlUtils::rollFileName(outputFile, "_"); if (!QFileInfo(outputFile).isAbsolute()) { QString tmpDir = FileAndDirectoryUtils::createWorkingDir(workingDir, FileAndDirectoryUtils::WORKFLOW_INTERNAL, "", workingDir); - tmpDir = GUrlUtils::createDirectory(tmpDir, "_", stateInfo); - CHECK_OP(stateInfo, ); outputFile = tmpDir + '/' + outputFile; } QFile csvFile(outputFile); if (csvFile.open(QIODevice::Append)) { - csvFile.write(csv.toLocal8Bit()); + + foreach(QString seq, seqs) { + CHECK_OP(stateInfo, ); + stateInfo.setProgress(++counter * 100 / seqs.size()); + + TaxID id1 = taxData[0].value(seq, TaxonomyTree::UNDEFINED_ID); + TaxID id2 = taxData[1].value(seq, TaxonomyTree::UNDEFINED_ID); + TaxID id3 = taxData[2].value(seq, TaxonomyTree::UNDEFINED_ID); + if (id1 == TaxonomyTree::UNDEFINED_ID) { + QString msg = tr("Taxonomy classification for '%1' is missing from %2 slot").arg(seq).arg(INPUT_SLOT1); + algoLog.trace(msg); + hasMissing = true; + continue; + } + if (id2 == TaxonomyTree::UNDEFINED_ID) { + QString msg = tr("Taxonomy classification for '%1' is missing from %2 slot").arg(seq).arg(INPUT_SLOT2); + algoLog.trace(msg); + hasMissing = true; + continue; + } + if (tripleInput && id3 == TaxonomyTree::UNDEFINED_ID) { + QString msg = tr("Taxonomy classification for '%1' is missing from %2 slot").arg(seq).arg(INPUT_SLOT3); + algoLog.trace(msg); + hasMissing = true; + continue; + } + QString csvString; + csvString.append(seq).append(',').append(QString::number(id1)).append(',').append(QString::number(id2)); + if (tripleInput) { + csvString.append(',').append(QString::number(id3)); + } + csvString.append("\n"); + csvFile.write(csvString.toLocal8Bit()); + } csvFile.close(); } else { setError(csvFile.errorString()); diff --git a/src/plugins/ngs_reads_classification/src/EnsembleClassificationWorker.h b/src/plugins/ngs_reads_classification/src/EnsembleClassificationWorker.h index 7a9de9264d7cf13e4ff14ee837e02bc7b2a18aa1..9325d158f0d45afce12ff6449e35ee5331d1ef21 100644 --- a/src/plugins/ngs_reads_classification/src/EnsembleClassificationWorker.h +++ b/src/plugins/ngs_reads_classification/src/EnsembleClassificationWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/ngs_reads_classification/src/GenomicLibraryDelegate.cpp b/src/plugins/ngs_reads_classification/src/GenomicLibraryDelegate.cpp index 2c60ea95af66e064b83ba2b27c2201bc2d076dcc..c07d9c084f7197b2048bef9137e02253882b5645 100644 --- a/src/plugins/ngs_reads_classification/src/GenomicLibraryDelegate.cpp +++ b/src/plugins/ngs_reads_classification/src/GenomicLibraryDelegate.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/ngs_reads_classification/src/GenomicLibraryDelegate.h b/src/plugins/ngs_reads_classification/src/GenomicLibraryDelegate.h index 2ea35a926119ee45d8153001c4cb7f58d3400c7f..c48342088cafaa995cb80ef879ad99b49694a154 100644 --- a/src/plugins/ngs_reads_classification/src/GenomicLibraryDelegate.h +++ b/src/plugins/ngs_reads_classification/src/GenomicLibraryDelegate.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/ngs_reads_classification/src/GenomicLibraryDialog.cpp b/src/plugins/ngs_reads_classification/src/GenomicLibraryDialog.cpp index 514a0a4a448794d91ba6732f6d7de6d4382617b2..1dc0e15e04254a3107e94cd6aa5ab57cd5d86382 100644 --- a/src/plugins/ngs_reads_classification/src/GenomicLibraryDialog.cpp +++ b/src/plugins/ngs_reads_classification/src/GenomicLibraryDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/ngs_reads_classification/src/GenomicLibraryDialog.h b/src/plugins/ngs_reads_classification/src/GenomicLibraryDialog.h index da467d50bacd1e7f990c97b5048ed3f6c9bad967..047d92a3b138cb51d3cb47ddb7639629bf4c7158 100644 --- a/src/plugins/ngs_reads_classification/src/GenomicLibraryDialog.h +++ b/src/plugins/ngs_reads_classification/src/GenomicLibraryDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/ngs_reads_classification/src/GenomicLibraryPropertyWidget.cpp b/src/plugins/ngs_reads_classification/src/GenomicLibraryPropertyWidget.cpp index 7c3e8d30cec18c51eaa2212b23f55125f71c5003..4b1a6bcf60b7a2498fae74b4080a786aa6cce56d 100644 --- a/src/plugins/ngs_reads_classification/src/GenomicLibraryPropertyWidget.cpp +++ b/src/plugins/ngs_reads_classification/src/GenomicLibraryPropertyWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/ngs_reads_classification/src/GenomicLibraryPropertyWidget.h b/src/plugins/ngs_reads_classification/src/GenomicLibraryPropertyWidget.h index 815d9a424af8a6851f6748f036867c888c1c73e7..f7f9dfd56d41ba92b3bdc58cc7acac2dd6031db6 100644 --- a/src/plugins/ngs_reads_classification/src/GenomicLibraryPropertyWidget.h +++ b/src/plugins/ngs_reads_classification/src/GenomicLibraryPropertyWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/ngs_reads_classification/src/NgsReadsClassificationPlugin.cpp b/src/plugins/ngs_reads_classification/src/NgsReadsClassificationPlugin.cpp index 5bfbaf4afcab50f8c181bfd0cc45c1b2667a62c0..de6c63ea33804dd9457b24ae8508f64ae707bedf 100644 --- a/src/plugins/ngs_reads_classification/src/NgsReadsClassificationPlugin.cpp +++ b/src/plugins/ngs_reads_classification/src/NgsReadsClassificationPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -56,6 +56,10 @@ const QString NgsReadsClassificationPlugin::CLARK_BACTERIAL_VIRAL_DATABASE_PATH const QString NgsReadsClassificationPlugin::CLARK_BACTERIAL_VIRAL_DATABASE_DATA_ID = "clark_bacterial_viral_database"; const QString NgsReadsClassificationPlugin::CLARK_BACTERIAL_VIRAL_DATABASE_ITEM_ID = "bacterial_viral_database"; +const QString NgsReadsClassificationPlugin::METAPHLAN2_DATABASE_PATH = "ngs_classification/metaphlan2/mpa_v20_m200"; +const QString NgsReadsClassificationPlugin::METAPHLAN2_DATABASE_DATA_ID = "metaphlan2_mpa_v20_m200"; +const QString NgsReadsClassificationPlugin::METAPHLAN2_DATABASE_ITEM_ID = "mpa_v20_m200"; + const QString NgsReadsClassificationPlugin::MINIKRAKEN_4_GB_PATH = "ngs_classification/kraken/minikraken_4gb"; const QString NgsReadsClassificationPlugin::MINIKRAKEN_4_GB_DATA_ID = "minikraken_4gb"; const QString NgsReadsClassificationPlugin::MINIKRAKEN_4_GB_ITEM_ID = "minikraken_4gb"; @@ -100,6 +104,7 @@ NgsReadsClassificationPlugin::NgsReadsClassificationPlugin() registerData(TAXONOMY_DATA_ID, TAXONOMY_PATH, tr("NCBI taxonomy classification data"), false); registerData(CLARK_VIRAL_DATABASE_DATA_ID, CLARK_VIRAL_DATABASE_PATH, tr("CLARK viral database"), true); registerData(CLARK_BACTERIAL_VIRAL_DATABASE_DATA_ID, CLARK_BACTERIAL_VIRAL_DATABASE_PATH, tr("CLARK bacterial and viral database"), true); + registerData(METAPHLAN2_DATABASE_DATA_ID, METAPHLAN2_DATABASE_PATH, tr("MetaPhlAn2 database"), true); registerData(MINIKRAKEN_4_GB_DATA_ID, MINIKRAKEN_4_GB_PATH, tr("Minikraken 4Gb database"), true); registerData(DIAMOND_UNIPROT_50_DATABASE_DATA_ID, DIAMOND_UNIPROT_50_DATABASE_PATH, tr("DIAMOND database built from UniProt50")); registerData(DIAMOND_UNIPROT_90_DATABASE_DATA_ID, DIAMOND_UNIPROT_90_DATABASE_PATH, tr("DIAMOND database built from UniProt90")); diff --git a/src/plugins/ngs_reads_classification/src/NgsReadsClassificationPlugin.h b/src/plugins/ngs_reads_classification/src/NgsReadsClassificationPlugin.h index b5eeb3b61ae1cf0e12c45cbe09ece57eac1d8e82..24d36ed7516ac1bd54d16f81abf67bc74b959655 100644 --- a/src/plugins/ngs_reads_classification/src/NgsReadsClassificationPlugin.h +++ b/src/plugins/ngs_reads_classification/src/NgsReadsClassificationPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -61,6 +61,10 @@ public: static const QString CLARK_BACTERIAL_VIRAL_DATABASE_DATA_ID; static const QString CLARK_BACTERIAL_VIRAL_DATABASE_ITEM_ID; + static const QString METAPHLAN2_DATABASE_PATH; + static const QString METAPHLAN2_DATABASE_DATA_ID; + static const QString METAPHLAN2_DATABASE_ITEM_ID; + static const QString MINIKRAKEN_4_GB_PATH; static const QString MINIKRAKEN_4_GB_DATA_ID; static const QString MINIKRAKEN_4_GB_ITEM_ID; diff --git a/src/plugins/ngs_reads_classification/src/NgsReadsClassificationUtils.cpp b/src/plugins/ngs_reads_classification/src/NgsReadsClassificationUtils.cpp index 41f999c216fe97fcf6c659669a4f2228f71af4f4..2fa3e6ea20ba9b249d710224cf900416055db51d 100644 --- a/src/plugins/ngs_reads_classification/src/NgsReadsClassificationUtils.cpp +++ b/src/plugins/ngs_reads_classification/src/NgsReadsClassificationUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -27,9 +27,39 @@ namespace U2 { -QString NgsReadsClassificationUtils::getClassificationFileName(const QString &sourceFileUrl, const QString &toolName, const QString &extension, bool truncate) { - QString baseName = GUrlUtils::getPairedFastqFilesBaseName(sourceFileUrl, truncate); - return baseName + QString("_%1_classification.%2").arg(toolName).arg(extension); +const QString NgsReadsClassificationUtils::CLASSIFICATION_SUFFIX = "classification"; + +QString NgsReadsClassificationUtils::getBaseFileNameWithSuffixes(const QString &sourceFileUrl, + const QStringList &suffixes, + const QString &extension, + bool truncate) { + QString pairedName = GUrlUtils::getPairedFastqFilesBaseName(sourceFileUrl, truncate); + QString result = pairedName; + foreach(const QString& suffix, suffixes) { + result += QString("_%1").arg(suffix); + } + if (pairedName.isEmpty()) { + result = result.right(result.size() - 1); + } + result += QString(".%1").arg(extension); + return result; +} + +QString NgsReadsClassificationUtils::getBaseFileNameWithPrefixes(const QString &sourceFileUrl, + const QStringList &prefixes, + const QString &extension, + bool truncate) { + QString pairedName = GUrlUtils::getPairedFastqFilesBaseName(sourceFileUrl, truncate); + QString result = ""; + foreach(const QString& prefix, prefixes) { + result += QString("%1_").arg(prefix); + } + result += pairedName; + if (pairedName.isEmpty()) { + result.chop(1); + } + result += QString(".%1").arg(extension); + return result; } int NgsReadsClassificationUtils::countClassified(const LocalWorkflow::TaxonomyClassificationResult& classification) { diff --git a/src/plugins/ngs_reads_classification/src/NgsReadsClassificationUtils.h b/src/plugins/ngs_reads_classification/src/NgsReadsClassificationUtils.h index 9a6eae236fdb529315964142fb4e04d844776278..cdc34127232ceef8ee2e2f2524755a7927cdfe39 100644 --- a/src/plugins/ngs_reads_classification/src/NgsReadsClassificationUtils.h +++ b/src/plugins/ngs_reads_classification/src/NgsReadsClassificationUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,8 +30,17 @@ namespace U2 { class U2NGS_READS_CLASSIFICATION_EXPORT NgsReadsClassificationUtils { public: - static QString getClassificationFileName(const QString &sourceFileUrl, const QString &toolName, const QString &extension, bool truncate); + static QString getBaseFileNameWithSuffixes(const QString &sourceFileUrl, + const QStringList &suffixes, + const QString &extension, + bool truncate); + static QString getBaseFileNameWithPrefixes(const QString &sourceFileUrl, + const QStringList &prefixes, + const QString &extension, + bool truncate); static int countClassified(const LocalWorkflow::TaxonomyClassificationResult &classification); + + static const QString CLASSIFICATION_SUFFIX; }; } // namespace U2 diff --git a/src/plugins/ngs_reads_classification/src/TaxonomySupport.cpp b/src/plugins/ngs_reads_classification/src/TaxonomySupport.cpp index 2cd25c57cc8662f321e252452ae972c49e5d9bbb..ffa57f0109261f67cdc89da756ebcf09a83556cd 100644 --- a/src/plugins/ngs_reads_classification/src/TaxonomySupport.cpp +++ b/src/plugins/ngs_reads_classification/src/TaxonomySupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/ngs_reads_classification/src/TaxonomySupport.h b/src/plugins/ngs_reads_classification/src/TaxonomySupport.h index 3f208540853faff600bb25639bff49d4c0c9898c..c1167dd87b53ccde9bfec8d788ff7bd9932ea4c5 100644 --- a/src/plugins/ngs_reads_classification/src/TaxonomySupport.h +++ b/src/plugins/ngs_reads_classification/src/TaxonomySupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -46,7 +46,6 @@ namespace LocalWorkflow { typedef uint TaxID; typedef QSet<TaxID> TaxIDSet; typedef QMap<QString, TaxID> TaxonomyClassificationResult; -//typedef QVariantMap TaxonomyClassificationResult; class TaxonomyTreeModel; diff --git a/src/plugins/ngs_reads_classification/transl/russian.ts b/src/plugins/ngs_reads_classification/transl/russian.ts index 1f98c7e51ae27c1ffbd913c7ef1c3624634eeb71..2fa29d4efdab079b4885d4dcbb23299a6e5849d8 100644 --- a/src/plugins/ngs_reads_classification/transl/russian.ts +++ b/src/plugins/ngs_reads_classification/transl/russian.ts @@ -1,6 +1,21 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="ru_RU"> +<context> + <name>ClassificationFilterValidator</name> + <message> + <source>Invalid taxon ID: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Set "%1" to "True" or select a taxon in "%2".</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Taxonomy classification data from NCBI are not available.</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>ClassificationReportPrompter</name> <message> @@ -12,6 +27,13 @@ <translation type="unfinished"></translation> </message> </context> +<context> + <name>ClassificationReportValidator</name> + <message> + <source>Taxonomy classification data from NCBI are not available.</source> + <translation type="unfinished"></translation> + </message> +</context> <context> <name>ClassificationReportWorkerFactory</name> <message> @@ -40,18 +62,6 @@ <source>Custom genomes</source> <translation type="unfinished"></translation> </message> - <message> - <source>NGS reads classification</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>The plugin supports data and utility for the NGS reads classifiers</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>NGS: Reads Classification</source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>TaxonSelectionDialog</name> @@ -66,14 +76,6 @@ <source>Put input sequences that belong to the specified taxonomic group(s) to separate file(s).</source> <translation type="unfinished"></translation> </message> - <message> - <source>Invalid taxon ID: %1</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Set "%1" to "True" or select a taxon in "%2".</source> - <translation type="unfinished"></translation> - </message> </context> <context> <name>U2::LocalWorkflow::ClassificationFilterTask</name> @@ -379,6 +381,10 @@ See also the "Input data" parameter of the element.</source> <source>Not enough classified data in the port '%1'</source> <translation type="unfinished"></translation> </message> + <message> + <source>Auto</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>U2::LocalWorkflow::GenomicLibraryDialog</name> @@ -435,10 +441,6 @@ See also the "Input data" parameter of the element.</source> <source>CLARK viral database</source> <translation type="unfinished"></translation> </message> - <message> - <source>CLARK bacteria and viral database</source> - <translation type="unfinished"></translation> - </message> <message> <source>Minikraken 4Gb database</source> <translation type="unfinished"></translation> @@ -456,19 +458,23 @@ See also the "Input data" parameter of the element.</source> <translation type="unfinished"></translation> </message> <message> - <source>RefSeq release bacteria data from NCBI</source> + <source>RefSeq release viral data from NCBI</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Found the %1 at %2</source> <translation type="unfinished"></translation> </message> <message> - <source>RefSeq release viral data from NCBI</source> + <source>CLARK bacterial and viral database</source> <translation type="unfinished"></translation> </message> <message> - <source>Failed to find the %1</source> + <source>RefSeq release bacterial data from NCBI</source> <translation type="unfinished"></translation> </message> <message> - <source>Found the %1 at %2</source> + <source>MetaPhlAn2 database</source> <translation type="unfinished"></translation> </message> </context> diff --git a/src/plugins/opencl_support/src/OpenCLSupportPlugin.cpp b/src/plugins/opencl_support/src/OpenCLSupportPlugin.cpp index ae4bc68718fa6cb24ccaf7124d6722b85b2256da..beb7be4028c38cb5053c0b9133889db547fb927a 100644 --- a/src/plugins/opencl_support/src/OpenCLSupportPlugin.cpp +++ b/src/plugins/opencl_support/src/OpenCLSupportPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/opencl_support/src/OpenCLSupportPlugin.h b/src/plugins/opencl_support/src/OpenCLSupportPlugin.h index cdbbe5d5e7dbccb26e38cd2107ab8ce766bd83c2..51c8ff0ff8b8795438168918d5ddc14bf291d67e 100644 --- a/src/plugins/opencl_support/src/OpenCLSupportPlugin.h +++ b/src/plugins/opencl_support/src/OpenCLSupportPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/opencl_support/src/OpenCLSupportSettingsController.cpp b/src/plugins/opencl_support/src/OpenCLSupportSettingsController.cpp index dad1cc71ab5337aa1f65a38ecb89d0b4792ee77b..9204a5aaddf8e382d972bb900f24d171ae175dde 100644 --- a/src/plugins/opencl_support/src/OpenCLSupportSettingsController.cpp +++ b/src/plugins/opencl_support/src/OpenCLSupportSettingsController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -61,13 +61,13 @@ void OpenCLSupportSettingsPageController::saveState( AppSettingsGUIPageState * _ } //else - resource was not registered, nothing to do. } -AppSettingsGUIPageWidget * OpenCLSupportSettingsPageController::createWidget( AppSettingsGUIPageState* state ) { +AppSettingsGUIPageWidget * OpenCLSupportSettingsPageController::createWidget(AppSettingsGUIPageState* state) { OpenCLSupportSettingsPageWidget * w = new OpenCLSupportSettingsPageWidget(displayMsg, this); w->setState(state); return w; } -const QString OpenCLSupportSettingsPageController::helpPageId = QString("22055811"); +const QString OpenCLSupportSettingsPageController::helpPageId = QString("24742346"); OpenCLSupportSettingsPageState::OpenCLSupportSettingsPageState( int num_gpus ) { assert( num_gpus >= 0 ); diff --git a/src/plugins/opencl_support/src/OpenCLSupportSettingsController.h b/src/plugins/opencl_support/src/OpenCLSupportSettingsController.h index 9ca22d7e269598469b22816fa90154a613180453..9c1bc9e9d346c8e6960d5e71b8ab55ce2f7faa67 100644 --- a/src/plugins/opencl_support/src/OpenCLSupportSettingsController.h +++ b/src/plugins/opencl_support/src/OpenCLSupportSettingsController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -41,7 +41,7 @@ public: virtual void saveState( AppSettingsGUIPageState * s ); - virtual AppSettingsGUIPageWidget * createWidget( AppSettingsGUIPageState* state ); + virtual AppSettingsGUIPageWidget * createWidget(AppSettingsGUIPageState* state); const QString& getHelpPageId() const {return helpPageId;}; diff --git a/src/plugins/orf_marker/src/ORFDialog.cpp b/src/plugins/orf_marker/src/ORFDialog.cpp index c9ace694bb34af369799946cbf0b67621cdbbedc..df11503a89639957ef14dc11c2f795d4d14ef39b 100644 --- a/src/plugins/orf_marker/src/ORFDialog.cpp +++ b/src/plugins/orf_marker/src/ORFDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -73,7 +73,7 @@ ORFDialog::ORFDialog(ADVSequenceObjectContext* _ctx) : QDialog(_ctx->getAnnotatedDNAView()->getWidget()), aaUpdateTask(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22056017"); + new HelpButton(this, buttonBox, "24742552"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/orf_marker/src/ORFDialog.h b/src/plugins/orf_marker/src/ORFDialog.h index 15a3b3c8ffb2f33764deeae70e4e4ace467b12da..419a477578bf9a3a58ce27aa920bc62b4a0e0f2f 100644 --- a/src/plugins/orf_marker/src/ORFDialog.h +++ b/src/plugins/orf_marker/src/ORFDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/orf_marker/src/ORFMarkerPlugin.cpp b/src/plugins/orf_marker/src/ORFMarkerPlugin.cpp index f930db45d80a2725914f1462031f9a68d1c11bd6..6b7ebd97a313b66779be9daa84c73b923821932b 100644 --- a/src/plugins/orf_marker/src/ORFMarkerPlugin.cpp +++ b/src/plugins/orf_marker/src/ORFMarkerPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/orf_marker/src/ORFMarkerPlugin.h b/src/plugins/orf_marker/src/ORFMarkerPlugin.h index 8d464e6bd1c3a040414be81c55365ed3945a9e69..7786c122f44be5aa0a4b95b2468c3762a00cf5a3 100644 --- a/src/plugins/orf_marker/src/ORFMarkerPlugin.h +++ b/src/plugins/orf_marker/src/ORFMarkerPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/orf_marker/src/ORFMarkerTask.cpp b/src/plugins/orf_marker/src/ORFMarkerTask.cpp index e0380461c26ecfe99cde2b485d2444ab4488ac01..312cf31118009ecd141fdc55e040a4c232141212 100644 --- a/src/plugins/orf_marker/src/ORFMarkerTask.cpp +++ b/src/plugins/orf_marker/src/ORFMarkerTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/orf_marker/src/ORFMarkerTask.h b/src/plugins/orf_marker/src/ORFMarkerTask.h index f6d92fb8aa5b8256302192be325d4222e9430f6d..873a2f735c587aea709d17dfd3130582e8878b76 100644 --- a/src/plugins/orf_marker/src/ORFMarkerTask.h +++ b/src/plugins/orf_marker/src/ORFMarkerTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/orf_marker/src/ORFMarkerTests.cpp b/src/plugins/orf_marker/src/ORFMarkerTests.cpp index c6302f02bfb8d604082b3314b2327353363a0dba..792f7ce3a3cc8a6f79373b79f7f58698b61bb0c5 100644 --- a/src/plugins/orf_marker/src/ORFMarkerTests.cpp +++ b/src/plugins/orf_marker/src/ORFMarkerTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/orf_marker/src/ORFMarkerTests.h b/src/plugins/orf_marker/src/ORFMarkerTests.h index ba396b8aa5a1cd7919b55a4d72dc0b9d5f0f8852..749ef729a48640385d136a4d0453eb6561e34385 100644 --- a/src/plugins/orf_marker/src/ORFMarkerTests.h +++ b/src/plugins/orf_marker/src/ORFMarkerTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -35,7 +35,7 @@ namespace U2 { -class GTest_ORFMarkerTask : public GTest { +class GTest_ORFMarkerTask : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_ORFMarkerTask, "plugin_orf-marker-search"); diff --git a/src/plugins/orf_marker/src/ORFQuery.cpp b/src/plugins/orf_marker/src/ORFQuery.cpp index 14b1e080244115d98e5c601b18986a37d83eb35b..0dd96a6b846eaa758e9edd0bd9090fca93f16125 100644 --- a/src/plugins/orf_marker/src/ORFQuery.cpp +++ b/src/plugins/orf_marker/src/ORFQuery.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -207,7 +207,7 @@ QDORFActorPrototype::QDORFActorPrototype() { Descriptor mld(MAX_LENGTH_ATTR, QDORFActor::tr("Max length"), QDORFActor::tr("Maximum length of annotation allowed.")); Descriptor fd(FIT_ATTR, QDORFActor::tr("Require stop codon"), QDORFActor::tr("Require stop codon.")); Descriptor mr(RES_ATTR,QDORFActor::tr("Max result"),QDORFActor::tr("Find results not achieved by specified count.")); - Descriptor lr(LIMIT_ATTR,QDORFActor::tr("Limit results"),QDORFActor::tr("The amount of results will be limited id that option is setted")); + Descriptor lr(LIMIT_ATTR,QDORFActor::tr("Limit results"),QDORFActor::tr("The amount of results will be limited id that option is set")); attributes << new Attribute(ttd, BaseTypes::STRING_TYPE(), false, QVariant(DNATranslationID(1))); attributes << new Attribute(ld, BaseTypes::NUM_TYPE(), true, QVariant(100)); diff --git a/src/plugins/orf_marker/src/ORFQuery.h b/src/plugins/orf_marker/src/ORFQuery.h index 52fd32adc0ca6935931e3603bf0b1a3cc8648fda..52d86070d2f3bcb2e4a5a7985ffa328288ba962a 100644 --- a/src/plugins/orf_marker/src/ORFQuery.h +++ b/src/plugins/orf_marker/src/ORFQuery.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/orf_marker/src/ORFWorker.cpp b/src/plugins/orf_marker/src/ORFWorker.cpp index 27e76a6fd867753bd01d47d6d5c8a0cfdac00d18..9f155c89bd34a70f99eeb1c62cce32b50f1ed908 100644 --- a/src/plugins/orf_marker/src/ORFWorker.cpp +++ b/src/plugins/orf_marker/src/ORFWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -90,7 +90,7 @@ void ORFWorkerFactory::init() { " accordingly to the current translation table.\n", 0)); Descriptor isc(ISC_ATTR, ORFWorker::tr("Include stop codon"), ORFWorker::tr("The result annotation will includes stop codon if this option is set.")); Descriptor mr(RES_ATTR,ORFWorker::tr("Max result"),ORFWorker::tr("Find results not achieved by specified count.")); - Descriptor lr(LIMIT_ATTR,ORFWorker::tr("Limit results"),ORFWorker::tr("The amount of results will be limited id that option is setted.")); + Descriptor lr(LIMIT_ATTR,ORFWorker::tr("Limit results"),ORFWorker::tr("The amount of results will be limited id that option is set.")); a << new Attribute(nd, BaseTypes::STRING_TYPE(), true, QVariant("ORF")); a << new Attribute(ttd, BaseTypes::STRING_TYPE(), false, QVariant(DNATranslationID(1))); diff --git a/src/plugins/orf_marker/src/ORFWorker.h b/src/plugins/orf_marker/src/ORFWorker.h index 88149549ec119779025f5053c3075a9f88aeda30..f7a60c99db805b1ac2689bd4b74fc3aab64f8ed9 100644 --- a/src/plugins/orf_marker/src/ORFWorker.h +++ b/src/plugins/orf_marker/src/ORFWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/orf_marker/transl/russian.ts b/src/plugins/orf_marker/transl/russian.ts index 88a94f23d1f443871c11c3e2e6ff2518bdb29a1c..6d5728a27bb51b20e678ec36dbce85e4f1954093 100644 --- a/src/plugins/orf_marker/transl/russian.ts +++ b/src/plugins/orf_marker/transl/russian.ts @@ -337,7 +337,7 @@ Ignore boundary ORFs which last beyond the search region <translation>Предел результатов</translation> </message> <message> - <source>The amount of results will be limited id that option is setted.</source> + <source>The amount of results will be limited id that option is set.</source> <translation>КоличеÑтво результатов будет ограничего еÑли Ñта Ð¾Ð¿Ñ†Ð¸Ñ ÑƒÑтановлена.</translation> </message> </context> @@ -516,7 +516,7 @@ Ignore boundary ORFs which last beyond the search region <translation>Предел результатов</translation> </message> <message> - <source>The amount of results will be limited id that option is setted</source> + <source>The amount of results will be limited id that option is set</source> <translation>КоличеÑтво результатов будет ограничего еÑли Ñта Ð¾Ð¿Ñ†Ð¸Ñ ÑƒÑтановлена</translation> </message> </context> diff --git a/src/plugins/pcr/src/EditPrimerDialog.cpp b/src/plugins/pcr/src/EditPrimerDialog.cpp index 3c3361ab83fa7d1fe2967e1bf363ed89458f5e92..8827aaebab78ca27358f6d347499435a511c5c8b 100644 --- a/src/plugins/pcr/src/EditPrimerDialog.cpp +++ b/src/plugins/pcr/src/EditPrimerDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -50,7 +50,7 @@ EditPrimerDialog::EditPrimerDialog(QWidget *parent, const Primer &editToPrimer) void EditPrimerDialog::init() { GCOUNTER(cvar, tvar, "Add primer in library"); setupUi(this); - new HelpButton(this, buttonBox, "22056108"); + new HelpButton(this, buttonBox, "24742643"); primerEdit->setValidator(new PrimerValidator(this)); diff --git a/src/plugins/pcr/src/EditPrimerDialog.h b/src/plugins/pcr/src/EditPrimerDialog.h index d8614da0f6904173b218c102b2f9d87b9526b7e1..d020751db5a32fb3e8217615e6bb146d9e0ba669 100644 --- a/src/plugins/pcr/src/EditPrimerDialog.h +++ b/src/plugins/pcr/src/EditPrimerDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/ExtractProductTask.cpp b/src/plugins/pcr/src/ExtractProductTask.cpp index d9fbdd1ae8cca0e9c337ee9da831be193fef55b3..f5e6040ca5aca424e9abfcb7e1c7bef68cbf25b9 100644 --- a/src/plugins/pcr/src/ExtractProductTask.cpp +++ b/src/plugins/pcr/src/ExtractProductTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/ExtractProductTask.h b/src/plugins/pcr/src/ExtractProductTask.h index 672c81b674aa7c75d999db065b295aef062b097b..16b20b4ebd04ac4e1346d963d382c19e402a335e 100644 --- a/src/plugins/pcr/src/ExtractProductTask.h +++ b/src/plugins/pcr/src/ExtractProductTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/FindPrimerPairsWorker.cpp b/src/plugins/pcr/src/FindPrimerPairsWorker.cpp index 8ffb93995d59833a54029230ec93c7d6ba867e91..2dddb8a23e42a40f58c1aa48d9f29ca23eb73f49 100644 --- a/src/plugins/pcr/src/FindPrimerPairsWorker.cpp +++ b/src/plugins/pcr/src/FindPrimerPairsWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -140,7 +140,7 @@ void FindPrimerPairsWorkerFactory::init() { ActorPrototype * proto = new IntegralBusActorPrototype( desc, p, attrs); QMap<QString, PropertyDelegate*> delegates; - const QString filter = DialogUtils::prepareFileFilter(FindPrimerPairsWorker::tr("Report file"), QStringList("html"), true); + QString filter = DialogUtils::prepareFileFilter(FindPrimerPairsWorker::tr("Report file"), QStringList("html"), true); DelegateTags tags; tags.set("filter", filter); tags.set("extensions", QStringList() << "html"); diff --git a/src/plugins/pcr/src/FindPrimerPairsWorker.h b/src/plugins/pcr/src/FindPrimerPairsWorker.h index d6b4cf2fa24b343520f9c8488659e05c10980c04..788e7c13ff3aaa27922e0cfa50efcc9d4856aa81 100644 --- a/src/plugins/pcr/src/FindPrimerPairsWorker.h +++ b/src/plugins/pcr/src/FindPrimerPairsWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/InSilicoPcrOPWidgetFactory.cpp b/src/plugins/pcr/src/InSilicoPcrOPWidgetFactory.cpp index e71f82dafa3676446d867574c3417d742295bc5d..c800b0a49820da8cd73b1d6de7cbeeb3be8e3c99 100644 --- a/src/plugins/pcr/src/InSilicoPcrOPWidgetFactory.cpp +++ b/src/plugins/pcr/src/InSilicoPcrOPWidgetFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ namespace U2 { -const QString InSilicoPcrOPWidgetFactory::GROUP_DOC_PAGE = "22056106"; +const QString InSilicoPcrOPWidgetFactory::GROUP_DOC_PAGE = "24742641"; InSilicoPcrOPWidgetFactory::InSilicoPcrOPWidgetFactory() : OPWidgetFactory() diff --git a/src/plugins/pcr/src/InSilicoPcrOPWidgetFactory.h b/src/plugins/pcr/src/InSilicoPcrOPWidgetFactory.h index 07e0f51cdac4e74250469011b0bb529e4c3967ca..d691ce1364e871bc97932137c5d7dc0ec2faf6ca 100644 --- a/src/plugins/pcr/src/InSilicoPcrOPWidgetFactory.h +++ b/src/plugins/pcr/src/InSilicoPcrOPWidgetFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/InSilicoPcrOptionPanelWidget.cpp b/src/plugins/pcr/src/InSilicoPcrOptionPanelWidget.cpp index eecd57c7aad0add79aabefcc60f508d842775d30..ffa42b100e04447fab4b1f897b4c2af788c8237c 100644 --- a/src/plugins/pcr/src/InSilicoPcrOptionPanelWidget.cpp +++ b/src/plugins/pcr/src/InSilicoPcrOptionPanelWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/InSilicoPcrOptionPanelWidget.h b/src/plugins/pcr/src/InSilicoPcrOptionPanelWidget.h index 11d84fa7705062213654211ea71cabb996231094..b30afec56c3e91a1bb2f3b9995a0b07bb44c301b 100644 --- a/src/plugins/pcr/src/InSilicoPcrOptionPanelWidget.h +++ b/src/plugins/pcr/src/InSilicoPcrOptionPanelWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/InSilicoPcrProductsTable.cpp b/src/plugins/pcr/src/InSilicoPcrProductsTable.cpp index af6b57caf6eb03e7f8aa13800d8c324b2c68c998..f604fdd481eb6defc1e455f5c041d54cae4da9c2 100644 --- a/src/plugins/pcr/src/InSilicoPcrProductsTable.cpp +++ b/src/plugins/pcr/src/InSilicoPcrProductsTable.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/InSilicoPcrProductsTable.h b/src/plugins/pcr/src/InSilicoPcrProductsTable.h index 6bbeec22bb2f21769c6b7b972796eeddf6b37b8e..b355700f156a78c7fbbc0ab2f76e20eee191a85f 100644 --- a/src/plugins/pcr/src/InSilicoPcrProductsTable.h +++ b/src/plugins/pcr/src/InSilicoPcrProductsTable.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/InSilicoPcrTask.cpp b/src/plugins/pcr/src/InSilicoPcrTask.cpp index e84b6e7a4e6cddc1dbaf625b13021897c42b7435..efb368684ae342e1afda0beadbeb488aa1d80731 100644 --- a/src/plugins/pcr/src/InSilicoPcrTask.cpp +++ b/src/plugins/pcr/src/InSilicoPcrTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/InSilicoPcrTask.h b/src/plugins/pcr/src/InSilicoPcrTask.h index 5a9f005c31c9e9077b109b6675fe5dc5429acc4f..846c2a645ffaf7c3f8e346efa74e05c0aa85e6b2 100644 --- a/src/plugins/pcr/src/InSilicoPcrTask.h +++ b/src/plugins/pcr/src/InSilicoPcrTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/InSilicoPcrWorker.cpp b/src/plugins/pcr/src/InSilicoPcrWorker.cpp index 67cfab1771b08134eab4e60ddf89990bd7d7c85b..2b1ef0b67f3ec0bf4eb00c04d4512399ab68e2b6 100644 --- a/src/plugins/pcr/src/InSilicoPcrWorker.cpp +++ b/src/plugins/pcr/src/InSilicoPcrWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/InSilicoPcrWorker.h b/src/plugins/pcr/src/InSilicoPcrWorker.h index 4491ff0c95be16bf64e6d537f66989d3aa34f885..fabbc915fc524db22c8887aafe24cf16a2d87ac9 100644 --- a/src/plugins/pcr/src/InSilicoPcrWorker.h +++ b/src/plugins/pcr/src/InSilicoPcrWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/InSilicoPcrWorkflowTask.cpp b/src/plugins/pcr/src/InSilicoPcrWorkflowTask.cpp index 22f17647e2f62f76f46d4bab71121a0ad6d70793..60f250416bb82fad5af1afc9f9fdc61bd45be863 100644 --- a/src/plugins/pcr/src/InSilicoPcrWorkflowTask.cpp +++ b/src/plugins/pcr/src/InSilicoPcrWorkflowTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/InSilicoPcrWorkflowTask.h b/src/plugins/pcr/src/InSilicoPcrWorkflowTask.h index 1835db4139a93bc04fc6fb51d709424cb295a689..4639810f339c56f77c7073d11ec8fd71d7507b5a 100644 --- a/src/plugins/pcr/src/InSilicoPcrWorkflowTask.h +++ b/src/plugins/pcr/src/InSilicoPcrWorkflowTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/PcrOptionsPanelSavableTab.cpp b/src/plugins/pcr/src/PcrOptionsPanelSavableTab.cpp index 11ba1e5ba955a8451e9ef9b4212e23d7b7d24aef..66f6796369b9e89a243699df68a19adbd84d41cc 100644 --- a/src/plugins/pcr/src/PcrOptionsPanelSavableTab.cpp +++ b/src/plugins/pcr/src/PcrOptionsPanelSavableTab.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/PcrOptionsPanelSavableTab.h b/src/plugins/pcr/src/PcrOptionsPanelSavableTab.h index bfd76eaab714d6298f1b9648e60c8fcafbae2d72..825a28ec742219951af0f868f55f95d9e06fdf07 100644 --- a/src/plugins/pcr/src/PcrOptionsPanelSavableTab.h +++ b/src/plugins/pcr/src/PcrOptionsPanelSavableTab.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/PcrPlugin.cpp b/src/plugins/pcr/src/PcrPlugin.cpp index 989cbc7d456506cdf26670d09acca9f4ef581887..d20cec831ae1628a82b559019ee9de09b6e12380 100644 --- a/src/plugins/pcr/src/PcrPlugin.cpp +++ b/src/plugins/pcr/src/PcrPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/PcrPlugin.h b/src/plugins/pcr/src/PcrPlugin.h index 190a33e19ad9ac81a3788223ee38a9f978da980c..5efc97db34cd8077e48236b822b9915d1230dac6 100644 --- a/src/plugins/pcr/src/PcrPlugin.h +++ b/src/plugins/pcr/src/PcrPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/Primer.cpp b/src/plugins/pcr/src/Primer.cpp index 26451bbdcd5a8a9e04967252ea6f8845d4601bbd..06c823736821dbfad07e65719af8bf6b37555bb4 100644 --- a/src/plugins/pcr/src/Primer.cpp +++ b/src/plugins/pcr/src/Primer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/Primer.h b/src/plugins/pcr/src/Primer.h index 41a3a03d6037fafecebe236997fdb10dfb324924..63552969635d635e95c2a74a19581603385f15a5 100644 --- a/src/plugins/pcr/src/Primer.h +++ b/src/plugins/pcr/src/Primer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/PrimerDimersFinder.cpp b/src/plugins/pcr/src/PrimerDimersFinder.cpp index c12c8fe95e67e2e544fee5c6e9e4d4f96da9f9e8..5e0ba1fc3c4bc3a4fd0d78da233e1a8d4a1ac825 100644 --- a/src/plugins/pcr/src/PrimerDimersFinder.cpp +++ b/src/plugins/pcr/src/PrimerDimersFinder.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/PrimerDimersFinder.h b/src/plugins/pcr/src/PrimerDimersFinder.h index dd67151d9402e08ed5bf8a2ef6b91d0a95c880e5..6f6d0b48b1720bed7b9a3f29063adf2c36d8517c 100644 --- a/src/plugins/pcr/src/PrimerDimersFinder.h +++ b/src/plugins/pcr/src/PrimerDimersFinder.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/PrimerGroupBox.cpp b/src/plugins/pcr/src/PrimerGroupBox.cpp index ec8c9238771f7378d73367dfb3ab7fd6ff338589..b42c39b6e2d18a14f887b4c45866b6520a1a533d 100644 --- a/src/plugins/pcr/src/PrimerGroupBox.cpp +++ b/src/plugins/pcr/src/PrimerGroupBox.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -99,7 +99,7 @@ void PrimerGroupBox::sl_browse() { } void PrimerGroupBox::sl_findPrimerTaskStateChanged() { - SAFE_POINT(findPrimerTask != NULL, "Catched the taskStateChanged of unknown task", ); + SAFE_POINT(findPrimerTask != NULL, "Caught the taskStateChanged of unknown task", ); CHECK(findPrimerTask->isFinished() || findPrimerTask->isCanceled() || findPrimerTask->hasError(), ); diff --git a/src/plugins/pcr/src/PrimerGroupBox.h b/src/plugins/pcr/src/PrimerGroupBox.h index 26949d8901d944c9565a0098cad50baabc2807e1..4f16ad2a098dda93a0a771b618876b637a254d00 100644 --- a/src/plugins/pcr/src/PrimerGroupBox.h +++ b/src/plugins/pcr/src/PrimerGroupBox.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/PrimerLibrary.cpp b/src/plugins/pcr/src/PrimerLibrary.cpp index 76e1a0ecb4edaab0d741d9c8adb17ef14e1492c4..37aa79d84eeac648857fb43b6a4c7d438c8c2faf 100644 --- a/src/plugins/pcr/src/PrimerLibrary.cpp +++ b/src/plugins/pcr/src/PrimerLibrary.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -62,7 +62,7 @@ PrimerLibrary * PrimerLibrary::getInstance(U2OpStatus &os) { // open DBI connection const QString path = settings->getFileStorageDir() + "/" + libraryName; - U2DbiRef dbiRef(DEFAULT_DBI_ID, path.toLocal8Bit()); + U2DbiRef dbiRef(DEFAULT_DBI_ID, path); QHash<QString, QString> properties; properties[U2DbiOptions::U2_DBI_LOCKING_MODE] = "normal"; diff --git a/src/plugins/pcr/src/PrimerLibrary.h b/src/plugins/pcr/src/PrimerLibrary.h index 2d28403eca9223c54c1dc646bda8fabb99b36175..7355239c057c2b682cb7e6ef5f41dbe22bcb9b9c 100644 --- a/src/plugins/pcr/src/PrimerLibrary.h +++ b/src/plugins/pcr/src/PrimerLibrary.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/PrimerLibraryMdiWindow.cpp b/src/plugins/pcr/src/PrimerLibraryMdiWindow.cpp index bdbcd619e8c7a0db30193d3a3048f797a2b49d64..a4af39a2df0521edafb5a62dba774720b67dbe40 100644 --- a/src/plugins/pcr/src/PrimerLibraryMdiWindow.cpp +++ b/src/plugins/pcr/src/PrimerLibraryMdiWindow.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/PrimerLibraryMdiWindow.h b/src/plugins/pcr/src/PrimerLibraryMdiWindow.h index 1941380ad528c06154d2142b60259822fcac739b..fba92f6614dd1a45828be828efeb74179afae260 100644 --- a/src/plugins/pcr/src/PrimerLibraryMdiWindow.h +++ b/src/plugins/pcr/src/PrimerLibraryMdiWindow.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/PrimerLibrarySelector.cpp b/src/plugins/pcr/src/PrimerLibrarySelector.cpp index f39bc95e9f6ab31e1cfa1fc53c0dabe740c31b6b..315160f28760d244a6b738cadf589927b28d616b 100644 --- a/src/plugins/pcr/src/PrimerLibrarySelector.cpp +++ b/src/plugins/pcr/src/PrimerLibrarySelector.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ PrimerLibrarySelector::PrimerLibrarySelector(QWidget *parent) { GCOUNTER(cvar, tvar, "PrimerLibrarySelector"); setupUi(this); - new HelpButton(this, buttonBox, "22056106"); + new HelpButton(this, buttonBox, "24742641"); connect(primerTable, SIGNAL(doubleClicked(const QModelIndex &)), SLOT(accept())); connect(primerTable->selectionModel(), SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)), SLOT(sl_selectionChanged())); diff --git a/src/plugins/pcr/src/PrimerLibrarySelector.h b/src/plugins/pcr/src/PrimerLibrarySelector.h index 6e5bb4f8da12575bb79b596dda9b17a7e53e68bb..f860857dbc84e10340f1983f2f8f5da758c4425e 100644 --- a/src/plugins/pcr/src/PrimerLibrarySelector.h +++ b/src/plugins/pcr/src/PrimerLibrarySelector.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/PrimerLibraryTable.cpp b/src/plugins/pcr/src/PrimerLibraryTable.cpp index 5f336028b1a39e337e3ef5d5f7fd3d8e9c4d4ade..4e4667d07d6e42d8457228c5fb6be5313e8d6179 100644 --- a/src/plugins/pcr/src/PrimerLibraryTable.cpp +++ b/src/plugins/pcr/src/PrimerLibraryTable.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/PrimerLibraryTable.h b/src/plugins/pcr/src/PrimerLibraryTable.h index ee550969ce8dece3ac264455be36a74ad232fbce..4115f42d42d4681bc507d883fb5932ec6051b970 100644 --- a/src/plugins/pcr/src/PrimerLibraryTable.h +++ b/src/plugins/pcr/src/PrimerLibraryTable.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/PrimerLibraryTableController.cpp b/src/plugins/pcr/src/PrimerLibraryTableController.cpp index 503b839a7a14549c5f615fdbb6816cfc4dbcf415..9fc71b96ab86f8fb4787597fc8266ca8528f6b1c 100644 --- a/src/plugins/pcr/src/PrimerLibraryTableController.cpp +++ b/src/plugins/pcr/src/PrimerLibraryTableController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/PrimerLibraryTableController.h b/src/plugins/pcr/src/PrimerLibraryTableController.h index fe68216873f64ae415e7df7d415a198fe30b8cbe..21ee939c90e40bb7dc0c1b03873893354267d020 100644 --- a/src/plugins/pcr/src/PrimerLibraryTableController.h +++ b/src/plugins/pcr/src/PrimerLibraryTableController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/PrimerLibraryWidget.cpp b/src/plugins/pcr/src/PrimerLibraryWidget.cpp index aece509ae7a2fe98a487f7bd7bf44bb4251dff77..daede224a933742cdca92d9de56ccc22c2a7ab6c 100644 --- a/src/plugins/pcr/src/PrimerLibraryWidget.cpp +++ b/src/plugins/pcr/src/PrimerLibraryWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -52,7 +52,7 @@ PrimerLibraryWidget::PrimerLibraryWidget(QWidget *parent) : QWidget(parent), editPrimerButton(NULL), removePrimersButton(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22056108"); + new HelpButton(this, buttonBox, "24742643"); QPushButton *newPrimerButton = buttonBox->addButton(tr("New primer"), QDialogButtonBox::ActionRole); connect(newPrimerButton, SIGNAL(clicked()), SLOT(sl_newPrimer())); diff --git a/src/plugins/pcr/src/PrimerLibraryWidget.h b/src/plugins/pcr/src/PrimerLibraryWidget.h index a09c43edb946c2737f493a539d75e1df7db08d43..5f57226990f128f5471f2e72489bf151caca14b6 100644 --- a/src/plugins/pcr/src/PrimerLibraryWidget.h +++ b/src/plugins/pcr/src/PrimerLibraryWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/PrimerLineEdit.cpp b/src/plugins/pcr/src/PrimerLineEdit.cpp index d1aa7b569157a66475d285a08e6956f77bd49d2a..b9642855afa4c54fac5ddb80031397923e85267b 100644 --- a/src/plugins/pcr/src/PrimerLineEdit.cpp +++ b/src/plugins/pcr/src/PrimerLineEdit.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/PrimerLineEdit.h b/src/plugins/pcr/src/PrimerLineEdit.h index 8236cd57b9262fa409e3f231e2d1a6cd0fe93815..c06e119228464396b6c16d9bc2f7a22df4a6d3a1 100644 --- a/src/plugins/pcr/src/PrimerLineEdit.h +++ b/src/plugins/pcr/src/PrimerLineEdit.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/PrimerStatistics.cpp b/src/plugins/pcr/src/PrimerStatistics.cpp index 91ca44f0be456001a5a0ebffa501330b3bd9f5e7..9710c15c7d486a6b2924f1e9550478201b61dc6f 100644 --- a/src/plugins/pcr/src/PrimerStatistics.cpp +++ b/src/plugins/pcr/src/PrimerStatistics.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/PrimerStatistics.h b/src/plugins/pcr/src/PrimerStatistics.h index 3571f237feabb305f6536c16e648b26167a2f7e5..827f924e26e14185799c3ffe7b3d1fa8fcb9209c 100644 --- a/src/plugins/pcr/src/PrimerStatistics.h +++ b/src/plugins/pcr/src/PrimerStatistics.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/PrimersDetailsDialog.cpp b/src/plugins/pcr/src/PrimersDetailsDialog.cpp index 89a4f473c597dec21ceb4cfd1ffd11c252684a1e..0f1a95ba72510ef368fe8ef1449e91aff861d818 100644 --- a/src/plugins/pcr/src/PrimersDetailsDialog.cpp +++ b/src/plugins/pcr/src/PrimersDetailsDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,7 +32,7 @@ PrimersDetailsDialog::PrimersDetailsDialog(QWidget *parent, const QString &detai { GCOUNTER(cvar, tvar, "PrimersDetailsDialog"); setupUi(this); - new HelpButton(this, buttonBox, "22056107"); + new HelpButton(this, buttonBox, "24742642"); textEdit->setText(details); } diff --git a/src/plugins/pcr/src/PrimersDetailsDialog.h b/src/plugins/pcr/src/PrimersDetailsDialog.h index 1a2ec3700b3837ef2f251c1a1f7aa804453310c3..d23df433659ec498ebb75f51fde304bdc3f45f68 100644 --- a/src/plugins/pcr/src/PrimersDetailsDialog.h +++ b/src/plugins/pcr/src/PrimersDetailsDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/PrimersGrouperWorker.cpp b/src/plugins/pcr/src/PrimersGrouperWorker.cpp index eb2bfee428785d0b8bb87058fc0179ff9ad8907f..752039a2efd98c72965c5ca963395e8652ecef16 100644 --- a/src/plugins/pcr/src/PrimersGrouperWorker.cpp +++ b/src/plugins/pcr/src/PrimersGrouperWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -146,7 +146,7 @@ void PrimersGrouperWorkerFactory::init() { ActorPrototype * proto = new IntegralBusActorPrototype( desc, p, attrs); QMap<QString, PropertyDelegate*> delegates; - const QString filter = DialogUtils::prepareFileFilter(PrimersGrouperWorker::tr("Report file"), QStringList("html"), true); + QString filter = DialogUtils::prepareFileFilter(PrimersGrouperWorker::tr("Report file"), QStringList("html"), true); DelegateTags tags; tags.set("filter", filter); tags.set("extensions", QStringList() << "html"); diff --git a/src/plugins/pcr/src/PrimersGrouperWorker.h b/src/plugins/pcr/src/PrimersGrouperWorker.h index 6df0fe300c8fa3a9dd02e99f5bd2458169c79d58..7d89658709d3342fe8336613e15ccec49de7e906 100644 --- a/src/plugins/pcr/src/PrimersGrouperWorker.h +++ b/src/plugins/pcr/src/PrimersGrouperWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/export/ExportPrimersDialog.cpp b/src/plugins/pcr/src/export/ExportPrimersDialog.cpp index 927e75ad37ac53b468bcd701f058cfe712175e8d..48daafc217e6767c869fb258da1ceea4e111201b 100644 --- a/src/plugins/pcr/src/export/ExportPrimersDialog.cpp +++ b/src/plugins/pcr/src/export/ExportPrimersDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -61,7 +61,7 @@ ExportPrimersDialog::ExportPrimersDialog(const QList<Primer> &primers, QWidget * primers(primers) { setupUi(this); - new HelpButton(this, buttonBox, "22056108"); + new HelpButton(this, buttonBox, "24742643"); init(); connectSignals(); diff --git a/src/plugins/pcr/src/export/ExportPrimersDialog.h b/src/plugins/pcr/src/export/ExportPrimersDialog.h index 70be9b00bc053914162bffbcc061ab54cb640f05..8b004789bd1968fafa1c1b3875048c1e90fdd48c 100644 --- a/src/plugins/pcr/src/export/ExportPrimersDialog.h +++ b/src/plugins/pcr/src/export/ExportPrimersDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/export/ExportPrimersToDatabaseTask.cpp b/src/plugins/pcr/src/export/ExportPrimersToDatabaseTask.cpp index 97354486d609b20b9de8be235b6d5c47125d649d..05210a45a585890d067eb972c18f10f43e787e24 100644 --- a/src/plugins/pcr/src/export/ExportPrimersToDatabaseTask.cpp +++ b/src/plugins/pcr/src/export/ExportPrimersToDatabaseTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/export/ExportPrimersToDatabaseTask.h b/src/plugins/pcr/src/export/ExportPrimersToDatabaseTask.h index 0c89813f428250fb884b66d60bbdbc6ae3758b22..76684c11c1ebd842ec18e2474d85c2f58e13df1e 100644 --- a/src/plugins/pcr/src/export/ExportPrimersToDatabaseTask.h +++ b/src/plugins/pcr/src/export/ExportPrimersToDatabaseTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/export/ExportPrimersToLocalFileTask.cpp b/src/plugins/pcr/src/export/ExportPrimersToLocalFileTask.cpp index 922e317a484e2114e4dce4f2d33104d38923f7f1..1998fdab0bffb4748a205ae6aa22c174daa09fd6 100644 --- a/src/plugins/pcr/src/export/ExportPrimersToLocalFileTask.cpp +++ b/src/plugins/pcr/src/export/ExportPrimersToLocalFileTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/export/ExportPrimersToLocalFileTask.h b/src/plugins/pcr/src/export/ExportPrimersToLocalFileTask.h index c74bb09408a794d3d60535bd944dcdc9b785cae8..efa1ed142905a7a299bd06ef55371c56cdf30f91 100644 --- a/src/plugins/pcr/src/export/ExportPrimersToLocalFileTask.h +++ b/src/plugins/pcr/src/export/ExportPrimersToLocalFileTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/import/ImportPrimerFromObjectTask.cpp b/src/plugins/pcr/src/import/ImportPrimerFromObjectTask.cpp index 684e14d50166c643b35e1183caf9e90e54e1ccca..1ffd801aaa8010020c6cbee5d4ac90e09653b8d7 100644 --- a/src/plugins/pcr/src/import/ImportPrimerFromObjectTask.cpp +++ b/src/plugins/pcr/src/import/ImportPrimerFromObjectTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/import/ImportPrimerFromObjectTask.h b/src/plugins/pcr/src/import/ImportPrimerFromObjectTask.h index 87ccfa85e738feeef61348b62c1d521d2699c927..ea5a96397b9e7729070054c503dd3e6d4e46251d 100644 --- a/src/plugins/pcr/src/import/ImportPrimerFromObjectTask.h +++ b/src/plugins/pcr/src/import/ImportPrimerFromObjectTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/import/ImportPrimersDialog.cpp b/src/plugins/pcr/src/import/ImportPrimersDialog.cpp index 2c2a9e874d8def3362cca12d509f6238abf9284f..1735135072e7347f4d2cf00ecdbfa94af28eaf95 100644 --- a/src/plugins/pcr/src/import/ImportPrimersDialog.cpp +++ b/src/plugins/pcr/src/import/ImportPrimersDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -49,7 +49,7 @@ ImportPrimersDialog::ImportPrimersDialog(QWidget *parent) : waitForConnection(false) { setupUi(this); - new HelpButton(this, buttonBox, "22056108"); + new HelpButton(this, buttonBox, "24742643"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Import")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); init(); diff --git a/src/plugins/pcr/src/import/ImportPrimersDialog.h b/src/plugins/pcr/src/import/ImportPrimersDialog.h index 463f418b106a9c4c33021f5c0279f6832db6b848..0e8f2a484081fb2f4843eb5125762303382d491e 100644 --- a/src/plugins/pcr/src/import/ImportPrimersDialog.h +++ b/src/plugins/pcr/src/import/ImportPrimersDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/import/ImportPrimersFromFileTask.cpp b/src/plugins/pcr/src/import/ImportPrimersFromFileTask.cpp index f0a678a16c75ad80c031889a7947ad45c7e93c6b..001399e370d85ab25335a8e19df39ae0b95776a8 100644 --- a/src/plugins/pcr/src/import/ImportPrimersFromFileTask.cpp +++ b/src/plugins/pcr/src/import/ImportPrimersFromFileTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -74,8 +74,8 @@ QString ImportPrimersFromFileTask::generateReport() const { int tasksWithError = 0; int primersImported = 0; - foreach (Task *subTask, getSubtasks()) { - if (Q_UNLIKELY(loadTask == subTask)) { + foreach (const QPointer<Task> &subTask, getSubtasks()) { + if (Q_UNLIKELY(loadTask == subTask.data())) { continue; } diff --git a/src/plugins/pcr/src/import/ImportPrimersFromFileTask.h b/src/plugins/pcr/src/import/ImportPrimersFromFileTask.h index 377b2d9dac254c3ca29ff682340799eef54471e4..564f0aeb90ad96319366f355c94a948dfe5a32cb 100644 --- a/src/plugins/pcr/src/import/ImportPrimersFromFileTask.h +++ b/src/plugins/pcr/src/import/ImportPrimersFromFileTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/import/ImportPrimersFromFolderTask.cpp b/src/plugins/pcr/src/import/ImportPrimersFromFolderTask.cpp index e966494d4e77af281576e90843bfb008298bc9ca..cc90883b1267d0e2fae33233eba5aaf0234439af 100644 --- a/src/plugins/pcr/src/import/ImportPrimersFromFolderTask.cpp +++ b/src/plugins/pcr/src/import/ImportPrimersFromFolderTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -52,7 +52,7 @@ void ImportPrimersFromFolderTask::prepare() { QString ImportPrimersFromFolderTask::generateReport() const { QString report; - foreach (Task *subtask, getSubtasks()) { + foreach (const QPointer<Task> &subtask, getSubtasks()) { report += subtask->generateReport() + "<br>"; } return report; diff --git a/src/plugins/pcr/src/import/ImportPrimersFromFolderTask.h b/src/plugins/pcr/src/import/ImportPrimersFromFolderTask.h index 799391581c52630418cb5b3c65ad2496787fabf6..78bec7245e848d89288e98c918755dd3d2662645 100644 --- a/src/plugins/pcr/src/import/ImportPrimersFromFolderTask.h +++ b/src/plugins/pcr/src/import/ImportPrimersFromFolderTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/src/import/ImportPrimersMultiTask.cpp b/src/plugins/pcr/src/import/ImportPrimersMultiTask.cpp index dde78ebd2affd54f2ad1ad1ed636d186ab381d8a..0a6a8ccd17a27f5c4dea51785c9ee7f154298e9d 100644 --- a/src/plugins/pcr/src/import/ImportPrimersMultiTask.cpp +++ b/src/plugins/pcr/src/import/ImportPrimersMultiTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,7 +32,7 @@ ImportPrimersMultiTask::ImportPrimersMultiTask(const QList<Task *> &importSubtas QString ImportPrimersMultiTask::generateReport() const { QString report = "<hr><br>"; - foreach (Task *subtask, getSubtasks()) { + foreach (const QPointer<Task> &subtask, getSubtasks()) { report += subtask->generateReport() + "<br>"; } return report; diff --git a/src/plugins/pcr/src/import/ImportPrimersMultiTask.h b/src/plugins/pcr/src/import/ImportPrimersMultiTask.h index 4ebad878e7957fe65e586b07e429447e4e235f64..f5cfca7c2c479e6fad1f942fbe71d73f2721d05f 100644 --- a/src/plugins/pcr/src/import/ImportPrimersMultiTask.h +++ b/src/plugins/pcr/src/import/ImportPrimersMultiTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/pcr/transl/russian.ts b/src/plugins/pcr/transl/russian.ts index b69b0887a0fb1f4dd491efb8ea11746c807872e7..9900b076e51eb6f4b0181025d208af70c2222196 100644 --- a/src/plugins/pcr/transl/russian.ts +++ b/src/plugins/pcr/transl/russian.ts @@ -298,7 +298,7 @@ <context> <name>U2::ExtractProductWrapperTask</name> <message> - <location filename="../src/ExtractProductTask.cpp" line="265"/> + <location filename="../src/ExtractProductTask.cpp" line="276"/> <source>Extract PCR product and open document</source> <translation>Extract PCR product and open document</translation> </message> @@ -520,7 +520,7 @@ <context> <name>U2::InSilicoPcrProductsTable</name> <message> - <location filename="../src/InSilicoPcrProductsTable.cpp" line="78"/> + <location filename="../src/InSilicoPcrProductsTable.cpp" line="79"/> <source>N/A</source> <translation>N/A</translation> </message> @@ -528,32 +528,32 @@ <context> <name>U2::InSilicoPcrTask</name> <message> - <location filename="../src/InSilicoPcrTask.cpp" line="53"/> + <location filename="../src/InSilicoPcrTask.cpp" line="58"/> <source>In Silico PCR</source> <translation>In Silico PCR</translation> </message> <message> - <location filename="../src/InSilicoPcrTask.cpp" line="107"/> + <location filename="../src/InSilicoPcrTask.cpp" line="128"/> <source>Forward primers found: %1</source> <translation>Forward primers found: %1</translation> </message> <message> - <location filename="../src/InSilicoPcrTask.cpp" line="108"/> + <location filename="../src/InSilicoPcrTask.cpp" line="129"/> <source>Reverse primers found: %1</source> <translation>Reverse primers found: %1</translation> </message> <message> - <location filename="../src/InSilicoPcrTask.cpp" line="198"/> + <location filename="../src/InSilicoPcrTask.cpp" line="252"/> <source>Products found: %1</source> <translation>Products found: %1</translation> </message> <message> - <location filename="../src/InSilicoPcrTask.cpp" line="202"/> + <location filename="../src/InSilicoPcrTask.cpp" line="256"/> <source>Primers details:</source> <translation>Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ праймерах:</translation> </message> <message> - <location filename="../src/InSilicoPcrTask.cpp" line="206"/> + <location filename="../src/InSilicoPcrTask.cpp" line="260"/> <source>Products found: %1. <br><br>The detailed information about primers is not available as primers or sequence contain a character from the Extended DNA alphabet.</source> <translation>Ðайдено продуктов: %1. <br><br>Ð”ÐµÑ‚Ð°Ð»ÑŒÐ½Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ праймерах недоÑтупна так как праймеры или продукты Ñодержат Ñимволы из раÑширенного ДÐК алфавита.</translation> </message> diff --git a/src/plugins/perf_monitor/src/PerfMonitorPlugin.cpp b/src/plugins/perf_monitor/src/PerfMonitorPlugin.cpp index ca8698902497d897167623fbee83d259c28a9660..1ce7005c3de88e3f3cec0e8bca56b433ba8783be 100644 --- a/src/plugins/perf_monitor/src/PerfMonitorPlugin.cpp +++ b/src/plugins/perf_monitor/src/PerfMonitorPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/perf_monitor/src/PerfMonitorPlugin.h b/src/plugins/perf_monitor/src/PerfMonitorPlugin.h index 22162ac4258e38da8f6996e40a0070f45576258a..254421ccaec03d9eb823cc7bb1ed80701dd2f9b6 100644 --- a/src/plugins/perf_monitor/src/PerfMonitorPlugin.h +++ b/src/plugins/perf_monitor/src/PerfMonitorPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/perf_monitor/src/PerfMonitorView.cpp b/src/plugins/perf_monitor/src/PerfMonitorView.cpp index 3bad7b6939b4c1eb378b8081791a65eafa342991..a96e985354c9000c7c05c5f7026cd188008e46e1 100644 --- a/src/plugins/perf_monitor/src/PerfMonitorView.cpp +++ b/src/plugins/perf_monitor/src/PerfMonitorView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/perf_monitor/src/PerfMonitorView.h b/src/plugins/perf_monitor/src/PerfMonitorView.h index a82089c8357b7034ce828b6382f5b8ec573e7b86..0f422f71c688fa503dce018394fadc36958f772a 100644 --- a/src/plugins/perf_monitor/src/PerfMonitorView.h +++ b/src/plugins/perf_monitor/src/PerfMonitorView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QDDocument.cpp b/src/plugins/query_designer/src/QDDocument.cpp index 17a7a4c116c738a09d2894c0bea8924ffdd2d159..bf8cb5c3c1d9b1d52af956ce593738a09db1019d 100644 --- a/src/plugins/query_designer/src/QDDocument.cpp +++ b/src/plugins/query_designer/src/QDDocument.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QDDocument.h b/src/plugins/query_designer/src/QDDocument.h index 341547e8141c8f34b5aeb698721f73d8121a4bc0..dd5425b696bc66fb95676be057a1efdc821fb293 100644 --- a/src/plugins/query_designer/src/QDDocument.h +++ b/src/plugins/query_designer/src/QDDocument.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QDDocumentFormat.cpp b/src/plugins/query_designer/src/QDDocumentFormat.cpp index c263cc9532fdbcf4202436f39098a52cf1c883ae..1993457a19921679667a22bd678453e1cef634e8 100644 --- a/src/plugins/query_designer/src/QDDocumentFormat.cpp +++ b/src/plugins/query_designer/src/QDDocumentFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -43,13 +43,13 @@ GObject* QDGObject::clone(const U2DbiRef& , U2OpStatus& , const QVariantMap &hin return copy; } -const DocumentFormatId QDDocFormat::FORMAT_ID = "QueryDocFormat"; +; //Format ////////////////////////////////////////////////////////////////////////// QDDocFormat::QDDocFormat(QObject* p) -: TextDocumentFormat(p, DocumentFormatFlags_W1, QStringList(QUERY_SCHEME_EXTENSION)), -formatName(tr("Query Schema")) { +: TextDocumentFormat(p, DocumentFormatId("QueryDocFormat"), DocumentFormatFlags_W1, QStringList(QUERY_SCHEME_EXTENSION)) { + formatName = tr("Query Schema"); formatDescription = tr("QDDoc is a format used for creating/editing/storing/retrieving" "query schema with the text file"); supportedObjectTypes += QDGObject::TYPE; @@ -71,6 +71,7 @@ Document* QDDocFormat::loadTextDocument(IOAdapter* io, const U2DbiRef& targetDb, rawData.append(block.data(), blockLen); os.setProgress(io->getProgress()); } + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), NULL); if (checkRawData(rawData).score != FormatDetection_Matched) { os.setError(tr("Invalid header. %1 expected").arg(QDDocument::HEADER_LINE)); diff --git a/src/plugins/query_designer/src/QDDocumentFormat.h b/src/plugins/query_designer/src/QDDocumentFormat.h index c3c8b227bf1683b5cdf859f6ef67a357f90e59c7..539b1a599b63b84766efe5da857d418a51314e08 100644 --- a/src/plugins/query_designer/src/QDDocumentFormat.h +++ b/src/plugins/query_designer/src/QDDocumentFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -40,11 +40,6 @@ class QDDocFormat : public TextDocumentFormat { public: QDDocFormat(QObject* p); - static const DocumentFormatId FORMAT_ID; - virtual DocumentFormatId getFormatId() const {return FORMAT_ID;} - - virtual const QString& getFormatName() const {return formatName;} - virtual Document* createNewLoadedDocument(IOAdapterFactory* io, const GUrl& url, U2OpStatus& os, const QVariantMap& fs = QVariantMap()); virtual void storeDocument( Document* d, IOAdapter* io, U2OpStatus& os); @@ -53,9 +48,6 @@ protected: virtual FormatCheckResult checkRawTextData(const QByteArray& rawData, const GUrl& = GUrl()) const; virtual Document* loadTextDocument(IOAdapter* io, const U2DbiRef& targetDb, const QVariantMap& hints, U2OpStatus& os); - -private: - QString formatName; }; class QueryScene; diff --git a/src/plugins/query_designer/src/QDGroupsEditor.cpp b/src/plugins/query_designer/src/QDGroupsEditor.cpp index b87ea8162be3e69203c39c2d6a485fde72dd7e28..11ddb7bcb0ba147e6ce39e079e1a7c676c86bcf4 100644 --- a/src/plugins/query_designer/src/QDGroupsEditor.cpp +++ b/src/plugins/query_designer/src/QDGroupsEditor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QDGroupsEditor.h b/src/plugins/query_designer/src/QDGroupsEditor.h index 86386a08fa189352468344ac8a4c91a62398769c..482bf61b33d4fa996eb9227c17cbf7a9d3bca9ed 100644 --- a/src/plugins/query_designer/src/QDGroupsEditor.h +++ b/src/plugins/query_designer/src/QDGroupsEditor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QDRunDialog.cpp b/src/plugins/query_designer/src/QDRunDialog.cpp index 4df3515646348b47dfe9ae4d8c39ee4b5172f3ae..45c0f06ee86a78f76ceb30fce67710ca183deffe 100644 --- a/src/plugins/query_designer/src/QDRunDialog.cpp +++ b/src/plugins/query_designer/src/QDRunDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -79,7 +79,7 @@ QDRunDialog::QDRunDialog(QDScheme* _scheme, QWidget* parent, const QString& defa saveController(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22064512"); + new HelpButton(this, buttonBox, "24742256"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Run")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -293,7 +293,7 @@ QList<Task*> QDRunDialogTask::onSubTaskFinished(Task* subTask) { QDDialog::QDDialog(ADVSequenceObjectContext* _ctx) : QDialog(_ctx->getAnnotatedDNAView()->getWidget()), ctx(_ctx), scheme(NULL), txtDoc(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22064513"); + new HelpButton(this, buttonBox, "24742257"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Search")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/query_designer/src/QDRunDialog.h b/src/plugins/query_designer/src/QDRunDialog.h index 4f60f30810b66be1aaa6f20028f85f3740e37976..47679cf31385bd6a9c62505a9b8bfbc62c3af753 100644 --- a/src/plugins/query_designer/src/QDRunDialog.h +++ b/src/plugins/query_designer/src/QDRunDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QDSamples.cpp b/src/plugins/query_designer/src/QDSamples.cpp index b689663fa81bbfb64c735fe6219095efa9fe1bc8..3f5ecd570f328b084aa17504e0350fa262045212 100644 --- a/src/plugins/query_designer/src/QDSamples.cpp +++ b/src/plugins/query_designer/src/QDSamples.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QDSamples.h b/src/plugins/query_designer/src/QDSamples.h index 2893a01f10bcfcb7f56c6946a4ea8d597d12a07c..518a9699abc04c22696686a58c972a1f725e99b3 100644 --- a/src/plugins/query_designer/src/QDSamples.h +++ b/src/plugins/query_designer/src/QDSamples.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QDSceneIOTasks.cpp b/src/plugins/query_designer/src/QDSceneIOTasks.cpp index c7a619a62f4c67ab2ee894aa5caa0de66bd9ae10..41c81d073631f067ebd8d097f181b267722b75cb 100644 --- a/src/plugins/query_designer/src/QDSceneIOTasks.cpp +++ b/src/plugins/query_designer/src/QDSceneIOTasks.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QDSceneIOTasks.h b/src/plugins/query_designer/src/QDSceneIOTasks.h index bd4c91fc9505a2d75b614d4e11abf39ee784d3d9..e12262645ad8e874a7b1c8b6fa8db20630d9a7a3 100644 --- a/src/plugins/query_designer/src/QDSceneIOTasks.h +++ b/src/plugins/query_designer/src/QDSceneIOTasks.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QDTests.cpp b/src/plugins/query_designer/src/QDTests.cpp index de59bf3745255d20890fe50ccbc873c76e74afc9..8dfbc7700c3a970484a92a04488ea3217bd79674 100644 --- a/src/plugins/query_designer/src/QDTests.cpp +++ b/src/plugins/query_designer/src/QDTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QDTests.h b/src/plugins/query_designer/src/QDTests.h index 42d9ab86be0bd02f1b8688c5f14967f445c356e7..cbd438a56060d6ec15fb5ac29afd633b4f169f69 100644 --- a/src/plugins/query_designer/src/QDTests.h +++ b/src/plugins/query_designer/src/QDTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ class QDScheduler; class QDScheme; //cppcheck-suppress noConstructor -class GTest_QDSchedulerTest : public GTest { +class GTest_QDSchedulerTest : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_QDSchedulerTest, "qd_search", TaskFlags_NR_FOSCOE); diff --git a/src/plugins/query_designer/src/QDWorker.cpp b/src/plugins/query_designer/src/QDWorker.cpp index 1e5e6c25455437871090fbfc0a6a208dbc6a8e08..d9088424f778819e5fb842fd4b387071ab051e56 100644 --- a/src/plugins/query_designer/src/QDWorker.cpp +++ b/src/plugins/query_designer/src/QDWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QDWorker.h b/src/plugins/query_designer/src/QDWorker.h index fa8b8a248ac42f3ee74e2b26302d261c259faed7..a933c5ec3a4f5ae3eac899201e1520bce8d35884 100644 --- a/src/plugins/query_designer/src/QDWorker.h +++ b/src/plugins/query_designer/src/QDWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QueryDesignerPlugin.cpp b/src/plugins/query_designer/src/QueryDesignerPlugin.cpp index f126c9a2d232c0cb9300fb35757f509741f7896a..390d9d549b069f83582cb14972f6524c103da87c 100644 --- a/src/plugins/query_designer/src/QueryDesignerPlugin.cpp +++ b/src/plugins/query_designer/src/QueryDesignerPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QueryDesignerPlugin.h b/src/plugins/query_designer/src/QueryDesignerPlugin.h index 33749b3cfa1602987f7f8a8a406dc21f5d0540c1..6a4bca5d2c6137fed82f01b310d2b9b2f98f6705 100644 --- a/src/plugins/query_designer/src/QueryDesignerPlugin.h +++ b/src/plugins/query_designer/src/QueryDesignerPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QueryEditor.cpp b/src/plugins/query_designer/src/QueryEditor.cpp index 0a54ca6f9ce5dd6041f0f32e2993b399d5c07e2e..42ea236460e01de7e56a78e0e13768730109bc00 100644 --- a/src/plugins/query_designer/src/QueryEditor.cpp +++ b/src/plugins/query_designer/src/QueryEditor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QueryEditor.h b/src/plugins/query_designer/src/QueryEditor.h index dde8ccf0b3ba6b2fcfbabab264475afeb31b6a01..be306889af0aff853f5008eacb1345e200d3549d 100644 --- a/src/plugins/query_designer/src/QueryEditor.h +++ b/src/plugins/query_designer/src/QueryEditor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QueryPalette.cpp b/src/plugins/query_designer/src/QueryPalette.cpp index 8d0741e5bc1551f116e4bf0d450e69f2c6dec2da..efb9915c5b55be04b9b2c1320747ad7055f5299a 100644 --- a/src/plugins/query_designer/src/QueryPalette.cpp +++ b/src/plugins/query_designer/src/QueryPalette.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QueryPalette.h b/src/plugins/query_designer/src/QueryPalette.h index bf6303930542b3db57a950cb9e80ef3ec9e00d21..2893b81ea4eb5999fe5343430ea8f340a861e6b1 100644 --- a/src/plugins/query_designer/src/QueryPalette.h +++ b/src/plugins/query_designer/src/QueryPalette.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QueryProcCfgDelegate.h b/src/plugins/query_designer/src/QueryProcCfgDelegate.h index 5718135907d9f54c3123beaf91c23df84515006c..57bc2a084ec341e6166759b20684b8ab6f1971ba 100644 --- a/src/plugins/query_designer/src/QueryProcCfgDelegate.h +++ b/src/plugins/query_designer/src/QueryProcCfgDelegate.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -47,7 +47,7 @@ public: QueryProcCfgDelegate(QueryEditor* parent) : QItemDelegate(parent) {} QWidget* createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const { - QItemDelegate* d = index.model()->data(index, DelegateRole).value<PropertyDelegate*>(); + PropertyDelegate* d = index.model()->data(index, DelegateRole).value<PropertyDelegate*>(); if (d) { connect(d, SIGNAL(commitData(QWidget*)), SIGNAL(commitData(QWidget*))); return d->createEditor(parent, option, index); @@ -56,7 +56,7 @@ public: } void setEditorData(QWidget *editor, const QModelIndex &index) const { - QItemDelegate* d = index.model()->data(index, DelegateRole).value<PropertyDelegate*>(); + PropertyDelegate* d = index.model()->data(index, DelegateRole).value<PropertyDelegate*>(); if (d) { d->setEditorData(editor, index); return; diff --git a/src/plugins/query_designer/src/QueryProcCfgModel.h b/src/plugins/query_designer/src/QueryProcCfgModel.h index d01528be45f8bdc87a6d81ed19002a016377e29b..8d5db3b10e561ccf452b439be2d0ea5260486f12 100644 --- a/src/plugins/query_designer/src/QueryProcCfgModel.h +++ b/src/plugins/query_designer/src/QueryProcCfgModel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -105,7 +105,7 @@ public: case Qt::ToolTipRole: return item->getDocumentation(); case Qt::FontRole: if (item->isRequiredAttribute()) { - QFont fnt; + QFont fnt; fnt.setBold(true); return QVariant(fnt); } diff --git a/src/plugins/query_designer/src/QueryViewAdapter.cpp b/src/plugins/query_designer/src/QueryViewAdapter.cpp index 84c6f8cfd9352fb45ab9d9d32e2e3ee0187f87e4..1c1ed3095ff8518785a5e56ec953ac31fc7cea1f 100644 --- a/src/plugins/query_designer/src/QueryViewAdapter.cpp +++ b/src/plugins/query_designer/src/QueryViewAdapter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QueryViewAdapter.h b/src/plugins/query_designer/src/QueryViewAdapter.h index 14c99bd57a597b0949051effe2b37c2dd0ee121f..371396a3a9f5ec686bb15052c98ef8441618d6a4 100644 --- a/src/plugins/query_designer/src/QueryViewAdapter.h +++ b/src/plugins/query_designer/src/QueryViewAdapter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QueryViewController.cpp b/src/plugins/query_designer/src/QueryViewController.cpp index 31d0a621028b4232c359c9ffa77a1bc107b41310..b9078a2dee7169a02d0841d0ac7d10c3cdf340e8 100644 --- a/src/plugins/query_designer/src/QueryViewController.cpp +++ b/src/plugins/query_designer/src/QueryViewController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -1148,7 +1148,7 @@ AddConstraintDialog::AddConstraintDialog(QueryScene* _scene, QDDistanceType _kin QDElement* defSrc, QDElement* defDst) : scene(_scene), kind(_kind) { setupUi(this); - new HelpButton(this, buttonBox, "22064497"); + new HelpButton(this, buttonBox, "24742241"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/query_designer/src/QueryViewController.h b/src/plugins/query_designer/src/QueryViewController.h index afb4fc5358d02d7de3154cba7ec8304b0623920c..7e30fd443dcadc6d7da39294b749515154126d5e 100644 --- a/src/plugins/query_designer/src/QueryViewController.h +++ b/src/plugins/query_designer/src/QueryViewController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QueryViewItems.cpp b/src/plugins/query_designer/src/QueryViewItems.cpp index d73a9ae4e624921e918e1b2efea6f3a0f9dff812..3453c9cc0b5e62219be2ebf18504e0a57907bfae 100644 --- a/src/plugins/query_designer/src/QueryViewItems.cpp +++ b/src/plugins/query_designer/src/QueryViewItems.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/QueryViewItems.h b/src/plugins/query_designer/src/QueryViewItems.h index 21f0217c40880befb104b91c14c324d1a9eb1db1..ba695446c876e804f909382b6d667e8776578660 100644 --- a/src/plugins/query_designer/src/QueryViewItems.h +++ b/src/plugins/query_designer/src/QueryViewItems.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/library/QDFindActor.cpp b/src/plugins/query_designer/src/library/QDFindActor.cpp index 4c6e6cf1c79f006d226bbc75b7a14a257ead7872..49f20b1ad93761bb5740f5738c780f63914a1ba1 100644 --- a/src/plugins/query_designer/src/library/QDFindActor.cpp +++ b/src/plugins/query_designer/src/library/QDFindActor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/library/QDFindActor.h b/src/plugins/query_designer/src/library/QDFindActor.h index 7e8a86c6f14bceaa18d737ce8e2b84241ee40ac5..2c8e38aefd61fde1d02f89ce2e6e32e715214764 100644 --- a/src/plugins/query_designer/src/library/QDFindActor.h +++ b/src/plugins/query_designer/src/library/QDFindActor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/library/QDFindPolyRegionsActor.cpp b/src/plugins/query_designer/src/library/QDFindPolyRegionsActor.cpp index 43392d6cc7cabe22bbaa50433e651458518f1f7c..c32ad43d8fec7bd3357037d8ac9d2a3957ac714c 100644 --- a/src/plugins/query_designer/src/library/QDFindPolyRegionsActor.cpp +++ b/src/plugins/query_designer/src/library/QDFindPolyRegionsActor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/library/QDFindPolyRegionsActor.h b/src/plugins/query_designer/src/library/QDFindPolyRegionsActor.h index 24ea83539f3bbe80eac613323598481dc6d2a3df..f38552b3e764183571bdb2f3221501ca72085691 100644 --- a/src/plugins/query_designer/src/library/QDFindPolyRegionsActor.h +++ b/src/plugins/query_designer/src/library/QDFindPolyRegionsActor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/library/QDGcContentActor.cpp b/src/plugins/query_designer/src/library/QDGcContentActor.cpp index edac124df7a61fcceb7e42ecbecda66e0c54bb98..42ea16927166e523fcb24a1c971d2aeb3e320b48 100644 --- a/src/plugins/query_designer/src/library/QDGcContentActor.cpp +++ b/src/plugins/query_designer/src/library/QDGcContentActor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/src/library/QDGcContentActor.h b/src/plugins/query_designer/src/library/QDGcContentActor.h index d67d9dd5a3d1e3211c90dd5c8a10e046988190b8..3a48ef26d2e3bf1c7c4a15bd2979c17b17fd89db 100644 --- a/src/plugins/query_designer/src/library/QDGcContentActor.h +++ b/src/plugins/query_designer/src/library/QDGcContentActor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/query_designer/transl/russian.ts b/src/plugins/query_designer/transl/russian.ts index 62abf4dbd2d5f3a8cc140ac101a48343ad651a28..34bbd11f669afb788705589eb6fdd1b579d8b113 100644 --- a/src/plugins/query_designer/transl/russian.ts +++ b/src/plugins/query_designer/transl/russian.ts @@ -395,7 +395,7 @@ p, li { white-space: pre-wrap; } <message> <location filename="../src/QDDocumentFormat.cpp" line="52"/> <location filename="../src/QDDocumentFormat.cpp" line="60"/> - <location filename="../src/QDDocumentFormat.cpp" line="83"/> + <location filename="../src/QDDocumentFormat.cpp" line="84"/> <source>Query Schema</source> <translation>Схема дизайнера запроÑов</translation> </message> @@ -405,7 +405,7 @@ p, li { white-space: pre-wrap; } <translation>QDDoc Ñто формат Ð´Ð»Ñ ÑозданиÑ/редактированиÑ/ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ñхем дизайнера запроÑов в текÑтовый файл</translation> </message> <message> - <location filename="../src/QDDocumentFormat.cpp" line="76"/> + <location filename="../src/QDDocumentFormat.cpp" line="77"/> <source>Invalid header. %1 expected</source> <translation>Ðеправильный заголовок! Должен быть: %1</translation> </message> @@ -835,7 +835,7 @@ p, li { white-space: pre-wrap; } <context> <name>U2::QDViewFactory</name> <message> - <location filename="../src/QDDocumentFormat.cpp" line="131"/> + <location filename="../src/QDDocumentFormat.cpp" line="132"/> <source>Open multiple views</source> <translation>Открыть неÑколько проÑмотров</translation> </message> @@ -843,7 +843,7 @@ p, li { white-space: pre-wrap; } <context> <name>U2::QueryDesignerPlugin</name> <message> - <location filename="../src/QDDocumentFormat.h" line="83"/> + <location filename="../src/QDDocumentFormat.h" line="75"/> <location filename="../src/QueryDesignerPlugin.cpp" line="56"/> <source>Query Designer</source> <translation>Дизайнер запроÑов</translation> diff --git a/src/plugins/remote_blast/src/BlastQuery.cpp b/src/plugins/remote_blast/src/BlastQuery.cpp index 73b1a6cc2c5dd8da00c5fcbd4e4baf0b865d56f7..13b6cc0c4ff7e45bf5bde23d8762b83b1c95fb00 100644 --- a/src/plugins/remote_blast/src/BlastQuery.cpp +++ b/src/plugins/remote_blast/src/BlastQuery.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/remote_blast/src/BlastQuery.h b/src/plugins/remote_blast/src/BlastQuery.h index 4646a8615895be052d118d13d42010702955937a..22146ce0ee09d822314e0839c3b77bdefbf3e0b0 100644 --- a/src/plugins/remote_blast/src/BlastQuery.h +++ b/src/plugins/remote_blast/src/BlastQuery.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/remote_blast/src/DBRequestFactory.h b/src/plugins/remote_blast/src/DBRequestFactory.h index dfa974b13081fc50b338bdcc482fb38c9943d0ab..6a6e5d9119f15482ada4f2f757400dc33ede8f4c 100644 --- a/src/plugins/remote_blast/src/DBRequestFactory.h +++ b/src/plugins/remote_blast/src/DBRequestFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/remote_blast/src/HttpRequest.h b/src/plugins/remote_blast/src/HttpRequest.h index f4273157072efdc4f9d05b2bab3ebbd7ec446854..c107d5ea07b7bf550c7b42570b8202690a74fdd8 100644 --- a/src/plugins/remote_blast/src/HttpRequest.h +++ b/src/plugins/remote_blast/src/HttpRequest.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,6 +23,7 @@ #define _HTTP_REQUEST_H_ #include <QBuffer> +#include <QCoreApplication> #include <QDomDocument> #include <QDomNode> #include <QThread> @@ -50,6 +51,7 @@ struct ResponseBuffer { class HttpRequestBLAST:public HttpRequest { + Q_DECLARE_TR_FUNCTIONS(HttpRequestBLAST) public: HttpRequestBLAST(Task *_task):HttpRequest(_task){} virtual void sendRequest(const QString &program,const QString &query); diff --git a/src/plugins/remote_blast/src/HttpRequestBLAST.cpp b/src/plugins/remote_blast/src/HttpRequestBLAST.cpp index 553018ee6788ad71fbf97995dc5179d0689a0280..1526bb9c961c3a3d2b0a1eef1d3fbb493658e490 100644 --- a/src/plugins/remote_blast/src/HttpRequestBLAST.cpp +++ b/src/plugins/remote_blast/src/HttpRequestBLAST.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,14 +25,13 @@ namespace U2 { -const QString HttpRequestBLAST::host = "http://blast.ncbi.nlm.nih.gov/Blast.cgi?"; +const QString HttpRequestBLAST::host = "https://blast.ncbi.nlm.nih.gov/Blast.cgi?"; QString HttpRequestBLAST::runHttpRequest(QString request){ IOAdapterFactory * iof = AppContext::getIOAdapterRegistry()->getIOAdapterFactoryById(BaseIOAdapters::HTTP_FILE); - IOAdapter * io = iof->createIOAdapter(); + IOAdapter* io = iof->createIOAdapter(); if(!io->open(request, IOAdapterMode_Read)) { - connectionError = true; - error = QObject::tr("Cannot open the IO adapter"); + error = tr("Cannot open the IO adapter"); return ""; } int offs = 0; @@ -48,10 +47,10 @@ QString HttpRequestBLAST::runHttpRequest(QString request){ offs += read; response.resize(offs + read); } while(read == CHUNK_SIZE); + QString error = io->errorString(); io->close(); if(read<0) { - connectionError = true; - error = QObject::tr("Cannot load a page. %1").arg(io->errorString()); + error = tr("Cannot load a page. %1").arg(error); return ""; } response.truncate(offs); @@ -59,31 +58,30 @@ QString HttpRequestBLAST::runHttpRequest(QString request){ return QString(response); } -void HttpRequestBLAST::sendRequest(const QString ¶ms,const QString &query) { +void HttpRequestBLAST::sendRequest(const QString ¶ms, const QString &query) { QString request = host; + request.append(RemoteRequestConfig::HTTP_BODY_SEPARATOR); request.append(params); request.append("&TOOL=ugene&EMAIL=ugene-ncbi-blast@unipro.ru&"); request.append(ReqParams::sequence + "=" + query); taskLog.trace(QString("NCBI BLAST http request: %1").arg(request)); QString response = runHttpRequest(request); - if(response.indexOf("301 Moved Permanently") != -1) { - int start = response.indexOf("href=") + 6; - QString req2 = response.mid(start, response.lastIndexOf(">here</a>")-start - 1); - req2.remove("amp;"); - response = runHttpRequest(req2); + if (response.isEmpty()) { + error = tr("The response is empty"); + return; } ResponseBuffer buf; QByteArray qbResponse(response.toLatin1()); buf.setBuffer(&qbResponse); buf.open(QIODevice::ReadOnly); QByteArray b = buf.readLine(); - while(b!=QString("<!--QBlastInfoBegin\n").toLatin1()) { - if(task->isCanceled()) { + while (!b.startsWith(QString("<!--QBlastInfoBegin\n").toLatin1())) { + if (task->isCanceled()) { return; } b = buf.readLine(); - if(b.indexOf("Error: Failed to read the Blast query: Nucleotide FASTA provided for protein sequence") != -1) { - connectionError = false; + if (b.indexOf("Error: Failed to read the Blast query: Nucleotide FASTA provided for protein sequence") != -1) { + error = tr("Nucleotide FASTA provided for protein sequence"); return; } } @@ -91,8 +89,7 @@ void HttpRequestBLAST::sendRequest(const QString ¶ms,const QString &query) { requestID = requestID.split("=")[1]; requestID = requestID.mid(1,requestID.length()-2); if(requestID=="") { - connectionError = true; - error = QObject::tr("Cannot get the request ID"); + error = tr("Cannot get the request ID"); return; } taskLog.trace(QString("NCBI BLAST Request ID: %1").arg(requestID)); @@ -100,8 +97,7 @@ void HttpRequestBLAST::sendRequest(const QString ¶ms,const QString &query) { bool isOk; int rtoe = roe.toInt(&isOk); if(!isOk) { - connectionError = true; - error = QObject::tr("Cannot get the waiting time"); + error = tr("Cannot get the waiting time"); return; } taskLog.trace(QString("NCBI BLAST Request Time of Execution in seconds: %1").arg(rtoe)); @@ -125,8 +121,7 @@ void HttpRequestBLAST::sendRequest(const QString ¶ms,const QString &query) { } response = runHttpRequest(request); if(response.isEmpty()){ - connectionError = true; - error = QObject::tr("The response is empty"); + error = tr("The response is empty"); return; } if(response.indexOf("301 Moved Permanently") != -1) { @@ -142,13 +137,12 @@ void HttpRequestBLAST::sendRequest(const QString ¶ms,const QString &query) { while(response.indexOf("Status=WAITING")!=-1 && rTask->isTimeOut()); if(response.indexOf("Status=WAITING")!=-1 || response.indexOf("<BlastOutput>")==-1 || response.indexOf("</BlastOutput>")==-1){ - connectionError = true; - error = QObject::tr("Database couldn't prepare the response. You can increase timeout and perform search again."); + error = tr("Database couldn't prepare the response. You can increase timeout and perform search again."); return; } if(response.contains("Error: CPU usage limit was exceeded")) { - error = QObject::tr("CPU usage limit in BLAST was exceeded, probably query sequence is too large"); + error = tr("NCBI BLAST web server returned \"CPU usage limit was exceeded\" error. Probably, the query sequence is too large."); return; } @@ -165,15 +159,13 @@ void HttpRequestBLAST::parseResult(const QByteArray &buf) { QString xmlError; xmlDoc.setContent(buf,false,&xmlError); if(!xmlError.isEmpty()) { - connectionError = true; - error = QObject::tr("Cannot read the response"); + error = tr("Cannot read the response"); return; } QDomNodeList hits = xmlDoc.elementsByTagName("Hit"); for(int i = 0; i<hits.count();i++) { parseHit(hits.at(i)); } - connectionError = false; RemoteBlastHttpRequestTask *rTask = qobject_cast<RemoteBlastHttpRequestTask*>(task); for(int i = rTask->getProgress() ; i < 100 ; i++) { @@ -233,16 +225,14 @@ void HttpRequestBLAST::parseHsp(const QDomNode &xml,const QString &id, const QSt QString fr = elem.text(); from = elem.text().toInt(&isOk); if(!isOk) { - connectionError = true; - error = QObject::tr("Cannot get the location"); + error = tr("Cannot get the location"); return; } elem = xml.lastChildElement("Hsp_query-to"); to = elem.text().toInt(&isOk); if(!isOk) { - connectionError = true; - error = QObject::tr("Cannot get the location"); + error = tr("Cannot get the location"); return; } @@ -259,8 +249,7 @@ void HttpRequestBLAST::parseHsp(const QDomNode &xml,const QString &id, const QSt elem = xml.lastChildElement("Hsp_hit-frame"); int frame = elem.text().toInt(&isOk); if(!isOk) { - connectionError = true; - error = QObject::tr("Cannot get the location"); + error = tr("Cannot get the location"); return; } QString frame_txt = (frame < 0) ? "complement" : "direct"; @@ -270,24 +259,21 @@ void HttpRequestBLAST::parseHsp(const QDomNode &xml,const QString &id, const QSt elem = xml.lastChildElement("Hsp_identity"); identities = elem.text().toInt(&isOk); if(!isOk) { - connectionError = true; - error = QObject::tr("Cannot get the identity"); + error = tr("Cannot get the identity"); return; } elem = xml.lastChildElement("Hsp_gaps"); gaps = elem.text().toInt(&isOk); if(!isOk) { - connectionError = true; - error = QObject::tr("Cannot evaluate the gaps"); + error = tr("Cannot evaluate the gaps"); return; } elem = xml.lastChildElement("Hsp_align-len"); align_len = elem.text().toInt(&isOk); if(!isOk) { - connectionError = true; - error = QObject::tr("Cannot get the alignment length"); + error = tr("Cannot get the alignment length"); return; } @@ -300,8 +286,7 @@ void HttpRequestBLAST::parseHsp(const QDomNode &xml,const QString &id, const QSt ad->setStrand(U2Strand::Complementary); } } else { - connectionError = true; - error = QObject::tr("Cannot evaluate the location"); + error = tr("Cannot evaluate the location"); return; } diff --git a/src/plugins/remote_blast/src/RemoteBLASTConsts.cpp b/src/plugins/remote_blast/src/RemoteBLASTConsts.cpp index a3e9e2de739e8449242eb3435c703187837e29b1..d411fc196624e04dafa48c8f9f79cbe66e1d1a0c 100644 --- a/src/plugins/remote_blast/src/RemoteBLASTConsts.cpp +++ b/src/plugins/remote_blast/src/RemoteBLASTConsts.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/remote_blast/src/RemoteBLASTConsts.h b/src/plugins/remote_blast/src/RemoteBLASTConsts.h index 0c888559bf647f77bbbd7310dffa38673803d1d5..a3227e27d2c4b26a317faf382cf06a3fb798c23d 100644 --- a/src/plugins/remote_blast/src/RemoteBLASTConsts.h +++ b/src/plugins/remote_blast/src/RemoteBLASTConsts.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/remote_blast/src/RemoteBLASTPlugin.cpp b/src/plugins/remote_blast/src/RemoteBLASTPlugin.cpp index 7a7d2066b1d29c6ab553a00afa88be5328f1c54d..f938074f19371112c1f09dfab93a16aaf6b57b94 100644 --- a/src/plugins/remote_blast/src/RemoteBLASTPlugin.cpp +++ b/src/plugins/remote_blast/src/RemoteBLASTPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -103,6 +103,15 @@ void RemoteBLASTViewContext::initViewContext(GObjectView * view) { connect( a, SIGNAL(triggered()), SLOT(sl_showDialog()) ); } +/* + * NCBI blast service provides no details about request size limits. + * See: https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=BlastDocs&DOC_TYPE=DeveloperInfo + * + * But it is safe to expect that any single request should not exceed some meaningful size: normally it is below ~10k. + * We use 1000x bigger size (10M) to 1) keep safety 2) avoid unnecessary limitations for users. + */ +#define MAX_REGION_SIZE_TO_SEARCH_WITH_REMOTE_BLAST (10*1000*1000) + void RemoteBLASTViewContext::sl_showDialog() { QAction* a = (QAction*)sender(); GObjectViewAction* viewAction = qobject_cast<GObjectViewAction*>(a); @@ -125,6 +134,14 @@ void RemoteBLASTViewContext::sl_showDialog() { } else { regions = s->getSelectedRegions(); } + + // First check that the regions are not too large: remote service will not accept gigs of data. + foreach(const U2Region& region, regions) { + if (region.length > MAX_REGION_SIZE_TO_SEARCH_WITH_REMOTE_BLAST) { + QMessageBox::critical(QApplication::activeWindow(), L10N::errorTitle(), tr("Selected region is too large!")); + return; + } + } U2OpStatusImpl os; foreach(const U2Region& r, regions) { QByteArray query = seqCtx->getSequenceData(r, os); diff --git a/src/plugins/remote_blast/src/RemoteBLASTPlugin.h b/src/plugins/remote_blast/src/RemoteBLASTPlugin.h index a935536b88bf7adf4f4dfe3fc80324fb526eea73..7ffe52de8cbd13908f2c666c7f6d9169bb4601f2 100644 --- a/src/plugins/remote_blast/src/RemoteBLASTPlugin.h +++ b/src/plugins/remote_blast/src/RemoteBLASTPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/remote_blast/src/RemoteBLASTPluginTests.cpp b/src/plugins/remote_blast/src/RemoteBLASTPluginTests.cpp index 460f162361125ccf1ac4126338520f83ddde58d8..288755508e1ce9d20a618d584a654cef20df270c 100644 --- a/src/plugins/remote_blast/src/RemoteBLASTPluginTests.cpp +++ b/src/plugins/remote_blast/src/RemoteBLASTPluginTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -234,7 +234,7 @@ Task::ReportResult GTest_RemoteBLAST::report() { if (simple) { if (result.isEmpty()) { - stateInfo.setError(QString("Simplified test retuns empty result")); + stateInfo.setError(QString("Simplified test returns empty result")); } return ReportResult_Finished; } @@ -266,6 +266,8 @@ void GTest_RemoteBLAST::cleanup() { delete ao; ao = NULL; } + + XmlTest::cleanup(); } } diff --git a/src/plugins/remote_blast/src/RemoteBLASTPluginTests.h b/src/plugins/remote_blast/src/RemoteBLASTPluginTests.h index b5665d0b7f822e50e1bc913588510c1b38640597..2023d8b2d01c8227cfa5ac66cbc253b6c5556149 100644 --- a/src/plugins/remote_blast/src/RemoteBLASTPluginTests.h +++ b/src/plugins/remote_blast/src/RemoteBLASTPluginTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ namespace U2 { //cppcheck-suppress noConstructor -class GTest_RemoteBLAST : public GTest { +class GTest_RemoteBLAST : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_RemoteBLAST, "plugin_remote-query"); diff --git a/src/plugins/remote_blast/src/RemoteBLASTTask.cpp b/src/plugins/remote_blast/src/RemoteBLASTTask.cpp index 129eb015c1e7ccc50924d8bcad841221e70c1611..0b0c00e84e90fe7e062f5a9267386ca679db1fda 100644 --- a/src/plugins/remote_blast/src/RemoteBLASTTask.cpp +++ b/src/plugins/remote_blast/src/RemoteBLASTTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -184,20 +184,17 @@ void RemoteBlastHttpRequestTask::prepare() { void RemoteBlastHttpRequestTask::run() { for(int i = 0;i < queries.count();i++) { - bool error = true; if(isCanceled()) { return; } httpRequest[i]->sendRequest(cfg.params,QString(queries[i].seq.data())); - error = httpRequest[i]->connectionError; - if(error) { + if (!httpRequest[i]->getError().isEmpty()) { stateInfo.setError(httpRequest[i]->getError()); return; } - resultList << HttpBlastRequestTaskResult(httpRequest[i], - queries[i]); + resultList << HttpBlastRequestTaskResult(httpRequest[i], queries[i]); } } diff --git a/src/plugins/remote_blast/src/RemoteBLASTTask.h b/src/plugins/remote_blast/src/RemoteBLASTTask.h index 45f03f255710b3662c607fb9701526c6b3cb0a50..c1f5ee977f833a223f60f7194430ce1ee8849401 100644 --- a/src/plugins/remote_blast/src/RemoteBLASTTask.h +++ b/src/plugins/remote_blast/src/RemoteBLASTTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/remote_blast/src/RemoteBLASTWorker.cpp b/src/plugins/remote_blast/src/RemoteBLASTWorker.cpp index 625c192b951e43a56e06e45301bd9795be12b8f4..c08ad970a5a4f62fcad47f91d0e3dcacb2f85faf 100644 --- a/src/plugins/remote_blast/src/RemoteBLASTWorker.cpp +++ b/src/plugins/remote_blast/src/RemoteBLASTWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/remote_blast/src/RemoteBLASTWorker.h b/src/plugins/remote_blast/src/RemoteBLASTWorker.h index 09003b1bba6d3492d48986743b5321a2737154c8..9e216d7ba5e5f82ef4b961629312e3b45791f658 100644 --- a/src/plugins/remote_blast/src/RemoteBLASTWorker.h +++ b/src/plugins/remote_blast/src/RemoteBLASTWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/remote_blast/src/SendSelectionDialog.cpp b/src/plugins/remote_blast/src/SendSelectionDialog.cpp index 4b9ef1895c21006cae7466a5d2c6d7f49c2864db..a619fb3fbce3dae4903ad6cd7ff82d246cb16990 100644 --- a/src/plugins/remote_blast/src/SendSelectionDialog.cpp +++ b/src/plugins/remote_blast/src/SendSelectionDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -141,7 +141,7 @@ SendSelectionDialog::SendSelectionDialog(ADVSequenceObjectContext* seqCtx, bool ca_m.sequenceLen = dnaso->getSequenceLength(); ca_c = new CreateAnnotationWidgetController(ca_m, this); setupUi(this); - new HelpButton(this, buttonBox, "22056018"); + new HelpButton(this, buttonBox, "24742553"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Search")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/remote_blast/src/SendSelectionDialog.h b/src/plugins/remote_blast/src/SendSelectionDialog.h index c8ee10fa4f4c31fd8ea60bdcfc509f7ddd7c0384..bcf319e76a78352e984bef18e6c696942f465dd2 100644 --- a/src/plugins/remote_blast/src/SendSelectionDialog.h +++ b/src/plugins/remote_blast/src/SendSelectionDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/remote_blast/transl/russian.ts b/src/plugins/remote_blast/transl/russian.ts index aae9f9b3cc991b6227d41dba53a574ab443a8bef..b9c449ad4c7c27271d55c5b63f3af6aa2988927c 100644 --- a/src/plugins/remote_blast/transl/russian.ts +++ b/src/plugins/remote_blast/transl/russian.ts @@ -1,74 +1,135 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="ru_RU"> +<context> + <name>HttpRequestBLAST</name> + <message> + <location filename="../src/HttpRequestBLAST.cpp" line="34"/> + <source>Cannot open the IO adapter</source> + <translation type="unfinished">ÐеудалоÑÑŒ открыть адаптер</translation> + </message> + <message> + <location filename="../src/HttpRequestBLAST.cpp" line="53"/> + <source>Cannot load a page. %1</source> + <translation type="unfinished">Ðе удалоÑÑŒ загрузить Ñтраницу. %1</translation> + </message> + <message> + <location filename="../src/HttpRequestBLAST.cpp" line="70"/> + <location filename="../src/HttpRequestBLAST.cpp" line="124"/> + <source>The response is empty</source> + <translation type="unfinished">ПуÑтой ответ</translation> + </message> + <message> + <location filename="../src/HttpRequestBLAST.cpp" line="84"/> + <source>Nucleotide FASTA provided for protein sequence</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/HttpRequestBLAST.cpp" line="92"/> + <source>Cannot get the request ID</source> + <translation type="unfinished">Ðе удалоÑÑŒ получить ID Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка</translation> + </message> + <message> + <location filename="../src/HttpRequestBLAST.cpp" line="100"/> + <source>Cannot get the waiting time</source> + <translation type="unfinished">Ðе удалоÑÑŒ получить Ð²Ñ€ÐµÐ¼Ñ Ð¾Ð¶Ð¸Ð´Ð°Ð½Ð¸Ñ</translation> + </message> + <message> + <location filename="../src/HttpRequestBLAST.cpp" line="140"/> + <source>Database couldn't prepare the response. You can increase timeout and perform search again.</source> + <translation type="unfinished">База данных не готова Ð´Ð»Ñ Ð·Ð°Ð¿Ñ€Ð¾Ñа. Ð’Ñ‹ можете увеличить таймаут и запуÑтить Ñнова.</translation> + </message> + <message> + <location filename="../src/HttpRequestBLAST.cpp" line="145"/> + <source>NCBI BLAST web server returned "CPU usage limit was exceeded" error. Probably, the query sequence is too large.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/HttpRequestBLAST.cpp" line="162"/> + <source>Cannot read the response</source> + <translation type="unfinished">Ðе удалоÑÑŒ прочитать ответ</translation> + </message> + <message> + <location filename="../src/HttpRequestBLAST.cpp" line="228"/> + <location filename="../src/HttpRequestBLAST.cpp" line="235"/> + <location filename="../src/HttpRequestBLAST.cpp" line="252"/> + <source>Cannot get the location</source> + <translation type="unfinished">Ðе удалоÑÑŒ получитьь локацию</translation> + </message> + <message> + <location filename="../src/HttpRequestBLAST.cpp" line="262"/> + <source>Cannot get the identity</source> + <translation type="unfinished">Ðе удалоÑÑŒ получить идентификатор поÑледовательноÑти</translation> + </message> + <message> + <location filename="../src/HttpRequestBLAST.cpp" line="269"/> + <source>Cannot evaluate the gaps</source> + <translation type="unfinished">Ðе удалоÑÑŒ вычиÑлить пробелы</translation> + </message> + <message> + <location filename="../src/HttpRequestBLAST.cpp" line="276"/> + <source>Cannot get the alignment length</source> + <translation type="unfinished">Ðе удалоÑÑŒ получить длину выравниваниÑ</translation> + </message> + <message> + <location filename="../src/HttpRequestBLAST.cpp" line="289"/> + <source>Cannot evaluate the location</source> + <translation type="unfinished">Ðе удалоÑÑŒ вычиÑлить локацию</translation> + </message> +</context> <context> <name>QObject</name> <message> - <location filename="../src/HttpRequestBLAST.cpp" line="35"/> <source>Cannot open the IO adapter</source> - <translation>ÐеудалоÑÑŒ открыть адаптер</translation> + <translation type="vanished">ÐеудалоÑÑŒ открыть адаптер</translation> </message> <message> - <location filename="../src/HttpRequestBLAST.cpp" line="95"/> <source>Cannot get the request ID</source> - <translation>Ðе удалоÑÑŒ получить ID Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка</translation> + <translation type="vanished">Ðе удалоÑÑŒ получить ID Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка</translation> </message> <message> - <location filename="../src/HttpRequestBLAST.cpp" line="104"/> <source>Cannot get the waiting time</source> - <translation>Ðе удалоÑÑŒ получить Ð²Ñ€ÐµÐ¼Ñ Ð¾Ð¶Ð¸Ð´Ð°Ð½Ð¸Ñ</translation> + <translation type="vanished">Ðе удалоÑÑŒ получить Ð²Ñ€ÐµÐ¼Ñ Ð¾Ð¶Ð¸Ð´Ð°Ð½Ð¸Ñ</translation> </message> <message> - <location filename="../src/HttpRequestBLAST.cpp" line="129"/> <source>The response is empty</source> - <translation>ПуÑтой ответ</translation> + <translation type="vanished">ПуÑтой ответ</translation> </message> <message> - <location filename="../src/HttpRequestBLAST.cpp" line="54"/> <source>Cannot load a page. %1</source> - <translation>Ðе удалоÑÑŒ загрузить Ñтраницу. %1</translation> + <translation type="vanished">Ðе удалоÑÑŒ загрузить Ñтраницу. %1</translation> </message> <message> - <location filename="../src/HttpRequestBLAST.cpp" line="146"/> <source>Database couldn't prepare the response. You can increase timeout and perform search again.</source> - <translation>База данных не готова Ð´Ð»Ñ Ð·Ð°Ð¿Ñ€Ð¾Ñа. Ð’Ñ‹ можете увеличить таймаут и запуÑтить Ñнова.</translation> + <translation type="vanished">База данных не готова Ð´Ð»Ñ Ð·Ð°Ð¿Ñ€Ð¾Ñа. Ð’Ñ‹ можете увеличить таймаут и запуÑтить Ñнова.</translation> </message> <message> - <location filename="../src/HttpRequestBLAST.cpp" line="151"/> <source>CPU usage limit in BLAST was exceeded, probably query sequence is too large</source> - <translation>Был превышен предел иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ CPU в BLAST, вероÑтно, поÑледовательноÑÑ‚ÑŒ Ñлишком большаÑ</translation> + <translation type="vanished">Был превышен предел иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ CPU в BLAST, вероÑтно, поÑледовательноÑÑ‚ÑŒ Ñлишком большаÑ</translation> </message> <message> - <location filename="../src/HttpRequestBLAST.cpp" line="169"/> <source>Cannot read the response</source> - <translation>Ðе удалоÑÑŒ прочитать ответ</translation> + <translation type="vanished">Ðе удалоÑÑŒ прочитать ответ</translation> </message> <message> - <location filename="../src/HttpRequestBLAST.cpp" line="237"/> - <location filename="../src/HttpRequestBLAST.cpp" line="245"/> - <location filename="../src/HttpRequestBLAST.cpp" line="263"/> <source>Cannot get the location</source> - <translation>Ðе удалоÑÑŒ получитьь локацию</translation> + <translation type="vanished">Ðе удалоÑÑŒ получитьь локацию</translation> </message> <message> - <location filename="../src/HttpRequestBLAST.cpp" line="274"/> <source>Cannot get the identity</source> - <translation>Ðе удалоÑÑŒ получить идентификатор поÑледовательноÑти</translation> + <translation type="vanished">Ðе удалоÑÑŒ получить идентификатор поÑледовательноÑти</translation> </message> <message> - <location filename="../src/HttpRequestBLAST.cpp" line="282"/> <source>Cannot evaluate the gaps</source> - <translation>Ðе удалоÑÑŒ вычиÑлить пробелы</translation> + <translation type="vanished">Ðе удалоÑÑŒ вычиÑлить пробелы</translation> </message> <message> - <location filename="../src/HttpRequestBLAST.cpp" line="290"/> <source>Cannot get the alignment length</source> - <translation>Ðе удалоÑÑŒ получить длину выравниваниÑ</translation> + <translation type="vanished">Ðе удалоÑÑŒ получить длину выравниваниÑ</translation> </message> <message> - <location filename="../src/HttpRequestBLAST.cpp" line="304"/> <source>Cannot evaluate the location</source> - <translation>Ðе удалоÑÑŒ вычиÑлить локацию</translation> + <translation type="vanished">Ðе удалоÑÑŒ вычиÑлить локацию</translation> </message> <message> <location filename="../src/RemoteBLASTWorker.cpp" line="106"/> @@ -478,22 +539,22 @@ p, li { white-space: pre-wrap; } <context> <name>U2::CheckNCBISequenceCircularityTask</name> <message> - <location filename="../src/RemoteBLASTTask.cpp" line="559"/> + <location filename="../src/RemoteBLASTTask.cpp" line="556"/> <source>Check NCBI sequence circularity</source> <translation>Проверка циркулÑрноÑти NCBI поÑледовательноÑти</translation> </message> <message> - <location filename="../src/RemoteBLASTTask.cpp" line="564"/> + <location filename="../src/RemoteBLASTTask.cpp" line="561"/> <source>ID is empty</source> <translation>ID пуÑÑ‚</translation> </message> <message> - <location filename="../src/RemoteBLASTTask.cpp" line="590"/> + <location filename="../src/RemoteBLASTTask.cpp" line="587"/> <source>Can not check if sequence is circular! Sequence is considered to be linear.</source> <translation>Ðевозможно проверить циркулÑрноÑÑ‚ÑŒ поÑледовательноÑти! ПоÑледовательноÑÑ‚ÑŒ ÑчитаетÑÑ Ð»Ð¸Ð½ÐµÐ¹Ð½Ð¾Ð¹.</translation> </message> <message> - <location filename="../src/RemoteBLASTTask.cpp" line="594"/> + <location filename="../src/RemoteBLASTTask.cpp" line="591"/> <source>Can not remove temporary file.</source> <translation>Ðевозможно удалить временный файл.</translation> </message> @@ -501,33 +562,33 @@ p, li { white-space: pre-wrap; } <context> <name>U2::CreateAnnotationsFromHttpBlastResultTask</name> <message> - <location filename="../src/RemoteBLASTTask.cpp" line="246"/> + <location filename="../src/RemoteBLASTTask.cpp" line="243"/> <source>Create annotations from BLAST results</source> <translation>Создать аннотации из результатов BLAST</translation> </message> <message> - <location filename="../src/RemoteBLASTTask.cpp" line="251"/> + <location filename="../src/RemoteBLASTTask.cpp" line="248"/> <source>HttpBlastResult list is empty</source> <translation>HttpBlastResult list is empty</translation> </message> <message> - <location filename="../src/RemoteBLASTTask.cpp" line="263"/> + <location filename="../src/RemoteBLASTTask.cpp" line="260"/> <source>HttpRequest is NULL!</source> <translation>HttpRequest is NULL!</translation> </message> <message> - <location filename="../src/RemoteBLASTTask.cpp" line="488"/> - <location filename="../src/RemoteBLASTTask.cpp" line="489"/> + <location filename="../src/RemoteBLASTTask.cpp" line="485"/> + <location filename="../src/RemoteBLASTTask.cpp" line="486"/> <source>Wrong number of annotations</source> <translation>Wrong number of annotations</translation> </message> <message> - <location filename="../src/RemoteBLASTTask.cpp" line="545"/> + <location filename="../src/RemoteBLASTTask.cpp" line="542"/> <source>Invalid subtask</source> <translation>Invalid subtask</translation> </message> <message> - <location filename="../src/RemoteBLASTTask.cpp" line="546"/> + <location filename="../src/RemoteBLASTTask.cpp" line="543"/> <source>No corresponding annotations</source> <translation>No corresponding annotations</translation> </message> @@ -712,38 +773,38 @@ p, li { white-space: pre-wrap; } <context> <name>U2::Merge</name> <message> - <location filename="../src/RemoteBLASTTask.cpp" line="637"/> + <location filename="../src/RemoteBLASTTask.cpp" line="634"/> <source>Qualifier %1 not found</source> <translation>Квалификатор %1 не найден</translation> </message> <message> - <location filename="../src/RemoteBLASTTask.cpp" line="638"/> + <location filename="../src/RemoteBLASTTask.cpp" line="635"/> <source>Can not merge %1 qualifiers: values are not the same.</source> <translation>Can not merge %1 qualifiers: values are not the same.</translation> </message> <message> - <location filename="../src/RemoteBLASTTask.cpp" line="645"/> - <location filename="../src/RemoteBLASTTask.cpp" line="651"/> - <location filename="../src/RemoteBLASTTask.cpp" line="675"/> - <location filename="../src/RemoteBLASTTask.cpp" line="681"/> + <location filename="../src/RemoteBLASTTask.cpp" line="642"/> + <location filename="../src/RemoteBLASTTask.cpp" line="648"/> + <location filename="../src/RemoteBLASTTask.cpp" line="672"/> + <location filename="../src/RemoteBLASTTask.cpp" line="678"/> <source>Can not find '%1' qualifier</source> <translation>Can not find '%1' qualifier</translation> </message> <message> - <location filename="../src/RemoteBLASTTask.cpp" line="678"/> - <location filename="../src/RemoteBLASTTask.cpp" line="683"/> - <location filename="../src/RemoteBLASTTask.cpp" line="693"/> - <location filename="../src/RemoteBLASTTask.cpp" line="697"/> + <location filename="../src/RemoteBLASTTask.cpp" line="675"/> + <location filename="../src/RemoteBLASTTask.cpp" line="680"/> + <location filename="../src/RemoteBLASTTask.cpp" line="690"/> + <location filename="../src/RemoteBLASTTask.cpp" line="694"/> <source>Can not convert qualifier value '%1' to double</source> <translation>Can not convert qualifier value '%1' to double</translation> </message> <message> - <location filename="../src/RemoteBLASTTask.cpp" line="690"/> + <location filename="../src/RemoteBLASTTask.cpp" line="687"/> <source>Can not find 'E-value' qualifier</source> <translation>Can not find 'E-value' qualifier</translation> </message> <message> - <location filename="../src/RemoteBLASTTask.cpp" line="701"/> + <location filename="../src/RemoteBLASTTask.cpp" line="698"/> <source>Can not convert qualifier value '%1' to int</source> <translation>Can not convert qualifier value '%1' to int</translation> </message> @@ -864,7 +925,12 @@ p, li { white-space: pre-wrap; } <translation>ПоиÑк в базе данных NCBI Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ BLAST...</translation> </message> <message> - <location filename="../src/RemoteBLASTPlugin.cpp" line="138"/> + <location filename="../src/RemoteBLASTPlugin.cpp" line="141"/> + <source>Selected region is too large!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/RemoteBLASTPlugin.cpp" line="155"/> <source>Sequence objects is NULL</source> <translation>Sequence objects is NULL</translation> </message> diff --git a/src/plugins/repeat_finder/src/FindRepeatsDialog.cpp b/src/plugins/repeat_finder/src/FindRepeatsDialog.cpp index af5d9344ecc823f203a946b38a8e249e52874c0a..7a89360a849c433ebf2fc7c335c170d2c812a17a 100644 --- a/src/plugins/repeat_finder/src/FindRepeatsDialog.cpp +++ b/src/plugins/repeat_finder/src/FindRepeatsDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -27,6 +27,7 @@ #include <U2Core/Annotation.h> #include <U2Core/AnnotationTableObject.h> #include <U2Core/AppContext.h> +#include <U2Core/AppResources.h> #include <U2Core/DNASequenceObject.h> #include <U2Core/DNASequenceSelection.h> #include <U2Core/GenbankFeatures.h> @@ -78,7 +79,7 @@ FindRepeatsDialog::FindRepeatsDialog(ADVSequenceObjectContext* _sc) { sc = _sc; setupUi(this); - new HelpButton(this, buttonBox, "22056022"); + new HelpButton(this, buttonBox, "24742557"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Start")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -227,12 +228,32 @@ bool FindRepeatsDialog::getRegions(QCheckBox* cb, QLineEdit* le, QVector<U2Regio return true; } +// This is maximum sequence size we allow to use on 32bit OS to search for repeats. +#define MAX_REPEAT_SEQUENCE_LENGTH_32_BIT_OS (300 * 1000 * 1000) + void FindRepeatsDialog::accept() { int minLen = minLenBox->value(); int identPerc = identityBox->value(); + qint64 sequenceLen = sc->getSequenceLength(); + + // find repeats algorithm operates with 32 bit values and can't process 64-bit coordinates. + // so we reject sequences that do not fit into 32 bit length range. + if (sequenceLen > INT_MAX) { + QMessageBox::warning(this, L10N::warningTitle(), tr("Sequence size is too large!")); + return; + } + int sequenceLenAsInt = int(sequenceLen); int minDist = minDistCheck->isChecked() ? minDistBox->value() : 0; - int maxDist = maxDistCheck->isChecked() ? maxDistBox->value(): sc->getSequenceLength(); + int maxDist = maxDistCheck->isChecked() ? maxDistBox->value() : sequenceLenAsInt; bool inverted = invertCheck->isChecked(); + + if (AppResourcePool::is32BitBuild()) { + if (sequenceLen > MAX_REPEAT_SEQUENCE_LENGTH_32_BIT_OS) { + QMessageBox::warning(this, L10N::warningTitle(), tr("Sequence size is too large!")); + return; + } + } + bool isRegionOk = false; U2Region range = rs->getRegion(&isRegionOk); if (!isRegionOk){ diff --git a/src/plugins/repeat_finder/src/FindRepeatsDialog.h b/src/plugins/repeat_finder/src/FindRepeatsDialog.h index 779553ae3234d34b60cb07b7c7fbe48abc54ec5f..951471b49728b6e09ede64760ee7d7e057cbcfba 100644 --- a/src/plugins/repeat_finder/src/FindRepeatsDialog.h +++ b/src/plugins/repeat_finder/src/FindRepeatsDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/FindRepeatsTask.cpp b/src/plugins/repeat_finder/src/FindRepeatsTask.cpp index 96de521fef9c7449ffb903af64872eafc0c39f68..3e1d2090635ee7a69c98b91059bb9c19c67db181 100644 --- a/src/plugins/repeat_finder/src/FindRepeatsTask.cpp +++ b/src/plugins/repeat_finder/src/FindRepeatsTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/FindRepeatsTask.h b/src/plugins/repeat_finder/src/FindRepeatsTask.h index bffe3fb6d85d3e52491e08f57f35b07a58f2c268..4857590b40ab07c2754af79404ac19197898a3fb 100644 --- a/src/plugins/repeat_finder/src/FindRepeatsTask.h +++ b/src/plugins/repeat_finder/src/FindRepeatsTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/FindTandemsDialog.cpp b/src/plugins/repeat_finder/src/FindTandemsDialog.cpp index e4f8c0776e1be3cf4237e1ceaea670814d1d5f19..a902d63679cc5815d1075f4364e57681cf58c0f1 100644 --- a/src/plugins/repeat_finder/src/FindTandemsDialog.cpp +++ b/src/plugins/repeat_finder/src/FindTandemsDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -28,6 +28,7 @@ #include <U2Core/AnnotationTableObject.h> #include <U2Core/AppContext.h> +#include <U2Core/AppResources.h> #include <U2Core/DNASequenceObject.h> #include <U2Core/DNASequenceSelection.h> #include <U2Core/GenbankFeatures.h> @@ -64,7 +65,7 @@ FindTandemsDialog::FindTandemsDialog(ADVSequenceObjectContext* _sc) { sc = _sc; setupUi(this); - new HelpButton(this, buttonBox, "22056023"); + new HelpButton(this, buttonBox, "24742558"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Start")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -183,6 +184,9 @@ U2Region FindTandemsDialog::getActiveRange(bool *ok) const { return region; } +// This is maximum sequence size we allow to use on 32bit OS to search for tandem repeats. +#define MAX_TANDEM_REPEAT_SEQUENCE_LENGTH_32_BIT_OS (300 * 1000 * 1000) + void FindTandemsDialog::accept() { int minPeriod = minPeriodBox->value(); int maxPeriod = maxPeriodBox->value(); @@ -199,6 +203,14 @@ void FindTandemsDialog::accept() { return; } + if (AppResourcePool::is32BitBuild()) { + qint64 sequenceLen = sc->getSequenceObject()->getSequenceLength(); + if (sequenceLen > MAX_TANDEM_REPEAT_SEQUENCE_LENGTH_32_BIT_OS) { + QMessageBox::warning(this, L10N::warningTitle(), tr("Sequence size is too large!")); + return; + } + } + U2OpStatusImpl os; DNASequence seq = sc->getSequenceObject()->getSequence(range, os); CHECK_OP_EXT(os, QMessageBox::critical(this, L10N::errorTitle(), os.getError()), ); diff --git a/src/plugins/repeat_finder/src/FindTandemsDialog.h b/src/plugins/repeat_finder/src/FindTandemsDialog.h index be5f9de775f2a36e2b2f02dc1e3469f13f06523e..6102472bf6538dd8a297f38777d82e97fb94fa28 100644 --- a/src/plugins/repeat_finder/src/FindTandemsDialog.h +++ b/src/plugins/repeat_finder/src/FindTandemsDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/RFBase.cpp b/src/plugins/repeat_finder/src/RFBase.cpp index 28bc094104a3a8fa47da9047ba8fbe04f04ef8d9..ca4be359344131bcec0fd1343d2b3acaffd4b79a 100644 --- a/src/plugins/repeat_finder/src/RFBase.cpp +++ b/src/plugins/repeat_finder/src/RFBase.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/RFBase.h b/src/plugins/repeat_finder/src/RFBase.h index 6b9cde6d0c5ff3d9bf484306eabf13d6acdcf3ec..6a2ffc11fab3ade982ae2ff8d23dc29bb4881498 100644 --- a/src/plugins/repeat_finder/src/RFBase.h +++ b/src/plugins/repeat_finder/src/RFBase.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/RFConstants.h b/src/plugins/repeat_finder/src/RFConstants.h index 68ee41e099e8445740f6e2bdcf7a6ae35aedcb15..00f0a17c824e8d449aed11ed8793f79ce83ae400 100644 --- a/src/plugins/repeat_finder/src/RFConstants.h +++ b/src/plugins/repeat_finder/src/RFConstants.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/RFDiagonal.cpp b/src/plugins/repeat_finder/src/RFDiagonal.cpp index 8c4c80196be8158f97cc00eaff193640042c5904..0bfc76da62e75042b216ec67294804d1dc4a5c44 100644 --- a/src/plugins/repeat_finder/src/RFDiagonal.cpp +++ b/src/plugins/repeat_finder/src/RFDiagonal.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/RFDiagonal.h b/src/plugins/repeat_finder/src/RFDiagonal.h index e59a2d22067b5dcfbffa51870876c98dd3928d81..b89d52a4aa6b90e6feca98a2ccbc87ac9db647b4 100644 --- a/src/plugins/repeat_finder/src/RFDiagonal.h +++ b/src/plugins/repeat_finder/src/RFDiagonal.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/RFSArray.cpp b/src/plugins/repeat_finder/src/RFSArray.cpp index e627cebaa60766ca9bd1c7d97aa3f177b18ae134..cc7392292d3a3a6bec1600b8aca6d2481307487e 100644 --- a/src/plugins/repeat_finder/src/RFSArray.cpp +++ b/src/plugins/repeat_finder/src/RFSArray.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/RFSArray.h b/src/plugins/repeat_finder/src/RFSArray.h index 75093a24b03bb1890a15b499829e9d728ef958ed..5f9320e291e2b357dc65e097250ef5aa53394480 100644 --- a/src/plugins/repeat_finder/src/RFSArray.h +++ b/src/plugins/repeat_finder/src/RFSArray.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/RFSArrayWK.cpp b/src/plugins/repeat_finder/src/RFSArrayWK.cpp index 410b9f1cefb002669269d60112dbfb8d175613b3..7d3c63df8614ef158641de116a09ccd7406e3f6c 100644 --- a/src/plugins/repeat_finder/src/RFSArrayWK.cpp +++ b/src/plugins/repeat_finder/src/RFSArrayWK.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/RFSArrayWK.h b/src/plugins/repeat_finder/src/RFSArrayWK.h index ba22de6ebda9bb40a05cae0fe186667fcaec62ce..a821e44f12851b1d2f18ef038bf7b5ff7bed90a9 100644 --- a/src/plugins/repeat_finder/src/RFSArrayWK.h +++ b/src/plugins/repeat_finder/src/RFSArrayWK.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/RFTaskFactory.cpp b/src/plugins/repeat_finder/src/RFTaskFactory.cpp index 575bc25a41735902a25f58f3f3afff5a4f711839..a70bd0ea8bd17f0a870e8c1d9a1ce4d6c9ae6d8c 100644 --- a/src/plugins/repeat_finder/src/RFTaskFactory.cpp +++ b/src/plugins/repeat_finder/src/RFTaskFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/RFTaskFactory.h b/src/plugins/repeat_finder/src/RFTaskFactory.h index 3ddd506641569a65f939f47ab0f47586a2bb2288..e05d65bef84c76e91415a874711220a7fd7f2861 100644 --- a/src/plugins/repeat_finder/src/RFTaskFactory.h +++ b/src/plugins/repeat_finder/src/RFTaskFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/RF_BitMask.h b/src/plugins/repeat_finder/src/RF_BitMask.h index d0747d3e24d672d6fc4b436b2e1402588d3bb18c..61457ac88645fae4d3bad433b6f15723076b6b82 100644 --- a/src/plugins/repeat_finder/src/RF_BitMask.h +++ b/src/plugins/repeat_finder/src/RF_BitMask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/RF_SArray_TandemFinder.cpp b/src/plugins/repeat_finder/src/RF_SArray_TandemFinder.cpp index 6207648056d9cd2243e3d0ee0544d64cdd6bc632..b088fc81a613f64838591e312dce01b5f0f22599 100644 --- a/src/plugins/repeat_finder/src/RF_SArray_TandemFinder.cpp +++ b/src/plugins/repeat_finder/src/RF_SArray_TandemFinder.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/RF_SArray_TandemFinder.h b/src/plugins/repeat_finder/src/RF_SArray_TandemFinder.h index fd43cd5668c41aef860b42986354f791541da3f2..6869b5f0294731efd8f1814972ed254bfc253660 100644 --- a/src/plugins/repeat_finder/src/RF_SArray_TandemFinder.h +++ b/src/plugins/repeat_finder/src/RF_SArray_TandemFinder.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/RF_SuffixArray.cpp b/src/plugins/repeat_finder/src/RF_SuffixArray.cpp index aac4a85302c6099b26039e6e2c5bddc210adbf72..9cf729232c5e62629cf92019f6418651a5b2a66f 100644 --- a/src/plugins/repeat_finder/src/RF_SuffixArray.cpp +++ b/src/plugins/repeat_finder/src/RF_SuffixArray.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/RF_SuffixArray.h b/src/plugins/repeat_finder/src/RF_SuffixArray.h index d1f45f2a4b4239470c843fcb0ac90959cb11a101..c256e834064b300a3cfd357afbcb4ed059bc7cf5 100644 --- a/src/plugins/repeat_finder/src/RF_SuffixArray.h +++ b/src/plugins/repeat_finder/src/RF_SuffixArray.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/RepeatFinderPlugin.cpp b/src/plugins/repeat_finder/src/RepeatFinderPlugin.cpp index c6b5b4e7b97bf3bf6a77285b99b5746f35c6c0fd..ad7bcbdc1710e609b9094921d826d80c22056f3c 100644 --- a/src/plugins/repeat_finder/src/RepeatFinderPlugin.cpp +++ b/src/plugins/repeat_finder/src/RepeatFinderPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/RepeatFinderPlugin.h b/src/plugins/repeat_finder/src/RepeatFinderPlugin.h index 24ee89d84cc7cb1537b78c04b28233371ca8071f..0487922e674b4b34c6bd89a631e5ad62baf5bdf8 100644 --- a/src/plugins/repeat_finder/src/RepeatFinderPlugin.h +++ b/src/plugins/repeat_finder/src/RepeatFinderPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/RepeatFinderTests.cpp b/src/plugins/repeat_finder/src/RepeatFinderTests.cpp index 79d765ca4bb2e2418efa4b46eedf8c543919959c..d7a965c966b3ecca2abce2ea96ad2bb0f3e74bbe 100644 --- a/src/plugins/repeat_finder/src/RepeatFinderTests.cpp +++ b/src/plugins/repeat_finder/src/RepeatFinderTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -256,7 +256,7 @@ void GTest_FindSingleSequenceRepeatsTask::run() { qSort(expectedResults); //check all subtasks - FindRepeatsTask* sub = qobject_cast<FindRepeatsTask*>(getSubtasks()[0]); + FindRepeatsTask* sub = qobject_cast<FindRepeatsTask*>(getSubtasks()[0].data()); QVector<RFResult> calcResults = sub->getResults(); if (expectedResults.size()!=calcResults.size()) { stateInfo.setError(QString("Results count not matched, num = %1, expected = %2, alg = %3") @@ -367,7 +367,7 @@ void GTest_FindTandemRepeatsTask::run() { } //check all subtasks - TandemFinder* sub = qobject_cast<TandemFinder*>(this->getSubtasks()[0]); + TandemFinder* sub = qobject_cast<TandemFinder*>(this->getSubtasks()[0].data()); QList<Tandem> calcResults = sub->getResults(); if (expectedResults.size()!=calcResults.size()) { QString results("First results are:\n"); @@ -516,7 +516,7 @@ void GTest_FindRealTandemRepeatsTask::run() { qSort(expectedResults); //check all subtasks - TandemFinder* sub = qobject_cast<TandemFinder*>(this->getSubtasks()[0]); + TandemFinder* sub = qobject_cast<TandemFinder*>(this->getSubtasks()[0].data()); QList<Tandem> calcResults = sub->getResults(); QMutableListIterator<Tandem> cIt(calcResults); QMutableListIterator<Tandem> eIt(expectedResults); @@ -597,6 +597,8 @@ void GTest_SArrayBasedFindTask::init(XMLTestFormat *tf, const QDomElement& el) { void GTest_SArrayBasedFindTask::cleanup() { wholeSeq = QByteArray(); + + XmlTest::cleanup(); } void GTest_SArrayBasedFindTask::prepare() { diff --git a/src/plugins/repeat_finder/src/RepeatFinderTests.h b/src/plugins/repeat_finder/src/RepeatFinderTests.h index 1cc97f339b1ba9a7394bffaaf1e67b9c4041f89a..5a5acb9e221cbfe2ef687378d9ea5b9fa21426f8 100644 --- a/src/plugins/repeat_finder/src/RepeatFinderTests.h +++ b/src/plugins/repeat_finder/src/RepeatFinderTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -44,7 +44,7 @@ namespace U2 { class FindRepeatsTask; class TandemFinder; -class GTest_FindSingleSequenceRepeatsTask : public GTest { +class GTest_FindSingleSequenceRepeatsTask : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_FindSingleSequenceRepeatsTask, "find-repeats", TaskFlags_FOSCOE); @@ -70,7 +70,7 @@ public: }; -class GTest_FindTandemRepeatsTask : public GTest { +class GTest_FindTandemRepeatsTask : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_FindTandemRepeatsTask, "find-tandems", TaskFlags_FOSCOE); @@ -95,7 +95,7 @@ public: }; -class GTest_FindRealTandemRepeatsTask : public GTest { +class GTest_FindRealTandemRepeatsTask : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_FindRealTandemRepeatsTask, "find-tandems-real", TaskFlags_FOSCOE); @@ -123,7 +123,7 @@ public: class SArrayIndex; class SArrayBasedFindTask; -class GTest_SArrayBasedFindTask : public GTest { +class GTest_SArrayBasedFindTask : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_SArrayBasedFindTask, "sarray-based-find", TaskFlags_FOSCOE); diff --git a/src/plugins/repeat_finder/src/RepeatQuery.cpp b/src/plugins/repeat_finder/src/RepeatQuery.cpp index dba699fc940af373617b0e7a5b6b39cc7fe28e54..f0a1558a299c7ba253cf52376175c8eea7480cab 100644 --- a/src/plugins/repeat_finder/src/RepeatQuery.cpp +++ b/src/plugins/repeat_finder/src/RepeatQuery.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,17 +19,16 @@ * MA 02110-1301, USA. */ -#include "RepeatQuery.h" -#include "FindRepeatsDialog.h" - +#include <U2Core/FailTask.h> #include <U2Core/L10n.h> -#include <U2Core/DNASequenceObject.h> #include <U2Core/TaskSignalMapper.h> -#include "U2Core/FailTask.h" - -#include <U2Lang/QDConstraint.h> -#include <U2Lang/BaseTypes.h> #include <U2Designer/DelegateEditors.h> +#include <U2Lang/BaseTypes.h> +#include <U2Lang/QDConstraint.h> + +#include "FindRepeatsDialog.h" +#include "RepeatQuery.h" +#include "RepeatWorker.h" namespace U2 { @@ -299,7 +298,7 @@ QDRepeatActorPrototype::QDRepeatActorPrototype() { Descriptor mld(MAX_LEN_ATTR, QDRepeatActor::tr("Max length"), QDRepeatActor::tr("Maximum length of repeats.")); Descriptor tan(TANMEDS_ATTR, QDRepeatActor::tr("Exclude tandems"), QDRepeatActor::tr("Exclude tandems areas before find repeat task is run.")); - FindRepeatsTaskSettings stngs = FindRepeatsDialog::defaultSettings(); + FindRepeatsTaskSettings stngs = LocalWorkflow::RepeatWorkerFactory::defaultSettings(); attributes << new Attribute(ld, BaseTypes::NUM_TYPE(), true, stngs.minLen); attributes << new Attribute(idd, BaseTypes::NUM_TYPE(), false, stngs.getIdentity()); @@ -312,16 +311,29 @@ QDRepeatActorPrototype::QDRepeatActorPrototype() { QMap<QString, PropertyDelegate*> delegates; { - QVariantMap m; m["minimum"] = 2; m["maximum"] = INT_MAX; m["suffix"] = L10N::suffixBp(); + QVariantMap m; + m["minimum"] = 2; + m["maximum"] = INT_MAX; + m["suffix"] = L10N::suffixBp(); delegates[LEN_ATTR] = new SpinBoxDelegate(m); + } + { + QVariantMap m; + m["minimum"] = 0; + m["maximum"] = INT_MAX; + m["suffix"] = L10N::suffixBp(); delegates[MAX_LEN_ATTR] = new SpinBoxDelegate(m); } { - QVariantMap m; m["minimum"] = 50; m["maximum"] = 100; m["suffix"] = "%"; + QVariantMap m; + m["minimum"] = 50; + m["maximum"] = 100; + m["suffix"] = "%"; delegates[IDENTITY_ATTR] = new SpinBoxDelegate(m); } { - QVariantMap m; m["specialValueText"] = "Auto"; + QVariantMap m; + m["specialValueText"] = "Auto"; delegates[THREADS_ATTR] = new SpinBoxDelegate(m); } { diff --git a/src/plugins/repeat_finder/src/RepeatQuery.h b/src/plugins/repeat_finder/src/RepeatQuery.h index 28317f7c6e25aeb9471f9ba5dfeb9c08648f4783..ad06580c238e048da4323a2c409bf472ddc94a14 100644 --- a/src/plugins/repeat_finder/src/RepeatQuery.h +++ b/src/plugins/repeat_finder/src/RepeatQuery.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/RepeatWorker.cpp b/src/plugins/repeat_finder/src/RepeatWorker.cpp index 67b8fe36854dcff7f7fad54ef9344480f83f508a..f2657102840fd32f6c0d034586d05d9d56f73e72 100644 --- a/src/plugins/repeat_finder/src/RepeatWorker.cpp +++ b/src/plugins/repeat_finder/src/RepeatWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,17 +19,11 @@ * MA 02110-1301, USA. */ -#include <U2Core/AppContext.h> -#include <U2Core/DNAAlphabet.h> -#include <U2Core/DNASequence.h> -#include <U2Core/DNASequenceObject.h> #include <U2Core/DNATranslation.h> #include <U2Core/FailTask.h> -#include <U2Core/GObjectReference.h> #include <U2Core/L10n.h> #include <U2Core/Log.h> #include <U2Core/U2OpStatusUtils.h> -#include <U2Core/U2SafePoints.h> #include <U2Designer/DelegateEditors.h> @@ -38,11 +32,8 @@ #include <U2Lang/BasePorts.h> #include <U2Lang/BaseSlots.h> #include <U2Lang/BaseTypes.h> -#include <U2Lang/CoreLibConstants.h> -#include <U2Lang/IntegralBusModel.h> #include <U2Lang/WorkflowEnv.h> -#include "FindRepeatsDialog.h" #include "RepeatWorker.h" namespace U2 { @@ -66,8 +57,21 @@ static const QString USE_MIN_DISTANCE_ATTR("use-mindistance"); const QString RepeatWorkerFactory::ACTOR_ID("repeats-search"); +FindRepeatsTaskSettings RepeatWorkerFactory::defaultSettings() { + FindRepeatsTaskSettings res; + res.minLen = 5; + res.setIdentity(100); + res.minDist = 0; + res.maxDist = 5000; + res.inverted = false; + res.excludeTandems = false; + res.filter = DisjointRepeats; + return res; +} + void RepeatWorkerFactory::init() { - QList<PortDescriptor*> p; QList<Attribute*> a; + QList<PortDescriptor*> p; + QList<Attribute*> a; { Descriptor id(BasePorts::IN_SEQ_PORT_ID(), RepeatWorker::tr("Input sequences"), @@ -93,41 +97,32 @@ void RepeatWorkerFactory::init() { Descriptor thd(THREADS_ATTR, RepeatWorker::tr("Parallel threads"), RepeatWorker::tr("Number of parallel threads used for the task.")); Descriptor tan(TANMEDS_ATTR, RepeatWorker::tr("Exclude tandems"), RepeatWorker::tr("Exclude tandems areas before find repeat task is run.")); Descriptor umaxd(USE_MAX_DISTANCE_ATTR, RepeatWorker::tr("Apply 'Max distance' attribute"), RepeatWorker::tr("Apply 'Max distance' attribute.")); - Descriptor umind(USE_MIN_DISTANCE_ATTR, RepeatWorker::tr("Apply 'Min distance' attribute"), RepeatWorker::tr("Apply 'Max distance' attribute.")); + Descriptor umind(USE_MIN_DISTANCE_ATTR, RepeatWorker::tr("Apply 'Min distance' attribute"), RepeatWorker::tr("Apply 'Min distance' attribute.")); - FindRepeatsTaskSettings cfg = FindRepeatsDialog::defaultSettings(); + FindRepeatsTaskSettings cfg = RepeatWorkerFactory::defaultSettings(); Attribute *aa; a << new Attribute(nd, BaseTypes::STRING_TYPE(), true, "repeat_unit"); - aa = new Attribute(ld, BaseTypes::NUM_TYPE(), false); - aa->setAttributeValue(cfg.minLen); + aa = new Attribute(ld, BaseTypes::NUM_TYPE(), false, cfg.minLen); a << aa; - aa = new Attribute(idd, BaseTypes::NUM_TYPE(), false); - aa->setAttributeValue(cfg.getIdentity()); + aa = new Attribute(idd, BaseTypes::NUM_TYPE(), false, cfg.getIdentity()); a << aa; a << new Attribute(umind, BaseTypes::BOOL_TYPE(), false, true); - aa = new Attribute(mid, BaseTypes::NUM_TYPE(), false); - aa->setAttributeValue(cfg.minDist); + aa = new Attribute(mid, BaseTypes::NUM_TYPE(), false, cfg.minDist); aa->addRelation(new VisibilityRelation(USE_MIN_DISTANCE_ATTR, true)); a << aa; a << new Attribute(umaxd, BaseTypes::BOOL_TYPE(), false, true); - aa = new Attribute(mad, BaseTypes::NUM_TYPE(), false); - aa->setAttributeValue(cfg.maxDist); + aa = new Attribute(mad, BaseTypes::NUM_TYPE(), false, cfg.maxDist); aa->addRelation(new VisibilityRelation(USE_MAX_DISTANCE_ATTR, true)); a << aa; - aa = new Attribute(ind, BaseTypes::BOOL_TYPE(), false); - aa->setAttributeValue(cfg.inverted); + aa = new Attribute(ind, BaseTypes::BOOL_TYPE(), false, cfg.inverted); a << aa; - aa = new Attribute(nsd, BaseTypes::NUM_TYPE(), false); - aa->setAttributeValue(cfg.filter); + aa = new Attribute(nsd, BaseTypes::NUM_TYPE(), false, cfg.filter); a << aa; - aa = new Attribute(ald, BaseTypes::NUM_TYPE(), false); - aa->setAttributeValue(cfg.algo); + aa = new Attribute(ald, BaseTypes::NUM_TYPE(), false, cfg.algo); a << aa; - aa = new Attribute(thd, BaseTypes::NUM_TYPE(), false); - aa->setAttributeValue(cfg.nThreads); + aa = new Attribute(thd, BaseTypes::NUM_TYPE(), false, cfg.nThreads); a << aa; - aa = new Attribute(tan, BaseTypes::BOOL_TYPE(), false); - aa->setAttributeValue(cfg.excludeTandems); + aa = new Attribute(tan, BaseTypes::BOOL_TYPE(), false, cfg.excludeTandems); a << aa; } @@ -138,36 +133,47 @@ void RepeatWorkerFactory::init() { QMap<QString, PropertyDelegate*> delegates; delegates[USE_MIN_DISTANCE_ATTR] = new ComboBoxWithBoolsDelegate(); delegates[USE_MAX_DISTANCE_ATTR] = new ComboBoxWithBoolsDelegate(); - { - QVariantMap m; m["minimum"] = 0; m["maximum"] = INT_MAX; m["suffix"] = L10N::suffixBp(); - delegates[MIN_DIST_ATTR] = new SpinBoxDelegate(m); - m["specialValueText"] = RepeatWorker::tr("Any"); - delegates[MAX_DIST_ATTR] = new SpinBoxDelegate(m); - m["minimum"] = 2; - delegates[LEN_ATTR] = new SpinBoxDelegate(m); - } - { - QVariantMap m; m["minimum"] = 50; m["maximum"] = 100; m["suffix"] = "%"; - delegates[IDENTITY_ATTR] = new SpinBoxDelegate(m); - } - { - QVariantMap m; m["specialValueText"] = "Auto"; - delegates[THREADS_ATTR] = new SpinBoxDelegate(m); - } - { - QVariantMap m; - m["Auto"] = RFAlgorithm_Auto; - m["Diagonals"] = RFAlgorithm_Diagonal; - m["Suffix index"] = RFAlgorithm_Suffix; - delegates[ALGO_ATTR] = new ComboBoxDelegate(m); - } - { - QVariantMap m; - m["Disjoint repeats"] = DisjointRepeats; - m["No filtering"] = NoFiltering; - m["Unique repeats"] = UniqueRepeats; - delegates[NESTED_ATTR] = new ComboBoxDelegate(m); - } + + QVariantMap minDistProperties; + minDistProperties["minimum"] = 0; + minDistProperties["maximum"] = INT_MAX; + minDistProperties["suffix"] = L10N::suffixBp(); + delegates[MIN_DIST_ATTR] = new SpinBoxDelegate(minDistProperties); + + QVariantMap maxDistProperties; + maxDistProperties["minimum"] = 0; + maxDistProperties["maximum"] = INT_MAX; + maxDistProperties["suffix"] = L10N::suffixBp(); + delegates[MAX_DIST_ATTR] = new SpinBoxDelegate(maxDistProperties); + + QVariantMap lengthProperties; + lengthProperties["minimum"] = 2; + lengthProperties["maximum"] = INT_MAX; + lengthProperties["suffix"] = L10N::suffixBp(); + lengthProperties["specialValueText"] = RepeatWorker::tr("Any"); + delegates[LEN_ATTR] = new SpinBoxDelegate(lengthProperties); + + QVariantMap identityProperties; + identityProperties["minimum"] = 50; + identityProperties["maximum"] = 100; + identityProperties["suffix"] = "%"; + delegates[IDENTITY_ATTR] = new SpinBoxDelegate(identityProperties); + + QVariantMap threadProperties; + threadProperties["specialValueText"] = "Auto"; + delegates[THREADS_ATTR] = new SpinBoxDelegate(threadProperties); + + QVariantMap algoProperties; + algoProperties["Auto"] = RFAlgorithm_Auto; + algoProperties["Diagonals"] = RFAlgorithm_Diagonal; + algoProperties["Suffix index"] = RFAlgorithm_Suffix; + delegates[ALGO_ATTR] = new ComboBoxDelegate(algoProperties); + + QVariantMap nestedProperties; + nestedProperties["Disjoint repeats"] = DisjointRepeats; + nestedProperties["No filtering"] = NoFiltering; + nestedProperties["Unique repeats"] = UniqueRepeats; + delegates[NESTED_ATTR] = new ComboBoxDelegate(nestedProperties); proto->setPrompter(new RepeatPrompter()); proto->setEditor(new DelegateEditor(delegates)); diff --git a/src/plugins/repeat_finder/src/RepeatWorker.h b/src/plugins/repeat_finder/src/RepeatWorker.h index 2aa60cc207925e0ecf142c338053ffee818452be..afe3ad56aa28116bc4226924d1848d83c948d6c0 100644 --- a/src/plugins/repeat_finder/src/RepeatWorker.h +++ b/src/plugins/repeat_finder/src/RepeatWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,6 +24,7 @@ #include <U2Lang/LocalDomain.h> #include <U2Lang/WorkflowUtils.h> + #include "FindRepeatsTask.h" namespace U2 { @@ -64,6 +65,8 @@ class RepeatWorkerFactory : public DomainFactory { public: static const QString ACTOR_ID; static void init(); + static FindRepeatsTaskSettings defaultSettings(); + RepeatWorkerFactory() : DomainFactory(ACTOR_ID) {} virtual Worker* createWorker(Actor* a) {return new RepeatWorker(a);} }; diff --git a/src/plugins/repeat_finder/src/TandemQuery.cpp b/src/plugins/repeat_finder/src/TandemQuery.cpp index cd0afafce7b6e6ddf8aba0b05084bef822ccd8cf..a7143cf08f8c9aae20279c97fbef6880a1b54000 100644 --- a/src/plugins/repeat_finder/src/TandemQuery.cpp +++ b/src/plugins/repeat_finder/src/TandemQuery.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/src/TandemQuery.h b/src/plugins/repeat_finder/src/TandemQuery.h index d3fc9646a98ca7dde6d21f36a2fd9374a9938c1b..72112bf1c7ec3a579a6fec3368b67d539719bb94 100644 --- a/src/plugins/repeat_finder/src/TandemQuery.h +++ b/src/plugins/repeat_finder/src/TandemQuery.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/repeat_finder/transl/russian.ts b/src/plugins/repeat_finder/transl/russian.ts index d2db460dd4fdf51ea7aaf07c5c8bcab913618edd..a208a7802a578379e688e3289c296377ef6b529f 100644 --- a/src/plugins/repeat_finder/transl/russian.ts +++ b/src/plugins/repeat_finder/transl/russian.ts @@ -267,88 +267,94 @@ <context> <name>U2::FindRepeatsDialog</name> <message> - <location filename="../src/FindRepeatsDialog.cpp" line="83"/> + <location filename="../src/FindRepeatsDialog.cpp" line="84"/> <source>Start</source> <translation>ПоиÑк</translation> </message> <message> - <location filename="../src/FindRepeatsDialog.cpp" line="84"/> + <location filename="../src/FindRepeatsDialog.cpp" line="85"/> <source>Cancel</source> <translation>Отмена</translation> </message> <message> - <location filename="../src/FindRepeatsDialog.cpp" line="103"/> + <location filename="../src/FindRepeatsDialog.cpp" line="104"/> <source>Auto</source> <translation>Ðвтовыбор</translation> </message> <message> - <location filename="../src/FindRepeatsDialog.cpp" line="104"/> + <location filename="../src/FindRepeatsDialog.cpp" line="105"/> <source>Suffix index</source> <translation>СуффикÑный индекÑ</translation> </message> <message> - <location filename="../src/FindRepeatsDialog.cpp" line="105"/> + <location filename="../src/FindRepeatsDialog.cpp" line="106"/> <source>Diagonals</source> <translation>Диагональный</translation> </message> <message> - <location filename="../src/FindRepeatsDialog.cpp" line="107"/> + <location filename="../src/FindRepeatsDialog.cpp" line="108"/> <source>Disjoint repeats</source> <translation>ÐепереÑекающиеÑÑ Ð¿Ð¾Ð²Ñ‚Ð¾Ñ€Ñ‹</translation> </message> <message> - <location filename="../src/FindRepeatsDialog.cpp" line="108"/> + <location filename="../src/FindRepeatsDialog.cpp" line="109"/> <source>No filtering</source> <translation>Без фильтрации</translation> </message> <message> - <location filename="../src/FindRepeatsDialog.cpp" line="109"/> + <location filename="../src/FindRepeatsDialog.cpp" line="110"/> <source>Unique repeats</source> <translation>Уникальные повторы</translation> </message> <message> - <location filename="../src/FindRepeatsDialog.cpp" line="280"/> - <location filename="../src/FindRepeatsDialog.cpp" line="287"/> + <location filename="../src/FindRepeatsDialog.cpp" line="242"/> + <location filename="../src/FindRepeatsDialog.cpp" line="252"/> + <source>Sequence size is too large!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/FindRepeatsDialog.cpp" line="301"/> + <location filename="../src/FindRepeatsDialog.cpp" line="308"/> <source>Error</source> <translation>Проблема</translation> </message> <message> - <location filename="../src/FindRepeatsDialog.cpp" line="224"/> + <location filename="../src/FindRepeatsDialog.cpp" line="225"/> <source>No annotations found: %1</source> <translation>Ðннотации не найдены: %1</translation> </message> <message> - <location filename="../src/FindRepeatsDialog.cpp" line="280"/> + <location filename="../src/FindRepeatsDialog.cpp" line="301"/> <source>Not enough memory error ocurred while preparing data. Try to set smaller region.</source> <translation>ÐедоÑтаточно памÑти, возникла ошибка в процеÑÑе подготовки данных. Попробуйте указать меньший регион.</translation> </message> <message> - <location filename="../src/FindRepeatsDialog.cpp" line="287"/> + <location filename="../src/FindRepeatsDialog.cpp" line="308"/> <source>Cannot create an annotation object. Please check settings</source> <translation>Ðевозможно Ñоздать аннотацию. Проверьте наÑтройки</translation> </message> <message> - <location filename="../src/FindRepeatsDialog.cpp" line="295"/> + <location filename="../src/FindRepeatsDialog.cpp" line="316"/> <source>Warning</source> <translation>Предупреждение</translation> </message> <message> - <location filename="../src/FindRepeatsDialog.cpp" line="296"/> + <location filename="../src/FindRepeatsDialog.cpp" line="317"/> <source>Search with given identity %1% and length more then 80m bps can take very long time. Approximate repeat searching time for 80m bp with 95% identity is 40 minutes on Intel Core 2 Quad Q9500. Do you want to continue?</source> <translation>ПоиÑк Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð½Ð¾Ð¹ ÑхожеÑтью %1% и длиной более 80m bps может занÑÑ‚ÑŒ длительное времÑ. Примерное Ð²Ñ€ÐµÐ¼Ñ Ð¿Ð¾Ð¸Ñка Ð´Ð»Ñ 80m bp Ñ 95% ÑхожеÑтью занимает 40 минут на Intel Core 2 Quad Q9500. Хотите продолжить?</translation> </message> <message> - <location filename="../src/FindRepeatsDialog.cpp" line="305"/> + <location filename="../src/FindRepeatsDialog.cpp" line="326"/> <source>A problem occurred during finding repeats. The sequence is no more available.</source> <translation>A problem occurred during finding repeats. The sequence is no more available.</translation> </message> <message> - <location filename="../src/FindRepeatsDialog.cpp" line="384"/> + <location filename="../src/FindRepeatsDialog.cpp" line="405"/> <source>Estimated repeats count: %1</source> <translation>Оценка возможного кол-ва результатов: %1</translation> </message> <message> - <location filename="../src/FindRepeatsDialog.cpp" line="385"/> + <location filename="../src/FindRepeatsDialog.cpp" line="406"/> <source>Estimated repeats count hint is based on the active settings and random sequence model</source> <translation>Оценка оÑнована на текущих параметрах поиÑка и модели Ñлучайной поÑледовательноÑти</translation> </message> @@ -412,47 +418,47 @@ <context> <name>U2::FindTandemsDialog</name> <message> - <location filename="../src/FindTandemsDialog.cpp" line="68"/> + <location filename="../src/FindTandemsDialog.cpp" line="69"/> <source>Start</source> <translation>ИÑкать</translation> </message> <message> - <location filename="../src/FindTandemsDialog.cpp" line="69"/> + <location filename="../src/FindTandemsDialog.cpp" line="70"/> <source>Cancel</source> <translation>Отменить</translation> </message> <message> - <location filename="../src/FindTandemsDialog.cpp" line="88"/> + <location filename="../src/FindTandemsDialog.cpp" line="89"/> <source>Suffix array</source> <translation>СуффикÑный маÑÑив</translation> </message> <message> - <location filename="../src/FindTandemsDialog.cpp" line="89"/> + <location filename="../src/FindTandemsDialog.cpp" line="90"/> <source>Suffix array (optimized)</source> <translation>СуффикÑный маÑÑив (оптимизированный)</translation> </message> <message> - <location filename="../src/FindTandemsDialog.cpp" line="92"/> + <location filename="../src/FindTandemsDialog.cpp" line="93"/> <source>All</source> <translation>Ð’Ñе</translation> </message> <message> - <location filename="../src/FindTandemsDialog.cpp" line="93"/> + <location filename="../src/FindTandemsDialog.cpp" line="94"/> <source>Micro-satellites</source> <translation>Микро-Ñателлиты</translation> </message> <message> - <location filename="../src/FindTandemsDialog.cpp" line="94"/> + <location filename="../src/FindTandemsDialog.cpp" line="95"/> <source>Mini-satellites</source> <translation>Мини-Ñателлиты</translation> </message> <message> - <location filename="../src/FindTandemsDialog.cpp" line="95"/> + <location filename="../src/FindTandemsDialog.cpp" line="96"/> <source>Big-period tandems</source> <translation>Танемы Ñ Ð±Ð¾Ð»ÑŒÑˆÐ¸Ð¼ периодом</translation> </message> <message> - <location filename="../src/FindTandemsDialog.cpp" line="96"/> + <location filename="../src/FindTandemsDialog.cpp" line="97"/> <source>Custom</source> <translation>ОÑобые</translation> </message> @@ -461,17 +467,22 @@ <translation type="obsolete">Проблема</translation> </message> <message> - <location filename="../src/FindTandemsDialog.cpp" line="175"/> + <location filename="../src/FindTandemsDialog.cpp" line="176"/> <source>No annotations found: %1</source> <translation>Ðннотации не найдены: %1</translation> </message> <message> - <location filename="../src/FindTandemsDialog.cpp" line="206"/> + <location filename="../src/FindTandemsDialog.cpp" line="209"/> + <source>Sequence size is too large!</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/FindTandemsDialog.cpp" line="218"/> <source>Not enough memory error ocurred while preparing data. Try to set smaller region.</source> <translation>ÐедоÑтаточно памÑти, возникла ошибка в процеÑÑе подготовки данных. Попробуйте указать меньший регион.</translation> </message> <message> - <location filename="../src/FindTandemsDialog.cpp" line="211"/> + <location filename="../src/FindTandemsDialog.cpp" line="223"/> <source>Cannot create an annotation object. Please check settings</source> <translation>Ðевозможно Ñоздать аннотацию. Проверьте наÑтройки</translation> </message> @@ -501,27 +512,27 @@ <context> <name>U2::LocalWorkflow::RepeatPrompter</name> <message> - <location filename="../src/RepeatWorker.cpp" line="187"/> + <location filename="../src/RepeatWorker.cpp" line="193"/> <source>unset</source> <translation>не указан</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="188"/> + <location filename="../src/RepeatWorker.cpp" line="194"/> <source> from <u>%1</u></source> <translation> из <u>%1</u></translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="192"/> + <location filename="../src/RepeatWorker.cpp" line="198"/> <source>inverted</source> <translation>инвертированные</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="192"/> + <location filename="../src/RepeatWorker.cpp" line="198"/> <source>direct</source> <translation>прÑмые</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="194"/> + <location filename="../src/RepeatWorker.cpp" line="200"/> <source>For each sequence%1, find <u>%2</u> repeats.<br>Detect <u>%3% identical</u> repeats <u>not shorter than %4 bps</u>.<br>Output the list of found regions annotated as <u>%5</u>.</source> <translation>Ð”Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð¹ поÑледовательноÑти<u>%1</u>, иÑкать <u>%2</u> повторы.<br>Учитывать <u>%3% идентичные</u> повторы <u>не короче %4 нк</u>.<br>Выдать ÑпиÑок найденных регионов аннотированных как <u>%5</u>.</translation> </message> @@ -529,180 +540,184 @@ <context> <name>U2::LocalWorkflow::RepeatWorker</name> <message> - <location filename="../src/RepeatWorker.cpp" line="73"/> + <location filename="../src/RepeatWorker.cpp" line="77"/> <source>Input sequences</source> <translation>Входные поÑледовательноÑти</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="74"/> + <location filename="../src/RepeatWorker.cpp" line="78"/> <source>A nucleotide sequence to search repeats in.</source> <translation>Входные нуклеотидные поÑледовательноÑти Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка повторов.</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="75"/> + <location filename="../src/RepeatWorker.cpp" line="79"/> <source>Repeat annotations</source> <translation>Ðннотированные повторы</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="76"/> + <location filename="../src/RepeatWorker.cpp" line="80"/> <source>A set of annotations marking repeats found in the sequence.</source> <translation>СпиÑок аннотаций маркирующих найденные повторы.</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="85"/> + <location filename="../src/RepeatWorker.cpp" line="89"/> <source>Annotate as</source> <translation>Ðннотации</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="85"/> + <location filename="../src/RepeatWorker.cpp" line="89"/> <source>Name of the result annotations marking found repeats.</source> <translation>Ð˜Ð¼Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ð¸ Ð´Ð»Ñ Ñ€Ð°Ð·Ð¼ÐµÑ‚ÐºÐ¸ найденных повторов.</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="86"/> + <location filename="../src/RepeatWorker.cpp" line="90"/> <source>Identity</source> <translation>ИдентичноÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="86"/> + <location filename="../src/RepeatWorker.cpp" line="90"/> <source>Repeats identity.</source> <translation>ИдентичноÑÑ‚ÑŒ повторов.</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="87"/> + <location filename="../src/RepeatWorker.cpp" line="91"/> <source>Min length</source> <translation>Мин длина</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="87"/> + <location filename="../src/RepeatWorker.cpp" line="91"/> <source>Minimum length of repeats.</source> <translation>Мин длина повторов.</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="88"/> + <location filename="../src/RepeatWorker.cpp" line="92"/> <source>Min distance</source> <translation>Мин диÑтанциÑ</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="88"/> + <location filename="../src/RepeatWorker.cpp" line="92"/> <source>Minimum distance between repeats.</source> <translation>Мин диÑÑ‚Ð°Ð½Ñ†Ð¸Ñ Ð¼ÐµÐ¶Ð´Ñƒ повторами.</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="89"/> + <location filename="../src/RepeatWorker.cpp" line="93"/> <source>Max distance</source> <translation>ÐœÐ°ÐºÑ Ð´Ð¸ÑтанциÑ</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="89"/> + <location filename="../src/RepeatWorker.cpp" line="93"/> <source>Maximum distance between repeats.</source> <translation>ÐœÐ°ÐºÑ Ð´Ð¸ÑÑ‚Ð°Ð½Ñ†Ð¸Ñ Ð¼ÐµÐ¶Ð´Ñƒ повторами.</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="90"/> + <location filename="../src/RepeatWorker.cpp" line="94"/> <source>Inverted</source> <translation>Инвертированные</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="90"/> + <location filename="../src/RepeatWorker.cpp" line="94"/> <source>Search for inverted repeats.</source> <translation>ИÑкать инвертированные повторы.</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="91"/> + <location filename="../src/RepeatWorker.cpp" line="95"/> <source>Filter algorithm</source> <translation>Ðлгоритм фильтрации</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="91"/> + <location filename="../src/RepeatWorker.cpp" line="95"/> <source>Filter repeats algorithm.</source> <translation>Ðлгоритм фильтрации повторов.</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="92"/> + <location filename="../src/RepeatWorker.cpp" line="96"/> <source>Algorithm</source> <translation>Ðлгоритм</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="92"/> + <location filename="../src/RepeatWorker.cpp" line="96"/> <source>Control over variations of algorithm.</source> <translation>Выбор алгоритма.</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="93"/> + <location filename="../src/RepeatWorker.cpp" line="97"/> <source>Parallel threads</source> <translation>Параллельные потоки</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="93"/> + <location filename="../src/RepeatWorker.cpp" line="97"/> <source>Number of parallel threads used for the task.</source> <translation>Кол-во параллельных потоков Ð´Ð»Ñ Ð·Ð°Ð´Ð°Ñ‡Ð¸.</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="94"/> + <location filename="../src/RepeatWorker.cpp" line="98"/> <source>Exclude tandems</source> <translation>ИÑключить тандемы</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="94"/> + <location filename="../src/RepeatWorker.cpp" line="98"/> <source>Exclude tandems areas before find repeat task is run.</source> <translation>ИÑключить тандемные облаÑти до поиÑка повторов.</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="95"/> + <location filename="../src/RepeatWorker.cpp" line="99"/> <source>Apply 'Max distance' attribute</source> <translation>Применить опцию 'ÐœÐ°ÐºÑ Ð´Ð¸ÑтанциÑ'</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="95"/> - <location filename="../src/RepeatWorker.cpp" line="96"/> + <location filename="../src/RepeatWorker.cpp" line="99"/> <source>Apply 'Max distance' attribute.</source> <translation>Применить опцию 'ÐœÐ°ÐºÑ Ð´Ð¸ÑтанциÑ'.</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="96"/> + <location filename="../src/RepeatWorker.cpp" line="100"/> <source>Apply 'Min distance' attribute</source> <translation>Применить опцию 'ÐœÐ°ÐºÑ Ð´Ð¸ÑтанциÑ'</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="134"/> + <location filename="../src/RepeatWorker.cpp" line="100"/> + <source>Apply 'Min distance' attribute.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/RepeatWorker.cpp" line="129"/> <source>Find Repeats</source> <translation>ПоиÑк повторов</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="135"/> + <location filename="../src/RepeatWorker.cpp" line="130"/> <source>Finds repeats in each supplied sequence, stores found regions as annotations.</source> <translation>Ищет повторы в нуклеотидных поÑледовательноÑÑ‚ÑÑ…, выдаёт найденные регионы как аннотации.</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="144"/> + <location filename="../src/RepeatWorker.cpp" line="153"/> <source>Any</source> <translation>Ðе ограничивать</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="245"/> + <location filename="../src/RepeatWorker.cpp" line="251"/> <source>result name is empty, default name used</source> <translation>Ð¸Ð¼Ñ Ñ€ÐµÐ·ÑƒÐ»ÑŒÑ‚Ð°Ñ‚Ð° пуÑто, иÑпользовано Ð¸Ð¼Ñ Ð¿Ð¾ умолчанию</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="248"/> - <location filename="../src/RepeatWorker.cpp" line="249"/> + <location filename="../src/RepeatWorker.cpp" line="254"/> + <location filename="../src/RepeatWorker.cpp" line="255"/> <source>Incorrect value: identity value must be between 0 and 100</source> <translation>Ðекорректное значение: значение ÑхожеÑти должно быть от 0 до 100</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="262"/> - <location filename="../src/RepeatWorker.cpp" line="263"/> + <location filename="../src/RepeatWorker.cpp" line="268"/> + <location filename="../src/RepeatWorker.cpp" line="269"/> <source>Incorrect value: minimal distance must be greater then zero</source> <translation>Ðекорректное значение: минимальноге значение должно быть больше нулÑ</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="267"/> + <location filename="../src/RepeatWorker.cpp" line="273"/> <source>Sequence alphabet is not nucleic!</source> <translation>Ðлфавит поÑледовательноÑти не ÑвлÑетÑÑ Ð½ÑƒÐºÐ»ÐµÐ¾Ñ‚Ð¸Ð´Ð½Ñ‹Ð¼!</translation> </message> <message> - <location filename="../src/RepeatWorker.cpp" line="290"/> + <location filename="../src/RepeatWorker.cpp" line="296"/> <source>Found %1 repeats</source> <translation>Ðайдено повторов: %1</translation> </message> @@ -710,117 +725,117 @@ <context> <name>U2::QDRepeatActor</name> <message> - <location filename="../src/RepeatQuery.cpp" line="203"/> + <location filename="../src/RepeatQuery.cpp" line="202"/> <source>inverted</source> <translation>инвертированные</translation> </message> <message> - <location filename="../src/RepeatQuery.cpp" line="203"/> + <location filename="../src/RepeatQuery.cpp" line="202"/> <source>direct</source> <translation>прÑмые</translation> </message> <message> - <location filename="../src/RepeatQuery.cpp" line="213"/> + <location filename="../src/RepeatQuery.cpp" line="212"/> <source>Finds <u>%1</u> repeats.<br>Detects <u>%2 identical</u> repeats <u>not shorter than %3 bps</u>.</source> <translation>ИÑкать <u>%1</u> повторы.<br>Учитывать <u>%2 идентичные</u> повторы <u>не короче %3 нк</u>.</translation> </message> <message> - <location filename="../src/RepeatQuery.cpp" line="243"/> + <location filename="../src/RepeatQuery.cpp" line="242"/> <source>Sequence should be nucleic</source> <translation>ПоÑледовательноÑÑ‚ÑŒ должна быть нуклеотидной</translation> </message> <message> - <location filename="../src/RepeatQuery.cpp" line="246"/> + <location filename="../src/RepeatQuery.cpp" line="245"/> <source>RepeatQDTask</source> <translation>RepeatQDTask</translation> </message> <message> - <location filename="../src/RepeatQuery.cpp" line="290"/> + <location filename="../src/RepeatQuery.cpp" line="289"/> <source>Repeats</source> <translation>Повторы</translation> </message> <message> - <location filename="../src/RepeatQuery.cpp" line="291"/> + <location filename="../src/RepeatQuery.cpp" line="290"/> <source>Finds repeats in supplied sequence, stores found regions as annotations.</source> <translation> Ищет повторы в нуклеотидных поÑледовательноÑÑ‚ÑÑ…, выдаёт найденные регионы как аннотации.</translation> </message> <message> - <location filename="../src/RepeatQuery.cpp" line="293"/> + <location filename="../src/RepeatQuery.cpp" line="292"/> <source>Identity</source> <translation>ИдентичноÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/RepeatQuery.cpp" line="293"/> + <location filename="../src/RepeatQuery.cpp" line="292"/> <source>Repeats identity.</source> <translation>ИдентичноÑÑ‚ÑŒ повторов.</translation> </message> <message> - <location filename="../src/RepeatQuery.cpp" line="294"/> + <location filename="../src/RepeatQuery.cpp" line="293"/> <source>Min length</source> <translation>Мин длина</translation> </message> <message> - <location filename="../src/RepeatQuery.cpp" line="294"/> + <location filename="../src/RepeatQuery.cpp" line="293"/> <source>Minimum length of repeats.</source> <translation>Мин длина повторов.</translation> </message> <message> - <location filename="../src/RepeatQuery.cpp" line="295"/> + <location filename="../src/RepeatQuery.cpp" line="294"/> <source>Inverted</source> <translation>Инвертированные</translation> </message> <message> - <location filename="../src/RepeatQuery.cpp" line="295"/> + <location filename="../src/RepeatQuery.cpp" line="294"/> <source>Search for inverted repeats.</source> <translation>ИÑкать инвертированные повторы.</translation> </message> <message> - <location filename="../src/RepeatQuery.cpp" line="296"/> + <location filename="../src/RepeatQuery.cpp" line="295"/> <source>Filter algorithm</source> <translation>Ðлгоритм фильтрации</translation> </message> <message> - <location filename="../src/RepeatQuery.cpp" line="296"/> + <location filename="../src/RepeatQuery.cpp" line="295"/> <source>Filter nested repeats algorithm.</source> <translation>Ðлгоритм иÑÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ð²Ð»Ð¾Ð¶ÐµÐ½Ð½Ñ‹Ñ… повторов.</translation> </message> <message> - <location filename="../src/RepeatQuery.cpp" line="297"/> + <location filename="../src/RepeatQuery.cpp" line="296"/> <source>Algorithm</source> <translation>Ðлгоритм</translation> </message> <message> - <location filename="../src/RepeatQuery.cpp" line="297"/> + <location filename="../src/RepeatQuery.cpp" line="296"/> <source>Control over variations of algorithm.</source> <translation>Выбор алгоритма.</translation> </message> <message> - <location filename="../src/RepeatQuery.cpp" line="298"/> + <location filename="../src/RepeatQuery.cpp" line="297"/> <source>Parallel threads</source> <translation>Параллельные потоки</translation> </message> <message> - <location filename="../src/RepeatQuery.cpp" line="298"/> + <location filename="../src/RepeatQuery.cpp" line="297"/> <source>Number of parallel threads used for the task.</source> <translation>Кол-во параллельных потоков Ð´Ð»Ñ Ð·Ð°Ð´Ð°Ñ‡Ð¸.</translation> </message> <message> - <location filename="../src/RepeatQuery.cpp" line="299"/> + <location filename="../src/RepeatQuery.cpp" line="298"/> <source>Max length</source> <translation>ÐœÐ°ÐºÑ Ð´Ð»Ð¸Ð½Ð°</translation> </message> <message> - <location filename="../src/RepeatQuery.cpp" line="299"/> + <location filename="../src/RepeatQuery.cpp" line="298"/> <source>Maximum length of repeats.</source> <translation>МакÑ. длина повторов.</translation> </message> <message> - <location filename="../src/RepeatQuery.cpp" line="300"/> + <location filename="../src/RepeatQuery.cpp" line="299"/> <source>Exclude tandems</source> <translation>ИÑключить тандемы</translation> </message> <message> - <location filename="../src/RepeatQuery.cpp" line="300"/> + <location filename="../src/RepeatQuery.cpp" line="299"/> <source>Exclude tandems areas before find repeat task is run.</source> <translation>ИÑключить тандемные облаÑти до поиÑка повторов.</translation> </message> diff --git a/src/plugins/smith_waterman/smith_waterman.pri b/src/plugins/smith_waterman/smith_waterman.pri index f6e505d9d7c947cbd9842656952cda2e991d7c88..b655cadada276e3f13aba1aabe18b8076f634d1e 100644 --- a/src/plugins/smith_waterman/smith_waterman.pri +++ b/src/plugins/smith_waterman/smith_waterman.pri @@ -9,6 +9,8 @@ include( ../../ugene_plugin_common.pri ) INCLUDEPATH += ../../corelibs/U2View/_tmp +win32-msvc2015 : DEFINES+=LAME_MSC + #adding SSE2 gcc compiler flag if building on SSE2 capable CPU use_sse2() { diff --git a/src/plugins/smith_waterman/src/PairAlignSequences.cpp b/src/plugins/smith_waterman/src/PairAlignSequences.cpp index 0d36a540d0facc70e40fa25847c97b51743baf31..3c1f310df894f242704ddcc6e6828be05fb7d518 100644 --- a/src/plugins/smith_waterman/src/PairAlignSequences.cpp +++ b/src/plugins/smith_waterman/src/PairAlignSequences.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/smith_waterman/src/PairAlignSequences.h b/src/plugins/smith_waterman/src/PairAlignSequences.h index c8731359c1af012749ae53a9c8af9a2c9141eaa6..3cba57a59049e7750e7b1b5d3aba2e6b358061fd 100644 --- a/src/plugins/smith_waterman/src/PairAlignSequences.h +++ b/src/plugins/smith_waterman/src/PairAlignSequences.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/smith_waterman/src/PairwiseAlignmentSmithWatermanGUIExtension.cpp b/src/plugins/smith_waterman/src/PairwiseAlignmentSmithWatermanGUIExtension.cpp index b18b5466e3770aa30a8f48d97c2004a1f8fcfcc1..70ea1ca90d8e8a7e76e45892574aa679efa45691 100644 --- a/src/plugins/smith_waterman/src/PairwiseAlignmentSmithWatermanGUIExtension.cpp +++ b/src/plugins/smith_waterman/src/PairwiseAlignmentSmithWatermanGUIExtension.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/smith_waterman/src/PairwiseAlignmentSmithWatermanGUIExtension.h b/src/plugins/smith_waterman/src/PairwiseAlignmentSmithWatermanGUIExtension.h index 248af20837aeec1aae0f6e1e9a41060c6bd7cec0..bdf1aad7429b3886afca17c7f7182a44ce263b6e 100644 --- a/src/plugins/smith_waterman/src/PairwiseAlignmentSmithWatermanGUIExtension.h +++ b/src/plugins/smith_waterman/src/PairwiseAlignmentSmithWatermanGUIExtension.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/smith_waterman/src/SWAlgorithmPlugin.cpp b/src/plugins/smith_waterman/src/SWAlgorithmPlugin.cpp index a34f5e0cdf6c002d5c1e0363c7bffc85be8ab1e0..ff6a4857be4d9efbfc4785ac9cb112dd01bde411 100644 --- a/src/plugins/smith_waterman/src/SWAlgorithmPlugin.cpp +++ b/src/plugins/smith_waterman/src/SWAlgorithmPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/smith_waterman/src/SWAlgorithmPlugin.h b/src/plugins/smith_waterman/src/SWAlgorithmPlugin.h index 7d083a86a41797c23de1fe7692a87e78617e0017..41ae70a41302def7ebc0de86801249f2ca396fd0 100644 --- a/src/plugins/smith_waterman/src/SWAlgorithmPlugin.h +++ b/src/plugins/smith_waterman/src/SWAlgorithmPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/smith_waterman/src/SWAlgorithmTask.cpp b/src/plugins/smith_waterman/src/SWAlgorithmTask.cpp index 4e222074b6815e72f70beced9e96d8bc64456081..44dbece6db9420a590e1bd27dcf1c4f6c951ff58 100644 --- a/src/plugins/smith_waterman/src/SWAlgorithmTask.cpp +++ b/src/plugins/smith_waterman/src/SWAlgorithmTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/smith_waterman/src/SWAlgorithmTask.h b/src/plugins/smith_waterman/src/SWAlgorithmTask.h index a4f81cfc14a37d0a45d19188a2d9111b47404f62..528c30a787b366d897eede68fec3bf4887e0145c 100644 --- a/src/plugins/smith_waterman/src/SWAlgorithmTask.h +++ b/src/plugins/smith_waterman/src/SWAlgorithmTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/smith_waterman/src/SWQuery.cpp b/src/plugins/smith_waterman/src/SWQuery.cpp index 6693d41de3ecd764e7b9412be8b6dd29ef7bf52b..e07fabf6c531d57c5e5f23edf57983708da907b4 100644 --- a/src/plugins/smith_waterman/src/SWQuery.cpp +++ b/src/plugins/smith_waterman/src/SWQuery.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/smith_waterman/src/SWQuery.h b/src/plugins/smith_waterman/src/SWQuery.h index 8519fb434daa9105ad107385f68fb0693d7dfdee..df347ee1cb98f8ee1bd0e3c84b5fee02c5ca76c1 100644 --- a/src/plugins/smith_waterman/src/SWQuery.h +++ b/src/plugins/smith_waterman/src/SWQuery.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/smith_waterman/src/SWTaskFactory.cpp b/src/plugins/smith_waterman/src/SWTaskFactory.cpp index ee783f46a45f90fc03f5fb751c795adaaadbf26d..8cb28c14d1bbd282c54bd690997c7fd07c7cefe9 100644 --- a/src/plugins/smith_waterman/src/SWTaskFactory.cpp +++ b/src/plugins/smith_waterman/src/SWTaskFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/smith_waterman/src/SWTaskFactory.h b/src/plugins/smith_waterman/src/SWTaskFactory.h index 04e8e09cc4084cf03989bb4670324320558e040a..32c0306b3dd03a9a7c31ac916fdd687d8074cdf1 100644 --- a/src/plugins/smith_waterman/src/SWTaskFactory.h +++ b/src/plugins/smith_waterman/src/SWTaskFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/smith_waterman/src/SWWorker.cpp b/src/plugins/smith_waterman/src/SWWorker.cpp index b2446a61a333f2d893c31a446c4e07f1af79e91a..ea62f6086e0abb9e5670873abef353d9c61096f8 100644 --- a/src/plugins/smith_waterman/src/SWWorker.cpp +++ b/src/plugins/smith_waterman/src/SWWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -180,7 +180,7 @@ void SWWorkerFactory::init() { a << new Attribute(mxd, BaseTypes::STRING_TYPE(), true, QString("Auto")); a << new Attribute(ald, BaseTypes::STRING_TYPE(), true); - a << new Attribute(frd, BaseTypes::STRING_TYPE(), false, filterLst.isEmpty() ? QString() : filterLst.first()); + a << new Attribute(frd, BaseTypes::STRING_TYPE(), false, filterLst.isEmpty() ? QString() : AppContext::getSWResultFilterRegistry()->getDefaultFilterId()); a << new Attribute(scd, BaseTypes::NUM_TYPE(), false, 90); a << new Attribute(BaseAttributes::STRAND_ATTRIBUTE(), BaseTypes::STRING_TYPE(), false, BaseAttributes::STRAND_BOTH()); a << new Attribute(amd, BaseTypes::BOOL_TYPE(), false, false); diff --git a/src/plugins/smith_waterman/src/SWWorker.h b/src/plugins/smith_waterman/src/SWWorker.h index 8b3206404725d3f768387379fec1a773d96b558b..8c692e8fa4f80bfc1d55a6d2e0a7bcc8aa915966 100644 --- a/src/plugins/smith_waterman/src/SWWorker.h +++ b/src/plugins/smith_waterman/src/SWWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/smith_waterman/src/SmithWatermanAlgorithm.cpp b/src/plugins/smith_waterman/src/SmithWatermanAlgorithm.cpp index aaf4baf3941766583478aa2eb6347f363b4cf43d..5b22a4444306730dc814d8ce54a672456c55cb69 100644 --- a/src/plugins/smith_waterman/src/SmithWatermanAlgorithm.cpp +++ b/src/plugins/smith_waterman/src/SmithWatermanAlgorithm.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/smith_waterman/src/SmithWatermanAlgorithm.h b/src/plugins/smith_waterman/src/SmithWatermanAlgorithm.h index d494b80fbe4d70bbdc0725d999b3c1befec3240d..45ac4ebef87132ca6f23d07480b5a7d5cada7db4 100644 --- a/src/plugins/smith_waterman/src/SmithWatermanAlgorithm.h +++ b/src/plugins/smith_waterman/src/SmithWatermanAlgorithm.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/smith_waterman/src/SmithWatermanAlgorithmCUDA.cpp b/src/plugins/smith_waterman/src/SmithWatermanAlgorithmCUDA.cpp index 86323cc6732c88d488c728ca281e623d0a525b0d..88cfe6e100325ce751bd65d562a33e1d8e42f5fb 100644 --- a/src/plugins/smith_waterman/src/SmithWatermanAlgorithmCUDA.cpp +++ b/src/plugins/smith_waterman/src/SmithWatermanAlgorithmCUDA.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/smith_waterman/src/SmithWatermanAlgorithmCUDA.h b/src/plugins/smith_waterman/src/SmithWatermanAlgorithmCUDA.h index fc196f2e77343b3b420cbaa2bcdf526d78d6d04b..78242f9d173cf675db2db46dba42648593279b4a 100644 --- a/src/plugins/smith_waterman/src/SmithWatermanAlgorithmCUDA.h +++ b/src/plugins/smith_waterman/src/SmithWatermanAlgorithmCUDA.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/smith_waterman/src/SmithWatermanAlgorithmOPENCL.cpp b/src/plugins/smith_waterman/src/SmithWatermanAlgorithmOPENCL.cpp index ca383af96f6e0d4d26eaecd6170c872d1bdddbf7..e0c94421985768d9288011168e6a54457d1e1f99 100644 --- a/src/plugins/smith_waterman/src/SmithWatermanAlgorithmOPENCL.cpp +++ b/src/plugins/smith_waterman/src/SmithWatermanAlgorithmOPENCL.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/smith_waterman/src/SmithWatermanAlgorithmOPENCL.h b/src/plugins/smith_waterman/src/SmithWatermanAlgorithmOPENCL.h index f8e1d519996d6c087fffe3efbf5503a0beb3cd07..7ddfc6ea4af257d977c6ddcd57df0df17be2d4b6 100644 --- a/src/plugins/smith_waterman/src/SmithWatermanAlgorithmOPENCL.h +++ b/src/plugins/smith_waterman/src/SmithWatermanAlgorithmOPENCL.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/smith_waterman/src/SmithWatermanAlgorithmSSE2.cpp b/src/plugins/smith_waterman/src/SmithWatermanAlgorithmSSE2.cpp index 06fd69e43693913602cc472e35b79733cf3f08ff..18b2f3ebe804f6b417406ad7f02b34b2c22e5611 100644 --- a/src/plugins/smith_waterman/src/SmithWatermanAlgorithmSSE2.cpp +++ b/src/plugins/smith_waterman/src/SmithWatermanAlgorithmSSE2.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -35,7 +35,7 @@ extern "C" { // http://sourceforge.net/p/predef/wiki/Compilers/ #ifdef _MSC_VER -#if _MSC_VER <= 1900 && UGENE_X86_64 +#if UGENE_X86_64 #define LAME_MSC #endif #endif diff --git a/src/plugins/smith_waterman/src/SmithWatermanAlgorithmSSE2.h b/src/plugins/smith_waterman/src/SmithWatermanAlgorithmSSE2.h index 0cc6a84cda39a089e99653fd83fc33c4d6f24888..6d3a497a643cf0caf91fb0241dccbf3a1ddc385a 100644 --- a/src/plugins/smith_waterman/src/SmithWatermanAlgorithmSSE2.h +++ b/src/plugins/smith_waterman/src/SmithWatermanAlgorithmSSE2.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/smith_waterman/src/SmithWatermanTests.cpp b/src/plugins/smith_waterman/src/SmithWatermanTests.cpp index 6a16274b8460bbc42d934c83fce4b6b75b48d87e..0e898d2550c66f973e692e4d040da89c0151e85a 100644 --- a/src/plugins/smith_waterman/src/SmithWatermanTests.cpp +++ b/src/plugins/smith_waterman/src/SmithWatermanTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -288,7 +288,9 @@ Task::ReportResult GTest_SmithWatermnan::report() { if (expectedRes.size() != resultList.size()) { - stateInfo.setError(QString("Not expected result: count result not coincide")); + stateInfo.setError(QString("Not expected result: count result not coincide, expected: %1, current: %2") + .arg(expectedRes.size()) + .arg(resultList.size())); return ReportResult_Finished; } diff --git a/src/plugins/smith_waterman/src/SmithWatermanTests.h b/src/plugins/smith_waterman/src/SmithWatermanTests.h index b3003eb5323eedc0a9cb71f2623ea32071fab1cd..4e9692bb0b5ac081eefab2e3456dd8e8ad0880c7 100644 --- a/src/plugins/smith_waterman/src/SmithWatermanTests.h +++ b/src/plugins/smith_waterman/src/SmithWatermanTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -41,7 +41,7 @@ struct SWresult{ int score; }; -class GTest_SmithWatermnan : public GTest { +class GTest_SmithWatermnan : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_SmithWatermnan, "plugin_sw-algorithm"); @@ -75,7 +75,7 @@ private: QString machinePath; }; -class GTest_SmithWatermnanPerf : public GTest { +class GTest_SmithWatermnanPerf : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_SmithWatermnanPerf, "test-sw-performance"); diff --git a/src/plugins/smith_waterman/src/sw_cuda.cu b/src/plugins/smith_waterman/src/sw_cuda.cu index 1ef6a33808089fbe26b1749b486c57992b02e5c7..037e0057ee4e0165bd44ff1ad20269e5a51b13dd 100644 --- a/src/plugins/smith_waterman/src/sw_cuda.cu +++ b/src/plugins/smith_waterman/src/sw_cuda.cu @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/smith_waterman/src/sw_cuda_cpp.cpp b/src/plugins/smith_waterman/src/sw_cuda_cpp.cpp index 90d52ab788e545c966752a44b322b7fb5966410a..a0074bcd1b9ded231ab19b072046285c20089af0 100644 --- a/src/plugins/smith_waterman/src/sw_cuda_cpp.cpp +++ b/src/plugins/smith_waterman/src/sw_cuda_cpp.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/smith_waterman/src/sw_cuda_cpp.h b/src/plugins/smith_waterman/src/sw_cuda_cpp.h index 89da20f181d8a57155ece782040fb9ba6dda9068..954dae9653de7fa56098146f1e88b16ee9258eee 100644 --- a/src/plugins/smith_waterman/src/sw_cuda_cpp.h +++ b/src/plugins/smith_waterman/src/sw_cuda_cpp.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/test_runner/resource.h b/src/plugins/test_runner/resource.h index 3e8a63f72c804bc87ed6848dd5f9b4484e00401f..9f749ce5a4f03712ce4d809ef01c885e2013a337 100644 --- a/src/plugins/test_runner/resource.h +++ b/src/plugins/test_runner/resource.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/test_runner/src/ExcludeReasonDialog.cpp b/src/plugins/test_runner/src/ExcludeReasonDialog.cpp index b0de4739beab09e0406b15e9c3baefb7049d99db..8a9ce140523e3d3c9a6bbae8192b8c54376dc120 100644 --- a/src/plugins/test_runner/src/ExcludeReasonDialog.cpp +++ b/src/plugins/test_runner/src/ExcludeReasonDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/test_runner/src/ExcludeReasonDialog.h b/src/plugins/test_runner/src/ExcludeReasonDialog.h index 42bf8cb2bd1e4d9bb942a9c0ad926d237d3c7cdd..2a150d96f2969d487f4350fde6464d1f842beafd 100644 --- a/src/plugins/test_runner/src/ExcludeReasonDialog.h +++ b/src/plugins/test_runner/src/ExcludeReasonDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/test_runner/src/GTestScriptWrapper.cpp b/src/plugins/test_runner/src/GTestScriptWrapper.cpp index d8f638227bcdafde4a6dbfd568be8674ff9ceda7..549d225286695f2250f1f20257a57ee8856ccaea 100644 --- a/src/plugins/test_runner/src/GTestScriptWrapper.cpp +++ b/src/plugins/test_runner/src/GTestScriptWrapper.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/test_runner/src/GTestScriptWrapper.h b/src/plugins/test_runner/src/GTestScriptWrapper.h index 7b76a8ad9af65aba8087bf19c5c639e62a1e12ad..ff43a215f526bc55c0be76c2feca0c56dcb8e982 100644 --- a/src/plugins/test_runner/src/GTestScriptWrapper.h +++ b/src/plugins/test_runner/src/GTestScriptWrapper.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/test_runner/src/Reporter.ui b/src/plugins/test_runner/src/Reporter.ui index 90049042cb08cdb6a55d729228536751f7092557..0476e535788a3a5c2cc2433a0adbff41acf8a394 100644 --- a/src/plugins/test_runner/src/Reporter.ui +++ b/src/plugins/test_runner/src/Reporter.ui @@ -1,7 +1,8 @@ -<ui version="4.0" > +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> <class>Reporter</class> - <widget class="QWidget" name="Reporter" > - <property name="geometry" > + <widget class="QWidget" name="Reporter"> + <property name="geometry"> <rect> <x>0</x> <y>0</y> @@ -9,36 +10,22 @@ <height>262</height> </rect> </property> - <property name="windowTitle" > + <property name="windowTitle"> <string>utf_reporter_title</string> </property> - <layout class="QGridLayout" name="gridLayout" > - <item row="0" column="0" > - <widget class="QSplitter" name="splitter" > - <property name="orientation" > + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> + <widget class="QSplitter" name="splitter"> + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="childrenCollapsible" > + <property name="childrenCollapsible"> <bool>false</bool> </property> - <widget class="QWebView" name="reportText" > - <property name="url" > - <url> - <string>about:blank</string> - </url> - </property> - </widget> </widget> </item> </layout> </widget> - <customwidgets> - <customwidget> - <class>QWebView</class> - <extends>QWidget</extends> - <header>QtWebKit/QWebView</header> - </customwidget> - </customwidgets> <resources/> <connections/> </ui> diff --git a/src/plugins/test_runner/src/TestRunnerPlugin.cpp b/src/plugins/test_runner/src/TestRunnerPlugin.cpp index f2a99998c4223b5d287a0a81fea4aa8405b4e47b..a36e7844f5884aa47678f95dcdae7dcb93650581 100644 --- a/src/plugins/test_runner/src/TestRunnerPlugin.cpp +++ b/src/plugins/test_runner/src/TestRunnerPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -176,6 +176,9 @@ void TestRunnerService::serviceStateChangedCallback(ServiceState oldState, bool readBuiltInVars(); windowAction = new QAction(tr("Test runner"), this); +#ifdef _DEBUG + windowAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_T)); +#endif windowAction->setObjectName("action__testrunner"); connect(windowAction, SIGNAL(triggered()), SLOT(sl_showWindow())); AppContext::getMainWindow()->getTopLevelMenu(MWMENU_TOOLS)->addAction(windowAction); diff --git a/src/plugins/test_runner/src/TestRunnerPlugin.h b/src/plugins/test_runner/src/TestRunnerPlugin.h index 11a93479dd462d22f44c908c8d3918cb77139bc3..957104683b2278b945da749cd4225732b6115f85 100644 --- a/src/plugins/test_runner/src/TestRunnerPlugin.h +++ b/src/plugins/test_runner/src/TestRunnerPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/test_runner/src/TestView.ui b/src/plugins/test_runner/src/TestView.ui index b8f24e925b6130400bf52003d90c4de6bcef90e9..b494dc68d73306fe2c89cce6026e578e9ca91729 100644 --- a/src/plugins/test_runner/src/TestView.ui +++ b/src/plugins/test_runner/src/TestView.ui @@ -11,7 +11,7 @@ </rect> </property> <property name="windowTitle"> - <string>utf_view_title</string> + <string>Test Runner</string> </property> <layout class="QVBoxLayout" name="verticalLayout_3"> <item> @@ -36,7 +36,16 @@ </widget> <widget class="QWidget" name="infoWidget" native="true"> <layout class="QVBoxLayout" name="verticalLayout_2"> - <property name="margin"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> <number>0</number> </property> <item> @@ -79,7 +88,16 @@ </widget> <widget class="QWidget" name="testEditWidget" native="true"> <layout class="QVBoxLayout" name="verticalLayout"> - <property name="margin"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> <number>0</number> </property> <item> diff --git a/src/plugins/test_runner/src/TestViewController.cpp b/src/plugins/test_runner/src/TestViewController.cpp index e5c2669afe5ddba20fcb42db08f07bc8fa09a106..0ffb09875f5546b1ddebb7127805915e7210ce3a 100644 --- a/src/plugins/test_runner/src/TestViewController.cpp +++ b/src/plugins/test_runner/src/TestViewController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/test_runner/src/TestViewController.h b/src/plugins/test_runner/src/TestViewController.h index 0f924f59535cf8547828a9566db27665e141ea22..d6b334633ef459a6577eb96cff480c96e26503aa 100644 --- a/src/plugins/test_runner/src/TestViewController.h +++ b/src/plugins/test_runner/src/TestViewController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/test_runner/src/TestViewReporter.cpp b/src/plugins/test_runner/src/TestViewReporter.cpp index aac2f621359281338d64f18fbb9c3e19aee333e8..d3a8b3c6eae482ea354845cba7d7b7c79d138aed 100644 --- a/src/plugins/test_runner/src/TestViewReporter.cpp +++ b/src/plugins/test_runner/src/TestViewReporter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -45,7 +45,9 @@ namespace U2 { TestViewReporter::TestViewReporter(TestViewController* parent,QTreeWidget* tree,int runTime) : MWMDIWindow("Report") { curParent=parent; + reportText = new U2WebView(this); setupUi(this); + splitter->addWidget(reportText); save = new QAction(tr("save"), this); save->setObjectName("action_save"); diff --git a/src/plugins/test_runner/src/TestViewReporter.h b/src/plugins/test_runner/src/TestViewReporter.h index 55281df2dbc5ea050e79cd556709fbd787307718..540f267028acd4a3f98a052060cd7a7c0ca2a86c 100644 --- a/src/plugins/test_runner/src/TestViewReporter.h +++ b/src/plugins/test_runner/src/TestViewReporter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,6 +24,7 @@ #include "TestViewController.h" +#include <U2Gui/U2WebView.h> #include <U2Gui/MainWindow.h> #include <ui_Reporter.h> @@ -76,6 +77,7 @@ namespace U2 { QString curReportText; TestViewController* curParent; + U2WebView *reportText; QAction* save; private slots: diff --git a/src/plugins/test_runner/test_runner.pri b/src/plugins/test_runner/test_runner.pri index 241b4ea936e6ecfaaf9023c5331e798214a8857a..c7c0e9b58c5ba3bab6f24aab485f8eaf5352e842 100644 --- a/src/plugins/test_runner/test_runner.pri +++ b/src/plugins/test_runner/test_runner.pri @@ -1,6 +1,13 @@ # include (test_runner.pri) +include(../../ugene_globals.pri) -QT += testlib webkitwidgets +QT += testlib + +useWebKit() { + QT += webkitwidgets +} else { + QT += webenginewidgets +} PLUGIN_ID=test_runner PLUGIN_NAME=Test runner diff --git a/src/plugins/test_runner/transl/russian.ts b/src/plugins/test_runner/transl/russian.ts index 6ddd97ee9053802340bdbd632e1ca6c54331f3ad..e723aa8963ba3a44f8abe9d61d9aa1b89b56ba32 100644 --- a/src/plugins/test_runner/transl/russian.ts +++ b/src/plugins/test_runner/transl/russian.ts @@ -28,22 +28,25 @@ <context> <name>Reporter</name> <message> - <location filename="../src/Reporter.ui" line="13"/> + <location filename="../src/Reporter.ui" line="14"/> <source>utf_reporter_title</source> <translation>Reports</translation> </message> <message> - <location filename="../src/Reporter.ui" line="27"/> <source>about:blank</source> - <translation>about:blank</translation> + <translation type="vanished">about:blank</translation> </message> </context> <context> <name>TestView</name> <message> - <location filename="../src/TestView.ui" line="14"/> <source>utf_view_title</source> - <translation>Test runner</translation> + <translation type="vanished">Test runner</translation> + </message> + <message> + <location filename="../src/TestView.ui" line="14"/> + <source>Test Runner</source> + <translation type="unfinished"></translation> </message> <message> <location filename="../src/TestView.ui" line="28"/> @@ -56,12 +59,12 @@ <translation>State</translation> </message> <message> - <location filename="../src/TestView.ui" line="56"/> + <location filename="../src/TestView.ui" line="65"/> <source>info_label</source> <translation>Info</translation> </message> <message> - <location filename="../src/TestView.ui" line="94"/> + <location filename="../src/TestView.ui" line="112"/> <source>Save test</source> <translation>Save test</translation> </message> @@ -76,7 +79,7 @@ <message> <location filename="../src/TestRunnerPlugin.cpp" line="52"/> <source>test_runner_desc</source> - <translation>Test runner allows to run and manage tests suites and individual tests for Unipro UGENE. Enabled if environment variable UGENE_DEV is set</translation> + <translation>Test runner allows one to run and manage tests suites and individual tests for Unipro UGENE. Enabled if environment variable UGENE_DEV is set</translation> </message> <message> <location filename="../src/TestRunnerPlugin.cpp" line="96"/> @@ -99,7 +102,7 @@ <translation>Service to support UGENE embedded testing</translation> </message> <message> - <location filename="../src/TestRunnerPlugin.cpp" line="293"/> + <location filename="../src/TestRunnerPlugin.cpp" line="296"/> <source>Error reading test suite from %1. Error: %2</source> <translation>Error reading test suite from %1. Error: %2</translation> </message> @@ -262,17 +265,17 @@ <context> <name>U2::TestViewReporter</name> <message> - <location filename="../src/TestViewReporter.cpp" line="50"/> + <location filename="../src/TestViewReporter.cpp" line="52"/> <source>save</source> <translation>Save report</translation> </message> <message> - <location filename="../src/TestViewReporter.cpp" line="458"/> + <location filename="../src/TestViewReporter.cpp" line="460"/> <source>select_save_path</source> <translation>Select file to save report</translation> </message> <message> - <location filename="../src/TestViewReporter.cpp" line="458"/> + <location filename="../src/TestViewReporter.cpp" line="460"/> <source>*.html</source> <translation>*.html</translation> </message> diff --git a/src/plugins/weight_matrix/src/PMatrixFormat.cpp b/src/plugins/weight_matrix/src/PMatrixFormat.cpp index b6ca4505b637a25a910974eb59a347037afbbe39..f01ad1d284c781f466e09e802eb7b8fd0a1b0008 100644 --- a/src/plugins/weight_matrix/src/PMatrixFormat.cpp +++ b/src/plugins/weight_matrix/src/PMatrixFormat.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -43,9 +43,7 @@ namespace U2{ -const DocumentFormatId PFMatrixFormat::FORMAT_ID = "PFMatrix"; - -PFMatrixFormat::PFMatrixFormat(QObject* p): DocumentFormat(p, DocumentFormatFlag_SingleObjectFormat, QStringList("pfm")) { +PFMatrixFormat::PFMatrixFormat(QObject* p): DocumentFormat(p, DocumentFormatId("PFMatrix"), DocumentFormatFlag_SingleObjectFormat, QStringList("pfm")) { formatName = tr("Position frequency matrix"); supportedObjectTypes += PFMatrixObject::TYPE; formatDescription = tr("Position frequency matrix file."); @@ -166,9 +164,7 @@ void OpenPFMatrixViewTask::open(){ ///PWM -const DocumentFormatId PWMatrixFormat::FORMAT_ID = "PWMatrix"; - -PWMatrixFormat::PWMatrixFormat( QObject* p ): DocumentFormat(p, DocumentFormatFlag_SingleObjectFormat, QStringList("pwm")) { +PWMatrixFormat::PWMatrixFormat( QObject* p ): DocumentFormat(p, DocumentFormatId("PWMatrix"), DocumentFormatFlag_SingleObjectFormat, QStringList("pwm")) { formatName = tr("Position weight matrix"); supportedObjectTypes += PFMatrixObject::TYPE; formatDescription = tr("Position weight matrix file."); diff --git a/src/plugins/weight_matrix/src/PMatrixFormat.h b/src/plugins/weight_matrix/src/PMatrixFormat.h index ef566c3648535987a4fbcaade43dc0ac7b385fac..4e86316d44ecda3c06f39f2258a5ecf858a89acf 100644 --- a/src/plugins/weight_matrix/src/PMatrixFormat.h +++ b/src/plugins/weight_matrix/src/PMatrixFormat.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -37,19 +37,10 @@ class PFMatrixFormat : public DocumentFormat { public: PFMatrixFormat(QObject* p); - static const DocumentFormatId FORMAT_ID; - - virtual DocumentFormatId getFormatId() const {return FORMAT_ID;} - - virtual const QString& getFormatName() const {return formatName;} - virtual FormatCheckResult checkRawData(const QByteArray& rawData, const GUrl& = GUrl()) const; protected: virtual Document* loadDocument(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& fs, U2OpStatus& os); - -private: - QString formatName; }; class PFMatrixViewFactory : public GObjectViewFactory { @@ -76,19 +67,10 @@ class PWMatrixFormat : public DocumentFormat { public: PWMatrixFormat(QObject* p); - static const DocumentFormatId FORMAT_ID; - - virtual DocumentFormatId getFormatId() const {return FORMAT_ID;} - - virtual const QString& getFormatName() const {return formatName;} - virtual FormatCheckResult checkRawData(const QByteArray& rawData, const GUrl& = GUrl()) const; protected: virtual Document* loadDocument(IOAdapter* io, const U2DbiRef& dbiRef, const QVariantMap& fs, U2OpStatus& os); - -private: - QString formatName; }; class PWMatrixViewFactory : public GObjectViewFactory { diff --git a/src/plugins/weight_matrix/src/PWMBuildDialogController.cpp b/src/plugins/weight_matrix/src/PWMBuildDialogController.cpp index 537c81ed89171735958fb2da75a75c8480ff9da4..5a82aaece30055acf25d3063978ffd69348552cc 100644 --- a/src/plugins/weight_matrix/src/PWMBuildDialogController.cpp +++ b/src/plugins/weight_matrix/src/PWMBuildDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -64,7 +64,7 @@ PWMBuildDialogController::PWMBuildDialogController(QWidget* w) logoArea(NULL) { task = NULL; setupUi(this); - new HelpButton(this, buttonBox, "22056078"); + new HelpButton(this, buttonBox, "24742613"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Start")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/weight_matrix/src/PWMBuildDialogController.h b/src/plugins/weight_matrix/src/PWMBuildDialogController.h index a30dc1fa803f73d798737df9ec5aba8fc880b61f..d818637a00c62890146c74ec2a5a48f79f795484 100644 --- a/src/plugins/weight_matrix/src/PWMBuildDialogController.h +++ b/src/plugins/weight_matrix/src/PWMBuildDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/weight_matrix/src/PWMJASPARDialogController.cpp b/src/plugins/weight_matrix/src/PWMJASPARDialogController.cpp index 1eb0e0c8ba8749613d50b6354ea090fac1705b6a..05f21d7c3ddbe249952e838ea7f6938984ff2abe 100644 --- a/src/plugins/weight_matrix/src/PWMJASPARDialogController.cpp +++ b/src/plugins/weight_matrix/src/PWMJASPARDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,7 +33,7 @@ namespace U2 { PWMJASPARDialogController::PWMJASPARDialogController(QWidget *w) : QDialog(w) { setupUi(this); - new HelpButton(this, buttonBox, "22056077"); + new HelpButton(this, buttonBox, "24742612"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Select")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/weight_matrix/src/PWMJASPARDialogController.h b/src/plugins/weight_matrix/src/PWMJASPARDialogController.h index 952fa74d93f9d09444a81042a5a73ca2a86d8675..fd4253a836333fc15b493ed87058a0bbf153bfda 100644 --- a/src/plugins/weight_matrix/src/PWMJASPARDialogController.h +++ b/src/plugins/weight_matrix/src/PWMJASPARDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/weight_matrix/src/PWMSearchDialogController.cpp b/src/plugins/weight_matrix/src/PWMSearchDialogController.cpp index 1f00983b85a93c911b21af4a5f498277f097a853..aea9740b7337bfdb5a7723ebf6afefea79cbb033 100644 --- a/src/plugins/weight_matrix/src/PWMSearchDialogController.cpp +++ b/src/plugins/weight_matrix/src/PWMSearchDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -109,7 +109,7 @@ public: PWMSearchDialogController::PWMSearchDialogController(ADVSequenceObjectContext* _ctx, QWidget *p):QDialog(p) { setupUi(this); - new HelpButton(this, buttonBox, "22056076"); + new HelpButton(this, buttonBox, "24742611"); buttonBox->button(QDialogButtonBox::Yes)->setText(tr("Add to queue")); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Search")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins/weight_matrix/src/PWMSearchDialogController.h b/src/plugins/weight_matrix/src/PWMSearchDialogController.h index acd93ce1096a3eb8ce20472e0c2e13714a7f163f..adcb3a08cc644d7e56e9869936295b15f79cd2e5 100644 --- a/src/plugins/weight_matrix/src/PWMSearchDialogController.h +++ b/src/plugins/weight_matrix/src/PWMSearchDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/weight_matrix/src/SetParametersDialogController.cpp b/src/plugins/weight_matrix/src/SetParametersDialogController.cpp index ac6cb078d17db97448fa9964d8e8bbc21c941483..2566d6f5467193690bceaf87eec6192581283d19 100644 --- a/src/plugins/weight_matrix/src/SetParametersDialogController.cpp +++ b/src/plugins/weight_matrix/src/SetParametersDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,7 +32,7 @@ SetParametersDialogController::SetParametersDialogController(QWidget *w) : QDialog(w) { setupUi(this); - new HelpButton(this, buttonBox, "22056076"); + new HelpButton(this, buttonBox, "24742611"); QStringList algo = AppContext::getPWMConversionAlgorithmRegistry()->getAlgorithmIds(); algorithmComboBox->addItems(algo); diff --git a/src/plugins/weight_matrix/src/SetParametersDialogController.h b/src/plugins/weight_matrix/src/SetParametersDialogController.h index 92e8f46717e02b323fe3c67ebbdec7729e9bde30..a48b12669e2ebe5d0533886c65ba4816b77f39c1 100644 --- a/src/plugins/weight_matrix/src/SetParametersDialogController.h +++ b/src/plugins/weight_matrix/src/SetParametersDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/weight_matrix/src/ViewMatrixDialogController.cpp b/src/plugins/weight_matrix/src/ViewMatrixDialogController.cpp index fe5ef29567986ebb5fea742c57d0dba302b2f057..6e31e4b8f7b1b1c9cf9d683a9e092325275ccbe5 100644 --- a/src/plugins/weight_matrix/src/ViewMatrixDialogController.cpp +++ b/src/plugins/weight_matrix/src/ViewMatrixDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -174,7 +174,7 @@ ViewMatrixDialogController::ViewMatrixDialogController(PFMatrix matrix, QWidget ViewMatrixDialogController::ViewMatrixDialogController(PWMatrix matrix, QWidget *w): QDialog(w){ setupUi(this); - new HelpButton(this, buttonBox, "22056078"); + new HelpButton(this, buttonBox, "24742613"); buttonBox->button(QDialogButtonBox::Close)->setText(tr("Close")); ml = new MatrixAndLogoController(matrix, this); diff --git a/src/plugins/weight_matrix/src/ViewMatrixDialogController.h b/src/plugins/weight_matrix/src/ViewMatrixDialogController.h index c3b1f0b744a938b10f2f098bc7047c39da23aa08..0e8a5fe640c7a05db40282ac12b56a1af1769fa0 100644 --- a/src/plugins/weight_matrix/src/ViewMatrixDialogController.h +++ b/src/plugins/weight_matrix/src/ViewMatrixDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/weight_matrix/src/WMQuery.cpp b/src/plugins/weight_matrix/src/WMQuery.cpp index 88b5bc6a3976b57a647fec81b9e87053d549ea4d..330e1d808f15497f8b3498d3569211d91c7b0f50 100644 --- a/src/plugins/weight_matrix/src/WMQuery.cpp +++ b/src/plugins/weight_matrix/src/WMQuery.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/weight_matrix/src/WMQuery.h b/src/plugins/weight_matrix/src/WMQuery.h index d4e307a8750450e04e6a1466bbbdb1dfbdedddcc..4a545441889a1d7849766c3c5c257a28fd3dd589 100644 --- a/src/plugins/weight_matrix/src/WMQuery.h +++ b/src/plugins/weight_matrix/src/WMQuery.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/weight_matrix/src/WeightMatrixAlgorithm.cpp b/src/plugins/weight_matrix/src/WeightMatrixAlgorithm.cpp index 3dbdfe8a593323373a333a15df770730749d006c..f6df97d8faa355259f1f62b57ad076b29fb0f25a 100644 --- a/src/plugins/weight_matrix/src/WeightMatrixAlgorithm.cpp +++ b/src/plugins/weight_matrix/src/WeightMatrixAlgorithm.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/weight_matrix/src/WeightMatrixAlgorithm.h b/src/plugins/weight_matrix/src/WeightMatrixAlgorithm.h index 8197b11ce47d4f958757294d06c0f75c1f0031f8..67ea2897265155aa985ccb3e20543b7eaa60fa78 100644 --- a/src/plugins/weight_matrix/src/WeightMatrixAlgorithm.h +++ b/src/plugins/weight_matrix/src/WeightMatrixAlgorithm.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/weight_matrix/src/WeightMatrixBuildWorker.cpp b/src/plugins/weight_matrix/src/WeightMatrixBuildWorker.cpp index 31280662b60fee446cfca6e1a0f56daae48dfa68..7c2846072e523d2591f26e470ce366d0ed65d822 100644 --- a/src/plugins/weight_matrix/src/WeightMatrixBuildWorker.cpp +++ b/src/plugins/weight_matrix/src/WeightMatrixBuildWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/weight_matrix/src/WeightMatrixIO.cpp b/src/plugins/weight_matrix/src/WeightMatrixIO.cpp index 943be449f29107b28c574acf21c519c0faeebcd1..ffc11e8507ad4118eff4754958f2f82b04869a0b 100644 --- a/src/plugins/weight_matrix/src/WeightMatrixIO.cpp +++ b/src/plugins/weight_matrix/src/WeightMatrixIO.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/weight_matrix/src/WeightMatrixIO.h b/src/plugins/weight_matrix/src/WeightMatrixIO.h index ab4d62c90b575c8fd5b37ca7d211556e475ac13c..cfbbed4962fbe80220cd9df273d3f05663d744f5 100644 --- a/src/plugins/weight_matrix/src/WeightMatrixIO.h +++ b/src/plugins/weight_matrix/src/WeightMatrixIO.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/weight_matrix/src/WeightMatrixIOWorkers.cpp b/src/plugins/weight_matrix/src/WeightMatrixIOWorkers.cpp index 51ebb6cca664d6b7fc3410678ceae81630242a24..c50843739fd9d1458d594ef6d27a9e8ebe53884b 100644 --- a/src/plugins/weight_matrix/src/WeightMatrixIOWorkers.cpp +++ b/src/plugins/weight_matrix/src/WeightMatrixIOWorkers.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/weight_matrix/src/WeightMatrixIOWorkers.h b/src/plugins/weight_matrix/src/WeightMatrixIOWorkers.h index c6ae7d557a6f34a187e94173b686033d46bfe4af..28f8bc0cf64ceacd69d48f9b69b117f075a3ef6c 100644 --- a/src/plugins/weight_matrix/src/WeightMatrixIOWorkers.h +++ b/src/plugins/weight_matrix/src/WeightMatrixIOWorkers.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/weight_matrix/src/WeightMatrixPlugin.cpp b/src/plugins/weight_matrix/src/WeightMatrixPlugin.cpp index e7db90b74492db2902609ad075d8bc6c8d6e78b9..5cd6b9d846fd12922eba335ee29ded57e1435621 100644 --- a/src/plugins/weight_matrix/src/WeightMatrixPlugin.cpp +++ b/src/plugins/weight_matrix/src/WeightMatrixPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/weight_matrix/src/WeightMatrixPlugin.h b/src/plugins/weight_matrix/src/WeightMatrixPlugin.h index 0b3ae6a19c2b626147ddb7f247f21fede77e2f1b..f73969d093f6cac5cef9fc7a79409c17c2935093 100644 --- a/src/plugins/weight_matrix/src/WeightMatrixPlugin.h +++ b/src/plugins/weight_matrix/src/WeightMatrixPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/weight_matrix/src/WeightMatrixSearchTask.cpp b/src/plugins/weight_matrix/src/WeightMatrixSearchTask.cpp index 67646bed7b89c83ac95eee9aba3b734a982e7e81..8695452222a289ba607ed19accb230116a073591 100644 --- a/src/plugins/weight_matrix/src/WeightMatrixSearchTask.cpp +++ b/src/plugins/weight_matrix/src/WeightMatrixSearchTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -42,9 +42,8 @@ void WeightMatrixSearchTask::addResult(const WeightMatrixSearchResult& r) { QList<WeightMatrixSearchResult> WeightMatrixSearchTask::takeResults() { lock.lock(); QList<WeightMatrixSearchResult> res; - QList<Task*> sub = getSubtasks(); - foreach (Task* task, sub) { - WeightMatrixSingleSearchTask* curr = static_cast<WeightMatrixSingleSearchTask*>(task); + foreach (const QPointer<Task> &task, getSubtasks()) { + WeightMatrixSingleSearchTask* curr = static_cast<WeightMatrixSingleSearchTask*>(task.data()); res.append(curr->takeResults()); } lock.unlock(); diff --git a/src/plugins/weight_matrix/src/WeightMatrixSearchTask.h b/src/plugins/weight_matrix/src/WeightMatrixSearchTask.h index 49ada2d0de72cd9c61d1959589aef2342520e272..41edee49afcc8a25f1eac293b64108152d8bae1a 100644 --- a/src/plugins/weight_matrix/src/WeightMatrixSearchTask.h +++ b/src/plugins/weight_matrix/src/WeightMatrixSearchTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/weight_matrix/src/WeightMatrixSearchWorker.cpp b/src/plugins/weight_matrix/src/WeightMatrixSearchWorker.cpp index 20a34ee6e04e2c23316573dbd4293824bfa8c4f4..5de0d2b030c9df5098e92ad01429218309b8e48e 100644 --- a/src/plugins/weight_matrix/src/WeightMatrixSearchWorker.cpp +++ b/src/plugins/weight_matrix/src/WeightMatrixSearchWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -238,8 +238,8 @@ void PWMatrixSearchWorker::sl_taskFinished(Task *t) { if (t->isCanceled()) { return; } - foreach (Task *sub, t->getSubtasks()) { - WeightMatrixSingleSearchTask *sst = qobject_cast<WeightMatrixSingleSearchTask *>(sub); + foreach (const QPointer<Task> &sub, t->getSubtasks()) { + WeightMatrixSingleSearchTask *sst = qobject_cast<WeightMatrixSingleSearchTask *>(sub.data()); res += WeightMatrixSearchResult::toTable(sst->takeResults(), U2FeatureTypes::MiscFeature, resultName); } const SharedDbiDataHandler tableId = context->getDataStorage()->putAnnotationTable(res); diff --git a/src/plugins/weight_matrix/src/WeightMatrixWorkers.h b/src/plugins/weight_matrix/src/WeightMatrixWorkers.h index cddbab991eb4864abccb526de6afc26a74b2e7a8..866a88f3984514a41126509691dff7ac8371cacd 100644 --- a/src/plugins/weight_matrix/src/WeightMatrixWorkers.h +++ b/src/plugins/weight_matrix/src/WeightMatrixWorkers.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/weight_matrix/transl/russian.ts b/src/plugins/weight_matrix/transl/russian.ts index 680ff6467c4b5814ed1111fdd35e901e2e8aca03..4babf80057720fac679581dd09e8c7cbc33d4fe9 100644 --- a/src/plugins/weight_matrix/transl/russian.ts +++ b/src/plugins/weight_matrix/transl/russian.ts @@ -746,22 +746,22 @@ <context> <name>U2::PFMatrixFormat</name> <message> - <location filename="../src/PMatrixFormat.cpp" line="49"/> + <location filename="../src/PMatrixFormat.cpp" line="47"/> <source>Position frequency matrix</source> <translation>ЧаÑÑ‚Ð¾Ñ‚Ð½Ð°Ñ Ð¼Ð°Ñ‚Ñ€Ð¸Ñ†Ð°</translation> </message> <message> - <location filename="../src/PMatrixFormat.cpp" line="51"/> + <location filename="../src/PMatrixFormat.cpp" line="49"/> <source>Position frequency matrix file.</source> <translation>Файл чаÑтотной матрицы.</translation> </message> <message> - <location filename="../src/PMatrixFormat.cpp" line="93"/> + <location filename="../src/PMatrixFormat.cpp" line="91"/> <source>The file format is not PFM</source> <translation>The file format is not PFM</translation> </message> <message> - <location filename="../src/PMatrixFormat.cpp" line="96"/> + <location filename="../src/PMatrixFormat.cpp" line="94"/> <source>Zero length or corrupted model Maybe model data are not enough for selected algorithm</source> <translation>Zero length or corrupted model @@ -779,12 +779,12 @@ Maybe model data are not enough for selected algorithm</translation> <context> <name>U2::PFMatrixViewFactory</name> <message> - <location filename="../src/PMatrixFormat.cpp" line="127"/> + <location filename="../src/PMatrixFormat.cpp" line="125"/> <source>Open multiple views</source> <translation>Открыть неÑколько окон</translation> </message> <message> - <location filename="../src/PMatrixFormat.h" line="59"/> + <location filename="../src/PMatrixFormat.h" line="50"/> <source>PFM Viewer</source> <translation>ПроÑмотр матрицы</translation> </message> @@ -956,11 +956,9 @@ Do you want to write over this file?</source> <translation>Модель Ñ Ñ‚Ð°ÐºÐ¸Ð¼Ð¸ же параметрами уже находитÑÑ Ð² очереди</translation> </message> <message> - <location filename="../src/PWMSearchDialogController.cpp" line="334"/> - <location filename="../src/PWMSearchDialogController.cpp" line="566"/> <source>Zero length or corrupted model Maybe model data is not enough for selected algorithm</source> - <translation>Zero length or corrupted model + <translation type="vanished">Zero length or corrupted model Maybe model data is not enough for selected algorithm</translation> </message> <message> @@ -1015,6 +1013,14 @@ Maybe model data is not enough for selected algorithm</translation> <source>Search</source> <translation>ПоиÑк</translation> </message> + <message> + <location filename="../src/PWMSearchDialogController.cpp" line="334"/> + <location filename="../src/PWMSearchDialogController.cpp" line="566"/> + <source>Zero length or corrupted model +Maybe model data are not enough for selected algorithm</source> + <translation type="unfinished">Zero length or corrupted model +Maybe model data are not enough for selected algorithm</translation> + </message> <message> <location filename="../src/PWMSearchDialogController.cpp" line="483"/> <source>Range is too small</source> @@ -1081,22 +1087,22 @@ Maybe model data is not enough for selected algorithm</translation> <context> <name>U2::PWMatrixFormat</name> <message> - <location filename="../src/PMatrixFormat.cpp" line="172"/> + <location filename="../src/PMatrixFormat.cpp" line="168"/> <source>Position weight matrix</source> <translation>ВеÑÐ¾Ð²Ð°Ñ Ð¼Ð°Ñ‚Ñ€Ð¸Ñ†Ð°</translation> </message> <message> - <location filename="../src/PMatrixFormat.cpp" line="174"/> + <location filename="../src/PMatrixFormat.cpp" line="170"/> <source>Position weight matrix file.</source> <translation>Файл веÑовой матрицы.</translation> </message> <message> - <location filename="../src/PMatrixFormat.cpp" line="223"/> + <location filename="../src/PMatrixFormat.cpp" line="219"/> <source>The file format is not PWM</source> <translation>The file format is not PWM</translation> </message> <message> - <location filename="../src/PMatrixFormat.cpp" line="226"/> + <location filename="../src/PMatrixFormat.cpp" line="222"/> <source>Zero length or corrupted model. Maybe model data are not enough for selected algorithm</source> <translation>Zero length or corrupted model @@ -1114,12 +1120,12 @@ Maybe model data are not enough for selected algorithm</translation> <context> <name>U2::PWMatrixViewFactory</name> <message> - <location filename="../src/PMatrixFormat.cpp" line="256"/> + <location filename="../src/PMatrixFormat.cpp" line="252"/> <source>Open multiple views</source> <translation>Открыть неÑколько окон</translation> </message> <message> - <location filename="../src/PMatrixFormat.h" line="98"/> + <location filename="../src/PMatrixFormat.h" line="80"/> <source>PWM Viewer</source> <translation>ПроÑмотр матрицы</translation> </message> diff --git a/src/plugins/wevote_support/src/PrepareWevoteTaxonomyDataTask.cpp b/src/plugins/wevote_support/src/PrepareWevoteTaxonomyDataTask.cpp index c22012f804c02d21cb5c6eb9c74ae92567d84426..817a588fa40189cf902fd4d1fcf3feb29d4d58a1 100644 --- a/src/plugins/wevote_support/src/PrepareWevoteTaxonomyDataTask.cpp +++ b/src/plugins/wevote_support/src/PrepareWevoteTaxonomyDataTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/wevote_support/src/PrepareWevoteTaxonomyDataTask.h b/src/plugins/wevote_support/src/PrepareWevoteTaxonomyDataTask.h index a8d0d771fc73e05bfca18ace5842f145aaa70bfe..33779acdd716bca629f81790204a8559a04b6628 100644 --- a/src/plugins/wevote_support/src/PrepareWevoteTaxonomyDataTask.h +++ b/src/plugins/wevote_support/src/PrepareWevoteTaxonomyDataTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/wevote_support/src/WevotePrompter.cpp b/src/plugins/wevote_support/src/WevotePrompter.cpp index cf6018ef6db97e6f36a259a808de2b7e53ac4bb8..e55a1227271c38cacdbaa747e19800fcccf8ff2b 100644 --- a/src/plugins/wevote_support/src/WevotePrompter.cpp +++ b/src/plugins/wevote_support/src/WevotePrompter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/wevote_support/src/WevotePrompter.h b/src/plugins/wevote_support/src/WevotePrompter.h index ae29686f1d0f6ba003a229cfacf8dbaff1507d8c..6d24202b55da9002706b5f1da11ff128bf8956e5 100644 --- a/src/plugins/wevote_support/src/WevotePrompter.h +++ b/src/plugins/wevote_support/src/WevotePrompter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/wevote_support/src/WevoteSupport.cpp b/src/plugins/wevote_support/src/WevoteSupport.cpp index a8b17a96ba2455aa2d669e737f844deeb39f4950..a5007f9edd1069a9a5abf202d45dae60d6bb663b 100644 --- a/src/plugins/wevote_support/src/WevoteSupport.cpp +++ b/src/plugins/wevote_support/src/WevoteSupport.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,9 +24,10 @@ namespace U2 { const QString WevoteSupport::TOOL_NAME = "WEVOTE"; +const QString WevoteSupport::TOOL_ID = "USUPP_WEVOTE"; WevoteSupport::WevoteSupport() - : ExternalTool(TOOL_NAME) + : ExternalTool(TOOL_ID, TOOL_NAME, "") { validMessage = "less than the required minimum number of options"; executableFileName = "WEVOTE"; diff --git a/src/plugins/wevote_support/src/WevoteSupport.h b/src/plugins/wevote_support/src/WevoteSupport.h index be8776b9915972fe669fcf72ea41c044f5e2cdba..9af9bc0c8da883cea86448588109b9ab578b1b0d 100644 --- a/src/plugins/wevote_support/src/WevoteSupport.h +++ b/src/plugins/wevote_support/src/WevoteSupport.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,12 +26,11 @@ namespace U2 { -#define ET_WEVOTE WevoteSupport::TOOL_NAME - class WevoteSupport : public ExternalTool { public: WevoteSupport(); + static const QString TOOL_ID; static const QString TOOL_NAME; }; diff --git a/src/plugins/wevote_support/src/WevoteSupportPlugin.cpp b/src/plugins/wevote_support/src/WevoteSupportPlugin.cpp index e3467eb15ce136e187c019143a69006f84f8d697..f4e8e97933dfb539c2195c6e891389ecbff58eca 100644 --- a/src/plugins/wevote_support/src/WevoteSupportPlugin.cpp +++ b/src/plugins/wevote_support/src/WevoteSupportPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -51,7 +51,7 @@ WevoteSupportPlugin::WevoteSupportPlugin() WevoteSupportPlugin::~WevoteSupportPlugin() { ExternalToolRegistry *etRegistry = AppContext::getExternalToolRegistry(); CHECK(NULL != etRegistry, ); - etRegistry->unregisterEntry(WevoteSupport::TOOL_NAME); + etRegistry->unregisterEntry(WevoteSupport::TOOL_ID); } } // namespace U2 diff --git a/src/plugins/wevote_support/src/WevoteSupportPlugin.h b/src/plugins/wevote_support/src/WevoteSupportPlugin.h index 66d391298415d8392b266e799759aa4bade01e2c..48fd3c691ca7b6b8d383ef9c0ea4df87436ae63c 100644 --- a/src/plugins/wevote_support/src/WevoteSupportPlugin.h +++ b/src/plugins/wevote_support/src/WevoteSupportPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/wevote_support/src/WevoteTask.cpp b/src/plugins/wevote_support/src/WevoteTask.cpp index 260a94130b029b8af25805b0fd7cf39cf0d0cb30..24b33973dfc1f463ffee2431933387c2ffcf1cd1 100644 --- a/src/plugins/wevote_support/src/WevoteTask.cpp +++ b/src/plugins/wevote_support/src/WevoteTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -74,7 +74,7 @@ QList<Task *> WevoteTask::onSubTaskFinished(Task *subTask) { const QStringList arguments = getArguments(); CHECK_OP(stateInfo, newSubTasks); - ExternalToolRunTask *wevoteTask = new ExternalToolRunTask(WevoteSupport::TOOL_NAME, arguments, new ExternalToolLogParser()); + ExternalToolRunTask *wevoteTask = new ExternalToolRunTask(WevoteSupport::TOOL_ID, arguments, new ExternalToolLogParser()); setListenerForTask(wevoteTask); newSubTasks << wevoteTask; } diff --git a/src/plugins/wevote_support/src/WevoteTask.h b/src/plugins/wevote_support/src/WevoteTask.h index e7e0722b8a4e124a15b2d070f10f13df89406d43..d43030b1323f04656dd3a024dfb7bb56d3745af6 100644 --- a/src/plugins/wevote_support/src/WevoteTask.h +++ b/src/plugins/wevote_support/src/WevoteTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/wevote_support/src/WevoteValidator.cpp b/src/plugins/wevote_support/src/WevoteValidator.cpp index 68fd1b0b14f6f247023ddde4c09330fcfa0184ac..c73d9188450ed5db0a148c4cf55d4b4e657a9963 100644 --- a/src/plugins/wevote_support/src/WevoteValidator.cpp +++ b/src/plugins/wevote_support/src/WevoteValidator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/wevote_support/src/WevoteValidator.h b/src/plugins/wevote_support/src/WevoteValidator.h index ffc2e83a54b9477c09227a913b6feccfcbbe8d48..081f48f08e4b8a6f01d8afa9518c070b44bafce7 100644 --- a/src/plugins/wevote_support/src/WevoteValidator.h +++ b/src/plugins/wevote_support/src/WevoteValidator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/wevote_support/src/WevoteWorker.cpp b/src/plugins/wevote_support/src/WevoteWorker.cpp index bdff5bfcc39effc2603d918551466f4e6e531c58..21a2385c3476fde0e12308b721c8f363a17a7f5c 100644 --- a/src/plugins/wevote_support/src/WevoteWorker.cpp +++ b/src/plugins/wevote_support/src/WevoteWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/wevote_support/src/WevoteWorker.h b/src/plugins/wevote_support/src/WevoteWorker.h index 073eb994d1be7a10c696933b1d56fed11b719538..e3662877cd89d734c7f0212e74d2d6f97417d748 100644 --- a/src/plugins/wevote_support/src/WevoteWorker.h +++ b/src/plugins/wevote_support/src/WevoteWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/wevote_support/src/WevoteWorkerFactory.cpp b/src/plugins/wevote_support/src/WevoteWorkerFactory.cpp index 8b77f7d03eb4d599107e362249ebf2322c49056e..ab5f2d766f9d61a629e4667f71aa64e6c1e8cbbf 100644 --- a/src/plugins/wevote_support/src/WevoteWorkerFactory.cpp +++ b/src/plugins/wevote_support/src/WevoteWorkerFactory.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -81,14 +81,14 @@ void WevoteWorkerFactory::init() { QMap<Descriptor, DataTypePtr> outType; outType[TaxonomySupport::TAXONOMY_CLASSIFICATION_SLOT()] = TaxonomySupport::TAXONOMY_CLASSIFICATION_TYPE(); - const Descriptor inPortDesc(INPUT_PORT_ID, + Descriptor inPortDesc(INPUT_PORT_ID, WevotePrompter::tr("Input classification CSV file"), WevotePrompter::tr("Input a CSV file in the following format:\n" "1) a sequence name\n" "2) taxID from the first tool\n" "3) taxID from the second tool\n" "4) etc.")); - const Descriptor outPortDesc(OUTPUT_PORT_ID, WevotePrompter::tr("WEVOTE Classification"), WevotePrompter::tr("A map of sequence names with the associated taxonomy IDs.")); + Descriptor outPortDesc(OUTPUT_PORT_ID, WevotePrompter::tr("WEVOTE Classification"), WevotePrompter::tr("A map of sequence names with the associated taxonomy IDs.")); ports << new PortDescriptor(inPortDesc, DataTypePtr(new MapDataType(ACTOR_ID + "-in", inType)), true /*input*/); ports << new PortDescriptor(outPortDesc, DataTypePtr(new MapDataType(ACTOR_ID + "-out", outType)), false /*input*/, true /*multi*/); @@ -96,22 +96,22 @@ void WevoteWorkerFactory::init() { QList<Attribute *> attributes; { - const Descriptor penaltyDesc(PENALTY_ATTR_ID, WevotePrompter::tr("Penalty"), + Descriptor penaltyDesc(PENALTY_ATTR_ID, WevotePrompter::tr("Penalty"), WevotePrompter::tr("Score penalty for disagreements (-k)")); - const Descriptor numberOfAgreedToolsDesc(NUMBER_OF_AGREED_TOOLS_ATTR_ID, WevotePrompter::tr("Number of agreed tools"), + Descriptor numberOfAgreedToolsDesc(NUMBER_OF_AGREED_TOOLS_ATTR_ID, WevotePrompter::tr("Number of agreed tools"), WevotePrompter::tr("Specify the minimum number of tools agreed on WEVOTE decision (-a).")); - const Descriptor scoreThresholdDesc(SCORE_THRESHOLD_ATTR_ID, WevotePrompter::tr("Score threshold"), + Descriptor scoreThresholdDesc(SCORE_THRESHOLD_ATTR_ID, WevotePrompter::tr("Score threshold"), WevotePrompter::tr("Score threshold (-s)")); - const Descriptor numberOfThreadsDesc(NUMBER_OF_THREADS_ATTR_ID, WevotePrompter::tr("Number of threads"), + Descriptor numberOfThreadsDesc(NUMBER_OF_THREADS_ATTR_ID, WevotePrompter::tr("Number of threads"), WevotePrompter::tr("Use multiple threads (-n).")); - const Descriptor outputFileDesc(OUTPUT_FILE_ATTR_ID, WevotePrompter::tr("Output file"), + Descriptor outputFileDesc(OUTPUT_FILE_ATTR_ID, WevotePrompter::tr("Output file"), WevotePrompter::tr("Specify the output text file name.")); - const Descriptor classifyToolDesc(NgsReadsClassificationPlugin::WORKFLOW_CLASSIFY_TOOL_ID, + Descriptor classifyToolDesc(NgsReadsClassificationPlugin::WORKFLOW_CLASSIFY_TOOL_ID, WORKFLOW_CLASSIFY_TOOL_WEVOTE, "Classify tool. Hidden attribute"); @@ -160,13 +160,13 @@ void WevoteWorkerFactory::init() { delegates[OUTPUT_FILE_ATTR_ID] = new URLDelegate(tags, "wevote/output_file"); } - const Descriptor desc(ACTOR_ID, WevotePrompter::tr("Improve Classification with WEVOTE"), + Descriptor desc(ACTOR_ID, WevotePrompter::tr("Improve Classification with WEVOTE"), WevotePrompter::tr("WEVOTE (WEighted VOting Taxonomic idEntification) is a metagenome shortgun sequencing " "DNA reads classifier based on an ensemble of other classification methods (Kraken, CLARK, etc.).")); ActorPrototype *proto = new IntegralBusActorPrototype(desc, ports, attributes); proto->setEditor(new DelegateEditor(delegates)); proto->setPrompter(new WevotePrompter(NULL)); - proto->addExternalTool(WevoteSupport::TOOL_NAME); + proto->addExternalTool(WevoteSupport::TOOL_ID); proto->setValidator(new WevoteValidator()); WorkflowEnv::getProtoRegistry()->registerProto(NgsReadsClassificationPlugin::WORKFLOW_ELEMENTS_GROUP, proto); diff --git a/src/plugins/wevote_support/src/WevoteWorkerFactory.h b/src/plugins/wevote_support/src/WevoteWorkerFactory.h index 32ac67f7bc85379c5366b58e5bbefdc780ddf65a..b8fb90d3b49e57f1f1e2bb85e6efe0d2bfbc4b61 100644 --- a/src/plugins/wevote_support/src/WevoteWorkerFactory.h +++ b/src/plugins/wevote_support/src/WevoteWorkerFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/wevote_support/transl/russian.ts b/src/plugins/wevote_support/transl/russian.ts index 39a23bba5cf536df8d17d6e06a07a56bd15de245..651ccb2b8752195d5ce07ebddb398681ac3097dd 100644 --- a/src/plugins/wevote_support/transl/russian.ts +++ b/src/plugins/wevote_support/transl/russian.ts @@ -18,14 +18,6 @@ <source>Ensemble classification data, produced by other tools.</source> <translation type="unfinished"></translation> </message> - <message> - <source>Taxonomy data are missed</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Taxonomy file '%1' is not found.</source> - <translation type="unfinished"></translation> - </message> <message> <source>Input URL</source> <translation type="unfinished"></translation> @@ -113,6 +105,10 @@ <source>Empty input file URL in the message</source> <translation type="unfinished"></translation> </message> + <message> + <source>There were %1 input reads, %2 reads were classified.</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>U2::PrepareWevoteTaxonomyDataTask</name> @@ -183,4 +179,15 @@ <translation type="unfinished"></translation> </message> </context> +<context> + <name>WevoteValidator</name> + <message> + <source>Taxonomy classification data from NCBI are not available.</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Taxonomy classification data from NCBI are not full: file '%1' is missing.</source> + <translation type="unfinished"></translation> + </message> +</context> </TS> diff --git a/src/plugins/wevote_support/wevote_support.pri b/src/plugins/wevote_support/wevote_support.pri index 5b421e8c90bd2a489ca87a5bce84d6f641408a8d..aef43f8afc81b81ab21fe708f1fc63b03f9fff2e 100644 --- a/src/plugins/wevote_support/wevote_support.pri +++ b/src/plugins/wevote_support/wevote_support.pri @@ -1,21 +1,12 @@ # include (wevote_support.pri) -include (../../ugene_version.pri) +include (../../ugene_globals.pri) PLUGIN_ID=wevote_support PLUGIN_NAME=WEVOTE external tool support PLUGIN_VENDOR=Unipro -PLUGIN_DEPENDS=ngs_reads_classification:$${UGENE_VERSION};external_tool_support:$${UGENE_VERSION} - -LIBS += -L../../_release/plugins -lngs_reads_classification - -!debug_and_release|build_pass { - CONFIG(debug, debug|release) { - PLUGIN_DEPENDS -= ngs_reads_classification:$${UGENE_VERSION};external_tool_support:$${UGENE_VERSION} - PLUGIN_DEPENDS += ngs_reads_classificationd:$${UGENE_VERSION};external_tool_supportd:$${UGENE_VERSION} - - LIBS -= -L../../_release/plugins -lngs_reads_classification - LIBS += -L../../_debug/plugins -lngs_reads_classificationd - } -} +PLUGIN_DEPENDS=ngs_reads_classification$${D}:$${UGENE_VERSION};external_tool_support$${D}:$${UGENE_VERSION} include( ../../ugene_plugin_common.pri ) + +LIBS += -L../../$$out_dir()/plugins +LIBS += -lngs_reads_classification$$D diff --git a/src/plugins/workflow_designer/src/ActorCfgFilterProxyModel.cpp b/src/plugins/workflow_designer/src/ActorCfgFilterProxyModel.cpp index c5d08c82a0e9b23d3e64f7e90b193896bee70136..e6eb17447a78ecc173fdc6a6e31de1acd2e6d23c 100644 --- a/src/plugins/workflow_designer/src/ActorCfgFilterProxyModel.cpp +++ b/src/plugins/workflow_designer/src/ActorCfgFilterProxyModel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/ActorCfgFilterProxyModel.h b/src/plugins/workflow_designer/src/ActorCfgFilterProxyModel.h index d77714b7ffc0d80039d8cbd9630030bac93326fb..3d01d124f4ad16b1d29854cf2bd5c7164b245eb5 100644 --- a/src/plugins/workflow_designer/src/ActorCfgFilterProxyModel.h +++ b/src/plugins/workflow_designer/src/ActorCfgFilterProxyModel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/ActorCfgModel.cpp b/src/plugins/workflow_designer/src/ActorCfgModel.cpp index 4f14b9e59fc37df5087aabfec50710a215362a98..a80e610f4a82ae3dde4de6383716ef7b88ef627f 100644 --- a/src/plugins/workflow_designer/src/ActorCfgModel.cpp +++ b/src/plugins/workflow_designer/src/ActorCfgModel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/ActorCfgModel.h b/src/plugins/workflow_designer/src/ActorCfgModel.h index 2f786445bd368dcaa9629c6cf9659375eb59427e..ae27426b6dee32a6f2d97019f32e7ff24fe7e4d1 100644 --- a/src/plugins/workflow_designer/src/ActorCfgModel.h +++ b/src/plugins/workflow_designer/src/ActorCfgModel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/BreakpointManagerView.cpp b/src/plugins/workflow_designer/src/BreakpointManagerView.cpp index 156b8b9008e04b449a6490acf72007064fc8e0be..4d83eb6759715dba8305fc87c31353576f17f1c0 100644 --- a/src/plugins/workflow_designer/src/BreakpointManagerView.cpp +++ b/src/plugins/workflow_designer/src/BreakpointManagerView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -584,7 +584,7 @@ bool BreakpointManagerView::eventFilter(QObject * /*object*/, QEvent *event) { QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event); CHECK(NULL != keyEvent, false); - bool shiftPressed = (keyEvent->modifiers() && Qt::ShiftModifier) != 0; + bool shiftPressed = keyEvent->modifiers().testFlag(Qt::ShiftModifier); if (shiftPressed && keyEvent->key() == Qt::Key_Delete) { sl_deleteAllBreakpoints(); } diff --git a/src/plugins/workflow_designer/src/BreakpointManagerView.h b/src/plugins/workflow_designer/src/BreakpointManagerView.h index d0c6a7e1f94d55f689e746c84dd69a323ff31b74..d0f4abe1362421dc053ddecce2523f83b1e8525b 100644 --- a/src/plugins/workflow_designer/src/BreakpointManagerView.h +++ b/src/plugins/workflow_designer/src/BreakpointManagerView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/ChooseItemDialog.cpp b/src/plugins/workflow_designer/src/ChooseItemDialog.cpp index 65040833c1166305dcd841fc8cddef34346b56a5..1fb03b756b00e5f008b6c3bd92147eb3885f9feb 100644 --- a/src/plugins/workflow_designer/src/ChooseItemDialog.cpp +++ b/src/plugins/workflow_designer/src/ChooseItemDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/ChooseItemDialog.h b/src/plugins/workflow_designer/src/ChooseItemDialog.h index 07249c5f78cb97e3e87a1c00b40d54e2743e8015..8b35bc30ad30419d8208324e3648c034b0fa95d2 100644 --- a/src/plugins/workflow_designer/src/ChooseItemDialog.h +++ b/src/plugins/workflow_designer/src/ChooseItemDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/CreateScriptBlockDialog.ui b/src/plugins/workflow_designer/src/CreateScriptBlockDialog.ui index 266686464a2c4bd8f44a98eb944effd36505bd68..c8d05205c0ebfdeb20c32d851002a02585b74208 100644 --- a/src/plugins/workflow_designer/src/CreateScriptBlockDialog.ui +++ b/src/plugins/workflow_designer/src/CreateScriptBlockDialog.ui @@ -45,8 +45,8 @@ <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Evaluates user's script</span></p></body></html></string> +</style></head><body style=" font-family:'monospace'; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span>Evaluates user's script</span></p></body></html></string> </property> </widget> </item> diff --git a/src/plugins/workflow_designer/src/CreateScriptWorker.cpp b/src/plugins/workflow_designer/src/CreateScriptWorker.cpp index a3bbc88c753fe015b633c9e936569ac8f69291f9..dc6362985f8a6b8e5b974eb3451acdbb621648e7 100644 --- a/src/plugins/workflow_designer/src/CreateScriptWorker.cpp +++ b/src/plugins/workflow_designer/src/CreateScriptWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -153,7 +153,9 @@ private: class CfgListModel: public QAbstractListModel { public: - CfgListModel(QObject *obj = NULL): QAbstractListModel(obj) { + // Hint for row height. We use non-default row to make combo-boxes fit. + int itemHeight; + CfgListModel(int rowHeightHint, QObject *obj = NULL): QAbstractListModel(obj), itemHeight(rowHeightHint) { items.append(new CfgListItem(DelegateForPort)); } @@ -201,6 +203,8 @@ public: case Qt::EditRole: case ConfigurationEditor::ItemValueRole: return item->getDataType(); + case Qt::SizeHintRole: + return QSize(0, itemHeight); default: return QVariant(); } @@ -291,7 +295,7 @@ public: case Qt::EditRole: case ConfigurationEditor::ItemValueRole: if(col == 1) return item->getDataType(); - else return QVariant(); + else return item->getName(); default: return QVariant(); } @@ -359,13 +363,15 @@ private: CreateScriptElementDialog::CreateScriptElementDialog(QWidget *p, ActorPrototype* proto): QDialog(p), editing(false) { setupUi(this); - new HelpButton(this, buttonBox, "22056231"); + new HelpButton(this, buttonBox, "24740118"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); - inputList->setModel(new CfgListModel()); + // make list rows have the same size as buttons -> this must be enought to fit combo-boxes + int comboboxHeightHint = addInputButton->sizeHint().height(); + inputList->setModel(new CfgListModel(comboboxHeightHint, this)); inputList->setItemDelegate(new ProxyDelegate()); - outputList->setModel(new CfgListModel()); + outputList->setModel(new CfgListModel(comboboxHeightHint, this)); outputList->setItemDelegate(new ProxyDelegate()); attributeTable->setModel(new CfgTableModel()); @@ -388,8 +394,9 @@ CreateScriptElementDialog::CreateScriptElementDialog(QWidget *p, ActorPrototype* connect(cancelButton, SIGNAL(clicked()), SLOT(sl_cancelClicked())); attributeTable->horizontalHeader()->setStretchLastSection(true); + attributeTable->verticalHeader()->hide(); - nameEdit->setValidator(new WorkerNameValidator(this)); + nameEdit->setValidator(new DeprecatedWorkerNameValidator(this)); if(proto) { fillFields(proto); diff --git a/src/plugins/workflow_designer/src/CreateScriptWorker.h b/src/plugins/workflow_designer/src/CreateScriptWorker.h index e99d3aaac3e644b64def97d364dafd9803a2136d..612b9814aa3a8961ead0add891d38cfac17e0e80 100644 --- a/src/plugins/workflow_designer/src/CreateScriptWorker.h +++ b/src/plugins/workflow_designer/src/CreateScriptWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/DashboardsManagerDialog.cpp b/src/plugins/workflow_designer/src/DashboardsManagerDialog.cpp index 5c3f15779c7a3bd0551927d3abc534fabcabaf68..95616105ff21a45948708e54325a3b2032a2aa32 100644 --- a/src/plugins/workflow_designer/src/DashboardsManagerDialog.cpp +++ b/src/plugins/workflow_designer/src/DashboardsManagerDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -20,14 +20,16 @@ */ #include <QMessageBox> -#include <QPushButton> -#include <U2Gui/HelpButton.h> +#include <U2Core/AppContext.h> #include <U2Core/QObjectScopedPointer.h> +#include <U2Designer/DashboardInfoRegistry.h> + +#include <U2Gui/HelpButton.h> + #include "DashboardsManagerDialog.h" -static const QString REMOVE_DASHBOARDS_MESSAGE_BOX_TITLE = QObject::tr( "Removing Dashboards" ); static const QString REMOVE_MULTIPLE_DASHBOARDS_MESSAGE_BOX_TEXT = QObject::tr( "The following dashboards are about to be deleted:" ); static const QString REMOVE_SINGLE_DASHBOARD_MESSAGE_BOX_TEXT @@ -41,11 +43,11 @@ static const int DASHBOARD_MAX_DISPLAING_NAME_COUNT = 5; namespace U2 { -DashboardsManagerDialog::DashboardsManagerDialog(ScanDashboardsDirTask *_task, QWidget *parent) -: QDialog(parent), task(_task) +DashboardsManagerDialog::DashboardsManagerDialog(QWidget *parent) + : QDialog(parent) { setupUi(this); - new HelpButton(this, buttonBox, "22056229"); + new HelpButton(this, buttonBox, "24740116"); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); @@ -66,7 +68,8 @@ void DashboardsManagerDialog::setupList() { const int defaultNameColumnWidth = 250; listWidget->header()->resizeSection(0, defaultNameColumnWidth); - foreach (const DashboardInfo &info, task->getResult()) { + const QList<DashboardInfo> dashboardInfos = AppContext::getDashboardInfoRegistry()->getAllEntries(); + foreach (const DashboardInfo &info, dashboardInfos) { QStringList data; data << info.name << info.dirName; QTreeWidgetItem *item = new QTreeWidgetItem(listWidget, data); @@ -79,22 +82,20 @@ void DashboardsManagerDialog::setupList() { listWidget->sortByColumn(1, Qt::AscendingOrder); } -QList<QTreeWidgetItem*> DashboardsManagerDialog::allItems() { +QList<QTreeWidgetItem*> DashboardsManagerDialog::allItems() const { return listWidget->findItems("*", Qt::MatchWildcard); } -QList<DashboardInfo> DashboardsManagerDialog::selectedDashboards() { - QList<DashboardInfo> result; +QMap<QString, bool> DashboardsManagerDialog::getDashboardsVisibility() const { + QMap<QString, bool> result; foreach (QTreeWidgetItem *item, allItems()) { - if (Qt::Checked == item->checkState(0)) { - result << item->data(0, Qt::UserRole).value<DashboardInfo>(); - } + result.insert(item->data(0, Qt::UserRole).value<DashboardInfo>().getId(), Qt::Checked == item->checkState(0)); } return result; } -QList<DashboardInfo> DashboardsManagerDialog::removedDashboards() { - return removed; +const QStringList &DashboardsManagerDialog::removedDashboards() const { + return toRemove; } void DashboardsManagerDialog::sl_check() { @@ -121,7 +122,7 @@ void DashboardsManagerDialog::sl_remove() { } foreach (QTreeWidgetItem *item, listWidget->selectedItems()) { - removed << item->data(0, Qt::UserRole).value<DashboardInfo>(); + toRemove << item->data(0, Qt::UserRole).value<DashboardInfo>().getId(); delete item; } } @@ -169,7 +170,7 @@ bool DashboardsManagerDialog::confirmDashboardsRemoving( ) const { QObjectScopedPointer<QMessageBox> questionBox = new QMessageBox; questionBox->setIcon( QMessageBox::Question ); - questionBox->setWindowTitle( REMOVE_DASHBOARDS_MESSAGE_BOX_TITLE ); + questionBox->setWindowTitle(QObject::tr( "Removing Dashboards")); questionBox->setText( warningMessageText ); if ( tooManyDashboardsSelected ) { questionBox->setDetailedText( fullDashboardNamesList ); diff --git a/src/plugins/workflow_designer/src/DashboardsManagerDialog.h b/src/plugins/workflow_designer/src/DashboardsManagerDialog.h index e5ee4ac77978f815849c7be809fa4bc52c21d035..0df4e946fcbb373a37a5c43854beb59b231e7d4f 100644 --- a/src/plugins/workflow_designer/src/DashboardsManagerDialog.h +++ b/src/plugins/workflow_designer/src/DashboardsManagerDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,24 +19,23 @@ * MA 02110-1301, USA. */ -#ifndef _U2_DASHBOARDSMANAGERDIALOG_H_ -#define _U2_DASHBOARDSMANAGERDIALOG_H_ +#ifndef _U2_DASHBOARDS_MANAGER_DIALOG_H_ +#define _U2_DASHBOARDS_MANAGER_DIALOG_H_ #include <U2Designer/Dashboard.h> +#include <U2Designer/DashboardInfo.h> #include <ui_DashboardsManagerDialog.h> namespace U2 { -class ScanDashboardsDirTask; - class DashboardsManagerDialog : public QDialog, public Ui_DashboardsManagerDialog { Q_OBJECT public: - DashboardsManagerDialog(ScanDashboardsDirTask *task, QWidget *parent); + DashboardsManagerDialog(QWidget *parent); - QList<DashboardInfo> selectedDashboards(); - QList<DashboardInfo> removedDashboards(); + QMap<QString, bool> getDashboardsVisibility() const; + const QStringList &removedDashboards() const; private slots: void sl_check(); @@ -46,14 +45,13 @@ private slots: private: void setupList(); - QList<QTreeWidgetItem*> allItems(); + QList<QTreeWidgetItem*> allItems() const; bool confirmDashboardsRemoving( ) const; private: - ScanDashboardsDirTask *task; - QList<DashboardInfo> removed; + QStringList toRemove; }; } // U2 -#endif // _U2_DASHBOARDSMANAGERDIALOG_H_ +#endif // _U2_DASHBOARDS_MANAGER_DIALOG_H_ diff --git a/src/plugins/workflow_designer/src/GalaxyConfigConfigurationDialogImpl.cpp b/src/plugins/workflow_designer/src/GalaxyConfigConfigurationDialogImpl.cpp index 4f9aa4f4cd5f010f3411950d983eb92461e3f491..97239158dc924172edac48d5ef6ecc4c10da3624 100644 --- a/src/plugins/workflow_designer/src/GalaxyConfigConfigurationDialogImpl.cpp +++ b/src/plugins/workflow_designer/src/GalaxyConfigConfigurationDialogImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/GalaxyConfigConfigurationDialogImpl.h b/src/plugins/workflow_designer/src/GalaxyConfigConfigurationDialogImpl.h index 441abf9427ae87b4e4a23142b2f6a918d8abb363..f8a8c9e453a83b917395978af4861022ac004def 100644 --- a/src/plugins/workflow_designer/src/GalaxyConfigConfigurationDialogImpl.h +++ b/src/plugins/workflow_designer/src/GalaxyConfigConfigurationDialogImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/ImportSchemaDialog.cpp b/src/plugins/workflow_designer/src/ImportSchemaDialog.cpp index 1c858ef711964e2952352a265bba44b42cbc6cdf..dc310697083b599679c034fb098248e9435ed585 100644 --- a/src/plugins/workflow_designer/src/ImportSchemaDialog.cpp +++ b/src/plugins/workflow_designer/src/ImportSchemaDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -31,7 +31,7 @@ namespace U2 { ImportSchemaDialog::ImportSchemaDialog(QWidget* p) : QDialog(p) { setupUi(this); - new HelpButton(this, buttonBox, "22056243"); + new HelpButton(this, buttonBox, "24740130"); } void ImportSchemaDialog::accept() { diff --git a/src/plugins/workflow_designer/src/ImportSchemaDialog.h b/src/plugins/workflow_designer/src/ImportSchemaDialog.h index 57260b02bb79e2040eb3417eee5c0277aac1ffa7..b757782b4b981b4cbbb551ceae434ee6eaa347a9 100644 --- a/src/plugins/workflow_designer/src/ImportSchemaDialog.h +++ b/src/plugins/workflow_designer/src/ImportSchemaDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/InvestigationDataModel.cpp b/src/plugins/workflow_designer/src/InvestigationDataModel.cpp index 86d1bf9a2f48aec7d155b24771a6b4421c5325c0..7ed7748454c9812036841c39687921b1e39eac3b 100644 --- a/src/plugins/workflow_designer/src/InvestigationDataModel.cpp +++ b/src/plugins/workflow_designer/src/InvestigationDataModel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/InvestigationDataModel.h b/src/plugins/workflow_designer/src/InvestigationDataModel.h index 04bbbfb8970fdc6108569bd4236fb29fbe06e1fb..9afae95dfdb0273e77066e65ee9338784e0a8e8e 100644 --- a/src/plugins/workflow_designer/src/InvestigationDataModel.h +++ b/src/plugins/workflow_designer/src/InvestigationDataModel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/ItemViewStyle.cpp b/src/plugins/workflow_designer/src/ItemViewStyle.cpp index b4960220ba108046ac6dd79b8f8d26dfd4e302f4..270b50351f7275983cf379fef15791fafba8f548 100644 --- a/src/plugins/workflow_designer/src/ItemViewStyle.cpp +++ b/src/plugins/workflow_designer/src/ItemViewStyle.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -79,7 +79,7 @@ void ItemViewStyle::selectBGColor() { void ItemViewStyle::selectFont() { bool ok; - QFont res = QFontDialog::getFont(&ok, defFont, owner->scene()->views().first()); + QFont res = QFontDialog::getFont(&ok, defFont, owner->scene()->views().first(), tr("Characters Font"), QFontDialog::DontUseNativeDialog); if (ok) { defFont = res; WorkflowScene* sc = qobject_cast<WorkflowScene*>(owner->scene()); diff --git a/src/plugins/workflow_designer/src/ItemViewStyle.h b/src/plugins/workflow_designer/src/ItemViewStyle.h index 34f0528b5a4bc06f7bc49b5988fd1e224d88fe23..729bf201922ae197b08dd272856e47fa32f779ed 100644 --- a/src/plugins/workflow_designer/src/ItemViewStyle.h +++ b/src/plugins/workflow_designer/src/ItemViewStyle.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/PortAliasesConfigurationDialog.cpp b/src/plugins/workflow_designer/src/PortAliasesConfigurationDialog.cpp index 72846031b032e8749ab188124bcfaf5eb2ab90f3..1a4d24242293bc75b46d04ce1b547214d4fe6261 100644 --- a/src/plugins/workflow_designer/src/PortAliasesConfigurationDialog.cpp +++ b/src/plugins/workflow_designer/src/PortAliasesConfigurationDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,7 +34,7 @@ namespace Workflow { PortAliasesConfigurationDialog::PortAliasesConfigurationDialog( const Schema & schema, QWidget * p ) : QDialog(p), currentRow(-1) { setupUi(this); - new HelpButton(this, buttonBox, "22056243"); + new HelpButton(this, buttonBox, "24740130"); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); diff --git a/src/plugins/workflow_designer/src/PortAliasesConfigurationDialog.h b/src/plugins/workflow_designer/src/PortAliasesConfigurationDialog.h index 4b963195cb61d587deef2fc66d6841fd70129cff..ae4fa5a68f7a66c55e492b9ddfca9c80ffdf3913 100644 --- a/src/plugins/workflow_designer/src/PortAliasesConfigurationDialog.h +++ b/src/plugins/workflow_designer/src/PortAliasesConfigurationDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/SampleActionsManager.cpp b/src/plugins/workflow_designer/src/SampleActionsManager.cpp index 6966100303ea9104345c18cd5eef15876c05a3f3..d13315a1519f5c0f9f1960202800af845be96f90 100644 --- a/src/plugins/workflow_designer/src/SampleActionsManager.cpp +++ b/src/plugins/workflow_designer/src/SampleActionsManager.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/SampleActionsManager.h b/src/plugins/workflow_designer/src/SampleActionsManager.h index f12e461eba53a024c95dce8a91c36e350bf9c99c..922de695ea8692d339d5034f413c3e24fcd2f4b2 100644 --- a/src/plugins/workflow_designer/src/SampleActionsManager.h +++ b/src/plugins/workflow_designer/src/SampleActionsManager.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/SceneSerializer.cpp b/src/plugins/workflow_designer/src/SceneSerializer.cpp index 6a605e397afc4c5c3a3320090fb4de10a8f205b7..78333a1618af81b4f8826d20eed569bb53897f47 100644 --- a/src/plugins/workflow_designer/src/SceneSerializer.cpp +++ b/src/plugins/workflow_designer/src/SceneSerializer.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/SceneSerializer.h b/src/plugins/workflow_designer/src/SceneSerializer.h index 6169d438a8052c1ffc8692ebef681424f16e060b..22907f6d8419ba5228ef35ba0038bd16aeccbe86 100644 --- a/src/plugins/workflow_designer/src/SceneSerializer.h +++ b/src/plugins/workflow_designer/src/SceneSerializer.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/SchemaAliasesConfigurationDialogImpl.cpp b/src/plugins/workflow_designer/src/SchemaAliasesConfigurationDialogImpl.cpp index c9bfd650ae4ea3d053072323384122f1491487f8..92ad7402ca306f29004067a5250c371fbdc53579 100644 --- a/src/plugins/workflow_designer/src/SchemaAliasesConfigurationDialogImpl.cpp +++ b/src/plugins/workflow_designer/src/SchemaAliasesConfigurationDialogImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,7 +33,7 @@ namespace Workflow { SchemaAliasesConfigurationDialogImpl::SchemaAliasesConfigurationDialogImpl( const Schema & schema, QWidget * p ) : QDialog(p) { setupUi(this); - new HelpButton(this, buttonBox, "22056243"); + new HelpButton(this, buttonBox, "24740130"); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); diff --git a/src/plugins/workflow_designer/src/SchemaAliasesConfigurationDialogImpl.h b/src/plugins/workflow_designer/src/SchemaAliasesConfigurationDialogImpl.h index 0f2b19686890edd38b2422f4289b7c34602e16af..434aaca6945cedb038cce1bab4ec3fc834a9d276 100644 --- a/src/plugins/workflow_designer/src/SchemaAliasesConfigurationDialogImpl.h +++ b/src/plugins/workflow_designer/src/SchemaAliasesConfigurationDialogImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/StartupDialog.cpp b/src/plugins/workflow_designer/src/StartupDialog.cpp index d2a2118a4869c3c31e3892dfee9c11fdf10e24ac..46b4e71642546b1793ceaa1d20399ac23e361d12 100644 --- a/src/plugins/workflow_designer/src/StartupDialog.cpp +++ b/src/plugins/workflow_designer/src/StartupDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ StartupDialog::StartupDialog(QWidget *parent) : QDialog(parent) { setupUi(this); - new HelpButton(this, buttonBox, "22056200"); + new HelpButton(this, buttonBox, "24740087"); label->setStyleSheet(L10N::infoHintStyleSheet()); diff --git a/src/plugins/workflow_designer/src/StartupDialog.h b/src/plugins/workflow_designer/src/StartupDialog.h index 66da6c4d12c80898465a9fdd02397a04a695e63f..282974e3b00eea4a98ddb4aab572c51cab9f3b8b 100644 --- a/src/plugins/workflow_designer/src/StartupDialog.h +++ b/src/plugins/workflow_designer/src/StartupDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/TableViewTabKey.cpp b/src/plugins/workflow_designer/src/TableViewTabKey.cpp index 2d81261ea75847d24ced46c6d3a2db3a90d32f4c..cc9edae739dc64528715823326659bbaddf84ecd 100644 --- a/src/plugins/workflow_designer/src/TableViewTabKey.cpp +++ b/src/plugins/workflow_designer/src/TableViewTabKey.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/TableViewTabKey.h b/src/plugins/workflow_designer/src/TableViewTabKey.h index b37418480cdf65d0e33a744e303712a858313b41..6c28045fb73847978cc24724cd067918efaf99d3 100644 --- a/src/plugins/workflow_designer/src/TableViewTabKey.h +++ b/src/plugins/workflow_designer/src/TableViewTabKey.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/WorkflowDesignerPlugin.cpp b/src/plugins/workflow_designer/src/WorkflowDesignerPlugin.cpp index 67f1267555d66483021bed003715fb74eb0f12e9..272016b0c113fb41093e7e3074be31b09b02eff3 100644 --- a/src/plugins/workflow_designer/src/WorkflowDesignerPlugin.cpp +++ b/src/plugins/workflow_designer/src/WorkflowDesignerPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -35,6 +35,8 @@ #include <U2Core/TaskStarter.h> #include <U2Core/U2SafePoints.h> +#include <U2Designer/DashboardInfoRegistry.h> + #include <U2Gui/ToolsMenu.h> #include <U2Lang/IncludedProtoFactory.h> @@ -72,7 +74,7 @@ const QString WorkflowDesignerPlugin::REMOTE_MACHINE = "task-remote-m const QString WorkflowDesignerPlugin::PRINT = "print"; WorkflowDesignerPlugin::WorkflowDesignerPlugin() -: Plugin(tr("Workflow Designer"), tr("Workflow Designer allows to create complex computational workflows.")){ +: Plugin(tr("Workflow Designer"), tr("Workflow Designer allows one to create complex computational workflows.")){ if (AppContext::getMainWindow()) { services << new WorkflowDesignerService(); AppContext::getAppSettingsGUI()->registerPage(new WorkflowSettingsPageController()); @@ -103,6 +105,10 @@ WorkflowDesignerPlugin::WorkflowDesignerPlugin() CHECK(AppContext::getPluginSupport(), ); connect(AppContext::getPluginSupport(), SIGNAL(si_allStartUpPluginsLoaded()), SLOT(sl_initWorkers())); + + DashboardInfoRegistry *dashboardsInfoRegistry = AppContext::getDashboardInfoRegistry(); + SAFE_POINT(nullptr != dashboardsInfoRegistry, "dashboardsInfoRegistry is nullptr", ); + AppContext::getDashboardInfoRegistry()->scanDashboardsDir(); } void WorkflowDesignerPlugin::processCMDLineOptions() { @@ -165,7 +171,7 @@ void WorkflowDesignerPlugin::registerCMDLineHelp() { PRINT, tr("Prints the content of the specified slot."), tr("Prints the content of the specified slot. The incoming/outcoming content of" - " specified slot is printed to the standart output."), + " specified slot is printed to the standard output."), tr("<actor_name>.<port_name>.<slot_name>")); Q_UNUSED(printSection); diff --git a/src/plugins/workflow_designer/src/WorkflowDesignerPlugin.h b/src/plugins/workflow_designer/src/WorkflowDesignerPlugin.h index 44d6261b320f56364e7b0a2f42239309473a765d..8b30ca4acd5ecd8446d01b5a8255bb9f36528525 100644 --- a/src/plugins/workflow_designer/src/WorkflowDesignerPlugin.h +++ b/src/plugins/workflow_designer/src/WorkflowDesignerPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/WorkflowDocument.cpp b/src/plugins/workflow_designer/src/WorkflowDocument.cpp index 8f965ec51c95dcd9f52607d54f69e0eeab1476f0..9d08c67001a955789ac0e2e78765b44df65d3eb4 100644 --- a/src/plugins/workflow_designer/src/WorkflowDocument.cpp +++ b/src/plugins/workflow_designer/src/WorkflowDocument.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -78,8 +78,8 @@ GObject* WorkflowGObject::clone(const U2DbiRef&, U2OpStatus&, const QVariantMap /// Workflow document format WorkflowDocFormat::WorkflowDocFormat(QObject* p) -: TextDocumentFormat(p, DocumentFormatFlags_W1, QStringList(WorkflowUtils::WD_FILE_EXTENSIONS) << WorkflowUtils::WD_XML_FORMAT_EXTENSION), - formatName(tr("Workflow")) { +: TextDocumentFormat(p, WorkflowDocFormat::FORMAT_ID, DocumentFormatFlags_W1, QStringList(WorkflowUtils::WD_FILE_EXTENSIONS) << WorkflowUtils::WD_XML_FORMAT_EXTENSION) { + formatName = tr("Workflow"); supportedObjectTypes += WorkflowGObject::TYPE; formatDescription = tr("WorkflowDoc is a format used for creating/editing/storing/retrieving" "workflow with the text file"); @@ -102,6 +102,7 @@ Document* WorkflowDocFormat::loadTextDocument(IOAdapter* io, const U2DbiRef& tar rawData.append(block.data(), blockLen); os.setProgress(io->getProgress()); } + CHECK_EXT(!io->hasError(), os.setError(io->errorString()), NULL); if (checkRawData(rawData).score != FormatDetection_Matched) { os.setError(tr("Invalid header. %1 expected").arg(Constants::HEADER_LINE)); diff --git a/src/plugins/workflow_designer/src/WorkflowDocument.h b/src/plugins/workflow_designer/src/WorkflowDocument.h index 0a7c96051b6e71ce7475bb8cf1227d08f75fa870..aaab5bed2e067fa37166ed6e9035ee06854a1e84 100644 --- a/src/plugins/workflow_designer/src/WorkflowDocument.h +++ b/src/plugins/workflow_designer/src/WorkflowDocument.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -45,9 +45,6 @@ public: WorkflowDocFormat(QObject* p); static const DocumentFormatId FORMAT_ID; - virtual DocumentFormatId getFormatId() const {return FORMAT_ID;} - - virtual const QString& getFormatName() const {return formatName;} virtual Document* createNewLoadedDocument(IOAdapterFactory* io, const GUrl& url, U2OpStatus& os, const QVariantMap& fs = QVariantMap()); @@ -57,9 +54,6 @@ protected: virtual FormatCheckResult checkRawTextData(const QByteArray& rawData, const GUrl& url = GUrl()) const; virtual Document* loadTextDocument(IOAdapter* io, const U2DbiRef& targetDb, const QVariantMap& hints, U2OpStatus& os); - -private: - QString formatName; }; class WorkflowGObject : public GObject { diff --git a/src/plugins/workflow_designer/src/WorkflowEditor.cpp b/src/plugins/workflow_designer/src/WorkflowEditor.cpp index 162f0290bb4053b70d2bf31b05bbddda6c56ee7d..2b5d09182f01e9f869e2a21f68748219d1e10f30 100644 --- a/src/plugins/workflow_designer/src/WorkflowEditor.cpp +++ b/src/plugins/workflow_designer/src/WorkflowEditor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -68,7 +68,7 @@ WorkflowEditor::WorkflowEditor(WorkflowView *p) specialParameters->hide(); #ifdef Q_OS_MAC - QString style("QGroupBox::title {margin-top: 1px; margin-left: 15px;}"); + QString style("QGroupBox::title {margin-bottom: 9px;}"); editorBox->setStyleSheet(style); #endif @@ -92,7 +92,7 @@ WorkflowEditor::WorkflowEditor(WorkflowView *p) outputPortBox->setVisible(true); connect(outputPortBox, SIGNAL(toggled(bool)), SLOT(sl_changeVisibleOutput(bool))); - caption->setMinimumHeight(nameEdit->sizeHint().height()); + connect(paramBox, SIGNAL(toggled(bool)), SLOT(sl_changeVisibleParameters(bool))); actorModel = new ActorCfgModel(this, owner); proxyModel = new ActorCfgFilterProxyModel(this); @@ -203,6 +203,8 @@ void WorkflowEditor::createInputPortTable(Actor* a) { if (inputPortBox->isChecked()) { changeSizes(inputPortBox, inputHeight); + } else { + sl_changeVisibleInput(false); } } else { inputPortBox->setEnabled(false); @@ -235,6 +237,8 @@ void WorkflowEditor::createOutputPortTable(Actor* a) { if (outputPortBox->isChecked()) { changeSizes(outputPortBox, outputHeight); + } else { + sl_changeVisibleOutput(false); } } else { outputPortBox->setEnabled(false); @@ -396,6 +400,17 @@ void WorkflowEditor::editActor(Actor* a) { } } +void WorkflowEditor::sl_changeVisibleParameters(bool isChecked) { + this->tableSplitter->setVisible(isChecked); + if (!isChecked) { + paramBox->resize(0, 0); + changeSizes(paramBox, 0); + } else { + changeSizes(paramBox, paramHeight); + } + this->paramBox->adjustSize(); +} + void WorkflowEditor::sl_changeVisibleInput(bool isChecked) { CHECK(!inputPortWidget.isEmpty(), ); inputScrollArea->setVisible(isChecked); @@ -405,6 +420,7 @@ void WorkflowEditor::sl_changeVisibleInput(bool isChecked) { } else { changeSizes(inputPortBox, inputHeight); } + inputPortBox->adjustSize(); } void WorkflowEditor::sl_changeVisibleOutput(bool isChecked) { @@ -416,6 +432,7 @@ void WorkflowEditor::sl_changeVisibleOutput(bool isChecked) { } else { changeSizes(outputPortBox, outputHeight); } + outputPortBox->adjustSize(); } void WorkflowEditor::editPort(Port* p) { @@ -487,7 +504,6 @@ void WorkflowEditor::edit(Configuration* cfg) { if(customWidget) { connect(paramBox, SIGNAL(toggled(bool)), customWidget, SLOT(setVisible(bool))); - connect(paramBox, SIGNAL(toggled(bool)), SLOT(sl_resizeSplitter(bool))); } if (subject && !customWidget) { @@ -495,8 +511,6 @@ void WorkflowEditor::edit(Configuration* cfg) { actorModel->setActor(actor); updateEditingData(); tableSplitter->setVisible(paramBox->isChecked()); - connect(paramBox, SIGNAL(toggled(bool)), tableSplitter, SLOT(setVisible(bool))); - connect(paramBox, SIGNAL(toggled(bool)), SLOT(sl_resizeSplitter(bool))); } else { tableSplitter->hide(); if (customWidget) { diff --git a/src/plugins/workflow_designer/src/WorkflowEditor.h b/src/plugins/workflow_designer/src/WorkflowEditor.h index e95f012727dfba6f9819686ae21ff784242f1915..db5ac3d6eeca0547064532fef8dcf40094b51599 100644 --- a/src/plugins/workflow_designer/src/WorkflowEditor.h +++ b/src/plugins/workflow_designer/src/WorkflowEditor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -75,6 +75,7 @@ private slots: void handleDataChanged(const QModelIndex & topLeft, const QModelIndex & bottomRight); void editingLabelFinished(); void sl_showPropDoc(); + void sl_changeVisibleParameters(bool); void sl_changeVisibleInput(bool); void sl_changeVisibleOutput(bool); void sl_showDoc(const QString&); diff --git a/src/plugins/workflow_designer/src/WorkflowEditorDelegates.cpp b/src/plugins/workflow_designer/src/WorkflowEditorDelegates.cpp index bdc13a25644d1964308c24fbc18a7378a2692e16..5b04cb5e9dc49301a300a55fdc72bc6abdea0487 100644 --- a/src/plugins/workflow_designer/src/WorkflowEditorDelegates.cpp +++ b/src/plugins/workflow_designer/src/WorkflowEditorDelegates.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,7 +32,7 @@ QWidget *ProxyDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem //if (owner->custom) QWidget* editor; { - QItemDelegate* itemDelegate = index.model()->data(index, DelegateRole).value<PropertyDelegate*>(); + PropertyDelegate* itemDelegate = index.model()->data(index, DelegateRole).value<PropertyDelegate*>(); if (itemDelegate) { connect(itemDelegate, SIGNAL(commitData(QWidget*)), SIGNAL(commitData(QWidget*))); editor = itemDelegate->createEditor(parent, option, index); @@ -47,7 +47,7 @@ QWidget *ProxyDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem void ProxyDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const { //if (owner->custom) { - QItemDelegate* itemDelegate = index.model()->data(index, DelegateRole).value<PropertyDelegate*>(); + PropertyDelegate* itemDelegate = index.model()->data(index, DelegateRole).value<PropertyDelegate*>(); if (itemDelegate) { itemDelegate->setEditorData(editor, index); return; diff --git a/src/plugins/workflow_designer/src/WorkflowEditorDelegates.h b/src/plugins/workflow_designer/src/WorkflowEditorDelegates.h index 453fc6f8e163af767bcad1839c8c01c1199ff4fd..cedb72170c702d933ae21edb9be02bff43fdbf0f 100644 --- a/src/plugins/workflow_designer/src/WorkflowEditorDelegates.h +++ b/src/plugins/workflow_designer/src/WorkflowEditorDelegates.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/WorkflowEditorWidget.ui b/src/plugins/workflow_designer/src/WorkflowEditorWidget.ui index b349addc78470609ac2cb864a37ce0bb3327ca4f..24157ad91ebdfcbc11608715e8f34aa57ac3d576 100644 --- a/src/plugins/workflow_designer/src/WorkflowEditorWidget.ui +++ b/src/plugins/workflow_designer/src/WorkflowEditorWidget.ui @@ -201,7 +201,7 @@ QGroupBox::indicator:checked { <number>0</number> </property> <property name="topMargin"> - <number>3</number> + <number>10</number> </property> <property name="rightMargin"> <number>0</number> @@ -291,7 +291,7 @@ QGroupBox::indicator:checked { <bool>true</bool> </property> <property name="checked"> - <bool>true</bool> + <bool>false</bool> </property> <layout class="QVBoxLayout" name="inputLayout"> <property name="spacing"> @@ -304,7 +304,7 @@ QGroupBox::indicator:checked { <number>0</number> </property> <property name="topMargin"> - <number>3</number> + <number>10</number> </property> <property name="rightMargin"> <number>0</number> @@ -323,7 +323,7 @@ QGroupBox::indicator:checked { <x>0</x> <y>0</y> <width>288</width> - <height>69</height> + <height>68</height> </rect> </property> </widget> @@ -348,7 +348,7 @@ QGroupBox::indicator:checked { <bool>true</bool> </property> <property name="checked"> - <bool>true</bool> + <bool>false</bool> </property> <layout class="QVBoxLayout" name="outputLayout"> <property name="spacing"> @@ -361,7 +361,7 @@ QGroupBox::indicator:checked { <number>0</number> </property> <property name="topMargin"> - <number>3</number> + <number>10</number> </property> <property name="rightMargin"> <number>0</number> @@ -380,7 +380,7 @@ QGroupBox::indicator:checked { <x>0</x> <y>0</y> <width>288</width> - <height>69</height> + <height>68</height> </rect> </property> </widget> diff --git a/src/plugins/workflow_designer/src/WorkflowInvestigationWidgetsController.cpp b/src/plugins/workflow_designer/src/WorkflowInvestigationWidgetsController.cpp index 59b58d71b216808667e39b5e1c88c31b8d2abfc0..e45d05a155f9f7c6b1e4d8f0db0f54822a823e66 100644 --- a/src/plugins/workflow_designer/src/WorkflowInvestigationWidgetsController.cpp +++ b/src/plugins/workflow_designer/src/WorkflowInvestigationWidgetsController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/WorkflowInvestigationWidgetsController.h b/src/plugins/workflow_designer/src/WorkflowInvestigationWidgetsController.h index 7d37992f11fc0e5d43edacaf3ed60ee8f4f5d9bf..6c7905253198d8f82823fa61820d45d28168f29f 100644 --- a/src/plugins/workflow_designer/src/WorkflowInvestigationWidgetsController.h +++ b/src/plugins/workflow_designer/src/WorkflowInvestigationWidgetsController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/WorkflowMetaDialog.cpp b/src/plugins/workflow_designer/src/WorkflowMetaDialog.cpp index 88ae15b4ef27c760c324c2f84996b83cfc1da25c..4b9af8d1e82405dcd0640dc7ac2726708e5a1df9 100644 --- a/src/plugins/workflow_designer/src/WorkflowMetaDialog.cpp +++ b/src/plugins/workflow_designer/src/WorkflowMetaDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -42,7 +42,7 @@ WorkflowMetaDialog::WorkflowMetaDialog(QWidget * p, const Metadata& meta) meta(meta), saveController(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22056222"); + new HelpButton(this, buttonBox, "24740109"); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); diff --git a/src/plugins/workflow_designer/src/WorkflowMetaDialog.h b/src/plugins/workflow_designer/src/WorkflowMetaDialog.h index a358ef21352c4b10896a48448be2cbf169ed0291..4a4f2c2786d12e8b5a0f2abc0bfedf4926b97495 100644 --- a/src/plugins/workflow_designer/src/WorkflowMetaDialog.h +++ b/src/plugins/workflow_designer/src/WorkflowMetaDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/WorkflowPalette.cpp b/src/plugins/workflow_designer/src/WorkflowPalette.cpp index 0e86a1f1f61c1889a442de7247e318ef57f9b0b0..88b1d7934d542c43b6609a93628773c5a1d0dc31 100644 --- a/src/plugins/workflow_designer/src/WorkflowPalette.cpp +++ b/src/plugins/workflow_designer/src/WorkflowPalette.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,51 +19,39 @@ * MA 02110-1301, USA. */ -#include <QAbstractItemModel> -#include <QAction> -#include <QApplication> -#include <QButtonGroup> -#include <QContextMenuEvent> -#include <QDir> #include <QDrag> -#include <QHeaderView> -#include <QItemDelegate> #include <QMenu> #include <QMessageBox> -#include <QPainter> -#include <QStyle> -#include <QToolBox> -#include <QToolButton> -#include <QTreeView> - -#include <U2Core/AppContext.h> -#include <U2Core/Log.h> + #include <U2Core/QObjectScopedPointer.h> -#include <U2Core/Settings.h> -#include <U2Core/U2SafePoints.h> #include <U2Lang/ActorPrototypeRegistry.h> #include <U2Lang/BaseActorCategories.h> -#include <U2Lang/WorkflowEnv.h> +#include <U2Lang/IncludedProtoFactory.h> +#include <U2Lang/QueryDesignerRegistry.h> +#include <U2Lang/WorkflowContext.h> #include <U2Lang/WorkflowSettings.h> #include "CreateScriptWorker.h" #include "WorkflowPalette.h" #include "WorkflowSamples.h" -#include "library/CreateExternalProcessDialog.h" +#include "WorkflowViewController.h" #include "library/ExternalProcessWorker.h" +#include "library/IncludedProtoFactoryImpl.h" #include "library/ScriptWorker.h" +#include "library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.h" +#include "util/CustomWorkerUtils.h" namespace U2 { const QString WorkflowPalette::MIME_TYPE("application/x-ugene-workflow-id"); -WorkflowPalette::WorkflowPalette(ActorPrototypeRegistry* reg, QWidget *parent) +WorkflowPalette::WorkflowPalette(ActorPrototypeRegistry* reg, SchemaConfig* schemaConfig, QWidget *parent) : QWidget(parent) { setupUi(this); nameFilter = new NameFilterLayout(NULL); - elementsList = new WorkflowPaletteElements(reg, this); + elementsList = new WorkflowPaletteElements(reg, schemaConfig, this); setFocusPolicy(Qt::NoFocus); setMouseTracking(true); @@ -72,7 +60,7 @@ WorkflowPalette::WorkflowPalette(ActorPrototypeRegistry* reg, QWidget *parent) vl->addWidget(elementsList); connect(elementsList, SIGNAL(processSelected(Workflow::ActorPrototype*, bool)), SIGNAL(processSelected(Workflow::ActorPrototype*, bool))); - connect(elementsList, SIGNAL(si_protoDeleted(const QString &)), SIGNAL(si_protoDeleted(const QString &))); + connect(elementsList, SIGNAL(si_prototypeIsAboutToBeRemoved(Workflow::ActorPrototype *)), SIGNAL(si_prototypeIsAboutToBeRemoved(Workflow::ActorPrototype *))); connect(elementsList, SIGNAL(si_protoChanged()), SIGNAL(si_protoChanged())); connect(elementsList, SIGNAL(si_protoListModified()), SIGNAL(si_protoListModified())); @@ -101,6 +89,14 @@ void WorkflowPalette::restoreState(const QVariant& v) { elementsList->restoreState(v); } +QString WorkflowPalette::createPrototype() { + return elementsList->createPrototype(); +} + +bool WorkflowPalette::editPrototype(ActorPrototype *proto) { + return elementsList->editPrototype(proto); +} + class PaletteDelegate: public QItemDelegate { public: PaletteDelegate(WorkflowPaletteElements *view) : QItemDelegate(view), m_view(view){} @@ -205,8 +201,8 @@ QSize PaletteDelegate::sizeHint(const QStyleOptionViewItem &opt, const QModelInd /************************************************************************/ /* WorkflowPaletteElements */ /************************************************************************/ -WorkflowPaletteElements::WorkflowPaletteElements(ActorPrototypeRegistry* reg, QWidget *parent) -: QTreeWidget(parent), overItem(NULL), currentAction(NULL), protoRegistry(reg) +WorkflowPaletteElements::WorkflowPaletteElements(ActorPrototypeRegistry* reg, SchemaConfig* _schemaConfig, QWidget *parent) +: QTreeWidget(parent), overItem(NULL), currentAction(NULL), protoRegistry(reg), schemaConfig(_schemaConfig) { setFocusPolicy(Qt::NoFocus); setSelectionMode(QAbstractItemView::NoSelection); @@ -221,6 +217,7 @@ WorkflowPaletteElements::WorkflowPaletteElements(ActorPrototypeRegistry* reg, QW //setTextElideMode (Qt::ElideMiddle); setContent(reg); connect(reg, SIGNAL(si_registryModified()), SLOT(rebuild())); + connect(this, SIGNAL(si_prototypeIsAboutToBeRemoved(Workflow::ActorPrototype *)), SLOT(sl_prototypeIsAboutToBeRemoved(Workflow::ActorPrototype *))); this->setObjectName("WorkflowPaletteElements"); } @@ -284,6 +281,7 @@ void WorkflowPaletteElements::createMenu(QMenu *menu) { void WorkflowPaletteElements::setContent(ActorPrototypeRegistry* reg) { QMapIterator<Descriptor, QList<ActorPrototype*> > it(reg->getProtos()); categoryMap.clear(); + actionMap.clear(); while (it.hasNext()) { it.next(); QTreeWidgetItem* category = NULL; @@ -333,6 +331,7 @@ void WorkflowPaletteElements::rebuild() { if (reg) { QVariant saved = saveState(); + overItem = nullptr; clear(); setContent(reg); QVariant changed = changeState(saved); @@ -421,6 +420,15 @@ QAction* WorkflowPaletteElements::createItemAction(ActorPrototype* item) { return a; } +QAction *WorkflowPaletteElements::getActionByProto(Workflow::ActorPrototype *proto) const { + foreach (QAction *action, actionMap.keys()) { + if (proto == action->data().value<ActorPrototype *>()) { + return action; + } + } + return nullptr; +} + void WorkflowPaletteElements::resetSelection() { if (currentAction) { currentAction->setChecked(false); @@ -452,6 +460,59 @@ void WorkflowPaletteElements::restoreState(const QVariant& v) { } } +QString WorkflowPaletteElements::createPrototype() { + QObjectScopedPointer<CreateCmdlineBasedWorkerWizard> dlg = new CreateCmdlineBasedWorkerWizard(schemaConfig, this); + dlg->exec(); + CHECK(!dlg.isNull(), QString()); + + if (dlg->result() == QDialog::Accepted) { + QScopedPointer<ExternalProcessConfig> cfg(dlg->takeConfig()); + CreateCmdlineBasedWorkerWizard::saveConfig(cfg.data()); + if (LocalWorkflow::ExternalProcessWorkerFactory::init(cfg.data())) { + const QString id = cfg->id; + cfg.take(); + return id; + } + } + return QString(); +} + +bool WorkflowPaletteElements::editPrototype(ActorPrototype *proto) { + if (!isExclusivePrototypeUsage(proto)) { + QMessageBox::warning(this, + tr("Unable to Edit Element"), + tr("The element with external tool is used in other Workflow Designer window(s). " + "Please remove these instances to be able to edit the element configuration."), + QMessageBox::Ok); + return false; + } + ExternalProcessConfig *oldCfg = WorkflowEnv::getExternalCfgRegistry()->getConfigById(proto->getId()); + QObjectScopedPointer<CreateCmdlineBasedWorkerWizard> dlg = new CreateCmdlineBasedWorkerWizard(schemaConfig, oldCfg, this); + dlg->exec(); + CHECK(!dlg.isNull(), false); + + bool result = false; + if (dlg->result() == QDialog::Accepted) { + QScopedPointer<ExternalProcessConfig> newCfg(dlg->takeConfig()); + + if (CreateCmdlineBasedWorkerWizard::isRequiredToRemoveElementFromScene(oldCfg, newCfg.data())) { + removePrototype(proto); + CreateCmdlineBasedWorkerWizard::saveConfig(newCfg.data()); + if (LocalWorkflow::ExternalProcessWorkerFactory::init(newCfg.data())) { + newCfg.take(); + result = true; + } + } else { + result = editPrototypeWithoutElementRemoving(proto, newCfg.take()); + } + } + if (result) { + emit si_protoChanged(); + } + + return result; +} + void WorkflowPaletteElements::handleItemAction() { QAction* a = qobject_cast<QAction*>(sender()); assert(a); @@ -485,11 +546,11 @@ void WorkflowPaletteElements::sl_selectProcess(bool checked) { void WorkflowPaletteElements::editElement() { ActorPrototype *proto = currentAction->data().value<ActorPrototype *>(); - QString oldName = proto->getDisplayName(); ActorPrototypeRegistry *reg = WorkflowEnv::getProtoRegistry(); QMap<Descriptor, QList<ActorPrototype*> > categories = reg->getProtos(); if(categories.value(BaseActorCategories::CATEGORY_SCRIPT()).contains(proto)) { + QString oldName = proto->getDisplayName(); QObjectScopedPointer<CreateScriptElementDialog> dlg = new CreateScriptElementDialog(this, proto); dlg->exec(); CHECK(!dlg.isNull(), ); @@ -507,40 +568,13 @@ void WorkflowPaletteElements::editElement() { if(oldName != name) { removeElement(); } else { - QString id = proto->getId(); - emit si_protoDeleted(id); + emit si_prototypeIsAboutToBeRemoved(proto); reg->unregisterProto(proto->getId()); } LocalWorkflow::ScriptWorkerFactory::init(input, output, attrs, name, desc, dlg->getActorFilePath()); } } else { //External process category - ExternalProcessConfig *oldCfg = WorkflowEnv::getExternalCfgRegistry()->getConfigByName(proto->getId()); - ExternalProcessConfig *cfg = new ExternalProcessConfig(*oldCfg); - QObjectScopedPointer<CreateExternalProcessDialog> dlg = new CreateExternalProcessDialog(this, cfg, false); - dlg->exec(); - CHECK(!dlg.isNull(), ); - - if (dlg->result() == QDialog::Accepted) { - cfg = dlg->config(); - - bool deleted = true; - if (!(*oldCfg == *cfg)) { - if(oldName != cfg->name) { - deleted = removeElement(); - } else { - emit si_protoDeleted(proto->getId()); - reg->unregisterProto(proto->getId()); - delete proto; - } - - LocalWorkflow::ExternalProcessWorkerFactory::init(cfg); - } - if (deleted) { - WorkflowEnv::getExternalCfgRegistry()->unregisterConfig(oldName); - } - WorkflowEnv::getExternalCfgRegistry()->registerExternalTool(cfg); - emit si_protoChanged(); - } + editPrototype(proto); } } @@ -554,37 +588,26 @@ bool WorkflowPaletteElements::removeElement() { msg->exec(); CHECK(!msg.isNull(), false); - if(msg->result() == QMessageBox::Cancel) { + if (msg->result() == QMessageBox::Cancel) { return false; } - ActorPrototype *proto = currentAction->data().value<ActorPrototype *>(); + removePrototype(currentAction->data().value<ActorPrototype *>()); + return true; +} - QString path = WorkflowSettings::getUserDirectory(); +void WorkflowPaletteElements::sl_prototypeIsAboutToBeRemoved(ActorPrototype *proto) { + QAction *action = getActionByProto(proto); - QString fileName = path + proto->getDisplayName() + ".usa"; //use constant - if(!QFile::exists(fileName)) { - fileName = WorkflowSettings::getExternalToolDirectory() + proto->getDisplayName() + ".etc"; - } - QFile::setPermissions(fileName, QFile::ReadOwner | QFile::WriteOwner); - if(!QFile::remove(fileName)) { - uiLog.error(tr("Can't remove element %1").arg(proto->getDisplayName())); - return true; + for (auto &actionsList : categoryMap) { + actionsList.removeAll(action); } - // remove proto from categoryMap - QMap<QString, QList<QAction*> >::iterator i = categoryMap.begin(); - for(; i != categoryMap.end(); i++) { - i->removeAll(currentAction); + if (currentAction == action) { + resetSelection(); } - // unresister prototype - QString id = proto->getId(); - emit si_protoDeleted(id); - ActorPrototypeRegistry *reg = WorkflowEnv::getProtoRegistry(); - assert(reg); - reg->unregisterProto(id); - return true; + actionMap.remove(action); } void WorkflowPaletteElements::contextMenuEvent(QContextMenuEvent *e) @@ -690,6 +713,83 @@ QVariant WorkflowPaletteElements::changeState(const QVariant& savedState){ return m; } +void WorkflowPaletteElements::removePrototype(ActorPrototype *proto) { + if (!isExclusivePrototypeUsage(proto)) { + QMessageBox::warning(this, + tr("Unable to Remove Element"), + tr("The element with external tool is used in other Workflow Designer window(s). " + "Please remove these instances to be able to remove the element configuration."), + QMessageBox::Yes); + return; + } + emit si_prototypeIsAboutToBeRemoved(proto); + + if (!QFile::remove(proto->getFilePath())) { + uiLog.error(tr("Can't remove element '%1'").arg(proto->getDisplayName())); + } + + delete IncludedProtoFactory::unregisterExternalToolWorker(proto->getId()); + delete WorkflowEnv::getProtoRegistry()->unregisterProto(proto->getId()); +} + +bool WorkflowPaletteElements::editPrototypeWithoutElementRemoving(Workflow::ActorPrototype* proto, ExternalProcessConfig* newConfig) { + replaceConfigFiles(proto, newConfig); + + ExternalProcessConfig* currentConfig = IncludedProtoFactory::getExternalToolWorker(proto->getId()); + SAFE_POINT(nullptr != currentConfig, "ExternalProcessConfig is absent", false); + + replaceOldConfigWithNewConfig(currentConfig, newConfig); + + proto->setDisplayName(currentConfig->name); + proto->setDocumentation(currentConfig->description); + + QStringList commandIdList = CustomWorkerUtils::getToolIdsFromCommand(currentConfig->cmdLine); + proto->clearExternalTools(); + foreach(const QString & id, commandIdList) { + proto->addExternalTool(id); + } + + rebuild(); + + return true; +} + +void WorkflowPaletteElements::replaceConfigFiles(Workflow::ActorPrototype* proto, ExternalProcessConfig* newConfig) { + if (!QFile::remove(proto->getFilePath())) { + uiLog.error(tr("Can't remove element '%1'").arg(proto->getDisplayName())); + } + CreateCmdlineBasedWorkerWizard::saveConfig(newConfig); + proto->setNonStandard(newConfig->filePath); +} + +void WorkflowPaletteElements::replaceOldConfigWithNewConfig(ExternalProcessConfig* oldConfig, ExternalProcessConfig* newConfig) { + oldConfig->cmdLine = newConfig->cmdLine; + oldConfig->name = newConfig->name; + oldConfig->description = newConfig->description; + oldConfig->templateDescription = newConfig->templateDescription; + oldConfig->filePath = newConfig->filePath; + oldConfig->useIntegratedTool = newConfig->useIntegratedTool; + oldConfig->customToolPath = newConfig->customToolPath; + oldConfig->integratedToolId = newConfig->integratedToolId; +} + +bool WorkflowPaletteElements::isExclusivePrototypeUsage(ActorPrototype* proto) const { + WorkflowView* wv = dynamic_cast<WorkflowView*>(schemaConfig); + CHECK(wv != nullptr, false); + int actorWithCurrentProtoCounter = 0; + for (auto actor : wv->getSchema()->getProcesses()) { + if (actor->getProto() == proto) { + actorWithCurrentProtoCounter++; + } + } + Actor* currentActor = wv->getActor(); + if (currentActor != nullptr && currentActor->getProto() == proto) { + actorWithCurrentProtoCounter++; + } + bool result = actorWithCurrentProtoCounter == proto->getUsageCounter(); + return result; +} + void WorkflowPaletteElements::sl_nameFilterChanged(const QString &filter) { overItem = NULL; oldNameFilter = nameFilter; diff --git a/src/plugins/workflow_designer/src/WorkflowPalette.h b/src/plugins/workflow_designer/src/WorkflowPalette.h index b495c987ee27cd980f635c342778061fcd206b84..c2160ce5ac6441511dc80ea349d5f85f3d0c7c98 100644 --- a/src/plugins/workflow_designer/src/WorkflowPalette.h +++ b/src/plugins/workflow_designer/src/WorkflowPalette.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -32,6 +32,7 @@ namespace U2 { using namespace Workflow; +class ExternalProcessConfig; class NameFilterLayout; class WorkflowView; class WorkflowScene; @@ -44,19 +45,22 @@ class WorkflowPalette : public QWidget, Ui_PaletteWidget public: static const QString MIME_TYPE; - WorkflowPalette(ActorPrototypeRegistry* reg, QWidget *parent = 0); + WorkflowPalette(ActorPrototypeRegistry* reg, SchemaConfig* schemaConfig, QWidget *parent = 0); QMenu * createMenu(const QString &name); void createMenu(QMenu *menu); QVariant saveState() const; void restoreState(const QVariant&); + QString createPrototype(); + bool editPrototype(ActorPrototype *proto); + public slots: void resetSelection(); signals: void processSelected(Workflow::ActorPrototype*, bool); - void si_protoDeleted(const QString &); + void si_prototypeIsAboutToBeRemoved(Workflow::ActorPrototype *proto); void si_protoChanged(); void si_protoListModified(); private: @@ -70,26 +74,30 @@ class WorkflowPaletteElements : public QTreeWidget { public: - WorkflowPaletteElements(ActorPrototypeRegistry* reg, QWidget *parent = 0); + WorkflowPaletteElements(ActorPrototypeRegistry* reg, SchemaConfig* schemaConfig, QWidget *parent = 0); QMenu * createMenu(const QString &name); void createMenu(QMenu *menu); QVariant saveState() const; void restoreState(const QVariant&); + QString createPrototype(); + bool editPrototype(ActorPrototype *proto); + public slots: void resetSelection(); void sl_nameFilterChanged(const QString &filter); signals: void processSelected(Workflow::ActorPrototype*, bool putToScene); - void si_protoDeleted(const QString &); + void si_prototypeIsAboutToBeRemoved(Workflow::ActorPrototype *proto); void si_protoChanged(); void si_protoListModified(); protected: void contextMenuEvent(QContextMenuEvent *e); - void mouseMoveEvent ( QMouseEvent * event ); + + void mouseMoveEvent(QMouseEvent* event); void mousePressEvent ( QMouseEvent * event ); void leaveEvent ( QEvent * event ); @@ -99,13 +107,20 @@ private slots: void rebuild(); void editElement(); bool removeElement(); + void sl_prototypeIsAboutToBeRemoved(Workflow::ActorPrototype *proto); private: QTreeWidgetItem* createItemWidget(QAction* a); QAction* createItemAction(Workflow::ActorPrototype* item); + QAction *getActionByProto(Workflow::ActorPrototype *proto) const; void setContent(ActorPrototypeRegistry*); void sortTree(); QVariant changeState(const QVariant& v); + void removePrototype(Workflow::ActorPrototype *proto); + bool editPrototypeWithoutElementRemoving(Workflow::ActorPrototype* proto, ExternalProcessConfig* newConfig); + void replaceConfigFiles(Workflow::ActorPrototype* proto, ExternalProcessConfig* newConfig); + void replaceOldConfigWithNewConfig(ExternalProcessConfig* oldConfig, ExternalProcessConfig* newConfig); + bool isExclusivePrototypeUsage(ActorPrototype* proto) const; private: QMap<QString,QList<QAction*> > categoryMap; @@ -118,6 +133,7 @@ private: ActorPrototypeRegistry *protoRegistry; QVariantMap expandState; + SchemaConfig* schemaConfig; friend class PaletteDelegate; }; diff --git a/src/plugins/workflow_designer/src/WorkflowSamples.cpp b/src/plugins/workflow_designer/src/WorkflowSamples.cpp index 85e04bda5ea07027b0a23284ae57a5b1ec1ead33..b3f5879bbb2f6e243de680cbd42c14ceb0f77c45 100644 --- a/src/plugins/workflow_designer/src/WorkflowSamples.cpp +++ b/src/plugins/workflow_designer/src/WorkflowSamples.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/WorkflowSamples.h b/src/plugins/workflow_designer/src/WorkflowSamples.h index ec87f6e632da0a543baed970002303af6200618c..c80767fa3cf667110e692a57a3e6fc6917b30fd8 100644 --- a/src/plugins/workflow_designer/src/WorkflowSamples.h +++ b/src/plugins/workflow_designer/src/WorkflowSamples.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/WorkflowSceneIOTasks.cpp b/src/plugins/workflow_designer/src/WorkflowSceneIOTasks.cpp index 168b39441c2df18fb5f76123265dbe5263365206..d11a531af7c868e6ec541421427dcdb678361831 100644 --- a/src/plugins/workflow_designer/src/WorkflowSceneIOTasks.cpp +++ b/src/plugins/workflow_designer/src/WorkflowSceneIOTasks.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/WorkflowSceneIOTasks.h b/src/plugins/workflow_designer/src/WorkflowSceneIOTasks.h index ba3dca43e691f8ecf809f5ded1ef79ca148aad79..78e2acc723dfc6511832d4ac587669ea3012f6eb 100644 --- a/src/plugins/workflow_designer/src/WorkflowSceneIOTasks.h +++ b/src/plugins/workflow_designer/src/WorkflowSceneIOTasks.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/WorkflowSettingsController.cpp b/src/plugins/workflow_designer/src/WorkflowSettingsController.cpp index f6acfa9c4b0eed5d2e7a1fa0c8db8d068132bd81..a05f102e384a50c61d4b4af3a111d0b5cfd7aaa9 100644 --- a/src/plugins/workflow_designer/src/WorkflowSettingsController.cpp +++ b/src/plugins/workflow_designer/src/WorkflowSettingsController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,6 +26,8 @@ #include <U2Core/AppContext.h> #include <U2Core/Version.h> +#include <U2Designer/DashboardInfoRegistry.h> + #include <U2Lang/WorkflowSettings.h> #include "WorkflowSettingsController.h" @@ -66,7 +68,13 @@ void WorkflowSettingsPageController::saveState(AppSettingsGUIPageState* s) { WorkflowSettings::setBGColor(state->color); WorkflowSettings::setExternalToolDirectory(state->externalToolCfgDir); WorkflowSettings::setIncludedElementsDirectory(state->includedElementsDir); + + const QString previousWWorkflowOutputDirectory = WorkflowSettings::getWorkflowOutputDirectory(); WorkflowSettings::setWorkflowOutputDirectory(state->workflowOutputDir); + + if (previousWWorkflowOutputDirectory != state->workflowOutputDir) { + AppContext::getDashboardInfoRegistry()->scanDashboardsDir(); + } } AppSettingsGUIPageWidget* WorkflowSettingsPageController::createWidget(AppSettingsGUIPageState* state) { @@ -75,7 +83,7 @@ AppSettingsGUIPageWidget* WorkflowSettingsPageController::createWidget(AppSettin return r; } -const QString WorkflowSettingsPageController::helpPageId = QString("22055812"); +const QString WorkflowSettingsPageController::helpPageId = QString("24742347"); WorkflowSettingsPageWidget::WorkflowSettingsPageWidget(WorkflowSettingsPageController* ) { setupUi(this); diff --git a/src/plugins/workflow_designer/src/WorkflowSettingsController.h b/src/plugins/workflow_designer/src/WorkflowSettingsController.h index ce102e0626be64f6061acaf171a19e678304fd43..bf42075a748e34820d77ce1b4c67d2c47e365f0a 100644 --- a/src/plugins/workflow_designer/src/WorkflowSettingsController.h +++ b/src/plugins/workflow_designer/src/WorkflowSettingsController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/WorkflowSettingsWidget.ui b/src/plugins/workflow_designer/src/WorkflowSettingsWidget.ui index b424c2180c821960cbd4785420720f814e6dfa78..b368f8a19892e5eaa9e1d2061fec5a16a247d1eb 100644 --- a/src/plugins/workflow_designer/src/WorkflowSettingsWidget.ui +++ b/src/plugins/workflow_designer/src/WorkflowSettingsWidget.ui @@ -151,7 +151,7 @@ <item> <widget class="QLabel" name="label_5"> <property name="text"> - <string>Directory for custom elements with command line tools</string> + <string>Directory for custom elements with external tools</string> </property> </widget> </item> diff --git a/src/plugins/workflow_designer/src/WorkflowTabView.cpp b/src/plugins/workflow_designer/src/WorkflowTabView.cpp index d6c42f289d511802703720c1dff86687c60d5b7d..87fcb26c0d137c5a134925741cd707ee45815de7 100644 --- a/src/plugins/workflow_designer/src/WorkflowTabView.cpp +++ b/src/plugins/workflow_designer/src/WorkflowTabView.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,20 +19,23 @@ * MA 02110-1301, USA. */ -#include <QMouseEvent> #include <QGraphicsView> #include <QInputDialog> #include <QMenu> +#include <QMouseEvent> #include <QPushButton> #include <QTabBar> #include <QVBoxLayout> #include <U2Core/AppContext.h> +#include <U2Core/SignalBlocker.h> #include <U2Core/U2SafePoints.h> -#include "WorkflowViewController.h" +#include <U2Designer/DashboardInfoRegistry.h> +#include <U2Designer/ScanDashboardsDirTask.h> #include "WorkflowTabView.h" +#include "WorkflowViewController.h" namespace U2 { @@ -55,7 +58,8 @@ private: }; WorkflowTabView::WorkflowTabView(WorkflowView *_parent) -: QTabWidget(_parent), parent(_parent) + : QTabWidget(_parent), + parent(_parent) { setUsesScrollButtons(true); setTabPosition(QTabWidget::North); @@ -69,13 +73,13 @@ WorkflowTabView::WorkflowTabView(WorkflowView *_parent) } setDocumentMode(true); - ScanDashboardsDirTask *t = new ScanDashboardsDirTask(); - connect(t, SIGNAL(si_stateChanged()), SLOT(sl_dashboardsLoaded())); - AppContext::getTaskScheduler()->registerTopLevelTask(t); + connect(this, SIGNAL(currentChanged(int)), SLOT(sl_showDashboard(int))); + tabBar()->installEventFilter(this); - connect(this, SIGNAL(currentChanged(int)), SLOT(sl_showDashboard(int))); setObjectName("WorkflowTabView"); + sl_dashboardsListChanged(AppContext::getDashboardInfoRegistry()->getAllIds(), QStringList()); + RegistryConnectionBlocker::connectRegistry(this); } void WorkflowTabView::sl_showDashboard(int idx) { @@ -94,10 +98,14 @@ void WorkflowTabView::sl_workflowStateChanged(bool isRunning) { closeButton->setEnabled(!isRunning); } -int WorkflowTabView::addDashboard(Dashboard *db) { +int WorkflowTabView::appendDashboard(Dashboard *db) { + RegistryConnectionBlocker registryConnectionBlocker(this); + Q_UNUSED(registryConnectionBlocker); + if (db->getName().isEmpty()) { db->setName(generateName()); } + int idx = addTab(db, db->getName()); CloseButton *closeButton = new CloseButton(db); @@ -110,13 +118,24 @@ int WorkflowTabView::addDashboard(Dashboard *db) { connect(db, SIGNAL(si_loadSchema(const QString &)), parent, SLOT(sl_loadScene(const QString &))); connect(db, SIGNAL(si_hideLoadBtnHint()), this, SIGNAL(si_hideLoadBtnHint())); connect(this, SIGNAL(si_hideLoadBtnHint()), db, SLOT(sl_hideLoadBtnHint())); + emit si_countChanged(); return idx; } +void WorkflowTabView::removeDashboard(Dashboard *dashboard) { + CHECK(!dashboard->isWorkflowInProgress(), ); + removeTab(indexOf(dashboard)); + delete dashboard; + emit si_countChanged(); +} + void WorkflowTabView::addDashboard(WorkflowMonitor *monitor, const QString &baseName) { + RegistryConnectionBlocker registryConnectionBlocker(this); + Q_UNUSED(registryConnectionBlocker); + QString name = generateName(baseName); - int idx = addDashboard(new Dashboard(monitor, name, this)); + int idx = appendDashboard(new Dashboard(monitor, name, this)); setCurrentIndex(idx); } @@ -124,32 +143,10 @@ bool WorkflowTabView::hasDashboards() const { return count() > 0; } -void WorkflowTabView::updateDashboards(const QList<DashboardInfo> &dashboards) { - QList<DashboardInfo> dbs = dashboards; - int i = 0; - while (i < count()) { - Dashboard *db = dynamic_cast<Dashboard*>(widget(i)); - if (db->isWorkflowInProgress()) { - i++; - continue; - } - DashboardInfo info(db->directory()); - if (dbs.contains(info)) { - dbs.removeOne(info); - i++; - } else { - db->setClosed(); - removeTab(i); - delete db; - } - } - foreach (const DashboardInfo &info, dbs) { - addDashboard(new Dashboard(info.path, this)); - } - emit si_countChanged(); -} - void WorkflowTabView::sl_closeTab() { + RegistryConnectionBlocker registryConnectionBlocker(this); + Q_UNUSED(registryConnectionBlocker); + CloseButton *button = dynamic_cast<CloseButton*>(sender()); SAFE_POINT(NULL != button, "NULL close button", ); int idx = indexOf(button->content()); @@ -161,6 +158,9 @@ void WorkflowTabView::sl_closeTab() { } void WorkflowTabView::sl_renameTab() { + RegistryConnectionBlocker registryConnectionBlocker(this); + Q_UNUSED(registryConnectionBlocker); + QAction *rename = dynamic_cast<QAction*>(sender()); CHECK(NULL != rename, ); int idx = rename->data().toInt(); @@ -177,29 +177,122 @@ void WorkflowTabView::sl_renameTab() { } } -void WorkflowTabView::sl_dashboardsLoaded() { - ScanDashboardsDirTask *t = dynamic_cast<ScanDashboardsDirTask*>(sender()); - CHECK(NULL != t, ); - CHECK(t->isFinished(), ); +void WorkflowTabView::sl_dashboardsListChanged(const QStringList &added, const QStringList &removed) { + RegistryConnectionBlocker registryConnectionBlocker(this); + Q_UNUSED(registryConnectionBlocker); + + int countBeforeAdding = 0; + { + SignalBlocker signalBlocker(this); + Q_UNUSED(signalBlocker); + + for (int i = count() - 1; i >= 0; --i) { + Dashboard *dashboard = qobject_cast<Dashboard *>(widget(i)); + SAFE_POINT(nullptr != dashboard, "Can't cast QWidget to Dashboard", ); + const QString id = dashboard->getDashboardId(); + + if (removed.contains(id)) { + removeDashboard(dashboard); + } + } + + countBeforeAdding = count(); + + DashboardInfoRegistry *dashboardInfoRegistry = AppContext::getDashboardInfoRegistry(); + const QStringList existingIds = allIds(); + foreach (const QString &dashboardId, added) { + if (!existingIds.contains(dashboardId)) { + const DashboardInfo dashboardInfo = dashboardInfoRegistry->getById(dashboardId); + if (dashboardInfo.opened) { + Dashboard *dashboard = new Dashboard(dashboardInfo.path, this); + appendDashboard(dashboard); + } + } + } + } + + const int countAfterAdding = count(); + if (0 == countBeforeAdding && countAfterAdding > 0) { + const int newIndex = countAfterAdding - 1; + if (newIndex > 0) { + setCurrentIndex(countAfterAdding - 1); + } else { + // emit the signal manually, because signals emitting was blocked during the dashboards adding + emit currentChanged(newIndex); + } + } + + emit si_countChanged(); +} + +void WorkflowTabView::sl_dashboardsChanged(const QStringList &dashboardIds) { + RegistryConnectionBlocker registryConnectionBlocker(this); + Q_UNUSED(registryConnectionBlocker); + + QMap<QString, Dashboard *> dashboardsMap = getDashboards(dashboardIds); + DashboardInfoRegistry *dashboardInfoRegistry = AppContext::getDashboardInfoRegistry(); + foreach (const QString &dashboardId, dashboardsMap.keys()) { + const DashboardInfo dashboardInfo = dashboardInfoRegistry->getById(dashboardId); + Dashboard *dashboard = dashboardsMap[dashboardId]; + if (nullptr == dashboard) { + if (dashboardInfo.opened) { + // Currently the dashboards that become visible are added to the end + appendDashboard(new Dashboard(dashboardInfo.path, this)); + } + continue; + } - foreach (const QString &dbPath, t->getOpenedDashboards()) { - addDashboard(new Dashboard(dbPath, this)); + if (!dashboardInfo.opened) { + dashboard->setClosed(); + removeDashboard(dashboard); + } else if (dashboardInfo.name != dashboard->getName()) { + dashboard->setName(dashboardInfo.name); + } } - int nDashboards = count(); - if (nDashboards > 0) { - setCurrentIndex(nDashboards - 1); +} + +QSet<QString> WorkflowTabView::allNames() const { + QSet<QString> result; + + const QList<DashboardInfo> dashboardInfos = AppContext::getDashboardInfoRegistry()->getAllEntries(); + foreach (const DashboardInfo &dashboardInfo, dashboardInfos) { + result << dashboardInfo.name; } + + result += AppContext::getDashboardInfoRegistry()->getReservedNames(); + + return result; } -QStringList WorkflowTabView::allNames() const { +QStringList WorkflowTabView::allIds() const { QStringList result; - for (int i=0; i<count(); i++) { - Dashboard *db = dynamic_cast<Dashboard*>(widget(i)); - result << db->getName(); + for (int i = 0; i < count(); i++) { + Dashboard *db = qobject_cast<Dashboard *>(widget(i)); + result << db->getDashboardId(); } return result; } +QMap<QString, Dashboard *> WorkflowTabView::getDashboards(const QStringList &dashboardIds) const { + QMap<QString, Dashboard *> result; + for (int i = 0; i < count(); ++i) { + Dashboard *dashboard = qobject_cast<Dashboard *>(widget(i)); + SAFE_POINT(nullptr != dashboard, "Can't cast QWidget to Dashboard", result); + if (dashboardIds.contains(dashboard->getDashboardId())) { + result.insert(dashboard->getDashboardId(), dashboard); + } + } + + if (result.size() != dashboardIds.size()) { + const QSet<QString> difference = dashboardIds.toSet() - result.keys().toSet(); + foreach (const QString &dashboardId, difference) { + result.insert(dashboardId, nullptr); + } + } + + return result; +} + QString WorkflowTabView::generateName(const QString &name) const { QString baseName = name; if (baseName.isEmpty()) { @@ -207,7 +300,7 @@ QString WorkflowTabView::generateName(const QString &name) const { } QString result; - QStringList all = allNames(); + QSet<QString> all = allNames(); int num = 1; do { result = baseName + QString(" %1").arg(num); @@ -242,5 +335,46 @@ bool WorkflowTabView::eventFilter(QObject *watched, QEvent *event) { return false; } +int RegistryConnectionBlocker::count = 0; + +RegistryConnectionBlocker::RegistryConnectionBlocker(WorkflowTabView *_tabView) + : tabView(_tabView) +{ + ++count; + if (count == 1) { + disconnectRegistry(tabView); + } +} + +RegistryConnectionBlocker::~RegistryConnectionBlocker() { + --count; + if (count == 0) { + connectRegistry(tabView); + } +} + +void RegistryConnectionBlocker::connectRegistry(WorkflowTabView *tabView) { + DashboardInfoRegistry *dashboardInfoRegistry = AppContext::getDashboardInfoRegistry(); + QObject::connect(dashboardInfoRegistry, + SIGNAL(si_dashboardsListChanged(const QStringList &, const QStringList &)), + tabView, + SLOT(sl_dashboardsListChanged(const QStringList &, const QStringList &))); + QObject::connect(dashboardInfoRegistry, + SIGNAL(si_dashboardsChanged(const QStringList &)), + tabView, + SLOT(sl_dashboardsChanged(const QStringList &))); +} + +void RegistryConnectionBlocker::disconnectRegistry(WorkflowTabView *tabView) { + DashboardInfoRegistry *dashboardInfoRegistry = AppContext::getDashboardInfoRegistry(); + QObject::disconnect(dashboardInfoRegistry, + SIGNAL(si_dashboardsListChanged(const QStringList &, const QStringList &)), + tabView, + SLOT(sl_dashboardsListChanged(const QStringList &, const QStringList &))); + QObject::disconnect(dashboardInfoRegistry, + SIGNAL(si_dashboardsChanged(const QStringList &)), + tabView, + SLOT(sl_dashboardsChanged(const QStringList &))); +} } // U2 diff --git a/src/plugins/workflow_designer/src/WorkflowTabView.h b/src/plugins/workflow_designer/src/WorkflowTabView.h index 4e3711e871b55bfb96743879e01bc2c3c2ec4e97..dc0ba33471e329183a55581d875382e434256916 100644 --- a/src/plugins/workflow_designer/src/WorkflowTabView.h +++ b/src/plugins/workflow_designer/src/WorkflowTabView.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -27,6 +27,7 @@ #include <QToolButton> #include <U2Designer/Dashboard.h> +#include <U2Designer/DashboardInfo.h> #include <U2Lang/WorkflowMonitor.h> @@ -45,7 +46,6 @@ public: void addDashboard(WorkflowMonitor *monitor, const QString &name = QString()); bool hasDashboards() const; - void updateDashboards(const QList<DashboardInfo> &dashboards); bool eventFilter(QObject *watched, QEvent *event); @@ -55,20 +55,36 @@ signals: private slots: void sl_closeTab(); - void sl_dashboardsLoaded(); + void sl_dashboardsListChanged(const QStringList &added, const QStringList &removed); + void sl_dashboardsChanged(const QStringList &dashboardIds); void sl_renameTab(); void sl_showDashboard(int idx); void sl_workflowStateChanged(bool isRunning); private: - int addDashboard(Dashboard *db); + int appendDashboard(Dashboard *db); + void removeDashboard(Dashboard *db); QString generateName(const QString &baseName = "") const; - QStringList allNames() const; + QSet<QString> allNames() const; + QStringList allIds() const; + QMap<QString, Dashboard *> getDashboards(const QStringList &dashboardIds) const; -private: WorkflowView *parent; }; +class RegistryConnectionBlocker { +public: + RegistryConnectionBlocker(WorkflowTabView *tabView); + ~RegistryConnectionBlocker(); + + static void connectRegistry(WorkflowTabView *tabView); + static void disconnectRegistry(WorkflowTabView *tabView); + +private: + WorkflowTabView *tabView; + static int count; +}; + } // U2 #endif // _U2_WORKFLOWTABVIEW_H_ diff --git a/src/plugins/workflow_designer/src/WorkflowViewController.cpp b/src/plugins/workflow_designer/src/WorkflowViewController.cpp index 3f8a3a68086117d32ca3abba1ed8105473af5258..4696dd9927948e1bff01560a4d2fb4afc16eb534 100644 --- a/src/plugins/workflow_designer/src/WorkflowViewController.cpp +++ b/src/plugins/workflow_designer/src/WorkflowViewController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,79 +24,56 @@ #include <QBoxLayout> #include <QClipboard> -#include <QCloseEvent> #include <QComboBox> -#include <QFileInfo> #include <QGraphicsSceneMouseEvent> -#include <QGraphicsView> #include <QMainWindow> -#include <QMenu> -#include <QMessageBox> #include <QPainter> #include <QPixmap> -#include <QPrinter> #include <QShortcut> -#include <QSplitter> #include <QSvgGenerator> -#include <QTableWidget> #include <QToolBar> -#include <QToolButton> #include <U2Core/AppContext.h> #include <U2Core/Counter.h> -#include <U2Core/DocumentModel.h> -#include <U2Core/ExternalToolRegistry.h> -#include <U2Core/ExternalToolRunTask.h> -#include <U2Core/IOAdapter.h> +#include <U2Core/GUrlUtils.h> #include <U2Core/IOAdapterUtils.h> #include <U2Core/Log.h> #include <U2Core/ProjectService.h> -#include <U2Core/Settings.h> +#include <U2Core/QObjectScopedPointer.h> #include <U2Core/TaskSignalMapper.h> #include <U2Core/U2OpStatusUtils.h> -#include <U2Core/U2SafePoints.h> -#include <U2Core/GUrlUtils.h> #include <U2Designer/Dashboard.h> -#include <U2Designer/DelegateEditors.h> +#include <U2Designer/DashboardInfoRegistry.h> #include <U2Designer/DesignerUtils.h> #include <U2Designer/EstimationReporter.h> #include <U2Designer/GrouperEditor.h> #include <U2Designer/MarkerEditor.h> +#include <U2Designer/RemoveDashboardsTask.h> #include <U2Designer/WizardController.h> #include <U2Gui/DialogUtils.h> #include <U2Gui/ExportImageDialog.h> -#include <U2Gui/GlassView.h> -#include <U2Gui/LastUsedDirHelper.h> -#include <U2Gui/MainWindow.h> -#include <U2Core/QObjectScopedPointer.h> +#include <U2Gui/ScriptEditorDialog.h> #include <U2Gui/U2FileDialog.h> #include <U2Lang/ActorModel.h> -#include <U2Lang/ActorPrototypeRegistry.h> #include <U2Lang/BaseActorCategories.h> #include <U2Lang/BaseAttributes.h> -#include <U2Lang/CoreLibConstants.h> -#include <U2Lang/ExternalToolCfg.h> #include <U2Lang/GrouperSlotAttribute.h> #include <U2Lang/HRSchemaSerializer.h> #include <U2Lang/IncludedProtoFactory.h> -#include <U2Lang/IntegralBusModel.h> #include <U2Lang/MapDatatypeEditor.h> #include <U2Lang/SchemaEstimationTask.h> -#include <U2Lang/WorkflowDebugStatus.h> #include <U2Lang/WorkflowEnv.h> #include <U2Lang/WorkflowManager.h> #include <U2Lang/WorkflowRunTask.h> #include <U2Lang/WorkflowSettings.h> -#include <U2Lang/WorkflowUtils.h> #include "BreakpointManagerView.h" #include "ChooseItemDialog.h" #include "CreateScriptWorker.h" #include "DashboardsManagerDialog.h" -#include "EstimationDialog.h" #include "GalaxyConfigConfigurationDialogImpl.h" #include "ImportSchemaDialog.h" #include "ItemViewStyle.h" @@ -116,9 +93,9 @@ #include "WorkflowViewController.h" #include "WorkflowViewItems.h" #include "debug_messages_translation/WorkflowDebugMessageParserImpl.h" -#include "library/CreateExternalProcessDialog.h" #include "library/ExternalProcessWorker.h" #include "library/ScriptWorker.h" +#include "library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.h" namespace U2 { @@ -134,24 +111,17 @@ enum {ElementsTab,SamplesTab}; #define WS 1000 #define MAX_FILE_SIZE 1000000 -static const QString XML_SCHEMA_WARNING = QObject::tr("You opened obsolete workflow in XML format. It is strongly recommended" - " to clear working space and create workflow from scratch."); - -static const QString XML_SCHEMA_APOLOGIZE = QObject::tr("Sorry! This workflow is obsolete and cannot be opened."); - -static const QString BREAKPOINT_MANAGER_LABEL = QObject::tr( "Breakpoints" ); static const int ABSENT_WIDGET_TAB_NUMBER = -1; /************************************************************************/ /* Utilities */ /************************************************************************/ -static QString percentStr = QObject::tr("%"); class PercentValidator : public QRegExpValidator { public: - PercentValidator(QObject* parent) : QRegExpValidator(QRegExp("[1-9][0-9]*"+percentStr), parent) {} + PercentValidator(QObject* parent) : QRegExpValidator(QRegExp("[1-9][0-9]*"+QObject::tr("%")), parent) {} void fixup(QString& input) const { - if (!input.endsWith(percentStr)) { - input.append(percentStr); + if (!input.endsWith(QObject::tr("%"))) { + input.append(QObject::tr("%")); } } }; // PercentValidator @@ -194,18 +164,6 @@ static void addToggleDashboardAction(QToolBar *toolBar, QAction *action) { #endif } -static QToolButton * styleMenu(WorkflowView *parent, const QList<QAction*> &actions) { - QToolButton *tt = new QToolButton(parent); - tt->setObjectName("Element style"); - QMenu *ttMenu = new QMenu( QObject::tr("Element style"), parent ); - foreach(QAction *a, actions) { - ttMenu->addAction( a ); - } - tt->setDefaultAction(ttMenu->menuAction()); - tt->setPopupMode(QToolButton::InstantPopup); - return tt; -} - static QToolButton * scriptMenu(WorkflowView *parent, const QList<QAction*> &scriptingActions) { QToolButton *scriptingModeButton = new QToolButton(parent); QMenu *scriptingModeMenu = new QMenu( QObject::tr( "Scripting mode" ), parent ); @@ -218,55 +176,57 @@ static QToolButton * scriptMenu(WorkflowView *parent, const QList<QAction*> &scr } DashboardManagerHelper::DashboardManagerHelper(QAction *_dmAction, WorkflowView *_parent) -: dmAction(_dmAction), parent(_parent) + : QObject(_parent), + dmAction(_dmAction), + parent(_parent) { - connect(dmAction, SIGNAL(triggered()), SLOT(sl_runScanTask())); -} + connect(dmAction, SIGNAL(triggered()), SLOT(sl_showDashboardsManagerDialog())); -void DashboardManagerHelper::sl_runScanTask() { - dmAction->setEnabled(false); - ScanDashboardsDirTask *t = new ScanDashboardsDirTask(); - connect(t, SIGNAL(si_stateChanged()), SLOT(sl_scanTaskFinished())); - AppContext::getTaskScheduler()->registerTopLevelTask(t); + DashboardInfoRegistry *dashboardInfoRegistry = AppContext::getDashboardInfoRegistry(); + connect(dashboardInfoRegistry, SIGNAL(si_scanningStarted()), SLOT(sl_dashboardsScanningStarted())); + connect(dashboardInfoRegistry, SIGNAL(si_scanningFinished()), SLOT(sl_dashboardsScanningFinished())); } -void DashboardManagerHelper::sl_scanTaskFinished() { - ScanDashboardsDirTask *t = dynamic_cast<ScanDashboardsDirTask*>(sender()); - CHECK(NULL != t, ); - CHECK(t->isFinished(), ); +void DashboardManagerHelper::sl_result(int result) { + DashboardsManagerDialog *d = qobject_cast<DashboardsManagerDialog *>(sender()); + if (QDialog::Accepted == result) { + DashboardInfoRegistry *dashboardInfoRegistry = AppContext::getDashboardInfoRegistry(); + + const QMap<QString, bool> dashboardsVisibility = d->getDashboardsVisibility(); + QList<DashboardInfo> newDashboardInfos; + foreach (const QString &dashboardId, dashboardsVisibility.keys()) { + DashboardInfo newDashboardInfo = dashboardInfoRegistry->getById(dashboardId); + newDashboardInfo.opened = dashboardsVisibility[dashboardId]; + newDashboardInfos << newDashboardInfo; + } + dashboardInfoRegistry->updateDashboardInfos(newDashboardInfos); - if (t->getResult().isEmpty()) { - dmAction->setEnabled(true); + const QStringList dashboardsToRemove = d->removedDashboards(); + if (!dashboardsToRemove.isEmpty()) { + dashboardInfoRegistry->removeDashboards(dashboardsToRemove); + } + } +} + +void DashboardManagerHelper::sl_showDashboardsManagerDialog() { + if (AppContext::getDashboardInfoRegistry()->isEmpty()) { QMessageBox *d = new QMessageBox(QMessageBox::Information, tr("No Dashboards Found"), tr("You do not have any dashboards yet. You need to run some workflow to use Dashboards Manager."), QMessageBox::NoButton, parent); d->show(); return; } - DashboardsManagerDialog *d = new DashboardsManagerDialog(t, parent); + DashboardsManagerDialog *d = new DashboardsManagerDialog(parent); connect(d, SIGNAL(finished(int)), SLOT(sl_result(int))); d->setWindowModality(Qt::ApplicationModal); d->show(); } -void DashboardManagerHelper::sl_result(int result) { - DashboardsManagerDialog *d = dynamic_cast<DashboardsManagerDialog*>(sender()); - if (QDialog::Accepted == result) { - parent->tabView->updateDashboards(d->selectedDashboards()); - if (!d->removedDashboards().isEmpty()) { - RemoveDashboardsTask *rt = new RemoveDashboardsTask(d->removedDashboards()); - connect(rt, SIGNAL(si_stateChanged()), SLOT(sl_removeTaskFinished())); - AppContext::getTaskScheduler()->registerTopLevelTask(rt); - return; - } - } - dmAction->setEnabled(true); +void DashboardManagerHelper::sl_dashboardsScanningStarted() { + dmAction->setEnabled(false); } -void DashboardManagerHelper::sl_removeTaskFinished() { - RemoveDashboardsTask *t = dynamic_cast<RemoveDashboardsTask*>(sender()); - CHECK(NULL != t, ); - CHECK(t->isFinished(), ); +void DashboardManagerHelper::sl_dashboardsScanningFinished() { dmAction->setEnabled(true); } @@ -339,6 +299,9 @@ WorkflowView::~WorkflowView() { AppContext::getProjectService()->enableSaveAction(true); } WorkflowSettings::setScriptingMode(scriptingMode); + delete currentActor; + delete scene; + delete schema; } void WorkflowView::setupScene() { @@ -351,7 +314,6 @@ void WorkflowView::setupScene() { scene->views().at(0)->setDragMode(QGraphicsView::RubberBandDrag); - connect(scene, SIGNAL(processItemAdded()), SLOT(sl_procItemAdded())); connect(scene, SIGNAL(processDblClicked()), SLOT(sl_toggleStyle())); connect(scene, SIGNAL(selectionChanged()), SLOT(sl_editItem())); connect(scene, SIGNAL(selectionChanged()), SLOT(sl_onSelectionChanged())); @@ -360,11 +322,12 @@ void WorkflowView::setupScene() { } void WorkflowView::setupPalette() { - palette = new WorkflowPalette(WorkflowEnv::getProtoRegistry()); + palette = new WorkflowPalette(WorkflowEnv::getProtoRegistry(), this); palette->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Ignored)); connect(palette, SIGNAL(processSelected(Workflow::ActorPrototype*, bool)), SLOT(sl_selectPrototype(Workflow::ActorPrototype*, bool))); - connect(palette, SIGNAL(si_protoDeleted(const QString&)), SLOT(sl_protoDeleted(const QString&))); + connect(palette, SIGNAL(si_prototypeIsAboutToBeRemoved(Workflow::ActorPrototype *)), SLOT(sl_prototypeIsAboutToBeRemoved(Workflow::ActorPrototype *))); connect(palette, SIGNAL(si_protoListModified()), SLOT(sl_protoListModified())); + connect(palette, SIGNAL(si_protoChanged()), SLOT(sl_editItem())); connect(palette, SIGNAL(si_protoChanged()), scene, SLOT(sl_updateDocs())); tabs = new QTabWidget(this); @@ -416,9 +379,10 @@ void WorkflowView::loadSceneFromObject() { SchemaSerializer::readMeta(&meta, xml.documentElement()); scene->setModified(false); if(err.isEmpty()) { - QMessageBox::warning(this, tr("Warning!"), XML_SCHEMA_WARNING); + QMessageBox::warning(this, tr("Warning!"), QObject::tr("You opened obsolete workflow in XML format. It is strongly recommended" + " to clear working space and create workflow from scratch.")); } else { - QMessageBox::warning(this, tr("Warning!"), XML_SCHEMA_APOLOGIZE); + QMessageBox::warning(this, tr("Warning!"), QObject::tr("Sorry! This workflow is obsolete and cannot be opened.")); } } else { coreLog.error(tr("Undefined workflow format for %1").arg(go->getDocument() ? go->getDocument()->getURLString() : tr("file"))); @@ -455,7 +419,7 @@ void WorkflowView::loadUiSettings() { void WorkflowView::setupMainSplitter() { splitter = new QSplitter(this); - splitter->setObjectName("splitter"); + splitter->setObjectName("WorkflowViewMainSplitter"); { splitter->addWidget(tabs); splitter->addWidget(infoSplitter); @@ -532,7 +496,7 @@ void WorkflowView::addBottomWidgetsToInfoSplitter() { connect(scene, SIGNAL(si_itemDeleted(const ActorId &)), breakpointView, SLOT(sl_breakpointRemoved(const ActorId &))); if ( WorkflowSettings::isDebuggerEnabled( ) ) { - bottomTabs->addTab( breakpointView, BREAKPOINT_MANAGER_LABEL ); + bottomTabs->addTab( breakpointView, QObject::tr( "Breakpoints" ) ); } investigationWidgets = new WorkflowInvestigationWidgetsController(bottomTabs); @@ -543,20 +507,20 @@ void WorkflowView::addBottomWidgetsToInfoSplitter() { void WorkflowView::sl_rescaleScene(const QString &scale) { - int percentPos = scale.indexOf(percentStr); + int percentPos = scale.indexOf(QObject::tr("%")); meta.scalePercent = scale.left(percentPos).toInt(); rescale(false); } static void updateComboBox(QComboBox *scaleComboBox, int scalePercent) { - QString value = QString("%1%2").arg(scalePercent).arg(percentStr); + QString value = QString("%1%2").arg(scalePercent).arg(QObject::tr("%")); bool isOk = true; for (int i=0; i<scaleComboBox->count(); i++) { if (scaleComboBox->itemText(i) == value) { scaleComboBox->setCurrentIndex(i); return; } else{ - QString itemText = scaleComboBox->itemText(i).mid(0, scaleComboBox->itemText(i).size() - percentStr.size()); + QString itemText = scaleComboBox->itemText(i).mid(0, scaleComboBox->itemText(i).size() - QObject::tr("%").size()); if (itemText.toInt(&isOk) > scalePercent && isOk){ scaleComboBox->insertItem(i, value); scaleComboBox->setCurrentIndex(i); @@ -801,10 +765,10 @@ void WorkflowView::createActions() { editScriptAction->setEnabled(false); // because user need to select actor with script to enable it connect(editScriptAction, SIGNAL(triggered()), SLOT(sl_editScript())); - externalToolAction = new QAction(tr("Create element with command line tool..."), this); - externalToolAction->setObjectName("createElementWithCommandLineTool"); - externalToolAction->setIcon(QIcon(":workflow_designer/images/external_cmd_tool.png")); - connect(externalToolAction, SIGNAL(triggered()), SLOT(sl_externalAction())); + createCmdlineBasedWorkerAction = new QAction(tr("Create element with external tool..."), this); + createCmdlineBasedWorkerAction->setObjectName("createElementWithCommandLineTool"); + createCmdlineBasedWorkerAction->setIcon(QIcon(":workflow_designer/images/external_cmd_tool.png")); + connect(createCmdlineBasedWorkerAction, SIGNAL(triggered()), SLOT(sl_createCmdlineBasedWorkerAction())); editExternalToolAction = new QAction(tr("Edit configuration..."),this); editExternalToolAction->setObjectName("editConfiguration"); @@ -812,7 +776,7 @@ void WorkflowView::createActions() { editExternalToolAction->setEnabled(false); // because user need to select actor with script to enable it connect(editExternalToolAction, SIGNAL(triggered()), SLOT(sl_editExternalTool())); - appendExternalTool = new QAction(tr("Add element with command line tool..."), this); + appendExternalTool = new QAction(tr("Add element with external tool..."), this); appendExternalTool->setObjectName("AddElementWithCommandLineTool"); appendExternalTool->setIcon(QIcon(":workflow_designer/images/external_cmd_tool_add.png")); connect(appendExternalTool, SIGNAL(triggered()), SLOT(sl_appendExternalToolWorker())); @@ -862,19 +826,13 @@ void WorkflowView::sl_createScript() { } } -void WorkflowView::sl_externalAction() { - QObjectScopedPointer<CreateExternalProcessDialog> dlg = new CreateExternalProcessDialog(this); - dlg->exec(); - CHECK(!dlg.isNull(), ); +void WorkflowView::sl_createCmdlineBasedWorkerAction() { + QString id = palette->createPrototype(); + CHECK(!id.isEmpty(), ); - if (dlg->result() == QDialog::Accepted) { - ExternalProcessConfig *cfg = dlg->config(); - if(LocalWorkflow::ExternalProcessWorkerFactory::init(cfg)) { - ActorPrototype *proto = WorkflowEnv::getProtoRegistry()->getProto(cfg->name); - QRectF rect = scene->sceneRect(); - addProcess(createActor(proto, QVariantMap()), rect.center()); - } - } + ActorPrototype *proto = WorkflowEnv::getProtoRegistry()->getProto(id); + QRectF rect = scene->sceneRect(); + addProcess(createActor(proto, QVariantMap()), rect.center()); } namespace { @@ -887,7 +845,7 @@ namespace { return ""; } } - QString filePath = dir.absolutePath() + "/" + QFileInfo(url).fileName(); + QString filePath = GUrlUtils::rollFileName(dir.absolutePath() + "/" + QFileInfo(url).fileName(), "_"); if (QFile::exists(filePath)) { os.setError(QObject::tr("The file '%1' already exists").arg(filePath)); return ""; @@ -918,18 +876,21 @@ void WorkflowView::sl_appendExternalToolWorker() { QScopedPointer<ExternalProcessConfig> cfg(HRSchemaSerializer::string2Actor(data.data())); if(cfg.data()) { - if (WorkflowEnv::getProtoRegistry()->getProto(cfg->name)) { - coreLog.error("Element with this name already exists"); + if (WorkflowEnv::getProtoRegistry()->getProto(cfg->id)) { + coreLog.error(QString("Element with ID '%1' already exists").arg(cfg->id)); } else { U2OpStatus2Log os; QString internalUrl = copyIntoUgene(url, os); CHECK_OP(os, ); cfg->filePath = internalUrl; - LocalWorkflow::ExternalProcessWorkerFactory::init(cfg.data()); - ActorPrototype *proto = WorkflowEnv::getProtoRegistry()->getProto(cfg->name); - QRectF rect = scene->sceneRect(); - addProcess(createActor(proto, QVariantMap()), rect.center()); - cfg.take(); + if (LocalWorkflow::ExternalProcessWorkerFactory::init(cfg.data())) { + ActorPrototype *proto = WorkflowEnv::getProtoRegistry()->getProto(cfg->id); + QRectF rect = scene->sceneRect(); + addProcess(createActor(proto, QVariantMap()), rect.center()); + cfg.take(); + } else { + coreLog.error(tr("Can't register element.")); + } } } else { coreLog.error(tr("Can't load element.")); @@ -959,41 +920,23 @@ void WorkflowView::sl_editExternalTool() { QList<Actor *> selectedActors = scene->getSelectedActors(); if (selectedActors.size() == 1) { ActorPrototype *proto = selectedActors.first()->getProto(); - - ExternalProcessConfig *oldCfg = WorkflowEnv::getExternalCfgRegistry()->getConfigByName(proto->getId()); - ExternalProcessConfig *cfg = new ExternalProcessConfig(*oldCfg); - QObjectScopedPointer<CreateExternalProcessDialog> dlg = new CreateExternalProcessDialog(this, cfg, true); - dlg->exec(); - CHECK(!dlg.isNull(), ); - - if(dlg->result() == QDialog::Accepted) { - cfg = dlg->config(); - - if (!(*oldCfg == *cfg)) { - if (oldCfg->name != cfg->name) { - if (!QFile::remove(proto->getFilePath())) { - uiLog.error(tr("Can't remove element %1").arg(proto->getDisplayName())); - } - } - sl_protoDeleted(proto->getId()); - WorkflowEnv::getProtoRegistry()->unregisterProto(proto->getId()); - delete proto; - - LocalWorkflow::ExternalProcessWorkerFactory::init(cfg); - } - WorkflowEnv::getExternalCfgRegistry()->unregisterConfig(oldCfg->name); - WorkflowEnv::getExternalCfgRegistry()->registerExternalTool(cfg); + const bool edited = palette->editPrototype(proto); + if (edited) { scene->sl_updateDocs(); } } } -void WorkflowView::sl_protoDeleted(const QString &id) { +void WorkflowView::sl_prototypeIsAboutToBeRemoved(Workflow::ActorPrototype *proto) { + if (currentProto == proto) { + currentProto = nullptr; + } + QList<WorkflowProcessItem*> deleteList; foreach(QGraphicsItem *i, scene->items()) { if(i->type() == WorkflowProcessItemType) { WorkflowProcessItem *wItem = static_cast<WorkflowProcessItem *>(i); - if(wItem->getProcess()->getProto()->getId() == id) { + if(wItem->getProcess()->getProto()->getId() == proto->getId()) { deleteList << wItem; } } @@ -1023,13 +966,13 @@ void WorkflowView::addProcess(Actor *proc, const QPointF &pos) { if (NULL != editor) { connect(editor, SIGNAL(si_configurationChanged()), scene, SIGNAL(configurationChanged())); } - GrouperEditor *g = dynamic_cast<GrouperEditor*>(editor); - MarkerEditor *m = dynamic_cast<MarkerEditor*>(editor); - if (NULL != g || NULL != m) { - connect(editor, SIGNAL(si_configurationChanged()), scene, SLOT(sl_refreshBindings())); + procItemAdded(); + ActorPrototype *addedProto = it->getProcess()->getProto(); + uiLog.trace(addedProto->getDisplayName() + " added"); + if (WorkflowEnv::getExternalCfgRegistry()->getConfigById(addedProto->getId()) != nullptr) { + GCOUNTER(cvar, tvar, "Element with external tool is added to the scene"); } - sl_procItemAdded(); update(); } @@ -1191,27 +1134,20 @@ void WorkflowView::setupMDIToolbar(QToolBar* tb) { runSep = tb->addSeparator(); tb->addAction(configureParameterAliasesAction); confSep = tb->addSeparator(); - tb->addAction(createScriptAction); - tb->addAction(editScriptAction); - scriptSep = tb->addSeparator(); - tb->addAction(externalToolAction); + tb->addAction(createCmdlineBasedWorkerAction); tb->addAction(appendExternalTool); extSep = tb->addSeparator(); - tb->addAction(copyAction); - tb->addAction(pasteAction); - pasteAction->setEnabled(!lastPaste.isEmpty()); - tb->addAction(cutAction); tb->addAction(deleteAction); - editSep = tb->addSeparator(); + scaleSep = tb->addSeparator(); scaleAction = tb->addWidget(scaleComboBox); scaleSep = tb->addSeparator(); - styleAction = tb->addWidget(styleMenu(this, styleActions)); scriptAction = tb->addWidget(scriptMenu(this, scriptingActions)); tb->addAction(dmAction); addToggleDashboardAction(tb, toggleDashboard); sl_dashboardCountChanged(); + setDashboardActionDecoration(tabView->isVisible()); setupActions(); } @@ -1236,9 +1172,8 @@ void WorkflowView::setupActions() { createScriptAction->setVisible(editMode); editScriptAction->setVisible(editMode); - scriptSep->setVisible(editMode); - externalToolAction->setVisible(editMode); + createCmdlineBasedWorkerAction->setVisible(editMode); appendExternalTool->setVisible(editMode); extSep->setVisible(editMode); @@ -1246,12 +1181,10 @@ void WorkflowView::setupActions() { pasteAction->setVisible(editMode); cutAction->setVisible(editMode); deleteAction->setVisible(editMode); - editSep->setVisible(editMode); scaleAction->setVisible(!dashboard); scaleSep->setVisible(!dashboard); - styleAction->setVisible(!dashboard); scriptAction->setVisible(editMode); } @@ -1281,11 +1214,10 @@ void WorkflowView::setupViewMenu(QMenu* m) { m->addAction(configurePortAliasesAction); m->addAction(importSchemaToElement); m->addSeparator(); - m->addSeparator(); m->addAction(createScriptAction); m->addAction(editScriptAction); m->addSeparator(); - m->addAction(externalToolAction); + m->addAction(createCmdlineBasedWorkerAction); m->addAction(appendExternalTool); m->addSeparator(); @@ -1372,7 +1304,7 @@ void WorkflowView::setupContextMenu(QMenu* m) { } void WorkflowView::sl_pickInfo(QListWidgetItem* info) { - ActorId id = info->data(ACTOR_REF).value<ActorId>(); + ActorId id = info->data(ACTOR_ID_REF).value<ActorId>(); foreach(QGraphicsItem* it, scene->items()) { if (it->type() == WorkflowProcessItemType) { @@ -1476,6 +1408,12 @@ void WorkflowView::localHostLaunch() { } const Schema *s = getSchema(); + foreach(const Actor* actor, schema->getProcesses()) { + if (WorkflowEnv::getExternalCfgRegistry()->getConfigById(actor->getId()) != nullptr) { + GCOUNTER(cvar, tvar, "Element(s) with command line tool is present in the launched workflow"); + break; + } + } debugInfo->setMessageParser( new WorkflowDebugMessageParserImpl( ) ); WorkflowAbstractRunner * t = new WorkflowRunTask(*s, ActorMap(), debugInfo); @@ -1641,7 +1579,7 @@ void WorkflowView::paintEvent(QPaintEvent *event) { const bool isWorkflowRunning = ( NULL != scene->getRunner( ) ); const bool isDebuggerEnabled = WorkflowSettings::isDebuggerEnabled( ); if ( isDebuggerEnabled && ABSENT_WIDGET_TAB_NUMBER == bottomTabs->indexOf( breakpointView ) ) { - bottomTabs->addTab( breakpointView, BREAKPOINT_MANAGER_LABEL ); + bottomTabs->addTab( breakpointView, QObject::tr( "Breakpoints" ) ); } else if ( !isDebuggerEnabled && ABSENT_WIDGET_TAB_NUMBER != bottomTabs->indexOf( breakpointView ) ) { @@ -1856,6 +1794,7 @@ void WorkflowView::sl_cutItems() { void WorkflowView::sl_pasteSample(const QString& s) { tabs->setCurrentIndex(ElementsTab); + infoList->clear(); if (scene->items().isEmpty()) { // fixing bug with pasting same schema 2 times { @@ -1969,21 +1908,6 @@ void WorkflowView::recreateScene() { sceneRecreation = false; } -void WorkflowView::sl_procItemAdded() { - currentActor = NULL; - propertyEditor->setEditable(true); - scene->invalidate(QRectF(), QGraphicsScene::BackgroundLayer); - if (!currentProto) { - return; - } - - uiLog.trace(currentProto->getDisplayName() + " added"); - palette->resetSelection(); - currentProto = NULL; - assert(scene->views().size() == 1); - scene->views().at(0)->unsetCursor(); -} - void WorkflowView::sl_showEditor() { propertyEditor->show(); QList<int> s = splitter->sizes(); @@ -2136,6 +2060,19 @@ void WorkflowView::loadWizardResult(const QString &result) { } } +void WorkflowView::procItemAdded() { + currentActor = NULL; + propertyEditor->setEditable(true); + scene->invalidate(QRectF(), QGraphicsScene::BackgroundLayer); + if (!currentProto) { + return; + } + palette->resetSelection(); + currentProto = NULL; + assert(scene->views().size() == 1); + scene->views().at(0)->unsetCursor(); +} + void WorkflowView::checkAutoRunWizard() { foreach (Wizard *w, schema->getWizards()) { if (w->isAutoRun()) { @@ -2157,23 +2094,31 @@ static QIcon getToolbarIcon(const QString &srcPath) { } void WorkflowView::hideDashboards() { - toggleDashboard->setIconText("Go to Dashboard"); - toggleDashboard->setIcon(getToolbarIcon("dashboard.png")); - toggleDashboard->setToolTip(tr("Show dashboard")); + setDashboardActionDecoration(false); tabView->setVisible(false); splitter->setVisible(true); setupActions(); } void WorkflowView::showDashboards() { - toggleDashboard->setIconText("To Workflow Designer"); - toggleDashboard->setIcon(getToolbarIcon("wd.png")); - toggleDashboard->setToolTip(tr("Show workflow")); + setDashboardActionDecoration(true); splitter->setVisible(false); tabView->setVisible(true); setupActions(); } +void WorkflowView::setDashboardActionDecoration(bool isDashboardsViewActive) { + if (isDashboardsViewActive) { + toggleDashboard->setIconText("To Workflow Designer"); + toggleDashboard->setIcon(getToolbarIcon("wd.png")); + toggleDashboard->setToolTip(tr("Show workflow")); + } else { + toggleDashboard->setIconText("Go to Dashboard"); + toggleDashboard->setIcon(getToolbarIcon("dashboard.png")); + toggleDashboard->setToolTip(tr("Show dashboard")); + } +} + void WorkflowView::setDashboardActionVisible(bool visible) { toggleDashboard->setVisible(visible); } @@ -2183,7 +2128,7 @@ void WorkflowView::commitWarningsToMonitor(WorkflowAbstractRunner* t) { QListWidgetItem* warning = infoList->item(i); foreach (WorkflowMonitor* monitor, t->getMonitors()) { monitor->addError(warning->data(TEXT_REF).toString(), - warning->data(ACTOR_REF).toString(), + warning->data(ACTOR_ID_REF).toString(), warning->data(TYPE_REF).toString()); } } @@ -2241,9 +2186,10 @@ void WorkflowView::sl_loadScene(const QString &url, bool fromDashboard) { void WorkflowView::sl_xmlSchemaLoaded(Task* t) { assert(t != NULL); if(!t->hasError()) { - QMessageBox::warning(this, tr("Warning!"), XML_SCHEMA_WARNING); + QMessageBox::warning(this, tr("Warning!"), QObject::tr("You opened obsolete workflow in XML format. It is strongly recommended" + " to clear working space and create workflow from scratch.")); } else { - QMessageBox::warning(this, tr("Warning!"), XML_SCHEMA_APOLOGIZE); + QMessageBox::warning(this, tr("Warning!"), QObject::tr("Sorry! This workflow is obsolete and cannot be opened.")); } } @@ -2273,8 +2219,8 @@ void WorkflowView::sl_onSceneLoaded() { scene->setModified(false); rescale(); sl_refreshActorDocs(); - checkAutoRunWizard(); hideDashboards(); + checkAutoRunWizard(); tabs->setCurrentIndex(ElementsTab); } @@ -2842,8 +2788,8 @@ WorkflowScene * SceneCreator::createScene(WorkflowView *controller) { scene = new WorkflowScene(controller); scene->setSceneRect(QRectF(-3*WS, -3*WS, 5*WS, 5*WS)); scene->setItemIndexMethod(QGraphicsScene::NoIndex); - return createScene(); scene->setObjectName("scene"); + return createScene(); } WorkflowScene * SceneCreator::createScene() { diff --git a/src/plugins/workflow_designer/src/WorkflowViewController.h b/src/plugins/workflow_designer/src/WorkflowViewController.h index a9f91c600e19184b6e895659cd6b304203b6c66b..d63108e640a7f0467a5861ecbc1515f5c261a711 100644 --- a/src/plugins/workflow_designer/src/WorkflowViewController.h +++ b/src/plugins/workflow_designer/src/WorkflowViewController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -33,9 +33,6 @@ #include <U2Lang/WorkflowRunTask.h> #include <U2Gui/MainWindow.h> -#include <U2Gui/ScriptEditorDialog.h> - -#include "SampleActionsManager.h" class QComboBox; class QSplitter; @@ -195,7 +192,6 @@ private slots: void sl_onSelectionChanged(); void sl_showEditor(); void sl_selectPrototype(Workflow::ActorPrototype*, bool); - void sl_procItemAdded(); void sl_exportScene(); void sl_saveScene(); void sl_saveSceneAs(); @@ -231,9 +227,9 @@ private slots: void sl_toggleLock(bool = true); void sl_createScript(); void sl_editScript(); - void sl_externalAction(); + void sl_createCmdlineBasedWorkerAction(); void sl_appendExternalToolWorker(); - void sl_protoDeleted(const QString& id); + void sl_prototypeIsAboutToBeRemoved(Workflow::ActorPrototype *proto); void sl_xmlSchemaLoaded(Task*); void sl_editExternalTool(); void sl_findPrototype(); @@ -291,12 +287,14 @@ private: void setupActions(); void hideDashboards(); void showDashboards(); + void setDashboardActionDecoration(bool isDashboardsViewActive); void setDashboardActionVisible(bool visible); void commitWarningsToMonitor(WorkflowAbstractRunner *t); void runWizard(Wizard *w); void checkAutoRunWizard(); void loadWizardResult(const QString &result); + void procItemAdded(); DashboardManagerHelper * getDMHInstance(); @@ -314,7 +312,7 @@ private: bool scriptingMode; - QMenu *elementsMenu; + QPointer<QMenu> elementsMenu; QAction* deleteAction; QAction* deleteShortcut; @@ -329,7 +327,7 @@ private: QAction* newAction; QAction* createScriptAction; QAction* editScriptAction; - QAction* externalToolAction; + QAction* createCmdlineBasedWorkerAction; QAction* appendExternalTool; QAction* editExternalToolAction; QAction* configureParameterAliasesAction; @@ -352,12 +350,9 @@ private: QAction* loadSep; QAction* runSep; QAction* confSep; - QAction* scriptSep; QAction* extSep; - QAction* editSep; QAction* scaleSep; QAction* scaleAction; - QAction* styleAction; QAction* scriptAction; QAction* dmAction; QList<QAction*> styleActions; @@ -412,10 +407,10 @@ public: DashboardManagerHelper(QAction *dmAction, WorkflowView *parent); private slots: - void sl_runScanTask(); void sl_result(int result); - void sl_scanTaskFinished(); - void sl_removeTaskFinished(); + void sl_showDashboardsManagerDialog(); + void sl_dashboardsScanningStarted(); + void sl_dashboardsScanningFinished(); private: QAction *dmAction; diff --git a/src/plugins/workflow_designer/src/WorkflowViewItems.cpp b/src/plugins/workflow_designer/src/WorkflowViewItems.cpp index c2458d4d58c343455dca96037d623959018e9cae..415397599d61e7d820a499158bef79f9c4f2fd7d 100644 --- a/src/plugins/workflow_designer/src/WorkflowViewItems.cpp +++ b/src/plugins/workflow_designer/src/WorkflowViewItems.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -65,6 +65,7 @@ WorkflowProcessItem::WorkflowProcessItem(Actor* prc) : process(prc), hasBreakpoi currentStyle = getStyleByIdSafe(WorkflowSettings::defaultStyle()); currentStyle->setVisible(true); createPorts(); + connect(prc, SIGNAL(si_descriptionChanged()), SLOT(sl_descriptionChanged())); } WorkflowProcessItem::~WorkflowProcessItem() @@ -142,6 +143,10 @@ void WorkflowProcessItem::sl_update() { update(); } +void WorkflowProcessItem::sl_descriptionChanged() { + setToolTip(process->getProto()->getDocumentation()); +} + void WorkflowProcessItem::setStyle(StyleId s) { prepareGeometryChange(); currentStyle->setVisible(false); @@ -573,13 +578,8 @@ void WorkflowPortItem::adaptOwnerShape() { void WorkflowPortItem::setOrientation(qreal angle) { qreal oldOrientation = orientation; orientation = angle; - bool snap2grid = WorkflowSettings::snap2Grid(); + if (ItemStyles::SIMPLE == currentStyle) { - // common algorithm works fine as well, - // but gives visible distortions when snapping to grid - if (snap2grid) { - angle = round(angle, ANGLE_STEP); - } angle = -angle; qreal x = R * qCos(angle * 2 * M_PI / 360); qreal y = R * qSin(angle * 2 * M_PI / 360); @@ -592,7 +592,6 @@ void WorkflowPortItem::setOrientation(qreal angle) { QRectF rec = owner->boundingRect(); QPolygonF pol(owner->shape().toFillPolygon()); qreal radius = qMax(rec.width(), rec.height()) * 2; - //log.debug(QString("radius=%1 pol=%2").arg(radius).arg(pol.count())); QLineF centerLine(0,0,radius, 0); assert(pol.containsPoint(centerLine.p1(), Qt::WindingFill)); assert(!pol.containsPoint(centerLine.p2(), Qt::WindingFill)); @@ -609,31 +608,13 @@ void WorkflowPortItem::setOrientation(qreal angle) { } p1 = p2; } - if (snap2grid && polyLine.p1().x() == polyLine.p2().x()) { - //vertical line, snap intersectPoint to grid - qreal v = round(intersectPoint.y(), GRID_STEP); - qreal min = qMin(polyLine.p1().y(), polyLine.p2().y()); - qreal max = qMax(polyLine.p1().y(), polyLine.p2().y()); - intersectPoint.setY(qBound(min, v, max)); - } - if (snap2grid && polyLine.p1().y() == polyLine.p2().y()) { - //horizontal line, do the same - qreal v = round(intersectPoint.x(), GRID_STEP); - qreal min = qMin(polyLine.p1().x(), polyLine.p2().x()); - qreal max = qMax(polyLine.p1().x(), polyLine.p2().x()); - intersectPoint.setX(qBound(min, v, max)); - } setTransform(QTransform::fromTranslate(intersectPoint.x(), intersectPoint.y()), true); - //qreal polyAngle = polyLine.angle(); qreal norm = polyLine.normalVector().angle(); qreal df = qAbs(norm - angle); if (df > 90 && df < 270) { norm += 180; } - //log.info(QString("centerLine=[%1,%2]->[%3,%4]").arg(centerLine.p1().x()).arg(centerLine.p1().y()).arg(centerLine.p2().x()).arg(centerLine.p2().y())); - //log.info(QString("polyLine=[%1,%2]->[%3,%4]").arg(polyLine.p1().x()).arg(polyLine.p1().y()).arg(polyLine.p2().x()).arg(polyLine.p2().y())); - //log.info(QString("a=%1 pa=%2 pn=%3 n=%4 df=%5").arg(angle).arg(polyAngle).arg(polyLine.normalVector().angle()).arg(norm).arg(df)); setRotation(-norm); } if (oldOrientation != orientation) { diff --git a/src/plugins/workflow_designer/src/WorkflowViewItems.h b/src/plugins/workflow_designer/src/WorkflowViewItems.h index 15cb23e18f9f6d565e166f6b9907a781ffb8259f..99980a2d2828346f05d5fe31a0dcb67364e2e9d8 100644 --- a/src/plugins/workflow_designer/src/WorkflowViewItems.h +++ b/src/plugins/workflow_designer/src/WorkflowViewItems.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -134,6 +134,9 @@ protected: public slots: void sl_update(); +private slots: + void sl_descriptionChanged(); + private: void createPorts(); QMap<StyleId, ItemViewStyle*> styles; diff --git a/src/plugins/workflow_designer/src/cmdline/GalaxyConfigTask.cpp b/src/plugins/workflow_designer/src/cmdline/GalaxyConfigTask.cpp index ad68301052d39687a3695d1107ba94b1b8f4444e..7c3a2295ee1d1fcfe70d91376631a050127ab86a 100755 --- a/src/plugins/workflow_designer/src/cmdline/GalaxyConfigTask.cpp +++ b/src/plugins/workflow_designer/src/cmdline/GalaxyConfigTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/cmdline/GalaxyConfigTask.h b/src/plugins/workflow_designer/src/cmdline/GalaxyConfigTask.h index 074e592f1e688548f108b47ca4a1376e1d827411..3f80761e466c58bd59fa449d6d1ade358eec7bec 100755 --- a/src/plugins/workflow_designer/src/cmdline/GalaxyConfigTask.h +++ b/src/plugins/workflow_designer/src/cmdline/GalaxyConfigTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/cmdline/WorkflowCMDLineTasks.cpp b/src/plugins/workflow_designer/src/cmdline/WorkflowCMDLineTasks.cpp index 4038ba9d8646bed2b409d8a883018a5da910e402..ec6c6ade48a89728ae23f3afa0f6d72a3d8c3dd0 100644 --- a/src/plugins/workflow_designer/src/cmdline/WorkflowCMDLineTasks.cpp +++ b/src/plugins/workflow_designer/src/cmdline/WorkflowCMDLineTasks.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/cmdline/WorkflowCMDLineTasks.h b/src/plugins/workflow_designer/src/cmdline/WorkflowCMDLineTasks.h index 5c95f4097a5b2ad630de94505555a4e67e2a4e82..09d3765cbcb0528ff7397180b06fb02b11fa0c6f 100644 --- a/src/plugins/workflow_designer/src/cmdline/WorkflowCMDLineTasks.h +++ b/src/plugins/workflow_designer/src/cmdline/WorkflowCMDLineTasks.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/debug_messages_translation/AnnotationsMessageTranslator.cpp b/src/plugins/workflow_designer/src/debug_messages_translation/AnnotationsMessageTranslator.cpp index d40d34ed1fe948de689774278849cf0fde4f8c33..6b2417d452fc1c637b72b639dca70241335515b7 100644 --- a/src/plugins/workflow_designer/src/debug_messages_translation/AnnotationsMessageTranslator.cpp +++ b/src/plugins/workflow_designer/src/debug_messages_translation/AnnotationsMessageTranslator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/debug_messages_translation/AnnotationsMessageTranslator.h b/src/plugins/workflow_designer/src/debug_messages_translation/AnnotationsMessageTranslator.h index 35a531ba336e163f7738f46ee6e7613f24f5359a..2fcaad3acd7ed15318285f295c0af1b8eabd2aab 100644 --- a/src/plugins/workflow_designer/src/debug_messages_translation/AnnotationsMessageTranslator.h +++ b/src/plugins/workflow_designer/src/debug_messages_translation/AnnotationsMessageTranslator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/debug_messages_translation/AssemblyMessageTranslator.cpp b/src/plugins/workflow_designer/src/debug_messages_translation/AssemblyMessageTranslator.cpp index ec459a7f70a4a4dd91075af6d979468956973e61..18aa18d83d8c529e5a77df7fe43cbe6da4de0d62 100644 --- a/src/plugins/workflow_designer/src/debug_messages_translation/AssemblyMessageTranslator.cpp +++ b/src/plugins/workflow_designer/src/debug_messages_translation/AssemblyMessageTranslator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/debug_messages_translation/AssemblyMessageTranslator.h b/src/plugins/workflow_designer/src/debug_messages_translation/AssemblyMessageTranslator.h index 53fc603c61d1db22cfc3511c453006cca1d0ae18..5f7799bc895cff934a7ba4c1f22b2a2308dd7e74 100644 --- a/src/plugins/workflow_designer/src/debug_messages_translation/AssemblyMessageTranslator.h +++ b/src/plugins/workflow_designer/src/debug_messages_translation/AssemblyMessageTranslator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/debug_messages_translation/BaseMessageTranslator.cpp b/src/plugins/workflow_designer/src/debug_messages_translation/BaseMessageTranslator.cpp index 90cac3369cb9d3ac71e79e03761ca90ab80283ad..84533d1062c8be5dac3dfaa486b6f535173cd85c 100644 --- a/src/plugins/workflow_designer/src/debug_messages_translation/BaseMessageTranslator.cpp +++ b/src/plugins/workflow_designer/src/debug_messages_translation/BaseMessageTranslator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/debug_messages_translation/BaseMessageTranslator.h b/src/plugins/workflow_designer/src/debug_messages_translation/BaseMessageTranslator.h index 638034f7da38b71f854f9f5d1e07da72ffeff4fd..39436e086c3ed4a72b7e88b0461edd9a28215f6c 100644 --- a/src/plugins/workflow_designer/src/debug_messages_translation/BaseMessageTranslator.h +++ b/src/plugins/workflow_designer/src/debug_messages_translation/BaseMessageTranslator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/debug_messages_translation/MultipleAlignmentMessageTranslator.cpp b/src/plugins/workflow_designer/src/debug_messages_translation/MultipleAlignmentMessageTranslator.cpp index 67c19ce0c02ea751d7bce14bfcb7fb73904d074a..00efd72d71cba0540596140e458aa257bd3c9ddf 100644 --- a/src/plugins/workflow_designer/src/debug_messages_translation/MultipleAlignmentMessageTranslator.cpp +++ b/src/plugins/workflow_designer/src/debug_messages_translation/MultipleAlignmentMessageTranslator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/debug_messages_translation/MultipleAlignmentMessageTranslator.h b/src/plugins/workflow_designer/src/debug_messages_translation/MultipleAlignmentMessageTranslator.h index 72b02dab44eff039045fbe23d7765f948d7e66f4..9a5282784c04caf5431a91e37fe9962018e59b80 100644 --- a/src/plugins/workflow_designer/src/debug_messages_translation/MultipleAlignmentMessageTranslator.h +++ b/src/plugins/workflow_designer/src/debug_messages_translation/MultipleAlignmentMessageTranslator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/debug_messages_translation/SequenceMessageTranslator.cpp b/src/plugins/workflow_designer/src/debug_messages_translation/SequenceMessageTranslator.cpp index 52e6103d72b69bad75816e998d3a50ebd481ffc8..d9f0c7675c55caea55f614ee5092e8783f09c57f 100644 --- a/src/plugins/workflow_designer/src/debug_messages_translation/SequenceMessageTranslator.cpp +++ b/src/plugins/workflow_designer/src/debug_messages_translation/SequenceMessageTranslator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/debug_messages_translation/SequenceMessageTranslator.h b/src/plugins/workflow_designer/src/debug_messages_translation/SequenceMessageTranslator.h index a3aefb8d7967534be92283a7d73c356d209abf9e..5cc2071ea4fddcecbcba533c4ed0c2f2b21c8348 100644 --- a/src/plugins/workflow_designer/src/debug_messages_translation/SequenceMessageTranslator.h +++ b/src/plugins/workflow_designer/src/debug_messages_translation/SequenceMessageTranslator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/debug_messages_translation/VariationTrackMessageTranslator.cpp b/src/plugins/workflow_designer/src/debug_messages_translation/VariationTrackMessageTranslator.cpp index 206c544f8d382c9c05ffed404b623b69857445be..73aa260ff86bb75841afe8a80bc1f5cf8c713a82 100644 --- a/src/plugins/workflow_designer/src/debug_messages_translation/VariationTrackMessageTranslator.cpp +++ b/src/plugins/workflow_designer/src/debug_messages_translation/VariationTrackMessageTranslator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/debug_messages_translation/VariationTrackMessageTranslator.h b/src/plugins/workflow_designer/src/debug_messages_translation/VariationTrackMessageTranslator.h index ec86d85d271146a68a443d740abd20fcdaf3d5f0..a8b1fbcff3d7253bbe30e7176eea7c6cc751c234 100644 --- a/src/plugins/workflow_designer/src/debug_messages_translation/VariationTrackMessageTranslator.h +++ b/src/plugins/workflow_designer/src/debug_messages_translation/VariationTrackMessageTranslator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/debug_messages_translation/WorkflowDebugMessageParserImpl.cpp b/src/plugins/workflow_designer/src/debug_messages_translation/WorkflowDebugMessageParserImpl.cpp index 9a55f083eaa11255098abf77ff9498ceda37ddbf..5d583a74d4b910aeadab5f1917e548bee4a86dc5 100644 --- a/src/plugins/workflow_designer/src/debug_messages_translation/WorkflowDebugMessageParserImpl.cpp +++ b/src/plugins/workflow_designer/src/debug_messages_translation/WorkflowDebugMessageParserImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/debug_messages_translation/WorkflowDebugMessageParserImpl.h b/src/plugins/workflow_designer/src/debug_messages_translation/WorkflowDebugMessageParserImpl.h index 562f080702ccc978aa2384a677ebdf2ab7831814..8fcc9df289e3d798aeb7f438af11ad9e4de75c87 100644 --- a/src/plugins/workflow_designer/src/debug_messages_translation/WorkflowDebugMessageParserImpl.h +++ b/src/plugins/workflow_designer/src/debug_messages_translation/WorkflowDebugMessageParserImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/AminoTranslationWorker.cpp b/src/plugins/workflow_designer/src/library/AminoTranslationWorker.cpp index 6f520e8d43b65924460cc8a5ed25295b3b8af2ec..ec7c803ca251e8f07a01f3cced0c43e1366ee150 100644 --- a/src/plugins/workflow_designer/src/library/AminoTranslationWorker.cpp +++ b/src/plugins/workflow_designer/src/library/AminoTranslationWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -39,12 +39,13 @@ #include <U2Core/GObjectUtils.h> #include <U2Core/AnnotationData.h> #include <U2Core/QVariantUtils.h> +#include <U2Core/U2Attribute.h> #include <U2Core/U2OpStatusUtils.h> const QString OFFSET_DELIMITER(","); -namespace U2{ -namespace LocalWorkflow{ +namespace U2 { +namespace LocalWorkflow { const QString AminoTranslationWorkerFactory::ACTOR_ID("sequence-translation"); @@ -54,12 +55,11 @@ static const QString POS_2_TRANSLATE_ATTR("pos-2-translate"); TranslateSequence2AminoTask::TranslateSequence2AminoTask(const AminoTranslationSettings& _configs, const U2DbiRef &dbiRef) - : Task("Translate sequence to amino", TaskFlag_None),configs(_configs), dbiRef(dbiRef) -{ - SAFE_POINT_EXT( dbiRef.isValid( ), stateInfo.setError("Invalid DBI reference supplied!"), ); + : Task("Translate sequence to amino", TaskFlag_None), configs(_configs), dbiRef(dbiRef) { + SAFE_POINT_EXT(dbiRef.isValid(), stateInfo.setError("Invalid DBI reference supplied!"), ); } -void TranslateSequence2AminoTask::run(){ +void TranslateSequence2AminoTask::run() { assert(configs.seqObj != NULL); U2SequenceObject* seqObj = configs.seqObj.data(); @@ -69,28 +69,26 @@ void TranslateSequence2AminoTask::run(){ QString resultName = configs.resultName; DNATranslation* aminoTT = configs.aminoTT; - SAFE_POINT(aminoTT != NULL, QString("Can't produce amino translation"),); + SAFE_POINT(aminoTT != NULL, QString("Can't produce amino translation"), ); - for(QVector<U2Region>::iterator i = regionsDirect.begin(); i != regionsDirect.end();){ - if(i->startPos >= seqLen){ - i = regionsDirect.erase(i); - } - else{ + for (QVector<U2Region>::iterator i = regionsDirect.begin(); i != regionsDirect.end();) { + if (i->startPos >= seqLen) { + i = regionsDirect.erase(i); + } else { ++i; } } - for(QVector<U2Region>::iterator i = regionsComplementary.begin(); i != regionsComplementary.end();){ - if(i->startPos >= seqLen){ - i = regionsComplementary.erase(i); - } - else{ + for (QVector<U2Region>::iterator i = regionsComplementary.begin(); i != regionsComplementary.end();) { + if (i->startPos >= seqLen) { + i = regionsComplementary.erase(i); + } else { ++i; } } DNATranslation* complTT = AppContext::getDNATranslationRegistry()->lookupComplementTranslation(seqObj->getAlphabet()); - SAFE_POINT(complTT != NULL || regionsComplementary.isEmpty(), QString("Can't support complement mode"),); + SAFE_POINT(complTT != NULL || regionsComplementary.isEmpty(), QString("Can't support complement mode"), ); static const int NUM_DB_READ = 3 * 1024; @@ -99,7 +97,7 @@ void TranslateSequence2AminoTask::run(){ QByteArray seq; QByteArray translatedSeq; // direct - foreach(U2Region directRegion, regionsDirect){ + foreach(U2Region directRegion, regionsDirect) { seq.clear(); translatedSeq.clear(); @@ -107,13 +105,13 @@ void TranslateSequence2AminoTask::run(){ importer.startSequence(stateInfo, dbiRef, U2ObjectDbi::ROOT_FOLDER, seqObj->getSequenceName() + " " + resultName + QString(" %1").arg(currentSeq) + " direct", false); int blockCounter = 0; - qint64 end = directRegion.startPos + directRegion.length / 3 * 3; - for(qint64 i = directRegion.startPos; i < end ; i+=3, blockCounter += 3){ - if( (blockCounter % NUM_DB_READ) == 0){ + qint64 end = directRegion.startPos + directRegion.length / 3 * 3; + for (qint64 i = directRegion.startPos; i < end; i += 3, blockCounter += 3) { + if ((blockCounter % NUM_DB_READ) == 0) { importer.addBlock(translatedSeq.constData(), translatedSeq.size(), stateInfo); seq.clear(); translatedSeq.clear(); - seq = seqObj->getSequenceData(U2Region(i, qMin(static_cast<qint64>(NUM_DB_READ), end - i)), stateInfo); + seq = seqObj->getSequenceData(U2Region(i, qMin(static_cast<qint64>(NUM_DB_READ), end - i)), stateInfo); CHECK_OP(stateInfo, ); blockCounter = 0; } @@ -129,20 +127,20 @@ void TranslateSequence2AminoTask::run(){ } currentSeq = 0; // complementary - foreach(U2Region complementaryRegion, regionsComplementary){ + foreach(U2Region complementaryRegion, regionsComplementary) { translatedSeq.clear(); U2SequenceImporter importer; - importer.startSequence(stateInfo, dbiRef, U2ObjectDbi::ROOT_FOLDER, seqObj->getSequenceName()+ " " + resultName + QString(" %1").arg(currentSeq) + " complementary", false); + importer.startSequence(stateInfo, dbiRef, U2ObjectDbi::ROOT_FOLDER, seqObj->getSequenceName() + " " + resultName + QString(" %1").arg(currentSeq) + " complementary", false); QByteArray complementarySeq; char* complSeq = NULL; int blockCounter = 0; - qint64 end = complementaryRegion.endPos() - 1 - complementaryRegion.length / 3 * 3; + qint64 end = complementaryRegion.endPos() - 1 - complementaryRegion.length / 3 * 3; - for(qint64 i = complementaryRegion.endPos() - 1 ; i > end ;i-=3, blockCounter += 3){ - if( (blockCounter % NUM_DB_READ) == 0 ){ + for (qint64 i = complementaryRegion.endPos() - 1; i > end;i -= 3, blockCounter += 3) { + if ((blockCounter % NUM_DB_READ) == 0) { importer.addBlock(translatedSeq.constData(), translatedSeq.size(), stateInfo); complementarySeq.clear(); seq.clear(); @@ -170,7 +168,7 @@ void TranslateSequence2AminoTask::run(){ } -void AminoTranslationWorkerFactory::init(){ +void AminoTranslationWorkerFactory::init() { QMap<Descriptor, DataTypePtr> m; m[BaseSlots::DNA_SEQUENCE_SLOT()] = BaseTypes::DNA_SEQUENCE_TYPE(); @@ -228,17 +226,17 @@ void AminoTranslationWorkerFactory::init(){ delegates[AUTO_TRANSLATION_ATTR] = new ComboBoxWithBoolsDelegate(); QVariantMap posTransMap; - posTransMap["all"]="all"; - posTransMap["first"]="first"; - posTransMap["second"]="second"; - posTransMap["third"]="third"; + posTransMap["all"] = "all"; + posTransMap["first"] = "first"; + posTransMap["second"] = "second"; + posTransMap["third"] = "third"; delegates[POS_2_TRANSLATE_ATTR] = new ComboBoxDelegate(posTransMap); ActorPrototype* proto = new IntegralBusActorPrototype(desc, p, a); proto->setEditor(new DelegateEditor(delegates)); - proto->setIconPath( ":core/images/show_trans.png" ); + proto->setIconPath(":core/images/show_trans.png"); proto->setPrompter(new AminoTranslationPrompter()); WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_BASIC(), proto); @@ -246,67 +244,62 @@ void AminoTranslationWorkerFactory::init(){ localDomain->registerEntry(new AminoTranslationWorkerFactory()); } -QString AminoTranslationPrompter::composeRichDoc(){ +QString AminoTranslationPrompter::composeRichDoc() { IntegralBusPort* input = qobject_cast<IntegralBusPort*>(target->getPort(BasePorts::IN_SEQ_PORT_ID())); Actor* producer = input->getProducer(BaseSlots::DNA_SEQUENCE_SLOT().getId()); - QString unsetStr = "<font color='red'>"+tr("unset")+"</font>"; + QString unsetStr = "<font color='red'>" + tr("unset") + "</font>"; QString producerName = tr(" from <u>%1</u>").arg(producer ? producer->getLabel() : unsetStr); QString offset = getParameter(POS_2_TRANSLATE_ATTR).toString(); bool autoTranslation = getParameter(AUTO_TRANSLATION_ATTR).toBool(); - QString translationId ; + QString translationId; QString usingGenetic; offset = getHyperlink(POS_2_TRANSLATE_ATTR, offset); - if(!autoTranslation){ + if (!autoTranslation) { translationId = getParameter(ID_ATTR).toString(); DNATranslation* aminoTT = AppContext::getDNATranslationRegistry()-> lookupTranslation(AppContext::getDNAAlphabetRegistry()->findById(BaseDNAAlphabetIds::NUCL_DNA_DEFAULT()), DNATranslationType_NUCL_2_AMINO, translationId); QString ttName = aminoTT->getTranslationName(); usingGenetic = ttName = getHyperlink(ID_ATTR, ttName); - } - else{ + } else { usingGenetic = getHyperlink(AUTO_TRANSLATION_ATTR, "auto selected genetic code"); } QString doc = QString("Translated sequence to amino from %1 position using %2."). - arg(offset). // offset from sequence will be translated - arg(usingGenetic); // genetic code + arg(offset). // offset from sequence will be translated + arg(usingGenetic); // genetic code return doc; } -AminoTranslationWorker::AminoTranslationWorker(Actor* a): BaseWorker(a), input(NULL), output(NULL) {} +AminoTranslationWorker::AminoTranslationWorker(Actor* a) : BaseWorker(a), input(NULL), output(NULL) {} -void AminoTranslationWorker::init(){ +void AminoTranslationWorker::init() { input = ports.value(BasePorts::IN_SEQ_PORT_ID()); output = ports.value(BasePorts::OUT_SEQ_PORT_ID()); } -static QVector<U2Region> getTranslatedRegions(const QString& attribute, qint64 seqLen){ +static QVector<U2Region> getTranslatedRegions(const QString& attribute, qint64 seqLen) { QVector<U2Region> translatedRegions; - if(attribute == "first"){ + if (attribute == "first") { translatedRegions.append(U2Region(0, seqLen)); - } - else if(attribute == "second"){ + } else if (attribute == "second") { translatedRegions.append(U2Region(1, seqLen - 1)); - } - else if(attribute == "third"){ + } else if (attribute == "third") { translatedRegions.append(U2Region(2, seqLen - 2)); - } - else if(attribute == "all"){ + } else if (attribute == "all") { translatedRegions.append(U2Region(0, seqLen)); translatedRegions.append(U2Region(1, seqLen - 1)); translatedRegions.append(U2Region(2, seqLen - 2)); - } - else{ + } else { assert(false); } return translatedRegions; } -Task* AminoTranslationWorker::tick(){ +Task* AminoTranslationWorker::tick() { if (input->hasMessage()) { Message inputMessage = getMessageAndSetupScriptValues(input); @@ -324,13 +317,13 @@ Task* AminoTranslationWorker::tick(){ return NULL; } - if(seqObj->getAlphabet() == NULL ){ + if (seqObj->getAlphabet() == NULL) { algoLog.trace("Alphabet is not found"); return NULL; } - if(!seqObj->getAlphabet()->isNucleic()){ + if (!seqObj->getAlphabet()->isNucleic()) { algoLog.trace("Alphabet is not nucleic"); return NULL; //return new FailTask(tr("Alphabet is not nucleic")); @@ -344,17 +337,16 @@ Task* AminoTranslationWorker::tick(){ bool autoTranslation = actor->getParameter(AUTO_TRANSLATION_ATTR)->getAttributeValue<bool>(context); DNATranslation* aminoTT = NULL; - if(autoTranslation ){ + if (autoTranslation) { aminoTT = AppContext::getDNATranslationRegistry()->lookupTranslation(seqObj->getAlphabet(), DNATranslationType_NUCL_2_AMINO, seqObj->getStringAttribute(Translation_Table_Id_Attribute)); - if(aminoTT == NULL){ - aminoTT = GObjectUtils::findAminoTT(seqObj.data(), false); + if (aminoTT == NULL) { + aminoTT = GObjectUtils::findAminoTT(seqObj.data(), false); } - } - else{ + } else { QString translId = actor->getParameter(ID_ATTR)->getAttributeValue<QString>(context); aminoTT = AppContext::getDNATranslationRegistry()->lookupTranslation(seqObj->getAlphabet(), DNATranslationType_NUCL_2_AMINO, translId); } - if(aminoTT == NULL){ + if (aminoTT == NULL) { return new FailTask("Selected genetic code is not supported "); } @@ -366,41 +358,40 @@ Task* AminoTranslationWorker::tick(){ config.aminoTT = aminoTT; DbiDataStorage *storage = context->getDataStorage(); - SAFE_POINT( NULL != storage, "Invalid workflow data storage!", NULL ); + SAFE_POINT(NULL != storage, "Invalid workflow data storage!", NULL); TranslateSequence2AminoTask *transTask = new TranslateSequence2AminoTask(config, storage->getDbiRef()); - connect(transTask ,SIGNAL(si_stateChanged()), SLOT(sl_taskFinished())); + connect(transTask, SIGNAL(si_stateChanged()), SLOT(sl_taskFinished())); return transTask; - } - else if (input->isEnded()) { + } else if (input->isEnded()) { setDone(); output->setEnded(); } return NULL; } -void AminoTranslationWorker::cleanup(){ +void AminoTranslationWorker::cleanup() { } -void AminoTranslationWorker::sl_taskFinished(){ +void AminoTranslationWorker::sl_taskFinished() { TranslateSequence2AminoTask* translate2AminoTask = qobject_cast<TranslateSequence2AminoTask*>(sender()); if (translate2AminoTask->getState() != Task::State_Finished || translate2AminoTask->isCanceled() || translate2AminoTask->hasError()) { return; } - if(output){ + if (output) { QVariantMap channelContext = output->getContext(); int metadataId = output->getContextMetadataId(); QList<U2SequenceObject*> seqObjs = translate2AminoTask->popResults(); - foreach(U2SequenceObject* seqObj, seqObjs ){ + foreach(U2SequenceObject* seqObj, seqObjs) { QVariantMap msgData; U2OpStatusImpl os; DNASequence seqData = seqObj->getWholeSequence(os); - CHECK_OP_EXT(os, reportError(tr("Error on getting %1 sequence: ").arg(seqObj->getGObjectName()) + os.getError()), ); + CHECK_OP_EXT(os, reportError(tr("Error on getting %1 sequence: ").arg(seqObj->getGObjectName()) + os.getError()), ); SharedDbiDataHandler seqId = context->getDataStorage()->putSequence(seqData); msgData[BaseSlots::DNA_SEQUENCE_SLOT().getId()] = qVariantFromValue<SharedDbiDataHandler>(seqId); output->setContext(channelContext, metadataId); diff --git a/src/plugins/workflow_designer/src/library/AminoTranslationWorker.h b/src/plugins/workflow_designer/src/library/AminoTranslationWorker.h index 19aabe7ff1c932b390bec8e9bc1592ad608ac191..31208f7eafa077e902425d9e0a3da0240852e35e 100644 --- a/src/plugins/workflow_designer/src/library/AminoTranslationWorker.h +++ b/src/plugins/workflow_designer/src/library/AminoTranslationWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/AssemblyToSequenceWorker.cpp b/src/plugins/workflow_designer/src/library/AssemblyToSequenceWorker.cpp index e424e5990634ab6c9bc010eb8e56e538a15789ca..ff39616357757a0a78859b55c2c5d288ed80c462 100644 --- a/src/plugins/workflow_designer/src/library/AssemblyToSequenceWorker.cpp +++ b/src/plugins/workflow_designer/src/library/AssemblyToSequenceWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/AssemblyToSequenceWorker.h b/src/plugins/workflow_designer/src/library/AssemblyToSequenceWorker.h index c08a53fe96f45c60e487b3c5e891df4c92d9c30b..db8c8cd768ab6f10357b8cbb99f70f09f9c377c9 100644 --- a/src/plugins/workflow_designer/src/library/AssemblyToSequenceWorker.h +++ b/src/plugins/workflow_designer/src/library/AssemblyToSequenceWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/BaseDocWriter.cpp b/src/plugins/workflow_designer/src/library/BaseDocWriter.cpp index d8d27f02c4a8cc099e047038fae876419cbc047a..90cae3b217b450614fb9afac8e573e71735067a8 100644 --- a/src/plugins/workflow_designer/src/library/BaseDocWriter.cpp +++ b/src/plugins/workflow_designer/src/library/BaseDocWriter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/BaseDocWriter.h b/src/plugins/workflow_designer/src/library/BaseDocWriter.h index f5ce4b648eafeceff61842963f1b0830dabcdf98..7719c907b4e79d10f572c2e7668251680ba0715d 100644 --- a/src/plugins/workflow_designer/src/library/BaseDocWriter.h +++ b/src/plugins/workflow_designer/src/library/BaseDocWriter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/CDSearchWorker.cpp b/src/plugins/workflow_designer/src/library/CDSearchWorker.cpp index d44e7e022748b117762ac5ee1575c55aaee7e87e..c5207e4551ac2f10b11442e8efa78f49ec5befe1 100644 --- a/src/plugins/workflow_designer/src/library/CDSearchWorker.cpp +++ b/src/plugins/workflow_designer/src/library/CDSearchWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/CDSearchWorker.h b/src/plugins/workflow_designer/src/library/CDSearchWorker.h index 12cae1760840ff8b93e638f344936791c2b42d50..297b0e4526b6b3dd0ab0b7798429f296fd9bbd6d 100644 --- a/src/plugins/workflow_designer/src/library/CDSearchWorker.h +++ b/src/plugins/workflow_designer/src/library/CDSearchWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/CfgExternalToolModel.cpp b/src/plugins/workflow_designer/src/library/CfgExternalToolModel.cpp index 6724c458a796b28a2801f54b4e238cf8fed1a823..02181c793a1b6d1cdb75879d9b978b08f98b21be 100644 --- a/src/plugins/workflow_designer/src/library/CfgExternalToolModel.cpp +++ b/src/plugins/workflow_designer/src/library/CfgExternalToolModel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -27,9 +27,10 @@ #include <U2Lang/BaseTypes.h> #include <U2Lang/WorkflowEnv.h> +#include <U2Lang/WorkflowUtils.h> -#include "../WorkflowEditorDelegates.h" #include "CfgExternalToolModel.h" +#include "../WorkflowEditorDelegates.h" namespace U2 { @@ -41,18 +42,22 @@ CfgExternalToolItem::CfgExternalToolItem() { dfr = AppContext::getDocumentFormatRegistry(); dtr = Workflow::WorkflowEnv::getDataTypeRegistry(); - delegateForTypes = NULL; - delegateForFormats = NULL; + delegateForNames = nullptr; + delegateForIds = nullptr; + delegateForTypes = nullptr; + delegateForFormats = nullptr; itemData.type = BaseTypes::DNA_SEQUENCE_TYPE()->getId(); itemData.format = BaseDocumentFormats::FASTA; } CfgExternalToolItem::~CfgExternalToolItem() { + delete delegateForNames; + delete delegateForIds; delete delegateForTypes; delete delegateForFormats; } -QString CfgExternalToolItem::getDataType() const { +const QString &CfgExternalToolItem::getDataType() const { return itemData.type; } @@ -60,7 +65,15 @@ void CfgExternalToolItem::setDataType(const QString& id) { itemData.type = id; } -QString CfgExternalToolItem::getName() const { +const QString &CfgExternalToolItem::getId() const { + return itemData.attributeId; +} + +void CfgExternalToolItem::setId(const QString &_id) { + itemData.attributeId = _id; +} + +const QString &CfgExternalToolItem::getName() const { return itemData.attrName; } @@ -68,7 +81,7 @@ void CfgExternalToolItem::setName(const QString &_name) { itemData.attrName = _name; } -QString CfgExternalToolItem::getFormat() const { +const QString &CfgExternalToolItem::getFormat() const { return itemData.format; } @@ -76,7 +89,7 @@ void CfgExternalToolItem::setFormat(const QString & f) { itemData.format = f; } -QString CfgExternalToolItem::getDescription() const { +const QString &CfgExternalToolItem::getDescription() const { return itemData.description; } @@ -88,21 +101,22 @@ void CfgExternalToolItem::setDescription(const QString & _descr) { /// CfgExternalToolModel ////////////////////////////////////////////////////////////////////////// -CfgExternalToolModel::CfgExternalToolModel(bool isInput, QObject *obj) - : QAbstractTableModel(obj), isInput(isInput) +CfgExternalToolModel::CfgExternalToolModel(CfgExternalToolModel::ModelType _modelType, QObject *_obj) + : QAbstractTableModel(_obj), + isInput(Input == _modelType) { init(); } -int CfgExternalToolModel::rowCount(const QModelIndex & /* = QModelIndex */) const{ +int CfgExternalToolModel::rowCount(const QModelIndex & /*index*/) const{ return items.size(); } -int CfgExternalToolModel::columnCount(const QModelIndex & /* = QModelIndex */) const { - return 4; +int CfgExternalToolModel::columnCount(const QModelIndex & /*index*/) const { + return COLUMNS_COUNT; } -Qt::ItemFlags CfgExternalToolModel::flags(const QModelIndex &) const{ +Qt::ItemFlags CfgExternalToolModel::flags(const QModelIndex & /*index*/) const{ return Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable; } @@ -114,27 +128,60 @@ QList<CfgExternalToolItem*> CfgExternalToolModel::getItems() const { return items; } -QVariant CfgExternalToolModel::data(const QModelIndex &index, int role /* = Qt::DisplayRole */) const { +QVariant CfgExternalToolModel::data(const QModelIndex &index, int role) const { CfgExternalToolItem *item = getItem(index); int col = index.column(); switch (role) { - case Qt::DisplayRole: + case Qt::DisplayRole: // fallthrough case Qt::ToolTipRole: - if (col == 0) return item->getName(); - else if (col == 1) return item->delegateForTypes->getDisplayValue(item->getDataType()); - else if (col == 2) return item->delegateForFormats->getDisplayValue(item->getFormat()); - else if (col == 3) return item->getDescription(); - else return QVariant(); + switch (col) { + case COLUMN_NAME: + return item->getName(); + case COLUMN_ID: + return item->getId(); + case COLUMN_DATA_TYPE: + return item->delegateForTypes->getDisplayValue(item->getDataType()); + case COLUMN_FORMAT: + return item->delegateForFormats->getDisplayValue(item->getFormat()); + case COLUMN_DESCRIPTION: + return item->getDescription(); + default: + // do nothing, inaccessible code + Q_ASSERT(false); + return QVariant(); + } case DelegateRole: - if (col == 1) return qVariantFromValue<PropertyDelegate*>(item->delegateForTypes); - else if (col == 2) return qVariantFromValue<PropertyDelegate*>(item->delegateForFormats); - else return QVariant(); - case Qt::EditRole: + switch (col) { + case COLUMN_NAME: + return qVariantFromValue<PropertyDelegate*>(item->delegateForNames); + case COLUMN_ID: + return qVariantFromValue<PropertyDelegate*>(item->delegateForIds); + case COLUMN_DATA_TYPE: + return qVariantFromValue<PropertyDelegate*>(item->delegateForTypes); + case COLUMN_FORMAT: + return qVariantFromValue<PropertyDelegate*>(item->delegateForFormats); + default: + return QVariant(); + } + case Qt::EditRole: // fallthrough case ConfigurationEditor::ItemValueRole: - if (col == 1) return item->getDataType(); - else if (col == 2) return item->getFormat(); - else return QVariant(); + switch (col) { + case COLUMN_NAME: + return item->getName(); + case COLUMN_ID: + return item->getId(); + case COLUMN_DATA_TYPE: + return item->getDataType(); + case COLUMN_FORMAT: + return item->getFormat(); + case COLUMN_DESCRIPTION: + return item->getDescription(); + default: + // do nothing, inaccessible code + Q_ASSERT(false); + return QVariant(); + } default: return QVariant(); } @@ -146,24 +193,19 @@ void CfgExternalToolModel::createFormatDelegate(const QString &newType, CfgExter if (newType == BaseTypes::DNA_SEQUENCE_TYPE()->getId()) { delegate = new ComboBoxDelegate(seqFormatsW); format = seqFormatsW.values().first().toString(); - } - else if (newType == BaseTypes::MULTIPLE_ALIGNMENT_TYPE()->getId()) { + } else if (newType == BaseTypes::MULTIPLE_ALIGNMENT_TYPE()->getId()) { delegate = new ComboBoxDelegate(msaFormatsW); format = msaFormatsW.values().first().toString(); - } - else if (newType == BaseTypes::ANNOTATION_TABLE_TYPE()->getId()) { - delegate = new ComboBoxDelegate(annFormatsW); - format = annFormatsW.values().first().toString(); - } - else if (newType == SEQ_WITH_ANNS){ + } else if (newType == BaseTypes::ANNOTATION_TABLE_TYPE()->getId()) { delegate = new ComboBoxDelegate(annFormatsW); format = annFormatsW.values().first().toString(); - } - else if (newType == BaseTypes::STRING_TYPE()->getId()) { + } else if (newType == SEQ_WITH_ANNS){ + delegate = new ComboBoxDelegate(annSeqFormatsW); + format = annSeqFormatsW.values().first().toString(); + } else if (newType == BaseTypes::STRING_TYPE()->getId()) { delegate = new ComboBoxDelegate(textFormat); format = textFormat.values().first().toString(); - } - else{ + } else { return; } item->setFormat(format); @@ -174,14 +216,25 @@ bool CfgExternalToolModel::setData(const QModelIndex &index, const QVariant &val int col = index.column(); CfgExternalToolItem * item = getItem(index); switch (role) { - case Qt::EditRole: + case Qt::EditRole: // fall through case ConfigurationEditor::ItemValueRole: - if (col == 0) { + switch (col) { + case COLUMN_NAME: if (item->getName() != value.toString()) { + const QString oldGeneratedId = WorkflowUtils::generateIdFromName(item->getName()); + const bool wasIdEditedByUser = (oldGeneratedId != item->getId()); item->setName(value.toString()); + if (!wasIdEditedByUser) { + item->setId(WorkflowUtils::generateIdFromName(item->getName())); + } } - } - else if (col == 1) { + break; + case COLUMN_ID: + if (item->getId() != value.toString()) { + item->setId(value.toString()); + } + break; + case COLUMN_DATA_TYPE: { QString newType = value.toString(); if (item->getDataType() != newType) { if (!newType.isEmpty()) { @@ -189,18 +242,26 @@ bool CfgExternalToolModel::setData(const QModelIndex &index, const QVariant &val createFormatDelegate(newType, item); } } + break; } - else if (col == 2) { + case COLUMN_FORMAT: if (item->getFormat() != value.toString() && !value.toString().isEmpty()) { item->setFormat(value.toString()); } - } - else if (col == 3) { + break; + case COLUMN_DESCRIPTION: if (item->getDescription() != value.toString()) { item->setDescription(value.toString()); } + break; + default: + // do nothing, inaccessible code + Q_ASSERT(false); } emit dataChanged(index, index); + break; + default: + ; // do nothing } return true; } @@ -208,27 +269,34 @@ bool CfgExternalToolModel::setData(const QModelIndex &index, const QVariant &val QVariant CfgExternalToolModel::headerData(int section, Qt::Orientation orientation, int role) const { if (orientation == Qt::Horizontal && role == Qt::DisplayRole) { switch (section) { - case 0: return tr("Name for command line parameter"); - case 1: return tr("Type"); - case 2: + case COLUMN_NAME: + return tr("Display name"); + case COLUMN_ID: + return tr("Argument name"); + case COLUMN_DATA_TYPE: + return tr("Type"); + case COLUMN_FORMAT: if (isInput) { - return tr("Read as"); + return tr("Argument value"); + } else { + return tr("Argument value"); } - else { - return tr("Write as"); - } - case 3: return tr("Description"); - default: return QVariant(); + case COLUMN_DESCRIPTION: + return tr("Description"); + default: + // do nothing, inaccessible code + Q_ASSERT(false); + return QVariant(); } } return QVariant(); } -bool CfgExternalToolModel::insertRows(int row, int count, const QModelIndex & parent) { - Q_UNUSED(row); - Q_UNUSED(count); +bool CfgExternalToolModel::insertRows(int /*row*/, int /*count*/, const QModelIndex &parent) { beginInsertRows(parent, items.size(), items.size()); CfgExternalToolItem *newItem = new CfgExternalToolItem(); + newItem->delegateForNames = new LineEditWithValidatorDelegate(WorkflowEntityValidator::ACCEPTABLE_NAME); + newItem->delegateForIds = new LineEditWithValidatorDelegate(WorkflowEntityValidator::ACCEPTABLE_ID); newItem->delegateForTypes = new ComboBoxDelegate(types); newItem->delegateForFormats = new ComboBoxDelegate(seqFormatsW); items.append(newItem); @@ -236,17 +304,17 @@ bool CfgExternalToolModel::insertRows(int row, int count, const QModelIndex & pa return true; } -bool CfgExternalToolModel::removeRows(int row, int count, const QModelIndex & parent) { - Q_UNUSED(count); - if (row >= 0 && row < items.size()) { - beginRemoveRows(parent, row, row); - items.removeAt(row); - endRemoveRows(); - return true; - } - else { - return false; +bool CfgExternalToolModel::removeRows(int row, int count, const QModelIndex &parent) { + CHECK(0 <= row && row < items.size(), false); + CHECK(0 <= row + count - 1 && row + count - 1 < items.size(), false); + CHECK(0 < count, false); + + beginRemoveRows(parent, row, row + count - 1); + for (int i = row + count - 1; i >= row; --i) { + delete items.takeAt(i); } + endRemoveRows(); + return true; } void CfgExternalToolModel::init() { @@ -280,42 +348,60 @@ void CfgExternalToolModel::initFormats() { DocumentFormatConstraints annRead(commonConstraints); annRead.supportedObjectTypes += GObjectTypes::ANNOTATION_TABLE; + DocumentFormatConstraints annSeqWrite(commonConstraints); + annSeqWrite.supportedObjectTypes += GObjectTypes::ANNOTATION_TABLE; + annSeqWrite.supportedObjectTypes += GObjectTypes::SEQUENCE; + + DocumentFormatConstraints annSeqRead(commonConstraints); + annSeqRead.supportedObjectTypes += GObjectTypes::ANNOTATION_TABLE; + annSeqRead.supportedObjectTypes += GObjectTypes::SEQUENCE; + + QString argumentValue(tr("URL to %1 file with data")); foreach(const DocumentFormatId& id, ids) { DocumentFormat* df = AppContext::getDocumentFormatRegistry()->getFormatById(id); + QString formatNameKey = argumentValue.arg(df->getFormatName()); + QString formatId = df->getFormatId(); if (df->checkConstraints(seqWrite)) { - seqFormatsW[df->getFormatName()] = df->getFormatId(); + seqFormatsW[formatNameKey] = formatId; } if (df->checkConstraints(seqRead)) { - seqFormatsR[df->getFormatName()] = df->getFormatId(); + seqFormatsR[formatNameKey] = formatId; } if (df->checkConstraints(msaWrite)) { - msaFormatsW[df->getFormatName()] = df->getFormatId(); + msaFormatsW[formatNameKey] = formatId; } if (df->checkConstraints(msaRead)) { - msaFormatsR[df->getFormatName()] = df->getFormatId(); + msaFormatsR[formatNameKey] = formatId; } if (df->checkConstraints(annWrite)) { - annFormatsW[df->getFormatName()] = df->getFormatId(); + annFormatsW[formatNameKey] = formatId; } if (df->checkConstraints(annRead)) { - annFormatsR[df->getFormatName()] = df->getFormatId(); + annFormatsR[formatNameKey] = formatId; + } + + if (df->checkConstraints(annSeqWrite)) { + annSeqFormatsW[formatNameKey] = formatId; + } + + if (df->checkConstraints(annSeqRead)) { + annSeqFormatsR[formatNameKey] = formatId; } } DocumentFormat *df = AppContext::getDocumentFormatRegistry()->getFormatById(BaseDocumentFormats::PLAIN_TEXT); if (isInput) { - textFormat[tr("String value")] = DataConfig::StringValue; - } - textFormat[tr("Text file")] = df->getFormatId(); - if (!isInput) { - textFormat[tr("Output file url")] = DataConfig::OutputFileUrl; + textFormat[tr("String data value")] = DataConfig::STRING_VALUE; + } else { + textFormat[tr("Output URL")] = DataConfig::OUTPUT_FILE_URL; } + textFormat[argumentValue.arg("TXT")] = df->getFormatId(); } void CfgExternalToolModel::initTypes() { @@ -323,22 +409,44 @@ void CfgExternalToolModel::initTypes() { types[ptr->getDisplayName()] = ptr->getId(); ptr = BaseTypes::ANNOTATION_TABLE_TYPE(); - types[ptr->getDisplayName()] = ptr->getId(); + types[tr("Annotations")] = ptr->getId(); ptr = BaseTypes::MULTIPLE_ALIGNMENT_TYPE(); - types[ptr->getDisplayName()] = ptr->getId(); + types[tr("Alignment")] = ptr->getId(); ptr = BaseTypes::STRING_TYPE(); types[ptr->getDisplayName()] = ptr->getId(); - types["Sequence with annotations"] = SEQ_WITH_ANNS; + types[tr("Annotated sequence")] = SEQ_WITH_ANNS; } ////////////////////////////////////////////////////////////////////////// /// AttributeItem ////////////////////////////////////////////////////////////////////////// -QString AttributeItem::getName() const { +AttributeItem::AttributeItem() + : delegateForNames(nullptr), + delegateForIds(nullptr), + delegateForDefaultValues(nullptr) +{ + +} + +AttributeItem::~AttributeItem() { + delete delegateForNames; + delete delegateForIds; + delete delegateForDefaultValues; +} + +const QString &AttributeItem::getId() const { + return id; +} + +void AttributeItem::setId(const QString &_id) { + id = _id; +} + +const QString &AttributeItem::getName() const { return name; } @@ -346,7 +454,7 @@ void AttributeItem::setName(const QString& _name) { name = _name; } -QString AttributeItem::getDataType() const { +const QString &AttributeItem::getDataType() const { return type; } @@ -354,7 +462,15 @@ void AttributeItem::setDataType(const QString &_type) { type = _type; } -QString AttributeItem::getDescription() const { +const QVariant&AttributeItem::getDefaultValue() const { + return defaultValue; +} + +void AttributeItem::setDefaultValue(const QVariant&_defaultValue) { + defaultValue = _defaultValue; +} + +const QString &AttributeItem::getDescription() const { return description; } @@ -366,27 +482,76 @@ void AttributeItem::setDescription(const QString &_description) { /// CfgExternalToolModelAttributes ////////////////////////////////////////////////////////////////////////// -CfgExternalToolModelAttributes::CfgExternalToolModelAttributes() { - types["URL"] = "URL"; - types["String"] = "String"; - types["Number"] = "Number"; - types["Boolean"] = "Boolean"; - delegate = new ComboBoxDelegate(types); +CfgExternalToolModelAttributes::CfgExternalToolModelAttributes(SchemaConfig* _schemaConfig, QObject *_parent) + : QAbstractTableModel(_parent), + schemaConfig(_schemaConfig) +{ + types.append(QPair<QString, QVariant>(tr("Boolean"), AttributeConfig::BOOLEAN_TYPE)); + types.append(QPair<QString, QVariant>(tr("Integer"), AttributeConfig::INTEGER_TYPE)); + types.append(QPair<QString, QVariant>(tr("Double"), AttributeConfig::DOUBLE_TYPE)); + types.append(QPair<QString, QVariant>(tr("String"), AttributeConfig::STRING_TYPE)); + types.append(QPair<QString, QVariant>(tr("Input file URL"), AttributeConfig::INPUT_FILE_URL_TYPE)); + types.append(QPair<QString, QVariant>(tr("Input folder URL"), AttributeConfig::INPUT_FOLDER_URL_TYPE)); + types.append(QPair<QString, QVariant>(tr("Output file URL"), AttributeConfig::OUTPUT_FILE_URL_TYPE)); + types.append(QPair<QString, QVariant>(tr("Output folder URL"), AttributeConfig::OUTPUT_FOLDER_URL_TYPE)); + typesDelegate = new ComboBoxDelegate(types); } + CfgExternalToolModelAttributes::~CfgExternalToolModelAttributes() { foreach(AttributeItem* item, items) { delete item; } } -int CfgExternalToolModelAttributes::rowCount(const QModelIndex & /* = QModelIndex */) const{ + +void CfgExternalToolModelAttributes::changeDefaultValueDelegate(const QString& newType, AttributeItem* item) { + PropertyDelegate* propDelegate = nullptr; + QVariant defaultValue; + if (newType == AttributeConfig::BOOLEAN_TYPE) { + propDelegate = new ComboBoxWithBoolsDelegate(); + defaultValue = true; + } else if (newType == AttributeConfig::STRING_TYPE) { + propDelegate = new LineEditWithValidatorDelegate(QRegularExpression("([^\"]*)")); + } else if (newType == AttributeConfig::INTEGER_TYPE) { + QVariantMap integerValues; + integerValues["minimum"] = QVariant(std::numeric_limits<int>::min()); + integerValues["maximum"] = QVariant(std::numeric_limits<int>::max()); + propDelegate = new SpinBoxDelegate(integerValues); + defaultValue = QVariant(0); + } else if (newType == AttributeConfig::DOUBLE_TYPE) { + QVariantMap doubleValues; + doubleValues["singleStep"] = 0.1; + doubleValues["minimum"] = QVariant(std::numeric_limits<double>::lowest()); + doubleValues["maximum"] = QVariant(std::numeric_limits<double>::max()); + doubleValues["decimals"] = 6; + propDelegate = new DoubleSpinBoxDelegate(doubleValues); + defaultValue = QVariant(0.0); + } else if (newType == AttributeConfig::INPUT_FILE_URL_TYPE) { + propDelegate = new URLDelegate("", "", false, false, false, nullptr, "", false, true); + } else if (newType == AttributeConfig::OUTPUT_FILE_URL_TYPE) { + propDelegate = new URLDelegate("", "", false, false, true, nullptr, "", false, false); + } else if (newType == AttributeConfig::INPUT_FOLDER_URL_TYPE) { + propDelegate = new URLDelegate("", "", false, true, false, nullptr, "", false, true); + } else if (newType == AttributeConfig::OUTPUT_FOLDER_URL_TYPE) { + propDelegate = new URLDelegate("", "", false, true, true, nullptr, "", false, false); + } else { + return; + } + + propDelegate->setSchemaConfig(schemaConfig); + item->setDefaultValue(defaultValue); + delete item->delegateForDefaultValues; + item->delegateForDefaultValues = propDelegate; +} + +int CfgExternalToolModelAttributes::rowCount(const QModelIndex & /*index*/) const{ return items.size(); } -int CfgExternalToolModelAttributes::columnCount(const QModelIndex & /* = QModelIndex */) const { - return 3; +int CfgExternalToolModelAttributes::columnCount(const QModelIndex & /*index*/) const { + return COLUMNS_COUNT; } -Qt::ItemFlags CfgExternalToolModelAttributes::flags(const QModelIndex &) const{ +Qt::ItemFlags CfgExternalToolModelAttributes::flags(const QModelIndex & /*index*/) const{ return Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable; } @@ -398,24 +563,60 @@ QList<AttributeItem*> CfgExternalToolModelAttributes::getItems() const { return items; } -QVariant CfgExternalToolModelAttributes::data(const QModelIndex &index, int role /* = Qt::DisplayRole */) const { +QVariant CfgExternalToolModelAttributes::data(const QModelIndex &index, int role) const { AttributeItem *item = getItem(index); int col = index.column(); switch (role) { - case Qt::DisplayRole: + case Qt::DisplayRole: // fallthrough case Qt::ToolTipRole: - if (col == 0) return item->getName(); - else if (col == 1) return delegate->getDisplayValue(item->getDataType()); - else if (col == 2) return item->getDescription(); - else return QVariant(); + switch (col) { + case COLUMN_NAME: + return item->getName(); + case COLUMN_ID: + return item->getId(); + case COLUMN_DATA_TYPE: + return typesDelegate->getDisplayValue(item->getDataType()); + case COLUMN_DEFAULT_VALUE: + return item->delegateForDefaultValues->getDisplayValue(item->getDefaultValue()); + case COLUMN_DESCRIPTION: + return item->getDescription(); + default: + // do nothing, inaccessible code + Q_ASSERT(false); + return QVariant(); + } case DelegateRole: - if (col == 1) return qVariantFromValue<PropertyDelegate*>(delegate); - else return QVariant(); - case Qt::EditRole: + switch (col) { + case COLUMN_NAME: + return qVariantFromValue<PropertyDelegate*>(item->delegateForNames); + case COLUMN_ID: + return qVariantFromValue<PropertyDelegate*>(item->delegateForIds); + case COLUMN_DATA_TYPE: + return qVariantFromValue<PropertyDelegate*>(typesDelegate); + case COLUMN_DEFAULT_VALUE: + return qVariantFromValue<PropertyDelegate*>(item->delegateForDefaultValues); + default: + return QVariant(); + } + case Qt::EditRole: // fallthrough case ConfigurationEditor::ItemValueRole: - if (col == 1) return item->getDataType(); - else return QVariant(); + switch (col) { + case COLUMN_NAME: + return item->getName(); + case COLUMN_ID: + return item->getId(); + case COLUMN_DATA_TYPE: + return item->getDataType(); + case COLUMN_DEFAULT_VALUE: + return item->getDefaultValue(); + case COLUMN_DESCRIPTION: + return item->getDescription(); + default: + // do nothing, inaccessible code + Q_ASSERT(false); + return QVariant(); + } default: return QVariant(); } @@ -425,27 +626,54 @@ bool CfgExternalToolModelAttributes::setData(const QModelIndex &index, const QVa int col = index.column(); AttributeItem * item = getItem(index); switch (role) { - case Qt::EditRole: + case Qt::EditRole: // fallthrough case ConfigurationEditor::ItemValueRole: - if (col == 0) { + switch (col) { + case COLUMN_NAME: if (item->getName() != value.toString()) { + const QString oldGeneratedId = WorkflowUtils::generateIdFromName(item->getName()); + const bool wasIdEditedByUser = (oldGeneratedId != item->getId()); item->setName(value.toString()); + if (!wasIdEditedByUser) { + item->setId(WorkflowUtils::generateIdFromName(item->getName())); + } } - } - else if (col == 1) { + break; + case COLUMN_ID: + if (item->getId() != value.toString()) { + item->setId(value.toString()); + } + break; + case COLUMN_DATA_TYPE: { QString newType = value.toString(); if (item->getDataType() != newType) { if (!newType.isEmpty()) { item->setDataType(newType); + changeDefaultValueDelegate(newType, item); } } + break; + } + case COLUMN_DEFAULT_VALUE: { + if (item->getDefaultValue() != value.toString()) { + item->setDefaultValue(value.toString()); + } + break; } - else if (col == 2) { + case COLUMN_DESCRIPTION: if (item->getDescription() != value.toString()) { item->setDescription(value.toString()); } + break; + default: + // do nothing, inaccessible code + Q_ASSERT(false); } + emit dataChanged(index, index); + break; + default: + ; // do nothing } return true; } @@ -453,37 +681,48 @@ bool CfgExternalToolModelAttributes::setData(const QModelIndex &index, const QVa QVariant CfgExternalToolModelAttributes::headerData(int section, Qt::Orientation orientation, int role) const { if (orientation == Qt::Horizontal && role == Qt::DisplayRole) { switch (section) { - case 0: return tr("Name"); - case 1: return tr("Type"); - case 2: return tr("Description"); - default: return QVariant(); + case COLUMN_NAME: + return tr("Display name"); + case COLUMN_ID: + return tr("Argument name"); + case COLUMN_DATA_TYPE: + return tr("Type"); + case COLUMN_DEFAULT_VALUE: + return tr("Default value"); + case COLUMN_DESCRIPTION: + return tr("Description"); + default: + // do nothing, inaccessible code + Q_ASSERT(false); + return QVariant(); } } return QVariant(); } -bool CfgExternalToolModelAttributes::insertRows(int row, int count, const QModelIndex & parent) { - Q_UNUSED(row); - Q_UNUSED(count); +bool CfgExternalToolModelAttributes::insertRows(int /*row*/, int /*count*/, const QModelIndex & parent) { beginInsertRows(parent, items.size(), items.size()); AttributeItem *newItem = new AttributeItem(); - newItem->setDataType("String"); + newItem->delegateForNames = new LineEditWithValidatorDelegate(WorkflowEntityValidator::ACCEPTABLE_NAME); + newItem->delegateForIds = new LineEditWithValidatorDelegate(WorkflowEntityValidator::ACCEPTABLE_ID); + newItem->setDataType(AttributeConfig::STRING_TYPE); + changeDefaultValueDelegate(newItem->getDataType(), newItem); items.append(newItem); endInsertRows(); return true; } bool CfgExternalToolModelAttributes::removeRows(int row, int count, const QModelIndex & parent) { - Q_UNUSED(count); - if (row >= 0 && row < items.size()) { - beginRemoveRows(parent, row, row); - items.removeAt(row); - endRemoveRows(); - return true; - } - else { - return false; + CHECK(0 <= row && row < items.size(), false); + CHECK(0 <= row + count - 1 && row + count - 1 < items.size(), false); + CHECK(0 < count, false); + + beginRemoveRows(parent, row, row + count - 1); + for (int i = row + count - 1; i >= row; --i) { + delete items.takeAt(i); } + endRemoveRows(); + return true; } } // U2 diff --git a/src/plugins/workflow_designer/src/library/CfgExternalToolModel.h b/src/plugins/workflow_designer/src/library/CfgExternalToolModel.h index f065c7d8bb5025c2d800bab2e5f61f0dfa9e0d7e..cc83d20c2103b29156c816bcfbeddd708b4990b8 100644 --- a/src/plugins/workflow_designer/src/library/CfgExternalToolModel.h +++ b/src/plugins/workflow_designer/src/library/CfgExternalToolModel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -24,6 +24,8 @@ #include <QAbstractTableModel> +#include <U2Designer/PropertyWidget.h> + #include <U2Lang/ExternalToolCfg.h> namespace U2 { @@ -37,18 +39,23 @@ public: CfgExternalToolItem(); ~CfgExternalToolItem(); - QString getDataType() const; - void setDataType(const QString& id); + const QString &getDataType() const; + void setDataType(const QString& typeId); + + const QString &getId() const; + void setId(const QString &id); - QString getName() const; - void setName(const QString &_name); + const QString &getName() const; + void setName(const QString &name); - QString getFormat() const; - void setFormat(const QString & f); + const QString &getFormat() const; + void setFormat(const QString &format); - QString getDescription() const; - void setDescription(const QString & _descr); + const QString &getDescription() const; + void setDescription(const QString &descr); + PropertyDelegate *delegateForNames; + PropertyDelegate *delegateForIds; PropertyDelegate *delegateForTypes; PropertyDelegate *delegateForFormats; @@ -59,23 +66,36 @@ private: DataTypeRegistry *dtr; }; - class CfgExternalToolModel : public QAbstractTableModel { Q_OBJECT public: - CfgExternalToolModel(bool isInput, QObject *obj = NULL); - - int rowCount(const QModelIndex & /* = QModelIndex */) const; - int columnCount(const QModelIndex & /* = QModelIndex */) const; - Qt::ItemFlags flags(const QModelIndex &) const; + enum ModelType { + Input, + Output + }; + + enum Columns { + COLUMN_NAME = 0, + COLUMN_ID = 1, + COLUMN_DATA_TYPE = 2, + COLUMN_FORMAT = 3, + COLUMN_DESCRIPTION = 4, + COLUMNS_COUNT = COLUMN_DESCRIPTION + 1 // elements count + }; + + CfgExternalToolModel(ModelType modelType, QObject *obj = NULL); + + int rowCount(const QModelIndex &parent = QModelIndex()) const; + int columnCount(const QModelIndex &parent = QModelIndex()) const; + Qt::ItemFlags flags(const QModelIndex &index) const; CfgExternalToolItem* getItem(const QModelIndex &index) const; QList<CfgExternalToolItem*> getItems() const; - QVariant data(const QModelIndex &index, int role /* = Qt::DisplayRole */) const; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; void createFormatDelegate(const QString &newType, CfgExternalToolItem *item); - bool setData(const QModelIndex &index, const QVariant &value, int role); + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; - bool insertRows(int row, int count = 0, const QModelIndex & parent = QModelIndex()); - bool removeRows(int row, int count = 0, const QModelIndex & parent = QModelIndex()); + bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()); + bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()); private: void init(); @@ -88,49 +108,78 @@ private: QVariantMap seqFormatsW; QVariantMap msaFormatsW; QVariantMap annFormatsW; + QVariantMap annSeqFormatsW; QVariantMap seqFormatsR; QVariantMap msaFormatsR; QVariantMap annFormatsR; + QVariantMap annSeqFormatsR; QVariantMap textFormat; }; - class AttributeItem { public: - QString getName() const; - void setName(const QString& _name); - QString getDataType() const; - void setDataType(const QString &_type); - QString getDescription() const; - void setDescription(const QString &_description); + AttributeItem(); + ~AttributeItem(); + + const QString &getId() const; + void setId(const QString &id); + + const QString &getName() const; + void setName(const QString &name); + + const QString &getDataType() const; + void setDataType(const QString &type); + + const QVariant&getDefaultValue() const; + void setDefaultValue(const QVariant&defaultValue); + + const QString &getDescription() const; + void setDescription(const QString &description); + + PropertyDelegate *delegateForNames; + PropertyDelegate *delegateForIds; + PropertyDelegate *delegateForDefaultValues; + private: + QString id; QString name; QString type; + QVariant defaultValue; QString description; - }; class CfgExternalToolModelAttributes : public QAbstractTableModel { Q_OBJECT public: - CfgExternalToolModelAttributes(); + enum Columns { + COLUMN_NAME = 0, + COLUMN_ID = 1, + COLUMN_DATA_TYPE = 2, + COLUMN_DEFAULT_VALUE = 3, + COLUMN_DESCRIPTION = 4, + COLUMNS_COUNT = COLUMN_DESCRIPTION + 1 // elements count + }; + + CfgExternalToolModelAttributes(SchemaConfig* schemaConfig, QObject *parent = nullptr); ~CfgExternalToolModelAttributes(); - int rowCount(const QModelIndex & /* = QModelIndex */) const; - int columnCount(const QModelIndex & /* = QModelIndex */) const; - Qt::ItemFlags flags(const QModelIndex &) const; + void changeDefaultValueDelegate(const QString& newType, AttributeItem* item); + int rowCount(const QModelIndex &parent = QModelIndex()) const; + int columnCount(const QModelIndex &parent = QModelIndex()) const; + Qt::ItemFlags flags(const QModelIndex &index) const; AttributeItem* getItem(const QModelIndex &index) const; QList<AttributeItem*> getItems() const; - QVariant data(const QModelIndex &index, int role /* = Qt::DisplayRole */) const; - bool setData(const QModelIndex &index, const QVariant &value, int role); + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; - bool insertRows(int row, int count = 0, const QModelIndex & parent = QModelIndex()); - bool removeRows(int row, int count = 0, const QModelIndex & parent = QModelIndex()); + bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()); + bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()); private: QList<AttributeItem*> items; - PropertyDelegate *delegate; - QVariantMap types; + PropertyDelegate *typesDelegate; + QList<ComboItem> types; + SchemaConfig *schemaConfig; }; } // U2 diff --git a/src/plugins/workflow_designer/src/library/CmdlineBasedWorkerValidator.cpp b/src/plugins/workflow_designer/src/library/CmdlineBasedWorkerValidator.cpp new file mode 100644 index 0000000000000000000000000000000000000000..388bef7c0f5183f3a18ac566629f49f65003cb0f --- /dev/null +++ b/src/plugins/workflow_designer/src/library/CmdlineBasedWorkerValidator.cpp @@ -0,0 +1,49 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QDir> + +#include <U2Lang/ActorPrototype.h> +#include <U2Lang/ExternalToolCfg.h> +#include <U2Lang/WorkflowEnv.h> + +#include "CmdlineBasedWorkerValidator.h" +#include "util/CustomWorkerUtils.h" + +namespace U2 { +namespace Workflow { + +bool CmdlineBasedWorkerValidator::validate(const Actor* actor, NotificationsList& notificationList, const QMap<QString, QString>& options) const { + ExternalProcessConfig* config = WorkflowEnv::getExternalCfgRegistry()->getConfigById(actor->getProto()->getId()); + if (CustomWorkerUtils::commandContainsVarName(config->cmdLine, CustomWorkerUtils::TOOL_PATH_VAR_NAME)) { + CHECK_EXT(QFile(config->customToolPath).exists(), + notificationList << WorkflowNotification(tr("The element specifies a nonexistent path to an external tool executable."), actor->getId()), + false); + CHECK_EXT(QFileInfo(config->customToolPath).isFile(), + notificationList << WorkflowNotification(tr("The element should specify an executable file."), actor->getId()), + false); + } + + return true; +} + +} +} \ No newline at end of file diff --git a/src/plugins/workflow_designer/src/library/CmdlineBasedWorkerValidator.h b/src/plugins/workflow_designer/src/library/CmdlineBasedWorkerValidator.h new file mode 100644 index 0000000000000000000000000000000000000000..a2f85f999ae4c55622a2f0c61236cb1a701d4337 --- /dev/null +++ b/src/plugins/workflow_designer/src/library/CmdlineBasedWorkerValidator.h @@ -0,0 +1,41 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _CMDLINE_BASED_WORKER_VALIDATOR_ +#define _CMDLINE_BASED_WORKER_VALIDATOR_ + +#include <U2Lang/ActorValidator.h> + +namespace U2 { +namespace Workflow { + +class CmdlineBasedWorkerValidator : public ActorValidator { + Q_DECLARE_TR_FUNCTIONS(CmdlineBasedWorkerValidator) + +public: + bool validate(const Actor* actor, NotificationsList& notificationList, const QMap<QString, QString>& options) const override; + +}; + +} +} + +#endif //_CMDLINE_BASED_WORKER_VALIDATOR_ \ No newline at end of file diff --git a/src/plugins/workflow_designer/src/library/ConvertFilesFormatWorker.cpp b/src/plugins/workflow_designer/src/library/ConvertFilesFormatWorker.cpp index 505b8781459ab23f8a03f9581267346531ae5a9f..ffab88c1f75e66a73d2bbba5b8fc61b163e224b2 100644 --- a/src/plugins/workflow_designer/src/library/ConvertFilesFormatWorker.cpp +++ b/src/plugins/workflow_designer/src/library/ConvertFilesFormatWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/ConvertFilesFormatWorker.h b/src/plugins/workflow_designer/src/library/ConvertFilesFormatWorker.h index 75ad16836de133b02b3867e63398182ac3b1eacb..892047e9ece36ba0803e8c1436025f0a7daed64a 100644 --- a/src/plugins/workflow_designer/src/library/ConvertFilesFormatWorker.h +++ b/src/plugins/workflow_designer/src/library/ConvertFilesFormatWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/ConvertSnpeffVariationsToAnnotationsWorker.cpp b/src/plugins/workflow_designer/src/library/ConvertSnpeffVariationsToAnnotationsWorker.cpp index df0be21766b929c2c69edb9335a2b7e07553910f..68d358b3cef49186ede241659411f8d16d3b16c5 100644 --- a/src/plugins/workflow_designer/src/library/ConvertSnpeffVariationsToAnnotationsWorker.cpp +++ b/src/plugins/workflow_designer/src/library/ConvertSnpeffVariationsToAnnotationsWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/ConvertSnpeffVariationsToAnnotationsWorker.h b/src/plugins/workflow_designer/src/library/ConvertSnpeffVariationsToAnnotationsWorker.h index 6b852b16f20a0219988a4914e09567ea1cdda0d6..c7a456404a4446c25bfe188376235ca200bd9153 100644 --- a/src/plugins/workflow_designer/src/library/ConvertSnpeffVariationsToAnnotationsWorker.h +++ b/src/plugins/workflow_designer/src/library/ConvertSnpeffVariationsToAnnotationsWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/CoreLib.cpp b/src/plugins/workflow_designer/src/library/CoreLib.cpp index e1d2832c1add5d48a02482fcda23251408e0b219..9b2f578fc988c227e855779a43d0db37abe61982 100644 --- a/src/plugins/workflow_designer/src/library/CoreLib.cpp +++ b/src/plugins/workflow_designer/src/library/CoreLib.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -390,12 +390,13 @@ void CoreLib::initExternalToolsWorkers() { file.open(QIODevice::ReadOnly); QString data = file.readAll().data(); - ExternalProcessConfig *cfg = NULL; - cfg = HRSchemaSerializer::string2Actor(data); - - if(cfg) { + ExternalProcessConfig *cfg = HRSchemaSerializer::string2Actor(data);; + if (nullptr != cfg) { cfg->filePath = url; - ExternalProcessWorkerFactory::init(cfg); + const bool inited = ExternalProcessWorkerFactory::init(cfg); + if (!inited) { + delete cfg; + } } file.close(); } diff --git a/src/plugins/workflow_designer/src/library/CoreLib.h b/src/plugins/workflow_designer/src/library/CoreLib.h index 6c887b3f7260d99fe11a7e6cc18c4df21aa17c15..81b393ac6964d4d67bbf507f4cba45c994997867 100644 --- a/src/plugins/workflow_designer/src/library/CoreLib.h +++ b/src/plugins/workflow_designer/src/library/CoreLib.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/CreateExternalProcessDialog.cpp b/src/plugins/workflow_designer/src/library/CreateExternalProcessDialog.cpp deleted file mode 100644 index 1e04ce12c10e7dab0c48213c5bf9b72cee886f9c..0000000000000000000000000000000000000000 --- a/src/plugins/workflow_designer/src/library/CreateExternalProcessDialog.cpp +++ /dev/null @@ -1,641 +0,0 @@ -/** - * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> - * http://ugene.net - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ - -#include <QMessageBox> -#include <QWizardPage> - -#include <U2Core/AppContext.h> -#include <U2Core/BaseDocumentFormats.h> -#include <U2Core/DocumentModel.h> -#include <U2Core/QObjectScopedPointer.h> -#include <U2Core/U2SafePoints.h> - -#include <U2Designer/DelegateEditors.h> - -#include <U2Gui/DialogUtils.h> -#include <U2Gui/HelpButton.h> - -#include <U2Lang/ActorPrototypeRegistry.h> -#include <U2Lang/BaseTypes.h> -#include <U2Lang/ConfigurationEditor.h> -#include <U2Lang/ExternalToolCfg.h> -#include <U2Lang/HRSchemaSerializer.h> -#include <U2Lang/WorkflowEnv.h> -#include <U2Lang/WorkflowSettings.h> - -#include "CfgExternalToolModel.h" -#include "CreateExternalProcessDialog.h" -#include "WorkflowEditorDelegates.h" -#include "../util/WorkerNameValidator.h" - -namespace U2 { - -class ExecStringValidator : public QValidator { -public: - ExecStringValidator(QObject *parent = 0) - : QValidator(parent) {} - State validate(QString &input, int &) const { - if (input.contains("\"")) { - return Invalid; - } - return Acceptable; - } -}; - -CreateExternalProcessDialog::CreateExternalProcessDialog(QWidget *p, ExternalProcessConfig *cfg, bool lastPage) -: QWizard(p), initialCfg(NULL), lastPage(lastPage) { - ui.setupUi(this); - - new U2::HelpButton(this, button(QWizard::HelpButton), "2097199"); - - connect(ui.addInputButton, SIGNAL(clicked()), SLOT(sl_addInput())); - connect(ui.addOutputButton, SIGNAL(clicked()), SLOT(sl_addOutput())); - connect(ui.deleteInputButton, SIGNAL(clicked()), SLOT(sl_deleteInput())); - connect(ui.deleteOutputButton, SIGNAL(clicked()), SLOT(sl_deleteOutput())); - connect(ui.addAttributeButton, SIGNAL(clicked()), SLOT(sl_addAttribute())); - connect(ui.deleteAttributeButton, SIGNAL(clicked()), SLOT(sl_deleteAttribute())); - connect(this, SIGNAL(currentIdChanged(int)), SLOT(sl_validatePage(int))); - - QFontMetrics info(ui.descr1TextEdit->font()); - ui.descr1TextEdit->setFixedHeight(info.height() * 8); - ui.descr2TextEdit->setFixedHeight(info.height() * 10); - ui.descr3TextEdit->setFixedHeight(info.height() * 7); - ui.descr4TextEdit->setFixedHeight(info.height() * 12); - - ui.inputTableView->setModel(new CfgExternalToolModel(true)); - ui.outputTableView->setModel(new CfgExternalToolModel(false)); - ui.attributesTableView->setModel(new CfgExternalToolModelAttributes()); - - ui.inputTableView->setItemDelegate(new ProxyDelegate()); - ui.outputTableView->setItemDelegate(new ProxyDelegate()); - ui.attributesTableView->setItemDelegate(new ProxyDelegate()); - - ui.inputTableView->horizontalHeader()->setStretchLastSection(true); - ui.outputTableView->horizontalHeader()->setStretchLastSection(true); - ui.attributesTableView->horizontalHeader()->setStretchLastSection(true); - ui.inputTableView->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); - ui.outputTableView->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); - ui.attributesTableView->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); - QFontMetrics fm(ui.inputTableView->font()); - ui.inputTableView->setColumnWidth(1, fm.width(SEQ_WITH_ANNS)*1.5); - ui.outputTableView->setColumnWidth(1, fm.width(SEQ_WITH_ANNS)*1.5); - ui.templateLineEdit->setValidator(new ExecStringValidator(this)); ui.nameLineEdit->setValidator(new WorkerNameValidator(this)); - - initialCfg = new ExternalProcessConfig(*cfg); - init(cfg); - - editing = true; - connect(ui.nameLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(sl_validateName(const QString &))); - connect(ui.templateLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(sl_validateCmdLine(const QString &))); - connect(ui.inputTableView->model(), SIGNAL(dataChanged ( const QModelIndex &, const QModelIndex &)), SLOT(validateDataModel(const QModelIndex &, const QModelIndex &))); - connect(ui.outputTableView->model(), SIGNAL(dataChanged ( const QModelIndex &, const QModelIndex &)), SLOT(validateDataModel(const QModelIndex &, const QModelIndex &))); - connect(ui.attributesTableView->model(), SIGNAL(dataChanged ( const QModelIndex &, const QModelIndex &)), SLOT(validateAttributeModel(const QModelIndex &, const QModelIndex &))); - descr1 = ui.descr1TextEdit->toHtml(); - //validateNextPage(); - - DialogUtils::setWizardMinimumSize(this); -} - -static void clearModel(QAbstractItemModel *model) { - int count = model->rowCount(); - while (count > 0) { - model->removeRow(0); - count--; - } -} - -void CreateExternalProcessDialog::init(ExternalProcessConfig *cfg) { - int ind = 0; - clearModel(ui.inputTableView->model()); - foreach(const DataConfig &dataCfg, cfg->inputs) { - ui.inputTableView->model()->insertRow(0, QModelIndex()); - QModelIndex index = ui.inputTableView->model()->index(ind,0); - ui.inputTableView->model()->setData(index, dataCfg.attrName); - index = ui.inputTableView->model()->index(ind,1); - ui.inputTableView->model()->setData(index, dataCfg.type); - index = ui.inputTableView->model()->index(ind,2); - ui.inputTableView->model()->setData(index, dataCfg.format); - index = ui.inputTableView->model()->index(ind,3); - ui.inputTableView->model()->setData(index, dataCfg.description); - ind++; - } - - ind = 0; - clearModel(ui.outputTableView->model()); - foreach(const DataConfig &dataCfg, cfg->outputs) { - ui.outputTableView->model()->insertRow(0, QModelIndex()); - QModelIndex index = ui.outputTableView->model()->index(ind,0); - ui.outputTableView->model()->setData(index, dataCfg.attrName); - index = ui.outputTableView->model()->index(ind,1); - ui.outputTableView->model()->setData(index, dataCfg.type); - index = ui.outputTableView->model()->index(ind,2); - ui.outputTableView->model()->setData(index, dataCfg.format); - index = ui.outputTableView->model()->index(ind,3); - ui.outputTableView->model()->setData(index, dataCfg.description); - ind++; - } - - ind = 0; - clearModel(ui.attributesTableView->model()); - foreach(const AttributeConfig &attrCfg, cfg->attrs) { - ui.attributesTableView->model()->insertRow(0, QModelIndex()); - QModelIndex index = ui.attributesTableView->model()->index(ind,0); - ui.attributesTableView->model()->setData(index, attrCfg.attrName); - index = ui.attributesTableView->model()->index(ind,1); - ui.attributesTableView->model()->setData(index, attrCfg.type); - index = ui.attributesTableView->model()->index(ind,2); - ui.attributesTableView->model()->setData(index, attrCfg.description); - ind++; - } - - ui.nameLineEdit->setText(cfg->name); - ui.descriptionTextEdit->setText(cfg->description); - ui.templateLineEdit->setText(cfg->cmdLine); - ui.prompterTextEdit->setText(cfg->templateDescription); -} - -void CreateExternalProcessDialog::sl_addInput() { - ui.inputTableView->model()->insertRow(0, QModelIndex()); - validateDataModel(); -} - -void CreateExternalProcessDialog::sl_addOutput() { - ui.outputTableView->model()->insertRow(0, QModelIndex()); - validateDataModel(); -} - -void CreateExternalProcessDialog::sl_deleteInput() { - QModelIndex index = ui.inputTableView->currentIndex(); - ui.inputTableView->model()->removeRow(index.row()); - validateDataModel(); -} - -void CreateExternalProcessDialog::sl_deleteOutput() { - QModelIndex index = ui.outputTableView->currentIndex(); - ui.outputTableView->model()->removeRow(index.row()); - validateDataModel(); -} - -void CreateExternalProcessDialog::sl_addAttribute() { - ui.attributesTableView->model()->insertRow(0, QModelIndex()); - validateAttributeModel(); -} - -void CreateExternalProcessDialog::sl_deleteAttribute() { - QModelIndex index = ui.attributesTableView->currentIndex(); - ui.attributesTableView->model()->removeRow(index.row()); - validateAttributeModel(); -} - -CreateExternalProcessDialog::CreateExternalProcessDialog( QWidget *p /* = NULL*/ ) -: QWizard(p), initialCfg(NULL), lastPage(false) { - ui.setupUi(this); - - new U2::HelpButton(this, button(QWizard::HelpButton), "2097199"); - - connect(ui.addInputButton, SIGNAL(clicked()), SLOT(sl_addInput())); - connect(ui.addOutputButton, SIGNAL(clicked()), SLOT(sl_addOutput())); - connect(ui.deleteInputButton, SIGNAL(clicked()), SLOT(sl_deleteInput())); - connect(ui.deleteOutputButton, SIGNAL(clicked()), SLOT(sl_deleteOutput())); - connect(ui.addAttributeButton, SIGNAL(clicked()), SLOT(sl_addAttribute())); - connect(ui.deleteAttributeButton, SIGNAL(clicked()), SLOT(sl_deleteAttribute())); - //connect(button(QWizard::FinishButton), SIGNAL(clicked()), SLOT(sl_OK())); - connect(button(QWizard::NextButton), SIGNAL(clicked()), SLOT(sl_generateTemplateString())); - //connect(button(QWizard::NextButton), SIGNAL(clicked()), SLOT(validateNextPage())); - connect(this, SIGNAL(currentIdChanged(int)), SLOT(sl_validatePage(int))); - - connect(ui.nameLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(sl_validateName(const QString &))); - connect(ui.templateLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(sl_validateCmdLine(const QString &))); - - ui.inputTableView->setModel(new CfgExternalToolModel(true)); - ui.outputTableView->setModel(new CfgExternalToolModel(false)); - ui.attributesTableView->setModel(new CfgExternalToolModelAttributes()); - - connect(ui.inputTableView->model(), SIGNAL(dataChanged ( const QModelIndex &, const QModelIndex &)), SLOT(validateDataModel(const QModelIndex &, const QModelIndex &))); - connect(ui.outputTableView->model(), SIGNAL(dataChanged ( const QModelIndex &, const QModelIndex &)), SLOT(validateDataModel(const QModelIndex &, const QModelIndex &))); - connect(ui.attributesTableView->model(), SIGNAL(dataChanged ( const QModelIndex &, const QModelIndex &)), SLOT(validateAttributeModel(const QModelIndex &, const QModelIndex &))); - - ui.inputTableView->setItemDelegate(new ProxyDelegate()); - ui.outputTableView->setItemDelegate(new ProxyDelegate()); - ui.attributesTableView->setItemDelegate(new ProxyDelegate()); - - ui.inputTableView->horizontalHeader()->setStretchLastSection(true); - ui.outputTableView->horizontalHeader()->setStretchLastSection(true); - ui.attributesTableView->horizontalHeader()->setStretchLastSection(true); - - ui.inputTableView->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); - ui.outputTableView->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); - ui.attributesTableView->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); - - QFontMetrics fm(ui.inputTableView->font()); - ui.inputTableView->setColumnWidth(1, fm.width(SEQ_WITH_ANNS)*1.5); - ui.outputTableView->setColumnWidth(1, fm.width(SEQ_WITH_ANNS)*1.5); - - QFontMetrics info(ui.descr1TextEdit->font()); - ui.descr1TextEdit->setFixedHeight(info.height() * 8); - ui.descr2TextEdit->setFixedHeight(info.height() * 10); - ui.descr3TextEdit->setFixedHeight(info.height() * 7); - ui.descr4TextEdit->setFixedHeight(info.height() * 12); - - descr1 = ui.descr1TextEdit->toHtml(); - editing = false; - - ui.templateLineEdit->setValidator(new ExecStringValidator(this)); - ui.nameLineEdit->setValidator(new WorkerNameValidator(this)); - - DialogUtils::setWizardMinimumSize(this); -} - -CreateExternalProcessDialog::~CreateExternalProcessDialog() { - delete initialCfg; -} - -void CreateExternalProcessDialog::showEvent(QShowEvent *event) { - QDialog::showEvent(event); - if (lastPage) { - for (int i=0; i<(pageIds().size()-1); i++) { - next(); - } - } -} - -QString removeEmptyLines(const QString &str) { - QStringList res; - foreach(const QString &s, str.split(QRegExp("(\n|\r)"))) { - if (!s.trimmed().isEmpty()) { - res.append(s); - } - } - return res.join("\r\n"); -} - -void CreateExternalProcessDialog::accept() { - CfgExternalToolModel *model; - cfg = new ExternalProcessConfig(); - cfg->name = ui.nameLineEdit->text(); - cfg->description = removeEmptyLines(ui.descriptionTextEdit->toPlainText()); - cfg->templateDescription = removeEmptyLines(ui.prompterTextEdit->toPlainText()); - - model = static_cast<CfgExternalToolModel*>(ui.inputTableView->model()); - foreach(CfgExternalToolItem *item, model->getItems()) { - cfg->inputs << item->itemData; - } - - model = static_cast<CfgExternalToolModel*>(ui.outputTableView->model()); - foreach(CfgExternalToolItem *item, model->getItems()) { - cfg->outputs << item->itemData; - } - - CfgExternalToolModelAttributes *aModel = static_cast<CfgExternalToolModelAttributes*>(ui.attributesTableView->model()); - foreach(AttributeItem *item, aModel->getItems()) { - AttributeConfig attributeData; - attributeData.attrName = item->getName(); - attributeData.type = item->getDataType(); - attributeData.description = item->getDescription(); - cfg->attrs << attributeData; - } - - cfg->cmdLine = ui.templateLineEdit->text(); - - if(!validate()) { - return; - } - - if (NULL != initialCfg) { - if (!(*initialCfg == *cfg)) { - int res = QMessageBox::question(this, tr("Warning"), - tr("You have changed the structure of the element (name, slots, attributes' names and types). " - "All elements on the scene would be removed. Do you really want to change it?\n" - "You could also reset the dialog to the initial state."), - QMessageBox::Yes | QMessageBox::No | QMessageBox::Reset, QMessageBox::No); - if (QMessageBox::No == res) { - return; - } else if (QMessageBox::Reset == res) { - init(initialCfg); - return; - } - } - } - - QString str = HRSchemaSerializer::actor2String(cfg); - QString dir = WorkflowSettings::getExternalToolDirectory(); - QDir d(dir); - if(!d.exists()) { - d.mkdir(dir); - } - cfg->filePath = dir + cfg->name + ".etc"; - QFile file(cfg->filePath); - file.open(QIODevice::WriteOnly); - file.write(str.toLatin1()); - file.close(); - - done(QDialog::Accepted); -} - -bool CreateExternalProcessDialog::validate() { - QString title = tr("Create Element"); - if(cfg->inputs.isEmpty() && cfg->outputs.isEmpty()) { - QMessageBox::critical(this, title, tr("Please set the input/output data.")); - return false; - } - - if(cfg->cmdLine.isEmpty()) { - QMessageBox::critical(this, title, tr("Please set the command line to run external tool.")); - return false; - } - - if(cfg->name.isEmpty()) { - QMessageBox::critical(this, title, tr("Please set the name for the new element.")); - return false; - } - - QRegExp invalidSymbols("[\\.,:;\\?]"); - if(cfg->name.contains(invalidSymbols)) { - QMessageBox::critical(this, title, tr("Invalid symbols in the element name.")); - return false; - } - - if(WorkflowEnv::getProtoRegistry()->getProto(cfg->name) && !editing) { - QMessageBox::critical(this, title, tr("Element with this name already exists.")); - return false; - } - - invalidSymbols = QRegExp("\\W"); - QStringList nameList; - foreach(const DataConfig & dc, cfg->inputs) { - if(dc.attrName.isEmpty()) { - QMessageBox::critical(this, title, tr("For one or more parameter name was not set.")); - return false; - } - if(dc.attrName.contains(invalidSymbols)) { - QMessageBox::critical(this, title, tr("Invalid symbols in a name.").arg(dc.attrName)); - return false; - } - nameList << dc.attrName; - } - foreach(const DataConfig & dc, cfg->outputs) { - if(dc.attrName.isEmpty()) { - QMessageBox::critical(this, title, tr("For one or more parameter name was not set.")); - return false; - } - if(dc.attrName.contains(invalidSymbols)) { - QMessageBox::critical(this, title, tr("Invalid symbols in a name.").arg(dc.attrName)); - return false; - } - nameList << dc.attrName; - } - foreach(const AttributeConfig & ac, cfg->attrs) { - if(ac.attrName.isEmpty()) { - QMessageBox::critical(this, title, tr("For one or more parameter name was not set.")); - return false; - } - if(ac.attrName.contains(invalidSymbols)) { - QMessageBox::critical(this, title, tr("Invalid symbols in a name.").arg(ac.attrName)); - return false; - } - nameList << ac.attrName; - } - - if(nameList.removeDuplicates() > 0) { - QMessageBox::critical(this, title, tr("The same name of element parameters was found")); - return false; - } - - foreach(const QString &str, nameList) { - if(!cfg->cmdLine.contains("$" + str)) { - QObjectScopedPointer<QMessageBox> msgBox = new QMessageBox(this); - msgBox->setWindowTitle(title); - msgBox->setText(tr("You don't use parameter %1 in template string. Continue?").arg(str)); - msgBox->addButton(tr("Continue"), QMessageBox::ActionRole); - QPushButton *cancel = msgBox->addButton(tr("Abort"), QMessageBox::ActionRole); - msgBox->exec(); - CHECK(!msgBox.isNull(), false); - if(msgBox->clickedButton() == cancel) { - return false; - } - } - } - - return true; -} - -void CreateExternalProcessDialog::sl_generateTemplateString() { - QString cmd = "<My tool>"; - - CfgExternalToolModel *model = static_cast<CfgExternalToolModel*>(ui.inputTableView->model()); - foreach(CfgExternalToolItem *item, model->getItems()) { - cmd += " $" + item->itemData.attrName; - } - - model = static_cast<CfgExternalToolModel*>(ui.outputTableView->model()); - foreach(CfgExternalToolItem *item, model->getItems()) { - cmd += " $" + item->itemData.attrName; - } - - CfgExternalToolModelAttributes *aModel = static_cast<CfgExternalToolModelAttributes*>(ui.attributesTableView->model()); - int i = 0; - foreach(AttributeItem *item, aModel->getItems()) { - i++; - cmd += " -p" + QString::number(i) + " $" + item->getName(); - } - - ui.templateLineEdit->setText(cmd); -} - -bool CreateExternalProcessDialog::validateProcessName(const QString &name, QString &error) { - if(name.isEmpty()) { - error = tr("Please set the name for the new element."); - return false; - } - - QRegExp spaces("\\s"); - if(name.contains(spaces)) { - error = tr("Spaces in the element name."); - return false; - } - - QRegExp invalidSymbols("\\W"); - if(name.contains(invalidSymbols)) { - error = tr("Invalid symbols in the element name."); - return false; - } - - if(WorkflowEnv::getProtoRegistry()->getProto(name) && !editing) { - error = tr("Element with this name already exists."); - return false; - } - - return true; -} - -static QString statusTemplate = QString("<font color=\"%1\">%2</font>"); -void CreateExternalProcessDialog::sl_validateName( const QString &text) { - QString error; - bool res = validateProcessName(text, error); - - button(QWizard::NextButton)->setEnabled(res); - QString statusStr; - if (res) { - statusStr = statusTemplate.arg("green").arg(tr("It is the correct name")); - } else { - statusStr = statusTemplate.arg("#A6392E").arg(error); - } - ui.descr1TextEdit->setText(descr1.arg(statusStr)); -} - -void CreateExternalProcessDialog::sl_validateCmdLine( const QString & text) { - if(text.isEmpty()) { - button(QWizard::FinishButton)->setEnabled(false); - } else { - button(QWizard::FinishButton)->setEnabled(true); - } -} - -void CreateExternalProcessDialog::validateDataModel(const QModelIndex &, const QModelIndex & ) { - bool res = true; - CfgExternalToolModel *model; - - QRegExp invalidSymbols("\\W"); - QStringList nameList; - model = static_cast<CfgExternalToolModel*>(ui.inputTableView->model()); - foreach(CfgExternalToolItem *item, model->getItems()) { - if(item->itemData.attrName.isEmpty()) { - //QMessageBox::critical(this, title, tr("For one or more parameter name was not set.")); - res = false; - } - if(item->itemData.attrName.contains(invalidSymbols)) { - //QMessageBox::critical(this, title, tr("Invalid symbols in a name.").arg(dc.attrName)); - res = false; - } - nameList << item->itemData.attrName; - } - - model = static_cast<CfgExternalToolModel*>(ui.outputTableView->model()); - foreach(CfgExternalToolItem *item, model->getItems()) { - if(item->itemData.attrName.isEmpty()) { - //QMessageBox::critical(this, title, tr("For one or more parameter name was not set.")); - res = false; - } - if(item->itemData.attrName.contains(invalidSymbols)) { - //QMessageBox::critical(this, title, tr("Invalid symbols in a name.").arg(dc.attrName)); - res = false; - } - nameList << item->itemData.attrName; - } - - - - if(nameList.removeDuplicates() > 0) { - //QMessageBox::critical(this, title, tr("The same name of element parameters was found")); - res = false; - } - - if(nameList.isEmpty()) { - res = false; - } - button(QWizard::NextButton)->setEnabled(res); -} - -void CreateExternalProcessDialog::validateAttributeModel(const QModelIndex &, const QModelIndex & ) { - bool res = true; - CfgExternalToolModel *model; - - QRegExp invalidSymbols("\\W"); - QStringList nameList; - model = static_cast<CfgExternalToolModel*>(ui.inputTableView->model()); - foreach(CfgExternalToolItem *item, model->getItems()) { - if(item->itemData.attrName.isEmpty()) { - //QMessageBox::critical(this, title, tr("For one or more parameter name was not set.")); - res = false; - } - if(item->itemData.attrName.contains(invalidSymbols)) { - //QMessageBox::critical(this, title, tr("Invalid symbols in a name.").arg(dc.attrName)); - res = false; - } - nameList << item->itemData.attrName; - } - - model = static_cast<CfgExternalToolModel*>(ui.outputTableView->model()); - foreach(CfgExternalToolItem *item, model->getItems()) { - if(item->itemData.attrName.isEmpty()) { - //QMessageBox::critical(this, title, tr("For one or more parameter name was not set.")); - res = false; - } - if(item->itemData.attrName.contains(invalidSymbols)) { - //QMessageBox::critical(this, title, tr("Invalid symbols in a name.").arg(dc.attrName)); - res = false; - } - nameList << item->itemData.attrName; - } - - CfgExternalToolModelAttributes *aModel = static_cast<CfgExternalToolModelAttributes*>(ui.attributesTableView->model()); - foreach(AttributeItem *item, aModel->getItems()) { - if(item->getName().isEmpty()) { - //QMessageBox::critical(this, title, tr("For one or more parameter name was not set.")); - res = false; - } - if(item->getName().contains(invalidSymbols)) { - //QMessageBox::critical(this, title, tr("Invalid symbols in a name.").arg(ac.attrName)); - res = false; - } - nameList << item->getName(); - } - - - if(nameList.removeDuplicates() > 0) { - //QMessageBox::critical(this, title, tr("The same name of element parameters was found")); - res = false; - } - button(QWizard::NextButton)->setEnabled(res); -} - -void CreateExternalProcessDialog::validateNextPage() { - int id = currentId(); - switch(id) { - case 0: - sl_validateName(ui.nameLineEdit->text()); - break; - case 1: - validateDataModel(); - break; - case 2: - validateAttributeModel(); - case 3: - sl_validateCmdLine(ui.templateLineEdit->text()); - } -} - -void CreateExternalProcessDialog::sl_validatePage(int id) { - switch(id) { - case 0: - sl_validateName(ui.nameLineEdit->text()); - break; - case 1: - validateDataModel(); - break; - case 2: - validateAttributeModel(); - case 3: - sl_validateCmdLine(ui.templateLineEdit->text()); - } -} - -} diff --git a/src/plugins/workflow_designer/src/library/CreateExternalProcessDialog.h b/src/plugins/workflow_designer/src/library/CreateExternalProcessDialog.h deleted file mode 100644 index 7614ee6a358626404c23963b7f4a892eb20e5e7b..0000000000000000000000000000000000000000 --- a/src/plugins/workflow_designer/src/library/CreateExternalProcessDialog.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> - * http://ugene.net - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ - -#ifndef CreateExternalProcessDialog_h__ -#define CreateExternalProcessDialog_h__ - -#include "ui_ExternalProcessWorkerDialog.h" -#include <U2Lang/Datatype.h> -#include <U2Lang/Attribute.h> -#include <U2Lang/ConfigurationEditor.h> - - - -namespace U2 { - -class ExternalProcessConfig; - -class CreateExternalProcessDialog: public QWizard { - Q_OBJECT -public: - CreateExternalProcessDialog(QWidget *p = NULL); - CreateExternalProcessDialog(QWidget *p, ExternalProcessConfig *cfg, bool lastPage); - ~CreateExternalProcessDialog(); - ExternalProcessConfig* config() const {return cfg;} - bool validate(); - //bool isComplete() const; - -public slots: - void accept(); - -private slots: - void sl_addInput(); - void sl_addOutput(); - void sl_deleteInput(); - void sl_deleteOutput(); - void sl_addAttribute(); - void sl_deleteAttribute(); - void sl_generateTemplateString(); - // void sl_updateButtons(); - void sl_validateName(const QString &); - void sl_validateCmdLine(const QString &); - void validateDataModel(const QModelIndex & i1 = QModelIndex(), const QModelIndex & i2 = QModelIndex()); - void validateAttributeModel(const QModelIndex & i1 = QModelIndex(), const QModelIndex & i2 = QModelIndex()); - void validateNextPage(); - void sl_validatePage(int); - //void sl_OK(); - -protected: - virtual void showEvent(QShowEvent *event); - -private: - Ui_CreateExternalProcessWorkerDialog ui; - ExternalProcessConfig *initialCfg; - ExternalProcessConfig *cfg; - bool editing; - bool lastPage; - static const int INFO_STRINGS_NUM = 5; - bool validateProcessName(const QString &name, QString &error); - QString descr1; - void init(ExternalProcessConfig *cfg); -}; - -} - -#endif // CreateExternalProcessDialog_h__ diff --git a/src/plugins/workflow_designer/src/library/CustomExternalToolLogParser.h b/src/plugins/workflow_designer/src/library/CustomExternalToolLogParser.h new file mode 100644 index 0000000000000000000000000000000000000000..48328bc8dba2736ee55ddfe400275c6158f8bcad --- /dev/null +++ b/src/plugins/workflow_designer/src/library/CustomExternalToolLogParser.h @@ -0,0 +1,40 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_CUSTOM_EXTERNAL_TOOL_LOG_PARSER_ +#define _U2_CUSTOM_EXTERNAL_TOOL_LOG_PARSER_ + +#include <U2Core/ExternalToolRunTask.h> + +namespace U2 { + +class CustomExternalToolLogParser : public ExternalToolLogParser { +public: + CustomExternalToolLogParser() : ExternalToolLogParser() {}; + +private: + bool isError(const QString& line) const override { return false;}; + void parseErrOutput(const QString& partOfLog) override {}; +}; + +} + +#endif diff --git a/src/plugins/workflow_designer/src/library/CustomExternalToolRunTaskHelper.h b/src/plugins/workflow_designer/src/library/CustomExternalToolRunTaskHelper.h new file mode 100644 index 0000000000000000000000000000000000000000..102810cccde7e7fe4450af66f6eac1c26a2e1302 --- /dev/null +++ b/src/plugins/workflow_designer/src/library/CustomExternalToolRunTaskHelper.h @@ -0,0 +1,40 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_CUSTOM_EXTERNAL_TOOL_RUN_TASK_HELPER_ +#define _U2_CUSTOM_EXTERNAL_TOOL_RUN_TASK_HELPER_ + +#include <U2Core/ExternalToolRunTask.h> + +namespace U2 { + +class CustomExternalToolRunTaskHelper : public ExternalToolRunTaskHelper { +public: + CustomExternalToolRunTaskHelper(QProcess* process, ExternalToolLogParser* logParser, U2OpStatus& os) + : ExternalToolRunTaskHelper(process, logParser, os) {} + +private: + void processErrorToLog() override {} +}; + +} + +#endif diff --git a/src/plugins/workflow_designer/src/library/DocActors.cpp b/src/plugins/workflow_designer/src/library/DocActors.cpp index e6bb2a4c823000718785881eda5041d00440ac77..2090ba7124707bfb836b9e2f7d6f1daef53052c9 100644 --- a/src/plugins/workflow_designer/src/library/DocActors.cpp +++ b/src/plugins/workflow_designer/src/library/DocActors.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/DocActors.h b/src/plugins/workflow_designer/src/library/DocActors.h index b350488526ec4dcb6ee5f70e5426af96a9200702..13047d834a9d78cab7cd5fdf0631368e9bf5daed 100644 --- a/src/plugins/workflow_designer/src/library/DocActors.h +++ b/src/plugins/workflow_designer/src/library/DocActors.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/DocWorkers.cpp b/src/plugins/workflow_designer/src/library/DocWorkers.cpp index 2bec142821ba45032098e60e00cf687c0c0ecae1..e235825a9e8da8ad004fdcf933c5c93ab136c8a3 100644 --- a/src/plugins/workflow_designer/src/library/DocWorkers.cpp +++ b/src/plugins/workflow_designer/src/library/DocWorkers.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/DocWorkers.h b/src/plugins/workflow_designer/src/library/DocWorkers.h index 44cfc844570c9b31ce25b568c5c61ecc65087782..dd5028b8246d5fc2dacb91f48070574b036e3fc2 100644 --- a/src/plugins/workflow_designer/src/library/DocWorkers.h +++ b/src/plugins/workflow_designer/src/library/DocWorkers.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/ExternalProcessWorker.cpp b/src/plugins/workflow_designer/src/library/ExternalProcessWorker.cpp index e634c9c56f628caa9d49cb8f2931c6cbfc4337f6..701410e30e1b76866c345e58731ae6cb464a13fa 100644 --- a/src/plugins/workflow_designer/src/library/ExternalProcessWorker.cpp +++ b/src/plugins/workflow_designer/src/library/ExternalProcessWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,36 +19,46 @@ * MA 02110-1301, USA. */ -#include "ExternalProcessWorker.h" +#include <QDateTime> +#include <QFile> +#include <QUuid> -#include <U2Core/AppSettings.h> +#include <U2Core/AnnotationTableObject.h> #include <U2Core/AppContext.h> -#include <U2Core/FailTask.h> -#include <U2Core/UserApplicationsSettings.h> -#include <U2Core/DocumentModel.h> +#include <U2Core/AppSettings.h> +#include <U2Core/CmdlineTaskRunner.h> #include <U2Core/DNASequenceObject.h> -#include <U2Core/AnnotationTableObject.h> +#include <U2Core/DocumentModel.h> +#include <U2Core/ExternalToolRegistry.h> +#include <U2Core/ExternalToolRunTask.h> +#include <U2Core/FailTask.h> +#include <U2Core/FileAndDirectoryUtils.h> +#include <U2Core/GObjectRelationRoles.h> +#include <U2Core/GUrlUtils.h> +#include <U2Core/IOAdapter.h> #include <U2Core/MultipleSequenceAlignmentImporter.h> #include <U2Core/MultipleSequenceAlignmentObject.h> -#include <U2Core/IOAdapter.h> -#include <U2Core/U2AlphabetUtils.h> -#include <U2Core/GObjectRelationRoles.h> #include <U2Core/TextObject.h> -#include <U2Core/U2DbiRegistry.h> +#include <U2Core/U2AlphabetUtils.h> #include <U2Core/U2OpStatusUtils.h> #include <U2Core/U2SequenceUtils.h> +#include <U2Core/UserApplicationsSettings.h> + +#include <U2Designer/DelegateEditors.h> -#include <U2Lang/BaseTypes.h> -#include <U2Lang/WorkflowEnv.h> #include <U2Lang/ActorPrototypeRegistry.h> #include <U2Lang/BaseActorCategories.h> -#include <U2Lang/ExternalToolCfg.h> #include <U2Lang/BaseSlots.h> +#include <U2Lang/BaseTypes.h> +#include <U2Lang/ExternalToolCfg.h> #include <U2Lang/IncludedProtoFactory.h> +#include <U2Lang/WorkflowEnv.h> +#include <U2Lang/WorkflowMonitor.h> -#include <U2Designer/DelegateEditors.h> - -#include <QDateTime> +#include "CustomExternalToolLogParser.h" +#include "CustomExternalToolRunTaskHelper.h" +#include "ExternalProcessWorker.h" +#include "util/CustomWorkerUtils.h" namespace U2 { namespace LocalWorkflow { @@ -58,9 +68,14 @@ const static QString OUTPUT_PORT_TYPE("output-for-"); static const QString OUT_PORT_ID("out"); bool ExternalProcessWorkerFactory::init(ExternalProcessConfig *cfg) { - ActorPrototype *proto = IncludedProtoFactory::getExternalToolProto(cfg); - WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_EXTERNAL(), proto); - IncludedProtoFactory::registerExternalToolWorker(cfg); + QScopedPointer<ActorPrototype> proto(IncludedProtoFactory::getExternalToolProto(cfg)); + const bool prototypeRegistered = WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_EXTERNAL(), proto.data()); + CHECK(prototypeRegistered, false); + proto.take(); + + const bool factoryRegistered = IncludedProtoFactory::registerExternalToolWorker(cfg); + CHECK_EXT(factoryRegistered, delete WorkflowEnv::getProtoRegistry()->unregisterProto(cfg->id), false); + return true; } @@ -134,7 +149,7 @@ namespace { if (!dir.exists()) { dir.mkpath(path); } - url = path + "/tmp" + name + QString::number(QDateTime::currentDateTime().toTime_t()) + "." + extention; + url = path + "/tmp" + GUrlUtils::fixFileName(name + "_" + QUuid::createUuid().toString()) + "." + extention; return url; } @@ -204,28 +219,84 @@ namespace { } } // namespace +ExternalProcessWorker::ExternalProcessWorker(Actor *a) + : BaseWorker(a, false), + output(nullptr) +{ + ExternalToolCfgRegistry *reg = WorkflowEnv::getExternalCfgRegistry(); + cfg = reg->getConfigById(actor->getProto()->getId()); +} + +void ExternalProcessWorker::applySpecialInternalEnvvars(QString &execString, + ExternalProcessConfig *cfg) { + CustomWorkerUtils::commandReplaceAllSpecialByUgenePath(execString, cfg); +} + void ExternalProcessWorker::applyAttributes(QString &execString) { foreach(Attribute *a, actor->getAttributes()) { - int pos = execString.indexOf(QRegExp("\\$" + a->getDisplayName() + "(\\W|$)")); - if (-1 == pos) { - continue; + QString attrValue = a->getAttributePureValue().toString(); + DataTypePtr attrType = a->getAttributeType(); + if (attrType == BaseTypes::STRING_TYPE()) { + attrValue = GUrlUtils::getQuotedString(attrValue); } + bool wasReplaced = applyParamsToExecString(execString, + a->getId(), + attrValue); + + if (wasReplaced) { + foreach (const AttributeConfig &attributeConfig, cfg->attrs) { + if (attributeConfig.attributeId == a->getId() + && attributeConfig.flags.testFlag(AttributeConfig::AddToDashboard)) { + urlsForDashboard.insert(attrValue, + !attributeConfig.flags.testFlag(AttributeConfig::OpenWithUgene)); + break; + } + } + } + } +} - //set parameters in command line with attributes values - QString value = getValue<QString>(a->getId()); - int idLength = a->getDisplayName().size() + 1; - execString.replace(pos, idLength, value); +bool ExternalProcessWorker::applyParamsToExecString(QString &execString, QString parName, QString parValue) { + QRegularExpression regex = QRegularExpression(QString("((([^\\\\])|([^\\\\](\\\\\\\\)+)|(^))\\$)") + + QString("(") + parName + QString(")") + + (QString("(?=([^") + + WorkflowEntityValidator::ID_ACCEPTABLE_SYMBOLS_TEMPLATE + + QString("]|$))"))); + bool wasReplaced = false; + + // Replace the params one-by-one + QRegularExpressionMatchIterator iter = regex.globalMatch(execString); + while (iter.hasNext()) { + QRegularExpressionMatch match = iter.next(); + if (match.hasMatch()) { + QString m1 = match.captured(1); + int start = match.capturedStart(0); + int len = match.capturedLength(); + execString.replace(start + m1.length() - 1, len - m1.length() + 1, parValue); + wasReplaced = true; + + // We need to re-iterate as the string was changed + iter = regex.globalMatch(execString); + } } + + return wasReplaced; +} + +void ExternalProcessWorker::applyEscapedSymbols(QString &execString) { + // Replace escaped symbols + // Example: + // "%USUPP_JAVA% \\%USUPP_JAVA% -version \\\$\%\\\\\%\\$" ─┠+ // "/usr/bin/java \/usr/bin/java -version $%\\%\$" <─┘ + execString.replace(QRegularExpression("\\\\([\\\\\\%\\$])"), "\\1"); } QStringList ExternalProcessWorker::applyInputMessage(QString &execString, const DataConfig &dataCfg, const QVariantMap &data, U2OpStatus &os) { QStringList urls; - int ind = execString.indexOf(QRegExp("\\$" + dataCfg.attrName + "(\\W|$)")); - CHECK(-1 != ind, urls); - QString paramValue; + if (dataCfg.isStringValue()) { - paramValue = toStringValue(data, os); + paramValue = GUrlUtils::getQuotedString(toStringValue(data, os)); CHECK_OP(os, urls); } else { QScopedPointer<Document> d(createDocument(dataCfg, os)); @@ -238,36 +309,41 @@ QStringList ExternalProcessWorker::applyInputMessage(QString &execString, const f->storeDocument(d.data(), os); CHECK_OP(os, urls); urls << d->getURLString(); - paramValue = "\"" + d->getURLString() + "\""; + paramValue = GUrlUtils::getQuotedString(d->getURLString()); } - execString.replace(ind, dataCfg.attrName.size() + 1 , paramValue); + applyParamsToExecString(execString, dataCfg.attributeId, paramValue); return urls; } QString ExternalProcessWorker::prepareOutput(QString &execString, const DataConfig &dataCfg, U2OpStatus &os) { - int ind = execString.indexOf(QRegExp("\\$" + dataCfg.attrName + "(\\W|$)")); - CHECK(-1 != ind, ""); - QString extension; + if (dataCfg.isFileUrl()) { extension = "tmp"; } else { DocumentFormat *f = getFormat(dataCfg, os); - CHECK_OP(os, ""); + CHECK_OP(os, "") extension = f->getSupportedDocumentFileExtensions().first(); } QString url = generateAndCreateURL(extension, dataCfg.attrName); - execString.replace(ind, dataCfg.attrName.size() + 1 , "\"" + url + "\""); + bool replaced = applyParamsToExecString(execString, dataCfg.attributeId, GUrlUtils::getQuotedString(url)); + CHECK(replaced, "") return url; } Task * ExternalProcessWorker::tick() { - CHECK(!finishWorkIfInputEnded(), NULL); + QString error; + if (!inputs.isEmpty() && finishWorkIfInputEnded(error)) { + if (!error.isEmpty()) { + return new FailTask(error); + } else { + return nullptr; + } + } QString execString = commandLine; - applyAttributes(execString); int i = 0; foreach(const DataConfig &dataCfg, cfg->inputs) { //write all input data to files @@ -289,23 +365,60 @@ Task * ExternalProcessWorker::tick() { } } - LaunchExternalToolTask *task = new LaunchExternalToolTask(execString, outputUrls); + // The following call must be last call in the preparing execString chain + // So, this is a very last step for execString: + // 1) function init(): the first one is substitution of the internal vars (like '%...%') + // 2) function init(): the second is applying attributes (something like '$...') + // 3) this function: apply substitutions for Input/Output + // 4) this function: this call replaces escaped symbols: '\$', '\%', '\\' by the '$', '%', '\' + applyEscapedSymbols(execString); + + const QString workingDirectory = FileAndDirectoryUtils::createWorkingDir(context->workingDir(), FileAndDirectoryUtils::WORKFLOW_INTERNAL, "", context->workingDir()); + QString externalProcessFolder = GUrlUtils::fixFileName(cfg->name).replace(' ', '_'); + U2OpStatusImpl os; + const QString externalProcessWorkingDir = GUrlUtils::createDirectory(workingDirectory + externalProcessFolder, "_", os); + CHECK_OP(os, new FailTask(os.getError())); + + LaunchExternalToolTask *task = new LaunchExternalToolTask(execString, externalProcessWorkingDir, outputUrls); + QList<ExternalToolListener*> listeners(createLogListeners()); + task->addListeners(listeners); connect(task, SIGNAL(si_stateChanged()), SLOT(sl_onTaskFinishied())); + if (listeners[0] != nullptr) { + listeners[0]->setToolName(cfg->name); + } return task; } -bool ExternalProcessWorker::finishWorkIfInputEnded() { - bool hasMessages = true; - bool isEnded = true; - checkInputBusState(hasMessages, isEnded); - if (!hasMessages && isEnded) { - if (NULL != output) { - output->setEnded(); - } - setDone(); +bool ExternalProcessWorker::finishWorkIfInputEnded(QString &error) { + error.clear(); + const InputsCheckResult checkResult = checkInputBusState(); + switch (checkResult) { + case ALL_INPUTS_FINISH: + finish(); return true; - } else { + case SOME_INPUTS_FINISH: + error = tr("Some inputs are finished while other still have not processed messages"); + finish(); + return true; + case ALL_INPUTS_HAVE_MESSAGE: + return false; + case INTERNAL_ERROR: + error = tr("An internal error has been spotted"); + finish(); + return true; + case NOT_ALL_INPUTS_HAVE_MESSAGE: return false; + default: + error = tr("Unexpected result"); + finish(); + return true; + } +} + +void ExternalProcessWorker::finish() { + setDone(); + if (nullptr != output) { + output->setEnded(); } } @@ -347,8 +460,27 @@ static SharedDbiDataHandler getAnnotations(Document *d, WorkflowContext *context } // namespace void ExternalProcessWorker::sl_onTaskFinishied() { - LaunchExternalToolTask *t = static_cast<LaunchExternalToolTask*>(sender()); - CHECK(output && t->isFinished() && !t->hasError(),); + LaunchExternalToolTask *t = qobject_cast<LaunchExternalToolTask *>(sender()); + CHECK(t->isFinished(), ); + + if (inputs.isEmpty()) { + finish(); + } + + CHECK(!t->hasError(), ); + + foreach (const QString &url, urlsForDashboard.keys()) { + QFileInfo fileInfo(url); + if (fileInfo.exists()) { + if (fileInfo.isFile()) { + monitor()->addOutputFile(url, getActorId(), urlsForDashboard.value(url)); + } else if (fileInfo.isDir()) { + monitor()->addOutputFolder(url, getActorId()); + } + } + } + + CHECK(nullptr != output, ); /* This variable and corresponded code parts with it * are temporary created for merging sequences. @@ -359,6 +491,7 @@ void ExternalProcessWorker::sl_onTaskFinishied() { QMap<QString, DataConfig> outputUrls = t->takeOutputUrls(); QMap<QString, DataConfig>::iterator i = outputUrls.begin(); QVariantMap v; + for(; i != outputUrls.end(); i++) { DataConfig cfg = i.value(); QString url = i.key(); @@ -430,7 +563,7 @@ void ExternalProcessWorker::sl_onTaskFinishied() { } } - DataTypePtr dataType = WorkflowEnv::getDataTypeRegistry()->getById(OUTPUT_PORT_TYPE + cfg->name); + DataTypePtr dataType = WorkflowEnv::getDataTypeRegistry()->getById(OUTPUT_PORT_TYPE + cfg->id); if (seqsForMergingBySlotId.isEmpty()) { output->put(Message(dataType, v)); @@ -471,37 +604,64 @@ void ExternalProcessWorker::sl_onTaskFinishied() { } void ExternalProcessWorker::init() { + commandLine = cfg->cmdLine; + applySpecialInternalEnvvars(commandLine, cfg); + applyAttributes(commandLine); + output = ports.value(OUT_PORT_ID); foreach(const DataConfig& input, cfg->inputs) { - IntegralBus *inBus = ports.value(input.attrName); + IntegralBus *inBus = ports.value(input.attributeId); inputs << inBus; inBus->addComplement(output); } } -void ExternalProcessWorker::checkInputBusState(bool &hasMessages, bool &isEnded) const { - hasMessages = true; - isEnded = false; +ExternalProcessWorker::InputsCheckResult ExternalProcessWorker::checkInputBusState() const { + const int inputsCount = inputs.count(); + CHECK(0 < inputsCount, ALL_INPUTS_FINISH); + + int inputsWithMessagesCount = 0; + int finishedInputs = 0; foreach(const CommunicationChannel *ch, inputs) { - if (NULL != ch) { - hasMessages &= static_cast<bool>(ch->hasMessage()); - isEnded |= ch->isEnded(); + SAFE_POINT(nullptr != ch, "Input is nullptr", INTERNAL_ERROR); + if (0 != ch->hasMessage()) { + ++inputsWithMessagesCount; + } + if (ch->isEnded()) { + ++finishedInputs; } } + + if (inputsCount == inputsWithMessagesCount) { + return ALL_INPUTS_HAVE_MESSAGE; + } else if (inputsCount == finishedInputs) { + return ALL_INPUTS_FINISH; + } else if (0 < finishedInputs && 0 < inputsWithMessagesCount) { + return SOME_INPUTS_FINISH; + } else { + return NOT_ALL_INPUTS_HAVE_MESSAGE; + } } bool ExternalProcessWorker::isReady() const { CHECK(!isDone(), false); - if(inputs.isEmpty()) { + if (inputs.isEmpty()) { return true; } else { - bool hasMessages = true; - bool isEnded = true; - checkInputBusState(hasMessages, isEnded); - return hasMessages || isEnded; + const InputsCheckResult checkResult = checkInputBusState(); + switch (checkResult) { + case ALL_INPUTS_FINISH: + case SOME_INPUTS_FINISH: + case ALL_INPUTS_HAVE_MESSAGE: + case INTERNAL_ERROR: + return true; // the worker will be marked as 'done' in the 'tick' method + case NOT_ALL_INPUTS_HAVE_MESSAGE: + return false; + } } + return false; } void ExternalProcessWorker::cleanup() { @@ -515,8 +675,8 @@ void ExternalProcessWorker::cleanup() { /************************************************************************/ /* LaunchExternalToolTask */ /************************************************************************/ -LaunchExternalToolTask::LaunchExternalToolTask(const QString &execString, const QMap<QString, DataConfig> &outputUrls) -: Task(tr("Launch external process task"), TaskFlag_None), outputUrls(outputUrls), execString(execString) +LaunchExternalToolTask::LaunchExternalToolTask(const QString &_execString, const QString& _workingDir, const QMap<QString, DataConfig> &_outputUrls) +: Task(tr("Launch external process task"), TaskFlag_None), execString(_execString), workingDir(_workingDir), outputUrls(_outputUrls) { } @@ -529,52 +689,13 @@ LaunchExternalToolTask::~LaunchExternalToolTask() { } } -// a function from "qprocess.cpp" -QStringList LaunchExternalToolTask::parseCombinedArgString(const QString &program) -{ - QStringList args; - QString tmp; - int quoteCount = 0; - bool inQuote = false; - - // handle quoting. tokens can be surrounded by double quotes - // "hello world". three consecutive double quotes represent - // the quote character itself. - for (int i = 0; i < program.size(); ++i) { - if (program.at(i) == QLatin1Char('"') || program.at(i) == QLatin1Char('\'')) { - ++quoteCount; - if (quoteCount == 3) { - // third consecutive quote - quoteCount = 0; - tmp += program.at(i); - } - continue; - } - if (quoteCount) { - if (quoteCount == 1) - inQuote = !inQuote; - quoteCount = 0; - } - if (!inQuote && program.at(i).isSpace()) { - if (!tmp.isEmpty()) { - args += tmp; - tmp.clear(); - } - } else { - tmp += program.at(i); - } - } - if (!tmp.isEmpty()) - args += tmp; - - return args; -} - #define WIN_LAUNCH_CMD_COMMAND "cmd /C " #define START_WAIT_MSEC 3000 void LaunchExternalToolTask::run() { + GCOUNTER(cvar, tvar, "A task for an element with external tool is launched"); QProcess *externalProcess = new QProcess(); + externalProcess->setWorkingDirectory(workingDir); if(execString.contains(">")) { QString output = execString.split(">").last(); output = output.trimmed(); @@ -584,26 +705,42 @@ void LaunchExternalToolTask::run() { execString = execString.split(">").first(); externalProcess->setStandardOutputFile(output); } - - QStringList execStringArgs = parseCombinedArgString(execString); + QScopedPointer<CustomExternalToolLogParser> logParser(new CustomExternalToolLogParser()); + QScopedPointer<ExternalToolRunTaskHelper> helper(new CustomExternalToolRunTaskHelper(externalProcess, logParser.data(), stateInfo)); + CHECK(listeners.size() > 0, ); + helper->addOutputListener(listeners[0]); + QStringList execStringArgs = ExternalToolSupportUtils::splitCmdLineArguments(execString); QString execStringProg = execStringArgs.takeAt(0); QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); externalProcess->setProcessEnvironment(env); taskLog.details(tr("Running external process: %1").arg(execString)); - bool startOk = WorkflowUtils::startExternalProcess(externalProcess, execStringProg, execStringArgs); if(!startOk) { stateInfo.setError(tr("Can't launch %1").arg(execString)); return; } - + listeners[0]->addNewLogMessage(execString, ExternalToolListener::PROGRAM_WITH_ARGUMENTS); while(!externalProcess->waitForFinished(1000)) { if(isCanceled()) { - externalProcess->kill(); + CmdlineTaskRunner::killProcessTree(externalProcess); } } + + QProcess::ExitStatus status = externalProcess->exitStatus(); + int exitCode = externalProcess->exitCode(); + if (status == QProcess::CrashExit && !hasError()) { + setError(tr("External process %1 exited with the following error: %2 (Code: %3)") + .arg(execString) + .arg(externalProcess->errorString()) + .arg(exitCode)); + } else if (status == QProcess::NormalExit && exitCode != EXIT_SUCCESS && !hasError()) { + setError(tr("External process %1 exited with code %2").arg(execString).arg(exitCode) ); + } else if (status == QProcess::NormalExit && exitCode == EXIT_SUCCESS && !hasError()) { + algoLog.details(tr("External process \"%1\" finished successfully").arg(execString)); + } + } QMap<QString, DataConfig> LaunchExternalToolTask::takeOutputUrls() { @@ -612,18 +749,23 @@ QMap<QString, DataConfig> LaunchExternalToolTask::takeOutputUrls() { return result; } +void LaunchExternalToolTask::addListeners(const QList<ExternalToolListener*>& listenersToAdd) { + listeners.append(listenersToAdd); +} + /************************************************************************/ /* ExternalProcessWorkerPrompter */ /************************************************************************/ QString ExternalProcessWorkerPrompter::composeRichDoc() { - ExternalProcessConfig *cfg = WorkflowEnv::getExternalCfgRegistry()->getConfigByName(target->getProto()->getId()); + ExternalProcessConfig *cfg = WorkflowEnv::getExternalCfgRegistry()->getConfigById(target->getProto()->getId()); assert(cfg); - QString doc = cfg->templateDescription; + QString doc(cfg->templateDescription); + doc.replace("\n", "<br>"); foreach(const DataConfig& dataCfg, cfg->inputs) { - QRegExp param("\\$" + dataCfg.attrName + /*"[,:;\s\.\-]"*/"\\W|$"); + QRegExp param(QString("\\$%1[^%2]|$").arg(dataCfg.attributeId).arg(WorkflowEntityValidator::ID_ACCEPTABLE_SYMBOLS_TEMPLATE)); if(doc.contains(param)) { - IntegralBusPort* input = qobject_cast<IntegralBusPort*>(target->getPort(dataCfg.attrName)); + IntegralBusPort* input = qobject_cast<IntegralBusPort*>(target->getPort(dataCfg.attributeId)); DataTypePtr dataType = WorkflowEnv::getDataTypeRegistry()->getById(dataCfg.type); if(dataCfg.type == SEQ_WITH_ANNS) { dataType = BaseTypes::DNA_SEQUENCE_TYPE(); @@ -631,12 +773,12 @@ QString ExternalProcessWorkerPrompter::composeRichDoc() { Actor* producer = input->getProducer(WorkflowUtils::getSlotDescOfDatatype(dataType).getId()); QString unsetStr = "<font color='red'>"+tr("unset")+"</font>"; QString producerName = tr("<u>%1</u>").arg(producer ? producer->getLabel() : unsetStr); - doc.replace("$" + dataCfg.attrName, producerName); + doc.replace("$" + dataCfg.attributeId, producerName); } } foreach(const DataConfig& dataCfg, cfg->outputs) { - QRegExp param("\\$" + dataCfg.attrName + /*"[,:;\s\.\-]"*/"\\W|$"); + QRegExp param(QString("\\$%1[^%2]|$").arg(dataCfg.attributeId).arg(WorkflowEntityValidator::ID_ACCEPTABLE_SYMBOLS_TEMPLATE)); if(doc.contains(param)) { IntegralBusPort* output = qobject_cast<IntegralBusPort*>(target->getPort(OUT_PORT_ID)); DataTypePtr dataType = WorkflowEnv::getDataTypeRegistry()->getById(dataCfg.type); @@ -657,15 +799,15 @@ QString ExternalProcessWorkerPrompter::composeRichDoc() { } else { destinations.resize(destinations.size() - 1); //remove last semicolon } - doc.replace("$" + dataCfg.attrName, destinations); + doc.replace("$" + dataCfg.attributeId, destinations); } } foreach(const AttributeConfig &attrCfg, cfg->attrs) { - QRegExp param("\\$" + attrCfg.attrName + /*"[,:;\s\.\-]"*/"\\W|$"); + QRegExp param(QString("\\$%1([^%2]|$)").arg(attrCfg.attributeId).arg(WorkflowEntityValidator::ID_ACCEPTABLE_SYMBOLS_TEMPLATE)); if(doc.contains(param)) { - QString prm = getRequiredParam(attrCfg.attrName); - doc.replace("$" + attrCfg.attrName, getHyperlink(attrCfg.attrName, prm)); + QString prm = getRequiredParam(attrCfg.attributeId); + doc.replace("$" + attrCfg.attributeId, getHyperlink(attrCfg.attrName, prm)); } } diff --git a/src/plugins/workflow_designer/src/library/ExternalProcessWorker.h b/src/plugins/workflow_designer/src/library/ExternalProcessWorker.h index 4fa58c81ecacf4ea6b471bf6d62174a4003c6090..93e39322bc69fda110cbf5dc07e98fede535e1af 100644 --- a/src/plugins/workflow_designer/src/library/ExternalProcessWorker.h +++ b/src/plugins/workflow_designer/src/library/ExternalProcessWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,28 +19,23 @@ * MA 02110-1301, USA. */ -#ifndef ExtrenalProcessWorker_h__ -#define ExtrenalProcessWorker_h__ - +#ifndef _U2_EXTERNAL_PROCESS_WORKER_H_ +#define _U2_EXTERNAL_PROCESS_WORKER_H_ #include <U2Core/Task.h> + #include <U2Lang/LocalDomain.h> #include <U2Lang/WorkflowUtils.h> -#include <U2Lang/ExternalToolCfg.h> #include <U2Lang/WorkflowEnv.h> namespace U2 { namespace LocalWorkflow { - class ExternalProcessWorker: public BaseWorker { Q_OBJECT public: - ExternalProcessWorker(Actor *a): BaseWorker(a, false), output(NULL) { - ExternalToolCfgRegistry * reg = WorkflowEnv::getExternalCfgRegistry(); - cfg = reg->getConfigByName(actor->getProto()->getId()); - commandLine = cfg->cmdLine; - } + ExternalProcessWorker(Actor *a); + bool isReady() const; Task* tick(); void init(); @@ -50,18 +45,31 @@ private slots: void sl_onTaskFinishied(); private: + enum InputsCheckResult { + ALL_INPUTS_FINISH, + SOME_INPUTS_FINISH, + ALL_INPUTS_HAVE_MESSAGE, + NOT_ALL_INPUTS_HAVE_MESSAGE, + INTERNAL_ERROR + }; + + void applySpecialInternalEnvvars(QString &execString, ExternalProcessConfig *cfg); void applyAttributes(QString &execString); + static bool applyParamsToExecString(QString &execString, QString parName, QString parValue); + void applyEscapedSymbols(QString &execString); QStringList applyInputMessage(QString &execString, const DataConfig &dataCfg, const QVariantMap &data, U2OpStatus &os); QString prepareOutput(QString &execString, const DataConfig &dataCfg, U2OpStatus &os); - void checkInputBusState(bool &hasMessages, bool &isEnded) const; - bool finishWorkIfInputEnded(); -private: + InputsCheckResult checkInputBusState() const; + bool finishWorkIfInputEnded(QString &error); + void finish(); + IntegralBus *output; QList<IntegralBus*> inputs; QString commandLine; ExternalProcessConfig *cfg; + QMap<QString, bool> urlsForDashboard; // url -> open by system QStringList inputUrls; }; @@ -83,18 +91,18 @@ class LaunchExternalToolTask: public Task { Q_OBJECT Q_DISABLE_COPY(LaunchExternalToolTask) public: - LaunchExternalToolTask(const QString &execString, const QMap<QString, DataConfig> &outputUrls); + LaunchExternalToolTask(const QString &execString, const QString& workingDir, const QMap<QString, DataConfig> &outputUrls); ~LaunchExternalToolTask(); void run(); QMap<QString, DataConfig> takeOutputUrls(); - + void addListeners(const QList<ExternalToolListener*>& listenersToAdd); private: QMap<QString, DataConfig> outputUrls; - QStringList parseCombinedArgString(const QString &program); - QString execString; + QString workingDir; + QList<ExternalToolListener*> listeners; }; @@ -102,4 +110,4 @@ private: } -#endif // ExtrenalProcessWorker_h__ +#endif // _U2_EXTERNAL_PROCESS_WORKER_H_ diff --git a/src/plugins/workflow_designer/src/library/ExternalProcessWorkerDialog.ui b/src/plugins/workflow_designer/src/library/ExternalProcessWorkerDialog.ui deleted file mode 100644 index b520ceb3a4c5bb02c8a5a01f833790750e418907..0000000000000000000000000000000000000000 --- a/src/plugins/workflow_designer/src/library/ExternalProcessWorkerDialog.ui +++ /dev/null @@ -1,362 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>CreateExternalProcessWorkerDialog</class> - <widget class="QWizard" name="CreateExternalProcessWorkerDialog"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>647</width> - <height>554</height> - </rect> - </property> - <property name="windowTitle"> - <string>Create Element with Command Line Tool</string> - </property> - <property name="wizardStyle"> - <enum>QWizard::ClassicStyle</enum> - </property> - <property name="options"> - <set>QWizard::HaveHelpButton|QWizard::HelpButtonOnRight</set> - </property> - <widget class="QWizardPage" name="wizardPage_2"> - <layout class="QVBoxLayout" name="verticalLayout_4"> - <property name="sizeConstraint"> - <enum>QLayout::SetMinAndMaxSize</enum> - </property> - <item> - <widget class="QTextEdit" name="descr1TextEdit"> - <property name="frameShape"> - <enum>QFrame::StyledPanel</enum> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - <property name="html"> - <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Name and description for new workflow element.</span></p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600;">Status:</span></p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600;">%1</span></p></body></html></string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_9"> - <property name="text"> - <string>Element description</string> - </property> - </widget> - </item> - <item> - <widget class="Line" name="line_5"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_5"> - <item> - <widget class="QLabel" name="label_6"> - <property name="text"> - <string>Name</string> - </property> - </widget> - </item> - <item> - <widget class="QLineEdit" name="nameLineEdit"/> - </item> - </layout> - </item> - <item> - <widget class="QLabel" name="label_7"> - <property name="text"> - <string>Description</string> - </property> - </widget> - </item> - <item> - <widget class="QTextEdit" name="descriptionTextEdit"> - <property name="html"> - <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string> - </property> - </widget> - </item> - </layout> - </widget> - <widget class="QWizardPage" name="wizardPage1"> - <layout class="QVBoxLayout" name="verticalLayout"> - <property name="sizeConstraint"> - <enum>QLayout::SetMinAndMaxSize</enum> - </property> - <item> - <widget class="QTextEdit" name="descr2TextEdit"> - <property name="readOnly"> - <bool>true</bool> - </property> - <property name="html"> - <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Input and output data for external tool. Name is a command line parameter for input/output data in external tool. Set data type and format in which external tool reads/writes input/output data. You also can set description for workflow designer. Each input data will be represented as port in workflow designer. Each output data will be represented as slot of single slot.</span></p></body></html></string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label"> - <property name="text"> - <string>Input data</string> - </property> - </widget> - </item> - <item> - <widget class="Line" name="line"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item> - <widget class="QTableView" name="inputTableView"/> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout"> - <property name="sizeConstraint"> - <enum>QLayout::SetMinAndMaxSize</enum> - </property> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>188</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QPushButton" name="addInputButton"> - <property name="text"> - <string>Add input</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="deleteInputButton"> - <property name="text"> - <string>Delete</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <widget class="QLabel" name="label_2"> - <property name="text"> - <string>Output data</string> - </property> - </widget> - </item> - <item> - <widget class="Line" name="line_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item> - <widget class="QTableView" name="outputTableView"/> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <property name="sizeConstraint"> - <enum>QLayout::SetMinAndMaxSize</enum> - </property> - <item> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>188</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QPushButton" name="addOutputButton"> - <property name="text"> - <string>Add output</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="deleteOutputButton"> - <property name="text"> - <string>Delete</string> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - <widget class="QWizardPage" name="wizardPage2"> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <property name="sizeConstraint"> - <enum>QLayout::SetMinAndMaxSize</enum> - </property> - <item> - <widget class="QTextEdit" name="descr3TextEdit"> - <property name="readOnly"> - <bool>true</bool> - </property> - <property name="html"> - <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Another parameters for external tool. You must set name for parameter and its type. You also can set description for workflow designer. Each parameter will be represented as parameter of workflow element.</span></p></body></html></string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_5"> - <property name="text"> - <string>Parameters</string> - </property> - </widget> - </item> - <item> - <widget class="Line" name="line_4"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item> - <widget class="QTableView" name="attributesTableView"/> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_4"> - <property name="sizeConstraint"> - <enum>QLayout::SetMinAndMaxSize</enum> - </property> - <item> - <spacer name="horizontalSpacer_3"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>188</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QPushButton" name="addAttributeButton"> - <property name="text"> - <string>Add attribute</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="deleteAttributeButton"> - <property name="text"> - <string>Delete</string> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - <widget class="QWizardPage" name="wizardPage"> - <layout class="QVBoxLayout" name="verticalLayout_3"> - <property name="sizeConstraint"> - <enum>QLayout::SetMinAndMaxSize</enum> - </property> - <item> - <widget class="QTextEdit" name="descr4TextEdit"> - <property name="readOnly"> - <bool>true</bool> - </property> - <property name="html"> - <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Execution string and element's description. To substitute input, output data or parameter, use it's name with prefix $ in execution string. You can set parameterized description for new element(description that appears not in property editor but on element itself). In parameterized description you also can use parameters substitution with prefix $. If file paths in the execution string contain spaces, they must be enclosed with single quotes.</span></p></body></html></string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_3"> - <property name="text"> - <string>Command line template</string> - </property> - </widget> - </item> - <item> - <widget class="Line" name="line_3"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_3"> - <property name="sizeConstraint"> - <enum>QLayout::SetMinAndMaxSize</enum> - </property> - <item> - <widget class="QLabel" name="label_4"> - <property name="text"> - <string>Execution string</string> - </property> - </widget> - </item> - <item> - <widget class="QLineEdit" name="templateLineEdit"/> - </item> - </layout> - </item> - <item> - <widget class="QLabel" name="label_8"> - <property name="text"> - <string>Parameterized description</string> - </property> - </widget> - </item> - <item> - <widget class="QTextEdit" name="prompterTextEdit"> - <property name="html"> - <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string> - </property> - </widget> - </item> - </layout> - </widget> - </widget> - <resources/> - <connections/> -</ui> diff --git a/src/plugins/workflow_designer/src/library/ExtractAssemblyCoverageWorker.cpp b/src/plugins/workflow_designer/src/library/ExtractAssemblyCoverageWorker.cpp index 8fe74cca1f8817921532e3843065808fb5190e52..69f4544df4865d8fe2c89d50feeae18eb24839f8 100644 --- a/src/plugins/workflow_designer/src/library/ExtractAssemblyCoverageWorker.cpp +++ b/src/plugins/workflow_designer/src/library/ExtractAssemblyCoverageWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/ExtractAssemblyCoverageWorker.h b/src/plugins/workflow_designer/src/library/ExtractAssemblyCoverageWorker.h index c2b436e5a15b5c7a35d73d9a2f2bcef680cf8025..40d68729d3e39b76afa2e32777048c7f604d7fd4 100644 --- a/src/plugins/workflow_designer/src/library/ExtractAssemblyCoverageWorker.h +++ b/src/plugins/workflow_designer/src/library/ExtractAssemblyCoverageWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/ExtractConsensusWorker.cpp b/src/plugins/workflow_designer/src/library/ExtractConsensusWorker.cpp index 57b60833ad4e84033f5fd3422324113ea3766adf..e27192526f8600194f250a1aaf57701923d3f4e0 100644 --- a/src/plugins/workflow_designer/src/library/ExtractConsensusWorker.cpp +++ b/src/plugins/workflow_designer/src/library/ExtractConsensusWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/ExtractConsensusWorker.h b/src/plugins/workflow_designer/src/library/ExtractConsensusWorker.h index e8e10c130ddfcc5818053d82c6e57fb3c7d8b8eb..f0707e8a62c40d2810f002eea4ffa788a6f402f3 100644 --- a/src/plugins/workflow_designer/src/library/ExtractConsensusWorker.h +++ b/src/plugins/workflow_designer/src/library/ExtractConsensusWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/ExtractMSAConsensusWorker.cpp b/src/plugins/workflow_designer/src/library/ExtractMSAConsensusWorker.cpp index e39b3c724b3778986ef89e0d83a66c22f19dc9f3..49d039a08ca96e8352f35e701d2acaa6adab9485 100644 --- a/src/plugins/workflow_designer/src/library/ExtractMSAConsensusWorker.cpp +++ b/src/plugins/workflow_designer/src/library/ExtractMSAConsensusWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/ExtractMSAConsensusWorker.h b/src/plugins/workflow_designer/src/library/ExtractMSAConsensusWorker.h index 6068bbab783ef2889b31d303f4bcd4be652f01a8..7194e588ad78004606bdeef0ca92c4377486f614 100644 --- a/src/plugins/workflow_designer/src/library/ExtractMSAConsensusWorker.h +++ b/src/plugins/workflow_designer/src/library/ExtractMSAConsensusWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/FASTQWorkersLibrary.cpp b/src/plugins/workflow_designer/src/library/FASTQWorkersLibrary.cpp index b47cb6ea69301ebad37b4a2d3429d24b77e3b7ac..afe7858a4364540ed95615a4f4df5281506e6f69 100644 --- a/src/plugins/workflow_designer/src/library/FASTQWorkersLibrary.cpp +++ b/src/plugins/workflow_designer/src/library/FASTQWorkersLibrary.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -110,7 +110,7 @@ void CASAVAFilterWorkerFactory::init() { CASAVAFilterWorker::tr("Select the custom output folder.")); Descriptor outName(BaseNGSWorker::OUT_NAME_ID, CASAVAFilterWorker::tr("Output file name"), - CASAVAFilterWorker::tr("A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extention.")); + CASAVAFilterWorker::tr("A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extension.")); a << new Attribute(outDir, BaseTypes::NUM_TYPE(), false, QVariant(FileAndDirectoryUtils::WORKFLOW_INTERNAL)); Attribute* customDirAttr = new Attribute(customDir, BaseTypes::STRING_TYPE(), false, QVariant("")); @@ -265,7 +265,7 @@ void FastqQualityTrimWorkerFactory::init() { FastqQualityTrimWorker::tr("Select the custom output folder.")); Descriptor outName(BaseNGSWorker::OUT_NAME_ID, FastqQualityTrimWorker::tr("Output file name"), - FastqQualityTrimWorker::tr("A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extention.")); + FastqQualityTrimWorker::tr("A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extension.")); Descriptor qualT(QUALITY_ID, FastqQualityTrimWorker::tr("Quality threshold"), FastqQualityTrimWorker::tr("Quality threshold for trimming.")); @@ -490,7 +490,7 @@ void MergeFastqWorkerFactory::init() { MergeFastqWorker::tr("Select the custom output folder.")); Descriptor outName(BaseNGSWorker::OUT_NAME_ID, MergeFastqWorker::tr("Output file name"), - MergeFastqWorker::tr("A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extention.")); + MergeFastqWorker::tr("A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extension.")); a << new Attribute(outDir, BaseTypes::NUM_TYPE(), false, QVariant(FileAndDirectoryUtils::WORKFLOW_INTERNAL)); diff --git a/src/plugins/workflow_designer/src/library/FASTQWorkersLibrary.h b/src/plugins/workflow_designer/src/library/FASTQWorkersLibrary.h index c26b8b64cda470666d03fec1e6e853c96262439d..2aefb009883a81d7a95ec8e1c812d61dabdbf1a1 100644 --- a/src/plugins/workflow_designer/src/library/FASTQWorkersLibrary.h +++ b/src/plugins/workflow_designer/src/library/FASTQWorkersLibrary.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/FilterAnnotationsByQualifierWorker.cpp b/src/plugins/workflow_designer/src/library/FilterAnnotationsByQualifierWorker.cpp index 5f1a450fc53a397f0530bf81eb3b2d42509f97ef..c1330a2cb3fac8f3ed64071555fbf322b46a85bc 100644 --- a/src/plugins/workflow_designer/src/library/FilterAnnotationsByQualifierWorker.cpp +++ b/src/plugins/workflow_designer/src/library/FilterAnnotationsByQualifierWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/FilterAnnotationsByQualifierWorker.h b/src/plugins/workflow_designer/src/library/FilterAnnotationsByQualifierWorker.h index 3adb2620ef6e4b2c97f8b55d2baf7e5826c43326..0a1f84dc7622b278b3877747cb5874fc8d6c290b 100644 --- a/src/plugins/workflow_designer/src/library/FilterAnnotationsByQualifierWorker.h +++ b/src/plugins/workflow_designer/src/library/FilterAnnotationsByQualifierWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/FilterAnnotationsWorker.cpp b/src/plugins/workflow_designer/src/library/FilterAnnotationsWorker.cpp index c4021f9cc5ccbf0c197df1b020bfbe4426dcbfe8..d4f0f17a2fd969c9cca3aa27292e868795646e7d 100644 --- a/src/plugins/workflow_designer/src/library/FilterAnnotationsWorker.cpp +++ b/src/plugins/workflow_designer/src/library/FilterAnnotationsWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/FilterAnnotationsWorker.h b/src/plugins/workflow_designer/src/library/FilterAnnotationsWorker.h index 9e5fa9471f07dfd1e19c2011aa0bdf033875db86..f229ad51f985b4be144047f3a818f7e7d3dc7a70 100644 --- a/src/plugins/workflow_designer/src/library/FilterAnnotationsWorker.h +++ b/src/plugins/workflow_designer/src/library/FilterAnnotationsWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/FilterBamWorker.cpp b/src/plugins/workflow_designer/src/library/FilterBamWorker.cpp index 3e55c1a4c5048f773e910f1f57d841e03c894590..364b8ebef15ade9ddd4effc64345c9027a6f3091 100644 --- a/src/plugins/workflow_designer/src/library/FilterBamWorker.cpp +++ b/src/plugins/workflow_designer/src/library/FilterBamWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -150,14 +150,14 @@ void FilterBamWorkerFactory::init() { FilterBamWorker::tr("Select the custom output folder.")); Descriptor outName(OUT_NAME_ID, FilterBamWorker::tr("Output name"), - FilterBamWorker::tr("A name of an output BAM/SAM file. If default of empty value is provided the output name is the name of the first BAM/SAM file with .filtered extention.")); + FilterBamWorker::tr("A name of an output BAM/SAM file. If default of empty value is provided the output name is the name of the first BAM/SAM file with .filtered extension.")); Descriptor outFormat(OUT_FORMAT_ID, FilterBamWorker::tr("Output format"), FilterBamWorker::tr("Format of an output assembly file.")); Descriptor regionFilter(REGION_ID, FilterBamWorker::tr("Region"), FilterBamWorker::tr("Regions to filter. For BAM output only. chr2 to output the whole chr2. chr2:1000 to output regions of chr 2 starting from 1000. " - "chr2:1000-2000 to ouput regions of chr2 between 1000 and 2000 including the end point. To input multiple regions use the space seprator (e.g. chr1 chr2 chr3:1000-2000).")); + "chr2:1000-2000 to output regions of chr2 between 1000 and 2000 including the end point. To input multiple regions use the space separator (e.g. chr1 chr2 chr3:1000-2000).")); Descriptor mapqFilter(MAPQ_ID, FilterBamWorker::tr("MAPQ threshold"), FilterBamWorker::tr("Minimum MAPQ quality score.")); @@ -197,7 +197,7 @@ void FilterBamWorkerFactory::init() { formatMap[BaseDocumentFormats::BAM] = BaseDocumentFormats::BAM; formatMap[BaseDocumentFormats::SAM] = BaseDocumentFormats::SAM; delegates[OUT_FORMAT_ID] = new ComboBoxDelegate(formatMap); - QVariantMap lenMap; lenMap["minimum"] = QVariant(0); lenMap["maximum"] = QVariant(INT_MAX); + QVariantMap lenMap; lenMap["minimum"] = QVariant(0); lenMap["maximum"] = QVariant(254); delegates[MAPQ_ID] = new SpinBoxDelegate(lenMap); QVariantMap flags; @@ -212,7 +212,8 @@ void FilterBamWorkerFactory::init() { ActorPrototype* proto = new IntegralBusActorPrototype(desc, p, a); proto->setEditor(new DelegateEditor(delegates)); proto->setPrompter(new FilterBamPrompter()); - proto->addExternalTool("SAMtools"); + //no way to include tool support files, so ids passed to functions manually + proto->addExternalTool("USUPP_SAMTOOLS");//SamToolsExtToolSupport::ET_SAMTOOLS_EXT_ID WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_NGS_BASIC(), proto); DomainFactory *localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalDomainFactory::ID); @@ -367,6 +368,8 @@ QStringList BamFilterSetting::getSamtoolsArguments() const{ //////////////////////////////////////////////////////// //SamtoolsViewFilterTask +const QString SamtoolsViewFilterTask::SAMTOOLS_ID = "USUPP_SAMTOOLS"; + SamtoolsViewFilterTask::SamtoolsViewFilterTask(const BamFilterSetting &settings) :ExternalToolSupportTask(tr("Samtool view (filter) for %1 ").arg(settings.inputUrl), TaskFlags(TaskFlag_None)),settings(settings),resultUrl(""){ @@ -392,7 +395,7 @@ void SamtoolsViewFilterTask::prepare(){ void SamtoolsViewFilterTask::run(){ CHECK_OP(stateInfo, ); - ProcessRun samtools = ExternalToolSupportUtils::prepareProcess("SAMtools", settings.getSamtoolsArguments(), "", QStringList(), stateInfo, getListener(0)); + ProcessRun samtools = ExternalToolSupportUtils::prepareProcess(SAMTOOLS_ID, settings.getSamtoolsArguments(), "", QStringList(), stateInfo, getListener(0)); CHECK_OP(stateInfo, ); QScopedPointer<QProcess> sp(samtools.process); QScopedPointer<ExternalToolRunTaskHelper> sh(new ExternalToolRunTaskHelper(samtools.process, new ExternalToolLogParser(), stateInfo)); @@ -403,7 +406,7 @@ void SamtoolsViewFilterTask::run(){ while(!samtools.process->waitForFinished(1000)){ if (isCanceled()) { - samtools.process->kill(); + CmdlineTaskRunner::killProcessTree(samtools.process); return; } } diff --git a/src/plugins/workflow_designer/src/library/FilterBamWorker.h b/src/plugins/workflow_designer/src/library/FilterBamWorker.h index 5d53b5e75e2733f49f06bcbdd8580ef77a83a11a..ac121e35c0bdc259a48de47b119984822753d323 100644 --- a/src/plugins/workflow_designer/src/library/FilterBamWorker.h +++ b/src/plugins/workflow_designer/src/library/FilterBamWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -105,6 +105,8 @@ private: private: BamFilterSetting settings; QString resultUrl; + + static const QString SAMTOOLS_ID; }; } //LocalWorkflow diff --git a/src/plugins/workflow_designer/src/library/FindWorker.cpp b/src/plugins/workflow_designer/src/library/FindWorker.cpp index 64a945205cd22151e62da20bafd2470c7e4e358d..b2f511dad006b6b3b6e5c845e8a9ab7e7b9ae216 100644 --- a/src/plugins/workflow_designer/src/library/FindWorker.cpp +++ b/src/plugins/workflow_designer/src/library/FindWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -71,10 +71,6 @@ const QString FindWorkerFactory::ACTOR_ID("search"); const QString PATTERN_DELIMITER(";"); -static const Descriptor pd(PATTERN_ATTR, QObject::tr("Pattern(s)"), QObject::tr("Semicolon-separated list of patterns to search for.")); - -static const Descriptor pf(PATTERN_FILE_ATTR, QObject::tr("Pattern file"), QObject::tr("Load pattern from file in any sequence format or in newline-delimited format.")); - /************************************************************************/ /* FindPatternsValidator */ /************************************************************************/ @@ -84,7 +80,7 @@ public: bool hasPattern = isPatternSet(cfg) || isPatternFileSet(cfg) || isPatternSlotBinded(cfg); if (!hasPattern) { notificationList << WorkflowNotification(QObject::tr("Patterns are not set. Set the '%1' or '%2' parameter or bind the input text slot") - .arg(pd.getDisplayName()).arg(pf.getDisplayName())); + .arg(FindWorker::tr("Pattern(s)")).arg(FindWorker::tr("Pattern file"))); } return hasPattern; } @@ -174,6 +170,14 @@ void FindWorkerFactory::init() { FindWorker::tr("Name of qualifier in result annotations which is containing " "a pattern name.")); + Descriptor pd(PATTERN_ATTR, + FindWorker::tr("Pattern(s)"), + FindWorker::tr("Semicolon-separated list of patterns to search for.")); + + Descriptor pf(PATTERN_FILE_ATTR, + FindWorker::tr("Pattern file"), + FindWorker::tr("Load pattern from file in any sequence format or in newline-delimited format.")); + a << new Attribute(nd, BaseTypes::STRING_TYPE(), true, "misc_feature"); a << new Attribute(pd, BaseTypes::STRING_TYPE(), false); a << new Attribute(pf, BaseTypes::STRING_TYPE(), false); @@ -547,8 +551,8 @@ void FindAllRegionsTask::prepare() { QList<FindAlgorithmResult> FindAllRegionsTask::getResult() { QList<FindAlgorithmResult> lst; - foreach(Task* t, getSubtasks()) { - FindAlgorithmTask* ft = qobject_cast<FindAlgorithmTask*>(t); + foreach(const QPointer<Task> &t, getSubtasks()) { + FindAlgorithmTask* ft = qobject_cast<FindAlgorithmTask*>(t.data()); lst += ft->popResults(); } return lst; diff --git a/src/plugins/workflow_designer/src/library/FindWorker.h b/src/plugins/workflow_designer/src/library/FindWorker.h index 974aa4f2fb0620c66dbfd9c35f02753b9046463a..6605a1c5716b7cfa9ce61e9958963ecf9d532c9d 100644 --- a/src/plugins/workflow_designer/src/library/FindWorker.h +++ b/src/plugins/workflow_designer/src/library/FindWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/GenericReadActor.cpp b/src/plugins/workflow_designer/src/library/GenericReadActor.cpp index a2ee8350c002fef12cbde2573e1cf4abf620931f..82500dd04b263e178c20a312f8aa97406806fbf0 100644 --- a/src/plugins/workflow_designer/src/library/GenericReadActor.cpp +++ b/src/plugins/workflow_designer/src/library/GenericReadActor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/GenericReadActor.h b/src/plugins/workflow_designer/src/library/GenericReadActor.h index 7eabb841320098daf4cb7302968ba4c6b4a6aa7a..81ca71249c6da13531f3e8567677e6f7b69c37a3 100644 --- a/src/plugins/workflow_designer/src/library/GenericReadActor.h +++ b/src/plugins/workflow_designer/src/library/GenericReadActor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/GenericReadWorker.cpp b/src/plugins/workflow_designer/src/library/GenericReadWorker.cpp index 97cfc034f63b7e13bea3c37b4c7d453d065407ac..0d8ae509c87a0e8ac53661d7a40eb9b62064f3f8 100644 --- a/src/plugins/workflow_designer/src/library/GenericReadWorker.cpp +++ b/src/plugins/workflow_designer/src/library/GenericReadWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/GenericReadWorker.h b/src/plugins/workflow_designer/src/library/GenericReadWorker.h index dfdb029ed6485f91441d8123451c6f2fbe646453..a9ba818109b2fc0fc5f011a1afcb15bf08425f71 100644 --- a/src/plugins/workflow_designer/src/library/GenericReadWorker.h +++ b/src/plugins/workflow_designer/src/library/GenericReadWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/GetFileListWorker.cpp b/src/plugins/workflow_designer/src/library/GetFileListWorker.cpp index 215dfa189fd42fe8e3788bc077bf6cd57a4832fb..5c95722390bd41f5b7336395ea20d65796a7b845 100644 --- a/src/plugins/workflow_designer/src/library/GetFileListWorker.cpp +++ b/src/plugins/workflow_designer/src/library/GetFileListWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/GetFileListWorker.h b/src/plugins/workflow_designer/src/library/GetFileListWorker.h index 2ec4d2dbfcfe0b12cbd8bf20245fe5fb89d1ff75..d5e6b73167fe9971871f7aefaa78b75c02d0b413 100644 --- a/src/plugins/workflow_designer/src/library/GetFileListWorker.h +++ b/src/plugins/workflow_designer/src/library/GetFileListWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/GetReadListWorker.cpp b/src/plugins/workflow_designer/src/library/GetReadListWorker.cpp index 0d2cf4ffbc099358837108d9c10a0735e664f338..a47de1180b0eae2a4f8e391e29fb2d13ace957f0 100644 --- a/src/plugins/workflow_designer/src/library/GetReadListWorker.cpp +++ b/src/plugins/workflow_designer/src/library/GetReadListWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/GetReadListWorker.h b/src/plugins/workflow_designer/src/library/GetReadListWorker.h index 2dfbd468f550b98fe350fecf7369ede252029f25..2c2e0c1a953b85465d8b5fc58555b4094c3f2ba5 100644 --- a/src/plugins/workflow_designer/src/library/GetReadListWorker.h +++ b/src/plugins/workflow_designer/src/library/GetReadListWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/GroupWorker.cpp b/src/plugins/workflow_designer/src/library/GroupWorker.cpp index 56adf065f8630802c90622aa96a557d93573720e..169f8189343356e9e21ef069966382b0c1d843fb 100644 --- a/src/plugins/workflow_designer/src/library/GroupWorker.cpp +++ b/src/plugins/workflow_designer/src/library/GroupWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/GroupWorker.h b/src/plugins/workflow_designer/src/library/GroupWorker.h index 4a0d96cee58275b34d711979826243252aad010c..412b117b0541051694b02feeda01bb8064247d41 100644 --- a/src/plugins/workflow_designer/src/library/GroupWorker.h +++ b/src/plugins/workflow_designer/src/library/GroupWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/ImportAnnotationsWorker.cpp b/src/plugins/workflow_designer/src/library/ImportAnnotationsWorker.cpp index 2b18029b565bef4bad0bb1931d3810cd56f30ab1..b4f00a744f23d688ea2951a8d88510fec1af1515 100644 --- a/src/plugins/workflow_designer/src/library/ImportAnnotationsWorker.cpp +++ b/src/plugins/workflow_designer/src/library/ImportAnnotationsWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/ImportAnnotationsWorker.h b/src/plugins/workflow_designer/src/library/ImportAnnotationsWorker.h index 74691afffb0689fd3b06d16ac1e922e306b1b9e5..3f414066b3ef8310c035c54d9e4aa12839204f23 100644 --- a/src/plugins/workflow_designer/src/library/ImportAnnotationsWorker.h +++ b/src/plugins/workflow_designer/src/library/ImportAnnotationsWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/IncludedProtoFactoryImpl.cpp b/src/plugins/workflow_designer/src/library/IncludedProtoFactoryImpl.cpp index 68881270fd78ad80c05f39084fa837cbfe35f2f5..2855da971e12a0e3346d9d28be962ee775d24ea7 100644 --- a/src/plugins/workflow_designer/src/library/IncludedProtoFactoryImpl.cpp +++ b/src/plugins/workflow_designer/src/library/IncludedProtoFactoryImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,8 +22,10 @@ #include <U2Designer/DelegateEditors.h> #include <U2Lang/Aliasing.h> +#include <U2Core/AppContext.h> #include <U2Lang/BaseSlots.h> #include <U2Lang/BaseTypes.h> +#include <U2Core/ExternalToolRegistry.h> #include <U2Lang/HRSchemaSerializer.h> #include <U2Lang/LocalDomain.h> #include <U2Lang/WorkflowEnv.h> @@ -32,6 +34,9 @@ #include "library/SchemaWorker.h" #include "library/ScriptWorker.h" +#include "util/CustomWorkerUtils.h" + +#include "CmdlineBasedWorkerValidator.h" #include "IncludedProtoFactoryImpl.h" @@ -115,11 +120,11 @@ ActorPrototype *IncludedProtoFactoryImpl::_getExternalToolProto(ExternalProcessC map[WorkflowUtils::getSlotDescOfDatatype(dtr->getById(dcfg.type))] = dtr->getById(dcfg.type); } - DataTypePtr input( new MapDataType(Descriptor(INPUT_PORT_TYPE + dcfg.attrName), map) ); + DataTypePtr input( new MapDataType(Descriptor(INPUT_PORT_TYPE + dcfg.attributeId), map) ); DataTypeRegistry * dr = WorkflowEnv::getDataTypeRegistry(); assert(dr); dr->registerEntry( input ); - portDescs << new PortDescriptor(Descriptor(dcfg.attrName, dcfg.attrName, dcfg.description), input, true); + portDescs << new PortDescriptor(Descriptor(dcfg.attributeId, dcfg.attrName, dcfg.description), input, true); } QMap<Descriptor, DataTypePtr> map; @@ -133,41 +138,61 @@ ActorPrototype *IncludedProtoFactoryImpl::_getExternalToolProto(ExternalProcessC } } if(!map.isEmpty()) { - DataTypePtr outSet( new MapDataType(Descriptor(OUTPUT_PORT_TYPE + cfg->name), map) ); + DataTypePtr outSet( new MapDataType(Descriptor(OUTPUT_PORT_TYPE + cfg->id), map) ); DataTypeRegistry * dr = WorkflowEnv::getDataTypeRegistry(); assert(dr); dr->registerEntry( outSet ); - Descriptor outDesc( OUT_PORT_ID, LocalWorkflow::ExternalProcessWorker::tr("output data"), LocalWorkflow::ExternalProcessWorker::tr("output data") ); + Descriptor outDesc( OUT_PORT_ID, LocalWorkflow::ExternalProcessWorker::tr("Output data"), LocalWorkflow::ExternalProcessWorker::tr("Output data") ); portDescs << new PortDescriptor( outDesc, outSet, false, true ); } - Descriptor desc( cfg->name, cfg->name, cfg->description.isEmpty() ? cfg->name : cfg->description ); + Descriptor desc( cfg->id, cfg->name, cfg->description.isEmpty() ? cfg->name : cfg->description ); QList<Attribute*> attribs; QMap<QString, PropertyDelegate*> delegates; foreach(const AttributeConfig& acfg, cfg->attrs) { - //PropertyDelegate *delegate = NULL; DataTypePtr type; QString descr = acfg.description.isEmpty() ? acfg.type : acfg.description; - if(acfg.type == "URL") { + if (acfg.type == AttributeConfig::INPUT_FILE_URL_TYPE) { type = BaseTypes::STRING_TYPE(); - delegates[acfg.attrName] = new URLDelegate("All Files(*.*)",""); - attribs << new Attribute(Descriptor(acfg.attrName, acfg.attrName, descr), type); - } else if(acfg.type == "String") { + delegates[acfg.attributeId] = new URLDelegate("", "", false, false, false, nullptr, "", false, true); + attribs << new Attribute(Descriptor(acfg.attributeId, acfg.attrName, descr), type, Attribute::None, acfg.defaultValue); + } else if (acfg.type == AttributeConfig::OUTPUT_FILE_URL_TYPE) { type = BaseTypes::STRING_TYPE(); - attribs << new Attribute(Descriptor(acfg.attrName, acfg.attrName, descr), type); - } else if(acfg.type == "Number") { - type = BaseTypes::NUM_TYPE(); - attribs << new Attribute(Descriptor(acfg.attrName, acfg.attrName, descr), type); - } else if(acfg.type == "Boolean") { + delegates[acfg.attributeId] = new URLDelegate("", "", false, false, true, nullptr, "", false, false); + attribs << new Attribute(Descriptor(acfg.attributeId, acfg.attrName, descr), type, Attribute::None, acfg.defaultValue); + } else if (acfg.type == AttributeConfig::INPUT_FOLDER_URL_TYPE) { + type = BaseTypes::STRING_TYPE(); + delegates[acfg.attributeId] = new URLDelegate("", "", false, true, false, nullptr, "", false, true); + attribs << new Attribute(Descriptor(acfg.attributeId, acfg.attrName, descr), type, Attribute::None, acfg.defaultValue); + } else if (acfg.type == AttributeConfig::OUTPUT_FOLDER_URL_TYPE) { + type = BaseTypes::STRING_TYPE(); + delegates[acfg.attributeId] = new URLDelegate("", "", false, true, true, nullptr, "", false, false); + attribs << new Attribute(Descriptor(acfg.attributeId, acfg.attrName, descr), type, Attribute::None, acfg.defaultValue); + } else if (acfg.type == AttributeConfig::STRING_TYPE) { + type = BaseTypes::STRING_TYPE(); + attribs << new Attribute(Descriptor(acfg.attributeId, acfg.attrName, descr), type, Attribute::None, acfg.defaultValue); + } else if (acfg.type == AttributeConfig::BOOLEAN_TYPE) { type = BaseTypes::BOOL_TYPE(); - attribs << new Attribute(Descriptor(acfg.attrName, acfg.attrName, descr), type, false, QVariant(false)); + delegates[acfg.attributeId] = new ComboBoxWithBoolsDelegate(); + attribs << new Attribute(Descriptor(acfg.attributeId, acfg.attrName, descr), type, Attribute::None, (acfg.defaultValue == "true" ? QVariant(true) : QVariant(false))); + } else if (acfg.type == AttributeConfig::INTEGER_TYPE) { + type = BaseTypes::NUM_TYPE(); + QVariantMap integerValues; + integerValues["minimum"] = QVariant(std::numeric_limits<int>::min()); + integerValues["maximum"] = QVariant(std::numeric_limits<int>::max()); + delegates[acfg.attributeId] = new SpinBoxDelegate(integerValues); + attribs << new Attribute(Descriptor(acfg.attributeId, acfg.attrName, descr), type, Attribute::None, acfg.defaultValue); + } else if (acfg.type == AttributeConfig::DOUBLE_TYPE) { + type = BaseTypes::NUM_TYPE(); + QVariantMap doubleValues; + doubleValues["singleStep"] = 0.1; + doubleValues["minimum"] = QVariant(std::numeric_limits<double>::lowest()); + doubleValues["maximum"] = QVariant(std::numeric_limits<double>::max()); + doubleValues["decimals"] = 6; + delegates[acfg.attributeId] = new DoubleSpinBoxDelegate(doubleValues); + attribs << new Attribute(Descriptor(acfg.attributeId, acfg.attrName, descr), type, Attribute::None, acfg.defaultValue); } - - //attribs << new Attribute(Descriptor(acfg.attrName, acfg.attrName, acfg.type), type); - /*if(delegate) { - delegates[acfg.attrName] = acfg.delegate; - }*/ } ActorPrototype * proto = new IntegralBusActorPrototype( desc, portDescs, attribs ); @@ -177,6 +202,12 @@ ActorPrototype *IncludedProtoFactoryImpl::_getExternalToolProto(ExternalProcessC proto->setPrompter( new LocalWorkflow::ExternalProcessWorkerPrompter() ); proto->setNonStandard(cfg->filePath); + proto->setValidator(new CmdlineBasedWorkerValidator()); + + QStringList commandIdList = CustomWorkerUtils::getToolIdsFromCommand(cfg->cmdLine); + foreach(const QString& id, commandIdList) { + proto->addExternalTool(id); + } return proto; } @@ -231,10 +262,17 @@ ActorPrototype *IncludedProtoFactoryImpl::_getSchemaActorProto(Schema *schema, c return proto; } -void IncludedProtoFactoryImpl::_registerExternalToolWorker(ExternalProcessConfig *cfg) { +bool IncludedProtoFactoryImpl::_registerExternalToolWorker(ExternalProcessConfig *cfg) { + const bool configRegistered = WorkflowEnv::getExternalCfgRegistry()->registerExternalTool(cfg); + CHECK(configRegistered, false); + DomainFactory* localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalWorkflow::LocalDomainFactory::ID); - WorkflowEnv::getExternalCfgRegistry()->registerExternalTool(cfg); - localDomain->registerEntry( new LocalWorkflow::ExternalProcessWorkerFactory(cfg->name) ); + QScopedPointer<LocalWorkflow::ExternalProcessWorkerFactory> factory(new LocalWorkflow::ExternalProcessWorkerFactory(cfg->id)); + const bool factoryRegistered = localDomain->registerEntry(factory.data()); + CHECK_EXT(factoryRegistered, WorkflowEnv::getExternalCfgRegistry()->unregisterConfig(cfg->id), false); + factory.take(); + + return true; } void IncludedProtoFactoryImpl::_registerScriptWorker(const QString &actorName) { @@ -242,6 +280,19 @@ void IncludedProtoFactoryImpl::_registerScriptWorker(const QString &actorName) { localDomain->registerEntry(new LocalWorkflow::ScriptWorkerFactory(actorName)); } +ExternalProcessConfig* IncludedProtoFactoryImpl::_getExternalToolWorker(const QString& id) { + return WorkflowEnv::getExternalCfgRegistry()->getConfigById(id); +} + +ExternalProcessConfig *IncludedProtoFactoryImpl::_unregisterExternalToolWorker(const QString &id) { + DomainFactory *localDomain = WorkflowEnv::getDomainRegistry()->getById(LocalWorkflow::LocalDomainFactory::ID); + delete localDomain->unregisterEntry(id); + + ExternalProcessConfig *config = WorkflowEnv::getExternalCfgRegistry()->getConfigById(id); + WorkflowEnv::getExternalCfgRegistry()->unregisterConfig(id); + return config; +} + Descriptor IncludedProtoFactoryImpl::generateUniqueSlotDescriptor( const QList<Descriptor> &existingSlots, const DataConfig &dcfg ) { diff --git a/src/plugins/workflow_designer/src/library/IncludedProtoFactoryImpl.h b/src/plugins/workflow_designer/src/library/IncludedProtoFactoryImpl.h index ffefaa7d86a7528f1f1dff153e8afe48caf7de10..c99e81e876d3bafab6c164a5a189986272c8aff2 100644 --- a/src/plugins/workflow_designer/src/library/IncludedProtoFactoryImpl.h +++ b/src/plugins/workflow_designer/src/library/IncludedProtoFactoryImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,9 +34,12 @@ public: virtual ActorPrototype *_getExternalToolProto(ExternalProcessConfig *cfg); virtual ActorPrototype *_getSchemaActorProto(Schema *schema, const QString &name, const QString &actorFilePath); - virtual void _registerExternalToolWorker(ExternalProcessConfig *cfg); + virtual bool _registerExternalToolWorker(ExternalProcessConfig *cfg); virtual void _registerScriptWorker(const QString &actorName); + virtual ExternalProcessConfig* _getExternalToolWorker(const QString& id) override; + virtual ExternalProcessConfig *_unregisterExternalToolWorker(const QString &id); + private: static Descriptor generateUniqueSlotDescriptor( const QList<Descriptor> &existingSlots, const DataConfig &dcfg ); diff --git a/src/plugins/workflow_designer/src/library/MSA2SequenceWorker.cpp b/src/plugins/workflow_designer/src/library/MSA2SequenceWorker.cpp index 6660eab4b535fa307cf118a959360da5c4299737..522da2dd38a780210de3c31e47e07cfa366bc09b 100644 --- a/src/plugins/workflow_designer/src/library/MSA2SequenceWorker.cpp +++ b/src/plugins/workflow_designer/src/library/MSA2SequenceWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/MSA2SequenceWorker.h b/src/plugins/workflow_designer/src/library/MSA2SequenceWorker.h index 135b313210eb327ba45aebb6435980bfa7d06e3f..c694b042469fb722b0aa23e7b16a92df5f478932 100644 --- a/src/plugins/workflow_designer/src/library/MSA2SequenceWorker.h +++ b/src/plugins/workflow_designer/src/library/MSA2SequenceWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/MarkSequenceWorker.cpp b/src/plugins/workflow_designer/src/library/MarkSequenceWorker.cpp index 77c3f83893b621f4832e85ed8025da7041aea209..276ef13b6633cac3f610e470b64cf59d1743fced 100644 --- a/src/plugins/workflow_designer/src/library/MarkSequenceWorker.cpp +++ b/src/plugins/workflow_designer/src/library/MarkSequenceWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/MarkSequenceWorker.h b/src/plugins/workflow_designer/src/library/MarkSequenceWorker.h index 9b8194019efab9aef88225faea5f07a4b04a31d3..93422b0600a5f064f2782c509935566184b09b28 100644 --- a/src/plugins/workflow_designer/src/library/MarkSequenceWorker.h +++ b/src/plugins/workflow_designer/src/library/MarkSequenceWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/MergeBamWorker.cpp b/src/plugins/workflow_designer/src/library/MergeBamWorker.cpp index e1988de5ae1ff5a07285bb1395ffe82d434d617a..c220226ec81fad61c0371eceff34189e27440093 100644 --- a/src/plugins/workflow_designer/src/library/MergeBamWorker.cpp +++ b/src/plugins/workflow_designer/src/library/MergeBamWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -112,7 +112,7 @@ void MergeBamWorkerFactory::init() { MergeBamWorker::tr("Select the custom output folder.")); Descriptor outName(OUT_NAME_ID, MergeBamWorker::tr("Output BAM name"), - MergeBamWorker::tr("A name of an output BAM file. If default of empty value is provided the output name is the name of the first BAM file with .merged.bam extention.")); + MergeBamWorker::tr("A name of an output BAM file. If default of empty value is provided the output name is the name of the first BAM file with .merged.bam extension.")); a << new Attribute(outDir, BaseTypes::NUM_TYPE(), false, QVariant(FileAndDirectoryUtils::WORKFLOW_INTERNAL)); diff --git a/src/plugins/workflow_designer/src/library/MergeBamWorker.h b/src/plugins/workflow_designer/src/library/MergeBamWorker.h index 1524a9b9f4dca9630fa9c95dadf7069e02902137..bf95d5ee3e9a616f9c91e8cdbaa7e01721a0b0f8 100644 --- a/src/plugins/workflow_designer/src/library/MergeBamWorker.h +++ b/src/plugins/workflow_designer/src/library/MergeBamWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/MultiplexerWorker.cpp b/src/plugins/workflow_designer/src/library/MultiplexerWorker.cpp index 01adfc06e32a96d9179f45dbcaa8182a73a16a4e..ad8facb6f9dffc0d88d05de301a0ac0e59ffc813 100644 --- a/src/plugins/workflow_designer/src/library/MultiplexerWorker.cpp +++ b/src/plugins/workflow_designer/src/library/MultiplexerWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/MultiplexerWorker.h b/src/plugins/workflow_designer/src/library/MultiplexerWorker.h index 2b8fdbd69f318aa8517203d5d10e63baecfeb508..e2212caddb691fdbe5a1172fe5264c3c7d5d3db8 100644 --- a/src/plugins/workflow_designer/src/library/MultiplexerWorker.h +++ b/src/plugins/workflow_designer/src/library/MultiplexerWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/PassFilterWorker.cpp b/src/plugins/workflow_designer/src/library/PassFilterWorker.cpp index e469aa5dd5023078f0e1d516ce9b89aad9a1ea6b..5b3611e78ef4f7186e004d73881673adeeb2c7fc 100644 --- a/src/plugins/workflow_designer/src/library/PassFilterWorker.cpp +++ b/src/plugins/workflow_designer/src/library/PassFilterWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/PassFilterWorker.h b/src/plugins/workflow_designer/src/library/PassFilterWorker.h index 334b3e8d6eaf239239ab787aeb9419b33a093813..f4932c8f03c1178edf1fda3208a9685f0e01937f 100644 --- a/src/plugins/workflow_designer/src/library/PassFilterWorker.h +++ b/src/plugins/workflow_designer/src/library/PassFilterWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/ReadAnnotationsWorker.cpp b/src/plugins/workflow_designer/src/library/ReadAnnotationsWorker.cpp index cb40c8e5a74b7bdad843c3d90c9472e38871ee2f..a7a1e1fc664c62350d31a8d9d2a5af693aaaefea 100644 --- a/src/plugins/workflow_designer/src/library/ReadAnnotationsWorker.cpp +++ b/src/plugins/workflow_designer/src/library/ReadAnnotationsWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/ReadAnnotationsWorker.h b/src/plugins/workflow_designer/src/library/ReadAnnotationsWorker.h index a7bc564d393f378aabbefe221dd90dc782ed6824..c04eb63dc7bdd5b7549aebd36c96c2797a63b337 100644 --- a/src/plugins/workflow_designer/src/library/ReadAnnotationsWorker.h +++ b/src/plugins/workflow_designer/src/library/ReadAnnotationsWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/ReadAssemblyWorker.cpp b/src/plugins/workflow_designer/src/library/ReadAssemblyWorker.cpp index b850da16bd0ef0f638ae70987933f265fbe6eed6..1d48576baf1f0f81e426a69898747bd9dbf9e000 100644 --- a/src/plugins/workflow_designer/src/library/ReadAssemblyWorker.cpp +++ b/src/plugins/workflow_designer/src/library/ReadAssemblyWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/ReadAssemblyWorker.h b/src/plugins/workflow_designer/src/library/ReadAssemblyWorker.h index 66228f757f19c549afdaba3fe86f193f4795143d..084b6594988bb98afa7f47894f03e746b958932a 100644 --- a/src/plugins/workflow_designer/src/library/ReadAssemblyWorker.h +++ b/src/plugins/workflow_designer/src/library/ReadAssemblyWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/ReadVariationWorker.cpp b/src/plugins/workflow_designer/src/library/ReadVariationWorker.cpp index 11ef7d345834e5b5b34a5d41d09762862102c23e..a5410bd80e491c7fb57cb91534120068165cd094 100644 --- a/src/plugins/workflow_designer/src/library/ReadVariationWorker.cpp +++ b/src/plugins/workflow_designer/src/library/ReadVariationWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/ReadVariationWorker.h b/src/plugins/workflow_designer/src/library/ReadVariationWorker.h index dd84ad947f8f1406a07542b85e82e0132dc7824b..e08f2d2333d9529fad434a046f8b11b5d88076b4 100644 --- a/src/plugins/workflow_designer/src/library/ReadVariationWorker.h +++ b/src/plugins/workflow_designer/src/library/ReadVariationWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/RemoteDBFetcherWorker.cpp b/src/plugins/workflow_designer/src/library/RemoteDBFetcherWorker.cpp index 036f24a59abda5677baa7fe1c54ff2b217009e1c..900632728caa38f1ea8aefbb9e43661c023199a4 100644 --- a/src/plugins/workflow_designer/src/library/RemoteDBFetcherWorker.cpp +++ b/src/plugins/workflow_designer/src/library/RemoteDBFetcherWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/RemoteDBFetcherWorker.h b/src/plugins/workflow_designer/src/library/RemoteDBFetcherWorker.h index 54dc2dd23155bd06b47875e6b98426dfbb2747f1..a63d84be7dd50d3be4495ad4d84edc2b48a2cd90 100644 --- a/src/plugins/workflow_designer/src/library/RemoteDBFetcherWorker.h +++ b/src/plugins/workflow_designer/src/library/RemoteDBFetcherWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/RenameChromosomeInVariationWorker.cpp b/src/plugins/workflow_designer/src/library/RenameChromosomeInVariationWorker.cpp index e4b8ca181cc1bebb8deb41bb780eb3329cf1a0fd..253d197fb64f4eb952835bd978989cab8f07f5c7 100644 --- a/src/plugins/workflow_designer/src/library/RenameChromosomeInVariationWorker.cpp +++ b/src/plugins/workflow_designer/src/library/RenameChromosomeInVariationWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -138,7 +138,7 @@ void RenameChomosomeInVariationWorkerFactory::init() { p << new PortDescriptor(inD, DataTypePtr(new MapDataType("renameChr.input-url", inM)), true); QMap<Descriptor, DataTypePtr> outM; - const Descriptor outSlotDescriptor("url", RenameChomosomeInVariationWorker::tr("Produced URL"), RenameChomosomeInVariationWorker::tr("Location of a corresponding produced file.")); + Descriptor outSlotDescriptor("url", RenameChomosomeInVariationWorker::tr("Produced URL"), RenameChomosomeInVariationWorker::tr("Location of a corresponding produced file.")); outM[outSlotDescriptor] = BaseTypes::STRING_TYPE(); p << new PortDescriptor(outD, DataTypePtr(new MapDataType("renameChr.output-url", outM)), false, true); } diff --git a/src/plugins/workflow_designer/src/library/RenameChromosomeInVariationWorker.h b/src/plugins/workflow_designer/src/library/RenameChromosomeInVariationWorker.h index ad060ceba5b44b8a63b78883aaf9d0a4c3cb04ea..2fb5424f2cfc29ee7175cf2f51e7393368d09114 100644 --- a/src/plugins/workflow_designer/src/library/RenameChromosomeInVariationWorker.h +++ b/src/plugins/workflow_designer/src/library/RenameChromosomeInVariationWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/ReverseComplementWorker.cpp b/src/plugins/workflow_designer/src/library/ReverseComplementWorker.cpp index e80dfc700f42b1b5dd6083bf8dc8a00601d1712a..cec8bb67547ee4646ec41bd029f4ec79ab7c45e8 100644 --- a/src/plugins/workflow_designer/src/library/ReverseComplementWorker.cpp +++ b/src/plugins/workflow_designer/src/library/ReverseComplementWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/ReverseComplementWorker.h b/src/plugins/workflow_designer/src/library/ReverseComplementWorker.h index 456fb5a5161bf436b05066de99894a62ba5afa00..4cb7445db3f4294b974bef1e55ea95962d9448af 100644 --- a/src/plugins/workflow_designer/src/library/ReverseComplementWorker.h +++ b/src/plugins/workflow_designer/src/library/ReverseComplementWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/RmdupBamWorker.cpp b/src/plugins/workflow_designer/src/library/RmdupBamWorker.cpp index b7981ec9ddbecde9d7c66f02ddbcb3458784280a..1855a3c5785c53f090d45086253e17061ff21f41 100644 --- a/src/plugins/workflow_designer/src/library/RmdupBamWorker.cpp +++ b/src/plugins/workflow_designer/src/library/RmdupBamWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -114,7 +114,7 @@ void RmdupBamWorkerFactory::init() { RmdupBamWorker::tr("Select the custom output folder.")); Descriptor outName(OUT_NAME_ID, RmdupBamWorker::tr("Output BAM name"), - RmdupBamWorker::tr("A name of an output BAM file. If default of empty value is provided the output name is the name of the first BAM file with .nodup.bam extention.")); + RmdupBamWorker::tr("A name of an output BAM file. If default of empty value is provided the output name is the name of the first BAM file with .nodup.bam extension.")); Descriptor removeSE(REMOVE_SINGLE_END_ID, RmdupBamWorker::tr("Remove for single-end reads"), RmdupBamWorker::tr("Remove duplicate for single-end reads. By default, the command works for paired-end reads only (-s).")); @@ -192,7 +192,8 @@ Task * RmdupBamWorker::tick() { setting.removeSingleEnd = getValue<bool>(REMOVE_SINGLE_END_ID); setting.treatReads = getValue<bool>(TREAT_READS_ID); - Task *t = new SamtoolsRmdupTask(setting); + SamtoolsRmdupTask *t = new SamtoolsRmdupTask(setting); + t->addListeners(createLogListeners()); connect(new TaskSignalMapper(t), SIGNAL(si_taskFinished(Task*)), SLOT(sl_taskFinished(Task*))); return t; } @@ -289,6 +290,9 @@ QStringList BamRmdupSetting::getSamtoolsArguments() const{ //////////////////////////////////////////////////////// //SamtoolsRmdupTask + +const QString SamtoolsRmdupTask::SAMTOOLS_ID = "USUPP_SAMTOOLS"; + SamtoolsRmdupTask::SamtoolsRmdupTask(const BamRmdupSetting &settings) :ExternalToolSupportTask(tr("Samtool rmdup for %1 ").arg(settings.inputUrl), TaskFlags(TaskFlag_None)),settings(settings),resultUrl(""){ @@ -311,7 +315,7 @@ void SamtoolsRmdupTask::prepare(){ void SamtoolsRmdupTask::run(){ CHECK_OP(stateInfo, ); - ProcessRun samtools = ExternalToolSupportUtils::prepareProcess("SAMtools", settings.getSamtoolsArguments(), "", QStringList(), stateInfo, getListener(0)); + ProcessRun samtools = ExternalToolSupportUtils::prepareProcess(SAMTOOLS_ID, settings.getSamtoolsArguments(), "", QStringList(), stateInfo, getListener(0)); CHECK_OP(stateInfo, ); QScopedPointer<QProcess> sp(samtools.process); QScopedPointer<ExternalToolRunTaskHelper> sh(new ExternalToolRunTaskHelper(samtools.process, new ExternalToolLogParser(), stateInfo)); @@ -322,7 +326,7 @@ void SamtoolsRmdupTask::run(){ while(!samtools.process->waitForFinished(1000)){ if (isCanceled()) { - samtools.process->kill(); + CmdlineTaskRunner::killProcessTree(samtools.process); return; } } diff --git a/src/plugins/workflow_designer/src/library/RmdupBamWorker.h b/src/plugins/workflow_designer/src/library/RmdupBamWorker.h index f1d0d0afe4cb276b8032ac431c21ff44fa55c292..3d4c917c796b86341780d541f7acf939dbf5dd43 100644 --- a/src/plugins/workflow_designer/src/library/RmdupBamWorker.h +++ b/src/plugins/workflow_designer/src/library/RmdupBamWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -99,6 +99,8 @@ private: private: BamRmdupSetting settings; QString resultUrl; + + static const QString SAMTOOLS_ID; // this constant is taken from the appropriate file in external_tool_support plugin }; diff --git a/src/plugins/workflow_designer/src/library/SchemaWorker.cpp b/src/plugins/workflow_designer/src/library/SchemaWorker.cpp index dd91c84a066b17a8321b48d77cec6c6c182f92ef..425199e4e05a975d02f0b02b796fb370313248fb 100644 --- a/src/plugins/workflow_designer/src/library/SchemaWorker.cpp +++ b/src/plugins/workflow_designer/src/library/SchemaWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/SchemaWorker.h b/src/plugins/workflow_designer/src/library/SchemaWorker.h index 03a0fb48e050917a5a2501e5e447f274d3ee9379..99588a81dd95159097f2d851c0ff482feb2a4608 100644 --- a/src/plugins/workflow_designer/src/library/SchemaWorker.h +++ b/src/plugins/workflow_designer/src/library/SchemaWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/ScriptWorker.cpp b/src/plugins/workflow_designer/src/library/ScriptWorker.cpp index 4917c30b025a647e76026e86986063406ae6fe59..ad282068f995098654cf074958ba6b4d1b38a404 100644 --- a/src/plugins/workflow_designer/src/library/ScriptWorker.cpp +++ b/src/plugins/workflow_designer/src/library/ScriptWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/ScriptWorker.h b/src/plugins/workflow_designer/src/library/ScriptWorker.h index 422f32cdba84b9c37a5aed263ac25f6ed10d03b4..5f45fc621f384c61f1e0bd9bea653421b4a66700 100644 --- a/src/plugins/workflow_designer/src/library/ScriptWorker.h +++ b/src/plugins/workflow_designer/src/library/ScriptWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/SequenceQualityTrimWorker.cpp b/src/plugins/workflow_designer/src/library/SequenceQualityTrimWorker.cpp index afa82722ea5714f397dff5db007c203d8964ed8b..3a8277a59667ebde9aea6f44704d2de4d8a5ef55 100644 --- a/src/plugins/workflow_designer/src/library/SequenceQualityTrimWorker.cpp +++ b/src/plugins/workflow_designer/src/library/SequenceQualityTrimWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/SequenceQualityTrimWorker.h b/src/plugins/workflow_designer/src/library/SequenceQualityTrimWorker.h index c903fc2da70375abc4793949503ac2007e0e5f1d..eab8fc3ed600bfd1a6cba7907529781dfe965811 100644 --- a/src/plugins/workflow_designer/src/library/SequenceQualityTrimWorker.h +++ b/src/plugins/workflow_designer/src/library/SequenceQualityTrimWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/SequenceSplitWorker.cpp b/src/plugins/workflow_designer/src/library/SequenceSplitWorker.cpp index 4eebd19a2180e06e52a7fb6b39a1046482a7cac0..002dcc4d7c92ca74ab08baada12e7c5076dac753 100644 --- a/src/plugins/workflow_designer/src/library/SequenceSplitWorker.cpp +++ b/src/plugins/workflow_designer/src/library/SequenceSplitWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/SequenceSplitWorker.h b/src/plugins/workflow_designer/src/library/SequenceSplitWorker.h index af765facca8753444a8ebdb9528f59ba8f34da9e..a9dec56588789c0ad33bdaa6c387e5e9e16b5120 100644 --- a/src/plugins/workflow_designer/src/library/SequenceSplitWorker.h +++ b/src/plugins/workflow_designer/src/library/SequenceSplitWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/SequencesToMSAWorker.cpp b/src/plugins/workflow_designer/src/library/SequencesToMSAWorker.cpp index a767f8ac6c5a6fc8374da66f4f422a00d561222d..2803e1e0ae5e0805f959ed4883b72666b733dd56 100644 --- a/src/plugins/workflow_designer/src/library/SequencesToMSAWorker.cpp +++ b/src/plugins/workflow_designer/src/library/SequencesToMSAWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/SequencesToMSAWorker.h b/src/plugins/workflow_designer/src/library/SequencesToMSAWorker.h index 0015c668dc7bf84cd4530fd0db604bc36890f740..acf7ddb488f82388f0915b62cbcd4b2a9cf74754 100644 --- a/src/plugins/workflow_designer/src/library/SequencesToMSAWorker.h +++ b/src/plugins/workflow_designer/src/library/SequencesToMSAWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/SortBamWorker.cpp b/src/plugins/workflow_designer/src/library/SortBamWorker.cpp index 411aa583291dd65cdfb4c07cc48b13a7e9f40518..d6b2605afd59ecd7d82f90dd827f4c82a7183d12 100644 --- a/src/plugins/workflow_designer/src/library/SortBamWorker.cpp +++ b/src/plugins/workflow_designer/src/library/SortBamWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -112,7 +112,7 @@ void SortBamWorkerFactory::init() { SortBamWorker::tr("Select the custom output folder.")); Descriptor outName(OUT_NAME_ID, SortBamWorker::tr("Output BAM name"), - SortBamWorker::tr("A name of an output BAM file. If default of empty value is provided the output name is the name of the first BAM file with .sorted.bam extention.")); + SortBamWorker::tr("A name of an output BAM file. If default of empty value is provided the output name is the name of the first BAM file with .sorted.bam extension.")); Descriptor index(INDEX_ID, SortBamWorker::tr("Build index"), SortBamWorker::tr("Build index for the sorted file with SAMTools index.")); diff --git a/src/plugins/workflow_designer/src/library/SortBamWorker.h b/src/plugins/workflow_designer/src/library/SortBamWorker.h index 37f610b5139c1321d7b385fbfc0677aabab07639..efac4723df07225dc51103447aeceb56b3f813d4 100644 --- a/src/plugins/workflow_designer/src/library/SortBamWorker.h +++ b/src/plugins/workflow_designer/src/library/SortBamWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/StatisticWorkers.cpp b/src/plugins/workflow_designer/src/library/StatisticWorkers.cpp index c7742ec43b7109f87b4ea97d7f87162ddb4039a7..1b768b10aa3c09359e6fb63ae85c73c5b33e46bf 100644 --- a/src/plugins/workflow_designer/src/library/StatisticWorkers.cpp +++ b/src/plugins/workflow_designer/src/library/StatisticWorkers.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/StatisticWorkers.h b/src/plugins/workflow_designer/src/library/StatisticWorkers.h index 6a6706f9caca686aff007177c439b605dd42c9c1..4202c11a6881c92eca1c82959e6aad6fa75d757b 100644 --- a/src/plugins/workflow_designer/src/library/StatisticWorkers.h +++ b/src/plugins/workflow_designer/src/library/StatisticWorkers.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/Text2SequenceWorker.cpp b/src/plugins/workflow_designer/src/library/Text2SequenceWorker.cpp index 2c1c5e88932bf554a58bb0430979ee7057ca161d..1e6cd0d2ca67f8648d0bf244f5e010a3c2fc4a94 100644 --- a/src/plugins/workflow_designer/src/library/Text2SequenceWorker.cpp +++ b/src/plugins/workflow_designer/src/library/Text2SequenceWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/Text2SequenceWorker.h b/src/plugins/workflow_designer/src/library/Text2SequenceWorker.h index 9ffc6f415b309af2198e752bc616a51a3969f942..54f4c84580cd0cc40bd0796ee4a05e99d64918d4 100644 --- a/src/plugins/workflow_designer/src/library/Text2SequenceWorker.h +++ b/src/plugins/workflow_designer/src/library/Text2SequenceWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/WriteAnnotationsWorker.cpp b/src/plugins/workflow_designer/src/library/WriteAnnotationsWorker.cpp index 784b0a85dad1c849b8a8b3cde949523ee5924a82..5c28c69e7f5f09e3a8c30c3a97929b1365b1b85e 100644 --- a/src/plugins/workflow_designer/src/library/WriteAnnotationsWorker.cpp +++ b/src/plugins/workflow_designer/src/library/WriteAnnotationsWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/WriteAnnotationsWorker.h b/src/plugins/workflow_designer/src/library/WriteAnnotationsWorker.h index b581b1a21c8f7eb8e6505a96f7bf6d08f3255a19..5d0aa049386d355ed8231fe9c6006790b91f7943 100644 --- a/src/plugins/workflow_designer/src/library/WriteAnnotationsWorker.h +++ b/src/plugins/workflow_designer/src/library/WriteAnnotationsWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/WriteAssemblyWorkers.cpp b/src/plugins/workflow_designer/src/library/WriteAssemblyWorkers.cpp index 5dbe4e740004c9d31680fb7f2fa39cf3b0cb8309..5d86dd91eb1b1a2b29fd724af73439e7b064dff9 100644 --- a/src/plugins/workflow_designer/src/library/WriteAssemblyWorkers.cpp +++ b/src/plugins/workflow_designer/src/library/WriteAssemblyWorkers.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/WriteAssemblyWorkers.h b/src/plugins/workflow_designer/src/library/WriteAssemblyWorkers.h index 066f89565ff552b6af411f3b9f278fc2b78adb9b..a8125b96edda5729278c9b70b4d07e7cae0a9ac8 100644 --- a/src/plugins/workflow_designer/src/library/WriteAssemblyWorkers.h +++ b/src/plugins/workflow_designer/src/library/WriteAssemblyWorkers.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/WriteVariationWorker.cpp b/src/plugins/workflow_designer/src/library/WriteVariationWorker.cpp index de709949d982e874075ad1f6b0215fe0c5e50bb4..33da33d29db21865548f04e3075367df3ac82f5a 100644 --- a/src/plugins/workflow_designer/src/library/WriteVariationWorker.cpp +++ b/src/plugins/workflow_designer/src/library/WriteVariationWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/WriteVariationWorker.h b/src/plugins/workflow_designer/src/library/WriteVariationWorker.h index 4e2ee0752dac0140115aa5bec53406b422ae10b5..6c59ca71573600789f5cfbd16d2f382ebca65b99 100644 --- a/src/plugins/workflow_designer/src/library/WriteVariationWorker.h +++ b/src/plugins/workflow_designer/src/library/WriteVariationWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.cpp b/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ea4ebaa0371866e4e2153eafe1fb73ed8c680c62 --- /dev/null +++ b/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.cpp @@ -0,0 +1,1039 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QAbstractButton> +#include <QMessageBox> +#include <QStandardItemModel> + +#include <U2Core/AppContext.h> +#include <U2Core/Counter.h> +#include <U2Core/ExternalToolRegistry.h> +#include <U2Core/GUrlUtils.h> +#include <U2Core/QObjectScopedPointer.h> +#include <U2Core/ScriptingToolRegistry.h> + +#include <U2Gui/DialogUtils.h> +#include <U2Gui/GroupedComboBoxDelegate.h> +#include <U2Gui/HelpButton.h> +#include <U2Gui/LastUsedDirHelper.h> +#include <U2Gui/U2FileDialog.h> + +#include <U2Lang/ActorPrototypeRegistry.h> +#include <U2Lang/HRSchemaSerializer.h> +#include <U2Lang/WorkflowEnv.h> +#include <U2Lang/WorkflowSettings.h> +#include <U2Lang/WorkflowUtils.h> + +#include "CreateCmdlineBasedWorkerWizard.h" +#include "WorkflowEditorDelegates.h" +#include "util/CustomWorkerUtils.h" +#include "util/WorkerNameValidator.h" + +namespace U2 { + +/**********************************************/ +/* CreateCmdlineBasedWorkerWizard */ +/**********************************************/ + +#ifdef Q_OS_MAC +const QString CreateCmdlineBasedWorkerWizard::PAGE_TITLE_STYLE_SHEET = "QLabel {margin-left: -5px; margin-bottom: -5px; margin-top: -5px; font-size: 20pt; padding-bottom: 10px; color: #0c3762}"; +#else +const QString CreateCmdlineBasedWorkerWizard::PAGE_TITLE_STYLE_SHEET = "QLabel {margin-left: -6px; margin-bottom: -5px; margin-top: -5px; font-size: 16pt; padding-bottom: 10px; color: #0c3762}"; +#endif + +const QString CreateCmdlineBasedWorkerWizard::ATTRIBUTES_DATA_FIELD = "attributes-data"; +const QString CreateCmdlineBasedWorkerWizard::ATTRIBUTES_IDS_FIELD = "attributes-ids"; +const QString CreateCmdlineBasedWorkerWizard::ATTRIBUTES_NAMES_FIELD = "attributes-names"; +const QString CreateCmdlineBasedWorkerWizard::COMMAND_TEMPLATE_DESCRIPTION_FIELD = "command-template-description"; +const QString CreateCmdlineBasedWorkerWizard::COMMAND_TEMPLATE_FIELD = "command-template"; +const QString CreateCmdlineBasedWorkerWizard::CUSTOM_TOOL_PATH_FIELD = "custom-tool-path"; +const QString CreateCmdlineBasedWorkerWizard::INPUTS_DATA_FIELD = "inputs-data"; +const QString CreateCmdlineBasedWorkerWizard::INPUTS_IDS_FIELD = "inputs-ids"; +const QString CreateCmdlineBasedWorkerWizard::INPUTS_NAMES_FIELD = "inputs-names"; +const QString CreateCmdlineBasedWorkerWizard::INTEGRATED_TOOL_ID_FIELD = "integrated-tool-id"; +const QString CreateCmdlineBasedWorkerWizard::OUTPUTS_DATA_FIELD = "outputs-data"; +const QString CreateCmdlineBasedWorkerWizard::OUTPUTS_IDS_FIELD = "outputs-ids"; +const QString CreateCmdlineBasedWorkerWizard::OUTPUTS_NAMES_FIELD = "outputs-names"; +const QString CreateCmdlineBasedWorkerWizard::USE_INTEGRATED_TOOL_FIELD = "use-integrated-tool"; +const QString CreateCmdlineBasedWorkerWizard::WORKER_DESCRIPTION_FIELD = "worker-description"; +const QString CreateCmdlineBasedWorkerWizard::WORKER_ID_FIELD = "worker-id"; +const QString CreateCmdlineBasedWorkerWizard::WORKER_NAME_FIELD = "worker-name"; + +CreateCmdlineBasedWorkerWizard::CreateCmdlineBasedWorkerWizard(SchemaConfig* _schemaConfig, QWidget *_parent) + : QWizard(_parent), + initialConfig(nullptr), + config(nullptr), + schemaConfig(_schemaConfig) +{ + GCOUNTER(cvar, tvar, "\"Configure Element with External Tool\" dialog is opened for creating"); + init(); +} + +CreateCmdlineBasedWorkerWizard::CreateCmdlineBasedWorkerWizard(SchemaConfig* _schemaConfig, ExternalProcessConfig *_initialConfig, QWidget *_parent) + : QWizard(_parent), + initialConfig(nullptr), + config(nullptr), + schemaConfig(_schemaConfig) +{ + SAFE_POINT(nullptr != _initialConfig, "Initial config of the element to edit is nullptr", ); + GCOUNTER(cvar, tvar, "\"Configure Element with External Tool\" dialog is opened for editing"); + initialConfig = new ExternalProcessConfig(*_initialConfig); + init(); +} + +CreateCmdlineBasedWorkerWizard::~CreateCmdlineBasedWorkerWizard() { + delete initialConfig; + delete config; +} + +ExternalProcessConfig *CreateCmdlineBasedWorkerWizard::takeConfig() { + ExternalProcessConfig *toReturn = nullptr; + qSwap(toReturn, config); + return toReturn; +} + +void CreateCmdlineBasedWorkerWizard::saveConfig(ExternalProcessConfig *config) { + const QString serializedConfig = HRSchemaSerializer::actor2String(config); + const QString dirPath = WorkflowSettings::getExternalToolDirectory(); + const QDir dir(dirPath); + if (!dir.exists()) { + dir.mkpath(dirPath); + } + + if (QFileInfo(config->filePath).dir().absolutePath() != dir.absolutePath()) { + config->filePath = dirPath + GUrlUtils::fixFileName(config->name) + ".etc"; + } + config->filePath = GUrlUtils::rollFileName(config->filePath, "_"); + + QFile file(config->filePath); + file.open(QIODevice::WriteOnly); + file.write(serializedConfig.toLatin1()); + file.close(); +} + +bool CreateCmdlineBasedWorkerWizard::isRequiredToRemoveElementFromScene(ExternalProcessConfig* actualConfig, ExternalProcessConfig* newConfig) { + CHECK(nullptr != actualConfig, false) + CHECK(nullptr != newConfig, false); + + bool result = (newConfig->inputs != actualConfig->inputs) + || (newConfig->outputs != actualConfig->outputs) + || (newConfig->attrs != actualConfig->attrs); + + return result; +} + +namespace { + +static const int UNNECCESSARY_ARGUMENT = 0; + +QString removeEmptyLines(const QString &str) { + QStringList res; + foreach(const QString &s, str.split(QRegularExpression("(\n|\r)"))) { + if (!s.trimmed().isEmpty()) { + res.append(s); + } + } + return res.join("\r\n"); +} + +void initDataModel(QAbstractItemModel *model, const QList<DataConfig> &dataConfigs) { + model->removeRows(0, model->rowCount()); + + int row = 0; + const int ignoredRowNumber = 0; + foreach(const DataConfig &dataConfig, dataConfigs) { + model->insertRow(ignoredRowNumber, QModelIndex()); + + QModelIndex index = model->index(row, CfgExternalToolModel::COLUMN_NAME); + model->setData(index, dataConfig.attrName); + + index = model->index(row, CfgExternalToolModel::COLUMN_ID); + model->setData(index, dataConfig.attributeId); + + index = model->index(row, CfgExternalToolModel::COLUMN_DATA_TYPE); + model->setData(index, dataConfig.type); + + index = model->index(row, CfgExternalToolModel::COLUMN_FORMAT); + model->setData(index, dataConfig.format); + + index = model->index(row, CfgExternalToolModel::COLUMN_DESCRIPTION); + model->setData(index, dataConfig.description); + + row++; + } +} + +bool checkNamesAndIds(const QStringList &names, const QStringList &ids) { + bool res = true; + + foreach (const QString &id, ids) { + if (id.isEmpty()) { + res = false; + } + } + + foreach (const QString &name, names) { + if (name.isEmpty()) { + res = false; + } + } + + const bool areThereDuplicates = (ids.toSet().size() != ids.size()); + if (areThereDuplicates) { + res = false; + } + + return res; +} + +} + +void CreateCmdlineBasedWorkerWizard::accept() { + QScopedPointer<ExternalProcessConfig> actualConfig(createActualConfig()); + CHECK(!actualConfig.isNull(), ); + + if (isRequiredToRemoveElementFromScene(initialConfig, actualConfig.data())) { + int res = QMessageBox::question(this, + tr("Warning"), + tr("You've changed the element structure (input data, parameters, or output data).\n\n" + "If you apply the changes, all elements of this type will be removed from the scene." + "You can then add a new such element to the scene by dragging it from the \"Custom Elements with External Tools\" group of the \"Elements\" palette.\n\n" + "Would you like to apply the changes ? "), + QMessageBox::Apply | QMessageBox::Cancel | QMessageBox::Reset, + QMessageBox::Apply); + if (QMessageBox::Cancel == res) { + return; + } else if (QMessageBox::Reset == res) { + restart(); + return; + } + } + if (nullptr != initialConfig) { + GCOUNTER(cvar, tvar, "\"Configure Element with External Tool\" dialog is finished for editing"); + } else { + GCOUNTER(cvar1, tvar1, "\"Configure Element with External Tool\" dialog is finished for creating"); + } + config = actualConfig.take(); + done(QDialog::Accepted); +} + +void CreateCmdlineBasedWorkerWizard::init() { + addPage(new CreateCmdlineBasedWorkerWizardGeneralSettingsPage(initialConfig)); + addPage(new CreateCmdlineBasedWorkerWizardInputDataPage(initialConfig)); + addPage(new CreateCmdlineBasedWorkerWizardParametersPage(initialConfig, schemaConfig)); + addPage(new CreateCmdlineBasedWorkerWizardOutputDataPage(initialConfig)); + addPage(new CreateCmdlineBasedWorkerWizardCommandPage(initialConfig)); + addPage(new CreateCmdlineBasedWorkerWizardElementAppearancePage(initialConfig)); + addPage(new CreateCmdlineBasedWorkerWizardSummaryPage()); + + setWindowTitle(tr("Configure Element with External Tool")); + setObjectName("CreateExternalProcessWorkerDialog"); + setWizardStyle(ClassicStyle); + setOption(IndependentPages); + + setOption(QWizard::HaveHelpButton, true); + new U2::HelpButton(this, this->button(QWizard::HelpButton), "24740125"); + + DialogUtils::setWizardMinimumSize(this, QSize(780, 350)); +} + +ExternalProcessConfig *CreateCmdlineBasedWorkerWizard::createActualConfig() const { + ExternalProcessConfig *config = new ExternalProcessConfig(); + config->id = field(WORKER_ID_FIELD).toString(); + config->name = field(WORKER_NAME_FIELD).toString(); + config->description = removeEmptyLines(field(WORKER_DESCRIPTION_FIELD).toString()); + config->templateDescription = removeEmptyLines(field(COMMAND_TEMPLATE_DESCRIPTION_FIELD).toString()); + config->inputs = field(INPUTS_DATA_FIELD).value<QList<DataConfig> >(); + config->outputs = field(OUTPUTS_DATA_FIELD).value<QList<DataConfig> >(); + config->attrs = field(ATTRIBUTES_DATA_FIELD).value<QList<AttributeConfig> >(); + config->cmdLine = field(COMMAND_TEMPLATE_FIELD).toString(); + config->filePath = WorkflowSettings::getExternalToolDirectory() + GUrlUtils::fixFileName(config->name) + ".etc"; + config->useIntegratedTool = field(USE_INTEGRATED_TOOL_FIELD).toBool(); + config->integratedToolId = field(INTEGRATED_TOOL_ID_FIELD).toString(); + config->customToolPath = QDir::fromNativeSeparators(field(CUSTOM_TOOL_PATH_FIELD).toString()); + return config; +} + +/**********************************************/ +/* CreateCmdlineBasedWorkerWizardGeneralSettingsPage */ +/**********************************************/ + +char const * const CreateCmdlineBasedWorkerWizardGeneralSettingsPage::INTEGRATED_TOOL_ID_PROPERTY = "integrated-tool-id-property"; +char const * const CreateCmdlineBasedWorkerWizardGeneralSettingsPage::WORKER_ID_PROPERTY = "worker-id-property"; +const QString CreateCmdlineBasedWorkerWizardGeneralSettingsPage::LOD_DOMAIN = "CreateCmdlineBasedWorkerWizard: select custom tool path"; + +CreateCmdlineBasedWorkerWizardGeneralSettingsPage::CreateCmdlineBasedWorkerWizardGeneralSettingsPage(ExternalProcessConfig* _initialConfig) + : QWizardPage(nullptr), + initialConfig(_initialConfig) +{ + setupUi(this); + + cbIntegratedTools = new ExternalToolSelectComboBox(gbTool); + cbIntegratedTools->setEnabled(false); + cbIntegratedTools->setObjectName("cbIntegratedTools"); + containerLayout->addWidget(cbIntegratedTools); + + lblTitle->setStyleSheet(CreateCmdlineBasedWorkerWizard::PAGE_TITLE_STYLE_SHEET); + leName->setValidator(new QRegularExpressionValidator(WorkflowEntityValidator::ACCEPTABLE_NAME, leName)); + + connect(leToolPath, SIGNAL(textChanged(const QString&)), SIGNAL(completeChanged())); + connect(tbBrowse, SIGNAL(clicked()), SLOT(sl_browse())); + connect(rbIntegratedTool, SIGNAL(toggled(bool)), SIGNAL(completeChanged())); + connect(rbIntegratedTool, SIGNAL(toggled(bool)), SLOT(sl_integratedToolChanged())); + connect(rbIntegratedTool, SIGNAL(toggled(bool)), cbIntegratedTools, SLOT(setEnabled(bool))); + connect(cbIntegratedTools, SIGNAL(currentIndexChanged(int)), SLOT(sl_integratedToolChanged())); + + registerField(CreateCmdlineBasedWorkerWizard::WORKER_NAME_FIELD + "*", leName); + registerField(CreateCmdlineBasedWorkerWizard::WORKER_ID_FIELD, this, WORKER_ID_PROPERTY); + registerField(CreateCmdlineBasedWorkerWizard::USE_INTEGRATED_TOOL_FIELD, rbIntegratedTool); + registerField(CreateCmdlineBasedWorkerWizard::CUSTOM_TOOL_PATH_FIELD, leToolPath); + registerField(CreateCmdlineBasedWorkerWizard::INTEGRATED_TOOL_ID_FIELD, this, INTEGRATED_TOOL_ID_PROPERTY, SIGNAL(si_integratedToolChanged())); +} + +void CreateCmdlineBasedWorkerWizardGeneralSettingsPage::initializePage() { + if (nullptr != initialConfig) { + leName->setText(initialConfig->name); + rbIntegratedTool->setChecked(initialConfig->useIntegratedTool); + leToolPath->setText(QDir::toNativeSeparators(initialConfig->customToolPath)); + if (AppContext::getExternalToolRegistry()->getById(initialConfig->integratedToolId) == nullptr && rbIntegratedTool->isChecked()) { + QObjectScopedPointer<QMessageBox> warningBox(new QMessageBox( + QMessageBox::Warning, + initialConfig->name, + tr("UGENE can't find the tool specified in this element. Please specify another tool."), + QMessageBox::Close)); + warningBox->exec(); + rbCustomTool->setChecked(true); + } else if (!initialConfig->integratedToolId.isEmpty()) { + cbIntegratedTools->setDefaultMenuValue(initialConfig->integratedToolId); + } + } else { + QString name = "Custom Element"; + makeUniqueWorkerName(name); + leName->setText(name); + } + sl_integratedToolChanged(); +} + +bool CreateCmdlineBasedWorkerWizardGeneralSettingsPage::isComplete() const { + if (rbCustomTool->isChecked() && leToolPath->text().isEmpty()) { + return false; + } + return QWizardPage::isComplete(); +} + +bool CreateCmdlineBasedWorkerWizardGeneralSettingsPage::validatePage() { + QString name = field(CreateCmdlineBasedWorkerWizard::WORKER_NAME_FIELD).toString(); + + const QMap<Descriptor, QList<ActorPrototype *> > groups = Workflow::WorkflowEnv::getProtoRegistry()->getProtos(); + QStringList reservedNames; + QStringList reservedIds; + + foreach (const QList<ActorPrototype *> &group, groups) { + foreach (ActorPrototype *proto, group) { + reservedNames << proto->getDisplayName(); + reservedIds << proto->getId(); + } + } + + if (nullptr == initialConfig || initialConfig->name != name) { + name = WorkflowUtils::createUniqueString(name, " ", reservedNames); + setField(CreateCmdlineBasedWorkerWizard::WORKER_NAME_FIELD, name); + } + + QString id; + if (nullptr == initialConfig) { + id = WorkflowUtils::createUniqueString(WorkflowUtils::generateIdFromName(name), "-", reservedIds); + } else { + id = initialConfig->id; + } + + setProperty(WORKER_ID_PROPERTY, id); + return true; +} + +void CreateCmdlineBasedWorkerWizardGeneralSettingsPage::sl_browse() { + LastUsedDirHelper lod(LOD_DOMAIN); + lod.url = U2FileDialog::getOpenFileName(this, tr("Select an executable file"), lod.dir); + CHECK(!lod.url.isEmpty(), ); + leToolPath->setText(QDir::toNativeSeparators(lod.url)); +} + +void CreateCmdlineBasedWorkerWizardGeneralSettingsPage::sl_integratedToolChanged() { + setProperty(INTEGRATED_TOOL_ID_PROPERTY, cbIntegratedTools->currentData()); + emit si_integratedToolChanged(); +} + +void CreateCmdlineBasedWorkerWizardGeneralSettingsPage::makeUniqueWorkerName(QString& name) { + const QMap<Descriptor, QList<ActorPrototype *> > groups = Workflow::WorkflowEnv::getProtoRegistry()->getProtos(); + QStringList reservedNames; + foreach(const QList<ActorPrototype *> &group, groups) { + foreach(ActorPrototype *proto, group) { + reservedNames << proto->getDisplayName(); + } + } + name = WorkflowUtils::createUniqueString(name, " ", reservedNames); +} + +/**********************************************/ +/* CreateCmdlineBasedWorkerWizardInputDataPage */ +/**********************************************/ + +char const * const CreateCmdlineBasedWorkerWizardInputDataPage::INPUTS_DATA_PROPERTY = "inputs-data-property"; +char const * const CreateCmdlineBasedWorkerWizardInputDataPage::INPUTS_IDS_PROPERTY = "inputs-ids-property"; +char const * const CreateCmdlineBasedWorkerWizardInputDataPage::INPUTS_NAMES_PROPERTY = "inputs-names-property"; + +CreateCmdlineBasedWorkerWizardInputDataPage::CreateCmdlineBasedWorkerWizardInputDataPage(ExternalProcessConfig *_initialConfig) + : QWizardPage(nullptr), + initialConfig(_initialConfig) +{ + setupUi(this); + + lblTitle->setStyleSheet(CreateCmdlineBasedWorkerWizard::PAGE_TITLE_STYLE_SHEET); + + connect(pbAddInput, SIGNAL(clicked()), SLOT(sl_addInput())); + connect(pbDeleteInput, SIGNAL(clicked()), SLOT(sl_deleteInput())); + connect(this, SIGNAL(si_inputsChanged()), SIGNAL(completeChanged())); + + inputsModel = new CfgExternalToolModel(CfgExternalToolModel::Input, tvInput); + connect(inputsModel, SIGNAL(rowsInserted(const QModelIndex &, int, int)), SLOT(sl_updateInputsProperties())); + connect(inputsModel, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), SLOT(sl_updateInputsProperties())); + connect(inputsModel, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), SLOT(sl_updateInputsProperties())); + + tvInput->setModel(inputsModel); + tvInput->setItemDelegate(new ProxyDelegate()); + tvInput->horizontalHeader()->setStretchLastSection(true); + tvInput->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); + /* + QFontMetrics fm = QFontMetrics(tvInput->font()); + int columnWidth = static_cast<int>(fm.width(SEQ_WITH_ANNS) * 1.5); + tvInput->setColumnWidth(1, columnWidth); + */ + registerField(CreateCmdlineBasedWorkerWizard::INPUTS_DATA_FIELD, this, INPUTS_DATA_PROPERTY, SIGNAL(si_inputsChanged())); + registerField(CreateCmdlineBasedWorkerWizard::INPUTS_IDS_FIELD, this, INPUTS_IDS_PROPERTY); + registerField(CreateCmdlineBasedWorkerWizard::INPUTS_NAMES_FIELD, this, INPUTS_NAMES_PROPERTY); + this->duplicateInputsWarningLabel->setVisible(false); +} + +void CreateCmdlineBasedWorkerWizardInputDataPage::initializePage() { + CHECK(nullptr != initialConfig, ); + initDataModel(inputsModel, initialConfig->inputs); +} + +bool CreateCmdlineBasedWorkerWizardInputDataPage::isComplete() const { + const QStringList ids = field(CreateCmdlineBasedWorkerWizard::INPUTS_IDS_FIELD).toStringList(); + const QStringList names = field(CreateCmdlineBasedWorkerWizard::INPUTS_NAMES_FIELD).toStringList(); + return checkNamesAndIds(names, ids); +} + +void CreateCmdlineBasedWorkerWizardInputDataPage::sl_addInput() { + const int ignoredRowNumber = 0; + inputsModel->insertRow(ignoredRowNumber, QModelIndex()); + tvInput->setCurrentIndex(inputsModel->index(inputsModel->rowCount(QModelIndex()) - 1, 0)); +} + +void CreateCmdlineBasedWorkerWizardInputDataPage::sl_deleteInput() { + inputsModel->removeRow(tvInput->currentIndex().row()); +} + +void CreateCmdlineBasedWorkerWizardInputDataPage::sl_updateInputsProperties() { + QStringList ids; + QStringList names; + QList<DataConfig> data; + bool hasDuplicates = false; + foreach (CfgExternalToolItem *item, inputsModel->getItems()) { + data << item->itemData; + QString id = item->getId(); + hasDuplicates = hasDuplicates || (!id.isEmpty() && ids.contains(id)); + ids << id; + names << item->getName(); + } + setProperty(INPUTS_DATA_PROPERTY, QVariant::fromValue<QList<DataConfig> >(data)); + setProperty(INPUTS_IDS_PROPERTY, ids); + setProperty(INPUTS_NAMES_PROPERTY, names); + + this->duplicateInputsWarningLabel->setVisible(hasDuplicates); + + emit si_inputsChanged(); +} + +/**********************************************/ +/* CreateCmdlineBasedWorkerWizardParametersPage */ +/**********************************************/ + +char const * const CreateCmdlineBasedWorkerWizardParametersPage::ATTRIBUTES_DATA_PROPERTY = "attributes-data-property"; +char const * const CreateCmdlineBasedWorkerWizardParametersPage::ATTRIBUTES_IDS_PROPERTY = "attributes-ids-property"; +char const * const CreateCmdlineBasedWorkerWizardParametersPage::ATTRIBUTES_NAMES_PROPERTY = "attributes-names-property"; + +CreateCmdlineBasedWorkerWizardParametersPage::CreateCmdlineBasedWorkerWizardParametersPage(ExternalProcessConfig *_initialConfig, SchemaConfig *_schemaConfig) + : QWizardPage(nullptr), + initialConfig(_initialConfig) +{ + setupUi(this); + + lblTitle->setStyleSheet(CreateCmdlineBasedWorkerWizard::PAGE_TITLE_STYLE_SHEET); + + connect(pbAdd, SIGNAL(clicked()), SLOT(sl_addAttribute())); + connect(pbDelete, SIGNAL(clicked()), SLOT(sl_deleteAttribute())); + connect(this, SIGNAL(si_attributesChanged()), SIGNAL(completeChanged())); + + model = new CfgExternalToolModelAttributes(_schemaConfig); + connect(model, SIGNAL(rowsInserted(const QModelIndex &, int, int)), SLOT(sl_updateAttributes())); + connect(model, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), SLOT(sl_updateAttributes())); + connect(model, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), SLOT(sl_updateAttributes())); + + tvAttributes->setModel(model); + tvAttributes->setItemDelegate(new ProxyDelegate()); + tvAttributes->horizontalHeader()->setStretchLastSection(true); + tvAttributes->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); + + registerField(CreateCmdlineBasedWorkerWizard::ATTRIBUTES_DATA_FIELD, this, ATTRIBUTES_DATA_PROPERTY, SIGNAL(si_attributesChanged())); + registerField(CreateCmdlineBasedWorkerWizard::ATTRIBUTES_IDS_FIELD, this, ATTRIBUTES_IDS_PROPERTY); + registerField(CreateCmdlineBasedWorkerWizard::ATTRIBUTES_NAMES_FIELD, this, ATTRIBUTES_NAMES_PROPERTY); + this->duplicateParametersWarningLabel->setVisible(false); +} + +void CreateCmdlineBasedWorkerWizardParametersPage::initializePage() { + CHECK(nullptr != initialConfig, ); + initAttributesModel(model, initialConfig->attrs); +} + +bool CreateCmdlineBasedWorkerWizardParametersPage::isComplete() const { + const QStringList ids = field(CreateCmdlineBasedWorkerWizard::INPUTS_IDS_FIELD).toStringList() + + field(CreateCmdlineBasedWorkerWizard::ATTRIBUTES_IDS_FIELD).toStringList(); + const QStringList names = field(CreateCmdlineBasedWorkerWizard::INPUTS_NAMES_FIELD).toStringList() + + field(CreateCmdlineBasedWorkerWizard::ATTRIBUTES_NAMES_FIELD).toStringList(); + return checkNamesAndIds(names, ids); +} + +void CreateCmdlineBasedWorkerWizardParametersPage::sl_addAttribute() { + const int ignoredRowNumber = 0; + model->insertRow(ignoredRowNumber, QModelIndex()); + tvAttributes->setCurrentIndex(model->index(model->rowCount(QModelIndex()) - 1, 0)); +} + +void CreateCmdlineBasedWorkerWizardParametersPage::sl_deleteAttribute() { + model->removeRow(tvAttributes->currentIndex().row()); +} + +void CreateCmdlineBasedWorkerWizardParametersPage::sl_updateAttributes() { + QStringList ids; + QStringList names; + QList<AttributeConfig> data; + // this is the second page in the wizard. Check for duplicates with the prev. page ids (inputs) + QStringList inputIds = field(CreateCmdlineBasedWorkerWizard::INPUTS_IDS_FIELD).toStringList(); + bool hasDuplicates = false; + foreach (AttributeItem *item, model->getItems()) { + AttributeConfig attributeConfig; + attributeConfig.attributeId = item->getId(); + attributeConfig.attrName = item->getName(); + attributeConfig.type = item->getDataType(); + attributeConfig.defaultValue = item->getDefaultValue().toString(); + attributeConfig.description = item->getDescription(); + if (attributeConfig.isOutputUrl()) { + attributeConfig.flags |= AttributeConfig::AddToDashboard; + if (attributeConfig.isFile()) { + attributeConfig.flags |= AttributeConfig::OpenWithUgene; + } + } + data << attributeConfig; + QString id = item->getId(); + hasDuplicates = hasDuplicates || (!id.isEmpty() && (ids.contains(id) || inputIds.contains(id))); + ids << id; + names << item->getName(); + } + setProperty(ATTRIBUTES_DATA_PROPERTY, QVariant::fromValue<QList<AttributeConfig> >(data)); + setProperty(ATTRIBUTES_IDS_PROPERTY, ids); + setProperty(ATTRIBUTES_NAMES_PROPERTY, names); + + this->duplicateParametersWarningLabel->setVisible(hasDuplicates); + + emit si_attributesChanged(); +} + +void CreateCmdlineBasedWorkerWizardParametersPage::initAttributesModel(QAbstractItemModel *model, const QList<AttributeConfig> &attributeConfigs) { + model->removeRows(0, model->rowCount()); + + int row = 0; + const int ignoredRowNumber = 0; + foreach(const AttributeConfig &attributeConfig, attributeConfigs) { + model->insertRow(ignoredRowNumber, QModelIndex()); + + QModelIndex index = model->index(row, CfgExternalToolModelAttributes::COLUMN_NAME); + model->setData(index, attributeConfig.attrName); + + index = model->index(row, CfgExternalToolModelAttributes::COLUMN_ID); + model->setData(index, attributeConfig.attributeId); + + index = model->index(row, CfgExternalToolModelAttributes::COLUMN_DATA_TYPE); + model->setData(index, attributeConfig.type); + + index = model->index(row, CfgExternalToolModelAttributes::COLUMN_DEFAULT_VALUE); + model->setData(index, attributeConfig.defaultValue); + + index = model->index(row, CfgExternalToolModelAttributes::COLUMN_DESCRIPTION); + model->setData(index, attributeConfig.description); + + row++; + } +} + +/**********************************************/ +/* CreateCmdlineBasedWorkerWizardOutputDataPage */ +/**********************************************/ + +char const * const CreateCmdlineBasedWorkerWizardOutputDataPage::OUTPUTS_DATA_PROPERTY = "outputs-data-property"; +char const * const CreateCmdlineBasedWorkerWizardOutputDataPage::OUTPUTS_IDS_PROPERTY = "outputs-ids-property"; +char const * const CreateCmdlineBasedWorkerWizardOutputDataPage::OUTPUTS_NAMES_PROPERTY = "outputs-names-property"; + +CreateCmdlineBasedWorkerWizardOutputDataPage::CreateCmdlineBasedWorkerWizardOutputDataPage(ExternalProcessConfig *_initialConfig) + : QWizardPage(nullptr), + initialConfig(_initialConfig) +{ + setupUi(this); + + lblTitle->setStyleSheet(CreateCmdlineBasedWorkerWizard::PAGE_TITLE_STYLE_SHEET); + + connect(pbAddOutput, SIGNAL(clicked()), SLOT(sl_addOutput())); + connect(pbDeleteOutput, SIGNAL(clicked()), SLOT(sl_deleteOutput())); + connect(this, SIGNAL(si_outputsChanged()), SIGNAL(completeChanged())); + + outputsModel = new CfgExternalToolModel(CfgExternalToolModel::Output); + connect(outputsModel, SIGNAL(rowsInserted(const QModelIndex &, int, int)), SLOT(sl_updateOutputsProperties())); + connect(outputsModel, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), SLOT(sl_updateOutputsProperties())); + connect(outputsModel, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), SLOT(sl_updateOutputsProperties())); + + tvOutput->setModel(outputsModel); + tvOutput->setItemDelegate(new ProxyDelegate()); + tvOutput->horizontalHeader()->setStretchLastSection(true); + tvOutput->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); + + registerField(CreateCmdlineBasedWorkerWizard::OUTPUTS_DATA_FIELD, this, OUTPUTS_DATA_PROPERTY, SIGNAL(si_outputsChanged())); + registerField(CreateCmdlineBasedWorkerWizard::OUTPUTS_IDS_FIELD, this, OUTPUTS_IDS_PROPERTY); + registerField(CreateCmdlineBasedWorkerWizard::OUTPUTS_NAMES_FIELD, this, OUTPUTS_NAMES_PROPERTY); + + this->duplicateOutputsWarningLabel->setVisible(false); +} + +void CreateCmdlineBasedWorkerWizardOutputDataPage::initializePage() { + CHECK(nullptr != initialConfig, ); + initDataModel(outputsModel, initialConfig->outputs); +} + +bool CreateCmdlineBasedWorkerWizardOutputDataPage::isComplete() const { + const QStringList ids = field(CreateCmdlineBasedWorkerWizard::INPUTS_IDS_FIELD).toStringList() + + field(CreateCmdlineBasedWorkerWizard::ATTRIBUTES_IDS_FIELD).toStringList() + + field(CreateCmdlineBasedWorkerWizard::OUTPUTS_IDS_FIELD).toStringList(); + const QStringList names = field(CreateCmdlineBasedWorkerWizard::INPUTS_NAMES_FIELD).toStringList() + + field(CreateCmdlineBasedWorkerWizard::ATTRIBUTES_NAMES_FIELD).toStringList() + + field(CreateCmdlineBasedWorkerWizard::OUTPUTS_NAMES_FIELD).toStringList(); + return checkNamesAndIds(names, ids); +} + +void CreateCmdlineBasedWorkerWizardOutputDataPage::sl_addOutput() { + outputsModel->insertRow(UNNECCESSARY_ARGUMENT, QModelIndex()); + tvOutput->setCurrentIndex(outputsModel->index(outputsModel->rowCount(QModelIndex()) - 1, 0)); +} + +void CreateCmdlineBasedWorkerWizardOutputDataPage::sl_deleteOutput() { + outputsModel->removeRow(tvOutput->currentIndex().row()); +} + +void CreateCmdlineBasedWorkerWizardOutputDataPage::sl_updateOutputsProperties() { + QStringList ids; + QStringList names; + QList<DataConfig> data; + + // this is the third page in the wizard. Check for duplicates with the prev. pages ids (inputs, attributes) + QStringList inputIds = field(CreateCmdlineBasedWorkerWizard::INPUTS_IDS_FIELD).toStringList(); + QStringList attributeIds = field(CreateCmdlineBasedWorkerWizard::ATTRIBUTES_IDS_FIELD).toStringList(); + bool hasDuplicates = false; + + foreach (CfgExternalToolItem *item, outputsModel->getItems()) { + data << item->itemData; + QString id = item->getId(); + hasDuplicates = hasDuplicates || (!id.isEmpty() && (ids.contains(id) || inputIds.contains(id) || attributeIds.contains(id))); + ids << id; + names << item->getName(); + } + setProperty(OUTPUTS_DATA_PROPERTY, QVariant::fromValue<QList<DataConfig> >(data)); + setProperty(OUTPUTS_IDS_PROPERTY, ids); + setProperty(OUTPUTS_NAMES_PROPERTY, names); + + this->duplicateOutputsWarningLabel->setVisible(hasDuplicates); + + emit si_outputsChanged(); +} + +/**********************************************/ +/* CreateCmdlineBasedWorkerWizardCommandPage */ +/**********************************************/ + +CommandValidator::CommandValidator(QTextEdit *_textEdit) + : QObject(_textEdit), + textEdit(_textEdit) +{ + SAFE_POINT(nullptr != textEdit, "textEdit widget is nullptr", ); + connect(textEdit, SIGNAL(textChanged()), SLOT(sl_textChanged())); +} + +void CommandValidator::sl_textChanged() { + QSignalBlocker signalBlocker(textEdit); + Q_UNUSED(signalBlocker); + + QTextCursor cursor = textEdit->textCursor(); + const int position = cursor.position(); + + QString text = textEdit->toPlainText(); + text.replace("\"", "\'"); + textEdit->setPlainText(text); + + cursor.setPosition(position); + textEdit->setTextCursor(cursor); +} + +CreateCmdlineBasedWorkerWizardCommandPage::CreateCmdlineBasedWorkerWizardCommandPage(ExternalProcessConfig *_initialConfig) + : QWizardPage(nullptr), + initialConfig(_initialConfig) +{ + setupUi(this); + + lblTitle->setStyleSheet(CreateCmdlineBasedWorkerWizard::PAGE_TITLE_STYLE_SHEET); + + teCommand->setWordWrapMode(QTextOption::WrapAnywhere); + teCommand->document()->setDefaultStyleSheet("span { white-space: pre-wrap; }"); + new CommandValidator(teCommand); + + registerField(CreateCmdlineBasedWorkerWizard::COMMAND_TEMPLATE_FIELD + "*", teCommand, "plainText", SIGNAL(textChanged())); +} + +void CreateCmdlineBasedWorkerWizardCommandPage::initializePage() { + if (nullptr != initialConfig) { + teCommand->setText(initialConfig->cmdLine); + } else { + QString commandTemplate = "<My tool>"; + bool isIntegratedTool = field(CreateCmdlineBasedWorkerWizard::USE_INTEGRATED_TOOL_FIELD).toBool(); + if (!isIntegratedTool) { + commandTemplate = "%" + CustomWorkerUtils::TOOL_PATH_VAR_NAME + "%"; + } else { + QString integatedToolId = field(CreateCmdlineBasedWorkerWizard::INTEGRATED_TOOL_ID_FIELD).toString(); + ExternalTool * tool = AppContext::getExternalToolRegistry()->getById(integatedToolId); + if (tool) { + QString toolRunnerProgramId = tool->getToolRunnerProgramId(); + if (!toolRunnerProgramId.isEmpty()) { + ExternalTool* toolRunnerProgram = AppContext::getExternalToolRegistry()->getById(toolRunnerProgramId); + if (nullptr != toolRunnerProgram) { + commandTemplate = "%" + CustomWorkerUtils::getVarName(toolRunnerProgram) + "% "; + foreach(const QString & param, toolRunnerProgram->getRunParameters()) { + commandTemplate += param + " "; + } + } else { + commandTemplate = ""; + } + } else { + commandTemplate = ""; + } + commandTemplate += "%" + CustomWorkerUtils::getVarName(tool) + "%"; + } + } + + const QStringList inputsNames = field(CreateCmdlineBasedWorkerWizard::INPUTS_IDS_FIELD).toStringList(); + foreach (const QString &name, inputsNames) { + commandTemplate += " $" + name; + } + + const QStringList outputsNames = field(CreateCmdlineBasedWorkerWizard::OUTPUTS_IDS_FIELD).toStringList(); + foreach (const QString &name, outputsNames) { + commandTemplate += " $" + name; + } + + const QStringList attributesNames = field(CreateCmdlineBasedWorkerWizard::ATTRIBUTES_IDS_FIELD).toStringList(); + int i = 0; + foreach (const QString &name, attributesNames) { + commandTemplate += " -p" + QString::number(++i) + " $" + name; + } + + teCommand->setText(commandTemplate); + } +} + +bool CreateCmdlineBasedWorkerWizardCommandPage::isComplete() const { + return !teCommand->toPlainText().isEmpty(); +} + +bool CreateCmdlineBasedWorkerWizardCommandPage::validatePage() { + const QString command = teCommand->toPlainText(); + QStringList ids = field(CreateCmdlineBasedWorkerWizard::INPUTS_IDS_FIELD).toStringList() + + field(CreateCmdlineBasedWorkerWizard::OUTPUTS_IDS_FIELD).toStringList() + + field(CreateCmdlineBasedWorkerWizard::ATTRIBUTES_IDS_FIELD).toStringList(); + + QString parameters; + foreach(const QString &id, ids) { + if (!command.contains("$" + id)) { + parameters += " - " + id + "\n"; + } + } + + if (parameters.isEmpty()) { + return true; + } + + QObjectScopedPointer<QMessageBox> msgBox = new QMessageBox(this); + msgBox->setWindowTitle(tr("Create Element")); + msgBox->setText(tr("You don't use listed parameters in template string. Continue?")); + msgBox->setDetailedText(parameters); + QAbstractButton *detailsButton = NULL; + foreach(QAbstractButton *button, msgBox->buttons()) { + if (msgBox->buttonRole(button) == QMessageBox::ActionRole) { + QString buttoText = button->text(); + detailsButton = button; + break; + } + } + if (detailsButton) { + detailsButton->click(); + } + msgBox->addButton(tr("Continue"), QMessageBox::ActionRole); + QPushButton *cancel = msgBox->addButton(tr("Abort"), QMessageBox::ActionRole); + msgBox->exec(); + CHECK(!msgBox.isNull(), false); + if (msgBox->clickedButton() == cancel) { + return false; + } + return true; +} + +/**********************************************/ +/* CreateCmdlineBasedWorkerWizardElementAppearancePage */ +/**********************************************/ + +CreateCmdlineBasedWorkerWizardElementAppearancePage::CreateCmdlineBasedWorkerWizardElementAppearancePage(ExternalProcessConfig *_initialConfig) + : QWizardPage(nullptr), + initialConfig(_initialConfig) +{ + setupUi(this); + + lblTitle->setStyleSheet(CreateCmdlineBasedWorkerWizard::PAGE_TITLE_STYLE_SHEET); + + new CommandValidator(tePrompter); + new CommandValidator(teDescription); + + registerField(CreateCmdlineBasedWorkerWizard::COMMAND_TEMPLATE_DESCRIPTION_FIELD, tePrompter, "plainText", SIGNAL(textChanged())); + registerField(CreateCmdlineBasedWorkerWizard::WORKER_DESCRIPTION_FIELD, teDescription, "plainText", SIGNAL(textChanged())); +} + +void CreateCmdlineBasedWorkerWizardElementAppearancePage::initializePage() { + CHECK(nullptr != initialConfig, ); + teDescription->setPlainText(initialConfig->description); + tePrompter->setPlainText(initialConfig->templateDescription); +} + +/*********************************************/ +/* CreateCmdlineBasedWorkerWizardSummaryPage */ +/*********************************************/ + +CreateCmdlineBasedWorkerWizardSummaryPage::CreateCmdlineBasedWorkerWizardSummaryPage() + : QWizardPage(nullptr) +{ + setupUi(this); + + lblTitle->setStyleSheet(CreateCmdlineBasedWorkerWizard::PAGE_TITLE_STYLE_SHEET); + QColor backGroundColor = palette().color(QPalette::Window); + lblNameValue->setStyleSheet("background-color:" + backGroundColor.name() + ";"); + lblPrompterValue->setStyleSheet("background-color:" + backGroundColor.name() + ";"); + lblDescriptionValue->setStyleSheet("background-color:" + backGroundColor.name() + ";"); + lblCommandValue->setStyleSheet("background-color:" + backGroundColor.name() + ";"); +} + +void CreateCmdlineBasedWorkerWizardSummaryPage::showEvent(QShowEvent * /*event*/) { + lblNameValue->setText(field(CreateCmdlineBasedWorkerWizard::WORKER_NAME_FIELD).toString()); + lblPrompterValue->setText(field(CreateCmdlineBasedWorkerWizard::COMMAND_TEMPLATE_DESCRIPTION_FIELD).toString()); + lblDescriptionValue->setText(field(CreateCmdlineBasedWorkerWizard::WORKER_DESCRIPTION_FIELD).toString()); + lblCommandValue->setText(field(CreateCmdlineBasedWorkerWizard::COMMAND_TEMPLATE_FIELD).toString()); +} + + +/******************************/ +/* ExternalToolSelectComboBox */ +/******************************/ + +const QString ExternalToolSelectComboBox::SHOW_ALL_TOOLS = "SHOW_ALL"; +const QString ExternalToolSelectComboBox::SHOW_CUSTOM_TOOLS = "SHOW_CUSTOM"; + +ExternalToolSelectComboBox::ExternalToolSelectComboBox(QWidget* parent) + : QComboBox(parent) { + initExternalTools(); + initPopupMenu(); +}; + +void ExternalToolSelectComboBox::hidePopup() { + QString data = model()->data(view()->currentIndex(), Qt::UserRole).toString(); + if (data == SHOW_ALL_TOOLS || data == SHOW_CUSTOM_TOOLS) { + modifyMenuAccordingToData(data); + QComboBox::showPopup(); + } else { + QComboBox::hidePopup(); + } +} + +void ExternalToolSelectComboBox::modifyMenuAccordingToData(const QString& data) { + GroupedComboBoxDelegate* cbDelegate = qobject_cast<GroupedComboBoxDelegate*>(itemDelegate()); + SAFE_POINT(nullptr != cbDelegate, "GroupedComboBoxDelegate not found", ); + + QStandardItemModel* standardModel = qobject_cast<QStandardItemModel*>(model()); + SAFE_POINT(nullptr != standardModel, "Can't cast combobox model to a QStandardItemModel", ); + + if (data == SHOW_ALL_TOOLS) { + model()->removeRows(model()->rowCount() - 2, 2); + addSupportedToolsPopupMenu(); + insertSeparator(model()->rowCount() + 1); + cbDelegate->addUngroupedItem(standardModel, tr("Show customs tools only"), SHOW_CUSTOM_TOOLS); + setCurrentIndex(findData(firstClickableRowData)); + } else if (data == SHOW_CUSTOM_TOOLS) { + model()->removeRows(customTools.size() + 1, model()->rowCount() - customTools.size() - 1); + insertSeparator(customTools.size() + 1); + cbDelegate->addUngroupedItem(standardModel, tr("Show all tools"), SHOW_ALL_TOOLS); + setCurrentIndex(findData(firstClickableRowData)); + } +} + +void ExternalToolSelectComboBox::addSupportedToolsPopupMenu() { + GroupedComboBoxDelegate* cbDelegate = qobject_cast<GroupedComboBoxDelegate*>(itemDelegate()); + SAFE_POINT(nullptr != cbDelegate, "GroupedComboBoxDelegate not found", ); + + QStandardItemModel* standardModel = qobject_cast<QStandardItemModel*>(model()); + SAFE_POINT(nullptr != standardModel, "Can't cast combobox model to a QStandardItemModel", ); + + cbDelegate->addParentItem(standardModel, tr("Supported tools"), false); + QList<QString> keys = supportedTools.keys(); + std::sort(keys.begin(), keys.end(), [](const QString& a, const QString& b) {return a.compare(b, Qt::CaseInsensitive) < 0; }); + foreach(const QString & toolKitName, keys) { + QList<ExternalTool*> currentToolKitTools = supportedTools.value(toolKitName); + if (currentToolKitTools.size() == 1) { + ExternalTool* tool = currentToolKitTools.first(); + cbDelegate->addUngroupedItem(standardModel, tool->getName(), tool->getId()); + } else { + cbDelegate->addParentItem(standardModel, toolKitName, false, false); + foreach(ExternalTool * tool, currentToolKitTools) { + cbDelegate->addChildItem(standardModel, tool->getName(), tool->getId()); + } + } + } +} + +void ExternalToolSelectComboBox::initExternalTools() { + QList<ExternalTool*> tools = AppContext::getExternalToolRegistry()->getAllEntries(); + excludeNotSuitableTools(tools); + separateSupportedAndCustomTools(tools); +} + +void ExternalToolSelectComboBox::initPopupMenu() { + GroupedComboBoxDelegate* cbDelegate = new GroupedComboBoxDelegate(); + setItemDelegate(cbDelegate); + + QStandardItemModel* standardModel = qobject_cast<QStandardItemModel*>(model()); + SAFE_POINT(nullptr != standardModel, "Can't cast combobox model to a QStandardItemModel", ); + + if (!customTools.isEmpty()) { + cbDelegate->addParentItem(standardModel, tr("Custom tools"), false); + foreach(ExternalTool * tool, customTools) { + cbDelegate->addUngroupedItem(standardModel, tool->getName(), tool->getId()); + } + insertSeparator(customTools.size() + 1); + cbDelegate->addUngroupedItem(standardModel, tr("Show all tools"), SHOW_ALL_TOOLS); + } else { + addSupportedToolsPopupMenu(); + } + setCurrentIndex(findData(firstClickableRowData)); +} + +void ExternalToolSelectComboBox::excludeNotSuitableTools(QList<ExternalTool*>& tools) { + foreach(ExternalTool * tool, tools) { + CHECK_CONTINUE(tool->isModule() || tool->isRunner()); + tools.removeOne(tool); + } +} + +void ExternalToolSelectComboBox::separateSupportedAndCustomTools(const QList<ExternalTool*>& tools) { + customTools.clear(); + supportedTools.clear(); + QList<ExternalTool*> supportedToolsList; + foreach(ExternalTool * tool, tools) { + if (tool->isCustom()) { + customTools << tool; + } else { + supportedToolsList << tool; + } + } + makeSupportedToolsMapFromList(supportedToolsList); + sortCustomToolsList(); + sortSupportedToolsMap(); + initFirstClickableRow(); +} + +void ExternalToolSelectComboBox::makeSupportedToolsMapFromList(const QList<ExternalTool*>& tools) { + foreach(ExternalTool * tool, tools) { + const QString toolKitName = tool->getToolKitName(); + QList<ExternalTool*>& currentToolKitTools = supportedTools[toolKitName]; + currentToolKitTools << tool; + } +} + +void ExternalToolSelectComboBox::sortCustomToolsList() { + std::sort(customTools.begin(), customTools.end(), [](ExternalTool* a, ExternalTool* b) {return a->getName().compare(b->getName(), Qt::CaseInsensitive) < 0; }); +} + +void ExternalToolSelectComboBox::sortSupportedToolsMap() { + QMap<QString, QList<ExternalTool*> > resultMap; + foreach(const QString & toolKitName, supportedTools.keys()) { + QList<ExternalTool*> currentToolKitTools = supportedTools.value(toolKitName); + if (currentToolKitTools.size() == 1) { + resultMap.insert(currentToolKitTools.first()->getName(), currentToolKitTools); + } else { + std::sort(currentToolKitTools.begin(), currentToolKitTools.end(), [](ExternalTool* a, ExternalTool* b) {return a->getName().compare(b->getName(), Qt::CaseInsensitive) < 0; }); + resultMap.insert(toolKitName, currentToolKitTools); + } + } + supportedTools = resultMap; +} + +void ExternalToolSelectComboBox::initFirstClickableRow() { + if (!customTools.isEmpty()) { + firstClickableRowData = customTools.first()->getId(); + } else { + QStringList keys = supportedTools.keys(); + std::sort(keys.begin(), keys.end(), [](const QString& a, const QString& b) {return a.compare(b, Qt::CaseInsensitive) < 0; }); + QList<ExternalTool*> tools = supportedTools.value(keys.first()); + firstClickableRowData = tools.first()->getId(); + } +} + +void ExternalToolSelectComboBox::setDefaultMenuValue(const QString& defaultValue) { + int index = findData(defaultValue); + if (index > -1) { + setCurrentIndex(index); + } else { + modifyMenuAccordingToData(SHOW_ALL_TOOLS); + index = findData(defaultValue); + setCurrentIndex(index != -1 ? index : 1); + } +} + +} // namespace U2 diff --git a/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.h b/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.h new file mode 100644 index 0000000000000000000000000000000000000000..c646e0ec4ad640d9c3c4187f8d31a44ad73915d9 --- /dev/null +++ b/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.h @@ -0,0 +1,269 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_CREATE_CMDLINE_BASED_WORKER_WIZARD_H_ +#define _U2_CREATE_CMDLINE_BASED_WORKER_WIZARD_H_ + +#include <QStandardItem> +#include <QWizard> + +#include "ui_CreateCmdlineBasedWorkerWizardCommandPage.h" +#include "ui_CreateCmdlineBasedWorkerWizardElementAppearancePage.h" +#include "ui_CreateCmdlineBasedWorkerWizardGeneralSettingsPage.h" +#include "ui_CreateCmdlineBasedWorkerWizardInputDataPage.h" +#include "ui_CreateCmdlineBasedWorkerWizardOutputDataPage.h" +#include "ui_CreateCmdlineBasedWorkerWizardParametersPage.h" +#include "ui_CreateCmdlineBasedWorkerWizardSummaryPage.h" +#include "library/CfgExternalToolModel.h" + +namespace U2 { + +class ExternalProcessConfig; +class ExternalTool; +class ExternalToolSelectComboBox; + +class CreateCmdlineBasedWorkerWizard : public QWizard { + Q_OBJECT +public: + explicit CreateCmdlineBasedWorkerWizard(SchemaConfig *schemaConfig, QWidget* parent = nullptr); + explicit CreateCmdlineBasedWorkerWizard(SchemaConfig* schemaConfig, ExternalProcessConfig* initialConfig, QWidget* parent = nullptr); + ~CreateCmdlineBasedWorkerWizard() override; + + ExternalProcessConfig* takeConfig(); + + static void saveConfig(ExternalProcessConfig* config); + static bool isRequiredToRemoveElementFromScene(ExternalProcessConfig* actualConfig, ExternalProcessConfig* newConfig); + + static const QString PAGE_TITLE_STYLE_SHEET; + + static const QString ATTRIBUTES_DATA_FIELD; + static const QString ATTRIBUTES_IDS_FIELD; + static const QString ATTRIBUTES_NAMES_FIELD; + static const QString COMMAND_TEMPLATE_DESCRIPTION_FIELD; + static const QString COMMAND_TEMPLATE_FIELD; + static const QString CUSTOM_TOOL_PATH_FIELD; + static const QString INPUTS_DATA_FIELD; + static const QString INPUTS_IDS_FIELD; + static const QString INPUTS_NAMES_FIELD; + static const QString INTEGRATED_TOOL_ID_FIELD; + static const QString USE_INTEGRATED_TOOL_FIELD; + static const QString OUTPUTS_DATA_FIELD; + static const QString OUTPUTS_IDS_FIELD; + static const QString OUTPUTS_NAMES_FIELD; + static const QString WORKER_DESCRIPTION_FIELD; + static const QString WORKER_ID_FIELD; + static const QString WORKER_NAME_FIELD; + +private slots: + void accept() override; + +private: + void init(); + ExternalProcessConfig* createActualConfig() const; + + ExternalProcessConfig* initialConfig; + ExternalProcessConfig* config; + SchemaConfig* schemaConfig; +}; + +class CreateCmdlineBasedWorkerWizardGeneralSettingsPage : public QWizardPage, private Ui_CreateCmdlineBasedWorkerWizardGeneralSettingsPage { + Q_OBJECT +public: + CreateCmdlineBasedWorkerWizardGeneralSettingsPage(ExternalProcessConfig* initialConfig); + + void initializePage() override; + bool isComplete() const override; + bool validatePage() override; + +signals: + void si_integratedToolChanged(); + +private slots: + void sl_browse(); + void sl_integratedToolChanged(); + +private: + static void makeUniqueWorkerName(QString& name); + + ExternalProcessConfig* initialConfig; + ExternalToolSelectComboBox *cbIntegratedTools; + + static char const* const INTEGRATED_TOOL_ID_PROPERTY; + static char const* const WORKER_ID_PROPERTY; + static const QString LOD_DOMAIN; +}; + +class CreateCmdlineBasedWorkerWizardInputDataPage : public QWizardPage, private Ui_CreateCmdlineBasedWorkerWizardInputDataPage { + Q_OBJECT +public: + CreateCmdlineBasedWorkerWizardInputDataPage(ExternalProcessConfig* initialConfig); + + void initializePage() override; + bool isComplete() const override; + +signals: + void si_inputsChanged(); + +private slots: + void sl_addInput(); + void sl_deleteInput(); + void sl_updateInputsProperties(); + +private: + ExternalProcessConfig* initialConfig; + CfgExternalToolModel* inputsModel; + + static char const* const INPUTS_DATA_PROPERTY; + static char const* const INPUTS_IDS_PROPERTY; + static char const* const INPUTS_NAMES_PROPERTY; +}; + +class CreateCmdlineBasedWorkerWizardParametersPage : public QWizardPage, private Ui_CreateCmdlineBasedWorkerWizardParametersPage { + Q_OBJECT +public: + CreateCmdlineBasedWorkerWizardParametersPage(ExternalProcessConfig* initialConfig, SchemaConfig* schemaConfig); + + void initializePage() override; + bool isComplete() const override; + +signals: + void si_attributesChanged(); + +private slots: + void sl_addAttribute(); + void sl_deleteAttribute(); + void sl_updateAttributes(); + +private: + static void initAttributesModel(QAbstractItemModel* model, const QList<AttributeConfig>& attributeConfigs); + + ExternalProcessConfig* initialConfig; + + CfgExternalToolModelAttributes* model; + + static char const* const ATTRIBUTES_DATA_PROPERTY; + static char const* const ATTRIBUTES_IDS_PROPERTY; + static char const* const ATTRIBUTES_NAMES_PROPERTY; +}; + +class CreateCmdlineBasedWorkerWizardOutputDataPage : public QWizardPage, private Ui_CreateCmdlineBasedWorkerWizardOutputDataPage { + Q_OBJECT +public: + CreateCmdlineBasedWorkerWizardOutputDataPage(ExternalProcessConfig* initialConfig); + + void initializePage() override; + bool isComplete() const override; + +signals: + void si_outputsChanged(); + +private slots: + void sl_addOutput(); + void sl_deleteOutput(); + void sl_updateOutputsProperties(); + +private: + ExternalProcessConfig* initialConfig; + CfgExternalToolModel* outputsModel; + + static char const* const OUTPUTS_DATA_PROPERTY; + static char const* const OUTPUTS_IDS_PROPERTY; + static char const* const OUTPUTS_NAMES_PROPERTY; +}; + +class CommandValidator : public QObject { + Q_OBJECT +public: + CommandValidator(QTextEdit* textEdit); + +private slots: + void sl_textChanged(); + +private: + QTextEdit* textEdit; +}; + +class CreateCmdlineBasedWorkerWizardCommandPage : public QWizardPage, private Ui_CreateCmdlineBasedWorkerWizardCommandPage { + Q_OBJECT +public: + CreateCmdlineBasedWorkerWizardCommandPage(ExternalProcessConfig* initialConfig); + + void initializePage() override; + bool isComplete() const override; + bool validatePage() override; + +private: + ExternalProcessConfig* initialConfig; +}; + +class CreateCmdlineBasedWorkerWizardElementAppearancePage : public QWizardPage, private Ui_CreateCmdlineBasedWorkerWizardElementAppearancePage { + Q_OBJECT +public: + CreateCmdlineBasedWorkerWizardElementAppearancePage(ExternalProcessConfig* initialConfig); + + void initializePage() override; + +private: + ExternalProcessConfig* initialConfig; +}; + +class CreateCmdlineBasedWorkerWizardSummaryPage : public QWizardPage, private Ui_CreateCmdlineBasedWorkerWizardSummaryPage { + Q_OBJECT +public: + CreateCmdlineBasedWorkerWizardSummaryPage(); + +private: + void showEvent(QShowEvent* event) override; +}; + +class ExternalToolSelectComboBox : public QComboBox { +public: + ExternalToolSelectComboBox(QWidget* parent = nullptr); + + virtual void hidePopup() override; + + void modifyMenuAccordingToData(const QString& data); + void setDefaultMenuValue(const QString& defaultValue); +private: + void addSupportedToolsPopupMenu(); + void initExternalTools(); + void initPopupMenu(); + void separateSupportedAndCustomTools(const QList<ExternalTool*>& tools); + void makeSupportedToolsMapFromList(const QList<ExternalTool*>& tools); + void sortCustomToolsList(); + void sortSupportedToolsMap(); + void initFirstClickableRow(); + + // exclude module and runner tools + static void excludeNotSuitableTools(QList<ExternalTool*>& tools); + + QMap<QString, QList<ExternalTool*> > supportedTools; + QList<ExternalTool*> customTools; + QString firstClickableRowData; + + static const QString SHOW_ALL_TOOLS; + static const QString SHOW_CUSTOM_TOOLS; +}; + +} +// namespace U2 + +#endif // _U2_CREATE_CMDLINE_BASED_WORKER_WIZARD_H_ diff --git a/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardCommandPage.ui b/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardCommandPage.ui new file mode 100644 index 0000000000000000000000000000000000000000..cf851895568c7ceaee785b18bfd0e3d54c4775cb --- /dev/null +++ b/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardCommandPage.ui @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>CreateCmdlineBasedWorkerWizardCommandPage</class> + <widget class="QWizardPage" name="CreateCmdlineBasedWorkerWizardCommandPage"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>545</width> + <height>261</height> + </rect> + </property> + <property name="windowTitle"> + <string>WizardPage</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="leftMargin"> + <number>10</number> + </property> + <property name="topMargin"> + <number>4</number> + </property> + <property name="rightMargin"> + <number>8</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="lblTitle"> + <property name="text"> + <string>Command</string> + </property> + </widget> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="spacing"> + <number>16</number> + </property> + <item> + <widget class="QLabel" name="lblDescription"> + <property name="text"> + <string>Specify the execution string in the format expected by the command-line tool. Use argument names added for ports and parameters on the previous wizard pages.</string> + </property> + <property name="alignment"> + <set>Qt::AlignJustify|Qt::AlignVCenter</set> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QTextEdit" name="teCommand"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>75</height> + </size> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardElementAppearancePage.ui b/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardElementAppearancePage.ui new file mode 100644 index 0000000000000000000000000000000000000000..0edc87164614570703db4dcb2404c9ec53a76ca0 --- /dev/null +++ b/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardElementAppearancePage.ui @@ -0,0 +1,180 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>CreateCmdlineBasedWorkerWizardElementAppearancePage</class> + <widget class="QWizardPage" name="CreateCmdlineBasedWorkerWizardElementAppearancePage"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>445</width> + <height>310</height> + </rect> + </property> + <property name="windowTitle"> + <string>WizardPage</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <property name="leftMargin"> + <number>10</number> + </property> + <property name="topMargin"> + <number>4</number> + </property> + <property name="rightMargin"> + <number>8</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="lblTitle"> + <property name="text"> + <string>Element appearance</string> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="lblPageDescription"> + <property name="text"> + <string>Set up appearance of the element in the Workflow Designer GUI. Note that it is possible to specify an argument name in the "Element description on the scene" field, so that this value is replaced by an exact value provided in the "Property Editor".</string> + </property> + <property name="alignment"> + <set>Qt::AlignJustify|Qt::AlignVCenter</set> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QScrollArea" name="scrollArea"> + <property name="frameShape"> + <enum>QFrame::NoFrame</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Sunken</enum> + </property> + <property name="lineWidth"> + <number>0</number> + </property> + <property name="widgetResizable"> + <bool>true</bool> + </property> + <widget class="QWidget" name="scrollAreaWidgetContents_2"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>427</width> + <height>242</height> + </rect> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QWidget" name="prompterContainer" native="true"> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="lblPrompter"> + <property name="text"> + <string>Element description on the scene</string> + </property> + </widget> + </item> + <item> + <widget class="QTextEdit" name="tePrompter"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>27</height> + </size> + </property> + <property name="html"> + <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'monospace';"><br /></p></body></html></string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QWidget" name="descriptionContainer" native="true"> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="lblDescription"> + <property name="text"> + <string>Detailed element description</string> + </property> + </widget> + </item> + <item> + <widget class="QTextEdit" name="teDescription"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>27</height> + </size> + </property> + <property name="html"> + <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'monospace';"><br /></p></body></html></string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardGeneralSettingsPage.ui b/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardGeneralSettingsPage.ui new file mode 100644 index 0000000000000000000000000000000000000000..655f0e98b0f121f507d3f70813b8ef64135f58fc --- /dev/null +++ b/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardGeneralSettingsPage.ui @@ -0,0 +1,206 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>CreateCmdlineBasedWorkerWizardGeneralSettingsPage</class> + <widget class="QWizardPage" name="CreateCmdlineBasedWorkerWizardGeneralSettingsPage"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>592</width> + <height>310</height> + </rect> + </property> + <property name="windowTitle"> + <string>WizardPage</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="leftMargin"> + <number>8</number> + </property> + <property name="topMargin"> + <number>4</number> + </property> + <property name="rightMargin"> + <number>10</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="lblTitle"> + <property name="text"> + <string>General settings</string> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="lblDescription"> + <property name="text"> + <string>To integrate a custom command-line tool into a workflow, create a workflow element that will run this tool. + +Set up the element name. Select either a local executable file, an external tool provided with UGENE, or a custom external tool (see the "External Tools" page in the "Application Settings" dialog). Follow the wizard. +</string> + </property> + <property name="alignment"> + <set>Qt::AlignJustify|Qt::AlignVCenter</set> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="nameLayout"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>12</number> + </property> + <property name="bottomMargin"> + <number>14</number> + </property> + <item> + <widget class="QLabel" name="lblName"> + <property name="text"> + <string>Element name</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>5</width> + <height>1</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLineEdit" name="leName"/> + </item> + </layout> + </item> + <item> + <widget class="QGroupBox" name="gbTool"> + <property name="title"> + <string>External command-line tool</string> + </property> + <layout class="QGridLayout" name="gridLayout"> + <item row="1" column="1"> + <widget class="QWidget" name="container" native="true"> + <layout class="QVBoxLayout" name="containerLayout"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + </layout> + </widget> + </item> + <item row="0" column="1"> + <widget class="QWidget" name="customToolPathContainer" native="true"> + <layout class="QHBoxLayout" name="pathLayout"> + <property name="spacing"> + <number>5</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLineEdit" name="leToolPath"/> + </item> + <item> + <widget class="QToolButton" name="tbBrowse"> + <property name="text"> + <string>...</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item row="1" column="0"> + <widget class="QRadioButton" name="rbIntegratedTool"> + <property name="text"> + <string>Integrated external tool</string> + </property> + </widget> + </item> + <item row="0" column="0"> + <widget class="QRadioButton" name="rbCustomTool"> + <property name="text"> + <string>Executable path</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <spacer name="verticalSpacer_2"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>rbCustomTool</sender> + <signal>toggled(bool)</signal> + <receiver>customToolPathContainer</receiver> + <slot>setEnabled(bool)</slot> + <hints> + <hint type="sourcelabel"> + <x>93</x> + <y>101</y> + </hint> + <hint type="destinationlabel"> + <x>264</x> + <y>100</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardInputDataPage.ui b/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardInputDataPage.ui new file mode 100644 index 0000000000000000000000000000000000000000..154c260a2372cd48f8c2c6c621e4c3fc499b3dfd --- /dev/null +++ b/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardInputDataPage.ui @@ -0,0 +1,166 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>CreateCmdlineBasedWorkerWizardInputDataPage</class> + <widget class="QWizardPage" name="CreateCmdlineBasedWorkerWizardInputDataPage"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>720</width> + <height>301</height> + </rect> + </property> + <property name="windowTitle"> + <string>WizardPage</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <property name="leftMargin"> + <number>10</number> + </property> + <property name="topMargin"> + <number>4</number> + </property> + <property name="rightMargin"> + <number>8</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="lblTitle"> + <property name="text"> + <string>Input data</string> + </property> + </widget> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="lblDescription"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>To input data from other workflow element(s) to this element add one or several port(s) of the required type(s). + +The incoming data will be either saved into a file and the file URL will be specified as an argument in the command to run the tool or an input string can be used directly in the command in case of the "String" type, "String data value" argument value. +</string> + </property> + <property name="alignment"> + <set>Qt::AlignJustify|Qt::AlignVCenter</set> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QTableView" name="tvInput"> + <property name="minimumSize"> + <size> + <width>700</width> + <height>0</height> + </size> + </property> + <property name="selectionMode"> + <enum>QAbstractItemView::SingleSelection</enum> + </property> + <attribute name="verticalHeaderVisible"> + <bool>false</bool> + </attribute> + <attribute name="verticalHeaderHighlightSections"> + <bool>false</bool> + </attribute> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QLabel" name="duplicateInputsWarningLabel"> + <property name="palette"> + <palette> + <active> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>164</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + </active> + <inactive> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>164</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + </inactive> + <disabled> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>190</red> + <green>190</green> + <blue>190</blue> + </color> + </brush> + </colorrole> + </disabled> + </palette> + </property> + <property name="text"> + <string><html><head/><body><p><span style=" font-weight:600;">Error: please use unique argument names for all ports and parameters!</span></p></body></html></string> + </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="inputsButtonsLayout"> + <property name="sizeConstraint"> + <enum>QLayout::SetMinAndMaxSize</enum> + </property> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>188</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="pbAddInput"> + <property name="text"> + <string>Add input</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="pbDeleteInput"> + <property name="text"> + <string>Delete</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardOutputDataPage.ui b/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardOutputDataPage.ui new file mode 100644 index 0000000000000000000000000000000000000000..271a070c6e9d408887656c8e31524dd8087442da --- /dev/null +++ b/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardOutputDataPage.ui @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>CreateCmdlineBasedWorkerWizardOutputDataPage</class> + <widget class="QWizardPage" name="CreateCmdlineBasedWorkerWizardOutputDataPage"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>1217</width> + <height>300</height> + </rect> + </property> + <property name="windowTitle"> + <string>WizardPage</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="sizeConstraint"> + <enum>QLayout::SetMinimumSize</enum> + </property> + <property name="leftMargin"> + <number>10</number> + </property> + <property name="topMargin"> + <number>4</number> + </property> + <property name="rightMargin"> + <number>8</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="lblTitle"> + <property name="text"> + <string>Output data</string> + </property> + </widget> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="spacing"> + <number>10</number> + </property> + <item> + <widget class="QLabel" name="lblDescription"> + <property name="text"> + <string>To output data from this element to other workflow element(s) add one or several port(s) of the required type(s). + +It is assumed that the external tool creates some file(s). This element reads the file(s) according to the specified type and format, and pass the data to the next element in the workflow. Alternatively, it is possible to pass the output file or folder URL, see the "String" type, "Output URL" argument value. +</string> + </property> + <property name="alignment"> + <set>Qt::AlignJustify|Qt::AlignVCenter</set> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QTableView" name="tvOutput"> + <property name="minimumSize"> + <size> + <width>700</width> + <height>0</height> + </size> + </property> + <property name="selectionMode"> + <enum>QAbstractItemView::SingleSelection</enum> + </property> + <attribute name="verticalHeaderVisible"> + <bool>false</bool> + </attribute> + <attribute name="verticalHeaderHighlightSections"> + <bool>false</bool> + </attribute> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QLabel" name="duplicateOutputsWarningLabel"> + <property name="palette"> + <palette> + <active> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>164</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + </active> + <inactive> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>164</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + </inactive> + <disabled> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>190</red> + <green>190</green> + <blue>190</blue> + </color> + </brush> + </colorrole> + </disabled> + </palette> + </property> + <property name="text"> + <string><html><head/><body><p><span style=" font-weight:600;">Error: please use unique argument names for all ports and parameters!</span></p></body></html></string> + </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="outputsButtonsLayout"> + <property name="sizeConstraint"> + <enum>QLayout::SetMinAndMaxSize</enum> + </property> + <item> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>188</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="pbAddOutput"> + <property name="text"> + <string>Add output</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="pbDeleteOutput"> + <property name="text"> + <string>Delete</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardParametersPage.ui b/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardParametersPage.ui new file mode 100644 index 0000000000000000000000000000000000000000..997d92a9016b3c38779f12cc4c458912b9b0949d --- /dev/null +++ b/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardParametersPage.ui @@ -0,0 +1,151 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>CreateCmdlineBasedWorkerWizardParametersPage</class> + <widget class="QWizardPage" name="CreateCmdlineBasedWorkerWizardParametersPage"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>573</width> + <height>284</height> + </rect> + </property> + <property name="windowTitle"> + <string>WizardPage</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="leftMargin"> + <number>10</number> + </property> + <property name="topMargin"> + <number>4</number> + </property> + <property name="rightMargin"> + <number>8</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="lblTitle"> + <property name="text"> + <string>Parameters</string> + </property> + </widget> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QLabel" name="lblDescription"> + <property name="text"> + <string>Make the element configurable by adding one or several parameter(s). + +The parameter(s) value(s) can be later set up in the "Property Editor" (located at the right side of the Workflow Designer window) when an element is selected on the scene. During a workflow execution the specified parameters are applied to each input dataset. +</string> + </property> + <property name="alignment"> + <set>Qt::AlignJustify|Qt::AlignVCenter</set> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QTableView" name="tvAttributes"> + <property name="selectionMode"> + <enum>QAbstractItemView::SingleSelection</enum> + </property> + <attribute name="verticalHeaderVisible"> + <bool>false</bool> + </attribute> + <attribute name="verticalHeaderHighlightSections"> + <bool>false</bool> + </attribute> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QLabel" name="duplicateParametersWarningLabel"> + <property name="palette"> + <palette> + <active> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>164</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + </active> + <inactive> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>164</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + </inactive> + <disabled> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>190</red> + <green>190</green> + <blue>190</blue> + </color> + </brush> + </colorrole> + </disabled> + </palette> + </property> + <property name="text"> + <string><html><head/><body><p><span style=" font-weight:600;">Error: please use unique argument names for all ports and parameters!</span></p></body></html></string> + </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="buttonsLayout"> + <property name="sizeConstraint"> + <enum>QLayout::SetMinAndMaxSize</enum> + </property> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>188</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="pbAdd"> + <property name="text"> + <string>Add parameter</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="pbDelete"> + <property name="text"> + <string>Delete</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardSummaryPage.ui b/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardSummaryPage.ui new file mode 100644 index 0000000000000000000000000000000000000000..ac22aa4711e37308335f6c5fea7334d7c995d200 --- /dev/null +++ b/src/plugins/workflow_designer/src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardSummaryPage.ui @@ -0,0 +1,272 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>CreateCmdlineBasedWorkerWizardSummaryPage</class> + <widget class="QWizardPage" name="CreateCmdlineBasedWorkerWizardSummaryPage"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>495</width> + <height>327</height> + </rect> + </property> + <property name="windowTitle"> + <string>WizardPage</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="leftMargin"> + <number>10</number> + </property> + <property name="topMargin"> + <number>4</number> + </property> + <property name="rightMargin"> + <number>8</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="lblTitle"> + <property name="text"> + <string>Summary</string> + </property> + </widget> + </item> + <item> + <widget class="QScrollArea" name="scrollArea"> + <property name="frameShape"> + <enum>QFrame::NoFrame</enum> + </property> + <property name="horizontalScrollBarPolicy"> + <enum>Qt::ScrollBarAsNeeded</enum> + </property> + <property name="widgetResizable"> + <bool>true</bool> + </property> + <widget class="QWidget" name="scrollAreaWidgetContents"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>477</width> + <height>300</height> + </rect> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <layout class="QVBoxLayout" name="nameLayout"> + <property name="spacing"> + <number>6</number> + </property> + <property name="bottomMargin"> + <number>16</number> + </property> + <item> + <widget class="QLabel" name="lblName"> + <property name="text"> + <string>Element name</string> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QTextEdit" name="lblNameValue"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>27</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>26</height> + </size> + </property> + <property name="baseSize"> + <size> + <width>0</width> + <height>26</height> + </size> + </property> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QVBoxLayout" name="prompterLayout"> + <property name="spacing"> + <number>6</number> + </property> + <property name="bottomMargin"> + <number>16</number> + </property> + <item> + <widget class="QLabel" name="lblPrompter"> + <property name="text"> + <string>Element description on the scene</string> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QTextEdit" name="lblPrompterValue"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>26</height> + </size> + </property> + <property name="sizeAdjustPolicy"> + <enum>QAbstractScrollArea::AdjustToContentsOnFirstShow</enum> + </property> + <property name="readOnly"> + <bool>true</bool> + </property> + <property name="acceptRichText"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QVBoxLayout" name="descriptionLayout"> + <property name="spacing"> + <number>6</number> + </property> + <property name="bottomMargin"> + <number>16</number> + </property> + <item> + <widget class="QLabel" name="lblDescription"> + <property name="text"> + <string>Detailed element description</string> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QTextEdit" name="lblDescriptionValue"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>42</height> + </size> + </property> + <property name="sizeAdjustPolicy"> + <enum>QAbstractScrollArea::AdjustToContentsOnFirstShow</enum> + </property> + <property name="readOnly"> + <bool>true</bool> + </property> + <property name="acceptRichText"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QVBoxLayout" name="commandLayout"> + <property name="spacing"> + <number>6</number> + </property> + <property name="bottomMargin"> + <number>4</number> + </property> + <item> + <widget class="QLabel" name="lblCommand"> + <property name="text"> + <string>Command</string> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QTextEdit" name="lblCommandValue"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>42</height> + </size> + </property> + <property name="sizeAdjustPolicy"> + <enum>QAbstractScrollArea::AdjustToContentsOnFirstShow</enum> + </property> + <property name="readOnly"> + <bool>true</bool> + </property> + <property name="acceptRichText"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/src/plugins/workflow_designer/src/tasks/ReadAssemblyTask.cpp b/src/plugins/workflow_designer/src/tasks/ReadAssemblyTask.cpp index 731a496eadfe98b81583c8c261684d83202f573e..9995739bc208b32dab75aa20c5369c9a7c01bcab 100644 --- a/src/plugins/workflow_designer/src/tasks/ReadAssemblyTask.cpp +++ b/src/plugins/workflow_designer/src/tasks/ReadAssemblyTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/tasks/ReadAssemblyTask.h b/src/plugins/workflow_designer/src/tasks/ReadAssemblyTask.h index 405a3091c7e2c77c42b4445ae5828171bbc81a61..204b257adeb6b8d58b9e229db623cfde346a637b 100644 --- a/src/plugins/workflow_designer/src/tasks/ReadAssemblyTask.h +++ b/src/plugins/workflow_designer/src/tasks/ReadAssemblyTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/tasks/RenameChromosomeInVariationTask.cpp b/src/plugins/workflow_designer/src/tasks/RenameChromosomeInVariationTask.cpp index bbd8c198028b0781b356f9d7e935e9ca5d176dfb..cf774a92fa1230feb8939a7a06c66df452706140 100644 --- a/src/plugins/workflow_designer/src/tasks/RenameChromosomeInVariationTask.cpp +++ b/src/plugins/workflow_designer/src/tasks/RenameChromosomeInVariationTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/tasks/RenameChromosomeInVariationTask.h b/src/plugins/workflow_designer/src/tasks/RenameChromosomeInVariationTask.h index bf3048babbd3a3f376f18f7ed149683526d81009..40fe99f5267949a4b52966e29789eef3b3f0e9ad 100644 --- a/src/plugins/workflow_designer/src/tasks/RenameChromosomeInVariationTask.h +++ b/src/plugins/workflow_designer/src/tasks/RenameChromosomeInVariationTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/tasks/SequenceQualityTrimTask.cpp b/src/plugins/workflow_designer/src/tasks/SequenceQualityTrimTask.cpp index dc12896493cdde97117027024c9d8963ceeac7b0..825fe9c836b7803bc765416792a52f9362e9eccd 100644 --- a/src/plugins/workflow_designer/src/tasks/SequenceQualityTrimTask.cpp +++ b/src/plugins/workflow_designer/src/tasks/SequenceQualityTrimTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/tasks/SequenceQualityTrimTask.h b/src/plugins/workflow_designer/src/tasks/SequenceQualityTrimTask.h index 37bf2ffddcb50d06d00ba5bf1060f9e6db962287..aef90f3cc2d2e235e8173ea48374636246431ddc 100644 --- a/src/plugins/workflow_designer/src/tasks/SequenceQualityTrimTask.h +++ b/src/plugins/workflow_designer/src/tasks/SequenceQualityTrimTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/util/CustomWorkerUtils.cpp b/src/plugins/workflow_designer/src/util/CustomWorkerUtils.cpp new file mode 100644 index 0000000000000000000000000000000000000000..561a314e18eafce95a9d4caffdffd8b02d74340a --- /dev/null +++ b/src/plugins/workflow_designer/src/util/CustomWorkerUtils.cpp @@ -0,0 +1,115 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <QRegularExpression> + +#include <U2Core/AppContext.h> +#include <U2Core/Log.h> +#include <U2Core/U2SafePoints.h> + +#include "CustomWorkerUtils.h" + +namespace U2 { +namespace Workflow { + +const QString CustomWorkerUtils::TOOL_PATH_VAR_NAME = "TOOL_PATH"; + +QString CustomWorkerUtils::getVarName(const ExternalTool *tool) { + SAFE_POINT(!tool->isModule(), + "Bad external tool type", + "__UGENE_BAD_EXTERNAL_TOOL_TYPE__"); + QString id = tool->getId(); + SAFE_POINT((id.indexOf(QRegularExpression("[^A-Za-z0-9_-]")) < 0), + "Bad external tool id", + "__UGENE_BAD_EXTERNAL_TOOL_ID__"); + + QString virtId = (tool->isCustom() ? "UCUST_" + id : id).toUpper(); + + return virtId; +} + +bool CustomWorkerUtils::commandContainsSpecialTool(const QString &cmd, const QString toolId) { + ExternalTool *tool = AppContext::getExternalToolRegistry()->getById(toolId); + if (tool) { + return commandContainsSpecialTool(cmd, tool); + } + return false; +} + +bool CustomWorkerUtils::commandContainsSpecialTool(const QString &cmd, const ExternalTool *tool) { + QString varName = getVarName(tool); + return commandContainsVarName(cmd, varName); +} + +bool CustomWorkerUtils::commandContainsVarName(const QString& cmd, const QString& varName) { + QRegularExpression regex1 = QRegularExpression(CMDTOOL_SPECIAL_REGEX + ("%" + varName + "%")); + return cmd.indexOf(regex1) >= 0; +} + +QStringList CustomWorkerUtils::getToolIdsFromCommand(const QString& cmd) { + QRegularExpression regex1 = QRegularExpression(CMDTOOL_SPECIAL_REGEX + QString("%([A-Za-z0-9_-]+)%")); + QRegularExpressionMatchIterator match = regex1.globalMatch(cmd); + QStringList result; + while (match.hasNext()) { + QString id = match.next().captured().remove(QRegularExpression("([^A-Za-z0-9_-]*)")); + CHECK_CONTINUE(id.startsWith("USUPP_") || id.startsWith("UCUST_")); + + if (id.startsWith("UCUST_")) { + id = id.right(id.size() - 6); + } + result << id; + } + return result; +} + +bool CustomWorkerUtils::commandReplaceSpecialByUgenePath(QString &cmd, const QString varName, const QString path) { + SAFE_POINT(!(varName.isNull() || varName.isEmpty()), + "Bad varName", + false); + bool result = false; + QRegularExpression regex1 = QRegularExpression(CMDTOOL_SPECIAL_REGEX + ("%" + varName + "%")); + while (cmd.indexOf(regex1) >= 0) { + cmd.replace(regex1, "\\1\"" + path + "\""); + result |= true; + } + + return result; +} + +bool CustomWorkerUtils::commandReplaceSpecialByUgenePath(QString &cmd, const ExternalTool *tool) { + QString varName = getVarName(tool); + return commandReplaceSpecialByUgenePath(cmd, varName, tool->getPath()); +} + +void CustomWorkerUtils::commandReplaceAllSpecialByUgenePath(QString &cmd, ExternalProcessConfig *cfg) { + commandReplaceSpecialByUgenePath(cmd, TOOL_PATH_VAR_NAME, cfg->customToolPath); + + QList<ExternalTool *> all = AppContext::getExternalToolRegistry()->getAllEntries(); + for (auto tool : all) { + if (!tool->isModule()) { + commandReplaceSpecialByUgenePath(cmd, tool); + } + } +} + + +} // Workflow +} // U2 diff --git a/src/plugins/workflow_designer/src/util/CustomWorkerUtils.h b/src/plugins/workflow_designer/src/util/CustomWorkerUtils.h new file mode 100644 index 0000000000000000000000000000000000000000..f26ba2fa334a6f498ffe504097b1e433f4d5008e --- /dev/null +++ b/src/plugins/workflow_designer/src/util/CustomWorkerUtils.h @@ -0,0 +1,56 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_CUSTOM_WORKER_UTILS_H_ +#define _U2_CUSTOM_WORKER_UTILS_H_ + +#include <QObject> + +#include <U2Lang/ExternalToolCfg.h> +#include "U2Core/ExternalToolRegistry.h" + +namespace U2 { +namespace Workflow { + +#define CMDTOOL_SPECIAL_REGEX "((?<!(\\\\))(\\\\\\\\)*|^)" + +class CustomWorkerUtils { + +public: + static const QString TOOL_PATH_VAR_NAME; + + static QString getVarName(const ExternalTool *tool); + + static bool commandContainsSpecialTool(const QString &cmd, const ExternalTool *tool); + static bool commandContainsSpecialTool(const QString &cmd, const QString toolId); + static bool commandContainsVarName(const QString& cmd, const QString& varName); + static QStringList getToolIdsFromCommand(const QString& cmd); + + static bool commandReplaceSpecialByUgenePath(QString &cmd, const ExternalTool *tool); + static bool commandReplaceSpecialByUgenePath(QString &cmd, const QString varName, const QString path); + static void commandReplaceAllSpecialByUgenePath(QString &cmd, ExternalProcessConfig *cfg); + +}; + +} // Workflow +} // U2 + +#endif // _U2_CUSTOM_WORKER_UTILS_H_ diff --git a/src/plugins/workflow_designer/src/util/DatasetValidator.cpp b/src/plugins/workflow_designer/src/util/DatasetValidator.cpp index 68307485ae8e031d7dd612cccea70c51d3cd4f9c..a655f92a581e1f1409a205a7f2ca85c6f2ee06fb 100644 --- a/src/plugins/workflow_designer/src/util/DatasetValidator.cpp +++ b/src/plugins/workflow_designer/src/util/DatasetValidator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/util/DatasetValidator.h b/src/plugins/workflow_designer/src/util/DatasetValidator.h index c388654422d8aad7398eca27920c8b5783a1c6e6..b62ec993106085e40615b8b788fa1b9c339de2bb 100644 --- a/src/plugins/workflow_designer/src/util/DatasetValidator.h +++ b/src/plugins/workflow_designer/src/util/DatasetValidator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/util/DatasetsCountValidator.cpp b/src/plugins/workflow_designer/src/util/DatasetsCountValidator.cpp index c415a3688a3d99e84fd90c5abe650c5f611c0bfb..5e3cbf5bd95af47e47c92d58b78d6e1f3d3384cd 100644 --- a/src/plugins/workflow_designer/src/util/DatasetsCountValidator.cpp +++ b/src/plugins/workflow_designer/src/util/DatasetsCountValidator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/util/DatasetsCountValidator.h b/src/plugins/workflow_designer/src/util/DatasetsCountValidator.h index ca88af36f22f73c4300b03cd12a1b816bbf926b6..4ae8b8388e662d0d888e22c92a85ec5e8dff9d51 100644 --- a/src/plugins/workflow_designer/src/util/DatasetsCountValidator.h +++ b/src/plugins/workflow_designer/src/util/DatasetsCountValidator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/util/GrouperActionUtils.cpp b/src/plugins/workflow_designer/src/util/GrouperActionUtils.cpp index 182da7885a0529d2b7219a9d179f280656f95da3..c343f05a394df1e7dd61ff0eee675a8f1d61f014 100644 --- a/src/plugins/workflow_designer/src/util/GrouperActionUtils.cpp +++ b/src/plugins/workflow_designer/src/util/GrouperActionUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/util/GrouperActionUtils.h b/src/plugins/workflow_designer/src/util/GrouperActionUtils.h index df96b1d53850dd5ba1656a33a26f7a7d65bfebe4..4235ada275efba670e939577bf909a0641b337d2 100644 --- a/src/plugins/workflow_designer/src/util/GrouperActionUtils.h +++ b/src/plugins/workflow_designer/src/util/GrouperActionUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/util/RequiredSlotsValidator.cpp b/src/plugins/workflow_designer/src/util/RequiredSlotsValidator.cpp index 044272e471e13281ff762fb1f39e2b33caacd01c..0d3e512862dff9c55d0bece5d5c93dba5c0b18c3 100644 --- a/src/plugins/workflow_designer/src/util/RequiredSlotsValidator.cpp +++ b/src/plugins/workflow_designer/src/util/RequiredSlotsValidator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/util/RequiredSlotsValidator.h b/src/plugins/workflow_designer/src/util/RequiredSlotsValidator.h index a536f0d1a33b076bc299e5a5e962ceb73e791b9d..ceb4177434ade098876e9cc4e2d0919b12d7b8e6 100644 --- a/src/plugins/workflow_designer/src/util/RequiredSlotsValidator.h +++ b/src/plugins/workflow_designer/src/util/RequiredSlotsValidator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/util/SaveSchemaImageUtils.cpp b/src/plugins/workflow_designer/src/util/SaveSchemaImageUtils.cpp index 9ce3760eee56d0ef76dc9354355aca819b5bba1a..e593ce07b87ed1c58424f79a2f0a5cb37ad67cb8 100644 --- a/src/plugins/workflow_designer/src/util/SaveSchemaImageUtils.cpp +++ b/src/plugins/workflow_designer/src/util/SaveSchemaImageUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/util/SaveSchemaImageUtils.h b/src/plugins/workflow_designer/src/util/SaveSchemaImageUtils.h index 14660531d88dbab5cc0a4cac31540ea8809694f1..89bf1460cb7fb130375515550ca027a261a4134d 100644 --- a/src/plugins/workflow_designer/src/util/SaveSchemaImageUtils.h +++ b/src/plugins/workflow_designer/src/util/SaveSchemaImageUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/util/WorkerNameValidator.cpp b/src/plugins/workflow_designer/src/util/WorkerNameValidator.cpp index 2c713f30d9fada79be77a9e26d19a715ab24b1ed..16067cbe209b4f66abdf927e8eee0275a542ae63 100644 --- a/src/plugins/workflow_designer/src/util/WorkerNameValidator.cpp +++ b/src/plugins/workflow_designer/src/util/WorkerNameValidator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,17 +19,19 @@ * MA 02110-1301, USA. */ +#include <U2Core/U2SafePoints.h> + #include "WorkerNameValidator.h" namespace U2 { -WorkerNameValidator::WorkerNameValidator(QObject *parent) +DeprecatedWorkerNameValidator::DeprecatedWorkerNameValidator(QObject *parent) : QValidator(parent) { } -QValidator::State WorkerNameValidator::validate(QString &input, int & /*pos*/) const { +QValidator::State DeprecatedWorkerNameValidator::validate(QString &input, int & /*pos*/) const { QRegExp rx("[^0-9\\s_\\-a-zA-Z]"); if (-1 != rx.indexIn(input)) { return Invalid; diff --git a/src/plugins/workflow_designer/src/util/WorkerNameValidator.h b/src/plugins/workflow_designer/src/util/WorkerNameValidator.h index b0b4a3cb2fd5f7028a99e9d8bf79dd461eefbfe4..4acaf1ba8afebdd9ff820be65d2fab73f31c5088 100644 --- a/src/plugins/workflow_designer/src/util/WorkerNameValidator.h +++ b/src/plugins/workflow_designer/src/util/WorkerNameValidator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,8 +19,8 @@ * MA 02110-1301, USA. */ -#ifndef _U2_WORKERNAMEVALIDATOR_H_ -#define _U2_WORKERNAMEVALIDATOR_H_ +#ifndef _U2_WORKER_NAME_VALIDATOR_H_ +#define _U2_WORKER_NAME_VALIDATOR_H_ #include <QValidator> @@ -29,13 +29,14 @@ namespace U2 { /** * The class for validating worker names: * only English names. + * The class is deprecated. Use QRegularExpressionValidator with regexps from WorkflowEntityValidator class. */ -class WorkerNameValidator : public QValidator { +class DeprecatedWorkerNameValidator : public QValidator { public: - WorkerNameValidator(QObject *parent = NULL); - State validate(QString &input, int &pos) const; + DeprecatedWorkerNameValidator(QObject *parent = nullptr); + State validate(QString &input, int &pos) const override; }; } // U2 -#endif // _U2_WORKERNAMEVALIDATOR_H_ +#endif // _U2_WORKER_NAME_VALIDATOR_H_ diff --git a/src/plugins/workflow_designer/src/util/WriteAnnotationsValidator.cpp b/src/plugins/workflow_designer/src/util/WriteAnnotationsValidator.cpp index 1f72b15e82d6bb618ff8d4d1fead3da472f38510..4869e7180f821e610dabed884c582b67fd762b44 100644 --- a/src/plugins/workflow_designer/src/util/WriteAnnotationsValidator.cpp +++ b/src/plugins/workflow_designer/src/util/WriteAnnotationsValidator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ namespace Workflow { bool WriteAnnotationsValidator::validate(const Actor *actor, NotificationsList ¬ificationList, const QMap<QString, QString> &options) const { Q_UNUSED(options); - + Port* port = actor->getPort(BasePorts::IN_ANNOTATIONS_PORT_ID()); if (port == NULL) { notificationList << WorkflowNotification(tr("Input port is NULL"), actor->getId(), WorkflowNotification::U2_ERROR); diff --git a/src/plugins/workflow_designer/src/util/WriteAnnotationsValidator.h b/src/plugins/workflow_designer/src/util/WriteAnnotationsValidator.h index 2ec9bfbef6978568dc80e53b3bb7f19c966b549d..ac1a9f858fae46cb421d04365e46869564d514d5 100644 --- a/src/plugins/workflow_designer/src/util/WriteAnnotationsValidator.h +++ b/src/plugins/workflow_designer/src/util/WriteAnnotationsValidator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/util/WriteSequenceValidator.cpp b/src/plugins/workflow_designer/src/util/WriteSequenceValidator.cpp index baa1787d6887c488ba60389a240334acb7718c60..5c6027047f7e27ecff810cbb1e90bdf45f455544 100644 --- a/src/plugins/workflow_designer/src/util/WriteSequenceValidator.cpp +++ b/src/plugins/workflow_designer/src/util/WriteSequenceValidator.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/util/WriteSequenceValidator.h b/src/plugins/workflow_designer/src/util/WriteSequenceValidator.h index f1eaffc9c99be47071159f99952e9a7e3b7fa44c..3fbac1dda72bd7ffa3b603f3228b0e1abbb787d2 100644 --- a/src/plugins/workflow_designer/src/util/WriteSequenceValidator.h +++ b/src/plugins/workflow_designer/src/util/WriteSequenceValidator.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/transl/russian.ts b/src/plugins/workflow_designer/transl/russian.ts index 38cb5ced1dc5b58e6487e326d7f2df143695634a..d3db35e340297bca650ddbbb95d085517589a590 100644 --- a/src/plugins/workflow_designer/transl/russian.ts +++ b/src/plugins/workflow_designer/transl/russian.ts @@ -15,148 +15,262 @@ </message> </context> <context> - <name>CreateExternalProcessWorkerDialog</name> + <name>CreateCmdlineBasedWorkerWizardCommandPage</name> <message> - <location filename="../src/library/ExternalProcessWorkerDialog.ui" line="14"/> - <source>Create Element with Command Line Tool</source> - <translation>Создать Ñлемент при помощи командной Ñтроки</translation> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardCommandPage.ui" line="14"/> + <source>WizardPage</source> + <translation>WizardPage</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorkerDialog.ui" line="49"/> - <source>Element description</source> - <translation>ОпиÑание Ñлемента</translation> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardCommandPage.ui" line="32"/> + <source>Command</source> + <translation>Команда</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorkerDialog.ui" line="65"/> - <source>Name</source> - <translation>ИмÑ</translation> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardCommandPage.ui" line="44"/> + <source>Specify the execution string in the format expected by the command-line tool. Use argument names added for ports and parameters on the previous wizard pages.</source> + <translation>Укажите Ñтроку Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ð² формате командной Ñтроки. ИÑпользуйте имена аргументов, которые были добавлены Ð´Ð»Ñ Ð¿Ð¾Ñ€Ñ‚Ð¾Ð² и параметров на предыдущих Ñтраницах визарда.</translation> </message> +</context> +<context> + <name>CreateCmdlineBasedWorkerWizardElementAppearancePage</name> <message> - <location filename="../src/library/ExternalProcessWorkerDialog.ui" line="77"/> - <source>Description</source> - <translation>ОпиÑание</translation> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardElementAppearancePage.ui" line="14"/> + <source>WizardPage</source> + <translation>WizardPage</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorkerDialog.ui" line="36"/> - <source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Name and description for new workflow element.</span></p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600;">Status:</span></p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600;">%1</span></p></body></html></source> - <translation><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Name and description for new workflow element.</span></p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600;">Status:</span></p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600;">%1</span></p></body></html></translation> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardElementAppearancePage.ui" line="22"/> + <source>Element appearance</source> + <translation>Внешний вид Ñлемента</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorkerDialog.ui" line="84"/> - <location filename="../src/library/ExternalProcessWorkerDialog.ui" line="349"/> - <source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></source> - <translation><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></translation> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardElementAppearancePage.ui" line="29"/> + <source>Set up appearance of the element in the Workflow Designer GUI. Note that it is possible to specify an argument name in the "Element description on the scene" field, so that this value is replaced by an exact value provided in the "Property Editor".</source> + <translation>ÐаÑтройте внешний вид Ñлемента в графичеÑком интерфейÑе Дизайнера вычиÑлительных Ñхем. Обратите внимание, что Ð¸Ð¼Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ð° можно указать в поле «ОпиÑание Ñлемента на Ñцене», чтобы Ñто значение было заменено точным значением, указанным в «Редакторе ÑвойÑтв».</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorkerDialog.ui" line="105"/> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardElementAppearancePage.ui" line="57"/> + <source>Element description on the scene</source> + <translation>ОпиÑание Ñлемента на Ñцене</translation> + </message> + <message> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardElementAppearancePage.ui" line="64"/> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardElementAppearancePage.ui" line="100"/> <source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Input and output data for external tool. Name is a command line parameter for input/output data in external tool. Set data type and format in which external tool reads/writes input/output data. You also can set description for workflow designer. Each input data will be represented as port in workflow designer. Each output data will be represented as slot of single slot.</span></p></body></html></source> +</style></head><body style=" font-family:'monospace'; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span></span></p></body></html></source> <translation><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Input and output data for external tool. Name is a command line parameter for input/output data in external tool. Set data type and format in which external tool reads/writes input/output data. You also can set description for workflow designer. Each input data will be represented as port in workflow designer. Each output data will be represented as slot of single slot.</span></p></body></html></translation> +</style></head><body style=" font-family:'monospace'; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span></span></p></body></html></translation> + </message> + <message> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardElementAppearancePage.ui" line="93"/> + <source>Detailed element description</source> + <translation>Подробное опиÑание Ñлемента</translation> + </message> +</context> +<context> + <name>CreateCmdlineBasedWorkerWizardGeneralSettingsPage</name> + <message> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardGeneralSettingsPage.ui" line="14"/> + <source>WizardPage</source> + <translation>WizardPage</translation> + </message> + <message> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardGeneralSettingsPage.ui" line="32"/> + <source>General settings</source> + <translation>ОÑновные наÑтройки</translation> + </message> + <message> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardGeneralSettingsPage.ui" line="39"/> + <source>To integrate a custom command-line tool into a workflow, create a workflow element that will run this tool. + +Set up the element name. Select either a local executable file, an external tool provided with UGENE, or a custom external tool (see the "External Tools" page in the "Application Settings" dialog). Follow the wizard. +</source> + <translation>Чтобы интегрировать пользовательÑкий инÑтрумент командной Ñтроки в Ñхему, Ñоздайте Ñлемент, который будет запуÑкать Ñтот инÑтрумент. + +Задайте Ð¸Ð¼Ñ Ñлемента. Выберите локальный иÑполнÑемый файл, внешний инÑтрумент, поÑтавлÑемый Ñ UGENE, или пользовательÑкий внешний инÑтрумент (Ñм. Страницу «Внешние инÑтрументы» в окне «ÐаÑтройки приложениÑ»). Следуйте за пошаговой наÑтройкой. +</translation> + </message> + <message> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardGeneralSettingsPage.ui" line="66"/> + <source>Element name</source> + <translation>Ð˜Ð¼Ñ Ñлемента</translation> + </message> + <message> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardGeneralSettingsPage.ui" line="94"/> + <source>External command-line tool</source> + <translation>Внешний инÑтрумент командной Ñтроки</translation> + </message> + <message> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardGeneralSettingsPage.ui" line="100"/> + <source>Integrated external tool</source> + <translation>Интегрированный внешний инÑтрумент</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorkerDialog.ui" line="116"/> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardGeneralSettingsPage.ui" line="107"/> + <source>Executable path</source> + <translation>Путь к иÑполнÑемому файлу</translation> + </message> + <message> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardGeneralSettingsPage.ui" line="145"/> + <source>...</source> + <translation>...</translation> + </message> +</context> +<context> + <name>CreateCmdlineBasedWorkerWizardInputDataPage</name> + <message> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardInputDataPage.ui" line="14"/> + <source>WizardPage</source> + <translation>WizardPage</translation> + </message> + <message> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardInputDataPage.ui" line="32"/> <source>Input data</source> <translation>Входные данные</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorkerDialog.ui" line="151"/> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardInputDataPage.ui" line="50"/> + <source>To input data from other workflow element(s) to this element add one or several port(s) of the required type(s). + +The incoming data will be either saved into a file and the file URL will be specified as an argument in the command to run the tool or an input string can be used directly in the command in case of the "String" type, "String data value" argument value. +</source> + <translation>Ð”Ð»Ñ Ð²Ð²Ð¾Ð´Ð° данных из других Ñлементов Ñхемы к Ñтому Ñлементу добавьте один или неÑколько портов требуемого типа. + +ВходÑщие данные будут либо Ñохранены в файл, а URL-Ð°Ð´Ñ€ÐµÑ Ñ„Ð°Ð¹Ð»Ð° будет указан в качеÑтве аргумента в команде Ð´Ð»Ñ Ð·Ð°Ð¿ÑƒÑка инÑтрумента, либо Ð²Ñ…Ð¾Ð´Ð½Ð°Ñ Ñтрока может быть иÑпользована непоÑредÑтвенно в команде, в Ñлучае когда аргумент имеет тип «Строка» или «Значение Ñтроки». +</translation> + </message> + <message> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardInputDataPage.ui" line="124"/> + <source><html><head/><body><p><span style=" font-weight:600;">Error: please use unique argument names for all ports and parameters!</span></p></body></html></source> + <translation><html><head/><body><p><span style=" font-weight:600;">Ошибка: иÑпользуйте уникальные имена аргументов Ð´Ð»Ñ Ð²Ñех портов и параметров!</span></p></body></html></translation> + </message> + <message> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardInputDataPage.ui" line="149"/> <source>Add input</source> <translation>Добавить входные данные</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorkerDialog.ui" line="158"/> - <location filename="../src/library/ExternalProcessWorkerDialog.ui" line="209"/> - <location filename="../src/library/ExternalProcessWorkerDialog.ui" line="281"/> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardInputDataPage.ui" line="156"/> <source>Delete</source> <translation>Удалить</translation> </message> +</context> +<context> + <name>CreateCmdlineBasedWorkerWizardOutputDataPage</name> + <message> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardOutputDataPage.ui" line="14"/> + <source>WizardPage</source> + <translation>WizardPage</translation> + </message> <message> - <location filename="../src/library/ExternalProcessWorkerDialog.ui" line="167"/> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardOutputDataPage.ui" line="35"/> <source>Output data</source> <translation>Выходные данные</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorkerDialog.ui" line="202"/> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardOutputDataPage.ui" line="47"/> + <source>To output data from this element to other workflow element(s) add one or several port(s) of the required type(s). + +It is assumed that the external tool creates some file(s). This element reads the file(s) according to the specified type and format, and pass the data to the next element in the workflow. Alternatively, it is possible to pass the output file or folder URL, see the "String" type, "Output URL" argument value. +</source> + <translation>Ð”Ð»Ñ Ð²Ñ‹Ð²Ð¾Ð´Ð° данных из Ñтого Ñлемента в другие Ñлементы Ñхемы добавьте один или неÑколько портов требуемого типа. + +ПредполагаетÑÑ, что внешний инÑтрумент Ñоздает файл(Ñ‹). Ðтот Ñлемент читает файл(Ñ‹) в ÑоответÑтвии Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð½Ñ‹Ð¼ типом и форматом и передает данные Ñледующему Ñлементу Ñхемы. Кроме того, можно передать URL-Ð°Ð´Ñ€ÐµÑ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ файла или папки Ð´Ð»Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ð° типа «Строка» или «URL выходного файла». +</translation> + </message> + <message> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardOutputDataPage.ui" line="121"/> + <source><html><head/><body><p><span style=" font-weight:600;">Error: please use unique argument names for all ports and parameters!</span></p></body></html></source> + <translation><html><head/><body><p><span style=" font-weight:600;">Ошибка: иÑпользуйте уникальные имена аргументов Ð´Ð»Ñ Ð²Ñех портов и параметров!</span></p></body></html></translation> + </message> + <message> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardOutputDataPage.ui" line="146"/> <source>Add output</source> <translation>Добавить выходные данные</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorkerDialog.ui" line="228"/> - <source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Another parameters for external tool. You must set name for parameter and its type. You also can set description for workflow designer. Each parameter will be represented as parameter of workflow element.</span></p></body></html></source> - <translation><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Another parameters for external tool. You must set name for parameter and its type. You also can set description for workflow designer. Each parameter will be represented as parameter of workflow element.</span></p></body></html></translation> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardOutputDataPage.ui" line="153"/> + <source>Delete</source> + <translation>Удалить</translation> + </message> +</context> +<context> + <name>CreateCmdlineBasedWorkerWizardParametersPage</name> + <message> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardParametersPage.ui" line="14"/> + <source>WizardPage</source> + <translation>WizardPage</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorkerDialog.ui" line="239"/> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardParametersPage.ui" line="32"/> <source>Parameters</source> <translation>Параметры</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorkerDialog.ui" line="274"/> - <source>Add attribute</source> - <translation>Добавить атрибут</translation> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardParametersPage.ui" line="41"/> + <source>Make the element configurable by adding one or several parameter(s). + +The parameter(s) value(s) can be later set up in the "Property Editor" (located at the right side of the Workflow Designer window) when an element is selected on the scene. During a workflow execution the specified parameters are applied to each input dataset. +</source> + <translation>Сделайте Ñлемент наÑтраиваемым, добавив один или неÑколько параметров. + +Ð—Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð°(ов) могут быть позже уÑтановлены в «Редакторе ÑвойÑтв» (раÑположенном в правой чаÑти окна Дизайнера вычиÑлительных Ñхем), когда Ñлемент выбран на Ñцене. Во Ð²Ñ€ÐµÐ¼Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñ€Ð°Ð±Ð¾Ñ‡ÐµÐ³Ð¾ процеÑÑа указанные параметры применÑÑŽÑ‚ÑÑ Ðº каждому входному набору данных. +</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorkerDialog.ui" line="300"/> - <source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Execution string and element's description. To substitute input, output data or parameter, use it's name with prefix $ in execution string. You can set parameterized description for new element(description that appears not in property editor but on element itself). In parameterized description you also can use parameters substitution with prefix $. If file paths in the execution string contain spaces, they must be enclosed with single quotes.</span></p></body></html></source> - <translation><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Execution string and element's description. To substitute input, output data or parameter, use it's name with prefix $ in execution string. You can set parameterized description for new element(description that appears not in property editor but on element itself). In parameterized description you also can use parameters substitution with prefix $. If file paths in the execution string contain spaces, they must be enclosed with single quotes.</span></p></body></html></translation> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardParametersPage.ui" line="109"/> + <source><html><head/><body><p><span style=" font-weight:600;">Error: please use unique argument names for all ports and parameters!</span></p></body></html></source> + <translation><html><head/><body><p><span style=" font-weight:600;">Ошибка: иÑпользуйте уникальные имена аргументов Ð´Ð»Ñ Ð²Ñех портов и параметров!</span></p></body></html></translation> + </message> + <message> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardParametersPage.ui" line="134"/> + <source>Add parameter</source> + <translation>Добавить параметр</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorkerDialog.ui" line="311"/> - <source>Command line template</source> - <translation>Заготовка Ð´Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð½Ð¾Ð¹ Ñтроки</translation> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardParametersPage.ui" line="141"/> + <source>Delete</source> + <translation>Удалить</translation> </message> +</context> +<context> + <name>CreateCmdlineBasedWorkerWizardSummaryPage</name> <message> - <location filename="../src/library/ExternalProcessWorkerDialog.ui" line="330"/> - <source>Execution string</source> - <translation>Строка выполнениÑ</translation> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardSummaryPage.ui" line="14"/> + <source>WizardPage</source> + <translation>WizardPage</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorkerDialog.ui" line="342"/> - <source>Parameterized description</source> - <translation>ОпиÑание</translation> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardSummaryPage.ui" line="32"/> + <source>Summary</source> + <translation>Сводный отчёт</translation> + </message> + <message> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardSummaryPage.ui" line="83"/> + <source>Element name</source> + <translation>Ð˜Ð¼Ñ Ñлемента</translation> + </message> + <message> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardSummaryPage.ui" line="140"/> + <source>Element description on the scene</source> + <translation>ОпиÑание Ñлемента на Ñцене</translation> + </message> + <message> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardSummaryPage.ui" line="185"/> + <source>Detailed element description</source> + <translation>Подробное опиÑание Ñлемента</translation> + </message> + <message> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardSummaryPage.ui" line="230"/> + <source>Command</source> + <translation>Команда</translation> </message> </context> <context> @@ -174,7 +288,7 @@ p, li { white-space: pre-wrap; } <message> <location filename="../src/CreateScriptBlockDialog.ui" line="29"/> <source>ScriptBlock</source> - <translation>Скриптовый блок</translation> + <translation>Скрипт</translation> </message> <message> <location filename="../src/CreateScriptBlockDialog.ui" line="38"/> @@ -186,15 +300,13 @@ p, li { white-space: pre-wrap; } <source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Evaluates user's script</span></p></body></html></source> - <translation> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> - p, li { white-space: pre-wrap; } - </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> - <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Оценивает Ñкрипт Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ </span></p></body></html> - </translation> +</style></head><body style=" font-family:'monospace'; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span>Evaluates user's script</span></p></body></html></source> + <translation><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'monospace'; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span>ПользовательÑкий Ñкрипт</span></p></body></html></translation> </message> <message> <location filename="../src/CreateScriptBlockDialog.ui" line="58"/> @@ -249,11 +361,7 @@ p, li { white-space: pre-wrap; } <message> <location filename="../src/CreateScriptBlockDialog.ui" line="164"/> <source>Error occured while saving new actor. Can't write to current directory. Choose another directory for store user's elements</source> - <translation>Произошла ошибка во Ð²Ñ€ÐµÐ¼Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð½Ð¾Ð²Ð¾Ð³Ð¾ актера. Ðевозможно запиÑать в текущей папке. Выберите другую папку</translation> - </message> - <message> - <source>Error occured while saving new actor. Can't write to current folder. Choose another folder for store user's elements</source> - <translation type="vanished">Произошла ошибка во Ð²Ñ€ÐµÐ¼Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð½Ð¾Ð²Ð¾Ð³Ð¾ актера. Ðевозможно запиÑать в текущей папке. Выберите другую папку</translation> + <translation>Произошла ошибка во Ð²Ñ€ÐµÐ¼Ñ ÑохранениÑ. Ðевозможно запиÑать в текущей папке. Выберите другую папку</translation> </message> <message> <location filename="../src/CreateScriptBlockDialog.ui" line="182"/> @@ -328,18 +436,6 @@ p, li { white-space: pre-wrap; } <source>Galaxy directory</source> <translation>Папка Galaxy</translation> </message> - <message> - <source>UGENE folder</source> - <translation type="vanished">Папка UGENE</translation> - </message> - <message> - <source>Destination folder</source> - <translation type="vanished">РаÑположение папки</translation> - </message> - <message> - <source>Galaxy folder</source> - <translation type="vanished">Папка Galaxy</translation> - </message> <message> <location filename="../src/GalaxyConfigConfigurationDialog.ui" line="119"/> <source>Create</source> @@ -372,7 +468,7 @@ p, li { white-space: pre-wrap; } <message> <location filename="../src/PortAliasesConfigurationDialog.ui" line="23"/> <source>Configure Port and Slot Aliases</source> - <translation> ÐšÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Ð¸Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñа командной Ñтроки Ð´Ð»Ñ Ð¿Ð¾Ñ€Ñ‚Ð¾Ð² и Ñлотов</translation> + <translation>ÐаÑтройка алиаÑов Ð´Ð»Ñ Ð¿Ð¾Ñ€Ñ‚Ð¾Ð² и Ñлотов</translation> </message> <message> <location filename="../src/PortAliasesConfigurationDialog.ui" line="43"/> @@ -413,89 +509,69 @@ p, li { white-space: pre-wrap; } <context> <name>QObject</name> <message> - <location filename="../src/DashboardsManagerDialog.cpp" line="30"/> + <location filename="../src/DashboardsManagerDialog.cpp" line="173"/> <source>Removing Dashboards</source> <translation>Удаление панелей</translation> </message> <message> - <location filename="../src/DashboardsManagerDialog.cpp" line="32"/> + <location filename="../src/DashboardsManagerDialog.cpp" line="34"/> <source>The following dashboards are about to be deleted:</source> <translation>Следующие панели будут удалены:</translation> </message> <message> - <location filename="../src/DashboardsManagerDialog.cpp" line="34"/> + <location filename="../src/DashboardsManagerDialog.cpp" line="36"/> <source>The following dashboard is about to be deleted:</source> <translation>Следующие панели будут удалены:</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorker.cpp" line="71"/> - <location filename="../src/library/ExternalProcessWorker.cpp" line="123"/> + <location filename="../src/library/ExternalProcessWorker.cpp" line="82"/> + <location filename="../src/library/ExternalProcessWorker.cpp" line="134"/> <source>Empty text slot</source> <translation>Слот типа текÑÑ‚ пуÑÑ‚</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorker.cpp" line="80"/> + <location filename="../src/library/ExternalProcessWorker.cpp" line="91"/> <source>Empty sequence slot</source> <translation>Слот типа поÑледовательноÑÑ‚ÑŒ пуÑÑ‚</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorker.cpp" line="86"/> + <location filename="../src/library/ExternalProcessWorker.cpp" line="97"/> <source>Error with sequence object</source> <translation>Ошибка Ñ Ð¾Ð±ÑŠÐµÐºÑ‚Ð¾Ð¼ типа поÑледовательноÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorker.cpp" line="94"/> + <location filename="../src/library/ExternalProcessWorker.cpp" line="105"/> <source>Empty annotations slot</source> <translation>Слот типа Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ñ Ð¿ÑƒÑÑ‚</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorker.cpp" line="109"/> + <location filename="../src/library/ExternalProcessWorker.cpp" line="120"/> <source>Empty alignment slot</source> <translation>Слот типа выравнивание пуÑÑ‚</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorker.cpp" line="115"/> - <location filename="../src/library/ExternalProcessWorker.cpp" line="328"/> + <location filename="../src/library/ExternalProcessWorker.cpp" line="126"/> + <location filename="../src/library/ExternalProcessWorker.cpp" line="399"/> <source>Error with alignment object</source> <translation>Ошибка Ñ Ð¾Ð±ÑŠÐµÐºÑ‚Ð¾Ð¼ типа выравнивание</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorker.cpp" line="144"/> + <location filename="../src/library/ExternalProcessWorker.cpp" line="155"/> <source>Unknown document format: %1</source> <translation>ÐеизвеÑтный формат документа: %1</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorker.cpp" line="316"/> + <location filename="../src/library/ExternalProcessWorker.cpp" line="387"/> <source>No target objects in the file: %1</source> <translation>Требуемых объектов в файле не найдено: %1</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorker.cpp" line="341"/> + <location filename="../src/library/ExternalProcessWorker.cpp" line="412"/> <source>Error with annotations object</source> <translation>Ошибка Ñ Ð¾Ð±ÑŠÐµÐºÑ‚Ð¾Ð¼ типа аннотациÑ</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="74"/> - <source>Pattern(s)</source> - <translation>Паттерн(Ñ‹)</translation> - </message> - <message> - <location filename="../src/library/FindWorker.cpp" line="74"/> - <source>Semicolon-separated list of patterns to search for.</source> - <translation>СпиÑок паттернов Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка.</translation> - </message> - <message> - <location filename="../src/library/FindWorker.cpp" line="76"/> - <source>Pattern file</source> - <translation>Файл Ñ Ð¿Ð°Ñ‚Ñ‚ÐµÑ€Ð½Ð¾Ð¼</translation> - </message> - <message> - <location filename="../src/library/FindWorker.cpp" line="76"/> - <source>Load pattern from file in any sequence format or in newline-delimited format.</source> - <translation>Загружает паттерн из файла в формате поÑледовательноÑти или в формате Ñтрок Ñ Ñ€Ð°Ð·Ð´ÐµÐ»Ð¸Ñ‚ÐµÐ»Ñми.</translation> - </message> - <message> - <location filename="../src/library/FindWorker.cpp" line="86"/> + <location filename="../src/library/FindWorker.cpp" line="82"/> <source>Patterns are not set. Set the '%1' or '%2' parameter or bind the input text slot</source> <translation>Паттерн(Ñ‹) не выбраны. УÑтановите '%1' или '%2' параметр parameter или ÑвÑжите Ñо входным Ñлотом типа текÑÑ‚</translation> </message> @@ -520,52 +596,55 @@ p, li { white-space: pre-wrap; } <translation>Формат %1 не поддерживает аннотации</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="142"/> + <location filename="../src/WorkflowViewController.cpp" line="495"/> + <location filename="../src/WorkflowViewController.cpp" line="1579"/> <source>Breakpoints</source> <translation>Точки оÑтановки</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="200"/> - <source>Element style</source> - <translation>Стиль</translation> - </message> - <message> - <location filename="../src/WorkflowViewController.cpp" line="148"/> + <location filename="../src/WorkflowViewController.cpp" line="121"/> + <location filename="../src/WorkflowViewController.cpp" line="123"/> + <location filename="../src/WorkflowViewController.cpp" line="124"/> + <location filename="../src/WorkflowViewController.cpp" line="506"/> + <location filename="../src/WorkflowViewController.cpp" line="512"/> + <location filename="../src/WorkflowViewController.cpp" line="519"/> <source>%</source> <translation>%</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="137"/> + <location filename="../src/WorkflowViewController.cpp" line="378"/> + <location filename="../src/WorkflowViewController.cpp" line="2186"/> <source>You opened obsolete workflow in XML format. It is strongly recommended to clear working space and create workflow from scratch.</source> <translation>Ð’Ñ‹ открыли уÑтаревшую Ñхему в XML формате. РекомендуетÑÑ Ð¾Ñ‡Ð¸Ñтить рабочее проÑтранÑтво и Ñоздайть новую Ñхему.</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="140"/> + <location filename="../src/WorkflowViewController.cpp" line="381"/> + <location filename="../src/WorkflowViewController.cpp" line="2189"/> <source>Sorry! This workflow is obsolete and cannot be opened.</source> <translation>Ðта Ñхема уÑтарела и не может быть открыта.</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="211"/> + <location filename="../src/WorkflowViewController.cpp" line="169"/> <source>Scripting mode</source> <translation>Скриптинг</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="909"/> + <location filename="../src/WorkflowViewController.cpp" line="833"/> <source>Can not create the folder: </source> - <translation>Ðевозможно Ñоздать папку:</translation> + <translation>Ðевозможно Ñоздать папку: </translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="915"/> + <location filename="../src/WorkflowViewController.cpp" line="839"/> <source>The file '%1' already exists</source> <translation>Файл '%1' уже ÑущеÑтвует</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="920"/> + <location filename="../src/WorkflowViewController.cpp" line="844"/> <source>Can not copy the file here: </source> - <translation>Ðевозможно Ñкопировать файл:</translation> + <translation>Ðевозможно Ñкопировать файл: </translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="1479"/> + <location filename="../src/WorkflowViewController.cpp" line="1385"/> <source>Run workflow</source> <translation>ЗапуÑтить Ñхему</translation> </message> @@ -620,9 +699,9 @@ p, li { white-space: pre-wrap; } <translation>Сохранить аннотации</translation> </message> <message> - <location filename="../src/util/WriteAnnotationsValidator.cpp" line="52"/> + <location filename="../src/util/WriteAnnotationsValidator.cpp" line="54"/> <source>Sequence names were not saved, the input slot 'Sequence' is empty.</source> - <translation type="unfinished"></translation> + <translation>Имена поÑледовательноÑти не были Ñохранены, Ñлот 'ПоÑледовательноÑÑ‚ÑŒ' пуÑтой.</translation> </message> </context> <context> @@ -668,14 +747,6 @@ p, li { white-space: pre-wrap; } </context> <context> <name>StartupDialog</name> - <message> - <source>Choose Output Folder</source> - <translation type="vanished">Выбор папки Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ñ‹Ñ… данных</translation> - </message> - <message> - <source>Output Folder</source> - <translation type="vanished">Ð’Ñ‹Ñ…Ð¾Ð´Ð½Ð°Ñ Ð¿Ð°Ð¿ÐºÐ°</translation> - </message> <message> <location filename="../src/StartupDialog.ui" line="14"/> <source>Choose Output Directory</source> @@ -691,14 +762,13 @@ p, li { white-space: pre-wrap; } <source>Note: you can change this option in the UGENE Application Settings (Settings > Preferences > Workflow Designer)</source> <translation>Замечание: вы можете изменить Ñти наÑтройки в общих наÑтройках UGENE -(ÐаÑтройки > УÑтановки > Дизайнер вычиÑлительных Ñхем) - </translation> +(ÐаÑтройки > УÑтановки > Дизайнер вычиÑлительных Ñхем)</translation> </message> </context> <context> <name>U2::ActorCfgModel</name> <message> - <location filename="../src/ActorCfgModel.cpp" line="309"/> + <location filename="../src/ActorCfgModel.cpp" line="310"/> <source>N/A</source> <translation>N/A</translation> </message> @@ -754,60 +824,126 @@ p, li { white-space: pre-wrap; } <context> <name>U2::CfgExternalToolModel</name> <message> - <location filename="../src/library/CfgExternalToolModel.cpp" line="211"/> - <source>Name for command line parameter</source> - <translation>Ð˜Ð¼Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° в командной Ñтроке</translation> + <location filename="../src/library/CfgExternalToolModel.cpp" line="273"/> + <source>Display name</source> + <translation>ИмÑ</translation> + </message> + <message> + <location filename="../src/library/CfgExternalToolModel.cpp" line="275"/> + <source>Argument name</source> + <translation>Ð˜Ð¼Ñ Ð°Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ð°</translation> </message> <message> - <location filename="../src/library/CfgExternalToolModel.cpp" line="212"/> + <location filename="../src/library/CfgExternalToolModel.cpp" line="277"/> <source>Type</source> <translation>Тип</translation> </message> <message> - <location filename="../src/library/CfgExternalToolModel.cpp" line="215"/> - <source>Read as</source> - <translation>Прочитать как</translation> + <location filename="../src/library/CfgExternalToolModel.cpp" line="280"/> + <location filename="../src/library/CfgExternalToolModel.cpp" line="282"/> + <source>Argument value</source> + <translation>Значение аргумента</translation> </message> <message> - <location filename="../src/library/CfgExternalToolModel.cpp" line="218"/> - <source>Write as</source> - <translation>ЗапиÑать как</translation> + <location filename="../src/library/CfgExternalToolModel.cpp" line="359"/> + <source>URL to %1 file with data</source> + <translation>URL до файла Ñ Ð´Ð°Ð½Ð½Ñ‹Ð¼Ð¸ %1</translation> </message> <message> - <location filename="../src/library/CfgExternalToolModel.cpp" line="220"/> - <source>Description</source> - <translation>ОпиÑание</translation> + <location filename="../src/library/CfgExternalToolModel.cpp" line="400"/> + <source>String data value</source> + <translation>Значение Ñтроки</translation> </message> <message> - <location filename="../src/library/CfgExternalToolModel.cpp" line="313"/> - <source>String value</source> - <translation>Строка</translation> + <location filename="../src/library/CfgExternalToolModel.cpp" line="402"/> + <source>Output URL</source> + <translation>Выходной URL</translation> </message> <message> - <location filename="../src/library/CfgExternalToolModel.cpp" line="315"/> - <source>Text file</source> - <translation>ТекÑтовый файл</translation> + <location filename="../src/library/CfgExternalToolModel.cpp" line="412"/> + <source>Annotations</source> + <translation>Ðннотации</translation> </message> <message> - <location filename="../src/library/CfgExternalToolModel.cpp" line="317"/> - <source>Output file url</source> - <translation>Выходной файл</translation> + <location filename="../src/library/CfgExternalToolModel.cpp" line="415"/> + <source>Alignment</source> + <translation>Выравнивание</translation> + </message> + <message> + <location filename="../src/library/CfgExternalToolModel.cpp" line="420"/> + <source>Annotated sequence</source> + <translation>ÐÐ½Ð½Ð¾Ñ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð½Ð°Ñ Ð¿Ð¾ÑледовательноÑÑ‚ÑŒ</translation> + </message> + <message> + <location filename="../src/library/CfgExternalToolModel.cpp" line="285"/> + <source>Description</source> + <translation>ОпиÑание</translation> </message> </context> <context> <name>U2::CfgExternalToolModelAttributes</name> <message> - <location filename="../src/library/CfgExternalToolModel.cpp" line="456"/> - <source>Name</source> + <location filename="../src/library/CfgExternalToolModel.cpp" line="488"/> + <source>Boolean</source> + <translation>ЛогичеÑкий</translation> + </message> + <message> + <location filename="../src/library/CfgExternalToolModel.cpp" line="489"/> + <source>Integer</source> + <translation>ЦелочиÑленный</translation> + </message> + <message> + <location filename="../src/library/CfgExternalToolModel.cpp" line="490"/> + <source>Double</source> + <translation>С плавающей точкой</translation> + </message> + <message> + <location filename="../src/library/CfgExternalToolModel.cpp" line="491"/> + <source>String</source> + <translation>Строка</translation> + </message> + <message> + <location filename="../src/library/CfgExternalToolModel.cpp" line="492"/> + <source>Input file URL</source> + <translation>URL входного файла</translation> + </message> + <message> + <location filename="../src/library/CfgExternalToolModel.cpp" line="493"/> + <source>Input folder URL</source> + <translation>URL входной папки</translation> + </message> + <message> + <location filename="../src/library/CfgExternalToolModel.cpp" line="494"/> + <source>Output file URL</source> + <translation>URL выходного файла</translation> + </message> + <message> + <location filename="../src/library/CfgExternalToolModel.cpp" line="495"/> + <source>Output folder URL</source> + <translation>URL выходной папки</translation> + </message> + <message> + <location filename="../src/library/CfgExternalToolModel.cpp" line="683"/> + <source>Display name</source> <translation>ИмÑ</translation> </message> <message> - <location filename="../src/library/CfgExternalToolModel.cpp" line="457"/> + <location filename="../src/library/CfgExternalToolModel.cpp" line="685"/> + <source>Argument name</source> + <translation>Ð˜Ð¼Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ð°</translation> + </message> + <message> + <location filename="../src/library/CfgExternalToolModel.cpp" line="687"/> <source>Type</source> <translation>Тип</translation> </message> <message> - <location filename="../src/library/CfgExternalToolModel.cpp" line="458"/> + <location filename="../src/library/CfgExternalToolModel.cpp" line="689"/> + <source>Default value</source> + <translation>Значение по умолчанию</translation> + </message> + <message> + <location filename="../src/library/CfgExternalToolModel.cpp" line="691"/> <source>Description</source> <translation>ОпиÑание</translation> </message> @@ -826,181 +962,162 @@ p, li { white-space: pre-wrap; } </message> </context> <context> - <name>U2::CreateExternalProcessDialog</name> + <name>U2::CreateCmdlineBasedWorkerWizard</name> <message> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="324"/> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.cpp" line="201"/> <source>Warning</source> <translation>Предупреждение</translation> </message> <message> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="325"/> - <source>You have changed the structure of the element (name, slots, attributes' names and types). All elements on the scene would be removed. Do you really want to change it? + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.cpp" line="202"/> + <source>You have changed the structure of the element (name, slots, parameters' names and types). All elements on the scene would be removed. Do you really want to change it? You could also reset the dialog to the initial state.</source> - <translation>Ð’Ñ‹ изменили Ñтруктуру Ñлемента (имÑ, Ñлоты, имена или типы аттрибутов'). Ð’Ñе Ñлементы на Ñцене будут удалены. Ð’Ñ‹ дейÑтвительно хотите Ñделать Ñто? Также вы можете вернуть диалог к изначальному ÑоÑтоÑнию.</translation> - </message> - <message> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="354"/> - <source>Create Element</source> - <translation>Создание Ñлемента</translation> - </message> - <message> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="356"/> - <source>Please set the input/output data.</source> - <translation>УÑтановите входные и выходные данные.</translation> - </message> - <message> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="361"/> - <source>Please set the command line to run external tool.</source> - <translation>УÑтановите параметры командной Ñтроки чтобы запуÑтить внутренний инÑтрумент.</translation> - </message> - <message> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="366"/> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="465"/> - <source>Please set the name for the new element.</source> - <translation>УÑтановите Ð¸Ð¼Ñ Ð´Ð»Ñ Ð½Ð¾Ð²Ð¾Ð³Ð¾ Ñлемента.</translation> + <translation>Ð’Ñ‹ изменили Ñтруктуру Ñлемента (имÑ, Ñлоты, имена и типы параметров). Ð’Ñе Ñлементы на Ñцене будут удалены. Ð’Ñ‹ дейÑтвительно хотите применить изменениÑ? +Ð’Ñ‹ также можете вернуть диалог в иÑходное ÑоÑтоÑние.</translation> </message> <message> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="372"/> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="477"/> - <source>Invalid symbols in the element name.</source> - <translation>Ðекорректные Ñимволы в имени Ñлемента.</translation> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.cpp" line="232"/> + <source>Configure Element with External Tool</source> + <translation>Создание Ñлемента при помощи внешних инÑтрументов</translation> </message> +</context> +<context> + <name>U2::CreateCmdlineBasedWorkerWizardCommandPage</name> <message> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="377"/> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="482"/> - <source>Element with this name already exists.</source> - <translation>Ðлемент Ñ Ñ‚Ð°ÐºÐ¸Ð¼ именем уже ÑущеÑтвует.</translation> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.cpp" line="883"/> + <source>Create Element</source> + <translation>Создание Ñлемента</translation> </message> <message> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="385"/> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="396"/> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="407"/> - <source>For one or more parameter name was not set.</source> - <translation>Ð”Ð»Ñ Ð¾Ð´Ð½Ð¾Ð³Ð¾ или более парваметров не задано имÑ.</translation> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.cpp" line="884"/> + <source>You don't use listed parameters in template string. Continue?</source> + <translation>Ð’Ñ‹ не иÑпользовали перечиÑленные параметры в Ñтроке. Продолжить?</translation> </message> <message> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="389"/> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="400"/> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="411"/> - <source>Invalid symbols in a name.</source> - <translation>Ðекорректные Ñимволы в имени.</translation> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.cpp" line="897"/> + <source>Continue</source> + <translation>Продолжить</translation> </message> <message> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="418"/> - <source>The same name of element parameters was found</source> - <translation>Параметр Ñ Ñ‚Ð°ÐºÐ¸Ð¼ именем уже ÑущеÑтвует</translation> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.cpp" line="898"/> + <source>Abort</source> + <translation>ВернутьÑÑ</translation> </message> +</context> +<context> + <name>U2::CreateCmdlineBasedWorkerWizardGeneralSettingsPage</name> <message> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="426"/> - <source>You don't use parameter %1 in template string. Continue?</source> - <translation>Ð’Ñ‹ не можете иÑпользовать параметр %1 в шаблонной Ñтроке. Продолжить?</translation> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.cpp" line="349"/> + <source>Select an executable file</source> + <translation>Выбрать иÑполнÑемый файл</translation> </message> <message> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="427"/> - <source>Continue</source> - <translation>Продолжить</translation> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.cpp" line="371"/> + <source>Show customs tools only</source> + <translation>Показать только пользовательÑкие инÑтрументы</translation> </message> <message> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="428"/> - <source>Abort</source> - <translation>ВернутьÑÑ</translation> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.cpp" line="376"/> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.cpp" line="400"/> + <source>Show all tools</source> + <translation>Показать вÑе инÑтрументы</translation> </message> <message> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="471"/> - <source>Spaces in the element name.</source> - <translation>Пробелы в имени Ñлемента.</translation> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.cpp" line="395"/> + <source>Custom tools</source> + <translation>ПользовательÑкие инÑтрументы</translation> </message> <message> - <location filename="../src/library/CreateExternalProcessDialog.cpp" line="497"/> - <source>It is the correct name</source> - <translation>Ðто корректное имÑ</translation> + <location filename="../src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.cpp" line="415"/> + <source>Supported tools</source> + <translation>Поддерживаемые инÑтрументы</translation> </message> </context> <context> <name>U2::CreateScriptElementDialog</name> <message> - <location filename="../src/CreateScriptWorker.cpp" line="303"/> + <location filename="../src/CreateScriptWorker.cpp" line="307"/> <source>Name</source> <translation>ИмÑ</translation> </message> <message> - <location filename="../src/CreateScriptWorker.cpp" line="304"/> + <location filename="../src/CreateScriptWorker.cpp" line="308"/> <source>Type</source> <translation>Тип</translation> </message> <message> - <location filename="../src/CreateScriptWorker.cpp" line="363"/> + <location filename="../src/CreateScriptWorker.cpp" line="367"/> <source>OK</source> <translation>OK</translation> </message> <message> - <location filename="../src/CreateScriptWorker.cpp" line="364"/> + <location filename="../src/CreateScriptWorker.cpp" line="368"/> <source>Cancel</source> <translation>Отмена</translation> </message> <message> - <location filename="../src/CreateScriptWorker.cpp" line="509"/> - <location filename="../src/CreateScriptWorker.cpp" line="523"/> - <location filename="../src/CreateScriptWorker.cpp" line="536"/> - <location filename="../src/CreateScriptWorker.cpp" line="542"/> - <location filename="../src/CreateScriptWorker.cpp" line="560"/> - <location filename="../src/CreateScriptWorker.cpp" line="568"/> - <location filename="../src/CreateScriptWorker.cpp" line="576"/> + <location filename="../src/CreateScriptWorker.cpp" line="516"/> + <location filename="../src/CreateScriptWorker.cpp" line="530"/> + <location filename="../src/CreateScriptWorker.cpp" line="543"/> + <location filename="../src/CreateScriptWorker.cpp" line="549"/> + <location filename="../src/CreateScriptWorker.cpp" line="567"/> + <location filename="../src/CreateScriptWorker.cpp" line="575"/> + <location filename="../src/CreateScriptWorker.cpp" line="583"/> <source>error</source> <translation>ошибка</translation> </message> <message> - <location filename="../src/CreateScriptWorker.cpp" line="509"/> + <location filename="../src/CreateScriptWorker.cpp" line="516"/> <source>Two identical types for input port</source> <translation>Два одинаковых типа Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ порта</translation> </message> <message> - <location filename="../src/CreateScriptWorker.cpp" line="510"/> + <location filename="../src/CreateScriptWorker.cpp" line="517"/> <source>two identical types for input port</source> <translation>два одинаковых типа Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ порта</translation> </message> <message> - <location filename="../src/CreateScriptWorker.cpp" line="523"/> + <location filename="../src/CreateScriptWorker.cpp" line="530"/> <source>Two identical types for output port</source> <translation>Два одинаковых типа Ð´Ð»Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ порта</translation> </message> <message> - <location filename="../src/CreateScriptWorker.cpp" line="524"/> + <location filename="../src/CreateScriptWorker.cpp" line="531"/> <source>two identical types for output port</source> <translation>два одинаковых типа Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ порта</translation> </message> <message> - <location filename="../src/CreateScriptWorker.cpp" line="536"/> - <location filename="../src/CreateScriptWorker.cpp" line="537"/> + <location filename="../src/CreateScriptWorker.cpp" line="543"/> + <location filename="../src/CreateScriptWorker.cpp" line="544"/> <source>Name for some attributes is empty</source> <translation>Имена Ð´Ð»Ñ Ð½ÐµÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ñ… аттрибутов пуÑÑ‚Ñ‹</translation> </message> <message> - <location filename="../src/CreateScriptWorker.cpp" line="542"/> - <location filename="../src/CreateScriptWorker.cpp" line="543"/> + <location filename="../src/CreateScriptWorker.cpp" line="549"/> + <location filename="../src/CreateScriptWorker.cpp" line="550"/> <source>Two attributes with name %1</source> <translation>Два атрибута Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼ %1</translation> </message> <message> - <location filename="../src/CreateScriptWorker.cpp" line="560"/> - <location filename="../src/CreateScriptWorker.cpp" line="561"/> + <location filename="../src/CreateScriptWorker.cpp" line="567"/> + <location filename="../src/CreateScriptWorker.cpp" line="568"/> <source>Name for block is empty</source> <translation>Ð˜Ð¼Ñ Ð´Ð»Ñ Ð±Ð»Ð¾ÐºÐ° пуÑто</translation> </message> <message> - <location filename="../src/CreateScriptWorker.cpp" line="568"/> - <location filename="../src/CreateScriptWorker.cpp" line="569"/> + <location filename="../src/CreateScriptWorker.cpp" line="575"/> + <location filename="../src/CreateScriptWorker.cpp" line="576"/> <source>Actor with this name already registered</source> <translation>Указатель Ñ Ñтим именем уже зарегиÑтрирован</translation> </message> <message> - <location filename="../src/CreateScriptWorker.cpp" line="576"/> - <location filename="../src/CreateScriptWorker.cpp" line="577"/> + <location filename="../src/CreateScriptWorker.cpp" line="583"/> + <location filename="../src/CreateScriptWorker.cpp" line="584"/> <source>Description for block is empty</source> <translation>ОпиÑание Ð´Ð»Ñ Ð±Ð»Ð¾ÐºÐ° пуÑто</translation> </message> <message> - <location filename="../src/CreateScriptWorker.cpp" line="631"/> + <location filename="../src/CreateScriptWorker.cpp" line="638"/> <source>Can't save user's workflow element</source> <translation>Ðевозможно Ñохранить Ñлемент</translation> </message> @@ -1008,12 +1125,12 @@ You could also reset the dialog to the initial state.</source> <context> <name>U2::DashboardManagerHelper</name> <message> - <location filename="../src/WorkflowViewController.cpp" line="240"/> + <location filename="../src/WorkflowViewController.cpp" line="213"/> <source>No Dashboards Found</source> <translation>Ðе найдено панелей</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="241"/> + <location filename="../src/WorkflowViewController.cpp" line="214"/> <source>You do not have any dashboards yet. You need to run some workflow to use Dashboards Manager.</source> <translation>У Ð²Ð°Ñ ÐµÑ‰Ðµ нет ни одной панели. Вам необходимо запуÑтить какую-нибудь Ñхему, чтобы иÑпользовать менеджер панелей.</translation> </message> @@ -1021,40 +1138,32 @@ You could also reset the dialog to the initial state.</source> <context> <name>U2::DashboardsManagerDialog</name> <message> - <location filename="../src/DashboardsManagerDialog.cpp" line="50"/> + <location filename="../src/DashboardsManagerDialog.cpp" line="52"/> <source>OK</source> <translation>OK</translation> </message> <message> - <location filename="../src/DashboardsManagerDialog.cpp" line="62"/> + <location filename="../src/DashboardsManagerDialog.cpp" line="64"/> <source>Name</source> <translation>ИмÑ</translation> </message> <message> - <location filename="../src/DashboardsManagerDialog.cpp" line="62"/> + <location filename="../src/DashboardsManagerDialog.cpp" line="64"/> <source>Folder</source> <translation>Папка</translation> </message> <message> - <location filename="../src/DashboardsManagerDialog.cpp" line="177"/> + <location filename="../src/DashboardsManagerDialog.cpp" line="178"/> <source>Confirm</source> <translation>Подтвердить</translation> </message> <message> - <location filename="../src/DashboardsManagerDialog.cpp" line="49"/> - <location filename="../src/DashboardsManagerDialog.cpp" line="178"/> + <location filename="../src/DashboardsManagerDialog.cpp" line="51"/> + <location filename="../src/DashboardsManagerDialog.cpp" line="179"/> <source>Cancel</source> <translation>Отмена</translation> </message> </context> -<context> - <name>U2::EstimationDialog</name> - <message> - <location filename="../src/EstimationDialog.cpp" line="45"/> - <source>Workflow Estimation</source> - <translation>Оценка времени иÑÐ¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñхемы</translation> - </message> -</context> <context> <name>U2::ExtendedProcStyle</name> <message> @@ -1120,6 +1229,11 @@ You could also reset the dialog to the initial state.</source> <source>Font</source> <translation>Шрифт</translation> </message> + <message> + <location filename="../src/ItemViewStyle.cpp" line="82"/> + <source>Characters Font</source> + <translation>Шрифт</translation> + </message> </context> <context> <name>U2::LoadSamplesTask</name> @@ -1143,90 +1257,21 @@ You could also reset the dialog to the initial state.</source> <context> <name>U2::LoadWorkflowSceneTask</name> <message> - <location filename="../src/WorkflowSceneIOTasks.cpp" line="69"/> + <location filename="../src/WorkflowSceneIOTasks.cpp" line="70"/> <source>Load workflow scene</source> <translation>Загрузить Ñхему</translation> </message> <message> - <location filename="../src/WorkflowSceneIOTasks.cpp" line="87"/> + <location filename="../src/WorkflowSceneIOTasks.cpp" line="95"/> <source>Undefined format: plain text or xml expected</source> <translation>ÐеизвеÑтный формат: ÑодержитÑÑ Ñ‚ÐµÑÑ‚ или xml</translation> </message> <message> - <location filename="../src/WorkflowSceneIOTasks.cpp" line="117"/> + <location filename="../src/WorkflowSceneIOTasks.cpp" line="125"/> <source>Error while parsing file: %1</source> <translation>Ошибка во Ð²Ñ€ÐµÐ¼Ñ ÐºÐ¾Ð½Ð²ÐµÑ€Ñ‚Ð°Ñ†Ð¸Ð¸ файла: %1</translation> </message> </context> -<context> - <name>U2::LocalWorkflow::AlignToReferencePrompter</name> - <message> - <source>Input sequence</source> - <translation type="vanished">Ð’Ñ…Ð¾Ð´Ð½Ð°Ñ Ð¿Ð¾ÑледовательноÑÑ‚ÑŒ</translation> - </message> - <message> - <source>Input sequence.</source> - <translation type="vanished">Ð’Ñ…Ð¾Ð´Ð½Ð°Ñ Ð¿Ð¾ÑледовательноÑÑ‚ÑŒ.</translation> - </message> - <message> - <source>Aligned data</source> - <translation type="vanished">Выровненные данные</translation> - </message> - <message> - <source>Aligned data.</source> - <translation type="vanished">Выровненные данные.</translation> - </message> - <message> - <source>Reference URL</source> - <translation type="vanished">Путь до референÑа</translation> - </message> - <message> - <source>A URL to the file with a reference sequence.</source> - <translation type="vanished">Путь до файла Ñ Ñ€ÐµÑ„ÐµÑ€ÐµÐ½Ñной поÑледовательноÑтью.</translation> - </message> - <message> - <source>unset</source> - <translation type="vanished">не указан</translation> - </message> - <message> - <source>Aligns each sequence from <u>%1</u> to the reference sequence from <u>%2</u>.</source> - <translation type="vanished">Выравнивает каждую поÑледовательноÑÑ‚ÑŒ из <u>%1</u> на референÑчную поÑледовательноÑÑ‚ÑŒ из <u>%2</u>.</translation> - </message> -</context> -<context> - <name>U2::LocalWorkflow::AlignToReferenceTask</name> - <message> - <source>Align to reference</source> - <translation type="vanished">Выравнивание на референÑ</translation> - </message> -</context> -<context> - <name>U2::LocalWorkflow::AlignToReferenceWorker</name> - <message> - <source>Align to Reference</source> - <translation type="vanished">Выравнивание на референÑ</translation> - </message> - <message> - <source>Align input sequences (e.g. Sanger reads) to the reference sequence.</source> - <translation type="vanished">ВыровнÑÑ‚ÑŒ входные поÑледовательноÑти на референÑную поÑледовательноÑÑ‚ÑŒ.</translation> - </message> - <message> - <source>Can not read the reference file: </source> - <translation type="vanished">Can not read the reference file: </translation> - </message> - <message> - <source>Can't read the file: </source> - <translation type="vanished">Can't read the file: </translation> - </message> - <message> - <source>No reference sequence in the file: </source> - <translation type="vanished">No reference sequence in the file: </translation> - </message> - <message> - <source>More than one sequence in the reference file: </source> - <translation type="vanished">More than one sequence in the reference file: </translation> - </message> -</context> <context> <name>U2::LocalWorkflow::Alignment2SequencePrompter</name> <message> @@ -1237,7 +1282,7 @@ You could also reset the dialog to the initial state.</source> <message> <location filename="../src/library/MSA2SequenceWorker.cpp" line="140"/> <source> from <u>%1</u></source> - <translation>из <u>%1</u></translation> + <translation> из <u>%1</u></translation> </message> <message> <location filename="../src/library/MSA2SequenceWorker.cpp" line="141"/> @@ -1286,80 +1331,80 @@ You could also reset the dialog to the initial state.</source> <context> <name>U2::LocalWorkflow::AminoTranslationPrompter</name> <message> - <location filename="../src/library/AminoTranslationWorker.cpp" line="252"/> + <location filename="../src/library/AminoTranslationWorker.cpp" line="250"/> <source>unset</source> <translation>не указан</translation> </message> <message> - <location filename="../src/library/AminoTranslationWorker.cpp" line="253"/> + <location filename="../src/library/AminoTranslationWorker.cpp" line="251"/> <source> from <u>%1</u></source> - <translation>из <u>%1</u></translation> + <translation> из <u>%1</u></translation> </message> </context> <context> <name>U2::LocalWorkflow::AminoTranslationWorker</name> <message> - <location filename="../src/library/AminoTranslationWorker.cpp" line="185"/> + <location filename="../src/library/AminoTranslationWorker.cpp" line="183"/> <source>Input Data</source> <translation>Ð’Ñ…Ð¾Ð´Ð½Ð°Ñ Ð¿Ð¾ÑледовательноÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/library/AminoTranslationWorker.cpp" line="186"/> + <location filename="../src/library/AminoTranslationWorker.cpp" line="184"/> <source>An input sequence to translate in amino.</source> <translation>ТранÑлировать входную поÑледовательноÑÑ‚ÑŒ в амино.</translation> </message> <message> - <location filename="../src/library/AminoTranslationWorker.cpp" line="189"/> + <location filename="../src/library/AminoTranslationWorker.cpp" line="187"/> <source>Amino sequence</source> <translation>Ðмино поÑледовательноÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/library/AminoTranslationWorker.cpp" line="190"/> + <location filename="../src/library/AminoTranslationWorker.cpp" line="188"/> <source>Sequence has been translated.</source> <translation>ПоÑледовательноÑти транÑлированы.</translation> </message> <message> - <location filename="../src/library/AminoTranslationWorker.cpp" line="201"/> + <location filename="../src/library/AminoTranslationWorker.cpp" line="199"/> <source>Translate from </source> - <translation>ТранÑлировать из</translation> + <translation>ТранÑлировать из </translation> </message> <message> - <location filename="../src/library/AminoTranslationWorker.cpp" line="201"/> + <location filename="../src/library/AminoTranslationWorker.cpp" line="199"/> <source>What position would sequence translated from : first, second, third or from all positions.</source> <translation>ПозициÑ, Ñ ÐºÐ¾Ñ‚Ð¾Ñ€Ð¾Ð¹ будет транÑлирована поÑледовательноÑÑ‚ÑŒ: Ñ Ð¿ÐµÑ€Ð²Ð¾Ð¹, второй, третьей или вÑе позиции.</translation> </message> <message> - <location filename="../src/library/AminoTranslationWorker.cpp" line="204"/> + <location filename="../src/library/AminoTranslationWorker.cpp" line="202"/> <source>Auto selected genetic code</source> <translation>ÐвтоматичеÑÐºÐ°Ñ ÑƒÑтановка генетичеÑкого кода</translation> </message> <message> - <location filename="../src/library/AminoTranslationWorker.cpp" line="204"/> + <location filename="../src/library/AminoTranslationWorker.cpp" line="202"/> <source>Set if genetic code will be selected automatically.</source> <translation>УÑтановить еÑли генетичеÑкий код будет выбран автоматичеÑки.</translation> </message> <message> - <location filename="../src/library/AminoTranslationWorker.cpp" line="208"/> + <location filename="../src/library/AminoTranslationWorker.cpp" line="206"/> <source>Amino Translation</source> <translation>ТранÑлÑциÑ</translation> </message> <message> - <location filename="../src/library/AminoTranslationWorker.cpp" line="209"/> + <location filename="../src/library/AminoTranslationWorker.cpp" line="207"/> <source>Translate sequence into it's amino translation . Output a sequence.</source> - <translation>ТранÑлировать поÑледовательноÑÑ‚ÑŒ в аминокиÑлотную поÑледовательноÑÑ‚ÑŒ. </translation> + <translation>ТранÑлировать поÑледовательноÑÑ‚ÑŒ в аминокиÑлотную поÑледовательноÑÑ‚ÑŒ.</translation> </message> <message> - <location filename="../src/library/AminoTranslationWorker.cpp" line="212"/> + <location filename="../src/library/AminoTranslationWorker.cpp" line="210"/> <source>Genetic code</source> <translation>ГенетичеÑкий код</translation> </message> <message> - <location filename="../src/library/AminoTranslationWorker.cpp" line="212"/> + <location filename="../src/library/AminoTranslationWorker.cpp" line="210"/> <source>Which genetic code should be used for translating the input nucleotide sequence.</source> <translation>Выбор генетичеÑкого кода, который будет иÑпользован Ð´Ð»Ñ Ñ‚Ñ€Ð°Ð½ÑлÑции входной нуклеотидной поÑледовательноÑти.</translation> </message> <message> - <location filename="../src/library/AminoTranslationWorker.cpp" line="403"/> + <location filename="../src/library/AminoTranslationWorker.cpp" line="394"/> <source>Error on getting %1 sequence: </source> <translation>Error on getting %1 sequence: </translation> </message> @@ -1537,7 +1582,8 @@ CTTACATAACTACTGACCATGCTCTCTCTTGTCTGTCTCTTATACACATCT @HWI-ST880:181:D1WRUACXX:8:1102:7303:2101 1:Y:0:TAAGGG TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT + -11++4222322<CEE2<:3<3333333<A<CAFE:1?C??::C?00?BD90.</translation> +11++4222322<CEE2<:3<3333333<A<CAFE:1?C??::C?00?BD90. +</translation> </message> <message> <location filename="../src/library/FASTQWorkersLibrary.cpp" line="88"/> @@ -1586,7 +1632,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT </message> <message> <location filename="../src/library/FASTQWorkersLibrary.cpp" line="113"/> - <source>A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extention.</source> + <source>A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extension.</source> <translation>Ð˜Ð¼Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ файла.</translation> </message> <message> @@ -1615,7 +1661,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/CDSearchWorker.cpp" line="135"/> <source> from <u>%1</u></source> - <translation>из <u>%1</u></translation> + <translation> из <u>%1</u></translation> </message> <message> <location filename="../src/library/CDSearchWorker.cpp" line="139"/> @@ -1718,10 +1764,6 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT </context> <context> <name>U2::LocalWorkflow::ComposeResultSubTask</name> - <message> - <source>Compose alignment</source> - <translation type="vanished">СоÑтавить выравнивание</translation> - </message> </context> <context> <name>U2::LocalWorkflow::ConvertFilesFormatPrompter</name> @@ -1733,7 +1775,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/ConvertFilesFormatWorker.cpp" line="75"/> <source> from <u>%1</u></source> - <translation>из <u>%1</u></translation> + <translation> из <u>%1</u></translation> </message> <message> <location filename="../src/library/ConvertFilesFormatWorker.cpp" line="77"/> @@ -1965,12 +2007,22 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <context> <name>U2::LocalWorkflow::ExternalProcessWorker</name> <message> - <location filename="../src/library/IncludedProtoFactoryImpl.cpp" line="140"/> + <location filename="../src/library/IncludedProtoFactoryImpl.cpp" line="144"/> <source>output data</source> <translation>выходные данные</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorker.cpp" line="372"/> + <location filename="../src/library/ExternalProcessWorker.cpp" line="362"/> + <source>Some inputs are finished while other still have not processed messages</source> + <translation>Ðекоторые входные данные обработаны, в то Ð²Ñ€ÐµÐ¼Ñ ÐºÐ°Ðº другие еще не обработали ÑообщениÑ</translation> + </message> + <message> + <location filename="../src/library/ExternalProcessWorker.cpp" line="368"/> + <source>An internal error has been spotted</source> + <translation>Обнаружена внутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ°</translation> + </message> + <message> + <location filename="../src/library/ExternalProcessWorker.cpp" line="463"/> <source>%1 file was not created</source> <translation>%1 файл не был Ñоздан</translation> </message> @@ -1978,15 +2030,15 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <context> <name>U2::LocalWorkflow::ExternalProcessWorkerPrompter</name> <message> - <location filename="../src/library/ExternalProcessWorker.cpp" line="632"/> - <location filename="../src/library/ExternalProcessWorker.cpp" line="647"/> + <location filename="../src/library/ExternalProcessWorker.cpp" line="711"/> + <location filename="../src/library/ExternalProcessWorker.cpp" line="726"/> <source>unset</source> <translation>не указан</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorker.cpp" line="633"/> - <location filename="../src/library/ExternalProcessWorker.cpp" line="652"/> - <location filename="../src/library/ExternalProcessWorker.cpp" line="656"/> + <location filename="../src/library/ExternalProcessWorker.cpp" line="712"/> + <location filename="../src/library/ExternalProcessWorker.cpp" line="731"/> + <location filename="../src/library/ExternalProcessWorker.cpp" line="735"/> <source><u>%1</u></source> <translation><u>%1</u></translation> </message> @@ -2305,7 +2357,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT </message> <message> <location filename="../src/library/FASTQWorkersLibrary.cpp" line="268"/> - <source>A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extention.</source> + <source>A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extension.</source> <translation>Ð˜Ð¼Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ файла.</translation> </message> <message> @@ -2676,7 +2728,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT </message> <message> <location filename="../src/library/FilterBamWorker.cpp" line="153"/> - <source>A name of an output BAM/SAM file. If default of empty value is provided the output name is the name of the first BAM/SAM file with .filtered extention.</source> + <source>A name of an output BAM/SAM file. If default of empty value is provided the output name is the name of the first BAM/SAM file with .filtered extension.</source> <translation>Ð˜Ð¼Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ BAM/SAM файла.</translation> </message> <message> @@ -2696,7 +2748,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT </message> <message> <location filename="../src/library/FilterBamWorker.cpp" line="159"/> - <source>Regions to filter. For BAM output only. chr2 to output the whole chr2. chr2:1000 to output regions of chr 2 starting from 1000. chr2:1000-2000 to ouput regions of chr2 between 1000 and 2000 including the end point. To input multiple regions use the space seprator (e.g. chr1 chr2 chr3:1000-2000).</source> + <source>Regions to filter. For BAM output only. chr2 to output the whole chr2. chr2:1000 to output regions of chr 2 starting from 1000. chr2:1000-2000 to output regions of chr2 between 1000 and 2000 including the end point. To input multiple regions use the space separator (e.g. chr1 chr2 chr3:1000-2000).</source> <translation>учаÑтки Ð´Ð»Ñ Ñ„Ð¸Ð»ÑŒÑ‚Ñ€Ð°Ñ†Ð¸Ð¸. Только в Ñлучае выходных файлов в формате BAM. Ðапример, chr2 - Ð´Ð»Ñ Ð²Ñей chr2. chr2:1000 - Ð´Ð»Ñ Ñ€ÐµÐ³Ð¸Ð¾Ð½Ð¾Ð² chr 2, Ð½Ð°Ñ‡Ð¸Ð½Ð°Ñ Ñ 1000. chr2:1000-2000 - Ð´Ð»Ñ Ñ€ÐµÐ³Ð¸Ð¾Ð½Ð¾Ð² chr2 между 1000 и 2000, Ð²ÐºÐ»ÑŽÑ‡Ð°Ñ ÐºÐ¾Ð½ÐµÑ† интервала. Ð”Ð»Ñ Ð²Ð²Ð¾Ð´Ð° неÑкольких учаÑтков иÑпользуйте пробел (напр, chr1 chr2 chr3:1000-2000).</translation> </message> <message> @@ -2753,7 +2805,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <context> <name>U2::LocalWorkflow::FindAllRegionsTask</name> <message> - <location filename="../src/library/FindWorker.cpp" line="537"/> + <location filename="../src/library/FindWorker.cpp" line="541"/> <source>FindAllRegionsTask</source> <translation>FindAllRegionsTask</translation> </message> @@ -2761,52 +2813,52 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <context> <name>U2::LocalWorkflow::FindPrompter</name> <message> - <location filename="../src/library/FindWorker.cpp" line="247"/> + <location filename="../src/library/FindWorker.cpp" line="251"/> <source>unset</source> <translation>не указан</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="275"/> + <location filename="../src/library/FindWorker.cpp" line="279"/> <source>translated</source> <translation>транÑлированной</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="283"/> + <location filename="../src/library/FindWorker.cpp" line="287"/> <source>A substring must %1.</source> <translation>ПодÑтрока обÑзательна %1.</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="284"/> + <location filename="../src/library/FindWorker.cpp" line="288"/> <source>match a pattern exactly</source> <translation>ÑопоÑтавить паттерн точно</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="286"/> + <location filename="../src/library/FindWorker.cpp" line="290"/> <source>Maximum number of mismatches is %1.</source> <translation>МакÑимальное чиÑло неÑовпадений равно %1.</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="294"/> + <location filename="../src/library/FindWorker.cpp" line="298"/> <source><u>%1</u> pattern(s)</source> <translation><u>%1</u> паттерн(Ñ‹)</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="296"/> + <location filename="../src/library/FindWorker.cpp" line="300"/> <source>patterns from <u>%1</u></source> <translation>паттерны из <u>%1</u></translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="304"/> + <location filename="../src/library/FindWorker.cpp" line="308"/> <source> and <u>%1</u></source> - <translation>и <u>%1</u></translation> + <translation> и <u>%1</u></translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="308"/> + <location filename="../src/library/FindWorker.cpp" line="312"/> <source> using pattern names</source> - <translation>иÑпользовать Ð¸Ð¼Ñ Ð¿Ð°Ñ‚Ñ‚ÐµÑ€Ð½Ð°</translation> + <translation> иÑпользовать Ð¸Ð¼Ñ Ð¿Ð°Ñ‚Ñ‚ÐµÑ€Ð½Ð°</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="311"/> + <location filename="../src/library/FindWorker.cpp" line="315"/> <source>Searches regions in each sequence from <u>%1</u> similar to %2%3.<br/>%4<br/>Searches in <u>%5</u> of a %6sequence. Outputs the regions found annotated as <u>%7</u>.</source> <translation>Ищет регионы в каждой поÑледовательноÑти Ð½Ð°Ñ‡Ð¸Ð½Ð°Ñ Ñ <u>%1</u> по %2%3.<br/>%4<br/>Ищет в <u>%5</u> %6 поÑледовательноÑÑ‚ÑÑ…. Выходные регионы аннотируютÑÑ ÐºÐ°Ðº <u>%7</u>.</translation> </message> @@ -2814,143 +2866,165 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <context> <name>U2::LocalWorkflow::FindWorker</name> <message> - <location filename="../src/library/FindWorker.cpp" line="502"/> - <location filename="../src/library/FindWorker.cpp" line="523"/> + <location filename="../src/library/FindWorker.cpp" line="506"/> + <location filename="../src/library/FindWorker.cpp" line="527"/> <source>Found %1 matches of pattern '%2'</source> <translation>Ðайдено %1 вхождений паттерна "%2"</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="131"/> + <location filename="../src/library/FindWorker.cpp" line="127"/> <source>Input Data</source> <translation>Ð’Ñ…Ð¾Ð´Ð½Ð°Ñ Ð¿Ð¾ÑледовательноÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="132"/> + <location filename="../src/library/FindWorker.cpp" line="83"/> + <location filename="../src/library/FindWorker.cpp" line="174"/> + <source>Pattern(s)</source> + <translation>Паттерн(Ñ‹)</translation> + </message> + <message> + <location filename="../src/library/FindWorker.cpp" line="83"/> + <location filename="../src/library/FindWorker.cpp" line="178"/> + <source>Pattern file</source> + <translation>Файл Ñ Ð¿Ð°Ñ‚Ñ‚ÐµÑ€Ð½Ð¾Ð¼</translation> + </message> + <message> + <location filename="../src/library/FindWorker.cpp" line="128"/> <source>An input sequence to search in.</source> <translation>ПоÑледовательноÑÑ‚ÑŒ, Ð´Ð»Ñ ÐºÐ¾Ñ‚Ð¾Ñ€Ð¾Ð¹ применÑетÑÑ Ð°Ð»Ð³Ð¾Ñ€Ð¸Ñ‚Ð¼ поиÑка.</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="135"/> + <location filename="../src/library/FindWorker.cpp" line="131"/> <source>Pattern Annotations</source> <translation>Ðайденные аннотации</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="136"/> + <location filename="../src/library/FindWorker.cpp" line="132"/> <source>The regions found.</source> <translation>Ðннотации, найденные Ð´Ð»Ñ Ð¿Ð¾ÑледовательноÑти.</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="147"/> + <location filename="../src/library/FindWorker.cpp" line="143"/> <source>Name of the result annotations.</source> <translation>Ð˜Ð¼Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ð¹ Ð´Ð»Ñ Ð½Ð°Ð¹Ð´ÐµÐ½Ð½Ñ‹Ñ… регионов.</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="150"/> + <location filename="../src/library/FindWorker.cpp" line="146"/> <source>Use pattern name</source> <translation>ИÑпользовать Ð¸Ð¼Ñ Ð¿Ð°Ñ‚Ñ‚ÐµÑ€Ð½Ð°</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="151"/> + <location filename="../src/library/FindWorker.cpp" line="147"/> <source>If patterns are loaded from a file, use names of pattern sequences as annotation names. The name from the parameters is used by default.</source> <translation>ЕÑли паттерны загружаютÑÑ Ð¸Ð· файла, иÑпользуйте имена паттернов поÑледовательноÑтей как имена аннотаций. Имена из параметров иÑпользуютÑÑ Ð¿Ð¾ умолчанию.</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="153"/> + <location filename="../src/library/FindWorker.cpp" line="149"/> <source>Max Mismatches</source> <translation>ДопуÑтимо неÑовпадений</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="154"/> + <location filename="../src/library/FindWorker.cpp" line="150"/> <source>Maximum number of mismatches between a substring and a pattern.</source> <translation>МакÑимальное допуÑтимое чиÑло неÑовпадений между подпоÑледовательноÑтью и паттерном.</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="158"/> + <location filename="../src/library/FindWorker.cpp" line="154"/> <source>Allow Insertions/Deletions</source> <translation>Разрешить вÑтавки/делеции</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="159"/> + <location filename="../src/library/FindWorker.cpp" line="155"/> <source>Takes into account possibility of insertions/deletions when searching. By default substitutions are only considered.</source> <translation>Ð’ Ñлучае когда допуÑтимы неÑÐ¾Ð²Ð¿Ð°Ð´ÐµÐ½Ð¸Ñ Ð¼ÐµÐ¶Ð´Ñƒ подпоÑледовательноÑтью и паттерном учитывает вÑтавки/делеции. По умолчанию учитываютÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ замены.</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="163"/> + <location filename="../src/library/FindWorker.cpp" line="159"/> <source>Support ambiguous bases</source> <translation>Поддержка неопределенных баз</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="164"/> + <location filename="../src/library/FindWorker.cpp" line="160"/> <source>Performs correct handling of ambiguous bases. When this option is activated insertions and deletions are not considered. </source> - <translation>ВыполнÑет корректную обработку неопределенных баз. Когда Ñта Ð¾Ð¿Ñ†Ð¸Ñ Ð²ÐºÐ»ÑŽÑ‡ÐµÐ½Ð° вÑтавки и ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ð½Ðµ раÑÑматриваютÑÑ.</translation> + <translation>ВыполнÑет корректную обработку неопределенных баз. Когда Ñта Ð¾Ð¿Ñ†Ð¸Ñ Ð²ÐºÐ»ÑŽÑ‡ÐµÐ½Ð° вÑтавки и ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ð½Ðµ раÑÑматриваютÑÑ. </translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="168"/> + <location filename="../src/library/FindWorker.cpp" line="164"/> <source>Search in Translation</source> <translation>ИÑкать в транÑлÑции</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="169"/> + <location filename="../src/library/FindWorker.cpp" line="165"/> <source>Translates a supplied nucleotide sequence to protein and searches in the translated sequence.</source> <translation>Указывает транÑлировать входную нуклеотидную поÑледовательноÑÑ‚ÑŒ в протеиновую и иÑкать указанный паттерн в полученной протеиновой поÑледовательноÑти.</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="191"/> + <location filename="../src/library/FindWorker.cpp" line="175"/> + <source>Semicolon-separated list of patterns to search for.</source> + <translation>СпиÑок паттернов Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка.</translation> + </message> + <message> + <location filename="../src/library/FindWorker.cpp" line="179"/> + <source>Load pattern from file in any sequence format or in newline-delimited format.</source> + <translation>Загружает паттерн из файла в формате поÑледовательноÑти или в формате Ñтрок Ñ Ñ€Ð°Ð·Ð´ÐµÐ»Ð¸Ñ‚ÐµÐ»Ñми.</translation> + </message> + <message> + <location filename="../src/library/FindWorker.cpp" line="195"/> <source>Searches regions in a sequence similar to a pattern sequence. Outputs a set of annotations.</source> <translation>ПоиÑк подпоÑледовательноÑтей, похожих на указанный паттерн, в каждой входной поÑледовательноÑти (нуклеотидной или протеиновой).</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="260"/> + <location filename="../src/library/FindWorker.cpp" line="264"/> <source>both strands</source> <translation>в обеих цепÑÑ…</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="263"/> + <location filename="../src/library/FindWorker.cpp" line="267"/> <source>direct strand</source> <translation>прÑмой цепи</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="266"/> + <location filename="../src/library/FindWorker.cpp" line="270"/> <source>complement strand</source> <translation>комплементарной цепи</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="351"/> + <location filename="../src/library/FindWorker.cpp" line="355"/> <source>Load file with patterns</source> <translation>Загрузить файл Ñ Ð¿Ð°Ñ‚Ñ‚ÐµÑ€Ð½Ð°Ð¼Ð¸</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="421"/> + <location filename="../src/library/FindWorker.cpp" line="425"/> <source>Empty pattern given</source> <translation>ПуÑтой паттерн</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="446"/> + <location filename="../src/library/FindWorker.cpp" line="450"/> <source>Find algorithm subtasks</source> <translation>Подзадача алгоритма поиÑка</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="146"/> + <location filename="../src/library/FindWorker.cpp" line="142"/> <source>Annotate as</source> <translation>Ðннотации</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="173"/> + <location filename="../src/library/FindWorker.cpp" line="169"/> <source>Qualifier name for pattern name</source> <translation>Ð˜Ð¼Ñ ÐºÐ²Ð°Ð»Ð¸Ñ„Ð°ÐµÑ€Ð° Ð´Ð»Ñ Ð¸Ð¼ÐµÐ½Ð¸ паттерна</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="174"/> + <location filename="../src/library/FindWorker.cpp" line="170"/> <source>Name of qualifier in result annotations which is containing a pattern name.</source> <translation>Ð˜Ð¼Ñ ÐºÐ²Ð°Ð»Ð¸Ñ„Ð°ÐµÑ€Ð° в результирующих аннотациÑÑ…, которое Ñодержит Ð¸Ð¼Ñ Ð¿Ð°Ñ‚Ñ‚ÐµÑ€Ð½Ð°.</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="190"/> + <location filename="../src/library/FindWorker.cpp" line="194"/> <source>Find Pattern</source> <translation>ПоиÑк подÑтроки</translation> </message> <message> - <location filename="../src/library/FindWorker.cpp" line="375"/> + <location filename="../src/library/FindWorker.cpp" line="379"/> <source>Null sequence supplied to FindWorker: %1</source> <translation>ПуÑÑ‚Ð°Ñ Ð¿Ð¾ÑледовательноÑÑ‚ÑŒ Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка подÑтрок: %1</translation> </message> @@ -3000,20 +3074,12 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/GetFileListWorker.cpp" line="109"/> <source>Read File URL(s)</source> - <translation type="unfinished"></translation> + <translation>Чтение ÑпиÑка URL файлов</translation> </message> <message> <location filename="../src/library/GetFileListWorker.cpp" line="110"/> <source>Input one or several files in any format. The element outputs the file(s) URL(s).</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Produces URL(s) to files from specified folders.</source> - <translation type="vanished">Ñтот Ñлемент производит пути до файлов из указанных папок.</translation> - </message> - <message> - <source>File List</source> - <translation type="vanished">Получение ÑпиÑка файлов</translation> + <translation>Введите один или неÑколько файлов в любом формате. Ðтот Ñлемент выдаÑÑ‚ URL Ñтих файлов.</translation> </message> </context> <context> @@ -3021,7 +3087,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/GetReadListWorker.cpp" line="208"/> <source>Read and output the files URLs.</source> - <translation type="unfinished"></translation> + <translation>Читает и выдаёт URL файлов.</translation> </message> </context> <context> @@ -3029,73 +3095,73 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/GetReadListWorker.cpp" line="55"/> <source>Source URL 1</source> - <translation type="unfinished"></translation> + <translation>URL 1</translation> </message> <message> <location filename="../src/library/GetReadListWorker.cpp" line="60"/> <source>Source URL 2</source> - <translation type="unfinished"></translation> + <translation>URL 2</translation> </message> <message> <location filename="../src/library/GetReadListWorker.cpp" line="95"/> <source>Missing right PE read for the left read: %1</source> - <translation type="unfinished"></translation> + <translation>Пропущен правый PE рид Ð´Ð»Ñ Ð»ÐµÐ²Ð¾Ð³Ð¾ рида: %1</translation> </message> <message> <location filename="../src/library/GetReadListWorker.cpp" line="105"/> <source>Missing left PE read for the right read: %1</source> - <translation type="unfinished"></translation> + <translation>Пропущен левый PE рид Ð´Ð»Ñ Ð¿Ñ€Ð°Ð²Ð¾Ð³Ð¾ рида: %1</translation> </message> <message> <location filename="../src/library/GetReadListWorker.cpp" line="130"/> <location filename="../src/library/GetReadListWorker.cpp" line="163"/> <source>Output File</source> - <translation type="unfinished">Выходной файл</translation> + <translation>Выходной файл</translation> </message> <message> <location filename="../src/library/GetReadListWorker.cpp" line="131"/> <source>The port outputs one or several URLs.</source> - <translation type="unfinished"></translation> + <translation>Порт выдаёт один или неÑколько URL.</translation> </message> <message> <location filename="../src/library/GetReadListWorker.cpp" line="136"/> <source>Input URL</source> - <translation type="unfinished">Входной путь</translation> + <translation>Входной URL</translation> </message> <message> <location filename="../src/library/GetReadListWorker.cpp" line="141"/> <source>Read FASTQ File with SE Reads</source> - <translation type="unfinished"></translation> + <translation>Чтение FASTQ файла Ñ SE ридами</translation> </message> <message> <location filename="../src/library/GetReadListWorker.cpp" line="142"/> <source>Input one or several files with NGS single-end reads in FASTQ format. The element outputs the file(s) URL(s).</source> - <translation type="unfinished"></translation> + <translation>Введите один или неÑколько файлов Ñ Ð¾Ð´Ð½Ð¾Ñторонними NGS ридами в формате FASTQ. Ðлемент выведет URL Ñтих файла(ов).</translation> </message> <message> <location filename="../src/library/GetReadListWorker.cpp" line="164"/> <source>The port outputs one or several pairs of URL(s).</source> - <translation type="unfinished"></translation> + <translation>Порт выдаёт один или неÑколько пар URL.</translation> </message> <message> <location filename="../src/library/GetReadListWorker.cpp" line="169"/> <source>Left PE reads</source> - <translation type="unfinished"></translation> + <translation>Левые PE риды</translation> </message> <message> <location filename="../src/library/GetReadListWorker.cpp" line="170"/> <source>Right PE reads</source> - <translation type="unfinished"></translation> + <translation>Правые PE риды</translation> </message> <message> <location filename="../src/library/GetReadListWorker.cpp" line="176"/> <source>Read FASTQ Files with PE Reads</source> - <translation type="unfinished"></translation> + <translation>Чтение FASTQ файлов Ñ PE ридами</translation> </message> <message> <location filename="../src/library/GetReadListWorker.cpp" line="177"/> <source>Input one or several pairs of files with NGS paired-end reads in FASTQ format. The element outputs the corresponding pairs of URLs.</source> - <translation type="unfinished"></translation> + <translation>Введите один или неÑколько пар файлов Ñ Ð¿Ð°Ñ€Ð½Ñ‹Ð¼Ð¸ NGS ридами в формате FASTQ. Ðлемент выведет пары URL Ñтих файла(ов).</translation> </message> </context> <context> @@ -3217,39 +3283,20 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <translation>ОбъединÑет входные аннотации Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ñми из <u>%1</u>.</translation> </message> </context> -<context> - <name>U2::LocalWorkflow::KAlignSubTask</name> - <message> - <source>Max region size: %1</source> - <translation type="vanished">Max region size: %1</translation> - </message> - <message> - <source>Core region: %1-%2</source> - <translation type="vanished">Core region: %1-%2</translation> - </message> - <message> - <source>The %1 algorithm is not found. Add the %1 plugin.</source> - <translation type="vanished">The %1 algorithm is not found. Add the %1 plugin.</translation> - </message> - <message> - <source>The %1 algorithm is not found. Check that the %1 plugin is up to date.</source> - <translation type="vanished">The %1 algorithm is not found. Check that the %1 plugin is up to date.</translation> - </message> -</context> <context> <name>U2::LocalWorkflow::LaunchExternalToolTask</name> <message> - <location filename="../src/library/ExternalProcessWorker.cpp" line="519"/> + <location filename="../src/library/ExternalProcessWorker.cpp" line="637"/> <source>Launch external process task</source> <translation>ЗапуÑк задачи внутреннего процеÑÑа</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorker.cpp" line="593"/> + <location filename="../src/library/ExternalProcessWorker.cpp" line="671"/> <source>Running external process: %1</source> <translation>ЗапуÑкаетÑÑ Ð²Ð½ÑƒÑ‚Ñ€ÐµÐ½Ð½Ð¸Ð¹ процеÑÑ: %1</translation> </message> <message> - <location filename="../src/library/ExternalProcessWorker.cpp" line="598"/> + <location filename="../src/library/ExternalProcessWorker.cpp" line="676"/> <source>Can't launch %1</source> <translation>Ðевозможно запуÑтить %1</translation> </message> @@ -3444,7 +3491,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT </message> <message> <location filename="../src/library/MergeBamWorker.cpp" line="115"/> - <source>A name of an output BAM file. If default of empty value is provided the output name is the name of the first BAM file with .merged.bam extention.</source> + <source>A name of an output BAM file. If default of empty value is provided the output name is the name of the first BAM file with .merged.bam extension.</source> <translation>Ð˜Ð¼Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ BAM файла.</translation> </message> <message> @@ -3478,7 +3525,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/FASTQWorkersLibrary.cpp" line="453"/> <source> from <u>%1</u></source> - <translation>из <u>%1</u></translation> + <translation> из <u>%1</u></translation> </message> <message> <location filename="../src/library/FASTQWorkersLibrary.cpp" line="455"/> @@ -3545,7 +3592,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT </message> <message> <location filename="../src/library/FASTQWorkersLibrary.cpp" line="493"/> - <source>A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extention.</source> + <source>A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extension.</source> <translation>Ð˜Ð¼Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ файла.</translation> </message> <message> @@ -3614,14 +3661,10 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <source>One of the two input ports of the <i>Multiplexer</i> element. When rule "1 to many" is set up, each message from the other port is concatenated with messages from this port.</source> <translation>Один из входных портов <i>МультиплекÑера</i>. Ð’ Ñлучае, еÑли задано правило мультиплекÑÐ¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ "1 to many", ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¸Ð· другого порта объединÑÑŽÑ‚ÑÑ Ñ ÐºÐ°Ð¶Ð´Ñ‹Ð¼ Ñообщением из Ñтого порта.</translation> </message> - <message> - <source>Multiplexed output</source> - <translation type="vanished">МультиплекÑированные ÑообщениÑ</translation> - </message> <message> <location filename="../src/library/MultiplexerWorker.cpp" line="272"/> <source>Multiplexed Output</source> - <translation type="unfinished"></translation> + <translation>МультиплекÑированные ÑообщениÑ</translation> </message> <message> <location filename="../src/library/MultiplexerWorker.cpp" line="273"/> @@ -3654,13 +3697,6 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <translation>Ñтот Ñлемент позволÑет объединÑÑ‚ÑŒ данные из двух различных иÑточников, а именно объединÑÑ‚ÑŒ ÑообщениÑ, пришедшие во входные порты, в комплекÑные мультиплекÑированные ÑообщениÑ. СпоÑоб Ð¾Ð±ÑŠÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ñообщений задаетÑÑ Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ параметра <i>Правило мультиплекÑированиÑ</i>.</translation> </message> </context> -<context> - <name>U2::LocalWorkflow::PairwiseAlignmentTask</name> - <message> - <source>Can't translate read sequence to reverse complement</source> - <translation type="vanished">Can't translate read sequence to reverse complement</translation> - </message> -</context> <context> <name>U2::LocalWorkflow::PassFilterPrompter</name> <message> @@ -3717,92 +3753,6 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <translation>Ñтот Ñлемент отфильтровывает входные данные по заданному значению (или значениÑм).</translation> </message> </context> -<context> - <name>U2::LocalWorkflow::QualityTrimPrompter</name> - <message> - <source>unset</source> - <translation type="vanished">не указан</translation> - </message> - <message> - <source><u>%1</u></source> - <translation type="vanished"><u>%1</u></translation> - </message> - <message> - <source>Trim input sequence %1 from the end, using the quality threshold.</source> - <translation type="vanished">Обрезает входные поÑледовательноÑти %1 от конца, иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ Ð¿Ð¾Ñ€Ð¾Ð³ качеÑтва.</translation> - </message> -</context> -<context> - <name>U2::LocalWorkflow::QualityTrimWorker</name> - <message> - <source>FASTQ Quality Trimmer</source> - <translation type="vanished">Обрезание поÑледовательноÑтей в файле FASTQ Ñ ÑƒÑ‡ÐµÑ‚Ð¾Ð¼ качеÑтва прочтениÑ</translation> - </message> - <message> - <source>The workflow scans each input sequence from the end to find the first position where the quality is greater or equal to the minimum quality threshold. Then it trims the sequence to that position. If a the whole sequence has quality less than the threshold or the length of the output sequence less than the minimum length threshold then the sequence is skipped.</source> - <translation type="vanished">Схема Ñканирует каждую входную поÑледовательноÑÑ‚ÑŒ Ð½Ð°Ñ‡Ð¸Ð½Ð°Ñ Ñ ÐºÐ¾Ð½Ñ†Ð° Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка первой позиции где качеÑтво больше или равно минимальному порогу качеÑтва. ПоÑле Ñтого проиÑходит подрезание до Ñтой позиции.</translation> - </message> - <message> - <source>Input File</source> - <translation type="vanished">Входной файл</translation> - </message> - <message> - <source>Set of FASTQ reads files</source> - <translation type="vanished">Ðабор файлов Ñ FASTQ ридами</translation> - </message> - <message> - <source>Output File</source> - <translation type="vanished">Выходной файл</translation> - </message> - <message> - <source>Output FASTQ files</source> - <translation type="vanished">Выхордные FASTQ файлы</translation> - </message> - <message> - <source>Output folder</source> - <translation type="vanished">Ð’Ñ‹Ñ…Ð¾Ð´Ð½Ð°Ñ Ð¿Ð°Ð¿ÐºÐ°</translation> - </message> - <message> - <source>Select an output folder. <b>Custom</b> - specify the output folder in the 'Custom folder' parameter. <b>Workflow</b> - internal workflow folder. <b>Input file</b> - the folder of the input file.</source> - <translation type="vanished">выберите выходную папку. <b>ЧаÑтнаÑ</b> - укажите папку в параметре 'ЧаÑÑ‚Ð½Ð°Ñ Ð¿Ð°Ð¿ÐºÐ°'. <b>ЗаданнаÑ</b> - внутреннÑÑ Ð¿Ð°Ð¿ÐºÐ° дизайнера. <b>Входной файл</b> - папка входного файла.</translation> - </message> - <message> - <source>Custom folder</source> - <translation type="vanished">ЧаÑÑ‚Ð½Ð°Ñ Ð¿Ð°Ð¿ÐºÐ°</translation> - </message> - <message> - <source>Select the custom output folder.</source> - <translation type="vanished">Укажите чаÑтную выходную папку.</translation> - </message> - <message> - <source>Output file name</source> - <translation type="vanished">Ð˜Ð¼Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ файла</translation> - </message> - <message> - <source>A name of an output file. If default of empty value is provided the output name is the name of the first file with additional extention.</source> - <translation type="vanished">Ð˜Ð¼Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ файла.</translation> - </message> - <message> - <source>Quality threshold</source> - <translation type="vanished">Порог качеÑтва</translation> - </message> - <message> - <source>Min Length</source> - <translation type="vanished">ÐœÐ¸Ð½Ð¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ Ð´Ð»Ð¸Ð½Ð°</translation> - </message> - <message> - <source>Custom</source> - <translation type="vanished">ЧаÑтнаÑ</translation> - </message> - <message> - <source>Input file</source> - <translation type="vanished">Входной файл</translation> - </message> - <message> - <source>Workflow</source> - <translation type="vanished">Схема</translation> - </message> -</context> <context> <name>U2::LocalWorkflow::RCWorker</name> <message> @@ -3877,7 +3827,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/ReverseComplementWorker.cpp" line="99"/> <source> from <u>%1</u></source> - <translation>из <u>%1</u></translation> + <translation> из <u>%1</u></translation> </message> <message> <location filename="../src/library/ReverseComplementWorker.cpp" line="104"/> @@ -3923,14 +3873,10 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <source>Read Annotations</source> <translation>Чтение аннотаций</translation> </message> - <message> - <source>Reads annotations from files. All annotation file formats supported by UGENE are allowed as input to this element.</source> - <translation type="vanished">Ñтот Ñлемент Ñчитывает аннотации из файлов.</translation> - </message> <message> <location filename="../src/library/ReadAnnotationsWorker.cpp" line="138"/> <source>Input one or several files with annotations: a file may also contain a sequence (e.g. GenBank format) or contain annotations only (e.g. GTF format). The element outputs message(s) with the annotations data.</source> - <translation type="unfinished"></translation> + <translation>Введите один или неÑколько файлов Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ñми: файл может также Ñодержать поÑледовательноÑÑ‚ÑŒ (например в формате GenBank) или Ñодержать только аннотации (например в формате GTF). Ðлемент выведет данные аннотаций в виде ÑообщениÑ(ий).</translation> </message> <message> <location filename="../src/library/ReadAnnotationsWorker.cpp" line="148"/> @@ -3977,22 +3923,6 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <source>Merge all annotation tables from dataset</source> <translation>Соединить вÑе таблицы аннотаций в одну</translation> </message> - <message> - <source>If the file contains more than one annotation table, <i>Split</i> mode sends them "as is" to the output, while <i>Merge</i> appends all the annotation tables and outputs the sole merged annotation table.In <i>Merge files</i> is the same as <i>Merge</i> but it operates with all annotation tables from all files of one dataset.</source> - <translation type="vanished">ЕÑли файл Ñодержит более одной таблицы аннотаций, <i>Разбиение</i> отправлÑет вÑе аннотации на выход, <i>Сшивка</i> добавлÑет вÑе таблицы и выводит одну объединенную таблицу аннотаций. Ð’ <i>Сшивка файлов</i> одинаково Ñ <i>Сшивка</i> но работает Ñо вÑеми таблицами аннотаций из вÑех файлов одного набора.</translation> - </message> - <message> - <source>Split</source> - <translation type="vanished">Разбиение</translation> - </message> - <message> - <source>Merge</source> - <translation type="vanished">Сшивка</translation> - </message> - <message> - <source>Merge files</source> - <translation type="vanished">Сшивка файлов</translation> - </message> <message> <location filename="../src/library/ReadAnnotationsWorker.cpp" line="180"/> <source>Reads annotations from <u>%1</u>.</source> @@ -4001,23 +3931,15 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT </context> <context> <name>U2::LocalWorkflow::ReadAssemblyWorker</name> - <message> - <source>Read Assembly</source> - <translation type="vanished">Чтение Ñборки</translation> - </message> - <message> - <source>Reads assembly from files. All assembly file formats supported by UGENE are allowed as input to this element.</source> - <translation type="vanished">Ñтот Ñлемент Ñчитывает Ñборки из файлов.</translation> - </message> <message> <location filename="../src/library/ReadAssemblyWorker.cpp" line="122"/> <source>Read NGS Reads Assembly</source> - <translation type="unfinished"></translation> + <translation>Чтение NGS Ñборки</translation> </message> <message> <location filename="../src/library/ReadAssemblyWorker.cpp" line="123"/> <source>Input one or several files with assembled NGS reads in SAM, BAM, or UGENEDB format. The element outputs message(s) with the assembled reads data.<br/><br/>Note that some tools require URL(s) of the files as input, not the assembled reads data.</source> - <translation type="unfinished"></translation> + <translation>ВВедите один или неÑколько файлов Ñ Ñобранными NGS ридами в SAM, BAM или UGENEDB формате. Ðлемент выведет Ñообщение(иÑ) Ñ Ñобранными данными ридов.<br/><br/>Обратите внимание, что некоторые инÑтрументы требуют URL-адреÑа файлов в качеÑтве входных данных, а не Ñобранные риды.</translation> </message> <message> <location filename="../src/library/ReadAssemblyWorker.cpp" line="135"/> @@ -4063,17 +3985,13 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <name>U2::LocalWorkflow::ReadVariationWorker</name> <message> <location filename="../src/library/ReadVariationWorker.cpp" line="187"/> - <source>Read Variations</source> + <source>Read Variants</source> <translation>Чтение вариаций</translation> </message> - <message> - <source>Reads variations from files and produces variations tracks. All variation file formats supported by UGENE are allowed as input to this element.</source> - <translation type="vanished">Ñтот Ñлемент читает вариации из файлов и производит наборы вариаций.</translation> - </message> <message> <location filename="../src/library/ReadVariationWorker.cpp" line="188"/> - <source>Input one or several files with variations in one of the formats, supported by UGENE (e.g. VCF). The element outputs message(s) with the variations data.</source> - <translation type="unfinished"></translation> + <source>Input one or several files with variants in one of the formats, supported by UGENE (e.g. VCF). The element outputs message(s) with the variants data.</source> + <translation>Введите один или неÑколько файлов Ñ Ð²Ð°Ñ€Ð¸Ð°Ñ†Ð¸Ñми в одном из поддерживаемых форматов. Ðлемент выведет ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ñ Ð´Ð°Ð½Ð½Ñ‹Ð¼Ð¸ вариаций.</translation> </message> <message> <location filename="../src/library/ReadVariationWorker.cpp" line="198"/> @@ -4157,23 +4075,15 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <source>failed to load item '%1' from '%2' DB : %3</source> <translation>Ðе удалоÑÑŒ загрузить '%1' из базы данных '%2': %3</translation> </message> - <message> - <source>Read from Remote Database</source> - <translation type="vanished">Чтение из удаленной базы данных</translation> - </message> - <message> - <source>Reads sequences and annotations if any from a remote database.</source> - <translation type="vanished">Ñтот Ñлемент загружает поÑледовательноÑти, а также аннотации в Ñлучае их наличиÑ, из удаленной базы данных.</translation> - </message> <message> <location filename="../src/library/RemoteDBFetcherWorker.cpp" line="302"/> <source>Read Sequence from Remote Database</source> - <translation type="unfinished"></translation> + <translation>Чтение поÑледовательноÑти из удаленной базы данных</translation> </message> <message> <location filename="../src/library/RemoteDBFetcherWorker.cpp" line="303"/> <source>Download sequence(s) with the specified ID(s) from one of remote databases: NCBI, Ensembl, PDB, etc. The sequences are downloaded with the associated annotations in a file format, specific for the selected database. The element outputs message(s) with the sequence and annotations data.<br/><br/>Make sure the Internet connection is active.</source> - <translation type="unfinished"></translation> + <translation>Скачивает поÑледовательноÑÑ‚ÑŒ(ти) Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð½Ñ‹Ð¼Ð¸ ID из одной из удалённых баз данных: NCBI, Ensembl, PDB и Ñ‚. д. ПоÑледовательноÑти будут Ñкачаны Ñ Ð°ÑÑоциированными аннотациÑми. Ðлемент выведет поÑледовательноÑти и аннотации.</translation> </message> <message> <location filename="../src/library/RemoteDBFetcherWorker.cpp" line="311"/> @@ -4408,7 +4318,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT </message> <message> <location filename="../src/library/RmdupBamWorker.cpp" line="117"/> - <source>A name of an output BAM file. If default of empty value is provided the output name is the name of the first BAM file with .nodup.bam extention.</source> + <source>A name of an output BAM file. If default of empty value is provided the output name is the name of the first BAM file with .nodup.bam extension.</source> <translation>Ð˜Ð¼Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ BAM файла.</translation> </message> <message> @@ -4455,32 +4365,32 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <context> <name>U2::LocalWorkflow::SamtoolsRmdupTask</name> <message> - <location filename="../src/library/RmdupBamWorker.cpp" line="293"/> + <location filename="../src/library/RmdupBamWorker.cpp" line="294"/> <source>Samtool rmdup for %1 </source> <translation>Samtool rmdup Ð´Ð»Ñ %1 </translation> </message> <message> - <location filename="../src/library/RmdupBamWorker.cpp" line="299"/> + <location filename="../src/library/RmdupBamWorker.cpp" line="300"/> <source>No assembly URL to filter</source> <translation>No assembly URL to filter</translation> </message> <message> - <location filename="../src/library/RmdupBamWorker.cpp" line="305"/> + <location filename="../src/library/RmdupBamWorker.cpp" line="306"/> <source>Folder does not exist: </source> <translation>Folder does not exist: </translation> </message> <message> - <location filename="../src/library/RmdupBamWorker.cpp" line="339"/> + <location filename="../src/library/RmdupBamWorker.cpp" line="340"/> <source>Can not run %1 tool</source> <translation>Can not run %1 tool</translation> </message> <message> - <location filename="../src/library/RmdupBamWorker.cpp" line="345"/> + <location filename="../src/library/RmdupBamWorker.cpp" line="346"/> <source>%1 tool exited with code %2</source> <translation>%1 tool exited with code %2</translation> </message> <message> - <location filename="../src/library/RmdupBamWorker.cpp" line="347"/> + <location filename="../src/library/RmdupBamWorker.cpp" line="348"/> <source>Tool %1 finished successfully</source> <translation>Tool %1 finished successfully</translation> </message> @@ -4542,22 +4452,22 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <context> <name>U2::LocalWorkflow::ScriptWorker</name> <message> - <location filename="../src/library/IncludedProtoFactoryImpl.cpp" line="56"/> + <location filename="../src/library/IncludedProtoFactoryImpl.cpp" line="60"/> <source>For input port was set empty data type</source> <translation>Ð”Ð»Ñ Ð²Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ порта указан пуÑтой тип данных</translation> </message> <message> - <location filename="../src/library/IncludedProtoFactoryImpl.cpp" line="70"/> + <location filename="../src/library/IncludedProtoFactoryImpl.cpp" line="74"/> <source>For output port was set empty data type</source> <translation>Ð”Ð»Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ порта указан пуÑтой тип данных</translation> </message> <message> - <location filename="../src/library/IncludedProtoFactoryImpl.cpp" line="79"/> + <location filename="../src/library/IncludedProtoFactoryImpl.cpp" line="83"/> <source>Input data</source> <translation>Входные данные</translation> </message> <message> - <location filename="../src/library/IncludedProtoFactoryImpl.cpp" line="80"/> + <location filename="../src/library/IncludedProtoFactoryImpl.cpp" line="84"/> <source>Output data</source> <translation>Выходные данные</translation> </message> @@ -4573,7 +4483,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/ScriptWorker.cpp" line="83"/> <source>Error in line </source> - <translation>Ошибка в Ñтроке</translation> + <translation>Ошибка в Ñтроке </translation> </message> <message> <location filename="../src/library/ScriptWorker.cpp" line="63"/> @@ -4651,10 +4561,6 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <source>Trimming quality threshold</source> <translation>Порог качеÑтва Ð´Ð»Ñ Ð¾Ð±Ñ€ÐµÐ·Ð°Ð½Ð¸Ñ</translation> </message> - <message> - <source>Quality threshold</source> - <translation type="vanished">Порог качеÑтва</translation> - </message> <message> <location filename="../src/library/SequenceQualityTrimWorker.cpp" line="133"/> <source>Quality threshold for trimming.</source> @@ -4665,10 +4571,6 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <source>Min length</source> <translation>ÐœÐ¸Ð½Ð¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ Ð´Ð»Ð¸Ð½Ð°</translation> </message> - <message> - <source>Min Length</source> - <translation type="vanished">ÐœÐ¸Ð½Ð¸Ð¼Ð°Ð»ÑŒÐ½Ð°Ñ Ð´Ð»Ð¸Ð½Ð°</translation> - </message> <message> <location filename="../src/library/SequenceQualityTrimWorker.cpp" line="136"/> <source>Too short reads are discarded by the filter.</source> @@ -4700,7 +4602,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/SequenceSplitWorker.cpp" line="74"/> <source>%1 it if annotation marks translated subsequence, </source> - <translation>%1 еÑли Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ñ Ð¼Ð°Ñ€ÐºÐ¸Ñ€ÑƒÐµÑ‚ транÑлированную подпоÑледовательноÑÑ‚ÑŒ</translation> + <translation>%1 еÑли Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ñ Ð¼Ð°Ñ€ÐºÐ¸Ñ€ÑƒÐµÑ‚ транÑлированную подпоÑледовательноÑÑ‚ÑŒ </translation> </message> <message> <location filename="../src/library/SequenceSplitWorker.cpp" line="75"/> @@ -4710,7 +4612,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/SequenceSplitWorker.cpp" line="82"/> <source>make it %1 if annotation is located on complement strand, </source> - <translation>%1 Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ñ Ñ€Ð°ÑполагаетÑÑ Ð² комплементарной цепи</translation> + <translation>%1 Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ñ Ñ€Ð°ÑполагаетÑÑ Ð² комплементарной цепи </translation> </message> <message> <location filename="../src/library/SequenceSplitWorker.cpp" line="91"/> @@ -4887,7 +4789,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/SortBamWorker.cpp" line="71"/> <source> from <u>%1</u></source> - <translation>из <u>%1</u></translation> + <translation> из <u>%1</u></translation> </message> <message> <location filename="../src/library/SortBamWorker.cpp" line="73"/> @@ -4954,7 +4856,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT </message> <message> <location filename="../src/library/SortBamWorker.cpp" line="115"/> - <source>A name of an output BAM file. If default of empty value is provided the output name is the name of the first BAM file with .sorted.bam extention.</source> + <source>A name of an output BAM file. If default of empty value is provided the output name is the name of the first BAM file with .sorted.bam extension.</source> <translation>Ð˜Ð¼Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ð¾Ð³Ð¾ BAM файла.</translation> </message> <message> @@ -4998,7 +4900,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/Text2SequenceWorker.cpp" line="211"/> <source> from <u>%1</u></source> - <translation>из <u>%1</u></translation> + <translation> из <u>%1</u></translation> </message> <message> <location filename="../src/library/Text2SequenceWorker.cpp" line="214"/> @@ -5167,7 +5069,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/WriteAnnotationsWorker.cpp" line="563"/> <source> in the </source> - <translation>в</translation> + <translation> в </translation> </message> <message> <location filename="../src/library/WriteAnnotationsWorker.cpp" line="563"/> @@ -5256,15 +5158,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/WriteAnnotationsWorker.cpp" line="484"/> <source>The element gets message(s) with annotations data and saves the data to the specified file(s) in one of the appropriate formats (GenBank, GTF, etc.).</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Annotations name</source> - <translation type="vanished">Ð˜Ð¼Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ð¹</translation> - </message> - <message> - <source>Name of the saved annotations. This option is only available for document formats that support saving of annotations names.</source> - <translation type="vanished">Ð¸Ð¼Ñ Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð°Ð½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ð¹. Ðтот параметр доÑтупен только Ð´Ð»Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð¾Ð², которые поддерживают Ñохранение имен аннотаций.</translation> + <translation>Ðтот Ñлемент ÑохранÑет ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ñ Ð´Ð°Ð½Ð½Ñ‹Ð¼Ð¸ аннотаций в файл в указанном формате (GenBank, GTF, и Ñ‚. д.).</translation> </message> <message> <location filename="../src/library/WriteAnnotationsWorker.cpp" line="456"/> @@ -5301,10 +5195,6 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <source>Write Annotations</source> <translation>ЗапиÑÑŒ аннотаций</translation> </message> - <message> - <source>Writes all supplied annotations to file(s) in selected format.</source> - <translation type="vanished">Ñтот Ñлемент запиÑывает вÑе аннотации в файл заданного формата.</translation> - </message> </context> <context> <name>U2::LocalWorkflow::WriteBAMWorker</name> @@ -5314,23 +5204,15 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <source>Assembly</source> <translation>Сборка</translation> </message> - <message> - <source>Write Assembly</source> - <translation type="vanished">ЗапиÑÑŒ Ñборки</translation> - </message> - <message> - <source>Writes all supplied assemblies to file(s) in selected format.</source> - <translation type="vanished">Ñтот Ñлемент запиÑывает вÑе Ñборки в файл(Ñ‹) заданного формата.</translation> - </message> <message> <location filename="../src/library/WriteAssemblyWorkers.cpp" line="162"/> <source>Write NGS Reads Assembly</source> - <translation type="unfinished"></translation> + <translation>ЗапиÑÑŒ NGS Ñборки</translation> </message> <message> <location filename="../src/library/WriteAssemblyWorkers.cpp" line="163"/> <source>The element gets message(s) with assembled reads data and saves the data to the specified file(s) in one of the appropriate formats (SAM, BAM, or UGENEDB).</source> - <translation type="unfinished"></translation> + <translation>Ðтот Ñлемент запиÑывает вÑе Ñборки в файл(Ñ‹) заданного формата.</translation> </message> <message> <location filename="../src/library/WriteAssemblyWorkers.cpp" line="170"/> @@ -5350,30 +5232,26 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT </context> <context> <name>U2::LocalWorkflow::WriteVariationWorker</name> - <message> - <location filename="../src/library/WriteVariationWorker.cpp" line="60"/> - <source>Write variations: internal error</source> - <translation>ЗапиÑÑŒ вариаций: внутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ°</translation> - </message> <message> <location filename="../src/library/WriteVariationWorker.cpp" line="113"/> <location filename="../src/library/WriteVariationWorker.cpp" line="114"/> <source>Variation track</source> <translation>Изменение вариации</translation> </message> - <message> - <location filename="../src/library/WriteVariationWorker.cpp" line="116"/> - <source>Write Variations</source> - <translation>ЗапиÑÑŒ вариаций</translation> - </message> <message> <location filename="../src/library/WriteVariationWorker.cpp" line="117"/> <source>The element gets message(s) with variations data and saves the data to the specified file(s) in one of the appropriate formats (e.g. VCF).</source> - <translation type="unfinished"></translation> + <translation>Ðтот Ñлемент запиÑывает вÑе прилагаемые вариации в файл(Ñ‹) заданного формата.</translation> + </message> + <message> + <location filename="../src/library/WriteVariationWorker.cpp" line="60"/> + <source>Write variants: internal error</source> + <translation>ЗапиÑÑŒ вариаций: внутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ°</translation> </message> <message> - <source>Writes all supplied variations to file(s) in selected format.</source> - <translation type="vanished">Ñтот Ñлемент запиÑывает вÑе прилагаемые вариации в файл(Ñ‹) заданного формата.</translation> + <location filename="../src/library/WriteVariationWorker.cpp" line="116"/> + <source>Write Variants</source> + <translation>ЗапиÑÑŒ вариаций</translation> </message> <message> <location filename="../src/library/WriteVariationWorker.cpp" line="125"/> @@ -5459,7 +5337,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <context> <name>U2::SaveWorkflowSceneTask</name> <message> - <location filename="../src/WorkflowSceneIOTasks.cpp" line="46"/> + <location filename="../src/WorkflowSceneIOTasks.cpp" line="47"/> <source>Save workflow scene task</source> <translation>Сохранить задачу Ñхемы</translation> </message> @@ -5502,35 +5380,23 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <source>Read Plain Text</source> <translation>Чтение текÑта</translation> </message> - <message> - <source>Reads text from local or remote files. All text file formats supported by UGENE are allowed as input to this element.</source> - <translation type="vanished">Ñтот Ñлемент Ñчитывает текÑтовые данные из файлов, раÑположенных локально или удаленно.</translation> - </message> <message> <location filename="../src/library/CoreLib.cpp" line="195"/> <source>Write Plain Text</source> <translation>ЗапиÑÑŒ текÑта</translation> </message> - <message> - <source>Write strings to a file.</source> - <translation type="vanished">Ñтот Ñлемент запиÑывает текÑтовые данные в файл.</translation> - </message> - <message> - <source>Writes all supplied sequences to file(s) in selected format.</source> - <translation type="vanished">Ñтот Ñлемент запиÑывает поÑледовательноÑти в файл(Ñ‹) заданного формата.</translation> - </message> <message> <location filename="../src/library/CoreLib.cpp" line="291"/> <source>Save all sequences from <u>%1</u> to <u>%2</u>.</source> <translation>Сохранить вÑе поÑледовательноÑти из <u>%1</u> в <u>%2</u>.</translation> </message> <message> - <location filename="../src/library/CoreLib.cpp" line="441"/> + <location filename="../src/library/CoreLib.cpp" line="442"/> <source>Another worker with this name is already registered: %1</source> <translation>Другой Ñелемент Ñ Ñ‚Ð°ÐºÐ¸Ð¼ именем уже был зарегиÑтрирован: %1</translation> </message> <message> - <location filename="../src/library/CoreLib.cpp" line="443"/> + <location filename="../src/library/CoreLib.cpp" line="444"/> <source>The actor '%1' has been already registered</source> <translation>Метка '%1' уже была зарегиÑтрирована</translation> </message> @@ -5555,12 +5421,12 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/CoreLib.cpp" line="153"/> <source>The element gets message(s) with sequence data and saves the data to the specified file(s) in FASTA format.</source> - <translation type="unfinished"></translation> + <translation>Ðтот Ñлемент запиÑывает поÑледовательноÑти в файл(Ñ‹) заданного формата.</translation> </message> <message> <location filename="../src/library/CoreLib.cpp" line="175"/> <source>Input one or several text files. The element outputs text message(s), read from the file(s).</source> - <translation type="unfinished"></translation> + <translation>Подайте один или неÑколько текÑтовых файлов. Ðлемент выведет текÑтовые ÑообщениÑ, прочитанные из файла(ов).</translation> </message> <message> <location filename="../src/library/CoreLib.cpp" line="179"/> @@ -5570,7 +5436,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/CoreLib.cpp" line="196"/> <source>The element gets message(s) with text data and saved the data to the specified text file(s).</source> - <translation type="unfinished"></translation> + <translation>Ðтот Ñлемент запиÑывает текÑтовые данные в файл(Ñ‹) заданного формата.</translation> </message> <message> <location filename="../src/library/CoreLib.cpp" line="204"/> @@ -5580,7 +5446,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/CoreLib.cpp" line="219"/> <source>The element gets message(s) with alignment data and saves the data to the specified file(s) in one of the multiple sequence alignment formats, supported by UGENE (ClustalW, FASTA, etc.).</source> - <translation type="unfinished"></translation> + <translation>Ðтот Ñлемент запиÑывает Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ Ð² файл(Ñ‹) заданного формата.</translation> </message> <message> <location filename="../src/library/CoreLib.cpp" line="221"/> @@ -5596,17 +5462,13 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/CoreLib.cpp" line="257"/> <source>The elements gets message(s) with sequence data and, optionally, associated annotations data and saves the data to the specified file(s) in one of the appropriate formats (GenBank, FASTA, etc.).</source> - <translation type="unfinished"></translation> + <translation>Ðтот Ñлемент запиÑывает поÑледовательноÑти и аÑÑоциированные Ñ Ð½Ð¸Ð¼Ð¸ аннотациÑми в файл(Ñ‹) заданного формата.</translation> </message> <message> <location filename="../src/library/CoreLib.cpp" line="218"/> <source>Write Alignment</source> <translation>ЗапиÑÑŒ множеÑтвенного выравниваниÑ</translation> </message> - <message> - <source>Writes all supplied alignments to file(s) in selected format.</source> - <translation type="vanished">Ñтот Ñлемент запиÑывает вÑе входные Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ Ð² файл(Ñ‹) заданного формата.</translation> - </message> <message> <location filename="../src/library/CoreLib.cpp" line="256"/> <source>Write Sequence</source> @@ -5620,7 +5482,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/GenericReadActor.cpp" line="87"/> <source>Input one or several files with nucleotide or protein sequences. A file may also contain annotations. Any format, supported by UGENE, is allowed (GenBank, FASTA, etc.). The element outputs message(s) with the sequence and annotations data.</source> - <translation type="unfinished"></translation> + <translation>Задайте один или неÑколько файлов Ñ Ð½ÑƒÐºÐ»ÐµÐ¾Ñ‚Ð¸Ð´Ð½Ð¾Ð¹ или протеиновой поÑледовательноÑтью. Файл также может Ñодержать аннотации.</translation> </message> <message> <location filename="../src/library/GenericReadActor.cpp" line="138"/> @@ -5635,7 +5497,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/GenericReadActor.cpp" line="149"/> <source>Input one or several files in one of the multiple sequence alignment formats, supported by UGENE (ClustalW, FASTA, etc.). The element outputs message(s) with the alignment data.</source> - <translation type="unfinished"></translation> + <translation>Укажите один или неÑколько файлов Ñо множеÑтвенными выравниваниÑми.</translation> </message> <message> <location filename="../src/library/GenericReadActor.cpp" line="163"/> @@ -5657,19 +5519,6 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <source>A sequence along with FASTA header line.</source> <translation>ПоÑледовательноÑÑ‚ÑŒ вмеÑте Ñ Ð·Ð°Ð³Ð¾Ð»Ð¾Ð²ÐºÐ¾Ð¼ FASTA.</translation> </message> - <message> - <source>Writes all supplied sequences to file(s) in FASTA format.</source> - <translation type="vanished">Ñтот Ñлемент запиÑывает вÑе входные данные в файл(Ñ‹) в формате FASTA.</translation> - </message> - <message> - <source>Reads multiple sequence alignments (MSAs) from local or remote files. All MSA file formats supported by UGENE are allowed as input to this element.<p>Besides recognized alignment formats, it supports aligning from a set of sequences in a corresponding file (e.g. FASTA or Genbank).</source> - <translation type="vanished">Ñтот Ñлемент Ñчитывает множеÑтвенные Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°Ð½Ð¸Ñ Ð¸Ð· файлов, раÑположенных локально или удаленно. -<p>Помимо Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð³Ð¾Ñ‚Ð¾Ð²Ñ‹Ñ… выравниваний извеÑтных форматов, поддерживаетÑÑ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡ÐµÑкое ÑоÑтавление выравниваний из наборов поÑледовательноÑтей, которые могут быть прочитаны из файла любого подходÑщего формата (например, FASTA или Genbank).</translation> - </message> - <message> - <source>Reads sequences and annotations if any from local or remote files. All sequence file formats supported by UGENE (e.g. GenBank, FASTA) are allowed as input to this element.</source> - <translation type="vanished">Ñтот Ñлемент загружает поÑледовательноÑти, а также аннотации в Ñлучае их наличиÑ, из файлов, раÑположенных локально или удаленно.</translation> - </message> </context> <context> <name>U2::Workflow::GalaxyConfigConfigurationDialogImpl</name> @@ -5743,10 +5592,6 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <source>Read assembly from %1</source> <translation>Прочитать Ñборку из %1</translation> </message> - <message> - <source>File '%1' not exists</source> - <translation type="vanished">Файл '%1' не ÑущеÑтвует</translation> - </message> <message> <location filename="../src/tasks/ReadAssemblyTask.cpp" line="162"/> <source>File '%1' does not exist</source> @@ -5854,7 +5699,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/DocActors.cpp" line="264"/> <source> in the </source> - <translation>в</translation> + <translation> в </translation> </message> <message> <location filename="../src/library/DocActors.cpp" line="264"/> @@ -5880,12 +5725,12 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/DocActors.cpp" line="161"/> <source> sequence from <u>%1</u></source> - <translation>поÑледовательноÑти из <u>%1</u></translation> + <translation> поÑледовательноÑти из <u>%1</u></translation> </message> <message> <location filename="../src/library/DocActors.cpp" line="164"/> <source> set of annotations from <u>%1</u></source> - <translation>набора аннотаций из <u>%1</u></translation> + <translation> набора аннотаций из <u>%1</u></translation> </message> <message> <location filename="../src/library/DocActors.cpp" line="173"/> @@ -5900,7 +5745,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/library/DocActors.cpp" line="178"/> <source>each </source> - <translation>каждые</translation> + <translation>каждые </translation> </message> <message> <location filename="../src/library/DocActors.cpp" line="181"/> @@ -5911,68 +5756,68 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <context> <name>U2::WorkflowDesignerPlugin</name> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="75"/> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="77"/> <source>Workflow Designer</source> <translation>Дизайнер вычиÑлительных Ñхем</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="75"/> - <source>Workflow Designer allows to create complex computational workflows.</source> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="77"/> + <source>Workflow Designer allows one to create complex computational workflows.</source> <translation>Дизайнер вычиÑлительных Ñхем позволÑет Ñоздавать и переиÑпользовать многоÑтапные алгоритмы обработки данных. Ðлгоритмы ÑоздаютÑÑ Ð² виде визуальных диаграмм потоков данных, не Ñ‚Ñ€ÐµÐ±ÑƒÑ Ð½Ð°Ð²Ñ‹ÐºÐ¾Ð² Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð¼Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¸Ð»Ð¸ Ð·Ð½Ð°Ð½Ð¸Ñ Ñзыков программированиÑ.</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="157"/> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="163"/> <source>Runs the specified task.</source> <translation>ВыполнÑет указанную задачу.</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="158"/> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="164"/> <source>Runs the specified task. A path to a user-defined UGENE workflow be used as a task name.</source> <translation>ЗапуÑкает указанную задачу. Путь до пользовательÑкой UGENE Ñхемы будет иÑпользован Ð´Ð»Ñ Ð¸Ð¼ÐµÐ½Ð¸ задачи.</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="160"/> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="166"/> <source><task_name> [<task_parameter>=value ...]</source> <translation><task_name> [<task_parameter>=value ...]</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="166"/> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="172"/> <source>Prints the content of the specified slot.</source> <translation>Печатает Ñодержимое указанного Ñлота.</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="167"/> - <source>Prints the content of the specified slot. The incoming/outcoming content of specified slot is printed to the standart output.</source> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="173"/> + <source>Prints the content of the specified slot. The incoming/outcoming content of specified slot is printed to the standard output.</source> <translation>Печатает Ñодержимое указанного Ñлота. Входное/выходное Ñодержимое указанного Ñлота печатаетÑÑ Ñтандартно.</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="169"/> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="175"/> <source><actor_name>.<port_name>.<slot_name></source> <translation><actor_name>.<port_name>.<slot_name></translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="174"/> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="180"/> <source>Creates new Galaxy tool config.</source> <translation>Создает новую конфигурацию Galaxy-инÑтрумента.</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="175"/> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="181"/> <source>Creates new Galaxy tool config from existing workflow. Paths to UGENE and Galaxy can be set</source> <translation>Создает новую конфигурацию Ð´Ð»Ñ Ð¸Ð½Ñтрумента Galaxy из ÑущеÑтвующей Ñхемы. Пути Ð´Ð»Ñ UGENE и Galaxy могут быть уÑтановлены</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="177"/> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="183"/> <source><uwl-file> [--ugene-path=value] [--galaxy-path=value]</source> <translation><uwl-file> [--ugene-path=value] [--galaxy-path=value]</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="201"/> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="207"/> <source>Close Designer</source> <translation>Закрытие дизайнера Ñхем</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="210"/> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="216"/> <source>Close Designer canceled</source> <translation>Закрытие дизайнера Ñхем отменено</translation> </message> @@ -5980,103 +5825,99 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <context> <name>U2::WorkflowDesignerService</name> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="219"/> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="225"/> <source>Workflow Designer</source> <translation>Дизайнер вычиÑлительных Ñхем</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="259"/> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="265"/> <source>Workflow Designer...</source> <translation>Дизайнер вычиÑлительных Ñхем...</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="269"/> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="275"/> <source>New workflow...</source> <translation>ÐÐ¾Ð²Ð°Ñ Ñхема...</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="300"/> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="306"/> <source>Can not open Workflow Designer. Please, try to reload UGENE.</source> <translation>Ðевозможно открыть дизайнер вычиÑлительных Ñхем. Попробуйте перезагрузить UGENE.</translation> </message> <message> - <source>Reads quality control and alignment</source> - <translation type="vanished">Контроль качеÑтва коротких прочтений и выравнивание</translation> - </message> - <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="333"/> - <source>Reads quality control...</source> - <translation>Контроль качеÑтва коротких прочтений...</translation> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="345"/> + <source>Raw DNA-Seq data processing...</source> + <translation>Обработка Ñырых данных ÑÐµÐºÐ²ÐµÐ½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð”ÐК...</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="335"/> - <source>Filter short scaffolds...</source> - <translation>Фильтровать короткие каркаÑÑ‹...</translation> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="347"/> + <source>Variant calling...</source> + <translation>ПоиÑк вариаций...</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="337"/> - <source>Raw DNA-Seq data processing</source> - <translation>Обработка Ñырых данных ÑÐµÐºÐ²ÐµÐ½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð”ÐК</translation> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="349"/> + <source>Annotate variants and predict effects...</source> + <translation>ÐÐ½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ñ Ð²Ð°Ñ€Ð¸Ð°Ñ†Ð¸Ð¹ и предÑказание Ñффекта...</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="339"/> - <source>Variant calling</source> - <translation>ПоиÑк вариаций</translation> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="351"/> + <source>Raw RNA-Seq data processing...</source> + <translation>Обработка Ñырых данных ÑÐµÐºÐ²ÐµÐ½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð ÐК...</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="341"/> - <source>Variant calling and effects prediction</source> - <translation>Variant calling and effects prediction</translation> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="353"/> + <source>RNA-Seq data analysis...</source> + <translation>Ðнализ данных ÑÐµÐºÐ²ÐµÐ½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð ÐК...</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="343"/> - <source>Annotate variants and predict effects</source> - <translation>ÐÐ½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ñ Ð²Ð°Ñ€Ð¸Ð°Ñ†Ð¸Ð¹ и предÑказание Ñффекта</translation> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="355"/> + <source>Extract transcript sequences...</source> + <translation>Извлечение поÑледовательноÑти транÑкриптов...</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="345"/> - <source>Raw RNA-Seq data processing</source> - <translation>Обработка Ñырых данных ÑÐµÐºÐ²ÐµÐ½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð ÐК</translation> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="357"/> + <source>Raw ChIP-Seq data processing...</source> + <translation>Обработка Ñырых данных ChIP-Seq...</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="347"/> - <source>RNA-Seq data analysis</source> - <translation>Ðнализ данных ÑÐµÐºÐ²ÐµÐ½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð ÐК</translation> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="359"/> + <source>ChIP-Seq data analysis...</source> + <translation>Ðнализ данных ChIP-Seq...</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="349"/> - <source>Extract transcript sequences</source> - <translation>Извлечение поÑледовательноÑти транÑкриптов</translation> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="361"/> + <source>Metagenomics classification...</source> + <translation>ÐœÐµÑ‚Ð°Ð³ÐµÐ½Ð¾Ð¼Ð½Ð°Ñ ÐºÐ»Ð°ÑÑификациÑ...</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="351"/> - <source>Raw ChIP-Seq data processing</source> - <translation>Обработка Ñырых данных ChIP-Seq</translation> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="363"/> + <source>Extract coverage from assemblies...</source> + <translation>РаÑчет Ð¿Ð¾ÐºÑ€Ñ‹Ñ‚Ð¸Ñ Ð¿Ð¾ Ñборке...</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="353"/> - <source>ChIP-Seq data analysis</source> - <translation>Ðнализ данных ChIP-Seq</translation> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="365"/> + <source>Extract consensus from assemblies...</source> + <translation>Извлечение конÑенÑуÑа из Ñборки...</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="355"/> - <source>ChIP-Seq coverage</source> - <translation>Покрытие ChIP-Seq</translation> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="368"/> + <source>Remote NCBI BLAST...</source> + <translation>Удаленный поиÑк Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ NCBI BLAST...</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="357"/> - <source>Extract coverage from assemblies</source> - <translation>РаÑчет Ð¿Ð¾ÐºÑ€Ñ‹Ñ‚Ð¸Ñ Ð¿Ð¾ Ñборке</translation> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="339"/> + <source>Reads quality control...</source> + <translation>Контроль качеÑтва коротких прочтений...</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="359"/> - <source>Extract consensus from assemblies</source> - <translation>Извлечение конÑенÑуÑа из Ñборки</translation> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="341"/> + <source>Reads de novo assembly (with SPAdes)...</source> + <translation>Чтение de novo Ñборки (при помощи SPAdes)...</translation> </message> <message> - <location filename="../src/WorkflowDesignerPlugin.cpp" line="362"/> - <source>Remote NCBI BLAST</source> - <translation>Удаленный поиÑк Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ NCBI BLAST</translation> + <location filename="../src/WorkflowDesignerPlugin.cpp" line="343"/> + <source>Filter short scaffolds...</source> + <translation>Фильтровать короткие каркаÑÑ‹...</translation> </message> </context> <context> @@ -6084,7 +5925,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <message> <location filename="../src/WorkflowDocument.cpp" line="82"/> <location filename="../src/WorkflowDocument.cpp" line="90"/> - <location filename="../src/WorkflowDocument.cpp" line="115"/> + <location filename="../src/WorkflowDocument.cpp" line="116"/> <source>Workflow</source> <translation>Схема</translation> </message> @@ -6094,7 +5935,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <translation>Формат Ñхем Ñто формат иÑпользуемый Ð´Ð»Ñ ÑозданиÑ/редактированиÑ/воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ñхемы Ñ Ñ‚ÐµÐºÑтовым файлом</translation> </message> <message> - <location filename="../src/WorkflowDocument.cpp" line="107"/> + <location filename="../src/WorkflowDocument.cpp" line="108"/> <source>Invalid header. %1 expected</source> <translation>Ðеверный заголовок. ОжидаетÑÑ %1</translation> </message> @@ -6102,54 +5943,54 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <context> <name>U2::WorkflowEditor</name> <message> - <location filename="../src/WorkflowEditor.cpp" line="376"/> + <location filename="../src/WorkflowEditor.cpp" line="381"/> <source>Element name:</source> - <translation>Ð˜Ð¼Ñ Ñлемента: </translation> + <translation>Ð˜Ð¼Ñ Ñлемента:</translation> </message> <message> - <location filename="../src/WorkflowEditor.cpp" line="469"/> + <location filename="../src/WorkflowEditor.cpp" line="471"/> <source>Input data</source> <translation>Входные данные</translation> </message> <message> - <location filename="../src/WorkflowEditor.cpp" line="471"/> + <location filename="../src/WorkflowEditor.cpp" line="473"/> <source>Output data</source> <translation>Выходные данные</translation> </message> <message> - <location filename="../src/WorkflowEditor.cpp" line="479"/> + <location filename="../src/WorkflowEditor.cpp" line="481"/> <source>Select an element to inspect.</source> <translation>Выберите Ñлемент Ð´Ð»Ñ Ð¿Ñ€Ð¾Ñмотра или редактированиÑ.</translation> </message> <message> - <location filename="../src/WorkflowEditor.cpp" line="379"/> + <location filename="../src/WorkflowEditor.cpp" line="384"/> <source>To configure the parameters of the element go to "Parameters" area below.</source> <translation>Параметры Ñлемента можно отредактировать в таблице, раÑположенной ниже.</translation> </message> <message> - <location filename="../src/WorkflowEditor.cpp" line="445"/> + <location filename="../src/WorkflowEditor.cpp" line="447"/> <source>You can observe data slots of the port and configure connections if any in the "Parameters" widget suited below.</source> <translation>Слоты данных, входÑщие в порт, указаны в таблице, раÑположенной немного ниже. <br>Там же можно изменить привÑзку данных в ÑвÑзÑÑ…, еÑли они еÑÑ‚ÑŒ.</translation> </message> <message> - <location filename="../src/WorkflowEditor.cpp" line="440"/> + <location filename="../src/WorkflowEditor.cpp" line="442"/> <source><b>%1 "%2"</b> of task "%3":<br>%4<br><br>%5</source> <translation><b>%1 "%2"</b> задачи "%3":<br>%4<br><br>%5</translation> </message> <message> - <location filename="../src/WorkflowEditor.cpp" line="306"/> - <location filename="../src/WorkflowEditor.cpp" line="391"/> + <location filename="../src/WorkflowEditor.cpp" line="302"/> + <location filename="../src/WorkflowEditor.cpp" line="396"/> <source>Parameters</source> <translation>Параметры</translation> </message> <message> - <location filename="../src/WorkflowEditor.cpp" line="441"/> + <location filename="../src/WorkflowEditor.cpp" line="443"/> <source>Output port</source> <translation>Выходной порт</translation> </message> <message> - <location filename="../src/WorkflowEditor.cpp" line="441"/> + <location filename="../src/WorkflowEditor.cpp" line="443"/> <source>Input port</source> <translation>Входной порт</translation> </message> @@ -6208,41 +6049,33 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <context> <name>U2::WorkflowPaletteElements</name> <message> - <location filename="../src/WorkflowPalette.cpp" line="571"/> - <source>Can't remove element %1</source> - <translation>Ðе могу удалить Ñлемент %1</translation> - </message> - <message> - <location filename="../src/WorkflowPalette.cpp" line="593"/> + <location filename="../src/WorkflowPalette.cpp" line="598"/> <source>Expand all</source> <translation>Развернуть вÑе</translation> </message> <message> - <location filename="../src/WorkflowPalette.cpp" line="594"/> + <location filename="../src/WorkflowPalette.cpp" line="599"/> <source>Collapse all</source> <translation>Свернуть вÑе</translation> </message> <message> - <location filename="../src/WorkflowPalette.cpp" line="597"/> + <location filename="../src/WorkflowPalette.cpp" line="602"/> <source>Edit</source> <translation>Изменить</translation> </message> <message> - <location filename="../src/WorkflowPalette.cpp" line="598"/> + <location filename="../src/WorkflowPalette.cpp" line="603"/> <source>Remove</source> <translation>Удалить</translation> </message> + <message> + <location filename="../src/WorkflowPalette.cpp" line="702"/> + <source>Can't remove element '%1'</source> + <translation>Ðевозможно удалить Ñлемент '%1'</translation> + </message> </context> <context> <name>U2::WorkflowRemoteRunFromCMDLineTask</name> - <message> - <source>%1 parameter expected, but not set</source> - <translation type="vanished">Ðе уÑтановлен параметр %1</translation> - </message> - <message> - <source>Cannot read remote machine settings from %2</source> - <translation type="vanished">Ðе удаетÑÑ Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ñ‚ÑŒ наÑтройки удаленной машины из %2</translation> - </message> </context> <context> <name>U2::WorkflowRunFromCMDLineBase</name> @@ -6285,22 +6118,22 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <context> <name>U2::WorkflowScene</name> <message> - <location filename="../src/WorkflowViewController.cpp" line="2547"/> + <location filename="../src/WorkflowViewController.cpp" line="2467"/> <source>Open document(s)</source> <translation>Открыть документы</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="2707"/> + <location filename="../src/WorkflowViewController.cpp" line="2627"/> <source>Workflow Designer</source> <translation>Дизайнер вычиÑлительных Ñхем</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="2707"/> + <location filename="../src/WorkflowViewController.cpp" line="2627"/> <source>Unable to open specified documents. Watch log for details.</source> <translation>Ðевозможно открыть указанные документы. ПоÑмотрите лог Ð´Ð»Ñ Ð²Ñ‹ÑÑÐ½ÐµÐ½Ð¸Ñ Ð´ÐµÑ‚Ð°Ð»ÐµÐ¹.</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="2791"/> + <location filename="../src/WorkflowViewController.cpp" line="2711"/> <source>Drop an element from the palette here</source> <translation>ПеренеÑите Ñюда Ñлемент из палитры</translation> </message> @@ -6308,7 +6141,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <context> <name>U2::WorkflowSettingsPageController</name> <message> - <location filename="../src/WorkflowSettingsController.cpp" line="38"/> + <location filename="../src/WorkflowSettingsController.cpp" line="40"/> <source>Workflow Designer</source> <translation>Дизайнер вычиÑлительных Ñхем</translation> </message> @@ -6316,7 +6149,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <context> <name>U2::WorkflowTabView</name> <message> - <location filename="../src/WorkflowTabView.cpp" line="44"/> + <location filename="../src/WorkflowTabView.cpp" line="47"/> <source>Close dashboard</source> <translation>Закрыть панель</translation> </message> @@ -6331,12 +6164,12 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <translation>Ð˜Ð¼Ñ Ð½Ð¾Ð²Ð¾Ð¹ панели:</translation> </message> <message> - <location filename="../src/WorkflowTabView.cpp" line="206"/> + <location filename="../src/WorkflowTabView.cpp" line="299"/> <source>Run</source> <translation>ЗапуÑк</translation> </message> <message> - <location filename="../src/WorkflowTabView.cpp" line="229"/> + <location filename="../src/WorkflowTabView.cpp" line="322"/> <source>Rename</source> <translation>Переименовать</translation> </message> @@ -6344,7 +6177,7 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <context> <name>U2::WorkflowUtils</name> <message> - <location filename="../src/WorkflowViewController.cpp" line="928"/> + <location filename="../src/WorkflowViewController.cpp" line="852"/> <source>UGENE workflow element</source> <translation>Ðлемент Ñхемы</translation> </message> @@ -6352,372 +6185,364 @@ TCCTTACTGTCTGAGCAATGGGATTCCATCTTTTACGATCTAGACATGGCT <context> <name>U2::WorkflowView</name> <message> - <location filename="../src/WorkflowViewController.cpp" line="326"/> - <location filename="../src/WorkflowViewController.cpp" line="2344"/> + <location filename="../src/WorkflowViewController.cpp" line="263"/> + <location filename="../src/WorkflowViewController.cpp" line="2264"/> <source>Workflow Designer</source> <translation>Дизайнер Ñхем</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="414"/> - <location filename="../src/WorkflowViewController.cpp" line="550"/> + <location filename="../src/WorkflowViewController.cpp" line="350"/> + <location filename="../src/WorkflowViewController.cpp" line="487"/> <source>Error list</source> <translation>Проблемы</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="442"/> - <location filename="../src/WorkflowViewController.cpp" line="444"/> - <location filename="../src/WorkflowViewController.cpp" line="2267"/> - <location filename="../src/WorkflowViewController.cpp" line="2269"/> + <location filename="../src/WorkflowViewController.cpp" line="378"/> + <location filename="../src/WorkflowViewController.cpp" line="381"/> + <location filename="../src/WorkflowViewController.cpp" line="2186"/> + <location filename="../src/WorkflowViewController.cpp" line="2189"/> <source>Warning!</source> <translation>Предупреждение!</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="447"/> + <location filename="../src/WorkflowViewController.cpp" line="384"/> <source>Undefined workflow format for %1</source> <translation>ÐеизвеÑтный workflow формат в %1</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="447"/> + <location filename="../src/WorkflowViewController.cpp" line="384"/> <source>file</source> <translation>файл</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="679"/> + <location filename="../src/WorkflowViewController.cpp" line="609"/> <source>&Save workflow as...</source> <translation>&Сохранить Ñхему как...</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="684"/> + <location filename="../src/WorkflowViewController.cpp" line="614"/> <source>Show wizard</source> <translation>Показать визард</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="713"/> + <location filename="../src/WorkflowViewController.cpp" line="643"/> <source>Delete</source> <translation>Удалить</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="933"/> - <location filename="../src/WorkflowViewController.cpp" line="958"/> - <source>Can't load element.</source> - <translation>Ðевозможно загрузить Ñлемент.</translation> + <location filename="../src/WorkflowViewController.cpp" line="757"/> + <source>Create element with external tool...</source> + <translation>Создать Ñлемент при помощи внешних инÑтрументов...</translation> + </message> + <message> + <location filename="../src/WorkflowViewController.cpp" line="768"/> + <source>Add element with external tool...</source> + <translation>Добавить Ñлемент при помощи внешних инÑтрументов...</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="998"/> - <source>Can't remove element %1</source> - <translation>Ðе могу удалить Ñлемент %1</translation> + <location filename="../src/WorkflowViewController.cpp" line="857"/> + <location filename="../src/WorkflowViewController.cpp" line="885"/> + <source>Can't load element.</source> + <translation>Ðевозможно загрузить Ñлемент.</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="1315"/> - <location filename="../src/WorkflowViewController.cpp" line="1376"/> + <location filename="../src/WorkflowViewController.cpp" line="1221"/> + <location filename="../src/WorkflowViewController.cpp" line="1282"/> <source>Element style</source> <translation>Стиль</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="1803"/> - <location filename="../src/WorkflowViewController.cpp" line="1831"/> + <location filename="../src/WorkflowViewController.cpp" line="1715"/> + <location filename="../src/WorkflowViewController.cpp" line="1743"/> <source>Error</source> <translation>Ошибка</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="756"/> + <location filename="../src/WorkflowViewController.cpp" line="686"/> <source>Select all elements</source> <translation>Выбрать вÑе Ñлементы</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="747"/> + <location filename="../src/WorkflowViewController.cpp" line="677"/> <source>Import workflow to element...</source> <translation>Импортировать Ñхему в Ñлемент...</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="751"/> + <location filename="../src/WorkflowViewController.cpp" line="681"/> <source>Create Galaxy tool config...</source> <translation>Создать конфигурацию Galaxy инÑтрумента...</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="759"/> + <location filename="../src/WorkflowViewController.cpp" line="689"/> <source>&Copy</source> <translation>&Копировать</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="767"/> + <location filename="../src/WorkflowViewController.cpp" line="697"/> <source>Cu&t</source> <translation>&Вырезать</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="774"/> + <location filename="../src/WorkflowViewController.cpp" line="704"/> <source>&Paste</source> <translation>&Ð’Ñтавить</translation> </message> <message> - <location filename="../src/WorkflowSettingsController.cpp" line="82"/> - <location filename="../src/WorkflowViewController.cpp" line="782"/> + <location filename="../src/WorkflowSettingsController.cpp" line="90"/> + <location filename="../src/WorkflowViewController.cpp" line="712"/> <source>Minimal</source> <translation>Упрощённый</translation> </message> <message> - <location filename="../src/WorkflowSettingsController.cpp" line="83"/> - <location filename="../src/WorkflowViewController.cpp" line="788"/> + <location filename="../src/WorkflowSettingsController.cpp" line="91"/> + <location filename="../src/WorkflowViewController.cpp" line="718"/> <source>Extended</source> <translation>Развёрнутый</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="929"/> - <location filename="../src/WorkflowViewController.cpp" line="1282"/> - <location filename="../src/WorkflowViewController.cpp" line="1386"/> + <location filename="../src/WorkflowViewController.cpp" line="853"/> + <location filename="../src/WorkflowViewController.cpp" line="1188"/> + <location filename="../src/WorkflowViewController.cpp" line="1292"/> <source>Add element</source> <translation>Добавить Ñлемент</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="612"/> + <location filename="../src/WorkflowViewController.cpp" line="542"/> <source>&Run workflow</source> <translation>&ЗапуÑтить Ñхему</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="619"/> + <location filename="../src/WorkflowViewController.cpp" line="549"/> <source>S&top workflow</source> <translation>О&тменить выполнение Ñхемы</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="626"/> + <location filename="../src/WorkflowViewController.cpp" line="556"/> <source>&Validate workflow</source> <translation>&Проверить валидноÑÑ‚ÑŒ Ñхемы</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="632"/> + <location filename="../src/WorkflowViewController.cpp" line="562"/> <source>&Estimate workflow</source> <translation>&Оценить Ð²Ñ€ÐµÐ¼Ñ Ð½Ð° выполнение Ñхемы</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="638"/> + <location filename="../src/WorkflowViewController.cpp" line="568"/> <source>&Pause workflow</source> <translation>&ОÑтановить Ñхему</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="646"/> + <location filename="../src/WorkflowViewController.cpp" line="576"/> <source>&Next step</source> <translation>&Следующий шаг</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="656"/> + <location filename="../src/WorkflowViewController.cpp" line="586"/> <source>Process one &message</source> <translation>По одному &Ñообщению</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="666"/> + <location filename="../src/WorkflowViewController.cpp" line="596"/> <source>&New workflow...</source> <translation>&ÐÐ¾Ð²Ð°Ñ Ñхема...</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="672"/> + <location filename="../src/WorkflowViewController.cpp" line="602"/> <source>&Save workflow</source> <translation>&Сохранить Ñхему</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="702"/> + <location filename="../src/WorkflowViewController.cpp" line="632"/> <source>&Load workflow</source> <translation>&Загрузка Ñхемы</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="708"/> + <location filename="../src/WorkflowViewController.cpp" line="638"/> <source>&Export workflow as image</source> <translation>&ÐкÑпорт Ñхемы в изображение</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="717"/> + <location filename="../src/WorkflowViewController.cpp" line="647"/> <source>Dashboards manager</source> <translation>Менеджер панелей</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="738"/> + <location filename="../src/WorkflowViewController.cpp" line="668"/> <source>Set parameter aliases...</source> <translation>Выбрать алиаÑÑ‹ параметров...</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="743"/> + <location filename="../src/WorkflowViewController.cpp" line="673"/> <source>Set port and slot aliases...</source> <translation>Выбрать алиаÑÑ‹ портов и Ñлотов...</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="796"/> + <location filename="../src/WorkflowViewController.cpp" line="726"/> <source>Hide scripting options</source> <translation>Ðе показывать опции Ñкриптинга</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="803"/> + <location filename="../src/WorkflowViewController.cpp" line="733"/> <source>Show scripting options</source> <translation>Показывать опции Ñкриптинга</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="816"/> + <location filename="../src/WorkflowViewController.cpp" line="746"/> <source>Create element with script...</source> <translation>Создать Ñлемент при помощи Ñкрипта...</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="821"/> + <location filename="../src/WorkflowViewController.cpp" line="751"/> <source>Edit script of the element...</source> <translation>Изменить Ñкрипт Ñлемента...</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="827"/> - <source>Create element with command line tool...</source> - <translation>Создать Ñлемент при помощи командной Ñтроки...</translation> - </message> - <message> - <location filename="../src/WorkflowViewController.cpp" line="832"/> + <location filename="../src/WorkflowViewController.cpp" line="762"/> <source>Edit configuration...</source> <translation>Изменить конфигурацию...</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="838"/> - <source>Add element with command line tool...</source> - <translation>Добавить Ñлемент при помощи командной Ñтроки...</translation> - </message> - <message> - <location filename="../src/WorkflowViewController.cpp" line="1421"/> + <location filename="../src/WorkflowViewController.cpp" line="1327"/> <source>Empty workflow!</source> <translation>ПуÑÑ‚Ð°Ñ Ñхема!</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="1421"/> + <location filename="../src/WorkflowViewController.cpp" line="1327"/> <source>Nothing to run: empty workflow</source> <translation>ВыполнÑÑ‚ÑŒ нечего: Ñхема пуÑта</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="1446"/> + <location filename="../src/WorkflowViewController.cpp" line="1352"/> <source>Workflow cannot be executed</source> <translation>Схема не может быть выполнена</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="1447"/> + <location filename="../src/WorkflowViewController.cpp" line="1353"/> <source>Please fix issues listed in the error list (located under workflow).</source> <translation>ИÑправьте ошибки предÑтавленные в ÑпиÑке ошибок (раÑполодженный под Ñхемой).</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="1450"/> + <location filename="../src/WorkflowViewController.cpp" line="1356"/> <source>Workflow is valid. </source> - <translation type="unfinished"></translation> + <translation>Схема валидна. +</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="1452"/> + <location filename="../src/WorkflowViewController.cpp" line="1358"/> <source>Well done!</source> <translation>Готово!</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="1454"/> + <location filename="../src/WorkflowViewController.cpp" line="1360"/> <source>There are non-critical warnings.</source> <translation>Ðет критичеÑких ошибок.</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="1456"/> + <location filename="../src/WorkflowViewController.cpp" line="1362"/> <source>Workflow is valid</source> <translation>Схема валидна</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="1698"/> + <location filename="../src/WorkflowViewController.cpp" line="1610"/> <source>Aliases for workflow parameters should be different!</source> <translation>ÐлиаÑÑ‹ Ð´Ð»Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð² Ñхемы должны бть разными!</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="1731"/> + <location filename="../src/WorkflowViewController.cpp" line="1643"/> <source>Workflow does not contain any parameter aliases</source> <translation>Схема не Ñодержит алиаÑов параметров</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="1745"/> + <location filename="../src/WorkflowViewController.cpp" line="1657"/> <source>Internal error!</source> <translation>ВеутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ°!</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="1745"/> + <location filename="../src/WorkflowViewController.cpp" line="1657"/> <source>Can not create Galaxy config</source> <translation>Ðевозможно Ñоздать конфигурацию Galaxy</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="1801"/> + <location filename="../src/WorkflowViewController.cpp" line="1713"/> <source>The workflow contains a wizard. Sorry, but current version of UGENE doesn't support of wizards in the includes.</source> <translation>Схема Ñодержит визард. Ð¢ÐµÐºÑƒÑ‰Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ UGENE не поддерживает визарды в Ñхемах.</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="1850"/> + <location filename="../src/WorkflowViewController.cpp" line="1762"/> <source>Drag an element to the scene to add it to the workflow.</source> - <translation type="unfinished"></translation> + <translation>ПеренеÑите Ñлемент на Ñцену чтобы добавить его в Ñхему.</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="2147"/> + <location filename="../src/WorkflowViewController.cpp" line="2045"/> <source>File is not found: %1</source> <translation>Файл не найден: %1</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="2185"/> + <location filename="../src/WorkflowViewController.cpp" line="2115"/> <source>Show dashboard</source> <translation>Показать панель</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="2194"/> + <location filename="../src/WorkflowViewController.cpp" line="2111"/> <source>Show workflow</source> <translation>Показать Ñхему</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="2240"/> - <location filename="../src/WorkflowViewController.cpp" line="2243"/> + <location filename="../src/WorkflowViewController.cpp" line="881"/> + <source>Can't register element.</source> + <translation>Ðевозможно зарегиÑтрировать Ñлемент.</translation> + </message> + <message> + <location filename="../src/WorkflowViewController.cpp" line="2159"/> + <location filename="../src/WorkflowViewController.cpp" line="2162"/> <source>Open workflow file</source> <translation>Открыть файл Ñхемы</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="2281"/> + <location filename="../src/WorkflowViewController.cpp" line="2201"/> <source>New workflow</source> <translation>ÐÐ¾Ð²Ð°Ñ Ñхема</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="2345"/> + <location filename="../src/WorkflowViewController.cpp" line="2265"/> <source>The workflow has been modified. Do you want to save changes?</source> <translation>Схема была изменена. Ð’Ñ‹ хотите Ñохранить изменениÑ?</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="1321"/> + <location filename="../src/WorkflowViewController.cpp" line="1227"/> <source>Scripting mode</source> <translation>Скриптинг</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="1369"/> + <location filename="../src/WorkflowViewController.cpp" line="1275"/> <source>Element properties</source> <translation>СвойÑтва Ñлемента</translation> </message> <message> - <source>Workflow is valid. -</source> - <translation type="vanished">Схема валидна.</translation> - </message> - <message> - <location filename="../src/WorkflowViewController.cpp" line="1698"/> - <location filename="../src/WorkflowViewController.cpp" line="1731"/> + <location filename="../src/WorkflowViewController.cpp" line="1610"/> + <location filename="../src/WorkflowViewController.cpp" line="1643"/> <source>Bad input!</source> <translation>Ðеверные входные данные!</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="2313"/> + <location filename="../src/WorkflowViewController.cpp" line="2233"/> <source>Workflow Designer - %1</source> <translation>Дизайнер Ñхем - %1</translation> </message> <message> - <source>Drag the palette element to the scene or just click on the scene to add the element.</source> - <translation type="vanished">Перетащите Ñлемент из палитры на плоÑкоÑÑ‚ÑŒ или проÑто кликните мышью в нужном меÑте Ñхемы.</translation> - </message> - <message> - <location filename="../src/WorkflowViewController.cpp" line="395"/> + <location filename="../src/WorkflowViewController.cpp" line="331"/> <source>Elements</source> <translation>Ðлементы</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="398"/> + <location filename="../src/WorkflowViewController.cpp" line="334"/> <source>Samples</source> <translation>Примеры</translation> </message> <message> - <location filename="../src/WorkflowViewController.cpp" line="811"/> + <location filename="../src/WorkflowViewController.cpp" line="741"/> <source>Unlock Scene</source> <translation>Разблокировать Ñхему</translation> </message> @@ -6735,12 +6560,12 @@ Do you want to save changes?</source> <context> <name>U2::WorkflowViewFactory</name> <message> - <location filename="../src/WorkflowDocument.cpp" line="160"/> + <location filename="../src/WorkflowDocument.cpp" line="161"/> <source>Open multiple views</source> <translation>Открытие неÑкольких окон</translation> </message> <message> - <location filename="../src/WorkflowDocument.h" line="88"/> + <location filename="../src/WorkflowDocument.h" line="82"/> <source>Workflow Designer</source> <translation>Дизайнер вычиÑлительных Ñхем</translation> </message> @@ -6753,27 +6578,27 @@ Do you want to save changes?</source> <translation>Форма</translation> </message> <message> - <location filename="../src/WorkflowEditorWidget.ui" line="65"/> + <location filename="../src/WorkflowEditorWidget.ui" line="68"/> <source>Property Editor</source> <translation>Редактор объектов</translation> </message> <message> - <location filename="../src/WorkflowEditorWidget.ui" line="97"/> + <location filename="../src/WorkflowEditorWidget.ui" line="103"/> <source>TextLabel</source> <translation>Ðазвание</translation> </message> <message> - <location filename="../src/WorkflowEditorWidget.ui" line="179"/> + <location filename="../src/WorkflowEditorWidget.ui" line="185"/> <source>Parameters</source> <translation>Параметры</translation> </message> <message> - <location filename="../src/WorkflowEditorWidget.ui" line="276"/> + <location filename="../src/WorkflowEditorWidget.ui" line="285"/> <source>Input data</source> <translation>Входные данные</translation> </message> <message> - <location filename="../src/WorkflowEditorWidget.ui" line="323"/> + <location filename="../src/WorkflowEditorWidget.ui" line="342"/> <source>Output data</source> <translation>Выходные данные</translation> </message> @@ -6819,87 +6644,67 @@ Do you want to save changes?</source> <translation>Сцена</translation> </message> <message> - <location filename="../src/WorkflowSettingsWidget.ui" line="42"/> + <location filename="../src/WorkflowSettingsWidget.ui" line="40"/> <source>Element style</source> <translation>Стиль</translation> </message> <message> - <location filename="../src/WorkflowSettingsWidget.ui" line="56"/> + <location filename="../src/WorkflowSettingsWidget.ui" line="50"/> <source>Element font</source> <translation>Шрифт</translation> </message> <message> - <location filename="../src/WorkflowSettingsWidget.ui" line="70"/> + <location filename="../src/WorkflowSettingsWidget.ui" line="60"/> <source>Element background color</source> <translation>Цвет фона</translation> </message> <message> - <location filename="../src/WorkflowSettingsWidget.ui" line="105"/> + <location filename="../src/WorkflowSettingsWidget.ui" line="93"/> <source>Enable debugger</source> <translation>Включить отладку</translation> </message> <message> - <location filename="../src/WorkflowSettingsWidget.ui" line="118"/> + <location filename="../src/WorkflowSettingsWidget.ui" line="106"/> <source>Directories</source> <translation>Директории</translation> </message> <message> - <location filename="../src/WorkflowSettingsWidget.ui" line="124"/> + <location filename="../src/WorkflowSettingsWidget.ui" line="112"/> <source>Use directory for output files</source> <translation>ИÑпользовать папку Ð´Ð»Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ñ‹Ñ… файлов</translation> </message> <message> - <location filename="../src/WorkflowSettingsWidget.ui" line="145"/> + <location filename="../src/WorkflowSettingsWidget.ui" line="133"/> <source>Directory for custom elements with scripts</source> <translation>Папка Ð´Ð»Ñ Ñлементов Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ñо Ñкриптами</translation> </message> <message> - <location filename="../src/WorkflowSettingsWidget.ui" line="166"/> - <source>Directory for custom elements with command line tools</source> - <translation>Папка Ð´Ð»Ñ Ñлементов Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ñ ÑƒÑ‚Ð¸Ð»Ð¸Ñ‚Ð°Ð¼Ð¸ командной Ñтроки</translation> + <location filename="../src/WorkflowSettingsWidget.ui" line="154"/> + <source>Directory for custom elements with external tools</source> + <translation>Папка Ð´Ð»Ñ Ñлементов Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ñ Ð²Ð½ÐµÑˆÐ½Ð¸Ð¼Ð¸ инÑтрументами</translation> </message> <message> - <location filename="../src/WorkflowSettingsWidget.ui" line="187"/> + <location filename="../src/WorkflowSettingsWidget.ui" line="175"/> <source>Directory for included schema elements</source> <translation>Папка Ð´Ð»Ñ Ð²ÐºÐ»ÑŽÑ‡ÐµÐ½Ð½Ñ‹Ñ… Ñлементов Ñхемы</translation> </message> - <message> - <source>Use folder for output files</source> - <translation type="vanished">ИÑпользовать папку Ð´Ð»Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð½Ñ‹Ñ… файлов</translation> - </message> - <message> - <source>Folder for custom elements with scripts</source> - <translation type="vanished">Папка Ð´Ð»Ñ Ñлементов Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ñо Ñкриптами</translation> - </message> - <message> - <source>Folder for custom elements with command line tools</source> - <translation type="vanished">Папка Ð´Ð»Ñ Ñлементов Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ñ Ð²Ð½ÐµÑˆÐ½Ð¸Ð¼Ð¸ утилитами</translation> - </message> - <message> - <source>Folder for included schema elements</source> - <translation type="vanished">Папка Ð´Ð»Ñ Ð²ÐºÐ»ÑŽÑ‡ÐµÐ½Ð½Ñ‹Ñ… Ñлементов Ñхемы</translation> - </message> <message> <location filename="../src/WorkflowSettingsWidget.ui" line="26"/> <source>Show grid</source> <translation>Показывать Ñетку</translation> </message> <message> - <location filename="../src/WorkflowSettingsWidget.ui" line="98"/> + <location filename="../src/WorkflowSettingsWidget.ui" line="86"/> <source>Track running progress</source> <translation>Отображать прогреÑÑ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñхемы</translation> </message> - <message> - <source>Folders</source> - <translation type="vanished">Папки</translation> - </message> <message> <location filename="../src/WorkflowSettingsWidget.ui" line="33"/> <source>Snap to grid</source> <translation>ПривÑзыватьÑÑ Ðº Ñетке</translation> </message> <message> - <location filename="../src/WorkflowSettingsWidget.ui" line="92"/> + <location filename="../src/WorkflowSettingsWidget.ui" line="80"/> <source>Runtime settings</source> <translation>ИÑполнение Ñхем</translation> </message> @@ -6907,19 +6712,19 @@ Do you want to save changes?</source> <context> <name>WriteAnnotationsValidator</name> <message> - <location filename="../src/util/WriteAnnotationsValidator.cpp" line="33"/> + <location filename="../src/util/WriteAnnotationsValidator.cpp" line="35"/> <source>Input port is NULL</source> - <translation type="unfinished"></translation> + <translation>Input port is NULL</translation> </message> <message> - <location filename="../src/util/WriteAnnotationsValidator.cpp" line="39"/> + <location filename="../src/util/WriteAnnotationsValidator.cpp" line="41"/> <source>IntegralBusPort is NULL</source> - <translation type="unfinished"></translation> + <translation>IntegralBusPort is NULL</translation> </message> <message> - <location filename="../src/util/WriteAnnotationsValidator.cpp" line="45"/> + <location filename="../src/util/WriteAnnotationsValidator.cpp" line="47"/> <source>Attribute is NULL</source> - <translation type="unfinished"></translation> + <translation>Attribute is NULL</translation> </message> </context> <context> diff --git a/src/plugins/workflow_designer/workflow_designer.pri b/src/plugins/workflow_designer/workflow_designer.pri index 61f9ef464b5b259d10d28a9ba8a9dd62097d824f..5ec86ad60b5fc8a5291830bcc6f003bce52fdd32 100644 --- a/src/plugins/workflow_designer/workflow_designer.pri +++ b/src/plugins/workflow_designer/workflow_designer.pri @@ -6,4 +6,10 @@ PLUGIN_VENDOR=Unipro include( ../../ugene_plugin_common.pri ) -QT += scripttools webkitwidgets printsupport +QT += scripttools printsupport widgets + +useWebKit() { + QT += webkitwidgets +} else { + QT += webenginewidgets +} diff --git a/src/plugins/workflow_designer/workflow_designer.pro b/src/plugins/workflow_designer/workflow_designer.pro index ee53586d34b6ac632123b5a5ccc697add64c9c44..313cba93728c0aa0e74bd18a2da5d65bc0bf5d8b 100644 --- a/src/plugins/workflow_designer/workflow_designer.pro +++ b/src/plugins/workflow_designer/workflow_designer.pro @@ -7,7 +7,6 @@ HEADERS += src/ActorCfgFilterProxyModel.h \ src/ChooseItemDialog.h \ src/CreateScriptWorker.h \ src/DashboardsManagerDialog.h \ - src/EstimationDialog.h \ src/GalaxyConfigConfigurationDialogImpl.h \ src/ImportSchemaDialog.h \ src/InvestigationDataModel.h \ @@ -45,10 +44,12 @@ HEADERS += src/ActorCfgFilterProxyModel.h \ src/library/BaseDocWriter.h \ src/library/CDSearchWorker.h \ src/library/CfgExternalToolModel.h \ + src/library/CmdlineBasedWorkerValidator.h \ src/library/ConvertFilesFormatWorker.h \ src/library/ConvertSnpeffVariationsToAnnotationsWorker.h \ src/library/CoreLib.h \ - src/library/CreateExternalProcessDialog.h \ + src/library/CustomExternalToolLogParser.h \ + src/library/CustomExternalToolRunTaskHelper.h \ src/library/DocActors.h \ src/library/DocWorkers.h \ src/library/ExternalProcessWorker.h \ @@ -90,9 +91,11 @@ HEADERS += src/ActorCfgFilterProxyModel.h \ src/library/WriteAnnotationsWorker.h \ src/library/WriteAssemblyWorkers.h \ src/library/WriteVariationWorker.h \ + src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.h \ src/tasks/ReadAssemblyTask.h \ src/tasks/RenameChromosomeInVariationTask.h \ src/tasks/SequenceQualityTrimTask.h \ + src/util/CustomWorkerUtils.h \ src/util/DatasetsCountValidator.h \ src/util/DatasetValidator.h \ src/util/GrouperActionUtils.h \ @@ -105,7 +108,6 @@ HEADERS += src/ActorCfgFilterProxyModel.h \ FORMS += src/ChooseItemDialog.ui \ src/CreateScriptBlockDialog.ui \ src/DashboardsManagerDialog.ui \ - src/library/ExternalProcessWorkerDialog.ui \ src/GalaxyConfigConfigurationDialog.ui \ src/ImportSchemaDialog.ui \ src/PaletteWidget.ui \ @@ -114,7 +116,14 @@ FORMS += src/ChooseItemDialog.ui \ src/StartupDialog.ui \ src/WorkflowEditorWidget.ui \ src/WorkflowMetaDialog.ui \ - src/WorkflowSettingsWidget.ui + src/WorkflowSettingsWidget.ui \ + src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardCommandPage.ui \ + src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardElementAppearancePage.ui \ + src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardGeneralSettingsPage.ui \ + src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardInputDataPage.ui \ + src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardOutputDataPage.ui \ + src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardParametersPage.ui \ + src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizardSummaryPage.ui SOURCES += src/ActorCfgFilterProxyModel.cpp \ src/ActorCfgModel.cpp \ @@ -122,7 +131,6 @@ SOURCES += src/ActorCfgFilterProxyModel.cpp \ src/ChooseItemDialog.cpp \ src/CreateScriptWorker.cpp \ src/DashboardsManagerDialog.cpp \ - src/EstimationDialog.cpp \ src/GalaxyConfigConfigurationDialogImpl.cpp \ src/ImportSchemaDialog.cpp \ src/InvestigationDataModel.cpp \ @@ -160,10 +168,10 @@ SOURCES += src/ActorCfgFilterProxyModel.cpp \ src/library/BaseDocWriter.cpp \ src/library/CDSearchWorker.cpp \ src/library/CfgExternalToolModel.cpp \ + src/library/CmdlineBasedWorkerValidator.cpp \ src/library/ConvertFilesFormatWorker.cpp \ src/library/ConvertSnpeffVariationsToAnnotationsWorker.cpp \ src/library/CoreLib.cpp \ - src/library/CreateExternalProcessDialog.cpp \ src/library/DocActors.cpp \ src/library/DocWorkers.cpp \ src/library/ExternalProcessWorker.cpp \ @@ -205,9 +213,11 @@ SOURCES += src/ActorCfgFilterProxyModel.cpp \ src/library/WriteAnnotationsWorker.cpp \ src/library/WriteAssemblyWorkers.cpp \ src/library/WriteVariationWorker.cpp \ + src/library/create_cmdline_based_worker/CreateCmdlineBasedWorkerWizard.cpp \ src/tasks/ReadAssemblyTask.cpp \ src/tasks/RenameChromosomeInVariationTask.cpp \ src/tasks/SequenceQualityTrimTask.cpp \ + src/util/CustomWorkerUtils.cpp \ src/util/DatasetsCountValidator.cpp \ src/util/DatasetValidator.cpp \ src/util/GrouperActionUtils.cpp \ diff --git a/src/plugins/workflow_dump/src/WorkflowDumpPlugin.cpp b/src/plugins/workflow_dump/src/WorkflowDumpPlugin.cpp index d6945ac9c7f5e0f0be85f856e1529ea081f06f4a..4117cbc5ec8024e2e21bda3af28e6d0cfae42050 100644 --- a/src/plugins/workflow_dump/src/WorkflowDumpPlugin.cpp +++ b/src/plugins/workflow_dump/src/WorkflowDumpPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_dump/src/WorkflowDumpPlugin.h b/src/plugins/workflow_dump/src/WorkflowDumpPlugin.h index 8db5fac26c6d587c8d63b288961dd29dc072b49d..25fb8044b8a1833691aa40729f437e0b06844b0a 100644 --- a/src/plugins/workflow_dump/src/WorkflowDumpPlugin.h +++ b/src/plugins/workflow_dump/src/WorkflowDumpPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/ball/src/BallPlugin.cpp b/src/plugins_3rdparty/ball/src/BallPlugin.cpp index b2ac29905dee68c9d62e17075f3564e7f26dec45..ffc53189f69f735e9c434fb563753b1d8ed89f47 100644 --- a/src/plugins_3rdparty/ball/src/BallPlugin.cpp +++ b/src/plugins_3rdparty/ball/src/BallPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/ball/src/BallPlugin.h b/src/plugins_3rdparty/ball/src/BallPlugin.h index 411384ae5aab78d8251312741aa735c2b9b67352..988e5a9510e1ae1792312313d65d12a9c81b2472 100644 --- a/src/plugins_3rdparty/ball/src/BallPlugin.h +++ b/src/plugins_3rdparty/ball/src/BallPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/ball/src/SAS.cpp b/src/plugins_3rdparty/ball/src/SAS.cpp index 95b75b51385e7fddc4e43819664892c9e686f574..b671b1744869ce1c91b15fef787f23ff48a463c3 100644 --- a/src/plugins_3rdparty/ball/src/SAS.cpp +++ b/src/plugins_3rdparty/ball/src/SAS.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/ball/src/SAS.h b/src/plugins_3rdparty/ball/src/SAS.h index a9d44c7bdfe2aa373ced33ec3278b7b512284185..56bf9c3811307355f1cd9af7e2d5fa67c40f2e8e 100644 --- a/src/plugins_3rdparty/ball/src/SAS.h +++ b/src/plugins_3rdparty/ball/src/SAS.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/ball/src/SES.cpp b/src/plugins_3rdparty/ball/src/SES.cpp index 1b84caee8fcbe713e41de68ff304be45806f3651..014fb0c0ce26c0055e7395571629c0968cf07680 100644 --- a/src/plugins_3rdparty/ball/src/SES.cpp +++ b/src/plugins_3rdparty/ball/src/SES.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/ball/src/SES.h b/src/plugins_3rdparty/ball/src/SES.h index 36f2342cf0fd6bc2619edce4d5b929459c76a2ed..b58f1642373ca6f3bdb65fdd7b426250827669f7 100644 --- a/src/plugins_3rdparty/ball/src/SES.h +++ b/src/plugins_3rdparty/ball/src/SES.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/ball/src/source/COMMON/exception.cpp b/src/plugins_3rdparty/ball/src/source/COMMON/exception.cpp index 7c13c45365f9edec5aa5fcdb8999b2292c989730..096ff84105fde00b75f9ce22735762653f48e805 100644 --- a/src/plugins_3rdparty/ball/src/source/COMMON/exception.cpp +++ b/src/plugins_3rdparty/ball/src/source/COMMON/exception.cpp @@ -355,7 +355,7 @@ namespace BALL if ((line_ != -1) && (name_ != "unknown")) { Log.error() << "last entry in the exception handler: " << endl; - Log.error() << "exception of type " << name_.c_str() << " occured in line " + Log.error() << "exception of type " << name_.c_str() << " occurred in line " << line_ << " of " << file_.c_str() << endl; Log.error() << "error message: " << message_.c_str() << endl; } diff --git a/src/plugins_3rdparty/gor4/src/GorIVAlgTask.cpp b/src/plugins_3rdparty/gor4/src/GorIVAlgTask.cpp index 6147d3ae151b03cebf020a779b75dc9805b2a3a6..c556e5b437b0ff8f2132af9fe055a161374a7977 100644 --- a/src/plugins_3rdparty/gor4/src/GorIVAlgTask.cpp +++ b/src/plugins_3rdparty/gor4/src/GorIVAlgTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -31,7 +31,7 @@ namespace U2 { -const QString GorIVAlgTask::taskName(QObject::tr("GORIV")); +const QString GorIVAlgTask::taskName = "GORIV"; QMutex GorIVAlgTask::runLock; GorIVAlgTask::GorIVAlgTask(const QByteArray& inputSeq) : SecStructPredictTask(inputSeq) diff --git a/src/plugins_3rdparty/gor4/src/GorIVAlgTask.h b/src/plugins_3rdparty/gor4/src/GorIVAlgTask.h index 46669ef35707216c64bab6626a67077aa63c3582..f4b3b0e7cab38bf4a6dbdcabc37cdcf65c701d12 100644 --- a/src/plugins_3rdparty/gor4/src/GorIVAlgTask.h +++ b/src/plugins_3rdparty/gor4/src/GorIVAlgTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/gor4/src/GorIVPlugin.cpp b/src/plugins_3rdparty/gor4/src/GorIVPlugin.cpp index fea98ccae8c207fd2f6933c52890f3c392a5df55..665dcbe80f91bdc0c625e6f24b4d6f884848274d 100644 --- a/src/plugins_3rdparty/gor4/src/GorIVPlugin.cpp +++ b/src/plugins_3rdparty/gor4/src/GorIVPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/gor4/src/GorIVPlugin.h b/src/plugins_3rdparty/gor4/src/GorIVPlugin.h index 03c824c528445df8598fbff77604b8b496d45abe..49e53f893105a460fee8aae0016131ba64c05718 100644 --- a/src/plugins_3rdparty/gor4/src/GorIVPlugin.h +++ b/src/plugins_3rdparty/gor4/src/GorIVPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/gor4/transl/russian.ts b/src/plugins_3rdparty/gor4/transl/russian.ts index 0ae49c35e93c04088b3cc5212d8342f424f32739..1c8c5881833aefd60f743a4881db8957822de085 100644 --- a/src/plugins_3rdparty/gor4/transl/russian.ts +++ b/src/plugins_3rdparty/gor4/transl/russian.ts @@ -4,9 +4,8 @@ <context> <name>QObject</name> <message> - <location filename="../src/GorIVAlgTask.cpp" line="34"/> <source>GORIV</source> - <translation>GORIV</translation> + <translation type="vanished">GORIV</translation> </message> </context> <context> diff --git a/src/plugins_3rdparty/hmm2/src/HMMIO.cpp b/src/plugins_3rdparty/hmm2/src/HMMIO.cpp index 3dd4d0b71c222566d833be8ac0463bed64f26fc8..c83de8dbe6bd0c050acf5ef7ef5f98c4833ad667 100644 --- a/src/plugins_3rdparty/hmm2/src/HMMIO.cpp +++ b/src/plugins_3rdparty/hmm2/src/HMMIO.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -215,7 +215,11 @@ void HMMIO::readHMM2(IOAdapterFactory* iof, const QString& url, TaskStateInfo& s break; } if (strncmp(buffer, "HMMER2.0", 8) != 0) { - si.setError( tr("File format is not supported") ); + if (strncmp(buffer, "HMMER3", 6) == 0) { + si.setError(tr("Model \"%1\" is a HMMER3 model, it can't be used with HMMER2.").arg(url)); + } else { + si.setError(tr("File format is not supported")); + } break; } diff --git a/src/plugins_3rdparty/hmm2/src/HMMIO.h b/src/plugins_3rdparty/hmm2/src/HMMIO.h index 13ca03f766175ea88b82979d61dac9dc6d48e413..7c464a64285862547aece9d1eb6f0a4f31b769ba 100644 --- a/src/plugins_3rdparty/hmm2/src/HMMIO.h +++ b/src/plugins_3rdparty/hmm2/src/HMMIO.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/hmm2/src/HMMIOWorker.cpp b/src/plugins_3rdparty/hmm2/src/HMMIOWorker.cpp index 0ccce7aa243b2506eecd5d5f4e52ffe31276d644..143776d3c493e72854aa1103a9f27c048a755fc9 100644 --- a/src/plugins_3rdparty/hmm2/src/HMMIOWorker.cpp +++ b/src/plugins_3rdparty/hmm2/src/HMMIOWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -65,8 +65,8 @@ DataTypePtr HMMLib::HMM_PROFILE_TYPE() { return dtr->getById(HMM_PROFILE_TYPE_ID); } -const Descriptor HMMLib::HMM2_SLOT("hmm2-profile", QObject::tr("HMM Profile"), ""); +const Descriptor HMMLib::HMM2_SLOT() {return Descriptor(HMM2_SLOT_ID, QObject::tr("HMM Profile"), "");} const Descriptor HMMLib::HMM_CATEGORY() {return Descriptor("hmmer", tr("HMMER2 Tools"), "");} HMMIOProto::HMMIOProto(const Descriptor& _desc, const QList<PortDescriptor*>& _ports, const QList<Attribute*>& _attrs ) @@ -134,7 +134,7 @@ void HMMIOWorkerFactory::init() { QMap<Descriptor, DataTypePtr> m; m[ud] = BaseTypes::STRING_TYPE(); - m[HMMLib::HMM2_SLOT] = HMMLib::HMM_PROFILE_TYPE(); + m[HMMLib::HMM2_SLOT()] = HMMLib::HMM_PROFILE_TYPE(); DataTypePtr t(new MapDataType(Descriptor("write.hmm.content"), m)); QList<PortDescriptor*> p; QList<Attribute*> a; @@ -150,7 +150,7 @@ void HMMIOWorkerFactory::init() { QList<PortDescriptor*> p; QList<Attribute*> a; QMap<Descriptor, DataTypePtr> outM; - outM[HMMLib::HMM2_SLOT] = HMMLib::HMM_PROFILE_TYPE(); + outM[HMMLib::HMM2_SLOT()] = HMMLib::HMM_PROFILE_TYPE(); p << new PortDescriptor(od, DataTypePtr(new MapDataType("hmm.read.out", outM)), false /*output*/, true); Descriptor desc(HMMReader::ACTOR, HMMLib::tr("Read HMM2 Profile"), HMMLib::tr("Reads HMM profiles from file(s). The files can be local or Internet URLs.")); @@ -170,7 +170,7 @@ QString HMMReadPrompter::composeRichDoc() { QString HMMWritePrompter::composeRichDoc() { IntegralBusPort* input = qobject_cast<IntegralBusPort*>(target->getPort(HMM_IN_PORT_ID)); - Actor* producer = input->getProducer(HMMLib::HMM2_SLOT.getId()); + Actor* producer = input->getProducer(HMM2_SLOT_ID); QString unsetStr = "<font color='red'>"+tr("unset")+"</font>"; QString producerStr = producer ? producer->getLabel() : unsetStr; QString url = getScreenedURL(input, BaseAttributes::URL_OUT_ATTRIBUTE().getId(), BaseSlots::URL_SLOT().getId()); @@ -250,7 +250,7 @@ Task* HMMWriter::tick() { fileMode = actor->getParameter(BaseAttributes::FILE_MODE_ATTRIBUTE().getId())->getAttributeValue<uint>(context); QVariantMap data = inputMessage.getData().toMap(); - plan7_s* hmm = data.value(HMMLib::HMM2_SLOT.getId()).value<plan7_s*>(); + plan7_s* hmm = data.value(HMM2_SLOT_ID).value<plan7_s*>(); QString anUrl = url; if (anUrl.isEmpty()) { anUrl = data.value(BaseSlots::URL_SLOT().getId()).toString(); diff --git a/src/plugins_3rdparty/hmm2/src/HMMIOWorker.h b/src/plugins_3rdparty/hmm2/src/HMMIOWorker.h index 455287e1c54883637d299be51c35cb984fa4b5cc..13832f51d63d5bd3f710de9eacaa961479a1632c 100644 --- a/src/plugins_3rdparty/hmm2/src/HMMIOWorker.h +++ b/src/plugins_3rdparty/hmm2/src/HMMIOWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,11 +30,13 @@ namespace U2 { namespace LocalWorkflow { +#define HMM2_SLOT_ID QString("hmm2-profile") + class HMMLib : public QObject { Q_OBJECT public: static const Descriptor HMM_CATEGORY(); - static const Descriptor HMM2_SLOT; + static const Descriptor HMM2_SLOT(); static DataTypePtr HMM_PROFILE_TYPE(); static const QString HMM_PROFILE_TYPE_ID; static void init(); diff --git a/src/plugins_3rdparty/hmm2/src/TaskLocalStorage.cpp b/src/plugins_3rdparty/hmm2/src/TaskLocalStorage.cpp index 200eff90dc31defa7ea2de14925604c9d13781df..c2e3b9ed35698baa29eb3c598294cb34d1988f84 100644 --- a/src/plugins_3rdparty/hmm2/src/TaskLocalStorage.cpp +++ b/src/plugins_3rdparty/hmm2/src/TaskLocalStorage.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/hmm2/src/TaskLocalStorage.h b/src/plugins_3rdparty/hmm2/src/TaskLocalStorage.h index d8f3a4b49643fac2db6931ea929f7abe3b6d77a9..71e59dfa344aad2080b710322eabd70a4bf41d3d 100644 --- a/src/plugins_3rdparty/hmm2/src/TaskLocalStorage.h +++ b/src/plugins_3rdparty/hmm2/src/TaskLocalStorage.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/hmm2/src/uHMMPlugin.cpp b/src/plugins_3rdparty/hmm2/src/uHMMPlugin.cpp index e6ad231c4f91ca5b6a1d2f5f9f53a58eb78b7a99..996478f8210f7bf366e44b1002495efc10892e91 100644 --- a/src/plugins_3rdparty/hmm2/src/uHMMPlugin.cpp +++ b/src/plugins_3rdparty/hmm2/src/uHMMPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/hmm2/src/uHMMPlugin.h b/src/plugins_3rdparty/hmm2/src/uHMMPlugin.h index 5c494903c00180dee2cce6b8e61a8c9eb6f752ec..a14a5c590c26d633320371e2415987aa6ffd6746 100644 --- a/src/plugins_3rdparty/hmm2/src/uHMMPlugin.h +++ b/src/plugins_3rdparty/hmm2/src/uHMMPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/hmm2/src/u_build/HMMBuildDialogController.cpp b/src/plugins_3rdparty/hmm2/src/u_build/HMMBuildDialogController.cpp index b96a1ac06bc9fa6c9bcb15d98e73d1848e56b481..46b5a0d90c6014708743d524ed0fa1ef52d34500 100644 --- a/src/plugins_3rdparty/hmm2/src/u_build/HMMBuildDialogController.cpp +++ b/src/plugins_3rdparty/hmm2/src/u_build/HMMBuildDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -51,7 +51,7 @@ HMMBuildDialogController::HMMBuildDialogController(const QString& _pn, const Mul profileName(_pn), saveController(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22056054"); + new HelpButton(this, buttonBox, "24742589"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Build")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Close")); diff --git a/src/plugins_3rdparty/hmm2/src/u_build/HMMBuildDialogController.h b/src/plugins_3rdparty/hmm2/src/u_build/HMMBuildDialogController.h index 1b45f023f6d98fd4ae567ee11297015ceaeab6f6..2240befac1172e4be4c27b3ed039e975bd11c0d2 100644 --- a/src/plugins_3rdparty/hmm2/src/u_build/HMMBuildDialogController.h +++ b/src/plugins_3rdparty/hmm2/src/u_build/HMMBuildDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/hmm2/src/u_build/HMMBuildWorker.cpp b/src/plugins_3rdparty/hmm2/src/u_build/HMMBuildWorker.cpp index a71c8c43d03a12350d180cee301fc2b8cca1213c..0fbe65fc5f9e9aba4e2ae82a3106455422dc535e 100644 --- a/src/plugins_3rdparty/hmm2/src/u_build/HMMBuildWorker.cpp +++ b/src/plugins_3rdparty/hmm2/src/u_build/HMMBuildWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -89,7 +89,7 @@ void HMMBuildWorkerFactory::init() { inM[BaseSlots::MULTIPLE_ALIGNMENT_SLOT()] = BaseTypes::MULTIPLE_ALIGNMENT_TYPE(); p << new PortDescriptor(id, DataTypePtr(new MapDataType("hmm.build.in", inM)), true /*input*/); QMap<Descriptor, DataTypePtr> outM; - outM[HMMLib::HMM2_SLOT] = HMMLib::HMM_PROFILE_TYPE(); + outM[HMMLib::HMM2_SLOT()] = HMMLib::HMM_PROFILE_TYPE(); p << new PortDescriptor(od, DataTypePtr(new MapDataType("hmm.build", outM)), false /*input*/, true /*multi*/); } diff --git a/src/plugins_3rdparty/hmm2/src/u_calibrate/HMMCalibrateDialogController.cpp b/src/plugins_3rdparty/hmm2/src/u_calibrate/HMMCalibrateDialogController.cpp index a7cd51ae1726bb71cc5c6f4daee6662a75fc44b9..69f45a3ad29515d1b557b17dbbe88412d93c0fad 100644 --- a/src/plugins_3rdparty/hmm2/src/u_calibrate/HMMCalibrateDialogController.cpp +++ b/src/plugins_3rdparty/hmm2/src/u_calibrate/HMMCalibrateDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -42,7 +42,7 @@ HMMCalibrateDialogController::HMMCalibrateDialogController(QWidget* w) saveController(NULL) { task = NULL; setupUi(this); - new HelpButton(this, buttonBox, "22056055"); + new HelpButton(this, buttonBox, "24742590"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Calibrate")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Close")); diff --git a/src/plugins_3rdparty/hmm2/src/u_calibrate/HMMCalibrateDialogController.h b/src/plugins_3rdparty/hmm2/src/u_calibrate/HMMCalibrateDialogController.h index 9e66e9fe04bcc39f9a455e191b264a4eec15bafe..d6a9a9e2f83ff15b8c00b1345732ebbf0cdd6b48 100644 --- a/src/plugins_3rdparty/hmm2/src/u_calibrate/HMMCalibrateDialogController.h +++ b/src/plugins_3rdparty/hmm2/src/u_calibrate/HMMCalibrateDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchDialogController.cpp b/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchDialogController.cpp index f44a27ec8c31ea89730a9e1c8001a5189c4c9629..dd8089b841901f8b3afe0a9c4191dbdc089e41a6 100644 --- a/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchDialogController.cpp +++ b/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchDialogController.cpp @@ -70,7 +70,7 @@ void HMMSearchDialogController::init(const U2SequenceObject *seqObj){ searchTask = NULL; setupUi(this); - new HelpButton(this, buttonBox, "22056056"); + new HelpButton(this, buttonBox, "24742591"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Search")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Close")); diff --git a/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchDialogController.h b/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchDialogController.h index b9cca19319b22d40bb170c25e569021e786d7fdc..75f89a3b5cf8c6bf6e03ebae1459f00e06dc730e 100644 --- a/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchDialogController.h +++ b/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchQDActor.cpp b/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchQDActor.cpp index bb7acb4b2bb9e5c1c9984d7f13cd4e94bc4f5de4..05f69260798340ec460bb423abca2807679526e4 100644 --- a/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchQDActor.cpp +++ b/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchQDActor.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchQDActor.h b/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchQDActor.h index 84221ddfbf1eba9e9dc95ad9de69d40be3dcf8f2..a276b064a11a58f52dce033dd8f28adb614dc398 100644 --- a/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchQDActor.h +++ b/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchQDActor.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchTask.cpp b/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchTask.cpp index ef3a96bdd2bb03715f254917ead5b1d0ed6be041..222e788e7486957b762906aac653a0cd9ac51a42 100644 --- a/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchTask.cpp +++ b/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchTask.h b/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchTask.h index 7cb216b604658c3fc270dae999d889d1d299c28a..f7df7e8e9c674b87db24a743145f6aa9a751da78 100644 --- a/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchTask.h +++ b/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchWorker.cpp b/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchWorker.cpp index 13c5635cd28a6f57116ca7c96dde0ee235619287..61736eda0f8f7b45332893625433432ce833749b 100644 --- a/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchWorker.cpp +++ b/src/plugins_3rdparty/hmm2/src/u_search/HMMSearchWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -77,7 +77,7 @@ void HMMSearchWorkerFactory::init() { HMMSearchWorker::tr("Annotations marking found similar sequence regions.")); QMap<Descriptor, DataTypePtr> hmmM; - hmmM[HMMLib::HMM2_SLOT] = HMMLib::HMM_PROFILE_TYPE(); + hmmM[HMMLib::HMM2_SLOT()] = HMMLib::HMM_PROFILE_TYPE(); p << new PortDescriptor(hd, DataTypePtr(new MapDataType("hmm.search.hmm", hmmM)), true /*input*/, false, IntegralBusPort::BLIND_INPUT); QMap<Descriptor, DataTypePtr> seqM; seqM[BaseSlots::DNA_SEQUENCE_SLOT()] = BaseTypes::DNA_SEQUENCE_TYPE(); @@ -199,7 +199,7 @@ bool HMMSearchWorker::isReady() const { Task* HMMSearchWorker::tick() { while (hmmPort->hasMessage()) { - hmms << hmmPort->get().getData().toMap().value(HMMLib::HMM2_SLOT.getId()).value<plan7_s*>(); + hmms << hmmPort->get().getData().toMap().value(HMM2_SLOT_ID).value<plan7_s*>(); } if (!hmmPort->isEnded()) { // || hmms.isEmpty() || !seqPort->hasMessage() return NULL; @@ -245,8 +245,8 @@ void HMMSearchWorker::sl_taskFinished(Task *t) { } if (NULL != output) { QList<SharedAnnotationData> list; - foreach (Task *sub, t->getSubtasks()) { - HMMSearchTask *hst = qobject_cast<HMMSearchTask *>(sub); + foreach (const QPointer<Task> &sub, t->getSubtasks()) { + HMMSearchTask *hst = qobject_cast<HMMSearchTask *>(sub.data()); list += hst->getResultsAsAnnotations(U2FeatureTypes::MiscSignal, resultName); } diff --git a/src/plugins_3rdparty/hmm2/src/u_search/uhmmsearch_opt.cpp b/src/plugins_3rdparty/hmm2/src/u_search/uhmmsearch_opt.cpp index af22c557f23a1f4b3b8131df6c071f98fcc56546..8a4702e24f8b0d91795f22e9e35df11e28e8f7f3 100644 --- a/src/plugins_3rdparty/hmm2/src/u_search/uhmmsearch_opt.cpp +++ b/src/plugins_3rdparty/hmm2/src/u_search/uhmmsearch_opt.cpp @@ -16,8 +16,6 @@ #define ALIGNED(ptr, base) ( (unsigned char*) ( (((quintptr)(ptr))+((base)-1)) &~((base-1)) ) ) #define ALIGNED_16(ptr) ( ALIGNED(ptr, 16) ) -//static U2::Logger hmm_log( U2::UHMMSearch::tr("UHMMER log") ); - namespace { //returns aligned pointer. unsigned char * DigitizeSequenceHP( const unsigned char * seq, int L, const unsigned char * mem, int align_base ) diff --git a/src/plugins_3rdparty/hmm2/src/u_tests/uhmmerTests.cpp b/src/plugins_3rdparty/hmm2/src/u_tests/uhmmerTests.cpp index a232d41eef7d121eac0a9f484f20c00057cb9b93..a5aaba6d88c75f61e0e054310ab161df6779e094 100644 --- a/src/plugins_3rdparty/hmm2/src/u_tests/uhmmerTests.cpp +++ b/src/plugins_3rdparty/hmm2/src/u_tests/uhmmerTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -308,6 +308,8 @@ void GTest_uHMMERSearch::cleanup() { delete aDoc; aDoc = NULL; } + + XmlTest::cleanup(); } @@ -382,9 +384,11 @@ Task::ReportResult GTest_uHMMERBuild::report() { } void GTest_uHMMERBuild::cleanup(){ - if(deleteTempFile){ + if (!hasError() && deleteTempFile){ QFile::remove(outFile); } + + XmlTest::cleanup(); } void GTest_hmmCompare::init(XMLTestFormat* tf, const QDomElement& el) { @@ -595,8 +599,12 @@ GTest_uHMMERCalibrate::GTest_uHMMERCalibrateSubtask::GTest_uHMMERCalibrateSubtas } } void GTest_uHMMERCalibrate::cleanup(){ - QFile::remove(env->getVar("TEMP_DATA_DIR")+"/temp111"); + if (!hasError()) { + QFile::remove(env->getVar("TEMP_DATA_DIR")+"/temp111"); + } delete[] calibrateTask; + + XmlTest::cleanup(); } QList<XMLTestFactory*> UHMMERTests::createTestFactories() { diff --git a/src/plugins_3rdparty/hmm2/src/u_tests/uhmmerTests.h b/src/plugins_3rdparty/hmm2/src/u_tests/uhmmerTests.h index c34bc29937c2875b054183cf8b574f94553520c6..5ee4b9775f9ab32190021690599f1ca08c3ce615 100644 --- a/src/plugins_3rdparty/hmm2/src/u_tests/uhmmerTests.h +++ b/src/plugins_3rdparty/hmm2/src/u_tests/uhmmerTests.h @@ -15,7 +15,7 @@ class HMMBuildToFileTask; class CreateAnnotationModel; struct plan7_s; -class GTest_uHMMERSearch : public GTest { +class GTest_uHMMERSearch : public XmlTest { Q_OBJECT public: @@ -48,7 +48,7 @@ protected: }; -class GTest_uHMMERBuild: public GTest { +class GTest_uHMMERBuild: public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_uHMMERBuild, "uhmmer-build"); ReportResult report(); @@ -59,7 +59,7 @@ private: bool deleteTempFile; }; -class GTest_hmmCompare: public GTest { +class GTest_hmmCompare: public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_hmmCompare, "hmm-compare"); ReportResult report(); @@ -67,7 +67,7 @@ private: QString file1Name; QString file2Name; }; -class GTest_uHMMERCalibrate: public GTest { +class GTest_uHMMERCalibrate: public XmlTest { Q_OBJECT SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_uHMMERCalibrate, "uhmmer-calibrate"); ReportResult report(); diff --git a/src/plugins_3rdparty/hmm2/transl/russian.ts b/src/plugins_3rdparty/hmm2/transl/russian.ts index d32ec01a430c24d7323dd03bb745b6ac44ebf235..f127c056d8f553b5f674e5a18acdc64d73f7f283 100644 --- a/src/plugins_3rdparty/hmm2/transl/russian.ts +++ b/src/plugins_3rdparty/hmm2/transl/russian.ts @@ -330,7 +330,7 @@ The default is instead to generate sequences with a variety of different lengths <context> <name>QObject</name> <message> - <location filename="../src/HMMIOWorker.cpp" line="68"/> + <location filename="../src/HMMIOWorker.cpp" line="69"/> <source>HMM Profile</source> <translation>Профайл HMM</translation> </message> @@ -338,7 +338,7 @@ The default is instead to generate sequences with a variety of different lengths <context> <name>U2::GTest_uHMMERCalibrate</name> <message> - <location filename="../src/u_tests/uhmmerTests.cpp" line="589"/> + <location filename="../src/u_tests/uhmmerTests.cpp" line="593"/> <source>uhmmer-calibrate-subtask</source> <translation>Калибровка HMM профайла</translation> </message> @@ -781,59 +781,59 @@ The default is instead to generate sequences with a variety of different lengths <name>U2::HMMIO</name> <message> <location filename="../src/HMMIO.cpp" line="214"/> - <location filename="../src/HMMIO.cpp" line="230"/> - <location filename="../src/HMMIO.cpp" line="390"/> - <location filename="../src/HMMIO.cpp" line="396"/> - <location filename="../src/HMMIO.cpp" line="422"/> - <location filename="../src/HMMIO.cpp" line="453"/> - <location filename="../src/HMMIO.cpp" line="478"/> + <location filename="../src/HMMIO.cpp" line="234"/> + <location filename="../src/HMMIO.cpp" line="394"/> + <location filename="../src/HMMIO.cpp" line="400"/> + <location filename="../src/HMMIO.cpp" line="426"/> + <location filename="../src/HMMIO.cpp" line="457"/> + <location filename="../src/HMMIO.cpp" line="482"/> <source>Illegal line</source> <translation>Ошибка формата</translation> </message> <message> - <location filename="../src/HMMIO.cpp" line="218"/> + <location filename="../src/HMMIO.cpp" line="221"/> <source>File format is not supported</source> <translation>Формат не поддерживаетÑÑ</translation> </message> <message> - <location filename="../src/HMMIO.cpp" line="276"/> - <location filename="../src/HMMIO.cpp" line="281"/> - <location filename="../src/HMMIO.cpp" line="288"/> - <location filename="../src/HMMIO.cpp" line="293"/> - <location filename="../src/HMMIO.cpp" line="300"/> - <location filename="../src/HMMIO.cpp" line="305"/> - <location filename="../src/HMMIO.cpp" line="312"/> - <location filename="../src/HMMIO.cpp" line="318"/> - <location filename="../src/HMMIO.cpp" line="327"/> - <location filename="../src/HMMIO.cpp" line="332"/> - <location filename="../src/HMMIO.cpp" line="344"/> - <location filename="../src/HMMIO.cpp" line="353"/> - <location filename="../src/HMMIO.cpp" line="358"/> - <location filename="../src/HMMIO.cpp" line="402"/> - <location filename="../src/HMMIO.cpp" line="407"/> + <location filename="../src/HMMIO.cpp" line="280"/> + <location filename="../src/HMMIO.cpp" line="285"/> + <location filename="../src/HMMIO.cpp" line="292"/> + <location filename="../src/HMMIO.cpp" line="297"/> + <location filename="../src/HMMIO.cpp" line="304"/> + <location filename="../src/HMMIO.cpp" line="309"/> + <location filename="../src/HMMIO.cpp" line="316"/> + <location filename="../src/HMMIO.cpp" line="322"/> + <location filename="../src/HMMIO.cpp" line="331"/> + <location filename="../src/HMMIO.cpp" line="336"/> + <location filename="../src/HMMIO.cpp" line="348"/> + <location filename="../src/HMMIO.cpp" line="357"/> + <location filename="../src/HMMIO.cpp" line="362"/> + <location filename="../src/HMMIO.cpp" line="406"/> <location filename="../src/HMMIO.cpp" line="411"/> - <location filename="../src/HMMIO.cpp" line="428"/> + <location filename="../src/HMMIO.cpp" line="415"/> <location filename="../src/HMMIO.cpp" line="432"/> - <location filename="../src/HMMIO.cpp" line="437"/> - <location filename="../src/HMMIO.cpp" line="444"/> - <location filename="../src/HMMIO.cpp" line="459"/> - <location filename="../src/HMMIO.cpp" line="468"/> - <location filename="../src/HMMIO.cpp" line="484"/> - <location filename="../src/HMMIO.cpp" line="492"/> - <location filename="../src/HMMIO.cpp" line="498"/> - <location filename="../src/HMMIO.cpp" line="503"/> + <location filename="../src/HMMIO.cpp" line="436"/> + <location filename="../src/HMMIO.cpp" line="441"/> + <location filename="../src/HMMIO.cpp" line="448"/> + <location filename="../src/HMMIO.cpp" line="463"/> + <location filename="../src/HMMIO.cpp" line="472"/> + <location filename="../src/HMMIO.cpp" line="488"/> + <location filename="../src/HMMIO.cpp" line="496"/> + <location filename="../src/HMMIO.cpp" line="502"/> + <location filename="../src/HMMIO.cpp" line="507"/> <source>Invalid file structure near %1</source> <translation>ÐÐµÐºÐ¾Ñ€Ñ€ÐµÐºÑ‚Ð½Ð°Ñ Ñтруктура файла вблизи "%1"</translation> </message> <message> - <location filename="../src/HMMIO.cpp" line="338"/> + <location filename="../src/HMMIO.cpp" line="342"/> <source>ALPH must precede NULE in HMM save files</source> <translation>ALPH must precede NULE in HMM save files</translation> </message> <message> - <location filename="../src/HMMIO.cpp" line="247"/> - <location filename="../src/HMMIO.cpp" line="373"/> + <location filename="../src/HMMIO.cpp" line="251"/> <location filename="../src/HMMIO.cpp" line="377"/> + <location filename="../src/HMMIO.cpp" line="381"/> <source>Value is illegal: %1</source> <translation>Ðекорректное значение: "%1"</translation> </message> @@ -843,17 +843,22 @@ The default is instead to generate sequences with a variety of different lengths <translation>Ðе уÑтановлен алфавит</translation> </message> <message> - <location filename="../src/HMMIO.cpp" line="381"/> + <location filename="../src/HMMIO.cpp" line="219"/> + <source>Model "%1" is a HMMER3 model, it can't be used with HMMER2.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/HMMIO.cpp" line="385"/> <source>Value is not set for '%1'</source> <translation>Ðе уÑтановлено значение Ð´Ð»Ñ "%1"</translation> </message> <message> - <location filename="../src/HMMIO.cpp" line="517"/> + <location filename="../src/HMMIO.cpp" line="521"/> <source>No '//' symbol found</source> <translation>Ðе найден маркер конца Ñтруктуры: '//'</translation> </message> <message> - <location filename="../src/HMMIO.cpp" line="635"/> + <location filename="../src/HMMIO.cpp" line="639"/> <source>HMM models</source> <translation>Профайлы HMM</translation> </message> @@ -869,7 +874,7 @@ The default is instead to generate sequences with a variety of different lengths <context> <name>U2::HMMReadTask</name> <message> - <location filename="../src/HMMIO.cpp" line="650"/> + <location filename="../src/HMMIO.cpp" line="654"/> <source>Read HMM profile '%1'.</source> <translation>Чтение HMM профайла '%1'.</translation> </message> @@ -1039,7 +1044,7 @@ The default is instead to generate sequences with a variety of different lengths <context> <name>U2::HMMWriteTask</name> <message> - <location filename="../src/HMMIO.cpp" line="670"/> + <location filename="../src/HMMIO.cpp" line="674"/> <source>Write HMM profile '%1'</source> <translation>ЗапиÑÑŒ HMM профайла '%1'</translation> </message> diff --git a/src/plugins_3rdparty/kalign/kalign.pri b/src/plugins_3rdparty/kalign/kalign.pri index c4ec93ddfb1cf239cc056702483525215af9e911..1ee47f5497e2fde25ac6565b88f477b4845836be 100644 --- a/src/plugins_3rdparty/kalign/kalign.pri +++ b/src/plugins_3rdparty/kalign/kalign.pri @@ -5,17 +5,8 @@ PLUGIN_NAME=KAlign PLUGIN_VENDOR=Unipro CONFIG += warn_off -LIBS += -lqscore - -!debug_and_release|build_pass { - - CONFIG(debug, debug|release) { - LIBS -= -lqscore - LIBS += -lqscored - } -} - - include( ../../ugene_plugin_common.pri ) +LIBS += -lqscore$$D + diff --git a/src/plugins_3rdparty/kalign/src/KalignAdapter.cpp b/src/plugins_3rdparty/kalign/src/KalignAdapter.cpp index c03d245706981354bd56bd93c596925b68f420ee..bc594b722fa6983e7f5bcf583c8e6627cb8f4e05 100644 --- a/src/plugins_3rdparty/kalign/src/KalignAdapter.cpp +++ b/src/plugins_3rdparty/kalign/src/KalignAdapter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/kalign/src/KalignAdapter.h b/src/plugins_3rdparty/kalign/src/KalignAdapter.h index a3b3398ec5f55032efbcfa67c1f80f3e31074e5f..4ae5ba133c888fc219846a23622512abf29c8022 100644 --- a/src/plugins_3rdparty/kalign/src/KalignAdapter.h +++ b/src/plugins_3rdparty/kalign/src/KalignAdapter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/kalign/src/KalignConstants.h b/src/plugins_3rdparty/kalign/src/KalignConstants.h index 6ed236a7630a8d0cc48fccba424441c9db1e7b19..312c07a527661205454ec555f4e9aec69c873fff 100644 --- a/src/plugins_3rdparty/kalign/src/KalignConstants.h +++ b/src/plugins_3rdparty/kalign/src/KalignConstants.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/kalign/src/KalignDialogController.cpp b/src/plugins_3rdparty/kalign/src/KalignDialogController.cpp index e32d07708a1793502a064552244d520e41dc08ae..9311bc9ad8e0d141bfe4f63767b574a01d350165 100644 --- a/src/plugins_3rdparty/kalign/src/KalignDialogController.cpp +++ b/src/plugins_3rdparty/kalign/src/KalignDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -59,7 +59,7 @@ KalignDialogController::KalignDialogController(QWidget* w, const MultipleSequenc : QDialog(w), ma(_ma->getCopy()), settings(_settings) { setupUi(this); - new HelpButton(this, buttonBox, "22056100"); + new HelpButton(this, buttonBox, "24742635"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Align")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -123,7 +123,7 @@ KalignAlignWithExtFileSpecifyDialogController::KalignAlignWithExtFileSpecifyDial saveController(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22056126"); + new HelpButton(this, buttonBox, "24742661"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Align")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins_3rdparty/kalign/src/KalignDialogController.h b/src/plugins_3rdparty/kalign/src/KalignDialogController.h index 64b87f77dc393dfcf4e9076d6ce430fbec6cd95a..875ba4fe73be92fcce795f1b59dd823536bda466 100644 --- a/src/plugins_3rdparty/kalign/src/KalignDialogController.h +++ b/src/plugins_3rdparty/kalign/src/KalignDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/kalign/src/KalignException.cpp b/src/plugins_3rdparty/kalign/src/KalignException.cpp index c0cd7fa6699c6746b71c8725287c2bfb25d50fbe..05884e6374205688f738231f8297c8a1ff4d389d 100644 --- a/src/plugins_3rdparty/kalign/src/KalignException.cpp +++ b/src/plugins_3rdparty/kalign/src/KalignException.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/kalign/src/KalignException.h b/src/plugins_3rdparty/kalign/src/KalignException.h index 5a61b271dc3b79f5c279f249103fa48ed8192e37..e8225e3d7bc5a19eceec1e900247856cf6467fc8 100644 --- a/src/plugins_3rdparty/kalign/src/KalignException.h +++ b/src/plugins_3rdparty/kalign/src/KalignException.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/kalign/src/KalignPlugin.cpp b/src/plugins_3rdparty/kalign/src/KalignPlugin.cpp index dc04f67a366bd8b86ff51b33c5e0ff36b4deee34..3f5a211b3877c03391c591031eab9e6ea25b400a 100644 --- a/src/plugins_3rdparty/kalign/src/KalignPlugin.cpp +++ b/src/plugins_3rdparty/kalign/src/KalignPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/kalign/src/KalignPlugin.h b/src/plugins_3rdparty/kalign/src/KalignPlugin.h index a1d6a8cbe343b4aab9fa07a34c460302cfb15bdf..9f97695f21399a8a7e3c1b33ff5ad55f1e309346 100644 --- a/src/plugins_3rdparty/kalign/src/KalignPlugin.h +++ b/src/plugins_3rdparty/kalign/src/KalignPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/kalign/src/KalignTask.cpp b/src/plugins_3rdparty/kalign/src/KalignTask.cpp index c06605ad297168c07a9629c37281d621dc3ed08f..07165d12adc68189aff086ad14bc9bd1eda52c33 100644 --- a/src/plugins_3rdparty/kalign/src/KalignTask.cpp +++ b/src/plugins_3rdparty/kalign/src/KalignTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/kalign/src/KalignTask.h b/src/plugins_3rdparty/kalign/src/KalignTask.h index e88b445e6d4afccb802ff372ad6e8bbbd35dd5fe..4fd71220feecd2eca7c9ceaca592b0947aab36cd 100644 --- a/src/plugins_3rdparty/kalign/src/KalignTask.h +++ b/src/plugins_3rdparty/kalign/src/KalignTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/kalign/src/KalignUtils.cpp b/src/plugins_3rdparty/kalign/src/KalignUtils.cpp index 342734966899c1129a98541f683879d9f49c946b..18adfe40499743dd69cf6c16741f0de901d63ba9 100644 --- a/src/plugins_3rdparty/kalign/src/KalignUtils.cpp +++ b/src/plugins_3rdparty/kalign/src/KalignUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/kalign/src/KalignUtils.h b/src/plugins_3rdparty/kalign/src/KalignUtils.h index 569da81b69e1bd6c43f6b9ab7879032b4e80be2c..faa65c92809fa3d2236f97d7b94ab60fd7fd21e7 100644 --- a/src/plugins_3rdparty/kalign/src/KalignUtils.h +++ b/src/plugins_3rdparty/kalign/src/KalignUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/kalign/src/KalignWorker.cpp b/src/plugins_3rdparty/kalign/src/KalignWorker.cpp index c1254bf8bc5c9a3067a17bdd0bdc57fb495c0bde..e48176c09f2c206e15baa6301d7bb3e6fef9fdb1 100644 --- a/src/plugins_3rdparty/kalign/src/KalignWorker.cpp +++ b/src/plugins_3rdparty/kalign/src/KalignWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/kalign/src/KalignWorker.h b/src/plugins_3rdparty/kalign/src/KalignWorker.h index 580e23567bb984ed7be581cf16956e9350c7cbca..b171fc490ceb8989c276b3bc55f42f7705aebdd9 100644 --- a/src/plugins_3rdparty/kalign/src/KalignWorker.h +++ b/src/plugins_3rdparty/kalign/src/KalignWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/kalign/src/PairwiseAlignmentHirschbergGUIExtensionFactory.h b/src/plugins_3rdparty/kalign/src/PairwiseAlignmentHirschbergGUIExtensionFactory.h index 297e1eaf63675c9852dd1b5db8cb5e00a71640f4..3a138a66c0dce2251e74454153c02744e55c7172 100644 --- a/src/plugins_3rdparty/kalign/src/PairwiseAlignmentHirschbergGUIExtensionFactory.h +++ b/src/plugins_3rdparty/kalign/src/PairwiseAlignmentHirschbergGUIExtensionFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/kalign/src/PairwiseAlignmentHirschbergTask.cpp b/src/plugins_3rdparty/kalign/src/PairwiseAlignmentHirschbergTask.cpp index 3b5de60b217683b6f5f99a3b933d8b1372c6a0c8..685e412ca11b80cce57108a3e525e818802f1c65 100644 --- a/src/plugins_3rdparty/kalign/src/PairwiseAlignmentHirschbergTask.cpp +++ b/src/plugins_3rdparty/kalign/src/PairwiseAlignmentHirschbergTask.cpp @@ -67,7 +67,7 @@ PairwiseAlignmentHirschbergTask::PairwiseAlignmentHirschbergTask(PairwiseAlignme workflowKalignSubTask(NULL) { SAFE_POINT(settings != NULL, "Task settings are not defined.", ); - SAFE_POINT(settings->convertCustomSettings() && settings->isValid(), "Invalide task settings.", ); + SAFE_POINT(settings->convertCustomSettings() && settings->isValid(), "Invalid task settings.", ); U2OpStatus2Log os; DbiConnection con(settings->msaRef.dbiRef, os); diff --git a/src/plugins_3rdparty/kalign/src/PairwiseAlignmentHirschbergTask.h b/src/plugins_3rdparty/kalign/src/PairwiseAlignmentHirschbergTask.h index 51dee909145da2b6db03ced9f4db9c96d3b8c2df..0cab7b9fdbf7c4afaba30ea8bdc38f74d83e2ad1 100644 --- a/src/plugins_3rdparty/kalign/src/PairwiseAlignmentHirschbergTask.h +++ b/src/plugins_3rdparty/kalign/src/PairwiseAlignmentHirschbergTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/kalign/src/PairwiseAlignmentHirschbergTaskFactory.h b/src/plugins_3rdparty/kalign/src/PairwiseAlignmentHirschbergTaskFactory.h index 600192e0d60713bb844041be9e42922a33cd8aee..546945883e673cec31b2b4fe78e4f05c40b6c433 100644 --- a/src/plugins_3rdparty/kalign/src/PairwiseAlignmentHirschbergTaskFactory.h +++ b/src/plugins_3rdparty/kalign/src/PairwiseAlignmentHirschbergTaskFactory.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/kalign/src/TaskLocalStorage.cpp b/src/plugins_3rdparty/kalign/src/TaskLocalStorage.cpp index fd9373d3e6b0f99afefdf1fdc8e52b18b8f0336c..d82e08546583a04ca3b4ed1a6bcb0794cae7322f 100644 --- a/src/plugins_3rdparty/kalign/src/TaskLocalStorage.cpp +++ b/src/plugins_3rdparty/kalign/src/TaskLocalStorage.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/kalign/src/TaskLocalStorage.h b/src/plugins_3rdparty/kalign/src/TaskLocalStorage.h index a4be2c8de83036ca57f933e4e90929f9d11a24c6..0376b1b678879c9fd6a3d77827883eb516bc711d 100644 --- a/src/plugins_3rdparty/kalign/src/TaskLocalStorage.h +++ b/src/plugins_3rdparty/kalign/src/TaskLocalStorage.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/kalign/src/kalign_tests/KalignTests.cpp b/src/plugins_3rdparty/kalign/src/kalign_tests/KalignTests.cpp index bd57c44291d3f1a2df39c1a28af141167c56e048..a6da8299af963a285da98bf7d3dbcf541ee3a324 100644 --- a/src/plugins_3rdparty/kalign/src/kalign_tests/KalignTests.cpp +++ b/src/plugins_3rdparty/kalign/src/kalign_tests/KalignTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/kalign/src/kalign_tests/KalignTests.h b/src/plugins_3rdparty/kalign/src/kalign_tests/KalignTests.h index 71e0198f0b1f5343191d9dbe3bd84152fd546e5c..a0717cfd54d886d6f19f0768a7cfba85d0dd021e 100644 --- a/src/plugins_3rdparty/kalign/src/kalign_tests/KalignTests.h +++ b/src/plugins_3rdparty/kalign/src/kalign_tests/KalignTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -64,7 +64,7 @@ private: MultipleSequenceAlignmentObject* ma2; }; -class GTest_Kalign_Load_Align_Compare: public GTest { +class GTest_Kalign_Load_Align_Compare: public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_Kalign_Load_Align_Compare, "kalign-load-align-compare"); @@ -77,7 +77,7 @@ private: Kalign_Load_Align_Compare_Task *worker; }; -class GTest_Kalign_Load_Align_QScore: public GTest { +class GTest_Kalign_Load_Align_QScore: public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_Kalign_Load_Align_QScore, "kalign-load-align-qscore", TaskFlags_FOSCOE) diff --git a/src/plugins_3rdparty/phylip/src/DistanceMatrix.cpp b/src/plugins_3rdparty/phylip/src/DistanceMatrix.cpp index 8770aaa8eb7cf7d858c9d86222550381cee3d68e..e01e5d4b92f04d8059b75c778766869b2edb3a3b 100644 --- a/src/plugins_3rdparty/phylip/src/DistanceMatrix.cpp +++ b/src/plugins_3rdparty/phylip/src/DistanceMatrix.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/phylip/src/DistanceMatrix.h b/src/plugins_3rdparty/phylip/src/DistanceMatrix.h index 059bf491408e7c0045b88f8a7bc0179b68354df5..ee62aa745d61f59211097dedfc320d8ee3ab6969 100644 --- a/src/plugins_3rdparty/phylip/src/DistanceMatrix.h +++ b/src/plugins_3rdparty/phylip/src/DistanceMatrix.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/phylip/src/NeighborJoinAdapter.cpp b/src/plugins_3rdparty/phylip/src/NeighborJoinAdapter.cpp index 64421a1a14ea0a03ef65ea1dc22585815e261520..f63fcd0e390937929c5718c2c597bed827acde6e 100644 --- a/src/plugins_3rdparty/phylip/src/NeighborJoinAdapter.cpp +++ b/src/plugins_3rdparty/phylip/src/NeighborJoinAdapter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/phylip/src/NeighborJoinAdapter.h b/src/plugins_3rdparty/phylip/src/NeighborJoinAdapter.h index 28a9b7e37d7f546c93e8b399680c2945b55310bd..29d4da56aaf595165d04cb585794eb4570326b69 100644 --- a/src/plugins_3rdparty/phylip/src/NeighborJoinAdapter.h +++ b/src/plugins_3rdparty/phylip/src/NeighborJoinAdapter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/phylip/src/NeighborJoinWidget.cpp b/src/plugins_3rdparty/phylip/src/NeighborJoinWidget.cpp index ab010da501720acfc0968adb6842197def0458c4..cf9c070c522c703bd2be031534c1ca3c014fda4f 100644 --- a/src/plugins_3rdparty/phylip/src/NeighborJoinWidget.cpp +++ b/src/plugins_3rdparty/phylip/src/NeighborJoinWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/phylip/src/NeighborJoinWidget.h b/src/plugins_3rdparty/phylip/src/NeighborJoinWidget.h index 66d1777596359be6e7dc19edcf10b9a99a90ffc1..191e223269ef1e428bee2b2984904f9f3c399c53 100644 --- a/src/plugins_3rdparty/phylip/src/NeighborJoinWidget.h +++ b/src/plugins_3rdparty/phylip/src/NeighborJoinWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/phylip/src/PhylipCmdlineTask.cpp b/src/plugins_3rdparty/phylip/src/PhylipCmdlineTask.cpp index 76320a9b0e05830a1c195914c7ac24c32793c204..dc795173184ea7ad1243a2fa04bd4d3f694ab491 100644 --- a/src/plugins_3rdparty/phylip/src/PhylipCmdlineTask.cpp +++ b/src/plugins_3rdparty/phylip/src/PhylipCmdlineTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/phylip/src/PhylipCmdlineTask.h b/src/plugins_3rdparty/phylip/src/PhylipCmdlineTask.h index 77ed56146b514517330735d1190d57462656f042..a2dcb771aeece0f045bc79531d4cd2fc2f98cf20 100644 --- a/src/plugins_3rdparty/phylip/src/PhylipCmdlineTask.h +++ b/src/plugins_3rdparty/phylip/src/PhylipCmdlineTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/phylip/src/PhylipPlugin.cpp b/src/plugins_3rdparty/phylip/src/PhylipPlugin.cpp index b3708e158b3c3354413cd743d3152620dc34d071..14d86d262dda9cb0ae1e7cdaaf55775035e10df1 100644 --- a/src/plugins_3rdparty/phylip/src/PhylipPlugin.cpp +++ b/src/plugins_3rdparty/phylip/src/PhylipPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/phylip/src/PhylipPlugin.h b/src/plugins_3rdparty/phylip/src/PhylipPlugin.h index fb6fc26f5accec4169642f664fd30163478dcf06..e859efddd4f40a93dceb61d2c05cd4b296065b39 100644 --- a/src/plugins_3rdparty/phylip/src/PhylipPlugin.h +++ b/src/plugins_3rdparty/phylip/src/PhylipPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/phylip/src/PhylipPluginTests.cpp b/src/plugins_3rdparty/phylip/src/PhylipPluginTests.cpp index 9427cb25b78137b249a40fbd072dc7d8460ff70c..ed0a29a995bc686c976748bdeb0ae467f1684c62 100644 --- a/src/plugins_3rdparty/phylip/src/PhylipPluginTests.cpp +++ b/src/plugins_3rdparty/phylip/src/PhylipPluginTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -124,7 +124,7 @@ void GTest_NeighborJoin::prepare() { assert( obj != NULL); CreatePhyTreeSettings settings; - settings.algorithmId = PhylipPlugin::PHYLIP_NEIGHBOUR_JOIN; + settings.algorithm = PhylipPlugin::PHYLIP_NEIGHBOUR_JOIN; if(bootStrapSeed != -1){ settings.bootstrap = true; @@ -154,8 +154,4 @@ Task::ReportResult GTest_NeighborJoin::report() { return ReportResult_Finished; } -void GTest_NeighborJoin::cleanup() { - -} - } diff --git a/src/plugins_3rdparty/phylip/src/PhylipPluginTests.h b/src/plugins_3rdparty/phylip/src/PhylipPluginTests.h index fbf5e19bef79835f63a6d1400818f898f5978946..f6151b1098c74badfd2094850c3bae69c49dd1e8 100644 --- a/src/plugins_3rdparty/phylip/src/PhylipPluginTests.h +++ b/src/plugins_3rdparty/phylip/src/PhylipPluginTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,14 +34,13 @@ namespace U2{ class PhyTreeObject; class MultipleSequenceAlignmentObject; -class GTest_NeighborJoin : public GTest { +class GTest_NeighborJoin : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_NeighborJoin, "test-neighbor-join"); void prepare(); Task::ReportResult report(); - void cleanup(); private: QString inputDocCtxName; diff --git a/src/plugins_3rdparty/phylip/src/PhylipTask.cpp b/src/plugins_3rdparty/phylip/src/PhylipTask.cpp index cc104716723ccb3a7e83f86a3841cb6fbca33d91..75402750fa15fba8c412af5bd1ec84dd312b6d23 100644 --- a/src/plugins_3rdparty/phylip/src/PhylipTask.cpp +++ b/src/plugins_3rdparty/phylip/src/PhylipTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/phylip/src/PhylipTask.h b/src/plugins_3rdparty/phylip/src/PhylipTask.h index 743c6d1f899b4f6f878f03e76c26d26aeaf9d68b..7dd5104ef20ea8b40070e2f42ea099bae07f85db 100644 --- a/src/plugins_3rdparty/phylip/src/PhylipTask.h +++ b/src/plugins_3rdparty/phylip/src/PhylipTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/phylip/src/SeqBootAdapter.cpp b/src/plugins_3rdparty/phylip/src/SeqBootAdapter.cpp index 96ce50482eb9a9ab72ab8f2051a0f88350b9cd81..e4257893638ba2628c610a7bb62b258a505b97f7 100644 --- a/src/plugins_3rdparty/phylip/src/SeqBootAdapter.cpp +++ b/src/plugins_3rdparty/phylip/src/SeqBootAdapter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/phylip/src/SeqBootAdapter.h b/src/plugins_3rdparty/phylip/src/SeqBootAdapter.h index b09b94d505c1deb983f7d43ed015e9adc0f19417..403a978a567ebe04aa412aa0ca96b093a4f409ab 100644 --- a/src/plugins_3rdparty/phylip/src/SeqBootAdapter.h +++ b/src/plugins_3rdparty/phylip/src/SeqBootAdapter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/primer3/src/FindExonRegionsTask.cpp b/src/plugins_3rdparty/primer3/src/FindExonRegionsTask.cpp index 1f0312062c2a3eee8d07386d5ee47d24d938b4cc..a8e668c9154c5c299d6ffd45dde660173def4e37 100644 --- a/src/plugins_3rdparty/primer3/src/FindExonRegionsTask.cpp +++ b/src/plugins_3rdparty/primer3/src/FindExonRegionsTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/primer3/src/FindExonRegionsTask.h b/src/plugins_3rdparty/primer3/src/FindExonRegionsTask.h index b10458ae6fc9ea9696302f35b3f5518fc90826fe..73a6c162c81b3343bb9e19790a60839ed1696dda 100644 --- a/src/plugins_3rdparty/primer3/src/FindExonRegionsTask.h +++ b/src/plugins_3rdparty/primer3/src/FindExonRegionsTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/primer3/src/Primer3Dialog.cpp b/src/plugins_3rdparty/primer3/src/Primer3Dialog.cpp index 0349d2c9d4ed35e83149f7514bbb8834f8be40eb..8f0854cb672c5d6119ee68f5c4f8ef01ab841723 100644 --- a/src/plugins_3rdparty/primer3/src/Primer3Dialog.cpp +++ b/src/plugins_3rdparty/primer3/src/Primer3Dialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -47,7 +47,7 @@ Primer3Dialog::Primer3Dialog(const Primer3TaskSettings &defaultSettings, ADVSequ context(context) { ui.setupUi(this); - new HelpButton(this, ui.helpButton, "22056079"); + new HelpButton(this, ui.helpButton, "24742614"); QPushButton* pbPick = ui.pickPrimersButton; QPushButton* pbReset = ui.resetButton; diff --git a/src/plugins_3rdparty/primer3/src/Primer3Dialog.h b/src/plugins_3rdparty/primer3/src/Primer3Dialog.h index 8f9ca41662f08e2360cae5d66e9f14cc205a8b3a..83fd2669d89f005a1eec995f86159e75dac58460 100644 --- a/src/plugins_3rdparty/primer3/src/Primer3Dialog.h +++ b/src/plugins_3rdparty/primer3/src/Primer3Dialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/primer3/src/Primer3Dialog.ui b/src/plugins_3rdparty/primer3/src/Primer3Dialog.ui index ebd53635547fc0793c1d6354b032a23f8caa92d6..d3d742d8baa062fe5e1c564f544a9490559a8113 100644 --- a/src/plugins_3rdparty/primer3/src/Primer3Dialog.ui +++ b/src/plugins_3rdparty/primer3/src/Primer3Dialog.ui @@ -1443,7 +1443,7 @@ <bool>false</bool> </property> <property name="text"> - <string>Show debuging info</string> + <string>Show debugging info</string> </property> </widget> </item> diff --git a/src/plugins_3rdparty/primer3/src/Primer3Plugin.cpp b/src/plugins_3rdparty/primer3/src/Primer3Plugin.cpp index bae424b2cca1c7e68f392f2c83f8ad6da327d804..43eaddf49b0c7f8477025ffccd13e699c038df8f 100644 --- a/src/plugins_3rdparty/primer3/src/Primer3Plugin.cpp +++ b/src/plugins_3rdparty/primer3/src/Primer3Plugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/primer3/src/Primer3Plugin.h b/src/plugins_3rdparty/primer3/src/Primer3Plugin.h index 280581de9fd292795ad8cf94947d3e892faa4ac1..d0efc13aea7fbd7a6f0e4b6a3b45ea2c4ffd89fc 100644 --- a/src/plugins_3rdparty/primer3/src/Primer3Plugin.h +++ b/src/plugins_3rdparty/primer3/src/Primer3Plugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/primer3/src/Primer3Query.cpp b/src/plugins_3rdparty/primer3/src/Primer3Query.cpp index e92fb927d446341bd115ba9460ec4cd0839c0498..996c8ffdd050c0f920aa1ee6d36f0366b72697fc 100644 --- a/src/plugins_3rdparty/primer3/src/Primer3Query.cpp +++ b/src/plugins_3rdparty/primer3/src/Primer3Query.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/primer3/src/Primer3Query.h b/src/plugins_3rdparty/primer3/src/Primer3Query.h index 0e9596eb618ab08da548ee3af9361b68a12450a1..8cc0579d1a01ee9c6dc9754ec897ea663c58e0b1 100644 --- a/src/plugins_3rdparty/primer3/src/Primer3Query.h +++ b/src/plugins_3rdparty/primer3/src/Primer3Query.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/primer3/src/Primer3Task.cpp b/src/plugins_3rdparty/primer3/src/Primer3Task.cpp index 6100f6b690507637438596d1a986f7e690b02584..eac7bea815fe29f48e580d9e4a201c7e4eec47f1 100644 --- a/src/plugins_3rdparty/primer3/src/Primer3Task.cpp +++ b/src/plugins_3rdparty/primer3/src/Primer3Task.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/primer3/src/Primer3Task.h b/src/plugins_3rdparty/primer3/src/Primer3Task.h index faf8311cc67a16797796bf35038e13f2386d0011..eed3cd582437e05205945c63bb9906f5d70f2c18 100644 --- a/src/plugins_3rdparty/primer3/src/Primer3Task.h +++ b/src/plugins_3rdparty/primer3/src/Primer3Task.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/primer3/src/Primer3TaskSettings.cpp b/src/plugins_3rdparty/primer3/src/Primer3TaskSettings.cpp index b0732214f791d27bd218bd3c28f16736b7cff559..8de7b06c23b494c478db3ac0fc6592d00e3f79ed 100644 --- a/src/plugins_3rdparty/primer3/src/Primer3TaskSettings.cpp +++ b/src/plugins_3rdparty/primer3/src/Primer3TaskSettings.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/primer3/src/Primer3TaskSettings.h b/src/plugins_3rdparty/primer3/src/Primer3TaskSettings.h index 601ac441640e9af38b517ae2df6d5f1676726125..169f38a49decd25def9d82da3296e57932fa3884 100644 --- a/src/plugins_3rdparty/primer3/src/Primer3TaskSettings.h +++ b/src/plugins_3rdparty/primer3/src/Primer3TaskSettings.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/primer3/src/Primer3Tests.cpp b/src/plugins_3rdparty/primer3/src/Primer3Tests.cpp index 4366a89258c436180123fef922995c5bfeb81cc4..6f0e9a13a7ebdec1bddfa4333db1458ee64d7e06 100644 --- a/src/plugins_3rdparty/primer3/src/Primer3Tests.cpp +++ b/src/plugins_3rdparty/primer3/src/Primer3Tests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/primer3/src/Primer3Tests.h b/src/plugins_3rdparty/primer3/src/Primer3Tests.h index 35f660666b8f17dcc0b1039e7033968795f32526..94e84031125c2ca5665d2b8ef612cbd87f792f42 100644 --- a/src/plugins_3rdparty/primer3/src/Primer3Tests.h +++ b/src/plugins_3rdparty/primer3/src/Primer3Tests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ namespace U2 { -class GTest_Primer3 : GTest { +class GTest_Primer3 : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_Primer3, "plugin_primer_3", TaskFlags(TaskFlag_FailOnSubtaskCancel) | TaskFlag_NoRun); diff --git a/src/plugins_3rdparty/primer3/transl/russian.ts b/src/plugins_3rdparty/primer3/transl/russian.ts index e87d39e3fa1d546bba98fba32de7a3a6d0c90a50..8ed1faea5a13f79b0a9ce7b59fc938be9932e5ce 100644 --- a/src/plugins_3rdparty/primer3/transl/russian.ts +++ b/src/plugins_3rdparty/primer3/transl/russian.ts @@ -822,7 +822,7 @@ p, li { white-space: pre-wrap; } </message> <message> <location filename="../src/Primer3Dialog.ui" line="1446"/> - <source>Show debuging info</source> + <source>Show debugging info</source> <translation>Показывать отладочную информацию</translation> </message> <message> diff --git a/src/plugins_3rdparty/psipred/src/PsipredAlgTask.cpp b/src/plugins_3rdparty/psipred/src/PsipredAlgTask.cpp index 9880e01bbf2a565729529592fc75dadfd8d9cc2a..d47ff1578e18348705d3298dc0c110944c11354e 100644 --- a/src/plugins_3rdparty/psipred/src/PsipredAlgTask.cpp +++ b/src/plugins_3rdparty/psipred/src/PsipredAlgTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/psipred/src/PsipredAlgTask.h b/src/plugins_3rdparty/psipred/src/PsipredAlgTask.h index 8ab815d53e1ef4265fd7db4e2b9759eb277b67ff..e11df5fdbe9bbddd05ae3781ce6eefa351fb9786 100644 --- a/src/plugins_3rdparty/psipred/src/PsipredAlgTask.h +++ b/src/plugins_3rdparty/psipred/src/PsipredAlgTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/psipred/src/PsipredPlugin.cpp b/src/plugins_3rdparty/psipred/src/PsipredPlugin.cpp index d03087219220ce56d552bb50ad3e9e325384c104..39acc84927d3574ac87cef6adfa53f42e7ca7d7c 100644 --- a/src/plugins_3rdparty/psipred/src/PsipredPlugin.cpp +++ b/src/plugins_3rdparty/psipred/src/PsipredPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/psipred/src/PsipredPlugin.h b/src/plugins_3rdparty/psipred/src/PsipredPlugin.h index 0445cc24e119d554970121cb1a4a17e06046dca4..26f4d4a0bc17936efe709a3bacfd798257f0052b 100644 --- a/src/plugins_3rdparty/psipred/src/PsipredPlugin.h +++ b/src/plugins_3rdparty/psipred/src/PsipredPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/ptools/src/PToolsAligner.cpp b/src/plugins_3rdparty/ptools/src/PToolsAligner.cpp index 1a5a99948efc1b3c1d56be1e3597eb2480766e5c..b6ca94bea6823e89a9a611a4ac39b833c32288db 100644 --- a/src/plugins_3rdparty/ptools/src/PToolsAligner.cpp +++ b/src/plugins_3rdparty/ptools/src/PToolsAligner.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/ptools/src/PToolsAligner.h b/src/plugins_3rdparty/ptools/src/PToolsAligner.h index 0a474b83dc5662e74b20098a41bbf2a04bac9433..72436d83a264a6ca91f1d59585585ce80f57ceaf 100644 --- a/src/plugins_3rdparty/ptools/src/PToolsAligner.h +++ b/src/plugins_3rdparty/ptools/src/PToolsAligner.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/ptools/src/PToolsPlugin.cpp b/src/plugins_3rdparty/ptools/src/PToolsPlugin.cpp index 878de2e1547b49e46b5d86fb80ee09fd15fc4915..ea44d87ce052cc581af99a0bdd4589202cc52d7a 100644 --- a/src/plugins_3rdparty/ptools/src/PToolsPlugin.cpp +++ b/src/plugins_3rdparty/ptools/src/PToolsPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/ptools/src/PToolsPlugin.h b/src/plugins_3rdparty/ptools/src/PToolsPlugin.h index 8797cd07c86e8bdd6a5d050aa4570012c073addb..16f074bac5109175924f39667fdb953f28b2fcd9 100644 --- a/src/plugins_3rdparty/ptools/src/PToolsPlugin.h +++ b/src/plugins_3rdparty/ptools/src/PToolsPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/ptools/src/PToolsTests.cpp b/src/plugins_3rdparty/ptools/src/PToolsTests.cpp index 54a565ddab174850a4bc2a43cc946a797e482c51..381059db9a1c57d29e57a9057c76182431affff2 100644 --- a/src/plugins_3rdparty/ptools/src/PToolsTests.cpp +++ b/src/plugins_3rdparty/ptools/src/PToolsTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ namespace U2 { -/* class Gtest_PToolsAlignerTask : public GTest */ +/* class Gtest_PToolsAlignerTask : public XmlTest */ const QString Gtest_PToolsAlignerTask::REFO_ATTR("refo"); const QString Gtest_PToolsAlignerTask::MOBO_ATTR("mobo"); diff --git a/src/plugins_3rdparty/ptools/src/PToolsTests.h b/src/plugins_3rdparty/ptools/src/PToolsTests.h index 2644d8cb547c3bf340fdfa7d0a65d41654a8895d..23c9fba448938a80f53c5c89c1c4e04bf65f5afe 100644 --- a/src/plugins_3rdparty/ptools/src/PToolsTests.h +++ b/src/plugins_3rdparty/ptools/src/PToolsTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -28,7 +28,7 @@ namespace U2 { -class Gtest_PToolsAlignerTask : public GTest { +class Gtest_PToolsAlignerTask : public XmlTest { Q_OBJECT public: diff --git a/src/plugins_3rdparty/sitecon/src/DIPropertiesSitecon.cpp b/src/plugins_3rdparty/sitecon/src/DIPropertiesSitecon.cpp index 2402cec44d50f0610fc169554e70e133f52b9a52..e5077c02a88da1a24504c064562eae08574fd347 100644 --- a/src/plugins_3rdparty/sitecon/src/DIPropertiesSitecon.cpp +++ b/src/plugins_3rdparty/sitecon/src/DIPropertiesSitecon.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/sitecon/src/DIPropertiesSitecon.h b/src/plugins_3rdparty/sitecon/src/DIPropertiesSitecon.h index f76030d77a915ea684a09577d5cc40e2348cf8bc..9706850648eb689c005994a8d55fad320c87f079 100644 --- a/src/plugins_3rdparty/sitecon/src/DIPropertiesSitecon.h +++ b/src/plugins_3rdparty/sitecon/src/DIPropertiesSitecon.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/sitecon/src/DIPropertiesTests.cpp b/src/plugins_3rdparty/sitecon/src/DIPropertiesTests.cpp index 1502d405402c75c69313f3d0a0befd6a193d02b9..22d4719a843b81233d748fac44a78c95e28f87a0 100644 --- a/src/plugins_3rdparty/sitecon/src/DIPropertiesTests.cpp +++ b/src/plugins_3rdparty/sitecon/src/DIPropertiesTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/sitecon/src/DIPropertiesTests.h b/src/plugins_3rdparty/sitecon/src/DIPropertiesTests.h index 0dfa74cb39fec58e9049ac9877ae6451eb847d3c..8ee40aa3399718f8bd613087f8c2d0b64de64516 100644 --- a/src/plugins_3rdparty/sitecon/src/DIPropertiesTests.h +++ b/src/plugins_3rdparty/sitecon/src/DIPropertiesTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -29,7 +29,7 @@ namespace U2 { -class GTest_DiPropertySiteconCheckAttribs : public GTest { +class GTest_DiPropertySiteconCheckAttribs : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_DiPropertySiteconCheckAttribs, "sitecon-check_diproperty_attrib"); diff --git a/src/plugins_3rdparty/sitecon/src/SiteconAlgorithm.cpp b/src/plugins_3rdparty/sitecon/src/SiteconAlgorithm.cpp index 30a0f02f73f9a805de26054a4590e0166340d1cc..17f1b5d74413f8a7880b4381a4e24b6c8de7ff81 100644 --- a/src/plugins_3rdparty/sitecon/src/SiteconAlgorithm.cpp +++ b/src/plugins_3rdparty/sitecon/src/SiteconAlgorithm.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/sitecon/src/SiteconAlgorithm.h b/src/plugins_3rdparty/sitecon/src/SiteconAlgorithm.h index dcc1f0bed21862b5cf4f9d7c35e1ab3b4c70a5d2..67fc7d4244d6e8f17690c7e9c3b62e91f7c57bf5 100644 --- a/src/plugins_3rdparty/sitecon/src/SiteconAlgorithm.h +++ b/src/plugins_3rdparty/sitecon/src/SiteconAlgorithm.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/sitecon/src/SiteconAlgorithmTests.cpp b/src/plugins_3rdparty/sitecon/src/SiteconAlgorithmTests.cpp index 8d2a6d45cfac4d57b5044893e7352354e6e9a2ae..05a73b5c8fc80e550729eedd0c92092b2e7bfecb 100644 --- a/src/plugins_3rdparty/sitecon/src/SiteconAlgorithmTests.cpp +++ b/src/plugins_3rdparty/sitecon/src/SiteconAlgorithmTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/sitecon/src/SiteconAlgorithmTests.h b/src/plugins_3rdparty/sitecon/src/SiteconAlgorithmTests.h index c50a0fa9adf1e9019c73e9a2c33e6b55284be082..68702a6793f13f71ad99f691987285751e38bd13 100644 --- a/src/plugins_3rdparty/sitecon/src/SiteconAlgorithmTests.h +++ b/src/plugins_3rdparty/sitecon/src/SiteconAlgorithmTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -31,7 +31,7 @@ namespace U2 { -class GTest_CalculateACGTContent : public GTest { +class GTest_CalculateACGTContent : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_CalculateACGTContent, "sitecon-calculateACGTContent", TaskFlags_FOSCOE); @@ -46,7 +46,7 @@ private: int expectedACGT[4]; }; -class GTest_CalculateDispersionAndAverage : public GTest { +class GTest_CalculateDispersionAndAverage : public XmlTest { Q_OBJECT typedef QVector<int> ResultVector; public: @@ -63,7 +63,7 @@ private: QVector<ResultVector> expectedResults; }; -class GTest_CalculateFirstTypeError : public GTest { +class GTest_CalculateFirstTypeError : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_CalculateFirstTypeError, "sitecon-calculateFirstTypeError", TaskFlags_FOSCOE); @@ -80,7 +80,7 @@ private: QVector<int> expectedResult; }; -class GTest_CalculateSecondTypeError : public GTest { +class GTest_CalculateSecondTypeError : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_CalculateSecondTypeError, "sitecon-calculateSecondTypeError", TaskFlags_FOSCOE); @@ -97,7 +97,7 @@ private: QVector<int> expectedResult; }; -class GTest_SiteconSearchTask : public GTest { +class GTest_SiteconSearchTask : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_SiteconSearchTask, "sitecon-search_task"); @@ -119,7 +119,7 @@ private: }; -class GTest_CompareSiteconModels: public GTest { +class GTest_CompareSiteconModels: public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CompareSiteconModels, "compare-sitecon-models"); diff --git a/src/plugins_3rdparty/sitecon/src/SiteconBuildDialogController.cpp b/src/plugins_3rdparty/sitecon/src/SiteconBuildDialogController.cpp index e11b2e8cb193d9a2d12353bf6b764a6f51807ec3..a117386b891a7a24b4894aba816b40d1ee60c5e8 100644 --- a/src/plugins_3rdparty/sitecon/src/SiteconBuildDialogController.cpp +++ b/src/plugins_3rdparty/sitecon/src/SiteconBuildDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -55,7 +55,7 @@ SiteconBuildDialogController::SiteconBuildDialogController(SiteconPlugin* pl, QW saveController(NULL) { task = NULL; setupUi(this); - new HelpButton(this, buttonBox, "22056051"); + new HelpButton(this, buttonBox, "24742586"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Build")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins_3rdparty/sitecon/src/SiteconBuildDialogController.h b/src/plugins_3rdparty/sitecon/src/SiteconBuildDialogController.h index 8f3d47c7726e32a0c25f1bb64c2dbb6f0ce05a32..4b2f6161811f81152f5a564bc6ac28d66c63541d 100644 --- a/src/plugins_3rdparty/sitecon/src/SiteconBuildDialogController.h +++ b/src/plugins_3rdparty/sitecon/src/SiteconBuildDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/sitecon/src/SiteconBuildWorker.cpp b/src/plugins_3rdparty/sitecon/src/SiteconBuildWorker.cpp index 9e1a883c9b5c726889087a10dc345734ed647f35..6920ac5e8de799d35aa788901044722a91c4c530 100644 --- a/src/plugins_3rdparty/sitecon/src/SiteconBuildWorker.cpp +++ b/src/plugins_3rdparty/sitecon/src/SiteconBuildWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/sitecon/src/SiteconIO.cpp b/src/plugins_3rdparty/sitecon/src/SiteconIO.cpp index 4fe5c6e5fe1e50c8807c5722d481ae5776c20557..5d3d4a537180631b9d949c83fb615394cbd3c434 100644 --- a/src/plugins_3rdparty/sitecon/src/SiteconIO.cpp +++ b/src/plugins_3rdparty/sitecon/src/SiteconIO.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/sitecon/src/SiteconIO.h b/src/plugins_3rdparty/sitecon/src/SiteconIO.h index be171125bdb00c609a695887bf16190afdbfa63b..aca756579467ed6a87e23b1d9e5f19d578252f45 100644 --- a/src/plugins_3rdparty/sitecon/src/SiteconIO.h +++ b/src/plugins_3rdparty/sitecon/src/SiteconIO.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/sitecon/src/SiteconIOWorkers.cpp b/src/plugins_3rdparty/sitecon/src/SiteconIOWorkers.cpp index 3b5268a5df84335f9dcba3d3a5adcbefbfbdf061..16079ca9596f4714e6a06e04f658ffe3475530de 100644 --- a/src/plugins_3rdparty/sitecon/src/SiteconIOWorkers.cpp +++ b/src/plugins_3rdparty/sitecon/src/SiteconIOWorkers.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -66,7 +66,7 @@ DataTypePtr const SiteconWorkerFactory::SITECON_MODEL_TYPE() { return dtr->getById(SITECON_MODEL_TYPE_ID); } -const Descriptor SiteconWorkerFactory::SITECON_SLOT("sitecon-model", QObject::tr("Sitecon model"), ""); +const Descriptor SiteconWorkerFactory::SITECON_SLOT("sitecon-model", "Sitecon model", ""); const Descriptor SiteconWorkerFactory::SITECON_CATEGORY() {return Descriptor("hsitecon", SiteconIO::tr("SITECON"), "");} diff --git a/src/plugins_3rdparty/sitecon/src/SiteconIOWorkers.h b/src/plugins_3rdparty/sitecon/src/SiteconIOWorkers.h index 070fb29730c64834a10db6e87ed17a644f10d216..8c1ab086a1345385a7ce82e5306266e91c4073c2 100644 --- a/src/plugins_3rdparty/sitecon/src/SiteconIOWorkers.h +++ b/src/plugins_3rdparty/sitecon/src/SiteconIOWorkers.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/sitecon/src/SiteconPlugin.cpp b/src/plugins_3rdparty/sitecon/src/SiteconPlugin.cpp index 4b60f61251ab86a1935f36512cbc8196d90c7b98..bfc0f57f9d006e2f1ec7472ccb60a56858392919 100644 --- a/src/plugins_3rdparty/sitecon/src/SiteconPlugin.cpp +++ b/src/plugins_3rdparty/sitecon/src/SiteconPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/sitecon/src/SiteconPlugin.h b/src/plugins_3rdparty/sitecon/src/SiteconPlugin.h index 9c1ba3302c716e18ae976c9f637d960cf6d55ce1..6330955a3e37401368f281a21aef418b345608a8 100644 --- a/src/plugins_3rdparty/sitecon/src/SiteconPlugin.h +++ b/src/plugins_3rdparty/sitecon/src/SiteconPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/sitecon/src/SiteconQuery.cpp b/src/plugins_3rdparty/sitecon/src/SiteconQuery.cpp index fde2c855b6014229a86f1aac8b907da58e2cdd88..979f6a2baa4cde323583604fa90503536bc115e6 100644 --- a/src/plugins_3rdparty/sitecon/src/SiteconQuery.cpp +++ b/src/plugins_3rdparty/sitecon/src/SiteconQuery.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/sitecon/src/SiteconQuery.h b/src/plugins_3rdparty/sitecon/src/SiteconQuery.h index b1f2d35a0b097df85d19da33921b5a4db353930d..ea06721eae684b434208637c77d075444e74a73a 100644 --- a/src/plugins_3rdparty/sitecon/src/SiteconQuery.h +++ b/src/plugins_3rdparty/sitecon/src/SiteconQuery.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/sitecon/src/SiteconSearchDialogController.cpp b/src/plugins_3rdparty/sitecon/src/SiteconSearchDialogController.cpp index f062ee3a5e677b7a3bef50e9be4fc090b08e6913..d2d40120f075e6435102e515992a60a65ebb2056 100644 --- a/src/plugins_3rdparty/sitecon/src/SiteconSearchDialogController.cpp +++ b/src/plugins_3rdparty/sitecon/src/SiteconSearchDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -86,7 +86,7 @@ public: SiteconSearchDialogController::SiteconSearchDialogController(ADVSequenceObjectContext* _ctx, QWidget *p):QDialog(p) { setupUi(this); - new HelpButton(this, buttonBox, "22056047"); + new HelpButton(this, buttonBox, "24742582"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Search")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -319,7 +319,7 @@ void SiteconSearchDialogController::runTask() { cfg.complOnly = rbComplement->isChecked(); cfg.minPSUM = errLevelBox->itemData(errLevelBox->currentIndex()).toInt(); if (cfg.minPSUM == 0) { - QMessageBox::critical(this, tr("Error"), tr("Error parsing minumum score")); + QMessageBox::critical(this, tr("Error"), tr("Error parsing minimum score")); return; } diff --git a/src/plugins_3rdparty/sitecon/src/SiteconSearchDialogController.h b/src/plugins_3rdparty/sitecon/src/SiteconSearchDialogController.h index eed41c2ec1b6450a8dce41782de75142dac23a7c..19bbdc4c3efc1d065c441018c0f02f30490cc9a6 100644 --- a/src/plugins_3rdparty/sitecon/src/SiteconSearchDialogController.h +++ b/src/plugins_3rdparty/sitecon/src/SiteconSearchDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/sitecon/src/SiteconSearchTask.cpp b/src/plugins_3rdparty/sitecon/src/SiteconSearchTask.cpp index 063c409860ec25d0b21a616261687f86789843a5..20bdde660514c3ad11f1d72e0bc8c1cf927dcbe1 100644 --- a/src/plugins_3rdparty/sitecon/src/SiteconSearchTask.cpp +++ b/src/plugins_3rdparty/sitecon/src/SiteconSearchTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/sitecon/src/SiteconSearchTask.h b/src/plugins_3rdparty/sitecon/src/SiteconSearchTask.h index fc1dce54f05ae0dde43b8060b758c6a30af8a6df..93827ecc29c9f5240d218e112899ad9352c0b322 100644 --- a/src/plugins_3rdparty/sitecon/src/SiteconSearchTask.h +++ b/src/plugins_3rdparty/sitecon/src/SiteconSearchTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/sitecon/src/SiteconSearchWorker.cpp b/src/plugins_3rdparty/sitecon/src/SiteconSearchWorker.cpp index d08d9dec2be4078444fc1b297a4808bde62d3556..0d7214bddadb4157ac3ef2a610cd393430ebf486 100644 --- a/src/plugins_3rdparty/sitecon/src/SiteconSearchWorker.cpp +++ b/src/plugins_3rdparty/sitecon/src/SiteconSearchWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -269,8 +269,8 @@ void SiteconSearchWorker::sl_taskFinished(Task *t) { if (t->isCanceled()) { return; } - foreach (Task* sub, t->getSubtasks()) { - SiteconSearchTask *sst = qobject_cast<SiteconSearchTask *>(sub); + foreach (const QPointer<Task> &sub, t->getSubtasks()) { + SiteconSearchTask *sst = qobject_cast<SiteconSearchTask *>(sub.data()); res += SiteconSearchResult::toTable(sst->takeResults(), resultName); sst->cleanup(); } diff --git a/src/plugins_3rdparty/sitecon/src/SiteconWorkers.h b/src/plugins_3rdparty/sitecon/src/SiteconWorkers.h index 82611f388ca33618426cb095e1ed3413fb5a3b6a..3c2322d1488317225437eaf173ab9c9a3777dc91 100644 --- a/src/plugins_3rdparty/sitecon/src/SiteconWorkers.h +++ b/src/plugins_3rdparty/sitecon/src/SiteconWorkers.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/sitecon/transl/russian.ts b/src/plugins_3rdparty/sitecon/transl/russian.ts index f1df32950ee0c4c6e23fd9e3bea2451c12e5e49d..5b09529b594c242cad662022a8ac29292d026223 100644 --- a/src/plugins_3rdparty/sitecon/transl/russian.ts +++ b/src/plugins_3rdparty/sitecon/transl/russian.ts @@ -4,9 +4,8 @@ <context> <name>QObject</name> <message> - <location filename="../src/SiteconIOWorkers.cpp" line="69"/> <source>Sitecon model</source> - <translation>Профайл SITECON</translation> + <translation type="vanished">Профайл SITECON</translation> </message> </context> <context> @@ -1083,7 +1082,7 @@ </message> <message> <location filename="../src/SiteconSearchDialogController.cpp" line="322"/> - <source>Error parsing minumum score</source> + <source>Error parsing minimum score</source> <translation>ÐÐµÑ€Ð°Ð·Ð±Ð¾Ñ€Ñ‡Ð¸Ð²Ð°Ñ Ñтрока минимальной ошибки</translation> </message> <message> diff --git a/src/plugins_3rdparty/umuscle/src/MuscleAdapter.cpp b/src/plugins_3rdparty/umuscle/src/MuscleAdapter.cpp index bfc90aa56cc550ba2a1969529fe345ae1badbf1d..ee3cd72a4db591adeb0effe40674fbe27ecda137 100644 --- a/src/plugins_3rdparty/umuscle/src/MuscleAdapter.cpp +++ b/src/plugins_3rdparty/umuscle/src/MuscleAdapter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/umuscle/src/MuscleAdapter.h b/src/plugins_3rdparty/umuscle/src/MuscleAdapter.h index 1cf20e2c367ced9d17ce4cff8c156578caa01db9..9d4eca6fe7263e8c9a61bb548d4b053608a4fc6c 100644 --- a/src/plugins_3rdparty/umuscle/src/MuscleAdapter.h +++ b/src/plugins_3rdparty/umuscle/src/MuscleAdapter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/umuscle/src/MuscleAlignDialogController.cpp b/src/plugins_3rdparty/umuscle/src/MuscleAlignDialogController.cpp index 2308491e538e039b2bdf51dd3b1126ac01ec1faa..547e95810fed8211ff19c02367e0d59a5a2ec563 100644 --- a/src/plugins_3rdparty/umuscle/src/MuscleAlignDialogController.cpp +++ b/src/plugins_3rdparty/umuscle/src/MuscleAlignDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -43,7 +43,7 @@ MuscleAlignDialogController::MuscleAlignDialogController(QWidget* w, const Multi : QDialog(w), ma(_ma->getCopy()), settings(_settings) { setupUi(this); - new HelpButton(this, buttonBox, "22056062"); + new HelpButton(this, buttonBox, "24742597"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Align")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -133,7 +133,7 @@ MuscleAlignWithExtFileSpecifyDialogController::MuscleAlignWithExtFileSpecifyDial saveController(NULL) { setupUi(this); - new HelpButton(this, buttonBox, "22056061"); + new HelpButton(this, buttonBox, "24742596"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Align")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/plugins_3rdparty/umuscle/src/MuscleAlignDialogController.h b/src/plugins_3rdparty/umuscle/src/MuscleAlignDialogController.h index 3e0fb1ebecc728af5222042a82c50fcd0258b278..c86437ff630ddc60c727a3069f5adb48e72ad8a2 100644 --- a/src/plugins_3rdparty/umuscle/src/MuscleAlignDialogController.h +++ b/src/plugins_3rdparty/umuscle/src/MuscleAlignDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/umuscle/src/MuscleConstants.h b/src/plugins_3rdparty/umuscle/src/MuscleConstants.h index 003aba5f2462d18dcd02e5ce5687d3c13ae7668e..739b67655cdcb891ff86e3f2593c497622c4232c 100644 --- a/src/plugins_3rdparty/umuscle/src/MuscleConstants.h +++ b/src/plugins_3rdparty/umuscle/src/MuscleConstants.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/umuscle/src/MuscleParallel.cpp b/src/plugins_3rdparty/umuscle/src/MuscleParallel.cpp index 86eaed8250def119f3d6e175f04127b659f3fdbc..c50b6c0f98f9d104b67c72471b1e6ab067792b54 100644 --- a/src/plugins_3rdparty/umuscle/src/MuscleParallel.cpp +++ b/src/plugins_3rdparty/umuscle/src/MuscleParallel.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/umuscle/src/MuscleParallel.h b/src/plugins_3rdparty/umuscle/src/MuscleParallel.h index d4f0d89fe8ab14a293130cec491f183f2a3922a1..b2d5b2f31bbc8d6274892aefe9a887434a4b7bdb 100644 --- a/src/plugins_3rdparty/umuscle/src/MuscleParallel.h +++ b/src/plugins_3rdparty/umuscle/src/MuscleParallel.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/umuscle/src/MusclePlugin.cpp b/src/plugins_3rdparty/umuscle/src/MusclePlugin.cpp index 0c92522a3171833e65de578899231ef7edb0f491..7feca805da9a22f92581a543bd371357f0b4c932 100644 --- a/src/plugins_3rdparty/umuscle/src/MusclePlugin.cpp +++ b/src/plugins_3rdparty/umuscle/src/MusclePlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/umuscle/src/MusclePlugin.h b/src/plugins_3rdparty/umuscle/src/MusclePlugin.h index 8e056bf4108fb5976cdddd4b704ffa1d99b11978..ba802bcafb3043a1703b5d8c654e1d8c9a9213b2 100644 --- a/src/plugins_3rdparty/umuscle/src/MusclePlugin.h +++ b/src/plugins_3rdparty/umuscle/src/MusclePlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/umuscle/src/MuscleTask.cpp b/src/plugins_3rdparty/umuscle/src/MuscleTask.cpp index 45edec9fc9811242e30e9de4a58ac835152d7e73..ec16b1cd82ad51adceeb0b64baf783d6c37a8a21 100644 --- a/src/plugins_3rdparty/umuscle/src/MuscleTask.cpp +++ b/src/plugins_3rdparty/umuscle/src/MuscleTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/umuscle/src/MuscleTask.h b/src/plugins_3rdparty/umuscle/src/MuscleTask.h index 0fac527d0ce86e04a65655da9309e6cc767989aa..c7ccfafb463c054c3f26b28e43f446158117eef9 100644 --- a/src/plugins_3rdparty/umuscle/src/MuscleTask.h +++ b/src/plugins_3rdparty/umuscle/src/MuscleTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/umuscle/src/MuscleUtils.cpp b/src/plugins_3rdparty/umuscle/src/MuscleUtils.cpp index 6793d9c8c1131e88444f2af750074b6ea975a461..5c8a0da2c41f086b214b8ac9e358449940df91f6 100644 --- a/src/plugins_3rdparty/umuscle/src/MuscleUtils.cpp +++ b/src/plugins_3rdparty/umuscle/src/MuscleUtils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/umuscle/src/MuscleUtils.h b/src/plugins_3rdparty/umuscle/src/MuscleUtils.h index de5c99927145e3fa8f44da66af84282b9d3af87a..8d0c56b4e355b7c2ee2efb6a440707ffc171ff2a 100644 --- a/src/plugins_3rdparty/umuscle/src/MuscleUtils.h +++ b/src/plugins_3rdparty/umuscle/src/MuscleUtils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/umuscle/src/MuscleWorkPool.cpp b/src/plugins_3rdparty/umuscle/src/MuscleWorkPool.cpp index 05c108464317bf85d5e294f46c21e9e4e02af270..e9bc05d345c73da8f2ea553b29e04dc267051033 100644 --- a/src/plugins_3rdparty/umuscle/src/MuscleWorkPool.cpp +++ b/src/plugins_3rdparty/umuscle/src/MuscleWorkPool.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/umuscle/src/MuscleWorkPool.h b/src/plugins_3rdparty/umuscle/src/MuscleWorkPool.h index 221bf3ee38590766c70947e43a9fdd6bf4add421..94570ddc7f3c7615a7d671f31d6f01018cc78b61 100644 --- a/src/plugins_3rdparty/umuscle/src/MuscleWorkPool.h +++ b/src/plugins_3rdparty/umuscle/src/MuscleWorkPool.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/umuscle/src/MuscleWorker.cpp b/src/plugins_3rdparty/umuscle/src/MuscleWorker.cpp index 59435b8c3f27c015aed15c4f8dec478812b77a0d..569c1dab3c348a058055c0e18d6360f47554b667 100644 --- a/src/plugins_3rdparty/umuscle/src/MuscleWorker.cpp +++ b/src/plugins_3rdparty/umuscle/src/MuscleWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/umuscle/src/MuscleWorker.h b/src/plugins_3rdparty/umuscle/src/MuscleWorker.h index 8df2d07648c3b13b1d9b7562f5ef8d6b730040cb..769b487fd8835f815dae1aa66123a3f6d50a6cfb 100644 --- a/src/plugins_3rdparty/umuscle/src/MuscleWorker.h +++ b/src/plugins_3rdparty/umuscle/src/MuscleWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/umuscle/src/ProfileToProfileWorker.cpp b/src/plugins_3rdparty/umuscle/src/ProfileToProfileWorker.cpp index 23f03cba10762eff2b0807eca9ad88f18d434b35..8a1447fbe15a973d30fbe89764c40f6eae9ec309 100644 --- a/src/plugins_3rdparty/umuscle/src/ProfileToProfileWorker.cpp +++ b/src/plugins_3rdparty/umuscle/src/ProfileToProfileWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/umuscle/src/ProfileToProfileWorker.h b/src/plugins_3rdparty/umuscle/src/ProfileToProfileWorker.h index e58cbfbabb7cd8c5a8820b9c5941c33c4ae10e21..93e6da517b18aed49f810b1bfb49d715998cac1e 100644 --- a/src/plugins_3rdparty/umuscle/src/ProfileToProfileWorker.h +++ b/src/plugins_3rdparty/umuscle/src/ProfileToProfileWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/umuscle/src/TaskLocalStorage.cpp b/src/plugins_3rdparty/umuscle/src/TaskLocalStorage.cpp index f06464c88fb75ecd26276a58515c4121f8013928..43485416015adf0a4bac59e8b650f7d8d4d074c1 100644 --- a/src/plugins_3rdparty/umuscle/src/TaskLocalStorage.cpp +++ b/src/plugins_3rdparty/umuscle/src/TaskLocalStorage.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/umuscle/src/TaskLocalStorage.h b/src/plugins_3rdparty/umuscle/src/TaskLocalStorage.h index a5dadd45dbc26a0402f46252311540bbdee5f6fb..c7c89cae6e9b7a4c162c33263fcff34adb6160e5 100644 --- a/src/plugins_3rdparty/umuscle/src/TaskLocalStorage.h +++ b/src/plugins_3rdparty/umuscle/src/TaskLocalStorage.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/umuscle/src/refinehorizP.cpp b/src/plugins_3rdparty/umuscle/src/refinehorizP.cpp index e9dd1f295e7266dd987c173a7b53f8e300f7ef6c..57d78b598c322d594276c1ac41e3b7077a53f404 100644 --- a/src/plugins_3rdparty/umuscle/src/refinehorizP.cpp +++ b/src/plugins_3rdparty/umuscle/src/refinehorizP.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/umuscle/src/refinevertP.cpp b/src/plugins_3rdparty/umuscle/src/refinevertP.cpp index 147a29a51a3bfbe4820a704ed14ebea82531af4e..549b133109f08e1360f47c62769c90d46c724b07 100644 --- a/src/plugins_3rdparty/umuscle/src/refinevertP.cpp +++ b/src/plugins_3rdparty/umuscle/src/refinevertP.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/umuscle/src/umuscle_tests/umuscleTests.cpp b/src/plugins_3rdparty/umuscle/src/umuscle_tests/umuscleTests.cpp index c45b8c73eab2702d69b1cdc450d34d0ede02b531..1e57ef9ec15538dc135b92192758063105a0dd7d 100644 --- a/src/plugins_3rdparty/umuscle/src/umuscle_tests/umuscleTests.cpp +++ b/src/plugins_3rdparty/umuscle/src/umuscle_tests/umuscleTests.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -208,8 +208,11 @@ Task::ReportResult GTest_uMuscle::report() { void GTest_uMuscle::cleanup() { //if(ma_result!=NULL) // delete ma_result; - if(ctxAdded) + if(ctxAdded) { removeContext(resultCtxName); + } + + XmlTest::cleanup(); } void GTest_CompareMAlignment::init(XMLTestFormat *tf, const QDomElement& el) { diff --git a/src/plugins_3rdparty/umuscle/src/umuscle_tests/umuscleTests.h b/src/plugins_3rdparty/umuscle/src/umuscle_tests/umuscleTests.h index 7cc85e630b189c11eadbac435ac5247a7491fcb2..d1d540eef0e50a6d307894ef1e0a7831d399b941 100644 --- a/src/plugins_3rdparty/umuscle/src/umuscle_tests/umuscleTests.h +++ b/src/plugins_3rdparty/umuscle/src/umuscle_tests/umuscleTests.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -37,7 +37,7 @@ class MultipleSequenceAlignmentObject; class MuscleGObjectTask; class LoadDocumentTask; -class GTest_uMuscle : public GTest { +class GTest_uMuscle : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_uMuscle, "umuscle"); @@ -60,7 +60,7 @@ private: bool stable; }; -class GTest_CompareMAlignment : public GTest { +class GTest_CompareMAlignment : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_CompareMAlignment, "compare-malignment"); @@ -72,7 +72,7 @@ private: QString doc2CtxName; }; -class GTest_uMuscleAddUnalignedSequenceToProfile: public GTest { +class GTest_uMuscleAddUnalignedSequenceToProfile: public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_uMuscleAddUnalignedSequenceToProfile, "umuscle-add-unaligned-seq-to-profile"); @@ -90,7 +90,7 @@ private: int resultAliSeqs; }; -class GTest_Muscle_Load_Align_QScore: public GTest { +class GTest_Muscle_Load_Align_QScore: public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_Muscle_Load_Align_QScore, "umuscle-load-align-qscore", TaskFlags_FOSCOE) @@ -145,7 +145,7 @@ private: MultipleSequenceAlignmentObject* ma2; }; -class GTest_Muscle_Load_Align_Compare: public GTest { +class GTest_Muscle_Load_Align_Compare: public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_Muscle_Load_Align_Compare, "umuscle-load-align-compare"); @@ -158,7 +158,7 @@ private: Muscle_Load_Align_Compare_Task *worker; }; -class GTest_uMusclePacketTest: public GTest { +class GTest_uMusclePacketTest: public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY(GTest_uMusclePacketTest, "umuscle-packet-test"); diff --git a/src/plugins_3rdparty/umuscle/umuscle.pri b/src/plugins_3rdparty/umuscle/umuscle.pri index 8a87fdd29fbfe4e0ba7589b6f169a9dc62f8c376..a4a921b5a523d6c93f424a2aa2ef3efbc53c8384 100644 --- a/src/plugins_3rdparty/umuscle/umuscle.pri +++ b/src/plugins_3rdparty/umuscle/umuscle.pri @@ -5,15 +5,7 @@ PLUGIN_NAME=Muscle3 PLUGIN_VENDOR=Unipro CONFIG += warn_off -LIBS += -lqscore - -!debug_and_release|build_pass { - - CONFIG(debug, debug|release) { - LIBS -= -lqscore - LIBS += -lqscored - } -} +include( ../../ugene_plugin_common.pri ) +LIBS += -lqscore$$D -include( ../../ugene_plugin_common.pri ) diff --git a/src/plugins_3rdparty/variants/src/AssemblySamtoolsMpileup.cpp b/src/plugins_3rdparty/variants/src/AssemblySamtoolsMpileup.cpp index f903900dc451c8599c4e0af13ab6c7d56faa080e..e20051b35b56d1229c88b2ee3193d2bedee4a6e4 100644 --- a/src/plugins_3rdparty/variants/src/AssemblySamtoolsMpileup.cpp +++ b/src/plugins_3rdparty/variants/src/AssemblySamtoolsMpileup.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,6 +23,7 @@ #include <U2Core/AppContext.h> #include <U2Core/AppSettings.h> +#include <U2Core/CmdlineTaskRunner.h> #include <U2Core/Counter.h> #include <U2Core/DocumentModel.h> #include <U2Core/DocumentUtils.h> @@ -157,6 +158,11 @@ QString CallVariantsTask::tmpFilePath(const QString &baseName, const QString &ex /************************************************************************/ /* SamtoolsMpileupTask */ /************************************************************************/ + +const QString SamtoolsMpileupTask::SAMTOOLS_ID = "USUPP_SAMTOOLS"; +const QString SamtoolsMpileupTask::BCFTOOLS_ID = "USUPP_BCFTOOLS"; +const QString SamtoolsMpileupTask::VCFUTILS_ID = "USUPP_VCFUTILS"; + SamtoolsMpileupTask::SamtoolsMpileupTask(const CallVariantsTaskSettings &_settings) :ExternalToolSupportTask(tr("Samtool mpileup for %1 ").arg(_settings.refSeqUrl), TaskFlags(TaskFlag_None)),settings(_settings) { @@ -191,21 +197,21 @@ void SamtoolsMpileupTask::prepare(){ } void SamtoolsMpileupTask::run() { - ProcessRun samtools = ExternalToolSupportUtils::prepareProcess("SAMtools", settings.getMpiliupArgs(), "", QStringList(), stateInfo, getListener(0)); + ProcessRun samtools = ExternalToolSupportUtils::prepareProcess(SAMTOOLS_ID, settings.getMpiliupArgs(), "", QStringList(), stateInfo, getListener(0)); CHECK_OP(stateInfo, ); QScopedPointer<QProcess> sp(samtools.process); ExternalToolLogParser sLogParser; ExternalToolRunTaskHelper sHelper(samtools.process, &sLogParser, stateInfo); setListenerForHelper(&sHelper, 0); - ProcessRun bcftools = ExternalToolSupportUtils::prepareProcess("BCFtools", settings.getBcfViewArgs(), "", QStringList(), stateInfo, getListener(1)); + ProcessRun bcftools = ExternalToolSupportUtils::prepareProcess(BCFTOOLS_ID, settings.getBcfViewArgs(), "", QStringList(), stateInfo, getListener(1)); CHECK_OP(stateInfo, ); QScopedPointer<QProcess> bp(bcftools.process); ExternalToolLogParser bLogParser; ExternalToolRunTaskHelper bHelper(bcftools.process, &bLogParser, stateInfo); setListenerForHelper(&bHelper, 1); - ProcessRun vcfutils = ExternalToolSupportUtils::prepareProcess("vcfutils", settings.getVarFilterArgs(), "", QStringList(), stateInfo, getListener(2)); + ProcessRun vcfutils = ExternalToolSupportUtils::prepareProcess(VCFUTILS_ID, settings.getVarFilterArgs(), "", QStringList(), stateInfo, getListener(2)); CHECK_OP(stateInfo, ); QScopedPointer<QProcess> vp(vcfutils.process); ExternalToolLogParser vLogParser; @@ -225,9 +231,9 @@ void SamtoolsMpileupTask::run() { while(!vcfutils.process->waitForFinished(1000)){ if (isCanceled()) { - samtools.process->kill(); - bcftools.process->kill(); - vcfutils.process->kill(); + CmdlineTaskRunner::killProcessTree(samtools.process); + CmdlineTaskRunner::killProcessTree(bcftools.process); + CmdlineTaskRunner::killProcessTree(vcfutils.process); return; } } diff --git a/src/plugins_3rdparty/variants/src/AssemblySamtoolsMpileup.h b/src/plugins_3rdparty/variants/src/AssemblySamtoolsMpileup.h index 02b1b4b141574f7c95ea3da36b0c99a9fd87e3a5..52c332bb976ed61b5580f25c77458a9c3f041b9d 100644 --- a/src/plugins_3rdparty/variants/src/AssemblySamtoolsMpileup.h +++ b/src/plugins_3rdparty/variants/src/AssemblySamtoolsMpileup.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -111,6 +111,11 @@ private: private: CallVariantsTaskSettings settings; + + // The following constants are taken from the appropriate files in external_tool_support plugin + static const QString SAMTOOLS_ID; + static const QString BCFTOOLS_ID; + static const QString VCFUTILS_ID; }; class CallVariantsTask : public ExternalToolSupportTask { diff --git a/src/plugins_3rdparty/variants/src/SamtoolMpileupWorker.cpp b/src/plugins_3rdparty/variants/src/SamtoolMpileupWorker.cpp index 87380ab06800e9ed19800bf246ebe58633f14ba5..97b2c0d2e1fc781c59fd28577995157d359b4e15 100644 --- a/src/plugins_3rdparty/variants/src/SamtoolMpileupWorker.cpp +++ b/src/plugins_3rdparty/variants/src/SamtoolMpileupWorker.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -673,10 +673,11 @@ void CallVariantsWorkerFactory::init() { proto->setPortValidator(BasePorts::IN_ASSEMBLY_PORT_ID(), new EmptySlotValidator(BaseSlots::URL_SLOT().getId())); proto->setPortValidator(BasePorts::IN_SEQ_PORT_ID(), new EmptySlotValidator(BaseSlots::URL_SLOT().getId())); - proto->addExternalTool("SAMtools"); - proto->addExternalTool("BCFtools"); - proto->addExternalTool("perl"); - proto->addExternalTool("vcfutils"); + //no way to include tool support files, so ids passed to functions manually + proto->addExternalTool("USUPP_SAMTOOLS");//SamToolsExtToolSupport::ET_SAMTOOLS_EXT_ID + proto->addExternalTool("USUPP_BCFTOOLS");//BcfToolsSupport::ET_BCFTOOLS_ID + proto->addExternalTool("USUPP_PERL");//PerlSupport::ET_PERL_ID + proto->addExternalTool("USUPP_VCF_CONSENSUS");//VcfConsensusSupport::ET_VCF_CONSENSUS_ID WorkflowEnv::getProtoRegistry()->registerProto(BaseActorCategories::CATEGORY_VARIATION_ANALYSIS(), proto); diff --git a/src/plugins_3rdparty/variants/src/SamtoolMpileupWorker.h b/src/plugins_3rdparty/variants/src/SamtoolMpileupWorker.h index 19eb8b292f5d9e1a33a55b403895bcca90268bea..29919a146c99501bc2b4979f52cfbc2b89d69fbf 100644 --- a/src/plugins_3rdparty/variants/src/SamtoolMpileupWorker.h +++ b/src/plugins_3rdparty/variants/src/SamtoolMpileupWorker.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/variants/src/SamtoolsPlugin.cpp b/src/plugins_3rdparty/variants/src/SamtoolsPlugin.cpp index c9c7416d8243399c0d53229e83dbaeb8a610e679..5b6feba7c1b7c0b8493a94f8e2560534a825a629 100644 --- a/src/plugins_3rdparty/variants/src/SamtoolsPlugin.cpp +++ b/src/plugins_3rdparty/variants/src/SamtoolsPlugin.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/variants/src/SamtoolsPlugin.h b/src/plugins_3rdparty/variants/src/SamtoolsPlugin.h index 3517d05bf5fc4fcc34cde9f15a05fc17904632eb..8b95dea7c139b0f6cb8c0a2f63d6fdf5797c04e5 100644 --- a/src/plugins_3rdparty/variants/src/SamtoolsPlugin.h +++ b/src/plugins_3rdparty/variants/src/SamtoolsPlugin.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins_3rdparty/variants/transl/russian.ts b/src/plugins_3rdparty/variants/transl/russian.ts index 7b33b621233614afab3ed181f3f8ac6a5f30648f..502cc96d07b72f57376f0c4bf2625bce724a9645 100644 --- a/src/plugins_3rdparty/variants/transl/russian.ts +++ b/src/plugins_3rdparty/variants/transl/russian.ts @@ -27,47 +27,47 @@ <context> <name>U2::LocalWorkflow::CallVariantsTask</name> <message> - <location filename="../src/AssemblySamtoolsMpileup.cpp" line="52"/> + <location filename="../src/AssemblySamtoolsMpileup.cpp" line="53"/> <source>Call variants for %1</source> <translation>Вызов вариантов Ð´Ð»Ñ %1</translation> </message> <message> - <location filename="../src/AssemblySamtoolsMpileup.cpp" line="65"/> + <location filename="../src/AssemblySamtoolsMpileup.cpp" line="66"/> <source>reference</source> <translation>референÑ</translation> </message> <message> - <location filename="../src/AssemblySamtoolsMpileup.cpp" line="67"/> + <location filename="../src/AssemblySamtoolsMpileup.cpp" line="68"/> <source>assembly</source> <translation>Ñборка</translation> </message> <message> - <location filename="../src/AssemblySamtoolsMpileup.cpp" line="75"/> + <location filename="../src/AssemblySamtoolsMpileup.cpp" line="76"/> <source>The %1 file does not exist: %2</source> <translation>The %1 file does not exist: %2</translation> </message> <message> - <location filename="../src/AssemblySamtoolsMpileup.cpp" line="88"/> + <location filename="../src/AssemblySamtoolsMpileup.cpp" line="89"/> <source>No assembly files</source> <translation>No assembly files</translation> </message> <message> - <location filename="../src/AssemblySamtoolsMpileup.cpp" line="93"/> + <location filename="../src/AssemblySamtoolsMpileup.cpp" line="94"/> <source>No dbi storage</source> <translation>No dbi storage</translation> </message> <message> - <location filename="../src/AssemblySamtoolsMpileup.cpp" line="97"/> + <location filename="../src/AssemblySamtoolsMpileup.cpp" line="98"/> <source>No sequence URL</source> <translation>No sequence URL</translation> </message> <message> - <location filename="../src/AssemblySamtoolsMpileup.cpp" line="135"/> + <location filename="../src/AssemblySamtoolsMpileup.cpp" line="136"/> <source>No document loaded</source> <translation>No document loaded</translation> </message> <message> - <location filename="../src/AssemblySamtoolsMpileup.cpp" line="139"/> + <location filename="../src/AssemblySamtoolsMpileup.cpp" line="140"/> <source>Incorrect variant track object in %1</source> <translation>Incorrect variant track object in %1</translation> </message> @@ -642,42 +642,42 @@ <context> <name>U2::LocalWorkflow::SamtoolsMpileupTask</name> <message> - <location filename="../src/AssemblySamtoolsMpileup.cpp" line="161"/> + <location filename="../src/AssemblySamtoolsMpileup.cpp" line="162"/> <source>Samtool mpileup for %1 </source> <translation>Samtool mpileup Ð´Ð»Ñ %1 </translation> </message> <message> - <location filename="../src/AssemblySamtoolsMpileup.cpp" line="168"/> + <location filename="../src/AssemblySamtoolsMpileup.cpp" line="169"/> <source>No reference sequence URL to do pileup</source> <translation>No reference sequence URL to do pileup</translation> </message> <message> - <location filename="../src/AssemblySamtoolsMpileup.cpp" line="173"/> + <location filename="../src/AssemblySamtoolsMpileup.cpp" line="174"/> <source>No assembly URL to do pileup</source> <translation>No assembly URL to do pileup</translation> </message> <message> - <location filename="../src/AssemblySamtoolsMpileup.cpp" line="179"/> + <location filename="../src/AssemblySamtoolsMpileup.cpp" line="180"/> <source>There is an assembly with an empty path</source> <translation>There is an assembly with an empty path</translation> </message> <message> - <location filename="../src/AssemblySamtoolsMpileup.cpp" line="188"/> + <location filename="../src/AssemblySamtoolsMpileup.cpp" line="189"/> <source>Can not create the folder: </source> <translation>Can not create the folder: </translation> </message> <message> - <location filename="../src/AssemblySamtoolsMpileup.cpp" line="243"/> + <location filename="../src/AssemblySamtoolsMpileup.cpp" line="244"/> <source>Can not run %1 tool</source> <translation>Can not run %1 tool</translation> </message> <message> - <location filename="../src/AssemblySamtoolsMpileup.cpp" line="249"/> + <location filename="../src/AssemblySamtoolsMpileup.cpp" line="250"/> <source>%1 tool exited with code %2</source> <translation>%1 tool exited with code %2</translation> </message> <message> - <location filename="../src/AssemblySamtoolsMpileup.cpp" line="251"/> + <location filename="../src/AssemblySamtoolsMpileup.cpp" line="252"/> <source>Tool %1 finished successfully</source> <translation>Tool %1 finished successfully</translation> </message> diff --git a/src/plugins_3rdparty/variants/variants.pri b/src/plugins_3rdparty/variants/variants.pri index a6e7fd6af95250123ebe88f6383da18586272c4c..f1aa000ac41618d8d7b3b1806555c9ec84414177 100644 --- a/src/plugins_3rdparty/variants/variants.pri +++ b/src/plugins_3rdparty/variants/variants.pri @@ -18,9 +18,6 @@ win32 { use_bundled_zlib() { INCLUDEPATH += ../../libs_3rdparty/zlib/src - LIBS += -lzlib -}else{ - LIBS += -lz } @@ -33,19 +30,8 @@ INCLUDEPATH += ../../libs_3rdparty/samtools/src INCLUDEPATH += ../../libs_3rdparty/samtools/src/samtools/bcftools win32 : INCLUDEPATH += ../../libs_3rdparty/samtools/src/samtools/win32 -LIBS += -lsamtools - -!debug_and_release|build_pass { - - CONFIG(debug, debug|release) { - use_bundled_zlib() { - LIBS -= -lzlib - LIBS += -lzlibd - } - LIBS -= -lsamtools - LIBS += -lsamtoolsd - } -} +LIBS += $$add_z_lib() +LIBS += -lsamtools$$D win32-msvc2013 { DEFINES += _XKEYCHECK_H diff --git a/src/plugins_checker/plugins_checker.pri b/src/plugins_checker/plugins_checker.pri index 8570a4507aacae28c0e39552b614de43e9adb516..45f8e4a6c4e8429574517922fb4fec23822ded27 100644 --- a/src/plugins_checker/plugins_checker.pri +++ b/src/plugins_checker/plugins_checker.pri @@ -6,32 +6,29 @@ use_opencl(){ DEFINES += OPENCL_SUPPORT } -UGENE_RELATIVE_DESTDIR = '' - -QT += xml network script webkit widgets +QT += xml network script widgets TEMPLATE = app CONFIG +=qt dll thread debug_and_release console CONFIG -= app_bundle DEFINES+= QT_DLL QT_FATAL_ASSERT INCLUDEPATH += src _tmp ../include ../corelibs/U2Private/src -LIBS += -L../_release -lU2Core -lU2Algorithm -lU2Formats -lU2Gui -lU2Private -lugenedb -lbreakpad +LIBS += -L../$$out_dir() +LIBS += -lU2Core$$D -lU2Algorithm$$D -lU2Formats$$D -lU2Gui$$D -lU2Private$$D -lbreakpad$$D +LIBS += $$add_sqlite_lib() + +DESTDIR = ../$$out_dir() +TARGET = plugins_checker$$D !debug_and_release|build_pass { CONFIG(debug, debug|release) { - TARGET = plugins_checkerd DEFINES+=_DEBUG - DESTDIR=../_debug MOC_DIR=_tmp/moc/debug OBJECTS_DIR=_tmp/obj/debug - LIBS -= -L../_release -lU2Core -lU2Algorithm -lU2Formats -lU2Gui -lU2Private -lugenedb -lbreakpad - LIBS += -L../_debug -lU2Cored -lU2Algorithmd -lU2Formatsd -lU2Guid -lU2Privated -lugenedbd -lbreakpadd } CONFIG(release, debug|release) { - TARGET = plugins_checker - DESTDIR=../_release DEFINES+=NDEBUG MOC_DIR=_tmp/moc/release OBJECTS_DIR=_tmp/obj/release @@ -55,6 +52,6 @@ macx { } unix { - target.path = $$UGENE_INSTALL_DIR/$$UGENE_RELATIVE_DESTDIR + target.path = $$UGENE_INSTALL_DIR/ INSTALLS += target } diff --git a/src/plugins_checker/plugins_checker.rc b/src/plugins_checker/plugins_checker.rc index adc1754e45a84f5f21543cb3e3ffaf3ae6b0117b..37336c2f09e23ca532ae9653983b414e8199c60d 100644 --- a/src/plugins_checker/plugins_checker.rc +++ b/src/plugins_checker/plugins_checker.rc @@ -12,8 +12,8 @@ #endif VS_VERSION_INFO VERSIONINFO -FILEVERSION UGENE_VER_MAJOR,UGENE_VER_MINOR,UGENE_VER_PATCH,0 -PRODUCTVERSION UGENE_VER_MAJOR,UGENE_VER_MINOR,UGENE_VER_PATCH +FILEVERSION UGENE_VER_MAJOR,UGENE_VER_MINOR,0 +PRODUCTVERSION UGENE_VER_MAJOR,UGENE_VER_MINOR FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS (VER_DEBUG) FILETYPE VFT_APP @@ -24,7 +24,7 @@ BEGIN BEGIN VALUE "CompanyName", "Unipro, Russia" VALUE "FileDescription", "Resource dependency checker" - VALUE "FileVersion", TOSTRING(UGENE_VER_MAJOR.UGENE_VER_MINOR.UGENE_VER_PATCH.0) + VALUE "FileVersion", TOSTRING(UGENE_VER_MAJOR.UGENE_VER_MINOR.0) VALUE "OriginalFilename", "plugins_checker" VALUE "ProductName", "Unipro UGENE" VALUE "ProductVersion", UGENE_VERSION_STRING diff --git a/src/plugins_checker/src/Main.cpp b/src/plugins_checker/src/Main.cpp index 5ce54fe04022141a079c0e0f59d3609550e3b2e1..68a7ded655a514b9179ba0189a748f3ea2200c4d 100644 --- a/src/plugins_checker/src/Main.cpp +++ b/src/plugins_checker/src/Main.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/qclean.cmd b/src/qclean.cmd index 0a28deecde76caa0cd412e5e5dc2c1ef8cedec30..1b11da9c1c3b55a6acc1cf8b89a737a96fba6ab7 100644 --- a/src/qclean.cmd +++ b/src/qclean.cmd @@ -22,6 +22,7 @@ del /s /f /q Makefile* del /s /f /q *.pdb del /s /f /q *.idb del /s /f /q *.vcproj* +del /s /f /q *.vcxproj* del /s /f /q *.suo del /s /f /q *.ncb del /s /f /q UpgradeLog.XML \ No newline at end of file diff --git a/src/ugene_globals.pri b/src/ugene_globals.pri index db83b0bc026a6f08aac8c376bc89ea2a83d4d178..9f498af1bd31254ecf29b6aac78ef6b92d71e936 100644 --- a/src/ugene_globals.pri +++ b/src/ugene_globals.pri @@ -6,7 +6,8 @@ DEFINES+=U2_DISTRIBUTION_INFO=$${U2_DISTRIBUTION_INFO} DEFINES+=UGENE_VERSION=$${UGENE_VERSION} DEFINES+=UGENE_VER_MAJOR=$${UGENE_VER_MAJOR} DEFINES+=UGENE_VER_MINOR=$${UGENE_VER_MINOR} -DEFINES+=UGENE_VER_PATCH=$${UGENE_VER_PATCH} + +CONFIG += c++11 # NGS package _UGENE_NGS = $$(UGENE_NGS) @@ -16,9 +17,22 @@ contains(_UGENE_NGS, 1) : DEFINES += UGENE_NGS win32 : QMAKE_CXXFLAGS += /MP # use parallel build with nmake win32 : DEFINES+= _WINDOWS win32-msvc2013 : DEFINES += _SCL_SECURE_NO_WARNINGS +win32-msvc2015|greaterThan(QMAKE_MSC_VER, 1909) { + DEFINES += _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS _XKEYCHECK_H + QMAKE_CXXFLAGS-=-Zc:strictStrings + QMAKE_CXXFLAGS-=Zc:strictStrings + QMAKE_CFLAGS-=-Zc:strictStrings + QMAKE_CFLAGS-=Zc:strictStrings + QMAKE_CXXFLAGS-=-g + QMAKE_CFLAGS-=-g +} + +greaterThan(QMAKE_MSC_VER, 1909) { + DEFINES += _ALLOW_KEYWORD_MACROS __STDC_LIMIT_MACROS +} -win32 : QMAKE_CFLAGS_RELEASE = -O2 -Oy- -MD -Zi -win32 : QMAKE_CXXFLAGS_RELEASE = -O2 -Oy- -MD -Zi +win32 : QMAKE_CFLAGS_RELEASE += -O2 -Oy- -MD -Zi +win32 : QMAKE_CXXFLAGS_RELEASE += -O2 -Oy- -MD -Zi win32 : QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO /MAP /MAPINFO:EXPORTS /DEBUG win32 : LIBS += psapi.lib win32 : DEFINES += "PSAPI_VERSION=1" @@ -32,6 +46,13 @@ macx { linux-g++ { # We have a lot of such warning from QT -> disable them. QMAKE_CXXFLAGS += -Wno-expansion-to-defined + + # build with coverage (gcov) support, now for Linux only + equals(UGENE_GCOV_ENABLE, 1) { + message("Build with gcov support. See gcov/lcov doc for generating coverage info") + QMAKE_CXXFLAGS += --coverage -fprofile-arcs -ftest-coverage + QMAKE_LFLAGS += -lgcov --coverage + } } isEmpty( INSTALL_PREFIX ) : INSTALL_PREFIX = /usr @@ -146,15 +167,88 @@ use_bundled_zlib() { DEFINES+=UGENE_USE_BUNDLED_ZLIB } +# A function to add SQLite library to the list of libraries +defineReplace(add_z_lib) { + use_bundled_zlib() { + !debug_and_release|build_pass { + CONFIG(debug, debug|release) { + RES = -lzlibd + } else { + RES = -lzlib + } + } + } else { + RES = -lz + } + return ($$RES) +} + + +# By default, UGENE uses bundled sqlite library built with special flags (see sqlite3.pri) +# To use locally installed sqlite library use UGENE_USE_BUNDLED_SQLITE = 0 + +defineTest( use_bundled_sqlite ) { + contains( UGENE_USE_BUNDLED_SQLITE, 0 ) : return (false) + return (true) +} + +use_bundled_sqlite() { + DEFINES += UGENE_USE_BUNDLED_SQLITE +} + +# A function to add SQLite library to the list of libraries +defineReplace(add_sqlite_lib) { + use_bundled_sqlite() { + !debug_and_release|build_pass { + CONFIG(debug, debug|release) { + RES = -lugenedbd + } else { + RES = -lugenedb + } + } + } else { + RES = -lsqlite3 + } + return ($$RES) +} + +# Returns active UGENE output dir name for core libs and executables used by build process: _debug or _release. +defineReplace(out_dir) { + !debug_and_release|build_pass { + CONFIG(debug, debug|release) { + RES = _debug + } else { + RES = _release + } + } + return ($$RES) +} + +# Returns active UGENE output dir name for core libs and executables used by build process: _debug or _release. +defineTest(is_debug_build) { + !debug_and_release|build_pass { + CONFIG(debug, debug|release) { + RES = true + } else { + RES = false + } + } + return ($$RES) +} + +# Common library suffix for all libraries that depends on build mode: 'd' for debug and '' for release. +# Example: 'libCore$$D.so' will result to the 'libCored.so' in debug mode and to the 'libCore.so' in release mode. +D= +is_debug_build() { + D=d +} + #Variable enabling exclude list for ugene modules #UGENE_EXCLUDE_LIST_ENABLED = 1 defineTest( exclude_list_enabled ) { contains( UGENE_EXCLUDE_LIST_ENABLED, 1 ) : return (true) return (false) } -if(exclude_list_enabled()|!exists( ./libs_3rdparty/QSpec/QSpec.pro )) { - DEFINES += HI_EXCLUDED -} #Variable enabling exclude list for ugene non-free modules defineTest( without_non_free ) { @@ -186,3 +280,76 @@ defineTest(minQtVersion) { } return(false) } + +# Define which web engine should be used +_UGENE_WEB_ENGINE__AUTO = "auto" +_UGENE_WEB_ENGINE__WEBKIT = "webkit" +_UGENE_WEB_ENGINE__QT = "qt" + +_UGENE_WEB_ENGINE = $$(UGENE_WEB_ENGINE) +isEmpty(_UGENE_WEB_ENGINE): _UGENE_WEB_ENGINE = $$_UGENE_WEB_ENGINE__AUTO + +defineReplace(tryUseWebkit) { + !qtHaveModule(webkit) | !qtHaveModule(webkitwidgets) { + error("WebKit is not available. It is not included to Qt framework since Qt5.6. Qt WebEngine should be used instead") + return() + } else { +# message("Qt version is $${QT_VERSION}, WebKit is selected") + DEFINES += UGENE_WEB_KIT + DEFINES -= UGENE_QT_WEB_ENGINE + return($$DEFINES) + } +} + +defineReplace(tryUseQtWebengine) { + !minQtVersion(5, 4, 0) { + message("Cannot build Unipro UGENE with Qt version $${QT_VERSION} and Qt WebEngine") + error("Use at least Qt 5.4.0 or build with WebKit") + return() + } else: !qtHaveModule(webengine) | !qtHaveModule(webenginewidgets) { + error("Qt WebEngine is not available. Ensure that it is installed.") + return() + } else { +# message("Qt version is $${QT_VERSION}, Qt WebEngine is selected") + DEFINES -= UGENE_WEB_KIT + DEFINES += UGENE_QT_WEB_ENGINE + return($$DEFINES) + } +} + +equals(_UGENE_WEB_ENGINE, $$_UGENE_WEB_ENGINE__WEBKIT) { + DEFINES = $$tryUseWebkit() +} else: equals(_UGENE_WEB_ENGINE, $$_UGENE_WEB_ENGINE__QT) { + DEFINES = $$tryUseQtWebengine() +} else { + !equals(_UGENE_WEB_ENGINE, $$_UGENE_WEB_ENGINE__AUTO) { + warning("An unknown UGENE_WEB_ENGINE value: $${_UGENE_WEB_ENGINE}. The web engine will be selected automatically.") + } +# message("Selecting web engine automatically...") + + macx { + # A Qt WebEngine is preferred for macOS because there are high definition displays on macs + minQtVersion(5, 4, 0) { + DEFINES = $$tryUseQtWebengine() + } else { + DEFINES = $$tryUseWebkit() + } + } else { + # We don't try to search WebKit on the Qt5.6 and more modern versions. + minQtVersion(5, 6, 0) { + DEFINES = $$tryUseQtWebengine() + } else { + DEFINES = $$tryUseWebkit() + } + } +} + +defineTest(useWebKit) { + contains(DEFINES, UGENE_WEB_KIT): return(true) + contains(DEFINES, UGENE_QT_WEB_ENGINE): return(false) + return(false) +} + +if (exclude_list_enabled() | !useWebKit()) { + DEFINES += HI_EXCLUDED +} diff --git a/src/ugene_lib_common.pri b/src/ugene_lib_common.pri index 4a6c8d285c4ea75a8a7aece697dc33c137f81881..5c7342366371ba3f97c352631692ca70671c7bfe 100644 --- a/src/ugene_lib_common.pri +++ b/src/ugene_lib_common.pri @@ -12,20 +12,22 @@ DEFINES+= QT_DLL QT += script INCLUDEPATH += src _tmp ../../include +# Visual Studio project file name +QMAKE_PROJECT_NAME=$${MODULE_ID} + +MODULE_ID=$$join(MODULE_ID, "", "", $$D) +TARGET = $${MODULE_ID} +CONFDIR=$$out_dir() + !debug_and_release|build_pass { CONFIG(debug, debug|release) { - MODULE_ID=$$join(MODULE_ID, "", "", "d") - TARGET = $${MODULE_ID} DEFINES+=_DEBUG CONFIG +=console - CONFDIR=_debug MOC_DIR=_tmp/moc/debug OBJECTS_DIR=_tmp/obj/debug } CONFIG(release, debug|release) { - TARGET = $${MODULE_ID} DEFINES+=NDEBUG - CONFDIR=_release MOC_DIR=_tmp/moc/release OBJECTS_DIR=_tmp/obj/release } diff --git a/src/ugene_plugin_common.pri b/src/ugene_plugin_common.pri index f6ccddeca88e6d411f81cc4b826a13abe308ea5d..1bce50ee77bee0cf02ea0a0b9e6fa3b3c348fc2a 100644 --- a/src/ugene_plugin_common.pri +++ b/src/ugene_plugin_common.pri @@ -1,26 +1,26 @@ MODULE_ID=$${PLUGIN_ID} + include (ugene_lib_common.pri) # This file is common for all UGENE plugins -UGENE_RELATIVE_DESTDIR = 'plugins' -QT += network xml webkit svg -LIBS += -L../../_release -lU2Core -lU2Algorithm -lU2Formats -lU2Gui -lU2View -lU2Test -lU2Lang -lU2Designer +QT += network xml svg -!debug_and_release|build_pass { - CONFIG(debug, debug|release) { - PLUGIN_ID=$$join(PLUGIN_ID, "", "", "d") - DESTDIR=../../_debug/plugins - LIBS -= -L../../_release -lU2Core -lU2Algorithm -lU2Formats -lU2Gui -lU2View -lU2Test -lU2Lang -lU2Designer - LIBS += -L../../_debug -lU2Cored -lU2Algorithmd -lU2Formatsd -lU2Guid -lU2Viewd -lU2Testd -lU2Langd -lU2Designerd - } - CONFIG(release, debug|release) { - DESTDIR=../../_release/plugins - } +useWebKit() { + QT += webkit +} else { + QT += webengine +} + +LIBS += -L../../$$out_dir() +LIBS += -lU2Core$$D -lU2Algorithm$$D -lU2Formats$$D -lU2Gui$$D -lU2View$$D -lU2Test$$D -lU2Lang$$D -lU2Designer$$D +DESTDIR=../../$$out_dir()/plugins +PLUGIN_ID=$$join(PLUGIN_ID, "", "", $$D) + +!debug_and_release|build_pass { # Plugin output dir must exist before *.plugin/*.license files generation mkpath($$OUT_PWD) - include (./ugene_plugin_descriptor.pri) } @@ -32,10 +32,10 @@ win32 { } unix { - target.path = $$UGENE_INSTALL_DIR/$$UGENE_RELATIVE_DESTDIR + target.path = $$UGENE_INSTALL_DIR/plugins INSTALLS += target } macx { - QMAKE_RPATHDIR += @executable_path/$${UGENE_RELATIVE_DESTDIR}/ + QMAKE_RPATHDIR += @executable_path/plugins/ } diff --git a/src/ugene_plugin_descriptor.pri b/src/ugene_plugin_descriptor.pri index fd9be66a1cfb45081ff79e3b30671ebeb26ac0e1..4bc92f9bdefc250a61190601e958f1444f0d0d12 100644 --- a/src/ugene_plugin_descriptor.pri +++ b/src/ugene_plugin_descriptor.pri @@ -73,15 +73,7 @@ isEmpty(PLUGIN_MODE) { # Now generate the descriptor - -!debug_and_release|build_pass { - CONFIG(debug, debug|release) { - PLUGIN_DESC_FILE=$$OUT_PWD/../../_debug/plugins/$${PLUGIN_ID}.plugin - } - CONFIG(release, debug|release) { - PLUGIN_DESC_FILE=$$OUT_PWD/../../_release/plugins/$${PLUGIN_ID}.plugin - } -} +PLUGIN_DESC_FILE=$$OUT_PWD/../../$$out_dir()/plugins/$${PLUGIN_ID}.plugin defineTest(write){ val = $$1 @@ -126,14 +118,5 @@ write("</ugene-plugin>", >>) PLUGIN_LICENSE_FILE=$$_PRO_FILE_PWD_/*.license PLUGIN_LICENSE_FILE_REP=$$replace(PLUGIN_LICENSE_FILE, "/","\\") -!debug_and_release|build_pass { - CONFIG(debug, debug|release) { - unix: system (cat $$PLUGIN_LICENSE_FILE > $$OUT_PWD/../../_debug/plugins/$${PLUGIN_ID}.license) - win32: system (copy /B $$PLUGIN_LICENSE_FILE_REP $$system_path($$OUT_PWD)\\..\\..\\_debug\\plugins\\$${PLUGIN_ID}.license) - } - CONFIG(release, debug|release) { - unix: system (cat $$PLUGIN_LICENSE_FILE > $$OUT_PWD/../../_release/plugins/$${PLUGIN_ID}.license) - win32: system (copy /B $$PLUGIN_LICENSE_FILE_REP $$system_path($$OUT_PWD)\\..\\..\\_release\\plugins\\$${PLUGIN_ID}.license) - } -} - +unix: system (cat $$PLUGIN_LICENSE_FILE > $$OUT_PWD/../../$$out_dir()/plugins/$${PLUGIN_ID}.license) +win32: system (copy /B $$PLUGIN_LICENSE_FILE_REP $$system_path($$OUT_PWD)\\..\\..\\$$out_dir()\\plugins\\$${PLUGIN_ID}.license) diff --git a/src/ugene_version.pri b/src/ugene_version.pri index 68fa102f4154055d1496d2be6223802a99112181..0cbb6acbc9ad823e44528a881784d52c06fb844a 100644 --- a/src/ugene_version.pri +++ b/src/ugene_version.pri @@ -1,8 +1,5 @@ # This file contains UGENE version info -# product version -UGENE_VERSION=1.31.1 - # minimum UGENE version whose SQLite databases are compatible with this version UGENE_MIN_VERSION_SQLITE=1.25.0 @@ -15,6 +12,8 @@ U2_DISTRIBUTION_INFO=sources } # int version levels for executables -UGENE_VER_MAJOR=1 -UGENE_VER_MINOR=31 -UGENE_VER_PATCH=1 +UGENE_VER_MAJOR=33 +UGENE_VER_MINOR=0 + +# product version +UGENE_VERSION=$${UGENE_VER_MAJOR}.$${UGENE_VER_MINOR} diff --git a/src/ugenecl/src/DumpHelpTask.cpp b/src/ugenecl/src/DumpHelpTask.cpp index 7f82dae4cbcd651467ce3149d77324851a2feaa7..ef8ca8e4f89dc5abff21c81d18c5c31b145a8101 100644 --- a/src/ugenecl/src/DumpHelpTask.cpp +++ b/src/ugenecl/src/DumpHelpTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugenecl/src/DumpHelpTask.h b/src/ugenecl/src/DumpHelpTask.h index 8048cb83e0f5612f8c78eb4b60f8aa4cab14e527..470857143aea25d85871b789d3f52a11f93cc7bf 100644 --- a/src/ugenecl/src/DumpHelpTask.h +++ b/src/ugenecl/src/DumpHelpTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugenecl/src/DumpLicenseTask.cpp b/src/ugenecl/src/DumpLicenseTask.cpp index 7af841124d08f1bcb00191b2332cfab476347a40..8ed79e90f3c4e1f6656396853e89a46cc5c21396 100644 --- a/src/ugenecl/src/DumpLicenseTask.cpp +++ b/src/ugenecl/src/DumpLicenseTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugenecl/src/DumpLicenseTask.h b/src/ugenecl/src/DumpLicenseTask.h index 50af8e01062acb4b6e988521b83c5d7ed6e3a86d..33614721bf4d5c9f8adf6f2712f76e329db26ecf 100644 --- a/src/ugenecl/src/DumpLicenseTask.h +++ b/src/ugenecl/src/DumpLicenseTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugenecl/src/DumpVersionTask.cpp b/src/ugenecl/src/DumpVersionTask.cpp index 483f4a2fcd91415330a46db1061e2f9f2092e4c9..3b882df252781617fd452e4085345b5ab24aeb7f 100644 --- a/src/ugenecl/src/DumpVersionTask.cpp +++ b/src/ugenecl/src/DumpVersionTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugenecl/src/DumpVersionTask.h b/src/ugenecl/src/DumpVersionTask.h index 8fa7c187081fdeb05124dee7b77725bd39b8a414..946d38d8b2512d6039dc46554709159fa2bbb96c 100644 --- a/src/ugenecl/src/DumpVersionTask.h +++ b/src/ugenecl/src/DumpVersionTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugenecl/src/ForeverTask.cpp b/src/ugenecl/src/ForeverTask.cpp index 756a0b248f6b3d86fba9a9f7ab55bd79bb64c9e0..e0cfd567e0d1a30e3a72955615b18a93e56d2ead 100644 --- a/src/ugenecl/src/ForeverTask.cpp +++ b/src/ugenecl/src/ForeverTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugenecl/src/ForeverTask.h b/src/ugenecl/src/ForeverTask.h index cc46e66b56312724d4689f77722b9aed12b9fe2f..22882d0602cf85fced79016371806bb5e16d4ae8 100644 --- a/src/ugenecl/src/ForeverTask.h +++ b/src/ugenecl/src/ForeverTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugenecl/src/Main.cpp b/src/ugenecl/src/Main.cpp index 8d69705946d9199377a528716357553cd84cb384..993fdb573214343efcc5220fb5237194628dde68 100644 --- a/src/ugenecl/src/Main.cpp +++ b/src/ugenecl/src/Main.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -71,6 +71,8 @@ #include <U2Core/Version.h> #include <U2Core/VirtualFileSystem.h> +#include <U2Designer/DashboardInfoRegistry.h> + #include <U2Formats/ConvertFileTask.h> #include <U2Formats/DocumentFormatUtils.h> @@ -285,7 +287,6 @@ int main(int argc, char **argv) ConsoleLogDriver logs; Q_UNUSED(logs); coreLog.details(AppContextImpl::tr("UGENE initialization started")); - GCOUNTER( cvar, tvar, "ugenecl" ); ResourceTracker* resTrack = new ResourceTracker(); appContext->setResourceTracker(resTrack); @@ -392,6 +393,9 @@ int main(int argc, char **argv) VirtualFileSystemRegistry * vfsReg = new VirtualFileSystemRegistry(); appContext->setVirtualFileSystemRegistry( vfsReg ); + DashboardInfoRegistry *dashboardInfoRegistry = new DashboardInfoRegistry; + appContext->setDashboardInfoRegistry(dashboardInfoRegistry); + Workflow::WorkflowEnv::init(new Workflow::WorkflowEnvImpl()); Workflow::WorkflowEnv::getDomainRegistry()->registerEntry(new LocalWorkflow::LocalDomainFactory()); @@ -498,6 +502,9 @@ int main(int argc, char **argv) appContext->setDataPathRegistry(NULL); delete dpr; + appContext->setDashboardInfoRegistry(nullptr); + delete dashboardInfoRegistry; + appContext->setVirtualFileSystemRegistry( NULL ); delete vfsReg; diff --git a/src/ugenecl/src/TaskStatusBar.cpp b/src/ugenecl/src/TaskStatusBar.cpp index 40a987ca06af885206399314129be88537bc07f7..90e1cdd177f35419e37cec914a0583b912b58af9 100644 --- a/src/ugenecl/src/TaskStatusBar.cpp +++ b/src/ugenecl/src/TaskStatusBar.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugenecl/src/TaskStatusBar.h b/src/ugenecl/src/TaskStatusBar.h index 68072ced538a5add9a73b3096416ef9425e9bd36..6af90778db5b6fd48368320fea3b467bb2dfff89 100644 --- a/src/ugenecl/src/TaskStatusBar.h +++ b/src/ugenecl/src/TaskStatusBar.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugenecl/src/TestStarter.cpp b/src/ugenecl/src/TestStarter.cpp index e5ecd6d0f1beef225d7ecf623599b0674233d718..c24ab037239ca0307dcc84407c1c517b3edbbf64 100644 --- a/src/ugenecl/src/TestStarter.cpp +++ b/src/ugenecl/src/TestStarter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugenecl/src/TestStarter.h b/src/ugenecl/src/TestStarter.h index 7e3156bf46d7734e6cc0dd77901722d5916abbf3..24792d68d3f1fff94cd751887cd37f14f27b1102 100644 --- a/src/ugenecl/src/TestStarter.h +++ b/src/ugenecl/src/TestStarter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugenecl/ugenecl.pri b/src/ugenecl/ugenecl.pri index f825010b6d0d7090bceec993847e456d49cf97ba..2b284c40990a61a3e5246ba435e516ca10977508 100644 --- a/src/ugenecl/ugenecl.pri +++ b/src/ugenecl/ugenecl.pri @@ -6,37 +6,33 @@ use_opencl(){ DEFINES += OPENCL_SUPPORT } -UGENE_RELATIVE_DESTDIR = '' - -QT += xml network script webkit widgets +QT += xml network script widgets TEMPLATE = app CONFIG +=qt dll thread debug_and_release console +macx : CONFIG -= app_bundle DEFINES+= QT_DLL QT_FATAL_ASSERT INCLUDEPATH += src _tmp ../include ../corelibs/U2Private/src -LIBS += -L../_release -lU2Core -lU2Algorithm -lU2Formats -lU2Gui -lU2Test -lU2Lang -lU2Private -lugenedb -lbreakpad -lQSpec -if(exclude_list_enabled()|!exists( ../libs_3rdparty/QSpec/QSpec.pro )) { - LIBS -= -lQSpec +LIBS += -L../$$out_dir() +LIBS += -lU2Core$$D -lU2Algorithm$$D -lU2Designer$$D -lU2Formats$$D -lU2Gui$$D -lU2Test$$D -lU2Lang$$D -lU2Private$$D -lbreakpad$$D -lQSpec$$D +LIBS += $$add_sqlite_lib() + +if (contains(DEFINES, HI_EXCLUDED)) { + LIBS -= -lQSpec$$D } + +DESTDIR = ../$$out_dir() +TARGET = ugenecl$$D + !debug_and_release|build_pass { CONFIG(debug, debug|release) { - TARGET = ugenecld DEFINES+=_DEBUG - DESTDIR=../_debug MOC_DIR=_tmp/moc/debug OBJECTS_DIR=_tmp/obj/debug - LIBS -= -L../_release -lU2Core -lU2Algorithm -lU2Formats -lU2Gui -lU2Test -lU2Lang -lU2Private -lugenedb -lbreakpad -lQSpec - LIBS += -L../_debug -lU2Cored -lU2Algorithmd -lU2Formatsd -lU2Guid -lU2Testd -lU2Langd -lU2Privated -lugenedbd -lbreakpadd -lQSpecd - if(exclude_list_enabled()|!exists( ../libs_3rdparty/QSpec/QSpec.pro )) { - LIBS -= -lQSpecd - } - } CONFIG(release, debug|release) { - TARGET = ugenecl - DESTDIR=../_release DEFINES+=NDEBUG MOC_DIR=_tmp/moc/release OBJECTS_DIR=_tmp/obj/release @@ -61,6 +57,6 @@ macx { } unix { - target.path = $$UGENE_INSTALL_DIR/$$UGENE_RELATIVE_DESTDIR + target.path = $$UGENE_INSTALL_DIR/ INSTALLS += target } diff --git a/src/ugenecl/ugenecl.rc b/src/ugenecl/ugenecl.rc index 14ac34579b487e814656fdaf52eface55e3c2fbe..17a1438a5a879b44894739561397daa23efc9a29 100644 --- a/src/ugenecl/ugenecl.rc +++ b/src/ugenecl/ugenecl.rc @@ -15,8 +15,8 @@ IDI_ICON2 ICON DISCARDABLE "images/ext.ico" #endif VS_VERSION_INFO VERSIONINFO -FILEVERSION UGENE_VER_MAJOR,UGENE_VER_MINOR,UGENE_VER_PATCH,0 -PRODUCTVERSION UGENE_VER_MAJOR,UGENE_VER_MINOR,UGENE_VER_PATCH +FILEVERSION UGENE_VER_MAJOR,UGENE_VER_MINOR,0 +PRODUCTVERSION UGENE_VER_MAJOR,UGENE_VER_MINOR FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS (VER_DEBUG) FILETYPE VFT_APP @@ -27,7 +27,7 @@ BEGIN BEGIN VALUE "CompanyName", "Unipro, Russia" VALUE "FileDescription", "Command line interface of UGENE" - VALUE "FileVersion", TOSTRING(UGENE_VER_MAJOR.UGENE_VER_MINOR.UGENE_VER_PATCH.0) + VALUE "FileVersion", TOSTRING(UGENE_VER_MAJOR.UGENE_VER_MINOR.0) VALUE "OriginalFilename", "ugenecl" VALUE "ProductName", "Unipro UGENE" VALUE "ProductVersion", UGENE_VERSION_STRING diff --git a/src/ugenem/src/DetectWin10.cpp b/src/ugenem/src/DetectWin10.cpp index e2bbddd22b26e565157d91b1cce73e636f74467f..2e9d531ed34fce51d72be651d01baa1f102f3706 100644 --- a/src/ugenem/src/DetectWin10.cpp +++ b/src/ugenem/src/DetectWin10.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugenem/src/DetectWin10.h b/src/ugenem/src/DetectWin10.h index 19c05c4276638e00b5a94a098e1df7b81ccc843d..82d177f53bc14d3c18ce0c276d6eca0c8658cc56 100644 --- a/src/ugenem/src/DetectWin10.h +++ b/src/ugenem/src/DetectWin10.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugenem/src/SendReportDialog.cpp b/src/ugenem/src/SendReportDialog.cpp index 5fce2d11680835fd3d722ae53612a82ecc670c9f..fdfb4784107786fb50380b3cb5563545bbe52698 100644 --- a/src/ugenem/src/SendReportDialog.cpp +++ b/src/ugenem/src/SendReportDialog.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. -* Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> +* Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugenem/src/SendReportDialog.h b/src/ugenem/src/SendReportDialog.h index c7d1ef2d1cb7f810509e02192625d327de94d324..7bfc95e44c34dcfaa90b2f21133889f0b91d51be 100644 --- a/src/ugenem/src/SendReportDialog.h +++ b/src/ugenem/src/SendReportDialog.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugenem/src/Utils.cpp b/src/ugenem/src/Utils.cpp index 52469a5ad1c5337c1a4a5c93987a6a89e6caa707..66a1e4bb6a66ecc717d221be753c94689367e46d 100644 --- a/src/ugenem/src/Utils.cpp +++ b/src/ugenem/src/Utils.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugenem/src/Utils.h b/src/ugenem/src/Utils.h index 0bc8f0bced6e595023874e15e9573a23f564742e..dd3bcc5d401cade6f69c25cae5721c06d5fcfd70 100644 --- a/src/ugenem/src/Utils.h +++ b/src/ugenem/src/Utils.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugenem/src/main.cpp b/src/ugenem/src/main.cpp index a0b8ec707d4ee6b4274b6642cb831f60c700e1b6..747e98161395b43e8dc665c0da4dedec559bd2d1 100644 --- a/src/ugenem/src/main.cpp +++ b/src/ugenem/src/main.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugenem/ugenem.pro b/src/ugenem/ugenem.pro index a8a880c8e2aec241a303105b427283f7e45065d6..efc36da3b94618293a6a1ef41998f6c5aa67faaa 100644 --- a/src/ugenem/ugenem.pro +++ b/src/ugenem/ugenem.pro @@ -1,28 +1,26 @@ include(../ugene_globals.pri) -UGENE_RELATIVE_DESTDIR = '' -QT += xml network webkit -equals(QT_MAJOR_VERSION, 5): QT -= webkit -equals(QT_MAJOR_VERSION, 5): QT += widgets webkitwidgets +QT += xml network widgets TEMPLATE = app CONFIG += qt thread debug_and_release +macx : CONFIG -= app_bundle DEFINES+= QT_DLL QT_FATAL_ASSERT INCLUDEPATH += src _tmp +DESTDIR = ../$$out_dir() + !debug_and_release|build_pass { CONFIG(debug, debug|release) { TARGET = ugenem DEFINES+=_DEBUG CONFIG +=console - DESTDIR=../_debug MOC_DIR=_tmp/moc/debug OBJECTS_DIR=_tmp/obj/debug } CONFIG(release, debug|release) { TARGET = ugenem - DESTDIR=../_release DEFINES+=NDEBUG MOC_DIR=_tmp/moc/release OBJECTS_DIR=_tmp/obj/release @@ -43,7 +41,7 @@ win32 { } unix { - target.path = $$UGENE_INSTALL_DIR/$$UGENE_RELATIVE_DESTDIR + target.path = $$UGENE_INSTALL_DIR/ INSTALLS += target } diff --git a/src/ugenem/ugenem.rc b/src/ugenem/ugenem.rc index 6e3e9aa0c43375231f0ddc39283656bf8d9e606c..11897f9dfe2538a02ee8b99f69d6f5e9949f3701 100644 --- a/src/ugenem/ugenem.rc +++ b/src/ugenem/ugenem.rc @@ -12,8 +12,8 @@ #endif VS_VERSION_INFO VERSIONINFO -FILEVERSION UGENE_VER_MAJOR,UGENE_VER_MINOR,UGENE_VER_PATCH,0 -PRODUCTVERSION UGENE_VER_MAJOR,UGENE_VER_MINOR,UGENE_VER_PATCH +FILEVERSION UGENE_VER_MAJOR,UGENE_VER_MINOR,0 +PRODUCTVERSION UGENE_VER_MAJOR,UGENE_VER_MINOR FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS (VER_DEBUG) FILETYPE VFT_APP @@ -24,7 +24,7 @@ BEGIN BEGIN VALUE "CompanyName", "Unipro, Russia" VALUE "FileDescription", "Post-mortem reporter of UGENE" - VALUE "FileVersion", TOSTRING(UGENE_VER_MAJOR.UGENE_VER_MINOR.UGENE_VER_PATCH.0) + VALUE "FileVersion", TOSTRING(UGENE_VER_MAJOR.UGENE_VER_MINOR.0) VALUE "OriginalFilename", "ugenem" VALUE "ProductName", "Unipro UGENE" VALUE "ProductVersion", UGENE_VERSION_STRING diff --git a/src/ugeneui/html/version_news.html b/src/ugeneui/html/version_news.html index 9e2df6f945014f284040e5f9e10b5dd3381a4ed0..24199f8037befffa8218d67095b174e9c1643801 100644 --- a/src/ugeneui/html/version_news.html +++ b/src/ugeneui/html/version_news.html @@ -1,8 +1,7 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- UGENE - Integrated Bioinformatics Tools. - Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> - http://ugene.unipro.ru + Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + http://ugene.net This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -19,10 +18,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --> +<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="qrc:///javascript/bootstrap/css/bootstrap.min.css"/> + <script type="text/javascript" src="qrc:///core/javascript/WebPageInitialize.js"></script> <style> * { margin-left: 7px; @@ -43,7 +44,6 @@ margin-bottom: 30px; list-style-type: square; list-style-position: inside; - } .sub_features_list li { margin-top: 4px; @@ -68,27 +68,55 @@ margin: 0px; } </style> + <script> + function getBodyHeight() { + return document.documentElement.scrollHeight; + } + + function bindLinks() { + var elements = document.getElementsByTagName('A'); + for (var i = 0; i< elements.length; i++) { + elements[i].onclick = openUrl; + } + } + + function openUrl() { + confirm(this.href); + return false; + } + </script> </head> <body> <div> - <h4 lang="en">Changes in UGENE 1.31</h4> - <div class="features_descr_text" lang="en"> - The new version introduces a lot of major features for <u>NGS data analysis</u>: - metagenomics data classification, transcriptomics, de novo assembly, etc. + <h4 lang="en" class="translatable">Changes in UGENE v. 33</h4> + <div class="features_descr_text translatable" lang="en"> + The new version introduces a bunch of improvements for adding a custom tool + into UGENE: tighter integration of your tool with UGENE, + enhanced wizard for creating a workflow element for the tool, etc. See details on + the <a href="http://ugene.net/changelist.html">UGENE web site</a>. </div> - <div class="features_descr_text" lang="en"> - See details on the <a href="http://ugene.net/changelist.html">UGENE web site</a>. + <div class="features_descr_text translatable" lang="en"> + If you work with multiple sequence alignments, check out a new color scheme + "Percentage Identity (colored)". </div> - - <h4 lang="ru">Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð² UGENE 1.31</h4> - <div class="features_descr_text" lang="ru"> - Ð’ новой верÑии значительно раÑширена инфраÑтруктура Ð´Ð»Ñ <u>анализа данных - выÑокопроизводительного ÑÐµÐºÐ²ÐµÐ½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ (NGS)</u> в таких облаÑÑ‚ÑÑ…, как - такÑономичеÑÐºÐ°Ñ ÐºÐ»Ð°ÑÑÐ¸Ñ„Ð¸ÐºÐ°Ñ†Ð¸Ñ Ð¼ÐµÑ‚Ð°Ð³ÐµÐ½Ð¾Ð¼Ð½Ñ‹Ñ… данных, транÑкриптомика, de novo Ñборка и др. + <div class="features_descr_text translatable" lang="en"> + And if you do NGS data analysis, watch our <a href="https://www.youtube.com/watch?v=FORI6rDqT00">new video</a> about quality control of the data. </div> - <div class="features_descr_text" lang="ru"> + + <h4 lang="ru" class="translatable">Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð² UGENE верÑии 33</h4> + <div class="features_descr_text translatable" lang="ru"> + ÐÐ¾Ð²Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ Ñодержит различные ÑƒÐ»ÑƒÑ‡ÑˆÐµÐ½Ð¸Ñ Ð¿Ð¾ добавлению новых инÑтрументов в UGENE: + обновлен диалог-помощник Ð´Ð»Ñ ÐºÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ð¸ запуÑка инÑтрумента, поддержана более теÑÐ½Ð°Ñ + Ð¸Ð½Ñ‚ÐµÐ³Ñ€Ð°Ñ†Ð¸Ñ Ð²Ñтраиваемого инÑтрумента Ñ Ð³Ñ€Ð°Ñ„Ð¸Ñ‡ÐµÑким интерфейÑом UGENE. ПодробноÑти Ñм. на <a href="http://ugene.net/ru/changelist.html">Ñайте UGENE</a>. </div> - + <div class="features_descr_text translatable" lang="ru"> + Помимо Ñтого, в верÑии 33 поÑвилаÑÑŒ Ñ†Ð²ÐµÑ‚Ð¾Ð²Ð°Ñ Ð¿Ð¾Ð´Ñветка "Percentage Identity (colored)" Ð´Ð»Ñ Ð¼Ð½Ð¾Ð¶ÐµÑтвенных выравниваний. + </div> + <div class="features_descr_text translatable" lang="ru"> + Также, еÑли вы заниметеÑÑŒ анализом данных выÑокопроизводительного ÑеквенированиÑ, обратите внимание + на наш <a href="https://www.youtube.com/watch?v=FORI6rDqT00">новый обучающий видео-туториал</a> по оценке и улучшению качеÑтва данных. + </div> </div> </body> +</html> \ No newline at end of file diff --git a/src/ugeneui/html/welcome_page.css b/src/ugeneui/html/welcome_page.css index d5d6ea37d2ef45304ef1f5ceb872282d7d7cf7c4..834b55130401dedee97764c942e0c7429f47152d 100644 --- a/src/ugeneui/html/welcome_page.css +++ b/src/ugeneui/html/welcome_page.css @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/html/welcome_page.html b/src/ugeneui/html/welcome_page.html index afea85a974cc4ecec0f752d984f3d505f1c63bf9..d4ac5c190593be49d99fc321b7c66e6a520f6b78 100644 --- a/src/ugeneui/html/welcome_page.html +++ b/src/ugeneui/html/welcome_page.html @@ -1,6 +1,6 @@ <!-- UGENE - Integrated Bioinformatics Tools. - Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> http://ugene.net This program is free software; you can redistribute it and/or @@ -18,6 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --> + <!DOCTYPE html> <html> <head> @@ -27,14 +28,16 @@ <link rel="stylesheet" type="text/css" href="qrc:///ugene/html/welcome_page.css"> <script type="text/javascript" src="qrc:///javascript/jquery/jquery.js"></script> <script type="text/javascript" src="qrc:///javascript/bootstrap/js/bootstrap.js"></script> + <script type="text/javascript" src="qrc:///core/javascript/WebPageInitialize.js"></script> + <script type="text/javascript" src="qrc:///ugene/javascript/WelcomePage.js"></script> </head> <body> <table class="main_table"> <tr> <td class="header_block" colspan="2"> <div class="welcome_header"> - <span lang="en">Welcome to UGENE</span> - <span lang="ru">Добро пожаловать в UGENE</span> + <span lang="en" class="translatable">Welcome to UGENE</span> + <span lang="ru" class="translatable">Добро пожаловать в UGENE</span> </div> </td> </tr> @@ -49,8 +52,8 @@ <img align="middle" src="qrc:///ugene/images/welcome_page/welcome_btn_open.png" /> </div> <div class="button_caption"> - <span lang="en">Open File(s)</span> - <span lang="ru">Открыть файл(Ñ‹)</span> + <span lang="en" class="translatable">Open File(s)</span> + <span lang="ru" class="translatable">Открыть файл(Ñ‹)</span> </div> </a> </div> @@ -62,8 +65,8 @@ <img src="qrc:///ugene/images/welcome_page/welcome_btn_create_seq.png" /> </div> <div class="button_caption"> - <span lang="en">Create Sequence</span> - <span lang="ru">Создать поÑледовательноÑÑ‚ÑŒ</span> + <span lang="en" class="translatable">Create Sequence</span> + <span lang="ru" class="translatable">Создать поÑледовательноÑÑ‚ÑŒ</span> </div> </a> </div> @@ -77,8 +80,8 @@ <img src="qrc:///ugene/images/welcome_page/welcome_btn_workflow.png" /> </div> <div class="button_caption"> - <span lang="en">Run or Create Workflow</span> - <span lang="ru">ЗапуÑтить или Ñоздать Ñхему</span> + <span lang="en" class="translatable">Run or Create Workflow</span> + <span lang="ru" class="translatable">ЗапуÑтить или Ñоздать Ñхему</span> </div> </a> </div> @@ -90,8 +93,8 @@ <img src="qrc:///ugene/images/welcome_page/welcome_btn_help.png" /> </div> <div class="button_caption"> - <span lang="en">Quick Start Guide</span> - <span lang="ru">Краткое руководÑтво</span> + <span lang="en" class="translatable">Quick Start Guide</span> + <span lang="ru" class="translatable">Краткое руководÑтво</span> </div> </a> </div> @@ -104,16 +107,16 @@ <div class="recent_items_wrapper"> <div id="recentFilesBlock" class="half_height"> <div class="recent_items_header"> - <span lang="en">Recent files</span> - <span lang="ru">Ðедавние файлы</span> + <span lang="en" class="translatable">Recent files</span> + <span lang="ru" class="translatable">Ðедавние файлы</span> </div> <div id="recent_files" class="recent_items_content"> </div> </div> <div id="recentProjectsBlock" class="half_height"> <div class="recent_items_header"> - <span lang="en">Recent projects</span> - <span lang="ru">Ðедавние проекты</span> + <span lang="en" class="translatable">Recent projects</span> + <span lang="ru" class="translatable">Ðедавние проекты</span> </div> <div id="recent_projects" class="recent_items_content"> </div> @@ -132,8 +135,8 @@ <tr> <td class="cite_ugene_block"> <div class="footer_header"> - <span lang="en">Cite UGENE:</span> - <span lang="ru">Чтобы процитировать UGENE, иÑпользуйте публикацию:</span> + <span lang="en" class="translatable">Cite UGENE:</span> + <span lang="ru" class="translatable">Чтобы процитировать UGENE, иÑпользуйте публикацию:</span> </div> <div class="footer_content"> "Unipro UGENE: a unified bioinformatics toolkit"<br/> @@ -143,8 +146,8 @@ </td> <td class="follow_ugene_block"> <div class="footer_header"> - <span lang="en">Follow UGENE:</span> - <span lang="ru">UGENE в Ñоциальных ÑетÑÑ…:</span> + <span lang="en" class="translatable">Follow UGENE:</span> + <span lang="ru" class="translatable">UGENE в Ñоциальных ÑетÑÑ…:</span> </div> <div class="footer_content"> <div class="social_icon"> @@ -156,18 +159,11 @@ <div class="social_icon"> <a href="#" onclick="ugene.openUrl('linkedin')"><img src="qrc:///ugene/images/welcome_page/social_icon_linkedin.png" /></a> </div> - <div class="social_icon"> - <a href="#" onclick="ugene.openUrl('google_plus')"><img src="qrc:///ugene/images/welcome_page/social_icon_google_plus.png" /></a> - </div> <div class="social_icon"> <a href="#" onclick="ugene.openUrl('youtube')"><img src="qrc:///ugene/images/welcome_page/social_icon_youtube.png" /></a> </div> <div class="social_icon"> <a href="#" onclick="ugene.openUrl('vkontakte')"><img src="qrc:///ugene/images/welcome_page/social_icon_vkontakte.png" /></a> - </div> - <div class="social_icon"> - <a href="#" onclick="ugene.openUrl('mendeley')"><img src="qrc:///ugene/images/welcome_page/social_icon_mendeley.png" /></a> - </div> <div class="social_icon"> <a href="#" onclick="ugene.openUrl('rss')"><img src="qrc:///ugene/images/welcome_page/social_icon_rss.png" /></a> </div> @@ -184,6 +180,7 @@ var pRect = p.getBoundingClientRect(); return elRect.bottom <= pRect.bottom; } + function updateVisibility(containerId) { var container = document.getElementById(containerId) var children = document.querySelectorAll("#" + containerId + " .recentLink"); @@ -198,10 +195,12 @@ } } } + function updateLinksVisibility() { updateVisibility("recentFilesBlock") updateVisibility("recentProjectsBlock") } + $(window).resize(function() { updateLinksVisibility() }); diff --git a/src/ugeneui/images/welcome_page/social_icon_google_plus.png b/src/ugeneui/images/welcome_page/social_icon_google_plus.png deleted file mode 100644 index 762c00fed9f2d158abfc196443f2ac0dd7940849..0000000000000000000000000000000000000000 Binary files a/src/ugeneui/images/welcome_page/social_icon_google_plus.png and /dev/null differ diff --git a/src/ugeneui/images/welcome_page/social_icon_mendeley.png b/src/ugeneui/images/welcome_page/social_icon_mendeley.png deleted file mode 100644 index 27244b2f2a41c7e403c278a92248b54c90fd5202..0000000000000000000000000000000000000000 Binary files a/src/ugeneui/images/welcome_page/social_icon_mendeley.png and /dev/null differ diff --git a/src/ugeneui/javascript/WelcomePage.js b/src/ugeneui/javascript/WelcomePage.js new file mode 100644 index 0000000000000000000000000000000000000000..45e8dac02823eb3a11eef0522a0d0015f6a1a63d --- /dev/null +++ b/src/ugeneui/javascript/WelcomePage.js @@ -0,0 +1,65 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +function addRecentItem(containerId, item, link) { + var container = document.getElementById(containerId); + var stringToAdd; + if(link === "") { + stringToAdd = item; + } else { + stringToAdd = "<a class=\"recentLink\" href=\"#\" onclick=\"ugene.openFile('" + item + + "')\" title=\"" + item + "\">- " + link + "</a>"; + } + container.insertAdjacentHTML('beforeend', stringToAdd); + updateLinksVisibility(); +} + +function clearRecent(containerId) { + var container = document.getElementById(containerId); + container.innerHTML = ''; + updateLinksVisibility(); +} + +function isVisible(el, p) { + var elRect = el.getBoundingClientRect(); + var pRect = p.getBoundingClientRect(); + return elRect.bottom <= pRect.bottom; +} + +function updateVisibility(containerId) { + var container = document.getElementById(containerId) + var children = document.querySelectorAll("#" + containerId + " .recentLink"); + for (var i=children.length-1; i>=0; i--) { + var child = children[i] + if (child.className === "recentLink") { + if (isVisible(child, container)) { + child.style.color = "" + } else { + child.style.color = "transparent" + } + } + } +} + +function updateLinksVisibility() { + updateVisibility("recentFilesBlock") + updateVisibility("recentProjectsBlock") +} diff --git a/src/ugeneui/src/Main.cpp b/src/ugeneui/src/Main.cpp index 720746057a2615aedeb739cc4f9b544d562db5ce..18521db75c975fe4e7d84792804e1450a296a165 100644 --- a/src/ugeneui/src/Main.cpp +++ b/src/ugeneui/src/Main.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,6 +19,17 @@ * MA 02110-1301, USA. */ +#include <qglobal.h> + +#ifdef Q_OS_WIN +#include <windows.h> +#include <tchar.h> +#endif // Q_OS_WIN + +#ifdef Q_OS_MAC +#include "app_settings/ResetSettingsMac.h" +#endif + #include <QApplication> #include <QDesktopWidget> #include <QIcon> @@ -81,6 +92,8 @@ #include <U2Core/UserApplicationsSettings.h> #include <U2Core/VirtualFileSystem.h> +#include <U2Designer/DashboardInfoRegistry.h> + #include <U2Formats/ConvertFileTask.h> #include <U2Formats/DocumentFormatUtils.h> @@ -150,10 +163,34 @@ #include "shtirlitz/Shtirlitz.h" #include "task_view/TaskViewController.h" #include "update/UgeneUpdater.h" -#include "welcome_page/WelcomePageController.h" +#include "welcome_page/WelcomePageMdiController.h" using namespace U2; +#ifdef Q_OS_WIN +typedef BOOL(WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL); + +LPFN_ISWOW64PROCESS fnIsWow64Process; + +BOOL IsWow64() { + BOOL bIsWow64 = FALSE; + + //IsWow64Process is not available on all supported versions of Windows. + //Use GetModuleHandle to get a handle to the DLL that contains the function + //and GetProcAddress to get a pointer to the function if available. + + fnIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress( + GetModuleHandle(TEXT("kernel32")), "IsWow64Process"); + + if (NULL != fnIsWow64Process) { + if (!fnIsWow64Process(GetCurrentProcess(), &bIsWow64)) { + //handle error + } + } + return bIsWow64; +} +#endif // Q_OS_WIN + static void registerCoreServices() { ServiceRegistry* sr = AppContext::getServiceRegistry(); TaskScheduler* ts = AppContext::getTaskScheduler(); @@ -214,7 +251,18 @@ static void initLogsCache(LogCacheExt& logsCache, const QStringList& ) { } LogSettings ls; ls.reinitAll(); - if(ls.toFile){ + +#ifdef UGENE_FORCE_WRITE_LOG_TO_FILE + // It should be defined during the UGENE building. + // It is to force log writing for user's personal packages to avoid explaining how to write the log to file + // Add to DEFINES when you execute qmake for the project + ls.toFile = true; + const QString logsDir = AppContext::getAppSettings()->getUserAppsSettings()->getDefaultDataDirPath() + "/logs"; + QDir().mkpath(logsDir); + ls.outputFile = logsDir + "/ugene_log_" + QDateTime::currentDateTime().toString("yyyy.MM.dd_hh-mm") + ".txt"; +#endif + + if (ls.toFile) { logsCache.setFileOutputEnabled(ls.outputFile); } } @@ -466,8 +514,46 @@ int main(int argc, char **argv) LogCache::setAppGlobalInstance(&logsCache); app.installEventFilter(new UserActionsWriter()); coreLog.details(UserAppsSettings::tr("UGENE initialization started")); - GCOUNTER( cvar, tvar, "ugeneui" ); + + GReportableCounter ugeneArchCounter("UGENE architecture", "", 1); + ++ugeneArchCounter.totalCount; +#if defined UGENE_X86_64 + ugeneArchCounter.suffix = "Ugene 64-bit"; +#elif defined UGENE_X86 + ugeneArchCounter.suffix = "Ugene 32-bit"; +#else + ugeneArchCounter.suffix = "Undetected architecture"; +#endif + GReportableCounter sysArchCounter("OS architecture", "", 1); + ++sysArchCounter.totalCount; +#if defined Q_OS_WIN + if (ugeneArchCounter.suffix == "Ugene 64-bit") { + sysArchCounter.suffix = "Windows 64-bit"; + } else { + if (IsWow64()) { + sysArchCounter.suffix = "Windows 64-bit"; + } else { + sysArchCounter.suffix = "Windows 32-bit"; + } + } +#elif defined Q_OS_MAC + sysArchCounter.suffix = "MacOS 64-bit"; +#elif defined Q_OS_LINUX + if(QSysInfo::currentCpuArchitecture().contains("64")) { + sysArchCounter.suffix = "Linux 64-bit"; + } else { + sysArchCounter.suffix = "Linux 32-bit"; + } +#elif defined Q_OS_UNIX + if(QSysInfo::currentCpuArchitecture().contains("64")) { + sysArchCounter.suffix = "Unix 64-bit"; + } else { + sysArchCounter.suffix = "Unix 32-bit"; + } +#else + sysArchCounter.suffix = "Undetected OS"; +#endif coreLog.trace(QString("UGENE run at dir %1 with parameters %2").arg(AppContext::getWorkingDirectoryPath()).arg(app.arguments().join(" "))); //print some settings info, can't do it earlier than logging is initialized @@ -672,6 +758,9 @@ int main(int argc, char **argv) PasteFactory *pasteFactory = new PasteFactoryImpl; appContext->setPasteFactory(pasteFactory); + DashboardInfoRegistry *dashboardInfoRegistry = new DashboardInfoRegistry; + appContext->setDashboardInfoRegistry(dashboardInfoRegistry); + Workflow::WorkflowEnv::init(new Workflow::WorkflowEnvImpl()); Workflow::WorkflowEnv::getDomainRegistry()->registerEntry(new LocalWorkflow::LocalDomainFactory()); @@ -747,7 +836,7 @@ int main(int argc, char **argv) QObject::connect(ts, SIGNAL(si_noTasksInScheduler()), splashScreen, SLOT(sl_close())); QObject::connect(ts, SIGNAL(si_noTasksInScheduler()), mw, SLOT(sl_show())); - WelcomePageController *wpc = new WelcomePageController(); + WelcomePageMdiController *wpc = new WelcomePageMdiController(); QObject::connect(ts, SIGNAL(si_noTasksInScheduler()), wpc, SLOT(sl_showPage())); QObject::connect(mw, SIGNAL(si_showWelcomePage()), wpc, SLOT(sl_showPage())); QObject::connect(pli, SIGNAL(si_recentListChanged()), wpc, SLOT(sl_onRecentChanged())); @@ -778,6 +867,9 @@ int main(int argc, char **argv) delete wpc; + appContext->setDashboardInfoRegistry(nullptr); + delete dashboardInfoRegistry; + appContext->setPasteFactory(NULL); delete pasteFactory; @@ -968,8 +1060,12 @@ int main(int argc, char **argv) delete globalSettings; if (deleteSettingsFile){ +#ifndef Q_OS_MAC QFile ff; ff.remove(iniFile); +#else + ResetSettingsMac::reset(); +#endif // !Q_OS_MAC } UgeneUpdater::onClose(); diff --git a/src/ugeneui/src/app_settings/AppSettingsDialogController.cpp b/src/ugeneui/src/app_settings/AppSettingsDialogController.cpp index a1342ab2d5b7441a4f0e9d6345a42de30e3e3ff8..98238e2faee5d3232d4ad4e7976bdad11faacffd 100644 --- a/src/ugeneui/src/app_settings/AppSettingsDialogController.cpp +++ b/src/ugeneui/src/app_settings/AppSettingsDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -35,7 +35,7 @@ namespace U2 { -AppSettingsDialogController::AppSettingsDialogController(const QString& pageId, QWidget *p):QDialog(p) { +AppSettingsDialogController::AppSettingsDialogController(const QString& pageId, QWidget *p) :QDialog(p) { setupUi(this); currentPage = NULL; @@ -54,10 +54,10 @@ AppSettingsDialogController::AppSettingsDialogController(const QString& pageId, registerPage(page); } - if (tree->topLevelItemCount() > 0) { + if (tree->topLevelItemCount() > 0) { if (!pageId.isEmpty()) { AppSettingsTreeItem* item = findPageItem(pageId); - if (item!=NULL) { + if (item != NULL) { tree->setCurrentItem(item); } } @@ -96,18 +96,18 @@ bool AppSettingsDialogController::turnPage(AppSettingsTreeItem* page) { assert(page == NULL || page->pageWidget == NULL); if (currentPage != NULL) { - assert(currentPage->pageWidget!=NULL); - assert(currentPage->pageState ==NULL); + assert(currentPage->pageWidget != NULL); + assert(currentPage->pageState == NULL); if (!checkCurrentState(true, false)) { return false; } - assert(currentPage->pageState!=NULL); + assert(currentPage->pageState != NULL); settingsBox->setTitle(""); delete currentPage->pageWidget; currentPage->pageWidget = NULL; currentPage = NULL; } - if (page!=NULL) { + if (page != NULL) { assert(currentPage == NULL); settingsBox->setTitle(page->pageController->getPageName()); page->pageState = page->pageState == NULL ? page->pageController->getSavedState() : page->pageState; @@ -118,7 +118,8 @@ bool AppSettingsDialogController::turnPage(AppSettingsTreeItem* page) { page->pageState = NULL; currentPage = page; - helpButton->updatePageId(currentPage->pageController->getHelpPageId()) ; + helpButton->updatePageId(currentPage->pageController->getHelpPageId()); + connect(currentPage->pageWidget, SIGNAL(si_setLockState(bool)), SLOT(sl_setLockState(bool))); } return true; } @@ -129,7 +130,7 @@ void AppSettingsDialogController::registerPage(AppSettingsGUIPageController* pag } AppSettingsTreeItem* AppSettingsDialogController::findPageItem(const QString& id) const { - for(int i=0, n = tree->topLevelItemCount(); i < n; i++) { + for (int i = 0, n = tree->topLevelItemCount(); i < n; i++) { AppSettingsTreeItem* item = static_cast<AppSettingsTreeItem*>(tree->topLevelItem(i)); if (item->pageController->getPageId() == id) { return item; @@ -144,9 +145,9 @@ void AppSettingsDialogController::accept() { } turnPage(NULL);//make current state saved in item - for(int i=0, n = tree->topLevelItemCount(); i < n; i++) { + for (int i = 0, n = tree->topLevelItemCount(); i < n; i++) { AppSettingsTreeItem* item = static_cast<AppSettingsTreeItem*>(tree->topLevelItem(i)); - if (item->pageState!=NULL) { + if (item->pageState != NULL) { item->pageController->saveState(item->pageState); } } @@ -163,6 +164,11 @@ void AppSettingsDialogController::timerEvent(QTimerEvent* te) { tree->setCurrentItem(currentPage); } +void AppSettingsDialogController::sl_setLockState(bool lockState) { + buttonBox->button(QDialogButtonBox::Ok)->setDisabled(lockState); + tree->setDisabled(lockState); +} + void AppSettingsDialogController::sl_currentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem* previous) { Q_UNUSED(previous); AppSettingsTreeItem* page = static_cast<AppSettingsTreeItem*>(current); @@ -177,7 +183,7 @@ void AppSettingsDialogController::sl_currentItemChanged(QTreeWidgetItem* current } AppSettingsTreeItem::AppSettingsTreeItem(AppSettingsGUIPageController* p) :pageController(p), pageState(NULL), pageWidget(NULL) { - setText(0, " " + p->getPageName()); + setText(0, " " + p->getPageName()); } }//namespace diff --git a/src/ugeneui/src/app_settings/AppSettingsDialogController.h b/src/ugeneui/src/app_settings/AppSettingsDialogController.h index cb39c3b66eb445197e4d8254321041be5eb61227..883446de27b6b0dc2b4158f3990f34fe026f1de0 100644 --- a/src/ugeneui/src/app_settings/AppSettingsDialogController.h +++ b/src/ugeneui/src/app_settings/AppSettingsDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -37,7 +37,7 @@ class AppSettingsGUIPageState; class AppSettingsGUIPageWidget; class AppSettingsTreeItem; -class AppSettingsDialogController: public QDialog, public Ui_AppSettingsDialog { +class AppSettingsDialogController : public QDialog, public Ui_AppSettingsDialog { Q_OBJECT public: @@ -46,11 +46,14 @@ public: public slots: virtual void accept(); virtual void reject(); - void sl_currentItemChanged ( QTreeWidgetItem * current, QTreeWidgetItem * previous ); + void sl_currentItemChanged(QTreeWidgetItem * current, QTreeWidgetItem * previous); protected: void timerEvent(QTimerEvent* e); +private slots: + void sl_setLockState(bool); + private: bool checkCurrentState(bool saveStateInItem, bool showError); bool turnPage(AppSettingsTreeItem* page); @@ -58,7 +61,6 @@ private: AppSettingsTreeItem* findPageItem(const QString& id) const; -private: AppSettingsTreeItem* currentPage; HelpButton* helpButton; }; diff --git a/src/ugeneui/src/app_settings/AppSettingsDialogTree.h b/src/ugeneui/src/app_settings/AppSettingsDialogTree.h index 84d8f8b64147734338e7f2c958c8b70e7c31a33f..efa9b62d0c23568e485f7444ab10b2a8cc0cf0ff 100644 --- a/src/ugeneui/src/app_settings/AppSettingsDialogTree.h +++ b/src/ugeneui/src/app_settings/AppSettingsDialogTree.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/app_settings/AppSettingsGUIImpl.cpp b/src/ugeneui/src/app_settings/AppSettingsGUIImpl.cpp index 642d960fa95efc5161324e40e75c8bae3f000f79..00699416a8901bedbe796756df5faef3b1fd0a88 100644 --- a/src/ugeneui/src/app_settings/AppSettingsGUIImpl.cpp +++ b/src/ugeneui/src/app_settings/AppSettingsGUIImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/app_settings/AppSettingsGUIImpl.h b/src/ugeneui/src/app_settings/AppSettingsGUIImpl.h index fdb32ce22a2ac95da1a0cdd7e2570ce5de766aac..986fe93d271372b9d5650663186872db0a365b6c 100644 --- a/src/ugeneui/src/app_settings/AppSettingsGUIImpl.h +++ b/src/ugeneui/src/app_settings/AppSettingsGUIImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/plugins/workflow_designer/src/EstimationDialog.h b/src/ugeneui/src/app_settings/ResetSettingsMac.h similarity index 70% rename from src/plugins/workflow_designer/src/EstimationDialog.h rename to src/ugeneui/src/app_settings/ResetSettingsMac.h index ead99e96089579eeff9e9726110b387c6cda8cc9..ff708f3419ee4b4f830f78a19660f644c6c9c120 100644 --- a/src/plugins/workflow_designer/src/EstimationDialog.h +++ b/src/ugeneui/src/app_settings/ResetSettingsMac.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,21 +19,16 @@ * MA 02110-1301, USA. */ -#ifndef _U2_ESTIMATION_DIALOG_H_ -#define _U2_ESTIMATION_DIALOG_H_ - -#include <QDialog> - -#include <U2Lang/SchemaEstimationTask.h> +#ifndef _U2_RESET_SETTINGS_MAC_H_ +#define _U2_RESET_SETTINGS_MAC_H_ namespace U2 { -class EstimationDialog : public QDialog { - Q_OBJECT +class ResetSettingsMac { public: - EstimationDialog(const Workflow::EstimationResult &er, QWidget *parent); + static void reset(); }; } -#endif // _U2_ESTIMATION_DIALOG_H_ +#endif //_U2_RESET_SETTINGS_MAC_H_ diff --git a/src/ugeneui/src/app_settings/ResetSettingsMac.mm b/src/ugeneui/src/app_settings/ResetSettingsMac.mm new file mode 100644 index 0000000000000000000000000000000000000000..6d70a62170e2b276a354e10969fc548360745c85 --- /dev/null +++ b/src/ugeneui/src/app_settings/ResetSettingsMac.mm @@ -0,0 +1,40 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include "ResetSettingsMac.h" + +#include <U2Core/global.h> + +#ifdef __OBJC__ +#import <Foundation/NSUserDefaults.h> + +namespace U2 { + +void ResetSettingsMac::reset() { + QString settingsStr("com." + QString(U2_ORGANIZATION_NAME).toLower() + "." + U2_PRODUCT_NAME); + NSString *settingsNs = settingsStr.toNSString(); + NSUserDefaults * defs = [NSUserDefaults standardUserDefaults]; + [defs removePersistentDomainForName:settingsNs]; + [defs synchronize]; +} + +} +#endif // __OBJC__ diff --git a/src/ugeneui/src/app_settings/directories_settings/DirectoriesSettingsGUIController.cpp b/src/ugeneui/src/app_settings/directories_settings/DirectoriesSettingsGUIController.cpp index 8f49542ff416abfcc680a55e57bfa04a146fcf7c..8936fc89d5b2210647062292c1e5abaad7604213 100644 --- a/src/ugeneui/src/app_settings/directories_settings/DirectoriesSettingsGUIController.cpp +++ b/src/ugeneui/src/app_settings/directories_settings/DirectoriesSettingsGUIController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -97,7 +97,7 @@ AppSettingsGUIPageWidget* DirectoriesSettingsPageController::createWidget(AppSet return r; } -const QString DirectoriesSettingsPageController::helpPageId = QString("22055815"); +const QString DirectoriesSettingsPageController::helpPageId = QString("24742350"); DirectoriesSettingsPageWidget::DirectoriesSettingsPageWidget(DirectoriesSettingsPageController* /*ctrl*/) { setupUi(this); diff --git a/src/ugeneui/src/app_settings/directories_settings/DirectoriesSettingsGUIController.h b/src/ugeneui/src/app_settings/directories_settings/DirectoriesSettingsGUIController.h index 605be206e74aa8b475120c144c74f9b30699d8d0..61199dc331ba5a0dafc66bfa30862404b959947d 100644 --- a/src/ugeneui/src/app_settings/directories_settings/DirectoriesSettingsGUIController.h +++ b/src/ugeneui/src/app_settings/directories_settings/DirectoriesSettingsGUIController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/app_settings/format_settings/FormatSettingsGUIController.cpp b/src/ugeneui/src/app_settings/format_settings/FormatSettingsGUIController.cpp index 7b9f193af02dfcaae237cd73c498dc7392286af3..201304fef7098fcb19e02bdaf33922e0b2c90c51 100644 --- a/src/ugeneui/src/app_settings/format_settings/FormatSettingsGUIController.cpp +++ b/src/ugeneui/src/app_settings/format_settings/FormatSettingsGUIController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -71,7 +71,7 @@ AppSettingsGUIPageWidget* FormatSettingsGUIPageController::createWidget(AppSetti return r; } -const QString FormatSettingsGUIPageController::helpPageId = QString("22055809"); +const QString FormatSettingsGUIPageController::helpPageId = QString("24742344"); FormatSettingsGUIPageWidget::FormatSettingsGUIPageWidget(FormatSettingsGUIPageController*) { setupUi(this); diff --git a/src/ugeneui/src/app_settings/format_settings/FormatSettingsGUIController.h b/src/ugeneui/src/app_settings/format_settings/FormatSettingsGUIController.h index ef9f132f0e86a44951d5dd1f8900f57c888e3553..99e851111e9dad3c8a8172c59c20058e4664571d 100644 --- a/src/ugeneui/src/app_settings/format_settings/FormatSettingsGUIController.h +++ b/src/ugeneui/src/app_settings/format_settings/FormatSettingsGUIController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/app_settings/logview_settings/LogSettingsGUIController.cpp b/src/ugeneui/src/app_settings/logview_settings/LogSettingsGUIController.cpp index 7ccedc373d1051f73deffacb61aa6c160aa11636..df64ea27639c8e0e039f673617c3db975312acb7 100644 --- a/src/ugeneui/src/app_settings/logview_settings/LogSettingsGUIController.cpp +++ b/src/ugeneui/src/app_settings/logview_settings/LogSettingsGUIController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -62,7 +62,7 @@ AppSettingsGUIPageWidget* LogSettingsPageController::createWidget(AppSettingsGUI return w; } -const QString LogSettingsPageController::helpPageId = QString("22055810"); +const QString LogSettingsPageController::helpPageId = QString("24742345"); ////////////////////////////////////////////////////////////////////////// // widget diff --git a/src/ugeneui/src/app_settings/logview_settings/LogSettingsGUIController.h b/src/ugeneui/src/app_settings/logview_settings/LogSettingsGUIController.h index 3a7714e4ad3114669b9cf721bb4cecbc61df050b..f81424d026bc2925c9ac1466e825acd9b392fd46 100644 --- a/src/ugeneui/src/app_settings/logview_settings/LogSettingsGUIController.h +++ b/src/ugeneui/src/app_settings/logview_settings/LogSettingsGUIController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/app_settings/network_settings/NetworkSettingsGUIController.cpp b/src/ugeneui/src/app_settings/network_settings/NetworkSettingsGUIController.cpp index 0f8c681875ec3f4b8d70f4e5be6e35fbbd954206..72d1c07e7c05ae264a1145887cb05e41705ef2d5 100644 --- a/src/ugeneui/src/app_settings/network_settings/NetworkSettingsGUIController.cpp +++ b/src/ugeneui/src/app_settings/network_settings/NetworkSettingsGUIController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -65,7 +65,7 @@ AppSettingsGUIPageWidget* NetworkSettingsPageController::createWidget(AppSetting return r; } -const QString NetworkSettingsPageController::helpPageId = QString("22055808"); +const QString NetworkSettingsPageController::helpPageId = QString("24742343"); NetworkSettingsPageWidget::NetworkSettingsPageWidget() { setupUi( this ); diff --git a/src/ugeneui/src/app_settings/network_settings/NetworkSettingsGUIController.h b/src/ugeneui/src/app_settings/network_settings/NetworkSettingsGUIController.h index 85c85b94e59a09cc36d58ca370001def78ff9fc5..1976efb2c9b7befc34d8e65b90d3572e8692b8c4 100644 --- a/src/ugeneui/src/app_settings/network_settings/NetworkSettingsGUIController.h +++ b/src/ugeneui/src/app_settings/network_settings/NetworkSettingsGUIController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/app_settings/resource_settings/ResourceSettingsGUIController.cpp b/src/ugeneui/src/app_settings/resource_settings/ResourceSettingsGUIController.cpp index 097b61ee786b0697ff9cdda468326d348f917f86..34893cc87d5461c709f18286319f7a71911a3e7e 100644 --- a/src/ugeneui/src/app_settings/resource_settings/ResourceSettingsGUIController.cpp +++ b/src/ugeneui/src/app_settings/resource_settings/ResourceSettingsGUIController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -59,7 +59,7 @@ AppSettingsGUIPageWidget* ResourceSettingsGUIPageController::createWidget(AppSet return r; } -const QString ResourceSettingsGUIPageController::helpPageId = QString("22055807"); +const QString ResourceSettingsGUIPageController::helpPageId = QString("24742342"); ResourceSettingsGUIPageWidget::ResourceSettingsGUIPageWidget(ResourceSettingsGUIPageController*) { setupUi(this); diff --git a/src/ugeneui/src/app_settings/resource_settings/ResourceSettingsGUIController.h b/src/ugeneui/src/app_settings/resource_settings/ResourceSettingsGUIController.h index 4b4e72de98520fe851b254d270fdb91fa89f76dd..b2d28f5588f27d80a445fc212721452abfbc2daf 100644 --- a/src/ugeneui/src/app_settings/resource_settings/ResourceSettingsGUIController.h +++ b/src/ugeneui/src/app_settings/resource_settings/ResourceSettingsGUIController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/app_settings/user_apps_settings/UserApplicationsSettingsGUIController.cpp b/src/ugeneui/src/app_settings/user_apps_settings/UserApplicationsSettingsGUIController.cpp index 3c67454b5191fadc833df5c8497941fa36b2fdf5..11e7b719dd6ad4fd34333a2486f9064294ab4286 100644 --- a/src/ugeneui/src/app_settings/user_apps_settings/UserApplicationsSettingsGUIController.cpp +++ b/src/ugeneui/src/app_settings/user_apps_settings/UserApplicationsSettingsGUIController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -104,7 +104,7 @@ AppSettingsGUIPageWidget* UserApplicationsSettingsPageController::createWidget(A return r; } -const QString UserApplicationsSettingsPageController::helpPageId = QString("22055806"); +const QString UserApplicationsSettingsPageController::helpPageId = QString("24742341"); UserApplicationsSettingsPageWidget::UserApplicationsSettingsPageWidget(UserApplicationsSettingsPageController* ctrl) { setupUi(this); diff --git a/src/ugeneui/src/app_settings/user_apps_settings/UserApplicationsSettingsGUIController.h b/src/ugeneui/src/app_settings/user_apps_settings/UserApplicationsSettingsGUIController.h index e8e3bb60fecedbba85c697b39a87b083e3a3cd6e..11aeef37b8bf08c6a6f1a02123fb018395ad852f 100644 --- a/src/ugeneui/src/app_settings/user_apps_settings/UserApplicationsSettingsGUIController.h +++ b/src/ugeneui/src/app_settings/user_apps_settings/UserApplicationsSettingsGUIController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/main_window/AboutDialogController.cpp b/src/ugeneui/src/main_window/AboutDialogController.cpp index e2aa5a853b0daee874eb40a8d86a63cb891df4e2..3be104c6bd3e5cfd9f8f0dd3167c08d8aff57810 100644 --- a/src/ugeneui/src/main_window/AboutDialogController.cpp +++ b/src/ugeneui/src/main_window/AboutDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/main_window/AboutDialogController.h b/src/ugeneui/src/main_window/AboutDialogController.h index 8bd6b40ec50d87602666816ea71a28e10856fcf4..24c6844febac3bc1f6fa83b97f9ccb9e231c6765 100644 --- a/src/ugeneui/src/main_window/AboutDialogController.h +++ b/src/ugeneui/src/main_window/AboutDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/main_window/CheckUpdatesTask.cpp b/src/ugeneui/src/main_window/CheckUpdatesTask.cpp index 8400432e8c2df785238d2cdef55c06029cb58b40..f4967a95d604e60b0a6cc846a0b89a9a101ba052 100644 --- a/src/ugeneui/src/main_window/CheckUpdatesTask.cpp +++ b/src/ugeneui/src/main_window/CheckUpdatesTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/main_window/CheckUpdatesTask.h b/src/ugeneui/src/main_window/CheckUpdatesTask.h index 44191591ae2da7f6a4d5fba1fdd9afe3ae86097c..a52d5403b920c6e3191302151df6c84cc263cd38 100644 --- a/src/ugeneui/src/main_window/CheckUpdatesTask.h +++ b/src/ugeneui/src/main_window/CheckUpdatesTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/main_window/DockManagerImpl.cpp b/src/ugeneui/src/main_window/DockManagerImpl.cpp index 4dd01f8a711055b30d111e62ccb0d40b008fd054..223cb3ddff20c7a1359f34d3c49c5629b47fccfc 100644 --- a/src/ugeneui/src/main_window/DockManagerImpl.cpp +++ b/src/ugeneui/src/main_window/DockManagerImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/main_window/DockManagerImpl.h b/src/ugeneui/src/main_window/DockManagerImpl.h index 2c84f24392ae08e41a3c09b64b3db015fd597e0c..637787f2e4dc9e61cbcffe12d3be7342846c2582 100644 --- a/src/ugeneui/src/main_window/DockManagerImpl.h +++ b/src/ugeneui/src/main_window/DockManagerImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/main_window/DockWidgetPainter.cpp b/src/ugeneui/src/main_window/DockWidgetPainter.cpp index 56c3e843f8173787553897299bcfff1333064d09..07ebe10c5ac8cbfcf7067f98fc77161e85a1fc70 100644 --- a/src/ugeneui/src/main_window/DockWidgetPainter.cpp +++ b/src/ugeneui/src/main_window/DockWidgetPainter.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/main_window/DockWidgetPainter.h b/src/ugeneui/src/main_window/DockWidgetPainter.h index 96866ebaea225a444051433c82e73125c6ffb615..d924a4891fd8962a0eb2cc87b2b57e6ecda34001 100644 --- a/src/ugeneui/src/main_window/DockWidgetPainter.h +++ b/src/ugeneui/src/main_window/DockWidgetPainter.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/main_window/MDIManagerImpl.cpp b/src/ugeneui/src/main_window/MDIManagerImpl.cpp index 4eda72cf3ac02112695ab62ce24cf4521093ea86..686375de71bcc96358a94ac27234576ee4294fd0 100644 --- a/src/ugeneui/src/main_window/MDIManagerImpl.cpp +++ b/src/ugeneui/src/main_window/MDIManagerImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -403,6 +403,23 @@ void MWMDIManagerImpl::sl_onSubWindowActivated(QMdiSubWindow *w) { // clear old windows menu/tb content clearMDIContent(false); +#ifdef Q_OS_MAC + // A workaround for UGENE-6315 (QTBUG-67895): background widgets are drawn over the foreground widget on macOS with the native style + if (QMdiArea::TabbedView == mdiArea->viewMode()) { + foreach (MDIItem *item, items) { + if (item != mdiItem && nullptr != item && nullptr != item->w && nullptr != item->qw) { + item->w->hide(); + item->qw->setWindowFlags(item->qw->windowFlags() | Qt::FramelessWindowHint); + } + } + + if (nullptr != mdiItem && nullptr != mdiItem->w && nullptr != mdiItem->qw) { + mdiItem->qw->setWindowFlags(mdiItem->qw->windowFlags() & (~Qt::FramelessWindowHint)); + mdiItem->w->show(); + } + } +#endif + // add new content to menu/tb QToolBar* tb = mw->getToolbar(MWTOOLBAR_ACTIVEMDI); mdiContentOwner = mdiItem; diff --git a/src/ugeneui/src/main_window/MDIManagerImpl.h b/src/ugeneui/src/main_window/MDIManagerImpl.h index a52e17445b39be9ea0a8384851a29f77cfb5ecb0..3b2aa8b91faf280d2577a9aae7f5af14ab121493 100644 --- a/src/ugeneui/src/main_window/MDIManagerImpl.h +++ b/src/ugeneui/src/main_window/MDIManagerImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/main_window/MainWindowImpl.cpp b/src/ugeneui/src/main_window/MainWindowImpl.cpp index 6ad9fcb4dc9fa8d198be9a8288447dfd3e743e7f..eb9bd5842511e4cdb1c88a9c520591730a8aea21 100644 --- a/src/ugeneui/src/main_window/MainWindowImpl.cpp +++ b/src/ugeneui/src/main_window/MainWindowImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,6 +23,7 @@ #ifdef Q_OS_MACX #include <Security/Authorization.h> #include <errno.h> +#include <unistd.h> #endif #include <algorithm> @@ -532,10 +533,6 @@ FixedMdiArea::FixedMdiArea(QWidget * parent) : QMdiArea(parent) setDocumentMode(true); setTabShape(QTabWidget::Rounded); setFrameStyle(QFrame::StyledPanel | QFrame::Raised); -#ifndef Q_OS_MAC - // This icon looks terrible on Mac. The standart one is better. - setStyleSheet("QTabBar::close-button {background-image: url(\":/core/images/close_tab.png\"); }"); -#endif } void FixedMdiArea::setViewMode( QMdiArea::ViewMode mode ) diff --git a/src/ugeneui/src/main_window/MainWindowImpl.h b/src/ugeneui/src/main_window/MainWindowImpl.h index 7105fe4388e64dfac3bdfc990397d78fe2618110..992b26b5543c139918116311dbfc473f8ff154a9 100644 --- a/src/ugeneui/src/main_window/MainWindowImpl.h +++ b/src/ugeneui/src/main_window/MainWindowImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -34,7 +34,7 @@ class QMdiArea; class QToolBar; #if defined(Q_OS_MACX) && !defined(_DEBUG) -//#define _INSTALL_TO_PATH_ACTION +#define _INSTALL_TO_PATH_ACTION #endif namespace U2 { diff --git a/src/ugeneui/src/main_window/MenuManager.cpp b/src/ugeneui/src/main_window/MenuManager.cpp index de82bc610f0a82a07fa8be8f6c628d93c63540f7..3e48ab8d5768dfe6fdcd39d83531209fadc0c8f1 100644 --- a/src/ugeneui/src/main_window/MenuManager.cpp +++ b/src/ugeneui/src/main_window/MenuManager.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/main_window/MenuManager.h b/src/ugeneui/src/main_window/MenuManager.h index 1d4d986ef3c3f77d47092824f81153cd4ebd5f76..af1304fec3e1b6978d4aa60259d63dc87b6e71eb 100644 --- a/src/ugeneui/src/main_window/MenuManager.h +++ b/src/ugeneui/src/main_window/MenuManager.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/main_window/ShutdownTask.cpp b/src/ugeneui/src/main_window/ShutdownTask.cpp index 77c598f4f2de3bc4277a0523a3e3d264b299f97c..222758d38ad27fd4d19d7b71eb5c456083f087af 100644 --- a/src/ugeneui/src/main_window/ShutdownTask.cpp +++ b/src/ugeneui/src/main_window/ShutdownTask.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/main_window/ShutdownTask.h b/src/ugeneui/src/main_window/ShutdownTask.h index c7e5f38b222cf5b17ed086b3855dd6611c77b0a3..d0188b0d9aefda631b3c4d521bed5d288eb065c2 100644 --- a/src/ugeneui/src/main_window/ShutdownTask.h +++ b/src/ugeneui/src/main_window/ShutdownTask.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/main_window/SplashScreen.cpp b/src/ugeneui/src/main_window/SplashScreen.cpp index c1c3f9a1c10eaa865fae94b86cc908451fcb9e05..2897e4a51cdf1822ed9f1b80123c32968d97da34 100644 --- a/src/ugeneui/src/main_window/SplashScreen.cpp +++ b/src/ugeneui/src/main_window/SplashScreen.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -114,7 +114,7 @@ void SplashScreenWidget::getTask(){ Task* topLevelTask = tasks.at(0); task = topLevelTask->getTaskName(); - QList<Task*> subtasks = topLevelTask->getSubtasks(); + QList<QPointer<Task> > subtasks = topLevelTask->getSubtasks(); if(subtasks.size() > 0){ task = subtasks.at(0)->getTaskName(); } @@ -160,7 +160,8 @@ void SplashScreenWidget::drawInfo(){ font.setPixelSize(VERSION_HEIGHT_PX); p.setFont( font ); p.setPen(QColor(0, 46, 59)); - QString text = tr("Version ") + version + tr(" is loading"); + QString versionSign = version.right(version.indexOf(".")).toInt() == 0 ? version.left(version.indexOf(".")) : version; + QString text = tr("Version ") + versionSign + tr(" is loading"); for (int i = 0; i < dots_number; i++) { text.append("."); } diff --git a/src/ugeneui/src/main_window/SplashScreen.h b/src/ugeneui/src/main_window/SplashScreen.h index a598c59aff87990938df15061a7b39f4d97f5473..5be85e31715f569b692dac89e60572698471d7d3 100644 --- a/src/ugeneui/src/main_window/SplashScreen.h +++ b/src/ugeneui/src/main_window/SplashScreen.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/main_window/TmpDirChangeDialogController.cpp b/src/ugeneui/src/main_window/TmpDirChangeDialogController.cpp index 30445c62cc0c151d84d90183ba4309191afb5247..56bc9f72ef03fbd13210df8703f8ced226597604 100644 --- a/src/ugeneui/src/main_window/TmpDirChangeDialogController.cpp +++ b/src/ugeneui/src/main_window/TmpDirChangeDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/main_window/TmpDirChangeDialogController.h b/src/ugeneui/src/main_window/TmpDirChangeDialogController.h index 366cc725dabb87ff717db06eee11e1a935b7d540..725d3998d77fe02d39c3c36dbc3f213b82e0f279 100644 --- a/src/ugeneui/src/main_window/TmpDirChangeDialogController.h +++ b/src/ugeneui/src/main_window/TmpDirChangeDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/main_window/ToolBarManager.cpp b/src/ugeneui/src/main_window/ToolBarManager.cpp index 22430df8136a053d4c6e3938a916f1d43480390d..d8997837cd0384f33f0ac19ac108efa529aefb70 100644 --- a/src/ugeneui/src/main_window/ToolBarManager.cpp +++ b/src/ugeneui/src/main_window/ToolBarManager.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/main_window/ToolBarManager.h b/src/ugeneui/src/main_window/ToolBarManager.h index 72e89b0b315b98ad963ac063c1b02ad7332fa3c1..5d6a907f7ceced1e028a1537354931b34105f04d 100644 --- a/src/ugeneui/src/main_window/ToolBarManager.h +++ b/src/ugeneui/src/main_window/ToolBarManager.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/plugin_viewer/PluginViewerController.cpp b/src/ugeneui/src/plugin_viewer/PluginViewerController.cpp index 9ac57e7d6437a166be662391d04cf9c06cde2c6a..6c12d6fc5789cab524b25b75bd459ba1494d240e 100644 --- a/src/ugeneui/src/plugin_viewer/PluginViewerController.cpp +++ b/src/ugeneui/src/plugin_viewer/PluginViewerController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -44,10 +44,6 @@ namespace U2 { PluginViewerController::PluginViewerController() { showServices = false; //'true' mode is not functional anymore after service<->plugin model refactoring mdiWindow = NULL; - addPluginAction = NULL; - enablePluginAction = NULL; - disableServiceAction = NULL; - connectStaticActions(); if (AppContext::getSettings()->getValue(PLUGIN_VIEW_SETTINGS + "isVisible", false).toBool()) { @@ -113,15 +109,6 @@ void PluginViewerController::connectStaticActions() { viewPluginsAction->setObjectName(ACTION__PLUGINS_VIEW); pluginsMenu->addAction(viewPluginsAction); - addPluginAction = new QAction(tr("Add plugin"), this); - connect(addPluginAction, SIGNAL(triggered()), SLOT(sl_addPlugin())); - - enablePluginAction = new QAction(tr("Enable plugin"), this); - connect(enablePluginAction, SIGNAL(triggered()), SLOT(sl_enablePlugin())); - - disablePluginAction = new QAction(tr("Remove plugin"), this); - connect(disablePluginAction, SIGNAL(triggered()), SLOT(sl_disablePlugin())); - enableServiceAction = new QAction(tr("Enable service"), this); connect(enableServiceAction, SIGNAL(triggered()), SLOT(sl_enableService())); @@ -131,18 +118,13 @@ void PluginViewerController::connectStaticActions() { void PluginViewerController::connectVisualActions() { //connect to plugin support signals - PluginSupport* ps = AppContext::getPluginSupport(); - connect(ps, SIGNAL(si_pluginAdded(Plugin*)), SLOT(sl_onPluginAdded(Plugin*))); - connect(ps, SIGNAL(si_pluginRemoveFlagChanged(Plugin*)), SLOT(sl_pluginRemoveFlagChanged(Plugin*))); if (showServices) { ServiceRegistry* sr = AppContext::getServiceRegistry(); connect(sr, SIGNAL(si_serviceStateChanged(Service*, ServiceState)), SLOT(sl_onServiceStateChanged(Service*, ServiceState))); - connect(sr, SIGNAL(si_serviceRegistered(Service*)), SLOT(sl_onServiceRegistered(Service*))); connect(sr, SIGNAL(si_serviceUnregistered(Service*)), SLOT(sl_onServiceUnregistered(Service*))); } connect(ui.treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)),SLOT(sl_treeCurrentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*))); - connect(ui.treeWidget, SIGNAL(customContextMenuRequested(const QPoint&)),SLOT(sl_treeCustomContextMenuRequested(const QPoint&))); connect(ui.showLicenseButton,SIGNAL(clicked()),SLOT(sl_showHideLicense())); connect(ui.acceptLicenseButton,SIGNAL(clicked()),SLOT(sl_acceptLicense())); } @@ -156,12 +138,6 @@ void PluginViewerController::disconnectVisualActions() { void PluginViewerController::updateActions() { PlugViewTreeItem* item = static_cast<PlugViewTreeItem*>(ui.treeWidget->currentItem()); - bool isPlugin = item!=NULL && item->isPluginItem(); - Plugin* p = isPlugin ? (static_cast<PlugViewPluginItem*>(item))->plugin : NULL; - - bool isRemoved = isPlugin && AppContext::getPluginSupport()->getRemoveFlag(p); - disablePluginAction->setEnabled(isPlugin && !isRemoved); - enablePluginAction->setEnabled(isPlugin && isRemoved); bool isService = item!=NULL && item->isServiceItem(); Service* s = isService ? (static_cast<PlugViewServiceItem*>(item))->service : NULL; @@ -175,7 +151,22 @@ void PluginViewerController::updateActions() { void PluginViewerController::buildItems() { const QList<Plugin*>& plugins = AppContext::getPluginSupport()->getPlugins(); foreach(Plugin* p, plugins) { - sl_onPluginAdded(p); + QTreeWidget* treeWidget = ui.treeWidget; + PlugViewPluginItem* pluginItem = new PlugViewPluginItem(NULL, p, showServices); + if (showServices) { + const QList<Service*>& services = p->getServices(); + //this method is called for default state init also -> look for registered plugin services + ServiceRegistry* sr = AppContext::getServiceRegistry(); + QList<Service*> registered = sr->getServices(); + foreach(Service* s, services) { + if (registered.contains(s)) { + PlugViewTreeItem* serviceItem = new PlugViewServiceItem(pluginItem, s); + pluginItem->addChild(serviceItem); + } + } + } + treeWidget->addTopLevelItem(pluginItem); + pluginItem->setExpanded(true); } } @@ -214,6 +205,7 @@ bool PluginViewerController::eventFilter(QObject *obj, QEvent *event) { return QObject::eventFilter(obj, event); } +/* void PluginViewerController::sl_onPluginAdded(Plugin* p) { assert(findPluginItem(p)==NULL); @@ -234,6 +226,7 @@ void PluginViewerController::sl_onPluginAdded(Plugin* p) { treeWidget->addTopLevelItem(pluginItem); pluginItem->setExpanded(true); } +*/ void PluginViewerController::sl_onServiceStateChanged(Service* s, ServiceState oldState) { Q_UNUSED(oldState); @@ -244,16 +237,6 @@ void PluginViewerController::sl_onServiceStateChanged(Service* s, ServiceState o updateState(); } -void PluginViewerController::sl_onServiceRegistered(Service* /*s*/) { - /*assert(showServices); - PlugViewPluginItem* pluginItem = findPluginItem(s->getPlugin()); - assert(pluginItem!=NULL); - PlugViewTreeItem* serviceItem = findServiceItem(s); - assert(serviceItem == NULL); - serviceItem = new PlugViewServiceItem(pluginItem, s); - pluginItem->addChild(serviceItem);*/ -} - void PluginViewerController::sl_onServiceUnregistered(Service* s) { assert(showServices); PlugViewServiceItem* item = findServiceItem(s); @@ -270,52 +253,6 @@ void PluginViewerController::sl_show() { } } -void PluginViewerController::sl_addPlugin() { - QString caption = tr("Select plugin file"); - QString lastDir = AppContext::getSettings()->getValue(PLUGIN_VIEW_SETTINGS + "addDir").toString(); - - QString ext=tr("Plugin files")+" (*."+PLUGIN_FILE_EXT+")"; - - QString pluginFilePath = U2FileDialog::getOpenFileName(ui.treeWidget, caption, lastDir, ext); - if (pluginFilePath.isEmpty()) { - return; - } - QFileInfo fi(pluginFilePath); - QString newLastDir = fi.absoluteDir().absolutePath(); - AppContext::getSettings()->setValue(PLUGIN_VIEW_SETTINGS + "addDir", newLastDir); - Task* task = AppContext::getPluginSupport()->addPluginTask(pluginFilePath); - AppContext::getTaskScheduler()->registerTopLevelTask(task); - connect(task, SIGNAL(si_stateChanged()), SLOT(sl_taskStateChanged())); -} - -void PluginViewerController::sl_taskStateChanged() { - Task* t = qobject_cast<Task*>(sender()); - assert(t!=NULL); - if (t->isFinished() && t->hasError()) { - QMessageBox::critical(ui.treeWidget, tr("Error"), t->getError()); - } -} - - -void PluginViewerController::sl_enablePlugin() { - PlugViewPluginItem* pi = getCurrentPluginItem(); - assert(pi!=NULL); - AppContext::getPluginSupport()->setRemoveFlag(pi->plugin, false); -} - -void PluginViewerController::sl_disablePlugin() { - PlugViewPluginItem* pi = getCurrentPluginItem(); - assert(pi!=NULL); - AppContext::getPluginSupport()->setRemoveFlag(pi->plugin, true); -} - -void PluginViewerController::sl_pluginRemoveFlagChanged(Plugin* p) { - PlugViewPluginItem* pi = findPluginItem(p); - assert(pi!=NULL); - pi->updateVisual(); - updateState(); -} - PlugViewServiceItem* PluginViewerController::getCurrentServiceItem() const { PlugViewTreeItem* item = static_cast<PlugViewTreeItem*>(ui.treeWidget->currentItem()); assert(item!=NULL && item->isServiceItem()); @@ -393,37 +330,6 @@ void PluginViewerController::sl_treeCurrentItemChanged(QTreeWidgetItem * current updateState(); } - -void PluginViewerController::sl_treeCustomContextMenuRequested(const QPoint & pos) { - Q_UNUSED(pos); - - assert(mdiWindow); - QMenu* menu = new QMenu(ui.treeWidget); - - menu->addAction(addPluginAction); - - if (disablePluginAction->isEnabled()) { - menu->addAction(disablePluginAction); - } - - if (enablePluginAction->isEnabled()) { - menu->addAction(enablePluginAction); - } - - if (showServices) { - if (enableServiceAction->isEnabled()) { - menu->addAction(enableServiceAction); - } - - if (disableServiceAction->isEnabled()) { - menu->addAction(disableServiceAction); - } - } - - - menu->exec(QCursor::pos()); -} - void PluginViewerController::sl_showHideLicense(){ if(ui.licenseView->isHidden()){ showLicense(); @@ -480,10 +386,7 @@ void PlugViewPluginItem::updateVisual() { setData(0, Qt::DisplayRole, PluginViewerController::tr("Plugin")); setData(1, Qt::DisplayRole, plugin->getName()); - bool toRemove = AppContext::getPluginSupport()->getRemoveFlag(plugin); - QString state = toRemove ? - PluginViewerController::tr("to remove after restart") - : PluginViewerController::tr("On"); + QString state = PluginViewerController::tr("On"); setData(2, Qt::DisplayRole, state); QString desc=QString(plugin->getDescription()).replace("\n"," "); @@ -491,7 +394,7 @@ void PlugViewPluginItem::updateVisual() { setIcon(showServices ? 0 : 1, QIcon(":ugene/images/plugins.png")); - GUIUtils::setMutedLnF(this, toRemove); + GUIUtils::setMutedLnF(this, false); if(!plugin->getDescription().contains("\n") && desc.length() > 80){ for(int i=80;i<desc.length();){ i=desc.lastIndexOf(" ", i); diff --git a/src/ugeneui/src/plugin_viewer/PluginViewerController.h b/src/ugeneui/src/plugin_viewer/PluginViewerController.h index ea690fa8b49dcc7651afe4be51ff866b7e22f875..d2693609e62cca65c4ce2c472420ffa050932cf3 100644 --- a/src/ugeneui/src/plugin_viewer/PluginViewerController.h +++ b/src/ugeneui/src/plugin_viewer/PluginViewerController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -43,23 +43,13 @@ protected: private slots: void sl_show(); - void sl_addPlugin(); - void sl_enablePlugin(); - void sl_disablePlugin(); void sl_enableService(); void sl_disableService(); void sl_treeCurrentItemChanged(QTreeWidgetItem * current, QTreeWidgetItem * previous); - void sl_treeCustomContextMenuRequested(const QPoint & pos); - -//plugin support monitoring - void sl_onPluginAdded(Plugin* p); - void sl_pluginRemoveFlagChanged(Plugin*); void sl_onServiceStateChanged(Service* s, ServiceState oldState); - void sl_onServiceRegistered(Service* s); void sl_onServiceUnregistered(Service* s); - void sl_taskStateChanged(); void sl_showHideLicense(); void sl_acceptLicense(); @@ -82,12 +72,6 @@ private: Ui_PluginViewWidget ui; MWMDIWindow* mdiWindow; - - QAction* addPluginAction; - - QAction* enablePluginAction; - QAction* disablePluginAction; - QAction* enableServiceAction; QAction* disableServiceAction; diff --git a/src/ugeneui/src/plugin_viewer/PluginViewerImpl.cpp b/src/ugeneui/src/plugin_viewer/PluginViewerImpl.cpp index d03410f50e17c7da4f9f16b9ceaff1a2ea0fcb36..0ff7ac873dec9918005816a79637b7d778a756eb 100644 --- a/src/ugeneui/src/plugin_viewer/PluginViewerImpl.cpp +++ b/src/ugeneui/src/plugin_viewer/PluginViewerImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/plugin_viewer/PluginViewerImpl.h b/src/ugeneui/src/plugin_viewer/PluginViewerImpl.h index 1b407684537702d7c079e68e1399f38e38fbbf5f..1657079a34eba5cdf8756d95217516c6ccf991a1 100644 --- a/src/ugeneui/src/plugin_viewer/PluginViewerImpl.h +++ b/src/ugeneui/src/plugin_viewer/PluginViewerImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/project_support/DocumentFormatSelectorController.cpp b/src/ugeneui/src/project_support/DocumentFormatSelectorController.cpp index 8bfcfe7d493ef44c1085ee693456e17cc70e4e5d..7f00ad164615a6d618a173957dcc15f7089cfbe0 100644 --- a/src/ugeneui/src/project_support/DocumentFormatSelectorController.cpp +++ b/src/ugeneui/src/project_support/DocumentFormatSelectorController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -60,7 +60,7 @@ DocumentFormatSelectorController::DocumentFormatSelectorController(QList<FormatD : QDialog(p), formatDetectionResults(results) { setupUi(this); - new HelpButton(this, buttonBox, "22055785"); + new HelpButton(this, buttonBox, "24742320"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); @@ -106,6 +106,7 @@ int DocumentFormatSelectorController::selectResult(const GUrl& url, QByteArray& rb->setChecked(i == 0); QLabel* label = new QLabel(text); + label->setObjectName(QString("label_%1").arg(i + 1)); label->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); label->setSizePolicy(QSizePolicy::Expanding, label->sizePolicy().verticalPolicy()); label->installEventFilter(new LabelClickProvider(label, rb)); diff --git a/src/ugeneui/src/project_support/DocumentFormatSelectorController.h b/src/ugeneui/src/project_support/DocumentFormatSelectorController.h index f26851432c180780b5f5d87b79953da28ea563a5..d475050363052abe6b8a56932dab1ee02a7ae7bd 100644 --- a/src/ugeneui/src/project_support/DocumentFormatSelectorController.h +++ b/src/ugeneui/src/project_support/DocumentFormatSelectorController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/project_support/DocumentProviderSelectorController.cpp b/src/ugeneui/src/project_support/DocumentProviderSelectorController.cpp index 06b334e8fdf2f566dbb3297f61f766f126ab4ac6..4467862aac2a0ca446931bd6f51e3ef55c0744b6 100644 --- a/src/ugeneui/src/project_support/DocumentProviderSelectorController.cpp +++ b/src/ugeneui/src/project_support/DocumentProviderSelectorController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -73,7 +73,7 @@ DocumentProviderSelectorController::DocumentProviderSelectorController(const GUr setupUi(this); setObjectName("Select Document Format"); - new HelpButton(this, buttonBox, "22055949"); + new HelpButton(this, buttonBox, "24742484"); gbFormats->setTitle(QString("Options for %1").arg(url.fileName())); buttonBox->button(QDialogButtonBox::Cancel)->setAutoDefault(false); buttonBox->button(QDialogButtonBox::Cancel)->setDefault(false); diff --git a/src/ugeneui/src/project_support/DocumentProviderSelectorController.h b/src/ugeneui/src/project_support/DocumentProviderSelectorController.h index c8330f06985c8e3c7bbc491d1f2f37f62b908b0a..da26922fba3eaf5a57d4f69fc242a9d70a2d8526 100644 --- a/src/ugeneui/src/project_support/DocumentProviderSelectorController.h +++ b/src/ugeneui/src/project_support/DocumentProviderSelectorController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/project_support/DocumentReadingModeSelectorController.cpp b/src/ugeneui/src/project_support/DocumentReadingModeSelectorController.cpp index be3cbd5a819833a7bb4b3ebc4b69e8174265b2af..7597d0e77893eab3220fcff33cd5b3d7b027eb4d 100644 --- a/src/ugeneui/src/project_support/DocumentReadingModeSelectorController.cpp +++ b/src/ugeneui/src/project_support/DocumentReadingModeSelectorController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -80,7 +80,7 @@ bool DocumentReadingModeSelectorController::adjustReadingMode(FormatDetectionRes d->setModal(true); ui.setupUi(d.data()); - new HelpButton(d.data(), ui.buttonBox, "22055758"); + new HelpButton(d.data(), ui.buttonBox, "24742289"); bool canBeShortReads = minSequenceSize > 0 && maxSequenceSize < 2000; bool haveReadAligners = !AppContext::getDnaAssemblyAlgRegistry()->getRegisteredAlgorithmIds().isEmpty(); diff --git a/src/ugeneui/src/project_support/DocumentReadingModeSelectorController.h b/src/ugeneui/src/project_support/DocumentReadingModeSelectorController.h index 598924a643ed367c90ac56d00aae1e759a5af3a8..b5c77b418c2ae72b5095eb50e765e0ea32890aca 100644 --- a/src/ugeneui/src/project_support/DocumentReadingModeSelectorController.h +++ b/src/ugeneui/src/project_support/DocumentReadingModeSelectorController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/project_support/ExportProjectDialogController.cpp b/src/ugeneui/src/project_support/ExportProjectDialogController.cpp index 2bab7fb1b667d01204d182182ea0c9bf0a1f6be7..b5a0d79a50599e9d5374cf7187f771cfbd45e118 100644 --- a/src/ugeneui/src/project_support/ExportProjectDialogController.cpp +++ b/src/ugeneui/src/project_support/ExportProjectDialogController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -49,7 +49,7 @@ ExportProjectDialogController::ExportProjectDialogController(QWidget *p, const Q : QDialog(p) { setupUi(this); - new HelpButton(this, buttonBox, "22055758"); + new HelpButton(this, buttonBox, "24742289"); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); setModal(true); diff --git a/src/ugeneui/src/project_support/ExportProjectDialogController.h b/src/ugeneui/src/project_support/ExportProjectDialogController.h index dbf49981e739d4a36e9b0fc411ee2dd03a075e88..03ba45d0926130663e737878bba71f5bba4cdd46 100644 --- a/src/ugeneui/src/project_support/ExportProjectDialogController.h +++ b/src/ugeneui/src/project_support/ExportProjectDialogController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/project_support/MultipleDocumentsReadingModeSelectorController.cpp b/src/ugeneui/src/project_support/MultipleDocumentsReadingModeSelectorController.cpp index 7eaebc0adf76fc9ba81d846a04ef40b1e8324e35..549770bd47b92058dd4ce8c0ff7c443d65352f18 100644 --- a/src/ugeneui/src/project_support/MultipleDocumentsReadingModeSelectorController.cpp +++ b/src/ugeneui/src/project_support/MultipleDocumentsReadingModeSelectorController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -119,7 +119,7 @@ QString MultipleDocumentsReadingModeDialog::setupNewUrl() { bool MultipleDocumentsReadingModeDialog::setupGUI(QList<GUrl>& _urls, QVariantMap& props, const QMap<QString, qint64>& headerSequenceLengths){ setModal(true); setupUi(this); - new HelpButton(this, buttonBox, "22055847"); + new HelpButton(this, buttonBox, "24742382"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/ugeneui/src/project_support/MultipleDocumentsReadingModeSelectorController.h b/src/ugeneui/src/project_support/MultipleDocumentsReadingModeSelectorController.h index 5606e5cbfe98bd550a6bedd525d531dcb8b530e0..2aa35ef5f1479e97fa3cdd596a98091cb674f7cc 100644 --- a/src/ugeneui/src/project_support/MultipleDocumentsReadingModeSelectorController.h +++ b/src/ugeneui/src/project_support/MultipleDocumentsReadingModeSelectorController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/project_support/ProjectImpl.cpp b/src/ugeneui/src/project_support/ProjectImpl.cpp index 2171b5ddddc7f6c5d500c1733fab8aac5d0376d4..ab08581530cd1612176dbda6474c98544e2b2ca1 100644 --- a/src/ugeneui/src/project_support/ProjectImpl.cpp +++ b/src/ugeneui/src/project_support/ProjectImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/project_support/ProjectImpl.h b/src/ugeneui/src/project_support/ProjectImpl.h index a9625f33966b7f119bb6e5525c6cd47eb02043d5..e842b65c67c21712c00900d0dedf87cf0161ec1b 100644 --- a/src/ugeneui/src/project_support/ProjectImpl.h +++ b/src/ugeneui/src/project_support/ProjectImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/project_support/ProjectLoaderImpl.cpp b/src/ugeneui/src/project_support/ProjectLoaderImpl.cpp index 2f006f54374492afcdca1b07c2104f3af6aac76c..855a22c84bb8b9df81978c4ec185787234500198 100644 --- a/src/ugeneui/src/project_support/ProjectLoaderImpl.cpp +++ b/src/ugeneui/src/project_support/ProjectLoaderImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -831,7 +831,7 @@ void SaveProjectDialogController::sl_clicked(QAbstractButton *button) { ////////////////////////////////////////////////////////////////////////// ProjectDialogController::ProjectDialogController(ProjectDialogController::Mode m, QWidget *p):QDialog(p) { setupUi(this); - new HelpButton(this, buttonBox, "22055782"); + new HelpButton(this, buttonBox, "24742317"); buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Create")); buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); diff --git a/src/ugeneui/src/project_support/ProjectLoaderImpl.h b/src/ugeneui/src/project_support/ProjectLoaderImpl.h index 1848035e35911a7ad104b89499eb9f52513b6dbf..8668b6994e8ef3c1531dad5079e962fb0cdc0fbf 100644 --- a/src/ugeneui/src/project_support/ProjectLoaderImpl.h +++ b/src/ugeneui/src/project_support/ProjectLoaderImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/project_support/ProjectServiceImpl.cpp b/src/ugeneui/src/project_support/ProjectServiceImpl.cpp index efc95fb461ad865d1a1cc044888447d44c8f2997..73f59e0dfbb5f3f3467ca16394ea8b61ebe3da47 100644 --- a/src/ugeneui/src/project_support/ProjectServiceImpl.cpp +++ b/src/ugeneui/src/project_support/ProjectServiceImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/project_support/ProjectServiceImpl.h b/src/ugeneui/src/project_support/ProjectServiceImpl.h index ce880f2a92bb20be0cf8b75f7ecd694a05b84018..b1eb91d952c4c81054095052536788b9204a7677 100644 --- a/src/ugeneui/src/project_support/ProjectServiceImpl.h +++ b/src/ugeneui/src/project_support/ProjectServiceImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/project_support/ProjectTasksGui.cpp b/src/ugeneui/src/project_support/ProjectTasksGui.cpp index e7b6b17b5ea6722cb4fb8f932bb5666180f75fe7..ca2d2ada870b60782aa5b2c65c14a797c58f232e 100644 --- a/src/ugeneui/src/project_support/ProjectTasksGui.cpp +++ b/src/ugeneui/src/project_support/ProjectTasksGui.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -463,6 +463,7 @@ QList<Task*> GTest_LoadProject::onSubTaskFinished( Task* subTask ){ void GTest_LoadProject::cleanup(){ AppContextImpl::getApplicationContext()->setProject(NULL); + XmlTest::cleanup(); } @@ -514,6 +515,8 @@ void GTest_ExportProject::cleanup(){ coreLog.info(tr("GTest_ExportProject::cleanup unable to delete exported files")); } } + + XmlTest::cleanup(); } bool GTest_ExportProject::removeDir( const QDir &aDir ){ @@ -604,6 +607,8 @@ void GTest_LoadDocumentFromProject::cleanup(){ AppContext::getTaskScheduler()->registerTopLevelTask(new UnloadDocumentTask(loadedDoc, false)); } } + + XmlTest::cleanup(); } Task::ReportResult GTest_LoadDocumentFromProject::report(){ diff --git a/src/ugeneui/src/project_support/ProjectTasksGui.h b/src/ugeneui/src/project_support/ProjectTasksGui.h index f77aafc4469dbbc20ff5478c56271dd6faa09a29..6beabeb3631115cad09d9dfee0ab9ad6829e7469 100644 --- a/src/ugeneui/src/project_support/ProjectTasksGui.h +++ b/src/ugeneui/src/project_support/ProjectTasksGui.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -173,7 +173,7 @@ private: }; //cppcheck-suppress noConstructor -class GTest_LoadProject : public GTest { +class GTest_LoadProject : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_LoadProject, "load-project", TaskFlags_NR_FOSCOE); @@ -195,7 +195,7 @@ private: }; //cppcheck-suppress noConstructor -class GTest_ExportProject : public GTest { +class GTest_ExportProject : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_ExportProject, "export-project", TaskFlags_NR_FOSCOE); @@ -213,7 +213,7 @@ private: }; //cppcheck-suppress noConstructor -class GTest_UnloadProject : public GTest { +class GTest_UnloadProject : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_UnloadProject, "unload-project", TaskFlags_NR_FOSCOE); @@ -224,7 +224,7 @@ private: }; //cppcheck-suppress noConstructor -class GTest_LoadDocumentFromProject : public GTest { +class GTest_LoadDocumentFromProject : public XmlTest { Q_OBJECT public: SIMPLE_XML_TEST_BODY_WITH_FACTORY_EXT(GTest_LoadDocumentFromProject, "load-document-from-project", TaskFlags_NR_FOSCOE); diff --git a/src/ugeneui/src/project_view/BuiltInObjectViews.cpp b/src/ugeneui/src/project_view/BuiltInObjectViews.cpp index f9e5db665a56c0c87404cccc63969cd9b6b6f8ea..12543bc835a661404cc372a86b25854425f05ecb 100644 --- a/src/ugeneui/src/project_view/BuiltInObjectViews.cpp +++ b/src/ugeneui/src/project_view/BuiltInObjectViews.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/project_view/ProjectViewImpl.cpp b/src/ugeneui/src/project_view/ProjectViewImpl.cpp index f6b5db70fbad35737541c34013782a5aafd34961..c7ea1945923d56f4680888d3aa92a20c7201d00e 100644 --- a/src/ugeneui/src/project_view/ProjectViewImpl.cpp +++ b/src/ugeneui/src/project_view/ProjectViewImpl.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -70,6 +70,7 @@ #include <U2Gui/ObjectViewModel.h> #include <U2Gui/OpenViewTask.h> #include <U2Gui/ProjectUtils.h> +#include <U2Gui/ReloadDocumentsTask.h> #include <U2Gui/UnloadDocumentTask.h> #include <U2View/ADVSequenceWidget.h> @@ -88,7 +89,7 @@ namespace U2 { /* TRANSLATOR U2::ProjectTreeController */ const QString ProjectViewImpl::SETTINGS_ROOT("projecview/"); -const char *NOTIFICATION_TITLE = "File Modification Detected"; +static const char *NOTIFICATION_TITLE = "File Modification Detected"; #define UPDATER_TIMEOUT 3000 @@ -372,7 +373,7 @@ void DocumentUpdater::sl_updateTaskStateChanged() { void DocumentUpdater::excludeDocumentsInTasks(const QList<Task*>& tasks, QList<Document*>& documents) { foreach(Task* task, tasks) { - excludeDocumentsInTasks(task->getSubtasks(), documents); + excludeDocumentsInTasks(task->getPureSubtasks(), documents); SaveDocumentTask* saveTask = qobject_cast<SaveDocumentTask*>(task); if (saveTask) { documents.removeAll(saveTask->getDocument()); @@ -386,8 +387,6 @@ void DocumentUpdater::excludeDocumentsInTasks(const QList<Task*>& tasks, QList<D } void DocumentUpdater::reloadDocuments( QList<Document*> docs2Reload ){ - Task* reloadTask = new Task(tr("Reload documents task"), TaskFlag_NoRun); - QList<GObjectViewState*> states; QList<GObjectViewWindow*> viewWindows; @@ -406,17 +405,9 @@ void DocumentUpdater::reloadDocuments( QList<Document*> docs2Reload ){ vw->closeView(); } - QString unloadErr = UnloadDocumentTask::checkSafeUnload(doc); - if (!unloadErr.isEmpty()) { - QMessageBox::warning(QApplication::activeWindow(), - U2_APP_TITLE, - tr("Unable to unload '%1'. Unload error: '%2'").arg(doc->getName(), unloadErr)); - doc->setLastUpdateTime(); - continue; - } - reloadTask->addSubTask(new ReloadDocumentTask(doc)); } + ReloadDocumentsTask* reloadTask = new ReloadDocumentsTask(docs2Reload); Task* updateViewTask = new Task(tr("Restore state task"), TaskFlag_NoRun); foreach(GObjectViewState* state, states) { diff --git a/src/ugeneui/src/project_view/ProjectViewImpl.h b/src/ugeneui/src/project_view/ProjectViewImpl.h index a6b5d4feec4afd898b809fe0df802c9b4e01b35c..407b35aa7580940f5e75eaf36a7308af2ff58360 100644 --- a/src/ugeneui/src/project_view/ProjectViewImpl.h +++ b/src/ugeneui/src/project_view/ProjectViewImpl.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/shtirlitz/Shtirlitz.cpp b/src/ugeneui/src/shtirlitz/Shtirlitz.cpp index 773ece20424ad81d57211976961f11b9d9a558f5..d05dc5af129c3158649e6918da73e18486634e6a 100644 --- a/src/ugeneui/src/shtirlitz/Shtirlitz.cpp +++ b/src/ugeneui/src/shtirlitz/Shtirlitz.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/shtirlitz/Shtirlitz.h b/src/ugeneui/src/shtirlitz/Shtirlitz.h index ffef8eea304715da2f9eca1d6e9887c61c129655..60a75e27dfb80f1ea2a25758f6044743fc1c43b7 100644 --- a/src/ugeneui/src/shtirlitz/Shtirlitz.h +++ b/src/ugeneui/src/shtirlitz/Shtirlitz.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/shtirlitz/StatisticalReport.ui b/src/ugeneui/src/shtirlitz/StatisticalReport.ui index 56abc703c9ae3653a2e347157191bb4c7be868e0..6aa153975532cb023045b8cc272c3e6f030dda48 100644 --- a/src/ugeneui/src/shtirlitz/StatisticalReport.ui +++ b/src/ugeneui/src/shtirlitz/StatisticalReport.ui @@ -11,7 +11,7 @@ </rect> </property> <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> + <sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> diff --git a/src/ugeneui/src/shtirlitz/StatisticalReportController.cpp b/src/ugeneui/src/shtirlitz/StatisticalReportController.cpp index 6bca8b4c0455929d0abe939dee9b5b72bf87f2ac..6c0654e309db897ca5a6b610ca6bfdf7815c530a 100644 --- a/src/ugeneui/src/shtirlitz/StatisticalReportController.cpp +++ b/src/ugeneui/src/shtirlitz/StatisticalReportController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -23,14 +23,13 @@ #include <QDesktopWidget> #include <QFile> #include <QScrollBar> -#include <QWebFrame> #include <U2Core/Version.h> #include <U2Core/U2SafePoints.h> -#include "StatisticalReportController.h" +#include <U2Gui/SimpleWebViewBasedWidgetController.h> -#include "utils/MultilingualHtmlView.h" +#include "StatisticalReportController.h" namespace U2 { @@ -41,9 +40,14 @@ StatisticalReportController::StatisticalReportController(const QString &newHtmlF Version v = Version::appVersion(); setWindowTitle(tr("Welcome to UGENE %1.%2").arg(v.major).arg(v.minor)); - htmlView = new MultilingualHtmlView(newHtmlFilepath, this); - frameLayout->addWidget(htmlView); + htmlView = new U2WebView(this); htmlView->setMinimumSize(400, 10); + frameLayout->addWidget(htmlView); + + htmlViewController = new SimpleWebViewBasedWidgetController(htmlView); + connect(htmlViewController, SIGNAL(si_pageReady()), SLOT(sl_pageReady())); + htmlViewController->loadPage(newHtmlFilepath); + connect(buttonBox, SIGNAL(accepted()), SLOT(accept())); } @@ -51,22 +55,25 @@ bool StatisticalReportController::isInfoSharingAccepted() const { return chkStat->isChecked(); } -void StatisticalReportController::paintEvent(QPaintEvent *event) { - QWidget::paintEvent(event); - CHECK(!htmlView->page()->mainFrame()->scrollBarGeometry(Qt::Vertical).isEmpty(), ); +void StatisticalReportController::sl_pageReady() { +#if (QT_VERSION < 0x050500 && defined(UGENE_QT_WEB_ENGINE)) + htmlViewController->runJavaScript("bindLinks();"); +#endif - // adjust size to avoid scroll bars - while (!htmlView->page()->mainFrame()->scrollBarGeometry(Qt::Vertical).isEmpty()) { - htmlView->setMinimumHeight(htmlView->size().height() + 1); - } - htmlView->setMinimumHeight(htmlView->size().height() + 10); -#ifndef Q_OS_MAC - // UGENE crashes on the update event processing on mac - // It has some connection with htmlView loading method - // There was no crash before f3a45ef1cd53fe28faf90a763d195e964bc6c752 commit - // Find a solution and fix it, if you have some free time - move(x(), (qApp->desktop()->screenGeometry().height() / 2) - htmlView->minimumHeight()); + // Update the widget size + htmlViewController->runJavaScript("getBodyHeight();", [&](const QVariant &var) { + int pageHeight = var.toInt(); + htmlView->setMinimumHeight(pageHeight); +#ifndef Q_OS_MAC //TODO recheck this code on OS X + // UGENE crashes on the update event processing on mac + // It has some connection with htmlView loading method + // There was no crash before f3a45ef1cd53fe28faf90a763d195e964bc6c752 commit + // Find a solution and fix it, if you have some free time + QWidget *mainWindowWidget = qApp->activeModalWidget()->parentWidget(); + move((mainWindowWidget->x() + mainWindowWidget->width() / 2) - width() / 2, + (mainWindowWidget->y() + mainWindowWidget->height() / 2) - pageHeight / 2); #endif + }); } void StatisticalReportController::accept() { diff --git a/src/ugeneui/src/shtirlitz/StatisticalReportController.h b/src/ugeneui/src/shtirlitz/StatisticalReportController.h index 75638b3f0d2bd5aa035e98ee2ff98dff6a946cc7..e0419e98ddfd4e78c0051600aa59169780bc8726 100644 --- a/src/ugeneui/src/shtirlitz/StatisticalReportController.h +++ b/src/ugeneui/src/shtirlitz/StatisticalReportController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,11 +22,13 @@ #ifndef _U2_STATISTICAL_REPORT_CONTROLLER_H_ #define _U2_STATISTICAL_REPORT_CONTROLLER_H_ +#include <U2Gui/U2WebView.h> + #include "ui_StatisticalReport.h" namespace U2 { -class MultilingualHtmlView; +class SimpleWebViewBasedWidgetController; class StatisticalReportController : public QDialog, public Ui_StatisticalReport { Q_OBJECT @@ -36,11 +38,12 @@ public: public slots: void accept(); -protected: - void paintEvent(QPaintEvent *event); +private slots: + void sl_pageReady(); private: - MultilingualHtmlView* htmlView; + U2WebView* htmlView; + SimpleWebViewBasedWidgetController *htmlViewController; }; } diff --git a/src/ugeneui/src/task_view/TaskStatusBar.cpp b/src/ugeneui/src/task_view/TaskStatusBar.cpp index 79fba3a55912380cb5ed7db7723593c32f0b4057..015c8918adf23e5877036c772d75509c77b648d0 100644 --- a/src/ugeneui/src/task_view/TaskStatusBar.cpp +++ b/src/ugeneui/src/task_view/TaskStatusBar.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/task_view/TaskStatusBar.h b/src/ugeneui/src/task_view/TaskStatusBar.h index beef0d6114f1568ba4986e4328306220ba2f6669..510c97df3ca13d58456af35e0fe55ef5132b5e1d 100644 --- a/src/ugeneui/src/task_view/TaskStatusBar.h +++ b/src/ugeneui/src/task_view/TaskStatusBar.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/task_view/TaskViewController.cpp b/src/ugeneui/src/task_view/TaskViewController.cpp index 2c371875a7d64fd080db67dc2a776a8e25e8abb5..43dbe7fac393d66e03fab3a10de56a21fa715c53 100644 --- a/src/ugeneui/src/task_view/TaskViewController.cpp +++ b/src/ugeneui/src/task_view/TaskViewController.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -391,11 +391,11 @@ void TaskViewDockWidget::sl_itemExpanded(QTreeWidgetItem* qi) { return; } - const QList<Task*>& subs = ti->task->getSubtasks(); + const QList<QPointer<Task> >& subs = ti->task->getSubtasks(); assert(!subs.isEmpty()); QList<QTreeWidgetItem*> newSubtaskItems; - foreach(Task* sub, subs) { - newSubtaskItems.append(createTaskItem(sub)); + foreach(const QPointer<Task> &sub, subs) { + newSubtaskItems.append(createTaskItem(sub.data())); } ti->addChildren(newSubtaskItems); ti->updateVisual(); @@ -603,10 +603,10 @@ void TVTreeItem::detachFromTask() { taskReport = TVReportWindow::prepareReportHTML(task); } if (childCount() == 0) { - const QList<Task*>& subs = task->getSubtasks(); + const QList<QPointer<Task> >& subs = task->getSubtasks(); QList<QTreeWidgetItem*> newSubtaskItems; - foreach(Task* sub, subs) { - newSubtaskItems.append(new TVTreeItem(w, sub)); + foreach(const QPointer<Task> &sub, subs) { + newSubtaskItems.append(new TVTreeItem(w, sub.data())); } addChildren(newSubtaskItems); } diff --git a/src/ugeneui/src/task_view/TaskViewController.h b/src/ugeneui/src/task_view/TaskViewController.h index ab8e754a30d59c18cfb8bb4018a283402ce1babc..4652a359bb7b086f6f6e55edf1c36f874cf9f1ce 100644 --- a/src/ugeneui/src/task_view/TaskViewController.h +++ b/src/ugeneui/src/task_view/TaskViewController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/update/UgeneUpdater.cpp b/src/ugeneui/src/update/UgeneUpdater.cpp index 60d1ebe5b65cb01381dbb450e6956f41b59df20c..e8ddb5a4887a42bc6ec3835297ea90cb10b5cd7c 100644 --- a/src/ugeneui/src/update/UgeneUpdater.cpp +++ b/src/ugeneui/src/update/UgeneUpdater.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/update/UgeneUpdater.h b/src/ugeneui/src/update/UgeneUpdater.h index 2b2de87fd4f4b635c55e1cf6079d5ebaf5a7e134..e5372994c9f28cd35292b3f7b028f328b48762cb 100644 --- a/src/ugeneui/src/update/UgeneUpdater.h +++ b/src/ugeneui/src/update/UgeneUpdater.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or diff --git a/src/ugeneui/src/utils/MultilingualHtmlView.cpp b/src/ugeneui/src/utils/MultilingualHtmlView.cpp deleted file mode 100644 index ff4bb3777f657dbbd4e15e6239a91d062ddf103f..0000000000000000000000000000000000000000 --- a/src/ugeneui/src/utils/MultilingualHtmlView.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/** - * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> - * http://ugene.net - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ - -#include "MultilingualHtmlView.h" - -#include <U2Core/AppContext.h> -#include <U2Core/Settings.h> -#include <U2Core/U2SafePoints.h> - -#include <QDesktopServices> -#include <QWebElementCollection> -#include <QWebFrame> - - -namespace U2 { - -MultilingualHtmlView::MultilingualHtmlView(const QString& htmlPath, QWidget* parent) - : QWebView(parent), - loaded(false) { - setContextMenuPolicy(Qt::NoContextMenu); - loadPage(htmlPath); - page()->setLinkDelegationPolicy(QWebPage::DelegateExternalLinks); -} - -bool MultilingualHtmlView::isLoaded() const { - return loaded; -} - -void MultilingualHtmlView::sl_loaded(bool ok) { - disconnect(this, SIGNAL(loadFinished(bool)), this, SLOT(sl_loaded(bool))); - SAFE_POINT(ok, "Can not load page", ); - loaded = true; - - Settings* s = AppContext::getSettings(); - SAFE_POINT(s != NULL, "AppContext settings is NULL", ); - QString lang = s->getValue("UGENE_CURR_TRANSL", "en").toString(); - - QWebFrame* frame = page()->mainFrame(); - SAFE_POINT(frame != NULL, "MainFrame of webView page is NULL", ); - - QWebElementCollection otherLangsCollection = frame->findAllElements(QString(":not(:lang(%1))[lang]").arg(lang)); - for (int i = 0; i < otherLangsCollection.count(); i++) { - otherLangsCollection[i].setStyleProperty("display", "none"); - } - emit si_loaded(ok); -} - -void MultilingualHtmlView::sl_linkActivated(const QUrl &url) { - QDesktopServices::openUrl(url); -} - -void MultilingualHtmlView::loadPage(const QString& htmlPath) { - connect(this, SIGNAL(loadFinished(bool)), this, SLOT(sl_loaded(bool))); - connect(this, SIGNAL(linkClicked(QUrl)), this, SLOT(sl_linkActivated(QUrl))); - load(QUrl(htmlPath)); -} - -} // namespace diff --git a/src/ugeneui/src/welcome_page/WelcomePageController.cpp b/src/ugeneui/src/welcome_page/WelcomePageJsAgent.cpp similarity index 52% rename from src/ugeneui/src/welcome_page/WelcomePageController.cpp rename to src/ugeneui/src/welcome_page/WelcomePageJsAgent.cpp index 2407710e4fb7002f3bfb8162ddd46b9b0364dd22..32ef9d3d77a8afaf909b534f7f5ae5277302c27a 100644 --- a/src/ugeneui/src/welcome_page/WelcomePageController.cpp +++ b/src/ugeneui/src/welcome_page/WelcomePageJsAgent.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -28,79 +28,28 @@ #include <U2Core/Counter.h> #include <U2Core/IdRegistry.h> #include <U2Core/L10n.h> -#include <U2Core/Settings.h> +#include <U2Core/ProjectModel.h> #include <U2Core/Task.h> #include <U2Core/U2SafePoints.h> #include <U2Gui/MainWindow.h> +#include <U2Gui/WelcomePageAction.h> -#include "WelcomePageMdi.h" -#include "WelcomePageController.h" -#include "project_support/ProjectLoaderImpl.h" +#include "WelcomePageJsAgent.h" namespace U2 { -WelcomePageController::WelcomePageController() -: QObject(NULL), welcomePage(NULL) +WelcomePageJsAgent::WelcomePageJsAgent(QObject *parent) + : JavaScriptAgent(parent) { - MWMDIManager *mdiManager = getMdiManager(); - CHECK(NULL != mdiManager, ); - connect(mdiManager, SIGNAL(si_windowClosing(MWMDIWindow*)), SLOT(sl_onMdiClose(MWMDIWindow*))); } -MWMDIManager * WelcomePageController::getMdiManager() { - MainWindow *mainWindow = AppContext::getMainWindow(); - SAFE_POINT(NULL != mainWindow, L10N::nullPointerError("Main Window"), NULL); - - MWMDIManager *result = mainWindow->getMDIManager(); - SAFE_POINT(NULL != result, L10N::nullPointerError("MDI Manager"), NULL); - return result; -} - -void WelcomePageController::onPageLoaded() { - CHECK(NULL != welcomePage, ); - - MWMDIManager *mdiManager = getMdiManager(); - CHECK(NULL != mdiManager, ); - - if (!mdiManager->getWindows().contains(welcomePage)) { - sl_onRecentChanged(); - mdiManager->addMDIWindow(welcomePage); - } -} - -void WelcomePageController::sl_showPage() { - disconnect(AppContext::getTaskScheduler(), SIGNAL(si_noTasksInScheduler()), this, SLOT(sl_showPage())); - MWMDIManager *mdiManager = getMdiManager(); - CHECK(NULL != mdiManager, ); - - if (NULL != welcomePage) { - if (mdiManager->getWindows().contains(welcomePage)) { - mdiManager->activateWindow(welcomePage); - } // else: it means that the page has already been called but it is loading now - return; - } - - welcomePage = new WelcomePageMdi(tr("Start Page"), this); - if (welcomePage->isLoaded()) { // it is for the case of synchronous page loading - onPageLoaded(); - } -} - -void WelcomePageController::sl_onMdiClose(MWMDIWindow *mdi) { - CHECK(mdi == welcomePage, ); - welcomePage = NULL; +void WelcomePageJsAgent::message(const QString &message) { + coreLog.error(message); } -void WelcomePageController::sl_onRecentChanged() { - CHECK(NULL != welcomePage, ); - QStringList recentProjects = AppContext::getSettings()->getValue(SETTINGS_DIR + RECENT_PROJECTS_SETTINGS_NAME, QStringList(), true).toStringList(); - QStringList recentFiles = AppContext::getSettings()->getValue(SETTINGS_DIR + RECENT_ITEMS_SETTINGS_NAME, QStringList(), true).toStringList(); - welcomePage->updateRecent(recentProjects, recentFiles); -} - -void WelcomePageController::performAction(const QString &actionId) { +void WelcomePageJsAgent::performAction(const QString &actionId) { GRUNTIME_NAMED_COUNTER(cvar, tvar, "Welcome Page: " + actionId, ""); IdRegistry<WelcomePageAction> *welcomePageActions = AppContext::getWelcomePageActionRegistry(); SAFE_POINT(NULL != welcomePageActions, L10N::nullPointerError("Welcome Page Actions"), ); @@ -116,14 +65,14 @@ void WelcomePageController::performAction(const QString &actionId) { } } -void WelcomePageController::openUrl(const QString &urlId) { +void WelcomePageJsAgent::openUrl(const QString &urlId) { GRUNTIME_NAMED_COUNTER(cvar, tvar, "Welcome Page: " + urlId, ""); QString url = getUrlById(urlId); SAFE_POINT(!url.isEmpty(), "Unknown URL ID: " + urlId, ); QDesktopServices::openUrl(QUrl(url)); } -void WelcomePageController::openFile(const QString &url) { +void WelcomePageJsAgent::openFile(const QString &url) { GCOUNTER(cvar, tvar, "Welcome Page: recent files"); QList<GUrl> urls; urls << url; @@ -132,7 +81,7 @@ void WelcomePageController::openFile(const QString &url) { AppContext::getTaskScheduler()->registerTopLevelTask(t); } -QString WelcomePageController::getUrlById(const QString &urlId) { +QString WelcomePageJsAgent::getUrlById(const QString &urlId) { if ("facebook" == urlId) { return "https://www.facebook.com/groups/ugene"; } @@ -142,18 +91,12 @@ QString WelcomePageController::getUrlById(const QString &urlId) { if ("linkedin" == urlId) { return "https://www.linkedin.com/profile/view?id=200543736"; } - if ("google_plus" == urlId) { - return "https://plus.google.com/u/0/110549832082666204900"; - } if ("youtube" == urlId) { return "http://www.youtube.com/user/UniproUGENE"; } if ("vkontakte" == urlId) { return "http://vk.com/uniprougene"; } - if ("mendeley" == urlId) { - return "http://www.mendeley.com/profiles/ugene-unipro/"; - } if ("rss" == urlId) { return "http://feeds2.feedburner.com/NewsOfUgeneProject"; } @@ -163,4 +106,4 @@ QString WelcomePageController::getUrlById(const QString &urlId) { return ""; } -} // U2 +} // namespace U2 diff --git a/src/ugeneui/src/welcome_page/WelcomePageJsAgent.h b/src/ugeneui/src/welcome_page/WelcomePageJsAgent.h new file mode 100644 index 0000000000000000000000000000000000000000..83d0294c555a356c448f46d110765016184404dd --- /dev/null +++ b/src/ugeneui/src/welcome_page/WelcomePageJsAgent.h @@ -0,0 +1,47 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef _U2_WELCOME_PAGE_JS_AGENT_H_ +#define _U2_WELCOME_PAGE_JS_AGENT_H_ + +#include <U2Gui/JavaScriptAgent.h> + +namespace U2 { + +class WelcomePageJsAgent : public JavaScriptAgent { + Q_OBJECT +public: + WelcomePageJsAgent(QObject* parent); + + void message(const QString &message); + +public slots: + void performAction(const QString &actionId); + void openUrl(const QString &urlId); + void openFile(const QString &url); + +private: + static QString getUrlById(const QString &urlId); +}; + +} // namespace U2 + +#endif // _U2_WELCOME_PAGE_JS_AGENT_H_ diff --git a/src/ugeneui/src/welcome_page/WelcomePageMdi.cpp b/src/ugeneui/src/welcome_page/WelcomePageMdi.cpp index 0ea3639354f79c8e9378f5059aa0e42f59c9f566..7a1711edd8aa32fdea85bf5d36ecc0b2f96bf67f 100644 --- a/src/ugeneui/src/welcome_page/WelcomePageMdi.cpp +++ b/src/ugeneui/src/welcome_page/WelcomePageMdi.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,21 +19,33 @@ * MA 02110-1301, USA. */ -#include "WelcomePageWidget.h" -#include "WelcomePageMdi.h" - #include <QVBoxLayout> +#include "WelcomePageMdi.h" +#include "WelcomePageMdiController.h" +#include "WelcomePageWidget.h" + namespace U2 { -WelcomePageMdi::WelcomePageMdi(const QString &title, WelcomePageController *controller) +WelcomePageMdi::WelcomePageMdi(const QString &title, WelcomePageMdiController *controller) : MWMDIWindow(title), controller(controller) { QVBoxLayout *l = new QVBoxLayout(this); l->setMargin(0); - widget = new WelcomePageWidget(this, controller); + widget = new WelcomePageWidget(this); + connect(widget, SIGNAL(si_loaded()), controller, SLOT(sl_onPageLoaded())); l->addWidget(widget); + + installEventFilter(this); +} + +bool WelcomePageMdi::eventFilter(QObject *obj, QEvent *event) { + if (QEvent::Show == event->type()) { + widget->adjustSize(); + widget->updateGeometry(); + } + return QWidget::eventFilter(obj, event); } void WelcomePageMdi::updateRecent(const QStringList &recentProjects, const QStringList &recentFiles) { diff --git a/src/ugeneui/src/welcome_page/WelcomePageMdi.h b/src/ugeneui/src/welcome_page/WelcomePageMdi.h index 50a33f7c3fd951dff2239ef177be8b2111c38a59..f5b3ae2bff0878946fb9b89ad65bde6b7ff9448a 100644 --- a/src/ugeneui/src/welcome_page/WelcomePageMdi.h +++ b/src/ugeneui/src/welcome_page/WelcomePageMdi.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -26,19 +26,22 @@ namespace U2 { -class WelcomePageController; +class WelcomePageMdiController; class WelcomePageWidget; class WelcomePageMdi : public MWMDIWindow { Q_OBJECT public: - WelcomePageMdi(const QString &title, WelcomePageController *controller); + WelcomePageMdi(const QString &title, WelcomePageMdiController *controller); void updateRecent(const QStringList &recentProjects, const QStringList &recentFiles); bool isLoaded() const; +protected: + bool eventFilter(QObject *obj, QEvent *event); + private: - WelcomePageController *controller; + WelcomePageMdiController *controller; WelcomePageWidget *widget; }; diff --git a/src/ugeneui/src/welcome_page/WelcomePageMdiController.cpp b/src/ugeneui/src/welcome_page/WelcomePageMdiController.cpp new file mode 100644 index 0000000000000000000000000000000000000000..54c5716e4d04c7c282db4382df65d38aae991288 --- /dev/null +++ b/src/ugeneui/src/welcome_page/WelcomePageMdiController.cpp @@ -0,0 +1,95 @@ +/** + * UGENE - Integrated Bioinformatics Tools. + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> + * http://ugene.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include <U2Core/AppContext.h> +#include <U2Core/L10n.h> +#include <U2Core/Settings.h> +#include <U2Core/Task.h> +#include <U2Core/U2SafePoints.h> + +#include "WelcomePageMdi.h" +#include "WelcomePageMdiController.h" +#include "project_support/ProjectLoaderImpl.h" + +namespace U2 { + +WelcomePageMdiController::WelcomePageMdiController() + : QObject(NULL), + welcomePage(NULL) +{ + MWMDIManager *mdiManager = getMdiManager(); + CHECK(NULL != mdiManager, ); + + connect(mdiManager, SIGNAL(si_windowClosing(MWMDIWindow*)), SLOT(sl_onMdiClose(MWMDIWindow*))); +} + +MWMDIManager * WelcomePageMdiController::getMdiManager() { + MainWindow *mainWindow = AppContext::getMainWindow(); + SAFE_POINT(NULL != mainWindow, L10N::nullPointerError("Main Window"), NULL); + + MWMDIManager *result = mainWindow->getMDIManager(); + SAFE_POINT(NULL != result, L10N::nullPointerError("MDI Manager"), NULL); + return result; +} + +void WelcomePageMdiController::sl_onPageLoaded() { + CHECK(NULL != welcomePage, ); + + MWMDIManager *mdiManager = getMdiManager(); + CHECK(NULL != mdiManager, ); + + if (!mdiManager->getWindows().contains(welcomePage)) { + sl_onRecentChanged(); + mdiManager->addMDIWindow(welcomePage); + } +} + +void WelcomePageMdiController::sl_showPage() { + disconnect(AppContext::getTaskScheduler(), SIGNAL(si_noTasksInScheduler()), this, SLOT(sl_showPage())); + MWMDIManager *mdiManager = getMdiManager(); + CHECK(NULL != mdiManager, ); + + if (NULL != welcomePage) { + if (mdiManager->getWindows().contains(welcomePage)) { + mdiManager->activateWindow(welcomePage); + } // else: it means that the page has already been called but it is loading now + return; + } + + welcomePage = new WelcomePageMdi(tr("Start Page"), this); + if (welcomePage->isLoaded()) { // it is for the case of synchronous page loading + sl_onPageLoaded(); + } +} + +void WelcomePageMdiController::sl_onMdiClose(MWMDIWindow *mdi) { + CHECK(mdi == welcomePage, ); + welcomePage = NULL; +} + +void WelcomePageMdiController::sl_onRecentChanged() { + CHECK(NULL != welcomePage, ); + QStringList recentProjects = AppContext::getSettings()->getValue(SETTINGS_DIR + RECENT_PROJECTS_SETTINGS_NAME, QStringList(), true).toStringList(); + QStringList recentFiles = AppContext::getSettings()->getValue(SETTINGS_DIR + RECENT_ITEMS_SETTINGS_NAME, QStringList(), true).toStringList(); + welcomePage->updateRecent(recentProjects, recentFiles); +} + +} // U2 diff --git a/src/ugeneui/src/welcome_page/WelcomePageController.h b/src/ugeneui/src/welcome_page/WelcomePageMdiController.h similarity index 69% rename from src/ugeneui/src/welcome_page/WelcomePageController.h rename to src/ugeneui/src/welcome_page/WelcomePageMdiController.h index 5f03805244301d71f5e381031876ab03b9ddb0b9..e2884e4b82db04b52e9fe99c7dc4d632c7c6386b 100644 --- a/src/ugeneui/src/welcome_page/WelcomePageController.h +++ b/src/ugeneui/src/welcome_page/WelcomePageMdiController.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -19,10 +19,8 @@ * MA 02110-1301, USA. */ -#ifndef _U2_WELCOME_PAGE_CONTROLLER_H_ -#define _U2_WELCOME_PAGE_CONTROLLER_H_ - -#include <QObject> +#ifndef _U2_WELCOME_PAGE_MDI_CONTROLLER_H_ +#define _U2_WELCOME_PAGE_MDI_CONTROLLER_H_ #include <U2Core/U2OpStatus.h> @@ -32,27 +30,18 @@ class MWMDIManager; class MWMDIWindow; class WelcomePageMdi; -class WelcomePageController : public QObject { +class WelcomePageMdiController : public QObject { Q_OBJECT public: - WelcomePageController(); - - void onPageLoaded(); + WelcomePageMdiController(); -public slots: +private slots: + void sl_onPageLoaded(); void sl_showPage(); void sl_onRecentChanged(); - - // javascript - void performAction(const QString &actionId); - void openUrl(const QString &urlId); - void openFile(const QString &url); - -private slots: void sl_onMdiClose(MWMDIWindow *mdi); private: - static QString getUrlById(const QString &urlId); static MWMDIManager * getMdiManager(); private: @@ -61,4 +50,4 @@ private: } // U2 -#endif // _U2_WELCOME_PAGE_CONTROLLER_H_ +#endif // _U2_WELCOME_PAGE_MDI_CONTROLLER_H_ diff --git a/src/ugeneui/src/welcome_page/WelcomePageWidget.cpp b/src/ugeneui/src/welcome_page/WelcomePageWidget.cpp index c7c92910c1017d5403cdc457dbd10f0dd9ec433c..24b74b47017438b88fa8a3737f38b7a8f7485491 100644 --- a/src/ugeneui/src/welcome_page/WelcomePageWidget.cpp +++ b/src/ugeneui/src/welcome_page/WelcomePageWidget.cpp @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -25,17 +25,17 @@ #include <QFile> #include <QFileInfo> #include <QTextStream> -#include <QWebElement> -#include <QWebFrame> #include <U2Core/AppContext.h> +#include <U2Core/Log.h> #include <U2Core/Settings.h> #include <U2Core/U2SafePoints.h> -#include "WelcomePageController.h" -#include "main_window/MainWindowImpl.h" +#include <U2Gui/SimpleWebViewBasedWidgetController.h> +#include "WelcomePageJsAgent.h" #include "WelcomePageWidget.h" +#include "main_window/MainWindowImpl.h" namespace U2 { @@ -43,52 +43,57 @@ namespace { const int MAX_RECENT = 7; } -WelcomePageWidget::WelcomePageWidget(QWidget *parent, WelcomePageController *controller) - : MultilingualHtmlView("qrc:///ugene/html/welcome_page.html", parent), - controller(controller) +WelcomePageWidget::WelcomePageWidget(QWidget *parent) + : U2WebView(parent) { installEventFilter(this); setObjectName("webView"); - addController(); -} -void WelcomePageWidget::sl_loaded(bool ok) { - MultilingualHtmlView::sl_loaded(ok); - addController(); + controller = new SimpleWebViewBasedWidgetController(this, new WelcomePageJsAgent(this)); + connect(controller, SIGNAL(si_pageReady()), SLOT(sl_loaded())); + controller->loadPage("qrc:///ugene/html/welcome_page.html"); } void WelcomePageWidget::updateRecent(const QStringList &recentProjects, const QStringList &recentFiles) { updateRecentFilesContainer("recent_projects", recentProjects, tr("No opened projects yet")); updateRecentFilesContainer("recent_files", recentFiles, tr("No opened files yet")); - page()->mainFrame()->evaluateJavaScript("updateLinksVisibility()"); + controller->runJavaScript("updateLinksVisibility()"); } void WelcomePageWidget::updateRecentFilesContainer(const QString &id, const QStringList &files, const QString &message) { - static const QString divTemplate = "<div id=\"%1\" class=\"recent_items_content\">%2</div>"; - static const QString linkTemplate = "<a class=\"recentLink\" href=\"#\" onclick=\"ugene.openFile('%1')\" title=\"%1\">- %2</a>"; - - QWebElement doc = page()->mainFrame()->documentElement(); - QWebElement recentFilesDiv = doc.findFirst("#" + id); - SAFE_POINT(!recentFilesDiv.isNull(), "No recent files container", ); - recentFilesDiv.removeAllChildren(); - - QStringList links; + controller->runJavaScript(QString("clearRecent(\"%1\")").arg(id)); + bool emptyList = true; foreach (const QString &file, files.mid(0, MAX_RECENT)) { if (file.isEmpty()) { continue; } - links << linkTemplate.arg(file).arg(QFileInfo(file).fileName()); + emptyList = false; + addRecentItem(id, file); + } + + if (emptyList) { + addNoItems(id, message); } - QString result = message; - if (!links.isEmpty()) { - result = links.join("\n"); +} + +void WelcomePageWidget::addRecentItem(const QString &id, const QString &file) { + if (id.contains("recent_files")) { + controller->runJavaScript(QString("addRecentItem(\"recent_files\", \"%1\", \"%2\")").arg(file).arg(QFileInfo(file).fileName())); + } else if (id.contains("recent_projects")) { + controller->runJavaScript(QString("addRecentItem(\"recent_projects\", \"%1\", \"%2\")").arg(file).arg(QFileInfo(file).fileName())); + } else { + SAFE_POINT(false, "Unknown containerId", ); } - recentFilesDiv.setOuterXml(divTemplate.arg(id).arg(result)); } -void WelcomePageWidget::addController() { - page()->mainFrame()->addToJavaScriptWindowObject("ugene", controller); - controller->onPageLoaded(); +void WelcomePageWidget::addNoItems(const QString &id, const QString &message) { + if (id.contains("recent_files")) { + controller->runJavaScript(QString("addRecentItem(\"recent_files\", \"%1\", \"\")").arg(message)); + } else if (id.contains("recent_projects")) { + controller->runJavaScript(QString("addRecentItem(\"recent_projects\", \"%1\", \"\")").arg(message)); + } else { + SAFE_POINT(false, "Unknown containerId", ); + } } void WelcomePageWidget::dragEnterEvent(QDragEnterEvent *event) { @@ -103,6 +108,11 @@ void WelcomePageWidget::dragMoveEvent(QDragMoveEvent *event) { MainWindowDragNDrop::dragMoveEvent(event); } +void WelcomePageWidget::sl_loaded() { + emit si_loaded(); + controller->runJavaScript("document.activeElement.blur();"); +} + bool WelcomePageWidget::eventFilter(QObject *watched, QEvent *event) { CHECK(this == watched, false); switch (event->type()) { @@ -123,4 +133,8 @@ bool WelcomePageWidget::eventFilter(QObject *watched, QEvent *event) { } } +bool WelcomePageWidget::isLoaded() const { + return controller->isPageReady(); +} + } // U2 diff --git a/src/ugeneui/src/welcome_page/WelcomePageWidget.h b/src/ugeneui/src/welcome_page/WelcomePageWidget.h index 18df741000a8a74cc12279e6eb74ce88a42c7af7..aef66f2fe5a1e72bfbbb36d44a3cf3a15b5cccd2 100644 --- a/src/ugeneui/src/welcome_page/WelcomePageWidget.h +++ b/src/ugeneui/src/welcome_page/WelcomePageWidget.h @@ -1,6 +1,6 @@ /** * UGENE - Integrated Bioinformatics Tools. - * Copyright (C) 2008-2018 UniPro <ugene@unipro.ru> + * Copyright (C) 2008-2019 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or @@ -22,35 +22,39 @@ #ifndef _U2_WELCOME_PAGE_WIDGET_H_ #define _U2_WELCOME_PAGE_WIDGET_H_ -#include "utils/MultilingualHtmlView.h" +#include <U2Gui/U2WebView.h> namespace U2 { -class WelcomePageController; +class SimpleWebViewBasedWidgetController; -class WelcomePageWidget : public MultilingualHtmlView { +class WelcomePageWidget : public U2WebView { Q_OBJECT public: - WelcomePageWidget(QWidget *parent, WelcomePageController *controller); + WelcomePageWidget(QWidget *parent); void updateRecent(const QStringList &recentProjects, const QStringList &recentFiles); bool eventFilter(QObject *watched, QEvent *event); + bool isLoaded() const; + protected: void dragEnterEvent(QDragEnterEvent *event); void dropEvent(QDropEvent *event); void dragMoveEvent(QDragMoveEvent *event); private slots: - void sl_loaded(bool ok); + void sl_loaded(); + +signals: + void si_loaded(); private: void updateRecentFilesContainer(const QString &id, const QStringList &files, const QString &message); - void addController(); + void addRecentItem(const QString &id, const QString &file); + void addNoItems(const QString &id, const QString &message); -private: - bool loaded; - WelcomePageController *controller; + SimpleWebViewBasedWidgetController *controller; }; } // U2 diff --git a/src/ugeneui/transl/russian.ts b/src/ugeneui/transl/russian.ts index c758d326890e6a711be1b2c6b2c5f306282b5c54..9722db238c4177369f0d9bc054d20a1d3f1696e8 100644 --- a/src/ugeneui/transl/russian.ts +++ b/src/ugeneui/transl/russian.ts @@ -29,9 +29,13 @@ <context> <name>AppSettingsDialog</name> <message> - <location filename="../src/app_settings/AppSettingsDialog.ui" line="14"/> <source>AppSettingsDialog</source> - <translation>ÐаÑтройки</translation> + <translation type="vanished">ÐаÑтройки</translation> + </message> + <message> + <location filename="../src/app_settings/AppSettingsDialog.ui" line="14"/> + <source>Application Settings</source> + <translation type="unfinished"></translation> </message> <message> <location filename="../src/app_settings/AppSettingsDialog.ui" line="50"/> @@ -471,17 +475,17 @@ p, li { white-space: pre-wrap; } <context> <name>QObject</name> <message> - <location filename="../src/Main.cpp" line="743"/> + <location filename="../src/Main.cpp" line="832"/> <source>UGENE started</source> <translation>UGENE готов к работе</translation> </message> <message> - <location filename="../src/Main.cpp" line="744"/> + <location filename="../src/Main.cpp" line="833"/> <source>UGENE version: %1 %2-bit</source> <translation>ВерÑÐ¸Ñ UGENE: %1 %2-бит</translation> </message> <message> - <location filename="../src/Main.cpp" line="745"/> + <location filename="../src/Main.cpp" line="834"/> <source>UGENE distribution: %1</source> <translation>РаÑпределение UGENE: %1</translation> </message> @@ -711,7 +715,7 @@ p, li { white-space: pre-wrap; } <context> <name>U2::AppContextImpl</name> <message> - <location filename="../src/Main.cpp" line="490"/> + <location filename="../src/Main.cpp" line="576"/> <source>Style not available %1</source> <translation type="unfinished">Стиль не доÑтупен: %1</translation> </message> @@ -871,7 +875,7 @@ p, li { white-space: pre-wrap; } <context> <name>U2::DisableProjectViewTask</name> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="1227"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="1218"/> <source>Disable project viewer</source> <translation>Disable project viewer</translation> </message> @@ -908,52 +912,52 @@ p, li { white-space: pre-wrap; } <translation type="vanished">подробнее</translation> </message> <message> - <location filename="../src/project_support/DocumentFormatSelectorController.cpp" line="114"/> + <location filename="../src/project_support/DocumentFormatSelectorController.cpp" line="115"/> <source>more..</source> <translation>подробнее..</translation> </message> <message> - <location filename="../src/project_support/DocumentFormatSelectorController.cpp" line="128"/> + <location filename="../src/project_support/DocumentFormatSelectorController.cpp" line="129"/> <source>Choose format manually</source> <translation>Выбрать формат</translation> </message> <message> - <location filename="../src/project_support/DocumentFormatSelectorController.cpp" line="185"/> + <location filename="../src/project_support/DocumentFormatSelectorController.cpp" line="186"/> <source>Not matched</source> <translation>Ðе ÑоответÑтвует</translation> </message> <message> - <location filename="../src/project_support/DocumentFormatSelectorController.cpp" line="188"/> + <location filename="../src/project_support/DocumentFormatSelectorController.cpp" line="189"/> <source>Very low similarity</source> <translation>Очень Ð½Ð¸Ð·ÐºÐ°Ñ ÑхожеÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/project_support/DocumentFormatSelectorController.cpp" line="191"/> + <location filename="../src/project_support/DocumentFormatSelectorController.cpp" line="192"/> <source>Low similarity</source> <translation>ÐÐ¸Ð·ÐºÐ°Ñ ÑхожеÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/project_support/DocumentFormatSelectorController.cpp" line="194"/> + <location filename="../src/project_support/DocumentFormatSelectorController.cpp" line="195"/> <source>Average similarity</source> <translation>СреднÑÑ ÑхожеÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/project_support/DocumentFormatSelectorController.cpp" line="197"/> + <location filename="../src/project_support/DocumentFormatSelectorController.cpp" line="198"/> <source>High similarity</source> <translation>Ð’Ñ‹ÑÐ¾ÐºÐ°Ñ ÑхожеÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/project_support/DocumentFormatSelectorController.cpp" line="200"/> + <location filename="../src/project_support/DocumentFormatSelectorController.cpp" line="201"/> <source>Very high similarity</source> <translation>Очень выÑÐ¾ÐºÐ°Ñ ÑхожеÑÑ‚ÑŒ</translation> </message> <message> - <location filename="../src/project_support/DocumentFormatSelectorController.cpp" line="202"/> + <location filename="../src/project_support/DocumentFormatSelectorController.cpp" line="203"/> <source>Perfect match</source> <translation>Идеальное Ñовпадение</translation> </message> <message> - <location filename="../src/project_support/DocumentFormatSelectorController.cpp" line="210"/> + <location filename="../src/project_support/DocumentFormatSelectorController.cpp" line="211"/> <source>Format details for '%1' format</source> <translation>Детали Ð´Ð»Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð° '%1'</translation> </message> @@ -983,7 +987,7 @@ p, li { white-space: pre-wrap; } <context> <name>U2::DocumentUpdater</name> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="143"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="144"/> <source>Project contains NULL document</source> <translation>Project contains NULL document</translation> </message> @@ -992,49 +996,47 @@ p, li { white-space: pre-wrap; } <translation type="obsolete">Документ '%1' был удален из указанной папки. Он будет удален из текущего проекта.</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="215"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="216"/> <source>The document '%1' was removed from its original folder. Do you wish to save it? Otherwise, it will be removed from the current project.</source> <translation>Документ '%1' был удален из указанной папки. Сохранить его? Иначе он будет удален из текущего проекта.</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="225"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="226"/> <source>Save as</source> <translation>Сохранить как</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="280"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="281"/> <source>Several documents were removed from their original folders. Therefore, they will be deleted from the current project. Find the full list below.</source> <translation>ÐеÑколько документов были удалены из указанных папок. Они будут удалены из текущего проекта. Полный ÑпиÑок приведен ниже.</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="282"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="283"/> <source>The document '%1' was removed from its original folder. Therefore, it will be deleted from the current project.</source> <translation>Документ '%1' был удален из указанной папки. Он будет удален из текущего проекта.</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="323"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="324"/> <source>Document '%1' was modified. Do you want to reload it? Note that reloading may cause closing of some views associated with objects from the document.</source> <translation>Документ '%1' был изменен. Загрузить обновленный документ? Загрузка обновленного документа может закрыть некоторые объекты документа.</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="389"/> <source>Reload documents task</source> - <translation>Reload documents task</translation> + <translation type="vanished">Reload documents task</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="413"/> <source>Unable to unload '%1'. Unload error: '%2'</source> - <translation>Unable to unload '%1'. Unload error: '%2'</translation> + <translation type="vanished">Unable to unload '%1'. Unload error: '%2'</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="420"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="411"/> <source>Restore state task</source> <translation>Restore state task</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="434"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="425"/> <source>Reload documents and restore view state task</source> <translation>Reload documents and restore view state task</translation> </message> @@ -1050,7 +1052,7 @@ Note that reloading may cause closing of some views associated with objects from <context> <name>U2::EnableProjectViewTask</name> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="1215"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="1206"/> <source>Enable ProjectView</source> <translation>Enable ProjectView</translation> </message> @@ -1125,17 +1127,17 @@ Note that reloading may cause closing of some views associated with objects from <context> <name>U2::GTest_ExportProject</name> <message> - <location filename="../src/project_support/ProjectTasksGui.cpp" line="489"/> + <location filename="../src/project_support/ProjectTasksGui.cpp" line="490"/> <source>GTest_ExportProject::prepare unable to clean folder for exporting</source> <translation>GTest_ExportProject::prepare unable to clean folder for exporting</translation> </message> <message> - <location filename="../src/project_support/ProjectTasksGui.cpp" line="494"/> + <location filename="../src/project_support/ProjectTasksGui.cpp" line="495"/> <source>GTest_ExportProject::prepare unable to create folder for exporting</source> <translation>GTest_ExportProject::prepare unable to create folder for exporting</translation> </message> <message> - <location filename="../src/project_support/ProjectTasksGui.cpp" line="514"/> + <location filename="../src/project_support/ProjectTasksGui.cpp" line="515"/> <source>GTest_ExportProject::cleanup unable to delete exported files</source> <translation>GTest_ExportProject::cleanup unable to delete exported files</translation> </message> @@ -1143,17 +1145,17 @@ Note that reloading may cause closing of some views associated with objects from <context> <name>U2::GTest_LoadDocumentFromProject</name> <message> - <location filename="../src/project_support/ProjectTasksGui.cpp" line="575"/> + <location filename="../src/project_support/ProjectTasksGui.cpp" line="578"/> <source>No project loaded</source> <translation>No project loaded</translation> </message> <message> - <location filename="../src/project_support/ProjectTasksGui.cpp" line="579"/> + <location filename="../src/project_support/ProjectTasksGui.cpp" line="582"/> <source>Document name to load is empty</source> <translation>Document name to load is empty</translation> </message> <message> - <location filename="../src/project_support/ProjectTasksGui.cpp" line="594"/> + <location filename="../src/project_support/ProjectTasksGui.cpp" line="597"/> <source>File %1 not found in project</source> <translation>File %1 not found in project</translation> </message> @@ -1253,17 +1255,17 @@ Note that reloading may cause closing of some views associated with objects from <location filename="../src/main_window/MDIManagerImpl.cpp" line="75"/> <location filename="../src/main_window/MDIManagerImpl.cpp" line="77"/> <source>Window layout</source> - <translation type="unfinished"></translation> + <translation>РаÑположение окон</translation> </message> <message> <location filename="../src/main_window/MDIManagerImpl.cpp" line="80"/> <source>Multiple documents</source> - <translation type="unfinished">ÐеÑколько документов</translation> + <translation>ÐеÑколько документов</translation> </message> <message> <location filename="../src/main_window/MDIManagerImpl.cpp" line="85"/> <source>Tabbed documents</source> - <translation type="unfinished">Режим вкладок</translation> + <translation>Режим вкладок</translation> </message> <message> <location filename="../src/main_window/MDIManagerImpl.cpp" line="90"/> @@ -1326,109 +1328,109 @@ Note that reloading may cause closing of some views associated with objects from <context> <name>U2::MainWindowImpl</name> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="254"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="255"/> <source>Exit</source> <translation>Выход</translation> </message> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="385"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="386"/> <source>Shutdown already in process. Close UGENE immediately?</source> <translation>Программа уже в процеÑÑе выключениÑ. Закрыть немедленно?</translation> </message> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="386"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="387"/> <source>Close</source> <translation>Закрыть</translation> </message> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="387"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="388"/> <source>Wait</source> <translation>Подождать</translation> </message> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="258"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="259"/> <source>About</source> <translation>О программе</translation> </message> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="247"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="248"/> <source>Application paste shortcut is triggered</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="265"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="266"/> <source>Visit UGENE Web Site</source> <translation>Перейти на Ñайт UGENE</translation> </message> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="269"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="270"/> <source>View UGENE Documentation Online</source> <translation>Открыть документацию UGENE</translation> </message> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="273"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="274"/> <source>Check for Updates</source> <translation>Проверить обновлениÑ</translation> </message> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="277"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="278"/> <source>Open UGENE User Manual</source> <translation>Открыть оÑновное руководÑтво UGENE</translation> </message> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="281"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="282"/> <source>Open Workflow Designer Manual</source> <translation>Открыть руководÑтво дизайнера вычиÑлительных Ñхем</translation> </message> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="285"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="286"/> <source>Open Query Designer Manual</source> <translation>Открыть руководÑтво дизайнера вычиÑлительных запроÑов</translation> </message> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="289"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="290"/> <source>Open Start Page</source> <translation>Открыть Ñтартовую Ñтраницу</translation> </message> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="293"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="294"/> <source>Crash UGENE</source> <translation>Падение UGENE</translation> </message> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="298"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="299"/> <source>Enable Terminal Usage...</source> <translation>Разрешить иÑпользование терминала...</translation> </message> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="465"/> - <location filename="../src/main_window/MainWindowImpl.cpp" line="470"/> - <location filename="../src/main_window/MainWindowImpl.cpp" line="478"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="466"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="471"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="479"/> <source>Installation failed</source> <translation>Installation failed</translation> </message> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="465"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="466"/> <source>Failed to enable terminal usage: couldn't install '%1'</source> <translation>Failed to enable terminal usage: couldn't install '%1'</translation> </message> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="470"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="471"/> <source>Failed to enable terminal usage: not authorized</source> <translation>Failed to enable terminal usage: not authorized</translation> </message> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="478"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="479"/> <source>Failed to enable terminal usage: authorization failure</source> <translation>Failed to enable terminal usage: authorization failure</translation> </message> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="483"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="484"/> <source>Installation successful</source> <translation>Installation successful</translation> </message> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="483"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="484"/> <source>Terminal usage successfully enabled. Now you can type ugene in command line to start UGENE.</source> @@ -1437,12 +1439,12 @@ Now you can type ugene in command line to start UGENE.</source> Now you can type ugene in command line to start UGENE.</translation> </message> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="496"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="497"/> <source>Can not open %1 file. </source> <translation>Ðевозможно открыть файл %1. </translation> </message> <message> - <location filename="../src/main_window/MainWindowImpl.cpp" line="497"/> + <location filename="../src/main_window/MainWindowImpl.cpp" line="498"/> <source>You can try open it manualy from here: %1 or view online documentation. @@ -1522,98 +1524,91 @@ Do you want view online documentation?</source> <context> <name>U2::PluginViewerController</name> <message> - <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="111"/> + <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="107"/> <source>Plugins...</source> <translation>Модули...</translation> </message> <message> - <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="72"/> + <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="68"/> <source>Plugin Viewer</source> <translation>Управление модулÑми</translation> </message> <message> - <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="116"/> <source>Add plugin</source> - <translation>Добавить модуль</translation> + <translation type="vanished">Добавить модуль</translation> </message> <message> - <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="119"/> <source>Enable plugin</source> - <translation>Включить модуль</translation> + <translation type="vanished">Включить модуль</translation> </message> <message> - <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="122"/> <source>Remove plugin</source> - <translation>Выключить модуль</translation> + <translation type="vanished">Выключить модуль</translation> </message> <message> - <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="125"/> + <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="112"/> <source>Enable service</source> <translation>ЗапуÑтить ÑервиÑ</translation> </message> <message> - <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="128"/> + <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="115"/> <source>Disable service</source> <translation>ОÑтановить ÑервиÑ</translation> </message> <message> - <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="274"/> <source>Select plugin file</source> - <translation>Выбрать файл модулÑ</translation> + <translation type="vanished">Выбрать файл модулÑ</translation> </message> <message> - <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="277"/> <source>Plugin files</source> - <translation>Файлы модулÑ</translation> + <translation type="vanished">Файлы модулÑ</translation> </message> <message> - <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="295"/> <source>Error</source> - <translation>Ошибка</translation> + <translation type="vanished">Ошибка</translation> </message> <message> - <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="361"/> + <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="298"/> <source>Select a plugin to view more information about it.</source> <translation>Выберите модуль, чтобы увидеть дополни тельную информацию о нем.</translation> </message> <message> - <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="441"/> + <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="347"/> <source>Hide License</source> <translation>Скрыть лицензию</translation> </message> <message> - <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="458"/> + <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="364"/> <source>License file not found.</source> <translation>Лицензионный файл не найден.</translation> </message> <message> - <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="465"/> + <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="371"/> <source>Show License</source> <translation>Показать лицензию</translation> </message> <message> - <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="480"/> + <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="386"/> <source>Plugin</source> <translation>Модуль</translation> </message> <message> - <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="485"/> <source>to remove after restart</source> - <translation>удалить поÑле перезапуÑка</translation> + <translation type="vanished">удалить поÑле перезапуÑка</translation> </message> <message> - <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="486"/> - <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="519"/> + <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="389"/> + <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="422"/> <source>On</source> <translation>Запущен</translation> </message> <message> - <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="516"/> + <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="419"/> <source>Service</source> <translation>СервиÑ</translation> </message> <message> - <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="520"/> + <location filename="../src/plugin_viewer/PluginViewerController.cpp" line="423"/> <source>Off</source> <translation>ОÑтановлен</translation> </message> @@ -1898,88 +1893,88 @@ Do you want view online documentation?</source> <context> <name>U2::ProjectViewImpl</name> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="468"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="459"/> <source>ProjectView</source> <translation>Ðавигатор проектов</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="468"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="459"/> <source>ProjectView service provides basic project visualization and manipulation functionality</source> <translation>Ðавигатор проектов обеÑпечивает оÑновные операции над проектами</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="511"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="502"/> <source>Save selected documents</source> <translation>Сохранить выбранные документы</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="515"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="506"/> <source>Mark as circular</source> <translation>Работать как Ñ ÐºÑ€ÑƒÐ³Ð¾Ð²Ð¾Ð¹</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="519"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="510"/> <source>Relocate...</source> <translation>ПеремеÑтить...</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="523"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="514"/> <source>Export document...</source> <translation>ÐкÑпортировать документ...</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="528"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="519"/> <source>Open containing folder</source> <translation>Открыть папку, Ñодержащую документ</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="683"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="674"/> <source>-</source> <translation>-</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="764"/> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="806"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="755"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="797"/> <source>Active views</source> <translation>Открытые окна</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="872"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="863"/> <source>Activate view: %1</source> <translation>ПереключитьÑÑ Ð½Ð° %1</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="886"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="877"/> <source>Open new view: %1</source> <translation>Открыть как %1</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="901"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="892"/> <source>Open saved view '%1' with a state '%2'</source> <translation>Открыть закладку %1 (%2)</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="949"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="940"/> <source>Add to view: %1</source> <translation>Добавить в %1</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="995"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="986"/> <source>Open view</source> <translation>Открыть окно</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="996"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="987"/> <source>Add to view</source> <translation>Добавить в окно</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="1158"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="1149"/> <source>Select new file location</source> <translation>Выбор нового адреÑа</translation> </message> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="1116"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="1107"/> <source>Error</source> <translation>Ошибка</translation> </message> @@ -1994,7 +1989,7 @@ Do you want view online documentation?</source> <context> <name>U2::ProjectViewWidget</name> <message> - <location filename="../src/project_view/ProjectViewImpl.cpp" line="443"/> + <location filename="../src/project_view/ProjectViewImpl.cpp" line="434"/> <source>Project</source> <translation>Проект</translation> </message> @@ -2164,12 +2159,12 @@ Do you want view online documentation?</source> <context> <name>U2::StatisticalReportController</name> <message> - <location filename="../src/shtirlitz/StatisticalReportController.cpp" line="39"/> + <location filename="../src/shtirlitz/StatisticalReportController.cpp" line="38"/> <source><b>Optional:</b> Help make UGENE better by automatically sending anonymous usage statistics.</source> <translation><b>Опционально:</b> Помогите Ñделать UGENE лучше, автоматичеÑки отправлÑÑ Ð°Ð½Ð¾Ð½Ð¸Ð¼Ð½ÑƒÑŽ ÑтатиÑтику иÑпользованиÑ.</translation> </message> <message> - <location filename="../src/shtirlitz/StatisticalReportController.cpp" line="42"/> + <location filename="../src/shtirlitz/StatisticalReportController.cpp" line="41"/> <source>Welcome to UGENE %1.%2</source> <translation>Добро пожаловать в UGENE %1.%2</translation> </message> @@ -2470,7 +2465,7 @@ Would you like to download and install it?</source> <context> <name>U2::UserAppsSettings</name> <message> - <location filename="../src/Main.cpp" line="468"/> + <location filename="../src/Main.cpp" line="516"/> <source>UGENE initialization started</source> <translation type="unfinished">Ð˜Ð½Ð¸Ñ†Ð¸Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ UGENE</translation> </message> @@ -2506,25 +2501,39 @@ Would you like to download and install it?</source> <context> <name>U2::WelcomePageController</name> <message> - <location filename="../src/welcome_page/WelcomePageController.cpp" line="85"/> <source>Start Page</source> - <translation>Ð¡Ñ‚Ð°Ñ€Ñ‚Ð¾Ð²Ð°Ñ Ñтраница</translation> + <translation type="vanished">Ð¡Ñ‚Ð°Ñ€Ñ‚Ð¾Ð²Ð°Ñ Ñтраница</translation> + </message> + <message> + <source>The Workflow Designer plugin is not loaded. You can add it using the menu Settings -> Plugins. Then you need to restart UGENE.</source> + <translation type="vanished">Плагин дизайнера вычиÑлительных Ñхем не был загружен. Ð’Ñ‹ можете добавить его в меню ÐаÑтройки -> Модули. ПоÑле Ñтого перезапуÑтите UGENE.</translation> </message> +</context> +<context> + <name>U2::WelcomePageJsAgent</name> <message> - <location filename="../src/welcome_page/WelcomePageController.cpp" line="113"/> + <location filename="../src/welcome_page/WelcomePageJsAgent.cpp" line="62"/> <source>The Workflow Designer plugin is not loaded. You can add it using the menu Settings -> Plugins. Then you need to restart UGENE.</source> - <translation>Плагин дизайнера вычиÑлительных Ñхем не был загружен. Ð’Ñ‹ можете добавить его в меню ÐаÑтройки -> Модули. ПоÑле Ñтого перезапуÑтите UGENE.</translation> + <translation type="unfinished">Плагин дизайнера вычиÑлительных Ñхем не был загружен. Ð’Ñ‹ можете добавить его в меню ÐаÑтройки -> Модули. ПоÑле Ñтого перезапуÑтите UGENE.</translation> + </message> +</context> +<context> + <name>U2::WelcomePageMdiController</name> + <message> + <location filename="../src/welcome_page/WelcomePageMdiController.cpp" line="77"/> + <source>Start Page</source> + <translation type="unfinished">Ð¡Ñ‚Ð°Ñ€Ñ‚Ð¾Ð²Ð°Ñ Ñтраница</translation> </message> </context> <context> <name>U2::WelcomePageWidget</name> <message> - <location filename="../src/welcome_page/WelcomePageWidget.cpp" line="61"/> + <location filename="../src/welcome_page/WelcomePageWidget.cpp" line="58"/> <source>No opened projects yet</source> <translation>Ðет открытых проектов</translation> </message> <message> - <location filename="../src/welcome_page/WelcomePageWidget.cpp" line="62"/> + <location filename="../src/welcome_page/WelcomePageWidget.cpp" line="59"/> <source>No opened files yet</source> <translation>Ðет открытых файлов</translation> </message> @@ -2532,9 +2541,8 @@ Would you like to download and install it?</source> <context> <name>UserApplicationsSettingsWidget</name> <message> - <location filename="../src/app_settings/user_apps_settings/UserApplicationsSettingsWidget.ui" line="26"/> <source>LangBoxTitle</source> - <translation>Язык интерфейÑа (изменение поÑле перезапуÑка)</translation> + <translation type="vanished">Язык интерфейÑа (изменение поÑле перезапуÑка)</translation> </message> <message> <location filename="../src/app_settings/user_apps_settings/UserApplicationsSettingsWidget.ui" line="41"/> @@ -2563,6 +2571,11 @@ Would you like to download and install it?</source> <source>Project</source> <translation>Проект</translation> </message> + <message> + <location filename="../src/app_settings/user_apps_settings/UserApplicationsSettingsWidget.ui" line="26"/> + <source>Language</source> + <translation type="unfinished"></translation> + </message> <message> <location filename="../src/app_settings/user_apps_settings/UserApplicationsSettingsWidget.ui" line="115"/> <source>Updates</source> diff --git a/src/ugeneui/ugeneui.pri b/src/ugeneui/ugeneui.pri index ccca0e5bd0e4db165447e0e7fccbe756943bbefa..41f56b1b22b29deb372a2b81c08ee1f56336922f 100644 --- a/src/ugeneui/ugeneui.pri +++ b/src/ugeneui/ugeneui.pri @@ -6,41 +6,43 @@ use_opencl(){ DEFINES += OPENCL_SUPPORT } -UGENE_RELATIVE_DESTDIR = '' +QT += xml network script widgets + +useWebKit() { + QT += webkit webkitwidgets +} else { + QT += webengine webenginewidgets webchannel websockets +} -QT += xml network script webkit -equals(QT_MAJOR_VERSION, 5): QT += widgets webkitwidgets TEMPLATE = app CONFIG +=qt dll thread debug_and_release +macx : CONFIG -= app_bundle DEFINES+= QT_DLL QT_FATAL_ASSERT INCLUDEPATH += src _tmp ../include ../corelibs/U2Private/src ../libs_3rdparty/QSpec/src macx : INCLUDEPATH += /System/Library/Frameworks/Security.framework/Headers -LIBS += -L../_release -lU2Core -lU2Algorithm -lU2Formats -lU2Gui -lU2View -lU2Test -lU2Lang -lU2Private -lugenedb -lbreakpad -lQSpec -macx: LIBS += /System/Library/Frameworks/Security.framework/Security -if(exclude_list_enabled()|!exists( ../libs_3rdparty/QSpec/QSpec.pro )) { - LIBS -= -lQSpec +LIBS += -L../$$out_dir() +LIBS += -lU2Core$$D -lU2Designer$$D -lU2Algorithm$$D -lU2Formats$$D -lU2Gui$$D -lU2View$$D -lU2Test$$D -lU2Lang$$D -lU2Private$$D -lbreakpad$$D -lQSpec$$D +LIBS += $$add_sqlite_lib() + +macx: LIBS += -framework Foundation /System/Library/Frameworks/Security.framework/Security +if (contains(DEFINES, HI_EXCLUDED)) { + LIBS -= -lQSpec$$D } +DESTDIR = ../$$out_dir() +TARGET = ugeneui$$D + !debug_and_release|build_pass { CONFIG(debug, debug|release) { - TARGET = ugeneuid DEFINES+=_DEBUG CONFIG +=console - DESTDIR=../_debug MOC_DIR=_tmp/moc/debug OBJECTS_DIR=_tmp/obj/debug - LIBS -= -L../_release -lU2Core -lU2Algorithm -lU2Formats -lU2Gui -lU2View -lU2Test -lU2Lang -lU2Private -lugenedb -lbreakpad -lQSpec - LIBS += -L../_debug -lU2Cored -lU2Algorithmd -lU2Formatsd -lU2Guid -lU2Viewd -lU2Testd -lU2Langd -lU2Privated -lugenedbd -lbreakpadd -lQSpecd - if(exclude_list_enabled()|!exists( ../libs_3rdparty/QSpec/QSpec.pro )) { - LIBS -= -lQSpecd - } } CONFIG(release, debug|release) { - TARGET = ugeneui - DESTDIR=../_release DEFINES+=NDEBUG MOC_DIR=_tmp/moc/release OBJECTS_DIR=_tmp/obj/release @@ -55,9 +57,7 @@ UI_DIR=_tmp/ui RCC_DIR=_tmp/rcc win32 { - LIBS += -luser32 # to import CharToOemA with nmake build - QMAKE_CXXFLAGS_WARN_ON = -W3 QMAKE_CFLAGS_WARN_ON = -W3 RC_FILE = ugeneui.rc @@ -70,7 +70,7 @@ macx { } unix { - target.path = $$UGENE_INSTALL_DIR/$$UGENE_RELATIVE_DESTDIR + target.path = $$UGENE_INSTALL_DIR/ INSTALLS += target } diff --git a/src/ugeneui/ugeneui.pro b/src/ugeneui/ugeneui.pro index 951b03ec9fb21b68d61a2f3b410519ebefdcc860..201f42dbbfe2cac7228dc8142f863c6b4bef1584 100644 --- a/src/ugeneui/ugeneui.pro +++ b/src/ugeneui/ugeneui.pro @@ -38,10 +38,11 @@ HEADERS += src/app_settings/AppSettingsDialogController.h \ src/task_view/TaskStatusBar.h \ src/task_view/TaskViewController.h \ src/update/UgeneUpdater.h \ - src/utils/MultilingualHtmlView.h \ - src/welcome_page/WelcomePageController.h \ + src/welcome_page/WelcomePageJsAgent.h \ src/welcome_page/WelcomePageMdi.h \ + src/welcome_page/WelcomePageMdiController.h \ src/welcome_page/WelcomePageWidget.h + FORMS += src/app_settings/directories_settings/DirectoriesSettingsWidget.ui \ src/app_settings/format_settings/FormatSettingsWidget.ui \ src/app_settings/logview_settings/LogSettingsWidget.ui \ @@ -61,6 +62,7 @@ FORMS += src/app_settings/directories_settings/DirectoriesSettingsWidget.ui \ src/project_support/SaveProjectDialog.ui \ src/project_view/ProjectViewWidget.ui \ src/shtirlitz/StatisticalReport.ui + SOURCES += src/Main.cpp \ src/app_settings/AppSettingsDialogController.cpp \ src/app_settings/AppSettingsGUIImpl.cpp \ @@ -99,10 +101,15 @@ SOURCES += src/Main.cpp \ src/task_view/TaskStatusBar.cpp \ src/task_view/TaskViewController.cpp \ src/update/UgeneUpdater.cpp \ - src/utils/MultilingualHtmlView.cpp \ - src/welcome_page/WelcomePageController.cpp \ + src/welcome_page/WelcomePageJsAgent.cpp \ src/welcome_page/WelcomePageMdi.cpp \ + src/welcome_page/WelcomePageMdiController.cpp \ src/welcome_page/WelcomePageWidget.cpp + +macx { +OBJECTIVE_HEADERS += src/app_settings/ResetSettingsMac.h +OBJECTIVE_SOURCES += src/app_settings/ResetSettingsMac.mm +} + RESOURCES += ugeneui.qrc TRANSLATIONS += transl/russian.ts - diff --git a/src/ugeneui/ugeneui.qrc b/src/ugeneui/ugeneui.qrc index aa183b145dd9a305640d226a5f9d8ed55143d18c..a9a61548a737adb6476ea03c82c213254ae52b84 100644 --- a/src/ugeneui/ugeneui.qrc +++ b/src/ugeneui/ugeneui.qrc @@ -47,9 +47,7 @@ <file>images/ugene_splash.png</file> <file>images/welcome_page/line.png</file> <file>images/welcome_page/social_icon_facebook.png</file> - <file>images/welcome_page/social_icon_google_plus.png</file> <file>images/welcome_page/social_icon_linkedin.png</file> - <file>images/welcome_page/social_icon_mendeley.png</file> <file>images/welcome_page/social_icon_rss.png</file> <file>images/welcome_page/social_icon_twitter.png</file> <file>images/welcome_page/social_icon_vkontakte.png</file> @@ -61,5 +59,6 @@ <file>html/welcome_page.css</file> <file>html/welcome_page.html</file> <file>html/version_news.html</file> + <file>javascript/WelcomePage.js</file> </qresource> </RCC> diff --git a/src/ugeneui/ugeneui.rc b/src/ugeneui/ugeneui.rc index 253ce7dc550820820c391630564d96ad6bbfba5a..925d352e0bbd331c6cbfbf6f0263a9e81bb6b824 100644 --- a/src/ugeneui/ugeneui.rc +++ b/src/ugeneui/ugeneui.rc @@ -15,8 +15,8 @@ IDI_ICON2 ICON DISCARDABLE "images/ext.ico" #endif VS_VERSION_INFO VERSIONINFO -FILEVERSION UGENE_VER_MAJOR,UGENE_VER_MINOR,UGENE_VER_PATCH,0 -PRODUCTVERSION UGENE_VER_MAJOR,UGENE_VER_MINOR,UGENE_VER_PATCH +FILEVERSION UGENE_VER_MAJOR,UGENE_VER_MINOR,0 +PRODUCTVERSION UGENE_VER_MAJOR,UGENE_VER_MINOR FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS (VER_DEBUG) FILETYPE VFT_APP @@ -27,11 +27,7 @@ BEGIN BEGIN VALUE "CompanyName", "Unipro, Russia" VALUE "FileDescription", "Graphical interface of UGENE" - VALUE "FileVersion", TOSTRING(UGENE_VER_MAJOR.UGENE_VER_MINOR.UGENE_VER_PATCH.0) - //VALUE "InternalName", VER_INTERNALNAME_STR - //VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR - //VALUE "LegalTrademarks1", VER_LEGALTRADEMARKS1_STR - //VALUE "LegalTrademarks2", VER_LEGALTRADEMARKS2_STR + VALUE "FileVersion", TOSTRING(UGENE_VER_MAJOR.UGENE_VER_MINOR.0) VALUE "OriginalFilename", "ugeneui" VALUE "ProductName", "Unipro UGENE" VALUE "ProductVersion", UGENE_VERSION_STRING diff --git a/ugene.pro b/ugene.pro index d551905865e2731f87aad77aa010d8560312edd1..b4932e399a4bd179d7795cbf32c81807b122ef7a 100644 --- a/ugene.pro +++ b/ugene.pro @@ -5,9 +5,9 @@ isEmpty(QT_VERSION) { error("QT_VERSION not defined. Unipro UGENE does not work with Qt 3.") } -!minQtVersion(5, 2, 1) { +!minQtVersion(5, 3, 2) { message("Cannot build Unipro UGENE with Qt version $${QT_VERSION}") - error("Use at least Qt 5.2.1.") + error("Use at least Qt 5.3.2.") } @@ -19,10 +19,13 @@ use_bundled_zlib() { SUBDIRS += src/libs_3rdparty/zlib } +use_bundled_sqlite() { + SUBDIRS += src/libs_3rdparty/sqlite3 +} + SUBDIRS += \ src/libs_3rdparty/breakpad \ src/libs_3rdparty/qscore \ - src/libs_3rdparty/sqlite3 \ src/libs_3rdparty/samtools \ src/libs_3rdparty/QSpec \ src/corelibs/U2Core \ @@ -72,6 +75,7 @@ SUBDIRS += \ src/plugins/genome_aligner \ src/plugins/kraken_support \ src/plugins/linkdata_support \ + src/plugins/metaphlan2_support \ src/plugins/orf_marker \ src/plugins/pcr \ src/plugins/perf_monitor \ @@ -102,14 +106,24 @@ exclude_list_enabled() { SUBDIRS -= src/libs_3rdparty/QSpec } -if(exists( ./src/libs_3rdparty/QSpec/QSpec.pro ):!exclude_list_enabled()) { - message( "QSpec exists, enable GUI testing..." ) - !exists( ./src/libs_3rdparty/QSpec/custom.pri) { - unix: system( cp ./installer/_common_data/QSpec_custom.pri ./src/libs_3rdparty/QSpec/custom.pri ) - win32: system (copy /B installer\_common_data\QSpec_custom.pri src\libs_3rdparty\QSpec\custom.pri) +message("Qt version is $${QT_VERSION}") +if (useWebKit()) { + message("WebKit is used as web engine") +} else { + message("Qt WebEngine is used as web engine") +} + +GUI_TESTING_ENABLED = 0 +if (exists(./src/libs_3rdparty/QSpec/QSpec.pro): !exclude_list_enabled()) { + if (!useWebKit()) { + message ("QT WebEngine is used, GUI testing is disabled") + } else { + message( "GUI testing is enabled" ) + GUI_TESTING_ENABLED = 1 } } -!exists( ./src/libs_3rdparty/QSpec/QSpec.pro ){ + +!equals(GUI_TESTING_ENABLED, 1) { DEFINES += HI_EXCLUDED SUBDIRS -= src/plugins/GUITestBase SUBDIRS -= src/libs_3rdparty/QSpec