Entering edit mode
Dear Utents, I am running fitGAM function using a PseudotimeOrdering object from a single-cell dataset. Dimnames of both datasets are two lists of characters, while different results for dimnames specifying [1]. I attached the results in R below. I ran this code last week and it works. I do not know what I have changed.
#Counts matrix of my single cell object.
sce_filtered_matrix <- as.matrix(logcounts(sce_filtered))
sce_filtered_trade <- fitGAM(sce_filtered_matrix, sce_filtered$slingshot, nknots = 6)
#View my PseudotimeOrdering object
sce_filtered$slingshot[1]
class: PseudotimeOrdering
dim: 1 4
metadata(4): lineages mst slingParams curves
pathStats(2): pseudotime weights
cellnames(1): OEP01_N704_S507
cellData names(2): reducedDim clusterLabels
pathnames(4): Lineage1 Lineage2 Lineage3 Lineage4
pathData names(0):
# my problematic code and its corresponding output
dimnames(sce_filtered$slingshot[1])
[[1]]
[1] "OEP01_N704_S507"
[[2]]
[1] "Lineage1" "Lineage2" "Lineage3" "Lineage4"
dimnames(sce_filtered_matrix[1])
NULL
Error in value[[3L]](cond) :
'assay(<PseudotimeOrdering>, i="character", ...)' invalid subscript 'I'
length of 'dimnames' [1] not equal to array extent

Resolved the error message!
If you re experiencing unexpected results while running your fitGAM function, it s important to check that your dataset s dimnames are consistent and correctly formatted. In a similar way, professional pest control in Santa Cruz services emphasize careful inspection and consistency when identifying pest activity company website. Just as mismatched data can affect analysis results, unnoticed entry points or hidden infestations can compromise pest management efforts.