public void mutatePrint(File aFile,mutations aMut,mutList aMutList,hap aHap){
		try{
		int i = 0,ichr;
		String out;
		mutNodeList tempMNList;
		
		out = String.format("M %.8f \t%d %d \t", aMut.getLocation(),aMut.getAncNode1().getName(),aMut.getAncNode2().getName());
		
		tempMNList = aMut.getMutNodes();
		while(tempMNList!=null){ // gross 
			tempMNList = tempMNList.getNextNode();
			i++;
		}
		out = out + String.format("%d  \t", i);
		tempMNList = aMut.getMutNodes();
		while(tempMNList != null){
			out = out + String.format("%d ", tempMNList.getNodeName());
			ichr = tempMNList.getNodeName();
			if(aHap.getnMut()[ichr] == aHap.getMutArraySize()[ichr]){
				int oldsize = aHap.getMutArraySize()[ichr];
				aHap.setMutArraySize(ichr, aHap.getMutArraySize()[ichr]*2);
				int[] temp = new int[aHap.getMutArraySize()[ichr]];
				
				//aHap.setMutIndex(ichr, new int[aHap.getMutArraySize()[ichr]]);
				for(i=0;i<oldsize;i++){
					temp[i] = aHap.getMutIndex()[ichr][i];
				}
				aHap.setMutIndex(ichr, temp );
			}
			aHap.setMutIndex(ichr,aHap.getnMut()[ichr],aMutList.getNumMut());
			aHap.setnMut(ichr, aHap.getnMut()[ichr]+1);
			tempMNList = tempMNList.getNextNode();
			
		}
		if(aMutList.getNumMut() == aMutList.getArraySize()){
			aMutList.setArraySize(aMutList.getArraySize()*2);
			double[] temp = new double[aMutList.arraySize];
			for(i=0;i<aMutList.getPos().length;i++){
				temp[i] = aMutList.getPos()[i];
			}
			aMutList.setPos(temp);
		}
		aMutList.setPos(aMutList.getNumMut(), aMut.getLocation());
		aMutList.setNumMut(aMutList.getNumMut() + 1);
		out = out + "\n";
		
		
		FileWriter fileOut = new FileWriter(aFile.getName(),true);
			
		
		BufferedWriter outwriter = new BufferedWriter(fileOut);
		outwriter.write(out);
		outwriter.close();
		
	
	}
	catch(Exception e){
		e.printStackTrace();
	}
}