static void creatFeatures(DrugBank drugbank, SIDER sider, ArrayList<UnifiedDrug> uniDrugs) throws IOException {
		ArrayList<DrugFeature> features = new ArrayList<DrugFeature>();
		Indexer substructures = new Indexer();
		Indexer interactions = new Indexer();
		Indexer pathways = new Indexer();
		Indexer targets = new Indexer();
		Indexer enzymes = new Indexer();
		Indexer transporters  = new Indexer();
		Indexer carriers = new Indexer();
		Indexer siders = new Indexer();
		for (UnifiedDrug uniDrug: uniDrugs) {
			int idx = uniDrug.getDrugBank();
			String name = uniDrug.getSIDER();
			System.out.println(idx+"th drug in DrugBank and drug "+name+" in SIDER");
			DrugFeature feature = new DrugFeature();
			/* Substructures */
			feature.addFeature(drugbank.getSubStructures(idx), substructures);
			/* Interactions */
			feature.addFeature(drugbank.getInteractions(idx), interactions);
			/* Pathways */
			String KEGGD = drugbank.getKEGGDrug(idx);
			if (KEGGD != null)
				feature.addFeature(KEGG.Parser.extractPathways(KEGG.linkedEntries(KEGG.Database.PATHWAY, drugbank.getKEGGDrug(idx)))
						, pathways);
			else
				feature.addFeature(new ArrayList<String>(), pathways);
			/* Targets, Enzymes, Transporters, Carriers */
			feature.addFeature(drugbank.getTargetsPartners(idx), targets);
			feature.addFeature(drugbank.getEnzymesPartners(idx), enzymes);
			feature.addFeature(drugbank.getTransportersPartners(idx), transporters);
			feature.addFeature(drugbank.getCarriersPartners(idx), carriers);
			/* side effects */
			feature.addFeature(sider.getSIDE(name), siders);
			features.add(feature);
		}
		//TODO: check partners overlap? if so combine;
		/* print features as binary vectors to a file */
		System.out.println("Length of feature vector is "+features.get(0).length());
		System.out.println("Last "+siders.size()+" bits are SIDE info.");
		BufferedWriter writer = new BufferedWriter(new FileWriter(new File(FEATURE_FILE)));
		for (DrugFeature feature: features) {
			writer.write(feature.toString());
			writer.newLine();
		}
		writer.close();
	}