verkko icon indicating copy to clipboard operation
verkko copied to clipboard

Use only patch subsequence of ONT read in consensus

Open skoren opened this issue 2 years ago • 1 comments

Right now, we do not split reads so the full ONT reads are included even if the patch is much shorter. This can lead to issues when the patch is near the ends of tigs. The long ONT reads will extend past the last HiFi read and generate low-quality ONT-only cns. It is also likely redundant (overlapping) with other tigs in the output that do have the HiFi reads. To address this, make consensus support subsequence coordinates for reads and only use the minimum needed ONT sequence (+ surrounding sequence to place it).

skoren avatar May 03 '22 17:05 skoren

Consensus and layout should be happy using a subsequence now, but communicating which subsequence to use from verkko to layoutToPackage isn't implemented. Line 474 in get_layout_from_mbg.py needs to add (optional) trim amounts for the read.

From layoutToPackage.C:

  //  We're expecting a layout with format:
  //    tig  piece000001
  //    len  3434115
  //    rds  8738
  //    m54316_180808_005743/7668064/ccs  10831  0     200  900
  //    m54316_180808_005743/12583071/ccs  1510  11740   0  2000
  //    m54316_180808_005743/9240893/ccs   2002  12086
  //
  //  The whitespace is (probably) tabs, but we don't care.
  //
  //  The first pair of numbers is the position the trimmed read is expected
  //  to go.  The second pair is the amount to trim from the read in the
  //  orientation the read is placed in the tig (unitigConsensus.C:146).  So,
  //  the first read will be placed reversed, with 200 bp trimmed from the
  //  start (the original end) and 900 bp from the end (the original start):
  //
  //               0             10831
  //        [200bp]<------------------[900bp]
  //                  [0bp]-------------->[2000bp]
  //                          ------------->
  //

brianwalenz avatar Jun 23 '22 11:06 brianwalenz