Tool:CuteVcf : A Qt application to view VCF file
1
5
Entering edit mode
7.9 years ago
sacha ★ 2.4k

Hi,

I created a simple GUI to view vcf.gz file! I'm now trying to compile htslib on windows to make binary available. If you have suggestion to improve this application, please do it here

Code source available here : https://github.com/labsquare/CuteVCF

CuteVCF

htslib gui vcf tabix Qt • 3.3k views
ADD COMMENT
0
Entering edit mode

This looks great. Some questions that come to mind:

  • Is there a limit to the size of a vcf file you can load? With larger files, will everything be slow or does it use indexing/buffering/whatever?
  • Do you plan to implement some filtering options?
ADD REPLY
0
Entering edit mode
  • I don't limit the size actually. It works with htslib so it uses an index file (test.vcf.gz.tbi) . That means you can open a huge file and select a region : chr1:1-10000 for exemple. If you try to show many variants in the same view ( > 10000000), it could be a problem. I m thinking about that. Maybe it can load data when the view scroll down..

    • Yes, I plan to add filtering but only on the current view.
ADD REPLY
0
Entering edit mode

Following the instructions for compiling on https://github.com/labsquare/CuteVCF I get the following error while running make:

make[1]: Entering directory '/home/wdecoster/Downloads/CuteVCF/htslib'
make[1]: *** No targets specified and no makefile found.  Stop.
make[1]: Leaving directory '/home/wdecoster/Downloads/CuteVCF/htslib'
Makefile:470: recipe for target '/home/wdecoster/Downloads/CuteVCF/htslib/libhts.so' failed
make: *** [/home/wdecoster/Downloads/CuteVCF/htslib/libhts.so] Error 2
ADD REPLY
1
Entering edit mode

Probably because you clone only the repository without htslib. Do it recursive :

    git clone --recursive https://github.com/labsquare/CuteVCF.git
    qmake ; make
ADD REPLY
0
Entering edit mode

Right, that did the trick. Probably another rookie mistake, but while running make I come across the following error message:

g++ -c -pipe -O2 -std=gnu++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG_OUTPUT -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -I. -Ihtslib -IQFontIcon -I../../anaconda3/include/qt -I../../anaconda3/include/qt/QtWidgets -I../../anaconda3/include/qt/QtGui -I../../anaconda3/include/qt/QtConcurrent -I../../anaconda3/include/qt/QtCore -I. -I../../anaconda3/mkspecs/linux-g++ -o qfonticon.o QFontIcon/qfonticon.cpp
g++ -c -pipe -O2 -std=gnu++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG_OUTPUT -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -I. -Ihtslib -IQFontIcon -I../../anaconda3/include/qt -I../../anaconda3/include/qt/QtWidgets -I../../anaconda3/include/qt/QtGui -I../../anaconda3/include/qt/QtConcurrent -I../../anaconda3/include/qt/QtCore -I. -I../../anaconda3/mkspecs/linux-g++ -o aboutdialog.o aboutdialog.cpp
In file included from ../../anaconda3/include/qt/QtGui/qopenglcontext.h:54:0,
                 from ../../anaconda3/include/qt/QtGui/QtGui:32,
                 from ../../anaconda3/include/qt/QtWidgets/QtWidgetsDepends:4,
                 from ../../anaconda3/include/qt/QtWidgets/QtWidgets:3,
                 from aboutdialog.h:22,
                 from aboutdialog.cpp:20:
../../anaconda3/include/qt/QtGui/qopengl.h:120:21: fatal error: GL/gl.h: No such file or directory
compilation terminated.
Makefile:4024: recipe for target 'aboutdialog.o' failed
make: *** [aboutdialog.o] Error 1

I'm not sure why those qt files are in the anaconda3 folder (which is a python distribution).

ADD REPLY
1
Entering edit mode

Ah yes. You are using Qt from website. You need to install GL libraries . Sorry for that

 sudo apt-get install libgl1-mesa-dev

