GithubHelp home page GithubHelp logo

Comments (7)

iqbal-lab avatar iqbal-lab commented on August 14, 2024

OK, @coelias , @sm0179 - I'm looking into this. The code loads up into the kmer hash precisely the intervals found by bidir_search_bwd(), so I'm stepping through that to see why it thinks (19,22) is there

from gramtools.

iqbal-lab avatar iqbal-lab commented on August 14, 2024

Just logging this for digestion later. If I delete the precalc file , and run, then I notice that as it is going through bidir_search_bwd, the range search returns (21,5). I don't see how row 21 could ever be associated with 5

from gramtools.

iqbal-lab avatar iqbal-lab commented on August 14, 2024

Some more toy stuff:

PRG = A5C6G5T
use kmer 2

This is the kmer file
AC
CT
AG
GT
which is correct

and this is the precalc file
3 4 |0|3 4 |7 9 |5 @|
1 3 |0|1 2 |6 8 |5 2 @|
2 4 |0|2 3 |6 8 |5 @|
1 2 |0|1 2 |6 6 |5 1 @|

Notice it marks all the kmers as not in ref (marked by the |0|). This is a bit confusing.
What kmers_in_ref means under the hood is, it does NOT have a match that is directly to the right of a number. That is true for all of these kmers.

So look at the first row
3 4 |0|3 4 |7 9 |5 @|

kmer GT has SA interval [3,4) - ie just the row 3.

bwm of A5C6G5T$ is
$A5C6G5T
5C6G5T$A
5T$A5C6G
6G5T$A5C
A5C6G5T$
C6G5T$A5
G5T$A5C6
T$A5C6G5

So that is right.

But now look at the second line
1 3 |0|1 2 |6 8 |5 2 @|

kmer AG has interval [1,2) - ie this line 5C6G5T$A - makes no sense
(The site info is right - it overlaps site 5 on allele 2)

Another error - final line:

1 2 |0|1 2 |6 6 |5 1 @|

kmer AC has interval [1,2) - ie row 1, ie 5C6G5T$A - again makes no sense

from gramtools.

iqbal-lab avatar iqbal-lab commented on August 14, 2024

For the record, the SA intervals generated are correct for a PRG with no variation:

PRG: AACGTT

kmers file

AA
AC
CG
GT
TT

precalc file

4 4 |1|6 7 |6 9 ||
3 4 |1|4 5 |5 8 ||
2 3 |1|3 4 |4 7 ||
1 2 |1|2 3 |3 6 ||
1 1 |1|1 2 |2 5 ||

which is all consistent with this BWM

$AACGTT
AACGTT$
ACGTT$A
CGTT$AA
GTT$AAC <<<<<<
T$AACGT
TT$AACG

eg look at 2nd line: 34=GT and this is there on line indexed number 4, marked <<< above
So SA interval is [4,5)

from gramtools.

iqbal-lab avatar iqbal-lab commented on August 14, 2024

Actually the fastest way to see there is a problem is to look at this

3 4 |0|3 4 |7 9 |5 @|
1 3 |0|1 2 |6 8 |5 2 @|
2 4 |0|2 3 |6 8 |5 @|
1 2 |0|1 2 |6 6 |5 1 @|

both the kmers AG and AC have the same SA interval = [1,2). Must be impossible.

PRG is A5C6G5T

bwm of A5C6G5T is
5C6G5TA
5TA5C6G
6G5TA5C
A5C6G5T
C6G5TA5
G5TA5C6
TA5C6G5

bwm of A5C6G5T$ is
$A5C6G5T
5C6G5T$A
5T$A5C6G
6G5T$A5C
A5C6G5T$
C6G5T$A5
G5T$A5C6
T$A5C6G5

from gramtools.

iqbal-lab avatar iqbal-lab commented on August 14, 2024

Hm - so this is all a mess as I was generating those BWMs during debugging without converting to integers. Will close this and create a new clean one

from gramtools.

iqbal-lab avatar iqbal-lab commented on August 14, 2024

Close this - is a mess. Open a new clean one.

from gramtools.

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.