|
| 1 | +# Part 1: Method overview and manual testing |
| 2 | + |
| 3 | +[High level summary of what the analysis aims to achieve.] |
| 4 | + |
| 5 | +There are multiple valid methods for performing this type of analysis. |
| 6 | +For this course, we are following the method described [here](url) by [authors] at [affiliation](url). |
| 7 | + |
| 8 | +Our goal is therefore to develop a workflow that implements the following processing steps: [brief enumeration]. |
| 9 | + |
| 10 | +<figure class="excalidraw"> |
| 11 | +--8<-- "docs/nf4_science/[course-name]/img/[filename]" |
| 12 | +</figure> |
| 13 | + |
| 14 | +- **[TOOL]:** [Summary of analysis step] |
| 15 | + |
| 16 | +However, before we dive into writing any workflow code, we are going to try out the commands manually on some test data. |
| 17 | +The tools we need are not installed in the GitHub Codespaces environment, so we'll use them via containers. |
| 18 | + |
| 19 | +For more detailed explanations about where to find containers and how they work, see the [Hello Containers](../../hello_nextflow/05_hello_containers.md) chapter in the beginners' course. |
| 20 | + |
| 21 | +[TODO: consider making a note about Seqera containers] |
| 22 | + |
| 23 | +!!! note |
| 24 | + |
| 25 | + Make sure you're in the `nf4-science/[course-name]` directory. |
| 26 | + The last part of the path shown when you type `pwd` should be `[course-name]`. |
| 27 | + |
| 28 | +--- |
| 29 | + |
| 30 | +## 1. [Name of analysis step] |
| 31 | + |
| 32 | +We're going to pull a container image that has [relevant tools] installed, spin it up interactively and run the [analysis] commands on one of the example data files. |
| 33 | + |
| 34 | +### 1.1. Pull the `[tool]` container |
| 35 | + |
| 36 | +First, we use `docker pull` to download the container image. |
| 37 | + |
| 38 | +```bash |
| 39 | +docker pull community.wave.seqera.io/library/[container] |
| 40 | +``` |
| 41 | + |
| 42 | +This gives you the following console output as the system downloads the image: |
| 43 | + |
| 44 | +```console title="Output" |
| 45 | +[console output] |
| 46 | +``` |
| 47 | + |
| 48 | +The image has been downloaded to your computer, but it's not active yet. |
| 49 | +We need to actually spin it up (=make it run interactively). |
| 50 | + |
| 51 | +### 1.2. Spin up the container |
| 52 | + |
| 53 | +Let's spin up the container using `docker run -it` to run it interactively. |
| 54 | + |
| 55 | +```bash |
| 56 | +docker run -it -v ./data:/data community.wave.seqera.io/library/[container] |
| 57 | +``` |
| 58 | + |
| 59 | +Your prompt will change to something like `(base) root@b645838b3314:/tmp#`, which indicates that you are now _inside_ the container. |
| 60 | + |
| 61 | +The `-v ./data:/data` part of the command will enable us to access the contents of the `data/` directory from inside the container. |
| 62 | + |
| 63 | +```bash |
| 64 | +ls /data/[thing] |
| 65 | +``` |
| 66 | + |
| 67 | +```console title="Output" |
| 68 | +[console output] |
| 69 | +``` |
| 70 | + |
| 71 | +You are now ready to try running [analysis or tool]. |
| 72 | + |
| 73 | +### 1.3. Run the [analysis] command |
| 74 | + |
| 75 | +Now, we can run `[tool]` to [do analysis]. |
| 76 | + |
| 77 | +[optional explanations about command options] |
| 78 | + |
| 79 | +```bash |
| 80 | +[command] |
| 81 | +``` |
| 82 | + |
| 83 | +This should run very quickly: |
| 84 | + |
| 85 | +```console title="Output" |
| 86 | +[console output] |
| 87 | +``` |
| 88 | + |
| 89 | +[adapt depending on tool behavior] You can find the output files in the same directory as the original data: |
| 90 | + |
| 91 | +```bash |
| 92 | +ls /data/[path] |
| 93 | +``` |
| 94 | + |
| 95 | +```console title="Output" |
| 96 | +console output |
| 97 | +``` |
| 98 | + |
| 99 | +[some explanation of the output; provide contents preview if applicable] |
| 100 | + |
| 101 | +### 1.4. Save the output files |
| 102 | + |
| 103 | +[adapt depending on tool behavior; delete if not necessary] |
| 104 | + |
| 105 | +Output files that were created _inside_ the container will be inaccessible to future work, so let's move these to a new directory. |
| 106 | + |
| 107 | +```bash |
| 108 | +mkdir /data/[path] |
| 109 | +mv [things]* /data/[path] |
| 110 | +``` |
| 111 | + |
| 112 | +Now you will be able to use those files as inputs for subsequent analysis steps. |
| 113 | + |
| 114 | +### 1.5. Exit the container |
| 115 | + |
| 116 | +```bash |
| 117 | +exit |
| 118 | +``` |
| 119 | + |
| 120 | +[Concluding statement] |
| 121 | + |
| 122 | +[For the first step: Now we're going to repeat this process for the other steps we plan to implement in our pipeline.] |
| 123 | + |
| 124 | +--- |
| 125 | + |
| 126 | +## 2. [Name of second analysis step] |
| 127 | + |
| 128 | +[repeat as needed] |
| 129 | + |
| 130 | +[At final step: call out the final outputs] |
| 131 | + |
| 132 | +--- |
| 133 | + |
| 134 | +### Takeaway |
| 135 | + |
| 136 | +You have reviewed the analysis method and tested all the individual commands interactively in the relevant containers. |
| 137 | + |
| 138 | +### What's next? |
| 139 | + |
| 140 | +Learn how to wrap those same commands into a multi-step workflow that uses containers to execute the work. |
0 commit comments