SamStudio8 / gretel

An algorithm for recovering haplotypes from metagenomes
https://gretel.readthedocs.io/en/latest/
MIT License
31 stars 4 forks source link

Improve error message for no bridge found #34

Open jsgounot opened 3 years ago

jsgounot commented 3 years ago

Hi,

I run Gretel on different datasets. I've got this error message :

[FAIL] Unable to recover pairwise evidence concerning SNP #15 at position 1077 Gretel needs every SNP to appear on a read with at least one other SNP, at least once. There is no read in your data set that bridges SNP #15 with any of its neighbours.

However, when I look at my datafile with IGV, I can see multiple reads which have 2 SNPs : screenshot

Am I missing something ? Thanks !

SamStudio8 commented 3 years ago

Hi Jean, There should be a table that gets dumped out that shows all the observed SNP pairs, what does that show around SNP 15?

Sam

On Wed, 25 Nov 2020, 10:10 GOUNOT Jean-Sebastien, notifications@github.com wrote:

Hi,

I run Gretel on different datasets. I've got this error message :

[FAIL] Unable to recover pairwise evidence concerning SNP #15 https://github.com/SamStudio8/gretel/issues/15 at position 1077 Gretel needs every SNP to appear on a read with at least one other SNP, at least once. There is no read in your data set that bridges SNP #15 https://github.com/SamStudio8/gretel/issues/15 with any of its neighbours.

However, when I look at my datafile with IGV, I can see multiple reads which have 2 SNPs : screenshot https://imgur.com/a/3IVVRos

Am I missing something ? Thanks !

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SamStudio8/gretel/issues/34, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIN6OXMZPYSICJA5HO4XJ3SRTJYLANCNFSM4UCFXCZA .

jsgounot commented 3 years ago

Do you mean the one produced by --dumpsnps ?

13  969 969
14  1032    1032
15  1077    1077
16  1206    1206
17  1230    1230

Edit : If you want, here is an example with bam and vcf files. Not exactly the same data set but it produces to the same error message. The command line : gretel Ecoli-Merged-K12.bam Ecoli-Merged-K12_variants_2.cgretel.vcf.gz NC_000913.3 -s 1 -e 10000 &> log.txt.

SamStudio8 commented 3 years ago

Sorry for the confusion - it seems that table doesn't get printed if that particular error is found! The VCF you are using, what is the position of SNP 14 and SNP 16? It would seem one side is not bridged by a read.

On Wed, Nov 25, 2020 at 12:47 PM GOUNOT Jean-Sebastien < notifications@github.com> wrote:

Do you mean the one produced by --dumpsnps ?

13 969 969 14 1032 1032 15 1077 1077 16 1206 1206 17 1230 1230

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SamStudio8/gretel/issues/34#issuecomment-733685652, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIN6ORX7UEPDEC6TPYLGX3SRT4EPANCNFSM4UCFXCZA .

jsgounot commented 3 years ago

I just check with IGV, SNP 15 is linked to 14 but not to 16. However, 16 is linked to 17. So I guess that all consecutive pairs of SNPs must have at least one shared read?

SamStudio8 commented 3 years ago

Ah yes, Gretel requires all adjacent pairs must be bridged at least once (but ideally a little more)

On Fri, 27 Nov 2020, 01:47 GOUNOT Jean-Sebastien, notifications@github.com wrote:

I just check with IGV, SNP 15 is linked to 14 but not to 16. However, 16 is linked to 17. So I guess that all consecutive pairs of SNPs must have at least one shared read?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SamStudio8/gretel/issues/34#issuecomment-734530839, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIN6OU2DNFHGPASWSKBYJ3SR4AMVANCNFSM4UCFXCZA .

jsgounot commented 3 years ago

Ok I've been a bit confused by the error message then. Thanks for the help.

SamStudio8 commented 3 years ago

Understood! I'll try and improve that message.

On Fri, 27 Nov 2020, 08:21 GOUNOT Jean-Sebastien, notifications@github.com wrote:

Ok I've been a bit confused by the error message then. Thanks for the help.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SamStudio8/gretel/issues/34#issuecomment-734707935, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIN6OT6XMF3LK4C4CHY2ILSR5OO7ANCNFSM4UCFXCZA .