How to merge 2 VCF files that was previously extracted from same file
0
0
Entering edit mode
4.4 years ago
phongphak.06 ▴ 10

Hello, I have a VCF file containing 9 samples. After I used "gatk SelectVariants" to extract SNP and INDEL into 2 files and "gatk VariantFiltration" for hard filtering, I want to merge them back using "gatk MergeVcfs". Anyway, I always get this error:

java.lang.IllegalStateException: The elements of the input Iterators are not sorted according to the comparator htsjdk.variant.variantcontext.VariantContextComparator

htsjdk.variant.variantcontext.VariantContextComparator at htsjdk.samtools.util.MergingIterator.next(MergingIterator.java:107) at picard.vcf.MergeVcfs.doWork(MergeVcfs.java:230) at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:295) at org.broadinstitute.hellbender.cmdline.PicardCommandLineProgramExecutor.instanceMain(PicardCommandLineProgramExecutor.java:25) at org.broadinstitute.hellbender.Main.runCommandLineProgram(Main.java:162) at org.broadinstitute.hellbender.Main.mainEntry(Main.java:205) at org.broadinstitute.hellbender.Main.main(Main.java:291)

Do you guys have any recommendation for merging VCF files or fixing this error. I also have tried some tools, but they only can concatenate VCF files, so I'll get duplicated positions with different ALT in case of multiallelic site contains both SNP and INDEL. Thank you in advance for your kind help.

SNP variant software error VCF GATK • 1.6k views
ADD COMMENT
0
Entering edit mode
    at picard.vcf.MergeVcfs.doWork(MergeVcfs.java:226)
  

There cannot be an error at line 226 in MergeVcfs https://github.com/broadinstitute/picard/blob/master/src/main/java/picard/vcf/MergeVcfs.java#L226 . Please, update your version of picard.

ADD REPLY
0
Entering edit mode

I didn't use picard directly. I use GATK 4.1.2.0

Edited: Oh sorry, this error got from picard (I run both software to see whether I'll get the same error). I'll update error from GATK

ADD REPLY

Login before adding your answer.

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