Closed maddygriz closed 11 months ago
confirming tests work with devtools::test()
══ Results ════════ Duration: 136.9 s
[ FAIL 0 | WARN 0 | SKIP 0 | PASS 421 ]
I took a look at all six items above and ran into problems with three of them.
Add plotting factor fix worked with GeoMxSet object as annot, but not witha df.
mouse <- "mu_dev_E11_005"
print(paste("Mouse is", mouse))
# Get lab worksheet to use with this mouse
lw_fn <- all_lw %>% select(slide_name, lw_fn) %>%
unique() %>% filter(slide_name == mouse) %>%
select(lw_fn) %>% unlist()
tifFile <- dir("~/data/cwilliams/sfn2023_mouseembryo_geomx/image_files/",
pattern = paste0(mouse, ".ome.tiff"),
full.names = TRUE, recursive = TRUE)
soo <- readSpatialOverlay(ometiff = tifFile, annots = lw_fn,
slideName = mouse, image = TRUE, #TRUE
saveFile = FALSE, outline = FALSE,
res = res)
unk <- annots %>% filter(claire_q == "?") %>% mutate(claire_q = roi)
addPlottingFactor(overlay = soo, annots = unk,
plottingFactor = "claire_q") %>% sampNames()
# incorrect output: character(0), and all ROIs not matched
xml Extraction:
tifFile <- "/home/rstudio/data/cwilliams/sfn2023_mouseembryo_geomx/image_files//mu_dev_E9_image_files/mu_dev_E9_001.ome.tiff"
d <- "~/data/mgrout/soo_v1.1_testing/ome-tiff-xml-output"
dir.create(d, showWarnings = FALSE)
xmlExtraction(tifFile, saveFile=TRUE, outdir = d)
list.files(d)
# incorrect output: [1] "mu_dev_E9_001.ome.tiff"
ROI character matching
list.files("~/data/mgrout/soo_v1.1_testing/paredes/")
lw_fn <- "~/data/mgrout/soo_v1.1_testing/paredes/GW23_1_Pilot_82522_Paredes_20220829T2254_LabWorksheet.txt"
ome_tiff_fn <- "~/data/mgrout/soo_v1.1_testing/paredes/GW23_1_Pilot_82522_Paredes.ome.tiff"
soo <- readSpatialOverlay(ometiff = ome_tiff_fn, annots = lw_fn,
slideName = "GW23_1_Pilot_82522_Paredes", image = TRUE, #TRUE
saveFile = FALSE, outline = FALSE,
res = res)
# Error, could not open:
# Extracting XML
# Parsing XML - scan metadata
# Parsing XML - overlay data
# Error in if (nrow(AOIattrs) < nrow(annots)) { :
# argument is of length zero
# In addition: There were 48 warnings (use warnings() to see them)
Update: I'm also seeing issues with cropping using mu_dev_E15_012.ome.tiff. See settings in screenshot.
@mgrout81
Will look at the cropping issue next.
I also added the capability to have the scale bar in mm instead of just um.
Scale bar issue: https://github.com/Nanostring-Biostats/SpatialOmicsOverlay/commit/6389565765bb600ec002de45730aa80013899d57#r129172009 Works and looks good with um and mm, but not nm.
Using my own script and v1.1.1 of the repo, I couldn't re-create the issue I saw here:https://github.com/Nanostring-Biostats/SpatialOmicsOverlay/pull/50#issuecomment-1734583862
The three issues I ran into in the above comment (https://github.com/Nanostring-Biostats/SpatialOmicsOverlay/pull/50#issuecomment-1734379257) are now working for me. The three items that were earlier working for me are still working.
longtests
updated mostly updating slide name with new lab worksheet. Needed to update _snaps
for vdiffr tests since annotations changed.
Confirmed normal tests still work.
── BiocCheck results ──
0 ERRORS | 2 WARNINGS | 8 NOTES
warnings = package size and even number version
── longtests results──
[ FAIL 0 | WARN 0 | SKIP 0 | PASS 725 ]
── devtools::check() results ──
── R CMD check results ────────────────────────────── SpatialOmicsOverlay 1.1.1 ────
Duration: 14m 38.9s
❯ checking for unstated dependencies in examples ... OK
WARNING
‘qpdf’ is needed for checks on size reduction of PDFs
❯ checking DESCRIPTION meta-information ... NOTE
License components which are templates and need '+ file LICENSE':
MIT
❯ checking top-level files ... NOTE
File
LICENSE
is not mentioned in the DESCRIPTION file.
Non-standard files/directories found at top level:
‘longtests’ ‘reqs.md’ ‘specs.md’
❯ checking R code for possible problems ... [53s/33s] NOTE
plotSpatialOverlay: no visible binding for global variable ‘xcoor’
plotSpatialOverlay: no visible binding for global variable ‘ycoor’
plotSpatialOverlay: no visible binding for global variable ‘sampleID’
plotSpatialOverlay: no visible binding for global variable ‘Target’
scaleBarPrinting: no visible binding for global variable ‘X’
scaleBarPrinting: no visible binding for global variable ‘Y’
Undefined global functions or variables:
Target X Y sampleID xcoor ycoor
❯ checking for non-standard things in the check directory ... NOTE
Found the following files/directories:
‘muBrainSubset_SpatialOverlay.RDS’ ‘muBrain_GxT.RDS’
0 errors ✔ | 1 warning ✖ | 4 notes ✖
── R CMD check results - expected error ──
Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet, :
pdflatex is not available
Error in running tools::texi2pdf()
You may want to clean up by 'rm -Rf /tmp/RtmpfanphI/Rd2pdf2b0b45340877'
* DONE
Status: 1 ERROR, 1 WARNING, 3 NOTEs
overlay(SOO_object)
. Printing shouldn't error.sampNames
to match on. This is fixed in both data.table and GeomxSet objects. Column with the most matches are used just to be safe. ADO issue