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

svtype = variant.info.get("SVTYPE", "SV") #51

Open
Jokendo-collab opened this issue May 25, 2023 · 2 comments
Open

svtype = variant.info.get("SVTYPE", "SV") #51

Jokendo-collab opened this issue May 25, 2023 · 2 comments

Comments

@Jokendo-collab
Copy link

I am getting the following error and I am not sure how to go around this. I used the following command to annotate the my vcf.

duphold -v macope2_sorted.vcf -b ../macOpe2.sorted.bam -f /data/okendojo/datashare/macOpeProject/macOpe2Assembly.fasta -t 24 -o mc.vcf but I cannot get the SVTYPE column information.

(samplot) [okendojo@cn0798 bcgFile]$ samplot vcf --vcf mc.vcf  -d test -O png -b ../macOpe2.sorted.bam 
Traceback (most recent call last):
  File "/vf/users/okendojo/conda/envs/samplot/bin/samplot", line 10, in <module>
    sys.exit(main())
  File "/vf/users/okendojo/conda/envs/samplot/lib/python3.10/site-packages/samplot/__main__.py", line 31, in main
    args.func(parser, args, extra_args)
  File "/vf/users/okendojo/conda/envs/samplot/lib/python3.10/site-packages/samplot/samplot_vcf.py", line 1133, in vcf
    commands, table_data = generate_commands(
  File "/vf/users/okendojo/conda/envs/samplot/lib/python3.10/site-packages/samplot/samplot_vcf.py", line 949, in generate_commands
    svtype = variant.info.get("SVTYPE", "SV")
  File "pysam/libcbcf.pyx", line 2711, in pysam.libcbcf.VariantRecordInfo.get
ValueError: Invalid header
@brentp
Copy link
Owner

brentp commented May 25, 2023

what does head mc.vcf show?
This seems to be a samplot issue, not a duphold issue, right?

@Jokendo-collab
Copy link
Author

head mc.vcf shows the following:

##fileformat=VCFv4.2
##contig=<ID=ptg000001l,length=17552345>
##contig=<ID=ptg000002l,length=15455575>
##contig=<ID=ptg000003l,length=17609903>
##contig=<ID=ptg000004l,length=20365586>
##contig=<ID=ptg000005l,length=2880420>
##contig=<ID=ptg000006l,length=19393576>
##contig=<ID=ptg000007l,length=20082800>
##contig=<ID=ptg000008l,length=19379476>
##contig=<ID=ptg000009l,length=24022457>

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

2 participants