smoove icon indicating copy to clipboard operation
smoove copied to clipboard

smoove annotate error "panic: runtime error: invalid memory address or nil pointer dereference" is it a problem?

Open robertwhbaldwin opened this issue 2 years ago • 4 comments

I ran smoove annotate and got this error (below). But the smoove.square.anno.vcf.gz was generated. When I ran bcftools stats the anno file had 1 less record than the input vcf. Not sure what to make of this. The annotations look like they were added. Aside from the 1 missing record everything looks o.k. I noticed that someone else posted a message about this error to this board and that the ticker got closed. Was the problem resolved? It seemed to be related to missing samples. That's doesn't seem applicable here.

I did notice that the number of variants was few. The smoove.genotyped.vcf.gz were much larger (~60mb) than the joint genotyped VCF files (11-12 mb) and the final squared file had 73801 records.

Here's the input "suared" vcf stats:

SN [2]id [3]key [4]value SN 0 number of samples: 25 SN 0 number of records: 73801 SN 0 number of no-ALTs: 0 SN 0 number of SNPs: 0 SN 0 number of MNPs: 0 SN 0 number of indels: 9399 SN 0 number of others: 53007 SN 0 number of multiallelic sites: 0 SN 0 number of multiallelic SNP sites: 0

Here's for the anno VCF:

SN [2]id [3]key [4]value SN 0 number of samples: 25 SN 0 number of records: 73800 SN 0 number of no-ALTs: 0 SN 0 number of SNPs: 0 SN 0 number of MNPs: 0 SN 0 number of indels: 9399 SN 0 number of others: 53006 SN 0 number of multiallelic sites: 0 SN 0 number of multiallelic SNP sites: 0

Here's the error message (someone posted this error before to this board):

docker run -v /home/robert/assembly:/assembly -v /data/BAMS/results:/data -it brentp/smoove (smoove-env) root@d4fdaf368702:/work# cd .. (smoove-env) root@d4fdaf368702:/# cd data (smoove-env) root@d4fdaf368702:/data# smoove annotate --gff /assembly/GCF_014851395.1_ASM1485139v1_genomic.gff RHF.smoove.square.vcf.gz | bgzip -c >RHF.smoove.square.anno.vcf.gz [smoove] 2021/07/28 13:11:11 starting with version 0.2.6 panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x728eb3]

goroutine 1 [running]: github.com/brentp/smoove/annotate.setSmooveQuality(0xc000d9d790, 0xc000d9d790) /home/brentp/go/go/src/github.com/brentp/smoove/annotate/annotate.go:384 +0x113 github.com/brentp/smoove/annotate.annotate(0xc001d1cc00, 0xc00082e400, 0xc00015b560) /home/brentp/go/go/src/github.com/brentp/smoove/annotate/annotate.go:409 +0xa9 github.com/brentp/smoove/annotate.Main() /home/brentp/go/go/src/github.com/brentp/smoove/annotate/annotate.go:468 +0x46a main.main() /home/brentp/go/go/src/github.com/brentp/smoove/cmd/smoove/smoove.go:121 +0x1ce

robertwhbaldwin avatar Jul 28 '21 13:07 robertwhbaldwin

annotate is expecting your vcf to have samples with genotypes, can you verify that is the case? and/or, can you show a few variants from RHF.smoove.square.vcf.gz?

brentp avatar Jul 29 '21 10:07 brentp

Sorry I deleted the square.vcf I only have the square.anno.vcf. Below are some records from that file. If you have genotypes in the anno file and the header lists 25 samples then I'd expect that also to be present in the uannotated file as well.

As I was saying the square and square.anno file differed by 1 record. Given the error I'd assume that this record must have been the last record in the square.vcf file otherwise the difference would have been greater. Maybe the square.vcf file was truncated?

