Skip to content

Commit 422f5a3

Browse files
Merge pull request #68 from compbiocore/develop
Develop
2 parents 0c73bbd + 5922826 commit 422f5a3

File tree

6 files changed

+57
-58
lines changed

6 files changed

+57
-58
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
Manifest.toml
99
docs/build
1010
docs/site
11+
build.log

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "VariantVisualization"
22
uuid = "7f8bf45c-0ad5-53b5-97e6-33c1305e0aa4"
33
authors = ["George Tollefson <[email protected]>"]
4-
version = "0.3.9"
4+
version = "0.4.0"
55

66
[deps]
77
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"

deps/build.jl

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
function get_executable_path(package::AbstractString, exec::AbstractString)
2+
base_path = Base.find_package(package)
3+
sep = joinpath("src", "$package.jl")
4+
exec_path = joinpath(split(base_path, sep)[1], exec)
5+
6+
return exec_path
7+
end
8+
9+
function symlink_user_bin(path_::AbstractString)
10+
exec = splitdir(path_)[end]
11+
if Sys.iswindows()
12+
bin_path = split(path_, "\\$exec")[1]
13+
@warn bin_path
14+
run(`setx path "%path%;$bin_path"`)
15+
else
16+
symlink(path_, "/usr/local/bin/$exec")
17+
@warn "Created symlink: /usr/local/bin/viva -> $path_"
18+
end
19+
end
20+
21+
path_ = get_executable_path("VariantVisualization", "viva")
22+
symlink_user_bin(path_)

docs/src/installation.md

Lines changed: 33 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,33 @@ To install VariantVisualization.jl:
3535

3636
```julia
3737
julia
38-
]
39-
add VariantVisualization
38+
]add VarianatVisualization
4039
exit()
4140
```
41+
### Step 3: Run `viva`
4242

43+
#### Mac and Linux
4344

44-
### Step 3: Install the VIVA command line script
45+
On Mac and Linux, open another terminal window, navigate to your project folder and run:
4546

46-
Download the VIVA tool script and save it to a working directory for your analysis. Save your VCF file in the working directory.
47+
```shell
48+
viva -f filename.vcf -s <format> -o output/directory/
49+
```
50+
51+
#### Windows
4752

48-
Copy and paste the following block of code into the command line or PowerShell:
53+
!!! Warning
54+
Viva will not work with Win32.
55+
56+
On windows, after installing VariantVisualization, open a new PowerShell and run:
57+
```shell
58+
viva -f filename.vcf -s <format> -o output/directory/
59+
```
4960

50-
>mkdir new_folder/
61+
You'll then be prompted to select an application to open the script. Select the Julia executable, that is normally located
62+
at `C:\Users\<username>\AppData\Local\Julia-<version>\bin\`.
5163

52-
>cd new_folder/
5364

54-
>curl -L https://raw.githubusercontent.com/compbiocore/VariantVisualization.jl/master/viva > viva
5565

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

@@ -66,20 +76,19 @@ Then, follow the in-notebook instructions to generate your plots.
6676

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

69-
from the Julia REPL (useful if using the PowerShell and don't have git installed):
79+
From the Julia REPL:
7080

71-
```julia
72-
]
73-
add VariantVisualization#master
81+
```shell
82+
julia
83+
]add VariantVisualization#master
7484
```
7585

7686
### For Developers
7787

78-
To add VariantVisualization in develop mode:
79-
80-
```julia
81-
]
82-
dev VariantVisualization
88+
Install VariantVisualization in development mode:
89+
```shell
90+
julia
91+
]dev VariantVisualization
8392
```
8493

8594
VIVA Jupyter notebook and the VIVA the command line tool are built with functions contained in our VariantVisualization.jl package.
@@ -118,32 +127,31 @@ mkdir project_x
118127
cd project_x
119128
```
120129

121-
Make sure to add your project VCF files to that folder. That directory will be mapped to `/notebook/data` inside of the container.
130+
Make sure to add your project VCF files to that folder.
122131

