farhangus / Sniffles2_plot

23 stars 1 forks source link

install and run issues #4

Closed splaisan closed 10 months ago

splaisan commented 10 months ago

Please edit your install instruction to include 'seaborn' as requirement; I had to do it in my conda env to get the command execute (then I got an error message below).

The test data made it to plot but with my data it failed. The input is a fresh VCF obtained with sniffle2 (v2.2)

# inputs (vcf is indexed)
vcf=pbmm2_hg38_mappings_sv.vcf.gz
outfolder=$PWD

(sniffle2_plot) $ python3 sniffles2_plots.py -i ${vcf} -o ${outfolder}
pbmm2_hg38_mappings_sv.vcf
Traceback (most recent call last):
  File "/opt/biotools/sniffle2_plot/vcf_visulaizer.py", line 31, in <module>
    main()
  File "/opt/biotools/sniffle2_plot/vcf_visulaizer.py", line 25, in main
    if (multi_vcf_flag(input_vcf_file)):
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/biotools/sniffle2_plot/vcf_visulaizer.py", line 17, in multi_vcf_flag
    for line in f:
  File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte

thanks in advance for your help

farhangus commented 10 months ago

Thank you for your message. Seaborn has been added as one of the required packages to the README. Currently, the program does not accept zip files; however, you can use the normal VCF file format. I will update you as soon as we add support for gzipped (gz) files as well.

splaisan commented 10 months ago

thanks a lot @farhangus, I did. not realise it had to do with my vcf being compressed. it now worked like a charm If not too much work, maybe you could also pack the pictures into a self contained html report with a minimum of legends like deepvariant does, it would make it a nice addition for SVs very useful tool (maybe add to the readme that the VCF should be pain text!)