broadinstitute / infercnv

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

Does 'run' function find reference group automatically.? #430

Open pengjini opened 2 years ago

pengjini commented 2 years ago

good morning! i'm a student who use infercnv these days.

I'm analyzing cancer tissue data of seurat object. The data have 5~8 clusters(cell types). I made annotation file with cluster number and infercnv object with ref_group_names=NULL option. All works are done and i got the plot.

infercnv_obj = infercnv::run(infercnv_obj = infercnv_obj, cutoff=0.1, out_dir="cancer", cluster_by_groups=T, cluster_references =F, denoise=T, num_threads=40, HMM=F, save_rds = F) ▲ This is the code i use.

The question is. I found in issues #334, infercnv automatically looks for the reference that looks the closest to compare them to when working with inferCNV without normal cell reference. Is it right with 'ref_group_names=NULL' too?? Then can i get the reference cell that detected automatically?

If not, can you tell me how the plot can be made without ref_group_names?? Thank you.

GeorgescuC commented 2 years ago

Hi @pengini ,

Infercnv looks for the closest reference among the different groups provided through "ref_group_names". If none is provided as in your setup, it will use the average of all cells instead. This means that results when not providing references will be relative to each other and the most prevalent haplotype will appear as the closest to the average and thus have less signal. This however means that if you have significantly more tumor cells than normal cells, common tumor CNVs may be the closest to the average and have the least signal, while normal cells will display inverse signal.

Regards, Christophe.