Skip to content

Commit

Permalink
Allow header size to be less than content.
Browse files Browse the repository at this point in the history
* Added TODO for defining process in wiki
  • Loading branch information
olas committed Jan 9, 2012
1 parent c738772 commit 183a837
Showing 1 changed file with 7 additions and 6 deletions.
Expand Up @@ -205,11 +205,12 @@ public static List<ICDKMolecule> readFileIntoMoleculeList(
String[] parts = line.split(separator);

//Assert header is same size as data
if (parts.length!=headers.length)
throw new BioclipseException("Header and data have " +
"different number of columns. " +
"Header size=" + headers.length +
"Line " + lineno + " size=" + parts.length );
// if (parts.length!=headers.length)
// throw new BioclipseException("Header and data have " +
// "different number of columns. " +
// "Header size=" + headers.length +
// "Line " + lineno + " size=" + parts.length );
//TODO: We allow this for now, this needs to be defined in wiki how we handle

//Part 1 is expected to be SMILES
String smiles=parts[0];
Expand Down Expand Up @@ -250,7 +251,7 @@ public static List<ICDKMolecule> readFileIntoMoleculeList(


//Store rest of parts as properties on mol
for (int i=1; i<headers.length;i++){
for (int i=1; i<parts.length;i++){
mol.getAtomContainer().setProperty(headers[i], parts[i]);
}

Expand Down

0 comments on commit 183a837

Please sign in to comment.