Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added Xanadu specific instructions
Xanadu specific instructions and rnatoy pipeline
  • Loading branch information
frz02001 committed Mar 7, 2022
1 parent 301523d commit fd0e00e
Showing 1 changed file with 41 additions and 4 deletions.
45 changes: 41 additions & 4 deletions README.md
Expand Up @@ -15,9 +15,9 @@ You will need to [install Java](https://devqa.io/brew-install-java/) because it'
- You can check by running `java -version` at the terminal. (If your output is `openjdk version 1.8.xxx` this is version 8. If you want to read more about why, here's a [link with more info](https://www.quora.com/Do-Java-1-8-and-Java-8-refer-to-the-same-thing).


### Installing Nextflow
### Installing Nextflow (local computer)

1. Open a terminal window or (logon to `Xanadu`).
1. Open a terminal window.
2. You should already be in your home directory but you can type `cd ~` or simply `cd` will also take you to your home directory.
3. Create a directory called `nextflow` and change directory to this new directory.
- `mkdir nextflow && cd nextflow`
Expand All @@ -30,12 +30,49 @@ You can now run nextflow. Let's check the version by typing
But this is inconvenient because if you try to run nextflow from a different directory, you will need to type `~/nextflow/nextflow -version` so let's create a symlink so that we can use a shortcut. Type

- `sudo ln -s ~/nextflow/nextflow /usr/local/bin/`
- (on `Xanadu` you might not need to use `sudo`)

The `ln` command is a useful command to know so you might want to [read more about it](https://linuxize.com/post/how-to-create-symbolic-links-in-linux-using-the-ln-command/).

### Installing Nextflow on Xanadu
1. Start an interactive session to keep the admins happy.
- `srun -p general -q general -t 4:00:00 --mem 4G --pty bash`
2. Create an `opt` directory in your home directory and change directory into this new directory.
- `mkdir -p ~/opt && cd ~/opt`
3. Download and install the nextflow install script.
- `curl -s https://get.nextflow.io | bash`

Add the path to the `opt` directory to your `PATH`

4. Open your `.bashrc` file using `vim` or `nano`.
5. Add the following line to the end of your `.bashrc` file.
- `export PATH="/home/FCAM/$USER/opt/:$PATH"`
6. Source your `.bashrc` so the change takes effect.
- `source ~/.bashrc`
7. Check if the new `opt` directory is in your `PATH`.
- `echo $PATH | grep "$USER/opt"`
- You should see your username and opt in red

### Running Nextflow

Now you can just type `nextflow -version` from any directory. Nextflow comes with a hello world pipeline ready to run so let's run our first pipeline!

- `nextflow run hello`

The output of your pipeline should be "hello world" four times each in a different language.
The output of your pipeline should be "hello world" four times each in a different language.

---

### Running Nextflow RNAtoy pipeline on Xanadu

If you haven't already done so, start an interactive session `srun -p general -q general -t 4:00:00 -c 4 --mem 8G --pty bash`

1. Create a `nextflow_pipelines` directory in your home directory and change into this directory
- `mkdir -p ~/nextflow_pipelines && cd ~/nextflow_pipelines`
2. Clone the `rnatoy` repo and change into this direcotry.
- `git clone https://github.com/nextflow-io/rnatoy.git && cd rnatoy`
3. Load singularity
- `module load singularity`
4. Pull the needed docker container
- `singularity pull docker://nextflow/rnatoy:1.3`
5. Run the rnatoy pipeline using a singularity container
- `nextflow run main.nf -with-singularity rnatoy_1.3.sif`

0 comments on commit fd0e00e

Please sign in to comment.