Using bcftools merge on the output of multiple process substitution? (somewhat a linux question)
1
0
Entering edit mode
10 months ago
curious ▴ 500

I need to get rid of one sample in each of 3 vcfs then merge. I am not an expert on Linux, but cobbled together this:

bcftools merge <(bcftools view -s ^'sample1' vcf1.vcf)  <(bcftools view -s ^'sample2' vcf2.vcf)  <(bcftools view -s ^'sample3' vcf3.vcf) -Ob > merged.bcf

Is using process substitution like this "safe" or is this asking for trouble. The other thought is just to do the view command first making intermediate files.

linux • 248 views
ADD COMMENT
2
Entering edit mode
10 months ago
Ram 32k

It should be fine. The line added to the VCF file will replace the process substitution parameters with /dev/fd/ file descriptors.

ADD COMMENT
0
Entering edit mode

Thanks, how do I accept your answer?

ADD REPLY
0
Entering edit mode

It was a comment. I've moved it to an answer now. You should be able to use the green mark to accept it.

ADD REPLY

Login before adding your answer.

Traffic: 2310 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