You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+207-1Lines changed: 207 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,211 @@ nextflow self-update
51
51
52
52
# Usage
53
53
54
-
## Recommended: running remote from GitHub
54
+
55
+
## Provisioning a Virtual Machine in Google Cloud
56
+
You can create a virtual machine from the existing template: [nemascan-test-vm](https://console.cloud.google.com/compute/instanceTemplates/list?project=andersen-lab).
57
+
58
+
Click on **Actions** -> **Create VM**
59
+
60
+
Scroll to the bottom of the page and click **'Create'**
61
+
62
+
Once the VM has been created, it should appear in the [list](https://console.cloud.google.com/compute/instances?project=andersen-lab).
63
+
64
+
**Remember to Stop the VM and Delete it when you are done to avoid excess charges!!!**
65
+
66
+
Click on 'SSH' to connect.
67
+
68
+
Switch to the root user and install some required packages:
69
+
```
70
+
sudo su
71
+
apt-get install docker.io git nano
72
+
```
73
+
74
+
75
+
## Using NemaScan Nextflow container
76
+
Provision a virtual machine from the existing template and connect with SSH, then switch to the root user and install the required packages:
77
+
```
78
+
sudo su
79
+
apt-get install docker.io git nano
80
+
```
81
+
82
+
To start a terminal session inside of the container, use:
83
+
```
84
+
docker run -i -t andersenlab/nemascan-nxf /bin/bash
85
+
```
86
+
87
+
Once you are done, exit the container with Ctrl-C or use:
88
+
```
89
+
exit
90
+
```
91
+
92
+
**Remember to Stop the VM and Delete it when you are done to avoid excess charges!!!**
93
+
94
+
95
+
## Running NemaScan Nextflow container (this is what CeNDR does)
96
+
To reproduce the details of a pipeline exactly, you can use the containerized version of the tool set to a specific release version.
97
+
Provision a virtual machine from the existing template and connect with SSH, then switch to the root user and install the required packages:
98
+
```
99
+
sudo su
100
+
apt-get install docker.io git nano
101
+
```
102
+
103
+
Use 'nano' to create a *.env file (see: example.env) with variables pointing to your Google Storage locations:
**Remember to Stop the VM and Delete it when you are done to avoid excess charges!!!**
135
+
136
+
137
+
138
+
## Testing a new version of the container
139
+
First you will have to build and test the container in Google Cloud. Provision a virtual machine from the existing template and connect with SSH, then switch to the root user and install the required packages:
140
+
```
141
+
sudo su
142
+
apt-get install docker.io git nano
143
+
```
144
+
145
+
Clone the repository and check out the branch that contains the version you want to test (in this example, the branch is named 'gcp-nextflow-container'):
Because the pipeline takes so long to run, it is possible that your SSH session may time out and disconnect during the test.
193
+
Reconnect to the VM with SSH and then list the running containers with:
194
+
```
195
+
docker container list
196
+
```
197
+
You should see an output similar to this:
198
+
```
199
+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
200
+
d2f3dbb5e136 bb4f296feec8 "/bin/bash" 6 minutes ago Up 6 minutes jolly_cartwright
201
+
```
202
+
203
+
You can re-attach to the container by substituting your own CONTAINER ID in the command below:
204
+
```
205
+
docker attach d2f3dbb5e136
206
+
```
207
+
Warning: Nextflow only prints status updates sporadically, so you may not see any output for some time after attaching to the container.
208
+
209
+
After the pipeline has completed, use Ctrl-C to exit the container, or type:
210
+
```
211
+
exit
212
+
```
213
+
214
+
215
+
## Publishing a new version of the container
216
+
Once you have validated the pipeline against test data, you can publish a release to docker hub.
217
+
Switch to the root user and log in with your credentials to docker hub:
218
+
219
+
```
220
+
sudo su
221
+
docker login
222
+
```
223
+
224
+
List the containers, and select the IMAGE ID of the container you just tested:
225
+
```
226
+
docker image list
227
+
```
228
+
229
+
example:
230
+
```
231
+
REPOSITORY TAG IMAGE ID CREATED SIZE
232
+
andersenlab/nemascan-nxf latest bb4f296feec8 4 hours ago 1.88GB
233
+
google/cloud-sdk slim d6d0a7854ac3 28 hours ago 1.16GB
234
+
```
235
+
236
+
Substitute your IMAGE ID, then tag the container with the docker hub repository, container name, and version number. You can also omit the version number to make the selected version the default (or 'latest')
237
+
```
238
+
docker tag bb4f296feec8 andersenlab/nemascan-nxf
239
+
```
240
+
```
241
+
docker tag bb4f296feec8 andersenlab/nemascan-nxf:v0.01
242
+
```
243
+
244
+
Publish the container to docker hub with a version tag:
245
+
```
246
+
docker push andersenlab/nemascan-nxf:v0.01
247
+
```
248
+
You can also publish the container to docker hub without a version number if you want it to be the default ('latest') version:
249
+
```
250
+
docker push andersenlab/nemascan-nxf
251
+
```
252
+
253
+
**Remember to Stop the VM and Delete it when you are done to avoid excess charges!!!**
254
+
255
+
256
+
257
+
258
+
## Running remote from GitHub
55
259
For reproducible pipelines, it is recommended to run NemaScan **without cloning the repo**. In this manner, you can also choose which branch and/or commit you wish to run. However, you can always clone the repo with:
56
260
57
261
```
@@ -68,6 +272,8 @@ nextflow run andersenlab/nemascan --debug
68
272
69
273
To display the help message, run `nextflow andersenlab/nemascan --help`
0 commit comments