Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion porechop/cpp_function_wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
SO_FILE = 'cpp_functions.so'
SO_FILE_FULL = os.path.join(os.path.dirname(os.path.realpath(__file__)), SO_FILE)
if not os.path.isfile(SO_FILE_FULL):
sys.exit('could not find ' + SO_FILE + ' - please reinstall')
sys.exit('could not find ' + SO_FILE_FULL + ' - please reinstall')
C_LIB = CDLL(SO_FILE_FULL)

C_LIB.adapterAlignment.argtypes = [c_char_p, # Read sequence
Expand Down
27 changes: 27 additions & 0 deletions porechop/include/seqan/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright (c) 2006-2018, Knut Reinert, FU Berlin
All rights reserved.

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 Knut Reinert or the FU Berlin 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 KNUT REINERT OR THE FU BERLIN 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.

5 changes: 4 additions & 1 deletion porechop/include/seqan/align.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==========================================================================
// SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -53,6 +53,7 @@
#include <algorithm>

#include <seqan/basic.h>
#include <seqan/simd.h>
#include <seqan/modifier.h> // ModifiedAlphabet<>.
#include <seqan/align/align_metafunctions.h>
#include <seqan/graph_align.h> // TODO(holtgrew): We should not have to depend on this.
Expand All @@ -76,6 +77,8 @@

#include <seqan/align/fragment.h>

#include <seqan/align/aligned_sequence_concept.h>

#include <seqan/align/gaps_base.h>
#include <seqan/align/gaps_iterator_base.h>

Expand Down
15 changes: 12 additions & 3 deletions porechop/include/seqan/align/align_base.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==========================================================================
// SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -476,7 +476,7 @@ detach(Align<TSource, TSpec> & me)

template <typename TFile, typename TSource, typename TSpec>
inline void
write(TFile & target,
_write(TFile & target,
Align<TSource, TSpec> const & source)
{
typedef Align<TSource, TSpec> const TAlign;
Expand Down Expand Up @@ -557,6 +557,15 @@ write(TFile & target,
writeValue(target, '\n');
}

template <typename TFile, typename TSource, typename TSpec>
[[deprecated("Old-style I/O. Use stream operator << instead.")]]
inline void
write(TFile & target,
Align<TSource, TSpec> const & source)
{
_write(target, source);
}

// ----------------------------------------------------------------------------
// Function clearClipping()
// ----------------------------------------------------------------------------
Expand Down Expand Up @@ -607,7 +616,7 @@ operator<<(TStream & target,
Align<TSource, TSpec> const & source)
{
typename DirectionIterator<TStream, Output>::Type it = directionIterator(target, Output());
write(it, source);
_write(it, source);
return target;
}

Expand Down
2 changes: 1 addition & 1 deletion porechop/include/seqan/align/align_cols.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==========================================================================
// SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion porechop/include/seqan/align/align_config.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==========================================================================
// SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
Expand Down
57 changes: 38 additions & 19 deletions porechop/include/seqan/align/align_interface_wrapper.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==========================================================================
// SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -58,14 +58,20 @@ namespace seqan
// Function _alignWrapperSequential(); Score; StringSet vs. StringSet
// ----------------------------------------------------------------------------

template <typename TString1, typename TSpec1,
typename TString2, typename TSpec2,
template <typename TSetH,
typename TSetV,
typename TScoreValue, typename TScoreSpec,
typename TAlignConfig,
typename TGapModel>
typename TGapModel,
std::enable_if_t<And<And<Is<ContainerConcept<TSetH>>,
Is<ContainerConcept<typename Value<TSetH>::Type>>>,
And<Is<ContainerConcept<TSetV>>,
Is<ContainerConcept<typename Value<TSetV>::Type>>>
>::VALUE,
int> = 0>
inline auto
_alignWrapperSequential(StringSet<TString1, TSpec1> const & stringsH,
StringSet<TString2, TSpec2> const & stringsV,
_alignWrapperSequential(TSetH const & stringsH,
TSetV const & stringsV,
Score<TScoreValue, TScoreSpec> const & scoringScheme,
TAlignConfig const & config,
TGapModel const & /*gaps*/)
Expand All @@ -92,14 +98,20 @@ _alignWrapperSequential(StringSet<TString1, TSpec1> const & stringsH,
// Function _alignWrapperSequential(); Score; String vs. StringSet
// ----------------------------------------------------------------------------

template <typename TString1,
typename TString2, typename TSpec,
template <typename TSeqH,
typename TSetV,
typename TScoreValue, typename TScoreSpec,
typename TAlignConfig,
typename TGapModel>
typename TGapModel,
std::enable_if_t<And<And<Is<ContainerConcept<TSeqH>>,
Not<Is<ContainerConcept<typename Value<TSeqH>::Type>>>>,
And<Is<ContainerConcept<TSetV>>,
Is<ContainerConcept<typename Value<TSetV>::Type>>>
>::VALUE,
int> = 0>
inline auto
_alignWrapperSequential(TString1 const & stringH,
StringSet<TString2, TSpec> const & stringsV,
_alignWrapperSequential(TSeqH const & stringH,
TSetV const & stringsV,
Score<TScoreValue, TScoreSpec> const & scoringScheme,
TAlignConfig const & config,
TGapModel const & /*gaps*/)
Expand All @@ -125,21 +137,27 @@ _alignWrapperSequential(TString1 const & stringH,
// Function _alignWrapperSequential(); Gaps
// ----------------------------------------------------------------------------

template <typename TSequenceH, typename TGapsSpecH, typename TSetSpecH,
typename TSequenceV, typename TGapsSpecV, typename TSetSpecV,
template <typename TSetH,
typename TSetV,
typename TScoreValue, typename TScoreSpec,
typename TAlignConfig,
typename TGapModel>
typename TGapModel,
std::enable_if_t<And<And<Is<ContainerConcept<TSetH>>,
Is<AlignedSequenceConcept<typename Value<TSetH>::Type>>>,
And<Is<ContainerConcept<TSetV>>,
Is<AlignedSequenceConcept<typename Value<TSetV>::Type>>>
>::VALUE,
int> = 0>
inline auto
_alignWrapperSequential(StringSet<Gaps<TSequenceH, TGapsSpecH>, TSetSpecH> & gapSeqSetH,
StringSet<Gaps<TSequenceV, TGapsSpecV>, TSetSpecV> & gapSeqSetV,
_alignWrapperSequential(TSetH & gapSeqSetH,
TSetV & gapSeqSetV,
Score<TScoreValue, TScoreSpec> const & scoringScheme,
TAlignConfig const & config,
TGapModel const & /*gaps*/)

{
typedef typename Size<TSequenceH>::Type TSize;
typedef typename Position<TSequenceH>::Type TPosition;
typedef typename Size<TSetH>::Type TSize;
typedef typename Position<TSetH>::Type TPosition;
typedef TraceSegment_<TPosition, TSize> TTraceSegment;

String<TScoreValue> results;
Expand Down Expand Up @@ -167,7 +185,8 @@ _alignWrapperSequential(StringSet<Gaps<TSequenceH, TGapsSpecH>, TSetSpecH> & gap
template <typename... TArgs>
inline auto _alignWrapper(TArgs && ...args)
{
#ifdef SEQAN_SIMD_ENABLED
// NOTE(marehr): ume_simd is currently not working, thus falling back to sequential case
#if defined(SEQAN_SIMD_ENABLED) && !defined(SEQAN_UMESIMD_ENABLED)
return _alignWrapperSimd(std::forward<TArgs>(args)...);
#else
return _alignWrapperSequential(std::forward<TArgs>(args)...);
Expand Down
2 changes: 1 addition & 1 deletion porechop/include/seqan/align/align_iterator_base.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==========================================================================
// SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion porechop/include/seqan/align/align_metafunctions.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==========================================================================
// SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion porechop/include/seqan/align/align_traceback.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==========================================================================
// SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
Expand Down
65 changes: 65 additions & 0 deletions porechop/include/seqan/align/aligned_sequence_concept.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// ==========================================================================
// SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
// All rights reserved.
//
// 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 Knut Reinert or the FU Berlin 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 KNUT REINERT OR THE FU BERLIN 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: Rene Rahn <rene.rahn@fu-berlin.de>
// ==========================================================================

#ifndef INCLUDE_SEQAN_ALIGN_ALIGNED_SEQUENCE_CONCEPT_H_
#define INCLUDE_SEQAN_ALIGN_ALIGNED_SEQUENCE_CONCEPT_H_

namespace seqan
{

// ============================================================================
// Forwards
// ============================================================================

// ============================================================================
// Tags, Classes, Enums
// ============================================================================

SEQAN_CONCEPT_REFINE(AlignedSequenceConcept, (TSequence), (ContainerConcept))
{

SEQAN_CONCEPT_USAGE(AlignedSequenceConcept)
{}
};

// ============================================================================
// Metafunctions
// ============================================================================

// ============================================================================
// Functions
// ============================================================================
} // namespace seqan

#endif // #ifndef INCLUDE_SEQAN_ALIGN_ALIGNED_SEQUENCE_CONCEPT_H_
2 changes: 1 addition & 1 deletion porechop/include/seqan/align/alignment_algorithm_tags.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==========================================================================
// SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion porechop/include/seqan/align/alignment_operations.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==========================================================================
// SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
Expand Down
Loading