The KDRC KGutProject hosts a screen of 353 GAL4 / split-GAL4 driver lines for expression across ten regions of the adult Drosophila gut (Crop, PV, R1R5, MHJ, Hindgut, Rectum) from Lim et al. 2021. The site does not expose a machine-readable API; the search form is driven by a proprietary AUIquery.do endpoint whose POST payload is signed client-side.

These helpers drive a headless Chrome session via ChromoteSession, which reuses the site's own JavaScript to run the search and detail look-ups. The result is the same as a user filling in the search box by hand but scripted and batched.

Call kdrc_start_session() once, then kdrc_lookup_lines() with a vector of line identifiers (e.g. "R20A02", "VT012345", "JK48870_1"), and kdrc_close_session() when you are done. The returned data frame has one row per (query_line, matching KDRC record) pair, with the ten region Y/N flags from the KDRC detail page.

kdrc_start_session(chrome = NULL)

kdrc_close_session(session)

kdrc_search_line(line, session = NULL, timeout = 8)

kdrc_line_regions(seq, session = NULL, timeout = 8)

kdrc_lookup_lines(lines, session = NULL, timeout = 8, quiet = FALSE)

Arguments

chrome

path to the Google Chrome / Chromium executable. If NULL, chromote uses its default detection.

session

a KDRC chromote session, as returned by kdrc_start_session(). If NULL, a temporary session is created for the duration of the call.

line

character; a single line identifier to search for. KDRC matches against KGUTID, BDSCID, FlyLightID and AssociatedGene.

timeout

seconds to wait for each async query to populate a dataset before giving up on that line.

seq

integer; the KDRC row identifier (column seq in a search result), used to fetch detail-page region flags.

lines

character vector of line identifiers.

quiet

logical; if FALSE (the default) print a one-line progress update per 25 lines.

Value

kdrc_search_line() returns a data.frame of zero or more KDRC hit records (columns seq, KGUTID, kGutType, BDSCID, FlyLightID, AssociatedGene).

kdrc_line_regions() returns a named character vector of the ten region flags for a given seq ("Y", "N" or "" where not scored).

kdrc_lookup_lines() returns a data.frame with one row per (query_line, KDRC record) pair, columns query_line, kgut_hit, kGutType, KGUTID, BDSCID, FlyLightID, AssociatedGene, p_seq, and the ten region flags Crop, PV, R1..R5, MHJ, Hindgut, Rectum. Lines with no hit appear as a single row with kgut_hit = "N" and everything else NA.

kdrc_start_session() returns an environment wrapping the chromote session; pass it back to the other functions via the session argument.

Dependencies

Requires the chromote R package and a local Chrome / Chromium install. Install with install.packages("chromote").

Citation

Lim, S.Y., et al. (2021). Identification and characterization of GAL4 drivers that mark distinct cell types and regions in the Drosophila adult gut. J. Neurogenet. 35(1):33–44.

Examples

# \donttest{
if (FALSE) { # \dontrun{
# One-off lookup
kdrc_lookup_lines("R20A02")

# Batch lookup with an explicit session
s <- kdrc_start_session()
res <- kdrc_lookup_lines(c("R20A02", "VT012345", "SS36097"), session = s)
kdrc_close_session(s)
} # }# }