infercnv跑的结果中无infercnv.observations.txt

在运行infercnv的run方法时,用户发现缺少infercnv.observations.txt文件。问题在于默认参数中write_expr_matrix被设为False。为得到该文件,需手动设置write_expr_matrix为True,更新后的代码能正常生成观测结果文件。

在跑infercnv::run时,可以正常跑完流程,但是输出结果没有infercnv.observations.txt文件

代码如下:

infercnv_obj = infercnv::run(infercnv_obj,
                             cutoff=0.1,  
                             out_dir="output_dir", 
                             cluster_by_groups=T,  
                             denoise=T,
                             HMM=T,
                             no_prelim_plot=F
                             num_threads=3
)

原因,需要自己设置参数write_expr_matrix=T,默认时F

加上这个参数跑即可

参考:infercnv.observations.txt not found · Issue #481 · broadinstitute/infercnv (github.com)

Error in .plot_cnv_observations(infercnv_obj = infercnv_obj, obs_data = obs_data, : Error Traceback: 1. .plot_cnv_observations(infercnv_obj = infercnv_obj, obs_data = obs_data, . file_base_name = out_dir, do_plot = !is.na(output_format), . write_expr_matrix = write_expr_matrix, write_phylo = write_phylo, . output_filename_prefix = output_filename, cluster_contig = ref_contig, . contigs = contigs, contig_colors = ct.colors[contigs], contig_labels = contig_labels, . contig_names = contig_names, col_pal = custom_pal, contig_seps = col_sep, . num_obs_groups = k_obs_groups, obs_annotations_groups = obs_annotations_groups, . obs_annotations_names = obs_annotations_names, grouping_key_coln = grouping_key_coln[1], . cluster_by_groups = cluster_by_groups, cnv_title = title, . cnv_obs_title = obs_title, contig_lab_size = contig_cex, . breaksList = breaksList_t, gene_position_breaks = gene_position_breaks, . x.center = x.center, hclust_method = hclust_method, layout_lmat = force_layout[["lmat"]], . layout_lhei = force_layout[["lhei"]], layout_lwid = force_layout[["lwid"]], . useRaster = useRaster) 2. stop("Error") 3. .handleSimpleError(function (cnd) . { . watcher$capture_plot_and_output() . cnd <- sanitize_call(cnd) . watcher$push(cnd) . switch(on_error, continue = invokeRestart("eval_continue"), . stop = invokeRestart("eval_stop"), error = NULL) . }, "Error", base::quote(.plot_cnv_observations(infercnv_obj = infercnv_obj, . obs_data = obs_data, file_base_name = out_dir, do_plot = !is.na(output_format), . write_expr_matrix = write_expr_matrix, write_phylo = write_phylo, . output_filename_prefix = output_filename, cluster_contig = ref_contig, . contigs = contigs, contig_colors = ct.colors[contigs], contig_labels = contig_labels, . contig_names = contig_names, col_pal = custom_pal, contig_seps = col_sep, . num_obs_groups = k_obs_groups, obs_annotations_groups = obs_annotations_groups, . obs_annotations_names = obs_annotations_names, grouping_key_coln = grouping_key_coln[1], . cluster_by_groups = cluster_by_groups, cnv_title = title, . cnv_obs_title = obs_title, contig_lab_size = contig_cex, . breaksList = breaksList_t, gene_position_breaks = gene_position_breaks, . x.center = x.center, hclust_method = hclust_method, layout_lmat = force_layout[["lmat"]], . layout_lhei = force_layout[["lhei"]], layout_lwid = force_layout[["lwid"]], . useRaster = useRaster)))
08-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值