2.1 Create **SangerRead** Instance
First step is to create a ***'SangerRead'*** instance. Here, we find the the abosulte file path and assign it to `A_chloroticaFdReadFN`.
```{r}
inputFilesPath <- system.file("extdata/", package = "sangeranalyseR")
A_chloroticaFdReadFN <- file.path(inputFilesPath,
"Allolobophora_chlorotica",
"RBNII",
"Achl_RBNII396-13_1_F.ab1")
```
Now we can create a **'SangerRead'** instance by running `SangerRead` constructor function.
```{r}
singleRead <- SangerRead(readFeature = "Forward Read",
readFileName = A_chloroticaFdReadFN)
```
2.2 Visualize Trimmed Read
Second step is to visualize the trimmed read. `qualityBasePlot` triggers a [plot_ly](https://plot.ly/r/) interactive plot for users to check the result of the trimmed read.
```{r}
qualityBasePlot(singleRead)
```
2.3 Update Trimming Parameters
Third step is to change trimming parameters. `SangerRead` constructor function uses default trimming parameters. If users are not satisfied with the trimming result, they can run `updateQualityParam` function to change the trimming parameters inside the ***'SangerRead'*** instance.
```{r results="hide"}
updateQualityParam(singleRead,
TrimmingMethod = "M1",
M1TrimmingCutoff = 0.0003,
M2CutoffQualityScore = NULL,
M2SlidingWindowSize = NULL)
```
2.4 Write FASTA file
Fourth step is to export DNA sequence to FATA file. `writeFastaSR` let users to write read in ***'SangerRead'*** instance to file in FASTA format.
```{r}
writeFastaSR(singleRead)
```
2.5 Generate Report
Fifth step is to create a static html report for ***'SangerRead'*** instance by running `generateReportSR` function
```{r eval=FALSE}
generateReportSR(singleRead)
```
---
# **SangerContig**
***'SangerContig'*** contains two lists of ***'SangerRead'*** which are forward and reverse read list. It also contains alignment results and consensus read. It corresponds to a contig in Sanger sequencing.