Entering edit mode
5.8 years ago
jaybee
▴
170
Hello
I have a directory named cases, where I have 4 .vcf.gz files of merged vcf files of Indels and another 4 .vcf.gz files of merged vcf files of SNPs.
I want to now merge all the 4 merged indels into 1 file.
I received these 4 sets of indels and snps into 4 separate folders, and for set 1, the samples are named: S1, S2, S3....S50 For set 2, also, the samples are named: S1, S2, S3, ....S50 Similarly for set3 and set4.
when I try and merge these 4 merged indel files into one using:
~cases/$ /usr/bin/bcftools merge Indel/*indel.vcf.gz -Oz -o Indels.vcf.gz
I receive:
Incorrect number of AD fields (2) at 1:878906 cannot merge
How can I solve this?
Hello jaybee ,
what version of
bcftools
are you using?Are you sure that
bcftools merge
is the right tool for your purpose? This tools merges vcf file from different samples to one multisample vcf . You have the same sample names in the different files. This should lead to the error message:When applying the suggested
--force-samples
the duplicate names get enumeratedS1, 2:S1, 3:S1
Is this what you want to do or are you looking forbcftools concat
, which would join vcf files of the same samples but different regions in on file?Is this the first line of one your input files? Could you please show us this line and also show the header line for
AD
?You were told that using
*
is not a good practice. Why are you using it here again? Explicit is better than implicit!fin swimmer
Hello fin swimmer
I do not understand what that means. what is meant by " ..but different regions in on the file"?
*
is not a good practice. So, Do I always make a list and then write the command?Thank you~!