diff --git a/src/utils/FileRecordTools/FileReaders/SingleLineDelimTextFileReader.cpp b/src/utils/FileRecordTools/FileReaders/SingleLineDelimTextFileReader.cpp index 054f86f3b..e4e645dfc 100644 --- a/src/utils/FileRecordTools/FileReaders/SingleLineDelimTextFileReader.cpp +++ b/src/utils/FileRecordTools/FileReaders/SingleLineDelimTextFileReader.cpp @@ -187,5 +187,5 @@ CHRPOS SingleLineDelimTextFileReader::getVcfSVlen() { } } // not found - return INT_MIN; + return 1; } diff --git a/src/utils/FileRecordTools/Records/VcfRecord.cpp b/src/utils/FileRecordTools/Records/VcfRecord.cpp index 54bf2ae27..c95128a44 100644 --- a/src/utils/FileRecordTools/Records/VcfRecord.cpp +++ b/src/utils/FileRecordTools/Records/VcfRecord.cpp @@ -23,7 +23,9 @@ bool VcfRecord::initFromFile(SingleLineDelimTextFileReader *fileReader) if (_varAlt[0] == '<') { // this is a structural variant. Need to parse the tags to find the endpos, // UNLESS it's an insertion. - if (!(_varAlt[1] == 'I' && _varAlt[2] == 'N' && _varAlt[3] == 'S')) { + if (memcmp(_varAlt.c_str(), "<*>", 3) == 0) { + _endPos = _startPos + 1; + } else if (memcmp(_varAlt.c_str(), "", 5) != 0) { _endPos = _startPos + fileReader->getVcfSVlen(); } else { //for insertions, treat as zero-length records