nspies / svviz2

for visual evaluation of read support for structural variation
50 stars 13 forks source link

ssw not available #56

Closed frankbioinfo closed 5 years ago

frankbioinfo commented 6 years ago

Hi @nspies

Thank you for developing this tool, i tried installing this and using it with --aligner ssw very first line after execution is ssw library not found and the program quits with this error NameError: name 'ssw_wrap' is not defined , what surprises me is svviz (not svviz2) works fine which i believe also uses ssw.

Wondering what am i missing to install.

Thanks Frank

nspies commented 6 years ago

Hrm, let me look into this. You're right, installing ssw using svviz1 should be sufficient for supplying this to svviz2.

nspies commented 6 years ago

Sorry for the delay in checking on this.

I've been able to get svviz2 to use ssw without any problems in a fresh virtualenv by running pip3 install svviz prior to running svviz2 --aligner ssw. Perhaps try uninstalling both packages and reinstalling? If that doesn't work, I'll need some more information about what you've tried, including your OS and the commands you're using to install the package (pip, virtualenv, etc).

nspies commented 6 years ago

PS I think the bwa aligner is likely to be better than ssw in most, if not all, cases, though the best way to verify this in your particular use case would be to run svviz2 with both options and compare the results.

frankbioinfo commented 6 years ago

Hi @nspies , Sorry for delayed response i am trying to build a docker container using this code

Svviz2 docker image

FROM conda/miniconda3

RUN apt-get update -y && apt-get install -y --no-install-recommends \
    build-essential libpq-dev libjpeg-dev libxml2-dev libxslt-dev libfreetype6-dev libffi-dev \
    make bzip2 libbz2-dev ncurses-dev gcc git curl wget inkscape

#RUN python -m pip install --upgrade setuptools  \
#RUN python pip install pysam
#pip3 install -U git+git://git@github.com/nspies/svviz2.git
#RUN python
#RUN pip install -U git+git://git@github.com/nspies/svviz2.git
WORKDIR /docker_main

#RUN python -m pip install --upgrade setuptools
RUN pip install pysam==0.14.1
RUN wget http://tandem.bu.edu/trf/downloads/trf409.linux64 && \
    mv trf409.linux64 trf

#install bwa
WORKDIR /docker_main
RUN wget -q https://github.com/lh3/bwa/releases/download/v0.7.15/bwa-0.7.15.tar.bz2 && \
    tar -xf bwa-0.7.15.tar.bz2 && \
    cd bwa-0.7.15 && \
    make && \
    cp -p bwa /usr/bin

#install samtools
WORKDIR /docker_main
RUN wget https://github.com/samtools/samtools/releases/download/1.4/samtools-1.4.tar.bz2 && \
    tar -jxf samtools-1.4.tar.bz2 && \
    cd samtools-1.4 && \
    make && \
    make install && \
    cp samtools /usr/bin/

#RUN pip install -U git+git://git@github.com/nspies/svviz2.git
RUN python -m pip install git+https://github.com/nspies/svviz2.git
RUN apt-get update && apt-get install -y libnss-sss && apt-get clean all

svviz1 docker container in which ssw works

FROM conda/miniconda2

RUN apt-get update -y && apt-get install -y --no-install-recommends \
    build-essential libpq-dev libjpeg-dev libxml2-dev libxslt-dev libfreetype6-dev libffi-dev \
    gcc git curl wget inkscape

#RUN python -m pip install --upgrade setuptools  \
#RUN python pip install pysam
#pip3 install -U git+git://git@github.com/nspies/svviz2.git
#RUN python
#RUN pip install -U git+git://git@github.com/nspies/svviz2.git
WORKDIR /docker_main

#RUN python -m pip install --upgrade setuptools
RUN pip install pysam==0.14.1
RUN pip install svviz
#RUN pip install -U git+git://git@github.com/nspies/svviz2.git
#RUN python -m pip install git+https://github.com/nspies/svviz.git
RUN apt-get update && apt-get install -y libnss-sss && apt-get clean all
nspies commented 6 years ago

Ah, thanks for the clarification. Because ssw is optional for svviz2, installing svviz2 doesn’t result in ssw being installed. The easiest way to install ssw is to install svviz1 into the same docker where you’re installing and running svviz2.

On Oct 8, 2018, at 5:26 PM, frankbioinfo notifications@github.com wrote:

Hi @nspies , Sorry for delayed response i am trying to build a docker container using this code

Svviz2 docker image

FROM conda/miniconda3

RUN apt-get update -y && apt-get install -y --no-install-recommends \ build-essential libpq-dev libjpeg-dev libxml2-dev libxslt-dev libfreetype6-dev libffi-dev \ make bzip2 libbz2-dev ncurses-dev gcc git curl wget inkscape

