getting error message using igv tools to index a vcf file

102 views
Skip to first unread message

Nasir Amra

unread,
Aug 27, 2021, 4:07:44 PM8/27/21
to igv-help
I'm getting the following error message trying to index a vcf file using igv-tool menu  to view in igv (see screen shot). I'm using version 2.10.3 on windows.

From IGV log:
ERROR [2021-08-27T13:56:14,478] [IgvToolsGui.java:515]  Error indexing file
java.lang.RuntimeException: java.lang.IllegalArgumentException: Flag is an unsupported type for this kind of field
at org.broad.igv.tools.IgvTools.doIndex(IgvTools.java:1004) ~[igv.jar:?]
at org.broad.igv.tools.IgvTools.doIndex(IgvTools.java:916) ~[igv.jar:?]
at org.broad.igv.tools.IgvToolsGui$7.doInBackground(IgvToolsGui.java:513) [igv.jar:?]
at javax.swing.SwingWorker$1.call(Unknown Source) [?:?]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:?]
at javax.swing.SwingWorker.run(Unknown Source) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
at java.lang.Thread.run(Unknown Source) [?:?]
Caused by: java.lang.IllegalArgumentException: Flag is an unsupported type for this kind of field
at htsjdk.variant.vcf.VCFCompoundHeaderLine.<init>(VCFCompoundHeaderLine.java:243) ~[htsjdk-2.24.1.jar:?]
at htsjdk.variant.vcf.VCFFormatHeaderLine.<init>(VCFFormatHeaderLine.java:50) ~[htsjdk-2.24.1.jar:?]
at htsjdk.variant.vcf.AbstractVCFCodec.parseHeaderFromLines(AbstractVCFCodec.java:198) ~[htsjdk-2.24.1.jar:?]
at htsjdk.variant.vcf.VCFCodec.readActualHeader(VCFCodec.java:111) ~[htsjdk-2.24.1.jar:?]
at org.broad.igv.feature.tribble.VCFWrapperCodec.readActualHeader(VCFWrapperCodec.java:92) ~[igv.jar:?]
at htsjdk.tribble.AsciiFeatureCodec.readHeader(AsciiFeatureCodec.java:79) ~[htsjdk-2.24.1.jar:?]
at htsjdk.tribble.AsciiFeatureCodec.readHeader(AsciiFeatureCodec.java:37) ~[htsjdk-2.24.1.jar:?]
at htsjdk.tribble.index.IndexFactory$FeatureIterator.<init>(IndexFactory.java:605) ~[htsjdk-2.24.1.jar:?]
at htsjdk.tribble.index.IndexFactory.createLinearIndex(IndexFactory.java:272) ~[htsjdk-2.24.1.jar:?]
at htsjdk.tribble.index.IndexFactory.createLinearIndex(IndexFactory.java:257) ~[htsjdk-2.24.1.jar:?]
at org.broad.igv.tools.IgvTools.createTribbleIndex(IgvTools.java:1068) ~[igv.jar:?]
at org.broad.igv.tools.IgvTools.doIndex(IgvTools.java:987) ~[igv.jar:?]
... 8 more
ERROR [2021-08-27T13:56:49,099] [IgvToolsGui.java:515]  Error indexing file
java.lang.RuntimeException: java.lang.IllegalArgumentException: Flag is an unsupported type for this kind of field
at org.broad.igv.tools.IgvTools.doIndex(IgvTools.java:1004) ~[igv.jar:?]
at org.broad.igv.tools.IgvTools.doIndex(IgvTools.java:916) ~[igv.jar:?]
at org.broad.igv.tools.IgvToolsGui$7.doInBackground(IgvToolsGui.java:513) [igv.jar:?]
at javax.swing.SwingWorker$1.call(Unknown Source) [?:?]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:?]
at javax.swing.SwingWorker.run(Unknown Source) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
at java.lang.Thread.run(Unknown Source) [?:?]
Caused by: java.lang.IllegalArgumentException: Flag is an unsupported type for this kind of field
at htsjdk.variant.vcf.VCFCompoundHeaderLine.<init>(VCFCompoundHeaderLine.java:243) ~[htsjdk-2.24.1.jar:?]
at htsjdk.variant.vcf.VCFFormatHeaderLine.<init>(VCFFormatHeaderLine.java:50) ~[htsjdk-2.24.1.jar:?]
at htsjdk.variant.vcf.AbstractVCFCodec.parseHeaderFromLines(AbstractVCFCodec.java:198) ~[htsjdk-2.24.1.jar:?]
at htsjdk.variant.vcf.VCFCodec.readActualHeader(VCFCodec.java:111) ~[htsjdk-2.24.1.jar:?]
at org.broad.igv.feature.tribble.VCFWrapperCodec.readActualHeader(VCFWrapperCodec.java:92) ~[igv.jar:?]
at htsjdk.tribble.AsciiFeatureCodec.readHeader(AsciiFeatureCodec.java:79) ~[htsjdk-2.24.1.jar:?]
at htsjdk.tribble.AsciiFeatureCodec.readHeader(AsciiFeatureCodec.java:37) ~[htsjdk-2.24.1.jar:?]
at htsjdk.tribble.index.IndexFactory$FeatureIterator.<init>(IndexFactory.java:605) ~[htsjdk-2.24.1.jar:?]
at htsjdk.tribble.index.IndexFactory.createLinearIndex(IndexFactory.java:272) ~[htsjdk-2.24.1.jar:?]
at htsjdk.tribble.index.IndexFactory.createLinearIndex(IndexFactory.java:257) ~[htsjdk-2.24.1.jar:?]
at org.broad.igv.tools.IgvTools.createTribbleIndex(IgvTools.java:1068) ~[igv.jar:?]
at org.broad.igv.tools.IgvTools.doIndex(IgvTools.java:987) ~[igv.jar:?]
... 8 more
ERROR [2021-08-27T14:56:14,486] [IgvToolsGui.java:515]  Error indexing file
java.lang.RuntimeException: java.lang.IllegalArgumentException: Flag is an unsupported type for this kind of field
at org.broad.igv.tools.IgvTools.doIndex(IgvTools.java:1004) ~[igv.jar:?]
at org.broad.igv.tools.IgvTools.doIndex(IgvTools.java:916) ~[igv.jar:?]
at org.broad.igv.tools.IgvToolsGui$7.doInBackground(IgvToolsGui.java:513) [igv.jar:?]
at javax.swing.SwingWorker$1.call(Unknown Source) [?:?]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:?]
at javax.swing.SwingWorker.run(Unknown Source) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
at java.lang.Thread.run(Unknown Source) [?:?]
Caused by: java.lang.IllegalArgumentException: Flag is an unsupported type for this kind of field
at htsjdk.variant.vcf.VCFCompoundHeaderLine.<init>(VCFCompoundHeaderLine.java:243) ~[htsjdk-2.24.1.jar:?]
at htsjdk.variant.vcf.VCFFormatHeaderLine.<init>(VCFFormatHeaderLine.java:50) ~[htsjdk-2.24.1.jar:?]
at htsjdk.variant.vcf.AbstractVCFCodec.parseHeaderFromLines(AbstractVCFCodec.java:198) ~[htsjdk-2.24.1.jar:?]
at htsjdk.variant.vcf.VCFCodec.readActualHeader(VCFCodec.java:111) ~[htsjdk-2.24.1.jar:?]
at org.broad.igv.feature.tribble.VCFWrapperCodec.readActualHeader(VCFWrapperCodec.java:92) ~[igv.jar:?]
at htsjdk.tribble.AsciiFeatureCodec.readHeader(AsciiFeatureCodec.java:79) ~[htsjdk-2.24.1.jar:?]
at htsjdk.tribble.AsciiFeatureCodec.readHeader(AsciiFeatureCodec.java:37) ~[htsjdk-2.24.1.jar:?]
at htsjdk.tribble.index.IndexFactory$FeatureIterator.<init>(IndexFactory.java:605) ~[htsjdk-2.24.1.jar:?]
at htsjdk.tribble.index.IndexFactory.createLinearIndex(IndexFactory.java:272) ~[htsjdk-2.24.1.jar:?]
at htsjdk.tribble.index.IndexFactory.createLinearIndex(IndexFactory.java:257) ~[htsjdk-2.24.1.jar:?]
at org.broad.igv.tools.IgvTools.createTribbleIndex(IgvTools.java:1068) ~[igv.jar:?]
at org.broad.igv.tools.IgvTools.doIndex(IgvTools.java:987) ~[igv.jar:?]
... 8 more




