private List<Query[]> getQueries(List<String> querymixDirs,
			List<Integer[]> queryRuns, List<Integer> maxQueryNrs) {
		List<Query[]> allQueries = new ArrayList<Query[]>();

		Iterator<String> queryMixDirIterator = querymixDirs.iterator();
		Iterator<Integer[]> queryRunIterator = queryRuns.iterator();
		Iterator<Integer> maxQueryNrIterator = maxQueryNrs.iterator();

		while (queryMixDirIterator.hasNext()) {
			Integer[] queryRun = queryRunIterator.next();
			String queryDir = queryMixDirIterator.next();
			Query[] queries = new Query[maxQueryNrIterator.next()];

			for (int i = 0; i < queryRun.length; i++) {
				if (queryRun[i] != null) {
					Integer qnr = queryRun[i];
					if (queries[qnr - 1] == null) {
						File queryFile = new File(queryDir, "query" + qnr
								+ ".txt");
						File queryDescFile = new File(queryDir, "query" + qnr
								+ "desc.txt");
						if (doSQL)
							queries[qnr - 1] = new Query(queryFile,
									queryDescFile, "@");
						else
							queries[qnr - 1] = new Query(queryFile,
									queryDescFile, "%");

						// Read qualification information
						if (qualification) {
							File queryValidFile = new File(queryDir, "query"
									+ qnr + "valid.txt");
							String[] rowNames = getRowNames(queryValidFile);
							queries[qnr - 1].setRowNames(rowNames);
						}
					}
				}
			}
			allQueries.add(queries);
		}
		return allQueries;
	}