Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"bcf_fmt_array" error #102

Open
ycl6 opened this issue Nov 13, 2019 · 5 comments
Open

"bcf_fmt_array" error #102

ycl6 opened this issue Nov 13, 2019 · 5 comments

Comments

@ycl6
Copy link

ycl6 commented Nov 13, 2019

Hi

I am using vt decompose -s -d on a VCF file and encountered an "Unexpected type 0" error without produced the resulting VCF

decompose v0.5

options:     input VCF file        test.vcf
         [s] smart decomposition   true (experimental)
         [o] output VCF file       -

1:1168012:CCTG/C
1:1226941:CCG/C
1:1273245:GCTGGGGGTGGAGCAGCAGCGGGGTGGGGTGGAA/G
1:1323901:AAAAAC/A
1:1564778:G/T
1:2704224:TC/T
1:2704227:AGCT/A
[E::bcf_fmt_array] Unexpected type 0

Below is the VCF

1       1168012 .       CCTG    C       .       germline;slippage;weak_evidence CONTQ=17;DP=31;ECNT=1;GERMQ=1;MBQ=20,20;MFRL=155,174;MMQ=60,60;MPOS=42;NALOD=1.000;NLOD=2.71;POPAF=5.40;ROQ=93;RPA=4,3;RU=CTG;SEQQ=1;STR;STRANDQ=60;STRQ=1;TLOD=6.90    GT:AD:AF:DP:F1R2:F2R1:SB        0/0:17,0:0.091:17:8,0:8,0:9,8,0,0       0/1:8,3:0.299:11:1,0:5,3:5,3,2,1
1       1226941 .       CCG     C       .       contamination;weak_evidence     CONTQ=3;DP=66;ECNT=1;GERMQ=75;MBQ=20,20;MFRL=157,138;MMQ=60,60;MPOS=15;NALOD=1.27;NLOD=5.11;POPAF=5.40;ROQ=93;SEQQ=1;STRANDQ=29;TLOD=3.51       GT:AD:AF:DP:F1R2:F2R1:SB        0/0:32,0:0.051:32:16,0:16,0:15,17,0,0   0/1:29,2:0.104:31:12,2:16,0:13,16,1,1
1       1273245 .       GCTGGGGGTGGAGCAGCAGCGGGGTGGGGTGGAA      G       .       contamination;normal_artifact;weak_evidence     CONTQ=1;DP=176;ECNT=1;GERMQ=93;MBQ=34,20;MFRL=157,140;MMQ=60,60;MPOS=37;NALOD=-3.576e+00;NLOD=4.71;POPAF=2.58;ROQ=93;SEQQ=1;STRANDQ=93;TLOD=3.17        GT:AD:AF:DP:F1R2:F2R1:SB        0/0:53,2:0.041:55:19,0:26,2:41,12,1,1   0/1:75,2:0.032:77:27,0:36,2:56,19,1,1
1       1323901 .       AAAAAC  A       .       contamination;slippage;weak_evidence    CONTQ=1;DP=94;ECNT=1;GERMQ=93;MBQ=20,20;MFRL=152,188;MMQ=60,60;MPOS=59;NALOD=1.21;NLOD=4.50;POPAF=5.40;ROQ=93;RPA=3,2;RU=AAAAC;SEQQ=1;STR;STRANDQ=93;STRQ=1;TLOD=5.94   GT:AD:AF:DP:F1R2:F2R1:SB        0/0:26,0:0.058:26:19,0:6,0:12,14,0,0    0/1:58,2:0.057:60:20,0:35,2:30,28,1,1
1       1564778 .       G       T       .       orientation;weak_evidence       CONTQ=20;DP=37;ECNT=1;GERMQ=39;MBQ=20,20;MFRL=150,158;MMQ=60,60;MPOS=44;NALOD=1.11;NLOD=3.61;POPAF=5.40;ROQ=1;SEQQ=1;STRANDQ=30;TLOD=3.15       GT:AD:AF:DP:F1R2:F2R1:SB        0/0:23,0:0.071:23:10,0:13,0:12,11,0,0   0/1:12,2:0.222:14:12,2:0,0:6,6,1,1
1       2704224 .       TC      T       .       contamination;haplotype;weak_evidence   CONTQ=1;DP=93;ECNT=2;GERMQ=93;MBQ=20,20;MFRL=155,138;MMQ=60,60;MPOS=48;NALOD=1.26;NLOD=5.10;POPAF=5.40;ROQ=93;RPA=2,1;RU=C;SEQQ=1;STR;STRANDQ=24;STRQ=93;TLOD=5.97      GT:AD:AF:DP:F1R2:F2R1:PGT:PID:PS:SB     0|0:31,0:0.052:31:20,0:11,0:0|1:2704224_TC_T:2704224:14,17,0,0  0|1:56,2:0.058:58:32,2:24,0:0|1:2704224_TC_T:2704224:25,31,1,1
1       2704227 .       AGCT    A       .       contamination;haplotype;weak_evidence   CONTQ=1;DP=90;ECNT=2;GERMQ=93;MBQ=20,20;MFRL=155,138;MMQ=60,60;MPOS=-2147483648;NALOD=1.26;NLOD=5.12;POPAF=5.40;ROQ=93;SEQQ=1;STRANDQ=34;TLOD=5.97      GT:AD:AF:DP:F1R2:F2R1:PGT:PID:PS:SB     0|0:31,0:0.053:31:20,0:11,0:0|1:2704224_TC_T:2704224:14,17,0,0  0|1:56,2:0.059:58:32,2:23,0:0|1:2704224_TC_T:2704224:25,31,1,1
1       3645985 .       GGCA    G       .       contamination;slippage;weak_evidence    CONTQ=1;DP=243;ECNT=1;GERMQ=93;MBQ=20,20;MFRL=156,172;MMQ=60,60;MPOS=68;NALOD=1.77;NLOD=16.81;POPAF=5.40;ROQ=93;RPA=4,3;RU=GCA;SEQQ=1;STR;STRANDQ=57;STRQ=1;TLOD=6.69   GT:AD:AF:DP:F1R2:F2R1:SB        0/0:97,0:0.017:97:40,0:57,0:42,55,0,0   0/1:116,4:0.044:120:53,2:60,2:54,62,2,2
@atks
Copy link
Owner

