Git Product home page Git Product logo

Comments (4)

onordesjo avatar onordesjo commented on June 23, 2024

Hi @callumparr,

The only reason a read would not be written out is if there's an overlapping match:

https://github.com/nanoporetech/duplex-tools/blob/master/duplex_tools/split_on_adapter.py#L173

We've decided to err on the side that doesn't cause any sequence duplication in the output in this case, but it's likely that we can solve it more elegantly somehow.

from duplex-tools.

callumparr avatar callumparr commented on June 23, 2024

Does overlapping match relate to the adapter sequences like below?

image

from duplex-tools.

onordesjo avatar onordesjo commented on June 23, 2024

You can see which spans are candidates to write out by looking at hits just before this line:

https://github.com/nanoporetech/duplex-tools/blob/master/duplex_tools/split_on_adapter.py#L164

The idea is to write out the complement of the adapter hits, so the following loops through the intervals against the adapter, and the hits will be populated with the complement of this (the end of each hit + the beginning of the next hit).

Note that 0,0 and len(seq),len(seq) are added to allow for the first and last "complement" to the adapter hits to be written out.

for left_hit, right_hit in pairwise(
        [(0, 0), *result['locations'], (len(seq), len(seq))]):
    hits.append([left_hit[1], right_hit[0]])

I'd imagine seeing what that variable is would bring some clarity into why there's one read that's not being written out

from duplex-tools.

callumparr avatar callumparr commented on June 23, 2024

Thank you. For now, it seems by eye that there is some overlap.

from duplex-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.