Comments (2)
The base SVs don't have an INFO/END
defined.
For example, if I take the first entry from your base VCF:
##fileformat=VCFv4.0
##FILTER=<ID=PASS,Description="All filters passed">
##fileDate=99991122
##contig=<ID=2L,length=23513712>
##contig=<ID=2R,length=25286936>
##contig=<ID=3L,length=28110227>
##contig=<ID=3R,length=32079331>
##contig=<ID=4,length=1348131>
##contig=<ID=X,length=23542271>
##contig=<ID=Y,length=3667352>
##ALT=<ID=INS,Description=Insertion of novel sequence relative to the reference>
##ALT=<ID=DEL,Description=Deletion relative to the reference>
##ALT=<ID=DUP,Description=Region of elevated copy number relative to the reference>
##ALT=<ID=INV,Description=Inversion of reference sequence>
##ALT=<ID=BND,Description=Breakend of translocation>
##INFO=<ID=SVTYPE,Number=1,Type=String,Description=Type of structural variant>
##INFO=<ID=SVLEN,Number=1,Type=Integer,Description=Difference in length between REF and ALT alleles>
##FORMAT=<ID=GT,Number=1,Type=String,Description=Genotype>
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT Hifi_60x_0.999_1_cute
2L 61980 idINS61980 a <INS> 30 PASS SVTYPE=INS;SVLEN=89 GT 1/1
And run it through htslib:
import pysam
import sys
v = pysam.VariantFile(sys.argv[1])
o = pysam.VariantFile("delme.vcf", 'w', header=v.header)
for e in v:
o.write(e)
I get the error:
[E::vcf_format] Invalid BCF, the INFO tag id=4 is too large at 2L:61980
Traceback (most recent call last):
File "/Users/english/code/truvari/tickets/long/tmp.py", line 8, in <module>
o.write(e)
File "pysam/libcbcf.pyx", line 4482, in pysam.libcbcf.VariantFile.write
File "pysam/libcbcf.pyx", line 4519, in pysam.libcbcf.VariantFile.write
OSError: [Errno 22] b'Invalid argument'
But when I add INFO/END
:
##fileformat=VCFv4.0
##FILTER=<ID=PASS,Description="All filters passed">
##fileDate=99991122
##contig=<ID=2L,length=23513712>
##contig=<ID=2R,length=25286936>
##contig=<ID=3L,length=28110227>
##contig=<ID=3R,length=32079331>
##contig=<ID=4,length=1348131>
##contig=<ID=X,length=23542271>
##contig=<ID=Y,length=3667352>
##ALT=<ID=INS,Description=Insertion of novel sequence relative to the reference>
##ALT=<ID=DEL,Description=Deletion relative to the reference>
##ALT=<ID=DUP,Description=Region of elevated copy number relative to the reference>
##ALT=<ID=INV,Description=Inversion of reference sequence>
##ALT=<ID=BND,Description=Breakend of translocation>
##INFO=<ID=SVTYPE,Number=1,Type=String,Description=Type of structural variant>
##INFO=<ID=SVLEN,Number=1,Type=Integer,Description=Difference in length between REF and ALT alleles>
##INFO=<ID=END,Number=1,Type=Integer,Description=End position>
##FORMAT=<ID=GT,Number=1,Type=String,Description=Genotype>
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT Hifi_60x_0.999_1_cute
2L 61980 idINS61980 a <INS> 30 PASS SVTYPE=INS;SVLEN=89;END=61981 GT 1/1
I do not get the error.
from truvari.
Thank you!!
from truvari.
Related Issues (20)
- Question: Does truvari have a upper limit on the file size? How to speed up? HOT 2
- BED Region off-by-one error HOT 4
- Zero matches between base and comp HOT 4
- AttributeError: 'CollapsedCalls' object has no attribute 'consolidate' | version 4.2.1 HOT 4
- Calculate SNV HOT 7
- complex genotype problem HOT 3
- GT integrate HOT 1
- No TP or FP calls for CNV HOT 1
- merging different SV type? HOT 3
- No FP or TP calls HOT 2
- Unable to run MAFFT HOT 9
- md5sum FIPS issue HOT 1
- Support vector for intra-sample merge HOT 6
- some questions about the results in fp.vcf.gz
- some questions about the results in fp.vcf.gz HOT 1
- Getting same numbers of TP-base and TP-comp HOT 4
- Suggested minor documentation changes
- Truvari, STRs and Expansion Hunter - Query HOT 2
- Bug in benchmarking HOT 4
- Request: truvari collapse --keep option to mantain the ALT sequence HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from truvari.