if (tmp.endsWith(".gz")) tmp = tmp.substring(0, tmp.length() - 3);
if (tmp.endsWith("wig") || tmp.endsWith("bedgraph") || tmp.endsWith("cpg") || tmp.endsWith("map")) {
ToolsWiggleParser wg = new ToolsWiggleParser(iFile.getAbsolutePath(), this, genome);
wg.parse();
} else if (tmp.endsWith("cn") || tmp.endsWith("xcn") || tmp.endsWith("igv") || tmp.endsWith("snp")) {
CNParser cnParser = new CNParser(iFile.getAbsolutePath(), this, genome);
cnParser.parse();
} else {
String msg = "Error: cannot convert files of type '" + tmp + "' to TDF format.";
msg += "\nTry specifying the file type with the --fileType parameter.";
throw new RuntimeException(msg);
}