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

long command lines in header #83

Open
grenaud opened this issue Jul 31, 2013 · 1 comment
Open

long command lines in header #83

grenaud opened this issue Jul 31, 2013 · 1 comment

Comments

@grenaud
Copy link
Contributor

grenaud commented Jul 31, 2013

minor request. Is it possible to allow for very long lines in the @pg for bam files ? I always get:

terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::substr
Aborted

When I gdb it I get:
#7 0x00000000004283e1 in BamTools::Internal::SamFormatParser::ParseSQLine(std::string const&) ()
#8 0x0000000000428bc0 in BamTools::Internal::SamFormatParser::ParseSamLine(std::string const&) ()
#9 0x0000000000428f50 in BamTools::Internal::SamFormatParser::Parse(std::string const&) ()
#10 0x000000000041a993 in BamTools::SamHeader::SetHeaderText(std::string const&) ()
#11 0x0000000000432edf in BamTools::Internal::BamHeader::ReadHeaderText(BamTools::Internal::BgzfStream*, unsigned int const&) ()
#12 0x0000000000433051 in BamTools::Internal::BamHeader::Load(BamTools::Internal::BgzfStream*) ()
#13 0x0000000000421a8d in BamTools::Internal::BamReaderPrivate::Open(std::string const&) ()

@grenaud
Copy link
Contributor Author

grenaud commented Aug 1, 2013

I think I solved by just adding
if((*tokenIter).empty()) continue;
after each for ( ; tokenIter != tokenEnd; ++tokenIter ) {
for:
ParseHDLine
ParseSQLine
ParseRGLine
ParsePGLine

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

1 participant