OR

 sudo apt-get install mesa-common-dev
ADD REPLY
0
Entering edit mode

Thanks, that indeed fixed that issue. But here is another one:

g++ -c -pipe -O2 -std=gnu++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG_OUTPUT -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -I. -Ihtslib -IQFontIcon -I../../anaconda3/include/qt -I../../anaconda3/include/qt/QtWidgets -I../../anaconda3/include/qt/QtGui -I../../anaconda3/include/qt/QtConcurrent -I../../anaconda3/include/qt/QtCore -I. -I../../anaconda3/mkspecs/linux-g++ -o moc_vcfmodel.o moc_vcfmodel.cpp
g++ -Wl,-O1 -Wl,-rpath,/home/wdecoster/anaconda3/lib -o CuteVCF qfonticon.o aboutdialog.o createindexdialog.o infowidget.o mainwindow.o main.o qtabix.o samplewidget.o vcfheader.o vcfline.o vcfmodel.o qrc_files.o moc_qfonticon.o moc_aboutdialog.o moc_createindexdialog.o moc_infowidget.o moc_mainwindow.o moc_samplewidget.o moc_vcfmodel.o   -L/home/wdecoster/Downloads/CuteVCF/htslib -lhts -L/home/wdecoster/anaconda3/lib -lQt5Widgets -lQt5Gui -lQt5Concurrent -lQt5Core -lGL -lpthread 
qtabix.o: In function `QTabix::buildIndex(QString const&)':
qtabix.cpp:(.text+0x313): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)'
qtabix.o: In function `QTabix::open()':
qtabix.cpp:(.text+0x703): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)'
qtabix.cpp:(.text+0x763): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)'
qtabix.cpp:(.text+0x7a3): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)'
qtabix.o: In function `QTabix::readInfo()':
qtabix.cpp:(.text+0x10d3): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)'
qtabix.o:qtabix.cpp:(.text+0x1113): more undefined references to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)' follow
collect2: error: ld returned 1 exit status
Makefile:219: recipe for target 'CuteVCF' failed
make: *** [CuteVCF] Error 1

Do you have a suggestion on how to fix this one?
My computer is a recent clean Ubuntu installation, so it's definitely possible that many dependencies haven't been installed yet.

ADD REPLY
0
Entering edit mode

Did you see htslib compilation? Check inside htslib folder. And type make from in.

ADD REPLY
0
Entering edit mode

htslib folder looks okay, running make results in make: Nothing to be done for 'all'.

Contents of the folder:

bgzf.c        cram         hfile_internal.h  htsfile.1       hts.pico       kstring.o     md5.pico        README       sam.c                   tabix.o         thread_pool_internal.h  vcf_sweep.pico
bgzf.o        errmod.c     hfile_libcurl.c   htsfile.c       INSTALL        kstring.pico  multipart.c     README.md    sam.o                   tbx.c           thread_pool.o           vcfutils.c
bgzf.pico     errmod.o     hfile_net.c       htsfile.o       kfunc.c        libhts.a      multipart.o     realn.c      sam.pico                tbx.o           thread_pool.pico        vcfutils.o
bgzip         errmod.pico  hfile_net.o       hts_internal.h  kfunc.o        libhts.so     multipart.pico  realn.o      synced_bcf_reader.c     tbx.pico        vcf.5                   vcfutils.pico
bgzip.c       faidx.5      hfile_net.pico    htslib          kfunc.pico     libhts.so.2   NEWS            realn.pico   synced_bcf_reader.o     test            vcf.c                   version.h
bgzip.o       faidx.c      hfile.o           htslib.mk       knetfile.c     LICENSE       plugin.c        regidx.c     synced_bcf_reader.pico  textutils.c     vcf.o
config.h      faidx.o      hfile.pico        htslib.pc.in    knetfile.o     Makefile      probaln.c       regidx.o     tabix                   textutils.o     vcf.pico
config.mk.in  faidx.pico   hts.c             htslib_vars.mk  knetfile.pico  md5.c         probaln.o       regidx.pico  tabix.1                 textutils.pico  vcf_sweep.c
configure.ac  hfile.c      htsfile           hts.o           kstring.c      md5.o         probaln.pico    sam.5        tabix.c                 thread_pool.c   vcf_sweep.o

If there is more information you need I will be happy to provide that too

ADD REPLY
0
Entering edit mode

it seems you are not using C++11.. I was thinking it's by default. let try to add : QMAKE_CXXFLAGS += -std=c++11 anywhere in the CuteVCF.pro

ADD REPLY
0
Entering edit mode

FYI, I'm using a recent Ubuntu installation (16.04 LTS), with gcc 5.4.0. I added the suggested line:

#-------------------------------------------------
#
# Project created by QtCreator 2016-12-14T15:38:24
#
#-------------------------------------------------

QT       += core gui concurrent

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

QMAKE_CXXFLAGS += -std=c++11

TARGET =  CuteVCF
TEMPLATE = app

Running make gives the following:

~/Downloads/CuteVCF$ make
g++ -Wl,-O1 -Wl,-rpath,/home/wdecoster/anaconda3/lib -o CuteVCF qfonticon.o aboutdialog.o createindexdialog.o infowidget.o mainwindow.o main.o qtabix.o samplewidget.o vcfheader.o vcfline.o vcfmodel.o qrc_files.o moc_qfonticon.o moc_aboutdialog.o moc_createindexdialog.o moc_infowidget.o moc_mainwindow.o moc_samplewidget.o moc_vcfmodel.o   -L/home/wdecoster/Downloads/CuteVCF/htslib -lhts -L/home/wdecoster/anaconda3/lib -lQt5Widgets -lQt5Gui -lQt5Concurrent -lQt5Core -lGL -lpthread 
qtabix.o: In function `QTabix::buildIndex(QString const&)':
qtabix.cpp:(.text+0x313): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)'
qtabix.o: In function `QTabix::open()':
qtabix.cpp:(.text+0x703): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)'
qtabix.cpp:(.text+0x763): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)'
qtabix.cpp:(.text+0x7a3): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)'
qtabix.o: In function `QTabix::readInfo()':
qtabix.cpp:(.text+0x10d3): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)'
qtabix.o:qtabix.cpp:(.text+0x1113): more undefined references to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)' follow
collect2: error: ld returned 1 exit status
Makefile:219: recipe for target 'CuteVCF' failed
make: *** [CuteVCF] Error 1
ADD REPLY
1
Entering edit mode

Could you add this to the github issue with the return output of "qmake --version" that you used ?

ADD REPLY
0
Entering edit mode

I added an issue with the requested information, thanks for the quick feedback.

ADD REPLY
0
Entering edit mode

I updated the documentation in https://github.com/labsquare/CuteVCF. I also add a Travis, so you can check how I compile it from travis : https://github.com/labsquare/CuteVCF/blob/master/.travis.yml

ADD REPLY
0
Entering edit mode
7.9 years ago
sacha ★ 2.4k

I release the version 0.2 of cuteRest . This one has been compiled successfully on Windows, Mac and Linux.
You can find binary for your OS :

Windows : https://github.com/labsquare/CuteVCF/releases/download/0.2.0/cutevcf-0.2-osx.dmg

Linux : https://github.com/labsquare/CuteVCF/releases/download/0.2.0/cutvcf-0.2-x86_64.AppImage

Mac: https://github.com/labsquare/CuteVCF/releases/download/0.2.0/cutevcf-0.2-osx.dmg

cute VCF 0.2 running on windows 10

ADD COMMENT
0
Entering edit mode

I will focus now on Graphics chart for the next release ! If you have suggestion , please do it !

ADD REPLY

Login before adding your answer.

Traffic: 2548 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6