import problem

User 54110dccfb

19-06-2007 00:05:48

I'm using jcman with Postgres.


I created a structure table by adding one more column using the following command.





> jcman c strtest --coldefs ", cid int4" ....





Then I would like to add data into the table.


For example, all my data is in a file (importdata.txt ) with the following format (First column = structure, second column = cid ).





cc3C(=O)N2C(c4ccc(cc4)Cl)C(=O)O)I)Cl 656933








Then using the following command, I tried to upload data into the structure table.





> jcman a strtest importdata.txt





It seems successful, but when I look at the content of the strtest table,


there is no data loaded into cid column, which I created.





Is there any problem in my import file format? Or should I specify some other options?





Please help me.

ChemAxon e274e1bada

19-06-2007 13:16:19

Hi You jung,





If you want to import data to your custom fields in database, you have to bind that fields with fields in the import file.


See the --connect option in jcman help. (jcman --help)


If your import file contains smiles formatted compounds with tab separated fields, that custom fields have no explicit name, however they have implicit name: field_x where "x" is meaning number of the field.


You can add custom name your fields, if you edit the input file, and insert a new line above first compound definition:


#SMILES fieldName1 fieldName2 ...


Important! This line must be tab separated.





Regards:


Edvard

User 54110dccfb

19-06-2007 14:18:57

I tried as you suggested, but it didn't work.





My file format is as below.





#SMILES CID


(cc3C(=O)N2C(c4ccc(cc4)Cl)C(=O)O)I)Cl 656933





And when I tried importing the file, it generates the following exceptions.





Collecting file information ...


Done.


Importing structures from importfile ...


java.io.IOException: file format not recognized


at chemaxon.formats.MolInputStream.init(MolInputStream.java:424)


at chemaxon.formats.MolInputStream.<init>(MolInputStream.java:123)


at chemaxon.formats.MolInputStream.<init>(MolInputStream.java:86)


at chemaxon.util.MolHandler.importMol(MolHandler.java:678)


at chemaxon.util.MolHandler.setMolecule(MolHandler.java:159)


at chemaxon.util.MolHandler.<init>(MolHandler.java:94)


at chemaxon.jchem.db.FileToSQLHandler.importFile(FileToSQLHandler.java:252)


at chemaxon.jchem.db.Importer.importMols(Importer.java:444)


at chemaxon.jchem.Command.importFromFile(Command.java:940)


at chemaxon.jchem.Command.main(Command.java:432)


Error in molecule 1


chemaxon.formats.MolFormatException: java.io.IOException: file format not recognized


at chemaxon.util.MolHandler.toMolFormatException(MolHandler.java:699)


at chemaxon.util.MolHandler.importMol(MolHandler.java:687)


at chemaxon.util.MolHandler.setMolecule(MolHandler.java:159)


at chemaxon.util.MolHandler.<init>(MolHandler.java:94)


at chemaxon.jchem.db.FileToSQLHandler.importFile(FileToSQLHandler.java:252)


at chemaxon.jchem.db.Importer.importMols(Importer.java:444)


at chemaxon.jchem.Command.importFromFile(Command.java:940)


at chemaxon.jchem.Command.main(Command.java:432)


Imported 1 structures


Done.

ChemAxon e274e1bada

19-06-2007 16:27:23

Sorry, the second method works only in developer version, but the first manner (field_0 is the name of your custom field) is working in the released version.