atks commented Nov 13, 2019 via email

@ycl6
Copy link
Author

ycl6 commented Nov 14, 2019

@atks

I put the first couple of lines of the VCF at pastebin.
https://pastebin.com/raw/f46eh1K4

With the content named "test1.vcf"
vt decompose -s -d test1.vcf > test2.vcf

I will get

decompose v0.5

options:     input VCF file        test1.vcf
         [s] smart decomposition   true (experimental)
         [o] output VCF file       -

1:1168012:CCTG/C
1:1226941:CCG/C
1:1273245:GCTGGGGGTGGAGCAGCAGCGGGGTGGGGTGGAA/G
1:1323901:AAAAAC/A
1:1564778:G/T
1:2704224:TC/T
1:2704227:AGCT/A
[E::bcf_fmt_array] Unexpected type 0

@atks
Copy link
Owner

atks commented Nov 15, 2019

@ycl6 this will take awhile. the bug is elusive.

@ycl6
Copy link
Author

ycl6 commented Nov 18, 2019

@atks Thanks. I will report another issue probably is related.

I run bcftools on same test1.vcf to do decompose and normalize without error

bcftools norm --multiallelics -any -f human_g1k_v37_decoy.fasta test1.vcf > test2.vcf

Lines   total/split/realigned/skipped:	15/2/4/0

I then run vt sort test2.vcf and received [E:bcf_synced_reader.h:108 operator()] alleles not defined in VCF record. error

