Skip to content
Commits on Source (6)
BasedOnStyle: Google
BreakBeforeBraces: Mozilla
AllowShortLoopsOnASingleLine: false
AccessModifierOffset: -4
BreakConstructorInitializersBeforeComma: true
ColumnLimit: 100
IndentWidth: 4
PointerAlignment: Left
DerivePointerAlignment: false
TabWidth: 4
ReflowComments: false # protect ASCII art in comments
KeepEmptyLinesAtTheStartOfBlocks: true
make/Config.mk
*.o
*.d
build/
build*/
.project
.cproject
.settings
......@@ -9,3 +9,8 @@ ConsensusCore.xcodeproj
*~
bin/
obj/
/.p4config
# Meson WrapDB stuff
subprojects/packagecache/
subprojects/googletest*
......@@ -15,7 +15,7 @@ include make/Defs.mk
all: lib
lib:
${MAKE} -f make/Cpp.mk
${MAKE} -f make/Cpp.mk -j8
#
# SWIG targets
......
......@@ -36,3 +36,7 @@ client tools to use the ``libConsensusCore.so``, the library needs to
be copied to the bin/{Debug,Release} directory for every assembly that
transitively depends on ConsensusCore and creates an executable. You
can do this using a pre-build rule.
DISCLAIMER
----------
THIS WEBSITE AND CONTENT AND ALL SITE-RELATED SERVICES, INCLUDING ANY DATA, ARE PROVIDED "AS IS," WITH ALL FAULTS, WITH NO REPRESENTATIONS OR WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, NON-INFRINGEMENT OR FITNESS FOR A PARTICULAR PURPOSE. YOU ASSUME TOTAL RESPONSIBILITY AND RISK FOR YOUR USE OF THIS SITE, ALL SITE-RELATED SERVICES, AND ANY THIRD PARTY WEBSITES OR APPLICATIONS. NO ORAL OR WRITTEN INFORMATION OR ADVICE SHALL CREATE A WARRANTY OF ANY KIND. ANY REFERENCES TO SPECIFIC PRODUCTS OR SERVICES ON THE WEBSITES DO NOT CONSTITUTE OR IMPLY A RECOMMENDATION OR ENDORSEMENT BY PACIFIC BIOSCIENCES.
#!/usr/bin/env bash
set -vex
################
# DEPENDENCIES #
################
## Load modules
type module >& /dev/null || . /mnt/software/Modules/current/init/bash
module purge
module load meson
module load ninja
module load gcc
module load ccache
module load boost
module load gtest
module load python/2
module load swig
BOOST_ROOT="${BOOST_ROOT%/include}"
# unset these variables to have meson discover all
# boost-dependent variables from BOOST_ROOT alone
unset BOOST_INCLUDEDIR
unset BOOST_LIBRARYDIR
export CXX="ccache g++"
export CCACHE_BASEDIR="${PWD}"
if [[ $USER == bamboo ]]; then
export CCACHE_DIR=/mnt/secondary/Share/tmp/bamboo.${bamboo_shortPlanKey}.ccachedir
export CCACHE_TEMPDIR=/scratch/bamboo.ccache_tempdir
fi
export ENABLED_TESTS="true"
source scripts/ci/setup.sh
source scripts/ci/build.sh
source scripts/ci/test.sh
#!/usr/bin/env bash
CPP_ABI=c++98
CPP_STD=c++14
usage ()
{
......@@ -10,7 +10,7 @@ usage ()
echo " [--swig=SWIG] # location of swig executable"
echo " [--swig-lib=SWIG_LIB] # location of swig library"
echo " [--debug] # build debug library (1)"
echo " [--c++11] # build using C++11 ABI"
echo " [--c++98] # build using old C++98 standard"
echo
echo " (Python only:)"
echo " [--python-include=PYTHON_INCLUDE] # location of Python.h"
......@@ -71,8 +71,8 @@ while test x$1 != x; do
--debug)
DEBUG=1
;;
--c++11)
CPP_ABI=c++11
--c++98)
CPP_STD=c++98
;;
--python-include=*)
PYTHON_INCLUDE=`echo $1 | sed 's/--python-include=//'`
......@@ -115,7 +115,7 @@ echo " SWIG_LIB = $SWIG_LIB"
echo " PYTHON_INCLUDE = $PYTHON_INCLUDE"
echo " NUMPY_INCLUDE = $NUMPY_INCLUDE"
echo " DEBUG = $DEBUG"
echo " CPP_ABI = $CPP_ABI"
echo " CPP_STD = $CPP_STD"
echo
echo > make/Config.mk
......@@ -125,4 +125,4 @@ echo "SWIG_LIB:=$SWIG_LIB" >> make/Config.mk
echo "PYTHON_INCLUDE:=$PYTHON_INCLUDE" >> make/Config.mk
echo "NUMPY_INCLUDE:=$NUMPY_INCLUDE" >> make/Config.mk
echo "DEBUG?=$DEBUG" >> make/Config.mk
echo "CPP_ABI:=$CPP_ABI" >> make/Config.mk
echo "CPP_STD:=$CPP_STD" >> make/Config.mk
consensuscore (1.1.1+dfsg-1) unstable; urgency=medium
* Team upload
* New upstream release
* Exclude precompiled binaries
* Standards-Version: 4.2.1
-- Andreas Tille <tille@debian.org> Tue, 09 Oct 2018 17:43:54 +0200
consensuscore (1.0.2-3) unstable; urgency=medium
* Team upload.
......
......@@ -17,7 +17,7 @@ Build-Depends: debhelper (>= 11~),
python3-setuptools,
python3-all-dev,
python3-numpy
Standards-Version: 4.1.5
Standards-Version: 4.2.1
Vcs-Browser: https://salsa.debian.org/med-team/consensuscore
Vcs-Git: https://salsa.debian.org/med-team/consensuscore.git
Homepage: https://github.com/PacificBiosciences/ConsensusCore
......
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: ConsensusCore
Upstream-Contact: Pacific Biosciences <devnet@pacificbiosciences.com>
Source: https://github.com/PacificBiosciences/ConsensusCore
Files-Excluded: */clang-format*
Files: *
Copyright: 2011-2015 Pacific Biosciences <devnet@pacificbiosciences.com>
......
......@@ -3,10 +3,10 @@ Description: Honor CPPFLAGS, CXXFLAGS, and LDFLAGS
Author: Afif Elghraoui <afif@ghraoui.name>
Forwarded: https://github.com/PacificBiosciences/ConsensusCore/pull/5
Last-Update: 2015-09-02
--- consensuscore.orig/make/Defs.mk
+++ consensuscore/make/Defs.mk
@@ -53,8 +53,8 @@
CXX_STRICT_FLAGS = $(CXX_FLAGS) -pedantic -std=$(CPP_ABI) -Wall
--- a/make/Defs.mk
+++ b/make/Defs.mk
@@ -53,8 +53,8 @@ else
CXX_STRICT_FLAGS = $(CXX_FLAGS) -pedantic -std=$(CPP_STD) -Wall
endif
-CXX = $(CCACHE) $(GXX) $(MACHINE) $(CXX_FLAGS) $(INCLUDES) -isystem $(BOOST)
......
......@@ -2,10 +2,10 @@ Description: Remove -isystem flag to fix build on GCC-6
Author: Afif Elghraoui <afif@debian.org>
Forwarded: no
Last-Update: 2016-07-16
--- consensuscore.orig/make/Defs.mk
+++ consensuscore/make/Defs.mk
@@ -53,8 +53,8 @@
CXX_STRICT_FLAGS = $(CXX_FLAGS) -pedantic -std=$(CPP_ABI) -Wall
--- a/make/Defs.mk
+++ b/make/Defs.mk
@@ -53,8 +53,8 @@ else
CXX_STRICT_FLAGS = $(CXX_FLAGS) -pedantic -std=$(CPP_STD) -Wall
endif
-CXX = $(CCACHE) $(GXX) $(MACHINE) $(CPPFLAGS) $(CXXFLAGS) $(CXX_FLAGS) $(INCLUDES) -isystem $(BOOST) $(LDFLAGS)
......@@ -15,9 +15,9 @@ Last-Update: 2016-07-16
ifeq ($(UNAME), Darwin)
SHLIB_FLAGS = -shared -undefined dynamic_lookup
--- consensuscore.orig/make/Tests.mk
+++ consensuscore/make/Tests.mk
@@ -27,7 +27,7 @@
--- a/make/Tests.mk
+++ b/make/Tests.mk
@@ -27,7 +27,7 @@ $(TEST_OBJS): CXX_OPT_FLAGS := $(CXX_OPT
$(TEST_OBJS): $(TEST_BUILD_ROOT)/%.o : %.cpp $(CXX_LIB)
-mkdir -p $(TEST_BUILD_ROOT)
......
version=3
version=4
opts="filenamemangle=s/(?:.*)?v?(\d[\d\.]*)\.tar\.gz/python-pbconsensuscore-$1.tar.gz/" \
https://github.com/PacificBiosciences/ConsensusCore/releases (?:.*/)?v?(\d[\d\.]*)\.tar\.gz
opts="repacksuffix=+dfsg,dversionmangle=auto,repack,compression=xz" \
https://github.com/PacificBiosciences/ConsensusCore/releases .*/archive/v?@ANY_VERSION@@ARCHIVE_EXT@
####################
# external headers #
####################
quiver_include_directories += include_directories('.')
// Copyright (c) 2011-2013, Pacific Biosciences of California, Inc.
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted (subject to the limitations in the
// disclaimer below) 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 Pacific Biosciences nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
// GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY PACIFIC
// BIOSCIENCES AND ITS 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 PACIFIC BIOSCIENCES OR ITS
// 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.
// Author: David Alexander
//
......@@ -46,41 +11,39 @@
namespace ConsensusCore {
class PairwiseAlignment;
struct AffineAlignmentParams {
float MatchScore;
float MismatchScore;
float GapOpen;
float GapExtend;
float PartialMatchScore;
class PairwiseAlignment;
AffineAlignmentParams(float matchScore,
float mismatchScore,
float gapOpen,
float gapExtend,
float partialMatchScore = 0);
};
struct AffineAlignmentParams
{
float MatchScore;
float MismatchScore;
float GapOpen;
float GapExtend;
float PartialMatchScore;
AffineAlignmentParams DefaultAffineAlignmentParams();
AffineAlignmentParams IupacAwareAffineAlignmentParams();
AffineAlignmentParams(float matchScore, float mismatchScore, float gapOpen, float gapExtend,
float partialMatchScore = 0);
};
AffineAlignmentParams DefaultAffineAlignmentParams();
AffineAlignmentParams IupacAwareAffineAlignmentParams();
//
// Affine gap-penalty alignment.
//
PairwiseAlignment* AlignAffine(const std::string& target,
const std::string& query,
AffineAlignmentParams params = DefaultAffineAlignmentParams()); // NOLINT
//
// Affine gap-penalty alignment.
//
PairwiseAlignment* AlignAffine(
const std::string& target, const std::string& query,
AffineAlignmentParams params = DefaultAffineAlignmentParams()); // NOLINT
//
// Affine gap-penalty alignment with partial awareness of IUPAC ambiguous bases---
// half-penalizes partial mismatches. For example: (M = IUPAC A/C)
// T->A = -1,
// T->M = -1,
// A->M = -0.5
//
PairwiseAlignment* AlignAffineIupac(const std::string& target,
const std::string& query,
AffineAlignmentParams params = IupacAwareAffineAlignmentParams()); // NOLINT
//
// Affine gap-penalty alignment with partial awareness of IUPAC ambiguous
// bases---
// half-penalizes partial mismatches. For example: (M = IUPAC A/C)
// T->A = -1,
// T->M = -1,
// A->M = -0.5
//
PairwiseAlignment* AlignAffineIupac(
const std::string& target, const std::string& query,
AffineAlignmentParams params = IupacAwareAffineAlignmentParams()); // NOLINT
}
// Copyright (c) 2011-2013, Pacific Biosciences of California, Inc.
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted (subject to the limitations in the
// disclaimer below) 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 Pacific Biosciences nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
// GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY PACIFIC
// BIOSCIENCES AND ITS 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 PACIFIC BIOSCIENCES OR ITS
// 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.
// Author: David Alexander
#pragma once
namespace ConsensusCore {
//
// Scoring params for Needleman-Wunsch or Smith-Waterman style aligners
//
struct AlignParams {
int Match;
int Mismatch;
int Insert;
int Delete;
AlignParams(int match,
int mismatch,
int insert,
int delete_);
// Edit distance params
static AlignParams Default();
};
enum AlignMode {
GLOBAL = 0, // Global in both sequences
SEMIGLOBAL = 1, // Global in query, local in target
LOCAL = 2 // Local in both sequences
};
struct AlignConfig {
AlignParams Params;
AlignMode Mode;
AlignConfig(AlignParams params, AlignMode mode);
// Default corresponds to global alignment mode, edit distance params
static AlignConfig Default();
};
//
// Scoring params for Needleman-Wunsch or Smith-Waterman style aligners
//
struct AlignParams
{
int Match;
int Mismatch;
int Insert;
int Delete;
AlignParams(int match, int mismatch, int insert, int delete_);
// Edit distance params
static AlignParams Default();
};
enum AlignMode
{
GLOBAL = 0, // Global in both sequences
SEMIGLOBAL = 1, // Global in query, local in target
LOCAL = 2 // Local in both sequences
};
struct AlignConfig
{
AlignParams Params;
AlignMode Mode;
AlignConfig(AlignParams params, AlignMode mode);
// Default corresponds to global alignment mode, edit distance params
static AlignConfig Default();
};
}
// Copyright (c) 2011-2013, Pacific Biosciences of California, Inc.
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted (subject to the limitations in the
// disclaimer below) 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 Pacific Biosciences nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
// GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY PACIFIC
// BIOSCIENCES AND ITS 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 PACIFIC BIOSCIENCES OR ITS
// 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.
// Author: David Alexander
//
......@@ -47,15 +12,11 @@
namespace ConsensusCore {
class PairwiseAlignment;
PairwiseAlignment* AlignLinear(const std::string& target,
const std::string& query,
AlignConfig config = AlignConfig::Default());
class PairwiseAlignment;
PairwiseAlignment* AlignLinear(const std::string& target,
const std::string& query,
int* score,
AlignConfig config = AlignConfig::Default());
PairwiseAlignment* AlignLinear(const std::string& target, const std::string& query,
AlignConfig config = AlignConfig::Default());
PairwiseAlignment* AlignLinear(const std::string& target, const std::string& query, int* score,
AlignConfig config = AlignConfig::Default());
}
// Copyright (c) 2011-2013, Pacific Biosciences of California, Inc.
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted (subject to the limitations in the
// disclaimer below) 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 Pacific Biosciences nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
// GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY PACIFIC
// BIOSCIENCES AND ITS 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 PACIFIC BIOSCIENCES OR ITS
// 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.
// Author: David Alexander
#pragma once
......@@ -44,71 +9,65 @@
namespace {
// Utility functions common to implementations of aligners
// Utility functions common to implementations of aligners
inline int Max3(int a, int b, int c)
{
return std::max((a), std::max((b), (c)));
}
inline int Max3(int a, int b, int c) { return std::max((a), std::max((b), (c))); }
inline int ArgMax3(int a, int b, int c)
{
if (a >= b && a >= c) return 0;
else if (b >= c) return 1;
else return 2;
}
inline int ArgMax3(int a, int b, int c)
{
if (a >= b && a >= c)
return 0;
else if (b >= c)
return 1;
else
return 2;
}
}
namespace ConsensusCore {
/// \brief A pairwise alignment
class PairwiseAlignment {
private:
std::string target_;
std::string query_;
std::string transcript_;
public:
// target string, including gaps; usually the "reference"
std::string Target() const;
// query string, including gaps; usually the "read"
std::string Query() const;
// transcript as defined by Gusfield pg 215.
std::string Transcript() const;
public:
float Accuracy() const;
int Matches() const;
int Errors() const;
int Mismatches() const;
int Insertions() const;
int Deletions() const;
int Length() const;
public:
PairwiseAlignment(const std::string& target,
const std::string& query);
static PairwiseAlignment* FromTranscript(const std::string& transcript,
const std::string& unalnTarget,
const std::string& unalnQuery);
};
PairwiseAlignment* Align(const std::string& target,
const std::string& query,
int* score,
AlignConfig config = AlignConfig::Default());
PairwiseAlignment* Align(const std::string& target,
const std::string& query,
AlignConfig config = AlignConfig::Default());
// These calls return an array, same len as target, containing indices into the query string.
std::vector<int> TargetToQueryPositions(const std::string& transcript);
std::vector<int> TargetToQueryPositions(const PairwiseAlignment& aln);
/// \brief A pairwise alignment
class PairwiseAlignment
{
private:
std::string target_;
std::string query_;
std::string transcript_;
public:
// target string, including gaps; usually the "reference"
std::string Target() const;
// query string, including gaps; usually the "read"
std::string Query() const;
// transcript as defined by Gusfield pg 215.
std::string Transcript() const;
public:
float Accuracy() const;
int Matches() const;
int Errors() const;
int Mismatches() const;
int Insertions() const;
int Deletions() const;
int Length() const;
public:
PairwiseAlignment(const std::string& target, const std::string& query);
static PairwiseAlignment* FromTranscript(const std::string& transcript,
const std::string& unalnTarget,
const std::string& unalnQuery);
};
PairwiseAlignment* Align(const std::string& target, const std::string& query, int* score,
AlignConfig config = AlignConfig::Default());
PairwiseAlignment* Align(const std::string& target, const std::string& query,
AlignConfig config = AlignConfig::Default());
// These calls return an array, same len as target, containing indices into the
// query string.
std::vector<int> TargetToQueryPositions(const std::string& transcript);
std::vector<int> TargetToQueryPositions(const PairwiseAlignment& aln);
}
// Copyright (c) 2011-2014, Pacific Biosciences of California, Inc.
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted (subject to the limitations in the
// disclaimer below) 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 Pacific Biosciences nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
// GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY PACIFIC
// BIOSCIENCES AND ITS 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 PACIFIC BIOSCIENCES OR ITS
// 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.
// Author: David Alexander
#include <string>
......@@ -41,8 +6,9 @@
namespace ConsensusCore {
class Checksum {
public:
static std::string Of(const QvSequenceFeatures& f);
};
class Checksum
{
public:
static std::string Of(const QvSequenceFeatures& f);
};
}
// Copyright (c) 2011-2013, Pacific Biosciences of California, Inc.
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted (subject to the limitations in the
// disclaimer below) 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 Pacific Biosciences nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
// GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY PACIFIC
// BIOSCIENCES AND ITS 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 PACIFIC BIOSCIENCES OR ITS
// 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.
// Author: David Alexander
#pragma once
#include <vector>
#include <utility>
#include <vector>
#include <ConsensusCore/Interval.hpp>
#include <ConsensusCore/Types.hpp>
namespace ConsensusCore
{
// These APIs are a little more awkward than I'd have liked---see
// "winLen" instead of winEnd. Had to contort a bit to get SWIG
// bindings working well.
namespace ConsensusCore {
// These APIs are a little more awkward than I'd have liked---see
// "winLen" instead of winEnd. Had to contort a bit to get SWIG
// bindings working well.
void CoverageInWindow(int tStartDim,
int* tStart,
int tEndDim,
int* tEnd,
int winStart,
int winLen,
int* coverage);
void CoverageInWindow(int tStartDim, int* tStart, int tEndDim, int* tEnd, int winStart, int winLen,
int* coverage);
std::vector<Interval> CoveredIntervals(int minCoverage,
int tStartDim,
int* tStart,
int tEndDim,
int* tEnd,
int winStart,
int winLen);
std::vector<Interval> CoveredIntervals(int minCoverage, int tStartDim, int* tStart, int tEndDim,
int* tEnd, int winStart, int winLen);
}
// Copyright (c) 2011-2013, Pacific Biosciences of California, Inc.
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted (subject to the limitations in the
// disclaimer below) 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 Pacific Biosciences nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
// GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY PACIFIC
// BIOSCIENCES AND ITS 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 PACIFIC BIOSCIENCES OR ITS
// 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.
// Author: David Alexander
#pragma once
#include <vector>
namespace ConsensusCore
namespace ConsensusCore {
/// \brief A parameter vector for analysis using the QV model
struct EdnaModelParams
{
/// \brief A parameter vector for analysis using the QV model
struct EdnaModelParams
{
std::vector<float> pStay_;
std::vector<float> pMerge_;
std::vector<float> moveDists_;
std::vector<float> stayDists_;
std::vector<float> pStay_;
std::vector<float> pMerge_;
std::vector<float> moveDists_;
std::vector<float> stayDists_;
// By providing a single constructor with default arguments,
// we allow Python and other SWIG client languages to use
// named parameters. However if the user forgets to set one of
// the parameters, trouble!
// By providing a single constructor with default arguments,
// we allow Python and other SWIG client languages to use
// named parameters. However if the user forgets to set one of
// the parameters, trouble!
EdnaModelParams(std::vector<float> pStay,
std::vector<float> pMerge,
std::vector<float> moveDists,
std::vector<float> stayDists)
: pStay_(pStay)
, pMerge_(pMerge)
, moveDists_(moveDists)
, stayDists_(stayDists)
{}
};
EdnaModelParams(std::vector<float> pStay, std::vector<float> pMerge,
std::vector<float> moveDists, std::vector<float> stayDists)
: pStay_(pStay), pMerge_(pMerge), moveDists_(moveDists), stayDists_(stayDists)
{
}
};
}