return SAMFileReader.class.isAssignableFrom(type);
}
@Override
public Object parse( ParsingEngine parsingEngine, ArgumentSource source, Type type, ArgumentMatches matches ) {
SAMFileReaderBuilder builder = new SAMFileReaderBuilder();
ArgumentMatchValue readerFileName = getArgumentValue( createDefaultArgumentDefinition(source), matches );
if( readerFileName == null )
throw new UserException.CommandLineException("SAM file compression was supplied, but no associated writer was supplied with it.");
builder.setSAMFile(readerFileName.asFile());
// WARNING: Skipping required side-effect because stub is impossible to generate.
engine.addInput(source, builder);
// MASSIVE KLUDGE! SAMFileReader is tricky to implement and we don't yet have a stub. Return null, then