NW_024040040.1	52410111	13904	N	<DEL>	325	.	SVTYPE=DEL;SVLEN=-357;END=52410468;STRANDS=+-:5;CIPOS=-10,9;CIEND=-10,9;CIPOS95=0,0;CIEND95=0,0;SU=5;PE=0;SR=5;SNAME=G0319-20-B0074:1990;ALG=PROD;GCF=0.435754;AN=46;AC=22;MSHQ=4	GT:GQ:SQ:GL:DP:RO:AO:QR:QA:RS:AS:ASC:RP:AP:AB:DHFC:DHFFC:DHBFC:DHSP:SHQ	0/1:80:80.65:-15,-7,-36:55:46:9:45:8:28:6:1:17:0:0.15:0.25:0.6:0.244898:1:4	0/1:41:41.89:-6,-2,-10:17:13:3:13:3:13:2:0:0:0:0.19:0.454545:1.25:0.416667:0:4	0/1:24:92.94:-10,-1,-3:12:6:5:5:4:1:1:2:4:0:0.44:0.05:0.125:0.0454545:0:4	1/1:20:236.38:-24,-2,-0:8:0:8:0:8:0:3:4:0:0:1:0.025:0.0769231:0.0243902:0:-1	0/0:3:1.72:-4,-4,-17:21:19:2:19:2:19:2:0:0:0:0.095:0.2:0.454545:0.2:0:-1	1/1:2:31.46:-3,-0,-0:1:0:1:0:1:0:0:0:0:0:1:0:0:0:1:-1	0/0:39:0:-0,-4,-13:13:13:0:13:0:13:0:0:0:0:0:0.333333:0.777778:0.333333:0:-1	0/0:3:2.04:-0,-0,-1:2:2:0:1:0:0:0:0:1:0:0:0.0357143:0.333333:0.0333333:0:-1	0/0:0:4.77:0,0,0:1:1:0:0:0:0:0:0:0:0:.:0:0:0:0:-1	./.:.:.:.:0:0:0:0:0:0:0:0:0:0:.:0:0:0:0:-1	1/1:7:89.31:-9,-1,-0:5:0:4:0:3:0:1:1:0:0:1:0:0:0:1:-1	1/1:0:81.32:-8,-1,-1:4:1:3:1:3:0:1:1:1:1:0.75:0:0:0:2:-1	0/0:36:0:-8,-12,-50:64:57:6:57:5:32:1:3:25:1:0.081:0.270833:0.619048:0.265306:1:-1	1/1:15:177.38:-18,-2,-0:6:0:6:0:6:0:1:4:0:0:1:0:0:0:0:-1	1/1:28:324.97:-33,-3,-1:12:0:11:0:11:0:1:5:0:4:1:0:0:0:2:-1	0/0:186:0:-0,-19,-62:63:63:0:62:0:39:0:0:23:0:0:0.625:0.833333:0.6:0:-1	0/1:6:75.87:-8,-1,-1:7:2:4:2:3:0:0:1:2:1:0.6:0.0322581:0.111111:0.0294118:1:4	1/1:8:167.85:-17,-1,-0:8:1:6:1:6:1:4:1:0:0:0.86:0.0294118:0.0625:0.0277778:1:-1	0/0:165:0:-0,-17,-55:56:56:0:55:0:33:0:0:22:0:0:0.615385:0.8:0.592593:0:-1	0/0:0:2.85:-9,-9,-39:52:46:6:45:5:27:2:1:18:1:0.1:0.382353:0.764706:0.371429:2:-1	0/1:47:47.46:-18,-13,-62:86:75:10:74:10:41:1:5:33:4:0.12:0.703704:0.655172:0.633333:7:4	0/1:2:259.84:-27,-1,-1:15:4:10:4:10:0:1:5:4:3:0.71:0:0:0:4:4	./.:.:.:.:0:0:0:0:0:0:0:0:0:0:.:0:0:0:1:-1	0/0:0:4.77:0,0,0:0:0:0:0:0:0:0:0:0:0:.:0:0:0:0:-1	1/1:3:109.87:-11,-1,-0:6:1:4:1:4:0:2:0:1:1:0.8:0:0:0:2:-1



