Fix RawHapMapCodec so that it can build indexes. Minor fixes to VCF codec.
This commit is contained in:
parent
841a906f21
commit
d44d5b8275
|
|
@ -25,8 +25,11 @@
|
|||
package org.broadinstitute.sting.utils.codecs.hapmap;
|
||||
|
||||
import org.broad.tribble.AsciiFeatureCodec;
|
||||
import org.broad.tribble.FeatureCodecHeader;
|
||||
import org.broad.tribble.annotation.Strand;
|
||||
import org.broad.tribble.readers.AsciiLineReader;
|
||||
import org.broad.tribble.readers.LineReader;
|
||||
import org.broad.tribble.readers.PositionalBufferedStream;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
|
@ -116,4 +119,10 @@ public class RawHapMapCodec extends AsciiFeatureCodec<RawHapMapFeature> {
|
|||
}
|
||||
return headerLine;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FeatureCodecHeader readHeader(final PositionalBufferedStream stream) throws IOException {
|
||||
final AsciiLineReader br = new AsciiLineReader(stream);
|
||||
return new FeatureCodecHeader(readHeader(br), br.getPosition());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ package org.broadinstitute.sting.utils.codecs.vcf;
|
|||
|
||||
import org.broad.tribble.TribbleException;
|
||||
import org.broad.tribble.readers.LineReader;
|
||||
import org.broad.tribble.util.ParsingUtils;
|
||||
import org.broadinstitute.sting.utils.variantcontext.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
|
@ -119,7 +117,7 @@ public class VCFCodec extends AbstractVCFCodec {
|
|||
// empty set for passes filters
|
||||
List<String> fFields = new LinkedList<String>();
|
||||
// otherwise we have to parse and cache the value
|
||||
if ( filterString.indexOf(VCFConstants.FILTER_CODE_SEPARATOR) == -1 )
|
||||
if ( !filterString.contains(VCFConstants.FILTER_CODE_SEPARATOR) )
|
||||
fFields.add(filterString);
|
||||
else
|
||||
fFields.addAll(Arrays.asList(filterString.split(VCFConstants.FILTER_CODE_SEPARATOR)));
|
||||
|
|
|
|||
Loading…
Reference in New Issue