Question: Using bcftools merge on the output of multiple process substitution? (somewhat a linux question)
0
gravatar for curious
7 weeks ago by
curious320
curious320 wrote:

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 • 91 views
ADD COMMENTlink written 7 weeks ago by curious320
2
gravatar for RamRS
7 weeks ago by
RamRS27k
Houston, TX
RamRS27k wrote:

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

ADD COMMENTlink written 7 weeks ago by RamRS27k

Thanks, how do I accept your answer?

ADD REPLYlink written 7 weeks ago by curious320

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 REPLYlink written 7 weeks ago by RamRS27k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1959 users visited in the last hour