I am attempting to "Analyzing Branches in Single-Cell Trajectories" using a Seurat 3 object imported into monocle 2. I have made it through the entire tutorial successfully until I try to analyze the branches in single cell trajectories using the code below. When I try to do the command plot_genes_branched_heatmap I get the following error. How do I fix this?
Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x), :
'data' must be of a vector type, was 'NULL'
plot_trend = TRUE)
Warning messages:
1: Computation failed in stat_summary():
Hmisc package required for this function
2: Computation failed in stat_summary():
Hmisc package required for this function
3: Computation failed in stat_summary():
Hmisc package required for this function
4: Computation failed in stat_summary():
Hmisc package required for this function
5: Computation failed in stat_summary():
Hmisc package required for this function
6: Computation failed in stat_summary():
Hmisc package required for this function
to_be_tested <- row.names(subset(fData(cds), gene_short_name %in% c("Apoe", "C1qa", "Fos")))
cds_subset <- cds[to_be_tested,]
diff_test_res <- differentialGeneTest(cds_subset, fullModelFormulaStr = "~sm.ns(Pseudotime)")
diff_test_res[,c("gene_short_name", "pval", "qval")]
gene_short_name pval qval
C1qa C1qa 2.145791e-08 2.145791e-08
Apoe Apoe 5.811938e-23 1.743581e-22
Fos Fos 2.683403e-16 4.025104e-16
plot_genes_in_pseudotime(cds_subset, color_by = "seurat_clusters")
diff_test_res <- differentialGeneTest(cds[marker_genes,], fullModelFormulaStr = "~sm.ns(Pseudotime)")
sig_gene_names <- row.names(subset(diff_test_res, qval < 0.1))
plot_pseudotime_heatmap(cds[sig_gene_names,],
num_clusters = 3,
cores = 1,
show_rownames = T)
plot_cell_trajectory(cds, color_by = "Pseudotime")
plot_cell_trajectory(cds, color_by = "seurat_clusters")
BEAM_res <- BEAM(cds, branch_point = 2, cores = 1)
Warning messages:
1: In if (progenitor_method == "duplicate") { :
the condition has length > 1 and only the first element will be used
2: In if (progenitor_method == "sequential_split") { :
the condition has length > 1 and only the first element will be used
BEAM_res <- BEAM_res[order(BEAM_res$qval),]
BEAM_res <- BEAM_res[,c("gene_short_name", "pval", "qval")]
plot_genes_branched_heatmap(cds[row.names(subset(BEAM_res,
qval < 1e-4)),],
branch_point = 2,
num_clusters = 4,
cores = 1,
use_gene_short_name = T,
show_rownames = T)
Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x), :
'data' must be of a vector type, was 'NULL'
I am attempting to "Analyzing Branches in Single-Cell Trajectories" using a Seurat 3 object imported into monocle 2. I have made it through the entire tutorial successfully until I try to analyze the branches in single cell trajectories using the code below. When I try to do the command plot_genes_branched_heatmap I get the following error. How do I fix this?
Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x), : 'data' must be of a vector type, was 'NULL'