c++ software library for sequence analysis david weese april 2009

27
C++ Software Library for Sequence Analysis David Weese April 2009

Upload: dylon-thackery

Post on 14-Dec-2015

223 views

Category:

Documents


1 download

TRANSCRIPT

C++ Software Library for Sequence AnalysisDavid Weese

April 2009

SeqAn Core Contents- strings- structured sequences- gapped sequences- alterators

- profiles, weight matrices- HMM, SCFG - p-value computations-…

Sequences

Searching

- exact/approximate- search heuristics- filtering- motif search

Probabilis.

Biologicals

Alignments

- alignment data structures- dynamic Programming- alignment heuristics- multidimensional chaining

Indices

- q-gram hashes- (enhanced) suffix array- suffix trees- lazy indices, compress. ind. Graphs

- (structural) align. graphs- word graphs- probabilistic automata- trees

Algorithms

- FASTA- gQUASAR, SWIFT,..- MEME, PROJECTION,…- …

Miscellan.

- allocators- OS access and support- helper data struc. and algorithms

Integration

- using external tools- STL- LEDA and Boost graphs- friend libraries (LISA)

- alphabets- scoring schemes- file formats- base pair probabilities-

SeqAn Website

www.seqan.de

SeqAn Website

dddoc Documentation System

SeqAn Trac

SeqAn Paper

The SeqAn Way of Programming

Global Interfaceslength(str);

MetafunctionsSize<TString>::Type;

Template SubclassingString< Subclass<Subsubclass> >

Global Interfaces

Global Interfaces

str.length();

length(str);

assign(Segment<THost, TSpec> const & target, TSource & source, typename Size< Segment<THost, TSpec> >::Type limit, Tag<TExpand> const);

assign(Segment<THost, TSpec> const & target, TSource const & source);

assign(Segment<THost, TSpec> const & target, TSource const & source, Tag<TExpand> const);

assign(Segment<THost, TSpec> const & target, TSource const & source, typename Size< Segment<THost, TSpec> >::Type limit, Tag<TExpand> const);

assign(short & c_target, SimpleType<TValue, TSpec> & source);

assign(short & c_target, SimpleType<TValue, TSpec> const & source);

assign(signed char & c_target, SimpleType<TValue, TSpec> & source);

assign(signed char & c_target, SimpleType<TValue, TSpec> const & source);

assign(SimpleType<TTargetValue, TTargetSpec> & target, Proxy<TSourceSpec> & source);

assign(SimpleType<TTargetValue, TTargetSpec> & target, Proxy<TSourceSpec> const & source);

assign(SimpleType<TTargetValue, TTargetSpec> & target, SimpleType<TSourceValue, TSourceSpec> & source);

assign(SimpleType<TTargetValue, TTargetSpec> & target, SimpleType<TSourceValue, TSourceSpec> const & source);

assign(SimpleType<TTargetValue, TTargetSpec> & target, TSource & source);

assign(SimpleType<TTargetValue, TTargetSpec> & target, TSource const & source);

assign(SkipList< TObject, TModus, TSpec, TStructuring > & me, TParam & param);

assign(SkipList< TObject, TModus, TSpec, TStructuring > & me, TParam1 & param1, TParam2 & param2 );

assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource & source);

assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource & source, Generous);

assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource & source, Limit);

assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource & source, TSize limit);

assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource & source, typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit, Generous);

assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource & source, typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit, Limit);

assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource const & source);

assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource const & source, Generous);

assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource const & source, Limit);

assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource const & source, TSize limit);

assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource const & source, typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit, Generous);

assign(::std::basic_string<TChar, TCharTraits, TAlloc> & target, TSource const & source, typename Size< ::std::basic_string<TChar, TCharTraits, TAlloc> >::Type limit, Limit);

assign(String<TTargetValue, CStyle> & target, TSource & source, Tag<TExpand> const tag);

assign(String<TTargetValue, CStyle> & target, TSource & source, TSize limit, Tag<TExpand> const tag);

assign(String<TTargetValue, CStyle> & target, TSource const & source, Tag<TExpand> const tag);

assign(String<TTargetValue, CStyle> & target, TSource const & source, TSize limit, Tag<TExpand> const tag);

assign(String<TTargetValue, CStyle> & target, TSourceValue const * source, Tag<TExpand> const tag);

assign(String<TTargetValue, CStyle> & target, TSourceValue const * source, TSize limit, Tag<TExpand> const tag);

assign(String<TTargetValue, TTargetSpec> & target, _ChunkCollector<TSourceHost> const & source, Tag<TExpand> const tag);

assign(String<TTargetValue, TTargetSpec> & target, _ChunkCollector<TSourceHost> const & source, typename Size< String<TTargetValue, TTargetSpec> >::Type limit, Tag<TExpand> const tag);

assign(String<TTargetValue, TTargetSpec> & target, TSource & source);

assign(String<TTargetValue, TTargetSpec> & target, TSource const & source);

assign(String<TTargetValue, TTargetSpec> & target, TSource const & source, Tag<TExpand> const);

