girke-lab / ChemmineR-git-svn-bridge

This is defunct, now replaced with https://github.com/girke-lab/ChemmineR
2 stars 6 forks source link

Fix mol file import #5

Closed tgirke closed 10 years ago

tgirke commented 10 years ago

This is trivial but should be added.

khoran commented 10 years ago

Rather than have an import function for every format, should we perhaps create a new function that just converts anything to an SDFset (using Openbabel)? Then users could call this first to get an SDFset. So, something like: eiInit( convertToSDF("myCompoundFile.mol","MOL"),...)

tgirke commented 10 years ago

Not in this case since the fix is so trivial.

Thomas

On Mon, Mar 31, 2014 at 06:10:04PM +0000, kevin wrote:

Rather than have an import function for every format, should we perhaps create a new function that just converts anything to an SDFset (using Openbabel)? Then users could call this first to get an SDFset. So, something like: eiInit( convertToSDF("myCompoundFile.mol","MOL"),...)

— Reply to this email directly or view it on GitHubhttps://github.com/girke-lab/ChemmineR/issues/5#issuecomment-39121480.

khoran commented 10 years ago

I'm not sure what your referring to by "fix", this seems like a new feature to me. Is there something that used to work that is now broken? Or else if this is a new feature, how do you want it implemented? What do you mean by "import"? Are you referring to the "loadSdf" and "loadSmile" type of functions? Do you want a "loadMol" function?

tgirke commented 10 years ago

This is more an oversight. Mol files are almost identical to SDFs with a single molecule. If we append the $$$$ at the end then the import will work. I can handle this change if you want.

Thomas

On Mon, Mar 31, 2014 at 07:19:58PM +0000, kevin wrote:

I'm not sure what your referring to by "fix", this seems like a new feature to me. Is there something that used to work that is now broken? Or else if this is a new feature, how do you want it implemented? What do you mean by "import"? Are you referring to the "loadSdf" and "loadSmile" type of functions? Do you want a "loadMol" function?

— Reply to this email directly or view it on GitHubhttps://github.com/girke-lab/ChemmineR/issues/5#issuecomment-39129616.

khoran commented 10 years ago

I'm happy to do it, I just needed to know what you meant. If its easier to do it yourself then explain it to me though, that's fine with me.

Would the user then use the loadSDF function to load a Mol file? Or do you want a loadMol function? If the former, do you want a parameter like "format" that get set to "MOL" so we know to append the "$$$$", or should we try to detect it from the file name? Or are you actually talking about the read.* family of functions? Sorry for all the questions, I'm just not quite understanding everything yet.

tgirke commented 10 years ago

We would just teach read.SDFstr/read.SDFset to detect whether there is no $$$$ tag in a file. If so we assume it is a mol file and the tag will be appended on the SDFstr level during the import. Everything downstream should work, I think.

The documentation for read.SDFstr/read.SDFset says that they are importing sdf and mol file but I just realized that the latter was left out.

Thomas

On Mon, Mar 31, 2014 at 09:00:04PM +0000, kevin wrote:

I'm happy to do it, I just needed to know what you meant. If its easier to do it yourself then explain it to me though, that's fine with me.

Would the user then use the loadSDF function to load a Mol file? Or do you want a loadMol function? If the former, do you want a parameter like "format" that get set to "MOL" so we know to append the "$$$$", or should we try to detect it from the file name? Or are you actually talking about the read.* family of functions? Sorry for all the questions, I'm just not quite understanding everything yet.

— Reply to this email directly or view it on GitHubhttps://github.com/girke-lab/ChemmineR/issues/5#issuecomment-39141155.

khoran commented 10 years ago

ok, I can do that.

khoran commented 10 years ago

fixed in d189b1105204e9b1aeb0464b7529b828567bc8a1