## **IMPORTANT** If you have not done so before, please run the following command:

```bash
echo "export SINGULARITY_BINDPATH=/scratch,/data,/home/$USER,/shares/amr.imm.uzh" >> $HOME/.bashrc
source $HOME/.bashrc
```


We will first do the assembly of a small test dataset together. Later, you will run the same analysis on all samples of the two projects (MRSA and UPEC). 


## Assembly of test dataset

### Preparation 

* In your `data` space (that is `/data/$USER`), please create a directory called `testdata` Inside `testdata`, make a directory for each assembly approach, i.e. `nanopore`, `illumina`, `hybrid`. 


* Copy the following datasets

   **Illumina**


    ```bash
    # copy data 
    cp /shares/amr.imm.uzh/data/projects/Blockcourse_BIO296/FS2023/Participants_data/illumina/01_data_mrsa/SaH1P10622* /data/$USER/testdata/illumina/01_data/

    # copy scripts
    cp -r /shares/amr.imm.uzh/data/projects/Blockcourse_BIO296/FS2023/Participants_data/testdata/illumina/02_scripts/ /data/$USER/testdata/illumina/
    ```

    
    **Nanopore**

    ```bash
    # copy data 
    cp -r /shares/amr.imm.uzh/data/projects/Blockcourse_BIO296/FS2023/Participants_data/testdata/nanopore/rawdata /data/$USER/testdata/nanopore/

    # copy scripts
    cp /shares/amr.imm.uzh/data/projects/Blockcourse_BIO296/FS2023/Participants_data/testdata/nanopore/*.sh /data/$USER/testdata/nanopore/
    ```



    **Hybrid**

    ```bash
    # copy scripts
    cp /shares/amr.imm.uzh/data/projects/Blockcourse_BIO296/FS2023/Participants_data/testdata/hybrid/*.sh /data/$USER/testdata/hybrid/
    ```


### Copy the Illumina results if your job didn't finish

```bash
cp -r /shares/amr.imm.uzh/data/projects/Blockcourse_BIO296/FS2023/Participants_data/testdata/illumina/SaH1P10622 /data/$USER/testdata/illumina
```


### Running the analysis

In the assembly scripts you need to specify the variables for the input and output data. 
Submit for each platform the respective assembly script. 



<br><br><br>

## Assembly of project dataset

* In your `data` space, please create a directory called `ngs`. Inside `ngs`, make a directory for each assembly approach, i.e. `nanopore`, `illumina`, `hybrid`. 

The scripts here, include the assembly as well as the annotation step. 


* Copy the following datasets
    
    **Illumina**

    ```bash
    # copy data sets
    cp -r /shares/amr.imm.uzh/data/projects/Blockcourse_BIO296/FS2023/Participants_data/illumina/01_data_* /data/$USER/ngs/illumina/

    # copy scripts
    cp -r /shares/amr.imm.uzh/data/projects/Blockcourse_BIO296/FS2023/Participants_data/illumina/02_scripts /data/$USER/ngs/illumina/
    ```

    **Nanopore**

    ```bash
    # copy data sets
    cp -r /shares/amr.imm.uzh/data/projects/Blockcourse_BIO296/FS2024/Participants_data/nanopore/Group1_mrsa/ /data/$USER/ngs/nanopore/

    cp -r /shares/amr.imm.uzh/data/projects/Blockcourse_BIO296/FS2024/Participants_data/nanopore/Group2_upec/ /data/$USER/ngs/nanopore/

    # copy all scripts
    cp /shares/amr.imm.uzh/data/projects/Blockcourse_BIO296/FS2024/Participants_data/nanopore_scripts/WGS_nanopore_assembly*.sh /data/$USER/ngs/nanopore/
    ```

    **Hybrid**

    ```bash
    # copy scripts
    cp /shares/amr.imm.uzh/data/projects/Blockcourse_BIO296/FS2024/Participants_data/hybrid_assembly_scripts/*.sh /data/$USER/ngs/hybrid/
    ```




## Download assembly data if yours hasn't finished

**Illumina**

```bash
cp -r /shares/amr.imm.uzh/data/projects/Blockcourse_BIO296/FS2023/Participants_data/illumina/03_output_mrsa /data/$USER/ngs/illumina/03_output_mrsa_backup/

cp -r /shares/amr.imm.uzh/data/projects/Blockcourse_BIO296/FS2023/Participants_data/illumina/03_output_upec /data/$USER/ngs/illumina/03_output_upec_backup/
```


**Nanopore**

Your data

```bash
cp -r /shares/amr.imm.uzh/data/projects/Blockcourse_BIO296/FS2023/Participants_data/nanopore/Analysis /data/$USER/ngs/nanopore/Analysis2

cp -r /shares/amr.imm.uzh/data/projects/Blockcourse_BIO296/FS2023/Participants_data/nanopore/QC /data/$USER/ngs/nanopore/QC2
```


Backup data

```bash
cp -r /shares/amr.imm.uzh/data/projects/Blockcourse_BIO296/FS2023/Participants_data/nanopore_backup/Analysis /data/$USER/ngs/nanopore/Analysis_backup

cp -r /shares/amr.imm.uzh/data/projects/Blockcourse_BIO296/FS2023/Participants_data/nanopore_backup/QC /data/$USER/ngs/nanopore/QC_backup
```