Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reference required when in ONT mode? #18

Closed
jts opened this issue Jun 29, 2022 · 3 comments
Closed

reference required when in ONT mode? #18

jts opened this issue Jun 29, 2022 · 3 comments

Comments

@jts
Copy link

jts commented Jun 29, 2022

Hi,

I was trying out longphase today, and was consistently getting this error:

parsing VCF ... 9s                                                                                                                                                                         
parsing SV VCF ... 0s                                                                                                                                                                      
reading reference ... 0s                                                                                                                                                                   
parsing contig/chromosome: chr1 ... fetch SNP ... filter SNP ... terminate called after throwing an instance of 'std::out_of_range'                                                        
  what():  basic_string::at: __n (which is 10800) >= this->size() (which is 0)                                                                                                             
Aborted

I had a quick look in gdb and the error occurs in the filterSNP step:

#7  0x000055555556d849 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::at (__n=10800, this=0x1000) at /usr/include/c++/7/bits/basic_string.h:1077
#8  homopolymerLength (snp_pos=snp_pos@entry=10800, ref_string="") at Util.cpp:16
#9  0x0000555555566a60 in VariantParser::filterSNP (this=this@entry=0x7fffffffbc90, chr="chr1", readVariantVec=std::vector of length 0, capacity 0, chr_reference="")
    at ParsingBam.cpp:434
#10 0x000055555557c676 in PhasingProcess::PhasingProcess (this=<optimized out>, params=...) at PhasingProcess.cpp:57
#11 0x00005555555806c0 in PhasingMain (argc=<optimized out>, argv=<optimized out>) at Phasing.cpp:248
#12 0x000055555555b592 in main (argc=9, argv=0x7fffffffc1c8) at main.cpp:26

the homopolymerLength function appears to use the reference sequence which is an optional parameter. It would be good to inform the user that the reference is required when the --ont flag is set.

Thanks!

@ythuang0522
Copy link
Collaborator

@jts Please ignore the previous response. Originally we made the reference argument optional for both Pacbio and ONT. After adding this function for resolving the homopolymer issues of ONT, we forgot the reference should be now mandatory in ONT mode. We will be pushing a major update later. The new version will make the reference a mandatory argument. Thanks for reporting this issue. --Yao-Ting

@jts
Copy link
Author

jts commented Jun 30, 2022

Thank you!

@ythuang0522
Copy link
Collaborator

The issue was solved in v1.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants