protected DrawableTree readFile(BufferedReader buf) throws IOException, FileParseException {
		StringBuffer treeString = new StringBuffer();
		int parenDepth = 0;
		char[] c = new char[1];
		boolean reading = false;
		DrawableTree tree;
		
		while( buf.read(c) > -1) {
			if (reading) {
				treeString.append(c);
				if (c[0]=='(')
					parenDepth++;
				if (c[0]==')')
					parenDepth--;
				if (parenDepth==0)
					break;
			}
			else {
				if ( c[0]=='(') {
					reading = true;
					treeString.append(c);
					parenDepth++;
				}
			}
		}
		
		if (parenDepth != 0) {
			logger.warning("Error parsing newick tree: found partial string '" + treeString + "'");
			throw new FileParseException("Error parsing tree, found partial string : " + treeString);
		}
		else {
			tree = new SquareTree(treeString.toString());
						
			return tree;
		}
	}