Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stx_query() with CAS no. that returns no data on Ecotox web search returns large amounts of data. #4

Open
andbeck opened this issue Nov 21, 2022 · 1 comment
Assignees
Milestone

Comments

@andbeck
Copy link

andbeck commented Nov 21, 2022

It is possible that the stx_query() function is returning information when there should be a null result from the database.

Using a CAS from the help files

# cas from help files
cas_1 <- c("35554-44-0")

# query
l1 <- stx_query(cas = cas_1,
                exposure = 'aquatic',
                taxa = 'Daphnia magna')

# one result
l1$aggregated$cname

Using a CAS that returns nothing on the web database (1073-69-4) [4-Chlorophenylhydrazine]

Screenshot 2022-11-21 at 23 01 59

# DOES NOT WORK
# this cas returns nothing on the database
# but stx_query does

cas_noDB <- c("1073-69-4")
badQuery <- stx_query(casnr = cas_noDB)

# returns a huge amount of stuff.
# 5664 names
badQuery$aggregated$cname
# none of them contain the compound
sum(grepl("Chlorophenylhydrazine", badQuery$aggregated$cname))
@andbeck andbeck changed the title six_query with CAS that returns no data on Ecotox web search returns large amounts of data. stx_query() with CAS no. that returns no data on Ecotox web search returns large amounts of data. Nov 21, 2022
@andschar
Copy link
Owner

Thanks for reporting! Yes, this is indeed strange, it should return an empty data.table. Will work on that.

@andschar andschar self-assigned this Nov 23, 2022
@andschar andschar added this to the v0.0.3 milestone Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants