diff --git a/.gitignore b/.gitignore index a6bdaa9..b855c85 100644 --- a/.gitignore +++ b/.gitignore @@ -49,10 +49,10 @@ *.app # SIST build outputs -trans_three/qsidd -trans_compete/qsidd -trans_three/depend -trans_compete/depend +src/trans_three/qsidd +src/trans_compete/qsidd +src/trans_three/depend +src/trans_compete/depend # Debug information files *.dwo diff --git a/CMakeLists.txt b/CMakeLists.txt index b5007cc..9f3d2e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,37 +3,37 @@ project(code) set(CMAKE_CXX_STANDARD 14) -include_directories(trans_compete) -include_directories(trans_three) +include_directories(src/trans_compete) +include_directories(src/trans_three) add_executable(code - trans_compete/G_x.cpp - trans_compete/G_x.h - trans_compete/qsidd.cpp - trans_compete/SIDD_1R.cpp - trans_compete/SIDD_1R.h - trans_compete/SIDD_2R.cpp - trans_compete/SIDD_2R.h - trans_compete/SIDD_3R.cpp - trans_compete/SIDD_3R.h - trans_compete/SIDD_4R.cpp - trans_compete/SIDD_4R.h - trans_compete/SIDD_Base.cpp - trans_compete/SIDD_Base.h - trans_compete/stat_1R.cpp - trans_compete/stat_1R.h - trans_three/G_x.cpp - trans_three/G_x.h - trans_three/qsidd.cpp - trans_three/SIDD_1R.cpp - trans_three/SIDD_1R.h - trans_three/SIDD_2R.cpp - trans_three/SIDD_2R.h - trans_three/SIDD_3R.cpp - trans_three/SIDD_3R.h - trans_three/SIDD_4R.cpp - trans_three/SIDD_4R.h - trans_three/SIDD_Base.cpp - trans_three/SIDD_Base.h - trans_three/stat_1R.cpp - trans_three/stat_1R.h) + src/trans_compete/G_x.cpp + src/trans_compete/G_x.h + src/trans_compete/qsidd.cpp + src/trans_compete/SIDD_1R.cpp + src/trans_compete/SIDD_1R.h + src/trans_compete/SIDD_2R.cpp + src/trans_compete/SIDD_2R.h + src/trans_compete/SIDD_3R.cpp + src/trans_compete/SIDD_3R.h + src/trans_compete/SIDD_4R.cpp + src/trans_compete/SIDD_4R.h + src/trans_compete/SIDD_Base.cpp + src/trans_compete/SIDD_Base.h + src/trans_compete/stat_1R.cpp + src/trans_compete/stat_1R.h + src/trans_three/G_x.cpp + src/trans_three/G_x.h + src/trans_three/qsidd.cpp + src/trans_three/SIDD_1R.cpp + src/trans_three/SIDD_1R.h + src/trans_three/SIDD_2R.cpp + src/trans_three/SIDD_2R.h + src/trans_three/SIDD_3R.cpp + src/trans_three/SIDD_3R.h + src/trans_three/SIDD_4R.cpp + src/trans_three/SIDD_4R.h + src/trans_three/SIDD_Base.cpp + src/trans_three/SIDD_Base.h + src/trans_three/stat_1R.cpp + src/trans_three/stat_1R.h) diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh index 01991f8..1ca8168 100755 --- a/conda-recipe/build.sh +++ b/conda-recipe/build.sh @@ -1,16 +1,16 @@ #!/usr/bin/env bash set -euxo pipefail -make -C trans_three clean -make -C trans_three +make -C src/trans_three clean +make -C src/trans_three -make -C trans_compete clean -make -C trans_compete +make -C src/trans_compete clean +make -C src/trans_compete install -d "${PREFIX}/bin" install -d "${PREFIX}/libexec/sist" -install -d "${PREFIX}/libexec/sist/trans_three" -install -d "${PREFIX}/libexec/sist/trans_compete" +install -d "${PREFIX}/libexec/sist/src/trans_three" +install -d "${PREFIX}/libexec/sist/src/trans_compete" install -m 755 \ master.pl \ @@ -21,12 +21,12 @@ install -m 755 \ "${PREFIX}/libexec/sist/IR_finder.pl" install -m 755 \ - trans_three/qsidd \ - "${PREFIX}/libexec/sist/trans_three/qsidd" + src/trans_three/qsidd \ + "${PREFIX}/libexec/sist/src/trans_three/qsidd" install -m 755 \ - trans_compete/qsidd \ - "${PREFIX}/libexec/sist/trans_compete/qsidd" + src/trans_compete/qsidd \ + "${PREFIX}/libexec/sist/src/trans_compete/qsidd" cat > "${PREFIX}/bin/sist" << 'EOF' #!/usr/bin/env bash diff --git a/docs/source/development.rst b/docs/source/development.rst index 0b69db9..4729749 100644 --- a/docs/source/development.rst +++ b/docs/source/development.rst @@ -11,10 +11,10 @@ Build the C++ components from the repository root: .. code-block:: bash - make -C trans_three clean - make -C trans_three - make -C trans_compete clean - make -C trans_compete + make -C src/trans_three clean + make -C src/trans_three + make -C src/trans_compete clean + make -C src/trans_compete The Makefiles are also used by the Conda build and accept the compiler and linker settings supplied by the Conda toolchain. diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 4992ebc..784dc59 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -59,8 +59,8 @@ Build both C++ components from the repository root: .. code-block:: bash - make -C trans_three - make -C trans_compete + make -C src/trans_three + make -C src/trans_compete The source-tree pipeline can then be run with: diff --git a/docs/source/source-usage.rst b/docs/source/source-usage.rst index 9c92ac5..2385cab 100644 --- a/docs/source/source-usage.rst +++ b/docs/source/source-usage.rst @@ -19,11 +19,11 @@ Source components repeat information required for cruciform calculations, including start positions, possible extrusion lengths, and cruciform formation energies. -``trans_three/`` +``src/trans_three/`` C++ implementation for analysing strand separation, Z-DNA, and cruciform extrusion independently. -``trans_compete/`` +``src/trans_compete/`` C++ implementation for analysing competition between strand separation, Z-DNA, and cruciform extrusion. @@ -75,13 +75,13 @@ Compile the C++ implementations with: .. code-block:: bash - make -C trans_three - make -C trans_compete + make -C src/trans_three + make -C src/trans_compete After compilation, each directory contains a ``qsidd`` executable. Running ``qsidd`` without the required arguments displays its detailed usage -information. For example, from ``trans_three``: +information. For example, from ``src/trans_three``: .. code-block:: bash @@ -99,13 +99,13 @@ Run ``IR_finder.pl`` first: perl IR_finder.pl temperature shape sequence_file -For a cruciform calculation using ``trans_three``: +For a cruciform calculation using ``src/trans_three``: .. code-block:: bash ./qsidd -C -X "string" -f sequence_file -For a competition calculation using ``trans_compete``: +For a competition calculation using ``src/trans_compete``: .. code-block:: bash diff --git a/master.pl b/master.pl index 61d852b..833b35b 100755 --- a/master.pl +++ b/master.pl @@ -23,8 +23,8 @@ "Script analyzes superhelically induced structural transition probabilities for each base pair.\n". "Algorithm types: M (melting), Z (Z-DNA), C (cruciforms), and A (competition between all three).\n". "Sequence file will be converted to the format required by the algorithm.\n". -"Code in directory trans_three/ will handle M, Z, and C algorithm types.\n". -"Code in directory trans_compete/ will handle A algorithm type.\n". +"Code in directory src/trans_three/ will handle M, Z, and C algorithm types.\n". +"Code in directory src/trans_compete/ will handle A algorithm type.\n". "For algorithm type options -a C and -a A user will need an Inverted Repeat Finder (IRF) executable compatible with user's operating system.\n". "IRF download page: http://tandem.bu.edu/irf/irf.download.html.\n". "Selected output will be printed to the screen.\n\n". @@ -73,8 +73,8 @@ my @name = split("/",$file); -my $single_exe = "$RealBin/trans_three/qsidd"; -my $compete_exe = "$RealBin/trans_compete/qsidd"; +my $single_exe = "$RealBin/src/trans_three/qsidd"; +my $compete_exe = "$RealBin/src/trans_compete/qsidd"; my $output_IR; if ($trans eq "M") { diff --git a/trans_compete/G_x.cpp b/src/trans_compete/G_x.cpp similarity index 100% rename from trans_compete/G_x.cpp rename to src/trans_compete/G_x.cpp diff --git a/trans_compete/G_x.h b/src/trans_compete/G_x.h similarity index 100% rename from trans_compete/G_x.h rename to src/trans_compete/G_x.h diff --git a/trans_compete/Makefile b/src/trans_compete/Makefile similarity index 100% rename from trans_compete/Makefile rename to src/trans_compete/Makefile diff --git a/trans_compete/SIDD_1R.cpp b/src/trans_compete/SIDD_1R.cpp similarity index 100% rename from trans_compete/SIDD_1R.cpp rename to src/trans_compete/SIDD_1R.cpp diff --git a/trans_compete/SIDD_1R.h b/src/trans_compete/SIDD_1R.h similarity index 100% rename from trans_compete/SIDD_1R.h rename to src/trans_compete/SIDD_1R.h diff --git a/trans_compete/SIDD_2R.cpp b/src/trans_compete/SIDD_2R.cpp similarity index 100% rename from trans_compete/SIDD_2R.cpp rename to src/trans_compete/SIDD_2R.cpp diff --git a/trans_compete/SIDD_2R.h b/src/trans_compete/SIDD_2R.h similarity index 100% rename from trans_compete/SIDD_2R.h rename to src/trans_compete/SIDD_2R.h diff --git a/trans_compete/SIDD_3R.cpp b/src/trans_compete/SIDD_3R.cpp similarity index 100% rename from trans_compete/SIDD_3R.cpp rename to src/trans_compete/SIDD_3R.cpp diff --git a/trans_compete/SIDD_3R.h b/src/trans_compete/SIDD_3R.h similarity index 100% rename from trans_compete/SIDD_3R.h rename to src/trans_compete/SIDD_3R.h diff --git a/trans_compete/SIDD_4R.cpp b/src/trans_compete/SIDD_4R.cpp similarity index 100% rename from trans_compete/SIDD_4R.cpp rename to src/trans_compete/SIDD_4R.cpp diff --git a/trans_compete/SIDD_4R.h b/src/trans_compete/SIDD_4R.h similarity index 100% rename from trans_compete/SIDD_4R.h rename to src/trans_compete/SIDD_4R.h diff --git a/trans_compete/SIDD_Base.cpp b/src/trans_compete/SIDD_Base.cpp similarity index 100% rename from trans_compete/SIDD_Base.cpp rename to src/trans_compete/SIDD_Base.cpp diff --git a/trans_compete/SIDD_Base.h b/src/trans_compete/SIDD_Base.h similarity index 100% rename from trans_compete/SIDD_Base.h rename to src/trans_compete/SIDD_Base.h diff --git a/trans_compete/qsidd.cpp b/src/trans_compete/qsidd.cpp similarity index 100% rename from trans_compete/qsidd.cpp rename to src/trans_compete/qsidd.cpp diff --git a/trans_compete/stat_1R.cpp b/src/trans_compete/stat_1R.cpp similarity index 100% rename from trans_compete/stat_1R.cpp rename to src/trans_compete/stat_1R.cpp diff --git a/trans_compete/stat_1R.h b/src/trans_compete/stat_1R.h similarity index 100% rename from trans_compete/stat_1R.h rename to src/trans_compete/stat_1R.h diff --git a/trans_three/G_x.cpp b/src/trans_three/G_x.cpp similarity index 100% rename from trans_three/G_x.cpp rename to src/trans_three/G_x.cpp diff --git a/trans_three/G_x.h b/src/trans_three/G_x.h similarity index 100% rename from trans_three/G_x.h rename to src/trans_three/G_x.h diff --git a/trans_three/Makefile b/src/trans_three/Makefile similarity index 100% rename from trans_three/Makefile rename to src/trans_three/Makefile diff --git a/trans_three/SIDD_1R.cpp b/src/trans_three/SIDD_1R.cpp similarity index 100% rename from trans_three/SIDD_1R.cpp rename to src/trans_three/SIDD_1R.cpp diff --git a/trans_three/SIDD_1R.h b/src/trans_three/SIDD_1R.h similarity index 100% rename from trans_three/SIDD_1R.h rename to src/trans_three/SIDD_1R.h diff --git a/trans_three/SIDD_2R.cpp b/src/trans_three/SIDD_2R.cpp similarity index 100% rename from trans_three/SIDD_2R.cpp rename to src/trans_three/SIDD_2R.cpp diff --git a/trans_three/SIDD_2R.h b/src/trans_three/SIDD_2R.h similarity index 100% rename from trans_three/SIDD_2R.h rename to src/trans_three/SIDD_2R.h diff --git a/trans_three/SIDD_3R.cpp b/src/trans_three/SIDD_3R.cpp similarity index 100% rename from trans_three/SIDD_3R.cpp rename to src/trans_three/SIDD_3R.cpp diff --git a/trans_three/SIDD_3R.h b/src/trans_three/SIDD_3R.h similarity index 100% rename from trans_three/SIDD_3R.h rename to src/trans_three/SIDD_3R.h diff --git a/trans_three/SIDD_4R.cpp b/src/trans_three/SIDD_4R.cpp similarity index 100% rename from trans_three/SIDD_4R.cpp rename to src/trans_three/SIDD_4R.cpp diff --git a/trans_three/SIDD_4R.h b/src/trans_three/SIDD_4R.h similarity index 100% rename from trans_three/SIDD_4R.h rename to src/trans_three/SIDD_4R.h diff --git a/trans_three/SIDD_Base.cpp b/src/trans_three/SIDD_Base.cpp similarity index 100% rename from trans_three/SIDD_Base.cpp rename to src/trans_three/SIDD_Base.cpp diff --git a/trans_three/SIDD_Base.h b/src/trans_three/SIDD_Base.h similarity index 100% rename from trans_three/SIDD_Base.h rename to src/trans_three/SIDD_Base.h diff --git a/trans_three/qsidd.cpp b/src/trans_three/qsidd.cpp similarity index 100% rename from trans_three/qsidd.cpp rename to src/trans_three/qsidd.cpp diff --git a/trans_three/stat_1R.cpp b/src/trans_three/stat_1R.cpp similarity index 100% rename from trans_three/stat_1R.cpp rename to src/trans_three/stat_1R.cpp diff --git a/trans_three/stat_1R.h b/src/trans_three/stat_1R.h similarity index 100% rename from trans_three/stat_1R.h rename to src/trans_three/stat_1R.h diff --git a/tests/conftest.py b/tests/conftest.py index f5eea65..4f1bf48 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -87,7 +87,7 @@ def build_sist( ), ) - for directory in ("trans_three", "trans_compete"): + for directory in ("src/trans_three", "src/trans_compete"): clean_result = run_command( ["make", "-C", directory, "clean"], cwd=working_copy,