2020-11-03 STAR-Fusion.map_chimeric_reads_to_genes line 511, <$fh> line 1.

现在用来找融合基因的软件,最好用的应该就是star-fusion了。
因为安装复杂所以一切都conda解决
star-fusion对star的版本要求严格。
我在conda安装的,star对应的版本是2.7.6a

不过安装后经常会报错Can't locate strict.pm:、/root/perl5/lib/perl5/strict.pm: Permission denied at... ...之类的错误。具体的原因我不是很清楚,不过大概是因为env写死的perl找的包是在root找,但是一般人没有权限吧。
直接改成我们常用的/usr/bin/perl就好

cd anaconda2/envs/star-fusion/lib/STAR-Fusion/util
find . -type f|while read a;do sed -i 's#/usr/bin/env perl#/usr/bin/perl#g' ${a};done

另外还报错了一个非常奇怪的:

Can't use an undefined value as an ARRAY reference at anaconda2/envs/star-fusion/lib/STAR-Fusion/util/STAR-Fusion.map_chimeric_reads_to_genes line 511, <$fh> line 1.

去STAR-Fusion.map_chimeric_reads_to_genes 里面看下,511行里面是因为strand找不到对应的链信息,顺藤摸瓜发现竟然是该脚本在读Chimeric.out.junction的时候没有忽略header行而报错,虽然337行next掉了#注释行,但是2.7.6a的star的Chimeric.out.junction的header开头竟然没有#...不知道是star团队的疏忽还是怎么着,whatever。
增加一行:

if (/^\#/) { next; }
if (/^chr_donorA\s+brkpt_donorA\s+strand_donorA/) { next; }

问题解决

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。