---
title: "04-pyc-hisat"
output: html_document
date: "2024-11-04"
---

```{bash}
wget -r \
--no-directories --no-parent \
-P ../data/raw/ \
-A "PSC-05*gz" https://gannet.fish.washington.edu/seashell/bu-github/project-pycno-multispecies-2023/data/raw/pyc/

```

```{bash}
cd ../data
curl -L -o genome_data.zip "https://api.ncbi.nlm.nih.gov/datasets/v2/genome/accession/GCA_032158295.1/download?include_annotation_type=GENOME_FASTA&include_annotation_type=GENOME_GFF&include_annotation_type=RNA_FASTA&include_annotation_type=CDS_FASTA&include_annotation_type=PROT_FASTA&include_annotation_type=SEQUENCE_REPORT&hydrated=FULLY_HYDRATED"
```

```{bash}
unzip ../data/genome_data.zip
```



```{bash}
cd ../data
curl -O https://gannet.fish.washington.edu/seashell/bu-github/paper-pycno-sswd-2021-2022/analyses/12-fix-gff/mod_augustus.gtf
```



```{bash}
hisat2-build \
../data/ncbi_dataset/data/GCA_032158295.1/GCA_032158295.1_ASM3215829v1_genomic.fna \
../output/04-pyc-hisat/GCA_032158295.index \
-p 30 \
../data/mod_augustus.gtf \
2> ../output/04-pyc-hisat//hisat2-build_stats.txt
```



```{bash}
find ../data/raw/*_R1_001.fastq.gz \
| xargs -I{} basename {} _R1_001.fastq.gz \
| xargs -I{} sh -c 'hisat2 \
-x ../output/04-pyc-hisat/GCA_032158295.index \
--dta \
-p 30 \
-1 ../data/raw/{}_R1_001.fastq.gz \
-2 ../data/raw/{}_R2_001.fastq.gz \
-S ../output/04-pyc-hisat/{}.sam \
--un-conc ../output/04-pyc-hisat/{}_unmapped_reads.fastq \
> ../output/04-pyc-hisat/{}_hisat01.stdout 2> ../output/04-pyc-hisat/{}_hisat01.stderr'

```


```{bash}
