broadinstitute / infercnv

Inferring CNV from Single-Cell RNA-Seq
Other
558 stars 166 forks source link

i have added two reference group,however just one color lable in the last infercnv fig #283

Closed Huaichao2018 closed 2 years ago

Huaichao2018 commented 3 years ago

infercnv.pdf `infercnv_obj = CreateInfercnvObject( raw_counts_matrix=paste(here(name), "NI_3/ni3.1_CNV_data_out_all_cells_raw_counts_largefile.txt", sep = "/"), annotations_file=paste(here(name),"NI_3/ni3.2_CNV_cell_metadata_shuffle_largefile.txt",sep = "/"),
gene_order_file="./gene_lists/gencode_v19_gene_pos.txt", ref_group_names = c("endothelial_normal", "fibroblast_normal"), delim = "\t", chr_exclude = c("chrX", "chrY","chrM"))

install_github("broadinstitute/inferCNV")

Perform infercnv operations to reveal cnv signal

Make sure that chrmosomes are ordered correctly

slot(infercnv_obj, "gene_order")[,"chr"] <- factor(slot(infercnv_obj, "gene_order")[,"chr"], levels = c("chr1", "chr2","chr3","chr4", "chr5", "chr6","chr7", "chr8", "chr9","chr10", "chr11", "chr12","chr13", "chr14", "chr15","chr16", "chr17", "chr18","chr19", "chr20", "chr21","chr22"))

Run infer CNV

infercnv_all = infercnv::run(infercnv_obj, cutoff=0.1, # use 1 for smart-seq, 0.1 for 10x-genomics out_dir= paste(here(name),"NI_3",sep = "/"), # dir is auto-created for storing outputs cluster_by_groups=F, # cluster hclust_method="ward.D2",num_threads=16, denoise=TRUE,HMM=F, hspike_aggregate_normal=T,tumor_subcluster_partition_method = "random_trees", cluster_references=F, plot_steps=F,output_format="pdf" )`

Yinglei1 commented 3 years ago

Hi, Huaichao,

Sorry to disturb you, i am doing inferCNV, i got a problem about it and there is nobody i can ask, can i ask you a question?

I did the inferCNV, but for the plot of infercnv.17_HMM_predHMMi6 and infercnv.19_HMM_predHMMi6 that I got, the distribution of Expression is all blue, and there is no plot of infercnv.16_HMM_predHMMi6 and infercnv.18_HMM_predHMMi6 finnally. I have no idea if there is something wrong? 17 19 inferCNV

Sorry to disturb you and thanks in advance!

Yingnan

Huaichao2018 commented 3 years ago

不好意思 我没有遇到过您这类问题

Huaichao Luo
Department of Clinical Laboratory, Sichuan Cancer Hospital & Institute, Sichuan Cancer Center, School of Medicine, University of Electronic Science and Technology of China, Sichuan, China.

2021-01-08

On 01/7/2021 18:25,Yinglei1notifications@github.com wrote:

Hi, Huaichao,

Sorry to disturb you, i am doing inferCNV, i got a problem about it and there is nobody i can ask, can i ask you a question?

I did the inferCNV, but for the plot of infercnv.17_HMM_predHMMi6 and infercnv.19_HMM_predHMMi6 that I got, the distribution of Expression is all blue, and there is no plot of infercnv.16_HMM_predHMMi6 and infercnv.18_HMM_predHMMi6 finnally. I have no idea if there is something wrong?

Sorry to disturb you and thanks in advance!

Yingnan

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Yinglei1 commented 3 years ago

非常谢谢您的回复,我再问一个比较基础的问题(刚开始做不太懂),一般在outdir里面plots,你一般只看infercnv.png出来的图吗?infercnv.19,infercnv.17,infercnv.18,这几个出来的图的你会关注下吗?如果方便的话,可以留一个联系方式,邮箱之类的吗?有点唐突,非常抱歉打扰到。

GeorgescuC commented 3 years ago

Hi @Huaichao2018 ,

I do see that there is only 1 group in the references, and there is also an unexpected black separation bar at the top of your observation heatmap. Couple questions to try to figure out what is happening.

Have you made sure that there are cells annotated as "fibroblast_normal" in your input annotations_file and that those cells are also present in the matrix?

If you display the contents of the infercnv_obj@reference_grouped_cell_indices$fibroblast_normal field, what does it contain?

Which version of infercnv are you running?

Regards, Christophe.

GeorgescuC commented 3 years ago

Hi @Yinglei1 ,

I think the issue you have is that no CNVs are identified, so the color range on the HMM plots gets shifted. This should have been fixed in version 1.5.1 of infercnv. If you are using an older version, please update your installation and try running things again.

Regards, Christophe.