if ( N_WAY_OUT != null ) {
boolean createIndex = true;
if ( N_WAY_OUT.toUpperCase().endsWith(".MAP") ) {
writerToUse = new NWaySAMFileWriter(getToolkit(),loadFileNameMap(N_WAY_OUT),
SAMFileHeader.SortOrder.coordinate,true, createIndex, generateMD5s,createProgramRecord(),KEEP_ALL_PG_RECORDS);
} else {
writerToUse = new NWaySAMFileWriter(getToolkit(),N_WAY_OUT,SAMFileHeader.SortOrder.coordinate,true,
createIndex, generateMD5s,createProgramRecord(),KEEP_ALL_PG_RECORDS);
}
} else {
// set up the output writer
setupWriter(getToolkit().getSAMFileHeader());