Skip to content

Commit

Permalink
Merge branch 'release/0.7.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Cooke committed Apr 16, 2021
2 parents 728bdb8 + eccd24b commit 512766d
Show file tree
Hide file tree
Showing 536 changed files with 1,378 additions and 1,339 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ project(octopus)

set(octopus_VERSION_MAJOR 0)
set(octopus_VERSION_MINOR 7)
set(octopus_VERSION_PATCH 2)
set(octopus_VERSION_PATCH 3)
set(octopus_VERSION_RELEASE "")

# Generate list of compile commands. This helps debugging and doesn't have a downside.
Expand Down
578 changes: 578 additions & 0 deletions scripts/forest.smk

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions scripts/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,14 @@ def is_centos(version=None):
else:
return False

def download_file(url, file_name):
urllib.request.urlretrieve(url, str(file_name))
def download_file(url, file_name, max_attempts=10):
try:
urllib.request.urlretrieve(url, str(file_name))
except:
if max_attempts > 1:
download_file(url, file_name, max_attempts - 1)
else:
raise

def git_clone(project):
call(['git', 'clone', project])
Expand Down
741 changes: 0 additions & 741 deletions scripts/train_random_forest.py

This file was deleted.

2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,8 @@ set(CORE_SOURCES
core/csr/measures/mean_likelihood.cpp
core/csr/measures/allele_mapping_quality.hpp
core/csr/measures/allele_mapping_quality.cpp
core/csr/measures/phylogeny_posterior.hpp
core/csr/measures/phylogeny_posterior.cpp

core/models/haplotype_likelihood_array.hpp
core/models/haplotype_likelihood_array.cpp
Expand Down
2 changes: 1 addition & 1 deletion src/basics/aligned_read.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#include "aligned_read.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/basics/aligned_read.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef aligned_read_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/basics/aligned_template.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#include "aligned_template.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/basics/aligned_template.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef aligned_template_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/basics/cigar_string.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#include "cigar_string.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/basics/cigar_string.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef cigar_string_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/basics/contig_region.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef contig_region_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/basics/genomic_region.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef genomic_region_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/basics/mappable_reference_wrapper.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef mappable_reference_wrapper_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/basics/pedigree.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#include "pedigree.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/basics/pedigree.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef pedigree_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/basics/phred.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef phred_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/basics/ploidy_map.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#include "ploidy_map.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/basics/ploidy_map.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef ploidy_map_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/basics/read_pileup.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#include "read_pileup.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/basics/read_pileup.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef read_pileup_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/basics/tandem_repeat.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#include "tandem_repeat.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/basics/tandem_repeat.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef tandem_repeat_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/basics/trio.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#include "trio.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/basics/trio.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef trio_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/concepts/comparable.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef comparable_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/concepts/equitable.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef equitable_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/concepts/indexed.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef indexed_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/concepts/mappable.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef mappable_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/concepts/mappable_range.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef mappable_ranges_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/config/common.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#include "common.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/config/common.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef common_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/config/config.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#include "config.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/config/config.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef config_hpp
Expand Down
4 changes: 2 additions & 2 deletions src/config/octopus_vcf.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#include "octopus_vcf.hpp"
Expand Down Expand Up @@ -26,7 +26,7 @@ VcfHeader::Builder make_header_template()
result.add_format("DP", "1", "Integer", "Read depth at this position for this sample");
result.add_format("FT", "1", "String", "Sample genotype filter indicating if this genotype was 'called'");
result.add_format("GQ", "1", "Integer", "Conditional genotype quality (phred-scaled)");
result.add_format("PS", "1", "String", "Phase set");
result.add_format("PS", "1", "Integer", "Phase set");
result.add_format("PQ", "1", "Integer", "Phasing quality");
result.add_format("MQ", "1", "Integer", "RMS mapping quality");

Expand Down
2 changes: 1 addition & 1 deletion src/config/octopus_vcf.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef octopus_vcf_hpp
Expand Down
16 changes: 11 additions & 5 deletions src/config/option_collation.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#include "option_collation.hpp"
Expand Down Expand Up @@ -2035,14 +2035,14 @@ boost::optional<std::size_t> get_max_genotype_combinations(const OptionMap& opti
{
if (options.count("max-genotype-combinations") == 1) {
return as_unsigned("max-genotype-combinations", options);
} else if (is_fast_mode(options)) {
return 10'000;
} else if (caller == "cell") {
return 1'000;
} else if (is_fast_mode(options)) {
return 10'000;
} else if (caller == "trio") {
return 1'000'000;
return 100'000;
} else if (caller == "population") {
return 500'000;
return 100'000;
} else {
return boost::none;
}
Expand Down Expand Up @@ -2272,6 +2272,11 @@ auto get_caller_type(const OptionMap& options, const std::vector<SampleName>& sa
return get_caller_type(options, samples, get_pedigree(options, samples));
}

bool aggregate_annotations(const OptionMap& options)
{
return options.at("aggregate-annotations").as<bool>();
}

std::unique_ptr<VariantCallFilterFactory>
make_call_filter_factory(const ReferenceGenome& reference, ReadPipe& read_pipe, const OptionMap& options,
boost::optional<fs::path> temp_directory)
Expand Down Expand Up @@ -2342,6 +2347,7 @@ make_call_filter_factory(const ReferenceGenome& reference, ReadPipe& read_pipe,
auto annotations = get_requested_measure_annotations(options);
output_options.annotations.insert(std::begin(annotations), std::end(annotations));
}
output_options.aggregate_allele_annotations = aggregate_annotations(options);
result->set_output_options(std::move(output_options));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/config/option_collation.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef option_collation_hpp
Expand Down
6 changes: 5 additions & 1 deletion src/config/option_parser.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#include "option_parser.hpp"
Expand Down Expand Up @@ -752,6 +752,10 @@ OptionMap parse_options(const int argc, const char** argv)
po::value<std::vector<std::string>>()->multitoken()->implicit_value(std::vector<std::string> {"active"}, "active")->composing(),
"Annotations to write to final VCF")

("aggregate-annotations",
po::bool_switch()->default_value(false),
"Aggregate all multi-value annotations into a single value")

("filter-vcf",
po::value<fs::path>(),
"Filter the given Octopus VCF without calling")
Expand Down
2 changes: 1 addition & 1 deletion src/config/option_parser.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef option_parser_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/config/system.h.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef system_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/config/version.h.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef version_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/containers/mappable_block.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef mappable_block_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/containers/mappable_flat_multi_set.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef mappable_set_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/containers/mappable_flat_set.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef mappable_flat_set_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/containers/mappable_map.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef mappable_map_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/containers/matrix_map.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef matrix_map_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/containers/probability_matrix.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef probability_matrix_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/core/callers/caller.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#include "caller.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/core/callers/caller.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef caller_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/core/callers/caller_builder.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#include "caller_builder.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/core/callers/caller_builder.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef caller_builder_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/core/callers/caller_factory.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#include "caller_factory.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/core/callers/caller_factory.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef caller_factory_hpp
Expand Down
2 changes: 1 addition & 1 deletion src/core/callers/cancer_caller.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#include "cancer_caller.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/core/callers/cancer_caller.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2020 Daniel Cooke
// Copyright (c) 2015-2021 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

#ifndef cancer_caller_hpp
Expand Down
Loading

0 comments on commit 512766d

Please sign in to comment.