broadinstitute / infercnv

Inferring CNV from Single-Cell RNA-Seq
Other
557 stars 164 forks source link

I got blank plot using quick start code #576

Open yuyuyuto001 opened 1 year ago

yuyuyuto001 commented 1 year ago

Hello everyone,

I am using RStudio for my analysis. I ran a quick code, and there were no errors, but I couldn't see any figures on the Plots panel. To investigate, I tried the following code to generate a heatmap:

================================================

x <- matrix(rnorm(100), ncol = 4) colnames(x) <- paste0("lib", 1:ncol(x)) rownames(x) <- paste0("gene", 1:nrow(x)) head(x) heatmap(x)

With this code, I was able to generate a heatmap successfully.

I already read and try the following page: https://github.com/broadinstitute/inferCNV/wiki/Infercnv-runs-successfully-and-generated-plots-but-they-are-blank, I couldn't get any figures to display.

I have already loaded the necessary packages, infercnv and gplots, and set the graphical backend to "Xlib" using options(bitmapType="Xlib"), but still no figures are appearing.

================================================ library(infercnv) library(gplots) options(bitmapType="Xlib")

infercnv_obj = CreateInfercnvObject(raw_counts_matrix=system.file("extdata", "oligodendroglioma_expression_downsampled.counts.matrix.gz", package = "infercnv"), annotations_file=system.file("extdata", "oligodendroglioma_annotations_downsampled.txt", package = "infercnv"), delim="\t", gene_order_file=system.file("extdata", "gencode_downsampled.EXAMPLE_ONLY_DONT_REUSE.txt", package = "infercnv"), ref_group_names=c("Microglia/Macrophage","Oligodendrocytes (non-malignant)"))

infercnv_obj = infercnv::run(infercnv_obj, cutoff=1, # cutoff=1 works well for Smart-seq2, and cutoff=0.1 works well for 10x Genomics out_dir=tempfile(), cluster_by_groups=TRUE, denoise=TRUE, HMM=TRUE)

I am running RStudio on a Mac. If anyone has any insights or suggestions on how to resolve this issue, I would greatly appreciate your help. Thank you for your time.