Screen Shot 2021-08-27 at 2.56.40 PM.png

James Robinson

unread,
Aug 27, 2021, 7:03:27 PM8/27/21
to igv-help
The error is in your VCF file,  we would need the file to investigate further, or at least the first few hundred lines.   If you're able to provide that I will look into it.  You can zip and email it to igv-team (at) broadinstitute.org  

Nasir Amra

unread,
Aug 28, 2021, 12:03:56 PM8/28/21
to igv-...@googlegroups.com
I’ve shared the vcf file via box:


If you are not able to access/copy it please tell me and I’ll send it as an attachment. 

This file was generated by taking the original NIST vcf and intersecting it with a bed file. In order to do so, I had to remove the vcf header, do the intersection using sqlite, and concatenate the original header with the intersection result file. Visually looking at it , it seems to be correct so I don’t know why I’m getting this error with indexing the vcf file.

Cheers,
Nasir

--

---
You received this message because you are subscribed to a topic in the Google Groups "igv-help" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/igv-help/h8XL4cV9f8I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to igv-help+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/igv-help/0441eeaa-b0aa-47bf-ade1-dbe6319fe64cn%40googlegroups.com.

James Robinson

unread,
Aug 28, 2021, 12:54:42 PM8/28/21
to igv-help
I can't access it, but to be clear I am ust going to load it and verify what we already know.  The error is from the htsjdk and is in the stack trace you sent in the original post.   This is not an IGV issue, if you wish to debug it focus on the underlying issue, which looks like it as line 243

