Reorganization of the documentation book directory

Former-commit-id: 095acaf9c8649b0e527c6253dc79330feedac865
This commit is contained in:
coissac committed 2023-02-23 23:41:24 +01:00
1 parent 072b85e155
commit c94b2974fb
154 files changed
+1201200 -5348

No files matched your search

@@ -0,0 +1,20 @@
{
"hash": "e0f95c0479d4275bf95ac924807680f6",
"result": {
"markdown": "# Computations on sequences\n\n## `obipairing`\n\n> Replace the `illuminapairedends` original *OBITools*\n\n### Alignment procedure {.unnumbered}\n\n`obipairing` is introducing a new alignment algorithm compared to the `illuminapairedend` command of the `OBITools V2`.\nNethertheless this new algorithm has been design to produce the same results than the previous, except in very few cases.\n\nThe new algorithm is a two-step procedure. First, a FASTN-type algorithm [@Lipman1985-hw] identifies the best offset between the two matched readings. This identifies the region of overlap. \n\nIn the second step, the matching regions of the two reads are extracted along with a flanking sequence of $\\Delta$ base pairs. The two subsequences are then aligned using a \"one side free end-gap\" dynamic programming algorithm. This latter step is only called if at least one mismatch is detected by the FASTP step. \n\nUnless the similarity between the two reads at their overlap region is very low, the addition of the flanking regions in the second step of the alignment ensures the same alignment as if the dynamic programming alignment was performed on the full reads. \n\n### The scoring system {.unnumbered}\n\nIn the dynamic programming step, the match and mismatch scores take into account the quality scores of the two aligned nucleotides. By taking these into account, the probability of a true match can be calculated for each aligned base pair. \n\nIf we consider a nucleotide read with a quality score $Q$, the probability of misreading this base ($P_E$) is :\n$$\nP_E = 10^{-\\frac{Q}{10}}\n$$\n\nThus, when a given nucleotide $X$ is observed with the quality score $Q$. The probability that $X$ is really an $X$ is :\n\n$$\nP(X=X) = 1 - P_E\n$$\n\nOtherwise, $X$ is actually one of the three other possible nucleotides ($X_{E1}$, $X_{E2}$ or $X_{E3}$). If we suppose that the three reading error have the same probability :\n\n$$\nP(X=X_{E1}) = P(X=X_{E3}) = P(X=X_{E3}) = \\frac{P_E}{3}\n$$\n\nAt each position in an alignment where the two nucleotides $X_1$ and $X_2$ face each other (not a gapped position), the probability of a true match varies depending on whether $X_1=X_2$, an observed match, or $X_1 \\neq X_2$, an observed mismatch. \n\n**Probability of a true match when $X_1=X_2$**\n\nThat probability can be divided in two parts. First $X_1$ and $X_2$ have been correctly read. The corresponding probability is :\n\n$$\n\\begin{aligned}\nP_{TM} &= (1- PE_1)(1-PE_2)\\\\ \n &=(1 - 10^{-\\frac{Q_1}{10} } )(1 - 10^{-\\frac{Q_2}{10}} )\n\\end{aligned}\n$$\n\nSecondly, a match can occure if the true nucleotides read as $X_1$ and $X_2$ are not $X_1$ and $X_2$ but identical.\n\n$$\n\\begin{aligned}\nP(X_1==X_{E1}) \\cap P(X_2==X_{E1}) &= \\frac{P_{E1} P_{E2}}{9} \\\\\nP(X_1==X_{Ex}) \\cap P(X_2==X_{Ex}) & = \\frac{P_{E1} P_{E2}}{3}\n\\end{aligned}\n$$\n\nThe probability of a true match between $X_1$ and $X_2$ when $X_1 = X_2$ an observed match :\n\n$$\n\\begin{aligned}\nP(MATCH | X_1 = X_2) = (1- PE_1)(1-PE_2) + \\frac{P_{E1} P_{E2}}{3}\n\\end{aligned}\n$$\n\n**Probability of a true match when $X_1 \\neq X_2$**\n\nThat probability can be divided in three parts. \n\na. $X_1$ has been correctly read and $X_2$ is a sequencing error and is actually equal to $X_1$. \n$$\nP_a = (1-P_{E1})\\frac{P_{E2}}{3}\n$$\na. $X_2$ has been correctly read and $X_1$ is a sequencing error and is actually equal to $X_2$. \n$$\nP_b = (1-P_{E2})\\frac{P_{E1}}{3}\n$$\na. $X_1$ and $X_2$ corresponds to sequencing error but are actually the same base $X_{Ex}$\n$$\nP_c = 2\\frac{P_{E1} P_{E2}}{9}\n$$\n\nConsequently : \n$$\n\\begin{aligned}\nP(MATCH | X_1 \\neq X_2) = (1-P_{E1})\\frac{P_{E2}}{3} + (1-P_{E2})\\frac{P_{E1}}{3} + 2\\frac{P_{E1} P_{E2}}{9}\n\\end{aligned}\n$$\n\n**Probability of a match under the random model**\n\nThe second considered model is a pure random model where every base is equiprobable, hence having a probability of occurrence of a nucleotide equals $0.25$. Under that hypothesis \n\n$$\nP(MATCH | \\text{Random model}) = 0.25\n$$\n\n**The score is a log ration of likelyhood**\n\nScore is define as the logarithm of the ratio between the likelyhood of the observations considering the sequencer error model over tha likelyhood u\n\n\n\n::: {.cell}\n::: {.cell-output-display}\n![Evolution of the match and mismatch scores when the quality of base is 20 while the second range from 10 to 40.](comm_computation_files/figure-epub/unnamed-chunk-1-1.png)\n:::\n:::\n\n\n\n## `obimultiplex`\n\n> Replace the `ngsfilter` original *OBITools*\n\n## `obicomplement`\n\n## `obiclean`\n\n## `obiuniq`\n\n",
"supporting": [
"comm_computation_files/figure-epub"
],
"filters": [
"rmarkdown/pagebreak.lua"
],
"includes": {},
"engineDependencies": {
"knitr": [
"{\"type\":\"list\",\"attributes\":{},\"value\":[]}"
]
},
"preserve": null,
"postProcess": false
}
}
@@ -0,0 +1,16 @@
{
"hash": "e0f95c0479d4275bf95ac924807680f6",
"result": {
"markdown": "# Computations on sequences\n\n## `obipairing`\n\n> Replace the `illuminapairedends` original *OBITools*\n\n### Alignment procedure {.unnumbered}\n\n`obipairing` is introducing a new alignment algorithm compared to the `illuminapairedend` command of the `OBITools V2`.\nNethertheless this new algorithm has been design to produce the same results than the previous, except in very few cases.\n\nThe new algorithm is a two-step procedure. First, a FASTN-type algorithm [@Lipman1985-hw] identifies the best offset between the two matched readings. This identifies the region of overlap. \n\nIn the second step, the matching regions of the two reads are extracted along with a flanking sequence of $\\Delta$ base pairs. The two subsequences are then aligned using a \"one side free end-gap\" dynamic programming algorithm. This latter step is only called if at least one mismatch is detected by the FASTP step. \n\nUnless the similarity between the two reads at their overlap region is very low, the addition of the flanking regions in the second step of the alignment ensures the same alignment as if the dynamic programming alignment was performed on the full reads. \n\n### The scoring system {.unnumbered}\n\nIn the dynamic programming step, the match and mismatch scores take into account the quality scores of the two aligned nucleotides. By taking these into account, the probability of a true match can be calculated for each aligned base pair. \n\nIf we consider a nucleotide read with a quality score $Q$, the probability of misreading this base ($P_E$) is :\n$$\nP_E = 10^{-\\frac{Q}{10}}\n$$\n\nThus, when a given nucleotide $X$ is observed with the quality score $Q$. The probability that $X$ is really an $X$ is :\n\n$$\nP(X=X) = 1 - P_E\n$$\n\nOtherwise, $X$ is actually one of the three other possible nucleotides ($X_{E1}$, $X_{E2}$ or $X_{E3}$). If we suppose that the three reading error have the same probability :\n\n$$\nP(X=X_{E1}) = P(X=X_{E3}) = P(X=X_{E3}) = \\frac{P_E}{3}\n$$\n\nAt each position in an alignment where the two nucleotides $X_1$ and $X_2$ face each other (not a gapped position), the probability of a true match varies depending on whether $X_1=X_2$, an observed match, or $X_1 \\neq X_2$, an observed mismatch. \n\n**Probability of a true match when $X_1=X_2$**\n\nThat probability can be divided in two parts. First $X_1$ and $X_2$ have been correctly read. The corresponding probability is :\n\n$$\n\\begin{aligned}\nP_{TM} &= (1- PE_1)(1-PE_2)\\\\ \n &=(1 - 10^{-\\frac{Q_1}{10} } )(1 - 10^{-\\frac{Q_2}{10}} )\n\\end{aligned}\n$$\n\nSecondly, a match can occure if the true nucleotides read as $X_1$ and $X_2$ are not $X_1$ and $X_2$ but identical.\n\n$$\n\\begin{aligned}\nP(X_1==X_{E1}) \\cap P(X_2==X_{E1}) &= \\frac{P_{E1} P_{E2}}{9} \\\\\nP(X_1==X_{Ex}) \\cap P(X_2==X_{Ex}) & = \\frac{P_{E1} P_{E2}}{3}\n\\end{aligned}\n$$\n\nThe probability of a true match between $X_1$ and $X_2$ when $X_1 = X_2$ an observed match :\n\n$$\n\\begin{aligned}\nP(MATCH | X_1 = X_2) = (1- PE_1)(1-PE_2) + \\frac{P_{E1} P_{E2}}{3}\n\\end{aligned}\n$$\n\n**Probability of a true match when $X_1 \\neq X_2$**\n\nThat probability can be divided in three parts. \n\na. $X_1$ has been correctly read and $X_2$ is a sequencing error and is actually equal to $X_1$. \n$$\nP_a = (1-P_{E1})\\frac{P_{E2}}{3}\n$$\na. $X_2$ has been correctly read and $X_1$ is a sequencing error and is actually equal to $X_2$. \n$$\nP_b = (1-P_{E2})\\frac{P_{E1}}{3}\n$$\na. $X_1$ and $X_2$ corresponds to sequencing error but are actually the same base $X_{Ex}$\n$$\nP_c = 2\\frac{P_{E1} P_{E2}}{9}\n$$\n\nConsequently : \n$$\n\\begin{aligned}\nP(MATCH | X_1 \\neq X_2) = (1-P_{E1})\\frac{P_{E2}}{3} + (1-P_{E2})\\frac{P_{E1}}{3} + 2\\frac{P_{E1} P_{E2}}{9}\n\\end{aligned}\n$$\n\n**Probability of a match under the random model**\n\nThe second considered model is a pure random model where every base is equiprobable, hence having a probability of occurrence of a nucleotide equals $0.25$. Under that hypothesis \n\n$$\nP(MATCH | \\text{Random model}) = 0.25\n$$\n\n**The score is a log ration of likelyhood**\n\nScore is define as the logarithm of the ratio between the likelyhood of the observations considering the sequencer error model over tha likelyhood u\n\n\n\n::: {.cell}\n::: {.cell-output-display}\n![Evolution of the match and mismatch scores when the quality of base is 20 while the second range from 10 to 40.](comm_computation_files/figure-html/unnamed-chunk-1-1.png){width=672}\n:::\n:::\n\n\n\n## `obimultiplex`\n\n> Replace the `ngsfilter` original *OBITools*\n\n## `obicomplement`\n\n## `obiclean`\n\n## `obiuniq`\n\n",
"supporting": [
"comm_computation_files/figure-html"
],
"filters": [
"rmarkdown/pagebreak.lua"
],
"includes": {},
"engineDependencies": {},
"preserve": {},
"postProcess": true
}
}
@@ -0,0 +1,20 @@
{
"hash": "e0f95c0479d4275bf95ac924807680f6",
"result": {
"markdown": "# Computations on sequences\n\n## `obipairing`\n\n> Replace the `illuminapairedends` original *OBITools*\n\n### Alignment procedure {.unnumbered}\n\n`obipairing` is introducing a new alignment algorithm compared to the `illuminapairedend` command of the `OBITools V2`.\nNethertheless this new algorithm has been design to produce the same results than the previous, except in very few cases.\n\nThe new algorithm is a two-step procedure. First, a FASTN-type algorithm [@Lipman1985-hw] identifies the best offset between the two matched readings. This identifies the region of overlap. \n\nIn the second step, the matching regions of the two reads are extracted along with a flanking sequence of $\\Delta$ base pairs. The two subsequences are then aligned using a \"one side free end-gap\" dynamic programming algorithm. This latter step is only called if at least one mismatch is detected by the FASTP step. \n\nUnless the similarity between the two reads at their overlap region is very low, the addition of the flanking regions in the second step of the alignment ensures the same alignment as if the dynamic programming alignment was performed on the full reads. \n\n### The scoring system {.unnumbered}\n\nIn the dynamic programming step, the match and mismatch scores take into account the quality scores of the two aligned nucleotides. By taking these into account, the probability of a true match can be calculated for each aligned base pair. \n\nIf we consider a nucleotide read with a quality score $Q$, the probability of misreading this base ($P_E$) is :\n$$\nP_E = 10^{-\\frac{Q}{10}}\n$$\n\nThus, when a given nucleotide $X$ is observed with the quality score $Q$. The probability that $X$ is really an $X$ is :\n\n$$\nP(X=X) = 1 - P_E\n$$\n\nOtherwise, $X$ is actually one of the three other possible nucleotides ($X_{E1}$, $X_{E2}$ or $X_{E3}$). If we suppose that the three reading error have the same probability :\n\n$$\nP(X=X_{E1}) = P(X=X_{E3}) = P(X=X_{E3}) = \\frac{P_E}{3}\n$$\n\nAt each position in an alignment where the two nucleotides $X_1$ and $X_2$ face each other (not a gapped position), the probability of a true match varies depending on whether $X_1=X_2$, an observed match, or $X_1 \\neq X_2$, an observed mismatch. \n\n**Probability of a true match when $X_1=X_2$**\n\nThat probability can be divided in two parts. First $X_1$ and $X_2$ have been correctly read. The corresponding probability is :\n\n$$\n\\begin{aligned}\nP_{TM} &= (1- PE_1)(1-PE_2)\\\\ \n &=(1 - 10^{-\\frac{Q_1}{10} } )(1 - 10^{-\\frac{Q_2}{10}} )\n\\end{aligned}\n$$\n\nSecondly, a match can occure if the true nucleotides read as $X_1$ and $X_2$ are not $X_1$ and $X_2$ but identical.\n\n$$\n\\begin{aligned}\nP(X_1==X_{E1}) \\cap P(X_2==X_{E1}) &= \\frac{P_{E1} P_{E2}}{9} \\\\\nP(X_1==X_{Ex}) \\cap P(X_2==X_{Ex}) & = \\frac{P_{E1} P_{E2}}{3}\n\\end{aligned}\n$$\n\nThe probability of a true match between $X_1$ and $X_2$ when $X_1 = X_2$ an observed match :\n\n$$\n\\begin{aligned}\nP(MATCH | X_1 = X_2) = (1- PE_1)(1-PE_2) + \\frac{P_{E1} P_{E2}}{3}\n\\end{aligned}\n$$\n\n**Probability of a true match when $X_1 \\neq X_2$**\n\nThat probability can be divided in three parts. \n\na. $X_1$ has been correctly read and $X_2$ is a sequencing error and is actually equal to $X_1$. \n$$\nP_a = (1-P_{E1})\\frac{P_{E2}}{3}\n$$\na. $X_2$ has been correctly read and $X_1$ is a sequencing error and is actually equal to $X_2$. \n$$\nP_b = (1-P_{E2})\\frac{P_{E1}}{3}\n$$\na. $X_1$ and $X_2$ corresponds to sequencing error but are actually the same base $X_{Ex}$\n$$\nP_c = 2\\frac{P_{E1} P_{E2}}{9}\n$$\n\nConsequently : \n$$\n\\begin{aligned}\nP(MATCH | X_1 \\neq X_2) = (1-P_{E1})\\frac{P_{E2}}{3} + (1-P_{E2})\\frac{P_{E1}}{3} + 2\\frac{P_{E1} P_{E2}}{9}\n\\end{aligned}\n$$\n\n**Probability of a match under the random model**\n\nThe second considered model is a pure random model where every base is equiprobable, hence having a probability of occurrence of a nucleotide equals $0.25$. Under that hypothesis \n\n$$\nP(MATCH | \\text{Random model}) = 0.25\n$$\n\n**The score is a log ration of likelyhood**\n\nScore is define as the logarithm of the ratio between the likelyhood of the observations considering the sequencer error model over tha likelyhood u\n\n\n\n::: {.cell}\n::: {.cell-output-display}\n![Evolution of the match and mismatch scores when the quality of base is 20 while the second range from 10 to 40.](comm_computation_files/figure-pdf/unnamed-chunk-1-1.pdf)\n:::\n:::\n\n\n\n## `obimultiplex`\n\n> Replace the `ngsfilter` original *OBITools*\n\n## `obicomplement`\n\n## `obiclean`\n\n## `obiuniq`\n\n",
"supporting": [
"comm_computation_files"
],
"filters": [
"rmarkdown/pagebreak.lua"
],
"includes": {},
"engineDependencies": {
"knitr": [
"{\"type\":\"list\",\"attributes\":{},\"value\":[]}"
]
},
"preserve": null,
"postProcess": false
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

@@ -0,0 +1,20 @@
{
"hash": "44052e156ff134928de01c20aa868355",
"result": {
"markdown": "# The *OBITools V4* commands\n\n## Specifying the input files to *OBITools* commands\n\n## Options common to most of the *OBITools* commands\n\n### Specifying input format\n\nFive sequence formats are accepted for input files. *Fasta* (@sec-fasta) and *Fastq* (@sec-fastq) are the main ones, EMBL and Genbank allow the use of flat files produced by these two international databases. The last one, ecoPCR, is maintained for compatibility with previous *OBITools* and allows to read *ecoPCR* outputs as sequence files.\n\n- `--ecopcr` : Read data following the *ecoPCR* output format.\n- `--embl` Read data following the *EMBL* flatfile format.\n- `--genbank` Read data following the *Genbank* flatfile format.\n\nSeveral encoding schemes have been proposed for quality scores in *Fastq* format. Currently, *OBITools* considers Sanger encoding as the standard. For reasons of compatibility with older datasets produced with *Solexa* sequencers, it is possible, by using the following option, to force the use of the corresponding quality encoding scheme when reading these older files.\n\n- `--solexa` Decodes quality string according to the Solexa specification. (default: false)\n\n### Specifying output format\n\nOnly two output sequence formats are supported by OBITools, Fasta and Fastq. Fastq is used when output sequences are associated with quality information. Otherwise, Fasta is the default format. However, it is possible to force the output format by using one of the following two options. Forcing the use of Fasta results in the loss of quality information. Conversely, when the Fastq format is forced with sequences that have no quality data, dummy qualities set to 40 for each nucleotide are added.\n\n- `--fasta-output` Read data following the ecoPCR output format.\n- `--fastq-output` Read data following the EMBL flatfile format.\n\nOBITools allows multiple input files to be specified for a single command.\n\n- `--no-order` When several input files are provided, indicates that there is no order among them. (default: false). \n Using such option can increase a lot the processing of the data.\n\n### The Fasta and Fastq annotations format\n\nOBITools extend the [Fasta](#the-fasta-sequence-format) and [Fastq](#the-fastq-sequence-format) formats by introducing a format for the title lines of these formats allowing to annotate every sequence. While the previous version of OBITools used an *ad-hoc* format for these annotation, this new version introduce the usage of the standard JSON format to store them.\n\nOn input, OBITools automatically recognize the format of the annotations, but two options allows to force the parsing following one of them. You should normally not need to use these options.\n\n- `--input-OBI-header` FASTA/FASTQ title line annotations follow OBI format. (default: false)\n\n- `--input-json-header` FASTA/FASTQ title line annotations follow json format. (default: false)\n\nOn output, by default annotation are formatted using the new JSON format. For compatibility with previous version of OBITools and with external scripts and software, it is possible to force the usage of the previous OBITools format.\n\n- `--output-OBI-header|-O` output FASTA/FASTQ title line annotations follow OBI format. (default: false)\n\n- `--output-json-header` output FASTA/FASTQ title line annotations follow json format. (default: false)\n\n#### System related options\n\n- `--debug` (default: false)\n- `--help\\|-h\\|-?` (default: false)\n- `--max-cpu <int>` Number of parallele threads computing the result (default: 10)\n- `--workers\\|-w <int>` Number of parallele threads computing the result (default: 9)\n\n## OBITools expression language\n\nSeveral OBITools (*e.g.* obigrep, obiannotate) allow the user to specify some simple expressions to compute values or define predicates. This expressions are parsed and evaluated using the [gval](https://pkg.go.dev/github.com/PaesslerAG/gval \"Gval (Go eVALuate) for evaluating arbitrary expressions Go-like expressions.\") go package, which allows for evaluating go-Like expression.\n\n### Variables usable in the expression\n\n- `sequence` is the sequence object on which the expression is evaluated.\n- `annotations`is a map object containing every annotations associated to the currently processed sequence.\n\n### Function defined in the language \n\n#### Instrospection functions {.unnumbered}\n\n- `len(x)`is a generic function allowing to retreive the size of a object. It returns \n the length of a sequences, the number of element in a map like `annotations`, the number\n of elements in an array. The reurned value is an `int`.\n\n#### Cast functions {.unnumbered}\n\n- `int(x)` converts if possible the `x` value to an integer value. The function \n returns an `int`.\n- `numeric(x)` converts if possible the `x` value to a float value. The function \n returns a `float`.\n- `bool(x)` converts if possible the `x` value to a boolean vLine truncated
"supporting": [
"commands_files/figure-epub"
],
"filters": [
"rmarkdown/pagebreak.lua"
],
"includes": {},
"engineDependencies": {
"knitr": [
"{\"type\":\"list\",\"attributes\":{},\"value\":[]}"
]
},
"preserve": null,
"postProcess": false
}
}
@@ -0,0 +1,16 @@
{
"hash": "44052e156ff134928de01c20aa868355",
"result": {
"markdown": "# The *OBITools V4* commands\n\n## Specifying the input files to *OBITools* commands\n\n## Options common to most of the *OBITools* commands\n\n### Specifying input format\n\nFive sequence formats are accepted for input files. *Fasta* (@sec-fasta) and *Fastq* (@sec-fastq) are the main ones, EMBL and Genbank allow the use of flat files produced by these two international databases. The last one, ecoPCR, is maintained for compatibility with previous *OBITools* and allows to read *ecoPCR* outputs as sequence files.\n\n- `--ecopcr` : Read data following the *ecoPCR* output format.\n- `--embl` Read data following the *EMBL* flatfile format.\n- `--genbank` Read data following the *Genbank* flatfile format.\n\nSeveral encoding schemes have been proposed for quality scores in *Fastq* format. Currently, *OBITools* considers Sanger encoding as the standard. For reasons of compatibility with older datasets produced with *Solexa* sequencers, it is possible, by using the following option, to force the use of the corresponding quality encoding scheme when reading these older files.\n\n- `--solexa` Decodes quality string according to the Solexa specification. (default: false)\n\n### Specifying output format\n\nOnly two output sequence formats are supported by OBITools, Fasta and Fastq. Fastq is used when output sequences are associated with quality information. Otherwise, Fasta is the default format. However, it is possible to force the output format by using one of the following two options. Forcing the use of Fasta results in the loss of quality information. Conversely, when the Fastq format is forced with sequences that have no quality data, dummy qualities set to 40 for each nucleotide are added.\n\n- `--fasta-output` Read data following the ecoPCR output format.\n- `--fastq-output` Read data following the EMBL flatfile format.\n\nOBITools allows multiple input files to be specified for a single command.\n\n- `--no-order` When several input files are provided, indicates that there is no order among them. (default: false). \n Using such option can increase a lot the processing of the data.\n\n### The Fasta and Fastq annotations format\n\nOBITools extend the [Fasta](#the-fasta-sequence-format) and [Fastq](#the-fastq-sequence-format) formats by introducing a format for the title lines of these formats allowing to annotate every sequence. While the previous version of OBITools used an *ad-hoc* format for these annotation, this new version introduce the usage of the standard JSON format to store them.\n\nOn input, OBITools automatically recognize the format of the annotations, but two options allows to force the parsing following one of them. You should normally not need to use these options.\n\n- `--input-OBI-header` FASTA/FASTQ title line annotations follow OBI format. (default: false)\n\n- `--input-json-header` FASTA/FASTQ title line annotations follow json format. (default: false)\n\nOn output, by default annotation are formatted using the new JSON format. For compatibility with previous version of OBITools and with external scripts and software, it is possible to force the usage of the previous OBITools format.\n\n- `--output-OBI-header|-O` output FASTA/FASTQ title line annotations follow OBI format. (default: false)\n\n- `--output-json-header` output FASTA/FASTQ title line annotations follow json format. (default: false)\n\n#### System related options\n\n- `--debug` (default: false)\n- `--help\\|-h\\|-?` (default: false)\n- `--max-cpu <int>` Number of parallele threads computing the result (default: 10)\n- `--workers\\|-w <int>` Number of parallele threads computing the result (default: 9)\n\n## OBITools expression language\n\nSeveral OBITools (*e.g.* obigrep, obiannotate) allow the user to specify some simple expressions to compute values or define predicates. This expressions are parsed and evaluated using the [gval](https://pkg.go.dev/github.com/PaesslerAG/gval \"Gval (Go eVALuate) for evaluating arbitrary expressions Go-like expressions.\") go package, which allows for evaluating go-Like expression.\n\n### Variables usable in the expression\n\n- `sequence` is the sequence object on which the expression is evaluated.\n- `annotations`is a map object containing every annotations associated to the currently processed sequence.\n\n### Function defined in the language \n\n#### Instrospection functions {.unnumbered}\n\n- `len(x)`is a generic function allowing to retreive the size of a object. It returns \n the length of a sequences, the number of element in a map like `annotations`, the number\n of elements in an array. The reurned value is an `int`.\n\n#### Cast functions {.unnumbered}\n\n- `int(x)` converts if possible the `x` value to an integer value. The function \n returns an `int`.\n- `numeric(x)` converts if possible the `x` value to a float value. The function \n returns a `float`.\n- `bool(x)` converts if possible the `x` value to a boolean vLine truncated
"supporting": [
"commands_files"
],
"filters": [
"rmarkdown/pagebreak.lua"
],
"includes": {},
"engineDependencies": {},
"preserve": {},
"postProcess": true
}
}
@@ -0,0 +1,20 @@
{
"hash": "44052e156ff134928de01c20aa868355",
"result": {
"markdown": "# The *OBITools V4* commands\n\n## Specifying the input files to *OBITools* commands\n\n## Options common to most of the *OBITools* commands\n\n### Specifying input format\n\nFive sequence formats are accepted for input files. *Fasta* (@sec-fasta) and *Fastq* (@sec-fastq) are the main ones, EMBL and Genbank allow the use of flat files produced by these two international databases. The last one, ecoPCR, is maintained for compatibility with previous *OBITools* and allows to read *ecoPCR* outputs as sequence files.\n\n- `--ecopcr` : Read data following the *ecoPCR* output format.\n- `--embl` Read data following the *EMBL* flatfile format.\n- `--genbank` Read data following the *Genbank* flatfile format.\n\nSeveral encoding schemes have been proposed for quality scores in *Fastq* format. Currently, *OBITools* considers Sanger encoding as the standard. For reasons of compatibility with older datasets produced with *Solexa* sequencers, it is possible, by using the following option, to force the use of the corresponding quality encoding scheme when reading these older files.\n\n- `--solexa` Decodes quality string according to the Solexa specification. (default: false)\n\n### Specifying output format\n\nOnly two output sequence formats are supported by OBITools, Fasta and Fastq. Fastq is used when output sequences are associated with quality information. Otherwise, Fasta is the default format. However, it is possible to force the output format by using one of the following two options. Forcing the use of Fasta results in the loss of quality information. Conversely, when the Fastq format is forced with sequences that have no quality data, dummy qualities set to 40 for each nucleotide are added.\n\n- `--fasta-output` Read data following the ecoPCR output format.\n- `--fastq-output` Read data following the EMBL flatfile format.\n\nOBITools allows multiple input files to be specified for a single command.\n\n- `--no-order` When several input files are provided, indicates that there is no order among them. (default: false). \n Using such option can increase a lot the processing of the data.\n\n### The Fasta and Fastq annotations format\n\nOBITools extend the [Fasta](#the-fasta-sequence-format) and [Fastq](#the-fastq-sequence-format) formats by introducing a format for the title lines of these formats allowing to annotate every sequence. While the previous version of OBITools used an *ad-hoc* format for these annotation, this new version introduce the usage of the standard JSON format to store them.\n\nOn input, OBITools automatically recognize the format of the annotations, but two options allows to force the parsing following one of them. You should normally not need to use these options.\n\n- `--input-OBI-header` FASTA/FASTQ title line annotations follow OBI format. (default: false)\n\n- `--input-json-header` FASTA/FASTQ title line annotations follow json format. (default: false)\n\nOn output, by default annotation are formatted using the new JSON format. For compatibility with previous version of OBITools and with external scripts and software, it is possible to force the usage of the previous OBITools format.\n\n- `--output-OBI-header|-O` output FASTA/FASTQ title line annotations follow OBI format. (default: false)\n\n- `--output-json-header` output FASTA/FASTQ title line annotations follow json format. (default: false)\n\n#### System related options\n\n- `--debug` (default: false)\n- `--help\\|-h\\|-?` (default: false)\n- `--max-cpu <int>` Number of parallele threads computing the result (default: 10)\n- `--workers\\|-w <int>` Number of parallele threads computing the result (default: 9)\n\n## OBITools expression language\n\nSeveral OBITools (*e.g.* obigrep, obiannotate) allow the user to specify some simple expressions to compute values or define predicates. This expressions are parsed and evaluated using the [gval](https://pkg.go.dev/github.com/PaesslerAG/gval \"Gval (Go eVALuate) for evaluating arbitrary expressions Go-like expressions.\") go package, which allows for evaluating go-Like expression.\n\n### Variables usable in the expression\n\n- `sequence` is the sequence object on which the expression is evaluated.\n- `annotations`is a map object containing every annotations associated to the currently processed sequence.\n\n### Function defined in the language \n\n#### Instrospection functions {.unnumbered}\n\n- `len(x)`is a generic function allowing to retreive the size of a object. It returns \n the length of a sequences, the number of element in a map like `annotations`, the number\n of elements in an array. The reurned value is an `int`.\n\n#### Cast functions {.unnumbered}\n\n- `int(x)` converts if possible the `x` value to an integer value. The function \n returns an `int`.\n- `numeric(x)` converts if possible the `x` value to a float value. The function \n returns a `float`.\n- `bool(x)` converts if possible the `x` value to a boolean vLine truncated
"supporting": [
"commands_files/figure-pdf"
],
"filters": [
"rmarkdown/pagebreak.lua"
],
"includes": {},
"engineDependencies": {
"knitr": [
"{\"type\":\"list\",\"attributes\":{},\"value\":[]}"
]
},
"preserve": null,
"postProcess": false
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

+7
View File
@@ -0,0 +1,7 @@
/*!
* clipboard.js v2.0.10
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return o}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),c=n.n(e);function a(t){try{return document.execCommand(t)}catch(t){return}}var f=function(t){t=c()(t);return a("cut"),t};var l=function(t){var e,n,o,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body},i="";return"string"==typeof t?(e=t,n="rtl"===document.documentElement.getAttribute("dir"),(o=document.createElement("textarea")).style.fontSize="12pt",o.style.border="0",o.style.padding="0",o.style.margin="0",o.style.position="absolute",o.style[n?"right":"left"]="-9999px",n=window.pageYOffset||document.documentElement.scrollTop,o.style.top="".concat(n,"px"),o.setAttribute("readonly",""),o.value=e,o=o,r.container.appendChild(o),i=c()(o),a("copy"),o.remove()):(i=c()(t),a("copy")),i};function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.action,n=void 0===e?"copy":e,o=t.container,e=t.target,t=t.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==e){if(!e||"object"!==r(e)||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return t?l(t,{container:o}):e?"cut"===n?f(e):l(e,{container:o}):void 0};function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function y(t,e){return(y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(n){var o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=m(n);return t=o?(t=m(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==p(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function v(t,e){t="data-clipboard-".concat(t);if(e.hasAttribute(t))return e.getAttribute(t)}var o=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)}(r,i());var t,e,n,o=h(r);function r(t,e){var n;return function(t){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this),(n=o.call(this)).resolveOptions(e),n.listenClick(t),n}return t=r,n=[{key:"copy",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body};return l(t,e)}},{key:"cut",value:function(t){return f(t)}},{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof t?[t]:t,e=!!document.queryCommandSupported;return t.forEach(function(t){e=e&&!!document.queryCommandSupported(t)}),e}}],(e=[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===p(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=u()(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget,n=this.action(e)||"copy",t=s({action:n,container:this.container,target:this.target(e),text:this.text(e)});this.emit(t?"success":"error",{action:n,text:t,trigger:e,clearSelection:function(){e&&e.focus(),documLine truncated
@@ -0,0 +1,20 @@
{
"hash": "86547a9298483fb00c80e5530b9c8997",
"result": {
"markdown": "# OBITools V4 Tutorial\n\nHere is a short tutorial on how to analyze DNA metabarcoding data produced on Illumina sequencers using:\n\n- the OBITools\n- some basic Unix commands\n\n## Wolves’ diet based on DNA metabarcoding\n\nThe data used in this tutorial correspond to the analysis of four wolf scats, using the protocol published in @Shehzad2012-pn for assessing carnivore diet. After extracting DNA from the faeces, the DNA amplifications were carried out using the primers `TTAGATACCCCACTATGC` and `TAGAACAGGCTCCTCTAG` amplifiying the *12S-V5* region [@Riaz2011-gn], together with a wolf blocking oligonucleotide.\n\nThe complete data set can be downloaded here: [the tutorial dataset](wolf_diet.tgz) \n\nOnce the data file is downloaded, using a UNIX terminal unarchive the data from the `tgz` file.\n\n\n\n\n::: {.cell}\n\n```{.bash .cell-code}\ntar zxvf wolf_diet.tgz\n```\n:::\n\n\n\n\nThat command create a new directory named `wolf_data` containing every required data files:\n\n- `fastq <fastq>` files resulting of aGA IIx (Illumina) paired-end (2 x 108 bp) \n sequencing assay of DNA extracted and amplified from four wolf faeces:\n\n - `wolf_F.fastq`\n - `wolf_R.fastq`\n\n- the file describing the primers and tags used for all samples\n sequenced:\n\n - `wolf_diet_ngsfilter.txt` The tags correspond to short and\n specific sequences added on the 5\\' end of each primer to\n distinguish the different samples\n\n- the file containing the reference database in a fasta format:\n\n - `db_v05_r117.fasta` This reference database has been extracted\n from the release 117 of EMBL using `obipcr`\n\n\n\n\n::: {.cell}\n\n:::\n\n\n\n\nTo not mix raw data and processed data a new directory called `results` is created.\n\n\n\n\n::: {.cell}\n\n```{.bash .cell-code}\nmkdir results\n```\n:::\n\n\n\n \n## Step by step analysis\n\n### Recover full sequence reads from forward and reverse partial reads\n\nWhen using the result of a paired-end sequencing assay with supposedly\noverlapping forward and reverse reads, the first step is to recover the\nassembled sequence.\n\nThe forward and reverse reads of the same fragment are *at the same line\nposition* in the two fastq files obtained after sequencing. Based on\nthese two files, the assembly of the forward and reverse reads is done\nwith the `obipairing` utility that aligns the two reads and returns the\nreconstructed sequence.\n\nIn our case, the command is:\n\n\n\n\n::: {.cell}\n\n```{.bash .cell-code}\nobipairing --min-identity=0.8 \\\n --min-overlap=10 \\\n -F wolf_data/wolf_F.fastq \\\n -R wolf_data/wolf_R.fastq \\\n > results/wolf.fastq \n```\n:::\n\n\n\n\nThe `--min-identity` and `--min-overlap` options allow\ndiscarding sequences with low alignment quality. If after the aligment,\nthe overlaping parts of the reads is shorter than 10 base pairs or the \nsimilarity over this aligned region is below 80% of identity, in the output file,\nthe forward and reverse reads are not aligned but concatenated, and the value of \nthe `mode` attribute in the sequence header is set to `joined` instead of `alignment`.\n\n### Remove unaligned sequence records\n\nUnaligned sequences (:py`mode=joined`{.interpreted-text role=\"mod\"})\ncannot be used. The following command allows removing them from the\ndataset:\n\n\n\n\n::: {.cell}\n\n```{.bash .cell-code}\nobigrep -p 'annotations.mode != \"join\"' \\\n results/wolf.fastq > results/wolf.ali.fastq\n```\n:::\n\n\n\n\nThe `-p` requires a go like expression. `annotations.mode != \"join\"` means that\nif the value of the `mode` annotation of a sequence is\ndifferent from `join`, the corresponding sequence record will be kept.\n\nThe first sequence record of `wolf.ali.fastq` can be obtained using the\nfollowing command line:\n\n\n\n\n::: {.cell}\n\n```{.bash .cell-code}\nhead -n 4 results/wolf.ali.fastq\n```\n:::\n\n\n\n\nThe folling piece of code appears on thew window of tour terminal.\n\n```\n@HELIUM_000100422_612GNAAXX:7:108:5640:3823#0/1 {\"ali_dir\":\"left\",\"ali_length\":62,\"mode\":\"alignment\",\"pairing_mismatches\":{\"(T:26)->(G:13)\":62,\"(T:34)->(G:18)\":48},\"score\":484,\"score_norm\":0.968,\"seq_a_single\":46,\"seq_ab_match\":60,\"seq_b_single\":46}\nccgcctcctttagataccccactatgcttagccctaaacacaagtaattaatataacaaaattgttcgccagagtactaccggcaatagcttaaaactcaaaggacttggcggtgctttatacccttctagaggagcctgttctaaggaggcgg\n+\nCCCCCCCBCCCCCCCCCCCCCCCCCCCCCCBCCCCCBCCCCCCC<CcCccbe[`F`accXV<TA\\RYU\\\\ee_e[XZ[XEEEEEEEEEE?EEEEEEEEEEDEEEEEEECCCCCCCCCCCCCCCCCCCCCCCACCCCCACCCCCCCCCCCCCCCC\n```\n\n### Assign each sequence record to the corresponding sample/marker combination\n\nEach sequence record is assigned to its corresponding sample and marker\nusing the data provided in a text file (here `wolf_diet_ngsfilter.txt`).\nThis text file contains one line per sample, with the name of the\nexperiment (several experiments can be included in the same Line truncated
"supporting": [
"tutorial_files/figure-epub"
],
"filters": [
"rmarkdown/pagebreak.lua"
],
"includes": {},
"engineDependencies": {
"knitr": [
"{\"type\":\"list\",\"attributes\":{},\"value\":[]}"
]
},
"preserve": null,
"postProcess": false
}
}
@@ -0,0 +1,16 @@
{
"hash": "86547a9298483fb00c80e5530b9c8997",
"result": {
"markdown": "# OBITools V4 Tutorial\n\nHere is a short tutorial on how to analyze DNA metabarcoding data produced on Illumina sequencers using:\n\n- the OBITools\n- some basic Unix commands\n\n## Wolves’ diet based on DNA metabarcoding\n\nThe data used in this tutorial correspond to the analysis of four wolf scats, using the protocol published in @Shehzad2012-pn for assessing carnivore diet. After extracting DNA from the faeces, the DNA amplifications were carried out using the primers `TTAGATACCCCACTATGC` and `TAGAACAGGCTCCTCTAG` amplifiying the *12S-V5* region [@Riaz2011-gn], together with a wolf blocking oligonucleotide.\n\nThe complete data set can be downloaded here: [the tutorial dataset](wolf_diet.tgz) \n\nOnce the data file is downloaded, using a UNIX terminal unarchive the data from the `tgz` file.\n\n\n::: {.cell}\n\n```{.bash .cell-code}\ntar zxvf wolf_diet.tgz\n```\n:::\n\n\nThat command create a new directory named `wolf_data` containing every required data files:\n\n- `fastq <fastq>` files resulting of aGA IIx (Illumina) paired-end (2 x 108 bp) \n sequencing assay of DNA extracted and amplified from four wolf faeces:\n\n - `wolf_F.fastq`\n - `wolf_R.fastq`\n\n- the file describing the primers and tags used for all samples\n sequenced:\n\n - `wolf_diet_ngsfilter.txt` The tags correspond to short and\n specific sequences added on the 5\\' end of each primer to\n distinguish the different samples\n\n- the file containing the reference database in a fasta format:\n\n - `db_v05_r117.fasta` This reference database has been extracted\n from the release 117 of EMBL using `obipcr`\n\n\n::: {.cell}\n\n:::\n\n\nTo not mix raw data and processed data a new directory called `results` is created.\n\n\n::: {.cell}\n\n```{.bash .cell-code}\nmkdir results\n```\n:::\n\n \n## Step by step analysis\n\n### Recover full sequence reads from forward and reverse partial reads\n\nWhen using the result of a paired-end sequencing assay with supposedly\noverlapping forward and reverse reads, the first step is to recover the\nassembled sequence.\n\nThe forward and reverse reads of the same fragment are *at the same line\nposition* in the two fastq files obtained after sequencing. Based on\nthese two files, the assembly of the forward and reverse reads is done\nwith the `obipairing` utility that aligns the two reads and returns the\nreconstructed sequence.\n\nIn our case, the command is:\n\n\n::: {.cell}\n\n```{.bash .cell-code}\nobipairing --min-identity=0.8 \\\n --min-overlap=10 \\\n -F wolf_data/wolf_F.fastq \\\n -R wolf_data/wolf_R.fastq \\\n > results/wolf.fastq \n```\n:::\n\n\nThe `--min-identity` and `--min-overlap` options allow\ndiscarding sequences with low alignment quality. If after the aligment,\nthe overlaping parts of the reads is shorter than 10 base pairs or the \nsimilarity over this aligned region is below 80% of identity, in the output file,\nthe forward and reverse reads are not aligned but concatenated, and the value of \nthe `mode` attribute in the sequence header is set to `joined` instead of `alignment`.\n\n### Remove unaligned sequence records\n\nUnaligned sequences (:py`mode=joined`{.interpreted-text role=\"mod\"})\ncannot be used. The following command allows removing them from the\ndataset:\n\n\n::: {.cell}\n\n```{.bash .cell-code}\nobigrep -p 'annotations.mode != \"join\"' \\\n results/wolf.fastq > results/wolf.ali.fastq\n```\n:::\n\n\nThe `-p` requires a go like expression. `annotations.mode != \"join\"` means that\nif the value of the `mode` annotation of a sequence is\ndifferent from `join`, the corresponding sequence record will be kept.\n\nThe first sequence record of `wolf.ali.fastq` can be obtained using the\nfollowing command line:\n\n\n::: {.cell}\n\n```{.bash .cell-code}\nhead -n 4 results/wolf.ali.fastq\n```\n:::\n\n\nThe folling piece of code appears on thew window of tour terminal.\n\n```\n@HELIUM_000100422_612GNAAXX:7:108:5640:3823#0/1 {\"ali_dir\":\"left\",\"ali_length\":62,\"mode\":\"alignment\",\"pairing_mismatches\":{\"(T:26)->(G:13)\":62,\"(T:34)->(G:18)\":48},\"score\":484,\"score_norm\":0.968,\"seq_a_single\":46,\"seq_ab_match\":60,\"seq_b_single\":46}\nccgcctcctttagataccccactatgcttagccctaaacacaagtaattaatataacaaaattgttcgccagagtactaccggcaatagcttaaaactcaaaggacttggcggtgctttatacccttctagaggagcctgttctaaggaggcgg\n+\nCCCCCCCBCCCCCCCCCCCCCCCCCCCCCCBCCCCCBCCCCCCC<CcCccbe[`F`accXV<TA\\RYU\\\\ee_e[XZ[XEEEEEEEEEE?EEEEEEEEEEDEEEEEEECCCCCCCCCCCCCCCCCCCCCCCACCCCCACCCCCCCCCCCCCCCC\n```\n\n### Assign each sequence record to the corresponding sample/marker combination\n\nEach sequence record is assigned to its corresponding sample and marker\nusing the data provided in a text file (here `wolf_diet_ngsfilter.txt`).\nThis text file contains one line per sample, with the name of the\nexperiment (several experiments can be included in the same file), the\nname of the tags (for example: `aattLine truncated
"supporting": [
"tutorial_files"
],
"filters": [
"rmarkdown/pagebreak.lua"
],
"includes": {},
"engineDependencies": {},
"preserve": {},
"postProcess": true
}
}
@@ -0,0 +1,20 @@
{
"hash": "86547a9298483fb00c80e5530b9c8997",
"result": {
"markdown": "# OBITools V4 Tutorial\n\nHere is a short tutorial on how to analyze DNA metabarcoding data produced on Illumina sequencers using:\n\n- the OBITools\n- some basic Unix commands\n\n## Wolves’ diet based on DNA metabarcoding\n\nThe data used in this tutorial correspond to the analysis of four wolf scats, using the protocol published in @Shehzad2012-pn for assessing carnivore diet. After extracting DNA from the faeces, the DNA amplifications were carried out using the primers `TTAGATACCCCACTATGC` and `TAGAACAGGCTCCTCTAG` amplifiying the *12S-V5* region [@Riaz2011-gn], together with a wolf blocking oligonucleotide.\n\nThe complete data set can be downloaded here: [the tutorial dataset](wolf_diet.tgz) \n\nOnce the data file is downloaded, using a UNIX terminal unarchive the data from the `tgz` file.\n\n\n\n::: {.cell}\n\n```{.bash .cell-code}\ntar zxvf wolf_diet.tgz\n```\n:::\n\n\n\nThat command create a new directory named `wolf_data` containing every required data files:\n\n- `fastq <fastq>` files resulting of aGA IIx (Illumina) paired-end (2 x 108 bp) \n sequencing assay of DNA extracted and amplified from four wolf faeces:\n\n - `wolf_F.fastq`\n - `wolf_R.fastq`\n\n- the file describing the primers and tags used for all samples\n sequenced:\n\n - `wolf_diet_ngsfilter.txt` The tags correspond to short and\n specific sequences added on the 5\\' end of each primer to\n distinguish the different samples\n\n- the file containing the reference database in a fasta format:\n\n - `db_v05_r117.fasta` This reference database has been extracted\n from the release 117 of EMBL using `obipcr`\n\n\n\n::: {.cell}\n\n:::\n\n\n\nTo not mix raw data and processed data a new directory called `results` is created.\n\n\n\n::: {.cell}\n\n```{.bash .cell-code}\nmkdir results\n```\n:::\n\n\n \n## Step by step analysis\n\n### Recover full sequence reads from forward and reverse partial reads\n\nWhen using the result of a paired-end sequencing assay with supposedly\noverlapping forward and reverse reads, the first step is to recover the\nassembled sequence.\n\nThe forward and reverse reads of the same fragment are *at the same line\nposition* in the two fastq files obtained after sequencing. Based on\nthese two files, the assembly of the forward and reverse reads is done\nwith the `obipairing` utility that aligns the two reads and returns the\nreconstructed sequence.\n\nIn our case, the command is:\n\n\n\n::: {.cell}\n\n```{.bash .cell-code}\nobipairing --min-identity=0.8 \\\n --min-overlap=10 \\\n -F wolf_data/wolf_F.fastq \\\n -R wolf_data/wolf_R.fastq \\\n > results/wolf.fastq \n```\n:::\n\n\n\nThe `--min-identity` and `--min-overlap` options allow\ndiscarding sequences with low alignment quality. If after the aligment,\nthe overlaping parts of the reads is shorter than 10 base pairs or the \nsimilarity over this aligned region is below 80% of identity, in the output file,\nthe forward and reverse reads are not aligned but concatenated, and the value of \nthe `mode` attribute in the sequence header is set to `joined` instead of `alignment`.\n\n### Remove unaligned sequence records\n\nUnaligned sequences (:py`mode=joined`{.interpreted-text role=\"mod\"})\ncannot be used. The following command allows removing them from the\ndataset:\n\n\n\n::: {.cell}\n\n```{.bash .cell-code}\nobigrep -p 'annotations.mode != \"join\"' \\\n results/wolf.fastq > results/wolf.ali.fastq\n```\n:::\n\n\n\nThe `-p` requires a go like expression. `annotations.mode != \"join\"` means that\nif the value of the `mode` annotation of a sequence is\ndifferent from `join`, the corresponding sequence record will be kept.\n\nThe first sequence record of `wolf.ali.fastq` can be obtained using the\nfollowing command line:\n\n\n\n::: {.cell}\n\n```{.bash .cell-code}\nhead -n 4 results/wolf.ali.fastq\n```\n:::\n\n\n\nThe folling piece of code appears on thew window of tour terminal.\n\n```\n@HELIUM_000100422_612GNAAXX:7:108:5640:3823#0/1 {\"ali_dir\":\"left\",\"ali_length\":62,\"mode\":\"alignment\",\"pairing_mismatches\":{\"(T:26)->(G:13)\":62,\"(T:34)->(G:18)\":48},\"score\":484,\"score_norm\":0.968,\"seq_a_single\":46,\"seq_ab_match\":60,\"seq_b_single\":46}\nccgcctcctttagataccccactatgcttagccctaaacacaagtaattaatataacaaaattgttcgccagagtactaccggcaatagcttaaaactcaaaggacttggcggtgctttatacccttctagaggagcctgttctaaggaggcgg\n+\nCCCCCCCBCCCCCCCCCCCCCCCCCCCCCCBCCCCCBCCCCCCC<CcCccbe[`F`accXV<TA\\RYU\\\\ee_e[XZ[XEEEEEEEEEE?EEEEEEEEEEDEEEEEEECCCCCCCCCCCCCCCCCCCCCCCACCCCCACCCCCCCCCCCCCCCC\n```\n\n### Assign each sequence record to the corresponding sample/marker combination\n\nEach sequence record is assigned to its corresponding sample and marker\nusing the data provided in a text file (here `wolf_diet_ngsfilter.txt`).\nThis text file contains one line per sample, with the name of the\nexperiment (several experiments can be included in the same file), the\nname of the Line truncated
"supporting": [
"tutorial_files/figure-pdf"
],
"filters": [
"rmarkdown/pagebreak.lua"
],
"includes": {},
"engineDependencies": {
"knitr": [
"{\"type\":\"list\",\"attributes\":{},\"value\":[]}"
]
},
"preserve": null,
"postProcess": false
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB