# 6. Mapping/alignment and quantification

### Foreword

The most difficult criteria for a natural scientist to surf in the computational field is the crossing to the statistic disciplinary.  We all know about ANOVA, t-test and p-value, but that is totally not enough to write a package to deal with mapping/alignment of genetic fragment for data processing.  Different packages with similar goal are differ by the mathematical model and the algorithm that do the same thing in different ways, which make the usage requirement and data preparation different.  Nevertheless, with all the advancement and application by natural scientist, the calculations obtained had eventually come to satisfying agreement, or at the bitter end these holistic methods are just upstream screening for research direction or to suggest a probable mechanism based on conventional evidence. &#x20;

### Mapping vs alignment

Based on the precise word definition, mapping and alignment are a bit different.  You are only aligning a sequence against the reference template without considering mutation, base calling errors, splicing, and sort.  Mapping is more like an algorithm to predict the highest likelihood of a fragment to be origin from which location of the template.  It is of course impossible that alignment is an absolute direct comparison while leaving all the opportunities to mapping, but basically this is how I perceive these 2 before they are now kind of interchangeable in some of the fields.  Or maybe it is only a historical reason that we used to align a Sanger sequencing result to a known reference genome to judge for point mutation one by one in the good old days.  (a.k.a. pairwise alignment)

I can't emphasize more that I am nothing more than an imposter and I really know nothing about NGS to create this writing.  Anyhow this answer to the above question made on biostars might give you more insight as this is somehow a professional rephrasing of what I have written. \
<https://www.biostars.org/p/180986/#180993>

### Quantification

Quantification is the procedure to count the number of fragment hit of each given gene and normalize the count in statistically meaningful way.  Technically speaking, Salmon is the algorithm to map the fragment to the genome and count the hit, then normalize it and generate [TPM](https://nks.gitbook.io/rna-seq/3.-good-to-know-beforehand/normalization-rpkm-fpkm-tpm) for each and every gene presented in the organism under examination. &#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nks.gitbook.io/rna-seq/6.-mapping-alignment-and-quantification.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
