AndersenLab / VCF-kit

VCF-kit: Assorted utilities for the variant call format
http://www.andersenlab.org
MIT License
122 stars 25 forks source link

vk phylo bug #4

Closed pthiru closed 7 years ago

pthiru commented 7 years ago

Hi,

vk phylo tree nj --plot all_variants.vcf gave the following error,

Traceback (most recent call last): File "/home/prat/vcf-env/local/lib/python2.7/site-packages/vcfkit/phylo.py", line 84, in main() File "/home/prat/vcf-env/local/lib/python2.7/site-packages/vcfkit/phylo.py", line 74, in main tree_template = Template(open(_ROOT + "/static/tree.html", 'r').read()) IOError: [Errno 2] No such file or directory: '/home/prat/vcf-env/lib/python2.7/site-packages/static/tree.html'

danielecook commented 7 years ago

Hi @pthiru pthiru, can you run vk --version and let me know what the output is?

danielecook commented 7 years ago

Also can you run the following and tell me what the output is?

ls /home/prat/vcf-env/lib/python2.7/site-packages/static/

pthiru commented 7 years ago

Hi Daniel,

vk --version 0.0.8

/home/prat/vcf-env/lib/python2.7/site-packages/static/ no such dir

danielecook commented 7 years ago

@pthiru - I believe I have fixed this with f6da9ac5ad911942d00b53716ad30de1427541b6. Please update and let me know if it works for you! Thank you.

pthiru commented 7 years ago

Hi @danielecook, I still get an error. It did print the newick tree so I'm all set.
vk phylo tree nj --plot all_variants.vcf

    Generating Fasta

    Generating neighborjoining Tree

MUSCLE v3.8.31 by Robert C. Edgar

http://www.drive5.com/muscle
This software is donated to the public domain.
Please cite: Edgar, R.C. Nucleic Acids Res 32(5), 1792-97.

00:00:00     22 MB(4%)  5 sequences
00:00:00     22 MB(4%)  Iter   0  100.00%  Build dist matrix
00:00:00     22 MB(4%)  Iter   0  100.00%  Build guide tree
00:00:00     22 MB(4%)  Tree created
(
(
(
(
TAAGGC:0.0105658
,
CGTACT:0.0114015
):0.00393561
,
TCCTGA:0.0106865
):0.000908596
,
AGGCAG:0.0132971
):0.00491836
,
GGACTC:0.00491836
)
;

Traceback (most recent call last):
  File "/home/prat/vcf-env/local/lib/python2.7/site-packages/vcfkit/phylo.py", line 95, in <module>
    main()
  File "/home/prat/vcf-env/local/lib/python2.7/site-packages/vcfkit/phylo.py", line 85, in main
    template = open(prefix + "/tree.html",'r').read()
IOError: [Errno 2] No such file or directory: '/home/prat/vcf-env/local/lib/python2.7/site-packages/vcfkit/static/tree.html'
danielecook commented 7 years ago

hmmm, it's probably due to the fact you are using a virtual environment. I'll play around with it some more and see if I can figure it out.

pthiru commented 7 years ago

Thanks! Is there documentation for vk phylo?

danielecook commented 7 years ago

http://vcf-kit.readthedocs.io/en/latest/phylo/

There is an R script there too.

danielecook commented 7 years ago

Please let me know if anything is not clear! Thanks

hkeward commented 5 years ago

Same error here - I'm working in a Docker container. Any updates to allow this to work in a virtual environment?

danielecook commented 5 years ago

@hkeward i'm not sure that you can plot the phylogeny within a docker container b/c it requires opening a web browser. I think you will have an easier time using the script on the documentation page.