简体   繁体   English

如何在 bcftools 中使用插件命令?

[英]How to use plugin commands in bcftools?

My goal is to use bcftools to check that the reference alleles in my dataset (vcf file) match with a reference genome (fasta file) using the fixref plugin.我的目标是使用 bcftools 检查我的数据集(vcf 文件)中的参考等位基因是否与使用 fixref 插件的参考基因组(fasta 文件)匹配。

Working on command line, I first set the following environment:在命令行上工作,我首先设置以下环境:

export BCFTOOLS_PLUGINS=/path/to/bcftools/plugins

The following code is recommended for test datasets with mismatches:对于不匹配的测试数据集,建议使用以下代码:

bcftools +fixref test.bcf -Ob -o output.bcf -- -f ref.fa -m top

When I run this code using my own files (please note that my data is .vcf, not .bcf) I get the following error:当我使用自己的文件运行此代码时(请注意,我的数据是 .vcf,而不是 .bcf),出现以下错误:

[main] Unrecognized command

If I simply enter:如果我只是输入:

bcftools

I get a list of the only 5 commands (view, index, cat, ld, ldpair) that I can use.我得到了我可以使用的仅有的 5 个命令(view、index、cat、ld、ldpair)的列表。 So although I've set the environment, does it somehow need to be activated?所以虽然我已经设置了环境,但它是否需要以某种方式激活? Do I need to run my command through a bash script?我需要通过 bash 脚本运行我的命令吗?

bcftools

was pointing to a deprecated version of bcftools (0.1.19) in ../bin/, while指向 ../bin/ 中不推荐使用的 bcftools (0.1.19) 版本,而

BCFTOOLS_PLUGINS=/path/to/bcftools/plugins

was pointing to the plugins for bcftools version 1.10.2 outside /bin/指向 /bin/ 之外的 bcftools 1.10.2 版插件

Replacing ../bin/bcftools (0.1.19 with 1.10.2) was the fix.替换 ../bin/bcftools(0.1.19 与 1.10.2)是修复。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM