Single Cell Experiment : Differential Expression "List of length 0" - Help!
0
0
Entering edit mode
vohara4 • 0
@efde370c
Last seen 6 months ago
United Kingdom

Hi, I'm fairly new bioinformatics and don't overly have anyone to ask for advice, so sorry if I'm making a very obvious mistake!

Background for context: I have a sce with 10 samples from 5 patients for a case control study. My disease is unilateral, so I have one left and one right sample from each of the 5 patients, creating an n=10.

I can run differential expression between case vs control and left vs right across all 10 samples without hitch - however, I'm now trying to look at left vs right within each patient.

I've currently done this by pulling out each patient from the main sce to make smaller objects for each patient (total of 5 separate sce's, containing the left sample and the right sample of each patient).

I'm now trying to run my differential expression code (that seemingly worked ok for the large object, although did not yield many differentially expressed genes between left and right), on these smaller objects to compare left vs right for each patient and while the code seemingly runs, the output has List of length 0.

I've tried all sorts to try to get this to work, but haven't been able to crack it - time to ask for help from the experts! What am I doing wrong? Is there an alternative way to do this?

Thanks so much for your help!

summed <- aggregateAcrossCells(scePatient1, 
                               ids = colData(scePatient1)[, c("label", "SampleName")])


Side <- pseudoBulkDGE(summed, 
                      label = summed$label,
                      design = ~ Side, 
                      coef = "SideRight")

Side
List of length 0



sessionInfo( )
R version 4.3.1 (2023-06-16)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.5

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0


attached base packages:
[1] stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] batchelor_1.16.0            edgeR_3.42.4                limma_3.56.2               
 [4] lubridate_1.9.3             forcats_1.0.0               stringr_1.5.1              
 [7] dplyr_1.1.4                 purrr_1.0.2                 readr_2.1.5                
[10] tidyr_1.3.0                 tibble_3.2.1                tidyverse_2.0.0            
[13] scran_1.28.2                scater_1.30.1               ggplot2_3.4.4              
[16] scuttle_1.10.3              SingleCellExperiment_1.22.0 SummarizedExperiment_1.30.2
[19] Biobase_2.60.0              GenomicRanges_1.52.1        GenomeInfoDb_1.36.4        
[22] IRanges_2.34.1              S4Vectors_0.38.2            BiocGenerics_0.46.0        
[25] MatrixGenerics_1.12.3       matrixStats_1.2.0          

loaded via a namespace (and not attached):
 [1] ResidualMatrix_1.10.0     tidyselect_1.2.0          viridisLite_0.4.2        
 [4] vipor_0.4.7               viridis_0.6.4             bitops_1.0-7             
 [7] RCurl_1.98-1.14           bluster_1.10.0            rsvd_1.0.5               
[10] timechange_0.2.0          lifecycle_1.0.4           cluster_2.1.6            
[13] statmod_1.5.0             magrittr_2.0.3            compiler_4.3.1           
[16] rlang_1.1.3               tools_4.3.1               igraph_1.6.0             
[19] utf8_1.2.4                S4Arrays_1.2.1            dqrng_0.3.2              
[22] DelayedArray_0.26.7       abind_1.4-5               BiocParallel_1.34.2      
[25] withr_3.0.0               grid_4.3.1                fansi_1.0.6              
[28] beachmat_2.16.0           colorspace_2.1-0          scales_1.3.0             
[31] cli_3.6.2                 crayon_1.5.2              generics_0.1.3           
[34] metapod_1.8.0             rstudioapi_0.15.0         tzdb_0.4.0               
[37] DelayedMatrixStats_1.22.6 ggbeeswarm_0.7.2          zlibbioc_1.46.0          
[40] parallel_4.3.1            XVector_0.40.0            vctrs_0.6.5              
[43] Matrix_1.6-1              BiocSingular_1.16.0       hms_1.1.3                
[46] BiocNeighbors_1.18.0      ggrepel_0.9.5             irlba_2.3.5.1            
[49] beeswarm_0.4.0            locfit_1.5-9.8            glue_1.7.0               
[52] codetools_0.2-19          stringi_1.8.3             gtable_0.3.4             
[55] ScaledMatrix_1.8.1        munsell_0.5.0             pillar_1.9.0             
[58] GenomeInfoDbData_1.2.10   R6_2.5.1                  sparseMatrixStats_1.12.2 
[61] lattice_0.22-5            Rcpp_1.0.12               gridExtra_2.3            
[64] pkgconfig_2.0.3
DifferentialExpression scran scater SingleCellExperiment edgeR • 626 views
ADD COMMENT
0
Entering edit mode

My guess is that Side did not make it into the summed object. You aggregate the SCE to summed with label and SampleName. How would the function know what Side is`?

ADD REPLY
0
Entering edit mode

Thank you so much for your response. I've just tried adding Side to the summed object in both of the following manners, but I still get a "List of length = 0". When I use the above code without including Side in the summed object on my larger data set (n=10 vs the n=2 I'm currently stuck on), I can still run Side analysis and get differential expression from it.

summed <- aggregateAcrossCells(sce, ids = colData(sce)[, c("label", "SampleName", "Side")])

Side <- pseudoBulkDGE(summed, label = summed$label, design = ~ Side, coef = "SideRight")

Side: List of length 0

and

summed <- aggregateAcrossCells(sce, ids = colData(sce)[, c("label", "Side")])

Side <- pseudoBulkDGE(summed, label = summed$label, design = ~ Side, coef = "SideRight")

Side: List of length 0

ADD REPLY
0
Entering edit mode

What is the relationship between side and label?

ADD REPLY
0
Entering edit mode

"label" refers to my clusters, so there shouldn't be one. Both samples have cells in every cluster

ADD REPLY

Login before adding your answer.

Traffic: 555 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6