---
title: "02-align"
format: html
editor: visual
---

# Running Kallisto on sequence reads..

Lets look at my sequence reads

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

Where is genome?

```{bash}
head /home/shared/8TB_HDD_02/graceac9/GitHub/project-pycno-sizeclass-2022/data/augustus.hints.codingseq
```

```{bash}
cp /home/shared/8TB_HDD_02/graceac9/GitHub/project-pycno-sizeclass-2022/data/augustus.hints.codingseq ../data/Phel_transcriptome.fa
```

```{bash}
head ../data/Phel_transcriptome.fa

```

```{bash}
md5sum ../data/Phel_transcriptome.fa
```

```{bash}
md5sum /home/shared/8TB_HDD_02/graceac9/GitHub/project-pycno-sizeclass-2022/data/augustus.hints.codingseq
```

# Index the reference

```{bash}
/home/shared/kallisto/kallisto index \
-i ../data/Phel_transcriptome.index \
../data/Phel_transcriptome.fa
```

```{bash}
/home/shared/kallisto/kallisto quant \
-i ../data/Phel_transcriptome.index \
-t 20 \
-o ../output/ \
../data/*.gz
```

```{bash}
find ../data/*_R1.fastq.gz \
| xargs basename -s _R1.fastq.gz | xargs -I{} \
/home/shared/kallisto/kallisto quant \
-i ../data/Phel_transcriptome.index \
-t 20 \
-o ../output/ \
--fr-stranded ../data/{}_R1.fastq.gz \
--rf-stranded ../data/{}_R2.fastq.gz
```

```{bash}

find ../data/*_R1.fastq.gz \
| xargs basename -s _R1.fastq.gz | xargs -I{} /home/shared/kallisto/kallisto \
quant -i ../data/Phel_transcriptome.index \
-o ../output/kallisto_01/{} \
-t 20 \
--fr-stranded ../data/{}_R1.fastq.gz \
--rf-stranded ../data/{}_R2.fastq.gz \
2> ../output/kallisto_01/kallisto.out
```

```{bash}
/home/sam/programs/mambaforge/bin/multiqc \
../output/kallisto_01/kallisto.out

```

```{bash}
perl /home/shared/trinityrnaseq-v2.12.0/util/abundance_estimates_to_matrix.pl \
    --est_method kallisto \
    --gene_trans_map none \
    --out_prefix ../output/kallisto_01 \
    --name_sample_by_basedir \
    ../output/kallisto_01/*/abundance.tsv 
```
