private void readConfig(String genomeVersion, String configFileName) {
		//---
		// Read properties file
		//---
		configFileName = readProperties(configFileName);

		// Get config file directory
		String cfgDir = "";
		try {
			File configDir = new File(configFileName).getAbsoluteFile().getParentFile();
			cfgDir = configDir.getCanonicalPath();
		} catch (Exception e) {
			// Nothing done
			cfgDir = "";
			e.printStackTrace();
		}

		//---
		// Set attributes
		//---

		// Set data_dir if not overriden by constructor
		if (dataDir == null) dataDir = properties.getProperty("data_dir", DEFAULT_DATA_DIR);

		// Parse data dir
		if (dataDir.startsWith("~")) dataDir = Gpr.HOME + "/" + dataDir.substring(1); // Relative to 'home' dir?
		else if (!dataDir.startsWith("/")) dataDir = cfgDir + "/" + dataDir; // Not an absolute path?

		// Remove all trailing slashes
		while (dataDir.endsWith("/"))
			dataDir = dataDir.substring(0, dataDir.length() - 1); // make sure path doesn't end with '/' (some OS can have problems with "//" in paths)

		databaseRepository = properties.getProperty("database_repository", "");

		//---
		// Find all genomes in this config file
		//---
		genomeByVersion = new HashMap<String, Genome>();
		referenceByVersion = new HashMap<String, String>();
		nameByVersion = new HashMap<String, String>();
		for (Object k : properties.keySet()) {
			String key = k.toString();
			if (key.endsWith(KEY_GENOME)) {
				String genVer = key.substring(0, key.length() - KEY_GENOME.length());

				// Add full namne
				String name = properties.getProperty(genVer + KEY_GENOME);
				nameByVersion.put(genVer, name);

				// Add reference
				String ref = properties.getProperty(genVer + KEY_REFERENCE);
				referenceByVersion.put(genVer, ref);
			}
		}

		// Genome specified?
		if (!genomeVersion.isEmpty()) {
			// Read config file for genome version (if any)
			readGenomeConfig(genomeVersion, properties);

			// Codon tables
			createCodonTables(genomeVersion, properties);
		}

		// Set properties
		setFromProperties();
	}