Skip to content

Commit

Permalink
Added GOI table printing for Filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
Cauley committed Aug 1, 2023
1 parent 0abf579 commit 2a7be1a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 3 deletions.
5 changes: 3 additions & 2 deletions R/filtering.R
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,10 @@ filtering <- function(object, loq.cutoff, loq.min, cut.segment, goi) {
if(class(goi)[1] != "character"){
stop(paste0("Error: You have the wrong data class, must be character vector" ))
}
goi.df <- data.frame(Gene = goi,
goi.table <- data.frame(Gene = goi,
Number = fData(object)[goi, "DetectedSegments"],
DetectionRate = percent(fData(object)[goi, "DetectionRate"]))
#goi.table <- capture.output(print(goi.df, row.name = FALSE))

## 4.5.3 Gene Filtering
# Plot detection rate:
Expand Down Expand Up @@ -191,5 +192,5 @@ filtering <- function(object, loq.cutoff, loq.min, cut.segment, goi) {
# retain only detected genes of interest
goi <- goi[goi %in% rownames(object)]

return(list("stacked.bar.plot" = stacked.bar.plot, "tab" = tab, "sankey.plot" = sankey.plot, "genes.detected.plot" = genes.detected.plot, "object" = object))
return(list("stacked.bar.plot" = stacked.bar.plot, "tab" = tab, "sankey.plot" = sankey.plot, "goi.table" = goi.table, "genes.detected.plot" = genes.detected.plot, "object" = object))
}
3 changes: 2 additions & 1 deletion vignettes/Integration_Test_CPTR_Colon.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ This runs the DSPworkflow package to completion using the Human Colon Cancer Dat
print(sdesign.list$sankey.plot)
print("Created GeoMx Object\n\n")
pData(sdesign.list$object)[,c("slide name","class","segment")]
pData(sdesign.list$object)[,c("slide_name","class","segment")]
```
Expand Down Expand Up @@ -117,6 +117,7 @@ qc.output <- qcProc(object = sdesign.list$object,
print(filtering.output$`tab`)
print(filtering.output$`sankey.plot`)
print(filtering.output$`genes.detected.plot`)
print(filtering.output$'goi.table', row.names = FALSE)
create.rds <- FALSE
if(create.rds) {
Expand Down
1 change: 1 addition & 0 deletions vignettes/Integration_Test_Colon.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ This runs the DSPworkflow package to completion using the Human Colon Dataset:
print(filtering.output$`tab`)
print(filtering.output$`sankey.plot`)
print(filtering.output$`genes.detected.plot`)
print(filtering.output$'goi.table', row.names = FALSE)
create.rds <- TRUE
if(create.rds) {
Expand Down
1 change: 1 addition & 0 deletions vignettes/Integration_Test_Kidney.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ qc.output <- qcProc(object = sdesign.list$object,
print(filtering.output$`tab`)
print(filtering.output$`sankey.plot`)
print(filtering.output$`genes.detected.plot`)
print(filtering.output$'goi.table', row.names = FALSE)
create.rds <- TRUE
if(create.rds) {
Expand Down
1 change: 1 addition & 0 deletions vignettes/Integration_Test_Mouse_Thymus.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ qc.output <- qcProc(object = sdesign.list$object,
print(filtering.output$`tab`)
print(filtering.output$`sankey.plot`)
print(filtering.output$`genes.detected.plot`)
print(filtering.output$'goi.table', row.names = FALSE)
create.rds <- TRUE
if(create.rds) {
Expand Down
1 change: 1 addition & 0 deletions vignettes/Integration_Test_NSCLC.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ qc.output <- qcProc(object = sdesign.list$object,
print(filtering.output$`tab`)
print(filtering.output$`sankey.plot`)
print(filtering.output$`genes.detected.plot`)
print(filtering.output$'goi.table', row.names = FALSE)
create.rds <- TRUE
if(create.rds) {
Expand Down

0 comments on commit 2a7be1a

Please sign in to comment.