	private void parseClassification(BufferedReader buffer) throws IOException {
		String line = null;
		int counter = 0;
		while ((line = buffer.readLine ()) != null) {
			if ( line.startsWith("#"))
				continue;
			String[] spl  = line.split("\t");
			if ( spl.length != 6){
				System.err.println("Can't parse line " + line);
				continue;
			}
			counter++;
			String scopId = spl[0];
			String pdbId = spl[1];
			String range = spl[2];
			String classificationId = spl[3];
			Integer sunid = Integer.parseInt(spl[4]);
			String tree = spl[5];
			ScopDomain d = new ScopDomain();
			d.setScopId(scopId);
			d.setPdbId(pdbId);
			d.setRanges(extractRanges(range));
			d.setClassificationId(classificationId);
			d.setSunid(sunid);
			String[] treeSplit = tree.split(",");
			if (  treeSplit.length != 7 ) {
				System.err.println("can't process: " + tree );
			}
			int classId =Integer.parseInt(treeSplit[0].substring(3));
			int foldId = Integer.parseInt(treeSplit[1].substring(3));
			int superfamilyId = Integer.parseInt(treeSplit[2].substring(3));
			int familyId = Integer.parseInt(treeSplit[3].substring(3));						
			int domainId = Integer.parseInt(treeSplit[4].substring(3));
			int speciesId = Integer.parseInt(treeSplit[5].substring(3));
			int px = Integer.parseInt(treeSplit[6].substring(3));
			d.setClassId(classId);
			d.setFoldId(foldId);
			d.setSuperfamilyId(superfamilyId);
			d.setFamilyId(familyId);
			d.setDomainId(domainId);
			d.setSpeciesId(speciesId);
			d.setPx(px);
			List<ScopDomain> domainList;
			if ( domainMap.containsKey(pdbId)){
				domainList = domainMap.get(pdbId);
			} else {
				domainList = new ArrayList<ScopDomain>();
				domainMap.put(pdbId,domainList);
			}
			domainList.add(d);
			if ( sunid == 47763)
				System.out.println("FOUND DOMAIN!!!! " + sunid + " " + d);
		}
		System.out.println("parsed "+ counter + " scop sunid domains.");
	}

	private void parseClassification(BufferedReader buffer) throws IOException {
		String line = null;
		int counter = 0;
		while ((line = buffer.readLine ()) != null) {
			if ( line.startsWith("#"))
				continue;
			String[] spl  = line.split("\t");
			if ( spl.length != 6){
				System.err.println("Can't parse line " + line);
				continue;
			}
			counter++;
			String scopId = spl[0];
			String pdbId = spl[1];
			String range = spl[2];
			String classificationId = spl[3];
			Integer sunid = Integer.parseInt(spl[4]);
			String tree = spl[5];
			ScopDomain d = new ScopDomain();
			d.setScopId(scopId);
			d.setPdbId(pdbId);
			d.setRanges(extractRanges(range));
			d.setClassificationId(classificationId);
			d.setSunid(sunid);
			String[] treeSplit = tree.split(",");
			if (  treeSplit.length != 7 ) {
				System.err.println("can't process: " + line );
			}
			int classId =Integer.parseInt(treeSplit[0].substring(3));
			int foldId = Integer.parseInt(treeSplit[1].substring(3));
			int superfamilyId = Integer.parseInt(treeSplit[2].substring(3));
			int familyId = Integer.parseInt(treeSplit[3].substring(3));						
			int domainId = Integer.parseInt(treeSplit[4].substring(3));
			int speciesId = Integer.parseInt(treeSplit[5].substring(3));
			int px = Integer.parseInt(treeSplit[6].substring(3));
			d.setClassId(classId);
			d.setFoldId(foldId);
			d.setSuperfamilyId(superfamilyId);
			d.setFamilyId(familyId);
			d.setDomainId(domainId);
			d.setSpeciesId(speciesId);
			d.setPx(px);
			List<ScopDomain> domainList;
			if ( domainMap.containsKey(pdbId)){
				domainList = domainMap.get(pdbId);
			} else {
				domainList = new ArrayList<ScopDomain>();
				domainMap.put(pdbId,domainList);
			}
			domainList.add(d);
			if ( sunid == 47763)
				System.out.println("FOUND DOMAIN!!!! " + sunid + " " + d);
		}
		System.out.println("parsed "+ counter + " scop sunid domains.");
	}