assign(String<TTargetValue, TTargetSpec> & target, TSource const & source, TSize limit, Tag<TExpand> const);

assign(String<TTargetValue, TTargetSpec> & target, TSourceValue const * source, Tag<TExpand> const);

assign(String<TTargetValue, TTargetSpec> & target, TSourceValue const * source, TSize limit, Tag<TExpand> const);

assign(String<TValue, Block<SPACE> >& target, TSource const& source);

assign(String<TValue, CStyle> & target, String<TValue, TSourceSpec> & source, Tag<TExpand> const);

assign(String<TValue, External<TConfig> > &target, TSource const &source, Tag<TExpand> const);

assign(String<TValue, Packed<THostspec> > & target, String<TValue, Packed<THostspec> > & source, Tag<TTag> const tag);

assign(String<TValue, Packed<THostspec> > & target, String<TValue, Packed<THostspec> > & source, TSize limit, Tag<TTag> const tag);

assign(String<TValue, Packed<THostspec> > & target, String<TValue, Packed<THostspec> > const & source, Tag<TTag> const tag);

assign(String<TValue, Packed<THostspec> > & target, String<TValue, Packed<THostspec> > const & source, TSize limit, Tag<TTag> const tag);

assign(String<TValue, TStringSpec> &dest, Pipe<TInput, TSpec> &src);

assign(String<TValue1, TStringSpec> &dest, Pool<TValue2, TSpec> &src);

assign(TraceBack & target, Byte const c_source);

assign(TraceBackGotoh & target, Byte const c_source);

assign(TTarget & target, TSource & source);

assign(TTarget & target, TSource & source, typename Size<TTarget>::Type limit);

assign(TTarget & target, TSource const & source);

assign(TTarget & target, TSource const & source, typename Size<TTarget>::Type limit);

assign(TTarget const & target, TSource & source, typename Size<TTarget>::Type limit);

assign(TTarget const & target, TSource const & source, typename Size<TTarget>::Type limit);

assign(TTargetValue * target, TSource & source);

assign(TTargetValue * target, TSource const & source);

assign(TTargetValue * target, TSource const & source, size_t limit, Tag<TExpand> const);

assign(TTargetValue * target, TSource const & source, Tag<TExpand> const);

assign(TTargetValue * target, TSourceValue const * source, size_t limit, Tag<TExpand> const);

assign(TTargetValue * target, TSourceValue const * source, Tag<TExpand> const);

assign(unsigned char & c_target, SimpleType<TValue, TSpec> & source);

assign(unsigned char & c_target, SimpleType<TValue, TSpec> const & source);

assign(unsigned int & c_target, SimpleType<TValue, TSpec> & source);

assign(unsigned int & c_target, SimpleType<TValue, TSpec> const & source);

assign(unsigned short & c_target, SimpleType<TValue, TSpec> & source);

assign(unsigned short & c_target, SimpleType<TValue, TSpec> const & source);

170 assign functions170 assign Functions

Metafunctions

Example

swapLetters(string<char> & str) { char help = str[1]; str[1] = str[0]; str[0] = help;

}

Example

template <typename T> swapLetters(T & str) { char help = str[1]; str[1] = str[0]; str[0] = help;

}

Example

template <typename T> swapLetters(T & str) { Value(T) help = str[1]; str[1] = str[0]; str[0] = help;

}

Example

template <typename T> swapLetters(T & str) { Value<T>::Type help = str[1]; str[1] = str[0]; str[0] = help;

}

Metafunctions template <typename T> struct Value<string<T> > {

typedef T Type; };

template <typename T>

struct Value<T*> {

typedef T Type; };

Example

template <typename T> swapLetters(T & str) { typedef Value<T>::Type TValue; TValue help = str[1]; str[1] = str[0]; str[0] = help;

}

“Generic++”

template <typename T> swapLetters(T & str) { typedef Value<T>::Type TValue; TValue help = value(str,1); value(str,1) = value(str,0); value(str,0) = help;

}

Metafunctions: Examples

Value<T>::Type Size<T>::Type Position<T>::Type Iterator<T [, Spec]>::Type

Template Subclassing

Template Subclassing

class Animal;class Animal<Rodent>;class Animal<Rodent<Hamster> >;

Examples

String<char> String<char, Alloc< > > String<char, Array<100> > String<char, Array<100, MySpec > >

Appendix 1: Testing

"Save Your Tests!"

"Test Automatically!"

Appendix 1: Testing

void printString(char * str){

SEQAN_CHECKPOINTSEQAN_ASSERT(str != 0)//…

}

Appendix 2: dddoc/**

.Function.length:

..cat:Containers

..summary:The number of items/characters.

..signature:Size length(object)

..param.object:A container.

...concept:Concept.Container

..returns:The number of items/characters in $object$.

...metafunction:Metafunction.Size

..remarks.text:The length of a sequence can never exceed it's capacity.

..see:Function.capacity

*/

template <typename T>

inline typename Size<T const>::Type

length(T const & /*me*/)

{

SEQAN_CHECKPOINT

return 1;

}

Appendix 2: dddoc

http://www.seqan.de/dddoc/html/Page_dddoc.html