PanGraphViewer -- show panenome graph in an easy way
Table of Contents
Versions and dependences
Here we provide two application versions:
● Desktop-based application
● Web browser-based application
Overall, Python3 is needed to run this software and we highly recommend using miniconda3
to install all python3
libraries.
● On Windows system, you can download miniconda3 at
https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe
● On macOS system, you can download miniconda3 at
https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
● On Linux system, you can download miniconda3 at
https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
After the installation of miniconda3
, you can follow the steps below to ensure panGraphViewer
can be executed.
Desktop-based panGraphViewer
Library installation for the desktop-based version
Steps on different systems
-
If you use
Windows
system, you may need to find or searchAnaconda Powershell Prompt (miniconda3)
first and then open it. -
If you use
macOS
orLinux
system, you may openTerminal
first and then type the command line below$ export PATH=/full/path/to/miniconda3/bin:$PATH # modify the path based on your ENV
After the steps above, you can install the python3
libraries by typing:
conda config --add channels conda-forge
conda config --add channels bioconda
conda install pyqt pyqtwebengine configparser pandas bokeh==2.2.3 dna_features_viewer natsort attrdict networkx
If you use pip
, you can install the python3
libraries like:
pip install PyQt5 PyQtWebEngine configparser pandas bokeh==2.2.3 dna_features_viewer natsort attrdict networkx
or you can use pip
to install like (need to go to the panGraphViewerApp
directory first)
pip install -r requirement.txt ## On Linux or macOS system
pip install -r requirement_windows.txt ## On Windows system
Note:
-
On
Linux
ormacOS
system,pysam
is needed. You may install this package using$ conda install pysam
-
On
Windows
platforms, aspysam
is not available, we use a windows-versionsamtools
package instead. Additional libraries below are needed and can be installed using> conda install m2-base pyfaidx
Start the desktop-based version
-
On
Linux
ormacOS
system, you may use the command line below inTerminal
to open the software.$ cd /full/path/to/panGraphViewer/panGraphViewerApp # modify the path based on your ENV $ python panGraphViewerApp.py
-
On
Windows
system, you may search and openAnaconda Prompt (miniconda3)
first and then move to thepanGraphViewer
directory. For example, if you have putpanGraphViewer
on yourDesktop
and the openedAnaconda Prompt (miniconda3)
is in yourC
drive, you may use the command line below to start the program:> cd C:\Users\%USERNAME%\Desktop\panGraphViewer\panGraphViewerApp > python panGraphViewerApp.py
If you have put
panGraphViewer
on other drive, you may need to move to the target drive first. For instance, the target drive isD
, you can move to the drive by typing D: inAnaconda Prompt (miniconda3)
and then move to thepanGraphViewer
directory to executepanGraphViewerApp.py
.Please NOTE that on
Windows
system, you need to use backslash\
rather than the common slash/
to move to the target directory. -
The logging information will show in
Anaconda Prompt (miniconda3)
orTerminal
depending on the system you use (Will be good for you to monitor the status of the application).
Web-based panGraphViewer
To meet different requirments, we have also created a web-based panGraphViewer
. Basically, most functions provided in the Desktop-based
version have been implemented in the Web browser-based
version. Users can install this version locally or directly deploy this online. The web browser-based
verison offers administrative functions to help create accounts for different users.
Library installation for the web-based version
Depending on the systems used, users can use pip
directly to install the needed python3
libraries after moving to the panGraphViewerWeb
directory.
pip install -r requirement.txt ## On Linux or macOS system
pip install -r requirement_windows.txt ## On Windows system
As mentioned in the desktop-based
version, pysam
cannot be installed on Windows
systems, users need to install alternatives on Windows
by using
> conda install m2-base pyfaidx
For Linux
or macOS
users, pysam
can be installed directly using
$ conda install pysam
Start the web-based version
After the installation above, users can move to the panGraphViewerWeb
directory by referring to the steps mentioned in the desktop
version through Terminal
or Anaconda Prompt (miniconda3)
.
Note that the folder needed here is panGraphViewerWeb.
Once moving to the panGraphViewerWeb
directory, users can start the application by typing
python manage.py runserver ## on local machine the IPaddress can be: localhost:8004
or users can use the CMD
below to start the Web browser-based
version
$ bash run.sh ## On linux or macOS system.
> run.bat ## On Windows system
Note: the IP 0.0.0.0 in run.sh
can be modified accordingly
Once the words Starting development server at http://localhost:8004/
or similar infomation is shown, user can open a browser to open the web-based panGraphViewer
.
The admin page is http://localhost:8004/admin
and the inital admin info is:
Account: admin
password: abcd1234
Note: please use the go back button provided by the web browser to move back rather than directly clicking the corresponding functions in the web page to perform analyses.
The Files needed in the application
The rGFA file
-
If you have multiple high-quality genome assemblies from different individuals, you may use minigraph (
Linux
preferred) to generate a reference GFA (rGFA
) file.Before the running, the header of the fasta file needs modifying. For example, if you have a fasta file from Sample1 with a header like:
>chr1 AAAAAGCCGCGCGCGCTTGCGC
You may modify the header to:
>Sample1||chr1 AAAAAGCCGCGCGCGCTTGCGC
On
/>${sample}||/g" $fasta > ${name}.headerModified.fasta ">Linux
, the command lines that can be used to achieve this are:$ sample="" ## the name of the sample. For instance: Sample1 $ fasta="" ## full path to the fasta file $ name=`echo $fasta | rev | cut -d"." -f2-| rev` $ sed -e "s/>/>${sample}||/g" $fasta > ${name}.headerModified.fasta