@Override
public void readTree(String filepath) throws IOException {
		
		//Initialisation
		nodes = new HashMap<Integer, Node>();
		events = new HashMap<Integer, Event>();
		in = new HashMap<Node, List<Event>>();
		root = null;
		originations = new ArrayList<Event>();
		out = Node.createOut();
		
		//Open the input file, read it, and fill the maps
		BufferedReader reader = new BufferedReader(new FileReader(filepath));
		String line;
		while((line = reader.readLine())!=null) {
			if(line.equals("NUMBER OF LEAVES")) {
				line = reader.readLine();
				nLeaves = Integer.parseInt(line);
			}
			if(line.equals("NUMBER OF GENES")) {
				line = reader.readLine();
				nGenes = Integer.parseInt(line);
			}
			if(line.equals("NUMBER OF EVENTS")) {
				line = reader.readLine();
				nEvents = Integer.parseInt(line);
			}
			if(line.equals("DISCRETIZATION")) {
				line = reader.readLine();
				scale = Double.parseDouble(line);
			}
			if(line.equals("LEAVES")) {
				readLeaves(reader);
			}
			if(line.equals("INTERN NODES")) {
				root = readInterNodes(reader);
			}
			if(line.equals("GENES")) {
				readGenes(reader);
			}
			if(line.equals("EVENTS")) {
				readEvents(reader);
			}
		}
		reader.close();
		
	}