# sangeranalyseR's tutorial

## Why sangeranalyseR

sangeranalseR is an R package that provides fast, flexible, and reproducible workflows for assembling your sanger seuqencing data into contigs.

It adds to a list of already widely-used tools, like Geneious, CodonCode Aligner and Phred-Phrap-Consed;. What makes it different from these tools is that it's free, it's open source, and it's in R.

## Main features

- Pure R environment: As far as we know, this is the first package that allows end-to-end analysis of Sanger sequencing data in a pure R environment.

- Automated data analysis: Given appropriately-named input files, a lot of the data analysis can be automated. Once you've set up an appropriate workflow for your data, you can run it again in seconds.

- Interactive Shiny apps: Local Shiny apps mean you visualize the data at many levels, view chromatograms, and adjust things like trimming parameters.

- Exporting and importing FASTA files: sangeranalyseR is primarily designed with loading raw `ab1` files in mind, but it can also load sequencesin FASTA format. Aligned results and trimmed reads can be written into FASTA file format.

- Thorough report: A single command creates a comprehensive interactive HTML report that provides a huge amount of detail on the analysis.

## What sangeranalyseR doesn't do

One really important feature that sangeranalyseR doesn't have is the ability to edit bases by hand. R is just not the right language for this. If you need to edit your reads by hand, we suggest doing that in another tool like Geneious, then exporting your reads as FASTA files and following the instructions for using sangeranalyseR with FASTA input.

## User Manual

If you are already familiar with sangeranalyseR and want to have a quick look at function signatures, please refer to sangeranalyseR user manual

## User support

Please go through the Documentation below first. If you have questions about using the package, a bug report, or a feature request, please use the GitHub issue tracker here:

https://github.com/roblanf/sangeranalyseR/issues

## Key contributors

The first (and not very good) version of the package was written by Rob Lanfear (at ANU in Australia), in collaboration with Kirston Barton and Sarah Palmer (then both at the University of Sydney). The second and far far better version of the package was written by Kuan-Hao (Howard) Chao at ANU. (This section was written by Rob Lanfear, lest you think Howard wrote it!)

## Documentation

- Installation
  - System requirements
  - Install from Bioconductor
  - Install the development version
  - Where to go from here ?
- Quick Start Guide
  - Super-Quick Start (3 lines of code)
  - Step 1: Prepare your input files
  - Step 2: Load and analyse your data
  - Step 3 (optional): Explore your data
  - Step 4: Output your aligned contigs
  - Step 5 (optional): Generate an interactive report
  - A Reproducible Example
    - 1. Prepare your input files & loading
    - 2. Load and analyse your data
    - 3. Explore your data
    - 4. Output your aligned contigs
    - 5. Generate an interactive report
- Beginners Guide
  - Step 1: Preparing your input files
  - Step 2: Loading and analysing your data
  - Step 3: Exploring your data with the Shiny app
  - Step 4: Outputting your aligned contigs
  - Step 5: Generating an interactive report
  - What's next ?
- Advanced User Guide - SangerRead (AB1)
  - Preparing SangerRead AB1 input
  - Creating SangerRead instance from AB1
  - Visualizing SangerRead trimmed read
  - Updating SangerRead quality trimming parameters
  - Writing SangerRead FASTA file (AB1)
  - Generating SangerRead report (AB1)
  - Code summary (SangerRead, ab1)
    - (1) Preparing SangerRead AB1 input
    - (2) Creating SangerRead instance from AB1
    - (3) Visualizing SangerRead trimmed read
    - (4) Writing SangerRead FASTA file (AB1)
    - (5) Generating SangerRead report (AB1)
- Advanced User Guide - SangerContig (AB1)
  - Preparing SangerContig AB1 inputs
    - (1) "regular expression matching" SangerContig inputs (AB1)
    - (2) "CSV file matching" SangerContig inputs (AB1)
  - Creating SangerContig instance from AB1
    - (1) "regular expression matching" SangerContig creation (AB1)
    - (2) "CSV file matching" SangerContig creation (AB1)
  - Updating SangerContig quality trimming parameters
  - Launching SangerContig Shiny app
    - SangerContig page (SC app)
    - SangerRead page (SC app)
  - Writing SangerContig FASTA files (AB1)
  - Generating SangerContig report (AB1)
  - Code summary (SangerContig, AB1)
    - (1) Preparing SangerContig AB1 inputs
    - (2) Creating SangerContig instance from AB1
    - (3) Updating SangerContig quality trimming parameters
    - (4) Launching SangerContig Shiny app
    - (5) Writing SangerContig FASTA files (AB1)
    - (6) Generating SangerContig report (AB1)
