Very annoying: we have been emitting an extra TAB in the header of the VCF (which breaks some parsers) for sites-only file. Hopefully not too many integration tests will need to be fixed...

This commit is contained in:
Eric Banks 2012-05-07 12:20:11 -04:00
parent a90482c772
commit 66838a073e
1 changed files with 5 additions and 1 deletions

View File

@ -108,9 +108,13 @@ public class StandardVCFWriter extends IndexingVCFWriter {
// write out the column line
mWriter.write(VCFHeader.HEADER_INDICATOR);
boolean isFirst = true;
for ( VCFHeader.HEADER_FIELDS field : mHeader.getHeaderFields() ) {
if ( isFirst )
isFirst = false; // don't write out a field separator
else
mWriter.write(VCFConstants.FIELD_SEPARATOR);
mWriter.write(field.toString());
mWriter.write(VCFConstants.FIELD_SEPARATOR);
}
if ( mHeader.hasGenotypingData() ) {