---
title: "Lion_Metabarcoding"
output: html_document
date: "2023-04-06"
---
```{r}
install.packages('DADA2')
install.packages('stringr')
install.packages('kableExtra')
installed.packages('knitr')
install.packages('tidyverse')
install.packages('digest')
```
#Start with Raw sequences
in Data folder
#Remove primer sequences
forward UniCO1F and reverse UniCO1R primers from Leray et al 2013
#Read Quality
```{bash}
cd ../Data
/home/shared/FastQC/fastqc *fastq.gz -o ../Output
```
```{bash}
eval "$(/opt/anaconda/anaconda3/bin/conda shell.bash hook)"
conda activate
which multiqc
cd ../Output
multiqc .
```
#Filter and Trim
#Error Model
#Inference of ASVs / OTUs
#Assign Taxonomy / BLAST
Download
```{bash}
cd ~/Yerrace_metabarcoding/Applications
curl -O https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/ncbi-blast-2.13.0+-x64-linux.tar.gz
```
unzip the file
```{bash}
cd ~/Yerrace_metabarcoding/Applications
tar -xf ncbi-blast-2.13.0+-x64-linux.tar.gz
```
Check that it's working by using the help function (-h)
```{bash}
~/Yerrace_metabarcoding/Applications/ncbi-blast-2.13.0+/bin/blastx -h
```
This will be making a database. CUrrently, copied and pasted, will need to change
```{bash}
cd ../data
curl -O https://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/complete/uniprot_sprot.fasta.gz
mv uniprot_sprot.fasta.gz uniprot_sprot_r2023_01.fasta.gz
gunzip -k uniprot_sprot_r2023_01.fasta.gz
ls ../data
```
```{bash}
/Applications/bioinfo/ncbi-blast-2.13.0+/bin/makeblastdb \
-in ../data/uniprot_sprot_r2023_01.fasta \
-dbtype prot \
-out ../blastdb/uniprot_sprot_r2023_01
```
#Remove Lionfish reads