NW_024040040.1	52413490	13906	N	<DEL>	131.9	.	SVTYPE=DEL;SVLEN=-75270;END=52488760;STRANDS=+-:6;IMPRECISE;CIPOS=-30,584;CIEND=-541,29;CIPOS95=-7,124;CIEND95=-85,9;SU=6;PE=6;SR=0;SNAME=G0319-20-B0074:1998;ALG=PROD;GCF=0.398387;AN=50;AC=6;MSHQ=2;smoove_gene=LOC119896776|upstream:1:5000,LOC119896776|gene:1:51417,LOC119896776|downstream:1:5000,LOC119897024|gene:1:17267,LOC119897024|downstream:1:5000,LOC119897024|upstream:1:3631	GT:GQ:SQ:GL:DP:RO:AO:QR:QA:RS:AS:ASC:RP:AP:AB:DHFC:DHFFC:DHBFC:DHSP:SHQ	0/1:54:131.88:-14,-1,-6:17:10:6:10:6:0:0:0:10:6:0.38:0.125:0.222222:0.12766:7:4	0/1:32:32.94:-4,-1,-6:10:7:2:7:2:0:0:0:7:2:0.22:0.0909091:0.125:0.0909091:3:4	0/0:39:0:-0,-4,-13:14:14:0:13:0:0:0:0:13:0:0:0.15:0.25:0.15:0:-1	0/0:3:1.72:-4,-4,-17:22:19:2:19:2:0:0:0:19:2:0.095:0.2:0.363636:0.2:3:-1	0/0:21:0.03:-0,-2,-7:9:8:0:7:0:0:0:0:7:0:0:0.12:0.1875:0.125:2:-1	0/1:20:20.95:-4,-2,-9:14:11:2:11:2:0:0:0:11:2:0.15:0.148148:0.222222:0.148148:3:1	0/0:36:0:-0,-4,-12:13:13:0:12:0:2:0:0:10:0:0:0.190476:0.363636:0.190476:0:-1	0/0:27:0.01:-0,-3,-9:11:10:0:9:0:2:0:0:7:0:0:0.464286:1.08333:0.481481:1:-1	0/0:69:0:-0,-7,-23:24:24:0:23:0:12:0:0:11:0:0:0.36:0.36:0.36:0:-1	0/0:75:0:-0,-8,-25:26:26:0:25:0:14:0:0:11:0:0:0.454545:0.416667:0.454545:0:-1	0/0:123:0:-0,-12,-41:42:42:0:41:0:25:0:0:16:0:0:0.290323:0.264706:0.3:0:-1	0/0:18:0.07:-2,-4,-14:17:15:1:15:1:0:0:0:15:1:0.062:0.0714286:0.125:0.0714286:2:-1	0/0:9:0.5:-4,-5,-19:24:21:2:21:2:0:0:0:21:2:0.087:0.125:0.26087:0.125:3:-1	0/0:42:0:-0,-4,-14:16:15:0:14:0:2:0:0:12:0:0:0.142857:0.2:0.142857:2:-1	0/0:24:0.02:-0,-2,-8:9:9:0:8:0:1:0:0:7:0:0:0.153846:0.333333:0.153846:0:-1	0/0:0:2.98:-2,-2,-8:11:9:1:9:1:0:0:0:9:1:0.1:0.0833333:0.142857:0.0833333:2:-1	0/1:20:20.95:-4,-2,-9:14:11:2:11:2:0:0:0:11:2:0.15:0.16129:0.25:0.16129:3:1	0/1:8:9.42:-4,-3,-13:18:15:2:15:2:0:0:0:15:2:0.12:0.205882:0.333333:0.205882:3:1	0/0:33:0:-0,-3,-11:12:11:0:11:0:0:0:0:11:0:0:0.0384615:0.0714286:0.0384615:1:-1	0/1:8:9.47:-2,-1,-5:7:6:1:6:1:0:0:0:6:1:0.14:0.205882:0.411765:0.205882:5:1	0/0:42:0:-2,-6,-22:25:23:1:23:1:0:0:0:23:1:0.042:0.111111:0.12:0.111111:2:-1	0/0:15:0.13:-0,-2,-5:5:5:0:5:0:0:0:0:5:0:0:0.0833333:0.285714:0.0833333:0:-1	0/0:45:0:-0,-5,-15:16:16:0:15:0:5:0:0:10:0:0:0.0769231:0.181818:0.0769231:0:-1	0/0:45:0:-0,-5,-15:17:16:0:15:0:6:0:0:9:0:0:0.192308:0.277778:0.192308:1:-1	0/0:51:0:-0,-5,-17:18:18:0:17:0:9:0:0:8:0:0:0.321429:0.5:0.333333:0:-1

robertwhbaldwin avatar Jul 29 '21 13:07 robertwhbaldwin

I think you're right that it's likely the file was truncated.

brentp avatar Jul 29 '21 13:07 brentp

yes truncated the final record in squared.vcf was incomplete . thanks for your help - Robert

robertwhbaldwin avatar Jul 29 '21 14:07 robertwhbaldwin