bcftools pipe generated file from first command with second
1
1
Entering edit mode
4.0 years ago
cocchi.e89 ▴ 270

It may be silly but I am not getting how to pipe these 2 bcftools commands where I need the file generated by the first command to be an atgument of the second one:

bcftools norm -m -any case.chr21.vcf.gz -Ou | bcftools isec -n~10 case.chr21.altered.vcf.gz

the plain command would be:

bcftools isec -n~10 case.chr21.vcf.gz case.chr21.altered.vcf.gz

I also tried a shell version:

bcftools isec -n~10 <(bcftools norm -m -any case.chr21.vcf.gz -Ou) case.chr21.altered.vcf.gz

but it doesn't work

Thank you so much for any help

bcftools pipe vcf • 2.9k views
ADD COMMENT
0
Entering edit mode
4.0 years ago

it will never works. Files for isec must be indexed.

ADD COMMENT
0
Entering edit mode

May I know how to integrate bcftools index in the pipe? I encountered similar issue where I intend to use bcftools index as the second command with inputs from the first command, something like |bcftools index but the |bcftools index command didn't run. Thank you!

ADD REPLY

Login before adding your answer.

Traffic: 2689 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6