Skip to content

Commit

Permalink
* ParseAligns/ParseAligns.cpp (handleAlignmentPair): Print the
Browse files Browse the repository at this point in the history
paired alignments for fragment sizes less than k so that DistanceEst can make a
distance estimate to and from the same contig.


git-svn-id: https://svn.bcgsc.ca/svn/abyss/trunk@49765 ad02020f-2a26-4133-947e-1829317c1416
  • Loading branch information
traymond authored and sjackman committed Mar 19, 2012
1 parent cb990cf commit ac20cd7
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions ParseAligns/ParseAligns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,9 @@ static void handleAlignmentPair(ReadAlignMap::const_iterator iter,

// Are they on the same contig and the ONLY alignments?
if (a0.contig == a1.contig) {
int size = fragmentSize(a0, a1);
if((iter->second.size() == 1 && pairIter->second.size() == 1))
{
int size = fragmentSize(a0, a1);
if (size > INT_MIN) {
histogram.addDataPoint(size);
if (!opt::fragPath.empty()) {
Expand All @@ -297,9 +297,14 @@ static void handleAlignmentPair(ReadAlignMap::const_iterator iter,
} else
stats.numMisoriented++;
}
}
else
{
if (size < opt::k) {
// Print the alignment
pairedAlignFile
<< currID << ' ' << a0 << ' '
<< pairID << ' ' << a1 << '\n';
assert(pairedAlignFile.good());
}
} else {
// Print the alignment and the swapped alignment
pairedAlignFile
<< currID << ' ' << a0 << ' '
Expand Down

0 comments on commit ac20cd7

Please sign in to comment.