* @param file the filename to write to
* @param engine the engine
* @return a SAMFileWriter with the correct options set
*/
public static SAMFileWriter createSAMFileWriter(final String file, final GenomeAnalysisEngine engine) {
final SAMFileWriterStub output = new SAMFileWriterStub(engine, new File(file));
output.processArguments(engine.getArguments());
return output;
}