Skip to content

Commit f31b054

Browse files
Merge pull request #65 from compbiocore/develop
VIVA.ipynb
2 parents 88de611 + 6aaf6b9 commit f31b054

File tree

7 files changed

+179
-9112
lines changed

7 files changed

+179
-9112
lines changed

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
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Expected Time for Installation: Installation time depends on your network bandwi
5454

5555
### Running VIVA with Docker or Docker Compose
5656

57-
Alternatively, you can run VIVA using the Docker images we've provided if you don't want to install Julia and the VariantVisualization.jl Julia package.
57+
Alternatively, you can run VIVA using the Docker images we've provided if you don't want to install Julia and the VariantVisualization.jl Julia package. You may only save images to HTML format using the Docker, for now, due to technical limitations of dependency packages. We've actively developing a feature to save to all formats using Docker.
5858

5959
To run VIVA from a Docker image, first [install Docker](https://docs.docker.com/install/).
6060

@@ -78,6 +78,8 @@ cd project_x
7878

7979
Make sure to add your project VCF files to that folder. That directory will be mapped to `/notebook/data` inside of the container.
8080

81+
When entering the filename of the VCF file and files to support filtering options, you should include `/data/...` in the path to your files.
82+
8183
##### Run the VIVA Command Line Tool from a Docker image:
8284

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

VIVA.ipynb

Lines changed: 70 additions & 9098 deletions
Large diffs are not rendered by default.

docs/src/index.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,98 @@ Use the following steps to use the VIVA Jupyter Notebook utility:
8080

8181
6. Follow the step-by-step instructions within the notebook to generate your figures.
8282

83+
### Running VIVA with Docker or Docker Compose
84+
85+
Alternatively, you can run VIVA using the Docker images we've provided if you don't want to install Julia and the VariantVisualization.jl Julia package. You may only save images to HTML format using the Docker, for now, due to technical limitations of dependency packages. We've actively developing a feature to save to all formats using Docker.
86+
87+
To run VIVA from a Docker image, first [install Docker](https://docs.docker.com/install/).
88+
89+
Then double-click the Docker.app in the Applications folder to start Docker. You will see a whale icon in the top status bar to indicate that Docker is running and accessible from the terminal. You can quit Docker once you are finished using VIVA by clicking the Docker whale icon in the top status bar and clicking "Quit Docker Desktop."
90+
91+
#### Using Docker
92+
93+
*Note*: You must use the flag `--save_remotely` when running VIVA by using Docker.
94+
95+
Once Docker is running, you can run VIVA by running the Docker commands below in the Mac/Linux terminal or Windows PowerShell.
96+
97+
We provide two images, one with a Jupyter Notebook and one with a command line script for VIVA. You can run VIVA in a single command using these images. The command consists of calls to run the Docker image followed by the usual VIVA options.
98+
99+
To run the images, follow these steps:
100+
101+
Create a project folder and navigate to it:
102+
```shell
103+
mkdir project_x
104+
cd project_x
105+
```
106+
107+
Make sure to add your project VCF files to that folder. That directory will be mapped to `/notebook/data` inside of the container.
108+
109+
When entering the filename of the VCF file and files to support filtering options, you should include `/data/...` in the path to your files.
110+
111+
##### Run the VIVA Command Line Tool from a Docker image:
112+
113+
*Note*: Remember, you must use the flag `--save_remotely` when running VIVA by using Docker.
114+
115+
- On Mac or Linux:
116+
```shell
117+
docker run -it --rm -v "$PWD":/data compbiocore/viva-cli:v0.3.8 --save_remotely arg1 arg2 arg3
118+
```
119+
120+
- Example run:
121+
```shell
122+
docker run -it --rm -v "$PWD":/data compbiocore/viva-cli:v0.3.8 --save_remotely -f file.vcf -p
123+
```
124+
125+
- On Windows:
126+
```shell
127+
docker run -it --rm -v "${pwd}":/data compbiocore/viva-cli:v0.3.8 --save_remotely arg1 arg2 arg3
128+
```
129+
130+
- Example run:
131+
```shell
132+
docker run -it --rm -v "${pwd}":/data compbiocore/viva-cli:v0.3.8 --save_remotely -f file.vcf -p
133+
```
134+
135+
##### Run the VIVA Jupyter Notebook from a Docker image:
136+
137+
Copy and run the following line from the terminal or Windows PowerShell:
138+
139+
- On Mac or Linux:
140+
```shell
141+
docker run --rm -p 8888:8888 -e JUPYTER_ENABLE_LAB=yes -v "$PWD":/home/jovyan/notebook/data compbiocore/viva-notebook
142+
```
143+
144+
Go to the following url in your internet browser. You'll receive a token to enter into the url.
145+
146+
Go to `http://0.0.0.0:8888/?token=<enter token here>`
147+
148+
- On Windows:
149+
```shell
150+
docker run --rm -p 8888:8888 -e JUPYTER_ENABLE_LAB=yes -v "${pwd}":/home/jovyan/notebook/data compbiocore/viva-notebook
151+
```
152+
153+
Go to the following url in your internet browser. You'll receive a token to enter into the url.
154+
155+
Go to `http://0.0.0.0:8888/?token=<enter token here>`
156+
157+
[Click here](https://jupyter-docker-stacks.readthedocs.io/en/latest/index.html) for more information about Jupyter Docker Images.
158+
159+
#### Using Docker Compose
160+
161+
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.
162+
163+
*Note*: Your current directory will mount to `/notebook/data` in the notebook image and to `/data` in the CLI image.
164+
165+
- Notebook
166+
```shell
167+
docker-compose up viva-notebook
168+
```
169+
170+
- Command Line Tool
171+
```shell
172+
docker-compose run viva -f file.vcf --save_remotely arg3 arg4 ...
173+
```
174+
83175
## Continue reading for:
84176

85177
* [Variant and Sample Selection](https://compbiocore.github.io/VariantVisualization.jl/stable/filtering_vcf/)

docs/src/installation.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ To install Julia on Windows, you can follow the [platform specific instructions]
3737

3838
### Running VIVA with Docker or Docker Compose
3939

40-
Alternatively, you can run VIVA using the Docker images we've provided if you don't want to install Julia and the VariantVisualization.jl Julia package.
40+
Alternatively, you can run VIVA using the Docker images we've provided if you don't want to install Julia and the VariantVisualization.jl Julia package. You may only save images to HTML format using the Docker, for now, due to technical limitations of dependency packages. We've actively developing a feature to save to all formats using Docker.
4141

4242
To run VIVA from a Docker image, first [install Docker](https://docs.docker.com/install/).
4343

4444
Then double-click the Docker.app in the Applications folder to start Docker. You will see a whale icon in the top status bar to indicate that Docker is running and accessible from the terminal. You can quit Docker once you are finished using VIVA by clicking the Docker whale icon in the top status bar and clicking "Quit Docker Desktop."
4545

4646
#### Using Docker
4747

48-
*Note* You must use the flag `--save_remotely` when running VIVA by using Docker.
48+
*Note*: You must use the flag `--save_remotely` when running VIVA by using Docker.
4949

5050
Once Docker is running, you can run VIVA by running the Docker commands below in the Mac/Linux terminal or Windows PowerShell.
5151

@@ -61,28 +61,30 @@ cd project_x
6161

6262
Make sure to add your project VCF files to that folder. That directory will be mapped to `/notebook/data` inside of the container.
6363

64+
When entering the filename of the VCF file and files to support filtering options, you should include `/data/...` in the path to your files.
65+
6466
##### Run the VIVA Command Line Tool from a Docker image:
6567

66-
*Note* Remember, you must use the flag `--save_remotely` when running VIVA by using Docker.
68+
*Note*: Remember, you must use the flag `--save_remotely` when running VIVA by using Docker.
6769

6870
- On Mac or Linux:
6971
```shell
70-
docker run -it --rm -v "$PWD":/data compbiocore/viva-cli --save_remotely arg1 arg2 arg3
72+
docker run -it --rm -v "$PWD":/data compbiocore/viva-cli:v0.3.8 --save_remotely arg1 arg2 arg3
7173
```
7274

7375
- Example run:
7476
```shell
75-
docker run -it --rm -v "$PWD":/data compbiocore/viva-cli --save_remotely -f file.vcf -p
77+
docker run -it --rm -v "$PWD":/data compbiocore/viva-cli:v0.3.8 --save_remotely -f file.vcf -p
7678
```
7779

7880
- On Windows:
7981
```shell
80-
docker run -it --rm -v "${pwd}":/data compbiocore/viva-cli --save_remotely arg1 arg2 arg3
82+
docker run -it --rm -v "${pwd}":/data compbiocore/viva-cli:v0.3.8 --save_remotely arg1 arg2 arg3
8183
```
8284

8385
- Example run:
8486
```shell
85-
docker run -it --rm -v "${pwd}":/data compbiocore/viva-cli --save_remotely -f file.vcf -p
87+
docker run -it --rm -v "${pwd}":/data compbiocore/viva-cli:v0.3.8 --save_remotely -f file.vcf -p
8688
```
8789

8890
##### Run the VIVA Jupyter Notebook from a Docker image:

src/new_notebook_utils.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,13 @@ function jupyter_main(vcf_filename,saving_options,variant_filters,sample_selecti
3030
sample_names = get_sample_names(reader)
3131

3232
#store save format and create output directory if it doesn't exist yet
33-
#=
34-
save_ext = save_format
33+
34+
#save_ext = save_format
3535
VariantVisualization.checkfor_outputdirectory(output_directory)
3636
output_directory=output_directory
37-
=#
3837

3938
save_ext = save_format
40-
output_directory=output_directory
39+
#output_directory=output_directory
4140

4241
#store plot label options
4342
if occursin("true",x_axis_labels)
@@ -107,7 +106,7 @@ function jupyter_main(vcf_filename,saving_options,variant_filters,sample_selecti
107106

108107
#genomic_range
109108
if occursin("chr",genomic_range) && !occursin("true",pass_filter) && !occursin(".csv",positions_list)
110-
sub = VariantVisualization.io_chromosome_range_vcf_filter(genomic_range,vcf_filename)
109+
sub = VariantVisualization.io_genomic_range_vcf_filter(genomic_range,vcf_filename)
111110
number_rows = size(sub,1)
112111
println("Selected $number_rows variants within chromosome range: $genomic_range")
113112
heatmap_input = "range_filtered"

test/.DS_Store

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)