bioinfo-chru-strasbourg / vcf2circos

python plotly Circos from VCF
GNU Affero General Public License v3.0
32 stars 8 forks source link

Cannot run the application #30

Open rajdbs32 opened 1 year ago

rajdbs32 commented 1 year ago

I generated vcf's from MANTA then annotated them using AnnotSV tool. then tried running vcf2circos tool i get this error :

$ vcf2circos --input output.vcf --options Static/options.json --output out.html -a hg38 [INFO] Input file: output.vcf (format 'vcf') [INFO] Output file: out.html (format 'html') [INFO] Options provided.

Traceback (most recent call last): File "/home/genomics/anaconda3/envs/circos/bin/vcf2circos", line 8, in sys.exit(main()) File "/mnt/data/circos/vcf2circos-master/vcf2circos/main.py", line 119, in main js = Datafactory(input_file, options).plot_dict() File "/mnt/data/circos/vcf2circos-master/vcf2circos/datafactory.py", line 25, in plot_dict pc = Plotconfig( File "/mnt/data/circos/vcf2circos-master/vcf2circos/plotcategories/plotconfig.py", line 100, in init self.data = self.process_vcf() File "/mnt/data/circos/vcf2circos-master/vcf2circos/utils.py", line 481, in timeit_wrapper result = func(*args, **kwargs) File "/mnt/data/circos/vcf2circos-master/vcf2circos/plotcategories/plotconfig.py", line 157, in process_vcf if self.get_copynumber_type(record)[0] in ["BND"]: File "/mnt/data/circos/vcf2circos-master/vcf2circos/plotcategories/plotconfig.py", line 247, in get_copynumber_type self.get_copynumber_values(cast_svtype(svtype), record), File "/mnt/data/circos/vcf2circos-master/vcf2circos/plotcategories/plotconfig.py", line 300, in get_copynumber_values genotype = record.samples[0].data.GT AttributeError: 'CallData' object has no attribute 'GT'

image

this is how my vcf looks

JbaptisteLam commented 1 year ago

Hi, Sorry for the delay, Do you have a genotype GT in your sample column ? regarding the issue it seems to be that, don't forget to match metadata in the header too because PyVCF3 ( python lib which read vcf) take into account the dtype and some other informations,

Best,

JB

tomgutman commented 2 months ago

Hi,

Is there a way to run vcf2circos with VCF files that don't have GT field ? (I am working with vcf from NanomonSV which don't provide this information)

Thanks ! Tom

JbaptisteLam commented 2 months ago

Hi, Unfortunately the only way to do so is to add a fictive genotype for all your variants, Simply add FORMAT column with GT and Sample column with 0/1 on all variants,

Best,

Jean-Baptiste