Skip to content

Commit

Permalink
Merge branch 'master' into release-v0.8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Dolzhenko authored and Dolzhenko committed Dec 9, 2019
2 parents 4fb26ad + 6f2f773 commit b361fd2
Show file tree
Hide file tree
Showing 20 changed files with 349 additions and 358 deletions.
3 changes: 2 additions & 1 deletion source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ add_executable(UnitTests
tests/UnitTests.cpp
tests/SequenceUtilsTest.cpp
tests/PurityScoreTest.cpp
tests/GenomicRegionTest.cpp)
tests/GenomicRegionTest.cpp
tests/IrrFinderTest.cpp)
target_link_libraries(UnitTests common reads region)
target_include_directories(UnitTests PUBLIC ${CMAKE_SOURCE_DIR})

Expand Down
4 changes: 2 additions & 2 deletions source/app/ExpansionHunterDenovo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ int runProfileWorkflow(int argc, char** argv)

spdlog::info("Starting {} profile workflow", kProgramVersion);

Interval motifSizeRange(shortestUnitToConsider, longestUnitToConsider);
ProfileWorkflowParameters params(
outputPrefix, pathToReads, pathToReference, shortestUnitToConsider, longestUnitToConsider, minMapqOfAnchorRead,
maxMapqOfInrepeatRead);
outputPrefix, pathToReads, pathToReference, motifSizeRange, minMapqOfAnchorRead, maxMapqOfInrepeatRead);
return runProfileWorkflow(params);
}

Expand Down
3 changes: 2 additions & 1 deletion source/app/Version.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@

#include <string>

const std::string kProgramVersion = "ExpansionHunter Denovo v0.8.1";
const std::string kProgramVersion = "ExpansionHunter Denovo v0.8.6";

3 changes: 0 additions & 3 deletions source/classification/CMakeLists.txt

This file was deleted.

7 changes: 0 additions & 7 deletions source/classification/unit_tests/CMakeLists.txt

This file was deleted.

75 changes: 0 additions & 75 deletions source/classification/unit_tests/classifier_test.cc

This file was deleted.

208 changes: 0 additions & 208 deletions source/classification/unit_tests/irr_finder_test.cc

This file was deleted.

2 changes: 1 addition & 1 deletion source/common/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
add_library(common STATIC
Parameters.hh
SequenceUtils.hh SequenceUtils.cpp)
SequenceUtils.hh SequenceUtils.cpp Interval.cpp Interval.hh)

target_include_directories(common PUBLIC ${CMAKE_SOURCE_DIR})
target_link_libraries(common Boost::boost)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,4 @@
//
//

#include "purity/purity.h"
#include "gmock/gmock.h"

#include <string>
#include <vector>

using std::string;
using std::vector;
#include "common/Interval.hh"
49 changes: 49 additions & 0 deletions source/common/Interval.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
//
// ExpansionHunter Denovo
// Copyright 2016-2019 Illumina, Inc.
// All rights reserved.
//
// Author: Egor Dolzhenko <[email protected]>,
// Michael Eberle <[email protected]>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//

#pragma once

#include <stdexcept>
#include <string>

class Interval
{
public:
Interval(int start, int end)
: start_(start)
, end_(end)
{
if (start_ > end_)
{
const auto interval = "(" + std::to_string(start_) + ", " + std::to_string(end_) + ")";
throw std::runtime_error("Invalid interval endpoints " + interval);
}
}

int start() const { return start_; }
int end() const { return end_; }
bool contains(int value) const { return start_ <= value && value <= end_; }

private:
int start_;
int end_;
};
Loading

0 comments on commit b361fd2

Please sign in to comment.