matrix.set(Rows, j, Float.NaN);
columnList[columnIndex].add(Float.NaN);
	public void parse(String file, String atrFileName, String gtrFileName) throws IOException {		BufferedReader br = new BufferedReader(new FileReader(file));				// Remove Comment Lines/*    for (i=DataFileList->Count-1;i>=0;i--) //FIXME    {        if (DataFileList->Strings[i].SubString(1,6) == "REMARK")        {            DataFileList->Delete(i);        }        if (DataFileList->Strings[i].Length() < 3)        {            DataFileList->Delete(i);        }    }*/	 		int Columns = 0;		// Parse First Line		java.util.List names = new ArrayList();		java.util.List rowNames = new ArrayList();		java.util.List rowDescriptions = new ArrayList();				String[] headers = split(br.readLine());		int numHeaders = headers.length;		boolean[] IsData = new boolean[numHeaders];				Arrays.fill(IsData, true);		int GIDIndex = findIndexOf(headers, "GID");		int UniqueIDIndex = 0;		boolean LoadGeneTree = false;		if(GIDIndex > -1) {			LoadGeneTree = true;			UniqueIDIndex = GIDIndex + 1;			IsData[GIDIndex] = false;					}		String UniqueID = headers[UniqueIDIndex];		IsData[UniqueIDIndex] = false;		int NameIndex = findIndexOf(headers, "NAME");		if(NameIndex > -1) {					IsData[NameIndex] = false;		}		int GeneWeightIndex = findIndexOf(headers, "GWEIGHT");				if(GeneWeightIndex > -1) {			IsData[GeneWeightIndex] = false;		}			 		matrix =  DatasetFactory.createDataset(1, headers.length / 2);		for(int i = 0; i < headers.length; i++) {			if(IsData[i]) {				String array = headers[i];				names.add(array);				Columns++;			}		}				int Rows = 0;		String line = null;		boolean LoadArrayTree = false;		String ArrayWeightString = null;		String ArrayHeaderString = null;		while((line = br.readLine()) != null) {			String[] tokens = split(line);// toArray(line);				if(tokens[0].equals("AID")) {				LoadArrayTree = true;				ArrayHeaderString = line;							} else if(tokens[0].equals("EWEIGHT")) {				ArrayWeightString = tokens[0];			} else {				String GID = null;				if((GIDIndex > -1) && (GIDIndex < tokens.length)) {					GID = tokens[GIDIndex];				}				String Name = null;				if((NameIndex > -1) && (NameIndex < tokens.length)) {					Name = tokens[NameIndex];				}				String ID = null;				if((UniqueIDIndex > -1) && (UniqueIDIndex < tokens.length)) {					ID = tokens[UniqueIDIndex];				}				double Weight = 1.0;				if((GeneWeightIndex > -1) && (GeneWeightIndex < tokens.length)) {					try {						Weight = Double.parseDouble(tokens[GeneWeightIndex]);					} catch(NumberFormatException nfe) {					}				}				if (LoadGeneTree) {                try {                  //  int nGID =  Integer.parseInt(GID.substring("GENE".length(),GID.length()-1)); 						  TreeNode node = new TreeNode(null, null, 1, ID);						  node.position = Rows;						  availableRowNodes.put(GID, node);						//  System.out.println("created " + GID);                }                catch (NumberFormatException e) {					                }            }								rowNames.add(ID);				rowDescriptions.add(Name);								int columnIndex = 0;				for(int j = 0; j < min(tokens.length, headers.length); j++) {					if(IsData[j]) {						try {							float Val = Float.parseFloat(tokens[j]);							minValue = Val < minValue ? Val : minValue;							maxValue = Val > maxValue ? Val : maxValue;							matrix.set(Rows, columnIndex, Val);						} catch(NumberFormatException nfe) {							matrix.set(Rows, columnIndex, Float.NaN);// missing value						}												columnIndex++;					}				}				/*				    Handle case where there are too few columns of data				  */				for(int j = columnIndex; j < Columns; j++) {					matrix.set(Rows, j, Float.NaN);					// GeneTreeNode->Data->Mask[j] = false;				}				Rows++;			}		}					if(LoadArrayTree) {			StringTokenizer st = new StringTokenizer(ArrayHeaderString);			st.nextToken(); // skip 'AID'						for(int i = 0, size = matrix.getColumnDimension(); i < size; i++) {				String name = matrix.getName(i);				TreeNode node = new TreeNode(null, null, 1, name);				node.position = i;				String aid = st.nextToken();				availableColumnNodes.put(aid, node);			}		}		  				matrix.setNames(names);		matrix.setRowNames(rowNames);		matrix.setRowDescriptions(rowDescriptions);					if(gtrFileName!=null) {			geneTreeRoot = parseGtrOrAtr(gtrFileName, true, availableRowNodes);		}		if(atrFileName!=null) {			arrayTreeRoot = parseGtrOrAtr(atrFileName, false, availableColumnNodes);		}	}