#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	005N	005T
1	1168012	.	CCTG	C	.	germline;slippage;weak_evidence	CONTQ=17;DP=31;ECNT=1;GERMQ=1;MBQ=20,20;MFRL=155,174;MMQ=60,60;MPOS=42;NALOD=1;NLOD=2.71;POPAF=5.4;ROQ=93;RPA=4,3;RU=CTG;SEQQ=1;STR;STRANDQ=60;STRQ=1;TLOD=6.9	GT:AD:AF:DP:F1R2:F2R1:SB	0/0:17,0:0.091:17:8,0:8,0:9,8,0,0	0/1:8,3:0.299:11:1,0:5,3:5,3,2,1
1	1226941	.	CCG	C	.	contamination;weak_evidence	CONTQ=3;DP=66;ECNT=1;GERMQ=75;MBQ=20,20;MFRL=157,138;MMQ=60,60;MPOS=15;NALOD=1.27;NLOD=5.11;POPAF=5.4;ROQ=93;SEQQ=1;STRANDQ=29;TLOD=3.51	GT:AD:AF:DP:F1R2:F2R1:SB	0/0:32,0:0.051:32:16,0:16,0:15,17,0,0	0/1:29,2:0.104:31:12,2:16,0:13,16,1,1
1	1273245	.	GCTGGGGGTGGAGCAGCAGCGGGGTGGGGTGGAA	G	.	contamination;normal_artifact;weak_evidence	CONTQ=1;DP=176;ECNT=1;GERMQ=93;MBQ=34,20;MFRL=157,140;MMQ=60,60;MPOS=37;NALOD=-3.576;NLOD=4.71;POPAF=2.58;ROQ=93;SEQQ=1;STRANDQ=93;TLOD=3.17	GT:AD:AF:DP:F1R2:F2R1:SB	0/0:53,2:0.041:55:19,0:26,2:41,12,1,1	0/1:75,2:0.032:77:27,0:36,2:56,19,1,1
1	1323901	.	AAAAAC	A	.	contamination;slippage;weak_evidence	CONTQ=1;DP=94;ECNT=1;GERMQ=93;MBQ=20,20;MFRL=152,188;MMQ=60,60;MPOS=59;NALOD=1.21;NLOD=4.5;POPAF=5.4;ROQ=93;RPA=3,2;RU=AAAAC;SEQQ=1;STR;STRANDQ=93;STRQ=1;TLOD=5.94	GT:AD:AF:DP:F1R2:F2R1:SB	0/0:26,0:0.058:26:19,0:6,0:12,14,0,0	0/1:58,2:0.057:60:20,0:35,2:30,28,1,1
1	1564778	.	G	T	.	orientation;weak_evidence	CONTQ=20;DP=37;ECNT=1;GERMQ=39;MBQ=20,20;MFRL=150,158;MMQ=60,60;MPOS=44;NALOD=1.11;NLOD=3.61;POPAF=5.4;ROQ=1;SEQQ=1;STRANDQ=30;TLOD=3.15	GT:AD:AF:DP:F1R2:F2R1:SB	0/0:23,0:0.071:23:10,0:13,0:12,11,0,0	0/1:12,2:0.222:14:12,2:0,0:6,6,1,1
1	2704224	.	TC	T	.	contamination;haplotype;weak_evidence	CONTQ=1;DP=93;ECNT=2;GERMQ=93;MBQ=20,20;MFRL=155,138;MMQ=60,60;MPOS=48;NALOD=1.26;NLOD=5.1;POPAF=5.4;ROQ=93;RPA=2,1;RU=C;SEQQ=1;STR;STRANDQ=24;STRQ=93;TLOD=5.97	GT:AD:AF:DP:F1R2:F2R1:PGT:PID:PS:SB	0|0:31,0:0.052:31:20,0:11,0:0|1:2704224_TC_T:2704224:14,17,0,0	0|1:56,2:0.058:58:32,2:24,0:0|1:2704224_TC_T:2704224:25,31,1,1
1	2704227	.	AGCT	A	.	contamination;haplotype;weak_evidence	CONTQ=1;DP=90;ECNT=2;GERMQ=93;MBQ=20,20;MFRL=155,138;MMQ=60,60;MPOS=.;NALOD=1.2[E:bcf_synced_reader.h:108 operator()] alleles not defined in VCF record.

@mark-welsh
Copy link

Hi, has any progress been made with this? I am seeing the same error [E::bcf_fmt_array] Unexpected type 0. Is it from the ECNT INFO field?

Reason I suspect this is because the output terminates right at the recalculation for the decomposed record at ECNT (with no debug flag, output to stdout):

chr1	22447102	.	CAA	C	.	PASS	CONTQ=66;DP=99;ECNT=1;GERMQ=81;MBQ=30,30;MFRL=344,344;MMQ=60,60;MPOS=18;NALOD=0.737;NLOD=4.15;POPAF=2.75;ROQ=93;RPA=16,14,15;RU=A;SEQQ=59;STR;STRANDQ=78;STRQ=93;TLOD=11.39;OLD_MULTIALLELIC=chr1:22447102:CAA/C/CA	GT:AD:AF:DP:F1R2:F2R1:SB	0/0:13,0:0.048:16:8,0:5,0:5,8,1,2	0/1/.:52,7:0.117:64:18,3:26,4:14,38,8,4
chr1	22447102	.	CAA	CA	.	PASS	CONTQ=66;DP=99;ECNT=[E::bcf_fmt_array] Unexpected type 0

then, running with the debug flag vt decompose -s -d:

chr1	22447102	.	CAA	C	.	PASS	CONTQ=66;DP=99;ECNT=1;GERMQ=81;MBQ=30,30;MFRL=344,344;MMQ=60,60;MPOS=18;NALOD=0.737;NLOD=4.15;POPAF=2.75;ROQ=93;RPA=16,14,15;RU=A;SEQQ=59;STR;STRANDQ=78;STRQ=93;TLOD=11.39;OLD_MULTIALLELIC=chr1:22447102:CAA/C/CA	GT:AD:AF:DP:F1R2:F2R1:SB	0/0:13,0:0.048:16:8,0:5,0:5,8,1,2	0/1/.:52,7:0.117:64:18,3:26,4:14,38,8,4
chr1	22447102	.	CAA	CA	.	PASS	CONTQ=66;DP=99;ECNT=chr1:23142704:C/T

I'm not sure if this helps any troubleshooting. I can also provide a sample VCF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants