User 39ade0cdf9
21-05-2014 09:48:16
Dear experts,
I want to highlight the query structure for results returned by substructure search in jchem cartridge.
As you know, this is executed by standard SQL, I referred to function: jcf.hitColorAndAlign
http://www.chemaxon.com/jchem/doc/dev/cartridge/cartapi.html#jcf_hitcoloralign
But why there is a strange parameter, explicit rowids array list here? I want to search the whole table, how can I appoint all records in the table to be matched? Thanks!
select * from table(jcf.hitColorAndAlign(
null, 'mystructtable', 'the_struct_col',
'Brc1ccccc1',
'AAARVaAAEAAAJkpABP,AAARVaAAEAAAJkpABc,AAARVaAAEAAAJkpABp',
't:s', 'alignmentMode:rotate coloring:y'))
User 39ade0cdf9
21-05-2014 09:49:41
when given a short exact rowid list string, it works.
But it's impossible to give such a string when searching the whole table.
ChemAxon 9c0afc9aaf
21-05-2014 16:00:30
Hi,
The idea is that you first search and obtain the ROWID list with jc_compare.
Then you can align these with multiple calls to jcf.hitColorAndAlign, using the rowid values from the search, for example as you display them page by page.
Best regards,
Szilard
User 39ade0cdf9
22-05-2014 00:54:02
Thanks for your reply!
Indirect hit coloring may save unnecessary calculation for record pages not displayed.
But a direct coloring option maybe much convenient for users, another question is if jchem cartridge can use direct paging in SQL clause, or we have to get all the matched rowids and paging manually like API style?
In MySQL database, we usually use something like: limit 0, 30 to page the matched records.
In such a SQL clause, we can only obtain the MRV file and need some extra steps to map these data back to other data fields:
select * from table(jcf.hitColorAndAlign(
null, 'mystructtable', 'the_struct_col',
'Brc1ccccc1',
'AAARVaAAEAAAJkpABP,AAARVaAAEAAAJkpABc,AAARVaAAEAAAJkpABp',
't:s', 'alignmentMode:rotate coloring:y'))
ChemAxon 61b4fee994
22-05-2014 18:35:54
Hi,
There are no extra paging options in Jchem Cartridge, it leaves the task for its users as it would be very difficult to create a paging function that is useful for everyone.
You can restrict the returned number of rows in jc_compare by adding the maxHitCount search option. Otherwise you should rely on standard Oracle db tools, as adding ROWNUM<=n to return the first n rows of the query. There are a few other tips mentioned here.
Regards,
Tamas