RUN python -m pip install --upgrade setuptools \

RUN python pip install pysam

pip3 install -U git+git://git@github.com/nspies/svviz2.git

RUN python

RUN pip install -U git+git://git@github.com/nspies/svviz2.git

WORKDIR /docker_main

RUN python -m pip install --upgrade setuptools

RUN pip install pysam==0.14.1 RUN wget http://tandem.bu.edu/trf/downloads/trf409.linux64 && \ mv trf409.linux64 trf

install bwa

WORKDIR /docker_main RUN wget -q https://github.com/lh3/bwa/releases/download/v0.7.15/bwa-0.7.15.tar.bz2 && \ tar -xf bwa-0.7.15.tar.bz2 && \ cd bwa-0.7.15 && \ make && \ cp -p bwa /usr/bin

install samtools

WORKDIR /docker_main RUN wget https://github.com/samtools/samtools/releases/download/1.4/samtools-1.4.tar.bz2 && \ tar -jxf samtools-1.4.tar.bz2 && \ cd samtools-1.4 && \ make && \ make install && \ cp samtools /usr/bin/

RUN pip install -U git+git://git@github.com/nspies/svviz2.git

RUN python -m pip install git+https://github.com/nspies/svviz2.git RUN apt-get update && apt-get install -y libnss-sss && apt-get clean all

svviz1 docker container in which ssw works

FROM conda/miniconda2

RUN apt-get update -y && apt-get install -y --no-install-recommends \ build-essential libpq-dev libjpeg-dev libxml2-dev libxslt-dev libfreetype6-dev libffi-dev \ gcc git curl wget inkscape

RUN python -m pip install --upgrade setuptools \

RUN python pip install pysam

pip3 install -U git+git://git@github.com/nspies/svviz2.git

RUN python

RUN pip install -U git+git://git@github.com/nspies/svviz2.git

WORKDIR /docker_main

RUN python -m pip install --upgrade setuptools

RUN pip install pysam==0.14.1 RUN pip install svviz

RUN pip install -U git+git://git@github.com/nspies/svviz2.git

RUN python -m pip install git+https://github.com/nspies/svviz.git

RUN apt-get update && apt-get install -y libnss-sss && apt-get clean all

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

frankbioinfo commented 6 years ago

@nspies sorry to report back that adding both versions in same docker did not fix the issue, just noticed you cannot load ssw too, looked at the readme.md (usage) snapshot for svviz2, also keep seeing this error should i open this as new issue?

Any thoughts..

2018-10-29 17:34:11 - svviz2.app.sample         - INFO  - Calculating read statistics for try1.bam
2018-10-29 17:39:39 - svviz2.io.readstatistics  - INFO  -   counts +/-:0      -/+:0      +/+:0      -/-:0      unpaired:0
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/svviz2/app/sample.py", line 65, in _load
    with open(stats_file_path) as inf:
FileNotFoundError: [Errno 2] No such file or directory: '/svviz2_out/try1.bam.svviz_stats'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/svviz2", line 11, in <module>
    load_entry_point('svviz2==2.0a3', 'console_scripts', 'svviz2')()
  File "/usr/local/lib/python3.6/site-packages/svviz2/app/main.py", line 59, in main
    datahub = get_datahub()
  File "/usr/local/lib/python3.6/site-packages/svviz2/app/main.py", line 21, in get_datahub
    datahub.set_args(args)
  File "/usr/local/lib/python3.6/site-packages/svviz2/app/datahub.py", line 268, in set_args
    sample = Sample(name, bam_path, self, extra_args)
  File "/usr/local/lib/python3.6/site-packages/svviz2/app/sample.py", line 57, in __init__
    self._load(extra_args)
  File "/usr/local/lib/python3.6/site-packages/svviz2/app/sample.py", line 78, in _load
    self._load_from_bam(extra_args)
  File "/usr/local/lib/python3.6/site-packages/svviz2/app/sample.py", line 97, in _load_from_bam
    self.read_statistics = ReadStatistics(self.bam)
  File "/usr/local/lib/python3.6/site-packages/svviz2/io/readstatistics.py", line 30, in __init__
    results = sampleInsertSizes(bam)
  File "/usr/local/lib/python3.6/site-packages/svviz2/io/readstatistics.py", line 279, in sampleInsertSizes
    chosenOrientations = chooseOrientation(orientations)
  File "/usr/local/lib/python3.6/site-packages/svviz2/io/readstatistics.py", line 154, in chooseOrientation
    chosenOrientations = [ranked.pop()]
IndexError: pop from empty list

Many thanks

frankbioinfo commented 5 years ago

Installing svviz1 in the same image helped thanks.