- Advanced User Guide - SangerAlignment (AB1)
  - Preparing SangerAlignment AB1 input
    - (1) "regular expression matching" SangerAlignment inputs (AB1)
    - (2) "CSV file matching" SangerAlignment inputs (AB1)
  - Creating SangerAlignment instance from AB1
    - (1) "regular expression matching" SangerAlignment creation (AB1)
    - (2) "CSV file matching" SangerAlignment creation (AB1)
  - Updating SangerAlignment quality trimming parameters
  - Launching SangerAlignment Shiny app
    - SangerAlignment page (SA app)
    - SangerContig page (SA app)
    - SangerRead page (SA app)
  - Writing SangerAlignment FASTA files (AB1)
  - Generating SangerAlignment report (AB1)
  - Code summary (SangerAlignment, AB1)
    - (1) Preparing SangerAlignment AB1 inputs
    - (2) Creating SangerAlignment instance from AB1
    - (3) Updating SangerAlignment quality trimming parameters (AB1)
    - (4) Launching SangerAlignment Shiny app (AB1)
    - (5) Writing SangerAlignment FASTA files (AB1)
    - (6) Generating SangerAlignment report (AB1)
- Advanced User Guide - SangerRead (FASTA)
  - Preparing SangerRead FASTA input
  - Creating SangerRead instance from FASTA
  - Writing SangerRead FASTA files (FASTA)
  - Generating SangerRead report (FASTA)
  - Code summary (SangerRead, fasta)
    - (1) Preparing SangerRead FASTA input
    - (2) Creating SangerRead instance from FASTA
    - (3) Writing SangerRead FASTA files (FASTA)
    - (4) Generating SangerRead report (FASTA)
- Advanced User Guide - SangerContig (FASTA)
  - Preparing SangerContig FASTA input
    - (1) "regular expression matching" SangerContig inputs (FASTA)
    - (2) "CSV file matching" SangerContig inputs (FASTA)
  - Creating SangerContig instance from FASTA
    - (1) "regular expression matching" SangerContig creation (FASTA)
    - (2) "CSV file matching" SangerContig creation (FASTA)
  - Writing SangerContig FASTA files (FASTA)
  - Generating SangerContig report (FASTA)
  - Code summary (SangerContig, FASTA)
    - 1. Preparing SangerContig FASTA input
    - 2. Creating SangerContig instance from FASTA
    - 3. Writing SangerContig FASTA files (FASTA)
    - 4. Generating SangerContig report (FASTA)
- Advanced User Guide - SangerAlignment (FASTA)
  - Preparing SangerAlignment FASTA input
    - (1) "regular expression matching" SangerAlignment inputs (FASTA)
    - (2) "CSV file matching" SangerAlignment inputs (FASTA)
  - Creating SangerAlignment instance from FASTA
    - (1) "regular expression matching" SangerAlignment creation (FASTA)
    - (2) "CSV file matching" SangerAlignment creation (FASTA)
  - Writing SangerAlignment FASTA files (FASTA)
  - Generating SangerAlignment report (FASTA)
  - Code summary (SangerAlignment, FASTA)
    - (1) Preparing SangerAlignment FASTA inputs
    - (2) Creating SangerAlignment instance from FASTA
    - (3) Writing SangerAlignment FASTA files (FASTA)
    - (4) Generating SangerAlignment report (FASTA)
- Q & A ...
  - What is a regular expression?
  - How to deal with secondary peaks
  - How to work with FASTA files for input
- User Manual (functions)
  - SangerRead Constructor Parameters
  - SangerContig Constructor Parameters
  - SangerAlignment Constructor Parameters
- Frequently Asked Questions
  - Q: What is the difference between two different trimming methods?
- Conclusion
- License
- Contact
- Help
  - Inside help test