@SuppressWarnings("static-access")
	void parseCmdLineOptions(String[] args) {
		//---
		// Create command line options
		//---
		Option help = OptionBuilder.withArgName("help").withDescription("Show this help message").create("help");
		Option inPe1Opt = OptionBuilder.withArgName("file").hasArg().withDescription("Qseq file for pair end 1").create("1");
		Option inPe2Opt = OptionBuilder.withArgName("file").hasArg().withDescription("Qseq file for pair end 2").create("2");
		Option indexOpt = OptionBuilder.withArgName("file").hasArg().withDescription("Qseq index ").create("i");
		Option seqsOpt = OptionBuilder.withArgName("seqs").hasArg().withDescription("Comma separated list of sequences").create("s");
		Option outOpt = OptionBuilder.withArgName("base").hasArg().withDescription("Base name for output files").create("o");

		options = new Options();
		options.addOption(help).addOption(inPe1Opt).addOption(inPe2Opt).addOption(indexOpt).addOption(seqsOpt).addOption(outOpt);

		//---
		// Parse command line args
		//---
		CommandLineParser parser = new PosixParser();
		try {
			CommandLine line = parser.parse(options, args);

			// Show help message?
			if( line.hasOption("help") ) {
				HelpFormatter formatter = new HelpFormatter();
				formatter.printHelp(Qseq2FastqSplit.class.getSimpleName(), options);
				System.exit(-1);
			}

			if( line.hasOption("1") ) inPe1 = line.getOptionValue("1");
			else parsingError("Missing required parameter '-1'");

			if( line.hasOption("2") ) inPe2 = line.getOptionValue("2");
			else parsingError("Missing required parameter '-2'");

			if( line.hasOption("i") ) inIndex = line.getOptionValue("i");
			else parsingError("Missing required parameter '-i'");

			if( line.hasOption("o") ) outBase = line.getOptionValue("o");
			else parsingError("Missing required parameter '-o'");

			if( line.hasOption("s") ) {
				String seqsStr = line.getOptionValue("s");
				for( String s : seqsStr.split(",") )
					seqs.add(s.toUpperCase());
			} else parsingError("Missing required parameter '-s'");

		} catch(ParseException e) {
			parsingError(e.getMessage());
		}
	}