Closed AMCalejandro closed 1 year ago
So, in the wiki you say
However, if I do not prepare the quantiles, a specifity_quantile matrix within the ctd object is not generated. Then, EWCE is failing where I am highlighting https://github.com/neurogenomics/MAGMA_Celltyping/blob/8cb235fb495a467fb825819a76b2f154d3840146/R/get_ctd_dendro.r#L25
Example Data Try to plot with and without calculating spec_quantiles
> str(ctAssocsLinear) List of 7 $ level1 :List of 2 ..$ geneCovarFile: chr "/tmp/Rtmp7tn8CZ/file5ddfd929b060" ..$ results :'data.frame': 24 obs. of 14 variables: .. ..$ Celltype : chr [1:24] "astrocytes_ependymal" "Dopaminergic_Adult" "Dopaminergic_Neuroblast" "Embryonic_Dopaminergic_Neuron" ... .. ..$ OBS_GENES : chr [1:24] "71" "71" "71" "71" ... .. ..$ BETA : num [1:24] -0.005079 -0.004212 -0.000215 0.00292 -0.005705 ... .. ..$ BETA_STD : num [1:24] -0.05943 -0.04793 -0.00273 0.03446 -0.0622 ... .. ..$ SE : num [1:24] 0.00846 0.0085 0.00748 0.0082 0.00951 ... .. ..$ P : num [1:24] 0.725 0.689 0.511 0.362 0.724 ... .. ..$ level : int [1:24] 1 1 1 1 1 1 1 1 1 1 ... .. ..$ Method : chr [1:24] "MAGMA" "MAGMA" "MAGMA" "MAGMA" ... .. ..$ GCOV_FILE : chr [1:24] "educational_attainment.tsv.35UP.10DOWN.level1.MainRun.gsa.out" "educational_attainment.tsv.35UP.10DOWN.level1.MainRun.gsa.out" "educational_attainment.tsv.35UP.10DOWN.level1.MainRun.gsa.out" "educational_attainment.tsv.35UP.10DOWN.level1.MainRun.gsa.out" ... .. ..$ CONTROL : chr [1:24] "BASELINE" "BASELINE" "BASELINE" "BASELINE" ... .. ..$ CONTROL_label : chr [1:24] "BASELINE" "BASELINE" "BASELINE" "BASELINE" ... .. ..$ log10p : num [1:24] -0.14 -0.162 -0.291 -0.442 -0.14 ... .. ..$ genesOutCOND : chr [1:24] "NA" "NA" "NA" "NA" ... .. ..$ EnrichmentMode: chr [1:24] "Linear" "Linear" "Linear" "Linear" ... $ level2 :List of 2 ..$ geneCovarFile: chr "/tmp/Rtmp7tn8CZ/file5ddfd3067ed9d" ..$ results :'data.frame': 149 obs. of 14 variables: .. ..$ Celltype : chr [1:149] "Astro1" "Astro2" "CA1Pyr1" "CA1Pyr2" ... .. ..$ OBS_GENES : chr [1:149] "71" "71" "71" "71" ... .. ..$ BETA : num [1:149] -0.001389 -0.002209 0.000956 0.003637 0.003249 ... .. ..$ BETA_STD : num [1:149] -0.0178 -0.0263 0.0111 0.0428 0.0399 ... .. ..$ SE : num [1:149] 0.00825 0.00845 0.00799 0.0082 0.00813 ... .. ..$ P : num [1:149] 0.567 0.603 0.453 0.33 0.346 ... .. ..$ level : int [1:149] 2 2 2 2 2 2 2 2 2 2 ... .. ..$ Method : chr [1:149] "MAGMA" "MAGMA" "MAGMA" "MAGMA" ... .. ..$ GCOV_FILE : chr [1:149] "educational_attainment.tsv.35UP.10DOWN.level2.MainRun.gsa.out" "educational_attainment.tsv.35UP.10DOWN.level2.MainRun.gsa.out" "educational_attainment.tsv.35UP.10DOWN.level2.MainRun.gsa.out" "educational_attainment.tsv.35UP.10DOWN.level2.MainRun.gsa.out" ... .. ..$ CONTROL : chr [1:149] "BASELINE" "BASELINE" "BASELINE" "BASELINE" ... .. ..$ CONTROL_label : chr [1:149] "BASELINE" "BASELINE" "BASELINE" "BASELINE" ... .. ..$ log10p : num [1:149] -0.247 -0.22 -0.344 -0.482 -0.461 ... .. ..$ genesOutCOND : chr [1:149] "NA" "NA" "NA" "NA" ... .. ..$ EnrichmentMode: chr [1:149] "Linear" "Linear" "Linear" "Linear" ... $ total_baseline_tests_performed: num 173 $ gwas_sumstats_path : chr "/tmp/Rtmp7tn8CZ/educational_attainment.tsv" $ analysis_name : chr "MainRun" $ upstream_kb : num 35 $ downstream_kb : num 10 > str(ctAssocsTop) List of 7 $ level1 :List of 1 ..$ results:'data.frame': 24 obs. of 14 variables: .. ..$ Celltype : chr [1:24] "astrocytes_ependymal" "Dopaminergic_Adult" "Dopaminergic_Neuroblast" "Embryonic_Dopaminergic_Neuron" ... .. ..$ OBS_GENES : chr [1:24] "71" "71" "71" "71" ... .. ..$ BETA : num [1:24] -0.005079 -0.004212 -0.000215 0.00292 -0.005705 ... .. ..$ BETA_STD : num [1:24] -0.05943 -0.04793 -0.00273 0.03446 -0.0622 ... .. ..$ SE : num [1:24] 0.00846 0.0085 0.00748 0.0082 0.00951 ... .. ..$ P : num [1:24] 0.725 0.689 0.511 0.362 0.724 ... .. ..$ level : int [1:24] 1 1 1 1 1 1 1 1 1 1 ... .. ..$ Method : chr [1:24] "MAGMA" "MAGMA" "MAGMA" "MAGMA" ... .. ..$ GCOV_FILE : chr [1:24] "educational_attainment.tsv.35UP.10DOWN.level1.MainRun.gsa.out" "educational_attainment.tsv.35UP.10DOWN.level1.MainRun.gsa.out" "educational_attainment.tsv.35UP.10DOWN.level1.MainRun.gsa.out" "educational_attainment.tsv.35UP.10DOWN.level1.MainRun.gsa.out" ... .. ..$ CONTROL : chr [1:24] "BASELINE" "BASELINE" "BASELINE" "BASELINE" ... .. ..$ CONTROL_label : chr [1:24] "BASELINE" "BASELINE" "BASELINE" "BASELINE" ... .. ..$ log10p : num [1:24] -0.14 -0.162 -0.291 -0.442 -0.14 ... .. ..$ genesOutCOND : chr [1:24] "NA" "NA" "NA" "NA" ... .. ..$ EnrichmentMode: chr [1:24] "Top 10%" "Top 10%" "Top 10%" "Top 10%" ... $ level2 :List of 1 ..$ results:'data.frame': 149 obs. of 14 variables: .. ..$ Celltype : chr [1:149] "Astro1" "Astro2" "CA1Pyr1" "CA1Pyr2" ... .. ..$ OBS_GENES : chr [1:149] "71" "71" "71" "71" ... .. ..$ BETA : num [1:149] -0.001389 -0.002209 0.000956 0.003637 0.003249 ... .. ..$ BETA_STD : num [1:149] -0.0178 -0.0263 0.0111 0.0428 0.0399 ... .. ..$ SE : num [1:149] 0.00825 0.00845 0.00799 0.0082 0.00813 ... .. ..$ P : num [1:149] 0.567 0.603 0.453 0.33 0.346 ... .. ..$ level : int [1:149] 2 2 2 2 2 2 2 2 2 2 ... .. ..$ Method : chr [1:149] "MAGMA" "MAGMA" "MAGMA" "MAGMA" ... .. ..$ GCOV_FILE : chr [1:149] "educational_attainment.tsv.35UP.10DOWN.level2.MainRun.gsa.out" "educational_attainment.tsv.35UP.10DOWN.level2.MainRun.gsa.out" "educational_attainment.tsv.35UP.10DOWN.level2.MainRun.gsa.out" "educational_attainment.tsv.35UP.10DOWN.level2.MainRun.gsa.out" ... .. ..$ CONTROL : chr [1:149] "BASELINE" "BASELINE" "BASELINE" "BASELINE" ... .. ..$ CONTROL_label : chr [1:149] "BASELINE" "BASELINE" "BASELINE" "BASELINE" ... .. ..$ log10p : num [1:149] -0.247 -0.22 -0.344 -0.482 -0.461 ... .. ..$ genesOutCOND : chr [1:149] "NA" "NA" "NA" "NA" ... .. ..$ EnrichmentMode: chr [1:149] "Top 10%" "Top 10%" "Top 10%" "Top 10%" ... $ total_baseline_tests_performed: num 173 $ gwas_sumstats_path : chr "/tmp/Rtmp7tn8CZ/educational_attainment.tsv" $ analysis_name : chr "MainRun" $ upstream_kb : num 35 $ downstream_kb : num 10 > str(ctd) List of 2 $ level1:List of 6 ..$ specificity :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots .. .. ..@ i : int [1:296091] 0 1 2 3 4 5 6 7 8 11 ... .. .. ..@ p : int [1:25] 0 12623 25181 35884 47476 60473 72472 85159 96925 110403 ... .. .. ..@ Dim : int [1:2] 14240 24 .. .. ..@ Dimnames:List of 2 .. .. .. ..$ : Named chr [1:14240] "ACADM" "ACADVL" "ACAT1" "ACVR1" ... .. .. .. .. ..- attr(*, "names")= chr [1:14240] "Acadm" "Acadvl" "Acat1" "Acvr1" ... .. .. .. ..$ : chr [1:24] "astrocytes_ependymal" "Dopaminergic_Adult" "Dopaminergic_Neuroblast" "Embryonic_Dopaminergic_Neuron" ... .. .. ..@ x : num [1:296091] 0.0859 0.0907 0.0245 0.0266 0.1668 ... .. .. ..@ factors : list() ..$ mean_exp :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots .. .. ..@ i : int [1:296091] 0 1 2 3 4 5 6 7 8 11 ... .. .. ..@ p : int [1:25] 0 12623 25181 35884 47476 60473 72472 85159 96925 110403 ... .. .. ..@ Dim : int [1:2] 14240 24 .. .. ..@ Dimnames:List of 2 .. .. .. ..$ : chr [1:14240] "ACADM" "ACADVL" "ACAT1" "ACVR1" ... .. .. .. ..$ : chr [1:24] "astrocytes_ependymal" "Dopaminergic_Adult" "Dopaminergic_Neuroblast" "Embryonic_Dopaminergic_Neuron" ... .. .. ..@ x : num [1:296091] 1.377 1.34 1.314 0.176 0.044 ... .. .. ..@ factors : list() ..$ annot :'data.frame': 24 obs. of 1 variable: .. ..$ celltype: chr [1:24] "astrocytes_ependymal" "Dopaminergic Adult" "Dopaminergic Neuroblast" "Embryonic Dopaminergic Neuron" ... ..$ standardised: logi TRUE ..$ species :List of 2 .. ..$ input_species : chr "mouse" .. ..$ output_species: chr "human" ..$ versions :List of 3 .. ..$ EWCE :Classes 'package_version', 'numeric_version' hidden list of 1 .. .. ..$ : int [1:3] 1 5 5 .. ..$ orthogene :Classes 'package_version', 'numeric_version' hidden list of 1 .. .. ..$ : int [1:3] 1 3 1 .. ..$ homologene:Classes 'package_version', 'numeric_version' hidden list of 1 .. .. ..$ : int [1:6] 1 4 68 19 3 27 $ level2:List of 6 ..$ specificity :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots .. .. ..@ i : int [1:1494549] 0 1 2 3 4 5 6 7 8 11 ... .. .. ..@ p : int [1:150] 0 11070 22299 35820 49231 60945 72757 81515 89851 101568 ... .. .. ..@ Dim : int [1:2] 14240 149 .. .. ..@ Dimnames:List of 2 .. .. .. ..$ : Named chr [1:14240] "ACADM" "ACADVL" "ACAT1" "ACVR1" ... .. .. .. .. ..- attr(*, "names")= chr [1:14240] "Acadm" "Acadvl" "Acat1" "Acvr1" ... .. .. .. ..$ : chr [1:149] "Astro1" "Astro2" "CA1Pyr1" "CA1Pyr2" ... .. .. ..@ x : num [1:1494549] 0.01329 0.01375 0.00448 0.00389 0.09232 ... .. .. ..@ factors : list() ..$ mean_exp :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots .. .. ..@ i : int [1:1494549] 0 1 2 3 4 5 6 7 8 11 ... .. .. ..@ p : int [1:150] 0 11070 22299 35820 49231 60945 72757 81515 89851 101568 ... .. .. ..@ Dim : int [1:2] 14240 149 .. .. ..@ Dimnames:List of 2 .. .. .. ..$ : chr [1:14240] "ACADM" "ACADVL" "ACAT1" "ACVR1" ... .. .. .. ..$ : chr [1:149] "Astro1" "Astro2" "CA1Pyr1" "CA1Pyr2" ... .. .. ..@ x : num [1:1494549] 1.265 1.544 1.588 0.162 0.103 ... .. .. ..@ factors : list() ..$ annot :'data.frame': 149 obs. of 1 variable: .. ..$ celltype: chr [1:149] "Astro1" "Astro2" "CA1Pyr1" "CA1Pyr2" ... ..$ standardised: logi TRUE ..$ species :List of 2 .. ..$ input_species : chr "mouse" .. ..$ output_species: chr "human" ..$ versions :List of 3 .. ..$ EWCE :Classes 'package_version', 'numeric_version' hidden list of 1 .. .. ..$ : int [1:3] 1 5 5 .. ..$ orthogene :Classes 'package_version', 'numeric_version' hidden list of 1 .. .. ..$ : int [1:3] 1 3 1 .. ..$ homologene:Classes 'package_version', 'numeric_version' hidden list of 1 .. .. ..$ : int [1:6] 1 4 68 19 3 27 > str(ctd_quant) List of 2 $ level1:List of 8 ..$ specificity :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots .. .. ..@ i : int [1:296091] 0 1 2 3 4 5 6 7 8 11 ... .. .. ..@ p : int [1:25] 0 12623 25181 35884 47476 60473 72472 85159 96925 110403 ... .. .. ..@ Dim : int [1:2] 14240 24 .. .. ..@ Dimnames:List of 2 .. .. .. ..$ : Named chr [1:14240] "ACADM" "ACADVL" "ACAT1" "ACVR1" ... .. .. .. .. ..- attr(*, "names")= chr [1:14240] "Acadm" "Acadvl" "Acat1" "Acvr1" ... .. .. .. ..$ : chr [1:24] "astrocytes_ependymal" "Dopaminergic_Adult" "Dopaminergic_Neuroblast" "Embryonic_Dopaminergic_Neuron" ... .. .. ..@ x : num [1:296091] 0.0859 0.0907 0.0245 0.0266 0.1668 ... .. .. ..@ factors : list() ..$ mean_exp :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots .. .. ..@ i : int [1:296091] 0 1 2 3 4 5 6 7 8 11 ... .. .. ..@ p : int [1:25] 0 12623 25181 35884 47476 60473 72472 85159 96925 110403 ... .. .. ..@ Dim : int [1:2] 14240 24 .. .. ..@ Dimnames:List of 2 .. .. .. ..$ : chr [1:14240] "ACADM" "ACADVL" "ACAT1" "ACVR1" ... .. .. .. ..$ : chr [1:24] "astrocytes_ependymal" "Dopaminergic_Adult" "Dopaminergic_Neuroblast" "Embryonic_Dopaminergic_Neuron" ... .. .. ..@ x : num [1:296091] 1.377 1.34 1.314 0.176 0.044 ... .. .. ..@ factors : list() ..$ annot :'data.frame': 24 obs. of 1 variable: .. ..$ celltype: chr [1:24] "astrocytes_ependymal" "Dopaminergic Adult" "Dopaminergic Neuroblast" "Embryonic Dopaminergic Neuron" ... ..$ standardised : logi TRUE ..$ species :List of 2 .. ..$ input_species : chr "mouse" .. ..$ output_species: chr "human" ..$ versions :List of 3 .. ..$ EWCE :Classes 'package_version', 'numeric_version' hidden list of 1 .. .. ..$ : int [1:3] 1 5 5 .. ..$ orthogene :Classes 'package_version', 'numeric_version' hidden list of 1 .. .. ..$ : int [1:3] 1 3 1 .. ..$ homologene:Classes 'package_version', 'numeric_version' hidden list of 1 .. .. ..$ : int [1:6] 1 4 68 19 3 27 ..$ specificity_quantiles:Formal class 'dgCMatrix' [package "Matrix"] with 6 slots .. .. ..@ i : int [1:296091] 0 1 2 3 4 5 6 7 8 11 ... .. .. ..@ p : int [1:25] 0 12623 25181 35884 47476 60473 72472 85159 96925 110403 ... .. .. ..@ Dim : int [1:2] 14240 24 .. .. ..@ Dimnames:List of 2 .. .. .. ..$ : Named chr [1:14240] "ACADM" "ACADVL" "ACAT1" "ACVR1" ... .. .. .. .. ..- attr(*, "names")= chr [1:14240] "Acadm" "Acadvl" "Acat1" "Acvr1" ... .. .. .. ..$ : chr [1:24] "astrocytes_ependymal" "Dopaminergic_Adult" "Dopaminergic_Neuroblast" "Embryonic_Dopaminergic_Neuron" ... .. .. ..@ x : num [1:296091] 36 36 22 23 39 14 32 40 25 38 ... .. .. ..@ factors : list() ..$ specificity_deciles :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots .. .. ..@ i : int [1:296091] 0 1 2 3 4 5 6 7 8 11 ... .. .. ..@ p : int [1:25] 0 12623 25181 35884 47476 60473 72472 85159 96925 110403 ... .. .. ..@ Dim : int [1:2] 14240 24 .. .. ..@ Dimnames:List of 2 .. .. .. ..$ : Named chr [1:14240] "ACADM" "ACADVL" "ACAT1" "ACVR1" ... .. .. .. .. ..- attr(*, "names")= chr [1:14240] "Acadm" "Acadvl" "Acat1" "Acvr1" ... .. .. .. ..$ : chr [1:24] "astrocytes_ependymal" "Dopaminergic_Adult" "Dopaminergic_Neuroblast" "Embryonic_Dopaminergic_Neuron" ... .. .. ..@ x : num [1:296091] 9 9 6 6 10 4 8 10 7 10 ... .. .. ..@ factors : list() $ level2:List of 8 ..$ specificity :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots .. .. ..@ i : int [1:1494549] 0 1 2 3 4 5 6 7 8 11 ... .. .. ..@ p : int [1:150] 0 11070 22299 35820 49231 60945 72757 81515 89851 101568 ... .. .. ..@ Dim : int [1:2] 14240 149 .. .. ..@ Dimnames:List of 2 .. .. .. ..$ : Named chr [1:14240] "ACADM" "ACADVL" "ACAT1" "ACVR1" ... .. .. .. .. ..- attr(*, "names")= chr [1:14240] "Acadm" "Acadvl" "Acat1" "Acvr1" ... .. .. .. ..$ : chr [1:149] "Astro1" "Astro2" "CA1Pyr1" "CA1Pyr2" ... .. .. ..@ x : num [1:1494549] 0.01329 0.01375 0.00448 0.00389 0.09232 ... .. .. ..@ factors : list() ..$ mean_exp :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots .. .. ..@ i : int [1:1494549] 0 1 2 3 4 5 6 7 8 11 ... .. .. ..@ p : int [1:150] 0 11070 22299 35820 49231 60945 72757 81515 89851 101568 ... .. .. ..@ Dim : int [1:2] 14240 149 .. .. ..@ Dimnames:List of 2 .. .. .. ..$ : chr [1:14240] "ACADM" "ACADVL" "ACAT1" "ACVR1" ... .. .. .. ..$ : chr [1:149] "Astro1" "Astro2" "CA1Pyr1" "CA1Pyr2" ... .. .. ..@ x : num [1:1494549] 1.265 1.544 1.588 0.162 0.103 ... .. .. ..@ factors : list() ..$ annot :'data.frame': 149 obs. of 1 variable: .. ..$ celltype: chr [1:149] "Astro1" "Astro2" "CA1Pyr1" "CA1Pyr2" ... ..$ standardised : logi TRUE ..$ species :List of 2 .. ..$ input_species : chr "mouse" .. ..$ output_species: chr "human" ..$ versions :List of 3 .. ..$ EWCE :Classes 'package_version', 'numeric_version' hidden list of 1 .. .. ..$ : int [1:3] 1 5 5 .. ..$ orthogene :Classes 'package_version', 'numeric_version' hidden list of 1 .. .. ..$ : int [1:3] 1 3 1 .. ..$ homologene:Classes 'package_version', 'numeric_version' hidden list of 1 .. .. ..$ : int [1:6] 1 4 68 19 3 27 ..$ specificity_quantiles:Formal class 'dgCMatrix' [package "Matrix"] with 6 slots .. .. ..@ i : int [1:1494549] 0 1 2 3 4 5 6 7 8 11 ... .. .. ..@ p : int [1:150] 0 11070 22299 35820 49231 60945 72757 81515 89851 101568 ... .. .. ..@ Dim : int [1:2] 14240 149 .. .. ..@ Dimnames:List of 2 .. .. .. ..$ : Named chr [1:14240] "ACADM" "ACADVL" "ACAT1" "ACVR1" ... .. .. .. .. ..- attr(*, "names")= chr [1:14240] "Acadm" "Acadvl" "Acat1" "Acvr1" ... .. .. .. ..$ : chr [1:149] "Astro1" "Astro2" "CA1Pyr1" "CA1Pyr2" ... .. .. ..@ x : num [1:1494549] 37 37 28 26 40 11 25 40 23 30 ... .. .. ..@ factors : list() ..$ specificity_deciles :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots .. .. ..@ i : int [1:1494549] 0 1 2 3 4 5 6 7 8 11 ... .. .. ..@ p : int [1:150] 0 11070 22299 35820 49231 60945 72757 81515 89851 101568 ... .. .. ..@ Dim : int [1:2] 14240 149 .. .. ..@ Dimnames:List of 2 .. .. .. ..$ : Named chr [1:14240] "ACADM" "ACADVL" "ACAT1" "ACVR1" ... .. .. .. .. ..- attr(*, "names")= chr [1:14240] "Acadm" "Acadvl" "Acat1" "Acvr1" ... .. .. .. ..$ : chr [1:149] "Astro1" "Astro2" "CA1Pyr1" "CA1Pyr2" ... .. .. ..@ x : num [1:1494549] 10 10 7 7 10 3 7 10 6 8 ... .. .. ..@ factors : list()
ctd_quant is the output of prepare_group_quantile() ctd is the QCed ctd loaded from get_ctd()
Example run
plot_celltype_associations( + ctAssocs = ctAssocsTop, + ctd = ctd_quant) TableGrob (1 x 2) "arrange": 2 grobs z cells name grob 1 1 (1-1,1-1) arrange gtable[layout] 2 2 (1-1,2-2) arrange gtable[layout] TableGrob (1 x 2) "arrange": 2 grobs z cells name grob 1 1 (1-1,1-1) arrange gtable[layout] 2 2 (1-1,2-2) arrange gtable[layout] [[1]] TableGrob (1 x 2) "arrange": 2 grobs z cells name grob 1 1 (1-1,1-1) arrange gtable[layout] 2 2 (1-1,2-2) arrange gtable[layout] [[2]] TableGrob (1 x 2) "arrange": 2 grobs z cells name grob 1 1 (1-1,1-1) arrange gtable[layout] 2 2 (1-1,2-2) arrange gtable[layout] plot_celltype_associations( + ctAssocs = ctAssocsTop, + ctd = ctd) Error in t.default(ctd[[annotLevel]]$specificity_quantiles) : argument is not a matrix
SessionInfo
> sessionInfo() R version 4.2.0 (2022-04-22) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.5 LTS Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3 locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 [6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] ggplot2_3.3.6 data.table_1.14.2 dplyr_1.0.10 MAGMA.Celltyping_2.0.7 loaded via a namespace (and not attached): [1] backports_1.4.1 AnnotationHub_3.5.0 BiocFileCache_2.5.0 plyr_1.8.7 googleAuthR_2.0.0 [6] lazyeval_0.2.2 splines_4.2.0 orthogene_1.3.2 ewceData_1.5.0 BiocParallel_1.31.12 [11] GenomeInfoDb_1.33.5 digest_0.6.29 yulab.utils_0.0.5 htmltools_0.5.3 RNOmni_1.0.1 [16] fansi_1.0.3 magrittr_2.0.3 memoise_2.0.1 BSgenome_1.65.2 limma_3.53.6 [21] Biostrings_2.65.3 matrixStats_0.62.0 R.utils_2.12.0 prettyunits_1.1.1 colorspace_2.0-3 [26] blob_1.2.3 rappdirs_0.3.3 gitcreds_0.1.1 crayon_1.5.1 RCurl_1.98-1.8 [31] jsonlite_1.8.0 lme4_1.1-30 VariantAnnotation_1.43.3 ape_5.6-2 glue_1.6.2 [36] gtable_0.3.1 gargle_1.2.0 zlibbioc_1.43.0 XVector_0.37.1 HGNChelper_0.8.1 [41] DelayedArray_0.23.1 car_3.1-0 SingleCellExperiment_1.19.0 BiocGenerics_0.43.1 abind_1.4-5 [46] scales_1.2.1 DBI_1.1.3 rstatix_0.7.0 Rcpp_1.0.9 viridisLite_0.4.1 [51] xtable_1.8-4 progress_1.2.2 gridGraphics_0.5-1 tidytree_0.4.0 bit_4.0.4 [56] stats4_4.2.0 htmlwidgets_1.5.4 httr_1.4.4 ellipsis_0.3.2 farver_2.1.1 [61] pkgconfig_2.0.3 XML_3.99-0.10 R.methodsS3_1.8.2 dbplyr_2.2.1 utf8_1.2.2 [66] labeling_0.4.2 ggplotify_0.1.0 tidyselect_1.1.2 rlang_1.0.5 reshape2_1.4.4 [71] later_1.3.0 AnnotationDbi_1.59.1 munsell_0.5.0 BiocVersion_3.16.0 tools_4.2.0 [76] cachem_1.0.6 cli_3.3.0 generics_0.1.3 RSQLite_2.2.16 ExperimentHub_2.5.0 [81] MungeSumstats_1.5.13 broom_1.0.1 ggdendro_0.1.23 stringr_1.4.1 fastmap_1.1.0 [86] yaml_2.3.5 ggtree_3.5.3 babelgene_22.3 bit64_4.0.5 fs_1.5.2 [91] purrr_0.3.4 gh_1.3.0 KEGGREST_1.37.3 gprofiler2_0.2.1 nlme_3.1-159 [96] mime_0.12 R.oo_1.25.0 aplot_0.1.6 xml2_1.3.3 biomaRt_2.53.2 [101] compiler_4.2.0 rstudioapi_0.14 plotly_4.10.0 filelock_1.0.2 curl_4.3.2 [106] png_0.1-7 interactiveDisplayBase_1.35.0 ggsignif_0.6.3 treeio_1.21.2 tibble_3.1.8 [111] EWCE_1.5.7 homologene_1.4.68.19.3.27 stringi_1.7.8 GenomicFeatures_1.49.6 lattice_0.20-45 [116] Matrix_1.4-1 nloptr_2.0.3 vctrs_0.4.1 pillar_1.8.1 lifecycle_1.0.1 [121] BiocManager_1.30.18 bitops_1.0-7 httpuv_1.6.5 patchwork_1.1.2 rtracklayer_1.57.0 [126] GenomicRanges_1.49.1 R6_2.5.1 BiocIO_1.7.1 promises_1.2.0.1 gridExtra_2.3 [131] IRanges_2.31.2 codetools_0.2-18 boot_1.3-28 MASS_7.3-58.1 assertthat_0.2.1 [136] SummarizedExperiment_1.27.2 rjson_0.2.21 withr_2.5.0 GenomicAlignments_1.33.1 Rsamtools_2.13.4 [141] S4Vectors_0.35.3 GenomeInfoDbData_1.2.8 parallel_4.2.0 hms_1.1.2 grid_4.2.0 [146] ggfun_0.0.7 minqa_1.2.4 tidyr_1.2.0 MatrixGenerics_1.9.1 carData_3.0-5 [151] ggpubr_0.4.0 piggyback_0.1.3 lubridate_1.8.0 Biobase_2.57.1 shiny_1.7.2 [156] restfulr_0.0.15
Would need a full reprex to understand your particular scenario, but the docs are referring to the fact that celltype_associations_pipeline prepares the quantiles internally.
celltype_associations_pipeline
https://github.com/neurogenomics/MAGMA_Celltyping/blob/7535326f2f5222ac93a3346fc97580c0d5cc2084/R/celltype_associations_pipeline.r#L96
So, in the wiki you say
However, if I do not prepare the quantiles, a specifity_quantile matrix within the ctd object is not generated. Then, EWCE is failing where I am highlighting https://github.com/neurogenomics/MAGMA_Celltyping/blob/8cb235fb495a467fb825819a76b2f154d3840146/R/get_ctd_dendro.r#L25
Example Data Try to plot with and without calculating spec_quantiles
ctd_quant is the output of prepare_group_quantile() ctd is the QCed ctd loaded from get_ctd()
Example run
SessionInfo