Dear Jon Keats,
The paireddistance used by subjunc is always a positive value, ie. the absolute value of calculated distance is used. Sbujunc uses this absolute value compare with mindist and maxdist values.
The 'correctlypaired' flag was not hardcoded. The reason why a 146bp insert was called incorrectly paired is because of the use of mindist=50. The paireddistance for a 146bp insert is calculated as 45 by subjunc, which is less than 50. Therefore it was called incorrectly paired.
You may set mindist=10 and this should allow inserts with one SD away from your average fragment length to be called correctly paired.
Thanks for reporting the problem you encountered when running picard on the subjunc mapping results. We have identified the problem and are working on it. An updated version should be available in a day or two. I will let you know when it is released.
Best wishes,
Wei