123-
When entering the filename of the VCF file and files to support filtering options, you should include `/data/...` in the path to your files.
124132

125133
##### Run the VIVA Command Line Tool from a Docker image:
126134

127135
*Note*: Remember, you must use the flag `--save_remotely` when running VIVA by using Docker.
128136

129137
- On Mac or Linux:
130138
```shell
131-
docker run -it --rm -v "$PWD":/data compbiocore/viva-cli:v0.3.9 /script/viva --save_remotely -f file.vcg -s pdf -o /data [...args]
139+
docker run -it --rm -v "$PWD":/data compbiocore/viva-cli viva --save_remotely -f file.vcf -s pdf -o output
132140
```
133141

134142
- Example run:
135143
```shell
136-
docker run -it --rm -v "$PWD":/data compbiocore/viva-cli:v0.3.9 /script/viva --save_remotely -f file.vcf -s pdf -o /data [...args]
144+
docker run -it --rm -v "$PWD":/data compbiocore/viva-cli viva --save_remotely -f file.vcf -s pdf -o output
137145
```
138146

139147
- On Windows:
140148
```shell
141-
docker run -it --rm -v "${pwd}":/data compbiocore/viva-cli:v0.3.9 /script/viva --save_remotely -f file.vcf -s pdf -o /data [...args]
149+
docker run -it --rm -v "${pwd}":/data compbiocore/viva-cli viva --save_remotely -f file.vcf -s pdf -o output
142150
```
143151

144152
- Example run:
145153
```shell
146-
docker run -it --rm -v "${pwd}":/data compbiocore/viva-cli:v0.3.9 /script/viva --save_remotely -f file.vcf -s pdf -o /data [...args]
154+
docker run -it --rm -v "${pwd}":/data compbiocore/viva-cli viva --save_remotely -f file.vcf -s pdf -o output
147155
```
148156

149157
##### Run the VIVA Jupyter Notebook from a Docker image:
@@ -157,7 +165,7 @@ docker run --rm -p 8888:8888 -e JUPYTER_ENABLE_LAB=yes -v "$PWD":/home/jovyan/no
157165

158166
Go to the following url in your internet browser. You'll receive a token to enter into the url.
159167

160-
Go to `http://0.0.0.0:8888/?token=<enter token here>`
168+
Go to `http://127.0.0.1:8888/?token=<enter token here>`
161169

162170
- On Windows:
163171
```shell
@@ -166,24 +174,9 @@ docker run --rm -p 8888:8888 -e JUPYTER_ENABLE_LAB=yes -v "${pwd}":/home/jovyan/
166174

167175
Go to the following url in your internet browser. You'll receive a token to enter into the url.
168176

169-
Go to `http://0.0.0.0:8888/?token=<enter token here>`
177+
Go to `http://127.0.0.1:8888/?token=<enter token here>`
170178

171179
[Click here](https://jupyter-docker-stacks.readthedocs.io/en/latest/index.html) for more information about Jupyter Docker Images.
172180

173-
#### Using Docker Compose
174-
175-
To run the images with Docker Compose, install Docker following the steps above and then install [Docker Compose[(https://docs.docker.com/compose/). Then copy the [docker-compose.yml](https://github.com/compbiocore/viva-docker/blob/master/docker-compose.yml) file to a local directory. From that same directory, run the command as it appears below.
176-
177-
*Note*: Your current directory will mount to `/notebook/data` in the notebook image and to `/data` in the CLI image.
178-
179-
- Notebook
180-
```shell
181-
docker-compose up viva-notebook
182-
```
183-
184-
- Command Line Tool
185-
```shell
186-
docker-compose run viva -f file.vcf --save_remotely arg3 arg4 ...
187-
```
188181

189182
-----

src/VariantVisualization.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,5 @@ export
7272
include("vcf_utils_complete.jl")
7373
include("plot_utils.jl")
7474
include("new_notebook_utils.jl")
75-
include("init.jl")
7675

7776
end # module

src/init.jl

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)