Does this help?
http://docs.seqan.de/seqan/develop/?p=computeAlignmentStatshttp://docs.seqan.de/seqan/develop/?p=computeAlignmentStats
*m
From: Brett Bowman [bnbowman@gmail.com]
Sent: Saturday, January 10, 2015 3:16 AM
To: SeqAn Development
Subject: Re: [Seqan-dev] Two Alignment Questions
Thanks Rene,
>What do you mean by accuracy? What do you need exactly?
What I am trying to do is write a tool to align single-molecule sequencing data (PacBio, Oxford Nanopore) to reference genomes. For which the alignment accuracy and the break-down of the types of errors is very useful, as the per-read quality on both platforms varies substantially.
What I'd like are member methods or functions-on-alignment-objects to give the following:-The number of base-pair matches in the alignment-The number of mismatches in the alignment-The number of insertions in the alignment-The number of deletions in the alignment-The alignment string as represented by the Align object's toString() method
The first four I need to summarize the similarity of an alignment (i.e. indels are likely sequencing error, where as mismatches are likely not), while the latter is helpful in creating alternate representations for alignments
Does that help?
-B
On Fri, Jan 9, 2015 at 12:51 AM, Rahn, René <rene.maerker@fu-berlin.de> wrote:
Hey Brett,
On 30 Dec 2014, at 21:29, Brett Bowman <bnbowman@gmail.com> wrote:
1) Is there an easy way to get the accuracy of an Alignment object, or is that something I need to calculate myself?
What do you mean by accuracy? What do you need exactly?The Align data structure simply represents the computed alignment. The score is returned by the global align interface.There are several ways to manipulate the alignment of gaps and to compute all best traceback paths. However, those options are not supported on the high level interfaces but only in the core of the alignment engine.If you tell me what you need exactly we can think of a way to make those interfaces public which is planned for the future anyway.But there is no method telling you the accuracy of the “computed" alignment compared to another “real” alignment. Please, give me some specifics and we see if we can incorporate this....Well, there is a method in the tool seqan-tcoffee, which checks if the computed alignment is correct given the score model and the alignment, but I believe this is not what you are looking for?
2) bandedChainAlignment fails messily when given a Vector of Seeds instead of a String, where as other functions work fine (e.g. chainSeedsGlobally). Why does it work for the one and not the other? Excerpt from error message below.
"""/usr/include/seqan/seeds/banded_chain_alignment_impl.h:1195:57: error: call to 'end' is ambiguousSEQAN_ASSERT(itEnd != static_cast<TSeedSetIterator>(end(seedSet)));^~~/usr/include/seqan/basic/debug_test_system.h:2146:44: note: expanded from macro 'SEQAN_ASSERT'(_arg1), # _arg1)) { \^/usr/include/seqan/seeds/banded_chain_alignment_profile.h:254:16: note: in instantiation of function template specialization
...
/usr/include/seqan/seeds/banded_chain_alignment.h:207:12: note: in instantiation of function template specialization'seqan::bandedChainAlignment<seqan::String<seqan::SimpleType<unsigned char, seqan::Dna5_>, seqan::Alloc<void> >, seqan::Tag<seqan::ArrayGaps_>,std::vector<seqan::Seed<seqan::Tag<seqan::Simple_>, seqan::DefaultSeedConfig>, std::allocator<seqan::Seed<seqan::Tag<seqan::Simple_>, seqan::DefaultSeedConfig> > >, long,seqan::Tag<seqan::Simple_>, seqan::Tag<seqan::Simple_>, false, false, false, false, seqan::Tag<seqan::Default_> >' requested herereturn bandedChainAlignment(align, seedSet, scoreScheme, scoreScheme, alignConfig, bandExtension);^/home/bbowman/git/SRSLI/src/C++/SparseAlignment2.cpp:72:25: note: in instantiation of function template specialization'seqan::bandedChainAlignment<seqan::String<seqan::SimpleType<unsigned char, seqan::Dna5_>, seqan::Alloc<void> >, seqan::Tag<seqan::ArrayGaps_>,std::vector<seqan::Seed<seqan::Tag<seqan::Simple_>, seqan::DefaultSeedConfig>, std::allocator<seqan::Seed<seqan::Tag<seqan::Simple_>, seqan::DefaultSeedConfig> > >, long,seqan::Tag<seqan::Simple_>, false, false, false, false, seqan::Tag<seqan::Default_> >' requested herelong alnScore = bandedChainAlignment(alignment, *seedChain, scoring, globalConfig);^/home/bbowman/git/SRSLI/src/C++/main.cpp:95:27: note: in instantiation of function template specialization 'RefChainsToAlignments<seqan::AlignConfig<false, true, true, false,seqan::Tag<seqan::Default_> > ()>' requested hereauto alignments = RefChainsToAlignments(record->Seq,^/usr/include/seqan/seeds/banded_chain_alignment_impl.h:583:1: note: candidate template ignored: substitution failure [with TSeedSet = std::vector<seqan::Seed<seqan::Tag<seqan::Simple_>,seqan::DefaultSeedConfig>, std::allocator<seqan::Seed<seqan::Tag<seqan::Simple_>, seqan::DefaultSeedConfig> > >]_findFirstAnchor(TSeedSet const & seedSet, int bandExtension)"”"Ok, this seems to be a bug to me.
I’ll have a look into it.
_______________________________________________
Sincerely,-Brett
seqan-dev mailing list
seqan-dev@lists.fu-berlin.de
https://lists.fu-berlin.de/listinfo/seqan-dev
Bests,
René
---
René RahnPh.D. Student--------------------------------Institute of Computer ScienceAlgorithmic Bioinformatics (ABI)--------------------------------Freie Universität BerlinTakustraße 914195 Berlin--------------------------------
_______________________________________________
seqan-dev mailing list
seqan-dev@lists.fu-berlin.de
https://lists.fu-berlin.de/listinfo/seqan-dev
_______________________________________________
seqan-dev mailing list
seqan-dev@lists.fu-berlin.de
https://lists.fu-berlin.de/listinfo/seqan-dev