---
title: "01-data-explore"
format: html
editor: visual
---

### Metadata

<https://github.com/epigeneticstoocean/2018OAExp_larvae>

<https://github.com/epigeneticstoocean/2018_L18_OAExp_Cvirginica_DNAm/blob/main/data/L18_larvae_meta.csv>

### Raw reads:

<https://owl.fish.washington.edu/nightingales/C_virginica/2018OALarvae_DNAm_discovery/>

### Trimmed reads:

<https://gannet.fish.washington.edu/Atumefaciens/20220826-cvir-larvae_zygote-BSseq-fastp_trimming/>

#### MultiQC report:

<https://gannet.fish.washington.edu/Atumefaciens/20220826-cvir-larvae_zygote-BSseq-fastp_trimming/multiqc_report.html>

#### Trimming notebook:

<https://robertslab.github.io/sams-notebook/posts/2022/2022-08-29-FastQ-Trimming-and-QC---C.virginica-Larval-BS-seq-Data-from-Lotterhos-Lab-and-Part-of-CEABIGR-Project-Using-fastp-on-Mox/index.html>

# moving trimmed reads to raven

`https://gannet.fish.washington.edu/Atumefaciens/20220826-cvir-larvae_zygote-BSseq-fastp_trimming/CF01-CM02-Larvae_R2_001.fastp-trim.20220827.fq.gz`

```{r, engine='bash'}
wget -r \
--no-directories --no-parent \
-P ../data \
-A "*20220827.fq.gz" https://gannet.fish.washington.edu/Atumefaciens/20220826-cvir-larvae_zygote-BSseq-fastp_trimming/
```

```{bash}
# Directories and programs
bismark_dir="/home/shared/Bismark-0.24.0"
bowtie2_dir="/home/shared/bowtie2-2.4.4-linux-x86_64/"
genome_folder="../data/genome/"

${bismark_dir}/bismark_genome_preparation \
--verbose \
--parallel 24 \
--path_to_aligner ${bowtie2_dir} \
${genome_folder} \
2> ../output/01-data-explore/prep.out
```

```{bash}
ls ../data/*fq.gz | wc -l 
```

```{bash}
ls ../data/*fq.gz
```

```{bash}
echo "01-data-explore" >> ../output/.gitignore
```

STARTED JUNE 6 11AM FINISHED June 12 6PM

```{bash}
# Directories and programs
bismark_dir="/home/shared/Bismark-0.24.0"
bowtie2_dir="/home/shared/bowtie2-2.4.4-linux-x86_64/"
genome_folder="../data/genome/"

find ../data/*_R1_001.fastp-trim.20220827.fq.gz \
| xargs basename -s _R1_001.fastp-trim.20220827.fq.gz | xargs -I{} ${bismark_dir}/bismark \
--path_to_bowtie ${bowtie2_dir} \
-genome ${genome_folder} \
-p 4 \
-score_min L,0,-0.6 \
--non_directional \
-1 ../data/{}_R1_001.fastp-trim.20220827.fq.gz \
-2 ../data/{}_R2_001.fastp-trim.20220827.fq.gz \
-o ../output/01-data-explore/bismark \
&> ../output/01-data-explore/bismark.log
```

seems like last sample did not finish

```{bash}
# Directories and programs
bismark_dir="/home/shared/Bismark-0.24.0"
bowtie2_dir="/home/shared/bowtie2-2.4.4-linux-x86_64/"
genome_folder="../data/genome/"

find ../data/EF07*_R1_001.fastp-trim.20220827.fq.gz \
| xargs basename -s _R1_001.fastp-trim.20220827.fq.gz | xargs -I{} ${bismark_dir}/bismark \
--path_to_bowtie ${bowtie2_dir} \
-genome ${genome_folder} \
-p 4 \
-score_min L,0,-0.6 \
--non_directional \
-1 ../data/{}_R1_001.fastp-trim.20220827.fq.gz \
-2 ../data/{}_R2_001.fastp-trim.20220827.fq.gz \
-o ../output/01-data-explore/bismark \
&> ../output/01-data-explore/bismark.log
```

# Getting file to klone

```{r, engine='bash'}
wget -r \
--no-directories --no-parent \
-P ../data \
-A "*20220827.fq.gz" https://gannet.fish.washington.edu/Atumefaciens/20220826-cvir-larvae_zygote-BSseq-fastp_trimming/
```
```{bash}
ls ../data/*fq.gz | wc -l 

```

```{bash}
cd ../data/genome
wget http://owl.fish.washington.edu/halfshell/genomic-databank/Cvirginica_v300.fa
```


```{bash}
# Directories and programs
bismark_dir="/home/shared/Bismark-0.24.0"
bowtie2_dir="/home/shared/bowtie2-2.4.4-linux-x86_64/"
genome_folder="../data/genome/"

bismark_genome_preparation \
--verbose \
--parallel 14 \
${genome_folder} \
2> ../output/01-data-explore/klone-prep.out
```