Caused by: java.lang.IllegalArgumentException: Flag is an unsupported type for this kind of field
at htsjdk.variant.vcf.VCFCompoundHeaderLine.<init>(VCFCompoundHeaderLine.java:243) ~[htsjdk-2.24.1.jar:?]



Nasir Amra

unread,
Aug 28, 2021, 12:59:58 PM8/28/21
to igv-...@googlegroups.com
OK. do I count 243 lines from the top or after the headers beginning with “#” ?


James Robinson

unread,
Aug 28, 2021, 1:00:50 PM8/28/21
to igv-help
Probably the top.

James Robinson

unread,
Aug 28, 2021, 1:01:24 PM8/28/21
to igv-help
However I'm confused by your question,  there should be no lines not beginning with # until the data starts.

Nasir Amra

unread,
Aug 28, 2021, 1:03:02 PM8/28/21
to igv-...@googlegroups.com
That is correct. I just wanted to be clear where I should count from. Thanks, Nasir

Amra, Nasir Khalid

unread,
Aug 28, 2021, 1:16:29 PM8/28/21
to igv-...@googlegroups.com
Another attempt to send the vcf file as attachment. 

I'll see if I can index the original NIST file.

Cheers,
Nasir


From: Nasir Amra <nasi...@gmail.com>
Sent: Saturday, August 28, 2021 12:06 PM
To: Amra, Nasir Khalid <Nasir...@bcm.edu>
Subject: Fwd: [igv-help] getting error message using igv tools to index a vcf file
 
***CAUTION:*** This email is not from a BCM Source. Only click links or open attachments you know are safe.


Begin forwarded message:
NIST_NA12878_calls_in_PLDv2.vcf

Amra, Nasir Khalid

unread,
Aug 28, 2021, 1:23:19 PM8/28/21
to igv-...@googlegroups.com
Looking at contents of vcf in visual code:


I don't see why line 245 would give an error. It looks the same as before and after it.

Cheers,
Nasir

From: Amra, Nasir Khalid <Nasir...@bcm.edu>
Sent: Saturday, August 28, 2021 12:16 PM
To: igv-...@googlegroups.com <igv-...@googlegroups.com>

Amra, Nasir Khalid

unread,
Aug 28, 2021, 1:26:19 PM8/28/21
to igv-...@googlegroups.com
I meant line 243.

From: Amra, Nasir Khalid <Nasir...@bcm.edu>
Sent: Saturday, August 28, 2021 12:23 PM

James Robinson

unread,
Aug 28, 2021, 1:29:49 PM8/28/21
to igv-help

Amra, Nasir Khalid

unread,
Aug 28, 2021, 1:35:08 PM8/28/21
to igv-...@googlegroups.com, jrob...@broadinstitute.org
I went back to original NIST file and got the same error message. 



From: Amra, Nasir Khalid <Nasir...@bcm.edu>
Sent: Saturday, August 28, 2021 12:23 PM

James Robinson

unread,
Aug 28, 2021, 1:44:04 PM8/28/21
to Amra, Nasir Khalid, igv-...@googlegroups.com
Could you run it through the validator I posted earlier?   You might open an issue here  https://github.com/samtools/htsjdk.   If you do post this section of the stack trace,

Caused by: java.lang.IllegalArgumentException: Flag is an unsupported type for this kind of field
at htsjdk.variant.vcf.VCFCompoundHeaderLine.<init>(VCFCompoundHeaderLine.java:243) ~[htsjdk-2.24.1.jar:?]
at htsjdk.variant.vcf.VCFFormatHeaderLine.<init>(VCFFormatHeaderLine.java:50) ~[htsjdk-2.24.1.jar:?]
at htsjdk.variant.vcf.AbstractVCFCodec.parseHeaderFromLines(AbstractVCFCodec.java:198) ~[htsjdk-2.24.1.jar:?]
at htsjdk.variant.vcf.VCFCodec.readActualHeader(VCFCodec.java:111) ~[htsjdk-2.24.1.jar:?]


  There really isn't anything I can do about this if the htsjdk will not read it.   

Amra, Nasir Khalid

unread,
Aug 28, 2021, 7:57:35 PM8/28/21
to James Robinson, igv-...@googlegroups.com
I've open the issue at the recommended website:

which includes the  error output from running the vcf validation tool.
Hopefully, I can get this error resolved.

Cheers,
Nasir

Before you submit Description of the issue: htsjdk errors when trying to validate a NIST .vcf file. The .vcf file is generated by NIST so I would think it has a valid format. The error message is u...


From: James Robinson <jrob...@broadinstitute.org>
Sent: Saturday, August 28, 2021 12:43 PM

To: Amra, Nasir Khalid <Nasir...@bcm.edu>

James Robinson

unread,
Aug 28, 2021, 9:33:12 PM8/28/21
to igv-...@googlegroups.com
OK, good luck.  I noticed the file was produced in 2014,  maybe someone on htsjdk will have some suggestions on how to fix it.
Reply all
Reply to author
Forward
0 new messages