Off topic:Merge selective vcf files into one vcf file using a single command
1
0
Entering edit mode
5.2 years ago
jaybee ▴ 170

Hello

I have a directory named "set" where I have 4 sets namely set1, set2, set3, and set4. Each set has 50 Indel vcf files and 50 SNP vcf files. The files are vcf.gz format along with their index files, .vcf.gz.tbi.

In each set, for Indel as well as for SNP, I created a list for only the vcf files (before creating their respective index files) using

for i in *.vcf.gz;
do ls > vcfindel1.list
done

[vcfindel1.list is the list of vcf files of the indels in set 1 ONLY]

It creates a list file for every indel and SNP for each set.

Now, I use merge command to merge all 50 vcf files into One vcf file using:

command="bcftools merge -Ob -m none " ;

while read vcfindel1
do
    command="${command}"" ""${vcfindel1}" ;
done < vcfindel1.list

command="${command}"" -o ProjectMerge.bcf" ;

echo `$command` ;

bcftools index ProjectMerge.bcf ;

But, I receive the error message:

vcfindel1.list unknown file type

Anybody can help me solve this?

bcftools vcf merge WES • 2.0k views
ADD COMMENT
This thread is not open. No new answers may be added
Traffic: 2283 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