---
title: "FastQC_pre-trim"
output: html_document
---

Rmd to run FastQC on pre-trimmed RNAseq data from _Pycnopodia helianthoides_ coelomocytes sampled summer/fall 2022 at USGS Marrowstone Field Station as part of the large SSWD _Pycnopodia_ Epidemiology project.      
Personel: Drew Harvell, Alyssa Gehman, TNC, Hakai, USGS, WDFW, UWSAFS. 

All RAW fastq files (Libraries: n = 32) are found on owl: http://owl.fish.washington.edu/nightingales/P_helianthoides/ 

All samples from this project have the beginning of "PSC_0" filename. 
Files were later transferred to RAVEN, see below. 

FastQC on Raven lives: `/home/shared/FastQC/fastqc`

```{bash}
/home/shared/FastQC-0.12.1/fastqc -h
```

Check working directory:
```{bash}
pwd
```

Files are stored on Raven in: `pycnornaseq2022`

Run FASTQC on untrimmed RNAseq .fastq.gz files (10/31/2023):
Below modified from Roberts Lab [Code Snippets](https://robertslab.github.io/resources/code_Snippets/)     
```{bash}
# Set CPU threads to use
threads=48

# Populate array with FastQ files
fastq_array=(/home/shared/8TB_HDD_02/graceac9/pycnornaseq2022/*.fastq.gz)

# Pass array contents to new variable
fastqc_list=$(echo "${fastq_array[*]}")

# Run FastQC
# NOTE: Do NOT quote ${fastqc_list}
/home/shared/FastQC-0.12.1/fastqc \
--threads ${threads} \
--outdir /home/shared/8TB_HDD_02/graceac9/pycnornaseq2022 \
${fastqc_list}
```



